diff --git a/build/1dc35d25e61d819a9c357074014867ab.ttf b/build/1dc35d25e61d819a9c357074014867ab.ttf deleted file mode 100644 index f221e50..0000000 Binary files a/build/1dc35d25e61d819a9c357074014867ab.ttf and /dev/null differ diff --git a/build/25a32416abee198dd821b0b17a198a8f.eot b/build/25a32416abee198dd821b0b17a198a8f.eot deleted file mode 100644 index c7b00d2..0000000 Binary files a/build/25a32416abee198dd821b0b17a198a8f.eot and /dev/null differ diff --git a/build/bundle.js b/build/bundle.js index d9cf326..b93a402 100644 --- a/build/bundle.js +++ b/build/bundle.js @@ -1,9 +1,9 @@ -!function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="/build/",t(0)}([function(e,t,n){(function(e){"use strict";var t=n(14),r=n(1);n(1).h;n(170),n(89),n(132);var i=n(76);e(t).foundation();var o={rows:["decade"],cols:["author_1"],agg:"sum_receipts",order:{author_1:"desc",decade:"nat"},filter:{author_1:["Corneille (Pierre)","Molière (Jean-Baptiste Poquelin dit)","Racine (Jean)","Voltaire (François-Marie Arouet dit)"],decade:[1710,1720,1730,1740,1750]},decade_scope:{start:"1710",end:"1750"}},a=t.getElementById("app")||t.body,s=a.getAttribute("data-analytics");r.app(a,i(s,o),i.render)}).call(t,n(30))},function(e,t,n){"use strict";function r(e){return e?l(e):s()}function i(e){var t=c(e),n=t.channels,r=t.handles;n?t.channels=u.value(null):r&&(t.handles=u.value(null));var i=u.struct(t);return n?i.channels.set(u.channels(n,i)):r&&i.handles.set(u.channels(r,i)),i}function o(e,t){function n(n,r){var i=u.Delegator.allocateHandle(e[r].bind(null,t));return n[r]=i,n}return Object.keys(e).reduce(n,{})}function a(e,t,n,r){if(!e)throw new Error("Element does not exist. Mercury cannot be initialized.");u.Delegator(r);var i=u.main(t(),n,c({diff:u.diff,create:u.create,patch:u.patch},r));return e.appendChild(i.target),t(i.update)}var s=n(49),l=n(136),c=n(212),u=e.exports={main:n(140),app:a,BaseEvent:n(12),Delegator:n(46),input:r,handles:o,channels:o,event:n(61),send:n(61),valueEvent:n(64),sendValue:n(64),submitEvent:n(63),sendSubmit:n(63),changeEvent:n(59),sendChange:n(59),keyEvent:n(62),sendKey:n(62),clickEvent:n(60),sendClick:n(60),array:n(55),struct:n(53),hash:n(53),varhash:n(153),value:n(16),state:i,diff:n(71),patch:n(66),partial:n(179),create:n(35),h:n(22),computed:n(155),watch:n(156)}},function(e,t,n){"use strict";function r(){return h}function i(){return u.values(h).reduce(function(e,t){return e.concat(t)})}function o(){return p}function a(e){function t(e){switch(e){case"t":return!0;case"f":return!1;default:return null}}switch(!0){case/^decade(_.*)?/.test(e):return parseInt;case/^month(_.*)?/.test(e):return parseInt;case/^weekday(_.*)?/.test(e):return parseInt;case/^acts(_.*)?/.test(e):return parseInt;case/^prologue(_.*)?/.test(e):return t;case/^musique_danse_machine(_.*)?/.test(e):return t;case/^free_entry(_.*)?/.test(e):return t;case/^reprise(_.*)?/.test(e):return t;case/^firstrun(_.*)?/.test(e):return t;case/sum_receipts/.test(e):return parseFloat;case/sum_receipts_weighted/.test(e):return parseFloat;case/performances_days/.test(e):return parseInt;case/mean_receipts_day/.test(e):return parseFloat;case/mean_receipts_day_weighted/.test(e):return parseFloat;case/mean_price/.test(e):return parseFloat;case/count_authors_(\d)/.test(e):return parseInt;case/count_titles_(\d)/.test(e):return parseInt}return function(e){return e}}function s(e,t,n){function r(t){return t===!0?"en"===e?"yes":"oui":t===!1?"en"===e?"no":"non":"undefined"===t?"":t}var i="en"===e?c.en_spec:c.fr_spec,o="en"===e?c.en:c.fr;switch(!0){case/^decade(_.*)?/.test(t):return function(e){return+e};case/^month(_.*)?/.test(t):return function(e){return null===e?"":i.months[+e-1]};case/^day(_.*)?/.test(t):return o.timeFormat("%a %d %b %Y");case/^weekday(_.*)?/.test(t):return function(e){return null===e?"":i.days[+e-1]};case/^prologue(_.*)?/.test(t):return r;case/^musique_danse_machine(_.*)?/.test(t):return r;case/^free_entry(_.*)?/.test(t):return r;case/^reprise(_.*)?/.test(t):return r;case/^firstrun(_.*)?/.test(t):return r;case/sum_receipts/.test(t):return o.numberFormat(",.2f");case/sum_receipts_weighted/.test(t):return o.numberFormat(",f");case/performances_days/.test(t):return o.numberFormat(",f");case/mean_receipts_day/.test(t):return o.numberFormat(",.2f");case/mean_receipts_day_weighted/.test(t):return o.numberFormat(",f");case/mean_price/.test(t):return o.numberFormat(",.2f");case/count_authors_(\d)/.test(t):return o.numberFormat(",f");case/count_titles_(\d)/.test(t):return o.numberFormat(",f")}return function(e){if(!e)return"";if(e=""+e,!n)return e;var t=e.search(/\s*[(,;]/);t=t>-1?t:1/0;var r=e.indexOf(" ",n);return r=r>-1?r:1/0,e.slice(0,Math.min(t,r))}}function l(e){e&&e.hasOwnProperty("sort")&&e.length>0&&("number"==typeof e[0]?e.sort(function(e,t){return e-t}):e.sort())}Object.defineProperty(t,"__esModule",{value:!0});var c=n(3),u=n(7),f=function(e,t){var n=e.map(function(e){return t.map(function(t){return t+"_"+e})});return n.reduce(function(e,t){return e.concat(t)})},d=["n"].concat(u.range(1,4)),h={performance:f(d,["title"]),time:["decade","season","month","weekday"],author:f(d,["author"]),genre:f(d,["genre"]),seating_area:["seating_area"],acts:f(d,["acts"])},p=["sum_receipts","performances_days","mean_receipts_day","mean_price"];t.group=r,t.dimension=i,t.aggregate=o,t.parse=a,t.format=s,t.sort=l},function(e,t,n){"use strict";function r(e,t,n,r){if(!e[n])throw"Unknown language ("+n+")";var i,o,a;return(i=e[n][t])?o=null:(a=/([A-Za-z0-9]+)(_[n0-9])?$/.exec(t),i=a[1],i=e[n][i]||i,o=a[2]?a[2].slice(1):null),r(i,o)}function i(e,t,n){return r(e,t,n,function(e,t){return a("span",[e,t?a("sub",[t]):null])})}Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),a=n(1).h,s={decimal:".",thousands:",",grouping:[3],currency:[""," €"],dateTime:"%A, le %e %B %Y, %X",date:"%d/%m/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],shortDays:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],months:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],shortMonths:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."]},l=o.locale(s),c={decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},u=o.locale(c);t.fr=l,t.fr_spec=s,t.en=u,t.en_spec=c,t.htmlize=i,t.format_stem_sub=r},function(e,t){e.exports={en:{comparison_tool_title:"Comparison tool",calendar_tool_title:"Calendar tool",new_search_button:"New search",comparison_tool_scope_title:"What are you looking for ?",comparison_tool_place_title:"For what theatre ?",comparison_tool_time_scope_title:"For what period ?",comparison_tool_x_title:"x. In function of what ?",comparison_tool_y_title:"y. In function of what ?",comparison_tool_open_handle:"Search criterias",filter_button_all:"Use all filters",filter_button_clear_all:"Clear all filters",sum_receipts:"Gross receipts",sum_receipts_weighted:"Gross receipts (weighted)",performances_days:"Performances (= days)",mean_receipts_day:"Average receipts / day",mean_receipts_day_weighted:"Average receipts / day (weighted)",mean_price:"Average ticket price",count_authors:"Count author",count_titles:"Count title",rows:"Rows",cols:"Columns",cells:"Cells",find:"Search",all:"All",ok:"OK",from:"From",to:"To",time:"Time",performance:"Performance",performance_addl:"Performance (additional)",theater:"Theater",decade:"Decade",decade_hint:"for decade {decade}",season:"Season",season_hint:"during the season of {season}",month:"Month",month_hint:"for {month}",day:"Day",weekday:"Weekday",weekday_hint:"on {weekday}",author:"Author",author_n:"Author",author_n_hint:"for author {author_1}",author_1:"Author (overture)",author_1_hint:"when {author_1} is presented during overture",author_2:"Author (2nd part)",author_2_hint:"when {author_2} is presented in 2nd part",author_3:"Author (3rd part)",author_3_hint:"when {author_3} is presented in 3rd part",title:"Title",title_n:"Title",title_n_hint:"for {title}",title_1:"First title",title_1_hint:"where the first title is {title_1}",title_2:"Second title",title_2_hint:"where the second title is {title_2}",title_3:"Third title",title_3_hint:"where the third title is {title_3}",genre:"Genre",genre_n:"Genre",genre_n_hint:"for the {genre} genre",genre_1:"Genre (overture)",genre_1_hint:"where the first title is a {genre_1} genre",genre_2:"Genre (2nd part)",genre_2_hint:"where the third title is a {genre_3} genre",genre_3:"Genre (3rd part)",acts:"Acts",acts_hint:"for act {acts}",prose_vers:"Prose/Verse",prologue:"Prolog",musique_danse_machine:"Music/Dance/Machinery",free_entry:"Free Entry",firstrun:"First Run",reprise:"Reprise",newactor:"New Actor",debut:"Debut",ex_attendance:"VIP",ex_representation:"Notable performance",ex_place:"Notable place",theater_period:"Theater + Period",seating_area:"Seat"},fr:{comparison_tool_title:"Outil de comparaison",calendar_tool_title:"Outil calendrier",new_search_button:"Nouvelle recherche",comparison_tool_scope_title:"Que cherchez-vous ?",comparison_tool_place_title:"Pour quelle salle ?",comparison_tool_time_scope_title:"Selon quelle période ?",comparison_tool_x_title:"x. En fonction de quoi ?",comparison_tool_y_title:"y. En fonction de quoi ?",comparison_tool_open_handle:"Critères de recherche",filter_button_all:"Utiliser tous les filtres",filter_button_clear_all:"Supprimer les filtres",sum_receipts:"Somme des recettes",sum_receipts_weighted:"Somme recette (pondérée)",performances_days:"Représentations / jour",mean_receipts_day:"Moyenne des recettes / jour",mean_receipts_day_weighted:"Moyenne recette/jour (pondérée)",mean_price:"Moyenne du prix des places",count_authors:"Nombre d'auteurs",count_titles:"Nombre de pièces",rows:"Lignes",cols:"Colonnes",cells:"Cellules",find:"Rechercher",all:"Tous",ok:"OK",from:"De",to:"À",time:"Période",performance:"Pièce",performance_addl:"Soirée (supplémentaire)",theater:"Salle",decade:"Décennie",decade_hint:"pour la décennie {decade}",season:"Saison",season_hint:"durant la saison de {season}",month:"Mois",month_hint:"pour {month}",day:"Jour",weekday:"Jour de la semaine",weekday_hint:"pour le {weekday}",author:"Auteur",author_n:"Auteur",author_n_hint:"pour l'auteur {author_1}",author_1:"Auteur de la première pièce",author_1_hint:"lorsque {author_1} est en 1ère partie",author_2:"Auteur de la seconde pièce",author_2_hint:"lorsque {author_2} est en 2e partie",author_3:"Auteur de la troisième pièce",author_3_hint:"lorsque {author_3} est en 3e partie",title:"Pièce",title_n:"Pièce",title_n_hint:"pour la pièce {title}",title_1:"Première pièce",title_1_hint:"dont la 1ère pièce est {title_1}",title_2:"Seconde pièce",title_2_hint:"dont la 2e pièce est {title_2}",title_3:"Troisième pièce",title_3_hint:"dont la 3e pièce est {title_3}",genre:"Genre",genre_n:"Genre",genre_n_hint:"des {genre}s",genre_1:"Genre de la première pièce",genre_1_hint:"dont le genre de la 1ère pièce est {genre_1}",genre_2:"Genre de la seconde pièce",genre_2_hint:"dont le genre de la 2e pièce est {genre_2}",genre_3:"Genre de la troisième pièce",genre_3_hint:"dont le genre de la 3e pièce est {genre_3}",acts:"Acte(s)",acts_hint:"pour l'acte {acts}",prose_vers:"Prose/Vers",prologue:"Prologue",musique_danse_machine:"Musique/Danse/Machine",free_entry:"Gratuit",firstrun:"First Run",reprise:"Reprise",newactor:"Nouvel Acteur",debut:"Début",ex_attendance:"Présence exceptionelle",ex_representation:"Répresentation exceptionelles",ex_place:"ExPlace",theater_period:"Théâtre + Période",seating_area:"Place",seating_area_hint:"pour la place {seating_area}"}}},function(e,t,n){function r(e,t){for(var n=0;nt?1:e>=t?0:NaN}function l(e){return null===e?NaN:+e}function c(e){return!isNaN(e)}function u(e){return{left:function(t,n,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);r>>1;e(t[o],n)<0?r=o+1:i=o}return r},right:function(t,n,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);r>>1;e(t[o],n)>0?i=o:r=o+1}return r}}}function f(e){return e.length}function d(e){for(var t=1;e*t%1;)t*=10;return t}function h(e,t){for(var n in t)Object.defineProperty(e.prototype,n,{value:t[n],enumerable:!1})}function p(){this._=Object.create(null)}function m(e){return(e+="")===Fa||e[0]===Ca?Ca+e:e}function g(e){return(e+="")[0]===Ca?e.slice(1):e}function b(e){return m(e)in this._}function v(e){return(e=m(e))in this._&&delete this._[e]}function y(){var e=[];for(var t in this._)e.push(g(t));return e}function w(){var e=0;for(var t in this._)++e;return e}function x(){for(var e in this._)return!1;return!0}function k(){this._=Object.create(null)}function _(e){return e}function F(e,t,n){return function(){var r=n.apply(t,arguments);return r===t?e:r}}function C(e,t){if(t in e)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var n=0,r=Aa.length;n=t&&(t=i+1);!(a=s[t])&&++t0&&(e=e.slice(0,s));var c=Ra.get(e);return c&&(e=c,l=Q),s?t?i:r:t?A:o}function Z(e,t){return function(n){var r=ha.event;ha.event=n,t[0]=this.__data__;try{e.apply(this,t)}finally{ha.event=r}}}function Q(e,t){var n=Z(e,t);return function(e){var t=this,r=e.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||n.call(t,e)}}function ee(e){var t=".dragsuppress-"+ ++Ia,n="click"+t,r=ha.select(a(e)).on("touchmove"+t,S).on("dragstart"+t,S).on("selectstart"+t,S);if(null==Na&&(Na=!("onselectstart"in e)&&C(e.style,"userSelect")),Na){var i=o(e).style,s=i[Na];i[Na]="none"}return function(e){if(r.on(t,null),Na&&(i[Na]=s),e){var o=function(){r.on(n,null)};r.on(n,function(){S(),o()},!0),setTimeout(o,0)}}}function te(e,t){t.changedTouches&&(t=t.changedTouches[0]);var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();if(ja<0){var i=a(e);if(i.scrollX||i.scrollY){n=ha.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var o=n[0][0].getScreenCTM();ja=!(o.f||o.e),n.remove()}}return ja?(r.x=t.pageX,r.y=t.pageY):(r.x=t.clientX,r.y=t.clientY),r=r.matrixTransform(e.getScreenCTM().inverse()),[r.x,r.y]}var s=e.getBoundingClientRect();return[t.clientX-s.left-e.clientLeft,t.clientY-s.top-e.clientTop]}function ne(){return ha.event.changedTouches[0].identifier}function re(e){return e>0?1:e<0?-1:0}function ie(e,t,n){return(t[0]-e[0])*(n[1]-e[1])-(t[1]-e[1])*(n[0]-e[0])}function oe(e){return e>1?0:e<-1?La:Math.acos(e)}function ae(e){return e>1?Wa:e<-1?-Wa:Math.asin(e)}function se(e){return((e=Math.exp(e))-1/e)/2}function le(e){return((e=Math.exp(e))+1/e)/2}function ce(e){return((e=Math.exp(2*e))-1)/(e+1)}function ue(e){return(e=Math.sin(e/2))*e}function fe(){}function de(e,t,n){return this instanceof de?(this.h=+e,this.s=+t,void(this.l=+n)):arguments.length<2?e instanceof de?new de(e.h,e.s,e.l):Ae(""+e,Te,de):new de(e,t,n)}function he(e,t,n){function r(e){return e>360?e-=360:e<0&&(e+=360),e<60?o+(a-o)*e/60:e<180?a:e<240?o+(a-o)*(240-e)/60:o}function i(e){return Math.round(255*r(e))}var o,a;return e=isNaN(e)?0:(e%=360)<0?e+360:e,t=isNaN(t)?0:t<0?0:t>1?1:t,n=n<0?0:n>1?1:n,a=n<=.5?n*(1+t):n+t-n*t,o=2*n-a,new ke(i(e+120),i(e),i(e-120))}function pe(e,t,n){return this instanceof pe?(this.h=+e,this.c=+t,void(this.l=+n)):arguments.length<2?e instanceof pe?new pe(e.h,e.c,e.l):e instanceof ge?ve(e.l,e.a,e.b):ve((e=Ee((e=ha.rgb(e)).r,e.g,e.b)).l,e.a,e.b):new pe(e,t,n)}function me(e,t,n){return isNaN(e)&&(e=0),isNaN(t)&&(t=0),new ge(n,Math.cos(e*=Ya)*t,Math.sin(e)*t)}function ge(e,t,n){return this instanceof ge?(this.l=+e,this.a=+t,void(this.b=+n)):arguments.length<2?e instanceof ge?new ge(e.l,e.a,e.b):e instanceof pe?me(e.h,e.c,e.l):Ee((e=ke(e)).r,e.g,e.b):new ge(e,t,n)}function be(e,t,n){var r=(e+16)/116,i=r+t/500,o=r-n/200;return i=ye(i)*rs,r=ye(r)*is,o=ye(o)*os,new ke(xe(3.2404542*i-1.5371385*r-.4985314*o),xe(-.969266*i+1.8760108*r+.041556*o),xe(.0556434*i-.2040259*r+1.0572252*o))}function ve(e,t,n){return e>0?new pe(Math.atan2(n,t)*Xa,Math.sqrt(t*t+n*n),e):new pe(NaN,NaN,e)}function ye(e){return e>.206893034?e*e*e:(e-4/29)/7.787037}function we(e){return e>.008856?Math.pow(e,1/3):7.787037*e+4/29}function xe(e){return Math.round(255*(e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055))}function ke(e,t,n){return this instanceof ke?(this.r=~~e,this.g=~~t,void(this.b=~~n)):arguments.length<2?e instanceof ke?new ke(e.r,e.g,e.b):Ae(""+e,ke,he):new ke(e,t,n)}function _e(e){return new ke(e>>16,e>>8&255,255&e)}function Fe(e){return _e(e)+""}function Ce(e){return e<16?"0"+Math.max(0,e).toString(16):Math.min(255,e).toString(16)}function Ae(e,t,n){var r,i,o,a=0,s=0,l=0;if(r=/([a-z]+)\((.*)\)/.exec(e=e.toLowerCase()))switch(i=r[2].split(","),r[1]){case"hsl":return n(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return t(Oe(i[0]),Oe(i[1]),Oe(i[2]))}return(o=ls.get(e))?t(o.r,o.g,o.b):(null==e||"#"!==e.charAt(0)||isNaN(o=parseInt(e.slice(1),16))||(4===e.length?(a=(3840&o)>>4,a|=a>>4,s=240&o,s|=s>>4,l=15&o,l|=l<<4):7===e.length&&(a=(16711680&o)>>16,s=(65280&o)>>8,l=255&o)),t(a,s,l))}function Te(e,t,n){var r,i,o=Math.min(e/=255,t/=255,n/=255),a=Math.max(e,t,n),s=a-o,l=(a+o)/2;return s?(i=l<.5?s/(a+o):s/(2-a-o),r=e==a?(t-n)/s+(t0&&l<1?0:r),new de(r,i,l)}function Ee(e,t,n){e=Se(e),t=Se(t),n=Se(n);var r=we((.4124564*e+.3575761*t+.1804375*n)/rs),i=we((.2126729*e+.7151522*t+.072175*n)/is),o=we((.0193339*e+.119192*t+.9503041*n)/os);return ge(116*i-16,500*(r-i),200*(i-o))}function Se(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Oe(e){var t=parseFloat(e);return"%"===e.charAt(e.length-1)?Math.round(2.55*t):t}function Me(e){return"function"==typeof e?e:function(){return e}}function qe(e){return function(t,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=null),De(t,n,e,r)}}function De(e,t,n,r){function i(){var e,t=l.status;if(!t&&Pe(l)||t>=200&&t<300||304===t){try{e=n.call(o,l)}catch(e){return void a.error.call(o,e)}a.load.call(o,e)}else a.error.call(o,l)}var o={},a=ha.dispatch("beforesend","progress","load","error"),s={},l=new XMLHttpRequest,c=null;return!this.XDomainRequest||"withCredentials"in l||!/^(http(s)?:)?\/\//.test(e)||(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=i:l.onreadystatechange=function(){l.readyState>3&&i()},l.onprogress=function(e){var t=ha.event;ha.event=e;try{a.progress.call(o,l)}finally{ha.event=t}},o.header=function(e,t){return e=(e+"").toLowerCase(),arguments.length<2?s[e]:(null==t?delete s[e]:s[e]=t+"",o)},o.mimeType=function(e){return arguments.length?(t=null==e?null:e+"",o):t},o.responseType=function(e){return arguments.length?(c=e,o):c},o.response=function(e){return n=e,o},["get","post"].forEach(function(e){o[e]=function(){return o.send.apply(o,[e].concat(ma(arguments)))}}),o.send=function(n,r,i){if(2===arguments.length&&"function"==typeof r&&(i=r,r=null),l.open(n,e,!0),null==t||"accept"in s||(s.accept=t+",*/*"),l.setRequestHeader)for(var u in s)l.setRequestHeader(u,s[u]);return null!=t&&l.overrideMimeType&&l.overrideMimeType(t),null!=c&&(l.responseType=c),null!=i&&o.on("error",i).on("load",function(e){i(null,e)}),a.beforesend.call(o,l),l.send(null==r?null:r),o},o.abort=function(){return l.abort(),o},ha.rebind(o,a,"on"),null==r?o:o.get(ze(r))}function ze(e){return 1===e.length?function(t,n){e(null==t?n:null)}:e}function Pe(e){var t=e.responseType;return t&&"text"!==t?e.response:e.responseText}function Re(e,t,n){var r=arguments.length;r<2&&(t=0),r<3&&(n=Date.now());var i=n+t,o={c:e,t:i,n:null};return us?us.n=o:cs=o,us=o,fs||(ds=clearTimeout(ds),fs=1,hs(Ne)),o}function Ne(){var e=Ie(),t=je()-e;t>24?(isFinite(t)&&(clearTimeout(ds),ds=setTimeout(Ne,t)),fs=0):(fs=1,hs(Ne))}function Ie(){for(var e=Date.now(),t=cs;t;)e>=t.t&&t.c(e-t.t)&&(t.c=null),t=t.n;return e}function je(){for(var e,t=cs,n=1/0;t;)t.c?(t.t8?function(e){return e/n}:function(e){return e*n},symbol:e}}function Le(e){var t=e.decimal,n=e.thousands,r=e.grouping,i=e.currency,o=r&&n?function(e,t){for(var i=e.length,o=[],a=0,s=r[0],l=0;i>0&&s>0&&(l+s+1>t&&(s=Math.max(1,t-l)),o.push(e.substring(i-=s,i+s)),!((l+=s+1)>t));)s=r[a=(a+1)%r.length];return o.reverse().join(n)}:_;return function(e){var n=ms.exec(e),r=n[1]||" ",a=n[2]||">",s=n[3]||"-",l=n[4]||"",c=n[5],u=+n[6],f=n[7],d=n[8],h=n[9],p=1,m="",g="",b=!1,v=!0;switch(d&&(d=+d.substring(1)),(c||"0"===r&&"="===a)&&(c=r="0",a="="),h){case"n":f=!0,h="g";break;case"%":p=100,g="%",h="f";break;case"p":p=100,g="%",h="r";break;case"b":case"o":case"x":case"X":"#"===l&&(m="0"+h.toLowerCase());case"c":v=!1;case"d":b=!0,d=0;break;case"s":p=-1,h="r"}"$"===l&&(m=i[0],g=i[1]),"r"!=h||d||(h="g"),null!=d&&("g"==h?d=Math.max(1,Math.min(21,d)):"e"!=h&&"f"!=h||(d=Math.max(0,Math.min(20,d)))),h=gs.get(h)||He;var y=c&&f;return function(e){var n=g;if(b&&e%1)return"";var i=e<0||0===e&&1/e<0?(e=-e,"-"):"-"===s?"":s;if(p<0){var l=ha.formatPrefix(e,d);e=l.scale(e),n=l.symbol+g}else e*=p;e=h(e,d);var w,x,k=e.lastIndexOf(".");if(k<0){var _=v?e.lastIndexOf("e"):-1;_<0?(w=e,x=""):(w=e.substring(0,_),x=e.substring(_))}else w=e.substring(0,k),x=t+e.substring(k+1);!c&&f&&(w=o(w,1/0));var F=m.length+w.length+x.length+(y?0:i.length),C=F"===a?C+i+e:"^"===a?C.substring(0,F>>=1)+i+e+C.substring(F):i+(y?e:C+e))+n}}}function He(e){return e+""}function Ue(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function We(e,t,n){function r(t){var n=e(t),r=o(n,1);return t-n1)for(;a=c)return-1;if(i=t.charCodeAt(s++),37===i){if(a=t.charAt(s++),o=S[a in ws?t.charAt(s++):a],!o||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}function r(e,t,n){k.lastIndex=0;var r=k.exec(t.slice(n));return r?(e.w=_.get(r[0].toLowerCase()),n+r[0].length):-1}function i(e,t,n){w.lastIndex=0;var r=w.exec(t.slice(n));return r?(e.w=x.get(r[0].toLowerCase()),n+r[0].length):-1}function o(e,t,n){A.lastIndex=0;var r=A.exec(t.slice(n));return r?(e.m=T.get(r[0].toLowerCase()),n+r[0].length):-1}function a(e,t,n){F.lastIndex=0;var r=F.exec(t.slice(n));return r?(e.m=C.get(r[0].toLowerCase()),n+r[0].length):-1}function s(e,t,r){return n(e,E.c.toString(),t,r)}function l(e,t,r){return n(e,E.x.toString(),t,r)}function c(e,t,r){return n(e,E.X.toString(),t,r)}function u(e,t,n){var r=y.get(t.slice(n,n+=2).toLowerCase());return null==r?-1:(e.p=r,n)}var f=e.dateTime,d=e.date,h=e.time,p=e.periods,m=e.days,g=e.shortDays,b=e.months,v=e.shortMonths;t.utc=function(e){function n(e){try{vs=Ue;var t=new vs;return t._=e,r(t)}finally{vs=Date}}var r=t(e);return n.parse=function(e){try{vs=Ue;var t=r.parse(e);return t&&t._}finally{vs=Date}},n.toString=r.toString,n},t.multi=t.utc.multi=ht;var y=ha.map(),w=Ge(m),x=Ke(m),k=Ge(g),_=Ke(g),F=Ge(b),C=Ke(b),A=Ge(v),T=Ke(v);p.forEach(function(e,t){y.set(e.toLowerCase(),t)});var E={a:function(e){return g[e.getDay()]},A:function(e){return m[e.getDay()]},b:function(e){return v[e.getMonth()]},B:function(e){return b[e.getMonth()]},c:t(f),d:function(e,t){return Ve(e.getDate(),t,2)},e:function(e,t){return Ve(e.getDate(),t,2)},H:function(e,t){return Ve(e.getHours(),t,2)},I:function(e,t){return Ve(e.getHours()%12||12,t,2)},j:function(e,t){return Ve(1+bs.dayOfYear(e),t,3)},L:function(e,t){return Ve(e.getMilliseconds(),t,3)},m:function(e,t){return Ve(e.getMonth()+1,t,2)},M:function(e,t){return Ve(e.getMinutes(),t,2)},p:function(e){return p[+(e.getHours()>=12)]},S:function(e,t){return Ve(e.getSeconds(),t,2)},U:function(e,t){return Ve(bs.sundayOfYear(e),t,2)},w:function(e){ -return e.getDay()},W:function(e,t){return Ve(bs.mondayOfYear(e),t,2)},x:t(d),X:t(h),y:function(e,t){return Ve(e.getFullYear()%100,t,2)},Y:function(e,t){return Ve(e.getFullYear()%1e4,t,4)},Z:ft,"%":function(){return"%"}},S={a:r,A:i,b:o,B:a,c:s,d:ot,e:ot,H:st,I:st,j:at,L:ut,m:it,M:lt,p:u,S:ct,U:Ze,w:Je,W:Qe,x:l,X:c,y:tt,Y:et,Z:nt,"%":dt};return t}function Ve(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o68?1900:2e3)}function it(e,t,n){xs.lastIndex=0;var r=xs.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function ot(e,t,n){xs.lastIndex=0;var r=xs.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function at(e,t,n){xs.lastIndex=0;var r=xs.exec(t.slice(n,n+3));return r?(e.j=+r[0],n+r[0].length):-1}function st(e,t,n){xs.lastIndex=0;var r=xs.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function lt(e,t,n){xs.lastIndex=0;var r=xs.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function ct(e,t,n){xs.lastIndex=0;var r=xs.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function ut(e,t,n){xs.lastIndex=0;var r=xs.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function ft(e){var t=e.getTimezoneOffset(),n=t>0?"-":"+",r=_a(t)/60|0,i=_a(t)%60;return n+Ve(r,"0",2)+Ve(i,"0",2)}function dt(e,t,n){ks.lastIndex=0;var r=ks.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function ht(e){for(var t=e.length,n=-1;++n=0?1:-1,s=a*n,l=Math.cos(t),c=Math.sin(t),u=o*c,f=i*l+u*Math.cos(s),d=u*a*Math.sin(s);Es.add(Math.atan2(d,f)),r=e,i=l,o=c}var t,n,r,i,o;Ss.point=function(a,s){Ss.point=e,r=(t=a)*Ya,i=Math.cos(s=(n=s)*Ya/2+La/4),o=Math.sin(s)},Ss.lineEnd=function(){e(t,n)}}function wt(e){var t=e[0],n=e[1],r=Math.cos(n);return[r*Math.cos(t),r*Math.sin(t),Math.sin(n)]}function xt(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function kt(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function _t(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function Ft(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function Ct(e){var t=Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}function At(e){return[Math.atan2(e[1],e[0]),ae(e[2])]}function Tt(e,t){return _a(e[0]-t[0])=0;--s)i.point((f=u[s])[0],f[1])}else r(h.x,h.p.x,-1,i);h=h.p}h=h.o,u=h.z,p=!p}while(!h.v);i.lineEnd()}}}function Rt(e){if(t=e.length){for(var t,n,r=0,i=e[0];++r0){for(x||(o.polygonStart(),x=!0),o.lineStart();++a1&&2&t&&n.push(n.pop().concat(n.shift())),h.push(n.filter(jt))}var h,p,m,g=t(o),b=i.invert(r[0],r[1]),v={point:a,lineStart:l,lineEnd:c,polygonStart:function(){v.point=u,v.lineStart=f,v.lineEnd=d,h=[],p=[]},polygonEnd:function(){v.point=a,v.lineStart=l,v.lineEnd=c,h=ha.merge(h);var e=Wt(b,p);h.length?(x||(o.polygonStart(),x=!0),Pt(h,$t,e,n,o)):e&&(x||(o.polygonStart(),x=!0),o.lineStart(),n(null,null,1,o),o.lineEnd()),x&&(o.polygonEnd(),x=!1),h=p=null},sphere:function(){o.polygonStart(),o.lineStart(),n(null,null,1,o),o.lineEnd(),o.polygonEnd()}},y=Bt(),w=t(y),x=!1;return v}}function jt(e){return e.length>1}function Bt(){var e,t=[];return{lineStart:function(){t.push(e=[])},point:function(t,n){e.push([t,n])},lineEnd:A,buffer:function(){var n=t;return t=[],e=null,n},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function $t(e,t){return((e=e.x)[0]<0?e[1]-Wa-Ba:Wa-e[1])-((t=t.x)[0]<0?t[1]-Wa-Ba:Wa-t[1])}function Lt(e){var t,n=NaN,r=NaN,i=NaN;return{lineStart:function(){e.lineStart(),t=1},point:function(o,a){var s=o>0?La:-La,l=_a(o-n);_a(l-La)0?Wa:-Wa),e.point(i,r),e.lineEnd(),e.lineStart(),e.point(s,r),e.point(o,r),t=0):i!==s&&l>=La&&(_a(n-i)Ba?Math.atan((Math.sin(t)*(o=Math.cos(r))*Math.sin(n)-Math.sin(r)*(i=Math.cos(t))*Math.sin(e))/(i*o*a)):(t+r)/2}function Ut(e,t,n,r){var i;if(null==e)i=n*Wa,r.point(-La,i),r.point(0,i),r.point(La,i),r.point(La,0),r.point(La,-i),r.point(0,-i),r.point(-La,-i),r.point(-La,0),r.point(-La,i);else if(_a(e[0]-t[0])>Ba){var o=e[0]=0?1:-1,_=k*x,F=_>La,C=p*y;if(Es.add(Math.atan2(C*k*Math.sin(_),m*w+C*Math.cos(_))),o+=F?x+k*Ha:x,F^d>=n^b>=n){var A=kt(wt(f),wt(e));Ct(A);var T=kt(i,A);Ct(T);var E=(F^x>=0?-1:1)*ae(T[2]);(r>E||r===E&&(A[0]||A[1]))&&(a+=F^x>=0?1:-1)}if(!g++)break;d=b,p=y,m=w,f=e}}return(o<-Ba||oo}function n(e){var n,o,l,c,u;return{lineStart:function(){c=l=!1,u=1},point:function(f,d){var h,p=[f,d],m=t(f,d),g=a?m?0:i(f,d):m?i(f+(f<0?La:-La),d):0;if(!n&&(c=l=m)&&e.lineStart(),m!==l&&(h=r(n,p),(Tt(n,h)||Tt(p,h))&&(p[0]+=Ba,p[1]+=Ba,m=t(p[0],p[1]))),m!==l)u=0,m?(e.lineStart(),h=r(p,n),e.point(h[0],h[1])):(h=r(n,p),e.point(h[0],h[1]),e.lineEnd()),n=h;else if(s&&n&&a^m){var b;g&o||!(b=r(p,n,!0))||(u=0,a?(e.lineStart(),e.point(b[0][0],b[0][1]),e.point(b[1][0],b[1][1]),e.lineEnd()):(e.point(b[1][0],b[1][1]),e.lineEnd(),e.lineStart(),e.point(b[0][0],b[0][1])))}!m||n&&Tt(n,p)||e.point(p[0],p[1]),n=p,l=m,o=g},lineEnd:function(){l&&e.lineEnd(),n=null},clean:function(){return u|(c&&l)<<1}}}function r(e,t,n){var r=wt(e),i=wt(t),a=[1,0,0],s=kt(r,i),l=xt(s,s),c=s[0],u=l-c*c;if(!u)return!n&&e;var f=o*l/u,d=-o*c/u,h=kt(a,s),p=Ft(a,f),m=Ft(s,d);_t(p,m);var g=h,b=xt(p,g),v=xt(g,g),y=b*b-v*(xt(p,p)-1);if(!(y<0)){var w=Math.sqrt(y),x=Ft(g,(-b-w)/v);if(_t(x,p),x=At(x),!n)return x;var k,_=e[0],F=t[0],C=e[1],A=t[1];F<_&&(k=_,_=F,F=k);var T=F-_,E=_a(T-La)0^x[1]<(_a(x[0]-_)La^(_<=x[0]&&x[0]<=F)){var O=Ft(g,(-b+w)/v);return _t(O,p),[x,At(O)]}}}function i(t,n){var r=a?e:La-e,i=0;return t<-r?i|=1:t>r&&(i|=2),n<-r?i|=4:n>r&&(i|=8),i}var o=Math.cos(e),a=o>0,s=_a(o)>Ba,l=wn(e,6*Ya);return It(t,n,l,a?[0,-e]:[-La,e-La])}function Xt(e,t,n,r){return function(i){var o,a=i.a,s=i.b,l=a.x,c=a.y,u=s.x,f=s.y,d=0,h=1,p=u-l,m=f-c;if(o=e-l,p||!(o>0)){if(o/=p,p<0){if(o0){if(o>h)return;o>d&&(d=o)}if(o=n-l,p||!(o<0)){if(o/=p,p<0){if(o>h)return;o>d&&(d=o)}else if(p>0){if(o0)){if(o/=m,m<0){if(o0){if(o>h)return;o>d&&(d=o)}if(o=r-c,m||!(o<0)){if(o/=m,m<0){if(o>h)return;o>d&&(d=o)}else if(m>0){if(o0&&(i.a={x:l+d*p,y:c+d*m}),h<1&&(i.b={x:l+h*p,y:c+h*m}),i}}}}}}function Vt(e,t,n,r){function i(r,i){return _a(r[0]-e)0?0:3:_a(r[0]-n)0?2:1:_a(r[1]-t)0?1:0:i>0?3:2}function o(e,t){return a(e.x,t.x)}function a(e,t){var n=i(e,1),r=i(t,1);return n!==r?n-r:0===n?t[1]-e[1]:1===n?e[0]-t[0]:2===n?e[1]-t[1]:t[0]-e[0]}return function(s){function l(e){for(var t=0,n=g.length,r=e[1],i=0;ir&&ie(c,o,e)>0&&++t:o[1]<=r&&ie(c,o,e)<0&&--t,c=o;return 0!==t}function c(o,s,l,c){var u=0,f=0;if(null==o||(u=i(o,l))!==(f=i(s,l))||a(o,s)<0^l>0){do c.point(0===u||3===u?e:n,u>1?r:t);while((u=(u+l+4)%4)!==f)}else c.point(s[0],s[1])}function u(i,o){return e<=i&&i<=n&&t<=o&&o<=r}function f(e,t){u(e,t)&&s.point(e,t)}function d(){S.point=p,g&&g.push(b=[]),F=!0,_=!1,x=k=NaN}function h(){m&&(p(v,y),w&&_&&T.rejoin(),m.push(T.buffer())),S.point=f,_&&s.lineEnd()}function p(e,t){e=Math.max(-Hs,Math.min(Hs,e)),t=Math.max(-Hs,Math.min(Hs,t));var n=u(e,t);if(g&&b.push([e,t]),F)v=e,y=t,w=n,F=!1,n&&(s.lineStart(),s.point(e,t));else if(n&&_)s.point(e,t);else{var r={a:{x:x,y:k},b:{x:e,y:t}};E(r)?(_||(s.lineStart(),s.point(r.a.x,r.a.y)),s.point(r.b.x,r.b.y),n||s.lineEnd(),C=!1):n&&(s.lineStart(),s.point(e,t),C=!1)}x=e,k=t,_=n}var m,g,b,v,y,w,x,k,_,F,C,A=s,T=Bt(),E=Xt(e,t,n,r),S={point:f,lineStart:d,lineEnd:h,polygonStart:function(){s=T,m=[],g=[],C=!0},polygonEnd:function(){s=A,m=ha.merge(m);var t=l([e,r]),n=C&&t,i=m.length;(n||i)&&(s.polygonStart(),n&&(s.lineStart(),c(null,null,1,s),s.lineEnd()),i&&Pt(m,o,t,c,s),s.polygonEnd()),m=g=b=null}};return S}}function Gt(e){var t=0,n=La/3,r=dn(e),i=r(t,n);return i.parallels=function(e){return arguments.length?r(t=e[0]*La/180,n=e[1]*La/180):[t/La*180,n/La*180]},i}function Kt(e,t){function n(e,t){var n=Math.sqrt(o-2*i*Math.sin(t))/i;return[n*Math.sin(e*=i),a-n*Math.cos(e)]}var r=Math.sin(e),i=(r+Math.sin(t))/2,o=1+r*(2*i-r),a=Math.sqrt(o)/i;return n.invert=function(e,t){var n=a-t;return[Math.atan2(e,n)/i,ae((o-(e*e+n*n)*i*i)/(2*i))]},n}function Jt(){function e(e,t){Ws+=i*e-r*t,r=e,i=t}var t,n,r,i;Ks.point=function(o,a){Ks.point=e,t=r=o,n=i=a},Ks.lineEnd=function(){e(t,n)}}function Zt(e,t){eVs&&(Vs=e),tGs&&(Gs=t)}function Qt(){function e(e,t){a.push("M",e,",",t,o)}function t(e,t){a.push("M",e,",",t),s.point=n}function n(e,t){a.push("L",e,",",t)}function r(){s.point=e}function i(){a.push("Z")}var o=en(4.5),a=[],s={point:e,lineStart:function(){s.point=t},lineEnd:r,polygonStart:function(){s.lineEnd=i},polygonEnd:function(){s.lineEnd=r,s.point=e},pointRadius:function(e){return o=en(e),s},result:function(){if(a.length){var e=a.join("");return a=[],e}}};return s}function en(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}function tn(e,t){qs+=e,Ds+=t,++zs}function nn(){function e(e,r){var i=e-t,o=r-n,a=Math.sqrt(i*i+o*o);Ps+=a*(t+e)/2,Rs+=a*(n+r)/2,Ns+=a,tn(t=e,n=r)}var t,n;Zs.point=function(r,i){Zs.point=e,tn(t=r,n=i)}}function rn(){Zs.point=tn}function on(){function e(e,t){var n=e-r,o=t-i,a=Math.sqrt(n*n+o*o);Ps+=a*(r+e)/2,Rs+=a*(i+t)/2,Ns+=a,a=i*e-r*t,Is+=a*(r+e),js+=a*(i+t),Bs+=3*a,tn(r=e,i=t)}var t,n,r,i;Zs.point=function(o,a){Zs.point=e,tn(t=r=o,n=i=a)},Zs.lineEnd=function(){e(t,n)}}function an(e){function t(t,n){e.moveTo(t+a,n),e.arc(t,n,a,0,Ha)}function n(t,n){e.moveTo(t,n),s.point=r}function r(t,n){e.lineTo(t,n)}function i(){s.point=t}function o(){e.closePath()}var a=4.5,s={point:t,lineStart:function(){s.point=n},lineEnd:i,polygonStart:function(){s.lineEnd=o},polygonEnd:function(){s.lineEnd=i,s.point=t},pointRadius:function(e){return a=e,s},result:A};return s}function sn(e){function t(e){return(s?r:n)(e)}function n(t){return un(t,function(n,r){n=e(n,r),t.point(n[0],n[1])})}function r(t){function n(n,r){n=e(n,r),t.point(n[0],n[1])}function r(){y=NaN,F.point=o,t.lineStart()}function o(n,r){var o=wt([n,r]),a=e(n,r);i(y,w,v,x,k,_,y=a[0],w=a[1],v=n,x=o[0],k=o[1],_=o[2],s,t),t.point(y,w)}function a(){F.point=n,t.lineEnd()}function l(){r(),F.point=c,F.lineEnd=u}function c(e,t){o(f=e,d=t),h=y,p=w,m=x,g=k,b=_,F.point=o}function u(){i(y,w,v,x,k,_,h,p,f,m,g,b,s,t),F.lineEnd=a,a()}var f,d,h,p,m,g,b,v,y,w,x,k,_,F={point:n,lineStart:r,lineEnd:a,polygonStart:function(){t.polygonStart(),F.lineStart=l},polygonEnd:function(){t.polygonEnd(),F.lineStart=r}};return F}function i(t,n,r,s,l,c,u,f,d,h,p,m,g,b){var v=u-t,y=f-n,w=v*v+y*y;if(w>4*o&&g--){var x=s+h,k=l+p,_=c+m,F=Math.sqrt(x*x+k*k+_*_),C=Math.asin(_/=F),A=_a(_a(_)-1)o||_a((v*O+y*M)/w-.5)>.3||s*h+l*p+c*m0&&16,t):Math.sqrt(o)},t}function ln(e){var t=sn(function(t,n){return e([t*Xa,n*Xa])});return function(e){return hn(t(e))}}function cn(e){this.stream=e}function un(e,t){return{point:t,sphere:function(){e.sphere()},lineStart:function(){e.lineStart()},lineEnd:function(){e.lineEnd()},polygonStart:function(){e.polygonStart()},polygonEnd:function(){e.polygonEnd()}}}function fn(e){return dn(function(){return e})()}function dn(e){function t(e){return e=s(e[0]*Ya,e[1]*Ya),[e[0]*d+l,c-e[1]*d]}function n(e){return e=s.invert((e[0]-l)/d,(c-e[1])/d),e&&[e[0]*Xa,e[1]*Xa]}function r(){s=Dt(a=gn(b,v,y),o);var e=o(m,g);return l=h-e[0]*d,c=p+e[1]*d,i()}function i(){return u&&(u.valid=!1,u=null),t}var o,a,s,l,c,u,f=sn(function(e,t){return e=o(e,t),[e[0]*d+l,c-e[1]*d]}),d=150,h=480,p=250,m=0,g=0,b=0,v=0,y=0,w=Ls,x=_,k=null,F=null;return t.stream=function(e){return u&&(u.valid=!1),u=hn(w(a,f(x(e)))),u.valid=!0,u},t.clipAngle=function(e){return arguments.length?(w=null==e?(k=e,Ls):Yt((k=+e)*Ya),i()):k},t.clipExtent=function(e){return arguments.length?(F=e,x=e?Vt(e[0][0],e[0][1],e[1][0],e[1][1]):_,i()):F},t.scale=function(e){return arguments.length?(d=+e,r()):d},t.translate=function(e){return arguments.length?(h=+e[0],p=+e[1],r()):[h,p]},t.center=function(e){return arguments.length?(m=e[0]%360*Ya,g=e[1]%360*Ya,r()):[m*Xa,g*Xa]},t.rotate=function(e){return arguments.length?(b=e[0]%360*Ya,v=e[1]%360*Ya,y=e.length>2?e[2]%360*Ya:0,r()):[b*Xa,v*Xa,y*Xa]},ha.rebind(t,f,"precision"),function(){return o=e.apply(this,arguments),t.invert=o.invert&&n,r()}}function hn(e){return un(e,function(t,n){e.point(t*Ya,n*Ya)})}function pn(e,t){return[e,t]}function mn(e,t){return[e>La?e-Ha:e<-La?e+Ha:e,t]}function gn(e,t,n){return e?t||n?Dt(vn(e),yn(t,n)):vn(e):t||n?yn(t,n):mn}function bn(e){return function(t,n){return t+=e,[t>La?t-Ha:t<-La?t+Ha:t,n]}}function vn(e){var t=bn(e);return t.invert=bn(-e),t}function yn(e,t){function n(e,t){var n=Math.cos(t),s=Math.cos(e)*n,l=Math.sin(e)*n,c=Math.sin(t),u=c*r+s*i;return[Math.atan2(l*o-u*a,s*r-c*i),ae(u*o+l*a)]}var r=Math.cos(e),i=Math.sin(e),o=Math.cos(t),a=Math.sin(t);return n.invert=function(e,t){var n=Math.cos(t),s=Math.cos(e)*n,l=Math.sin(e)*n,c=Math.sin(t),u=c*o-l*a;return[Math.atan2(l*o+c*a,s*r+u*i),ae(u*r-s*i)]},n}function wn(e,t){var n=Math.cos(e),r=Math.sin(e);return function(i,o,a,s){var l=a*t;null!=i?(i=xn(n,i),o=xn(n,o),(a>0?io)&&(i+=a*Ha)):(i=e+a*Ha,o=e-.5*l);for(var c,u=i;a>0?u>o:u0?t<-Wa+Ba&&(t=-Wa+Ba):t>Wa-Ba&&(t=Wa-Ba);var n=a/Math.pow(i(t),o);return[n*Math.sin(o*e),a-n*Math.cos(o*e)]}var r=Math.cos(e),i=function(e){return Math.tan(La/4+e/2)},o=e===t?Math.sin(e):Math.log(r/Math.cos(t))/Math.log(i(t)/i(e)),a=r*Math.pow(i(e),o)/o;return o?(n.invert=function(e,t){var n=a-t,r=re(o)*Math.sqrt(e*e+n*n);return[Math.atan2(e,n)/o,2*Math.atan(Math.pow(a/r,1/o))-Wa]},n):Mn}function On(e,t){function n(e,t){var n=o-t;return[n*Math.sin(i*e),o-n*Math.cos(i*e)]}var r=Math.cos(e),i=e===t?Math.sin(e):(r-Math.cos(t))/(t-e),o=r/i+e;return _a(i)1&&ie(e[n[r-2]],e[n[r-1]],e[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function Nn(e,t){return e[0]-t[0]||e[1]-t[1]}function In(e,t,n){return(n[0]-t[0])*(e[1]-t[1])<(n[1]-t[1])*(e[0]-t[0])}function jn(e,t,n,r){var i=e[0],o=n[0],a=t[0]-i,s=r[0]-o,l=e[1],c=n[1],u=t[1]-l,f=r[1]-c,d=(s*(l-c)-f*(i-o))/(f*a-s*u);return[i+d*a,l+d*u]}function Bn(e){var t=e[0],n=e[e.length-1];return!(t[0]-n[0]||t[1]-n[1])}function $n(){lr(this),this.edge=this.site=this.circle=null}function Ln(e){var t=dl.pop()||new $n;return t.site=e,t}function Hn(e){Qn(e),cl.remove(e),dl.push(e),lr(e)}function Un(e){var t=e.circle,n=t.x,r=t.cy,i={x:n,y:r},o=e.P,a=e.N,s=[e];Hn(e);for(var l=o;l.circle&&_a(n-l.circle.x)Ba)s=s.L;else{if(i=o-Xn(s,a),!(i>Ba)){r>-Ba?(t=s.P,n=s):i>-Ba?(t=s,n=s.N):t=n=s;break}if(!s.R){t=s;break}s=s.R}var l=Ln(e);if(cl.insert(t,l),t||n){if(t===n)return Qn(t),n=Ln(t.site),cl.insert(l,n),l.edge=n.edge=rr(t.site,l.site),Zn(t),void Zn(n);if(!n)return void(l.edge=rr(t.site,l.site));Qn(t),Qn(n);var c=t.site,u=c.x,f=c.y,d=e.x-u,h=e.y-f,p=n.site,m=p.x-u,g=p.y-f,b=2*(d*g-h*m),v=d*d+h*h,y=m*m+g*g,w={x:(g*v-h*y)/b+u,y:(d*y-m*v)/b+f};or(n.edge,c,p,w),l.edge=rr(c,e,null,w),n.edge=rr(e,p,null,w),Zn(t),Zn(n)}}function Yn(e,t){var n=e.site,r=n.x,i=n.y,o=i-t;if(!o)return r;var a=e.P;if(!a)return-(1/0);n=a.site;var s=n.x,l=n.y,c=l-t;if(!c)return s;var u=s-r,f=1/o-1/c,d=u/c;return f?(-d+Math.sqrt(d*d-2*f*(u*u/(-2*c)-l+c/2+i-o/2)))/f+r:(r+s)/2}function Xn(e,t){var n=e.N;if(n)return Yn(n,t);var r=e.site;return r.y===t?r.x:1/0}function Vn(e){this.site=e,this.edges=[]}function Gn(e){for(var t,n,r,i,o,a,s,l,c,u,f=e[0][0],d=e[1][0],h=e[0][1],p=e[1][1],m=ll,g=m.length;g--;)if(o=m[g],o&&o.prepare())for(s=o.edges,l=s.length,a=0;aBa||_a(i-n)>Ba)&&(s.splice(a,0,new ar(ir(o.site,u,_a(r-f)Ba?{x:f,y:_a(t-f)Ba?{x:_a(n-p)Ba?{x:d,y:_a(t-d)Ba?{x:_a(n-h)=-$a)){var h=l*l+c*c,p=u*u+f*f,m=(f*h-c*p)/d,g=(l*p-u*h)/d,f=g+s,b=hl.pop()||new Jn;b.arc=e,b.site=i,b.x=m+a,b.y=f+Math.sqrt(m*m+g*g),b.cy=f,e.circle=b;for(var v=null,y=fl._;y;)if(b.y=s)return;if(d>p){if(o){if(o.y>=c)return}else o={x:g,y:l};n={x:g,y:c}}else{if(o){if(o.y1)if(d>p){if(o){if(o.y>=c)return}else o={x:(l-i)/r,y:l};n={x:(c-i)/r,y:c}}else{if(o){if(o.y=s)return}else o={x:a,y:r*a+i};n={x:s,y:r*s+i}}else{if(o){if(o.xo||f>a||d=w,_=n>=x,F=_<<1|k,C=F+4;Fo&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:kr(n,r)})),o=gl.lastIndex;return o=0&&!(n=ha.interpolators[r](e,t)););return n}function Cr(e,t){var n,r=[],i=[],o=e.length,a=t.length,s=Math.min(e.length,t.length);for(n=0;n=1?1:e(t)}}function Tr(e){return function(t){return 1-e(1-t)}}function Er(e){return function(t){return.5*(t<.5?e(2*t):2-e(2-2*t))}}function Sr(e){return e*e}function Or(e){return e*e*e}function Mr(e){if(e<=0)return 0;if(e>=1)return 1;var t=e*e,n=t*e;return 4*(e<.5?n:3*(e-t)+n-.75)}function qr(e){return function(t){return Math.pow(t,e)}}function Dr(e){return 1-Math.cos(e*Wa)}function zr(e){return Math.pow(2,10*(e-1))}function Pr(e){return 1-Math.sqrt(1-e*e)}function Rr(e,t){var n;return arguments.length<2&&(t=.45),arguments.length?n=t/Ha*Math.asin(1/e):(e=1,n=t/4),function(r){return 1+e*Math.pow(2,-10*r)*Math.sin((r-n)*Ha/t)}}function Nr(e){return e||(e=1.70158),function(t){return t*t*((e+1)*t-e)}}function Ir(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}function jr(e,t){e=ha.hcl(e),t=ha.hcl(t);var n=e.h,r=e.c,i=e.l,o=t.h-n,a=t.c-r,s=t.l-i;return isNaN(a)&&(a=0,r=isNaN(r)?t.c:r),isNaN(o)?(o=0,n=isNaN(n)?t.h:n):o>180?o-=360:o<-180&&(o+=360),function(e){return me(n+o*e,r+a*e,i+s*e)+""}}function Br(e,t){e=ha.hsl(e),t=ha.hsl(t);var n=e.h,r=e.s,i=e.l,o=t.h-n,a=t.s-r,s=t.l-i;return isNaN(a)&&(a=0,r=isNaN(r)?t.s:r),isNaN(o)?(o=0,n=isNaN(n)?t.h:n):o>180?o-=360:o<-180&&(o+=360),function(e){return he(n+o*e,r+a*e,i+s*e)+""}}function $r(e,t){e=ha.lab(e),t=ha.lab(t);var n=e.l,r=e.a,i=e.b,o=t.l-n,a=t.a-r,s=t.b-i;return function(e){return be(n+o*e,r+a*e,i+s*e)+""}}function Lr(e,t){return t-=e,function(n){return Math.round(e+t*n)}}function Hr(e){var t=[e.a,e.b],n=[e.c,e.d],r=Wr(t),i=Ur(t,n),o=Wr(Yr(n,t,-i))||0;t[0]*n[1]180?t+=360:t-e>180&&(e+=360),r.push({i:n.push(Xr(n)+"rotate(",null,")")-2,x:kr(e,t)})):t&&n.push(Xr(n)+"rotate("+t+")")}function Kr(e,t,n,r){e!==t?r.push({i:n.push(Xr(n)+"skewX(",null,")")-2,x:kr(e,t)}):t&&n.push(Xr(n)+"skewX("+t+")")}function Jr(e,t,n,r){if(e[0]!==t[0]||e[1]!==t[1]){var i=n.push(Xr(n)+"scale(",null,",",null,")");r.push({i:i-4,x:kr(e[0],t[0])},{i:i-2,x:kr(e[1],t[1])})}else 1===t[0]&&1===t[1]||n.push(Xr(n)+"scale("+t+")")}function Zr(e,t){var n=[],r=[];return e=ha.transform(e),t=ha.transform(t),Vr(e.translate,t.translate,n,r),Gr(e.rotate,t.rotate,n,r),Kr(e.skew,t.skew,n,r),Jr(e.scale,t.scale,n,r),e=t=null,function(e){for(var t,i=-1,o=r.length;++i=0;)n.push(i[r]); -}function fi(e,t){for(var n=[e],r=[];null!=(e=n.pop());)if(r.push(e),(o=e.children)&&(i=o.length))for(var i,o,a=-1;++ai&&(r=n,i=t);return r}function ki(e){return e.reduce(_i,0)}function _i(e,t){return e+t[1]}function Fi(e,t){return Ci(e,Math.ceil(Math.log(t.length)/Math.LN2+1))}function Ci(e,t){for(var n=-1,r=+e[0],i=(e[1]-r)/t,o=[];++n<=t;)o[n]=i*n+r;return o}function Ai(e){return[ha.min(e),ha.max(e)]}function Ti(e,t){return e.value-t.value}function Ei(e,t){var n=e._pack_next;e._pack_next=t,t._pack_prev=e,t._pack_next=n,n._pack_prev=t}function Si(e,t){e._pack_next=t,t._pack_prev=e}function Oi(e,t){var n=t.x-e.x,r=t.y-e.y,i=e.r+t.r;return.999*i*i>n*n+r*r}function Mi(e){function t(e){u=Math.min(e.x-e.r,u),f=Math.max(e.x+e.r,f),d=Math.min(e.y-e.r,d),h=Math.max(e.y+e.r,h)}if((n=e.children)&&(c=n.length)){var n,r,i,o,a,s,l,c,u=1/0,f=-(1/0),d=1/0,h=-(1/0);if(n.forEach(qi),r=n[0],r.x=-r.r,r.y=0,t(r),c>1&&(i=n[1],i.x=i.r,i.y=0,t(i),c>2))for(o=n[2],Pi(r,i,o),t(o),Ei(r,o),r._pack_prev=o,Ei(o,i),i=r._pack_next,a=3;a=0;)t=i[o],t.z+=n,t.m+=n,n+=t.s+(r+=t.c)}function $i(e,t,n){return e.a.parent===t.parent?e.a:n}function Li(e){return 1+ha.max(e,function(e){return e.y})}function Hi(e){return e.reduce(function(e,t){return e+t.x},0)/e.length}function Ui(e){var t=e.children;return t&&t.length?Ui(t[0]):e}function Wi(e){var t,n=e.children;return n&&(t=n.length)?Wi(n[t-1]):e}function Yi(e){return{x:e.x,y:e.y,dx:e.dx,dy:e.dy}}function Xi(e,t){var n=e.x+t[3],r=e.y+t[0],i=e.dx-t[1]-t[3],o=e.dy-t[0]-t[2];return i<0&&(n+=i/2,i=0),o<0&&(r+=o/2,o=0),{x:n,y:r,dx:i,dy:o}}function Vi(e){var t=e[0],n=e[e.length-1];return t2?Qi:Ki,l=r?ei:Qr;return a=i(e,t,l,n),s=i(t,e,l,Fr),o}function o(e){return a(e)}var a,s;return o.invert=function(e){return s(e)},o.domain=function(t){return arguments.length?(e=t.map(Number),i()):e},o.range=function(e){return arguments.length?(t=e,i()):t},o.rangeRound=function(e){return o.range(e).interpolate(Lr)},o.clamp=function(e){return arguments.length?(r=e,i()):r},o.interpolate=function(e){return arguments.length?(n=e,i()):n},o.ticks=function(t){return io(e,t)},o.tickFormat=function(t,n){return oo(e,t,n)},o.nice=function(t){return no(e,t),i()},o.copy=function(){return eo(e,t,n,r)},i()}function to(e,t){return ha.rebind(e,t,"range","rangeRound","interpolate","clamp")}function no(e,t){return Ji(e,Zi(ro(e,t)[2])),Ji(e,Zi(ro(e,t)[2])),e}function ro(e,t){null==t&&(t=10);var n=Vi(e),r=n[1]-n[0],i=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),o=t/r*i;return o<=.15?i*=10:o<=.35?i*=5:o<=.75&&(i*=2),n[0]=Math.ceil(n[0]/i)*i,n[1]=Math.floor(n[1]/i)*i+.5*i,n[2]=i,n}function io(e,t){return ha.range.apply(ha,ro(e,t))}function oo(e,t,n){var r=ro(e,t);if(n){var i=ms.exec(n);if(i.shift(),"s"===i[8]){var o=ha.formatPrefix(Math.max(_a(r[0]),_a(r[1])));return i[7]||(i[7]="."+ao(o.scale(r[2]))),i[8]="f",n=ha.format(i.join("")),function(e){return n(o.scale(e))+o.symbol}}i[7]||(i[7]="."+so(i[8],r)),n=i.join("")}else n=",."+ao(r[2])+"f";return ha.format(n)}function ao(e){return-Math.floor(Math.log(e)/Math.LN10+.01)}function so(e,t){var n=ao(t[2]);return e in El?Math.abs(n-ao(Math.max(_a(t[0]),_a(t[1]))))+ +("e"!==e):n-2*("%"===e)}function lo(e,t,n,r){function i(e){return(n?Math.log(e<0?0:e):-Math.log(e>0?0:-e))/Math.log(t)}function o(e){return n?Math.pow(t,e):-Math.pow(t,-e)}function a(t){return e(i(t))}return a.invert=function(t){return o(e.invert(t))},a.domain=function(t){return arguments.length?(n=t[0]>=0,e.domain((r=t.map(Number)).map(i)),a):r},a.base=function(n){return arguments.length?(t=+n,e.domain(r.map(i)),a):t},a.nice=function(){var t=Ji(r.map(i),n?Math:Ol);return e.domain(t),r=t.map(o),a},a.ticks=function(){var e=Vi(r),a=[],s=e[0],l=e[1],c=Math.floor(i(s)),u=Math.ceil(i(l)),f=t%1?2:t;if(isFinite(u-c)){if(n){for(;c0;d--)a.push(o(c)*d);for(c=0;a[c]l;u--);a=a.slice(c,u)}return a},a.tickFormat=function(e,n){if(!arguments.length)return Sl;arguments.length<2?n=Sl:"function"!=typeof n&&(n=ha.format(n));var r=Math.max(1,t*e/a.ticks().length);return function(e){var a=e/o(Math.round(i(e)));return a*t0?i[n-1]:e[0],n0?0:1}function Fo(e,t,n,r,i){var o=e[0]-t[0],a=e[1]-t[1],s=(i?r:-r)/Math.sqrt(o*o+a*a),l=s*a,c=-s*o,u=e[0]+l,f=e[1]+c,d=t[0]+l,h=t[1]+c,p=(u+d)/2,m=(f+h)/2,g=d-u,b=h-f,v=g*g+b*b,y=n-r,w=u*h-d*f,x=(b<0?-1:1)*Math.sqrt(Math.max(0,y*y*v-w*w)),k=(w*b-g*x)/v,_=(-w*g-b*x)/v,F=(w*b+g*x)/v,C=(-w*g+b*x)/v,A=k-p,T=_-m,E=F-p,S=C-m;return A*A+T*T>E*E+S*S&&(k=F,_=C),[[k-l,_-c],[k*n/y,_*n/y]]}function Co(e){function t(t){function a(){c.push("M",o(e(u),s))}for(var l,c=[],u=[],f=-1,d=t.length,h=Me(n),p=Me(r);++f1?e.join("L"):e+"Z"}function To(e){return e.join("L")+"Z"}function Eo(e){for(var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];++t1&&i.push("H",r[0]),i.join("")}function So(e){for(var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];++t1){s=t[1],o=e[l],l++,r+="C"+(i[0]+a[0])+","+(i[1]+a[1])+","+(o[0]-s[0])+","+(o[1]-s[1])+","+o[0]+","+o[1];for(var c=2;c9&&(i=3*t/Math.sqrt(i),a[s]=i*n,a[s+1]=i*r));for(s=-1;++s<=l;)i=(e[Math.min(l,s+1)][0]-e[Math.max(0,s-1)][0])/(6*(1+a[s]*a[s])),o.push([i||0,a[s]*i||0]);return o}function Wo(e){return e.length<3?Ao(e):e[0]+zo(e,Uo(e))}function Yo(e){for(var t,n,r,i=-1,o=e.length;++i0;)d[--s].call(e,a);if(o>=1)return m.event&&m.event.end.call(e,e.__data__,t),--h.count?delete h[r]:delete e[n],1}var l,c,u,f,d,h=e[n]||(e[n]={active:0,count:0}),m=h[r];m||(l=i.time,c=Re(o,0,l),m=h[r]={tween:new p,time:l,timer:c,delay:i.delay,duration:i.duration,ease:i.ease,index:t},i=null,++h.count)}function aa(e,t,n){e.attr("transform",function(e){var r=t(e);return"translate("+(isFinite(r)?r:n(e))+",0)"})}function sa(e,t,n){e.attr("transform",function(e){var r=t(e);return"translate(0,"+(isFinite(r)?r:n(e))+")"})}function la(e){return e.toISOString()}function ca(e,t,n){function r(t){return e(t)}function i(e,n){var r=e[1]-e[0],i=r/n,o=ha.bisect(tc,i);return o==tc.length?[t.year,ro(e.map(function(e){return e/31536e6}),n)[2]]:o?t[i/tc[o-1]1?{floor:function(t){for(;n(t=e.floor(t));)t=ua(t-1);return t},ceil:function(t){for(;n(t=e.ceil(t));)t=ua(+t+1);return t}}:e))},r.ticks=function(e,t){var n=Vi(r.domain()),o=null==e?i(n,10):"number"==typeof e?i(n,e):!e.range&&[{range:e},t];return o&&(e=o[0],t=o[1]),e.range(n[0],ua(+n[1]+1),t<1?1:t)},r.tickFormat=function(){return n},r.copy=function(){return ca(e.copy(),t,n)},to(r,e)}function ua(e){return new Date(e)}function fa(e){return JSON.parse(e.responseText)}function da(e){var t=ga.createRange();return t.selectNode(ga.body),t.createContextualFragment(e.responseText)}var ha={version:"3.5.17"},pa=[].slice,ma=function(e){return pa.call(e)},ga=this.document;if(ga)try{ma(ga.documentElement.childNodes)[0].nodeType}catch(e){ma=function(e){for(var t=e.length,n=new Array(t);t--;)n[t]=e[t];return n}}if(Date.now||(Date.now=function(){return+new Date}),ga)try{ga.createElement("DIV").style.setProperty("opacity",0,"")}catch(e){var ba=this.Element.prototype,va=ba.setAttribute,ya=ba.setAttributeNS,wa=this.CSSStyleDeclaration.prototype,xa=wa.setProperty;ba.setAttribute=function(e,t){va.call(this,e,t+"")},ba.setAttributeNS=function(e,t,n){ya.call(this,e,t,n+"")},wa.setProperty=function(e,t,n){xa.call(this,e,t+"",n)}}ha.ascending=s,ha.descending=function(e,t){return te?1:t>=e?0:NaN},ha.min=function(e,t){var n,r,i=-1,o=e.length;if(1===arguments.length){for(;++i=r){n=r;break}for(;++ir&&(n=r)}else{for(;++i=r){n=r;break}for(;++ir&&(n=r)}return n},ha.max=function(e,t){var n,r,i=-1,o=e.length;if(1===arguments.length){for(;++i=r){n=r;break}for(;++in&&(n=r)}else{for(;++i=r){n=r;break}for(;++in&&(n=r)}return n},ha.extent=function(e,t){var n,r,i,o=-1,a=e.length;if(1===arguments.length){for(;++o=r){n=i=r;break}for(;++or&&(n=r),i=r){n=i=r;break}for(;++or&&(n=r),i1)return a/(u-1)},ha.deviation=function(){var e=ha.variance.apply(this,arguments);return e?Math.sqrt(e):e};var ka=u(s);ha.bisectLeft=ka.left,ha.bisect=ha.bisectRight=ka.right,ha.bisector=function(e){return u(1===e.length?function(t,n){return s(e(t),n)}:e)},ha.shuffle=function(e,t,n){(o=arguments.length)<3&&(n=e.length,o<2&&(t=0));for(var r,i,o=n-t;o;)i=Math.random()*o--|0,r=e[o+t],e[o+t]=e[i+t],e[i+t]=r;return e},ha.permute=function(e,t){for(var n=t.length,r=new Array(n);n--;)r[n]=e[t[n]];return r},ha.pairs=function(e){for(var t,n=0,r=e.length-1,i=e[0],o=new Array(r<0?0:r);n=0;)for(r=e[i],t=r.length;--t>=0;)n[--a]=r[t];return n};var _a=Math.abs;ha.range=function(e,t,n){if(arguments.length<3&&(n=1,arguments.length<2&&(t=e,e=0)),(t-e)/n===1/0)throw new Error("infinite range");var r,i=[],o=d(_a(n)),a=-1;if(e*=o,t*=o,n*=o,n<0)for(;(r=e+n*++a)>t;)i.push(r/o);else for(;(r=e+n*++a)=o.length)return r?r.call(i,a):n?a.sort(n):a;for(var l,c,u,f,d=-1,h=a.length,m=o[s++],g=new p;++d=o.length)return e;var r=[],i=a[n++];return e.forEach(function(e,i){r.push({key:e,values:t(i,n)})}),i?r.sort(function(e,t){return i(e.key,t.key)}):r}var n,r,i={},o=[],a=[];return i.map=function(t,n){return e(n,t,0)},i.entries=function(n){return t(e(ha.map,n,0),0)},i.key=function(e){return o.push(e),i},i.sortKeys=function(e){return a[o.length-1]=e,i},i.sortValues=function(e){return n=e,i},i.rollup=function(e){return r=e,i},i},ha.set=function(e){var t=new k;if(e)for(var n=0,r=e.length;n=0&&(r=e.slice(n+1),e=e.slice(0,n)),e)return arguments.length<2?this[e].on(r):this[e].on(r,t);if(2===arguments.length){if(null==t)for(e in this)this.hasOwnProperty(e)&&this[e].on(r,null);return this}},ha.event=null,ha.requote=function(e){return e.replace(Ta,"\\$&")};var Ta=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,Ea={}.__proto__?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)e[n]=t[n]},Sa=function(e,t){return t.querySelector(e)},Oa=function(e,t){return t.querySelectorAll(e)},Ma=function(e,t){var n=e.matches||e[C(e,"matchesSelector")];return(Ma=function(e,t){return n.call(e,t)})(e,t)};"function"==typeof Sizzle&&(Sa=function(e,t){return Sizzle(e,t)[0]||null},Oa=Sizzle,Ma=Sizzle.matchesSelector),ha.selection=function(){return ha.select(ga.documentElement)};var qa=ha.selection.prototype=[];qa.select=function(e){var t,n,r,i,o=[];e=D(e);for(var a=-1,s=this.length;++a=0&&"xmlns"!==(n=e.slice(0,t))&&(e=e.slice(t+1)),za.hasOwnProperty(n)?{space:za[n],local:e}:e}},qa.attr=function(e,t){if(arguments.length<2){if("string"==typeof e){var n=this.node();return e=ha.ns.qualify(e),e.local?n.getAttributeNS(e.space,e.local):n.getAttribute(e)}for(t in e)this.each(P(t,e[t]));return this}return this.each(P(e,t))},qa.classed=function(e,t){if(arguments.length<2){if("string"==typeof e){var n=this.node(),r=(e=I(e)).length,i=-1;if(t=n.classList){for(;++i=0;)(n=r[i])&&(o&&o!==n.nextSibling&&o.parentNode.insertBefore(n,o),o=n);return this},qa.sort=function(e){e=X.apply(this,arguments);for(var t=-1,n=this.length;++t0&&(t=t.transition().duration(T)),t.call(e.event)}function s(){x&&x.domain(w.range().map(function(e){return(e-F.x)/F.k}).map(w.invert)),_&&_.domain(k.range().map(function(e){return(e-F.y)/F.k}).map(k.invert))}function l(e){E++||e({type:"zoomstart"})}function c(e){s(),e({type:"zoom",scale:F.k,translate:[F.x,F.y]})}function u(e){--E||(e({type:"zoomend"}),g=null)}function f(){function e(){s=1,i(ha.mouse(r),d),c(o)}function n(){f.on(q,null).on(D,null),h(s),u(o)}var r=this,o=P.of(r,arguments),s=0,f=ha.select(a(r)).on(q,e).on(D,n),d=t(ha.mouse(r)),h=ee(r);Wl.call(r),l(o)}function d(){function e(){var e=ha.touches(p);return h=F.k,e.forEach(function(e){e.identifier in g&&(g[e.identifier]=t(e))}),e}function n(){var t=ha.event.target;ha.select(t).on(w,a).on(x,s),k.push(t);for(var n=ha.event.changedTouches,r=0,i=n.length;r1){var u=l[0],f=l[1],d=u[0]-f[0],h=u[1]-f[1];b=d*d+h*h}}function a(){var e,t,n,o,a=ha.touches(p);Wl.call(p);for(var s=0,l=a.length;s=c)return a;if(i)return i=!1,o;var t=u;if(34===e.charCodeAt(t)){for(var n=t;n++=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,gs=ha.map({b:function(e){return e.toString(2)},c:function(e){return String.fromCharCode(e)},o:function(e){return e.toString(8)},x:function(e){return e.toString(16)},X:function(e){return e.toString(16).toUpperCase()},g:function(e,t){return e.toPrecision(t)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},r:function(e,t){return(e=ha.round(e,Be(e,t))).toFixed(Math.max(0,Math.min(20,Be(e*(1+1e-15),t))))}}),bs=ha.time={},vs=Date;Ue.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){ys.setUTCDate.apply(this._,arguments)},setDay:function(){ys.setUTCDay.apply(this._,arguments)},setFullYear:function(){ys.setUTCFullYear.apply(this._,arguments)},setHours:function(){ys.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){ys.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){ys.setUTCMinutes.apply(this._,arguments)},setMonth:function(){ys.setUTCMonth.apply(this._,arguments)},setSeconds:function(){ys.setUTCSeconds.apply(this._,arguments)},setTime:function(){ys.setTime.apply(this._,arguments)}};var ys=Date.prototype;bs.year=We(function(e){return e=bs.day(e),e.setMonth(0,1),e},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e){return e.getFullYear()}),bs.years=bs.year.range,bs.years.utc=bs.year.utc.range,bs.day=We(function(e){var t=new vs(2e3,0);return t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t},function(e,t){e.setDate(e.getDate()+t)},function(e){return e.getDate()-1}),bs.days=bs.day.range,bs.days.utc=bs.day.utc.range,bs.dayOfYear=function(e){var t=bs.year(e);return Math.floor((e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(e,t){t=7-t;var n=bs[e]=We(function(e){return(e=bs.day(e)).setDate(e.getDate()-(e.getDay()+t)%7),e},function(e,t){e.setDate(e.getDate()+7*Math.floor(t))},function(e){var n=bs.year(e).getDay();return Math.floor((bs.dayOfYear(e)+(n+t)%7)/7)-(n!==t)});bs[e+"s"]=n.range,bs[e+"s"].utc=n.utc.range,bs[e+"OfYear"]=function(e){var n=bs.year(e).getDay();return Math.floor((bs.dayOfYear(e)+(n+t)%7)/7)}}),bs.week=bs.sunday,bs.weeks=bs.sunday.range,bs.weeks.utc=bs.sunday.utc.range,bs.weekOfYear=bs.sundayOfYear;var ws={"-":"",_:" ",0:"0"},xs=/^\s*\d+/,ks=/^%/;ha.locale=function(e){return{numberFormat:Le(e),timeFormat:Xe(e)}};var _s=ha.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});ha.format=_s.numberFormat,ha.geo={},pt.prototype={s:0,t:0,add:function(e){mt(e,this.t,Fs),mt(Fs.s,this.s,this),this.s?this.t+=Fs.t:this.s=Fs.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var Fs=new pt;ha.geo.stream=function(e,t){e&&Cs.hasOwnProperty(e.type)?Cs[e.type](e,t):gt(e,t)};var Cs={Feature:function(e,t){gt(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++rh&&(h=t)}function t(t,n){var r=wt([t*Ya,n*Ya]);if(b){var i=kt(b,r),o=[i[1],-i[0],0],a=kt(o,i);Ct(a),a=At(a);var l=t-p,c=l>0?1:-1,m=a[0]*Xa*c,g=_a(l)>180;if(g^(c*ph&&(h=v)}else if(m=(m+360)%360-180,g^(c*ph&&(h=n);g?ts(u,d)&&(d=t):s(t,d)>s(u,d)&&(u=t):d>=u?(td&&(d=t)):t>p?s(u,t)>s(u,d)&&(d=t):s(t,d)>s(u,d)&&(u=t)}else e(t,n);b=r,p=t}function n(){x.point=t}function r(){w[0]=u,w[1]=d,x.point=e,b=null}function i(e,n){if(b){var r=e-p;v+=_a(r)>180?r+(r>0?360:-360):r}else m=e,g=n;Ss.point(e,n),t(e,n)}function o(){Ss.lineStart()}function a(){i(m,g),Ss.lineEnd(),_a(v)>Ba&&(u=-(d=180)),w[0]=u,w[1]=d,b=null}function s(e,t){return(t-=e)<0?t+360:t}function l(e,t){return e[0]-t[0]}function c(e,t){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:eBa?h=90:v<-Ba&&(f=-90),w[0]=u,w[1]=d}};return function(e){h=d=-(u=f=1/0),y=[],ha.geo.stream(e,x);var t=y.length;if(t){y.sort(l);for(var n,r=1,i=y[0],o=[i];rs(i[0],i[1])&&(i[1]=n[1]),s(n[0],i[1])>s(i[0],i[1])&&(i[0]=n[0])):o.push(i=n);for(var a,n,p=-(1/0),t=o.length-1,r=0,i=o[t];r<=t;i=n,++r)n=o[r],(a=s(i[1],n[0]))>p&&(p=a,u=n[0],d=i[1])}return y=w=null,u===1/0||f===1/0?[[NaN,NaN],[NaN,NaN]]:[[u,f],[d,h]]}}(),ha.geo.centroid=function(e){Os=Ms=qs=Ds=zs=Ps=Rs=Ns=Is=js=Bs=0,ha.geo.stream(e,$s);var t=Is,n=js,r=Bs,i=t*t+n*n+r*r;return i<$a&&(t=Ps,n=Rs,r=Ns,Ms=.12&&i<.234&&r>=-.425&&r<-.214?a:i>=.166&&i<.234&&r>=-.214&&r<-.115?s:o).invert(e)},e.stream=function(e){var t=o.stream(e),n=a.stream(e),r=s.stream(e);return{point:function(e,i){t.point(e,i),n.point(e,i),r.point(e,i)},sphere:function(){t.sphere(),n.sphere(),r.sphere()},lineStart:function(){t.lineStart(),n.lineStart(),r.lineStart()},lineEnd:function(){t.lineEnd(),n.lineEnd(),r.lineEnd()},polygonStart:function(){t.polygonStart(),n.polygonStart(),r.polygonStart()},polygonEnd:function(){t.polygonEnd(),n.polygonEnd(),r.polygonEnd()}}},e.precision=function(t){return arguments.length?(o.precision(t),a.precision(t),s.precision(t),e):o.precision()},e.scale=function(t){return arguments.length?(o.scale(t),a.scale(.35*t),s.scale(t),e.translate(o.translate())):o.scale()},e.translate=function(t){if(!arguments.length)return o.translate();var c=o.scale(),u=+t[0],f=+t[1];return n=o.translate(t).clipExtent([[u-.455*c,f-.238*c],[u+.455*c,f+.238*c]]).stream(l).point,r=a.translate([u-.307*c,f+.201*c]).clipExtent([[u-.425*c+Ba,f+.12*c+Ba],[u-.214*c-Ba,f+.234*c-Ba]]).stream(l).point,i=s.translate([u-.205*c,f+.212*c]).clipExtent([[u-.214*c+Ba,f+.166*c+Ba],[u-.115*c-Ba,f+.234*c-Ba]]).stream(l).point,e},e.scale(1070)};var Us,Ws,Ys,Xs,Vs,Gs,Ks={point:A,lineStart:A,lineEnd:A,polygonStart:function(){Ws=0,Ks.lineStart=Jt},polygonEnd:function(){Ks.lineStart=Ks.lineEnd=Ks.point=A,Us+=_a(Ws/2)}},Js={point:Zt,lineStart:A,lineEnd:A,polygonStart:A,polygonEnd:A},Zs={point:tn,lineStart:nn,lineEnd:rn,polygonStart:function(){Zs.lineStart=on},polygonEnd:function(){Zs.point=tn,Zs.lineStart=nn,Zs.lineEnd=rn}};ha.geo.path=function(){function e(e){return e&&("function"==typeof s&&o.pointRadius(+s.apply(this,arguments)),a&&a.valid||(a=i(o)),ha.geo.stream(e,a)),o.result()}function t(){return a=null,e}var n,r,i,o,a,s=4.5;return e.area=function(e){return Us=0,ha.geo.stream(e,i(Ks)),Us},e.centroid=function(e){return qs=Ds=zs=Ps=Rs=Ns=Is=js=Bs=0,ha.geo.stream(e,i(Zs)),Bs?[Is/Bs,js/Bs]:Ns?[Ps/Ns,Rs/Ns]:zs?[qs/zs,Ds/zs]:[NaN,NaN]},e.bounds=function(e){return Vs=Gs=-(Ys=Xs=1/0),ha.geo.stream(e,i(Js)),[[Ys,Xs],[Vs,Gs]]},e.projection=function(e){return arguments.length?(i=(n=e)?e.stream||ln(e):_,t()):n},e.context=function(e){return arguments.length?(o=null==(r=e)?new Qt:new an(e),"function"!=typeof s&&o.pointRadius(s),t()):r},e.pointRadius=function(t){return arguments.length?(s="function"==typeof t?t:(o.pointRadius(+t),+t),e):s},e.projection(ha.geo.albersUsa()).context(null)},ha.geo.transform=function(e){return{stream:function(t){var n=new cn(t);for(var r in e)n[r]=e[r];return n}}},cn.prototype={point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},ha.geo.projection=fn,ha.geo.projectionMutator=dn,(ha.geo.equirectangular=function(){return fn(pn)}).raw=pn.invert=pn,ha.geo.rotation=function(e){function t(t){return t=e(t[0]*Ya,t[1]*Ya),t[0]*=Xa,t[1]*=Xa,t}return e=gn(e[0]%360*Ya,e[1]*Ya,e.length>2?e[2]*Ya:0),t.invert=function(t){return t=e.invert(t[0]*Ya,t[1]*Ya),t[0]*=Xa,t[1]*=Xa,t},t},mn.invert=pn,ha.geo.circle=function(){function e(){var e="function"==typeof r?r.apply(this,arguments):r,t=gn(-e[0]*Ya,-e[1]*Ya,0).invert,i=[];return n(null,null,1,{point:function(e,n){i.push(e=t(e,n)),e[0]*=Xa,e[1]*=Xa}}),{type:"Polygon",coordinates:[i]}}var t,n,r=[0,0],i=6;return e.origin=function(t){return arguments.length?(r=t,e):r},e.angle=function(r){return arguments.length?(n=wn((t=+r)*Ya,i*Ya),e):t},e.precision=function(r){return arguments.length?(n=wn(t*Ya,(i=+r)*Ya),e):i},e.angle(90)},ha.geo.distance=function(e,t){var n,r=(t[0]-e[0])*Ya,i=e[1]*Ya,o=t[1]*Ya,a=Math.sin(r),s=Math.cos(r),l=Math.sin(i),c=Math.cos(i),u=Math.sin(o),f=Math.cos(o);return Math.atan2(Math.sqrt((n=f*a)*n+(n=c*u-l*f*s)*n),l*u+c*f*s)},ha.geo.graticule=function(){function e(){return{type:"MultiLineString",coordinates:t()}}function t(){return ha.range(Math.ceil(o/g)*g,i,g).map(d).concat(ha.range(Math.ceil(c/b)*b,l,b).map(h)).concat(ha.range(Math.ceil(r/p)*p,n,p).filter(function(e){return _a(e%g)>Ba}).map(u)).concat(ha.range(Math.ceil(s/m)*m,a,m).filter(function(e){return _a(e%b)>Ba}).map(f))}var n,r,i,o,a,s,l,c,u,f,d,h,p=10,m=p,g=90,b=360,v=2.5;return e.lines=function(){return t().map(function(e){return{type:"LineString",coordinates:e}})},e.outline=function(){return{type:"Polygon",coordinates:[d(o).concat(h(l).slice(1),d(i).reverse().slice(1),h(c).reverse().slice(1))]}},e.extent=function(t){return arguments.length?e.majorExtent(t).minorExtent(t):e.minorExtent()},e.majorExtent=function(t){return arguments.length?(o=+t[0][0],i=+t[1][0],c=+t[0][1],l=+t[1][1],o>i&&(t=o,o=i,i=t),c>l&&(t=c,c=l,l=t),e.precision(v)):[[o,c],[i,l]]},e.minorExtent=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],s=+t[0][1],a=+t[1][1],r>n&&(t=r,r=n,n=t),s>a&&(t=s,s=a,a=t),e.precision(v)):[[r,s],[n,a]]},e.step=function(t){return arguments.length?e.majorStep(t).minorStep(t):e.minorStep()},e.majorStep=function(t){return arguments.length?(g=+t[0],b=+t[1],e):[g,b]},e.minorStep=function(t){return arguments.length?(p=+t[0],m=+t[1],e):[p,m]},e.precision=function(t){return arguments.length?(v=+t,u=kn(s,a,90),f=_n(r,n,v),d=kn(c,l,90),h=_n(o,i,v),e):v},e.majorExtent([[-180,-90+Ba],[180,90-Ba]]).minorExtent([[-180,-80-Ba],[180,80+Ba]])},ha.geo.greatArc=function(){function e(){return{type:"LineString",coordinates:[t||r.apply(this,arguments),n||i.apply(this,arguments)]}}var t,n,r=Fn,i=Cn;return e.distance=function(){return ha.geo.distance(t||r.apply(this,arguments),n||i.apply(this,arguments))},e.source=function(n){return arguments.length?(r=n,t="function"==typeof n?null:n,e):r},e.target=function(t){return arguments.length?(i=t,n="function"==typeof t?null:t,e):i},e.precision=function(){return arguments.length?e:0},e},ha.geo.interpolate=function(e,t){return An(e[0]*Ya,e[1]*Ya,t[0]*Ya,t[1]*Ya)},ha.geo.length=function(e){return Qs=0,ha.geo.stream(e,el),Qs};var Qs,el={sphere:A,point:A,lineStart:Tn,lineEnd:A,polygonStart:A,polygonEnd:A},tl=En(function(e){return Math.sqrt(2/(1+e))},function(e){return 2*Math.asin(e/2)});(ha.geo.azimuthalEqualArea=function(){return fn(tl)}).raw=tl;var nl=En(function(e){var t=Math.acos(e);return t&&t/Math.sin(t)},_);(ha.geo.azimuthalEquidistant=function(){return fn(nl)}).raw=nl,(ha.geo.conicConformal=function(){return Gt(Sn)}).raw=Sn,(ha.geo.conicEquidistant=function(){return Gt(On)}).raw=On;var rl=En(function(e){return 1/e},Math.atan);(ha.geo.gnomonic=function(){return fn(rl)}).raw=rl,Mn.invert=function(e,t){return[e,2*Math.atan(Math.exp(t))-Wa]},(ha.geo.mercator=function(){return qn(Mn)}).raw=Mn;var il=En(function(){return 1},Math.asin);(ha.geo.orthographic=function(){return fn(il)}).raw=il;var ol=En(function(e){return 1/(1+e)},function(e){return 2*Math.atan(e)});(ha.geo.stereographic=function(){return fn(ol)}).raw=ol,Dn.invert=function(e,t){return[-t,2*Math.atan(Math.exp(e))-Wa]},(ha.geo.transverseMercator=function(){var e=qn(Dn),t=e.center,n=e.rotate;return e.center=function(e){return e?t([-e[1],e[0]]):(e=t(),[e[1],-e[0]])},e.rotate=function(e){return e?n([e[0],e[1],e.length>2?e[2]+90:90]):(e=n(),[e[0],e[1],e[2]-90])},n([0,0,90])}).raw=Dn,ha.geom={},ha.geom.hull=function(e){function t(e){if(e.length<3)return[];var t,i=Me(n),o=Me(r),a=e.length,s=[],l=[];for(t=0;t=0;--t)h.push(e[s[c[t]][2]]);for(t=+f;t=r&&c.x<=o&&c.y>=i&&c.y<=a?[[r,a],[o,a],[o,i],[r,i]]:[];u.point=e[s]}),t}function n(e){return e.map(function(e,t){return{x:Math.round(o(e,t)/Ba)*Ba,y:Math.round(a(e,t)/Ba)*Ba,i:t}})}var r=zn,i=Pn,o=r,a=i,s=pl;return e?t(e):(t.links=function(e){return dr(n(e)).edges.filter(function(e){return e.l&&e.r}).map(function(t){return{source:e[t.l.i],target:e[t.r.i]}})},t.triangles=function(e){var t=[];return dr(n(e)).cells.forEach(function(n,r){for(var i,o,a=n.site,s=n.edges.sort(Kn),l=-1,c=s.length,u=s[c-1].edge,f=u.l===a?u.r:u.l;++l=c,d=r>=u,h=d<<1|f;e.leaf=!1,e=e.nodes[h]||(e.nodes[h]=br()),f?i=c:s=c,d?a=u:l=u,o(e,t,n,r,i,a,s,l)}var u,f,d,h,p,m,g,b,v,y=Me(s),w=Me(l);if(null!=t)m=t,g=n,b=r,v=i;else if(b=v=-(m=g=1/0),f=[],d=[],p=e.length,a)for(h=0;hb&&(b=u.x),u.y>v&&(v=u.y),f.push(u.x),d.push(u.y);else for(h=0;hb&&(b=x),k>v&&(v=k),f.push(x),d.push(k)}var _=b-m,F=v-g;_>F?v=g+_:b=m+F;var C=br();if(C.add=function(e){o(C,e,+y(e,++h),+w(e,h),m,g,b,v)},C.visit=function(e){vr(e,C,m,g,b,v)},C.find=function(e){return yr(C,e[0],e[1],m,g,b,v)},h=-1,null==t){for(;++h=0?e.slice(0,t):e,r=t>=0?e.slice(t+1):"in";return n=vl.get(n)||bl,r=yl.get(r)||_,Ar(r(n.apply(null,pa.call(arguments,1))))},ha.interpolateHcl=jr,ha.interpolateHsl=Br,ha.interpolateLab=$r,ha.interpolateRound=Lr,ha.transform=function(e){var t=ga.createElementNS(ha.ns.prefix.svg,"g");return(ha.transform=function(e){if(null!=e){t.setAttribute("transform",e);var n=t.transform.baseVal.consolidate()}return new Hr(n?n.matrix:wl)})(e)},Hr.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var wl={a:1,b:0,c:0,d:1,e:0,f:0};ha.interpolateTransform=Zr,ha.layout={},ha.layout.bundle=function(){return function(e){for(var t=[],n=-1,r=e.length;++n0?i=e:(n.c=null,n.t=NaN,n=null,c.end({type:"end",alpha:i=0})):e>0&&(c.start({type:"start",alpha:i=e}),n=Re(l.tick)),l):i},l.start=function(){function e(e,r){if(!n){for(n=new Array(i),l=0;l=0;)a.push(u=c[l]),u.parent=o,u.depth=o.depth+1;r&&(o.value=0),o.children=c}else r&&(o.value=+r.call(e,o,o.depth)||0),delete o.children;return fi(i,function(e){var n,i;t&&(n=e.children)&&n.sort(t),r&&(i=e.parent)&&(i.value+=e.value)}),s}var t=pi,n=di,r=hi;return e.sort=function(n){return arguments.length?(t=n,e):t},e.children=function(t){return arguments.length?(n=t,e):n},e.value=function(t){return arguments.length?(r=t,e):r},e.revalue=function(t){return r&&(ui(t,function(e){e.children&&(e.value=0)}),fi(t,function(t){var n;t.children||(t.value=+r.call(e,t,t.depth)||0),(n=t.parent)&&(n.value+=t.value)})),t},e},ha.layout.partition=function(){function e(t,n,r,i){var o=t.children;if(t.x=n,t.y=t.depth*i,t.dx=r,t.dy=i,o&&(a=o.length)){var a,s,l,c=-1;for(r=t.value?r/t.value:0;++cs&&(s=r),a.push(r)}for(n=0;n0)for(o=-1;++o=u[0]&&s<=u[1]&&(a=l[ha.bisect(f,s,1,h)-1],a.y+=p,a.push(e[o]));return l}var t=!0,n=Number,r=Ai,i=Fi;return e.value=function(t){return arguments.length?(n=t,e):n},e.range=function(t){return arguments.length?(r=Me(t),e):r},e.bins=function(t){return arguments.length?(i="number"==typeof t?function(e){return Ci(e,t)}:Me(t),e):i},e.frequency=function(n){return arguments.length?(t=!!n,e):t},e},ha.layout.pack=function(){function e(e,o){var a=n.call(this,e,o),s=a[0],l=i[0],c=i[1],u=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(s.x=s.y=0,fi(s,function(e){e.r=+u(e.value)}),fi(s,Mi),r){var f=r*(t?1:Math.max(2*s.r/l,2*s.r/c))/2;fi(s,function(e){e.r+=f}),fi(s,Mi),fi(s,function(e){e.r-=f})}return zi(s,l/2,c/2,t?1:1/Math.max(2*s.r/l,2*s.r/c)),a}var t,n=ha.layout.hierarchy().sort(Ti),r=0,i=[1,1];return e.size=function(t){return arguments.length?(i=t,e):i},e.radius=function(n){return arguments.length?(t=null==n||"function"==typeof n?n:+n,e):t},e.padding=function(t){return arguments.length?(r=+t,e):r},ci(e,n)},ha.layout.tree=function(){function e(e,i){var u=a.call(this,e,i),f=u[0],d=t(f);if(fi(d,n),d.parent.m=-d.z,ui(d,r),c)ui(f,o);else{var h=f,p=f,m=f;ui(f,function(e){e.xp.x&&(p=e),e.depth>m.depth&&(m=e)});var g=s(h,p)/2-h.x,b=l[0]/(p.x+s(p,h)/2+g),v=l[1]/(m.depth||1);ui(f,function(e){e.x=(e.x+g)*b,e.y=e.depth*v})}return u}function t(e){for(var t,n={A:null,children:[e]},r=[n];null!=(t=r.pop());)for(var i,o=t.children,a=0,s=o.length;a0&&(ji($i(a,e,n),e,r),c+=r,u+=r),f+=a.m,c+=i.m,d+=l.m,u+=o.m;a&&!Ii(o)&&(o.t=a,o.m+=f-u),i&&!Ni(l)&&(l.t=i,l.m+=c-d,n=e)}return n}function o(e){e.x*=l[0],e.y=e.depth*l[1]}var a=ha.layout.hierarchy().sort(null).value(null),s=Ri,l=[1,1],c=null;return e.separation=function(t){return arguments.length?(s=t,e):s},e.size=function(t){return arguments.length?(c=null==(l=t)?o:null,e):c?null:l},e.nodeSize=function(t){return arguments.length?(c=null==(l=t)?null:o,e):c?l:null},ci(e,a)},ha.layout.cluster=function(){function e(e,o){var a,s=t.call(this,e,o),l=s[0],c=0;fi(l,function(e){var t=e.children;t&&t.length?(e.x=Hi(t),e.y=Li(t)):(e.x=a?c+=n(e,a):0,e.y=0,a=e)});var u=Ui(l),f=Wi(l),d=u.x-n(u,f)/2,h=f.x+n(f,u)/2;return fi(l,i?function(e){e.x=(e.x-l.x)*r[0],e.y=(l.y-e.y)*r[1]}:function(e){e.x=(e.x-d)/(h-d)*r[0],e.y=(1-(l.y?e.y/l.y:1))*r[1]}),s}var t=ha.layout.hierarchy().sort(null).value(null),n=Ri,r=[1,1],i=!1;return e.separation=function(t){return arguments.length?(n=t,e):n},e.size=function(t){return arguments.length?(i=null==(r=t),e):i?null:r},e.nodeSize=function(t){return arguments.length?(i=null!=(r=t),e):i?r:null},ci(e,t)},ha.layout.treemap=function(){function e(e,t){for(var n,r,i=-1,o=e.length;++i0;)u.push(a=d[l-1]),u.area+=a.area,"squarify"!==h||(s=r(u,m))<=p?(d.pop(),p=s):(u.area-=u.pop().area,i(u,m,c,!1),m=Math.min(c.dx,c.dy),u.length=u.area=0,p=1/0);u.length&&(i(u,m,c,!0),u.length=u.area=0),o.forEach(t)}}function n(t){var r=t.children;if(r&&r.length){var o,a=f(t),s=r.slice(),l=[];for(e(s,a.dx*a.dy/t.value),l.area=0;o=s.pop();)l.push(o),l.area+=o.area,null!=o.z&&(i(l,o.z?a.dx:a.dy,a,!s.length),l.length=l.area=0);r.forEach(n)}}function r(e,t){for(var n,r=e.area,i=0,o=1/0,a=-1,s=e.length;++ai&&(i=n));return r*=r,t*=t,r?Math.max(t*i*p/r,r/(t*o*p)):1/0}function i(e,t,n,r){var i,o=-1,a=e.length,s=n.x,c=n.y,u=t?l(e.area/t):0;if(t==n.dx){for((r||u>n.dy)&&(u=n.dy);++on.dx)&&(u=n.dx);++o1);return e+t*n*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var e=ha.random.normal.apply(ha,arguments);return function(){return Math.exp(e())}},bates:function(e){var t=ha.random.irwinHall(e);return function(){return t()/e}},irwinHall:function(e){return function(){for(var t=0,n=0;nf?0:1;if(c=Ua)return t(c,h)+(e?t(e,1-h):"")+"Z";var p,m,g,b,v,y,w,x,k,_,F,C,A=0,T=0,E=[];if((b=(+l.apply(this,arguments)||0)/2)&&(g=o===Pl?Math.sqrt(e*e+c*c):+o.apply(this,arguments),h||(T*=-1),c&&(T=ae(g/c*Math.sin(b))),e&&(A=ae(g/e*Math.sin(b)))),c){v=c*Math.cos(u+T),y=c*Math.sin(u+T),w=c*Math.cos(f-T),x=c*Math.sin(f-T);var S=Math.abs(f-u-2*T)<=La?0:1;if(T&&_o(v,y,w,x)===h^S){var O=(u+f)/2;v=c*Math.cos(O),y=c*Math.sin(O),w=x=null}}else v=y=0;if(e){k=e*Math.cos(f-A),_=e*Math.sin(f-A),F=e*Math.cos(u+A),C=e*Math.sin(u+A);var M=Math.abs(u-f+2*A)<=La?0:1;if(A&&_o(k,_,F,C)===1-h^M){var q=(u+f)/2;k=e*Math.cos(q),_=e*Math.sin(q),F=C=null}}else k=_=0;if(d>Ba&&(p=Math.min(Math.abs(c-e)/2,+i.apply(this,arguments)))>.001){m=eLa)+",1 "+t}function i(e,t,n,r){return"Q 0,0 "+r}var o=Fn,a=Cn,s=Vo,l=wo,c=xo;return e.radius=function(t){return arguments.length?(s=Me(t),e):s},e.source=function(t){return arguments.length?(o=Me(t),e):o},e.target=function(t){return arguments.length?(a=Me(t),e):a},e.startAngle=function(t){return arguments.length?(l=Me(t),e):l},e.endAngle=function(t){return arguments.length?(c=Me(t),e):c},e},ha.svg.diagonal=function(){function e(e,i){var o=t.call(this,e,i),a=n.call(this,e,i),s=(o.y+a.y)/2,l=[o,{x:o.x,y:s},{x:a.x,y:s},a];return l=l.map(r),"M"+l[0]+"C"+l[1]+" "+l[2]+" "+l[3]}var t=Fn,n=Cn,r=Go;return e.source=function(n){return arguments.length?(t=Me(n),e):t},e.target=function(t){return arguments.length?(n=Me(t),e):n},e.projection=function(t){return arguments.length?(r=t,e):r},e},ha.svg.diagonal.radial=function(){var e=ha.svg.diagonal(),t=Go,n=e.projection;return e.projection=function(e){return arguments.length?n(Ko(t=e)):t},e},ha.svg.symbol=function(){function e(e,r){return(Bl.get(t.call(this,e,r))||Qo)(n.call(this,e,r))}var t=Zo,n=Jo;return e.type=function(n){return arguments.length?(t=Me(n),e):t},e.size=function(t){return arguments.length?(n=Me(t),e):n},e};var Bl=ha.map({circle:Qo,cross:function(e){var t=Math.sqrt(e/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(e){var t=Math.sqrt(e/(2*Ll)),n=t*Ll;return"M0,"+-t+"L"+n+",0 0,"+t+" "+-n+",0Z"},square:function(e){var t=Math.sqrt(e)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(e){var t=Math.sqrt(e/$l),n=t*$l/2;return"M0,"+n+"L"+t+","+-n+" "+-t+","+-n+"Z"},"triangle-up":function(e){var t=Math.sqrt(e/$l),n=t*$l/2;return"M0,"+-n+"L"+t+","+n+" "+-t+","+n+"Z"}});ha.svg.symbolTypes=Bl.keys();var $l=Math.sqrt(3),Ll=Math.tan(30*Ya);qa.transition=function(e){for(var t,n,r=Hl||++Xl,i=ia(e),o=[],a=Ul||{time:Date.now(),ease:Mr,delay:0,duration:250},s=-1,l=this.length;++srect,.s>rect").attr("width",f[1]-f[0])}function r(e){e.select(".extent").attr("y",d[0]),e.selectAll(".extent,.e>rect,.w>rect").attr("height",d[1]-d[0])}function i(){function i(){32==ha.event.keyCode&&(E||(y=null,M[0]-=f[1],M[1]-=d[1], -E=2),S())}function m(){32==ha.event.keyCode&&2==E&&(M[0]+=f[1],M[1]+=d[1],E=0,S())}function g(){var e=ha.mouse(x),i=!1;w&&(e[0]+=w[0],e[1]+=w[1]),E||(ha.event.altKey?(y||(y=[(f[0]+f[1])/2,(d[0]+d[1])/2]),M[0]=f[+(e[0]-1?i.splice(o,1):i.push(r),i.sort(),console.log("toggled selection "+n+"."+r+" ("+i.length+")"),i.length<5&&console.log(JSON.stringify(i)),e.filter_selection.put(n,i),e.selectAll.put(n,!1)},r.resetSelectedFilterValue=function(e,t){e.filter_selection.put(t.dim,null)},r.render=function(e,t,n,r){return o("div.dropdown",[o("button",{"ev-click":i.send(e.channels.setModal,t)},[n]),e.modal===t?r:null])},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){function t(t,n,r,i){var o=Object.create({});o["axis[]"]=t;for(var l in r)o["filter."+l+"[]"]=r[l];for(var l in i)i[l][0]&&(o["filter."+l+".gt"]=s(i[l][0])),i[l][1]&&(o["filter."+l+".lt"]=s(i[l][1]));return e+"/aggregate/"+encodeURIComponent(n)+".csv?"+a.stringify(o)}return e=e||"/api/cfrp",{domain:function(t,n){o.csv(e+"/aggregate/default.csv?"+a.stringify({"axis[]":t}),function(e,r){return e?console.error(e):(r=r.map(function(e){return i.parse(t)(e[t])}),void n(r))})},url:t,summarize:function(e,n,r,a,s){var l=t(e,n,r,a);o.csv(l,function(e,t){t&&(t=t.map(function(e){for(var t in e)e[t]=i.parse(t)(e[t]);return e})),s(e,t)})}}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=n(7),a=n(32),s=o.time.format("%Y-%m-%d");t.default=r,e.exports=t.default},function(e,t,n){function r(e){function t(e,t,o){var a={fn:e,data:void 0!==t?t:{},opts:o||{},handleEvent:r};return e&&"dom-delegator-handle"===e.type?i.transformHandle(e,n.bind(a)):a}function n(t,n){return this.opts.startPropagation&&t.startPropagation&&t.startPropagation(),e.call(this,t,n)}function r(t){function n(e){"function"==typeof r.fn?r.fn(e):r.fn.write(e)}var r=this;r.opts.startPropagation&&t.startPropagation&&t.startPropagation(),e.call(r,t,n)}return t}var i=n(46);e.exports=r},function(e,t){function n(e){return e&&"Widget"===e.type}e.exports=n},function(e,t,n){(function(t){var r="undefined"!=typeof t?t:"undefined"!=typeof window?window:{},i=n(214);if("undefined"!=typeof document)e.exports=document;else{var o=r["__GLOBAL_DOCUMENT_CACHE@4"];o||(o=r["__GLOBAL_DOCUMENT_CACHE@4"]=i),e.exports=o}}).call(t,function(){return this}())},function(e,t){function n(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0,enumerable:!1})}e.exports=n},function(e,t){function n(e){function t(t){return t?(n.push(t),function(){n.splice(n.indexOf(t),1)}):e}var n=[];return e=void 0===e?null:e,t.set=function(t){e=t,n.forEach(function(e){e(t)})},t}e.exports=n},function(e,t,n){function r(e){return e&&"VirtualNode"===e.type&&e.version===i}var i=n(18);e.exports=r},function(e,t){e.exports="2"},function(e,t,n){"use strict";function r(e){var t=e[a];return t||(t=e[a]={}),t}var i=n(116),o="7";i("ev-store",o);var a="__EV_STORE_KEY@"+o;e.exports=r},function(e,t){e.exports={en:{dot1:"Crosstab",dot2:"Crosstab + Calendar",dot3:"Calendar + Register",pane_selector_button_1:"Crosstab",pane_selector_button_2:"Calendar",pane_selector_button_3:"Resgistry",download:"Download in format"},fr:{dot1:"Tableau croisé",dot2:"Tableau croisé + Calendrier",dot3:"Calendrier + Registre",pane_selector_button_1:"Tableau Croisé",pane_selector_button_2:"Calendrier",pane_selector_button_3:"Registre",sum_receipts:"{agg} Livres est la somme des recettes {cols} {rows}",performances_days:"{agg} est le nombre de représentations par jour {cols} {rows}",mean_receipts_day:"{agg} Livres est la moyenne des recettes par jour {cols} {rows}",mean_price:"{agg} Livres est la moyenne du prix des places {cols} {rows}",currency:"Livres",cancel:"Annuler",ok:"OK",calendar_tool_caption:"Changement d'outil",calendar_tool_message:"Le passage de l'outil de comparaison à l'outil calendrier implique la reprise des sélections faites précédemment dans le premier outil. Tous les nouveaux choix de critères faits dans l'outil calendrier ne seront pas pris en compte.",download:"Télécharger au format"}}},function(e,t,n){function r(e,t){var n=e._list;return t(function(r){var o=e().slice(),a=n.indexOf(t);if(a===-1){var s="observ-array: Unremoved observ listener",l=new Error(s);throw l.list=n,l.index=a,l.observ=t,l}o.splice(a,1,r),i(o,"_diff",[[a,1,r]]),e._observSet(o)})}var i=n(15);e.exports=r},function(e,t,n){"use strict";function r(e,t,n){var r,a,l,c,u=[];return!n&&s(t)&&(n=t,a={}),a=a||t||{},r=v(e,a),a.hasOwnProperty("key")&&(l=a.key,a.key=void 0),a.hasOwnProperty("namespace")&&(c=a.namespace,a.namespace=void 0),"INPUT"!==r||c||!a.hasOwnProperty("value")||void 0===a.value||g(a.value)||(a.value=y(a.value)),o(a),void 0!==n&&null!==n&&i(n,u,r,a),new f(r,a,u,l,c)}function i(e,t,n,r){if("string"==typeof e)t.push(new d(e));else if("number"==typeof e)t.push(new d(String(e)));else if(a(e))t.push(e);else{if(!u(e)){if(null===e||void 0===e)return;throw l({foreignObject:e,parentVnode:{tagName:n,properties:r}})}for(var o=0;o-1?t:1/0;var r=e.indexOf(" ",n);return r=r>-1?r:1/0,e.slice(0,Math.min(t,r))}}function l(e){e&&e.hasOwnProperty("sort")&&e.length>0&&("number"==typeof e[0]?e.sort(function(e,t){return e-t}):e.sort())}Object.defineProperty(t,"__esModule",{value:!0});var c=n(3),u=n(7),f=function(e,t){var n=e.map(function(e){return t.map(function(t){return t+"_"+e})});return n.reduce(function(e,t){return e.concat(t)})},d=["n"].concat(u.range(1,4)),h={performance:f(d,["title"]),time:["decade","season","month","weekday"],author:f(d,["author"]),genre:f(d,["genre"]),seating_area:["seating_area"],acts:f(d,["acts"])},p=["sum_receipts","performances_days","mean_receipts_day","mean_price"];t.group=r,t.dimension=i,t.aggregate=o,t.parse=a,t.format=s,t.sort=l},function(e,t,n){"use strict";function r(e,t,n,r){if(!e[n])throw"Unknown language ("+n+")";var i,o,a;return(i=e[n][t])?o=null:(a=/([A-Za-z0-9]+)(_[n0-9])?$/.exec(t),i=a[1],i=e[n][i]||i,o=a[2]?a[2].slice(1):null),r(i,o)}function i(e,t,n){return r(e,t,n,function(e,t){return a("span",[e,t?a("sub",[t]):null])})}Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),a=n(1).h,s={decimal:".",thousands:",",grouping:[3],currency:[""," €"],dateTime:"%A, le %e %B %Y, %X",date:"%d/%m/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],shortDays:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],months:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],shortMonths:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."]},l=o.locale(s),c={decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},u=o.locale(c);t.fr=l,t.fr_spec=s,t.en=u,t.en_spec=c,t.htmlize=i,t.format_stem_sub=r},function(e,t){e.exports={en:{comparison_tool_title:"Comparison tool",calendar_tool_title:"Calendar tool",new_search_button:"New search",comparison_tool_scope_title:"What are you looking for ?",comparison_tool_place_title:"For what theatre ?",comparison_tool_time_scope_title:"For what period ?",comparison_tool_x_title:"x. In function of what ?",comparison_tool_y_title:"y. In function of what ?",comparison_tool_open_handle:"Search criterias",filter_button_all:"Use all filters",filter_button_clear_all:"Clear all filters",sum_receipts:"Gross receipts",sum_receipts_weighted:"Gross receipts (weighted)",performances_days:"Performances (= days)",mean_receipts_day:"Average receipts / day",mean_receipts_day_weighted:"Average receipts / day (weighted)",mean_price:"Average ticket price",count_authors:"Count author",count_titles:"Count title",rows:"Rows",cols:"Columns",cells:"Cells",find:"Search",all:"All",ok:"OK",from:"From",to:"To",time:"Time",performance:"Performance",performance_addl:"Performance (additional)",theater:"Theater",decade:"Decade",decade_hint:"for decade {decade}",season:"Season",season_hint:"during the season of {season}",month:"Month",month_hint:"for {month}",day:"Day",weekday:"Weekday",weekday_hint:"on {weekday}",author:"Author (plays 1, 2, and 3)",author_n:"Author",author_n_hint:"for author {author_1}",author_1:"Author (overture)",author_1_hint:"when {author_1} is presented during overture",author_2:"Author (2nd part)",author_2_hint:"when {author_2} is presented in 2nd part",author_3:"Author (3rd part)",author_3_hint:"when {author_3} is presented in 3rd part",title:"Title",title_n:"Title",title_n_hint:"for {title}",title_1:"First title",title_1_hint:"where the first title is {title_1}",title_2:"Second title",title_2_hint:"where the second title is {title_2}",title_3:"Third title",title_3_hint:"where the third title is {title_3}",genre:"Genre (pièces 1, 2 et 3)",genre_n:"Genre",genre_n_hint:"for the {genre} genre",genre_1:"Genre (overture)",genre_1_hint:"where the first title is a {genre_1} genre",genre_2:"Genre (2nd part)",genre_2_hint:"where the third title is a {genre_3} genre",genre_3:"Genre (3rd part)",acts:"Acts",acts_hint:"for act {acts}",prose_vers:"Prose/Verse",prologue:"Prolog",musique_danse_machine:"Music/Dance/Machinery",free_entry:"Free Entry",firstrun:"First Run",reprise:"Reprise",newactor:"New Actor",debut:"Debut",ex_attendance:"VIP",ex_representation:"Notable performance",ex_place:"Notable place",theater_period:"Theater + Period",seating_area:"Seat"},fr:{comparison_tool_title:"Outil de comparaison",calendar_tool_title:"Outil calendrier",new_search_button:"Nouvelle recherche",comparison_tool_scope_title:"Que cherchez-vous ?",comparison_tool_place_title:"Pour quelle salle ?",comparison_tool_time_scope_title:"Selon quelle période ?",comparison_tool_x_title:"x. En fonction de quoi ?",comparison_tool_y_title:"y. En fonction de quoi ?",comparison_tool_open_handle:"Critères de recherche",filter_button_all:"Utiliser tous les filtres",filter_button_clear_all:"Supprimer les filtres",sum_receipts:"Somme des recettes",sum_receipts_weighted:"Somme recette",performances_days:"Représentations / jour",mean_receipts_day:"Moyenne des recettes / jour",mean_receipts_day_weighted:"Moyenne recette/jour (pondérée)",mean_price:"Moyenne du prix des places",count_authors:"Nombre d'auteurs",count_titles:"Nombre de pièces",rows:"Lignes",cols:"Colonnes",cells:"Cellules",find:"Rechercher",all:"Tous",ok:"OK",from:"De",to:"À",time:"Période",performance:"Pièce",performance_addl:"Soirée (supplémentaire)",theater:"Salle",decade:"Décennie",decade_hint:"pour la décennie {decade}",season:"Saison",season_hint:"durant la saison de {season}",month:"Mois",month_hint:"pour {month}",day:"Jour",weekday:"Jour de la semaine",weekday_hint:"pour le {weekday}",author:"Auteur (pièces 1, 2 et 3)",author_n:"Auteur",author_n_hint:"pour l'auteur {author_1}",author_1:"Auteur de la première pièce",author_1_hint:"lorsque {author_1} est en 1ère partie",author_2:"Auteur de la seconde pièce",author_2_hint:"lorsque {author_2} est en 2e partie",author_3:"Auteur de la troisième pièce",author_3_hint:"lorsque {author_3} est en 3e partie",title:"Pièce",title_n:"Pièce",title_n_hint:"pour la pièce {title}",title_1:"Première pièce",title_1_hint:"dont la 1ère pièce est {title_1}",title_2:"Seconde pièce",title_2_hint:"dont la 2e pièce est {title_2}",title_3:"Troisième pièce",title_3_hint:"dont la 3e pièce est {title_3}",genre:"Genre (pièces 1, 2 et 3)",genre_n:"Genre",genre_n_hint:"des {genre}s",genre_1:"Genre de la première pièce",genre_1_hint:"dont le genre de la 1ère pièce est {genre_1}",genre_2:"Genre de la seconde pièce",genre_2_hint:"dont le genre de la 2e pièce est {genre_2}",genre_3:"Genre de la troisième pièce",genre_3_hint:"dont le genre de la 3e pièce est {genre_3}",acts:"Acte(s)",acts_hint:"pour l'acte {acts}",prose_vers:"Prose/Vers",prologue:"Prologue",musique_danse_machine:"Musique/Danse/Machine",free_entry:"Gratuit",firstrun:"First Run",reprise:"Reprise",newactor:"Nouvel Acteur",debut:"Début",ex_attendance:"Présence exceptionelle",ex_representation:"Répresentation exceptionelles",ex_place:"ExPlace",theater_period:"Théâtre + Période",seating_area:"Place",seating_area_hint:"pour la place {seating_area}"}}},function(e,t,n){function r(e,t){for(var n=0;nt?1:e>=t?0:NaN}function l(e){return null===e?NaN:+e}function c(e){return!isNaN(e)}function u(e){return{left:function(t,n,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);r>>1;e(t[o],n)<0?r=o+1:i=o}return r},right:function(t,n,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);r>>1;e(t[o],n)>0?i=o:r=o+1}return r}}}function f(e){return e.length}function d(e){for(var t=1;e*t%1;)t*=10;return t}function h(e,t){for(var n in t)Object.defineProperty(e.prototype,n,{value:t[n],enumerable:!1})}function p(){this._=Object.create(null)}function m(e){return(e+="")===Fa||e[0]===Ca?Ca+e:e}function g(e){return(e+="")[0]===Ca?e.slice(1):e}function b(e){return m(e)in this._}function v(e){return(e=m(e))in this._&&delete this._[e]}function y(){var e=[];for(var t in this._)e.push(g(t));return e}function w(){var e=0;for(var t in this._)++e;return e}function x(){for(var e in this._)return!1;return!0}function k(){this._=Object.create(null)}function _(e){return e}function F(e,t,n){return function(){var r=n.apply(t,arguments);return r===t?e:r}}function C(e,t){if(t in e)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var n=0,r=Aa.length;n=t&&(t=i+1);!(a=s[t])&&++t0&&(e=e.slice(0,s));var c=Ra.get(e);return c&&(e=c,l=Q),s?t?i:r:t?A:o}function Z(e,t){return function(n){var r=ha.event;ha.event=n,t[0]=this.__data__;try{e.apply(this,t)}finally{ha.event=r}}}function Q(e,t){var n=Z(e,t);return function(e){var t=this,r=e.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||n.call(t,e)}}function ee(e){var t=".dragsuppress-"+ ++Na,n="click"+t,r=ha.select(a(e)).on("touchmove"+t,S).on("dragstart"+t,S).on("selectstart"+t,S);if(null==Ia&&(Ia=!("onselectstart"in e)&&C(e.style,"userSelect")),Ia){var i=o(e).style,s=i[Ia];i[Ia]="none"}return function(e){if(r.on(t,null),Ia&&(i[Ia]=s),e){var o=function(){r.on(n,null)};r.on(n,function(){S(),o()},!0),setTimeout(o,0)}}}function te(e,t){t.changedTouches&&(t=t.changedTouches[0]);var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();if(ja<0){var i=a(e);if(i.scrollX||i.scrollY){n=ha.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var o=n[0][0].getScreenCTM();ja=!(o.f||o.e),n.remove()}}return ja?(r.x=t.pageX,r.y=t.pageY):(r.x=t.clientX,r.y=t.clientY),r=r.matrixTransform(e.getScreenCTM().inverse()),[r.x,r.y]}var s=e.getBoundingClientRect();return[t.clientX-s.left-e.clientLeft,t.clientY-s.top-e.clientTop]}function ne(){return ha.event.changedTouches[0].identifier}function re(e){return e>0?1:e<0?-1:0}function ie(e,t,n){return(t[0]-e[0])*(n[1]-e[1])-(t[1]-e[1])*(n[0]-e[0])}function oe(e){return e>1?0:e<-1?La:Math.acos(e)}function ae(e){return e>1?Wa:e<-1?-Wa:Math.asin(e)}function se(e){return((e=Math.exp(e))-1/e)/2}function le(e){return((e=Math.exp(e))+1/e)/2}function ce(e){return((e=Math.exp(2*e))-1)/(e+1)}function ue(e){return(e=Math.sin(e/2))*e}function fe(){}function de(e,t,n){return this instanceof de?(this.h=+e,this.s=+t,void(this.l=+n)):arguments.length<2?e instanceof de?new de(e.h,e.s,e.l):Ae(""+e,Te,de):new de(e,t,n)}function he(e,t,n){function r(e){return e>360?e-=360:e<0&&(e+=360),e<60?o+(a-o)*e/60:e<180?a:e<240?o+(a-o)*(240-e)/60:o}function i(e){return Math.round(255*r(e))}var o,a;return e=isNaN(e)?0:(e%=360)<0?e+360:e,t=isNaN(t)?0:t<0?0:t>1?1:t,n=n<0?0:n>1?1:n,a=n<=.5?n*(1+t):n+t-n*t,o=2*n-a,new ke(i(e+120),i(e),i(e-120))}function pe(e,t,n){return this instanceof pe?(this.h=+e,this.c=+t,void(this.l=+n)):arguments.length<2?e instanceof pe?new pe(e.h,e.c,e.l):e instanceof ge?ve(e.l,e.a,e.b):ve((e=Ee((e=ha.rgb(e)).r,e.g,e.b)).l,e.a,e.b):new pe(e,t,n)}function me(e,t,n){return isNaN(e)&&(e=0),isNaN(t)&&(t=0),new ge(n,Math.cos(e*=Ya)*t,Math.sin(e)*t)}function ge(e,t,n){return this instanceof ge?(this.l=+e,this.a=+t,void(this.b=+n)):arguments.length<2?e instanceof ge?new ge(e.l,e.a,e.b):e instanceof pe?me(e.h,e.c,e.l):Ee((e=ke(e)).r,e.g,e.b):new ge(e,t,n)}function be(e,t,n){var r=(e+16)/116,i=r+t/500,o=r-n/200;return i=ye(i)*rs,r=ye(r)*is,o=ye(o)*os,new ke(xe(3.2404542*i-1.5371385*r-.4985314*o),xe(-.969266*i+1.8760108*r+.041556*o),xe(.0556434*i-.2040259*r+1.0572252*o))}function ve(e,t,n){return e>0?new pe(Math.atan2(n,t)*Xa,Math.sqrt(t*t+n*n),e):new pe(NaN,NaN,e)}function ye(e){return e>.206893034?e*e*e:(e-4/29)/7.787037}function we(e){return e>.008856?Math.pow(e,1/3):7.787037*e+4/29}function xe(e){return Math.round(255*(e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055))}function ke(e,t,n){return this instanceof ke?(this.r=~~e,this.g=~~t,void(this.b=~~n)):arguments.length<2?e instanceof ke?new ke(e.r,e.g,e.b):Ae(""+e,ke,he):new ke(e,t,n)}function _e(e){return new ke(e>>16,e>>8&255,255&e)}function Fe(e){return _e(e)+""}function Ce(e){return e<16?"0"+Math.max(0,e).toString(16):Math.min(255,e).toString(16)}function Ae(e,t,n){var r,i,o,a=0,s=0,l=0;if(r=/([a-z]+)\((.*)\)/.exec(e=e.toLowerCase()))switch(i=r[2].split(","),r[1]){case"hsl":return n(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return t(Oe(i[0]),Oe(i[1]),Oe(i[2]))}return(o=ls.get(e))?t(o.r,o.g,o.b):(null==e||"#"!==e.charAt(0)||isNaN(o=parseInt(e.slice(1),16))||(4===e.length?(a=(3840&o)>>4,a|=a>>4,s=240&o,s|=s>>4,l=15&o,l|=l<<4):7===e.length&&(a=(16711680&o)>>16,s=(65280&o)>>8,l=255&o)),t(a,s,l))}function Te(e,t,n){var r,i,o=Math.min(e/=255,t/=255,n/=255),a=Math.max(e,t,n),s=a-o,l=(a+o)/2;return s?(i=l<.5?s/(a+o):s/(2-a-o),r=e==a?(t-n)/s+(t0&&l<1?0:r),new de(r,i,l)}function Ee(e,t,n){e=Se(e),t=Se(t),n=Se(n);var r=we((.4124564*e+.3575761*t+.1804375*n)/rs),i=we((.2126729*e+.7151522*t+.072175*n)/is),o=we((.0193339*e+.119192*t+.9503041*n)/os);return ge(116*i-16,500*(r-i),200*(i-o))}function Se(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Oe(e){var t=parseFloat(e);return"%"===e.charAt(e.length-1)?Math.round(2.55*t):t}function Me(e){return"function"==typeof e?e:function(){return e}}function qe(e){return function(t,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=null),De(t,n,e,r)}}function De(e,t,n,r){function i(){var e,t=l.status;if(!t&&Pe(l)||t>=200&&t<300||304===t){try{e=n.call(o,l)}catch(e){return void a.error.call(o,e)}a.load.call(o,e)}else a.error.call(o,l)}var o={},a=ha.dispatch("beforesend","progress","load","error"),s={},l=new XMLHttpRequest,c=null;return!this.XDomainRequest||"withCredentials"in l||!/^(http(s)?:)?\/\//.test(e)||(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=i:l.onreadystatechange=function(){l.readyState>3&&i()},l.onprogress=function(e){var t=ha.event;ha.event=e;try{a.progress.call(o,l)}finally{ha.event=t}},o.header=function(e,t){return e=(e+"").toLowerCase(),arguments.length<2?s[e]:(null==t?delete s[e]:s[e]=t+"",o)},o.mimeType=function(e){return arguments.length?(t=null==e?null:e+"",o):t},o.responseType=function(e){return arguments.length?(c=e,o):c},o.response=function(e){return n=e,o},["get","post"].forEach(function(e){o[e]=function(){return o.send.apply(o,[e].concat(ma(arguments)))}}),o.send=function(n,r,i){if(2===arguments.length&&"function"==typeof r&&(i=r,r=null),l.open(n,e,!0),null==t||"accept"in s||(s.accept=t+",*/*"),l.setRequestHeader)for(var u in s)l.setRequestHeader(u,s[u]);return null!=t&&l.overrideMimeType&&l.overrideMimeType(t),null!=c&&(l.responseType=c),null!=i&&o.on("error",i).on("load",function(e){i(null,e)}),a.beforesend.call(o,l),l.send(null==r?null:r),o},o.abort=function(){return l.abort(),o},ha.rebind(o,a,"on"),null==r?o:o.get(ze(r))}function ze(e){return 1===e.length?function(t,n){e(null==t?n:null)}:e}function Pe(e){var t=e.responseType;return t&&"text"!==t?e.response:e.responseText}function Re(e,t,n){var r=arguments.length;r<2&&(t=0),r<3&&(n=Date.now());var i=n+t,o={c:e,t:i,n:null};return us?us.n=o:cs=o,us=o,fs||(ds=clearTimeout(ds),fs=1,hs(Ie)),o}function Ie(){var e=Ne(),t=je()-e;t>24?(isFinite(t)&&(clearTimeout(ds),ds=setTimeout(Ie,t)),fs=0):(fs=1,hs(Ie))}function Ne(){for(var e=Date.now(),t=cs;t;)e>=t.t&&t.c(e-t.t)&&(t.c=null),t=t.n;return e}function je(){for(var e,t=cs,n=1/0;t;)t.c?(t.t8?function(e){return e/n}:function(e){return e*n},symbol:e}}function Le(e){var t=e.decimal,n=e.thousands,r=e.grouping,i=e.currency,o=r&&n?function(e,t){for(var i=e.length,o=[],a=0,s=r[0],l=0;i>0&&s>0&&(l+s+1>t&&(s=Math.max(1,t-l)),o.push(e.substring(i-=s,i+s)),!((l+=s+1)>t));)s=r[a=(a+1)%r.length];return o.reverse().join(n)}:_;return function(e){var n=ms.exec(e),r=n[1]||" ",a=n[2]||">",s=n[3]||"-",l=n[4]||"",c=n[5],u=+n[6],f=n[7],d=n[8],h=n[9],p=1,m="",g="",b=!1,v=!0;switch(d&&(d=+d.substring(1)),(c||"0"===r&&"="===a)&&(c=r="0",a="="),h){case"n":f=!0,h="g";break;case"%":p=100,g="%",h="f";break;case"p":p=100,g="%",h="r";break;case"b":case"o":case"x":case"X":"#"===l&&(m="0"+h.toLowerCase());case"c":v=!1;case"d":b=!0,d=0;break;case"s":p=-1,h="r"}"$"===l&&(m=i[0],g=i[1]),"r"!=h||d||(h="g"),null!=d&&("g"==h?d=Math.max(1,Math.min(21,d)):"e"!=h&&"f"!=h||(d=Math.max(0,Math.min(20,d)))),h=gs.get(h)||He;var y=c&&f;return function(e){var n=g;if(b&&e%1)return"";var i=e<0||0===e&&1/e<0?(e=-e,"-"):"-"===s?"":s;if(p<0){var l=ha.formatPrefix(e,d);e=l.scale(e),n=l.symbol+g}else e*=p;e=h(e,d);var w,x,k=e.lastIndexOf(".");if(k<0){var _=v?e.lastIndexOf("e"):-1;_<0?(w=e,x=""):(w=e.substring(0,_),x=e.substring(_))}else w=e.substring(0,k),x=t+e.substring(k+1);!c&&f&&(w=o(w,1/0));var F=m.length+w.length+x.length+(y?0:i.length),C=F"===a?C+i+e:"^"===a?C.substring(0,F>>=1)+i+e+C.substring(F):i+(y?e:C+e))+n}}}function He(e){return e+""}function Ue(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function We(e,t,n){function r(t){var n=e(t),r=o(n,1);return t-n1)for(;a=c)return-1;if(i=t.charCodeAt(s++),37===i){if(a=t.charAt(s++),o=S[a in ws?t.charAt(s++):a],!o||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}function r(e,t,n){k.lastIndex=0;var r=k.exec(t.slice(n));return r?(e.w=_.get(r[0].toLowerCase()),n+r[0].length):-1}function i(e,t,n){w.lastIndex=0;var r=w.exec(t.slice(n));return r?(e.w=x.get(r[0].toLowerCase()),n+r[0].length):-1}function o(e,t,n){A.lastIndex=0;var r=A.exec(t.slice(n));return r?(e.m=T.get(r[0].toLowerCase()),n+r[0].length):-1}function a(e,t,n){F.lastIndex=0;var r=F.exec(t.slice(n));return r?(e.m=C.get(r[0].toLowerCase()),n+r[0].length):-1}function s(e,t,r){return n(e,E.c.toString(),t,r)}function l(e,t,r){return n(e,E.x.toString(),t,r)}function c(e,t,r){return n(e,E.X.toString(),t,r)}function u(e,t,n){var r=y.get(t.slice(n,n+=2).toLowerCase());return null==r?-1:(e.p=r,n)}var f=e.dateTime,d=e.date,h=e.time,p=e.periods,m=e.days,g=e.shortDays,b=e.months,v=e.shortMonths;t.utc=function(e){function n(e){try{vs=Ue;var t=new vs;return t._=e,r(t)}finally{vs=Date}}var r=t(e);return n.parse=function(e){try{vs=Ue;var t=r.parse(e);return t&&t._}finally{vs=Date}},n.toString=r.toString,n},t.multi=t.utc.multi=ht;var y=ha.map(),w=Ge(m),x=Ke(m),k=Ge(g),_=Ke(g),F=Ge(b),C=Ke(b),A=Ge(v),T=Ke(v);p.forEach(function(e,t){y.set(e.toLowerCase(),t)});var E={a:function(e){return g[e.getDay()]},A:function(e){return m[e.getDay()]},b:function(e){return v[e.getMonth()]},B:function(e){return b[e.getMonth()]},c:t(f),d:function(e,t){return Ve(e.getDate(),t,2)},e:function(e,t){return Ve(e.getDate(),t,2)},H:function(e,t){return Ve(e.getHours(),t,2)},I:function(e,t){return Ve(e.getHours()%12||12,t,2)},j:function(e,t){return Ve(1+bs.dayOfYear(e),t,3)},L:function(e,t){return Ve(e.getMilliseconds(),t,3)},m:function(e,t){return Ve(e.getMonth()+1,t,2)},M:function(e,t){return Ve(e.getMinutes(),t,2)},p:function(e){return p[+(e.getHours()>=12)]},S:function(e,t){return Ve(e.getSeconds(),t,2); +},U:function(e,t){return Ve(bs.sundayOfYear(e),t,2)},w:function(e){return e.getDay()},W:function(e,t){return Ve(bs.mondayOfYear(e),t,2)},x:t(d),X:t(h),y:function(e,t){return Ve(e.getFullYear()%100,t,2)},Y:function(e,t){return Ve(e.getFullYear()%1e4,t,4)},Z:ft,"%":function(){return"%"}},S={a:r,A:i,b:o,B:a,c:s,d:ot,e:ot,H:st,I:st,j:at,L:ut,m:it,M:lt,p:u,S:ct,U:Ze,w:Je,W:Qe,x:l,X:c,y:tt,Y:et,Z:nt,"%":dt};return t}function Ve(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o68?1900:2e3)}function it(e,t,n){xs.lastIndex=0;var r=xs.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function ot(e,t,n){xs.lastIndex=0;var r=xs.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function at(e,t,n){xs.lastIndex=0;var r=xs.exec(t.slice(n,n+3));return r?(e.j=+r[0],n+r[0].length):-1}function st(e,t,n){xs.lastIndex=0;var r=xs.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function lt(e,t,n){xs.lastIndex=0;var r=xs.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function ct(e,t,n){xs.lastIndex=0;var r=xs.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function ut(e,t,n){xs.lastIndex=0;var r=xs.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function ft(e){var t=e.getTimezoneOffset(),n=t>0?"-":"+",r=_a(t)/60|0,i=_a(t)%60;return n+Ve(r,"0",2)+Ve(i,"0",2)}function dt(e,t,n){ks.lastIndex=0;var r=ks.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function ht(e){for(var t=e.length,n=-1;++n=0?1:-1,s=a*n,l=Math.cos(t),c=Math.sin(t),u=o*c,f=i*l+u*Math.cos(s),d=u*a*Math.sin(s);Es.add(Math.atan2(d,f)),r=e,i=l,o=c}var t,n,r,i,o;Ss.point=function(a,s){Ss.point=e,r=(t=a)*Ya,i=Math.cos(s=(n=s)*Ya/2+La/4),o=Math.sin(s)},Ss.lineEnd=function(){e(t,n)}}function wt(e){var t=e[0],n=e[1],r=Math.cos(n);return[r*Math.cos(t),r*Math.sin(t),Math.sin(n)]}function xt(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function kt(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function _t(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function Ft(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function Ct(e){var t=Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}function At(e){return[Math.atan2(e[1],e[0]),ae(e[2])]}function Tt(e,t){return _a(e[0]-t[0])=0;--s)i.point((f=u[s])[0],f[1])}else r(h.x,h.p.x,-1,i);h=h.p}h=h.o,u=h.z,p=!p}while(!h.v);i.lineEnd()}}}function Rt(e){if(t=e.length){for(var t,n,r=0,i=e[0];++r0){for(x||(o.polygonStart(),x=!0),o.lineStart();++a1&&2&t&&n.push(n.pop().concat(n.shift())),h.push(n.filter(jt))}var h,p,m,g=t(o),b=i.invert(r[0],r[1]),v={point:a,lineStart:l,lineEnd:c,polygonStart:function(){v.point=u,v.lineStart=f,v.lineEnd=d,h=[],p=[]},polygonEnd:function(){v.point=a,v.lineStart=l,v.lineEnd=c,h=ha.merge(h);var e=Wt(b,p);h.length?(x||(o.polygonStart(),x=!0),Pt(h,$t,e,n,o)):e&&(x||(o.polygonStart(),x=!0),o.lineStart(),n(null,null,1,o),o.lineEnd()),x&&(o.polygonEnd(),x=!1),h=p=null},sphere:function(){o.polygonStart(),o.lineStart(),n(null,null,1,o),o.lineEnd(),o.polygonEnd()}},y=Bt(),w=t(y),x=!1;return v}}function jt(e){return e.length>1}function Bt(){var e,t=[];return{lineStart:function(){t.push(e=[])},point:function(t,n){e.push([t,n])},lineEnd:A,buffer:function(){var n=t;return t=[],e=null,n},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function $t(e,t){return((e=e.x)[0]<0?e[1]-Wa-Ba:Wa-e[1])-((t=t.x)[0]<0?t[1]-Wa-Ba:Wa-t[1])}function Lt(e){var t,n=NaN,r=NaN,i=NaN;return{lineStart:function(){e.lineStart(),t=1},point:function(o,a){var s=o>0?La:-La,l=_a(o-n);_a(l-La)0?Wa:-Wa),e.point(i,r),e.lineEnd(),e.lineStart(),e.point(s,r),e.point(o,r),t=0):i!==s&&l>=La&&(_a(n-i)Ba?Math.atan((Math.sin(t)*(o=Math.cos(r))*Math.sin(n)-Math.sin(r)*(i=Math.cos(t))*Math.sin(e))/(i*o*a)):(t+r)/2}function Ut(e,t,n,r){var i;if(null==e)i=n*Wa,r.point(-La,i),r.point(0,i),r.point(La,i),r.point(La,0),r.point(La,-i),r.point(0,-i),r.point(-La,-i),r.point(-La,0),r.point(-La,i);else if(_a(e[0]-t[0])>Ba){var o=e[0]=0?1:-1,_=k*x,F=_>La,C=p*y;if(Es.add(Math.atan2(C*k*Math.sin(_),m*w+C*Math.cos(_))),o+=F?x+k*Ha:x,F^d>=n^b>=n){var A=kt(wt(f),wt(e));Ct(A);var T=kt(i,A);Ct(T);var E=(F^x>=0?-1:1)*ae(T[2]);(r>E||r===E&&(A[0]||A[1]))&&(a+=F^x>=0?1:-1)}if(!g++)break;d=b,p=y,m=w,f=e}}return(o<-Ba||oo}function n(e){var n,o,l,c,u;return{lineStart:function(){c=l=!1,u=1},point:function(f,d){var h,p=[f,d],m=t(f,d),g=a?m?0:i(f,d):m?i(f+(f<0?La:-La),d):0;if(!n&&(c=l=m)&&e.lineStart(),m!==l&&(h=r(n,p),(Tt(n,h)||Tt(p,h))&&(p[0]+=Ba,p[1]+=Ba,m=t(p[0],p[1]))),m!==l)u=0,m?(e.lineStart(),h=r(p,n),e.point(h[0],h[1])):(h=r(n,p),e.point(h[0],h[1]),e.lineEnd()),n=h;else if(s&&n&&a^m){var b;g&o||!(b=r(p,n,!0))||(u=0,a?(e.lineStart(),e.point(b[0][0],b[0][1]),e.point(b[1][0],b[1][1]),e.lineEnd()):(e.point(b[1][0],b[1][1]),e.lineEnd(),e.lineStart(),e.point(b[0][0],b[0][1])))}!m||n&&Tt(n,p)||e.point(p[0],p[1]),n=p,l=m,o=g},lineEnd:function(){l&&e.lineEnd(),n=null},clean:function(){return u|(c&&l)<<1}}}function r(e,t,n){var r=wt(e),i=wt(t),a=[1,0,0],s=kt(r,i),l=xt(s,s),c=s[0],u=l-c*c;if(!u)return!n&&e;var f=o*l/u,d=-o*c/u,h=kt(a,s),p=Ft(a,f),m=Ft(s,d);_t(p,m);var g=h,b=xt(p,g),v=xt(g,g),y=b*b-v*(xt(p,p)-1);if(!(y<0)){var w=Math.sqrt(y),x=Ft(g,(-b-w)/v);if(_t(x,p),x=At(x),!n)return x;var k,_=e[0],F=t[0],C=e[1],A=t[1];F<_&&(k=_,_=F,F=k);var T=F-_,E=_a(T-La)0^x[1]<(_a(x[0]-_)La^(_<=x[0]&&x[0]<=F)){var O=Ft(g,(-b+w)/v);return _t(O,p),[x,At(O)]}}}function i(t,n){var r=a?e:La-e,i=0;return t<-r?i|=1:t>r&&(i|=2),n<-r?i|=4:n>r&&(i|=8),i}var o=Math.cos(e),a=o>0,s=_a(o)>Ba,l=wn(e,6*Ya);return Nt(t,n,l,a?[0,-e]:[-La,e-La])}function Xt(e,t,n,r){return function(i){var o,a=i.a,s=i.b,l=a.x,c=a.y,u=s.x,f=s.y,d=0,h=1,p=u-l,m=f-c;if(o=e-l,p||!(o>0)){if(o/=p,p<0){if(o0){if(o>h)return;o>d&&(d=o)}if(o=n-l,p||!(o<0)){if(o/=p,p<0){if(o>h)return;o>d&&(d=o)}else if(p>0){if(o0)){if(o/=m,m<0){if(o0){if(o>h)return;o>d&&(d=o)}if(o=r-c,m||!(o<0)){if(o/=m,m<0){if(o>h)return;o>d&&(d=o)}else if(m>0){if(o0&&(i.a={x:l+d*p,y:c+d*m}),h<1&&(i.b={x:l+h*p,y:c+h*m}),i}}}}}}function Vt(e,t,n,r){function i(r,i){return _a(r[0]-e)0?0:3:_a(r[0]-n)0?2:1:_a(r[1]-t)0?1:0:i>0?3:2}function o(e,t){return a(e.x,t.x)}function a(e,t){var n=i(e,1),r=i(t,1);return n!==r?n-r:0===n?t[1]-e[1]:1===n?e[0]-t[0]:2===n?e[1]-t[1]:t[0]-e[0]}return function(s){function l(e){for(var t=0,n=g.length,r=e[1],i=0;ir&&ie(c,o,e)>0&&++t:o[1]<=r&&ie(c,o,e)<0&&--t,c=o;return 0!==t}function c(o,s,l,c){var u=0,f=0;if(null==o||(u=i(o,l))!==(f=i(s,l))||a(o,s)<0^l>0){do c.point(0===u||3===u?e:n,u>1?r:t);while((u=(u+l+4)%4)!==f)}else c.point(s[0],s[1])}function u(i,o){return e<=i&&i<=n&&t<=o&&o<=r}function f(e,t){u(e,t)&&s.point(e,t)}function d(){S.point=p,g&&g.push(b=[]),F=!0,_=!1,x=k=NaN}function h(){m&&(p(v,y),w&&_&&T.rejoin(),m.push(T.buffer())),S.point=f,_&&s.lineEnd()}function p(e,t){e=Math.max(-Hs,Math.min(Hs,e)),t=Math.max(-Hs,Math.min(Hs,t));var n=u(e,t);if(g&&b.push([e,t]),F)v=e,y=t,w=n,F=!1,n&&(s.lineStart(),s.point(e,t));else if(n&&_)s.point(e,t);else{var r={a:{x:x,y:k},b:{x:e,y:t}};E(r)?(_||(s.lineStart(),s.point(r.a.x,r.a.y)),s.point(r.b.x,r.b.y),n||s.lineEnd(),C=!1):n&&(s.lineStart(),s.point(e,t),C=!1)}x=e,k=t,_=n}var m,g,b,v,y,w,x,k,_,F,C,A=s,T=Bt(),E=Xt(e,t,n,r),S={point:f,lineStart:d,lineEnd:h,polygonStart:function(){s=T,m=[],g=[],C=!0},polygonEnd:function(){s=A,m=ha.merge(m);var t=l([e,r]),n=C&&t,i=m.length;(n||i)&&(s.polygonStart(),n&&(s.lineStart(),c(null,null,1,s),s.lineEnd()),i&&Pt(m,o,t,c,s),s.polygonEnd()),m=g=b=null}};return S}}function Gt(e){var t=0,n=La/3,r=dn(e),i=r(t,n);return i.parallels=function(e){return arguments.length?r(t=e[0]*La/180,n=e[1]*La/180):[t/La*180,n/La*180]},i}function Kt(e,t){function n(e,t){var n=Math.sqrt(o-2*i*Math.sin(t))/i;return[n*Math.sin(e*=i),a-n*Math.cos(e)]}var r=Math.sin(e),i=(r+Math.sin(t))/2,o=1+r*(2*i-r),a=Math.sqrt(o)/i;return n.invert=function(e,t){var n=a-t;return[Math.atan2(e,n)/i,ae((o-(e*e+n*n)*i*i)/(2*i))]},n}function Jt(){function e(e,t){Ws+=i*e-r*t,r=e,i=t}var t,n,r,i;Ks.point=function(o,a){Ks.point=e,t=r=o,n=i=a},Ks.lineEnd=function(){e(t,n)}}function Zt(e,t){eVs&&(Vs=e),tGs&&(Gs=t)}function Qt(){function e(e,t){a.push("M",e,",",t,o)}function t(e,t){a.push("M",e,",",t),s.point=n}function n(e,t){a.push("L",e,",",t)}function r(){s.point=e}function i(){a.push("Z")}var o=en(4.5),a=[],s={point:e,lineStart:function(){s.point=t},lineEnd:r,polygonStart:function(){s.lineEnd=i},polygonEnd:function(){s.lineEnd=r,s.point=e},pointRadius:function(e){return o=en(e),s},result:function(){if(a.length){var e=a.join("");return a=[],e}}};return s}function en(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}function tn(e,t){qs+=e,Ds+=t,++zs}function nn(){function e(e,r){var i=e-t,o=r-n,a=Math.sqrt(i*i+o*o);Ps+=a*(t+e)/2,Rs+=a*(n+r)/2,Is+=a,tn(t=e,n=r)}var t,n;Zs.point=function(r,i){Zs.point=e,tn(t=r,n=i)}}function rn(){Zs.point=tn}function on(){function e(e,t){var n=e-r,o=t-i,a=Math.sqrt(n*n+o*o);Ps+=a*(r+e)/2,Rs+=a*(i+t)/2,Is+=a,a=i*e-r*t,Ns+=a*(r+e),js+=a*(i+t),Bs+=3*a,tn(r=e,i=t)}var t,n,r,i;Zs.point=function(o,a){Zs.point=e,tn(t=r=o,n=i=a)},Zs.lineEnd=function(){e(t,n)}}function an(e){function t(t,n){e.moveTo(t+a,n),e.arc(t,n,a,0,Ha)}function n(t,n){e.moveTo(t,n),s.point=r}function r(t,n){e.lineTo(t,n)}function i(){s.point=t}function o(){e.closePath()}var a=4.5,s={point:t,lineStart:function(){s.point=n},lineEnd:i,polygonStart:function(){s.lineEnd=o},polygonEnd:function(){s.lineEnd=i,s.point=t},pointRadius:function(e){return a=e,s},result:A};return s}function sn(e){function t(e){return(s?r:n)(e)}function n(t){return un(t,function(n,r){n=e(n,r),t.point(n[0],n[1])})}function r(t){function n(n,r){n=e(n,r),t.point(n[0],n[1])}function r(){y=NaN,F.point=o,t.lineStart()}function o(n,r){var o=wt([n,r]),a=e(n,r);i(y,w,v,x,k,_,y=a[0],w=a[1],v=n,x=o[0],k=o[1],_=o[2],s,t),t.point(y,w)}function a(){F.point=n,t.lineEnd()}function l(){r(),F.point=c,F.lineEnd=u}function c(e,t){o(f=e,d=t),h=y,p=w,m=x,g=k,b=_,F.point=o}function u(){i(y,w,v,x,k,_,h,p,f,m,g,b,s,t),F.lineEnd=a,a()}var f,d,h,p,m,g,b,v,y,w,x,k,_,F={point:n,lineStart:r,lineEnd:a,polygonStart:function(){t.polygonStart(),F.lineStart=l},polygonEnd:function(){t.polygonEnd(),F.lineStart=r}};return F}function i(t,n,r,s,l,c,u,f,d,h,p,m,g,b){var v=u-t,y=f-n,w=v*v+y*y;if(w>4*o&&g--){var x=s+h,k=l+p,_=c+m,F=Math.sqrt(x*x+k*k+_*_),C=Math.asin(_/=F),A=_a(_a(_)-1)o||_a((v*O+y*M)/w-.5)>.3||s*h+l*p+c*m0&&16,t):Math.sqrt(o)},t}function ln(e){var t=sn(function(t,n){return e([t*Xa,n*Xa])});return function(e){return hn(t(e))}}function cn(e){this.stream=e}function un(e,t){return{point:t,sphere:function(){e.sphere()},lineStart:function(){e.lineStart()},lineEnd:function(){e.lineEnd()},polygonStart:function(){e.polygonStart()},polygonEnd:function(){e.polygonEnd()}}}function fn(e){return dn(function(){return e})()}function dn(e){function t(e){return e=s(e[0]*Ya,e[1]*Ya),[e[0]*d+l,c-e[1]*d]}function n(e){return e=s.invert((e[0]-l)/d,(c-e[1])/d),e&&[e[0]*Xa,e[1]*Xa]}function r(){s=Dt(a=gn(b,v,y),o);var e=o(m,g);return l=h-e[0]*d,c=p+e[1]*d,i()}function i(){return u&&(u.valid=!1,u=null),t}var o,a,s,l,c,u,f=sn(function(e,t){return e=o(e,t),[e[0]*d+l,c-e[1]*d]}),d=150,h=480,p=250,m=0,g=0,b=0,v=0,y=0,w=Ls,x=_,k=null,F=null;return t.stream=function(e){return u&&(u.valid=!1),u=hn(w(a,f(x(e)))),u.valid=!0,u},t.clipAngle=function(e){return arguments.length?(w=null==e?(k=e,Ls):Yt((k=+e)*Ya),i()):k},t.clipExtent=function(e){return arguments.length?(F=e,x=e?Vt(e[0][0],e[0][1],e[1][0],e[1][1]):_,i()):F},t.scale=function(e){return arguments.length?(d=+e,r()):d},t.translate=function(e){return arguments.length?(h=+e[0],p=+e[1],r()):[h,p]},t.center=function(e){return arguments.length?(m=e[0]%360*Ya,g=e[1]%360*Ya,r()):[m*Xa,g*Xa]},t.rotate=function(e){return arguments.length?(b=e[0]%360*Ya,v=e[1]%360*Ya,y=e.length>2?e[2]%360*Ya:0,r()):[b*Xa,v*Xa,y*Xa]},ha.rebind(t,f,"precision"),function(){return o=e.apply(this,arguments),t.invert=o.invert&&n,r()}}function hn(e){return un(e,function(t,n){e.point(t*Ya,n*Ya)})}function pn(e,t){return[e,t]}function mn(e,t){return[e>La?e-Ha:e<-La?e+Ha:e,t]}function gn(e,t,n){return e?t||n?Dt(vn(e),yn(t,n)):vn(e):t||n?yn(t,n):mn}function bn(e){return function(t,n){return t+=e,[t>La?t-Ha:t<-La?t+Ha:t,n]}}function vn(e){var t=bn(e);return t.invert=bn(-e),t}function yn(e,t){function n(e,t){var n=Math.cos(t),s=Math.cos(e)*n,l=Math.sin(e)*n,c=Math.sin(t),u=c*r+s*i;return[Math.atan2(l*o-u*a,s*r-c*i),ae(u*o+l*a)]}var r=Math.cos(e),i=Math.sin(e),o=Math.cos(t),a=Math.sin(t);return n.invert=function(e,t){var n=Math.cos(t),s=Math.cos(e)*n,l=Math.sin(e)*n,c=Math.sin(t),u=c*o-l*a;return[Math.atan2(l*o+c*a,s*r+u*i),ae(u*r-s*i)]},n}function wn(e,t){var n=Math.cos(e),r=Math.sin(e);return function(i,o,a,s){var l=a*t;null!=i?(i=xn(n,i),o=xn(n,o),(a>0?io)&&(i+=a*Ha)):(i=e+a*Ha,o=e-.5*l);for(var c,u=i;a>0?u>o:u0?t<-Wa+Ba&&(t=-Wa+Ba):t>Wa-Ba&&(t=Wa-Ba);var n=a/Math.pow(i(t),o);return[n*Math.sin(o*e),a-n*Math.cos(o*e)]}var r=Math.cos(e),i=function(e){return Math.tan(La/4+e/2)},o=e===t?Math.sin(e):Math.log(r/Math.cos(t))/Math.log(i(t)/i(e)),a=r*Math.pow(i(e),o)/o;return o?(n.invert=function(e,t){var n=a-t,r=re(o)*Math.sqrt(e*e+n*n);return[Math.atan2(e,n)/o,2*Math.atan(Math.pow(a/r,1/o))-Wa]},n):Mn}function On(e,t){function n(e,t){var n=o-t;return[n*Math.sin(i*e),o-n*Math.cos(i*e)]}var r=Math.cos(e),i=e===t?Math.sin(e):(r-Math.cos(t))/(t-e),o=r/i+e;return _a(i)1&&ie(e[n[r-2]],e[n[r-1]],e[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function In(e,t){return e[0]-t[0]||e[1]-t[1]}function Nn(e,t,n){return(n[0]-t[0])*(e[1]-t[1])<(n[1]-t[1])*(e[0]-t[0])}function jn(e,t,n,r){var i=e[0],o=n[0],a=t[0]-i,s=r[0]-o,l=e[1],c=n[1],u=t[1]-l,f=r[1]-c,d=(s*(l-c)-f*(i-o))/(f*a-s*u);return[i+d*a,l+d*u]}function Bn(e){var t=e[0],n=e[e.length-1];return!(t[0]-n[0]||t[1]-n[1])}function $n(){lr(this),this.edge=this.site=this.circle=null}function Ln(e){var t=dl.pop()||new $n;return t.site=e,t}function Hn(e){Qn(e),cl.remove(e),dl.push(e),lr(e)}function Un(e){var t=e.circle,n=t.x,r=t.cy,i={x:n,y:r},o=e.P,a=e.N,s=[e];Hn(e);for(var l=o;l.circle&&_a(n-l.circle.x)Ba)s=s.L;else{if(i=o-Xn(s,a),!(i>Ba)){r>-Ba?(t=s.P,n=s):i>-Ba?(t=s,n=s.N):t=n=s;break}if(!s.R){t=s;break}s=s.R}var l=Ln(e);if(cl.insert(t,l),t||n){if(t===n)return Qn(t),n=Ln(t.site),cl.insert(l,n),l.edge=n.edge=rr(t.site,l.site),Zn(t),void Zn(n);if(!n)return void(l.edge=rr(t.site,l.site));Qn(t),Qn(n);var c=t.site,u=c.x,f=c.y,d=e.x-u,h=e.y-f,p=n.site,m=p.x-u,g=p.y-f,b=2*(d*g-h*m),v=d*d+h*h,y=m*m+g*g,w={x:(g*v-h*y)/b+u,y:(d*y-m*v)/b+f};or(n.edge,c,p,w),l.edge=rr(c,e,null,w),n.edge=rr(e,p,null,w),Zn(t),Zn(n)}}function Yn(e,t){var n=e.site,r=n.x,i=n.y,o=i-t;if(!o)return r;var a=e.P;if(!a)return-(1/0);n=a.site;var s=n.x,l=n.y,c=l-t;if(!c)return s;var u=s-r,f=1/o-1/c,d=u/c;return f?(-d+Math.sqrt(d*d-2*f*(u*u/(-2*c)-l+c/2+i-o/2)))/f+r:(r+s)/2}function Xn(e,t){var n=e.N;if(n)return Yn(n,t);var r=e.site;return r.y===t?r.x:1/0}function Vn(e){this.site=e,this.edges=[]}function Gn(e){for(var t,n,r,i,o,a,s,l,c,u,f=e[0][0],d=e[1][0],h=e[0][1],p=e[1][1],m=ll,g=m.length;g--;)if(o=m[g],o&&o.prepare())for(s=o.edges,l=s.length,a=0;aBa||_a(i-n)>Ba)&&(s.splice(a,0,new ar(ir(o.site,u,_a(r-f)Ba?{x:f,y:_a(t-f)Ba?{x:_a(n-p)Ba?{x:d,y:_a(t-d)Ba?{x:_a(n-h)=-$a)){var h=l*l+c*c,p=u*u+f*f,m=(f*h-c*p)/d,g=(l*p-u*h)/d,f=g+s,b=hl.pop()||new Jn;b.arc=e,b.site=i,b.x=m+a,b.y=f+Math.sqrt(m*m+g*g),b.cy=f,e.circle=b;for(var v=null,y=fl._;y;)if(b.y=s)return;if(d>p){if(o){if(o.y>=c)return}else o={x:g,y:l};n={x:g,y:c}}else{if(o){if(o.y1)if(d>p){if(o){if(o.y>=c)return}else o={x:(l-i)/r,y:l};n={x:(c-i)/r,y:c}}else{if(o){if(o.y=s)return}else o={x:a,y:r*a+i};n={x:s,y:r*s+i}}else{if(o){if(o.xo||f>a||d=w,_=n>=x,F=_<<1|k,C=F+4;Fo&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:kr(n,r)})),o=gl.lastIndex;return o=0&&!(n=ha.interpolators[r](e,t)););return n}function Cr(e,t){var n,r=[],i=[],o=e.length,a=t.length,s=Math.min(e.length,t.length);for(n=0;n=1?1:e(t)}}function Tr(e){return function(t){return 1-e(1-t)}}function Er(e){return function(t){return.5*(t<.5?e(2*t):2-e(2-2*t))}}function Sr(e){return e*e}function Or(e){return e*e*e}function Mr(e){if(e<=0)return 0;if(e>=1)return 1;var t=e*e,n=t*e;return 4*(e<.5?n:3*(e-t)+n-.75)}function qr(e){return function(t){return Math.pow(t,e)}}function Dr(e){return 1-Math.cos(e*Wa)}function zr(e){return Math.pow(2,10*(e-1))}function Pr(e){return 1-Math.sqrt(1-e*e)}function Rr(e,t){var n;return arguments.length<2&&(t=.45),arguments.length?n=t/Ha*Math.asin(1/e):(e=1,n=t/4),function(r){return 1+e*Math.pow(2,-10*r)*Math.sin((r-n)*Ha/t)}}function Ir(e){return e||(e=1.70158),function(t){return t*t*((e+1)*t-e)}}function Nr(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}function jr(e,t){e=ha.hcl(e),t=ha.hcl(t);var n=e.h,r=e.c,i=e.l,o=t.h-n,a=t.c-r,s=t.l-i;return isNaN(a)&&(a=0,r=isNaN(r)?t.c:r),isNaN(o)?(o=0,n=isNaN(n)?t.h:n):o>180?o-=360:o<-180&&(o+=360),function(e){return me(n+o*e,r+a*e,i+s*e)+""}}function Br(e,t){e=ha.hsl(e),t=ha.hsl(t);var n=e.h,r=e.s,i=e.l,o=t.h-n,a=t.s-r,s=t.l-i;return isNaN(a)&&(a=0,r=isNaN(r)?t.s:r),isNaN(o)?(o=0,n=isNaN(n)?t.h:n):o>180?o-=360:o<-180&&(o+=360),function(e){return he(n+o*e,r+a*e,i+s*e)+""}}function $r(e,t){e=ha.lab(e),t=ha.lab(t);var n=e.l,r=e.a,i=e.b,o=t.l-n,a=t.a-r,s=t.b-i;return function(e){return be(n+o*e,r+a*e,i+s*e)+""}}function Lr(e,t){return t-=e,function(n){return Math.round(e+t*n)}}function Hr(e){var t=[e.a,e.b],n=[e.c,e.d],r=Wr(t),i=Ur(t,n),o=Wr(Yr(n,t,-i))||0;t[0]*n[1]180?t+=360:t-e>180&&(e+=360),r.push({i:n.push(Xr(n)+"rotate(",null,")")-2,x:kr(e,t)})):t&&n.push(Xr(n)+"rotate("+t+")")}function Kr(e,t,n,r){e!==t?r.push({i:n.push(Xr(n)+"skewX(",null,")")-2,x:kr(e,t)}):t&&n.push(Xr(n)+"skewX("+t+")")}function Jr(e,t,n,r){if(e[0]!==t[0]||e[1]!==t[1]){var i=n.push(Xr(n)+"scale(",null,",",null,")");r.push({i:i-4,x:kr(e[0],t[0])},{i:i-2,x:kr(e[1],t[1])})}else 1===t[0]&&1===t[1]||n.push(Xr(n)+"scale("+t+")")}function Zr(e,t){var n=[],r=[];return e=ha.transform(e),t=ha.transform(t),Vr(e.translate,t.translate,n,r),Gr(e.rotate,t.rotate,n,r),Kr(e.skew,t.skew,n,r),Jr(e.scale,t.scale,n,r),e=t=null,function(e){for(var t,i=-1,o=r.length;++i=0;)n.push(i[r])}function fi(e,t){for(var n=[e],r=[];null!=(e=n.pop());)if(r.push(e),(o=e.children)&&(i=o.length))for(var i,o,a=-1;++ai&&(r=n,i=t);return r}function ki(e){return e.reduce(_i,0)}function _i(e,t){return e+t[1]}function Fi(e,t){return Ci(e,Math.ceil(Math.log(t.length)/Math.LN2+1))}function Ci(e,t){for(var n=-1,r=+e[0],i=(e[1]-r)/t,o=[];++n<=t;)o[n]=i*n+r;return o}function Ai(e){return[ha.min(e),ha.max(e)]}function Ti(e,t){return e.value-t.value}function Ei(e,t){var n=e._pack_next;e._pack_next=t,t._pack_prev=e,t._pack_next=n,n._pack_prev=t}function Si(e,t){e._pack_next=t,t._pack_prev=e}function Oi(e,t){var n=t.x-e.x,r=t.y-e.y,i=e.r+t.r;return.999*i*i>n*n+r*r}function Mi(e){function t(e){u=Math.min(e.x-e.r,u),f=Math.max(e.x+e.r,f),d=Math.min(e.y-e.r,d),h=Math.max(e.y+e.r,h)}if((n=e.children)&&(c=n.length)){var n,r,i,o,a,s,l,c,u=1/0,f=-(1/0),d=1/0,h=-(1/0);if(n.forEach(qi),r=n[0],r.x=-r.r,r.y=0,t(r),c>1&&(i=n[1],i.x=i.r,i.y=0,t(i),c>2))for(o=n[2],Pi(r,i,o),t(o),Ei(r,o),r._pack_prev=o,Ei(o,i),i=r._pack_next,a=3;a=0;)t=i[o],t.z+=n,t.m+=n,n+=t.s+(r+=t.c)}function $i(e,t,n){return e.a.parent===t.parent?e.a:n}function Li(e){return 1+ha.max(e,function(e){return e.y})}function Hi(e){return e.reduce(function(e,t){return e+t.x},0)/e.length}function Ui(e){var t=e.children;return t&&t.length?Ui(t[0]):e}function Wi(e){var t,n=e.children;return n&&(t=n.length)?Wi(n[t-1]):e}function Yi(e){return{x:e.x,y:e.y,dx:e.dx,dy:e.dy}}function Xi(e,t){var n=e.x+t[3],r=e.y+t[0],i=e.dx-t[1]-t[3],o=e.dy-t[0]-t[2];return i<0&&(n+=i/2,i=0),o<0&&(r+=o/2,o=0),{x:n,y:r,dx:i,dy:o}}function Vi(e){var t=e[0],n=e[e.length-1];return t2?Qi:Ki,l=r?ei:Qr;return a=i(e,t,l,n),s=i(t,e,l,Fr),o}function o(e){return a(e)}var a,s;return o.invert=function(e){return s(e)},o.domain=function(t){return arguments.length?(e=t.map(Number),i()):e},o.range=function(e){return arguments.length?(t=e,i()):t},o.rangeRound=function(e){return o.range(e).interpolate(Lr)},o.clamp=function(e){return arguments.length?(r=e,i()):r},o.interpolate=function(e){return arguments.length?(n=e,i()):n},o.ticks=function(t){return io(e,t)},o.tickFormat=function(t,n){return oo(e,t,n)},o.nice=function(t){return no(e,t),i()},o.copy=function(){return eo(e,t,n,r)},i()}function to(e,t){return ha.rebind(e,t,"range","rangeRound","interpolate","clamp")}function no(e,t){return Ji(e,Zi(ro(e,t)[2])),Ji(e,Zi(ro(e,t)[2])),e}function ro(e,t){null==t&&(t=10);var n=Vi(e),r=n[1]-n[0],i=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),o=t/r*i;return o<=.15?i*=10:o<=.35?i*=5:o<=.75&&(i*=2),n[0]=Math.ceil(n[0]/i)*i,n[1]=Math.floor(n[1]/i)*i+.5*i,n[2]=i,n}function io(e,t){return ha.range.apply(ha,ro(e,t))}function oo(e,t,n){var r=ro(e,t);if(n){var i=ms.exec(n);if(i.shift(),"s"===i[8]){var o=ha.formatPrefix(Math.max(_a(r[0]),_a(r[1])));return i[7]||(i[7]="."+ao(o.scale(r[2]))),i[8]="f",n=ha.format(i.join("")),function(e){return n(o.scale(e))+o.symbol}}i[7]||(i[7]="."+so(i[8],r)),n=i.join("")}else n=",."+ao(r[2])+"f";return ha.format(n)}function ao(e){return-Math.floor(Math.log(e)/Math.LN10+.01)}function so(e,t){var n=ao(t[2]);return e in El?Math.abs(n-ao(Math.max(_a(t[0]),_a(t[1]))))+ +("e"!==e):n-2*("%"===e)}function lo(e,t,n,r){function i(e){return(n?Math.log(e<0?0:e):-Math.log(e>0?0:-e))/Math.log(t)}function o(e){return n?Math.pow(t,e):-Math.pow(t,-e)}function a(t){return e(i(t))}return a.invert=function(t){return o(e.invert(t))},a.domain=function(t){return arguments.length?(n=t[0]>=0,e.domain((r=t.map(Number)).map(i)),a):r},a.base=function(n){return arguments.length?(t=+n,e.domain(r.map(i)),a):t},a.nice=function(){var t=Ji(r.map(i),n?Math:Ol);return e.domain(t),r=t.map(o),a},a.ticks=function(){var e=Vi(r),a=[],s=e[0],l=e[1],c=Math.floor(i(s)),u=Math.ceil(i(l)),f=t%1?2:t;if(isFinite(u-c)){if(n){for(;c0;d--)a.push(o(c)*d);for(c=0;a[c]l;u--);a=a.slice(c,u)}return a},a.tickFormat=function(e,n){if(!arguments.length)return Sl;arguments.length<2?n=Sl:"function"!=typeof n&&(n=ha.format(n));var r=Math.max(1,t*e/a.ticks().length);return function(e){var a=e/o(Math.round(i(e)));return a*t0?i[n-1]:e[0],n0?0:1}function Fo(e,t,n,r,i){var o=e[0]-t[0],a=e[1]-t[1],s=(i?r:-r)/Math.sqrt(o*o+a*a),l=s*a,c=-s*o,u=e[0]+l,f=e[1]+c,d=t[0]+l,h=t[1]+c,p=(u+d)/2,m=(f+h)/2,g=d-u,b=h-f,v=g*g+b*b,y=n-r,w=u*h-d*f,x=(b<0?-1:1)*Math.sqrt(Math.max(0,y*y*v-w*w)),k=(w*b-g*x)/v,_=(-w*g-b*x)/v,F=(w*b+g*x)/v,C=(-w*g+b*x)/v,A=k-p,T=_-m,E=F-p,S=C-m;return A*A+T*T>E*E+S*S&&(k=F,_=C),[[k-l,_-c],[k*n/y,_*n/y]]}function Co(e){function t(t){function a(){c.push("M",o(e(u),s))}for(var l,c=[],u=[],f=-1,d=t.length,h=Me(n),p=Me(r);++f1?e.join("L"):e+"Z"}function To(e){return e.join("L")+"Z"}function Eo(e){for(var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];++t1&&i.push("H",r[0]),i.join("")}function So(e){for(var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];++t1){s=t[1],o=e[l],l++,r+="C"+(i[0]+a[0])+","+(i[1]+a[1])+","+(o[0]-s[0])+","+(o[1]-s[1])+","+o[0]+","+o[1];for(var c=2;c9&&(i=3*t/Math.sqrt(i),a[s]=i*n,a[s+1]=i*r));for(s=-1;++s<=l;)i=(e[Math.min(l,s+1)][0]-e[Math.max(0,s-1)][0])/(6*(1+a[s]*a[s])),o.push([i||0,a[s]*i||0]);return o}function Wo(e){return e.length<3?Ao(e):e[0]+zo(e,Uo(e))}function Yo(e){for(var t,n,r,i=-1,o=e.length;++i0;)d[--s].call(e,a);if(o>=1)return m.event&&m.event.end.call(e,e.__data__,t),--h.count?delete h[r]:delete e[n],1}var l,c,u,f,d,h=e[n]||(e[n]={active:0,count:0}),m=h[r];m||(l=i.time,c=Re(o,0,l),m=h[r]={tween:new p,time:l,timer:c,delay:i.delay,duration:i.duration,ease:i.ease,index:t},i=null,++h.count)}function aa(e,t,n){e.attr("transform",function(e){var r=t(e);return"translate("+(isFinite(r)?r:n(e))+",0)"})}function sa(e,t,n){e.attr("transform",function(e){var r=t(e);return"translate(0,"+(isFinite(r)?r:n(e))+")"})}function la(e){return e.toISOString()}function ca(e,t,n){function r(t){return e(t)}function i(e,n){var r=e[1]-e[0],i=r/n,o=ha.bisect(tc,i);return o==tc.length?[t.year,ro(e.map(function(e){return e/31536e6}),n)[2]]:o?t[i/tc[o-1]1?{floor:function(t){for(;n(t=e.floor(t));)t=ua(t-1);return t},ceil:function(t){for(;n(t=e.ceil(t));)t=ua(+t+1);return t}}:e))},r.ticks=function(e,t){var n=Vi(r.domain()),o=null==e?i(n,10):"number"==typeof e?i(n,e):!e.range&&[{range:e},t];return o&&(e=o[0],t=o[1]),e.range(n[0],ua(+n[1]+1),t<1?1:t)},r.tickFormat=function(){return n},r.copy=function(){return ca(e.copy(),t,n)},to(r,e)}function ua(e){return new Date(e)}function fa(e){return JSON.parse(e.responseText)}function da(e){var t=ga.createRange();return t.selectNode(ga.body),t.createContextualFragment(e.responseText)}var ha={version:"3.5.17"},pa=[].slice,ma=function(e){return pa.call(e)},ga=this.document;if(ga)try{ma(ga.documentElement.childNodes)[0].nodeType}catch(e){ma=function(e){for(var t=e.length,n=new Array(t);t--;)n[t]=e[t];return n}}if(Date.now||(Date.now=function(){return+new Date}),ga)try{ga.createElement("DIV").style.setProperty("opacity",0,"")}catch(e){var ba=this.Element.prototype,va=ba.setAttribute,ya=ba.setAttributeNS,wa=this.CSSStyleDeclaration.prototype,xa=wa.setProperty;ba.setAttribute=function(e,t){va.call(this,e,t+"")},ba.setAttributeNS=function(e,t,n){ya.call(this,e,t,n+"")},wa.setProperty=function(e,t,n){xa.call(this,e,t+"",n)}}ha.ascending=s,ha.descending=function(e,t){return te?1:t>=e?0:NaN},ha.min=function(e,t){var n,r,i=-1,o=e.length;if(1===arguments.length){for(;++i=r){n=r;break}for(;++ir&&(n=r)}else{for(;++i=r){n=r;break}for(;++ir&&(n=r)}return n},ha.max=function(e,t){var n,r,i=-1,o=e.length;if(1===arguments.length){for(;++i=r){n=r;break}for(;++in&&(n=r)}else{for(;++i=r){n=r;break}for(;++in&&(n=r)}return n},ha.extent=function(e,t){var n,r,i,o=-1,a=e.length;if(1===arguments.length){for(;++o=r){n=i=r;break}for(;++or&&(n=r),i=r){n=i=r;break}for(;++or&&(n=r),i1)return a/(u-1)},ha.deviation=function(){var e=ha.variance.apply(this,arguments);return e?Math.sqrt(e):e};var ka=u(s);ha.bisectLeft=ka.left,ha.bisect=ha.bisectRight=ka.right,ha.bisector=function(e){return u(1===e.length?function(t,n){return s(e(t),n)}:e)},ha.shuffle=function(e,t,n){(o=arguments.length)<3&&(n=e.length,o<2&&(t=0));for(var r,i,o=n-t;o;)i=Math.random()*o--|0,r=e[o+t],e[o+t]=e[i+t],e[i+t]=r;return e},ha.permute=function(e,t){for(var n=t.length,r=new Array(n);n--;)r[n]=e[t[n]];return r},ha.pairs=function(e){for(var t,n=0,r=e.length-1,i=e[0],o=new Array(r<0?0:r);n=0;)for(r=e[i],t=r.length;--t>=0;)n[--a]=r[t];return n};var _a=Math.abs;ha.range=function(e,t,n){if(arguments.length<3&&(n=1,arguments.length<2&&(t=e,e=0)),(t-e)/n===1/0)throw new Error("infinite range");var r,i=[],o=d(_a(n)),a=-1;if(e*=o,t*=o,n*=o,n<0)for(;(r=e+n*++a)>t;)i.push(r/o);else for(;(r=e+n*++a)=o.length)return r?r.call(i,a):n?a.sort(n):a;for(var l,c,u,f,d=-1,h=a.length,m=o[s++],g=new p;++d=o.length)return e;var r=[],i=a[n++];return e.forEach(function(e,i){r.push({key:e,values:t(i,n)})}),i?r.sort(function(e,t){return i(e.key,t.key)}):r}var n,r,i={},o=[],a=[];return i.map=function(t,n){return e(n,t,0)},i.entries=function(n){return t(e(ha.map,n,0),0)},i.key=function(e){return o.push(e),i},i.sortKeys=function(e){return a[o.length-1]=e,i},i.sortValues=function(e){return n=e,i},i.rollup=function(e){return r=e,i},i},ha.set=function(e){var t=new k;if(e)for(var n=0,r=e.length;n=0&&(r=e.slice(n+1),e=e.slice(0,n)),e)return arguments.length<2?this[e].on(r):this[e].on(r,t);if(2===arguments.length){if(null==t)for(e in this)this.hasOwnProperty(e)&&this[e].on(r,null);return this}},ha.event=null,ha.requote=function(e){return e.replace(Ta,"\\$&")};var Ta=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,Ea={}.__proto__?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)e[n]=t[n]},Sa=function(e,t){return t.querySelector(e)},Oa=function(e,t){return t.querySelectorAll(e)},Ma=function(e,t){var n=e.matches||e[C(e,"matchesSelector")];return(Ma=function(e,t){return n.call(e,t)})(e,t)};"function"==typeof Sizzle&&(Sa=function(e,t){return Sizzle(e,t)[0]||null},Oa=Sizzle,Ma=Sizzle.matchesSelector),ha.selection=function(){return ha.select(ga.documentElement)};var qa=ha.selection.prototype=[];qa.select=function(e){var t,n,r,i,o=[];e=D(e);for(var a=-1,s=this.length;++a=0&&"xmlns"!==(n=e.slice(0,t))&&(e=e.slice(t+1)),za.hasOwnProperty(n)?{space:za[n],local:e}:e}},qa.attr=function(e,t){if(arguments.length<2){if("string"==typeof e){var n=this.node();return e=ha.ns.qualify(e),e.local?n.getAttributeNS(e.space,e.local):n.getAttribute(e)}for(t in e)this.each(P(t,e[t]));return this}return this.each(P(e,t))},qa.classed=function(e,t){if(arguments.length<2){if("string"==typeof e){var n=this.node(),r=(e=N(e)).length,i=-1;if(t=n.classList){for(;++i=0;)(n=r[i])&&(o&&o!==n.nextSibling&&o.parentNode.insertBefore(n,o),o=n);return this},qa.sort=function(e){e=X.apply(this,arguments);for(var t=-1,n=this.length;++t0&&(t=t.transition().duration(T)),t.call(e.event)}function s(){x&&x.domain(w.range().map(function(e){return(e-F.x)/F.k}).map(w.invert)),_&&_.domain(k.range().map(function(e){return(e-F.y)/F.k}).map(k.invert))}function l(e){E++||e({type:"zoomstart"})}function c(e){s(),e({type:"zoom",scale:F.k,translate:[F.x,F.y]})}function u(e){--E||(e({type:"zoomend"}),g=null)}function f(){function e(){s=1,i(ha.mouse(r),d),c(o)}function n(){f.on(q,null).on(D,null),h(s),u(o)}var r=this,o=P.of(r,arguments),s=0,f=ha.select(a(r)).on(q,e).on(D,n),d=t(ha.mouse(r)),h=ee(r);Wl.call(r),l(o)}function d(){function e(){var e=ha.touches(p);return h=F.k,e.forEach(function(e){e.identifier in g&&(g[e.identifier]=t(e))}),e}function n(){var t=ha.event.target;ha.select(t).on(w,a).on(x,s),k.push(t);for(var n=ha.event.changedTouches,r=0,i=n.length;r1){var u=l[0],f=l[1],d=u[0]-f[0],h=u[1]-f[1];b=d*d+h*h}}function a(){var e,t,n,o,a=ha.touches(p);Wl.call(p);for(var s=0,l=a.length;s=c)return a;if(i)return i=!1,o;var t=u;if(34===e.charCodeAt(t)){for(var n=t;n++=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,gs=ha.map({b:function(e){return e.toString(2)},c:function(e){return String.fromCharCode(e)},o:function(e){return e.toString(8)},x:function(e){return e.toString(16)},X:function(e){return e.toString(16).toUpperCase()},g:function(e,t){return e.toPrecision(t)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},r:function(e,t){return(e=ha.round(e,Be(e,t))).toFixed(Math.max(0,Math.min(20,Be(e*(1+1e-15),t))))}}),bs=ha.time={},vs=Date;Ue.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){ys.setUTCDate.apply(this._,arguments)},setDay:function(){ys.setUTCDay.apply(this._,arguments)},setFullYear:function(){ys.setUTCFullYear.apply(this._,arguments)},setHours:function(){ys.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){ys.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){ys.setUTCMinutes.apply(this._,arguments)},setMonth:function(){ys.setUTCMonth.apply(this._,arguments)},setSeconds:function(){ys.setUTCSeconds.apply(this._,arguments)},setTime:function(){ys.setTime.apply(this._,arguments)}};var ys=Date.prototype;bs.year=We(function(e){return e=bs.day(e),e.setMonth(0,1),e},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e){return e.getFullYear()}),bs.years=bs.year.range,bs.years.utc=bs.year.utc.range,bs.day=We(function(e){var t=new vs(2e3,0);return t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t},function(e,t){e.setDate(e.getDate()+t)},function(e){return e.getDate()-1}),bs.days=bs.day.range,bs.days.utc=bs.day.utc.range,bs.dayOfYear=function(e){var t=bs.year(e);return Math.floor((e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(e,t){t=7-t;var n=bs[e]=We(function(e){return(e=bs.day(e)).setDate(e.getDate()-(e.getDay()+t)%7),e},function(e,t){e.setDate(e.getDate()+7*Math.floor(t))},function(e){var n=bs.year(e).getDay();return Math.floor((bs.dayOfYear(e)+(n+t)%7)/7)-(n!==t)});bs[e+"s"]=n.range,bs[e+"s"].utc=n.utc.range,bs[e+"OfYear"]=function(e){var n=bs.year(e).getDay();return Math.floor((bs.dayOfYear(e)+(n+t)%7)/7)}}),bs.week=bs.sunday,bs.weeks=bs.sunday.range,bs.weeks.utc=bs.sunday.utc.range,bs.weekOfYear=bs.sundayOfYear;var ws={"-":"",_:" ",0:"0"},xs=/^\s*\d+/,ks=/^%/;ha.locale=function(e){return{numberFormat:Le(e),timeFormat:Xe(e)}};var _s=ha.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});ha.format=_s.numberFormat,ha.geo={},pt.prototype={s:0,t:0,add:function(e){mt(e,this.t,Fs),mt(Fs.s,this.s,this),this.s?this.t+=Fs.t:this.s=Fs.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var Fs=new pt;ha.geo.stream=function(e,t){e&&Cs.hasOwnProperty(e.type)?Cs[e.type](e,t):gt(e,t)};var Cs={Feature:function(e,t){gt(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++rh&&(h=t)}function t(t,n){var r=wt([t*Ya,n*Ya]);if(b){var i=kt(b,r),o=[i[1],-i[0],0],a=kt(o,i);Ct(a),a=At(a);var l=t-p,c=l>0?1:-1,m=a[0]*Xa*c,g=_a(l)>180;if(g^(c*ph&&(h=v)}else if(m=(m+360)%360-180,g^(c*ph&&(h=n);g?ts(u,d)&&(d=t):s(t,d)>s(u,d)&&(u=t):d>=u?(td&&(d=t)):t>p?s(u,t)>s(u,d)&&(d=t):s(t,d)>s(u,d)&&(u=t)}else e(t,n);b=r,p=t}function n(){x.point=t}function r(){w[0]=u,w[1]=d,x.point=e,b=null}function i(e,n){if(b){var r=e-p;v+=_a(r)>180?r+(r>0?360:-360):r}else m=e,g=n;Ss.point(e,n),t(e,n)}function o(){Ss.lineStart()}function a(){i(m,g),Ss.lineEnd(),_a(v)>Ba&&(u=-(d=180)),w[0]=u,w[1]=d,b=null}function s(e,t){return(t-=e)<0?t+360:t}function l(e,t){return e[0]-t[0]}function c(e,t){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:eBa?h=90:v<-Ba&&(f=-90),w[0]=u,w[1]=d}};return function(e){h=d=-(u=f=1/0),y=[],ha.geo.stream(e,x);var t=y.length;if(t){y.sort(l);for(var n,r=1,i=y[0],o=[i];rs(i[0],i[1])&&(i[1]=n[1]),s(n[0],i[1])>s(i[0],i[1])&&(i[0]=n[0])):o.push(i=n);for(var a,n,p=-(1/0),t=o.length-1,r=0,i=o[t];r<=t;i=n,++r)n=o[r],(a=s(i[1],n[0]))>p&&(p=a,u=n[0],d=i[1])}return y=w=null,u===1/0||f===1/0?[[NaN,NaN],[NaN,NaN]]:[[u,f],[d,h]]}}(),ha.geo.centroid=function(e){Os=Ms=qs=Ds=zs=Ps=Rs=Is=Ns=js=Bs=0,ha.geo.stream(e,$s);var t=Ns,n=js,r=Bs,i=t*t+n*n+r*r;return i<$a&&(t=Ps,n=Rs,r=Is,Ms=.12&&i<.234&&r>=-.425&&r<-.214?a:i>=.166&&i<.234&&r>=-.214&&r<-.115?s:o).invert(e)},e.stream=function(e){var t=o.stream(e),n=a.stream(e),r=s.stream(e);return{point:function(e,i){t.point(e,i),n.point(e,i),r.point(e,i)},sphere:function(){t.sphere(),n.sphere(),r.sphere()},lineStart:function(){t.lineStart(),n.lineStart(),r.lineStart()},lineEnd:function(){t.lineEnd(),n.lineEnd(),r.lineEnd()},polygonStart:function(){t.polygonStart(),n.polygonStart(),r.polygonStart()},polygonEnd:function(){t.polygonEnd(),n.polygonEnd(),r.polygonEnd()}}},e.precision=function(t){return arguments.length?(o.precision(t),a.precision(t),s.precision(t),e):o.precision()},e.scale=function(t){return arguments.length?(o.scale(t),a.scale(.35*t),s.scale(t),e.translate(o.translate())):o.scale()},e.translate=function(t){if(!arguments.length)return o.translate();var c=o.scale(),u=+t[0],f=+t[1];return n=o.translate(t).clipExtent([[u-.455*c,f-.238*c],[u+.455*c,f+.238*c]]).stream(l).point,r=a.translate([u-.307*c,f+.201*c]).clipExtent([[u-.425*c+Ba,f+.12*c+Ba],[u-.214*c-Ba,f+.234*c-Ba]]).stream(l).point,i=s.translate([u-.205*c,f+.212*c]).clipExtent([[u-.214*c+Ba,f+.166*c+Ba],[u-.115*c-Ba,f+.234*c-Ba]]).stream(l).point,e},e.scale(1070)};var Us,Ws,Ys,Xs,Vs,Gs,Ks={point:A,lineStart:A,lineEnd:A,polygonStart:function(){Ws=0,Ks.lineStart=Jt},polygonEnd:function(){Ks.lineStart=Ks.lineEnd=Ks.point=A,Us+=_a(Ws/2)}},Js={point:Zt,lineStart:A,lineEnd:A,polygonStart:A,polygonEnd:A},Zs={point:tn,lineStart:nn,lineEnd:rn,polygonStart:function(){Zs.lineStart=on},polygonEnd:function(){Zs.point=tn,Zs.lineStart=nn,Zs.lineEnd=rn}};ha.geo.path=function(){function e(e){return e&&("function"==typeof s&&o.pointRadius(+s.apply(this,arguments)),a&&a.valid||(a=i(o)),ha.geo.stream(e,a)),o.result()}function t(){return a=null,e}var n,r,i,o,a,s=4.5;return e.area=function(e){return Us=0,ha.geo.stream(e,i(Ks)),Us},e.centroid=function(e){return qs=Ds=zs=Ps=Rs=Is=Ns=js=Bs=0,ha.geo.stream(e,i(Zs)),Bs?[Ns/Bs,js/Bs]:Is?[Ps/Is,Rs/Is]:zs?[qs/zs,Ds/zs]:[NaN,NaN]},e.bounds=function(e){return Vs=Gs=-(Ys=Xs=1/0),ha.geo.stream(e,i(Js)),[[Ys,Xs],[Vs,Gs]]},e.projection=function(e){return arguments.length?(i=(n=e)?e.stream||ln(e):_,t()):n},e.context=function(e){return arguments.length?(o=null==(r=e)?new Qt:new an(e),"function"!=typeof s&&o.pointRadius(s),t()):r},e.pointRadius=function(t){return arguments.length?(s="function"==typeof t?t:(o.pointRadius(+t),+t),e):s},e.projection(ha.geo.albersUsa()).context(null)},ha.geo.transform=function(e){return{stream:function(t){var n=new cn(t);for(var r in e)n[r]=e[r];return n}}},cn.prototype={point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},ha.geo.projection=fn,ha.geo.projectionMutator=dn,(ha.geo.equirectangular=function(){return fn(pn)}).raw=pn.invert=pn,ha.geo.rotation=function(e){function t(t){return t=e(t[0]*Ya,t[1]*Ya),t[0]*=Xa,t[1]*=Xa,t}return e=gn(e[0]%360*Ya,e[1]*Ya,e.length>2?e[2]*Ya:0),t.invert=function(t){return t=e.invert(t[0]*Ya,t[1]*Ya),t[0]*=Xa,t[1]*=Xa,t},t},mn.invert=pn,ha.geo.circle=function(){function e(){var e="function"==typeof r?r.apply(this,arguments):r,t=gn(-e[0]*Ya,-e[1]*Ya,0).invert,i=[];return n(null,null,1,{point:function(e,n){i.push(e=t(e,n)),e[0]*=Xa,e[1]*=Xa}}),{type:"Polygon",coordinates:[i]}}var t,n,r=[0,0],i=6;return e.origin=function(t){return arguments.length?(r=t,e):r},e.angle=function(r){return arguments.length?(n=wn((t=+r)*Ya,i*Ya),e):t},e.precision=function(r){return arguments.length?(n=wn(t*Ya,(i=+r)*Ya),e):i},e.angle(90)},ha.geo.distance=function(e,t){var n,r=(t[0]-e[0])*Ya,i=e[1]*Ya,o=t[1]*Ya,a=Math.sin(r),s=Math.cos(r),l=Math.sin(i),c=Math.cos(i),u=Math.sin(o),f=Math.cos(o);return Math.atan2(Math.sqrt((n=f*a)*n+(n=c*u-l*f*s)*n),l*u+c*f*s)},ha.geo.graticule=function(){function e(){return{type:"MultiLineString",coordinates:t()}}function t(){return ha.range(Math.ceil(o/g)*g,i,g).map(d).concat(ha.range(Math.ceil(c/b)*b,l,b).map(h)).concat(ha.range(Math.ceil(r/p)*p,n,p).filter(function(e){return _a(e%g)>Ba}).map(u)).concat(ha.range(Math.ceil(s/m)*m,a,m).filter(function(e){return _a(e%b)>Ba}).map(f))}var n,r,i,o,a,s,l,c,u,f,d,h,p=10,m=p,g=90,b=360,v=2.5;return e.lines=function(){return t().map(function(e){return{type:"LineString",coordinates:e}})},e.outline=function(){return{type:"Polygon",coordinates:[d(o).concat(h(l).slice(1),d(i).reverse().slice(1),h(c).reverse().slice(1))]}},e.extent=function(t){return arguments.length?e.majorExtent(t).minorExtent(t):e.minorExtent()},e.majorExtent=function(t){return arguments.length?(o=+t[0][0],i=+t[1][0],c=+t[0][1],l=+t[1][1],o>i&&(t=o,o=i,i=t),c>l&&(t=c,c=l,l=t),e.precision(v)):[[o,c],[i,l]]},e.minorExtent=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],s=+t[0][1],a=+t[1][1],r>n&&(t=r,r=n,n=t),s>a&&(t=s,s=a,a=t),e.precision(v)):[[r,s],[n,a]]},e.step=function(t){return arguments.length?e.majorStep(t).minorStep(t):e.minorStep()},e.majorStep=function(t){return arguments.length?(g=+t[0],b=+t[1],e):[g,b]},e.minorStep=function(t){return arguments.length?(p=+t[0],m=+t[1],e):[p,m]},e.precision=function(t){return arguments.length?(v=+t,u=kn(s,a,90),f=_n(r,n,v),d=kn(c,l,90),h=_n(o,i,v),e):v},e.majorExtent([[-180,-90+Ba],[180,90-Ba]]).minorExtent([[-180,-80-Ba],[180,80+Ba]])},ha.geo.greatArc=function(){function e(){return{type:"LineString",coordinates:[t||r.apply(this,arguments),n||i.apply(this,arguments)]}}var t,n,r=Fn,i=Cn;return e.distance=function(){return ha.geo.distance(t||r.apply(this,arguments),n||i.apply(this,arguments))},e.source=function(n){return arguments.length?(r=n,t="function"==typeof n?null:n,e):r},e.target=function(t){return arguments.length?(i=t,n="function"==typeof t?null:t,e):i},e.precision=function(){return arguments.length?e:0},e},ha.geo.interpolate=function(e,t){return An(e[0]*Ya,e[1]*Ya,t[0]*Ya,t[1]*Ya)},ha.geo.length=function(e){return Qs=0,ha.geo.stream(e,el),Qs};var Qs,el={sphere:A,point:A,lineStart:Tn,lineEnd:A,polygonStart:A,polygonEnd:A},tl=En(function(e){return Math.sqrt(2/(1+e))},function(e){return 2*Math.asin(e/2)});(ha.geo.azimuthalEqualArea=function(){return fn(tl)}).raw=tl;var nl=En(function(e){var t=Math.acos(e);return t&&t/Math.sin(t)},_);(ha.geo.azimuthalEquidistant=function(){return fn(nl)}).raw=nl,(ha.geo.conicConformal=function(){return Gt(Sn)}).raw=Sn,(ha.geo.conicEquidistant=function(){return Gt(On)}).raw=On;var rl=En(function(e){return 1/e},Math.atan);(ha.geo.gnomonic=function(){return fn(rl)}).raw=rl,Mn.invert=function(e,t){return[e,2*Math.atan(Math.exp(t))-Wa]},(ha.geo.mercator=function(){return qn(Mn)}).raw=Mn;var il=En(function(){return 1},Math.asin);(ha.geo.orthographic=function(){return fn(il)}).raw=il;var ol=En(function(e){return 1/(1+e)},function(e){return 2*Math.atan(e)});(ha.geo.stereographic=function(){return fn(ol)}).raw=ol,Dn.invert=function(e,t){return[-t,2*Math.atan(Math.exp(e))-Wa]},(ha.geo.transverseMercator=function(){var e=qn(Dn),t=e.center,n=e.rotate;return e.center=function(e){return e?t([-e[1],e[0]]):(e=t(),[e[1],-e[0]])},e.rotate=function(e){return e?n([e[0],e[1],e.length>2?e[2]+90:90]):(e=n(),[e[0],e[1],e[2]-90])},n([0,0,90])}).raw=Dn,ha.geom={},ha.geom.hull=function(e){function t(e){if(e.length<3)return[];var t,i=Me(n),o=Me(r),a=e.length,s=[],l=[];for(t=0;t=0;--t)h.push(e[s[c[t]][2]]);for(t=+f;t=r&&c.x<=o&&c.y>=i&&c.y<=a?[[r,a],[o,a],[o,i],[r,i]]:[];u.point=e[s]}),t}function n(e){return e.map(function(e,t){return{x:Math.round(o(e,t)/Ba)*Ba,y:Math.round(a(e,t)/Ba)*Ba,i:t}})}var r=zn,i=Pn,o=r,a=i,s=pl;return e?t(e):(t.links=function(e){return dr(n(e)).edges.filter(function(e){return e.l&&e.r}).map(function(t){return{source:e[t.l.i],target:e[t.r.i]}})},t.triangles=function(e){var t=[];return dr(n(e)).cells.forEach(function(n,r){for(var i,o,a=n.site,s=n.edges.sort(Kn),l=-1,c=s.length,u=s[c-1].edge,f=u.l===a?u.r:u.l;++l=c,d=r>=u,h=d<<1|f;e.leaf=!1,e=e.nodes[h]||(e.nodes[h]=br()),f?i=c:s=c,d?a=u:l=u,o(e,t,n,r,i,a,s,l)}var u,f,d,h,p,m,g,b,v,y=Me(s),w=Me(l);if(null!=t)m=t,g=n,b=r,v=i;else if(b=v=-(m=g=1/0),f=[],d=[],p=e.length,a)for(h=0;hb&&(b=u.x),u.y>v&&(v=u.y),f.push(u.x),d.push(u.y);else for(h=0;hb&&(b=x),k>v&&(v=k),f.push(x),d.push(k)}var _=b-m,F=v-g;_>F?v=g+_:b=m+F;var C=br();if(C.add=function(e){o(C,e,+y(e,++h),+w(e,h),m,g,b,v)},C.visit=function(e){vr(e,C,m,g,b,v)},C.find=function(e){return yr(C,e[0],e[1],m,g,b,v)},h=-1,null==t){for(;++h=0?e.slice(0,t):e,r=t>=0?e.slice(t+1):"in";return n=vl.get(n)||bl,r=yl.get(r)||_,Ar(r(n.apply(null,pa.call(arguments,1))))},ha.interpolateHcl=jr,ha.interpolateHsl=Br,ha.interpolateLab=$r,ha.interpolateRound=Lr,ha.transform=function(e){var t=ga.createElementNS(ha.ns.prefix.svg,"g");return(ha.transform=function(e){if(null!=e){t.setAttribute("transform",e);var n=t.transform.baseVal.consolidate()}return new Hr(n?n.matrix:wl)})(e)},Hr.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var wl={a:1,b:0,c:0,d:1,e:0,f:0};ha.interpolateTransform=Zr,ha.layout={},ha.layout.bundle=function(){return function(e){for(var t=[],n=-1,r=e.length;++n0?i=e:(n.c=null,n.t=NaN,n=null,c.end({type:"end",alpha:i=0})):e>0&&(c.start({type:"start",alpha:i=e}),n=Re(l.tick)),l):i},l.start=function(){function e(e,r){if(!n){for(n=new Array(i),l=0;l=0;)a.push(u=c[l]),u.parent=o,u.depth=o.depth+1;r&&(o.value=0),o.children=c}else r&&(o.value=+r.call(e,o,o.depth)||0),delete o.children;return fi(i,function(e){var n,i;t&&(n=e.children)&&n.sort(t),r&&(i=e.parent)&&(i.value+=e.value)}),s}var t=pi,n=di,r=hi;return e.sort=function(n){return arguments.length?(t=n,e):t},e.children=function(t){return arguments.length?(n=t,e):n},e.value=function(t){return arguments.length?(r=t,e):r},e.revalue=function(t){return r&&(ui(t,function(e){e.children&&(e.value=0)}),fi(t,function(t){var n;t.children||(t.value=+r.call(e,t,t.depth)||0),(n=t.parent)&&(n.value+=t.value)})),t},e},ha.layout.partition=function(){function e(t,n,r,i){var o=t.children;if(t.x=n,t.y=t.depth*i,t.dx=r,t.dy=i,o&&(a=o.length)){var a,s,l,c=-1;for(r=t.value?r/t.value:0;++cs&&(s=r),a.push(r)}for(n=0;n0)for(o=-1;++o=u[0]&&s<=u[1]&&(a=l[ha.bisect(f,s,1,h)-1],a.y+=p,a.push(e[o]));return l}var t=!0,n=Number,r=Ai,i=Fi;return e.value=function(t){return arguments.length?(n=t,e):n},e.range=function(t){return arguments.length?(r=Me(t),e):r},e.bins=function(t){return arguments.length?(i="number"==typeof t?function(e){return Ci(e,t)}:Me(t),e):i},e.frequency=function(n){return arguments.length?(t=!!n,e):t},e},ha.layout.pack=function(){function e(e,o){var a=n.call(this,e,o),s=a[0],l=i[0],c=i[1],u=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(s.x=s.y=0,fi(s,function(e){e.r=+u(e.value)}),fi(s,Mi),r){var f=r*(t?1:Math.max(2*s.r/l,2*s.r/c))/2;fi(s,function(e){e.r+=f}),fi(s,Mi),fi(s,function(e){e.r-=f})}return zi(s,l/2,c/2,t?1:1/Math.max(2*s.r/l,2*s.r/c)),a}var t,n=ha.layout.hierarchy().sort(Ti),r=0,i=[1,1];return e.size=function(t){return arguments.length?(i=t,e):i},e.radius=function(n){return arguments.length?(t=null==n||"function"==typeof n?n:+n,e):t},e.padding=function(t){return arguments.length?(r=+t,e):r},ci(e,n)},ha.layout.tree=function(){function e(e,i){var u=a.call(this,e,i),f=u[0],d=t(f);if(fi(d,n),d.parent.m=-d.z,ui(d,r),c)ui(f,o);else{var h=f,p=f,m=f;ui(f,function(e){e.xp.x&&(p=e),e.depth>m.depth&&(m=e)});var g=s(h,p)/2-h.x,b=l[0]/(p.x+s(p,h)/2+g),v=l[1]/(m.depth||1);ui(f,function(e){e.x=(e.x+g)*b,e.y=e.depth*v})}return u}function t(e){for(var t,n={A:null,children:[e]},r=[n];null!=(t=r.pop());)for(var i,o=t.children,a=0,s=o.length;a0&&(ji($i(a,e,n),e,r),c+=r,u+=r),f+=a.m,c+=i.m,d+=l.m,u+=o.m;a&&!Ni(o)&&(o.t=a,o.m+=f-u),i&&!Ii(l)&&(l.t=i,l.m+=c-d,n=e)}return n}function o(e){e.x*=l[0],e.y=e.depth*l[1]}var a=ha.layout.hierarchy().sort(null).value(null),s=Ri,l=[1,1],c=null;return e.separation=function(t){return arguments.length?(s=t,e):s},e.size=function(t){return arguments.length?(c=null==(l=t)?o:null,e):c?null:l},e.nodeSize=function(t){return arguments.length?(c=null==(l=t)?null:o,e):c?l:null},ci(e,a)},ha.layout.cluster=function(){function e(e,o){var a,s=t.call(this,e,o),l=s[0],c=0;fi(l,function(e){var t=e.children;t&&t.length?(e.x=Hi(t),e.y=Li(t)):(e.x=a?c+=n(e,a):0,e.y=0,a=e)});var u=Ui(l),f=Wi(l),d=u.x-n(u,f)/2,h=f.x+n(f,u)/2;return fi(l,i?function(e){e.x=(e.x-l.x)*r[0],e.y=(l.y-e.y)*r[1]}:function(e){e.x=(e.x-d)/(h-d)*r[0],e.y=(1-(l.y?e.y/l.y:1))*r[1]}),s}var t=ha.layout.hierarchy().sort(null).value(null),n=Ri,r=[1,1],i=!1;return e.separation=function(t){return arguments.length?(n=t,e):n},e.size=function(t){return arguments.length?(i=null==(r=t),e):i?null:r},e.nodeSize=function(t){return arguments.length?(i=null!=(r=t),e):i?r:null},ci(e,t)},ha.layout.treemap=function(){function e(e,t){for(var n,r,i=-1,o=e.length;++i0;)u.push(a=d[l-1]),u.area+=a.area,"squarify"!==h||(s=r(u,m))<=p?(d.pop(),p=s):(u.area-=u.pop().area,i(u,m,c,!1),m=Math.min(c.dx,c.dy),u.length=u.area=0,p=1/0);u.length&&(i(u,m,c,!0),u.length=u.area=0),o.forEach(t)}}function n(t){var r=t.children;if(r&&r.length){var o,a=f(t),s=r.slice(),l=[];for(e(s,a.dx*a.dy/t.value),l.area=0;o=s.pop();)l.push(o),l.area+=o.area,null!=o.z&&(i(l,o.z?a.dx:a.dy,a,!s.length),l.length=l.area=0);r.forEach(n)}}function r(e,t){for(var n,r=e.area,i=0,o=1/0,a=-1,s=e.length;++ai&&(i=n));return r*=r,t*=t,r?Math.max(t*i*p/r,r/(t*o*p)):1/0}function i(e,t,n,r){var i,o=-1,a=e.length,s=n.x,c=n.y,u=t?l(e.area/t):0;if(t==n.dx){for((r||u>n.dy)&&(u=n.dy);++on.dx)&&(u=n.dx);++o1);return e+t*n*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var e=ha.random.normal.apply(ha,arguments);return function(){return Math.exp(e())}},bates:function(e){var t=ha.random.irwinHall(e);return function(){return t()/e}},irwinHall:function(e){return function(){for(var t=0,n=0;nf?0:1;if(c=Ua)return t(c,h)+(e?t(e,1-h):"")+"Z";var p,m,g,b,v,y,w,x,k,_,F,C,A=0,T=0,E=[];if((b=(+l.apply(this,arguments)||0)/2)&&(g=o===Pl?Math.sqrt(e*e+c*c):+o.apply(this,arguments),h||(T*=-1),c&&(T=ae(g/c*Math.sin(b))),e&&(A=ae(g/e*Math.sin(b)))),c){v=c*Math.cos(u+T),y=c*Math.sin(u+T),w=c*Math.cos(f-T),x=c*Math.sin(f-T);var S=Math.abs(f-u-2*T)<=La?0:1;if(T&&_o(v,y,w,x)===h^S){var O=(u+f)/2;v=c*Math.cos(O),y=c*Math.sin(O),w=x=null}}else v=y=0;if(e){k=e*Math.cos(f-A),_=e*Math.sin(f-A),F=e*Math.cos(u+A),C=e*Math.sin(u+A);var M=Math.abs(u-f+2*A)<=La?0:1;if(A&&_o(k,_,F,C)===1-h^M){var q=(u+f)/2;k=e*Math.cos(q),_=e*Math.sin(q),F=C=null}}else k=_=0;if(d>Ba&&(p=Math.min(Math.abs(c-e)/2,+i.apply(this,arguments)))>.001){m=eLa)+",1 "+t}function i(e,t,n,r){return"Q 0,0 "+r}var o=Fn,a=Cn,s=Vo,l=wo,c=xo;return e.radius=function(t){return arguments.length?(s=Me(t),e):s},e.source=function(t){return arguments.length?(o=Me(t),e):o},e.target=function(t){return arguments.length?(a=Me(t),e):a},e.startAngle=function(t){return arguments.length?(l=Me(t),e):l},e.endAngle=function(t){return arguments.length?(c=Me(t),e):c},e},ha.svg.diagonal=function(){function e(e,i){var o=t.call(this,e,i),a=n.call(this,e,i),s=(o.y+a.y)/2,l=[o,{x:o.x,y:s},{x:a.x,y:s},a];return l=l.map(r),"M"+l[0]+"C"+l[1]+" "+l[2]+" "+l[3]}var t=Fn,n=Cn,r=Go;return e.source=function(n){return arguments.length?(t=Me(n),e):t},e.target=function(t){return arguments.length?(n=Me(t),e):n},e.projection=function(t){return arguments.length?(r=t,e):r},e},ha.svg.diagonal.radial=function(){var e=ha.svg.diagonal(),t=Go,n=e.projection;return e.projection=function(e){return arguments.length?n(Ko(t=e)):t},e},ha.svg.symbol=function(){function e(e,r){return(Bl.get(t.call(this,e,r))||Qo)(n.call(this,e,r))}var t=Zo,n=Jo;return e.type=function(n){return arguments.length?(t=Me(n),e):t},e.size=function(t){return arguments.length?(n=Me(t),e):n},e};var Bl=ha.map({circle:Qo,cross:function(e){var t=Math.sqrt(e/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(e){var t=Math.sqrt(e/(2*Ll)),n=t*Ll;return"M0,"+-t+"L"+n+",0 0,"+t+" "+-n+",0Z"},square:function(e){var t=Math.sqrt(e)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(e){var t=Math.sqrt(e/$l),n=t*$l/2;return"M0,"+n+"L"+t+","+-n+" "+-t+","+-n+"Z"},"triangle-up":function(e){var t=Math.sqrt(e/$l),n=t*$l/2;return"M0,"+-n+"L"+t+","+n+" "+-t+","+n+"Z"}});ha.svg.symbolTypes=Bl.keys();var $l=Math.sqrt(3),Ll=Math.tan(30*Ya);qa.transition=function(e){for(var t,n,r=Hl||++Xl,i=ia(e),o=[],a=Ul||{time:Date.now(),ease:Mr,delay:0,duration:250},s=-1,l=this.length;++srect,.s>rect").attr("width",f[1]-f[0])}function r(e){e.select(".extent").attr("y",d[0]),e.selectAll(".extent,.e>rect,.w>rect").attr("height",d[1]-d[0])}function i(){function i(){32==ha.event.keyCode&&(E||(y=null,M[0]-=f[1],M[1]-=d[1], +E=2),S())}function m(){32==ha.event.keyCode&&2==E&&(M[0]+=f[1],M[1]+=d[1],E=0,S())}function g(){var e=ha.mouse(x),i=!1;w&&(e[0]+=w[0],e[1]+=w[1]),E||(ha.event.altKey?(y||(y=[(f[0]+f[1])/2,(d[0]+d[1])/2]),M[0]=f[+(e[0]-1?i.splice(o,1):i.push(r),i.sort(),console.log("toggled selection "+n+"."+r+" ("+i.length+")"),i.length<5&&console.log(JSON.stringify(i)),e.filter_selection.put(n,i),e.selectAll.put(n,!1)},r.resetSelectedFilterValue=function(e,t){e.filter_selection.put(t.dim,null)},r.render=function(e,t,n,r){return o("div.dropdown",[o("button",{"ev-click":i.send(e.channels.setModal,t)},[n]),e.modal===t?r:null])},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){function t(t,n,r,i){var o=Object.create({});o["axis[]"]=t;for(var l in r)o["filter."+l+"[]"]=r[l];for(var l in i)i[l][0]&&(o["filter."+l+".gt"]=s(i[l][0])),i[l][1]&&(o["filter."+l+".lt"]=s(i[l][1]));return e+"/aggregate/"+encodeURIComponent(n)+".csv?"+a.stringify(o)}return e=e||"/api/cfrp",{domain:function(t,n){o.csv(e+"/aggregate/default.csv?"+a.stringify({"axis[]":t}),function(e,r){return e?console.error(e):(r=r.map(function(e){return i.parse(t)(e[t])}),void n(r))})},url:t,summarize:function(e,n,r,a,s){var l=t(e,n,r,a);o.csv(l,function(e,t){t&&(t=t.map(function(e){for(var t in e)e[t]=i.parse(t)(e[t]);return e})),s(e,t)})}}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=n(7),a=n(32),s=o.time.format("%Y-%m-%d");t.default=r,e.exports=t.default},function(e,t,n){function r(e){function t(e,t,o){var a={fn:e,data:void 0!==t?t:{},opts:o||{},handleEvent:r};return e&&"dom-delegator-handle"===e.type?i.transformHandle(e,n.bind(a)):a}function n(t,n){return this.opts.startPropagation&&t.startPropagation&&t.startPropagation(),e.call(this,t,n)}function r(t){function n(e){"function"==typeof r.fn?r.fn(e):r.fn.write(e)}var r=this;r.opts.startPropagation&&t.startPropagation&&t.startPropagation(),e.call(r,t,n)}return t}var i=n(45);e.exports=r},function(e,t){function n(e){return e&&"Widget"===e.type}e.exports=n},function(e,t,n){(function(t){var r="undefined"!=typeof t?t:"undefined"!=typeof window?window:{},i=n(214);if("undefined"!=typeof document)e.exports=document;else{var o=r["__GLOBAL_DOCUMENT_CACHE@4"];o||(o=r["__GLOBAL_DOCUMENT_CACHE@4"]=i),e.exports=o}}).call(t,function(){return this}())},function(e,t){function n(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0,enumerable:!1})}e.exports=n},function(e,t){function n(e){function t(t){return t?(n.push(t),function(){n.splice(n.indexOf(t),1)}):e}var n=[];return e=void 0===e?null:e,t.set=function(t){e=t,n.forEach(function(e){e(t)})},t}e.exports=n},function(e,t,n){function r(e){return e&&"VirtualNode"===e.type&&e.version===i}var i=n(18);e.exports=r},function(e,t){e.exports="2"},function(e,t,n){"use strict";function r(e){var t=e[a];return t||(t=e[a]={}),t}var i=n(116),o="7";i("ev-store",o);var a="__EV_STORE_KEY@"+o;e.exports=r},function(e,t){e.exports={en:{dot1:"Crosstab",dot2:"Crosstab + Calendar",dot3:"Calendar + Register",pane_selector_button_1:"Crosstab",pane_selector_button_2:"Calendar",pane_selector_button_3:"Resgistry",download:"Download in format"},fr:{dot1:"Tableau croisé",dot2:"Tableau croisé + Calendrier",dot3:"Calendrier + Registre",pane_selector_button_1:"Tableau Croisé",pane_selector_button_2:"Calendrier",pane_selector_button_3:"Registre",sum_receipts:"{agg} Livres est la somme des recettes {cols} {rows}",performances_days:"{agg} est le nombre de représentations par jour {cols} {rows}",mean_receipts_day:"{agg} Livres est la moyenne des recettes par jour {cols} {rows}",mean_price:"{agg} Livres est la moyenne du prix des places {cols} {rows}",currency:"Livres",cancel:"Annuler",ok:"OK",calendar_tool_caption:"Changement d'outil",calendar_tool_message:"Le passage de l'outil de comparaison à l'outil calendrier implique la reprise des sélections faites précédemment dans le premier outil. Tous les nouveaux choix de critères faits dans l'outil calendrier ne seront pas pris en compte.",download:"Télécharger au format"}}},function(e,t,n){function r(e,t){var n=e._list;return t(function(r){var o=e().slice(),a=n.indexOf(t);if(a===-1){var s="observ-array: Unremoved observ listener",l=new Error(s);throw l.list=n,l.index=a,l.observ=t,l}o.splice(a,1,r),i(o,"_diff",[[a,1,r]]),e._observSet(o)})}var i=n(15);e.exports=r},function(e,t,n){"use strict";function r(e,t,n){var r,a,l,c,u=[];return!n&&s(t)&&(n=t,a={}),a=a||t||{},r=v(e,a),a.hasOwnProperty("key")&&(l=a.key,a.key=void 0),a.hasOwnProperty("namespace")&&(c=a.namespace,a.namespace=void 0),"INPUT"!==r||c||!a.hasOwnProperty("value")||void 0===a.value||g(a.value)||(a.value=y(a.value)),o(a),void 0!==n&&null!==n&&i(n,u,r,a),new f(r,a,u,l,c)}function i(e,t,n,r){if("string"==typeof e)t.push(new d(e));else if("number"==typeof e)t.push(new d(String(e)));else if(a(e))t.push(e);else{if(!u(e)){if(null===e||void 0===e)return;throw l({foreignObject:e,parentVnode:{tagName:n,properties:r}})}for(var o=0;o0&&t-1 in e)}function s(e,t,n){if(ce.isFunction(t))return ce.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return ce.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(ye.test(t))return ce.filter(t,e,n);t=ce.filter(t,e)}return ce.grep(e,function(e){return re.call(t,e)>-1!==n})}function l(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function c(e){var t={};return ce.each(e.match(Ce)||[],function(e,n){t[n]=!0}),t}function u(){Q.removeEventListener("DOMContentLoaded",u),n.removeEventListener("load",u),ce.ready()}function f(){this.expando=ce.expando+f.uid++}function d(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(qe,"-$&").toLowerCase(),n=e.getAttribute(r),"string"==typeof n){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:Me.test(n)?ce.parseJSON(n):n)}catch(e){}Oe.set(e,t,n)}else n=void 0;return n}function h(e,t,n,r){var i,o=1,a=20,s=r?function(){return r.cur()}:function(){return ce.css(e,t,"")},l=s(),c=n&&n[3]||(ce.cssNumber[t]?"":"px"),u=(ce.cssNumber[t]||"px"!==c&&+l)&&ze.exec(ce.css(e,t));if(u&&u[3]!==c){c=c||u[3],n=n||[],u=+l||1;do o=o||".5",u/=o,ce.style(e,t,u+c);while(o!==(o=s()/l)&&1!==o&&--a)}return n&&(u=+u||+l||0,i=n[1]?u+(n[1]+1)*n[2]:+n[2],r&&(r.unit=c,r.start=u,r.end=i)),i}function p(e,t){var n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&ce.nodeName(e,t)?ce.merge([e],n):n}function m(e,t){for(var n=0,r=e.length;n-1)i&&i.push(o);else if(c=ce.contains(o.ownerDocument,o),a=p(f.appendChild(o),"script"),c&&m(a),n)for(u=0;o=a[u++];)je.test(o.type||"")&&n.push(o);return f}function b(){return!0}function v(){return!1}function y(){try{return Q.activeElement}catch(e){}}function w(e,t,n,r,i,o){var a,s;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(s in t)w(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),i===!1)i=v;else if(!i)return e;return 1===o&&(a=i,i=function(e){return ce().off(e),a.apply(this,arguments)},i.guid=a.guid||(a.guid=ce.guid++)),e.each(function(){ce.event.add(this,t,i,r,n)})}function x(e,t){return ce.nodeName(e,"table")&&ce.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function k(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function _(e){var t=Ve.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function F(e,t){var n,r,i,o,a,s,l,c;if(1===t.nodeType){if(Se.hasData(e)&&(o=Se.access(e),a=Se.set(t,o),c=o.events)){delete a.handle,a.events={};for(i in c)for(n=0,r=c[i].length;n1&&"string"==typeof h&&!se.checkClone&&Xe.test(h))return e.each(function(i){var o=e.eq(i);m&&(t[0]=h.call(this,i,o.html())),A(o,t,n,r)});if(f&&(i=g(t,e[0].ownerDocument,!1,e,r),o=i.firstChild,1===i.childNodes.length&&(i=o),o||r)){for(a=ce.map(p(i,"script"),k),s=a.length;u")).appendTo(t.documentElement),t=Ke[0].contentDocument,t.write(),t.close(),n=E(e,t),Ke.detach()),Je[e]=n),n}function O(e,t,n){var r,i,o,a,s=e.style;return n=n||et(e),a=n?n.getPropertyValue(t)||n[t]:void 0,""!==a&&void 0!==a||ce.contains(e.ownerDocument,e)||(a=ce.style(e,t)),n&&!se.pixelMarginRight()&&Qe.test(a)&&Ze.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o),void 0!==a?a+"":a}function M(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function q(e){if(e in st)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=at.length;n--;)if(e=at[n]+t,e in st)return e}function D(e,t,n){var r=ze.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function z(e,t,n,r,i){for(var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;o<4;o+=2)"margin"===n&&(a+=ce.css(e,n+Pe[o],!0,i)),r?("content"===n&&(a-=ce.css(e,"padding"+Pe[o],!0,i)),"margin"!==n&&(a-=ce.css(e,"border"+Pe[o]+"Width",!0,i))):(a+=ce.css(e,"padding"+Pe[o],!0,i),"padding"!==n&&(a+=ce.css(e,"border"+Pe[o]+"Width",!0,i)));return a}function P(e,t,r){var i=!0,o="width"===t?e.offsetWidth:e.offsetHeight,a=et(e),s="border-box"===ce.css(e,"boxSizing",!1,a);if(Q.msFullscreenElement&&n.top!==n&&e.getClientRects().length&&(o=Math.round(100*e.getBoundingClientRect()[t])),o<=0||null==o){if(o=O(e,t,a),(o<0||null==o)&&(o=e.style[t]),Qe.test(o))return o;i=s&&(se.boxSizingReliable()||o===e.style[t]),o=parseFloat(o)||0}return o+z(e,t,r||(s?"border":"content"),i,a)+"px"}function R(e,t){for(var n,r,i,o=[],a=0,s=e.length;a=0&&n=0},isPlainObject:function(e){var t;if("object"!==ce.type(e)||e.nodeType||ce.isWindow(e))return!1;if(e.constructor&&!ae.call(e,"constructor")&&!ae.call(e.constructor.prototype||{},"isPrototypeOf"))return!1;for(t in e);return void 0===t||ae.call(e,t)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?ie[oe.call(e)]||"object":typeof e},globalEval:function(e){var t,n=eval;e=ce.trim(e),e&&(1===e.indexOf("use strict")?(t=Q.createElement("script"),t.text=e,Q.head.appendChild(t).parentNode.removeChild(t)):n(e))},camelCase:function(e){return e.replace(fe,"ms-").replace(de,he)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var n,r=0;if(a(e))for(n=e.length;r0&&t-1 in e)}function s(e,t,n){if(ce.isFunction(t))return ce.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return ce.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(ye.test(t))return ce.filter(t,e,n);t=ce.filter(t,e)}return ce.grep(e,function(e){return re.call(t,e)>-1!==n})}function l(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function c(e){var t={};return ce.each(e.match(Ce)||[],function(e,n){t[n]=!0}),t}function u(){Q.removeEventListener("DOMContentLoaded",u),n.removeEventListener("load",u),ce.ready()}function f(){this.expando=ce.expando+f.uid++}function d(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(qe,"-$&").toLowerCase(),n=e.getAttribute(r),"string"==typeof n){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:Me.test(n)?ce.parseJSON(n):n)}catch(e){}Oe.set(e,t,n)}else n=void 0;return n}function h(e,t,n,r){var i,o=1,a=20,s=r?function(){return r.cur()}:function(){return ce.css(e,t,"")},l=s(),c=n&&n[3]||(ce.cssNumber[t]?"":"px"),u=(ce.cssNumber[t]||"px"!==c&&+l)&&ze.exec(ce.css(e,t));if(u&&u[3]!==c){c=c||u[3],n=n||[],u=+l||1;do o=o||".5",u/=o,ce.style(e,t,u+c);while(o!==(o=s()/l)&&1!==o&&--a)}return n&&(u=+u||+l||0,i=n[1]?u+(n[1]+1)*n[2]:+n[2],r&&(r.unit=c,r.start=u,r.end=i)),i}function p(e,t){var n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&ce.nodeName(e,t)?ce.merge([e],n):n}function m(e,t){for(var n=0,r=e.length;n-1)i&&i.push(o);else if(c=ce.contains(o.ownerDocument,o),a=p(f.appendChild(o),"script"),c&&m(a),n)for(u=0;o=a[u++];)je.test(o.type||"")&&n.push(o);return f}function b(){return!0}function v(){return!1}function y(){try{return Q.activeElement}catch(e){}}function w(e,t,n,r,i,o){var a,s;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(s in t)w(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),i===!1)i=v;else if(!i)return e;return 1===o&&(a=i,i=function(e){return ce().off(e),a.apply(this,arguments)},i.guid=a.guid||(a.guid=ce.guid++)),e.each(function(){ce.event.add(this,t,i,r,n)})}function x(e,t){return ce.nodeName(e,"table")&&ce.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function k(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function _(e){var t=Ve.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function F(e,t){var n,r,i,o,a,s,l,c;if(1===t.nodeType){if(Se.hasData(e)&&(o=Se.access(e),a=Se.set(t,o),c=o.events)){delete a.handle,a.events={};for(i in c)for(n=0,r=c[i].length;n1&&"string"==typeof h&&!se.checkClone&&Xe.test(h))return e.each(function(i){var o=e.eq(i);m&&(t[0]=h.call(this,i,o.html())),A(o,t,n,r)});if(f&&(i=g(t,e[0].ownerDocument,!1,e,r),o=i.firstChild,1===i.childNodes.length&&(i=o),o||r)){for(a=ce.map(p(i,"script"),k),s=a.length;u")).appendTo(t.documentElement),t=Ke[0].contentDocument,t.write(),t.close(),n=E(e,t),Ke.detach()),Je[e]=n),n}function O(e,t,n){var r,i,o,a,s=e.style;return n=n||et(e),a=n?n.getPropertyValue(t)||n[t]:void 0,""!==a&&void 0!==a||ce.contains(e.ownerDocument,e)||(a=ce.style(e,t)),n&&!se.pixelMarginRight()&&Qe.test(a)&&Ze.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o),void 0!==a?a+"":a}function M(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function q(e){if(e in st)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=at.length;n--;)if(e=at[n]+t,e in st)return e}function D(e,t,n){var r=ze.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function z(e,t,n,r,i){for(var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;o<4;o+=2)"margin"===n&&(a+=ce.css(e,n+Pe[o],!0,i)),r?("content"===n&&(a-=ce.css(e,"padding"+Pe[o],!0,i)),"margin"!==n&&(a-=ce.css(e,"border"+Pe[o]+"Width",!0,i))):(a+=ce.css(e,"padding"+Pe[o],!0,i),"padding"!==n&&(a+=ce.css(e,"border"+Pe[o]+"Width",!0,i)));return a}function P(e,t,r){var i=!0,o="width"===t?e.offsetWidth:e.offsetHeight,a=et(e),s="border-box"===ce.css(e,"boxSizing",!1,a);if(Q.msFullscreenElement&&n.top!==n&&e.getClientRects().length&&(o=Math.round(100*e.getBoundingClientRect()[t])),o<=0||null==o){if(o=O(e,t,a),(o<0||null==o)&&(o=e.style[t]),Qe.test(o))return o;i=s&&(se.boxSizingReliable()||o===e.style[t]),o=parseFloat(o)||0}return o+z(e,t,r||(s?"border":"content"),i,a)+"px"}function R(e,t){for(var n,r,i,o=[],a=0,s=e.length;a=0&&n=0},isPlainObject:function(e){var t;if("object"!==ce.type(e)||e.nodeType||ce.isWindow(e))return!1;if(e.constructor&&!ae.call(e,"constructor")&&!ae.call(e.constructor.prototype||{},"isPrototypeOf"))return!1;for(t in e);return void 0===t||ae.call(e,t)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?ie[oe.call(e)]||"object":typeof e},globalEval:function(e){var t,n=eval;e=ce.trim(e),e&&(1===e.indexOf("use strict")?(t=Q.createElement("script"),t.text=e,Q.head.appendChild(t).parentNode.removeChild(t)):n(e))},camelCase:function(e){return e.replace(fe,"ms-").replace(de,he)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var n,r=0;if(a(e))for(n=e.length;rk.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[j]=!0,e}function i(e){var t=q.createElement("div");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=n.length;r--;)k.attrHandle[n[r]]=t}function a(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||X)-(~e.sourceIndex||X);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function l(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function c(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function u(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function f(){}function d(e){for(var t=0,n=e.length,r="";t1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function m(e,n,r){for(var i=0,o=n.length;i-1&&(r[c]=!(a[c]=f))}}else y=g(y===a?y.splice(p,y.length):y),o?o(null,a,y,l):Z.apply(a,y)})}function v(e){for(var t,n,r,i=e.length,o=k.relative[e[0].type],a=o||k.relative[" "],s=o?1:0,l=h(function(e){return e===t},a,!0),c=h(function(e){return ee(t,e)>-1},a,!0),u=[function(e,n,r){var i=!o&&(r||n!==E)||((t=n).nodeType?l(e,n,r):c(e,n,r));return t=null,i}];s1&&p(u),s>1&&d(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(se,"$1"),n,s0,o=e.length>0,a=function(r,a,s,l,c){var u,f,d,h=0,p="0",m=r&&[],b=[],v=E,y=r||o&&k.find.TAG("*",c),w=$+=null==v?1:Math.random()||.1,x=y.length;for(c&&(E=a===q||a||c);p!==x&&null!=(u=y[p]);p++){if(o&&u){for(f=0,a||u.ownerDocument===q||(M(u),s=!z);d=e[f++];)if(d(u,a||q,s)){l.push(u);break}c&&($=w)}i&&((u=!d&&u)&&h--,r&&m.push(u))}if(h+=p,i&&p!==h){for(f=0;d=n[f++];)d(m,b,a,s);if(r){if(h>0)for(;p--;)m[p]||b[p]||(b[p]=K.call(l));b=g(b)}Z.apply(l,b),c&&!r&&b.length>0&&h+n.length>1&&t.uniqueSort(l)}return c&&($=w,E=v),m};return i?r(a):a}var w,x,k,_,F,C,A,T,E,S,O,M,q,D,z,P,R,N,I,j="sizzle"+1*new Date,B=e.document,$=0,L=0,H=n(),U=n(),W=n(),Y=function(e,t){return e===t&&(O=!0),0},X=1<<31,V={}.hasOwnProperty,G=[],K=G.pop,J=G.push,Z=G.push,Q=G.slice,ee=function(e,t){for(var n=0,r=e.length;n+~]|"+ne+")"+ne+"*"),ue=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),fe=new RegExp(oe),de=new RegExp("^"+re+"$"),he={ID:new RegExp("^#("+re+")"),CLASS:new RegExp("^\\.("+re+")"),TAG:new RegExp("^("+re+"|[*])"),ATTR:new RegExp("^"+ie),PSEUDO:new RegExp("^"+oe),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},pe=/^(?:input|select|textarea|button)$/i,me=/^h\d$/i,ge=/^[^{]+\{\s*\[native \w/,be=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ve=/[+~]/,ye=/'|\\/g,we=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),xe=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},ke=function(){M()};try{Z.apply(G=Q.call(B.childNodes),B.childNodes),G[B.childNodes.length].nodeType}catch(e){Z={apply:G.length?function(e,t){J.apply(e,Q.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}x=t.support={},F=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},M=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:B;return r!==q&&9===r.nodeType&&r.documentElement?(q=r,D=q.documentElement,z=!F(q),(n=q.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",ke,!1):n.attachEvent&&n.attachEvent("onunload",ke)),x.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),x.getElementsByTagName=i(function(e){return e.appendChild(q.createComment("")),!e.getElementsByTagName("*").length}),x.getElementsByClassName=ge.test(q.getElementsByClassName),x.getById=i(function(e){return D.appendChild(e).id=j,!q.getElementsByName||!q.getElementsByName(j).length}),x.getById?(k.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&z){var n=t.getElementById(e);return n?[n]:[]}},k.filter.ID=function(e){var t=e.replace(we,xe);return function(e){return e.getAttribute("id")===t}}):(delete k.find.ID,k.filter.ID=function(e){var t=e.replace(we,xe);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}),k.find.TAG=x.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):x.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},k.find.CLASS=x.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&z)return t.getElementsByClassName(e)},R=[],P=[],(x.qsa=ge.test(q.querySelectorAll))&&(i(function(e){D.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&P.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||P.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+j+"-]").length||P.push("~="),e.querySelectorAll(":checked").length||P.push(":checked"),e.querySelectorAll("a#"+j+"+*").length||P.push(".#.+[+~]")}),i(function(e){var t=q.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&P.push("name"+ne+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||P.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),P.push(",.*:")})),(x.matchesSelector=ge.test(N=D.matches||D.webkitMatchesSelector||D.mozMatchesSelector||D.oMatchesSelector||D.msMatchesSelector))&&i(function(e){x.disconnectedMatch=N.call(e,"div"),N.call(e,"[s!='']:x"),R.push("!=",oe)}),P=P.length&&new RegExp(P.join("|")),R=R.length&&new RegExp(R.join("|")),t=ge.test(D.compareDocumentPosition),I=t||ge.test(D.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},Y=t?function(e,t){if(e===t)return O=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!x.sortDetached&&t.compareDocumentPosition(e)===n?e===q||e.ownerDocument===B&&I(B,e)?-1:t===q||t.ownerDocument===B&&I(B,t)?1:S?ee(S,e)-ee(S,t):0:4&n?-1:1)}:function(e,t){if(e===t)return O=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,s=[e],l=[t];if(!i||!o)return e===q?-1:t===q?1:i?-1:o?1:S?ee(S,e)-ee(S,t):0;if(i===o)return a(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)l.unshift(n);for(;s[r]===l[r];)r++;return r?a(s[r],l[r]):s[r]===B?-1:l[r]===B?1:0},q):q},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==q&&M(e),n=n.replace(ue,"='$1']"),x.matchesSelector&&z&&!W[n+" "]&&(!R||!R.test(n))&&(!P||!P.test(n)))try{var r=N.call(e,n);if(r||x.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return t(n,q,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==q&&M(e),I(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==q&&M(e);var n=k.attrHandle[t.toLowerCase()],r=n&&V.call(k.attrHandle,t.toLowerCase())?n(e,t,!z):void 0;return void 0!==r?r:x.attributes||!z?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,i=0;if(O=!x.detectDuplicates,S=!x.sortStable&&e.slice(0),e.sort(Y),O){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return S=null,e},_=t.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=_(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=_(t);return n},k=t.selectors={cacheLength:50,createPseudo:r,match:he,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(we,xe),e[3]=(e[3]||e[4]||e[5]||"").replace(we,xe),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return he.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&fe.test(n)&&(t=C(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(we,xe).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=H[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&H(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(i){var o=t.attr(i,e);return null==o?"!="===n:!n||(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o.replace(ae," ")+" ").indexOf(r)>-1:"|="===n&&(o===r||o.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var c,u,f,d,h,p,m=o!==a?"nextSibling":"previousSibling",g=t.parentNode,b=s&&t.nodeName.toLowerCase(),v=!l&&!s,y=!1;if(g){if(o){for(;m;){for(d=t;d=d[m];)if(s?d.nodeName.toLowerCase()===b:1===d.nodeType)return!1;p=m="only"===e&&!p&&"nextSibling"}return!0}if(p=[a?g.firstChild:g.lastChild],a&&v){for(d=g,f=d[j]||(d[j]={}),u=f[d.uniqueID]||(f[d.uniqueID]={}),c=u[e]||[],h=c[0]===$&&c[1],y=h&&c[2],d=h&&g.childNodes[h];d=++h&&d&&d[m]||(y=h=0)||p.pop();)if(1===d.nodeType&&++y&&d===t){u[e]=[$,h,y];break}}else if(v&&(d=t,f=d[j]||(d[j]={}),u=f[d.uniqueID]||(f[d.uniqueID]={}),c=u[e]||[],h=c[0]===$&&c[1],y=h),y===!1)for(;(d=++h&&d&&d[m]||(y=h=0)||p.pop())&&((s?d.nodeName.toLowerCase()!==b:1!==d.nodeType)||!++y||(v&&(f=d[j]||(d[j]={}),u=f[d.uniqueID]||(f[d.uniqueID]={}),u[e]=[$,y]),d!==t)););return y-=i,y===r||y%r===0&&y/r>=0}}},PSEUDO:function(e,n){var i,o=k.pseudos[e]||k.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[j]?o(n):o.length>1?(i=[e,e,"",n],k.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,i=o(e,n),a=i.length;a--;)r=ee(e,i[a]),e[r]=!(t[r]=i[a])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=A(e.replace(se,"$1"));return i[j]?r(function(e,t,n,r){for(var o,a=i(e,null,r,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),t[0]=null,!n.pop()}}),has:r(function(e){return function(n){return t(e,n).length>0}}),contains:r(function(e){return e=e.replace(we,xe),function(t){return(t.textContent||t.innerText||_(t)).indexOf(e)>-1}}),lang:r(function(e){return de.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(we,xe).toLowerCase(),function(t){var n;do if(n=z?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===D},focus:function(e){return e===q.activeElement&&(!q.hasFocus||q.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!k.pseudos.empty(e)},header:function(e){return me.test(e.nodeName)},input:function(e){return pe.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:c(function(){return[0]}),last:c(function(e,t){return[t-1]}),eq:c(function(e,t,n){return[n<0?n+t:n]}),even:c(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:c(function(e,t,n){for(var r=n<0?n+t:n;++r2&&"ID"===(a=o[0]).type&&x.getById&&9===t.nodeType&&z&&k.relative[o[1].type]){if(t=(k.find.ID(a.matches[0].replace(we,xe),t)||[])[0],!t)return n;c&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=he.needsContext.test(e)?0:o.length;i--&&(a=o[i],!k.relative[s=a.type]);)if((l=k.find[s])&&(r=l(a.matches[0].replace(we,xe),ve.test(o[0].type)&&u(t.parentNode)||t))){if(o.splice(i,1),e=r.length&&d(o),!e)return Z.apply(n,r),n;break}}return(c||A(e,f))(r,t,!z,n,!t||ve.test(e)&&u(t.parentNode)||t),n},x.sortStable=j.split("").sort(Y).join("")===j,x.detectDuplicates=!!O,M(),x.sortDetached=i(function(e){return 1&e.compareDocumentPosition(q.createElement("div"))}),i(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),x.attributes&&i(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(te,function(e,t,n){var r;if(!n)return e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(n);ce.find=pe,ce.expr=pe.selectors,ce.expr[":"]=ce.expr.pseudos,ce.uniqueSort=ce.unique=pe.uniqueSort,ce.text=pe.getText,ce.isXMLDoc=pe.isXML,ce.contains=pe.contains;var me=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&ce(e).is(n))break;r.push(e)}return r},ge=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},be=ce.expr.match.needsContext,ve=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,ye=/^.[^:#\[\.,]*$/;ce.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?ce.find.matchesSelector(r,e)?[r]:[]:ce.find.matches(e,ce.grep(t,function(e){return 1===e.nodeType}))},ce.fn.extend({find:function(e){var t,n=this.length,r=[],i=this;if("string"!=typeof e)return this.pushStack(ce(e).filter(function(){for(t=0;t1?ce.unique(r):r),r.selector=this.selector?this.selector+" "+e:e,r},filter:function(e){return this.pushStack(s(this,e||[],!1))},not:function(e){return this.pushStack(s(this,e||[],!0))},is:function(e){return!!s(this,"string"==typeof e&&be.test(e)?ce(e):e||[],!1).length}});var we,xe=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,ke=ce.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||we,"string"==typeof e){if(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:xe.exec(e),!r||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof ce?t[0]:t,ce.merge(this,ce.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:Q,!0)),ve.test(r[1])&&ce.isPlainObject(t))for(r in t)ce.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return i=Q.getElementById(r[2]),i&&i.parentNode&&(this.length=1,this[0]=i),this.context=Q,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):ce.isFunction(e)?void 0!==n.ready?n.ready(e):e(ce):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),ce.makeArray(e,this))};ke.prototype=ce.fn,we=ce(Q);var _e=/^(?:parents|prev(?:Until|All))/,Fe={children:!0,contents:!0,next:!0,prev:!0};ce.fn.extend({has:function(e){var t=ce(e,this),n=t.length;return this.filter(function(){for(var e=0;e-1:1===n.nodeType&&ce.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?ce.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?re.call(ce(e),this[0]):re.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(ce.uniqueSort(ce.merge(this.get(),ce(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),ce.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return me(e,"parentNode")},parentsUntil:function(e,t,n){return me(e,"parentNode",n)},next:function(e){return l(e,"nextSibling")},prev:function(e){return l(e,"previousSibling")},nextAll:function(e){return me(e,"nextSibling")},prevAll:function(e){return me(e,"previousSibling")},nextUntil:function(e,t,n){return me(e,"nextSibling",n)},prevUntil:function(e,t,n){return me(e,"previousSibling",n)},siblings:function(e){return ge((e.parentNode||{}).firstChild,e)},children:function(e){return ge(e.firstChild)},contents:function(e){return e.contentDocument||ce.merge([],e.childNodes)}},function(e,t){ce.fn[e]=function(n,r){var i=ce.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=ce.filter(r,i)),this.length>1&&(Fe[e]||ce.uniqueSort(i),_e.test(e)&&i.reverse()),this.pushStack(i)}});var Ce=/\S+/g;ce.Callbacks=function(e){e="string"==typeof e?c(e):ce.extend({},e);var t,n,r,i,o=[],a=[],s=-1,l=function(){for(i=e.once,r=t=!0;a.length;s=-1)for(n=a.shift();++s-1;)o.splice(n,1),n<=s&&s--}),this},has:function(e){return e?ce.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=n||[],n=[e,n.slice?n.slice():n],a.push(n),t||l()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!r}};return u},ce.extend({Deferred:function(e){var t=[["resolve","done",ce.Callbacks("once memory"),"resolved"],["reject","fail",ce.Callbacks("once memory"),"rejected"],["notify","progress",ce.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return ce.Deferred(function(n){ce.each(t,function(t,o){var a=ce.isFunction(e[t])&&e[t];i[o[1]](function(){var e=a&&a.apply(this,arguments);e&&ce.isFunction(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[o[0]+"With"](this===r?n.promise():this,a?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?ce.extend(e,r):r}},i={};return r.pipe=r.then,ce.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t,n,r,i=0,o=ee.call(arguments),a=o.length,s=1!==a||e&&ce.isFunction(e.promise)?a:0,l=1===s?e:ce.Deferred(),c=function(e,n,r){return function(i){n[e]=this,r[e]=arguments.length>1?ee.call(arguments):i,r===t?l.notifyWith(n,r):--s||l.resolveWith(n,r)}};if(a>1)for(t=new Array(a),n=new Array(a),r=new Array(a);i0||(Ae.resolveWith(Q,[ce]),ce.fn.triggerHandler&&(ce(Q).triggerHandler("ready"),ce(Q).off("ready"))))}}),ce.ready.promise=function(e){return Ae||(Ae=ce.Deferred(),"complete"===Q.readyState||"loading"!==Q.readyState&&!Q.documentElement.doScroll?n.setTimeout(ce.ready):(Q.addEventListener("DOMContentLoaded",u),n.addEventListener("load",u))),Ae.promise(e)},ce.ready.promise();var Te=function(e,t,n,r,i,o,a){var s=0,l=e.length,c=null==n;if("object"===ce.type(n)){i=!0;for(s in n)Te(e,t,s,n[s],!0,o,a)}else if(void 0!==r&&(i=!0,ce.isFunction(r)||(a=!0),c&&(a?(t.call(e,r),t=null):(c=t,t=function(e,t,n){return c.call(ce(e),n)})),t))for(;s-1&&void 0!==n&&Oe.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){Oe.remove(this,e)})}}),ce.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Se.get(e,t),n&&(!r||ce.isArray(n)?r=Se.access(e,t,ce.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=ce.queue(e,t),r=n.length,i=n.shift(),o=ce._queueHooks(e,t),a=function(){ce.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Se.get(e,n)||Se.access(e,n,{empty:ce.Callbacks("once memory").add(function(){Se.remove(e,[t+"queue",n])})})}}),ce.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length",""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};Be.optgroup=Be.option,Be.tbody=Be.tfoot=Be.colgroup=Be.caption=Be.thead,Be.th=Be.td;var $e=/<|&#?\w+;/;!function(){var e=Q.createDocumentFragment(),t=e.appendChild(Q.createElement("div")),n=Q.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),se.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="",se.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var Le=/^key/,He=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ue=/^([^.]*)(?:\.(.+)|)/;ce.event={global:{},add:function(e,t,n,r,i){var o,a,s,l,c,u,f,d,h,p,m,g=Se.get(e);if(g)for(n.handler&&(o=n,n=o.handler,i=o.selector),n.guid||(n.guid=ce.guid++),(l=g.events)||(l=g.events={}),(a=g.handle)||(a=g.handle=function(t){return"undefined"!=typeof ce&&ce.event.triggered!==t.type?ce.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(Ce)||[""],c=t.length;c--;)s=Ue.exec(t[c])||[],h=m=s[1],p=(s[2]||"").split(".").sort(),h&&(f=ce.event.special[h]||{},h=(i?f.delegateType:f.bindType)||h,f=ce.event.special[h]||{},u=ce.extend({type:h,origType:m,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&ce.expr.match.needsContext.test(i),namespace:p.join(".")},o),(d=l[h])||(d=l[h]=[],d.delegateCount=0,f.setup&&f.setup.call(e,r,p,a)!==!1||e.addEventListener&&e.addEventListener(h,a)),f.add&&(f.add.call(e,u),u.handler.guid||(u.handler.guid=n.guid)),i?d.splice(d.delegateCount++,0,u):d.push(u),ce.event.global[h]=!0)},remove:function(e,t,n,r,i){var o,a,s,l,c,u,f,d,h,p,m,g=Se.hasData(e)&&Se.get(e);if(g&&(l=g.events)){for(t=(t||"").match(Ce)||[""],c=t.length;c--;)if(s=Ue.exec(t[c])||[],h=m=s[1],p=(s[2]||"").split(".").sort(),h){for(f=ce.event.special[h]||{},h=(r?f.delegateType:f.bindType)||h,d=l[h]||[],s=s[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=d.length;o--;)u=d[o],!i&&m!==u.origType||n&&n.guid!==u.guid||s&&!s.test(u.namespace)||r&&r!==u.selector&&("**"!==r||!u.selector)||(d.splice(o,1), -u.selector&&d.delegateCount--,f.remove&&f.remove.call(e,u));a&&!d.length&&(f.teardown&&f.teardown.call(e,p,g.handle)!==!1||ce.removeEvent(e,h,g.handle),delete l[h])}else for(h in l)ce.event.remove(e,h+t[c],n,r,!0);ce.isEmptyObject(l)&&Se.remove(e,"handle events")}},dispatch:function(e){e=ce.event.fix(e);var t,n,r,i,o,a=[],s=ee.call(arguments),l=(Se.get(this,"events")||{})[e.type]||[],c=ce.event.special[e.type]||{};if(s[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){for(a=ce.event.handlers.call(this,e,l),t=0;(i=a[t++])&&!e.isPropagationStopped();)for(e.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!e.isImmediatePropagationStopped();)e.rnamespace&&!e.rnamespace.test(o.namespace)||(e.handleObj=o,e.data=o.data,r=((ce.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s),void 0!==r&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,i,o,a=[],s=t.delegateCount,l=e.target;if(s&&l.nodeType&&("click"!==e.type||isNaN(e.button)||e.button<1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==e.type)){for(r=[],n=0;n-1:ce.find(i,this,null,[l]).length),r[i]&&r.push(o);r.length&&a.push({elem:l,handlers:r})}return s]*)\/>/gi,Ye=/\s*$/g;ce.extend({htmlPrefilter:function(e){return e.replace(We,"<$1>")},clone:function(e,t,n){var r,i,o,a,s=e.cloneNode(!0),l=ce.contains(e.ownerDocument,e);if(!(se.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||ce.isXMLDoc(e)))for(a=p(s),o=p(e),r=0,i=o.length;r0&&m(a,!l&&p(e,"script")),s},cleanData:function(e){for(var t,n,r,i=ce.event.special,o=0;void 0!==(n=e[o]);o++)if(Ee(n)){if(t=n[Se.expando]){if(t.events)for(r in t.events)i[r]?ce.event.remove(n,r):ce.removeEvent(n,r,t.handle);n[Se.expando]=void 0}n[Oe.expando]&&(n[Oe.expando]=void 0)}}}),ce.fn.extend({domManip:A,detach:function(e){return T(this,e,!0)},remove:function(e){return T(this,e)},text:function(e){return Te(this,function(e){return void 0===e?ce.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return A(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=x(this,e);t.appendChild(e)}})},prepend:function(){return A(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=x(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return A(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return A(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(ce.cleanData(p(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return ce.clone(this,e,t)})},html:function(e){return Te(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ye.test(e)&&!Be[(Ie.exec(e)||["",""])[1].toLowerCase()]){e=ce.htmlPrefilter(e);try{for(;n1)},show:function(){return R(this,!0)},hide:function(){return R(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Re(this)?ce(this).show():ce(this).hide()})}}),ce.Tween=N,N.prototype={constructor:N,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||ce.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(ce.cssNumber[n]?"":"px")},cur:function(){var e=N.propHooks[this.prop];return e&&e.get?e.get(this):N.propHooks._default.get(this)},run:function(e){var t,n=N.propHooks[this.prop];return this.options.duration?this.pos=t=ce.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):N.propHooks._default.set(this),this}},N.prototype.init.prototype=N.prototype,N.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=ce.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){ce.fx.step[e.prop]?ce.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[ce.cssProps[e.prop]]&&!ce.cssHooks[e.prop]?e.elem[e.prop]=e.now:ce.style(e.elem,e.prop,e.now+e.unit)}}},N.propHooks.scrollTop=N.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},ce.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},ce.fx=N.prototype.init,ce.fx.step={};var lt,ct,ut=/^(?:toggle|show|hide)$/,ft=/queueHooks$/;ce.Animation=ce.extend(H,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return h(n.elem,e,ze.exec(t),n),n}]},tweener:function(e,t){ce.isFunction(e)?(t=e,e=["*"]):e=e.match(Ce);for(var n,r=0,i=e.length;r1)},removeAttr:function(e){return this.each(function(){ce.removeAttr(this,e)})}}),ce.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?ce.prop(e,t,n):(1===o&&ce.isXMLDoc(e)||(t=t.toLowerCase(),i=ce.attrHooks[t]||(ce.expr.match.bool.test(t)?dt:void 0)),void 0!==n?null===n?void ce.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:(r=ce.find.attr(e,t),null==r?void 0:r))},attrHooks:{type:{set:function(e,t){if(!se.radioValue&&"radio"===t&&ce.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(Ce);if(o&&1===e.nodeType)for(;n=o[i++];)r=ce.propFix[n]||n,ce.expr.match.bool.test(n)&&(e[r]=!1),e.removeAttribute(n)}}),dt={set:function(e,t,n){return t===!1?ce.removeAttr(e,n):e.setAttribute(n,n),n}},ce.each(ce.expr.match.bool.source.match(/\w+/g),function(e,t){var n=ht[t]||ce.find.attr;ht[t]=function(e,t,r){var i,o;return r||(o=ht[t],ht[t]=i,i=null!=n(e,t,r)?t.toLowerCase():null,ht[t]=o),i}});var pt=/^(?:input|select|textarea|button)$/i,mt=/^(?:a|area)$/i;ce.fn.extend({prop:function(e,t){return Te(this,ce.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[ce.propFix[e]||e]})}}),ce.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&ce.isXMLDoc(e)||(t=ce.propFix[t]||t,i=ce.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=ce.find.attr(e,"tabindex");return t?parseInt(t,10):pt.test(e.nodeName)||mt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),se.optSelected||(ce.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),ce.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){ce.propFix[this.toLowerCase()]=this});var gt=/[\t\r\n\f]/g;ce.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,l=0;if(ce.isFunction(e))return this.each(function(t){ce(this).addClass(e.call(this,t,U(this)))});if("string"==typeof e&&e)for(t=e.match(Ce)||[];n=this[l++];)if(i=U(n),r=1===n.nodeType&&(" "+i+" ").replace(gt," ")){for(a=0;o=t[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");s=ce.trim(r),i!==s&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,l=0;if(ce.isFunction(e))return this.each(function(t){ce(this).removeClass(e.call(this,t,U(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(Ce)||[];n=this[l++];)if(i=U(n),r=1===n.nodeType&&(" "+i+" ").replace(gt," ")){for(a=0;o=t[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");s=ce.trim(r),i!==s&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):ce.isFunction(e)?this.each(function(n){ce(this).toggleClass(e.call(this,n,U(this),t),t)}):this.each(function(){var t,r,i,o;if("string"===n)for(r=0,i=ce(this),o=e.match(Ce)||[];t=o[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else void 0!==e&&"boolean"!==n||(t=U(this),t&&Se.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||e===!1?"":Se.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+U(n)+" ").replace(gt," ").indexOf(t)>-1)return!0;return!1}});var bt=/\r/g,vt=/[\x20\t\r\n\f]+/g;ce.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=ce.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,ce(this).val()):e,null==i?i="":"number"==typeof i?i+="":ce.isArray(i)&&(i=ce.map(i,function(e){return null==e?"":e+""})),t=ce.valHooks[this.type]||ce.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return t=ce.valHooks[i.type]||ce.valHooks[i.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(bt,""):null==n?"":n)}}}),ce.extend({valHooks:{option:{get:function(e){var t=ce.find.attr(e,"value");return null!=t?t:ce.trim(ce.text(e)).replace(vt," ")}},select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||i<0,a=o?null:[],s=o?i+1:r.length,l=i<0?s:o?i:0;l-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),ce.each(["radio","checkbox"],function(){ce.valHooks[this]={set:function(e,t){if(ce.isArray(t))return e.checked=ce.inArray(ce(e).val(),t)>-1}},se.checkOn||(ce.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var yt=/^(?:focusinfocus|focusoutblur)$/;ce.extend(ce.event,{trigger:function(e,t,r,i){var o,a,s,l,c,u,f,d=[r||Q],h=ae.call(e,"type")?e.type:e,p=ae.call(e,"namespace")?e.namespace.split("."):[];if(a=s=r=r||Q,3!==r.nodeType&&8!==r.nodeType&&!yt.test(h+ce.event.triggered)&&(h.indexOf(".")>-1&&(p=h.split("."),h=p.shift(),p.sort()),c=h.indexOf(":")<0&&"on"+h,e=e[ce.expando]?e:new ce.Event(h,"object"==typeof e&&e),e.isTrigger=i?2:3,e.namespace=p.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=r),t=null==t?[e]:ce.makeArray(t,[e]),f=ce.event.special[h]||{},i||!f.trigger||f.trigger.apply(r,t)!==!1)){if(!i&&!f.noBubble&&!ce.isWindow(r)){for(l=f.delegateType||h,yt.test(l+h)||(a=a.parentNode);a;a=a.parentNode)d.push(a),s=a;s===(r.ownerDocument||Q)&&d.push(s.defaultView||s.parentWindow||n)}for(o=0;(a=d[o++])&&!e.isPropagationStopped();)e.type=o>1?l:f.bindType||h,u=(Se.get(a,"events")||{})[e.type]&&Se.get(a,"handle"),u&&u.apply(a,t),u=c&&a[c],u&&u.apply&&Ee(a)&&(e.result=u.apply(a,t),e.result===!1&&e.preventDefault());return e.type=h,i||e.isDefaultPrevented()||f._default&&f._default.apply(d.pop(),t)!==!1||!Ee(r)||c&&ce.isFunction(r[h])&&!ce.isWindow(r)&&(s=r[c],s&&(r[c]=null),ce.event.triggered=h,r[h](),ce.event.triggered=void 0,s&&(r[c]=s)),e.result}},simulate:function(e,t,n){var r=ce.extend(new ce.Event,n,{type:e,isSimulated:!0});ce.event.trigger(r,null,t),r.isDefaultPrevented()&&n.preventDefault()}}),ce.fn.extend({trigger:function(e,t){return this.each(function(){ce.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return ce.event.trigger(e,t,n,!0)}}),ce.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){ce.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),ce.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),se.focusin="onfocusin"in n,se.focusin||ce.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){ce.event.simulate(t,e.target,ce.event.fix(e))};ce.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=Se.access(r,t);i||r.addEventListener(e,n,!0),Se.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=Se.access(r,t)-1;i?Se.access(r,t,i):(r.removeEventListener(e,n,!0),Se.remove(r,t))}}});var wt=n.location,xt=ce.now(),kt=/\?/;ce.parseJSON=function(e){return JSON.parse(e+"")},ce.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new n.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||ce.error("Invalid XML: "+e),t};var _t=/#.*$/,Ft=/([?&])_=[^&]*/,Ct=/^(.*?):[ \t]*([^\r\n]*)$/gm,At=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Tt=/^(?:GET|HEAD)$/,Et=/^\/\//,St={},Ot={},Mt="*/".concat("*"),qt=Q.createElement("a");qt.href=wt.href,ce.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:wt.href,type:"GET",isLocal:At.test(wt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Mt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":ce.parseJSON,"text xml":ce.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?X(X(e,ce.ajaxSettings),t):X(ce.ajaxSettings,e)},ajaxPrefilter:W(St),ajaxTransport:W(Ot),ajax:function(e,t){function r(e,t,r,s){var c,f,v,y,x,_=t;2!==w&&(w=2,l&&n.clearTimeout(l),i=void 0,a=s||"",k.readyState=e>0?4:0,c=e>=200&&e<300||304===e,r&&(y=V(d,k,r)),y=G(d,y,k,c),c?(d.ifModified&&(x=k.getResponseHeader("Last-Modified"),x&&(ce.lastModified[o]=x),x=k.getResponseHeader("etag"),x&&(ce.etag[o]=x)),204===e||"HEAD"===d.type?_="nocontent":304===e?_="notmodified":(_=y.state,f=y.data,v=y.error,c=!v)):(v=_,!e&&_||(_="error",e<0&&(e=0))),k.status=e,k.statusText=(t||_)+"",c?m.resolveWith(h,[f,_,k]):m.rejectWith(h,[k,_,v]),k.statusCode(b),b=void 0,u&&p.trigger(c?"ajaxSuccess":"ajaxError",[k,d,c?f:v]),g.fireWith(h,[k,_]),u&&(p.trigger("ajaxComplete",[k,d]),--ce.active||ce.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=void 0),t=t||{};var i,o,a,s,l,c,u,f,d=ce.ajaxSetup({},t),h=d.context||d,p=d.context&&(h.nodeType||h.jquery)?ce(h):ce.event,m=ce.Deferred(),g=ce.Callbacks("once memory"),b=d.statusCode||{},v={},y={},w=0,x="canceled",k={readyState:0,getResponseHeader:function(e){var t;if(2===w){if(!s)for(s={};t=Ct.exec(a);)s[t[1].toLowerCase()]=t[2];t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===w?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return w||(e=y[n]=y[n]||e,v[e]=t),this},overrideMimeType:function(e){return w||(d.mimeType=e),this},statusCode:function(e){var t;if(e)if(w<2)for(t in e)b[t]=[b[t],e[t]];else k.always(e[k.status]);return this},abort:function(e){var t=e||x;return i&&i.abort(t),r(0,t),this}};if(m.promise(k).complete=g.add,k.success=k.done,k.error=k.fail,d.url=((e||d.url||wt.href)+"").replace(_t,"").replace(Et,wt.protocol+"//"),d.type=t.method||t.type||d.method||d.type,d.dataTypes=ce.trim(d.dataType||"*").toLowerCase().match(Ce)||[""],null==d.crossDomain){c=Q.createElement("a");try{c.href=d.url,c.href=c.href,d.crossDomain=qt.protocol+"//"+qt.host!=c.protocol+"//"+c.host}catch(e){d.crossDomain=!0}}if(d.data&&d.processData&&"string"!=typeof d.data&&(d.data=ce.param(d.data,d.traditional)),Y(St,d,t,k),2===w)return k;u=ce.event&&d.global,u&&0===ce.active++&&ce.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!Tt.test(d.type),o=d.url,d.hasContent||(d.data&&(o=d.url+=(kt.test(o)?"&":"?")+d.data,delete d.data),d.cache===!1&&(d.url=Ft.test(o)?o.replace(Ft,"$1_="+xt++):o+(kt.test(o)?"&":"?")+"_="+xt++)),d.ifModified&&(ce.lastModified[o]&&k.setRequestHeader("If-Modified-Since",ce.lastModified[o]),ce.etag[o]&&k.setRequestHeader("If-None-Match",ce.etag[o])),(d.data&&d.hasContent&&d.contentType!==!1||t.contentType)&&k.setRequestHeader("Content-Type",d.contentType),k.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+Mt+"; q=0.01":""):d.accepts["*"]);for(f in d.headers)k.setRequestHeader(f,d.headers[f]);if(d.beforeSend&&(d.beforeSend.call(h,k,d)===!1||2===w))return k.abort();x="abort";for(f in{success:1,error:1,complete:1})k[f](d[f]);if(i=Y(Ot,d,t,k)){if(k.readyState=1,u&&p.trigger("ajaxSend",[k,d]),2===w)return k;d.async&&d.timeout>0&&(l=n.setTimeout(function(){k.abort("timeout")},d.timeout));try{w=1,i.send(v,r)}catch(e){if(!(w<2))throw e;r(-1,e)}}else r(-1,"No Transport");return k},getJSON:function(e,t,n){return ce.get(e,t,n,"json")},getScript:function(e,t){return ce.get(e,void 0,t,"script")}}),ce.each(["get","post"],function(e,t){ce[t]=function(e,n,r,i){return ce.isFunction(n)&&(i=i||r,r=n,n=void 0),ce.ajax(ce.extend({url:e,type:t,dataType:i,data:n,success:r},ce.isPlainObject(e)&&e))}}),ce._evalUrl=function(e){return ce.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,throws:!0})},ce.fn.extend({wrapAll:function(e){var t;return ce.isFunction(e)?this.each(function(t){ce(this).wrapAll(e.call(this,t))}):(this[0]&&(t=ce(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this)},wrapInner:function(e){return ce.isFunction(e)?this.each(function(t){ce(this).wrapInner(e.call(this,t))}):this.each(function(){var t=ce(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=ce.isFunction(e);return this.each(function(n){ce(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){ce.nodeName(this,"body")||ce(this).replaceWith(this.childNodes)}).end()}}),ce.expr.filters.hidden=function(e){return!ce.expr.filters.visible(e)},ce.expr.filters.visible=function(e){return e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0};var Dt=/%20/g,zt=/\[\]$/,Pt=/\r?\n/g,Rt=/^(?:submit|button|image|reset|file)$/i,Nt=/^(?:input|select|textarea|keygen)/i;ce.param=function(e,t){var n,r=[],i=function(e,t){t=ce.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=ce.ajaxSettings&&ce.ajaxSettings.traditional),ce.isArray(e)||e.jquery&&!ce.isPlainObject(e))ce.each(e,function(){i(this.name,this.value)});else for(n in e)K(n,e[n],t,i);return r.join("&").replace(Dt,"+")},ce.fn.extend({serialize:function(){return ce.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=ce.prop(this,"elements");return e?ce.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!ce(this).is(":disabled")&&Nt.test(this.nodeName)&&!Rt.test(e)&&(this.checked||!Ne.test(e))}).map(function(e,t){var n=ce(this).val();return null==n?null:ce.isArray(n)?ce.map(n,function(e){return{name:t.name,value:e.replace(Pt,"\r\n")}}):{name:t.name,value:n.replace(Pt,"\r\n")}}).get()}}),ce.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(e){}};var It={0:200,1223:204},jt=ce.ajaxSettings.xhr();se.cors=!!jt&&"withCredentials"in jt,se.ajax=jt=!!jt,ce.ajaxTransport(function(e){var t,r;if(se.cors||jt&&!e.crossDomain)return{send:function(i,o){var a,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(a in e.xhrFields)s[a]=e.xhrFields[a];e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"); -for(a in i)s.setRequestHeader(a,i[a]);t=function(e){return function(){t&&(t=r=s.onload=s.onerror=s.onabort=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(It[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=t(),r=s.onerror=t("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&n.setTimeout(function(){t&&r()})},t=t("abort");try{s.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}}),ce.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return ce.globalEval(e),e}}}),ce.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),ce.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(r,i){t=ce(" + + diff --git a/js/query/filter.js b/js/query/filter.js index b79acb3..fb1532f 100644 --- a/js/query/filter.js +++ b/js/query/filter.js @@ -59,33 +59,37 @@ Filter.render = function(modal_state, query_state, dim, axis, lang) { var sel_values = modal_state.filter_selection[dim] || [] values.forEach( (d, i) => { - if (strMatch(d, query_state.filter_state.search)) { - var attrs = { type: 'checkbox', - id: d, - name: d, - 'ev-event': hg.sendChange(modal_state.channels.toggleFilterValue, { dim: dim, value: d } ) } - - if(sel_values.indexOf(d) > -1 || modal_state.selectAll[dim]) { - attrs.checked = true; - } - cbs.push( - // TODO. virtual-dom doesn't match changes in properly - // a parallel issue for Mithril: https://github.com/lhorie/mithril.js/issues/691 - // one workaround is to cache-bust the entire list with a key: - h('li.custom-checkbox', - { - key: unique_key++, - 'ev-click': hg.send(modal_state.channels.toggleFilterValue, { dim: dim, value: d } ) - }, - [ - h('input', attrs), - h('label' + (attrs.checked ? '.selected-filter': ''), [ - h('span.custom-input', h('span.custom-input')), - h('span', formatter(d)) - ]) - ] + if (d !== "" && d !== "0" && d !== 0) { + debugger; + if (strMatch(d, query_state.filter_state.search)) { + var attrs = { type: 'checkbox', + id: d, + name: d, + 'ev-event': hg.sendChange(modal_state.channels.toggleFilterValue, { dim: dim, value: d } ) } + + if(sel_values.indexOf(d) > -1 || modal_state.selectAll[dim]) { + attrs.checked = true; + } + + cbs.push( + // TODO. virtual-dom doesn't match changes in properly + // a parallel issue for Mithril: https://github.com/lhorie/mithril.js/issues/691 + // one workaround is to cache-bust the entire list with a key: + h('li.custom-checkbox', + { + key: unique_key++, + 'ev-click': hg.send(modal_state.channels.toggleFilterValue, { dim: dim, value: d } ) + }, + [ + h('input', attrs), + h('label' + (attrs.checked ? '.selected-filter': ''), [ + h('span.custom-input', h('span.custom-input')), + h('span', formatter(d)) + ]) + ] + ) ) - ) + } } })