Socket
Socket
Sign inDemoInstall

@carto/airship-bridge

Package Overview
Dependencies
Maintainers
14
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@carto/airship-bridge - npm Package Compare versions

Comparing version 2.3.1 to 2.3.2-rc.0

2

dist/asbridge.min.js

@@ -1,1 +0,1 @@

!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.AsBridge=e():t.AsBridge=e()}(window,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=2)}([function(t,e,r){(function(r){var n;e=t.exports=Z,n="object"==typeof r&&r.env&&r.env.NODE_DEBUG&&/\bsemver\b/i.test(r.env.NODE_DEBUG)?function(){var t=Array.prototype.slice.call(arguments,0);t.unshift("SEMVER"),console.log.apply(console,t)}:function(){},e.SEMVER_SPEC_VERSION="2.0.0";var i=Number.MAX_SAFE_INTEGER||9007199254740991,o=e.re=[],a=e.src=[],s=0,u=s++;a[u]="0|[1-9]\\d*";var l=s++;a[l]="[0-9]+";var c=s++;a[c]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var p=s++;a[p]="("+a[u]+")\\.("+a[u]+")\\.("+a[u]+")";var h=s++;a[h]="("+a[l]+")\\.("+a[l]+")\\.("+a[l]+")";var f=s++;a[f]="(?:"+a[u]+"|"+a[c]+")";var m=s++;a[m]="(?:"+a[l]+"|"+a[c]+")";var _=s++;a[_]="(?:-("+a[f]+"(?:\\."+a[f]+")*))";var d=s++;a[d]="(?:-?("+a[m]+"(?:\\."+a[m]+")*))";var v=s++;a[v]="[0-9A-Za-z-]+";var g=s++;a[g]="(?:\\+("+a[v]+"(?:\\."+a[v]+")*))";var y=s++,b="v?"+a[p]+a[_]+"?"+a[g]+"?";a[y]="^"+b+"$";var w="[v=\\s]*"+a[h]+a[d]+"?"+a[g]+"?",x=s++;a[x]="^"+w+"$";var L=s++;a[L]="((?:<|>)?=?)";var j=s++;a[j]=a[l]+"|x|X|\\*";var O=s++;a[O]=a[u]+"|x|X|\\*";var P=s++;a[P]="[v=\\s]*("+a[O]+")(?:\\.("+a[O]+")(?:\\.("+a[O]+")(?:"+a[_]+")?"+a[g]+"?)?)?";var E=s++;a[E]="[v=\\s]*("+a[j]+")(?:\\.("+a[j]+")(?:\\.("+a[j]+")(?:"+a[d]+")?"+a[g]+"?)?)?";var N=s++;a[N]="^"+a[L]+"\\s*"+a[P]+"$";var T=s++;a[T]="^"+a[L]+"\\s*"+a[E]+"$";var z=s++;a[z]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var S=s++;a[S]="(?:~>?)";var k=s++;a[k]="(\\s*)"+a[S]+"\\s+",o[k]=new RegExp(a[k],"g");var D=s++;a[D]="^"+a[S]+a[P]+"$";var C=s++;a[C]="^"+a[S]+a[E]+"$";var H=s++;a[H]="(?:\\^)";var A=s++;a[A]="(\\s*)"+a[H]+"\\s+",o[A]=new RegExp(a[A],"g");var V=s++;a[V]="^"+a[H]+a[P]+"$";var R=s++;a[R]="^"+a[H]+a[E]+"$";var F=s++;a[F]="^"+a[L]+"\\s*("+w+")$|^$";var W=s++;a[W]="^"+a[L]+"\\s*("+b+")$|^$";var $=s++;a[$]="(\\s*)"+a[L]+"\\s*("+w+"|"+a[P]+")",o[$]=new RegExp(a[$],"g");var M=s++;a[M]="^\\s*("+a[P]+")\\s+-\\s+("+a[P]+")\\s*$";var I=s++;a[I]="^\\s*("+a[E]+")\\s+-\\s+("+a[E]+")\\s*$";var B=s++;a[B]="(<|>)?=?\\s*\\*";for(var U=0;U<35;U++)n(U,a[U]),o[U]||(o[U]=new RegExp(a[U]));function q(t,e){if(e&&"object"==typeof e||(e={loose:!!e,includePrerelease:!1}),t instanceof Z)return t;if("string"!=typeof t)return null;if(t.length>256)return null;if(!(e.loose?o[x]:o[y]).test(t))return null;try{return new Z(t,e)}catch(t){return null}}function Z(t,e){if(e&&"object"==typeof e||(e={loose:!!e,includePrerelease:!1}),t instanceof Z){if(t.loose===e.loose)return t;t=t.version}else if("string"!=typeof t)throw new TypeError("Invalid Version: "+t);if(t.length>256)throw new TypeError("version is longer than 256 characters");if(!(this instanceof Z))return new Z(t,e);n("SemVer",t,e),this.options=e,this.loose=!!e.loose;var r=t.trim().match(e.loose?o[x]:o[y]);if(!r)throw new TypeError("Invalid Version: "+t);if(this.raw=t,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>i||this.major<0)throw new TypeError("Invalid major version");if(this.minor>i||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>i||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((function(t){if(/^[0-9]+$/.test(t)){var e=+t;if(e>=0&&e<i)return e}return t})):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}e.parse=q,e.valid=function(t,e){var r=q(t,e);return r?r.version:null},e.clean=function(t,e){var r=q(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null},e.SemVer=Z,Z.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},Z.prototype.toString=function(){return this.version},Z.prototype.compare=function(t){return n("SemVer.compare",this.version,this.options,t),t instanceof Z||(t=new Z(t,this.options)),this.compareMain(t)||this.comparePre(t)},Z.prototype.compareMain=function(t){return t instanceof Z||(t=new Z(t,this.options)),G(this.major,t.major)||G(this.minor,t.minor)||G(this.patch,t.patch)},Z.prototype.comparePre=function(t){if(t instanceof Z||(t=new Z(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;var e=0;do{var r=this.prerelease[e],i=t.prerelease[e];if(n("prerelease compare",e,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return G(r,i)}while(++e)},Z.prototype.inc=function(t,e){switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",e);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",e);break;case"prepatch":this.prerelease.length=0,this.inc("patch",e),this.inc("pre",e);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",e),this.inc("pre",e);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{for(var r=this.prerelease.length;--r>=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);-1===r&&this.prerelease.push(0)}e&&(this.prerelease[0]===e?isNaN(this.prerelease[1])&&(this.prerelease=[e,0]):this.prerelease=[e,0]);break;default:throw new Error("invalid increment argument: "+t)}return this.format(),this.raw=this.version,this},e.inc=function(t,e,r,n){"string"==typeof r&&(n=r,r=void 0);try{return new Z(t,r).inc(e,n).version}catch(t){return null}},e.diff=function(t,e){if(Y(t,e))return null;var r=q(t),n=q(e),i="";if(r.prerelease.length||n.prerelease.length){i="pre";var o="prerelease"}for(var a in r)if(("major"===a||"minor"===a||"patch"===a)&&r[a]!==n[a])return i+a;return o},e.compareIdentifiers=G;var X=/^[0-9]+$/;function G(t,e){var r=X.test(t),n=X.test(e);return r&&n&&(t=+t,e=+e),t===e?0:r&&!n?-1:n&&!r?1:t<e?-1:1}function J(t,e,r){return new Z(t,r).compare(new Z(e,r))}function K(t,e,r){return J(t,e,r)>0}function Q(t,e,r){return J(t,e,r)<0}function Y(t,e,r){return 0===J(t,e,r)}function tt(t,e,r){return 0!==J(t,e,r)}function et(t,e,r){return J(t,e,r)>=0}function rt(t,e,r){return J(t,e,r)<=0}function nt(t,e,r,n){switch(e){case"===":return"object"==typeof t&&(t=t.version),"object"==typeof r&&(r=r.version),t===r;case"!==":return"object"==typeof t&&(t=t.version),"object"==typeof r&&(r=r.version),t!==r;case"":case"=":case"==":return Y(t,r,n);case"!=":return tt(t,r,n);case">":return K(t,r,n);case">=":return et(t,r,n);case"<":return Q(t,r,n);case"<=":return rt(t,r,n);default:throw new TypeError("Invalid operator: "+e)}}function it(t,e){if(e&&"object"==typeof e||(e={loose:!!e,includePrerelease:!1}),t instanceof it){if(t.loose===!!e.loose)return t;t=t.value}if(!(this instanceof it))return new it(t,e);n("comparator",t,e),this.options=e,this.loose=!!e.loose,this.parse(t),this.semver===ot?this.value="":this.value=this.operator+this.semver.version,n("comp",this)}e.rcompareIdentifiers=function(t,e){return G(e,t)},e.major=function(t,e){return new Z(t,e).major},e.minor=function(t,e){return new Z(t,e).minor},e.patch=function(t,e){return new Z(t,e).patch},e.compare=J,e.compareLoose=function(t,e){return J(t,e,!0)},e.rcompare=function(t,e,r){return J(e,t,r)},e.sort=function(t,r){return t.sort((function(t,n){return e.compare(t,n,r)}))},e.rsort=function(t,r){return t.sort((function(t,n){return e.rcompare(t,n,r)}))},e.gt=K,e.lt=Q,e.eq=Y,e.neq=tt,e.gte=et,e.lte=rt,e.cmp=nt,e.Comparator=it;var ot={};function at(t,e){if(e&&"object"==typeof e||(e={loose:!!e,includePrerelease:!1}),t instanceof at)return t.loose===!!e.loose&&t.includePrerelease===!!e.includePrerelease?t:new at(t.raw,e);if(t instanceof it)return new at(t.value,e);if(!(this instanceof at))return new at(t,e);if(this.options=e,this.loose=!!e.loose,this.includePrerelease=!!e.includePrerelease,this.raw=t,this.set=t.split(/\s*\|\|\s*/).map((function(t){return this.parseRange(t.trim())}),this).filter((function(t){return t.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: "+t);this.format()}function st(t){return!t||"x"===t.toLowerCase()||"*"===t}function ut(t,e,r,n,i,o,a,s,u,l,c,p,h){return((e=st(r)?"":st(n)?">="+r+".0.0":st(i)?">="+r+"."+n+".0":">="+e)+" "+(s=st(u)?"":st(l)?"<"+(+u+1)+".0.0":st(c)?"<"+u+"."+(+l+1)+".0":p?"<="+u+"."+l+"."+c+"-"+p:"<="+s)).trim()}function lt(t,e,r){for(var i=0;i<t.length;i++)if(!t[i].test(e))return!1;if(e.prerelease.length&&!r.includePrerelease){for(i=0;i<t.length;i++)if(n(t[i].semver),t[i].semver!==ot&&t[i].semver.prerelease.length>0){var o=t[i].semver;if(o.major===e.major&&o.minor===e.minor&&o.patch===e.patch)return!0}return!1}return!0}function ct(t,e,r){try{e=new at(e,r)}catch(t){return!1}return e.test(t)}function pt(t,e,r,n){var i,o,a,s,u;switch(t=new Z(t,n),e=new at(e,n),r){case">":i=K,o=rt,a=Q,s=">",u=">=";break;case"<":i=Q,o=et,a=K,s="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(ct(t,e,n))return!1;for(var l=0;l<e.set.length;++l){var c=e.set[l],p=null,h=null;if(c.forEach((function(t){t.semver===ot&&(t=new it(">=0.0.0")),p=p||t,h=h||t,i(t.semver,p.semver,n)?p=t:a(t.semver,h.semver,n)&&(h=t)})),p.operator===s||p.operator===u)return!1;if((!h.operator||h.operator===s)&&o(t,h.semver))return!1;if(h.operator===u&&a(t,h.semver))return!1}return!0}it.prototype.parse=function(t){var e=this.options.loose?o[F]:o[W],r=t.match(e);if(!r)throw new TypeError("Invalid comparator: "+t);this.operator=r[1],"="===this.operator&&(this.operator=""),r[2]?this.semver=new Z(r[2],this.options.loose):this.semver=ot},it.prototype.toString=function(){return this.value},it.prototype.test=function(t){return n("Comparator.test",t,this.options.loose),this.semver===ot||("string"==typeof t&&(t=new Z(t,this.options)),nt(t,this.operator,this.semver,this.options))},it.prototype.intersects=function(t,e){if(!(t instanceof it))throw new TypeError("a Comparator is required");var r;if(e&&"object"==typeof e||(e={loose:!!e,includePrerelease:!1}),""===this.operator)return r=new at(t.value,e),ct(this.value,r,e);if(""===t.operator)return r=new at(this.value,e),ct(t.semver,r,e);var n=!(">="!==this.operator&&">"!==this.operator||">="!==t.operator&&">"!==t.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==t.operator&&"<"!==t.operator),o=this.semver.version===t.semver.version,a=!(">="!==this.operator&&"<="!==this.operator||">="!==t.operator&&"<="!==t.operator),s=nt(this.semver,"<",t.semver,e)&&(">="===this.operator||">"===this.operator)&&("<="===t.operator||"<"===t.operator),u=nt(this.semver,">",t.semver,e)&&("<="===this.operator||"<"===this.operator)&&(">="===t.operator||">"===t.operator);return n||i||o&&a||s||u},e.Range=at,at.prototype.format=function(){return this.range=this.set.map((function(t){return t.join(" ").trim()})).join("||").trim(),this.range},at.prototype.toString=function(){return this.range},at.prototype.parseRange=function(t){var e=this.options.loose;t=t.trim();var r=e?o[I]:o[M];t=t.replace(r,ut),n("hyphen replace",t),t=t.replace(o[$],"$1$2$3"),n("comparator trim",t,o[$]),t=(t=(t=t.replace(o[k],"$1~")).replace(o[A],"$1^")).split(/\s+/).join(" ");var i=e?o[F]:o[W],a=t.split(" ").map((function(t){return function(t,e){return n("comp",t,e),t=function(t,e){return t.trim().split(/\s+/).map((function(t){return function(t,e){n("caret",t,e);var r=e.loose?o[R]:o[V];return t.replace(r,(function(e,r,i,o,a){var s;return n("caret",t,e,r,i,o,a),st(r)?s="":st(i)?s=">="+r+".0.0 <"+(+r+1)+".0.0":st(o)?s="0"===r?">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":">="+r+"."+i+".0 <"+(+r+1)+".0.0":a?(n("replaceCaret pr",a),s="0"===r?"0"===i?">="+r+"."+i+"."+o+"-"+a+" <"+r+"."+i+"."+(+o+1):">="+r+"."+i+"."+o+"-"+a+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+o+"-"+a+" <"+(+r+1)+".0.0"):(n("no pr"),s="0"===r?"0"===i?">="+r+"."+i+"."+o+" <"+r+"."+i+"."+(+o+1):">="+r+"."+i+"."+o+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+o+" <"+(+r+1)+".0.0"),n("caret return",s),s}))}(t,e)})).join(" ")}(t,e),n("caret",t),t=function(t,e){return t.trim().split(/\s+/).map((function(t){return function(t,e){var r=e.loose?o[C]:o[D];return t.replace(r,(function(e,r,i,o,a){var s;return n("tilde",t,e,r,i,o,a),st(r)?s="":st(i)?s=">="+r+".0.0 <"+(+r+1)+".0.0":st(o)?s=">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":a?(n("replaceTilde pr",a),s=">="+r+"."+i+"."+o+"-"+a+" <"+r+"."+(+i+1)+".0"):s=">="+r+"."+i+"."+o+" <"+r+"."+(+i+1)+".0",n("tilde return",s),s}))}(t,e)})).join(" ")}(t,e),n("tildes",t),t=function(t,e){return n("replaceXRanges",t,e),t.split(/\s+/).map((function(t){return function(t,e){t=t.trim();var r=e.loose?o[T]:o[N];return t.replace(r,(function(e,r,i,o,a,s){n("xRange",t,e,r,i,o,a,s);var u=st(i),l=u||st(o),c=l||st(a);return"="===r&&c&&(r=""),u?e=">"===r||"<"===r?"<0.0.0":"*":r&&c?(l&&(o=0),a=0,">"===r?(r=">=",l?(i=+i+1,o=0,a=0):(o=+o+1,a=0)):"<="===r&&(r="<",l?i=+i+1:o=+o+1),e=r+i+"."+o+"."+a):l?e=">="+i+".0.0 <"+(+i+1)+".0.0":c&&(e=">="+i+"."+o+".0 <"+i+"."+(+o+1)+".0"),n("xRange return",e),e}))}(t,e)})).join(" ")}(t,e),n("xrange",t),t=function(t,e){return n("replaceStars",t,e),t.trim().replace(o[B],"")}(t,e),n("stars",t),t}(t,this.options)}),this).join(" ").split(/\s+/);return this.options.loose&&(a=a.filter((function(t){return!!t.match(i)}))),a=a.map((function(t){return new it(t,this.options)}),this)},at.prototype.intersects=function(t,e){if(!(t instanceof at))throw new TypeError("a Range is required");return this.set.some((function(r){return r.every((function(r){return t.set.some((function(t){return t.every((function(t){return r.intersects(t,e)}))}))}))}))},e.toComparators=function(t,e){return new at(t,e).set.map((function(t){return t.map((function(t){return t.value})).join(" ").trim().split(" ")}))},at.prototype.test=function(t){if(!t)return!1;"string"==typeof t&&(t=new Z(t,this.options));for(var e=0;e<this.set.length;e++)if(lt(this.set[e],t,this.options))return!0;return!1},e.satisfies=ct,e.maxSatisfying=function(t,e,r){var n=null,i=null;try{var o=new at(e,r)}catch(t){return null}return t.forEach((function(t){o.test(t)&&(n&&-1!==i.compare(t)||(i=new Z(n=t,r)))})),n},e.minSatisfying=function(t,e,r){var n=null,i=null;try{var o=new at(e,r)}catch(t){return null}return t.forEach((function(t){o.test(t)&&(n&&1!==i.compare(t)||(i=new Z(n=t,r)))})),n},e.minVersion=function(t,e){t=new at(t,e);var r=new Z("0.0.0");if(t.test(r))return r;if(r=new Z("0.0.0-0"),t.test(r))return r;r=null;for(var n=0;n<t.set.length;++n){t.set[n].forEach((function(t){var e=new Z(t.semver.version);switch(t.operator){case">":0===e.prerelease.length?e.patch++:e.prerelease.push(0),e.raw=e.format();case"":case">=":r&&!K(r,e)||(r=e);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+t.operator)}}))}if(r&&t.test(r))return r;return null},e.validRange=function(t,e){try{return new at(t,e).range||"*"}catch(t){return null}},e.ltr=function(t,e,r){return pt(t,e,"<",r)},e.gtr=function(t,e,r){return pt(t,e,">",r)},e.outside=pt,e.prerelease=function(t,e){var r=q(t,e);return r&&r.prerelease.length?r.prerelease:null},e.intersects=function(t,e,r){return t=new at(t,r),e=new at(e,r),t.intersects(e)},e.coerce=function(t){if(t instanceof Z)return t;if("string"!=typeof t)return null;var e=t.match(o[z]);if(null==e)return null;return q(e[1]+"."+(e[2]||"0")+"."+(e[3]||"0"))}}).call(this,r(1))},function(t,e){var r,n,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(r===setTimeout)return setTimeout(t,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(t){r=o}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(t){n=a}}();var u,l=[],c=!1,p=-1;function h(){c&&u&&(c=!1,u.length?l=u.concat(l):p=-1,l.length&&f())}function f(){if(!c){var t=s(h);c=!0;for(var e=l.length;e;){for(u=l,l=[];++p<e;)u&&u[p].run();p=-1,e=l.length}u=null,c=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function m(t,e){this.fun=t,this.array=e}function _(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];l.push(new m(t,e)),1!==l.length||c||s(f)},m.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=_,i.addListener=_,i.once=_,i.off=_,i.removeListener=_,i.removeAllListeners=_,i.emit=_,i.prependListener=_,i.prependOnceListener=_,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,r){"use strict";function n(t){return"string"==typeof t?document.querySelector(t):t}function i(t){return"string"==typeof t?t:t.propertyName}function o(t){return"string"==typeof t?null:t}r.r(e),r.d(e,"VLBridge",(function(){return Z})),r.d(e,"VL",(function(){return X}));var a=function(){function t(t,e,r,i){this._layersSelector=n(t),this._carto=e,this._layers=r,this._mapLayers=i}return t.prototype.build=function(){var t=this;this._carto.on("loaded",this._mapLayers,(function(){t._layersSelector.layers=t._layers,t._layersSelector.forceUpdate(),t._layersSelector.addEventListener("onToggleLayer",(function(e){var r=t._mapLayers[e.detail.index];r[r.visible?"hide":"show"]()}))}))},t}();function s(t){return"#"+l(t.r)+l(t.g)+l(t.b)+l(Math.floor(255*t.a))}function u(t){return"rgba("+t.r+","+t.g+","+t.b+","+t.a+")"}function l(t){return isNaN(t)||void 0===t?"":t.toString(16).padStart(2,"0").toUpperCase()}function c(t,e,r){void 0===r&&(r=!1),r&&t.on("updated",(function(){e(!1)})),t.viz?e(!0):t.on("loaded",(function(){e(!0)}))}var p=function(){return(p=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function h(t,e){void 0===e&&(e={});var r=t.getLegendData(e.config),n=Math.floor(r.data.length/2);return r.data[n].value}function f(t,e,r){void 0===r&&(r={});var n=t[e];return"ramp"===n.expressionName||"opacity"===n.expressionName?u(h(n,r)):"color"===n.type?u(n.value):"#000"}function m(t,e,r){void 0===r&&(r={});var n=t[e];return"ramp"===n.expressionName?r?h(n,r):16:"number"===n.type?n.value:16}function _(t,e,r){void 0===e&&(e=null),void 0===r&&(r={});var n=e&&t.variables[e]?t.variables[e]:t.symbol;return"ramp"===n.expressionName?h(n,r):n.value}function d(t,e){var r=t.layer,n=t.props,i=r.viz;return i?p({color:f(i,"color",e),label:n.label,marker:i.symbol.default?void 0:_(i,e),strokeColor:f(i,"strokeColor",e),strokeStyle:0===m(i,"strokeWidth",e)?"hidden":void 0,type:r.metadata.geomType,width:m(i,"width",e)},n):{}}function v(t){return t.props?t:{layer:t,props:{label:t.id}}}var g=function(){function t(){}return t.layersLegend=function(t,e,r){var i=this;void 0===r&&(r={}),t=n(t);var o=e.map(v);o.forEach((function(e,n,a){c(e.layer,(function(){var e=o.map(d.bind(i,r));r.format&&(e.label=r.format(e.label,n,a)),t.data=e,r.onLoad&&setTimeout(r.onLoad,0)}),r.dynamic)}))},t.rampLegend=function(t,e,r,i){void 0===i&&(i={}),t=n(t);var o=v(e);c(o.layer,(function(){var e=d(o,i),n=o.layer.viz[r],a=i.config,u=i.config.variable||r,l=o.layer.viz.variables[u]?o.layer.viz.variables[u]:o.layer.viz[u],c=l.getLegendData(a).data,h=c.map((function(t,o,a){var u,c,h,f,m;return p({},e,((u={})[r]=function(t,e){return"color"===t.type?s(e):e}(n,t.value),u.label=i.format?i.format(t.key,o,a):(c=l.key,Array.isArray(c)?(f=(h=c)[0],m=h[1],f===-1/0?"< "+m.toFixed(2):m===1/0?"> "+f.toFixed(2):f.toFixed(2)+" - "+m.toFixed(2)):c.toFixed?c.toFixed(2):c),u))}));Array.isArray(o.props)&&o.props.length===c.length?t.data=h.map((function(t,e){return p({},t,o.props[e])})):t.data=h,i.onLoad&&setTimeout(i.onLoad,0)}),i.dynamic)},t}(),y=r(0),b=r.n(y),w=function(){function t(t,e,r,i,o,a,s,u,l,c,p){var h=this;void 0===a&&(a=10),void 0===s&&(s=[.15,.15]),this._animationWidget=n(t),this._column=r,this._variableName=i||"animation",this._propertyName=o||"filter",this._carto=e,this._duration=a,this._fade=s,this._autoplay=u||!1,this._animationWidget.playing=this._autoplay,this._animationWidget.isLoading=!0,this._layer=l,this._formatCb=p,l.viz?(this._onLayerLoaded(),c()):l.on("loaded",(function(){h._onLayerLoaded(),c()}))}return Object.defineProperty(t.prototype,"animation",{get:function(){return this._animation},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"variableName",{get:function(){return this._variableName},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"propertyName",{get:function(){return this._propertyName},set:function(t){this._propertyName=t},enumerable:!0,configurable:!0}),t.prototype.restart=function(){this._animation.setProgressPct(0)},t.prototype.setRange=function(){},t.prototype._onLayerLoaded=function(){var t=this;this._viz=this._layer.viz;var e=this._getAnimationExpression();e.a&&e.b?this._animation="animation"===e.a.expressionName?e.a:e.b:this._animation=e,this._viz[this._propertyName].blendTo(e,0),this._animation.parent=this._viz,this._animation.notify=this._viz._changed.bind(this._viz),this._animationWidget.duration=this._animation.duration.value,this._animationWidget.playing=this._autoplay,this._animationWidget.isLoading=!1,this._animationWidget.addEventListener("play",(function(){t._animation.play()})),this._animationWidget.addEventListener("pause",(function(){t._animation.pause()})),this._animationWidget.addEventListener("seek",(function(e){t._animation.setProgressPct(e.detail[0]/100),t._animation.notify(),t._animationWidget.progressValue=t._formatProgressValue()})),this._layer.on("updated",(function(){t._animationWidget.progress=100*t._animation.getProgressPct(),t._animationWidget.progressValue=t._formatProgressValue()}))},t.prototype._getAnimationExpression=function(){return this._variableName&&this._viz.variables[this._variableName]||(this._viz.variables[this._variableName]=this._propertyName&&this._viz[this._propertyName].isAnimated()?this._viz[this._propertyName]:this._createDefaultAnimation()),this._viz.variables[this._variableName]},t.prototype._formatProgressValue=function(){var t=this._animation.getProgressValue();return t instanceof Date?this._formatCb?this._formatCb(t):t.toISOString():t instanceof Object&&this._isVLTimeZoneDate(t)?this._formatCb?this._formatCb(t._date):t._date.toISOString():this._formatCb?this._formatCb(t):t},t.prototype._isVLTimeZoneDate=function(t){return"_date"in t},t.prototype._createDefaultAnimation=function(){var t=this._carto.expressions;return t.animation(t.linear(t.prop(this._column),t.globalMin(t.prop(this._column)),t.globalMax(t.prop(this._column))),this._duration,t.fade(this._fade[0],this._fade[1]))},t}();var x=function(t){return t=t||Object.create(null),{on:function(e,r){(t[e]||(t[e]=[])).push(r)},off:function(e,r){t[e]&&t[e].splice(t[e].indexOf(r)>>>0,1)},emit:function(e,r){(t[e]||[]).slice().map((function(t){t(r)})),(t["*"]||[]).slice().map((function(t){t(e,r)}))}}},L=function(){function t(e,r,n,i,o,a,s){void 0===a&&(a=!0),void 0===s&&(s=1);var u=r.expressions;this._emitter=x(),this._name="asbind_"+e+"_"+n+"_"+t._counter,this._column=n,this._layer=i,this._source=o,this._readOnly=a,t._counter++,this._weight="number"==typeof s?s:u.prop(s),this._loadLegendData=this._loadLegendData.bind(this,this._name)}return Object.defineProperty(t.prototype,"globalExpression",{get:function(){return null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"column",{get:function(){return this._column},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"columnPropName",{get:function(){return this._name+"_col"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"readOnly",{get:function(){return this._readOnly},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"layer",{get:function(){return this._layer},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"source",{get:function(){return this._source},enumerable:!0,configurable:!0}),t.prototype.on=function(t,e){this._emitter.on(t,e)},t.prototype.setLegendData=function(t){this._legendData=t.data},t.prototype.enableColorMapping=function(){this._mapColors=!0,this._layer.viz?this._loadLegendData():this._layer.on("loaded",this._loadLegendData)},t.prototype._filterChanged=function(){this._emitter.emit("filterChanged",this._name)},t.prototype._loadLegendData=function(t){void 0===t&&(t="color");var e=this._layer.viz[t];e.getLegendData&&this.setLegendData(e.getLegendData(this._getLegendConfig()))},t.prototype._getLegendConfig=function(){},t._counter=0,t}();function j(t,e){return P(t.value,e.value,E)}function O(t,e){return P(t.value,e.value,N)}function P(t,e,r){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(r(t[n],e[n]))return!1;return!0}function E(t,e){return t.x[0]!==e.x[0]||t.x[1]!==e.x[1]||t.y!==e.y}function N(t,e){return t.x!==e.x||t.y!==e.y}function T(t){return t.value.map((function(t){return{end:t.x[1],start:t.x[0],value:t.y}}))}function z(t){return t.value.map((function(t){return{end:new Date(t.x[1]),start:new Date(t.x[0]),value:t.y}}))}function S(t,e){return t.value.map((function(t){return{category:t.x,color:k(t.x,e),end:void 0,start:void 0,value:t.y}}))}function k(t,e){if(e){var r=e.find((function(e){return e.key===t}));return r?function(t){return"string"==typeof t?t:s(t)}(r.value):void 0}}var D,C=function(t,e){return void 0===e&&(e=[]),t.value.map((function(t){return{color:k(t.x,e),name:t.x,value:t.y}}))},H=(D=function(t,e){return(D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}D(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),A=function(t){function e(e,r,i,o,a,s,u,l,c){void 0===u&&(u=!0);var p=t.call(this,"category",e,o,r,a,u,s)||this;return p._selection=[],p._lastHistogram=null,p._button=null,p._widget=n(i),p._carto=e,p._button=n(l),p._expression=c,p._widget.disableInteractivity=u,p._widget.showClearButton=!u,p.selectionChanged=p.selectionChanged.bind(p),u||(p._widget.addEventListener("categoriesSelected",p.selectionChanged),p._button&&p._button.addEventListener&&p._button.addEventListener("click",(function(){p._filterChanged()}))),p}return H(e,t),e.prototype.setDataLayer=function(t){var e=this;this._dataLayer=t,this._dataLayer.on("updated",(function(){var t=e._dataLayer.viz.variables[e.name];t&&(null!==e._lastHistogram&&O(e._lastHistogram,t)||(e._lastHistogram={value:t.value},e._widget.categories=C(t,e._legendData)))}))},Object.defineProperty(e.prototype,"filter",{get:function(){return 0===this._selection.length?null:"@"+this.columnPropName+" in ["+this._selection.map((function(t){return"'"+t+"'"})).join(",")+"]"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"expression",{get:function(){var t=this._carto.expressions;return t.viewportHistogram(this._expression?this._expression:t.prop(this._column),this._weight)},enumerable:!0,configurable:!0}),e.prototype.selectionChanged=function(t){this._selection=t.detail,0!==this._selection.length&&this._button||this._filterChanged()},e}(L),V=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),R=function(t){function e(e,r,i,o,a,s,u,l,c,p){void 0===u&&(u=!0),void 0===c&&(c=!1),void 0===p&&(p=null);var h=t.call(this,"histogram_"+e,r,a,i,s,u,l)||this;return h._selection=null,h._inputExpression=null,h._totals=!1,h._widget=n(o),h._carto=r,h._totals=c,h._widget.disableInteractivity=u,h._widget.showClear=!u,h._inputExpression=p,h.selectionChanged=h.selectionChanged.bind(h),u||h._widget.addEventListener("selectionChanged",h.selectionChanged),h}return V(e,t),e.prototype.removeHistogramLayer=function(){this._layer.remove()},e.prototype.setDataLayer=function(t){this._dataLayer=t,this.bindDataLayer()},e.prototype._getLegendConfig=function(){return{samples:this._buckets}},e}(L),F=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),W=function(t){function e(e,r,n,i,o,a,s,u,l){void 0===a&&(a=!0),void 0===u&&(u=!1),void 0===l&&(l=null);var c=t.call(this,"categorical",e,r,n,i,o,a,s,u,l)||this;return c._lastHistogram=null,c}return F(e,t),Object.defineProperty(e.prototype,"filter",{get:function(){return null===this._selection?null:"@"+this.columnPropName+" in ["+this._selection.map((function(t){return"'"+t+"'"})).join(",")+"]"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"expression",{get:function(){var t=this._carto.expressions;return t.viewportHistogram(this._inputExpression?this._inputExpression:t.prop(this._column),this._weight)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"globalExpression",{get:function(){if(!this._totals)return null;var t=this._carto.expressions;return t.globalHistogram(this._inputExpression?this._inputExpression:t.prop(this._column),this._weight)},enumerable:!0,configurable:!0}),e.prototype.bindDataLayer=function(){var t=this;this._dataLayer.on("updated",(function(){t._totals&&!t._globalHistogram&&(t._globalHistogram=t._dataLayer.viz.variables[t.name+"_global"],t._widget.backgroundData=S(t._globalHistogram));var e=t._dataLayer.viz.variables[t.name];if(e&&(null===t._lastHistogram||!O(t._lastHistogram,e)))if(t._lastHistogram={value:e.value},t._globalHistogram){var r=t._globalHistogram.value.map((function(t){var r=e.value.find((function(e){return e.x===t.x}));return{x:t.x,y:r?r.y:0}}));t._widget.data=S({value:r},t._legendData)}else t._widget.data=S(e,t._legendData)}))},e.prototype.selectionChanged=function(t){if(null===t.detail)this._selection=null;else{var e=t.detail.selection;this._selection=e.map((function(t){return t}))}this._filterChanged()},e}(R),$=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),M=function(t){function e(e,r,n,i,o,a,s,u,l,c,p){void 0===o&&(o=20),void 0===l&&(l=!0),void 0===c&&(c=!1),void 0===p&&(p=null);var h=t.call(this,"numerical",e,r,n,i,s,l,a,c,p)||this;return h._lastHistogram=null,h._buckets=void 0!==u?u.length:o,h._bucketRanges=u,h}return $(e,t),Object.defineProperty(e.prototype,"filter",{get:function(){if(null===this._selection||this._isTimeSeries)return null;var t=this._selection[0],e=this._selection[1],r=t instanceof Date?"date('"+t.toISOString()+"')":t,n=e instanceof Date?"date('"+e.toISOString()+"')":e;return"(@"+this.columnPropName+" >= "+r+" and @"+this.columnPropName+" <= "+n+")"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"expression",{get:function(){if(this._totals&&!this._globalHistogram)return null;var t=this._carto.expressions;return t.viewportHistogram(this._inputExpression?this._inputExpression:t.prop(this._column),this._bucketArg(),this._weight)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"globalExpression",{get:function(){if(!this._totals)return null;var t=this._carto.expressions;return t.globalHistogram(this._inputExpression?this._inputExpression:t.prop(this._column),this._bucketArg(),this._weight)},enumerable:!0,configurable:!0}),e.prototype.setTimeSeries=function(t){this._isTimeSeries=t},e.prototype.enableColorMapping=function(){throw new Error("Unsupported for numerical histograms")},e.prototype.setLegendData=function(){throw new Error("Unsupported for numerical histograms")},e.prototype.bindDataLayer=function(){var t=this;this._dataLayer.on("updated",(function(){if(t._totals&&!t._globalHistogram&&(t._globalHistogram=t._dataLayer.viz.variables[t.name+"_global"],t._globalHistogram)){var e=t._globalHistogram.input.type;t._bucketRanges=t._globalHistogram.value.map((function(t){return[t.x[0],t.x[1]]})),t._emitter.emit("expressionReady",{name:t.name,expression:t.expression}),t._widget.backgroundData="number"===e?T(t._globalHistogram):z(t._globalHistogram)}var r=t._dataLayer.viz.variables[t.name];if(r&&null!==r.value&&(null===t._lastHistogram||!j(t._lastHistogram,r))){e=r.input.type;t._emitter.emit("rangeChanged",[r.value[0].x[0],r.value[r.value.length-1].x[1]]),t._lastHistogram={value:r.value,input:{type:e}},t._widget.data="number"===e?T(r):z(r)}}))},e.prototype.selectionChanged=function(t){if(null===t.detail)this._selection=null;else{var e=this._isTimeSeries?t.detail:t.detail.selection;this._selection=[e[0],e[1]]}this._emitter.emit("rangeChanged",this._selection),this._filterChanged()},e.prototype._bucketArg=function(){return void 0!==this._bucketRanges?this._bucketRanges:this._buckets},e}(R),I=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),B=function(t){function e(e,r,i,o,a){var s=t.call(this,"global_range",e,o,r,a,!1)||this;return s._value=null,s._widget=n(i),s._carto=e,s._widget.addEventListener("change",(function(t){s._value=t.detail,s._filterChanged()})),s}return I(e,t),e.prototype.setDataLayer=function(t){var e=this;this._dataLayer=t,this._dataLayer.on("updated",(function(){var t=e._dataLayer.viz.variables[e.name];t&&!e._populated&&(e._widget.minValue=t.value[0],e._widget.maxValue=t.value[1],e._widget.range=t.value,e._populated=!0)}))},Object.defineProperty(e.prototype,"filter",{get:function(){return null===this._value?null:"@"+this.columnPropName+" > "+this._value[0]+" and @"+this.columnPropName+" < "+this._value[1]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"expression",{get:function(){var t=this._carto.expressions;return t.list([t.globalMin(t.prop(this._column)),t.globalMax(t.prop(this._column))])},enumerable:!0,configurable:!0}),e}(L),U=function(){function t(t,e,r,i,o,a,s,u,l,c){var p=this;void 0===a&&(a=10),void 0===s&&(s=[.15,.15]),this._timeSeriesWidget=n(i),this._layer=e,this._carto=t,this._columnName=r,this._duration=a,this._fade=s,this._variableName=u||"animation",this._propertyName=l||"filter",this._autoplay=c||!1,e.viz?(this._onLayerLoaded(),o()):e.on("loaded",(function(){p._onLayerLoaded(),o()}))}return t.prototype.removeHistogramLayer=function(){this._dataLayer.remove()},t.prototype.setRange=function(t){if(this._animation&&this._animation.input&&this._animation.input.min&&this._animation.input.max)if(null===t)this._animation.input.min.blendTo(this._min,0),this._animation.input.max.blendTo(this._max,0),this._animation.duration.blendTo(this._duration,0);else if(t[0]!==t[1]){var e=this._carto.expressions,r=void 0,n=void 0,i=void 0;"Blend"===this._animation.input.min.expressionName&&"Transition"!==this._animation.input.min.mix.expressionName&&("number"==typeof t[0]&&"number"==typeof t[1]?(r=t[0],n=t[1],i=Math.min(1,(n-r)/(this._max.value-this._min.value))):t[0]instanceof Date&&t[1]instanceof Date&&(r=e.time(t[0]),n=e.time(t[1]),i=Math.min(1,(t[0].getTime()-t[1].getTime())/(this._max.value-this._min.value))),this._animation.input.min.blendTo(r,0),this._animation.input.max.blendTo(n,0),this._animation.duration.blendTo(this._duration*i,0))}},Object.defineProperty(t.prototype,"variableName",{get:function(){return this._variableName},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"propertyName",{get:function(){return this._propertyName},set:function(t){this._propertyName=t},enumerable:!0,configurable:!0}),t.prototype.setDuration=function(t){this._duration=t,this._animation.duration.blendTo(t,0)},Object.defineProperty(t.prototype,"animation",{get:function(){return this._animation},enumerable:!0,configurable:!0}),t.prototype.restart=function(){this._animation.setProgressPct(0)},t.prototype._onLayerLoaded=function(){var t=this;this._viz=this._layer.viz;var e=this._getAnimationExpression();e.a&&e.b?this._animation="animation"===e.a.expressionName?e.a:e.b:this._animation=e,this._viz.variables[this._variableName]=this._animation,this._viz[this._propertyName].blendTo(e,0),this._animation.parent=this._viz,this._animation.notify=this._viz._changed.bind(this._viz),this._max=this._animation.input.max,this._min=this._animation.input.min,this._duration=this._animation.duration.value,this._layer.on("updated",(function(){t._timeSeriesWidget.progress=100*t._animation.getProgressPct(),t._timeSeriesWidget.playing=t._animation.isPlaying()})),this._timeSeriesWidget.animated=this._autoplay,this._timeSeriesWidget.addEventListener("seek",(function(e){t._animation.setProgressPct(e.detail/100),t._timeSeriesWidget.progress=e.detail})),this._timeSeriesWidget.addEventListener("play",(function(){t._animation.play()})),this._timeSeriesWidget.addEventListener("pause",(function(){t._animation.pause()}))},t.prototype._getAnimationExpression=function(){return this._variableName&&this._viz.variables[this._variableName]?this._viz.variables[this._variableName]:this._propertyName&&this._viz[this._propertyName]&&this._viz[this._propertyName].isAnimated()?this._viz[this._propertyName]:this._createDefaultAnimation()},t.prototype._createDefaultAnimation=function(){var t=this._carto.expressions;return t.animation(t.linear(t.prop(this._columnName)),this._duration,t.fade(this._fade[0],this._fade[1]))},t}(),q=function(){function t(t){var e=t.carto,r=t.map,n=t.layer,i=t.source;if(this._vizFilters=[],this._carto=e,this._map=r,this._layer=n,this._source=i,this._id=this._layer.id,this._rebuildFilters=this._rebuildFilters.bind(this),this._updateDataLayerVariables=this._updateDataLayerVariables.bind(this),!this._carto.expressions.globalHistogram)throw new Error("Provided VL version "+this._carto.version+" lacks globalHistogram support.");if(!b.a.satisfies(this._carto.version,"^1.2.3"))throw new Error("Provided VL version "+this._carto.version+" not supported. Must satisfy ^1.2.3")}return t.prototype.numericalHistogram=function(t,e,r){void 0===r&&(r={});var n=r.buckets,a=r.bucketRanges,s=r.weight,u=r.readOnly,l=r.totals,c=i(e),p=o(e),h=new M(this._carto,this._layer,t,c,n,s,this._source,a,u,l,p);return this._addFilter(h),h},t.prototype.categoricalHistogram=function(t,e,r){void 0===r&&(r={});var n=r.readOnly,a=r.totals,s=r.weight,u=i(e),l=o(e),c=new W(this._carto,this._layer,t,u,this._source,n,s,a,l);return this._addFilter(c),c},t.prototype.histogram=function(t,e,r){void 0===r&&(r={});var n=r.buckets,i=r.bucketRanges,o=r.readOnly,a=r.weight,s=r.totals;if(void 0===n&&void 0===i){var u=t;return this.categoricalHistogram(u,e,{readOnly:o,totals:s,weight:a})}return this.numericalHistogram(t,e,{bucketRanges:i,buckets:n,readOnly:o,totals:s,weight:a})},t.prototype.category=function(t,e,r){void 0===r&&(r={});var n=r.readOnly,a=r.button,s=r.weight,u=i(e),l=o(e),c=new A(this._carto,this._layer,t,u,this._source,s,n,a,l);return this._addFilter(c),c},t.prototype.timeSeries=function(t,e,r){var n=this;if(void 0===r&&(r={}),this._animation)throw new Error("There can only be one animation");var i=r.buckets,o=r.bucketRanges,a=r.readOnly,s=r.totals,u=r.weight,l=r.duration,c=r.fade,p=r.variableName,h=r.propertyName,f=r.autoplay;this._animation=new U(this._carto,this._layer,e,t,(function(){"filter"===h&&n._rebuildFilters()}),l,c,p,h,f);var m=this.numericalHistogram(t,e,{bucketRanges:o,buckets:i,readOnly:a,totals:s,weight:u});return m.setTimeSeries(!0),m.on("rangeChanged",(function(t){n._animation.setRange(t)})),this._animation},t.prototype.animationControls=function(t,e,r){var n=this;void 0===r&&(r={});var i=r.duration,o=r.fade,a=r.variableName,s=r.propertyName,u=void 0===s?"filter":s,l=r.autoplay;return this._animation=new w(t,this._carto,e,a,u,i,o,l,this._layer,(function(){"filter"===u&&n._rebuildFilters()}),null),this._animation},t.prototype.globalRange=function(t,e){var r=new B(this._carto,this._layer,t,e,this._source);return this._addFilter(r),r},t.prototype.build=function(){var t=this;if(0!==this._vizFilters.length){var e=function(){t._appendVariables(),t._buildDataLayer()};this._layer.viz?e():this._layer.on("loaded",e)}},t.prototype._addFilter=function(t){t.on("filterChanged",this._rebuildFilters),t.on("expressionReady",this._updateDataLayerVariables),this._vizFilters.push(t)},t.prototype._appendVariables=function(){var t=this,e=this._carto.expressions;this._vizFilters.forEach((function(r){return t._layer.viz.variables[r.columnPropName]=e.prop(r.column)}))},t.prototype._buildDataLayer=function(){var t=this,e=this._getVariables(),r=this._carto.expressions,n=new this._carto.Viz({color:r.rgba(0,0,0,0),strokeWidth:0,variables:e});this._readOnlyLayer=new this._carto.Layer("asbind_ro_"+this._id,this._source,n),this._readOnlyLayer.addTo(this._map),this._vizFilters.forEach((function(e){return e.setDataLayer(t._readOnlyLayer)}))},t.prototype._getVariables=function(){for(var t=void 0!==this._readOnlyLayer?this._readOnlyLayer.viz.variables:{},e=0,r=this._vizFilters;e<r.length;e++){var n=r[e],i=n.name;n.globalExpression&&(t[i+"_global"]=n.globalExpression),n.expression&&(t[i]=n.expression),t[n.columnPropName]=this._carto.expressions.prop(n.column)}return t},t.prototype._updateDataLayerVariables=function(t){this._readOnlyLayer.viz&&(this._readOnlyLayer.viz.variables[t.name]=t.expression)},t.prototype._rebuildFilters=function(){var t=this._combineFilters(this._vizFilters.filter((function(t){return null!==t.filter})).map((function(t){return t.filter})));this._readOnlyLayer&&this._readOnlyLayer.viz.filter.blendTo(t,0),this._layer.viz.filter.isAnimated()&&this._animation&&this._layer.viz.variables[this._animation.variableName]&&(t="@"+this._animation.variableName+" and "+t),this._layer.viz.filter.blendTo(t,0),this._animation&&this._animation.restart()},t.prototype._combineFilters=function(t){return 0===t.length?"1":t.join(" and ")},t}(),Z=q,X={Bridge:q,Layers:a,Legends:g}}])}));
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.AsBridge=e():t.AsBridge=e()}(window,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=2)}([function(t,e,r){(function(r){var n;e=t.exports=Z,n="object"==typeof r&&r.env&&r.env.NODE_DEBUG&&/\bsemver\b/i.test(r.env.NODE_DEBUG)?function(){var t=Array.prototype.slice.call(arguments,0);t.unshift("SEMVER"),console.log.apply(console,t)}:function(){},e.SEMVER_SPEC_VERSION="2.0.0";var i=Number.MAX_SAFE_INTEGER||9007199254740991,o=e.re=[],a=e.src=[],s=0,u=s++;a[u]="0|[1-9]\\d*";var l=s++;a[l]="[0-9]+";var c=s++;a[c]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var p=s++;a[p]="("+a[u]+")\\.("+a[u]+")\\.("+a[u]+")";var h=s++;a[h]="("+a[l]+")\\.("+a[l]+")\\.("+a[l]+")";var f=s++;a[f]="(?:"+a[u]+"|"+a[c]+")";var m=s++;a[m]="(?:"+a[l]+"|"+a[c]+")";var _=s++;a[_]="(?:-("+a[f]+"(?:\\."+a[f]+")*))";var d=s++;a[d]="(?:-?("+a[m]+"(?:\\."+a[m]+")*))";var v=s++;a[v]="[0-9A-Za-z-]+";var g=s++;a[g]="(?:\\+("+a[v]+"(?:\\."+a[v]+")*))";var y=s++,b="v?"+a[p]+a[_]+"?"+a[g]+"?";a[y]="^"+b+"$";var w="[v=\\s]*"+a[h]+a[d]+"?"+a[g]+"?",x=s++;a[x]="^"+w+"$";var L=s++;a[L]="((?:<|>)?=?)";var j=s++;a[j]=a[l]+"|x|X|\\*";var O=s++;a[O]=a[u]+"|x|X|\\*";var P=s++;a[P]="[v=\\s]*("+a[O]+")(?:\\.("+a[O]+")(?:\\.("+a[O]+")(?:"+a[_]+")?"+a[g]+"?)?)?";var E=s++;a[E]="[v=\\s]*("+a[j]+")(?:\\.("+a[j]+")(?:\\.("+a[j]+")(?:"+a[d]+")?"+a[g]+"?)?)?";var N=s++;a[N]="^"+a[L]+"\\s*"+a[P]+"$";var T=s++;a[T]="^"+a[L]+"\\s*"+a[E]+"$";var z=s++;a[z]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var S=s++;a[S]="(?:~>?)";var k=s++;a[k]="(\\s*)"+a[S]+"\\s+",o[k]=new RegExp(a[k],"g");var D=s++;a[D]="^"+a[S]+a[P]+"$";var C=s++;a[C]="^"+a[S]+a[E]+"$";var H=s++;a[H]="(?:\\^)";var A=s++;a[A]="(\\s*)"+a[H]+"\\s+",o[A]=new RegExp(a[A],"g");var V=s++;a[V]="^"+a[H]+a[P]+"$";var R=s++;a[R]="^"+a[H]+a[E]+"$";var F=s++;a[F]="^"+a[L]+"\\s*("+w+")$|^$";var W=s++;a[W]="^"+a[L]+"\\s*("+b+")$|^$";var $=s++;a[$]="(\\s*)"+a[L]+"\\s*("+w+"|"+a[P]+")",o[$]=new RegExp(a[$],"g");var M=s++;a[M]="^\\s*("+a[P]+")\\s+-\\s+("+a[P]+")\\s*$";var I=s++;a[I]="^\\s*("+a[E]+")\\s+-\\s+("+a[E]+")\\s*$";var B=s++;a[B]="(<|>)?=?\\s*\\*";for(var U=0;U<35;U++)n(U,a[U]),o[U]||(o[U]=new RegExp(a[U]));function q(t,e){if(e&&"object"==typeof e||(e={loose:!!e,includePrerelease:!1}),t instanceof Z)return t;if("string"!=typeof t)return null;if(t.length>256)return null;if(!(e.loose?o[x]:o[y]).test(t))return null;try{return new Z(t,e)}catch(t){return null}}function Z(t,e){if(e&&"object"==typeof e||(e={loose:!!e,includePrerelease:!1}),t instanceof Z){if(t.loose===e.loose)return t;t=t.version}else if("string"!=typeof t)throw new TypeError("Invalid Version: "+t);if(t.length>256)throw new TypeError("version is longer than 256 characters");if(!(this instanceof Z))return new Z(t,e);n("SemVer",t,e),this.options=e,this.loose=!!e.loose;var r=t.trim().match(e.loose?o[x]:o[y]);if(!r)throw new TypeError("Invalid Version: "+t);if(this.raw=t,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>i||this.major<0)throw new TypeError("Invalid major version");if(this.minor>i||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>i||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((function(t){if(/^[0-9]+$/.test(t)){var e=+t;if(e>=0&&e<i)return e}return t})):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}e.parse=q,e.valid=function(t,e){var r=q(t,e);return r?r.version:null},e.clean=function(t,e){var r=q(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null},e.SemVer=Z,Z.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},Z.prototype.toString=function(){return this.version},Z.prototype.compare=function(t){return n("SemVer.compare",this.version,this.options,t),t instanceof Z||(t=new Z(t,this.options)),this.compareMain(t)||this.comparePre(t)},Z.prototype.compareMain=function(t){return t instanceof Z||(t=new Z(t,this.options)),G(this.major,t.major)||G(this.minor,t.minor)||G(this.patch,t.patch)},Z.prototype.comparePre=function(t){if(t instanceof Z||(t=new Z(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;var e=0;do{var r=this.prerelease[e],i=t.prerelease[e];if(n("prerelease compare",e,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return G(r,i)}while(++e)},Z.prototype.inc=function(t,e){switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",e);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",e);break;case"prepatch":this.prerelease.length=0,this.inc("patch",e),this.inc("pre",e);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",e),this.inc("pre",e);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{for(var r=this.prerelease.length;--r>=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);-1===r&&this.prerelease.push(0)}e&&(this.prerelease[0]===e?isNaN(this.prerelease[1])&&(this.prerelease=[e,0]):this.prerelease=[e,0]);break;default:throw new Error("invalid increment argument: "+t)}return this.format(),this.raw=this.version,this},e.inc=function(t,e,r,n){"string"==typeof r&&(n=r,r=void 0);try{return new Z(t,r).inc(e,n).version}catch(t){return null}},e.diff=function(t,e){if(Y(t,e))return null;var r=q(t),n=q(e),i="";if(r.prerelease.length||n.prerelease.length){i="pre";var o="prerelease"}for(var a in r)if(("major"===a||"minor"===a||"patch"===a)&&r[a]!==n[a])return i+a;return o},e.compareIdentifiers=G;var X=/^[0-9]+$/;function G(t,e){var r=X.test(t),n=X.test(e);return r&&n&&(t=+t,e=+e),t===e?0:r&&!n?-1:n&&!r?1:t<e?-1:1}function J(t,e,r){return new Z(t,r).compare(new Z(e,r))}function K(t,e,r){return J(t,e,r)>0}function Q(t,e,r){return J(t,e,r)<0}function Y(t,e,r){return 0===J(t,e,r)}function tt(t,e,r){return 0!==J(t,e,r)}function et(t,e,r){return J(t,e,r)>=0}function rt(t,e,r){return J(t,e,r)<=0}function nt(t,e,r,n){switch(e){case"===":return"object"==typeof t&&(t=t.version),"object"==typeof r&&(r=r.version),t===r;case"!==":return"object"==typeof t&&(t=t.version),"object"==typeof r&&(r=r.version),t!==r;case"":case"=":case"==":return Y(t,r,n);case"!=":return tt(t,r,n);case">":return K(t,r,n);case">=":return et(t,r,n);case"<":return Q(t,r,n);case"<=":return rt(t,r,n);default:throw new TypeError("Invalid operator: "+e)}}function it(t,e){if(e&&"object"==typeof e||(e={loose:!!e,includePrerelease:!1}),t instanceof it){if(t.loose===!!e.loose)return t;t=t.value}if(!(this instanceof it))return new it(t,e);n("comparator",t,e),this.options=e,this.loose=!!e.loose,this.parse(t),this.semver===ot?this.value="":this.value=this.operator+this.semver.version,n("comp",this)}e.rcompareIdentifiers=function(t,e){return G(e,t)},e.major=function(t,e){return new Z(t,e).major},e.minor=function(t,e){return new Z(t,e).minor},e.patch=function(t,e){return new Z(t,e).patch},e.compare=J,e.compareLoose=function(t,e){return J(t,e,!0)},e.rcompare=function(t,e,r){return J(e,t,r)},e.sort=function(t,r){return t.sort((function(t,n){return e.compare(t,n,r)}))},e.rsort=function(t,r){return t.sort((function(t,n){return e.rcompare(t,n,r)}))},e.gt=K,e.lt=Q,e.eq=Y,e.neq=tt,e.gte=et,e.lte=rt,e.cmp=nt,e.Comparator=it;var ot={};function at(t,e){if(e&&"object"==typeof e||(e={loose:!!e,includePrerelease:!1}),t instanceof at)return t.loose===!!e.loose&&t.includePrerelease===!!e.includePrerelease?t:new at(t.raw,e);if(t instanceof it)return new at(t.value,e);if(!(this instanceof at))return new at(t,e);if(this.options=e,this.loose=!!e.loose,this.includePrerelease=!!e.includePrerelease,this.raw=t,this.set=t.split(/\s*\|\|\s*/).map((function(t){return this.parseRange(t.trim())}),this).filter((function(t){return t.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: "+t);this.format()}function st(t){return!t||"x"===t.toLowerCase()||"*"===t}function ut(t,e,r,n,i,o,a,s,u,l,c,p,h){return((e=st(r)?"":st(n)?">="+r+".0.0":st(i)?">="+r+"."+n+".0":">="+e)+" "+(s=st(u)?"":st(l)?"<"+(+u+1)+".0.0":st(c)?"<"+u+"."+(+l+1)+".0":p?"<="+u+"."+l+"."+c+"-"+p:"<="+s)).trim()}function lt(t,e,r){for(var i=0;i<t.length;i++)if(!t[i].test(e))return!1;if(e.prerelease.length&&!r.includePrerelease){for(i=0;i<t.length;i++)if(n(t[i].semver),t[i].semver!==ot&&t[i].semver.prerelease.length>0){var o=t[i].semver;if(o.major===e.major&&o.minor===e.minor&&o.patch===e.patch)return!0}return!1}return!0}function ct(t,e,r){try{e=new at(e,r)}catch(t){return!1}return e.test(t)}function pt(t,e,r,n){var i,o,a,s,u;switch(t=new Z(t,n),e=new at(e,n),r){case">":i=K,o=rt,a=Q,s=">",u=">=";break;case"<":i=Q,o=et,a=K,s="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(ct(t,e,n))return!1;for(var l=0;l<e.set.length;++l){var c=e.set[l],p=null,h=null;if(c.forEach((function(t){t.semver===ot&&(t=new it(">=0.0.0")),p=p||t,h=h||t,i(t.semver,p.semver,n)?p=t:a(t.semver,h.semver,n)&&(h=t)})),p.operator===s||p.operator===u)return!1;if((!h.operator||h.operator===s)&&o(t,h.semver))return!1;if(h.operator===u&&a(t,h.semver))return!1}return!0}it.prototype.parse=function(t){var e=this.options.loose?o[F]:o[W],r=t.match(e);if(!r)throw new TypeError("Invalid comparator: "+t);this.operator=r[1],"="===this.operator&&(this.operator=""),r[2]?this.semver=new Z(r[2],this.options.loose):this.semver=ot},it.prototype.toString=function(){return this.value},it.prototype.test=function(t){return n("Comparator.test",t,this.options.loose),this.semver===ot||("string"==typeof t&&(t=new Z(t,this.options)),nt(t,this.operator,this.semver,this.options))},it.prototype.intersects=function(t,e){if(!(t instanceof it))throw new TypeError("a Comparator is required");var r;if(e&&"object"==typeof e||(e={loose:!!e,includePrerelease:!1}),""===this.operator)return r=new at(t.value,e),ct(this.value,r,e);if(""===t.operator)return r=new at(this.value,e),ct(t.semver,r,e);var n=!(">="!==this.operator&&">"!==this.operator||">="!==t.operator&&">"!==t.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==t.operator&&"<"!==t.operator),o=this.semver.version===t.semver.version,a=!(">="!==this.operator&&"<="!==this.operator||">="!==t.operator&&"<="!==t.operator),s=nt(this.semver,"<",t.semver,e)&&(">="===this.operator||">"===this.operator)&&("<="===t.operator||"<"===t.operator),u=nt(this.semver,">",t.semver,e)&&("<="===this.operator||"<"===this.operator)&&(">="===t.operator||">"===t.operator);return n||i||o&&a||s||u},e.Range=at,at.prototype.format=function(){return this.range=this.set.map((function(t){return t.join(" ").trim()})).join("||").trim(),this.range},at.prototype.toString=function(){return this.range},at.prototype.parseRange=function(t){var e=this.options.loose;t=t.trim();var r=e?o[I]:o[M];t=t.replace(r,ut),n("hyphen replace",t),t=t.replace(o[$],"$1$2$3"),n("comparator trim",t,o[$]),t=(t=(t=t.replace(o[k],"$1~")).replace(o[A],"$1^")).split(/\s+/).join(" ");var i=e?o[F]:o[W],a=t.split(" ").map((function(t){return function(t,e){return n("comp",t,e),t=function(t,e){return t.trim().split(/\s+/).map((function(t){return function(t,e){n("caret",t,e);var r=e.loose?o[R]:o[V];return t.replace(r,(function(e,r,i,o,a){var s;return n("caret",t,e,r,i,o,a),st(r)?s="":st(i)?s=">="+r+".0.0 <"+(+r+1)+".0.0":st(o)?s="0"===r?">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":">="+r+"."+i+".0 <"+(+r+1)+".0.0":a?(n("replaceCaret pr",a),s="0"===r?"0"===i?">="+r+"."+i+"."+o+"-"+a+" <"+r+"."+i+"."+(+o+1):">="+r+"."+i+"."+o+"-"+a+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+o+"-"+a+" <"+(+r+1)+".0.0"):(n("no pr"),s="0"===r?"0"===i?">="+r+"."+i+"."+o+" <"+r+"."+i+"."+(+o+1):">="+r+"."+i+"."+o+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+o+" <"+(+r+1)+".0.0"),n("caret return",s),s}))}(t,e)})).join(" ")}(t,e),n("caret",t),t=function(t,e){return t.trim().split(/\s+/).map((function(t){return function(t,e){var r=e.loose?o[C]:o[D];return t.replace(r,(function(e,r,i,o,a){var s;return n("tilde",t,e,r,i,o,a),st(r)?s="":st(i)?s=">="+r+".0.0 <"+(+r+1)+".0.0":st(o)?s=">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":a?(n("replaceTilde pr",a),s=">="+r+"."+i+"."+o+"-"+a+" <"+r+"."+(+i+1)+".0"):s=">="+r+"."+i+"."+o+" <"+r+"."+(+i+1)+".0",n("tilde return",s),s}))}(t,e)})).join(" ")}(t,e),n("tildes",t),t=function(t,e){return n("replaceXRanges",t,e),t.split(/\s+/).map((function(t){return function(t,e){t=t.trim();var r=e.loose?o[T]:o[N];return t.replace(r,(function(e,r,i,o,a,s){n("xRange",t,e,r,i,o,a,s);var u=st(i),l=u||st(o),c=l||st(a);return"="===r&&c&&(r=""),u?e=">"===r||"<"===r?"<0.0.0":"*":r&&c?(l&&(o=0),a=0,">"===r?(r=">=",l?(i=+i+1,o=0,a=0):(o=+o+1,a=0)):"<="===r&&(r="<",l?i=+i+1:o=+o+1),e=r+i+"."+o+"."+a):l?e=">="+i+".0.0 <"+(+i+1)+".0.0":c&&(e=">="+i+"."+o+".0 <"+i+"."+(+o+1)+".0"),n("xRange return",e),e}))}(t,e)})).join(" ")}(t,e),n("xrange",t),t=function(t,e){return n("replaceStars",t,e),t.trim().replace(o[B],"")}(t,e),n("stars",t),t}(t,this.options)}),this).join(" ").split(/\s+/);return this.options.loose&&(a=a.filter((function(t){return!!t.match(i)}))),a=a.map((function(t){return new it(t,this.options)}),this)},at.prototype.intersects=function(t,e){if(!(t instanceof at))throw new TypeError("a Range is required");return this.set.some((function(r){return r.every((function(r){return t.set.some((function(t){return t.every((function(t){return r.intersects(t,e)}))}))}))}))},e.toComparators=function(t,e){return new at(t,e).set.map((function(t){return t.map((function(t){return t.value})).join(" ").trim().split(" ")}))},at.prototype.test=function(t){if(!t)return!1;"string"==typeof t&&(t=new Z(t,this.options));for(var e=0;e<this.set.length;e++)if(lt(this.set[e],t,this.options))return!0;return!1},e.satisfies=ct,e.maxSatisfying=function(t,e,r){var n=null,i=null;try{var o=new at(e,r)}catch(t){return null}return t.forEach((function(t){o.test(t)&&(n&&-1!==i.compare(t)||(i=new Z(n=t,r)))})),n},e.minSatisfying=function(t,e,r){var n=null,i=null;try{var o=new at(e,r)}catch(t){return null}return t.forEach((function(t){o.test(t)&&(n&&1!==i.compare(t)||(i=new Z(n=t,r)))})),n},e.minVersion=function(t,e){t=new at(t,e);var r=new Z("0.0.0");if(t.test(r))return r;if(r=new Z("0.0.0-0"),t.test(r))return r;r=null;for(var n=0;n<t.set.length;++n){t.set[n].forEach((function(t){var e=new Z(t.semver.version);switch(t.operator){case">":0===e.prerelease.length?e.patch++:e.prerelease.push(0),e.raw=e.format();case"":case">=":r&&!K(r,e)||(r=e);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+t.operator)}}))}if(r&&t.test(r))return r;return null},e.validRange=function(t,e){try{return new at(t,e).range||"*"}catch(t){return null}},e.ltr=function(t,e,r){return pt(t,e,"<",r)},e.gtr=function(t,e,r){return pt(t,e,">",r)},e.outside=pt,e.prerelease=function(t,e){var r=q(t,e);return r&&r.prerelease.length?r.prerelease:null},e.intersects=function(t,e,r){return t=new at(t,r),e=new at(e,r),t.intersects(e)},e.coerce=function(t){if(t instanceof Z)return t;if("string"!=typeof t)return null;var e=t.match(o[z]);if(null==e)return null;return q(e[1]+"."+(e[2]||"0")+"."+(e[3]||"0"))}}).call(this,r(1))},function(t,e){var r,n,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(r===setTimeout)return setTimeout(t,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(t){r=o}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(t){n=a}}();var u,l=[],c=!1,p=-1;function h(){c&&u&&(c=!1,u.length?l=u.concat(l):p=-1,l.length&&f())}function f(){if(!c){var t=s(h);c=!0;for(var e=l.length;e;){for(u=l,l=[];++p<e;)u&&u[p].run();p=-1,e=l.length}u=null,c=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function m(t,e){this.fun=t,this.array=e}function _(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];l.push(new m(t,e)),1!==l.length||c||s(f)},m.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=_,i.addListener=_,i.once=_,i.off=_,i.removeListener=_,i.removeAllListeners=_,i.emit=_,i.prependListener=_,i.prependOnceListener=_,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,r){"use strict";function n(t){return"string"==typeof t?document.querySelector(t):t}function i(t){return"string"==typeof t?t:t.propertyName}function o(t){return"string"==typeof t?null:t}r.r(e),r.d(e,"VLBridge",(function(){return Z})),r.d(e,"VL",(function(){return X}));var a=function(){function t(t,e,r,i){this._layersSelector=n(t),this._carto=e,this._layers=r,this._mapLayers=i}return t.prototype.build=function(){var t=this;this._carto.on("loaded",this._mapLayers,(function(){t._layersSelector.layers=t._layers,t._layersSelector.forceUpdate(),t._layersSelector.addEventListener("onToggleLayer",(function(e){var r=t._mapLayers[e.detail.index];r[r.visible?"hide":"show"]()}))}))},t}();function s(t){return"#"+l(t.r)+l(t.g)+l(t.b)+l(Math.floor(255*t.a))}function u(t){return"rgba("+t.r+","+t.g+","+t.b+","+t.a+")"}function l(t){return isNaN(t)||void 0===t?"":t.toString(16).padStart(2,"0").toUpperCase()}function c(t,e,r){void 0===r&&(r=!1),r&&t.on("updated",(function(){e(!1)})),t.viz?e(!0):t.on("loaded",(function(){e(!0)}))}var p=function(){return(p=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function h(t,e){void 0===e&&(e={});var r=t.getLegendData(e.config),n=Math.floor(r.data.length/2);return r.data[n].value}function f(t,e,r){void 0===r&&(r={});var n=t[e];return"ramp"===n.expressionName||"opacity"===n.expressionName?u(h(n,r)):"color"===n.type?u(n.value):"#000"}function m(t,e,r){void 0===r&&(r={});var n=t[e];return"ramp"===n.expressionName?r?h(n,r):16:"number"===n.type?n.value:16}function _(t,e,r){void 0===e&&(e=null),void 0===r&&(r={});var n=e&&t.variables[e]?t.variables[e]:t.symbol;return"ramp"===n.expressionName?h(n,r):n.value}function d(t,e){var r=t.layer,n=t.props,i=r.viz;return i?p({color:f(i,"color",e),label:n.label,marker:i.symbol.default?void 0:_(i,e),strokeColor:f(i,"strokeColor",e),strokeStyle:0===m(i,"strokeWidth",e)?"hidden":void 0,type:r.metadata.geomType,width:m(i,"width",e)},n):{}}function v(t){return t.props?t:{layer:t,props:{label:t.id}}}var g=function(){function t(){}return t.layersLegend=function(t,e,r){var i=this;void 0===r&&(r={}),t=n(t);var o=e.map(v);o.forEach((function(e,n,a){c(e.layer,(function(){var e=o.map(d.bind(i,r));r.format&&(e.label=r.format(e.label,n,a)),t.data=e,r.onLoad&&setTimeout(r.onLoad,0)}),r.dynamic)}))},t.rampLegend=function(t,e,r,i){void 0===i&&(i={}),t=n(t);var o=v(e);c(o.layer,(function(){var e=d(o,i),n=o.layer.viz[r],a=i.config,u=i.config.variable||r,l=o.layer.viz.variables[u]?o.layer.viz.variables[u]:o.layer.viz[u],c=l.getLegendData(a).data,h=c.map((function(t,o,a){var u,c,h,f,m;return p({},e,((u={})[r]=function(t,e){return"color"===t.type?s(e):e}(n,t.value),u.label=i.format?i.format(t.key,o,a):(c=l.key,Array.isArray(c)?(f=(h=c)[0],m=h[1],f===-1/0?"< "+m.toFixed(2):m===1/0?"> "+f.toFixed(2):f.toFixed(2)+" - "+m.toFixed(2)):c.toFixed?c.toFixed(2):c),u))}));Array.isArray(o.props)&&o.props.length===c.length?t.data=h.map((function(t,e){return p({},t,o.props[e])})):t.data=h,i.onLoad&&setTimeout(i.onLoad,0)}),i.dynamic)},t}(),y=r(0),b=r.n(y),w=function(){function t(t,e,r,i,o,a,s,u,l,c,p){var h=this;void 0===a&&(a=10),void 0===s&&(s=[.15,.15]),this._animationWidget=n(t),this._column=r,this._variableName=i||"animation",this._propertyName=o||"filter",this._carto=e,this._duration=a,this._fade=s,this._autoplay=u||!1,this._animationWidget.playing=this._autoplay,this._animationWidget.isLoading=!0,this._layer=l,this._formatCb=p,l.viz?(this._onLayerLoaded(),c()):l.on("loaded",(function(){h._onLayerLoaded(),c()}))}return Object.defineProperty(t.prototype,"animation",{get:function(){return this._animation},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"variableName",{get:function(){return this._variableName},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"propertyName",{get:function(){return this._propertyName},set:function(t){this._propertyName=t},enumerable:!0,configurable:!0}),t.prototype.restart=function(){this._animation.setProgressPct(0)},t.prototype.setRange=function(){},t.prototype._onLayerLoaded=function(){var t=this;this._viz=this._layer.viz;var e=this._getAnimationExpression();e.a&&e.b?this._animation="animation"===e.a.expressionName?e.a:e.b:this._animation=e,this._viz[this._propertyName].blendTo(e,0),this._animation.parent=this._viz,this._animation.notify=this._viz._changed.bind(this._viz),this._animationWidget.duration=this._animation.duration.value,this._animationWidget.playing=this._autoplay,this._animationWidget.isLoading=!1,this._animationWidget.addEventListener("play",(function(){t._animation.play()})),this._animationWidget.addEventListener("pause",(function(){t._animation.pause()})),this._animationWidget.addEventListener("seek",(function(e){t._animation.setProgressPct(e.detail[0]/100),t._animation.notify(),t._animationWidget.progressValue=t._formatProgressValue()})),this._layer.on("updated",(function(){t._animationWidget.progress=100*t._animation.getProgressPct(),t._animationWidget.progressValue=t._formatProgressValue()}))},t.prototype._getAnimationExpression=function(){return this._variableName&&this._viz.variables[this._variableName]||(this._viz.variables[this._variableName]=this._propertyName&&this._viz[this._propertyName].isAnimated()?this._viz[this._propertyName]:this._createDefaultAnimation()),this._viz.variables[this._variableName]},t.prototype._formatProgressValue=function(){var t=this._animation.getProgressValue();return t instanceof Date?this._formatCb?this._formatCb(t):t.toISOString():t instanceof Object&&this._isVLTimeZoneDate(t)?this._formatCb?this._formatCb(t._date):t._date.toISOString():this._formatCb?this._formatCb(t):t},t.prototype._isVLTimeZoneDate=function(t){return"_date"in t},t.prototype._createDefaultAnimation=function(){var t=this._carto.expressions;return t.animation(t.linear(t.prop(this._column),t.globalMin(t.prop(this._column)),t.globalMax(t.prop(this._column))),this._duration,t.fade(this._fade[0],this._fade[1]))},t}();var x=function(t){return t=t||Object.create(null),{on:function(e,r){(t[e]||(t[e]=[])).push(r)},off:function(e,r){t[e]&&t[e].splice(t[e].indexOf(r)>>>0,1)},emit:function(e,r){(t[e]||[]).slice().map((function(t){t(r)})),(t["*"]||[]).slice().map((function(t){t(e,r)}))}}},L=function(){function t(e,r,n,i,o,a,s){void 0===a&&(a=!0),void 0===s&&(s=1);var u=r.expressions;this._emitter=x(),this._name="asbind_"+e+"_"+n+"_"+t._counter,this._column=n,this._layer=i,this._source=o,this._readOnly=a,t._counter++,this._weight="number"==typeof s?s:u.prop(s),this._loadLegendData=this._loadLegendData.bind(this,this._name)}return Object.defineProperty(t.prototype,"globalExpression",{get:function(){return null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"column",{get:function(){return this._column},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"columnPropName",{get:function(){return this._name+"_col"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"readOnly",{get:function(){return this._readOnly},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"layer",{get:function(){return this._layer},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"source",{get:function(){return this._source},enumerable:!0,configurable:!0}),t.prototype.on=function(t,e){this._emitter.on(t,e)},t.prototype.setLegendData=function(t){this._legendData=t.data},t.prototype.enableColorMapping=function(){this._mapColors=!0,this._layer.viz?this._loadLegendData():this._layer.on("loaded",this._loadLegendData)},t.prototype._filterChanged=function(){this._emitter.emit("filterChanged",this._name)},t.prototype._loadLegendData=function(t){void 0===t&&(t="color");var e=this._layer.viz[t];e.getLegendData&&this.setLegendData(e.getLegendData(this._getLegendConfig()))},t.prototype._getLegendConfig=function(){},t._counter=0,t}();function j(t,e){return P(t.value,e.value,E)}function O(t,e){return P(t.value,e.value,N)}function P(t,e,r){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(r(t[n],e[n]))return!1;return!0}function E(t,e){return t.x[0]!==e.x[0]||t.x[1]!==e.x[1]||t.y!==e.y}function N(t,e){return t.x!==e.x||t.y!==e.y}function T(t){return t.value.map((function(t){return{end:t.x[1],start:t.x[0],value:t.y}}))}function z(t){return t.value.map((function(t){return{end:new Date(t.x[1]),start:new Date(t.x[0]),value:t.y}}))}function S(t,e){return t.value.map((function(t){return{category:t.x,color:k(t.x,e),end:void 0,start:void 0,value:t.y}}))}function k(t,e){if(e){var r=e.find((function(e){return e.key===t}));return r?function(t){return"string"==typeof t?t:s(t)}(r.value):void 0}}var D,C=function(t,e){void 0===e&&(e=[]);var r=t.getAllCategories(),n=t.value.reduce((function(t,e){return t[e.x]=e,t}),{});return r.map((function(t){var r=n[t.name];return{color:k(t.name,e),name:t.name,value:r?r.y:null}})).sort((function(t,e){return e.value-t.value}))},H=(D=function(t,e){return(D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}D(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),A=function(t){function e(e,r,i,o,a,s,u,l,c){void 0===u&&(u=!0);var p=t.call(this,"category",e,o,r,a,u,s)||this;return p._selection=[],p._lastHistogram=null,p._button=null,p._widget=n(i),p._carto=e,p._button=n(l),p._expression=c,p._widget.disableInteractivity=u,p._widget.showClearButton=!u,p.selectionChanged=p.selectionChanged.bind(p),u||(p._widget.addEventListener("categoriesSelected",p.selectionChanged),p._button&&p._button.addEventListener&&p._button.addEventListener("click",(function(){p._filterChanged()}))),p}return H(e,t),e.prototype.setDataLayer=function(t){var e=this;this._dataLayer=t,this._dataLayer.on("updated",(function(){var t=e._dataLayer.viz.variables[e.name];t&&(null!==e._lastHistogram&&O(e._lastHistogram,t)||(e._lastHistogram={value:t.value},e._widget.categories=C(t,e._legendData)))}))},Object.defineProperty(e.prototype,"filter",{get:function(){return 0===this._selection.length?null:"@"+this.columnPropName+" in ["+this._selection.map((function(t){return"'"+t+"'"})).join(",")+"]"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"expression",{get:function(){var t=this._carto.expressions;return t.viewportHistogram(this._expression?this._expression:t.prop(this._column),this._weight)},enumerable:!0,configurable:!0}),e.prototype.selectionChanged=function(t){this._selection=t.detail,0!==this._selection.length&&this._button||this._filterChanged()},e}(L),V=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),R=function(t){function e(e,r,i,o,a,s,u,l,c,p){void 0===u&&(u=!0),void 0===c&&(c=!1),void 0===p&&(p=null);var h=t.call(this,"histogram_"+e,r,a,i,s,u,l)||this;return h._selection=null,h._inputExpression=null,h._totals=!1,h._widget=n(o),h._carto=r,h._totals=c,h._widget.disableInteractivity=u,h._widget.showClear=!u,h._inputExpression=p,h.selectionChanged=h.selectionChanged.bind(h),u||h._widget.addEventListener("selectionChanged",h.selectionChanged),h}return V(e,t),e.prototype.removeHistogramLayer=function(){this._layer.remove()},e.prototype.setDataLayer=function(t){this._dataLayer=t,this.bindDataLayer()},e.prototype._getLegendConfig=function(){return{samples:this._buckets}},e}(L),F=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),W=function(t){function e(e,r,n,i,o,a,s,u,l){void 0===a&&(a=!0),void 0===u&&(u=!1),void 0===l&&(l=null);var c=t.call(this,"categorical",e,r,n,i,o,a,s,u,l)||this;return c._lastHistogram=null,c}return F(e,t),Object.defineProperty(e.prototype,"filter",{get:function(){return null===this._selection?null:"@"+this.columnPropName+" in ["+this._selection.map((function(t){return"'"+t+"'"})).join(",")+"]"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"expression",{get:function(){var t=this._carto.expressions;return t.viewportHistogram(this._inputExpression?this._inputExpression:t.prop(this._column),this._weight)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"globalExpression",{get:function(){if(!this._totals)return null;var t=this._carto.expressions;return t.globalHistogram(this._inputExpression?this._inputExpression:t.prop(this._column),this._weight)},enumerable:!0,configurable:!0}),e.prototype.bindDataLayer=function(){var t=this;this._dataLayer.on("updated",(function(){t._totals&&!t._globalHistogram&&(t._globalHistogram=t._dataLayer.viz.variables[t.name+"_global"],t._widget.backgroundData=S(t._globalHistogram));var e=t._dataLayer.viz.variables[t.name];if(e&&(null===t._lastHistogram||!O(t._lastHistogram,e)))if(t._lastHistogram={value:e.value},t._globalHistogram){var r=t._globalHistogram.value.map((function(t){var r=e.value.find((function(e){return e.x===t.x}));return{x:t.x,y:r?r.y:0}}));t._widget.data=S({value:r},t._legendData)}else t._widget.data=S(e,t._legendData)}))},e.prototype.selectionChanged=function(t){if(null===t.detail)this._selection=null;else{var e=t.detail.selection;this._selection=e.map((function(t){return t}))}this._filterChanged()},e}(R),$=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),M=function(t){function e(e,r,n,i,o,a,s,u,l,c,p){void 0===o&&(o=20),void 0===l&&(l=!0),void 0===c&&(c=!1),void 0===p&&(p=null);var h=t.call(this,"numerical",e,r,n,i,s,l,a,c,p)||this;return h._lastHistogram=null,h._buckets=void 0!==u?u.length:o,h._bucketRanges=u,h}return $(e,t),Object.defineProperty(e.prototype,"filter",{get:function(){if(null===this._selection||this._isTimeSeries)return null;var t=this._selection[0],e=this._selection[1],r=t instanceof Date?"date('"+t.toISOString()+"')":t,n=e instanceof Date?"date('"+e.toISOString()+"')":e;return"(@"+this.columnPropName+" >= "+r+" and @"+this.columnPropName+" <= "+n+")"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"expression",{get:function(){if(this._totals&&!this._globalHistogram)return null;var t=this._carto.expressions;return t.viewportHistogram(this._inputExpression?this._inputExpression:t.prop(this._column),this._bucketArg(),this._weight)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"globalExpression",{get:function(){if(!this._totals)return null;var t=this._carto.expressions;return t.globalHistogram(this._inputExpression?this._inputExpression:t.prop(this._column),this._bucketArg(),this._weight)},enumerable:!0,configurable:!0}),e.prototype.setTimeSeries=function(t){this._isTimeSeries=t},e.prototype.enableColorMapping=function(){throw new Error("Unsupported for numerical histograms")},e.prototype.setLegendData=function(){throw new Error("Unsupported for numerical histograms")},e.prototype.bindDataLayer=function(){var t=this;this._dataLayer.on("updated",(function(){if(t._totals&&!t._globalHistogram&&(t._globalHistogram=t._dataLayer.viz.variables[t.name+"_global"],t._globalHistogram)){var e=t._globalHistogram.input.type;t._bucketRanges=t._globalHistogram.value.map((function(t){return[t.x[0],t.x[1]]})),t._emitter.emit("expressionReady",{name:t.name,expression:t.expression}),t._widget.backgroundData="number"===e?T(t._globalHistogram):z(t._globalHistogram)}var r=t._dataLayer.viz.variables[t.name];if(r&&null!==r.value&&(null===t._lastHistogram||!j(t._lastHistogram,r))){e=r.input.type;t._emitter.emit("rangeChanged",[r.value[0].x[0],r.value[r.value.length-1].x[1]]),t._lastHistogram={value:r.value,input:{type:e}},t._widget.data="number"===e?T(r):z(r)}}))},e.prototype.selectionChanged=function(t){if(null===t.detail)this._selection=null;else{var e=this._isTimeSeries?t.detail:t.detail.selection;this._selection=[e[0],e[1]]}this._emitter.emit("rangeChanged",this._selection),this._filterChanged()},e.prototype._bucketArg=function(){return void 0!==this._bucketRanges?this._bucketRanges:this._buckets},e}(R),I=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),B=function(t){function e(e,r,i,o,a){var s=t.call(this,"global_range",e,o,r,a,!1)||this;return s._value=null,s._widget=n(i),s._carto=e,s._widget.addEventListener("change",(function(t){s._value=t.detail,s._filterChanged()})),s}return I(e,t),e.prototype.setDataLayer=function(t){var e=this;this._dataLayer=t,this._dataLayer.on("updated",(function(){var t=e._dataLayer.viz.variables[e.name];t&&!e._populated&&(e._widget.minValue=t.value[0],e._widget.maxValue=t.value[1],e._widget.range=t.value,e._populated=!0)}))},Object.defineProperty(e.prototype,"filter",{get:function(){return null===this._value?null:"@"+this.columnPropName+" > "+this._value[0]+" and @"+this.columnPropName+" < "+this._value[1]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"expression",{get:function(){var t=this._carto.expressions;return t.list([t.globalMin(t.prop(this._column)),t.globalMax(t.prop(this._column))])},enumerable:!0,configurable:!0}),e}(L),U=function(){function t(t,e,r,i,o,a,s,u,l,c){var p=this;void 0===a&&(a=10),void 0===s&&(s=[.15,.15]),this._timeSeriesWidget=n(i),this._layer=e,this._carto=t,this._columnName=r,this._duration=a,this._fade=s,this._variableName=u||"animation",this._propertyName=l||"filter",this._autoplay=c||!1,e.viz?(this._onLayerLoaded(),o()):e.on("loaded",(function(){p._onLayerLoaded(),o()}))}return t.prototype.removeHistogramLayer=function(){this._dataLayer.remove()},t.prototype.setRange=function(t){if(this._animation&&this._animation.input&&this._animation.input.min&&this._animation.input.max)if(null===t)this._animation.input.min.blendTo(this._min,0),this._animation.input.max.blendTo(this._max,0),this._animation.duration.blendTo(this._duration,0);else if(t[0]!==t[1]){var e=this._carto.expressions,r=void 0,n=void 0,i=void 0;"Blend"===this._animation.input.min.expressionName&&"Transition"!==this._animation.input.min.mix.expressionName&&("number"==typeof t[0]&&"number"==typeof t[1]?(r=t[0],n=t[1],i=Math.min(1,(n-r)/(this._max.value-this._min.value))):t[0]instanceof Date&&t[1]instanceof Date&&(r=e.time(t[0]),n=e.time(t[1]),i=Math.min(1,(t[0].getTime()-t[1].getTime())/(this._max.value-this._min.value))),this._animation.input.min.blendTo(r,0),this._animation.input.max.blendTo(n,0),this._animation.duration.blendTo(this._duration*i,0))}},Object.defineProperty(t.prototype,"variableName",{get:function(){return this._variableName},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"propertyName",{get:function(){return this._propertyName},set:function(t){this._propertyName=t},enumerable:!0,configurable:!0}),t.prototype.setDuration=function(t){this._duration=t,this._animation.duration.blendTo(t,0)},Object.defineProperty(t.prototype,"animation",{get:function(){return this._animation},enumerable:!0,configurable:!0}),t.prototype.restart=function(){this._animation.setProgressPct(0)},t.prototype._onLayerLoaded=function(){var t=this;this._viz=this._layer.viz;var e=this._getAnimationExpression();e.a&&e.b?this._animation="animation"===e.a.expressionName?e.a:e.b:this._animation=e,this._viz.variables[this._variableName]=this._animation,this._viz[this._propertyName].blendTo(e,0),this._animation.parent=this._viz,this._animation.notify=this._viz._changed.bind(this._viz),this._max=this._animation.input.max,this._min=this._animation.input.min,this._duration=this._animation.duration.value,this._layer.on("updated",(function(){t._timeSeriesWidget.progress=100*t._animation.getProgressPct(),t._timeSeriesWidget.playing=t._animation.isPlaying()})),this._timeSeriesWidget.animated=this._autoplay,this._timeSeriesWidget.addEventListener("seek",(function(e){t._animation.setProgressPct(e.detail/100),t._timeSeriesWidget.progress=e.detail})),this._timeSeriesWidget.addEventListener("play",(function(){t._animation.play()})),this._timeSeriesWidget.addEventListener("pause",(function(){t._animation.pause()}))},t.prototype._getAnimationExpression=function(){return this._variableName&&this._viz.variables[this._variableName]?this._viz.variables[this._variableName]:this._propertyName&&this._viz[this._propertyName]&&this._viz[this._propertyName].isAnimated()?this._viz[this._propertyName]:this._createDefaultAnimation()},t.prototype._createDefaultAnimation=function(){var t=this._carto.expressions;return t.animation(t.linear(t.prop(this._columnName)),this._duration,t.fade(this._fade[0],this._fade[1]))},t}(),q=function(){function t(t){var e=t.carto,r=t.map,n=t.layer,i=t.source;if(this._vizFilters=[],this._carto=e,this._map=r,this._layer=n,this._source=i,this._id=this._layer.id,this._rebuildFilters=this._rebuildFilters.bind(this),this._updateDataLayerVariables=this._updateDataLayerVariables.bind(this),!this._carto.expressions.globalHistogram)throw new Error("Provided VL version "+this._carto.version+" lacks globalHistogram support.");if(!b.a.satisfies(this._carto.version,"^1.2.3"))throw new Error("Provided VL version "+this._carto.version+" not supported. Must satisfy ^1.2.3")}return t.prototype.numericalHistogram=function(t,e,r){void 0===r&&(r={});var n=r.buckets,a=r.bucketRanges,s=r.weight,u=r.readOnly,l=r.totals,c=i(e),p=o(e),h=new M(this._carto,this._layer,t,c,n,s,this._source,a,u,l,p);return this._addFilter(h),h},t.prototype.categoricalHistogram=function(t,e,r){void 0===r&&(r={});var n=r.readOnly,a=r.totals,s=r.weight,u=i(e),l=o(e),c=new W(this._carto,this._layer,t,u,this._source,n,s,a,l);return this._addFilter(c),c},t.prototype.histogram=function(t,e,r){void 0===r&&(r={});var n=r.buckets,i=r.bucketRanges,o=r.readOnly,a=r.weight,s=r.totals;if(void 0===n&&void 0===i){var u=t;return this.categoricalHistogram(u,e,{readOnly:o,totals:s,weight:a})}return this.numericalHistogram(t,e,{bucketRanges:i,buckets:n,readOnly:o,totals:s,weight:a})},t.prototype.category=function(t,e,r){void 0===r&&(r={});var n=r.readOnly,a=r.button,s=r.weight,u=i(e),l=o(e),c=new A(this._carto,this._layer,t,u,this._source,s,n,a,l);return this._addFilter(c),c},t.prototype.timeSeries=function(t,e,r){var n=this;if(void 0===r&&(r={}),this._animation)throw new Error("There can only be one animation");var i=r.buckets,o=r.bucketRanges,a=r.readOnly,s=r.totals,u=r.weight,l=r.duration,c=r.fade,p=r.variableName,h=r.propertyName,f=r.autoplay;this._animation=new U(this._carto,this._layer,e,t,(function(){"filter"===h&&n._rebuildFilters()}),l,c,p,h,f);var m=this.numericalHistogram(t,e,{bucketRanges:o,buckets:i,readOnly:a,totals:s,weight:u});return m.setTimeSeries(!0),m.on("rangeChanged",(function(t){n._animation.setRange(t)})),this._animation},t.prototype.animationControls=function(t,e,r){var n=this;void 0===r&&(r={});var i=r.duration,o=r.fade,a=r.variableName,s=r.propertyName,u=void 0===s?"filter":s,l=r.autoplay;return this._animation=new w(t,this._carto,e,a,u,i,o,l,this._layer,(function(){"filter"===u&&n._rebuildFilters()}),null),this._animation},t.prototype.globalRange=function(t,e){var r=new B(this._carto,this._layer,t,e,this._source);return this._addFilter(r),r},t.prototype.build=function(){var t=this;if(0!==this._vizFilters.length){var e=function(){t._appendVariables(),t._buildDataLayer()};this._layer.viz?e():this._layer.on("loaded",e)}},t.prototype._addFilter=function(t){t.on("filterChanged",this._rebuildFilters),t.on("expressionReady",this._updateDataLayerVariables),this._vizFilters.push(t)},t.prototype._appendVariables=function(){var t=this,e=this._carto.expressions;this._vizFilters.forEach((function(r){return t._layer.viz.variables[r.columnPropName]=e.prop(r.column)}))},t.prototype._buildDataLayer=function(){var t=this,e=this._getVariables(),r=this._carto.expressions,n=new this._carto.Viz({color:r.rgba(0,0,0,0),strokeWidth:0,variables:e});this._readOnlyLayer=new this._carto.Layer("asbind_ro_"+this._id,this._source,n),this._readOnlyLayer.addTo(this._map),this._vizFilters.forEach((function(e){return e.setDataLayer(t._readOnlyLayer)}))},t.prototype._getVariables=function(){for(var t=void 0!==this._readOnlyLayer?this._readOnlyLayer.viz.variables:{},e=0,r=this._vizFilters;e<r.length;e++){var n=r[e],i=n.name;n.globalExpression&&(t[i+"_global"]=n.globalExpression),n.expression&&(t[i]=n.expression),t[n.columnPropName]=this._carto.expressions.prop(n.column)}return t},t.prototype._updateDataLayerVariables=function(t){this._readOnlyLayer.viz&&(this._readOnlyLayer.viz.variables[t.name]=t.expression)},t.prototype._rebuildFilters=function(){var t=this._combineFilters(this._vizFilters.filter((function(t){return null!==t.filter})).map((function(t){return t.filter})));this._readOnlyLayer&&this._readOnlyLayer.viz.filter.blendTo(t,0),this._layer.viz.filter.isAnimated()&&this._animation&&this._layer.viz.variables[this._animation.variableName]&&(t="@"+this._animation.variableName+" and "+t),this._layer.viz.filter.blendTo(t,0),this._animation&&this._animation.restart()},t.prototype._combineFilters=function(t){return 0===t.length?"1":t.join(" and ")},t}(),Z=q,X={Bridge:q,Layers:a,Legends:g}}])}));

@@ -37,2 +37,6 @@ export interface VLViz {

getJoinedValues?: any;
getAllCategories?(): Array<{
name: string;
frequency: number;
}>;
}

@@ -39,0 +43,0 @@ export interface VLHistogramData<T> {

@@ -1,2 +0,2 @@

import { VLCategoricalHistogram } from '../../../../types';
import { LegendEntry, VLCategoricalHistogram } from '../../../../types';
/**

@@ -10,3 +10,3 @@ * Converts a VL 'categorical' histogram to the format Airship's category widget requires

*/
export declare function vlToCategory(histogram: VLCategoricalHistogram, legendData?: any): object[];
export declare function vlToCategory(histogram: VLCategoricalHistogram, legendData?: LegendEntry[]): object[];
export default vlToCategory;

@@ -12,9 +12,17 @@ import { findColorForCategory } from '../histogram';

if (legendData === void 0) { legendData = []; }
return histogram.value.map(function (d) { return ({
color: findColorForCategory(d.x, legendData),
name: d.x,
value: d.y
}); });
var fullCategories = histogram.getAllCategories();
var values = histogram.value.reduce(function (acum, elem) {
acum[elem.x] = elem;
return acum;
}, {});
return fullCategories.map(function (d) {
var value = values[d.name];
return {
color: findColorForCategory(d.name, legendData),
name: d.name,
value: value ? value.y : null
};
}).sort(function (a, b) { return b.value - a.value; });
// TODO: Use getJoinedValues method properly here: histogram.getJoinedValues(legendData);
}
export default vlToCategory;
{
"name": "@carto/airship-bridge",
"version": "2.3.1",
"version": "2.3.2-rc.0",
"description": "Airship bridge to other libs (CARTO VL, CARTO.js)",

@@ -29,3 +29,3 @@ "main": "dist/index.js",

},
"gitHead": "01b0f259b4d0da9f5a8abf5b95cbd05e83de90f7"
"gitHead": "a70c873ba209ddc0ed5c7ce67e461b6efb55c329"
}

@@ -41,2 +41,3 @@ export interface VLViz {

getJoinedValues?: any;
getAllCategories?(): Array<{ name: string, frequency: number }>;
}

@@ -43,0 +44,0 @@

@@ -1,2 +0,2 @@

import { VLCategoricalHistogram } from '../../../../types';
import { LegendEntry, VLCategoricalHistogram } from '../../../../types';
import { findColorForCategory } from '../histogram';

@@ -12,9 +12,18 @@

*/
export function vlToCategory(histogram: VLCategoricalHistogram, legendData: any = []): object[] {
return histogram.value.map((d) => ({
color: findColorForCategory(d.x, legendData),
name: d.x,
value: d.y
}));
export function vlToCategory(histogram: VLCategoricalHistogram, legendData: LegendEntry[] = []): object[] {
const fullCategories = histogram.getAllCategories();
const values = histogram.value.reduce((acum, elem) => {
acum[elem.x] = elem;
return acum;
}, {});
return fullCategories.map((d) => {
const value = values[d.name];
return {
color: findColorForCategory(d.name, legendData),
name: d.name,
value: value ? value.y : null
};
}).sort((a, b) => b.value - a.value);
// TODO: Use getJoinedValues method properly here: histogram.getJoinedValues(legendData);

@@ -21,0 +30,0 @@ }

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc