Skip to content

Instantly share code, notes, and snippets.

@gauchomatt
Last active November 18, 2016 18:17
Show Gist options
  • Save gauchomatt/e3f80ba1524a0925c70f61ea516c73ee to your computer and use it in GitHub Desktop.
Save gauchomatt/e3f80ba1524a0925c70f61ea516c73ee to your computer and use it in GitHub Desktop.
Compiled version of the d3plus-text
/*
d3plus-text v0.9.8
A smart SVG text box with line wrapping and automatic font size scaling.
Copyright (c) 2016 D3plus - https://d3plus.org
@license MIT
*/
(function(t,e){typeof exports==="object"&&typeof module!=="undefined"?e(exports):typeof define==="function"&&define.amd?define("d3plus-text",["exports"],e):e(t.d3plus=t.d3plus||{})})(this,function(t){"use strict";var e=function(t){if(t===void 0)t="undefined";else if(!(typeof t==="string"||t instanceof String))t=JSON.stringify(t);return t};var n=[[/[\300-\305]/g,"A"],[/[\340-\345]/g,"a"],[/[\306]/g,"AE"],[/[\346]/g,"ae"],[/[\337]/g,"B"],[/[\307]/g,"C"],[/[\347]/g,"c"],[/[\320\336\376]/g,"D"],[/[\360]/g,"d"],[/[\310-\313]/g,"E"],[/[\350-\353]/g,"e"],[/[\314-\317]/g,"I"],[/[\354-\357]/g,"i"],[/[\321]/g,"N"],[/[\361]/g,"n"],[/[\322-\326\330]/g,"O"],[/[\362-\366\370]/g,"o"],[/[\331-\334]/g,"U"],[/[\371-\374]/g,"u"],[/[\327]/g,"x"],[/[\335]/g,"Y"],[/[\375\377]/g,"y"]];var r=function(t){return(""+t).replace(/[^A-Za-z0-9\-_]/g,function(t){if(t===" ")return"-";var e=false;for(var r=0;r<n.length;r++){if(new RegExp(n[r][0]).test(t)){e=n[r][1];break}}return e||""})};var i="http://www.w3.org/1999/xhtml";var u={svg:"http://www.w3.org/2000/svg",xhtml:i,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};var o=function(t){var e=t+="",n=e.indexOf(":");if(n>=0&&(e=t.slice(0,n))!=="xmlns")t=t.slice(n+1);return u.hasOwnProperty(e)?{space:u[e],local:t}:t};function a(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===i&&e.documentElement.namespaceURI===i?e.createElement(t):e.createElementNS(n,t)}}function s(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}var f=function(t){var e=o(t);return(e.local?s:a)(e)};var l=0;var c=function(t){return function(){return this.matches(t)}};if(typeof document!=="undefined"){var h=document.documentElement;if(!h.matches){var p=h.webkitMatchesSelector||h.msMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector;c=function(t){return function(){return p.call(this,t)}}}}var v=c;var d={};var g=null;if(typeof document!=="undefined"){var y=document.documentElement;if(!("onmouseenter"in y)){d={mouseenter:"mouseover",mouseleave:"mouseout"}}}function m(t,e,n){t=A(t,e,n);return function(e){var n=e.relatedTarget;if(!n||n!==this&&!(n.compareDocumentPosition(this)&8)){t.call(this,e)}}}function A(t,e,n){return function(r){var i=g;g=r;try{t.call(this,this.__data__,e,n)}finally{g=i}}}function w(t){return t.trim().split(/^|\s+/).map(function(t){var e="",n=t.indexOf(".");if(n>=0)e=t.slice(n+1),t=t.slice(0,n);return{type:t,name:e}})}function b(t){return function(){var e=this;var n=this.__on;if(!n)return;for(var r=0,i=-1,u=n.length,o;r<u;++r){if(o=n[r],(!t.type||o.type===t.type)&&o.name===t.name){e.removeEventListener(o.type,o.listener,o.capture)}else{n[++i]=o}}if(++i)n.length=i;else delete this.__on}}function _(t,e,n){var r=d.hasOwnProperty(t.type)?m:A;return function(i,u,o){var a=this;var s=this.__on,f,l=r(e,u,o);if(s)for(var c=0,h=s.length;c<h;++c){if((f=s[c]).type===t.type&&f.name===t.name){a.removeEventListener(f.type,f.listener,f.capture);a.addEventListener(f.type,f.listener=l,f.capture=n);f.value=e;return}}this.addEventListener(t.type,l,n);f={type:t.type,name:t.name,value:e,listener:l,capture:n};if(!s)this.__on=[f];else s.push(f)}}var C=function(t,e,n){var r=this;var i=w(t+""),u,o=i.length,a;if(arguments.length<2){var s=this.node().__on;if(s)for(var f=0,l=s.length,c;f<l;++f){for(u=0,c=s[f];u<o;++u){if((a=i[u]).type===c.type&&a.name===c.name){return c.value}}}return}s=e?_:b;if(n==null)n=false;for(u=0;u<o;++u)r.each(s(i[u],e,n));return this};var E=function(){var t=g,e;while(e=t.sourceEvent)t=e;return t};var B=function(t,e){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();r.x=e.clientX,r.y=e.clientY;r=r.matrixTransform(t.getScreenCTM().inverse());return[r.x,r.y]}var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]};function D(){}var x=function(t){return t==null?D:function(){return this.querySelector(t)}};var F=function(t){if(typeof t!=="function")t=x(t);for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i){for(var u=e[i],o=u.length,a=r[i]=new Array(o),s,f,l=0;l<o;++l){if((s=u[l])&&(f=t.call(s,s.__data__,l,u))){if("__data__"in s)f.__data__=s.__data__;a[l]=f}}}return new Kt(r,this._parents)};function k(){return[]}var O=function(t){return t==null?k:function(){return this.querySelectorAll(t)}};var S=function(t){if(typeof t!=="function")t=O(t);for(var e=this._groups,n=e.length,r=[],i=[],u=0;u<n;++u){for(var o=e[u],a=o.length,s,f=0;f<a;++f){if(s=o[f]){r.push(t.call(s,s.__data__,f,o));i.push(s)}}}return new Kt(r,i)};var N=function(t){if(typeof t!=="function")t=v(t);for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i){for(var u=e[i],o=u.length,a=r[i]=[],s,f=0;f<o;++f){if((s=u[f])&&t.call(s,s.__data__,f,u)){a.push(s)}}}return new Kt(r,this._parents)};var M=function(t){return new Array(t.length)};var j=function(){return new Kt(this._enter||this._groups.map(M),this._parents)};function P(t,e){this.ownerDocument=t.ownerDocument;this.namespaceURI=t.namespaceURI;this._next=null;this._parent=t;this.__data__=e}P.prototype={constructor:P,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var L=function(t){return function(){return t}};var R="$";function T(t,e,n,r,i,u){var o=0,a,s=e.length,f=u.length;for(;o<f;++o){if(a=e[o]){a.__data__=u[o];r[o]=a}else{n[o]=new P(t,u[o])}}for(;o<s;++o){if(a=e[o]){i[o]=a}}}function I(t,e,n,r,i,u,o){var a,s,f={},l=e.length,c=u.length,h=new Array(l),p;for(a=0;a<l;++a){if(s=e[a]){h[a]=p=R+o.call(s,s.__data__,a,e);if(p in f){i[a]=s}else{f[p]=s}}}for(a=0;a<c;++a){p=R+o.call(t,u[a],a,u);if(s=f[p]){r[a]=s;s.__data__=u[a];f[p]=null}else{n[a]=new P(t,u[a])}}for(a=0;a<l;++a){if((s=e[a])&&f[h[a]]===s){i[a]=s}}}var H=function(t,e){if(!t){p=new Array(this.size()),f=-1;this.each(function(t){p[++f]=t});return p}var n=e?I:T,r=this._parents,i=this._groups;if(typeof t!=="function")t=L(t);for(var u=i.length,o=new Array(u),a=new Array(u),s=new Array(u),f=0;f<u;++f){var l=r[f],c=i[f],h=c.length,p=t.call(l,l&&l.__data__,f,r),v=p.length,d=a[f]=new Array(v),g=o[f]=new Array(v),y=s[f]=new Array(h);n(l,c,d,g,y,p,e);for(var m=0,A=0,w,b;m<v;++m){if(w=d[m]){if(m>=A)A=m+1;while(!(b=g[A])&&++A<v);w._next=b||null}}}o=new Kt(o,r);o._enter=a;o._exit=s;return o};var z=function(){return new Kt(this._exit||this._groups.map(M),this._parents)};var V=function(t){for(var e=this._groups,n=t._groups,r=e.length,i=n.length,u=Math.min(r,i),o=new Array(r),a=0;a<u;++a){for(var s=e[a],f=n[a],l=s.length,c=o[a]=new Array(l),h,p=0;p<l;++p){if(h=s[p]||f[p]){c[p]=h}}}for(;a<r;++a){o[a]=e[a]}return new Kt(o,this._parents)};var q=function(){for(var t=this._groups,e=-1,n=t.length;++e<n;){for(var r=t[e],i=r.length-1,u=r[i],o;--i>=0;){if(o=r[i]){if(u&&u!==o.nextSibling)u.parentNode.insertBefore(o,u);u=o}}}return this};var U=function(t){if(!t)t=$;function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}for(var n=this._groups,r=n.length,i=new Array(r),u=0;u<r;++u){for(var o=n[u],a=o.length,s=i[u]=new Array(a),f,l=0;l<a;++l){if(f=o[l]){s[l]=f}}s.sort(e)}return new Kt(i,this._parents).order()};function $(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}var K=function(){var t=arguments[0];arguments[0]=this;t.apply(null,arguments);return this};var X=function(){var t=new Array(this.size()),e=-1;this.each(function(){t[++e]=this});return t};var W=function(){for(var t=this._groups,e=0,n=t.length;e<n;++e){for(var r=t[e],i=0,u=r.length;i<u;++i){var o=r[i];if(o)return o}}return null};var Y=function(){var t=0;this.each(function(){++t});return t};var J=function(){return!this.node()};var G=function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n){for(var i=e[n],u=0,o=i.length,a;u<o;++u){if(a=i[u])t.call(a,a.__data__,u,i)}}return this};function Q(t){return function(){this.removeAttribute(t)}}function Z(t){return function(){this.removeAttributeNS(t.space,t.local)}}function tt(t,e){return function(){this.setAttribute(t,e)}}function et(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function nt(t,e){return function(){var n=e.apply(this,arguments);if(n==null)this.removeAttribute(t);else this.setAttribute(t,n)}}function rt(t,e){return function(){var n=e.apply(this,arguments);if(n==null)this.removeAttributeNS(t.space,t.local);else this.setAttributeNS(t.space,t.local,n)}}var it=function(t,e){var n=o(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((e==null?n.local?Z:Q:typeof e==="function"?n.local?rt:nt:n.local?et:tt)(n,e))};var ut=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function ot(t){return function(){this.style.removeProperty(t)}}function at(t,e,n){return function(){this.style.setProperty(t,e,n)}}function st(t,e,n){return function(){var r=e.apply(this,arguments);if(r==null)this.style.removeProperty(t);else this.style.setProperty(t,r,n)}}var ft=function(t,e,n){var r;return arguments.length>1?this.each((e==null?ot:typeof e==="function"?st:at)(t,e,n==null?"":n)):ut(r=this.node()).getComputedStyle(r,null).getPropertyValue(t)};function lt(t){return function(){delete this[t]}}function ct(t,e){return function(){this[t]=e}}function ht(t,e){return function(){var n=e.apply(this,arguments);if(n==null)delete this[t];else this[t]=n}}var pt=function(t,e){return arguments.length>1?this.each((e==null?lt:typeof e==="function"?ht:ct)(t,e)):this.node()[t]};function vt(t){return t.trim().split(/^|\s+/)}function dt(t){return t.classList||new gt(t)}function gt(t){this._node=t;this._names=vt(t.getAttribute("class")||"")}gt.prototype={add:function(t){var e=this._names.indexOf(t);if(e<0){this._names.push(t);this._node.setAttribute("class",this._names.join(" "))}},remove:function(t){var e=this._names.indexOf(t);if(e>=0){this._names.splice(e,1);this._node.setAttribute("class",this._names.join(" "))}},contains:function(t){return this._names.indexOf(t)>=0}};function yt(t,e){var n=dt(t),r=-1,i=e.length;while(++r<i)n.add(e[r])}function mt(t,e){var n=dt(t),r=-1,i=e.length;while(++r<i)n.remove(e[r])}function At(t){return function(){yt(this,t)}}function wt(t){return function(){mt(this,t)}}function bt(t,e){return function(){(e.apply(this,arguments)?yt:mt)(this,t)}}var _t=function(t,e){var n=vt(t+"");if(arguments.length<2){var r=dt(this.node()),i=-1,u=n.length;while(++i<u)if(!r.contains(n[i]))return false;return true}return this.each((typeof e==="function"?bt:e?At:wt)(n,e))};function Ct(){this.textContent=""}function Et(t){return function(){this.textContent=t}}function Bt(t){return function(){var e=t.apply(this,arguments);this.textContent=e==null?"":e}}var Dt=function(t){return arguments.length?this.each(t==null?Ct:(typeof t==="function"?Bt:Et)(t)):this.node().textContent};function xt(){this.innerHTML=""}function Ft(t){return function(){this.innerHTML=t}}function kt(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e==null?"":e}}var Ot=function(t){return arguments.length?this.each(t==null?xt:(typeof t==="function"?kt:Ft)(t)):this.node().innerHTML};function St(){if(this.nextSibling)this.parentNode.appendChild(this)}var Nt=function(){return this.each(St)};function Mt(){if(this.previousSibling)this.parentNode.insertBefore(this,this.parentNode.firstChild)}var jt=function(){return this.each(Mt)};var Pt=function(t){var e=typeof t==="function"?t:f(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})};function Lt(){return null}var Rt=function(t,e){var n=typeof t==="function"?t:f(t),r=e==null?Lt:typeof e==="function"?e:x(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})};function Tt(){var t=this.parentNode;if(t)t.removeChild(this)}var It=function(){return this.each(Tt)};var Ht=function(t){return arguments.length?this.property("__data__",t):this.node().__data__};function zt(t,e,n){var r=ut(t),i=r.CustomEvent;if(i){i=new i(e,n)}else{i=r.document.createEvent("Event");if(n)i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail;else i.initEvent(e,false,false)}t.dispatchEvent(i)}function Vt(t,e){return function(){return zt(this,t,e)}}function qt(t,e){return function(){return zt(this,t,e.apply(this,arguments))}}var Ut=function(t,e){return this.each((typeof e==="function"?qt:Vt)(t,e))};var $t=[null];function Kt(t,e){this._groups=t;this._parents=e}function Xt(){return new Kt([[document.documentElement]],$t)}Kt.prototype=Xt.prototype={constructor:Kt,select:F,selectAll:S,filter:N,data:H,enter:j,exit:z,merge:V,order:q,sort:U,call:K,nodes:X,node:W,size:Y,empty:J,each:G,attr:it,style:ft,property:pt,classed:_t,text:Dt,html:Ot,raise:Nt,lower:jt,append:Pt,insert:Rt,remove:It,datum:Ht,on:C,dispatch:Ut};var Wt=function(t){return typeof t==="string"?new Kt([[document.querySelector(t)]],[document.documentElement]):new Kt([[t]],$t)};var Yt={value:function(){}};function Jt(){var t=arguments;for(var e=0,n=arguments.length,r={},i;e<n;++e){if(!(i=t[e]+"")||i in r)throw new Error("illegal type: "+i);r[i]=[]}return new Gt(r)}function Gt(t){this._=t}function Qt(t,e){return t.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");if(r>=0)n=t.slice(r+1),t=t.slice(0,r);if(t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}})}Gt.prototype=Jt.prototype={constructor:Gt,on:function(t,e){var n=this._,r=Qt(t+"",n),i,u=-1,o=r.length;if(arguments.length<2){while(++u<o)if((i=(t=r[u]).type)&&(i=Zt(n[i],t.name)))return i;return}if(e!=null&&typeof e!=="function")throw new Error("invalid callback: "+e);while(++u<o){if(i=(t=r[u]).type)n[i]=te(n[i],t.name,e);else if(e==null)for(i in n)n[i]=te(n[i],t.name,null)}return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Gt(t)},call:function(t,e){var n=arguments;if((u=arguments.length-2)>0)for(var r=new Array(u),i=0,u,o;i<u;++i)r[i]=n[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],i=0,u=o.length;i<u;++i)o[i].value.apply(e,r)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,u=r.length;i<u;++i)r[i].value.apply(e,n)}};function Zt(t,e){for(var n=0,r=t.length,i;n<r;++n){if((i=t[n]).name===e){return i.value}}}function te(t,e,n){for(var r=0,i=t.length;r<i;++r){if(t[r].name===e){t[r]=Yt,t=t.slice(0,r).concat(t.slice(r+1));break}}if(n!=null)t.push({name:e,value:n});return t}var ee=0;var ne=0;var re=0;var ie=1e3;var ue;var oe;var ae=0;var se=0;var fe=0;var le=typeof performance==="object"&&performance.now?performance:Date;var ce=typeof requestAnimationFrame==="function"?requestAnimationFrame:function(t){setTimeout(t,17)};function he(){return se||(ce(pe),se=le.now()+fe)}function pe(){se=0}function ve(){this._call=this._time=this._next=null}ve.prototype=de.prototype={constructor:ve,restart:function(t,e,n){if(typeof t!=="function")throw new TypeError("callback is not a function");n=(n==null?he():+n)+(e==null?0:+e);if(!this._next&&oe!==this){if(oe)oe._next=this;else ue=this;oe=this}this._call=t;this._time=n;we()},stop:function(){if(this._call){this._call=null;this._time=Infinity;we()}}};function de(t,e,n){var r=new ve;r.restart(t,e,n);return r}function ge(){he();++ee;var t=ue,e;while(t){if((e=se-t._time)>=0)t._call.call(null,e);t=t._next}--ee}function ye(){se=(ae=le.now())+fe;ee=ne=0;try{ge()}finally{ee=0;Ae();se=0}}function me(){var t=le.now(),e=t-ae;if(e>ie)fe-=e,ae=t}function Ae(){var t,e=ue,n,r=Infinity;while(e){if(e._call){if(r>e._time)r=e._time;t=e,e=e._next}else{n=e._next,e._next=null;e=t?t._next=n:ue=n}}oe=t;we(r)}function we(t){if(ee)return;if(ne)ne=clearTimeout(ne);var e=t-se;if(e>24){if(t<Infinity)ne=setTimeout(ye,e);if(re)re=clearInterval(re)}else{if(!re)re=setInterval(me,ie);ee=1,ce(ye)}}var be=function(t,e,n){var r=new ve;e=e==null?0:+e;r.restart(function(n){r.stop();t(n+e)},e,n);return r};var _e=Jt("start","end","interrupt");var Ce=[];var Ee=0;var Be=1;var De=2;var xe=3;var Fe=4;var ke=5;var Oe=6;var Se=function(t,e,n,r,i,u){var o=t.__transition;if(!o)t.__transition={};else if(n in o)return;Pe(t,n,{name:e,index:r,group:i,on:_e,tween:Ce,time:u.time,delay:u.delay,duration:u.duration,ease:u.ease,timer:null,state:Ee})};function Ne(t,e){var n=t.__transition;if(!n||!(n=n[e])||n.state>Ee)throw new Error("too late");return n}function Me(t,e){var n=t.__transition;if(!n||!(n=n[e])||n.state>De)throw new Error("too late");return n}function je(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("too late");return n}function Pe(t,e,n){var r=t.__transition,i;r[e]=n;n.timer=de(u,0,n.time);function u(t){n.state=Be;n.timer.restart(o,n.delay,n.time);if(n.delay<=t)o(t-n.delay)}function o(u){var f,l,c,h;if(n.state!==Be)return s();for(f in r){h=r[f];if(h.name!==n.name)continue;if(h.state===xe)return be(o);if(h.state===Fe){h.state=Oe;h.timer.stop();h.on.call("interrupt",t,t.__data__,h.index,h.group);delete r[f]}else if(+f<e){h.state=Oe;h.timer.stop();delete r[f]}}be(function(){if(n.state===xe){n.state=Fe;n.timer.restart(a,n.delay,n.time);a(u)}});n.state=De;n.on.call("start",t,t.__data__,n.index,n.group);if(n.state!==De)return;n.state=xe;i=new Array(c=n.tween.length);for(f=0,l=-1;f<c;++f){if(h=n.tween[f].value.call(t,t.__data__,n.index,n.group)){i[++l]=h}}i.length=l+1}function a(e){var r=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(s),n.state=ke,1),u=-1,o=i.length;while(++u<o){i[u].call(null,r)}if(n.state===ke){n.on.call("end",t,t.__data__,n.index,n.group);s()}}function s(){n.state=Oe;n.timer.stop();delete r[e];for(var i in r)return;delete t.__transition}}var Le=function(t,e){var n=t.__transition,r,i,u=true,o;if(!n)return;e=e==null?null:e+"";for(o in n){if((r=n[o]).name!==e){u=false;continue}i=r.state>De&&r.state<ke;r.state=Oe;r.timer.stop();if(i)r.on.call("interrupt",t,t.__data__,r.index,r.group);delete n[o]}if(u)delete t.__transition};var Re=function(t){return this.each(function(){Le(this,t)})};var Te=function(t,e,n){t.prototype=e.prototype=n;n.constructor=t};function Ie(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function He(){}var ze=.7;var Ve=1/ze;var qe=/^#([0-9a-f]{3})$/;var Ue=/^#([0-9a-f]{6})$/;var $e=/^rgb\(\s*([-+]?\d+)\s*,\s*([-+]?\d+)\s*,\s*([-+]?\d+)\s*\)$/;var Ke=/^rgb\(\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*\)$/;var Xe=/^rgba\(\s*([-+]?\d+)\s*,\s*([-+]?\d+)\s*,\s*([-+]?\d+)\s*,\s*([-+]?\d+(?:\.\d+)?)\s*\)$/;var We=/^rgba\(\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)\s*\)$/;var Ye=/^hsl\(\s*([-+]?\d+(?:\.\d+)?)\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*\)$/;var Je=/^hsla\(\s*([-+]?\d+(?:\.\d+)?)\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)\s*\)$/;var Ge={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};Te(He,Qe,{displayable:function(){return this.rgb().displayable()},toString:function(){return this.rgb()+""}});function Qe(t){var e;t=(t+"").trim().toLowerCase();return(e=qe.exec(t))?(e=parseInt(e[1],16),new rn(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1)):(e=Ue.exec(t))?Ze(parseInt(e[1],16)):(e=$e.exec(t))?new rn(e[1],e[2],e[3],1):(e=Ke.exec(t))?new rn(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=Xe.exec(t))?tn(e[1],e[2],e[3],e[4]):(e=We.exec(t))?tn(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=Ye.exec(t))?un(e[1],e[2]/100,e[3]/100,1):(e=Je.exec(t))?un(e[1],e[2]/100,e[3]/100,e[4]):Ge.hasOwnProperty(t)?Ze(Ge[t]):t==="transparent"?new rn(NaN,NaN,NaN,0):null}function Ze(t){return new rn(t>>16&255,t>>8&255,t&255,1)}function tn(t,e,n,r){if(r<=0)t=e=n=NaN;return new rn(t,e,n,r)}function en(t){if(!(t instanceof He))t=Qe(t);if(!t)return new rn;t=t.rgb();return new rn(t.r,t.g,t.b,t.opacity)}function nn(t,e,n,r){return arguments.length===1?en(t):new rn(t,e,n,r==null?1:r)}function rn(t,e,n,r){this.r=+t;this.g=+e;this.b=+n;this.opacity=+r}Te(rn,nn,Ie(He,{brighter:function(t){t=t==null?Ve:Math.pow(Ve,t);return new rn(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){t=t==null?ze:Math.pow(ze,t);return new rn(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&(0<=this.g&&this.g<=255)&&(0<=this.b&&this.b<=255)&&(0<=this.opacity&&this.opacity<=1)},toString:function(){var t=this.opacity;t=isNaN(t)?1:Math.max(0,Math.min(1,t));return(t===1?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(t===1?")":", "+t+")")}}));function un(t,e,n,r){if(r<=0)t=e=n=NaN;else if(n<=0||n>=1)t=e=NaN;else if(e<=0)t=NaN;return new sn(t,e,n,r)}function on(t){if(t instanceof sn)return new sn(t.h,t.s,t.l,t.opacity);if(!(t instanceof He))t=Qe(t);if(!t)return new sn;if(t instanceof sn)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),u=Math.max(e,n,r),o=NaN,a=u-i,s=(u+i)/2;if(a){if(e===u)o=(n-r)/a+(n<r)*6;else if(n===u)o=(r-e)/a+2;else o=(e-n)/a+4;a/=s<.5?u+i:2-u-i;o*=60}else{a=s>0&&s<1?0:o}return new sn(o,a,s,t.opacity)}function an(t,e,n,r){return arguments.length===1?on(t):new sn(t,e,n,r==null?1:r)}function sn(t,e,n,r){this.h=+t;this.s=+e;this.l=+n;this.opacity=+r}Te(sn,an,Ie(He,{brighter:function(t){t=t==null?Ve:Math.pow(Ve,t);return new sn(this.h,this.s,this.l*t,this.opacity)},darker:function(t){t=t==null?ze:Math.pow(ze,t);return new sn(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new rn(fn(t>=240?t-240:t+120,i,r),fn(t,i,r),fn(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&(0<=this.l&&this.l<=1)&&(0<=this.opacity&&this.opacity<=1)}}));function fn(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}var ln=Math.PI/180;var cn=180/Math.PI;var hn=18;var pn=.95047;var vn=1;var dn=1.08883;var gn=4/29;var yn=6/29;var mn=3*yn*yn;var An=yn*yn*yn;function wn(t){if(t instanceof _n)return new _n(t.l,t.a,t.b,t.opacity);if(t instanceof kn){var e=t.h*ln;return new _n(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}if(!(t instanceof rn))t=en(t);var n=Dn(t.r),r=Dn(t.g),i=Dn(t.b),u=Cn((.4124564*n+.3575761*r+.1804375*i)/pn),o=Cn((.2126729*n+.7151522*r+.072175*i)/vn),a=Cn((.0193339*n+.119192*r+.9503041*i)/dn);return new _n(116*o-16,500*(u-o),200*(o-a),t.opacity)}function bn(t,e,n,r){return arguments.length===1?wn(t):new _n(t,e,n,r==null?1:r)}function _n(t,e,n,r){this.l=+t;this.a=+e;this.b=+n;this.opacity=+r}Te(_n,bn,Ie(He,{brighter:function(t){return new _n(this.l+hn*(t==null?1:t),this.a,this.b,this.opacity)},darker:function(t){return new _n(this.l-hn*(t==null?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;t=vn*En(t);e=pn*En(e);n=dn*En(n);return new rn(Bn(3.2404542*e-1.5371385*t-.4985314*n),Bn(-.969266*e+1.8760108*t+.041556*n),Bn(.0556434*e-.2040259*t+1.0572252*n),this.opacity)}}));function Cn(t){return t>An?Math.pow(t,1/3):t/mn+gn}function En(t){return t>yn?t*t*t:mn*(t-gn)}function Bn(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Dn(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function xn(t){if(t instanceof kn)return new kn(t.h,t.c,t.l,t.opacity);if(!(t instanceof _n))t=wn(t);var e=Math.atan2(t.b,t.a)*cn;return new kn(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function Fn(t,e,n,r){return arguments.length===1?xn(t):new kn(t,e,n,r==null?1:r)}function kn(t,e,n,r){this.h=+t;this.c=+e;this.l=+n;this.opacity=+r}Te(kn,Fn,Ie(He,{brighter:function(t){return new kn(this.h,this.c,this.l+hn*(t==null?1:t),this.opacity)},darker:function(t){return new kn(this.h,this.c,this.l-hn*(t==null?1:t),this.opacity)},rgb:function(){return wn(this).rgb()}}));var On=-.14861;var Sn=+1.78277;var Nn=-.29227;var Mn=-.90649;var jn=+1.97294;var Pn=jn*Mn;var Ln=jn*Sn;var Rn=Sn*Nn-Mn*On;function Tn(t){if(t instanceof Hn)return new Hn(t.h,t.s,t.l,t.opacity);if(!(t instanceof rn))t=en(t);var e=t.r/255,n=t.g/255,r=t.b/255,i=(Rn*r+Pn*e-Ln*n)/(Rn+Pn-Ln),u=r-i,o=(jn*(n-i)-Nn*u)/Mn,a=Math.sqrt(o*o+u*u)/(jn*i*(1-i)),s=a?Math.atan2(o,u)*cn-120:NaN;return new Hn(s<0?s+360:s,a,i,t.opacity)}function In(t,e,n,r){return arguments.length===1?Tn(t):new Hn(t,e,n,r==null?1:r)}function Hn(t,e,n,r){this.h=+t;this.s=+e;this.l=+n;this.opacity=+r}Te(Hn,In,Ie(He,{brighter:function(t){t=t==null?Ve:Math.pow(Ve,t);return new Hn(this.h,this.s,this.l*t,this.opacity)},darker:function(t){t=t==null?ze:Math.pow(ze,t);return new Hn(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*ln,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new rn(255*(e+n*(On*r+Sn*i)),255*(e+n*(Nn*r+Mn*i)),255*(e+n*(jn*r)),this.opacity)}}));function zn(t,e,n,r,i){var u=t*t,o=u*t;return((1-3*t+3*u-o)*e+(4-6*u+3*o)*n+(1+3*t+3*u-3*o)*r+o*i)/6}var Vn=function(t){return function(){return t}};function qn(t,e){return function(n){return t+n*e}}function Un(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function $n(t,e){var n=e-t;return n?qn(t,n>180||n<-180?n-360*Math.round(n/360):n):Vn(isNaN(t)?e:t)}function Kn(t){return(t=+t)===1?Xn:function(e,n){return n-e?Un(e,n,t):Vn(isNaN(e)?n:e)}}function Xn(t,e){var n=e-t;return n?qn(t,n):Vn(isNaN(t)?e:t)}var Wn=function t(e){var n=Kn(e);function r(t,e){var r=n((t=nn(t)).r,(e=nn(e)).r),i=n(t.g,e.g),u=n(t.b,e.b),o=n(t.opacity,e.opacity);return function(e){t.r=r(e);t.g=i(e);t.b=u(e);t.opacity=o(e);return t+""}}r.gamma=t;return r}(1);var Yn=function(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,i=new Array(n),u=new Array(n),o;for(o=0;o<r;++o)i[o]=ir(t[o],e[o]);for(;o<n;++o)u[o]=e[o];return function(t){for(o=0;o<r;++o)u[o]=i[o](t);return u}};var Jn=function(t,e){var n=new Date;return t=+t,e-=t,function(r){return n.setTime(t+e*r),n}};var Gn=function(t,e){return t=+t,e-=t,function(n){return t+e*n}};var Qn=function(t,e){var n={},r={},i;if(t===null||typeof t!=="object")t={};if(e===null||typeof e!=="object")e={};for(i in e){if(i in t){n[i]=ir(t[i],e[i])}else{r[i]=e[i]}}return function(t){for(i in n)r[i]=n[i](t);return r}};var Zn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g;var tr=new RegExp(Zn.source,"g");function er(t){return function(){return t}}function nr(t){return function(e){return t(e)+""}}var rr=function(t,e){var n=Zn.lastIndex=tr.lastIndex=0,r,i,u,o=-1,a=[],s=[];t=t+"",e=e+"";while((r=Zn.exec(t))&&(i=tr.exec(e))){if((u=i.index)>n){u=e.slice(n,u);if(a[o])a[o]+=u;else a[++o]=u}if((r=r[0])===(i=i[0])){if(a[o])a[o]+=i;else a[++o]=i}else{a[++o]=null;s.push({i:o,x:Gn(r,i)})}n=tr.lastIndex}if(n<e.length){u=e.slice(n);if(a[o])a[o]+=u;else a[++o]=u}return a.length<2?s[0]?nr(s[0].x):er(e):(e=s.length,function(t){for(var n=0,r;n<e;++n)a[(r=s[n]).i]=r.x(t);return a.join("")})};var ir=function(t,e){var n=typeof e,r;return e==null||n==="boolean"?Vn(e):(n==="number"?Gn:n==="string"?(r=Qe(e))?(e=r,Wn):rr:e instanceof Qe?Wn:e instanceof Date?Jn:Array.isArray(e)?Yn:isNaN(e)?Qn:Gn)(t,e)};var ur=180/Math.PI;var or={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};var ar=function(t,e,n,r,i,u){var o,a,s;if(o=Math.sqrt(t*t+e*e))t/=o,e/=o;if(s=t*n+e*r)n-=t*s,r-=e*s;if(a=Math.sqrt(n*n+r*r))n/=a,r/=a,s/=a;if(t*r<e*n)t=-t,e=-e,s=-s,o=-o;return{translateX:i,translateY:u,rotate:Math.atan2(e,t)*ur,skewX:Math.atan(s)*ur,scaleX:o,scaleY:a}};var sr;var fr;var lr;var cr;function hr(t){if(t==="none")return or;if(!sr)sr=document.createElement("DIV"),fr=document.documentElement,lr=document.defaultView;sr.style.transform=t;t=lr.getComputedStyle(fr.appendChild(sr),null).getPropertyValue("transform");fr.removeChild(sr);t=t.slice(7,-1).split(",");return ar(+t[0],+t[1],+t[2],+t[3],+t[4],+t[5])}function pr(t){if(t==null)return or;if(!cr)cr=document.createElementNS("http://www.w3.org/2000/svg","g");cr.setAttribute("transform",t);if(!(t=cr.transform.baseVal.consolidate()))return or;t=t.matrix;return ar(t.a,t.b,t.c,t.d,t.e,t.f)}function vr(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}function u(t,r,i,u,o,a){if(t!==i||r!==u){var s=o.push("translate(",null,e,null,n);a.push({i:s-4,x:Gn(t,i)},{i:s-2,x:Gn(r,u)})}else if(i||u){o.push("translate("+i+e+u+n)}}function o(t,e,n,u){if(t!==e){if(t-e>180)e+=360;else if(e-t>180)t+=360;u.push({i:n.push(i(n)+"rotate(",null,r)-2,x:Gn(t,e)})}else if(e){n.push(i(n)+"rotate("+e+r)}}function a(t,e,n,u){if(t!==e){u.push({i:n.push(i(n)+"skewX(",null,r)-2,x:Gn(t,e)})}else if(e){n.push(i(n)+"skewX("+e+r)}}function s(t,e,n,r,u,o){if(t!==n||e!==r){var a=u.push(i(u)+"scale(",null,",",null,")");o.push({i:a-4,x:Gn(t,n)},{i:a-2,x:Gn(e,r)})}else if(n!==1||r!==1){u.push(i(u)+"scale("+n+","+r+")")}}return function(e,n){var r=[],i=[];e=t(e),n=t(n);u(e.translateX,e.translateY,n.translateX,n.translateY,r,i);o(e.rotate,n.rotate,r,i);a(e.skewX,n.skewX,r,i);s(e.scaleX,e.scaleY,n.scaleX,n.scaleY,r,i);e=n=null;return function(t){var e=-1,n=i.length,u;while(++e<n)r[(u=i[e]).i]=u.x(t);return r.join("")}}}var dr=vr(hr,"px, ","px)","deg)");var gr=vr(pr,", ",")",")");var yr=Math.SQRT2;var mr=2;var Ar=4;var wr=1e-12;function br(t){
return((t=Math.exp(t))+1/t)/2}function _r(t){return((t=Math.exp(t))-1/t)/2}function Cr(t){return((t=Math.exp(2*t))-1)/(t+1)}function Er(t){return function e(n){n=+n;function r(e,r){var i=t((e=In(e)).h,(r=In(r)).h),u=Xn(e.s,r.s),o=Xn(e.l,r.l),a=Xn(e.opacity,r.opacity);return function(t){e.h=i(t);e.s=u(t);e.l=o(Math.pow(t,n));e.opacity=a(t);return e+""}}r.gamma=e;return r}(1)}Er($n);var Br=Er(Xn);function Dr(t,e){var n,r;return function(){var i=Me(this,t),u=i.tween;if(u!==n){r=n=u;for(var o=0,a=r.length;o<a;++o){if(r[o].name===e){r=r.slice();r.splice(o,1);break}}}i.tween=r}}function xr(t,e,n){var r,i;if(typeof n!=="function")throw new Error;return function(){var u=Me(this,t),o=u.tween;if(o!==r){i=(r=o).slice();for(var a={name:e,value:n},s=0,f=i.length;s<f;++s){if(i[s].name===e){i[s]=a;break}}if(s===f)i.push(a)}u.tween=i}}var Fr=function(t,e){var n=this._id;t+="";if(arguments.length<2){var r=je(this.node(),n).tween;for(var i=0,u=r.length,o;i<u;++i){if((o=r[i]).name===t){return o.value}}return null}return this.each((e==null?Dr:xr)(n,t,e))};function kr(t,e,n){var r=t._id;t.each(function(){var t=Me(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)});return function(t){return je(t,r).value[e]}}var Or=function(t,e){var n;return(typeof e==="number"?Gn:e instanceof Qe?Wn:(n=Qe(e))?(e=n,Wn):rr)(t,e)};function Sr(t){return function(){this.removeAttribute(t)}}function Nr(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Mr(t,e,n){var r,i;return function(){var u=this.getAttribute(t);return u===n?null:u===r?i:i=e(r=u,n)}}function jr(t,e,n){var r,i;return function(){var u=this.getAttributeNS(t.space,t.local);return u===n?null:u===r?i:i=e(r=u,n)}}function Pr(t,e,n){var r,i,u;return function(){var o,a=n(this);if(a==null)return void this.removeAttribute(t);o=this.getAttribute(t);return o===a?null:o===r&&a===i?u:u=e(r=o,i=a)}}function Lr(t,e,n){var r,i,u;return function(){var o,a=n(this);if(a==null)return void this.removeAttributeNS(t.space,t.local);o=this.getAttributeNS(t.space,t.local);return o===a?null:o===r&&a===i?u:u=e(r=o,i=a)}}var Rr=function(t,e){var n=o(t),r=n==="transform"?gr:Or;return this.attrTween(t,typeof e==="function"?(n.local?Lr:Pr)(n,r,kr(this,"attr."+t,e)):e==null?(n.local?Nr:Sr)(n):(n.local?jr:Mr)(n,r,e))};function Tr(t,e){function n(){var n=this,r=e.apply(n,arguments);return r&&function(e){n.setAttributeNS(t.space,t.local,r(e))}}n._value=e;return n}function Ir(t,e){function n(){var n=this,r=e.apply(n,arguments);return r&&function(e){n.setAttribute(t,r(e))}}n._value=e;return n}var Hr=function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!=="function")throw new Error;var r=o(t);return this.tween(n,(r.local?Tr:Ir)(r,e))};function zr(t,e){return function(){Ne(this,t).delay=+e.apply(this,arguments)}}function Vr(t,e){return e=+e,function(){Ne(this,t).delay=e}}var qr=function(t){var e=this._id;return arguments.length?this.each((typeof t==="function"?zr:Vr)(e,t)):je(this.node(),e).delay};function Ur(t,e){return function(){Me(this,t).duration=+e.apply(this,arguments)}}function $r(t,e){return e=+e,function(){Me(this,t).duration=e}}var Kr=function(t){var e=this._id;return arguments.length?this.each((typeof t==="function"?Ur:$r)(e,t)):je(this.node(),e).duration};function Xr(t,e){if(typeof e!=="function")throw new Error;return function(){Me(this,t).ease=e}}var Wr=function(t){var e=this._id;return arguments.length?this.each(Xr(e,t)):je(this.node(),e).ease};var Yr=function(t){if(typeof t!=="function")t=v(t);for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i){for(var u=e[i],o=u.length,a=r[i]=[],s,f=0;f<o;++f){if((s=u[f])&&t.call(s,s.__data__,f,u)){a.push(s)}}}return new mi(r,this._parents,this._name,this._id)};var Jr=function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,u=Math.min(r,i),o=new Array(r),a=0;a<u;++a){for(var s=e[a],f=n[a],l=s.length,c=o[a]=new Array(l),h,p=0;p<l;++p){if(h=s[p]||f[p]){c[p]=h}}}for(;a<r;++a){o[a]=e[a]}return new mi(o,this._parents,this._name,this._id)};function Gr(t){return(t+"").trim().split(/^|\s+/).every(function(t){var e=t.indexOf(".");if(e>=0)t=t.slice(0,e);return!t||t==="start"})}function Qr(t,e,n){var r,i,u=Gr(e)?Ne:Me;return function(){var o=u(this,t),a=o.on;if(a!==r)(i=(r=a).copy()).on(e,n);o.on=i}}var Zr=function(t,e){var n=this._id;return arguments.length<2?je(this.node(),n).on.on(t):this.each(Qr(n,t,e))};function ti(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;if(e)e.removeChild(this)}}var ei=function(){return this.on("end.remove",ti(this._id))};var ni=function(t){var e=this._name,n=this._id;if(typeof t!=="function")t=x(t);for(var r=this._groups,i=r.length,u=new Array(i),o=0;o<i;++o){for(var a=r[o],s=a.length,f=u[o]=new Array(s),l,c,h=0;h<s;++h){if((l=a[h])&&(c=t.call(l,l.__data__,h,a))){if("__data__"in l)c.__data__=l.__data__;f[h]=c;Se(f[h],e,n,h,f,je(l,n))}}}return new mi(u,this._parents,e,n)};var ri=function(t){var e=this._name,n=this._id;if(typeof t!=="function")t=O(t);for(var r=this._groups,i=r.length,u=[],o=[],a=0;a<i;++a){for(var s=r[a],f=s.length,l,c=0;c<f;++c){if(l=s[c]){for(var h=t.call(l,l.__data__,c,s),p,v=je(l,n),d=0,g=h.length;d<g;++d){if(p=h[d]){Se(p,e,n,d,h,v)}}u.push(h);o.push(l)}}}return new mi(u,o,e,n)};var ii=Xt.prototype.constructor;var ui=function(){return new ii(this._groups,this._parents)};function oi(t,e){var n,r,i;return function(){var u=ut(this).getComputedStyle(this,null),o=u.getPropertyValue(t),a=(this.style.removeProperty(t),u.getPropertyValue(t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}function ai(t){return function(){this.style.removeProperty(t)}}function si(t,e,n){var r,i;return function(){var u=ut(this).getComputedStyle(this,null).getPropertyValue(t);return u===n?null:u===r?i:i=e(r=u,n)}}function fi(t,e,n){var r,i,u;return function(){var o=ut(this).getComputedStyle(this,null),a=o.getPropertyValue(t),s=n(this);if(s==null)s=(this.style.removeProperty(t),o.getPropertyValue(t));return a===s?null:a===r&&s===i?u:u=e(r=a,i=s)}}var li=function(t,e,n){var r=(t+="")==="transform"?dr:Or;return e==null?this.styleTween(t,oi(t,r)).on("end.style."+t,ai(t)):this.styleTween(t,typeof e==="function"?fi(t,r,kr(this,"style."+t,e)):si(t,r,e),n)};function ci(t,e,n){function r(){var r=this,i=e.apply(r,arguments);return i&&function(e){r.style.setProperty(t,i(e),n)}}r._value=e;return r}var hi=function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!=="function")throw new Error;return this.tween(r,ci(t,e,n==null?"":n))};function pi(t){return function(){this.textContent=t}}function vi(t){return function(){var e=t(this);this.textContent=e==null?"":e}}var di=function(t){return this.tween("text",typeof t==="function"?vi(kr(this,"text",t)):pi(t==null?"":t+""))};var gi=function(){var t=this._name,e=this._id,n=wi();for(var r=this._groups,i=r.length,u=0;u<i;++u){for(var o=r[u],a=o.length,s,f=0;f<a;++f){if(s=o[f]){var l=je(s,e);Se(s,t,n,f,o,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}}}return new mi(r,this._parents,t,n)};var yi=0;function mi(t,e,n,r){this._groups=t;this._parents=e;this._name=n;this._id=r}function Ai(t){return Xt().transition(t)}function wi(){return++yi}var bi=Xt.prototype;mi.prototype=Ai.prototype={constructor:mi,select:ni,selectAll:ri,filter:Yr,merge:Jr,selection:ui,transition:gi,call:bi.call,nodes:bi.nodes,node:bi.node,size:bi.size,empty:bi.empty,each:bi.each,on:Zr,attr:Rr,attrTween:Hr,style:li,styleTween:hi,text:di,remove:ei,tween:Fr,delay:qr,duration:Kr,ease:Wr};function _i(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var Ci=3;var Ei=function t(e){e=+e;function n(t){return Math.pow(t,e)}n.exponent=t;return n}(Ci);var Bi=function t(e){e=+e;function n(t){return 1-Math.pow(1-t,e)}n.exponent=t;return n}(Ci);var Di=function t(e){e=+e;function n(t){return((t*=2)<=1?Math.pow(t,e):2-Math.pow(2-t,e))/2}n.exponent=t;return n}(Ci);var xi=4/11;var Fi=6/11;var ki=8/11;var Oi=3/4;var Si=9/11;var Ni=10/11;var Mi=15/16;var ji=21/22;var Pi=63/64;var Li=1/xi/xi;function Ri(t){return(t=+t)<xi?Li*t*t:t<ki?Li*(t-=Fi)*t+Oi:t<Ni?Li*(t-=Si)*t+Mi:Li*(t-=ji)*t+Pi}var Ti=1.70158;var Ii=function t(e){e=+e;function n(t){return t*t*((e+1)*t-e)}n.overshoot=t;return n}(Ti);var Hi=function t(e){e=+e;function n(t){return--t*t*((e+1)*t+e)+1}n.overshoot=t;return n}(Ti);var zi=function t(e){e=+e;function n(t){return((t*=2)<1?t*t*((e+1)*t-e):(t-=2)*t*((e+1)*t+e)+2)/2}n.overshoot=t;return n}(Ti);var Vi=2*Math.PI;var qi=1;var Ui=.3;var $i=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Vi);function i(t){return e*Math.pow(2,10*--t)*Math.sin((r-t)/n)}i.amplitude=function(e){return t(e,n*Vi)};i.period=function(n){return t(e,n)};return i}(qi,Ui);var Ki=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Vi);function i(t){return 1-e*Math.pow(2,-10*(t=+t))*Math.sin((t+r)/n)}i.amplitude=function(e){return t(e,n*Vi)};i.period=function(n){return t(e,n)};return i}(qi,Ui);var Xi=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Vi);function i(t){return((t=t*2-1)<0?e*Math.pow(2,10*t)*Math.sin((r-t)/n):2-e*Math.pow(2,-10*t)*Math.sin((r+t)/n))/2}i.amplitude=function(e){return t(e,n*Vi)};i.period=function(n){return t(e,n)};return i}(qi,Ui);var Wi={time:null,delay:0,duration:250,ease:_i};function Yi(t,e){var n;while(!(n=t.__transition)||!(n=n[e])){if(!(t=t.parentNode)){return Wi.time=he(),Wi}}return n}var Ji=function(t){var e,n;if(t instanceof mi){e=t._id,t=t._name}else{e=wi(),(n=Wi).time=he(),t=t==null?null:t+""}for(var r=this._groups,i=r.length,u=0;u<i;++u){for(var o=r[u],a=o.length,s,f=0;f<a;++f){if(s=o[f]){Se(s,t,e,f,o,n||Yi(s,e))}}}return new mi(r,this._parents,t,e)};Xt.prototype.interrupt=Re;Xt.prototype.transition=Ji;var Gi=[null];var Qi=function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN};var Zi=function(t){if(t.length===1)t=tu(t);return{left:function(e,n,r,i){if(r==null)r=0;if(i==null)i=e.length;while(r<i){var u=r+i>>>1;if(t(e[u],n)<0)r=u+1;else i=u}return r},right:function(e,n,r,i){if(r==null)r=0;if(i==null)i=e.length;while(r<i){var u=r+i>>>1;if(t(e[u],n)>0)i=u;else r=u+1}return r}}};function tu(t){return function(e,n){return Qi(t(e),n)}}var eu=Zi(Qi);var nu=eu.right;var ru=function(t){return t===null?NaN:+t};var iu=function(t,e){var n=t.length,r=0,i,u,o=0,a=-1,s=0;if(e==null){while(++a<n){if(!isNaN(i=ru(t[a]))){u=i-r;r+=u/++s;o+=u*(i-r)}}}else{while(++a<n){if(!isNaN(i=ru(e(t[a],a,t)))){u=i-r;r+=u/++s;o+=u*(i-r)}}}if(s>1)return o/(s-1)};var uu=function(t,e){var n=iu(t,e);return n?Math.sqrt(n):n};var ou=function(t,e){var n=-1,r=t.length,i,u,o;if(e==null){while(++n<r)if((u=t[n])!=null&&u>=u){i=o=u;break}while(++n<r)if((u=t[n])!=null){if(i>u)i=u;if(o<u)o=u}}else{while(++n<r)if((u=e(t[n],n,t))!=null&&u>=u){i=o=u;break}while(++n<r)if((u=e(t[n],n,t))!=null){if(i>u)i=u;if(o<u)o=u}}return[i,o]};var au=Array.prototype;var su=au.slice;var fu=au.map;var lu=function(t){return function(){return t}};var cu=function(t){return t};var hu=function(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;var r=-1,i=Math.max(0,Math.ceil((e-t)/n))|0,u=new Array(i);while(++r<i){u[r]=t+r*n}return u};var pu=Math.sqrt(50);var vu=Math.sqrt(10);var du=Math.sqrt(2);var gu=function(t,e,n){var r=yu(t,e,n);return hu(Math.ceil(t/r)*r,Math.floor(e/r)*r+r/2,r)};function yu(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),u=r/i;if(u>=pu)i*=10;else if(u>=vu)i*=5;else if(u>=du)i*=2;return e<t?-i:i}var mu=function(t){return Math.ceil(Math.log(t.length)/Math.LN2)+1};var Au=function(t,e,n){if(n==null)n=ru;if(!(r=t.length))return;if((e=+e)<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,u=Math.floor(i),o=+n(t[u],u,t),a=+n(t[u+1],u+1,t);return o+(a-o)*(i-u)};var wu=function(t,e){var n=-1,r=t.length,i,u;if(e==null){while(++n<r)if((u=t[n])!=null&&u>=u){i=u;break}while(++n<r)if((u=t[n])!=null&&u>i)i=u}else{while(++n<r)if((u=e(t[n],n,t))!=null&&u>=u){i=u;break}while(++n<r)if((u=e(t[n],n,t))!=null&&u>i)i=u}return i};var bu=function(t){var e=t.length,n,r=-1,i=0,u,o;while(++r<e)i+=t[r].length;u=new Array(i);while(--e>=0){o=t[e];n=o.length;while(--n>=0){u[--i]=o[n]}}return u};var _u=function(t,e){var n=-1,r=t.length,i,u;if(e==null){while(++n<r)if((u=t[n])!=null&&u>=u){i=u;break}while(++n<r)if((u=t[n])!=null&&i>u)i=u}else{while(++n<r)if((u=e(t[n],n,t))!=null&&u>=u){i=u;break}while(++n<r)if((u=e(t[n],n,t))!=null&&i>u)i=u}return i};var Cu=function(t,e){var n=0,r=t.length,i,u=-1;if(e==null){while(++u<r)if(i=+t[u])n+=i}else{while(++u<r)if(i=+e(t[u],u,t))n+=i}return n};var Eu=function(t){if(!(u=t.length))return[];for(var e=-1,n=_u(t,Bu),r=new Array(n);++e<n;){for(var i=-1,u,o=r[e]=new Array(u);++i<u;){o[i]=t[i][e]}}return r};function Bu(t){return t.length}var Du=function(t,e){if(e===void 0)return function(e){return e[t]};return function(n){return n[t]===void 0?e:n[t]}};var xu=function(t,e){if(e===void 0)e={};for(var n in e)if({}.hasOwnProperty.call(e,n))t.attr(n,e[n])};function Fu(){return Math.floor((1+Math.random())*65536).toString(16).substring(1)}var ku=function t(){this._on={};this._uuid=""+Fu()+Fu()+"-"+Fu()+"-"+Fu()+"-"+Fu()+"-"+Fu()+Fu()+Fu()};ku.prototype.config=function t(e){var n=this;if(arguments.length){for(var r in e)if({}.hasOwnProperty.call(e,r)&&r in n)n[r](e[r]);return this}else{var t={};for(var i in this.prototype.constructor)if(i!=="config"&&{}.hasOwnProperty.call(n,i))t[i]=n[i]();return t}};ku.prototype.on=function t(e,n){return arguments.length===2?(this._on[e]=n,this):arguments.length?typeof e==="string"?this._on[e]:(this._on=Object.assign({},this._on,e),this):this._on};var Ou=function(t){return function e(){return t}};var Su=Object.assign||function(t){var e=arguments;for(var n=1;n<arguments.length;n++){var r=e[n];for(var i in r){if(Object.prototype.hasOwnProperty.call(r,i)){t[i]=r[i]}}}return t};function Nu(t,e){if(!(t instanceof e)){throw new TypeError("Cannot call a class as a function")}}var Mu={type:"logger",log:function t(e){this._output("log",e)},warn:function t(e){this._output("warn",e)},error:function t(e){this._output("error",e)},_output:function t(e,n){if(console&&console[e])console[e].apply(console,Array.prototype.slice.call(n))}};var ju=function(){function t(e){var n=arguments.length<=1||arguments[1]===undefined?{}:arguments[1];Nu(this,t);this.subs=[];this.init(e,n)}t.prototype.init=function t(e){var n=arguments.length<=1||arguments[1]===undefined?{}:arguments[1];this.prefix=n.prefix||"i18next:";this.logger=e||Mu;this.options=n;this.debug=n.debug===false?false:true};t.prototype.setDebug=function t(e){this.debug=e;this.subs.forEach(function(t){t.setDebug(e)})};t.prototype.log=function t(){this.forward(arguments,"log","",true)};t.prototype.warn=function t(){this.forward(arguments,"warn","",true)};t.prototype.error=function t(){this.forward(arguments,"error","")};t.prototype.deprecate=function t(){this.forward(arguments,"warn","WARNING DEPRECATED: ",true)};t.prototype.forward=function t(e,n,r,i){if(i&&!this.debug)return;if(typeof e[0]==="string")e[0]=r+this.prefix+" "+e[0];this.logger[n](e)};t.prototype.create=function e(n){var r=new t(this.logger,Su({prefix:this.prefix+":"+n+":"},this.options));this.subs.push(r);return r};return t}();var Pu=new ju;function Lu(t,e){if(!(t instanceof e)){throw new TypeError("Cannot call a class as a function")}}var Ru=function(){function t(){Lu(this,t);this.observers={}}t.prototype.on=function t(e,n){var r=this;e.split(" ").forEach(function(t){r.observers[t]=r.observers[t]||[];r.observers[t].push(n)})};t.prototype.off=function t(e,n){var r=this;if(!this.observers[e]){return}this.observers[e].forEach(function(){if(!n){delete r.observers[e]}else{var t=r.observers[e].indexOf(n);if(t>-1){r.observers[e].splice(t,1)}}})};t.prototype.emit=function t(e){var n=arguments;for(var r=arguments.length,i=Array(r>1?r-1:0),u=1;u<r;u++){i[u-1]=n[u]}if(this.observers[e]){this.observers[e].forEach(function(t){t.apply(undefined,i)})}if(this.observers["*"]){this.observers["*"].forEach(function(t){var n;t.apply(t,(n=[e]).concat.apply(n,i))})}};return t}();function Tu(t){if(t==null)return"";return""+t}function Iu(t,e,n){t.forEach(function(t){if(e[t])n[t]=e[t]})}function Hu(t,e,n){function r(t){return t&&t.indexOf("###")>-1?t.replace(/###/g,"."):t}var i=typeof e!=="string"?[].concat(e):e.split(".");while(i.length>1){if(!t)return{};var u=r(i.shift());if(!t[u]&&n)t[u]=new n;t=t[u]}if(!t)return{};return{obj:t,k:r(i.shift())}}function zu(t,e,n){var r=Hu(t,e,Object);var i=r.obj;var u=r.k;i[u]=n}function Vu(t,e,n,r){var i=Hu(t,e,Object);var u=i.obj;var o=i.k;u[o]=u[o]||[];if(r)u[o]=u[o].concat(n);if(!r)u[o].push(n)}function qu(t,e){var n=Hu(t,e);var r=n.obj;var i=n.k;if(!r)return undefined;return r[i]}function Uu(t,e,n){for(var r in e){if(r in t){if(typeof t[r]==="string"||t[r]instanceof String||typeof e[r]==="string"||e[r]instanceof String){if(n)t[r]=e[r]}else{Uu(t[r],e[r],n)}}else{t[r]=e[r]}}return t}function $u(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var Ku={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function Xu(t){if(typeof t==="string"){return t.replace(/[&<>"'\/]/g,function(t){return Ku[t]})}else{return t}}var Wu=Object.assign||function(t){var e=arguments;for(var n=1;n<arguments.length;n++){var r=e[n];for(var i in r){if(Object.prototype.hasOwnProperty.call(r,i)){t[i]=r[i]}}}return t};function Yu(t,e){var n=Object.getOwnPropertyNames(e);for(var r=0;r<n.length;r++){var i=n[r];var u=Object.getOwnPropertyDescriptor(e,i);if(u&&u.configurable&&t[i]===undefined){Object.defineProperty(t,i,u)}}return t}function Ju(t,e){if(!(t instanceof e)){throw new TypeError("Cannot call a class as a function")}}function Gu(t,e){if(!t){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e&&(typeof e==="object"||typeof e==="function")?e:t}function Qu(t,e){if(typeof e!=="function"&&e!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof e)}t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:false,writable:true,configurable:true}});if(e)Object.setPrototypeOf?Object.setPrototypeOf(t,e):Yu(t,e)}var Zu=function(t){Qu(e,t);function e(){var n=arguments.length<=0||arguments[0]===undefined?{}:arguments[0];var r=arguments.length<=1||arguments[1]===undefined?{ns:["translation"],defaultNS:"translation"}:arguments[1];Ju(this,e);var i=Gu(this,t.call(this));i.data=n;i.options=r;return i}e.prototype.addNamespaces=function t(e){if(this.options.ns.indexOf(e)<0){this.options.ns.push(e)}};e.prototype.removeNamespaces=function t(e){var n=this.options.ns.indexOf(e);if(n>-1){this.options.ns.splice(n,1)}};e.prototype.getResource=function t(e,n,r){var i=arguments.length<=3||arguments[3]===undefined?{}:arguments[3];var u=i.keySeparator||this.options.keySeparator;if(u===undefined)u=".";var o=[e,n];if(r&&typeof r!=="string")o=o.concat(r);if(r&&typeof r==="string")o=o.concat(u?r.split(u):r);if(e.indexOf(".")>-1){o=e.split(".")}return qu(this.data,o)};e.prototype.addResource=function t(e,n,r,i){var u=arguments.length<=4||arguments[4]===undefined?{silent:false}:arguments[4];var o=this.options.keySeparator;if(o===undefined)o=".";var a=[e,n];if(r)a=a.concat(o?r.split(o):r);if(e.indexOf(".")>-1){a=e.split(".");i=n;n=a[1]}this.addNamespaces(n);zu(this.data,a,i);if(!u.silent)this.emit("added",e,n,r,i)};e.prototype.addResources=function t(e,n,r){var i=this;for(var u in r){if(typeof r[u]==="string")i.addResource(e,n,u,r[u],{silent:true})}this.emit("added",e,n,r)};e.prototype.addResourceBundle=function t(e,n,r,i,u){var o=[e,n];if(e.indexOf(".")>-1){o=e.split(".");i=r;r=n;n=o[1]}this.addNamespaces(n);var a=qu(this.data,o)||{};if(i){Uu(a,r,u)}else{a=Wu({},a,r)}zu(this.data,o,a);this.emit("added",e,n,r)};e.prototype.removeResourceBundle=function t(e,n){if(this.hasResourceBundle(e,n)){delete this.data[e][n]}this.removeNamespaces(n);this.emit("removed",e,n)};e.prototype.hasResourceBundle=function t(e,n){return this.getResource(e,n)!==undefined};e.prototype.getResourceBundle=function t(e,n){if(!n)n=this.options.defaultNS;if(this.options.compatibilityAPI==="v1")return Wu({},this.getResource(e,n));return this.getResource(e,n)};e.prototype.toJSON=function t(){return this.data};return e}(Ru);var to={processors:{},addPostProcessor:function t(e){this.processors[e.name]=e},handle:function t(e,n,r,i,u){var o=this;e.forEach(function(t){if(o.processors[t])n=o.processors[t].process(n,r,i,u)});return n}};function eo(t){t.interpolation={unescapeSuffix:"HTML"};t.interpolation.prefix=t.interpolationPrefix||"__";t.interpolation.suffix=t.interpolationSuffix||"__";t.interpolation.escapeValue=t.escapeInterpolation||false;t.interpolation.nestingPrefix=t.reusePrefix||"$t(";t.interpolation.nestingSuffix=t.reuseSuffix||")";return t}function no(t){if(t.resStore)t.resources=t.resStore;if(t.ns&&t.ns.defaultNs){t.defaultNS=t.ns.defaultNs;t.ns=t.ns.namespaces}else{t.defaultNS=t.ns||"translation"}if(t.fallbackToDefaultNS&&t.defaultNS)t.fallbackNS=t.defaultNS;t.saveMissing=t.sendMissing;t.saveMissingTo=t.sendMissingTo||"current";t.returnNull=t.fallbackOnNull?false:true;t.returnEmptyString=t.fallbackOnEmpty?false:true;t.returnObjects=t.returnObjectTrees;t.joinArrays="\n";t.returnedObjectHandler=t.objectTreeKeyHandler;t.parseMissingKeyHandler=t.parseMissingKey;t.appendNamespaceToMissingKey=true;t.nsSeparator=t.nsseparator;t.keySeparator=t.keyseparator;if(t.shortcutFunction==="sprintf"){t.overloadTranslationOptionHandler=function(t){var e=[];for(var n=1;n<t.length;n++){e.push(t[n])}return{postProcess:"sprintf",sprintf:e}}}t.whitelist=t.lngWhitelist;t.preload=t.preload;if(t.load==="current")t.load="currentOnly";if(t.load==="unspecific")t.load="languageOnly";t.backend=t.backend||{};t.backend.loadPath=t.resGetPath||"locales/__lng__/__ns__.json";t.backend.addPath=t.resPostPath||"locales/add/__lng__/__ns__";t.backend.allowMultiLoading=t.dynamicLoad;t.cache=t.cache||{};t.cache.prefix="res_";t.cache.expirationTime=7*24*60*60*1e3;t.cache.enabled=t.useLocalStorage?true:false;t=eo(t);if(t.defaultVariables)t.interpolation.defaultVariables=t.defaultVariables;return t}function ro(t){t=eo(t);t.joinArrays="\n";return t}function io(t){if(t.interpolationPrefix||t.interpolationSuffix||t.escapeInterpolation){t=eo(t)}t.nsSeparator=t.nsseparator;t.keySeparator=t.keyseparator;t.returnObjects=t.returnObjectTrees;return t}function uo(t){t.lng=function(){Pu.deprecate("i18next.lng() can be replaced by i18next.language for detected language or i18next.languages for languages ordered by translation lookup.");return t.services.languageUtils.toResolveHierarchy(t.language)[0]};t.preload=function(e,n){Pu.deprecate("i18next.preload() can be replaced with i18next.loadLanguages()");t.loadLanguages(e,n)};t.setLng=function(e,n,r){Pu.deprecate("i18next.setLng() can be replaced with i18next.changeLanguage() or i18next.getFixedT() to get a translation function with fixed language or namespace.");if(typeof n==="function"){r=n;n={}}if(!n)n={};if(n.fixLng===true){if(r)return r(null,t.getFixedT(e))}t.changeLanguage(e,r)};t.addPostProcessor=function(e,n){Pu.deprecate("i18next.addPostProcessor() can be replaced by i18next.use({ type: 'postProcessor', name: 'name', process: fc })");t.use({type:"postProcessor",name:e,process:n})}}var oo=Object.assign||function(t){var e=arguments;for(var n=1;n<arguments.length;n++){var r=e[n];for(var i in r){if(Object.prototype.hasOwnProperty.call(r,i)){t[i]=r[i]}}}return t};var ao=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol==="function"&&t.constructor===Symbol?"symbol":typeof t};function so(t,e){var n=Object.getOwnPropertyNames(e);for(var r=0;r<n.length;r++){var i=n[r];var u=Object.getOwnPropertyDescriptor(e,i);if(u&&u.configurable&&t[i]===undefined){Object.defineProperty(t,i,u)}}return t}function fo(t,e){if(!(t instanceof e)){throw new TypeError("Cannot call a class as a function")}}function lo(t,e){if(!t){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e&&(typeof e==="object"||typeof e==="function")?e:t}function co(t,e){if(typeof e!=="function"&&e!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof e)}t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:false,writable:true,configurable:true}});if(e)Object.setPrototypeOf?Object.setPrototypeOf(t,e):so(t,e)}var ho=function(t){co(e,t);function e(n){var r=arguments.length<=1||arguments[1]===undefined?{}:arguments[1];fo(this,e);var i=lo(this,t.call(this));Iu(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector"],n,i);i.options=r;i.logger=Pu.create("translator");return i}e.prototype.changeLanguage=function t(e){if(e)this.language=e};e.prototype.exists=function t(e){var n=arguments.length<=1||arguments[1]===undefined?{interpolation:{}}:arguments[1];if(this.options.compatibilityAPI==="v1"){n=io(n)}return this.resolve(e,n)!==undefined};e.prototype.extractFromKey=function t(e,n){var r=n.nsSeparator||this.options.nsSeparator;if(r===undefined)r=":";var i=n.ns||this.options.defaultNS;if(r&&e.indexOf(r)>-1){var u=e.split(r);i=u[0];e=u[1]}if(typeof i==="string")i=[i];return{key:e,namespaces:i}};e.prototype.translate=function t(e){var n=this;var r=arguments.length<=1||arguments[1]===undefined?{}:arguments[1];if((typeof r==="undefined"?"undefined":ao(r))!=="object"){r=this.options.overloadTranslationOptionHandler(arguments)}else if(this.options.compatibilityAPI==="v1"){r=io(r)}if(e===undefined||e===null||e==="")return"";if(typeof e==="number")e=String(e);if(typeof e==="string")e=[e];var i=r.lng||this.language;if(i&&i.toLowerCase()==="cimode")return e[e.length-1];var u=r.keySeparator||this.options.keySeparator||".";var o=this.extractFromKey(e[e.length-1],r);var a=o.key;var s=o.namespaces;var f=s[s.length-1];var l=this.resolve(e,r);var c=Object.prototype.toString.apply(l);var h=["[object Number]","[object Function]","[object RegExp]"];var p=r.joinArrays!==undefined?r.joinArrays:this.options.joinArrays;if(l&&typeof l!=="string"&&h.indexOf(c)<0&&!(p&&c==="[object Array]")){if(!r.returnObjects&&!this.options.returnObjects){this.logger.warn("accessing an object - but returnObjects options is not enabled!");return this.options.returnedObjectHandler?this.options.returnedObjectHandler(a,l,r):"key '"+a+" ("+this.language+")' returned an object instead of string."}var v=c==="[object Array]"?[]:{};for(var d in l){v[d]=n.translate(""+a+u+d,oo({joinArrays:false,ns:s},r))}l=v}else if(p&&c==="[object Array]"){l=l.join(p);if(l)l=this.extendTranslation(l,a,r)}else{var g=false,y=false;if(!this.isValidLookup(l)&&r.defaultValue!==undefined){g=true;l=r.defaultValue}if(!this.isValidLookup(l)){y=true;l=a}if(y||g){this.logger.log("missingKey",i,f,a,l);var m=[];if(this.options.saveMissingTo==="fallback"&&this.options.fallbackLng&&this.options.fallbackLng[0]){for(var A=0;A<this.options.fallbackLng.length;A++){m.push(n.options.fallbackLng[A])}}else if(this.options.saveMissingTo==="all"){m=this.languageUtils.toResolveHierarchy(r.lng||this.language)}else{m.push(r.lng||this.language)}if(this.options.saveMissing){if(this.options.missingKeyHandler){this.options.missingKeyHandler(m,f,a,l)}else if(this.backendConnector&&this.backendConnector.saveMissing){this.backendConnector.saveMissing(m,f,a,l)}}this.emit("missingKey",m,f,a,l)}l=this.extendTranslation(l,a,r);if(y&&l===a&&this.options.appendNamespaceToMissingKey)l=f+":"+a;if(y&&this.options.parseMissingKeyHandler)l=this.options.parseMissingKeyHandler(l)}return l};e.prototype.extendTranslation=function t(e,n,r){var i=this;if(r.interpolation)this.interpolator.init(r);var u=r.replace&&typeof r.replace!=="string"?r.replace:r;if(this.options.interpolation.defaultVariables)u=oo({},this.options.interpolation.defaultVariables,u);e=this.interpolator.interpolate(e,u,this.language);e=this.interpolator.nest(e,function(){var t=arguments;for(var e=arguments.length,n=Array(e),r=0;r<e;r++){n[r]=t[r]}return i.translate.apply(i,n)},r);if(r.interpolation)this.interpolator.reset();var o=r.postProcess||this.options.postProcess;var a=typeof o==="string"?[o]:o;if(e!==undefined&&a&&a.length&&r.applyPostProcessor!==false){e=to.handle(a,e,n,r,this)}return e};e.prototype.resolve=function t(e){var n=this;var r=arguments.length<=1||arguments[1]===undefined?{}:arguments[1];var i=void 0;if(typeof e==="string")e=[e];e.forEach(function(t){if(n.isValidLookup(i))return;var e=n.extractFromKey(t,r);var u=e.key;var o=e.namespaces;if(n.options.fallbackNS)o=o.concat(n.options.fallbackNS);var a=r.count!==undefined&&typeof r.count!=="string";var s=r.context!==undefined&&typeof r.context==="string"&&r.context!=="";var f=r.lngs?r.lngs:n.languageUtils.toResolveHierarchy(r.lng||n.language);o.forEach(function(t){if(n.isValidLookup(i))return;f.forEach(function(e){if(n.isValidLookup(i))return;var o=u;var f=[o];var l=void 0;if(a)l=n.pluralResolver.getSuffix(e,r.count);if(a&&s)f.push(o+l);if(s)f.push(o+=""+n.options.contextSeparator+r.context);if(a)f.push(o+=l);var c=void 0;while(c=f.pop()){if(n.isValidLookup(i))continue;i=n.getResource(e,t,c,r)}})})});return i};e.prototype.isValidLookup=function t(e){return e!==undefined&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")};e.prototype.getResource=function t(e,n,r){var i=arguments.length<=3||arguments[3]===undefined?{}:arguments[3];return this.resourceStore.getResource(e,n,r,i)};return e}(Ru);function po(t,e){if(!(t instanceof e)){throw new TypeError("Cannot call a class as a function")}}function vo(t){return t.charAt(0).toUpperCase()+t.slice(1)}var go=function(){function t(e){po(this,t);this.options=e;this.whitelist=this.options.whitelist||false;this.logger=Pu.create("languageUtils")}t.prototype.getLanguagePartFromCode=function t(e){if(e.indexOf("-")<0)return e;var n=["NB-NO","NN-NO","nb-NO","nn-NO","nb-no","nn-no"];var r=e.split("-");return this.formatLanguageCode(n.indexOf(e)>-1?r[1].toLowerCase():r[0])};t.prototype.formatLanguageCode=function t(e){if(typeof e==="string"&&e.indexOf("-")>-1){var n=["hans","hant","latn","cyrl","cans","mong","arab"];var r=e.split("-");if(this.options.lowerCaseLng){r=r.map(function(t){return t.toLowerCase()})}else if(r.length===2){r[0]=r[0].toLowerCase();r[1]=r[1].toUpperCase();if(n.indexOf(r[1].toLowerCase())>-1)r[1]=vo(r[1].toLowerCase())}else if(r.length===3){r[0]=r[0].toLowerCase();if(r[1].length===2)r[1]=r[1].toUpperCase();if(r[0]!=="sgn"&&r[2].length===2)r[2]=r[2].toUpperCase();if(n.indexOf(r[1].toLowerCase())>-1)r[1]=vo(r[1].toLowerCase());if(n.indexOf(r[2].toLowerCase())>-1)r[2]=vo(r[2].toLowerCase())}return r.join("-")}else{return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}};t.prototype.isWhitelisted=function t(e,n){if(this.options.load==="languageOnly"||this.options.nonExplicitWhitelist&&!n){e=this.getLanguagePartFromCode(e)}return!this.whitelist||!this.whitelist.length||this.whitelist.indexOf(e)>-1?true:false};t.prototype.toResolveHierarchy=function t(e,n){var r=this;n=n||this.options.fallbackLng||[];if(typeof n==="string")n=[n];var i=[];var u=function t(e){var n=arguments.length<=1||arguments[1]===undefined?false:arguments[1];if(r.isWhitelisted(e,n)){i.push(e)}else{r.logger.warn("rejecting non-whitelisted language code: "+e)}};if(typeof e==="string"&&e.indexOf("-")>-1){if(this.options.load!=="languageOnly")u(this.formatLanguageCode(e),true);if(this.options.load!=="currentOnly")u(this.getLanguagePartFromCode(e))}else if(typeof e==="string"){u(this.formatLanguageCode(e))}n.forEach(function(t){if(i.indexOf(t)<0)u(r.formatLanguageCode(t))});return i};return t}();var yo=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol==="function"&&t.constructor===Symbol?"symbol":typeof t};function mo(t,e){if(!(t instanceof e)){
throw new TypeError("Cannot call a class as a function")}}var Ao=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","tg","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","es_ar","et","eu","fi","fo","fur","fy","gl","gu","ha","he","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt","pt_br","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21}];var wo={1:function t(e){return Number(e>1)},2:function t(e){return Number(e!=1)},3:function t(e){return 0},4:function t(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function t(e){return Number(e===0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function t(e){return Number(e==1?0:e>=2&&e<=4?1:2)},7:function t(e){return Number(e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function t(e){return Number(e==1?0:e==2?1:e!=8&&e!=11?2:3)},9:function t(e){return Number(e>=2)},10:function t(e){return Number(e==1?0:e==2?1:e<7?2:e<11?3:4)},11:function t(e){return Number(e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3)},12:function t(e){return Number(e%10!=1||e%100==11)},13:function t(e){return Number(e!==0)},14:function t(e){return Number(e==1?0:e==2?1:e==3?2:3)},15:function t(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function t(e){return Number(e%10==1&&e%100!=11?0:e!==0?1:2)},17:function t(e){return Number(e==1||e%10==1?0:1)},18:function t(e){return Number(e==0?0:e==1?1:2)},19:function t(e){return Number(e==1?0:e===0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function t(e){return Number(e==1?0:e===0||e%100>0&&e%100<20?1:2)},21:function t(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)}};function bo(){var t,e={};Ao.forEach(function(t){t.lngs.forEach(function(n){return e[n]={numbers:t.nr,plurals:wo[t.fc]}})});return e}var _o=function(){function t(e){var n=arguments.length<=1||arguments[1]===undefined?{}:arguments[1];mo(this,t);this.languageUtils=e;this.options=n;this.logger=Pu.create("pluralResolver");this.rules=bo()}t.prototype.addRule=function t(e,n){this.rules[e]=n};t.prototype.getRule=function t(e){return this.rules[this.languageUtils.getLanguagePartFromCode(e)]};t.prototype.needsPlural=function t(e){var n=this.getRule(e);return n&&n.numbers.length<=1?false:true};t.prototype.getSuffix=function t(e,n){var r=this;var i=this.getRule(e);if(i){var u=function(){if(i.numbers.length===1)return{v:""};var t=i.noAbs?i.plurals(n):i.plurals(Math.abs(n));var e=i.numbers[t];if(i.numbers.length===2&&i.numbers[0]===1){if(e===2){e="plural"}else if(e===1){e=""}}var u=function t(){return r.options.prepend&&e.toString()?r.options.prepend+e.toString():e.toString()};if(r.options.compatibilityJSON==="v1"){if(e===1)return{v:""};if(typeof e==="number")return{v:"_plural_"+e.toString()};return{v:u()}}else if(r.options.compatibilityJSON==="v2"||i.numbers.length===2&&i.numbers[0]===1){return{v:u()}}else if(i.numbers.length===2&&i.numbers[0]===1){return{v:u()}}return{v:r.options.prepend&&t.toString()?r.options.prepend+t.toString():t.toString()}}();if((typeof u==="undefined"?"undefined":yo(u))==="object")return u.v}else{this.logger.warn("no plural rule found for: "+e);return""}};return t}();function Co(t,e){if(!(t instanceof e)){throw new TypeError("Cannot call a class as a function")}}var Eo=function(){function t(){var e=arguments.length<=0||arguments[0]===undefined?{}:arguments[0];Co(this,t);this.logger=Pu.create("interpolator");this.init(e,true)}t.prototype.init=function t(){var e=arguments.length<=0||arguments[0]===undefined?{}:arguments[0];var n=arguments[1];if(n){this.options=e;this.format=e.interpolation&&e.interpolation.format||function(t){return t}}if(!e.interpolation)e.interpolation={escapeValue:true};var r=e.interpolation;this.escapeValue=r.escapeValue!==undefined?r.escapeValue:true;this.prefix=r.prefix?$u(r.prefix):r.prefixEscaped||"{{";this.suffix=r.suffix?$u(r.suffix):r.suffixEscaped||"}}";this.formatSeparator=r.formatSeparator?$u(r.formatSeparator):r.formatSeparator||",";this.unescapePrefix=r.unescapeSuffix?"":r.unescapePrefix||"-";this.unescapeSuffix=this.unescapePrefix?"":r.unescapeSuffix||"";this.nestingPrefix=r.nestingPrefix?$u(r.nestingPrefix):r.nestingPrefixEscaped||$u("$t(");this.nestingSuffix=r.nestingSuffix?$u(r.nestingSuffix):r.nestingSuffixEscaped||$u(")");this.resetRegExp()};t.prototype.reset=function t(){if(this.options)this.init(this.options)};t.prototype.resetRegExp=function t(){var e=this.prefix+"(.+?)"+this.suffix;this.regexp=new RegExp(e,"g");var n=this.prefix+this.unescapePrefix+"(.+?)"+this.unescapeSuffix+this.suffix;this.regexpUnescape=new RegExp(n,"g");var r=this.nestingPrefix+"(.+?)"+this.nestingSuffix;this.nestingRegexp=new RegExp(r,"g")};t.prototype.interpolate=function t(e,n,r){var i=this;var u=this;var o=void 0,a=void 0;function s(t){return t.replace(/\$/g,"$$$$")}var f=function t(e){if(e.indexOf(u.formatSeparator)<0)return qu(n,e);var i=e.split(u.formatSeparator);var o=i.shift().trim();var a=i.join(u.formatSeparator).trim();return u.format(qu(n,o),a,r)};this.resetRegExp();while(o=this.regexpUnescape.exec(e)){var l=f(o[1].trim());e=e.replace(o[0],l);i.regexpUnescape.lastIndex=0}while(o=this.regexp.exec(e)){a=f(o[1].trim());if(typeof a!=="string")a=Tu(a);if(!a){i.logger.warn("missed to pass in variable "+o[1]+" for interpolating "+e);a=""}a=i.escapeValue?s(Xu(a)):s(a);e=e.replace(o[0],a);i.regexp.lastIndex=0}return e};t.prototype.nest=function t(e,n){var r=this;var i=arguments.length<=2||arguments[2]===undefined?{}:arguments[2];var u=void 0,o=void 0;var a=JSON.parse(JSON.stringify(i));a.applyPostProcessor=false;function s(t){return t.replace(/\$/g,"$$$$")}function f(t){if(t.indexOf(",")<0)return t;var e=t.split(",");t=e.shift();var n=e.join(",");n=this.interpolate(n,a);try{a=JSON.parse(n)}catch(e){this.logger.error("failed parsing options string in nesting for key "+t,e)}return t}while(u=this.nestingRegexp.exec(e)){o=n(f.call(r,u[1].trim()),a);if(typeof o!=="string")o=Tu(o);if(!o){r.logger.warn("missed to pass in variable "+u[1]+" for interpolating "+e);o=""}o=r.escapeValue?s(Xu(o)):s(o);e=e.replace(u[0],o);r.regexp.lastIndex=0}return e};return t}();var Bo=Object.assign||function(t){var e=arguments;for(var n=1;n<arguments.length;n++){var r=e[n];for(var i in r){if(Object.prototype.hasOwnProperty.call(r,i)){t[i]=r[i]}}}return t};var Do=function(){function t(t,e){var n=[];var r=true;var i=false;var u=undefined;try{for(var o=t[Symbol.iterator](),a;!(r=(a=o.next()).done);r=true){n.push(a.value);if(e&&n.length===e)break}}catch(t){i=true;u=t}finally{try{if(!r&&o["return"])o["return"]()}finally{if(i)throw u}}return n}return function(e,n){if(Array.isArray(e)){return e}else if(Symbol.iterator in Object(e)){return t(e,n)}else{throw new TypeError("Invalid attempt to destructure non-iterable instance")}}}();function xo(t,e){var n=Object.getOwnPropertyNames(e);for(var r=0;r<n.length;r++){var i=n[r];var u=Object.getOwnPropertyDescriptor(e,i);if(u&&u.configurable&&t[i]===undefined){Object.defineProperty(t,i,u)}}return t}function Fo(t,e){if(!(t instanceof e)){throw new TypeError("Cannot call a class as a function")}}function ko(t,e){if(!t){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e&&(typeof e==="object"||typeof e==="function")?e:t}function Oo(t,e){if(typeof e!=="function"&&e!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof e)}t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:false,writable:true,configurable:true}});if(e)Object.setPrototypeOf?Object.setPrototypeOf(t,e):xo(t,e)}function So(t,e){var n=t.indexOf(e);while(n!==-1){t.splice(n,1);n=t.indexOf(e)}}var No=function(t){Oo(e,t);function e(n,r,i){var u=arguments.length<=3||arguments[3]===undefined?{}:arguments[3];Fo(this,e);var o=ko(this,t.call(this));o.backend=n;o.store=r;o.services=i;o.options=u;o.logger=Pu.create("backendConnector");o.state={};o.queue=[];o.backend&&o.backend.init&&o.backend.init(i,u.backend,u);return o}e.prototype.queueLoad=function t(e,n,r){var i=this;var u=[],o=[],a=[],s=[];e.forEach(function(t){var e=true;n.forEach(function(n){var r=t+"|"+n;if(i.store.hasResourceBundle(t,n)){i.state[r]=2}else if(i.state[r]<0){}else if(i.state[r]===1){if(o.indexOf(r)<0)o.push(r)}else{i.state[r]=1;e=false;if(o.indexOf(r)<0)o.push(r);if(u.indexOf(r)<0)u.push(r);if(s.indexOf(n)<0)s.push(n)}});if(!e)a.push(t)});if(u.length||o.length){this.queue.push({pending:o,loaded:{},errors:[],callback:r})}return{toLoad:u,pending:o,toLoadLanguages:a,toLoadNamespaces:s}};e.prototype.loaded=function t(e,n,r){var i=this;var u=e.split("|");var o=Do(u,2);var a=o[0];var s=o[1];if(n)this.emit("failedLoading",a,s,n);if(r){this.store.addResourceBundle(a,s,r)}this.state[e]=n?-1:2;this.queue.forEach(function(t){Vu(t.loaded,[a],s);So(t.pending,e);if(n)t.errors.push(n);if(t.pending.length===0&&!t.done){t.errors.length?t.callback(t.errors):t.callback();i.emit("loaded",t.loaded);t.done=true}});this.queue=this.queue.filter(function(t){return!t.done})};e.prototype.read=function t(e,n,r,i,u,o){var a=this;if(!i)i=0;if(!u)u=250;if(!e.length)return o(null,{});this.backend[r](e,n,function(t,s){if(t&&s&&i<5){setTimeout(function(){a.read.call(a,e,n,r,++i,u*2,o)},u);return}o(t,s)})};e.prototype.load=function t(e,n,r){var i=this;if(!this.backend){this.logger.warn("No backend was added via i18next.use. Will not load resources.");return r&&r()}var u=Bo({},this.backend.options,this.options.backend);if(typeof e==="string")e=this.services.languageUtils.toResolveHierarchy(e);if(typeof n==="string")n=[n];var o=this.queueLoad(e,n,r);if(!o.toLoad.length){if(!o.pending.length)r();return}if(u.allowMultiLoading&&this.backend.readMulti){this.read(o.toLoadLanguages,o.toLoadNamespaces,"readMulti",null,null,function(t,e){if(t)i.logger.warn("loading namespaces "+o.toLoadNamespaces.join(", ")+" for languages "+o.toLoadLanguages.join(", ")+" via multiloading failed",t);if(!t&&e)i.logger.log("loaded namespaces "+o.toLoadNamespaces.join(", ")+" for languages "+o.toLoadLanguages.join(", ")+" via multiloading",e);o.toLoad.forEach(function(n){var r=n.split("|");var u=Do(r,2);var o=u[0];var a=u[1];var s=qu(e,[o,a]);if(s){i.loaded(n,t,s)}else{var f="loading namespace "+a+" for language "+o+" via multiloading failed";i.loaded(n,f);i.logger.error(f)}})})}else{(function(){var t=function t(e){var n=this;var r=e.split("|");var i=Do(r,2);var u=i[0];var o=i[1];this.read(u,o,"read",null,null,function(t,r){if(t)n.logger.warn("loading namespace "+o+" for language "+u+" failed",t);if(!t&&r)n.logger.log("loaded namespace "+o+" for language "+u,r);n.loaded(e,t,r)})};o.toLoad.forEach(function(e){t.call(i,e)})})()}};e.prototype.reload=function t(e,n){var r=this;if(!this.backend){this.logger.warn("No backend was added via i18next.use. Will not load resources.")}var i=Bo({},this.backend.options,this.options.backend);if(typeof e==="string")e=this.services.languageUtils.toResolveHierarchy(e);if(typeof n==="string")n=[n];if(i.allowMultiLoading&&this.backend.readMulti){this.read(e,n,"readMulti",null,null,function(t,i){if(t)r.logger.warn("reloading namespaces "+n.join(", ")+" for languages "+e.join(", ")+" via multiloading failed",t);if(!t&&i)r.logger.log("reloaded namespaces "+n.join(", ")+" for languages "+e.join(", ")+" via multiloading",i);e.forEach(function(e){n.forEach(function(n){var u=qu(i,[e,n]);if(u){r.loaded(e+"|"+n,t,u)}else{var o="reloading namespace "+n+" for language "+e+" via multiloading failed";r.loaded(e+"|"+n,o);r.logger.error(o)}})})})}else{(function(){var t=function t(e){var n=this;var r=e.split("|");var i=Do(r,2);var u=i[0];var o=i[1];this.read(u,o,"read",null,null,function(t,r){if(t)n.logger.warn("reloading namespace "+o+" for language "+u+" failed",t);if(!t&&r)n.logger.log("reloaded namespace "+o+" for language "+u,r);n.loaded(e,t,r)})};e.forEach(function(e){n.forEach(function(n){t.call(r,e+"|"+n)})})})()}};e.prototype.saveMissing=function t(e,n,r,i){if(this.backend&&this.backend.create)this.backend.create(e,n,r,i);if(!e||!e[0])return;this.store.addResource(e[0],n,r,i)};return e}(Ru);var Mo=Object.assign||function(t){var e=arguments;for(var n=1;n<arguments.length;n++){var r=e[n];for(var i in r){if(Object.prototype.hasOwnProperty.call(r,i)){t[i]=r[i]}}}return t};function jo(t,e){var n=Object.getOwnPropertyNames(e);for(var r=0;r<n.length;r++){var i=n[r];var u=Object.getOwnPropertyDescriptor(e,i);if(u&&u.configurable&&t[i]===undefined){Object.defineProperty(t,i,u)}}return t}function Po(t,e){if(!(t instanceof e)){throw new TypeError("Cannot call a class as a function")}}function Lo(t,e){if(!t){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e&&(typeof e==="object"||typeof e==="function")?e:t}function Ro(t,e){if(typeof e!=="function"&&e!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof e)}t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:false,writable:true,configurable:true}});if(e)Object.setPrototypeOf?Object.setPrototypeOf(t,e):jo(t,e)}var To=function(t){Ro(e,t);function e(n,r,i){var u=arguments.length<=3||arguments[3]===undefined?{}:arguments[3];Po(this,e);var o=Lo(this,t.call(this));o.cache=n;o.store=r;o.services=i;o.options=u;o.logger=Pu.create("cacheConnector");o.cache&&o.cache.init&&o.cache.init(i,u.cache,u);return o}e.prototype.load=function t(e,n,r){var i=this;if(!this.cache)return r&&r();var u=Mo({},this.cache.options,this.options.cache);if(typeof e==="string")e=this.services.languageUtils.toResolveHierarchy(e);if(typeof n==="string")n=[n];if(u.enabled){this.cache.load(e,function(t,n){if(t)i.logger.error("loading languages "+e.join(", ")+" from cache failed",t);if(n){for(var u in n){for(var o in n[u]){if(o==="i18nStamp")continue;var a=n[u][o];if(a)i.store.addResourceBundle(u,o,a)}}}if(r)r()})}else{if(r)r()}};e.prototype.save=function t(){if(this.cache&&this.options.cache&&this.options.cache.enabled)this.cache.save(this.store.data)};return e}(Ru);function Io(){return{debug:false,initImmediate:true,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:false,whitelist:false,nonExplicitWhitelist:false,load:"all",preload:false,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",saveMissing:false,saveMissingTo:"fallback",missingKeyHandler:false,postProcess:false,returnNull:true,returnEmptyString:true,returnObjects:false,joinArrays:false,returnedObjectHandler:function t(){},parseMissingKeyHandler:false,appendNamespaceToMissingKey:false,overloadTranslationOptionHandler:function t(e){return{defaultValue:e[1]}},interpolation:{escapeValue:true,format:function t(e,n,r){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",defaultVariables:undefined}}}function Ho(t){if(typeof t.ns==="string")t.ns=[t.ns];if(typeof t.fallbackLng==="string")t.fallbackLng=[t.fallbackLng];if(typeof t.fallbackNS==="string")t.fallbackNS=[t.fallbackNS];if(t.whitelist&&t.whitelist.indexOf("cimode")<0)t.whitelist.push("cimode");return t}var zo=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol==="function"&&t.constructor===Symbol?"symbol":typeof t};var Vo=Object.assign||function(t){var e=arguments;for(var n=1;n<arguments.length;n++){var r=e[n];for(var i in r){if(Object.prototype.hasOwnProperty.call(r,i)){t[i]=r[i]}}}return t};function qo(t,e){var n=Object.getOwnPropertyNames(e);for(var r=0;r<n.length;r++){var i=n[r];var u=Object.getOwnPropertyDescriptor(e,i);if(u&&u.configurable&&t[i]===undefined){Object.defineProperty(t,i,u)}}return t}function Uo(t,e){if(!(t instanceof e)){throw new TypeError("Cannot call a class as a function")}}function $o(t,e){if(!t){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e&&(typeof e==="object"||typeof e==="function")?e:t}function Ko(t,e){if(typeof e!=="function"&&e!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof e)}t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:false,writable:true,configurable:true}});if(e)Object.setPrototypeOf?Object.setPrototypeOf(t,e):qo(t,e)}var Xo=function(t){Ko(e,t);function e(){var n=arguments.length<=0||arguments[0]===undefined?{}:arguments[0];var r=arguments[1];Uo(this,e);var i=$o(this,t.call(this));i.options=Ho(n);i.services={};i.logger=Pu;i.modules={};if(r&&!i.isInitialized)i.init(n,r);return i}e.prototype.init=function t(e,n){var r=this;if(typeof e==="function"){n=e;e={}}if(!e)e={};if(e.compatibilityAPI==="v1"){this.options=Vo({},Io(),Ho(no(e)),{})}else if(e.compatibilityJSON==="v1"){this.options=Vo({},Io(),Ho(ro(e)),{})}else{this.options=Vo({},Io(),this.options,Ho(e))}if(!n)n=function t(){};function i(t){if(!t)return;if(typeof t==="function")return new t;return t}if(!this.options.isClone){if(this.modules.logger){Pu.init(i(this.modules.logger),this.options)}else{Pu.init(null,this.options)}var u=new go(this.options);this.store=new Zu(this.options.resources,this.options);var o=this.services;o.logger=Pu;o.resourceStore=this.store;o.resourceStore.on("added removed",function(t,e){o.cacheConnector.save()});o.languageUtils=u;o.pluralResolver=new _o(u,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON});o.interpolator=new Eo(this.options);o.backendConnector=new No(i(this.modules.backend),o.resourceStore,o,this.options);o.backendConnector.on("*",function(t){var e=arguments;for(var n=arguments.length,i=Array(n>1?n-1:0),u=1;u<n;u++){i[u-1]=e[u]}r.emit.apply(r,[t].concat(i))});o.backendConnector.on("loaded",function(t){o.cacheConnector.save()});o.cacheConnector=new To(i(this.modules.cache),o.resourceStore,o,this.options);o.cacheConnector.on("*",function(t){var e=arguments;for(var n=arguments.length,i=Array(n>1?n-1:0),u=1;u<n;u++){i[u-1]=e[u]}r.emit.apply(r,[t].concat(i))});if(this.modules.languageDetector){o.languageDetector=i(this.modules.languageDetector);o.languageDetector.init(o,this.options.detection,this.options)}this.translator=new ho(this.services,this.options);this.translator.on("*",function(t){var e=arguments;for(var n=arguments.length,i=Array(n>1?n-1:0),u=1;u<n;u++){i[u-1]=e[u]}r.emit.apply(r,[t].concat(i))})}var a=["getResource","addResource","addResources","addResourceBundle","removeResourceBundle","hasResourceBundle","getResourceBundle"];a.forEach(function(t){r[t]=function(){return this.store[t].apply(this.store,arguments)}});if(this.options.compatibilityAPI==="v1")uo(this);var s=function t(){r.changeLanguage(r.options.lng,function(t,e){r.emit("initialized",r.options);r.logger.log("initialized",r.options);n(t,e)})};if(this.options.resources||!this.options.initImmediate){s()}else{setTimeout(s,0)}return this};e.prototype.loadResources=function t(e){var n=this;if(!e)e=function t(){};if(!this.options.resources){var r=function(){if(n.language&&n.language.toLowerCase()==="cimode")return{v:e()};var t=[];var r=function e(r){var i=n.services.languageUtils.toResolveHierarchy(r);i.forEach(function(e){if(t.indexOf(e)<0)t.push(e)})};r(n.language);if(n.options.preload){n.options.preload.forEach(function(t){r(t)})}n.services.cacheConnector.load(t,n.options.ns,function(){n.services.backendConnector.load(t,n.options.ns,e)})}();if((typeof r==="undefined"?"undefined":zo(r))==="object")return r.v}else{e(null)}};e.prototype.reloadResources=function t(e,n){if(!e)e=this.languages;if(!n)n=this.options.ns;this.services.backendConnector.reload(e,n)};e.prototype.use=function t(e){if(e.type==="backend"){this.modules.backend=e}if(e.type==="cache"){this.modules.cache=e}if(e.type==="logger"||e.log&&e.warn&&e.warn){this.modules.logger=e}if(e.type==="languageDetector"){this.modules.languageDetector=e}if(e.type==="postProcessor"){to.addPostProcessor(e)}return this};e.prototype.changeLanguage=function t(e,n){var r=this;var i=function t(i){if(e){r.emit("languageChanged",e);r.logger.log("languageChanged",e)}if(n)n(i,function(){var t=arguments;for(var e=arguments.length,n=Array(e),i=0;i<e;i++){n[i]=t[i]}return r.t.apply(r,n)})};if(!e&&this.services.languageDetector)e=this.services.languageDetector.detect();if(e){this.language=e;this.languages=this.services.languageUtils.toResolveHierarchy(e);this.translator.changeLanguage(e);if(this.services.languageDetector)this.services.languageDetector.cacheUserLanguage(e)}this.loadResources(function(t){i(t)})};e.prototype.getFixedT=function t(e,n){var r=this;var i=function t(e,n){n=n||{};n.lng=n.lng||t.lng;n.ns=n.ns||t.ns;return r.t(e,n)};i.lng=e;i.ns=n;return i};e.prototype.t=function t(){return this.translator&&this.translator.translate.apply(this.translator,arguments)};e.prototype.exists=function t(){return this.translator&&this.translator.exists.apply(this.translator,arguments)};e.prototype.setDefaultNamespace=function t(e){this.options.defaultNS=e};e.prototype.loadNamespaces=function t(e,n){var r=this;if(!this.options.ns)return n&&n();if(typeof e==="string")e=[e];e.forEach(function(t){if(r.options.ns.indexOf(t)<0)r.options.ns.push(t)});this.loadResources(n)};e.prototype.loadLanguages=function t(e,n){if(typeof e==="string")e=[e];var r=this.options.preload||[];var i=e.filter(function(t){return r.indexOf(t)<0});if(!i.length)return n();this.options.preload=r.concat(i);this.loadResources(n)};e.prototype.dir=function t(e){if(!e)e=this.language;if(!e)return"rtl";var n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"];return n.indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>=0?"rtl":"ltr"};e.prototype.createInstance=function t(){var n=arguments.length<=0||arguments[0]===undefined?{}:arguments[0];var r=arguments[1];return new e(n,r)};e.prototype.cloneInstance=function t(){var n=this;var r=arguments.length<=0||arguments[0]===undefined?{}:arguments[0];var i=arguments[1];var u=new e(Vo({},r,this.options,{isClone:true}),i);var o=["store","translator","services","language"];o.forEach(function(t){u[t]=n[t]});return u};return e}(Ru);var Wo=new Xo;var Yo={lowercase:["a","an","and","as","at","but","by","for","from","if","in","into","near","nor","of","on","onto","or","per","that","the","to","with","via","vs","vs."],uppercase:["CEO","CFO","CNC","COO","CPU","GDP","HVAC","ID","IT","R&D","TV","UI"]};var Jo={array:Yo};var Go={lowercase:["una","y","en","pero","en","de","o","el","la","los","las","para","a","con"],uppercase:["CEO","CFO","CNC","COO","CPU","PIB","HVAC","ID","TI","I&D","TV","UI"]};var Qo={array:Go};var Zo=Wo.init({fallbackLng:"en-US",initImmediate:false,resources:{"en-US":{translation:Jo},"es-ES":{translation:Qo}}});var ta="$";function ea(){}ea.prototype=na.prototype={constructor:ea,has:function(t){return ta+t in this},get:function(t){return this[ta+t]},set:function(t,e){this[ta+t]=e;return this},remove:function(t){var e=ta+t;return e in this&&delete this[e]},clear:function(){var t=this;for(var e in this)if(e[0]===ta)delete t[e]},keys:function(){var t=[];for(var e in this)if(e[0]===ta)t.push(e.slice(1));return t},values:function(){var t=this;var e=[];for(var n in this)if(n[0]===ta)e.push(t[n]);return e},entries:function(){var t=this;var e=[];for(var n in this)if(n[0]===ta)e.push({key:n.slice(1),value:t[n]});return e},size:function(){var t=0;for(var e in this)if(e[0]===ta)++t;return t},empty:function(){for(var t in this)if(t[0]===ta)return false;return true},each:function(t){var e=this;for(var n in this)if(n[0]===ta)t(e[n],n.slice(1),e)}};function na(t,e){var n=new ea;if(t instanceof ea)t.each(function(t,e){n.set(e,t)});else if(Array.isArray(t)){var r=-1,i=t.length,u;if(e==null)while(++r<i)n.set(r,t[r]);else while(++r<i)n.set(e(u=t[r],r,t),u)}else if(t)for(var o in t)n.set(o,t[o]);return n}function ra(){return{}}function ia(t,e,n){t[e]=n}function ua(){return na()}function oa(t,e,n){t.set(e,n)}function aa(){}var sa=na.prototype;aa.prototype=fa.prototype={constructor:aa,has:sa.has,add:function(t){t+="";this[ta+t]=t;return this},remove:sa.remove,clear:sa.clear,values:sa.keys,size:sa.size,empty:sa.empty,each:sa.each};function fa(t,e){var n=new aa;if(t instanceof aa)t.each(function(t){n.add(t)});else if(t){var r=-1,i=t.length;if(e==null)while(++r<i)n.add(t[r]);else while(++r<i)n.add(e(t[r],r,t))}return n}var la=function(t){var e=[];for(var n in t)e.push(n);return e};var ca=undefined;var ha=["u0903","u093B","u093E","u093F","u0940","u0949","u094A","u094B","u094C","u094E","u094F","u0982","u0983","u09BE","u09BF","u09C0","u09C7","u09C8","u09CB","u09CC","u09D7","u0A03","u0A3E","u0A3F","u0A40","u0A83","u0ABE","u0ABF","u0AC0","u0AC9","u0ACB","u0ACC","u0B02","u0B03","u0B3E","u0B40","u0B47","u0B48","u0B4B","u0B4C","u0B57","u0BBE","u0BBF","u0BC1","u0BC2","u0BC6","u0BC7","u0BC8","u0BCA","u0BCB","u0BCC","u0BD7","u0C01","u0C02","u0C03","u0C41","u0C42","u0C43","u0C44","u0C82","u0C83","u0CBE","u0CC0","u0CC1","u0CC2","u0CC3","u0CC4","u0CC7","u0CC8","u0CCA","u0CCB","u0CD5","u0CD6","u0D02","u0D03","u0D3E","u0D3F","u0D40","u0D46","u0D47","u0D48","u0D4A","u0D4B","u0D4C","u0D57","u0D82","u0D83","u0DCF","u0DD0","u0DD1","u0DD8","u0DD9","u0DDA","u0DDB","u0DDC","u0DDD","u0DDE","u0DDF","u0DF2","u0DF3","u0F3E","u0F3F","u0F7F","u102B","u102C","u1031","u1038","u103B","u103C","u1056","u1057","u1062","u1063","u1064","u1067","u1068","u1069","u106A","u106B","u106C","u106D","u1083","u1084","u1087","u1088","u1089","u108A","u108B","u108C","u108F","u109A","u109B","u109C","u17B6","u17BE","u17BF","u17C0","u17C1","u17C2","u17C3","u17C4","u17C5","u17C7","u17C8","u1923","u1924","u1925","u1926","u1929","u192A","u192B","u1930","u1931","u1933","u1934","u1935","u1936","u1937","u1938","u1A19","u1A1A","u1A55","u1A57","u1A61","u1A63","u1A64","u1A6D","u1A6E","u1A6F","u1A70","u1A71","u1A72","u1B04","u1B35","u1B3B","u1B3D","u1B3E","u1B3F","u1B40","u1B41","u1B43","u1B44","u1B82","u1BA1","u1BA6","u1BA7","u1BAA","u1BE7","u1BEA","u1BEB","u1BEC","u1BEE","u1BF2","u1BF3","u1C24","u1C25","u1C26","u1C27","u1C28","u1C29","u1C2A","u1C2B","u1C34","u1C35","u1CE1","u1CF2","u1CF3","u302E","u302F","uA823","uA824","uA827","uA880","uA881","uA8B4","uA8B5","uA8B6","uA8B7","uA8B8","uA8B9","uA8BA","uA8BB","uA8BC","uA8BD","uA8BE","uA8BF","uA8C0","uA8C1","uA8C2","uA8C3","uA952","uA953","uA983","uA9B4","uA9B5","uA9BA","uA9BB","uA9BD","uA9BE","uA9BF","uA9C0","uAA2F","uAA30","uAA33","uAA34","uAA4D","uAA7B","uAA7D","uAAEB","uAAEE","uAAEF","uAAF5","uABE3","uABE4","uABE6","uABE7","uABE9","uABEA","uABEC"];var pa=["u0300","u0301","u0302","u0303","u0304","u0305","u0306","u0307","u0308","u0309","u030A","u030B","u030C","u030D","u030E","u030F","u0310","u0311","u0312","u0313","u0314","u0315","u0316","u0317","u0318","u0319","u031A","u031B","u031C","u031D","u031E","u031F","u0320","u0321","u0322","u0323","u0324","u0325","u0326","u0327","u0328","u0329","u032A","u032B","u032C","u032D","u032E","u032F","u0330","u0331","u0332","u0333","u0334","u0335","u0336","u0337","u0338","u0339","u033A","u033B","u033C","u033D","u033E","u033F","u0340","u0341","u0342","u0343","u0344","u0345","u0346","u0347","u0348","u0349","u034A","u034B","u034C","u034D","u034E","u034F","u0350","u0351","u0352","u0353","u0354","u0355","u0356","u0357","u0358","u0359","u035A","u035B","u035C","u035D","u035E","u035F","u0360","u0361","u0362","u0363","u0364","u0365","u0366","u0367","u0368","u0369","u036A","u036B","u036C","u036D","u036E","u036F","u0483","u0484","u0485","u0486","u0487","u0591","u0592","u0593","u0594","u0595","u0596","u0597","u0598","u0599","u059A","u059B","u059C","u059D","u059E","u059F","u05A0","u05A1","u05A2","u05A3","u05A4","u05A5","u05A6","u05A7","u05A8","u05A9","u05AA","u05AB","u05AC","u05AD","u05AE","u05AF","u05B0","u05B1","u05B2","u05B3","u05B4","u05B5","u05B6","u05B7","u05B8","u05B9","u05BA","u05BB","u05BC","u05BD","u05BF","u05C1","u05C2","u05C4","u05C5","u05C7","u0610","u0611","u0612","u0613","u0614","u0615","u0616","u0617","u0618","u0619","u061A","u064B","u064C","u064D","u064E","u064F","u0650","u0651","u0652","u0653","u0654","u0655","u0656","u0657","u0658","u0659","u065A","u065B","u065C","u065D","u065E","u065F","u0670","u06D6","u06D7","u06D8","u06D9","u06DA","u06DB","u06DC","u06DF","u06E0","u06E1","u06E2","u06E3","u06E4","u06E7","u06E8","u06EA","u06EB","u06EC","u06ED","u0711","u0730","u0731","u0732","u0733","u0734","u0735","u0736","u0737","u0738","u0739","u073A","u073B","u073C","u073D","u073E","u073F","u0740","u0741","u0742","u0743","u0744","u0745","u0746","u0747","u0748","u0749","u074A","u07A6","u07A7","u07A8","u07A9","u07AA","u07AB","u07AC","u07AD","u07AE","u07AF","u07B0","u07EB","u07EC","u07ED","u07EE","u07EF","u07F0","u07F1","u07F2","u07F3","u0816","u0817","u0818","u0819","u081B","u081C","u081D","u081E","u081F","u0820","u0821","u0822","u0823","u0825","u0826","u0827","u0829","u082A","u082B","u082C","u082D","u0859","u085A","u085B","u08E3","u08E4","u08E5","u08E6","u08E7","u08E8","u08E9","u08EA","u08EB","u08EC","u08ED","u08EE","u08EF","u08F0","u08F1","u08F2","u08F3","u08F4","u08F5","u08F6","u08F7","u08F8","u08F9","u08FA","u08FB","u08FC","u08FD","u08FE","u08FF","u0900","u0901","u0902","u093A","u093C","u0941","u0942","u0943","u0944","u0945","u0946","u0947","u0948","u094D","u0951","u0952","u0953","u0954","u0955","u0956","u0957","u0962","u0963","u0981","u09BC","u09C1","u09C2","u09C3","u09C4","u09CD","u09E2","u09E3","u0A01","u0A02","u0A3C","u0A41","u0A42","u0A47","u0A48","u0A4B","u0A4C","u0A4D","u0A51","u0A70","u0A71","u0A75","u0A81","u0A82","u0ABC","u0AC1","u0AC2","u0AC3","u0AC4","u0AC5","u0AC7","u0AC8","u0ACD","u0AE2","u0AE3","u0B01","u0B3C","u0B3F","u0B41","u0B42","u0B43","u0B44","u0B4D","u0B56","u0B62","u0B63","u0B82","u0BC0","u0BCD","u0C00","u0C3E","u0C3F","u0C40","u0C46","u0C47","u0C48","u0C4A","u0C4B","u0C4C","u0C4D","u0C55","u0C56","u0C62","u0C63","u0C81","u0CBC","u0CBF","u0CC6","u0CCC","u0CCD","u0CE2","u0CE3","u0D01","u0D41","u0D42","u0D43","u0D44","u0D4D","u0D62","u0D63","u0DCA","u0DD2","u0DD3","u0DD4","u0DD6","u0E31","u0E34","u0E35","u0E36","u0E37","u0E38","u0E39","u0E3A","u0E47","u0E48","u0E49","u0E4A","u0E4B","u0E4C","u0E4D","u0E4E","u0EB1","u0EB4","u0EB5","u0EB6","u0EB7","u0EB8","u0EB9","u0EBB","u0EBC","u0EC8","u0EC9","u0ECA","u0ECB","u0ECC","u0ECD","u0F18","u0F19","u0F35","u0F37","u0F39","u0F71","u0F72","u0F73","u0F74","u0F75","u0F76","u0F77","u0F78","u0F79","u0F7A","u0F7B","u0F7C","u0F7D","u0F7E","u0F80","u0F81","u0F82","u0F83","u0F84","u0F86","u0F87","u0F8D","u0F8E","u0F8F","u0F90","u0F91","u0F92","u0F93","u0F94","u0F95","u0F96","u0F97","u0F99","u0F9A","u0F9B","u0F9C","u0F9D","u0F9E","u0F9F","u0FA0","u0FA1","u0FA2","u0FA3","u0FA4","u0FA5","u0FA6","u0FA7","u0FA8","u0FA9","u0FAA","u0FAB","u0FAC","u0FAD","u0FAE","u0FAF","u0FB0","u0FB1","u0FB2","u0FB3","u0FB4","u0FB5","u0FB6","u0FB7","u0FB8","u0FB9","u0FBA","u0FBB","u0FBC","u0FC6","u102D","u102E","u102F","u1030","u1032","u1033","u1034","u1035","u1036","u1037","u1039","u103A","u103D","u103E","u1058","u1059","u105E","u105F","u1060","u1071","u1072","u1073","u1074","u1082","u1085","u1086","u108D","u109D","u135D","u135E","u135F","u1712","u1713","u1714","u1732","u1733","u1734","u1752","u1753","u1772","u1773","u17B4","u17B5","u17B7","u17B8","u17B9","u17BA","u17BB","u17BC","u17BD","u17C6","u17C9","u17CA","u17CB","u17CC","u17CD","u17CE","u17CF","u17D0","u17D1","u17D2","u17D3","u17DD","u180B","u180C","u180D","u18A9","u1920","u1921","u1922","u1927","u1928","u1932","u1939","u193A","u193B","u1A17","u1A18","u1A1B","u1A56","u1A58","u1A59","u1A5A","u1A5B","u1A5C","u1A5D","u1A5E","u1A60","u1A62","u1A65","u1A66","u1A67","u1A68","u1A69","u1A6A","u1A6B","u1A6C","u1A73","u1A74","u1A75","u1A76","u1A77","u1A78","u1A79","u1A7A","u1A7B","u1A7C","u1A7F","u1AB0","u1AB1","u1AB2","u1AB3","u1AB4","u1AB5","u1AB6","u1AB7","u1AB8","u1AB9","u1ABA","u1ABB","u1ABC","u1ABD","u1B00","u1B01","u1B02","u1B03","u1B34","u1B36","u1B37","u1B38","u1B39","u1B3A","u1B3C","u1B42","u1B6B","u1B6C","u1B6D","u1B6E","u1B6F","u1B70","u1B71","u1B72","u1B73","u1B80","u1B81","u1BA2","u1BA3","u1BA4","u1BA5","u1BA8","u1BA9","u1BAB","u1BAC","u1BAD","u1BE6","u1BE8","u1BE9","u1BED","u1BEF","u1BF0","u1BF1","u1C2C","u1C2D","u1C2E","u1C2F","u1C30","u1C31","u1C32","u1C33","u1C36","u1C37","u1CD0","u1CD1","u1CD2","u1CD4","u1CD5","u1CD6","u1CD7","u1CD8","u1CD9","u1CDA","u1CDB","u1CDC","u1CDD","u1CDE","u1CDF","u1CE0","u1CE2","u1CE3","u1CE4","u1CE5","u1CE6","u1CE7","u1CE8","u1CED","u1CF4","u1CF8","u1CF9","u1DC0","u1DC1","u1DC2","u1DC3","u1DC4","u1DC5","u1DC6","u1DC7","u1DC8","u1DC9","u1DCA","u1DCB","u1DCC","u1DCD","u1DCE","u1DCF","u1DD0","u1DD1","u1DD2","u1DD3","u1DD4","u1DD5","u1DD6","u1DD7","u1DD8","u1DD9","u1DDA","u1DDB","u1DDC","u1DDD","u1DDE","u1DDF","u1DE0","u1DE1","u1DE2","u1DE3","u1DE4","u1DE5","u1DE6","u1DE7","u1DE8","u1DE9","u1DEA","u1DEB","u1DEC","u1DED","u1DEE","u1DEF","u1DF0","u1DF1","u1DF2","u1DF3","u1DF4","u1DF5","u1DFC","u1DFD","u1DFE","u1DFF","u20D0","u20D1","u20D2","u20D3","u20D4","u20D5","u20D6","u20D7","u20D8","u20D9","u20DA","u20DB","u20DC","u20E1","u20E5","u20E6","u20E7","u20E8","u20E9","u20EA","u20EB","u20EC","u20ED","u20EE","u20EF","u20F0","u2CEF","u2CF0","u2CF1","u2D7F","u2DE0","u2DE1","u2DE2","u2DE3","u2DE4","u2DE5","u2DE6","u2DE7","u2DE8","u2DE9","u2DEA","u2DEB","u2DEC","u2DED","u2DEE","u2DEF","u2DF0","u2DF1","u2DF2","u2DF3","u2DF4","u2DF5","u2DF6","u2DF7","u2DF8","u2DF9","u2DFA","u2DFB","u2DFC","u2DFD","u2DFE","u2DFF","u302A","u302B","u302C","u302D","u3099","u309A","uA66F","uA674","uA675","uA676","uA677","uA678","uA679","uA67A","uA67B","uA67C","uA67D","uA69E","uA69F","uA6F0","uA6F1","uA802","uA806","uA80B","uA825","uA826","uA8C4","uA8E0","uA8E1","uA8E2","uA8E3","uA8E4","uA8E5","uA8E6","uA8E7","uA8E8","uA8E9","uA8EA","uA8EB","uA8EC","uA8ED","uA8EE","uA8EF","uA8F0","uA8F1","uA926","uA927","uA928","uA929","uA92A","uA92B","uA92C","uA92D","uA947","uA948","uA949","uA94A","uA94B","uA94C","uA94D","uA94E","uA94F","uA950","uA951","uA980","uA981","uA982","uA9B3","uA9B6","uA9B7","uA9B8","uA9B9","uA9BC","uA9E5","uAA29","uAA2A","uAA2B","uAA2C","uAA2D","uAA2E","uAA31","uAA32","uAA35","uAA36","uAA43","uAA4C","uAA7C","uAAB0","uAAB2","uAAB3","uAAB4","uAAB7","uAAB8","uAABE","uAABF","uAAC1","uAAEC","uAAED","uAAF6","uABE5","uABE8","uABED","uFB1E","uFE00","uFE01","uFE02","uFE03","uFE04","uFE05","uFE06","uFE07","uFE08","uFE09","uFE0A","uFE0B","uFE0C","uFE0D","uFE0E","uFE0F","uFE20","uFE21","uFE22","uFE23","uFE24","uFE25","uFE26","uFE27","uFE28","uFE29","uFE2A","uFE2B","uFE2C","uFE2D","uFE2E","uFE2F"];
var va=ha.concat(pa);var da=["-","/",";",":","&","u0E2F","u0EAF","u0EC6","u0ECC","u104A","u104B","u104C","u104D","u104E","u104F","u2013","u2014","u2027","u3000","u3001","u3002","uFF5E"];var ga=["'","<","(","{","[","u00AB","u300A","u3008"];var ya=["'",">",")","}","]",".","!","?","u00BB","u300B","u3009"].concat(da);var ma="က-ဪဿ-၉ၐ-ၕ";var Aa="぀-ゟ゠-ヿ＀-゚㐀-䶿";var wa="㐀-龿";var ba="ກ-ຮະ-ໄ່-໋ໍ-ໝ";var _a=ma+wa+ba;var Ca=new RegExp("(\\"+da.join("|\\")+")*[^\\s|\\"+da.join("|\\")+"]+(\\"+da.join("|\\")+")*","g");var Ea=new RegExp("["+Aa+"]");var Ba=new RegExp("["+_a+"]");var Da=new RegExp("(\\"+ga.join("|\\")+")*["+_a+"](\\"+ya.join("|\\")+"|\\"+va.join("|\\")+")*|[a-z0-9]+","gi");var xa=function(t){if(!Ba.test(t))return e(t).match(Ca);return bu(e(t).match(Ca).map(function(t){if(!Ea.test(t)&&Ba.test(t))return t.match(Da);return[t]}))};var Fa=function(t,e){if(e===void 0)e={"font-size":10,"font-family":"sans-serif"};var n=document.createElement("canvas").getContext("2d");var r=[];if("font-style"in e)r.push(e["font-style"]);if("font-variant"in e)r.push(e["font-variant"]);if("font-weight"in e)r.push(e["font-weight"]);if("font-size"in e){var i=e["font-size"]+"px";if("line-height"in e)i+="/"+e["line-height"]+"px";r.push(i)}if("font-family"in e)r.push(e["font-family"]);n.font=r.join(" ");if(t instanceof Array)return t.map(function(t){return n.measureText(t).width});return n.measureText(t).width};var ka=function(){var t="sans-serif",n=10,r=200,i,u=false,o=xa,a=200;function s(s){s=e(s);if(i===void 0)i=Math.ceil(n*1.1);var f=o(s);var l={"font-family":t,"font-size":n,"line-height":i};var c=1,h="",p=false,v=0;var d=[],g=Fa(f,l),y=Fa(" ",l);for(var m=0;m<f.length;m++){var A=f[m];var w=s.charAt(h.length+A.length),b=g[f.indexOf(A)];if(w===" ")A+=w;if(v+b>a){if(!m&&!u){p=true;break}d[c-1]=d[c-1].trimRight();c++;if(i*c>r||b>a&&!u){p=true;break}v=0;d.push(A)}else if(!m)d[0]=A;else d[c-1]+=A;h+=A;v+=b;if(w===" ")v+=y}return{lines:d,sentence:s,truncated:p,words:f}}s.fontFamily=function(e){return arguments.length?(t=e,s):t};s.fontSize=function(t){return arguments.length?(n=t,s):n};s.height=function(t){return arguments.length?(r=t,s):r};s.lineHeight=function(t){return arguments.length?(i=t,s):i};s.overflow=function(t){return arguments.length?(u=t,s):u};s.split=function(t){return arguments.length?(o=t,s):o};s.width=function(t){return arguments.length?(a=t,s):a};return s};var Oa=function(t){function e(){t.call(this);this._delay=0;this._duration=0;this._ellipsis=function(t){return t.replace(/\.|,$/g,"")+"..."};this._fontColor=Ou("black");this._fontFamily=Ou("Verdana");this._fontMax=Ou(50);this._fontMin=Ou(8);this._fontResize=Ou(false);this._fontSize=Ou(10);this._height=Du("height",200);this._id=function(t,e){return t.id||""+e};this._on={};this._overflow=Ou(false);this._rotate=Ou(0);this._split=xa;this._text=Du("text");this._textAnchor=Ou("start");this._verticalAlign=Ou("top");this._width=Du("width",200);this._x=Du("x",0);this._y=Du("y",0)}if(t)e.__proto__=t;e.prototype=Object.create(t&&t.prototype);e.prototype.constructor=e;e.prototype.render=function t(e){var n=this;if(this._select===void 0)this.select(Wt("body").append("svg").style("width",window.innerWidth+"px").style("height",window.innerHeight+"px").node());if(this._lineHeight===void 0)this._lineHeight=function(t,e){return n._fontSize(t,e)*1.1};var r=this;var i=this._select.selectAll(".d3plus-textBox").data(this._data.reduce(function(t,e,i){var u=n._text(e,i);if(u===void 0)return t;var o=n._fontResize(e,i);var a=o?n._fontMax(e,i):n._fontSize(e,i),s=o?a*1.1:n._lineHeight(e,i),f=1,l=[],c;var h={"font-family":n._fontFamily(e,i),"font-size":a,"line-height":s};var p=n._height(e,i),v=n._width(e,i);var d=ka().fontFamily(h["font-family"]).fontSize(a).lineHeight(s).height(p).overflow(n._overflow(e,i)).width(v);var g=n._fontMax(e,i),y=n._fontMin(e,i),m=n._verticalAlign(e,i),A=n._split(u,i);function w(){if(a<y){l=[];return}else if(a>g)a=g;if(o){s=a*1.1;d.fontSize(a).lineHeight(s);h["font-size"]=a;h["line-height"]=s}var t=d(u);l=t.lines.filter(function(t){return t!==""});f=l.length;if(t.truncated){if(o){a--;if(a<y)l=[];else w()}else if(f<1)l=[r._ellipsis("")];else l[f-1]=r._ellipsis(l[f-1])}}if(v>y&&(p>s||o&&p>y*1.1)){if(o){c=Fa(A,h);var b=1.165+v/p*.1,_=v*p,C=wu(c),E=Cu(c,function(t){return t*s})*b;if(C>v||E>_){var B=Math.sqrt(_/E),D=v/C;var x=_u([B,D]);a=Math.floor(a*x)}var F=Math.floor(p*.8);if(a>F)a=F}w()}if(l.length){var k=f*s;var O=m==="top"?0:m==="middle"?p/2-k/2:p-k;O-=s*.1;t.push({data:e,lines:l,fC:n._fontColor(e,i),fF:h["font-family"],id:n._id(e,i),tA:n._textAnchor(e,i),fS:a,lH:s,w:v,x:n._x(e,i),y:n._y(e,i)+O})}return t},[]),this._id);var u=Ai().duration(this._duration);if(this._duration===0){i.exit().remove()}else{i.exit().transition().delay(this._duration).remove();i.exit().selectAll("tspan").transition(u).attr("opacity",0)}function o(t){t.attr("transform",function(t,e){return"rotate("+r._rotate(t,e)+" "+(t.x+t.w/2)+" "+(t.y+t.lH/4+t.lH*t.lines.length/2)+")"})}var a=i.enter().append("text").attr("class","d3plus-textBox").attr("id",function(t){return"d3plus-textBox-"+t.id}).attr("y",function(t){return t.y+"px"}).call(o).merge(i);a.attr("fill",function(t){return t.fC}).attr("text-anchor",function(t){return t.tA}).attr("font-family",function(t){return t.fF}).style("font-family",function(t){return t.fF}).attr("font-size",function(t){return t.fS+"px"}).style("font-size",function(t){return t.fS+"px"}).each(function(t){var e=t.tA==="start"?0:t.tA==="end"?t.w:t.w/2,n=Wt(this);if(r._duration===0)n.attr("y",function(t){return t.y+"px"});else n.transition(u).attr("y",function(t){return t.y+"px"});function i(n){n.text(function(t){return t.trimRight()}).attr("x",t.x+"px").attr("dx",e+"px").attr("dy",t.lH+"px")}var o=n.selectAll("tspan").data(t.lines);if(r._duration===0){o.call(i);o.exit().remove();o.enter().append("tspan").attr("dominant-baseline","alphabetic").style("baseline-shift","0%").call(i)}else{o.transition(u).call(i);o.exit().transition(u).attr("opacity",0).remove();o.enter().append("tspan").attr("dominant-baseline","alphabetic").style("baseline-shift","0%").attr("opacity",0).call(i).transition(u).delay(r._delay).attr("opacity",1)}}).transition(u).call(o);var s=Object.keys(this._on),f=s.reduce(function(t,e){t[e]=function(t,r){return n._on[e](t.data,r)};return t},{});for(var l=0;l<s.length;l++)a.on(s[l],f[s[l]]);if(e)setTimeout(e,this._duration+100);return this};e.prototype.data=function t(e){return arguments.length?(this._data=e,this):this._data};e.prototype.delay=function t(e){return arguments.length?(this._delay=e,this):this._delay};e.prototype.duration=function t(e){return arguments.length?(this._duration=e,this):this._duration};e.prototype.ellipsis=function t(e){return arguments.length?(this._ellipsis=typeof e==="function"?e:Ou(e),this):this._ellipsis};e.prototype.fontColor=function t(e){return arguments.length?(this._fontColor=typeof e==="function"?e:Ou(e),this):this._fontColor};e.prototype.fontFamily=function t(e){return arguments.length?(this._fontFamily=typeof e==="function"?e:Ou(e),this):this._fontFamily};e.prototype.fontMax=function t(e){return arguments.length?(this._fontMax=typeof e==="function"?e:Ou(e),this):this._fontMax};e.prototype.fontMin=function t(e){return arguments.length?(this._fontMin=typeof e==="function"?e:Ou(e),this):this._fontMin};e.prototype.fontResize=function t(e){return arguments.length?(this._fontResize=typeof e==="function"?e:Ou(e),this):this._fontResize};e.prototype.fontSize=function t(e){return arguments.length?(this._fontSize=typeof e==="function"?e:Ou(e),this):this._fontSize};e.prototype.height=function t(e){return arguments.length?(this._height=typeof e==="function"?e:Ou(e),this):this._height};e.prototype.id=function t(e){return arguments.length?(this._id=typeof e==="function"?e:Ou(e),this):this._id};e.prototype.lineHeight=function t(e){return arguments.length?(this._lineHeight=typeof e==="function"?e:Ou(e),this):this._lineHeight};e.prototype.overflow=function t(e){return arguments.length?(this._overflow=typeof e==="function"?e:Ou(e),this):this._overflow};e.prototype.rotate=function t(e){return arguments.length?(this._rotate=typeof e==="function"?e:Ou(e),this):this._rotate};e.prototype.select=function t(e){return arguments.length?(this._select=Wt(e),this):this._select};e.prototype.split=function t(e){return arguments.length?(this._split=e,this):this._split};e.prototype.text=function t(e){return arguments.length?(this._text=typeof e==="function"?e:Ou(e),this):this._text};e.prototype.textAnchor=function t(e){return arguments.length?(this._textAnchor=typeof e==="function"?e:Ou(e),this):this._textAnchor};e.prototype.verticalAlign=function t(e){return arguments.length?(this._verticalAlign=typeof e==="function"?e:Ou(e),this):this._verticalAlign};e.prototype.width=function t(e){return arguments.length?(this._width=typeof e==="function"?e:Ou(e),this):this._width};e.prototype.x=function t(e){return arguments.length?(this._x=typeof e==="function"?e:Ou(e),this):this._x};e.prototype.y=function t(e){return arguments.length?(this._y=typeof e==="function"?e:Ou(e),this):this._y};return e}(ku);var Sa=function(t,e){if(t===void 0)return"";e=Object.assign({lng:"en-US"},e);var n=e.lng;var r=Zo.t("array.lowercase",{lng:n,returnObjects:true}).map(function(t){return t.toLowerCase()});var i=Zo.t("array.uppercase",{lng:n,returnObjects:true});i=i.concat(i.map(function(t){return t+"s"}));var u=i.map(function(t){return t.toLowerCase()});var o=xa(t);return o.map(function(t,e){if(t){var n=t.toLowerCase();var a=ya.includes(n.charAt(n.length-1))?n.slice(0,-1):n;var s=u.indexOf(a);if(s>=0)return i[s];else if(r.includes(a)&&e!==0&&e!==o.length-1)return n;else return t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()}else return""}).reduce(function(e,n,r){if(r&&t.charAt(e.length)===" ")e+=" ";e+=n;return e},"")};t.stringify=e;t.strip=r;t.TextBox=Oa;t.textSplit=xa;t.textWidth=Fa;t.textWrap=ka;t.titleCase=Sa;Object.defineProperty(t,"__esModule",{value:true})});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment