!function(e){if("object"==typeofexports&&"undefined"!=typeofmodule)module.exports=e();elseif("function"==typeofdefine&&define.amd)define([],e);else{vart;"undefined"!=typeofwindow?t=window:"undefined"!=typeofglobal?t=global:"undefined"!=typeofself&&(t=self),t.torque=e()}}(function(){vardefine,module,exports;returnfunctione(t,n,r){functioni(o,u){if(!n[o]){if(!t[o]){vara=typeofrequire=="function"&&require;if(!u&&a)returna(o,!0);if(s)returns(o,!0);varf=newError("Cannot find module '"+o+"'");throwf.code="MODULE_NOT_FOUND",f}varl=n[o]={exports:{}};t[o][0].call(l.exports,function(e){varn=t[o][1][e];returni(n?n:e)},l,l.exports,e,t,n,r)}returnn[o].exports}vars=typeofrequire=="function"&&require;for(varo=0;o<r.length;o++)i(r[o]);returni}({1:[function(e,t,n){varr=function(e,t){if(e<0)thrownewError("start must be a positive number");if(e>=t)thrownewError("start must be smaller than end");this.start=e,this.end=t};r.prototype={diff:function(){returnthis.end-this.start},isLast:function(e){return(e|0)===this.end}},t.exports=r},{}],2:[function(e,t,n){(function(n){functionu(e,t){if(!t.steps)thrownewError("steps option missing");this.options=t,this.running=!1,this._tick=this._tick.bind(this),this._t0=+(newDate),this.callback=e,this._time=0,this.itemsReady=!1,this.options=r.extend({animationDelay:0,maxDelta:.2,loop:t.loop===undefined?!0:t.loop},this.options),this.steps(t.steps)}varr=e("./"),i=e("./animator-steps-range"),s=n.requestAnimationFrame||n.mozRequestAnimationFrame||n.webkitRequestAnimationFrame||n.msRequestAnimationFrame||function(e){returnn.setTimeout(e,1e3/60)},o=n.cancelAnimationFrame||n.mozCancelAnimationFrame||n.webkitCancelAnimationFrame||n.msCancelAnimationFrame||function(e){clearTimeout(e)};u.prototype={start:function(){this.running=!0,s(this._tick),this.options.onStart&&this.options.onStart(),this.stepsRange().diff()===1&&(this.running=!1)},isRunning:function(){returnthis.running},stop:function(){this.pause(),this.time(this.stepsRange().start),this.options.onStop&&this.options.onStop()},time:function(e){if(!arguments.length)returnthis._time;this._time=e;vart=this.range(this.domain(this._time));this.callback(t)},toggle:function(){this.running?this.pause():this.start()},rescale:function(){returnthis.domainInv=r.math.linear(this.options.animationDelay,this.options.animationDelay+this.options.animationDuration),this.domain=this.domainInv.invert(),this.range=r.math.linear(0,this._defaultStepsRange.end),this.rangeInv=this.range.invert(),this.time(this._time),this.running?this.start():this.pause(),this},duration:function(e){returnarguments.length?(this.options.animationDuration=e,this.time()>e&&this.time(0),this.rescale(),this):this.options.animationDuration},steps:function(e){returnthis.options.steps=e,this._defaultStepsRange=newi(0,e),this.rescale()},stepsRange:function(e,t){if(arguments.length===2){if(e<this._defaultStepsRange.start)thrownewError("start must be within default steps range");if(t>this._defaultStepsRange.end)thrownewError("end must be within default steps range");this._customStepsRange=newi(e,t),this.options.onStepsRange&&this.options.onStepsRange();varn=this.step()|0;(n<e||n>t)&&this.step(e)}returnthis._customStepsRange||this._defaultStepsRange},removeCustomStepsRange:function(){this._customStepsRange=undefined,this.options.onStepsRange&&this.options.onStepsRange()},step:function(e){if(arguments.length===0)returnthis.range(this.domain(this._time));this._time=this.domainInv(this.rangeInv(e))},pause:function(){this.running=!1,o(this._tick),this.options.onPause&&this.options.onPause()},_tick:function(){vare=+(newDate),t=(e-this._t0)*.001;t=Math.min(this.options.maxDelta,t),this._t0=e,this._time+=t;varn=this.stepsRange();n.isLast(this.step())&&(this.options.loop?this.step(n.start):(this.time(this.options.animationDuration),this.pause())),this.running&&(this.time(this._time),s(this._tick))}},t.exports=u}).call(this,typeofglobal!="undefined"?global:typeofself!="undefined"?self:typeofwindow!="undefined"?window:{})},{"./":11,"./animator-steps-range":1}],3:[fun
,"default-value":"+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs","default-meaning":"The proj4 literal of EPSG:4326 is assumed to be the Map's spatial reference and all data from layers within this map will be plotted using this coordinate system. If any layers do not declare an srs value then they will be assumed to be in the same srs as the Map and not transformations will be needed to plot them in the Map's coordinate space",doc:"Map spatial reference (proj4 string)"},"buffer-size":{css:"buffer-size","default-value":"0",type:"float","default-meaning":"No buffer will be used",doc:'Extra tolerance around the map (in pixels) used to ensure labels crossing tile boundaries are equally rendered in each tile (e.g. cut in each tile). Not intended to be used in combination with "avoid-edges".'},"maximum-extent":{css:"","default-value":"none",type:"bbox","default-meaning":"No clipping extent will be used",doc:"An extent to be used to limit the bounds used to query all layers during rendering. Should be minx, miny, maxx, maxy in the coordinates of the Map."},base:{css:"base","default-value":"","default-meaning":"This base path defaults to an empty string meaning that any relative paths to files referenced in styles or layers will be interpreted relative to the application process.",type:"string",doc:"Any relative paths used to reference files will be understood as relative to this directory path if the map is loaded from an in memory object rather than from the filesystem. If the map is loaded from the filesystem and this option is not provided it will be set to the directory of the stylesheet."},"paths-from-xml":{css:"","default-value":!0,"default-meaning":"Paths read from XML will be interpreted from the location of the XML",type:"boolean",doc:"value to control whether paths in the XML will be interpreted from the location of the XML or from the working directory of the program that calls load_map()"},"minimum-version":{css:"","default-value":"none","default-meaning":"Mapnik version will not be detected and no error will be thrown about compatibility",type:"string",doc:"The minumum Mapnik version (e.g. 0.7.2) needed to use certain functionality in the stylesheet"},"font-directory":{css:"font-directory",type:"uri","default-value":"none","default-meaning":"No map-specific fonts will be registered",doc:"Path to a directory which holds fonts which should be registered when the Map is loaded (in addition to any fonts that may be automatically registered)."}},polygon:{fill:{css:"polygon-fill",type:"color","default-value":"rgba(128,128,128,1)","default-meaning":"gray and fully opaque (alpha = 1), same as rgb(128,128,128)",doc:"Fill color to assign to a polygon"},"fill-opacity":{css:"polygon-opacity",type:"float",doc:"The opacity of the polygon","default-value":1,"default-meaning":"opaque"},gamma:{css:"polygon-gamma",type:"float","default-value":1,"default-meaning":"fully antialiased",range:"0-1",doc:"Level of antialiasing of polygon edges"},"gamma-method":{css:"polygon-gamma-method",type:["power","linear","none","threshold","multiply"],"default-value":"power","default-meaning":"pow(x,gamma) is used to calculate pixel gamma, which produces slightly smoother line and polygon antialiasing than the 'linear' method, while other methods are usually only used to disable AA",doc:"An Antigrain Geometry specific rendering hint to control the quality of antialiasing. Under the hood in Mapnik this method is used in combination with the 'gamma' value (which defaults to 1). The methods are in the AGG source at https://github.com/mapnik/mapnik/blob/master/deps/agg/include/agg_gamma_functions.h"},clip:{css:"polygon-clip",type:"boolean","default-value":!0,"default-meaning":"geometry will be clipped to map bounds before rendering",doc:"geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts."},smooth:{css:"polygon-smooth",type:"float","default-value":0,"default-meaning":"no smoothing",range:"0-1",doc:"Smoothsoutgeometryangles.0isnosmoothing,1i
},"placement-type":{css:"text-placement-type",doc:'Re-position and/or re-size text to avoid overlaps. "simple" for basic algorithm (using text-placements string,) "dummy" to turn this feature off.',type:["dummy","simple"],"default-value":"dummy"},placements:{css:"text-placements",type:"string","default-value":"",doc:'If "placement-type" is set to "simple", use this "POSITIONS,[SIZES]" string. An example is `text-placements: "E,NE,SE,W,NW,SW";` '},"text-transform":{css:"text-transform",type:["none","uppercase","lowercase","capitalize"],doc:"Transform the case of the characters","default-value":"none"},"horizontal-alignment":{css:"text-horizontal-alignment",type:["left","middle","right","auto"],doc:"The text's horizontal alignment from its centerpoint","default-value":"auto"},"justify-alignment":{css:"text-align",type:["left","right","center","auto"],doc:"Define how text is justified","default-value":"auto","default-meaning":"Auto alignment means that text will be centered by default except when using the `placement-type` parameter - in that case either right or left justification will be used automatically depending on where the text could be fit given the `text-placements` directives"},clip:{css:"text-clip",type:"boolean","default-value":!0,"default-meaning":"geometry will be clipped to map bounds before rendering",doc:"geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts."},"comp-op":{css:"text-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},building:{fill:{css:"building-fill","default-value":"#FFFFFF",doc:"The color of the buildings walls.",type:"color"},"fill-opacity":{css:"building-fill-opacity",type:"float",doc:"The opacity of the building as a whole, including all walls.","default-value":1},height:{css:"building-height",doc:"The height of the building in pixels.",type:"float",expression:!0,"default-value":"0"}},torque:{"-torque-clear-color":{css:"-torque-clear-color",type:"color","default-value":"rgba(255, 255, 255, 0)","default-meaning":"full clear",doc:"color used to clear canvas on each frame"},"-torque-frame-count":{css:"-torque-frame-count","default-value":"128",type:"float","default-meaning":"the data is broken into 128 time frames",doc:"Number of animation steps/frames used in the animation. If the data contains a fewere number of total frames, the lesser value will be used."},"-torque-resolution":{css:"-torque-resolution","default-value":"2",type:"float","default-meaning":"",doc:"Spatial resolution in pixels. A resolution of 1 means no spatial aggregation of the data. Any other resolution of N results in spatial aggregation into cells of NxN pixels. The value N must be power of 2"},"-torque-animation-duration":{css:"-torque-animation-duration","default-value":"30",type:"float","default-meaning":"the animation lasts 30 seconds",doc:"Animation duration in seconds"},"-torque-aggregation-function":{css:"-torque-aggregation-function","default-value":"count(cartodb_id)",type:"string","default-meaning":"the value for each cell is the count of points in that cell",doc:"A function used to calculate a value from the aggregate data for each cell. See -torque-resolution"},"-torque-time-attribute":{css:"-torque-time-attribute","default-value":"time",type:"string","default-meaning":"the data column in your table that is of a time based type",doc:"The table column that contains the time information used create the animation"},"-torque-data-aggregation":{css:"-torque-data-aggregation","default-valu
](e,n.value[r].value))return!0;returno}returni.selector(t).type==n.value[0].is},n.Reference=i})(e("../tree"))}).call(this,typeofglobal!="undefined"?global:typeofself!="undefined"?self:typeofwindow!="undefined"?window:{})},{"../tree":43,"mapnik-reference":72,underscore:73}],64:[function(e,t,n){(function(e){functiont(t){returnObject.keys(e.Reference.selector_cache).map(function(n){return[n,e.Reference.editDistance(t,n)]}).sort(function(e,t){returne[1]-t[1]})}e.Rule=function(n,r,i,s){varo=n.split("/");this.name=o.pop(),this.instance=o.length?o[0]:"__default__",this.value=rinstanceofe.Value?r:newe.Value([r]),this.index=i,this.symbolizer=e.Reference.symbolizer(this.name),this.filename=s,this.variable=n.charAt(0)==="@"},e.Rule.prototype.is="rule",e.Rule.prototype.clone=function(){vart=Object.create(e.Rule.prototype);returnt.name=this.name,t.value=this.value,t.index=this.index,t.instance=this.instance,t.symbolizer=this.symbolizer,t.filename=this.filename,t.variable=this.variable,t},e.Rule.prototype.updateID=function(){returnthis.id=this.zoom+"#"+this.instance+"#"+this.name},e.Rule.prototype.toString=function(){return"["+e.Zoom.toString(this.zoom)+"] "+this.name+": "+this.value},e.Rule.prototype.toXML=function(n,r,i,s){if(!e.Reference.validSelector(this.name)){varo=t(this.name),u="";returno[0][1]<3&&(u=". Did you mean "+o[0][0]+"?"),n.error({message:"Unrecognized rule: "+this.name+u,index:this.index,type:"syntax",filename:this.filename})}if(this.valueinstanceofe.Value&&!e.Reference.validValue(n,this.name,this.value)){if(!e.Reference.selector(this.name))returnn.error({message:"Unrecognized property: "+this.name,index:this.index,type:"syntax",filename:this.filename});vara;returne.Reference.selector(this.name).validate?a=e.Reference.selector(this.name).validate:typeofe.Reference.selector(this.name).type=="object"?a="keyword (options: "+e.Reference.selector(this.name).type.join(", ")+")":a=e.Reference.selector(this.name).type,n.error({message:"Invalid value for "+this.name+", the type "+a+" is expected. "+this.value+" (of type "+this.value.value[0].is+") "+" was given.",index:this.index,type:"syntax",filename:this.filename})}if(this.variable)return"";if(e.Reference.isFont(this.name)&&this.value.value.length>1){varf=e._getFontSet(n,this.value.value);return'fontset-name="'+f.name+'"'}returnr?this.value.toString(n,this.name,i):e.Reference.selectorName(this.name)+'="'+this.value.toString(n,this.name)+'"'},e.Rule.prototype.ev=function(t){returnnewe.Rule(this.name,this.value.ev(t),this.index,this.filename)}})(e("../tree"))},{"../tree":43}],65:[function(e,t,n){(function(e){e.Ruleset=function(t,n){this.selectors=t,this.rules=n,this._lookups={}},e.Ruleset.prototype={is:"ruleset",ev:function(t){varn,r=newe.Ruleset(this.selectors,this.rules.slice(0));r.root=this.root,t.frames.unshift(r);for(n=0,rule;n<r.rules.length;n++)rule=r.rules[n],r.rules[n]=rule.ev?rule.ev(t):rule;returnt.frames.shift(),r},match:function(e){return!e||e.length===0},variables:function(){returnthis._variables?this._variables:this._variables=this.rules.reduce(function(t,n){returnninstanceofe.Rule&&n.variable===!0&&(t[n.name]=n),t},{})},variable:function(e){returnthis.variables()[e]},rulesets:function(){returnthis._rulesets?this._rulesets:this._rulesets=this.rules.filter(function(t){returntinstanceofe.Ruleset})},find:function(t,n){n=n||this;varr=[],i,s,o=t.toString();returnointhis._lookups?this._lookups[o]:(this.rulesets().forEach(function(i){if(i!==n)for(varo=0;o<i.selectors.length;o++){s=t.match(i.selectors[o]);if(s){t.elements.length>1?Array.prototype.push.apply(r,i.find(newe.Selector(null,null,null,t.elements.slice(1)),n)):r.push(i);break}}}),this._lookups[o]=r)},evZooms:function(t){for(varn=0;n<this.selectors.length;n++){varr=e.Zoom.all;for(vari=0;i<this.selectors[n].zoom.length;i++)r&=this.selectors[n].zoom[i].ev(t).zoom;this.selectors[n].zoom=r}},flatten:function(t,n,r){vari=[],s,o;this.selectors.length===0&&(r.frames=r.frames.concat(this.rules)),this.evZooms(r);for(s=0;s<this.selectors.length;s++){varu=this.selectors[