@globalfishingwatch/dataviews-client
Advanced tools
Comparing version 11.1.0 to 11.2.0
@@ -1,2 +0,2 @@ | ||
export{D as default}from"./resolve-endpoint-e31bf626.js";import"lodash";import"@globalfishingwatch/api-client";import"@globalfishingwatch/api-types";import"luxon";import"@globalfishingwatch/fourwings-aggregate";import"@globalfishingwatch/data-transforms";import"@globalfishingwatch/layer-composer"; | ||
export{D as default}from"./resolve-endpoint-82387bec.js";import"lodash";import"@globalfishingwatch/api-client";import"@globalfishingwatch/api-types";import"@globalfishingwatch/layer-composer/dist/generators";import"@globalfishingwatch/layer-composer";import"@globalfishingwatch/fourwings-aggregate"; | ||
//# sourceMappingURL=dataviews-client.js.map |
@@ -1,2 +0,2 @@ | ||
import{_ as t,r as n,a as e}from"./resolve-endpoint-e31bf626.js";export{D as default,m as mergeWorkspaceUrlDataviewInstances,r as resolveDataviewDatasetResource,b as resolveDataviews,c as resolveEndpoint}from"./resolve-endpoint-e31bf626.js";import{DatasetStatus as i,DatasetTypes as a,DatasetCategory as o,DataviewCategory as l,EndpointId as u}from"@globalfishingwatch/api-types";import{Generators as s,Group as d,DEFAULT_HEATMAP_INTERVALS as h,COLOR_RAMP_DEFAULT_NUM_STEPS as f}from"@globalfishingwatch/layer-composer";import{AggregationOperation as g,VALUE_MULTIPLIER as v}from"@globalfishingwatch/fourwings-aggregate";import"lodash";import"@globalfishingwatch/api-client";import"luxon";import"@globalfishingwatch/data-transforms";function p(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}function y(t){let n=t,e=t;function r(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){const a=r+i>>>1;e(t[a],n)<0?r=a+1:i=a}return r}return 1===t.length&&(n=(n,e)=>t(n)-e,e=function(t){return(n,e)=>p(t(n),e)}(t)),{left:r,center:function(t,e,i,a){null==i&&(i=0),null==a&&(a=t.length);const o=r(t,e,i,a-1);return o>i&&n(t[o-1],e)>-n(t[o],e)?o-1:o},right:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){const a=r+i>>>1;e(t[a],n)>0?i=a:r=a+1}return r}}}const w=y(p).right;y((function(t){return null===t?NaN:+t})).center;var M=Math.sqrt(50),x=Math.sqrt(10),k=Math.sqrt(2);function N(t,n,e){var r=(n-t)/Math.max(0,e),i=Math.floor(Math.log(r)/Math.LN10),a=r/Math.pow(10,i);return i>=0?(a>=M?10:a>=x?5:a>=k?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=M?10:a>=x?5:a>=k?2:1)}function A(t,n){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(n).domain(t)}return this}function E(t,n,e){t.prototype=n.prototype=e,e.constructor=t}function T(t,n){var e=Object.create(t.prototype);for(var r in n)e[r]=n[r];return e}function S(){}var R=1/.7,H="\\s*([+-]?\\d+)\\s*",j="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",F="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",U=/^#([0-9a-f]{3,8})$/,C=new RegExp("^rgb\\("+[H,H,H]+"\\)$"),I=new RegExp("^rgb\\("+[F,F,F]+"\\)$"),q=new RegExp("^rgba\\("+[H,H,H,j]+"\\)$"),$=new RegExp("^rgba\\("+[F,F,F,j]+"\\)$"),_=new RegExp("^hsl\\("+[j,F,F]+"\\)$"),O=new RegExp("^hsla\\("+[j,F,F,j]+"\\)$"),z={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function L(){return this.rgb().formatHex()}function P(){return this.rgb().formatRgb()}function V(t){var n,e;return t=(t+"").trim().toLowerCase(),(n=U.exec(t))?(e=n[1].length,n=parseInt(n[1],16),6===e?W(n):3===e?new X(n>>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):8===e?Z(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):4===e?Z(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|240&n,((15&n)<<4|15&n)/255):null):(n=C.exec(t))?new X(n[1],n[2],n[3],1):(n=I.exec(t))?new X(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=q.exec(t))?Z(n[1],n[2],n[3],n[4]):(n=$.exec(t))?Z(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=_.exec(t))?Q(n[1],n[2]/100,n[3]/100,1):(n=O.exec(t))?Q(n[1],n[2]/100,n[3]/100,n[4]):z.hasOwnProperty(t)?W(z[t]):"transparent"===t?new X(NaN,NaN,NaN,0):null}function W(t){return new X(t>>16&255,t>>8&255,255&t,1)}function Z(t,n,e,r){return r<=0&&(t=n=e=NaN),new X(t,n,e,r)}function B(t){return t instanceof S||(t=V(t)),t?new X((t=t.rgb()).r,t.g,t.b,t.opacity):new X}function G(t,n,e,r){return 1===arguments.length?B(t):new X(t,n,e,null==r?1:r)}function X(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function Y(){return"#"+K(this.r)+K(this.g)+K(this.b)}function J(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function K(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Q(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new nt(t,n,e,r)}function tt(t){if(t instanceof nt)return new nt(t.h,t.s,t.l,t.opacity);if(t instanceof S||(t=V(t)),!t)return new nt;if(t instanceof nt)return t;var n=(t=t.rgb()).r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),a=Math.max(n,e,r),o=NaN,l=a-i,u=(a+i)/2;return l?(o=n===a?(e-r)/l+6*(e<r):e===a?(r-n)/l+2:(n-e)/l+4,l/=u<.5?a+i:2-a-i,o*=60):l=u>0&&u<1?0:o,new nt(o,l,u,t.opacity)}function nt(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function et(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}E(S,V,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:L,formatHex:L,formatHsl:function(){return tt(this).formatHsl()},formatRgb:P,toString:P}),E(X,G,T(S,{brighter:function(t){return t=null==t?R:Math.pow(R,t),new X(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new X(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Y,formatHex:Y,formatRgb:J,toString:J})),E(nt,(function(t,n,e,r){return 1===arguments.length?tt(t):new nt(t,n,e,null==r?1:r)}),T(S,{brighter:function(t){return t=null==t?R:Math.pow(R,t),new nt(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new nt(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,r=e+(e<.5?e:1-e)*n,i=2*e-r;return new X(et(t>=240?t-240:t+120,i,r),et(t,i,r),et(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var rt=t=>()=>t;function it(t){return 1==(t=+t)?at:function(n,e){return e-n?function(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(r){return Math.pow(t+r*n,e)}}(n,e,t):rt(isNaN(n)?e:n)}}function at(t,n){var e=n-t;return e?function(t,n){return function(e){return t+e*n}}(t,e):rt(isNaN(t)?n:t)}var ot=function t(n){var e=it(n);function r(t,n){var r=e((t=G(t)).r,(n=G(n)).r),i=e(t.g,n.g),a=e(t.b,n.b),o=at(t.opacity,n.opacity);return function(n){return t.r=r(n),t.g=i(n),t.b=a(n),t.opacity=o(n),t+""}}return r.gamma=t,r}(1);function lt(t,n){n||(n=[]);var e,r=t?Math.min(n.length,t.length):0,i=n.slice();return function(a){for(e=0;e<r;++e)i[e]=t[e]*(1-a)+n[e]*a;return i}}function ut(t,n){var e,r=n?n.length:0,i=t?Math.min(r,t.length):0,a=new Array(i),o=new Array(r);for(e=0;e<i;++e)a[e]=vt(t[e],n[e]);for(;e<r;++e)o[e]=n[e];return function(t){for(e=0;e<i;++e)o[e]=a[e](t);return o}}function st(t,n){var e=new Date;return t=+t,n=+n,function(r){return e.setTime(t*(1-r)+n*r),e}}function ct(t,n){return t=+t,n=+n,function(e){return t*(1-e)+n*e}}function dt(t,n){var e,r={},i={};for(e in null!==t&&"object"==typeof t||(t={}),null!==n&&"object"==typeof n||(n={}),n)e in t?r[e]=vt(t[e],n[e]):i[e]=n[e];return function(t){for(e in r)i[e]=r[e](t);return i}}var ht=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ft=new RegExp(ht.source,"g");function gt(t,n){var e,r,i,a=ht.lastIndex=ft.lastIndex=0,o=-1,l=[],u=[];for(t+="",n+="";(e=ht.exec(t))&&(r=ft.exec(n));)(i=r.index)>a&&(i=n.slice(a,i),l[o]?l[o]+=i:l[++o]=i),(e=e[0])===(r=r[0])?l[o]?l[o]+=r:l[++o]=r:(l[++o]=null,u.push({i:o,x:ct(e,r)})),a=ft.lastIndex;return a<n.length&&(i=n.slice(a),l[o]?l[o]+=i:l[++o]=i),l.length<2?u[0]?function(t){return function(n){return t(n)+""}}(u[0].x):function(t){return function(){return t}}(n):(n=u.length,function(t){for(var e,r=0;r<n;++r)l[(e=u[r]).i]=e.x(t);return l.join("")})}function vt(t,n){var e,r,i=typeof n;return null==n||"boolean"===i?rt(n):("number"===i?ct:"string"===i?(e=V(n))?(n=e,ot):gt:n instanceof V?ot:n instanceof Date?st:(r=n,!ArrayBuffer.isView(r)||r instanceof DataView?Array.isArray(n)?ut:"function"!=typeof n.valueOf&&"function"!=typeof n.toString||isNaN(n)?dt:ct:lt))(t,n)}function pt(t,n){return t=+t,n=+n,function(e){return Math.round(t*(1-e)+n*e)}}function mt(t){return+t}var yt=[0,1];function bt(t){return t}function wt(t,n){return(n-=t=+t)?function(e){return(e-t)/n}:(e=isNaN(n)?NaN:.5,function(){return e});var e}function Mt(t,n,e){var r=t[0],i=t[1],a=n[0],o=n[1];return i<r?(r=wt(i,r),a=e(o,a)):(r=wt(r,i),a=e(a,o)),function(t){return a(r(t))}}function xt(t,n,e){var r=Math.min(t.length,n.length)-1,i=new Array(r),a=new Array(r),o=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),n=n.slice().reverse());++o<r;)i[o]=wt(t[o],t[o+1]),a[o]=e(n[o],n[o+1]);return function(n){var e=w(t,n,1,r)-1;return a[e](i[e](n))}}function kt(t,n){return n.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Nt(){var t,n,e,r,i,a,o=yt,l=yt,u=vt,s=bt;function c(){var t=Math.min(o.length,l.length);return s!==bt&&(s=function(t,n){var e;return t>n&&(e=t,t=n,n=e),function(e){return Math.max(t,Math.min(n,e))}}(o[0],o[t-1])),r=t>2?xt:Mt,i=a=null,d}function d(n){return isNaN(n=+n)?e:(i||(i=r(o.map(t),l,u)))(t(s(n)))}return d.invert=function(e){return s(n((a||(a=r(l,o.map(t),ct)))(e)))},d.domain=function(t){return arguments.length?(o=Array.from(t,mt),c()):o.slice()},d.range=function(t){return arguments.length?(l=Array.from(t),c()):l.slice()},d.rangeRound=function(t){return l=Array.from(t),u=pt,c()},d.clamp=function(t){return arguments.length?(s=!!t||bt,c()):s!==bt},d.interpolate=function(t){return arguments.length?(u=t,c()):u},d.unknown=function(t){return arguments.length?(e=t,d):e},function(e,r){return t=e,n=r,c()}}function At(){return Nt()(bt,bt)}function Et(t,n){if((e=(t=n?t.toExponential(n-1):t.toExponential()).indexOf("e"))<0)return null;var e,r=t.slice(0,e);return[r.length>1?r[0]+r.slice(2):r,+t.slice(e+1)]}function Tt(t){return(t=Et(Math.abs(t)))?t[1]:NaN}var St,Dt=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Rt(t){if(!(n=Dt.exec(t)))throw new Error("invalid format: "+t);var n;return new Ht({fill:n[1],align:n[2],sign:n[3],symbol:n[4],zero:n[5],width:n[6],comma:n[7],precision:n[8]&&n[8].slice(1),trim:n[9],type:n[10]})}function Ht(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function jt(t,n){var e=Et(t,n);if(!e)return t+"";var r=e[0],i=e[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}Rt.prototype=Ht.prototype,Ht.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Ft={"%":(t,n)=>(100*t).toFixed(n),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,n)=>t.toExponential(n),f:(t,n)=>t.toFixed(n),g:(t,n)=>t.toPrecision(n),o:t=>Math.round(t).toString(8),p:(t,n)=>jt(100*t,n),r:jt,s:function(t,n){var e=Et(t,n);if(!e)return t+"";var r=e[0],i=e[1],a=i-(St=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+Et(t,Math.max(0,n+a-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Ut(t){return t}var Ct,It,qt,$t=Array.prototype.map,_t=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Ot(t){var n,e,r=void 0===t.grouping||void 0===t.thousands?Ut:(n=$t.call(t.grouping,Number),e=t.thousands+"",function(t,r){for(var i=t.length,a=[],o=0,l=n[0],u=0;i>0&&l>0&&(u+l+1>r&&(l=Math.max(1,r-u)),a.push(t.substring(i-=l,i+l)),!((u+=l+1)>r));)l=n[o=(o+1)%n.length];return a.reverse().join(e)}),i=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",l=void 0===t.numerals?Ut:function(t){return function(n){return n.replace(/[0-9]/g,(function(n){return t[+n]}))}}($t.call(t.numerals,String)),u=void 0===t.percent?"%":t.percent+"",s=void 0===t.minus?"−":t.minus+"",c=void 0===t.nan?"NaN":t.nan+"";function d(t){var n=(t=Rt(t)).fill,e=t.align,d=t.sign,h=t.symbol,f=t.zero,g=t.width,v=t.comma,p=t.precision,m=t.trim,y=t.type;"n"===y?(v=!0,y="g"):Ft[y]||(void 0===p&&(p=12),m=!0,y="g"),(f||"0"===n&&"="===e)&&(f=!0,n="0",e="=");var b="$"===h?i:"#"===h&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",w="$"===h?a:/[%p]/.test(y)?u:"",M=Ft[y],x=/[defgprs%]/.test(y);function k(t){var i,a,u,h=b,k=w;if("c"===y)k=M(t)+k,t="";else{var N=(t=+t)<0||1/t<0;if(t=isNaN(t)?c:M(Math.abs(t),p),m&&(t=function(t){t:for(var n,e=t.length,r=1,i=-1;r<e;++r)switch(t[r]){case".":i=n=r;break;case"0":0===i&&(i=r),n=r;break;default:if(!+t[r])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(n+1):t}(t)),N&&0==+t&&"+"!==d&&(N=!1),h=(N?"("===d?d:s:"-"===d||"("===d?"":d)+h,k=("s"===y?_t[8+St/3]:"")+k+(N&&"("===d?")":""),x)for(i=-1,a=t.length;++i<a;)if(48>(u=t.charCodeAt(i))||u>57){k=(46===u?o+t.slice(i+1):t.slice(i))+k,t=t.slice(0,i);break}}v&&!f&&(t=r(t,1/0));var A=h.length+t.length+k.length,E=A<g?new Array(g-A+1).join(n):"";switch(v&&f&&(t=r(E+t,E.length?g-k.length:1/0),E=""),e){case"<":t=h+t+k+E;break;case"=":t=h+E+t+k;break;case"^":t=E.slice(0,A=E.length>>1)+h+t+k+E.slice(A);break;default:t=E+h+t+k}return l(t)}return p=void 0===p?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,p)):Math.max(0,Math.min(20,p)),k.toString=function(){return t+""},k}return{format:d,formatPrefix:function(t,n){var e=d(((t=Rt(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Tt(n)/3))),i=Math.pow(10,-r),a=_t[8+r/3];return function(t){return e(i*t)+a}}}}function zt(t,n,e,r){var i,a=function(t,n,e){var r=Math.abs(n-t)/Math.max(0,e),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),a=r/i;return a>=M?i*=10:a>=x?i*=5:a>=k&&(i*=2),n<t?-i:i}(t,n,e);switch((r=Rt(null==r?",f":r)).type){case"s":var o=Math.max(Math.abs(t),Math.abs(n));return null!=r.precision||isNaN(i=function(t,n){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Tt(n)/3)))-Tt(Math.abs(t)))}(a,o))||(r.precision=i),qt(r,o);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(t,n){return t=Math.abs(t),n=Math.abs(n)-t,Math.max(0,Tt(n)-Tt(t))+1}(a,Math.max(Math.abs(t),Math.abs(n))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(t){return Math.max(0,-Tt(Math.abs(t)))}(a))||(r.precision=i-2*("%"===r.type))}return It(r)}function Lt(t){var n=t.domain;return t.ticks=function(t){var e=n();return function(t,n,e){var r,i,a,o,l=-1;if(e=+e,(t=+t)==(n=+n)&&e>0)return[t];if((r=n<t)&&(i=t,t=n,n=i),0===(o=N(t,n,e))||!isFinite(o))return[];if(o>0){let e=Math.round(t/o),r=Math.round(n/o);for(e*o<t&&++e,r*o>n&&--r,a=new Array(i=r-e+1);++l<i;)a[l]=(e+l)*o}else{o=-o;let e=Math.round(t*o),r=Math.round(n*o);for(e/o<t&&++e,r/o>n&&--r,a=new Array(i=r-e+1);++l<i;)a[l]=(e+l)/o}return r&&a.reverse(),a}(e[0],e[e.length-1],null==t?10:t)},t.tickFormat=function(t,e){var r=n();return zt(r[0],r[r.length-1],null==t?10:t,e)},t.nice=function(e){null==e&&(e=10);var r,i,a=n(),o=0,l=a.length-1,u=a[o],s=a[l],c=10;for(s<u&&(i=u,u=s,s=i,i=o,o=l,l=i);c-- >0;){if((i=N(u,s,e))===r)return a[o]=u,a[l]=s,n(a);if(i>0)u=Math.floor(u/i)*i,s=Math.ceil(s/i)*i;else{if(!(i<0))break;u=Math.ceil(u*i)/i,s=Math.floor(s*i)/i}r=i}return t},t}function Pt(){var t=At();return t.copy=function(){return kt(t,Pt())},A.apply(t,arguments),Lt(t)}Ct=Ot({thousands:",",grouping:[3],currency:["$",""]}),It=Ct.format,qt=Ct.formatPrefix;var Vt="__",Wt="mergedAnimatedHeatmap",Zt=function(t){var n=new Date(t);return new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes()))};function Bt(r,c,h){var p,m,y,b,w,M,x,k,N,A,E,T,S,D,R,H,j,F,U,C,I,q,$,_=c||{},O=_.debug,z=void 0!==O&&O,L=_.highlightedTime,P=_.highlightedEvent,V=t({id:r.id},r.config);switch(null===(p=r.config)||void 0===p?void 0:p.type){case s.Type.TileCluster:var W=n(r,a.Events),Z=W.dataset,B=W.url;return Z&&B?(V.tilesUrl=B,V):(console.warn("No dataset config for TileCluster generator",r),[]);case s.Type.Track:L&&(V.highlightedTime=L);var G=r.datasets&&(null===(y=null===(m=r.datasets)||void 0===m?void 0:m[0])||void 0===y?void 0:y.type)===a.UserTracks?a.UserTracks:a.Tracks,X=n(r,G).url;if(X&&(null==h?void 0:h[X])){var Y=null==h?void 0:h[X];V.data=Y.data}var J=n(r,a.Events).url;if(J&&(null===(b=null==h?void 0:h[J])||void 0===b?void 0:b.data)){var K=t(t({id:r.id+"__vessel_events",type:s.Type.VesselEvents,data:null==h?void 0:h[J].data,color:null===(w=r.config)||void 0===w?void 0:w.color},V.data&&{track:V.data}),P&&{currentEventId:P.id});return[V,K]}return V;case s.Type.Heatmap:var Q=null===(M=r.datasets)||void 0===M?void 0:M.find((function(t){return t.type===a.Fourwings})),tt=null===(x=null==Q?void 0:Q.endpoints)||void 0===x?void 0:x.find((function(t){return t.id===u.FourwingsTiles})),nt=null===(k=null==Q?void 0:Q.endpoints)||void 0===k?void 0:k.find((function(t){return t.id===u.FourwingsLegend}));return V=t(t({},V),{maxZoom:8,fetchStats:!r.config.steps,datasets:[null==Q?void 0:Q.id],tilesUrl:null==tt?void 0:tt.pathTemplate,statsUrl:null==nt?void 0:nt.pathTemplate,metadata:{color:null===(N=null==r?void 0:r.config)||void 0===N?void 0:N.color,group:d.OutlinePolygonsBackground,interactive:!0,legend:{label:null==Q?void 0:Q.name,unit:null==Q?void 0:Q.unit}}});case s.Type.HeatmapAnimated:var et=r.category===l.Environment,rt={},it=null===(A=r.datasets)||void 0===A?void 0:A.find((function(t){return t.type===a.Fourwings}));if(et){var at=r.config.datasets||(null===(E=r.datasetsConfig)||void 0===E?void 0:E.map((function(t){return t.datasetId})));rt={sublayers:[{id:V.id,colorRamp:null===(T=r.config)||void 0===T?void 0:T.colorRamp,colorRampWhiteEnd:!1,visible:null===(D=null===(S=r.config)||void 0===S?void 0:S.visible)||void 0===D||D,breaks:null===(R=r.config)||void 0===R?void 0:R.breaks,datasets:at,legend:{label:null==it?void 0:it.name,unit:null==it?void 0:it.unit,color:null==r?void 0:r.config.color}}],maxZoom:8,mode:s.HeatmapAnimatedMode.Single,aggregationOperation:g.Avg,interactive:!0,breaksMultiplier:(null===(H=r.config)||void 0===H?void 0:H.breaksMultiplier)||v,interval:(null===(j=r.config)||void 0===j?void 0:j.interval)||"month"}}var ot=null===(F=(V=t(t({},V),rt)).sublayers)||void 0===F?void 0:F.some((function(t){return!0===t.visible})),lt=(I=r.datasets,q=null==I?void 0:I.flatMap((function(t){return(null==t?void 0:t.startDate)?new Date(t.startDate).getTime():[]})),$=null==I?void 0:I.flatMap((function(t){return(null==t?void 0:t.endDate)?new Date(t.endDate).getTime():[]})),{extentStart:(null==q?void 0:q.length)?Zt(Math.min.apply(Math,q)).toISOString():void 0,extentEnd:(null==$?void 0:$.length)?Zt(Math.max.apply(Math,$)).toISOString():void 0}),ut=lt.extentStart,st=lt.extentEnd;return V=t(t(t(t({},V),{visible:ot,debug:z,debugLabels:z}),ut&&{datasetsStart:ut}),st&&{datasetsEnd:st});case s.Type.Context:case s.Type.UserContext:if(Array.isArray(r.config.layers))return(null===(U=r.config.layers)||void 0===U?void 0:U.flatMap((function(t){var e=t.id,a=t.dataset,o=n(r,a),l=o.dataset,u=o.url;return u&&(null==l?void 0:l.status)===i.Done?{id:e,tilesUrl:u,attribution:null==l?void 0:l.source}:[]}))).map((function(n){var e=n.id,i=n.tilesUrl,a=n.attribution;return t(t({},V),{id:r.id+"__"+e,layer:e,attribution:a,tilesUrl:i})}));V.id=r.config.layers?r.id+"__"+r.config.layers:r.id,V.layer=r.config.layers;var ct=n(r,a.Context),dt=(it=ct.dataset,ct.url);if((null==it?void 0:it.status)!==i.Done)return[];if(dt&&(V.tilesUrl=dt),(null==it?void 0:it.source)&&(V.attribution=it.source),it.category===o.Environment){var ht=(null===(C=it.configuration)||void 0===C?void 0:C.propertyToIncludeRange)||{},ft=ht.min,gt=ht.max,vt=Pt().range([ft,gt]).domain([0,1]),pt=f,mt=e([],Array(pt)).map((function(t,n){var e;return parseFloat(null===(e=n/(pt-1))||void 0===e?void 0:e.toFixed(2))})).map((function(t){var n;return parseFloat(null===(n=vt(t))||void 0===n?void 0:n.toFixed(3))}));V.steps=mt}return V.tilesUrl?V:(console.warn("Missing tiles url for dataview",r),[]);default:return V}}function Gt(n,e,r){var i=(e||{}).heatmapAnimatedMode,a=void 0===i?s.HeatmapAnimatedMode.Compare:i,o=[],u=n.filter((function(t){var n,e=(t.category===l.Fishing||t.category===l.Presence)&&(null===(n=t.config)||void 0===n?void 0:n.type)===s.Type.HeatmapAnimated;return e&&o.push(t),!e}));if(o.length){var c=o.flatMap((function(t){var n,e,r,i=t.config,a=t.datasetsConfig;if(!i||!a||!a.length)return[];var o=i.datasets||a.map((function(t){return t.datasetId})),l=null===(e=null===(n=t.datasets)||void 0===n?void 0:n[0])||void 0===e?void 0:e.unit;return{id:t.id,datasets:o,colorRamp:i.colorRamp,colorRampWhiteEnd:!0,filter:i.filter,visible:i.visible,legend:{label:t.name,unit:l,color:null===(r=null==t?void 0:t.config)||void 0===r?void 0:r.color}}})),d=function(t){var n=h.find((function(n){return t.every((function(t){var e;return(null===(e=t.configuration)||void 0===e?void 0:e.resolution)===n}))}));return n&&h.slice(h.findIndex((function(t){return t===n})))}(o.flatMap((function(t){return t.datasets||[]})).filter((function(t){var n;return null===(n=null==t?void 0:t.configuration)||void 0===n?void 0:n.resolution}))),f={id:e.mergedActivityGeneratorId||"mergedAnimatedHeatmap",config:t({type:s.Type.HeatmapAnimated,sublayers:c,mode:a},d&&{interval:d})};u.push(f)}return u.flatMap((function(t){return Bt(t,e,r)}))}export{Wt as MERGED_ACTIVITY_ANIMATED_HEATMAP_GENERATOR_ID,Vt as MULTILAYER_SEPARATOR,Gt as getDataviewsGeneratorConfigs,Bt as getGeneratorConfig}; | ||
import{_ as t,r as n,a as e}from"./resolve-endpoint-82387bec.js";export{D as default,m as mergeWorkspaceUrlDataviewInstances,r as resolveDataviewDatasetResource,b as resolveDataviews,c as resolveEndpoint}from"./resolve-endpoint-82387bec.js";import{uniq as i}from"lodash";import{DatasetStatus as a,DatasetTypes as o,DatasetCategory as l,DataviewCategory as u,EndpointId as s}from"@globalfishingwatch/api-types";import{Generators as d,Group as h,DEFAULT_HEATMAP_INTERVALS as f,COLOR_RAMP_DEFAULT_NUM_STEPS as g}from"@globalfishingwatch/layer-composer";import{AggregationOperation as v,VALUE_MULTIPLIER as p}from"@globalfishingwatch/fourwings-aggregate";import"@globalfishingwatch/api-client";import"@globalfishingwatch/layer-composer/dist/generators";function y(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}function w(t){let n=t,e=t;function r(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){const a=r+i>>>1;e(t[a],n)<0?r=a+1:i=a}return r}return 1===t.length&&(n=(n,e)=>t(n)-e,e=function(t){return(n,e)=>y(t(n),e)}(t)),{left:r,center:function(t,e,i,a){null==i&&(i=0),null==a&&(a=t.length);const o=r(t,e,i,a-1);return o>i&&n(t[o-1],e)>-n(t[o],e)?o-1:o},right:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){const a=r+i>>>1;e(t[a],n)>0?i=a:r=a+1}return r}}}const M=w(y).right;w((function(t){return null===t?NaN:+t})).center;var x=Math.sqrt(50),k=Math.sqrt(10),N=Math.sqrt(2);function A(t,n,e){var r=(n-t)/Math.max(0,e),i=Math.floor(Math.log(r)/Math.LN10),a=r/Math.pow(10,i);return i>=0?(a>=x?10:a>=k?5:a>=N?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=x?10:a>=k?5:a>=N?2:1)}function E(t,n){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(n).domain(t)}return this}function T(t,n,e){t.prototype=n.prototype=e,e.constructor=t}function S(t,n){var e=Object.create(t.prototype);for(var r in n)e[r]=n[r];return e}function R(){}var H=1/.7,j="\\s*([+-]?\\d+)\\s*",F="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",U="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",C=/^#([0-9a-f]{3,8})$/,I=new RegExp("^rgb\\("+[j,j,j]+"\\)$"),q=new RegExp("^rgb\\("+[U,U,U]+"\\)$"),$=new RegExp("^rgba\\("+[j,j,j,F]+"\\)$"),_=new RegExp("^rgba\\("+[U,U,U,F]+"\\)$"),O=new RegExp("^hsl\\("+[F,U,U]+"\\)$"),z=new RegExp("^hsla\\("+[F,U,U,F]+"\\)$"),L={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function P(){return this.rgb().formatHex()}function V(){return this.rgb().formatRgb()}function W(t){var n,e;return t=(t+"").trim().toLowerCase(),(n=C.exec(t))?(e=n[1].length,n=parseInt(n[1],16),6===e?Z(n):3===e?new Y(n>>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):8===e?B(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):4===e?B(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|240&n,((15&n)<<4|15&n)/255):null):(n=I.exec(t))?new Y(n[1],n[2],n[3],1):(n=q.exec(t))?new Y(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=$.exec(t))?B(n[1],n[2],n[3],n[4]):(n=_.exec(t))?B(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=O.exec(t))?tt(n[1],n[2]/100,n[3]/100,1):(n=z.exec(t))?tt(n[1],n[2]/100,n[3]/100,n[4]):L.hasOwnProperty(t)?Z(L[t]):"transparent"===t?new Y(NaN,NaN,NaN,0):null}function Z(t){return new Y(t>>16&255,t>>8&255,255&t,1)}function B(t,n,e,r){return r<=0&&(t=n=e=NaN),new Y(t,n,e,r)}function G(t){return t instanceof R||(t=W(t)),t?new Y((t=t.rgb()).r,t.g,t.b,t.opacity):new Y}function X(t,n,e,r){return 1===arguments.length?G(t):new Y(t,n,e,null==r?1:r)}function Y(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function J(){return"#"+Q(this.r)+Q(this.g)+Q(this.b)}function K(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function Q(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function tt(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new et(t,n,e,r)}function nt(t){if(t instanceof et)return new et(t.h,t.s,t.l,t.opacity);if(t instanceof R||(t=W(t)),!t)return new et;if(t instanceof et)return t;var n=(t=t.rgb()).r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),a=Math.max(n,e,r),o=NaN,l=a-i,u=(a+i)/2;return l?(o=n===a?(e-r)/l+6*(e<r):e===a?(r-n)/l+2:(n-e)/l+4,l/=u<.5?a+i:2-a-i,o*=60):l=u>0&&u<1?0:o,new et(o,l,u,t.opacity)}function et(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function rt(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}T(R,W,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:P,formatHex:P,formatHsl:function(){return nt(this).formatHsl()},formatRgb:V,toString:V}),T(Y,X,S(R,{brighter:function(t){return t=null==t?H:Math.pow(H,t),new Y(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Y(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:J,formatHex:J,formatRgb:K,toString:K})),T(et,(function(t,n,e,r){return 1===arguments.length?nt(t):new et(t,n,e,null==r?1:r)}),S(R,{brighter:function(t){return t=null==t?H:Math.pow(H,t),new et(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new et(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,r=e+(e<.5?e:1-e)*n,i=2*e-r;return new Y(rt(t>=240?t-240:t+120,i,r),rt(t,i,r),rt(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var it=t=>()=>t;function at(t){return 1==(t=+t)?ot:function(n,e){return e-n?function(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(r){return Math.pow(t+r*n,e)}}(n,e,t):it(isNaN(n)?e:n)}}function ot(t,n){var e=n-t;return e?function(t,n){return function(e){return t+e*n}}(t,e):it(isNaN(t)?n:t)}var lt=function t(n){var e=at(n);function r(t,n){var r=e((t=X(t)).r,(n=X(n)).r),i=e(t.g,n.g),a=e(t.b,n.b),o=ot(t.opacity,n.opacity);return function(n){return t.r=r(n),t.g=i(n),t.b=a(n),t.opacity=o(n),t+""}}return r.gamma=t,r}(1);function ut(t,n){n||(n=[]);var e,r=t?Math.min(n.length,t.length):0,i=n.slice();return function(a){for(e=0;e<r;++e)i[e]=t[e]*(1-a)+n[e]*a;return i}}function st(t,n){var e,r=n?n.length:0,i=t?Math.min(r,t.length):0,a=new Array(i),o=new Array(r);for(e=0;e<i;++e)a[e]=pt(t[e],n[e]);for(;e<r;++e)o[e]=n[e];return function(t){for(e=0;e<i;++e)o[e]=a[e](t);return o}}function ct(t,n){var e=new Date;return t=+t,n=+n,function(r){return e.setTime(t*(1-r)+n*r),e}}function dt(t,n){return t=+t,n=+n,function(e){return t*(1-e)+n*e}}function ht(t,n){var e,r={},i={};for(e in null!==t&&"object"==typeof t||(t={}),null!==n&&"object"==typeof n||(n={}),n)e in t?r[e]=pt(t[e],n[e]):i[e]=n[e];return function(t){for(e in r)i[e]=r[e](t);return i}}var ft=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,gt=new RegExp(ft.source,"g");function vt(t,n){var e,r,i,a=ft.lastIndex=gt.lastIndex=0,o=-1,l=[],u=[];for(t+="",n+="";(e=ft.exec(t))&&(r=gt.exec(n));)(i=r.index)>a&&(i=n.slice(a,i),l[o]?l[o]+=i:l[++o]=i),(e=e[0])===(r=r[0])?l[o]?l[o]+=r:l[++o]=r:(l[++o]=null,u.push({i:o,x:dt(e,r)})),a=gt.lastIndex;return a<n.length&&(i=n.slice(a),l[o]?l[o]+=i:l[++o]=i),l.length<2?u[0]?function(t){return function(n){return t(n)+""}}(u[0].x):function(t){return function(){return t}}(n):(n=u.length,function(t){for(var e,r=0;r<n;++r)l[(e=u[r]).i]=e.x(t);return l.join("")})}function pt(t,n){var e,r,i=typeof n;return null==n||"boolean"===i?it(n):("number"===i?dt:"string"===i?(e=W(n))?(n=e,lt):vt:n instanceof W?lt:n instanceof Date?ct:(r=n,!ArrayBuffer.isView(r)||r instanceof DataView?Array.isArray(n)?st:"function"!=typeof n.valueOf&&"function"!=typeof n.toString||isNaN(n)?ht:dt:ut))(t,n)}function mt(t,n){return t=+t,n=+n,function(e){return Math.round(t*(1-e)+n*e)}}function yt(t){return+t}var bt=[0,1];function wt(t){return t}function Mt(t,n){return(n-=t=+t)?function(e){return(e-t)/n}:(e=isNaN(n)?NaN:.5,function(){return e});var e}function xt(t,n,e){var r=t[0],i=t[1],a=n[0],o=n[1];return i<r?(r=Mt(i,r),a=e(o,a)):(r=Mt(r,i),a=e(a,o)),function(t){return a(r(t))}}function kt(t,n,e){var r=Math.min(t.length,n.length)-1,i=new Array(r),a=new Array(r),o=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),n=n.slice().reverse());++o<r;)i[o]=Mt(t[o],t[o+1]),a[o]=e(n[o],n[o+1]);return function(n){var e=M(t,n,1,r)-1;return a[e](i[e](n))}}function Nt(t,n){return n.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function At(){var t,n,e,r,i,a,o=bt,l=bt,u=pt,s=wt;function c(){var t=Math.min(o.length,l.length);return s!==wt&&(s=function(t,n){var e;return t>n&&(e=t,t=n,n=e),function(e){return Math.max(t,Math.min(n,e))}}(o[0],o[t-1])),r=t>2?kt:xt,i=a=null,d}function d(n){return isNaN(n=+n)?e:(i||(i=r(o.map(t),l,u)))(t(s(n)))}return d.invert=function(e){return s(n((a||(a=r(l,o.map(t),dt)))(e)))},d.domain=function(t){return arguments.length?(o=Array.from(t,yt),c()):o.slice()},d.range=function(t){return arguments.length?(l=Array.from(t),c()):l.slice()},d.rangeRound=function(t){return l=Array.from(t),u=mt,c()},d.clamp=function(t){return arguments.length?(s=!!t||wt,c()):s!==wt},d.interpolate=function(t){return arguments.length?(u=t,c()):u},d.unknown=function(t){return arguments.length?(e=t,d):e},function(e,r){return t=e,n=r,c()}}function Et(){return At()(wt,wt)}function Tt(t,n){if((e=(t=n?t.toExponential(n-1):t.toExponential()).indexOf("e"))<0)return null;var e,r=t.slice(0,e);return[r.length>1?r[0]+r.slice(2):r,+t.slice(e+1)]}function St(t){return(t=Tt(Math.abs(t)))?t[1]:NaN}var Dt,Rt=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ht(t){if(!(n=Rt.exec(t)))throw new Error("invalid format: "+t);var n;return new jt({fill:n[1],align:n[2],sign:n[3],symbol:n[4],zero:n[5],width:n[6],comma:n[7],precision:n[8]&&n[8].slice(1),trim:n[9],type:n[10]})}function jt(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function Ft(t,n){var e=Tt(t,n);if(!e)return t+"";var r=e[0],i=e[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}Ht.prototype=jt.prototype,jt.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Ut={"%":(t,n)=>(100*t).toFixed(n),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,n)=>t.toExponential(n),f:(t,n)=>t.toFixed(n),g:(t,n)=>t.toPrecision(n),o:t=>Math.round(t).toString(8),p:(t,n)=>Ft(100*t,n),r:Ft,s:function(t,n){var e=Tt(t,n);if(!e)return t+"";var r=e[0],i=e[1],a=i-(Dt=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+Tt(t,Math.max(0,n+a-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Ct(t){return t}var It,qt,$t,_t=Array.prototype.map,Ot=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function zt(t){var n,e,r=void 0===t.grouping||void 0===t.thousands?Ct:(n=_t.call(t.grouping,Number),e=t.thousands+"",function(t,r){for(var i=t.length,a=[],o=0,l=n[0],u=0;i>0&&l>0&&(u+l+1>r&&(l=Math.max(1,r-u)),a.push(t.substring(i-=l,i+l)),!((u+=l+1)>r));)l=n[o=(o+1)%n.length];return a.reverse().join(e)}),i=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",l=void 0===t.numerals?Ct:function(t){return function(n){return n.replace(/[0-9]/g,(function(n){return t[+n]}))}}(_t.call(t.numerals,String)),u=void 0===t.percent?"%":t.percent+"",s=void 0===t.minus?"−":t.minus+"",c=void 0===t.nan?"NaN":t.nan+"";function d(t){var n=(t=Ht(t)).fill,e=t.align,d=t.sign,h=t.symbol,f=t.zero,g=t.width,v=t.comma,p=t.precision,m=t.trim,y=t.type;"n"===y?(v=!0,y="g"):Ut[y]||(void 0===p&&(p=12),m=!0,y="g"),(f||"0"===n&&"="===e)&&(f=!0,n="0",e="=");var b="$"===h?i:"#"===h&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",w="$"===h?a:/[%p]/.test(y)?u:"",M=Ut[y],x=/[defgprs%]/.test(y);function k(t){var i,a,u,h=b,k=w;if("c"===y)k=M(t)+k,t="";else{var N=(t=+t)<0||1/t<0;if(t=isNaN(t)?c:M(Math.abs(t),p),m&&(t=function(t){t:for(var n,e=t.length,r=1,i=-1;r<e;++r)switch(t[r]){case".":i=n=r;break;case"0":0===i&&(i=r),n=r;break;default:if(!+t[r])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(n+1):t}(t)),N&&0==+t&&"+"!==d&&(N=!1),h=(N?"("===d?d:s:"-"===d||"("===d?"":d)+h,k=("s"===y?Ot[8+Dt/3]:"")+k+(N&&"("===d?")":""),x)for(i=-1,a=t.length;++i<a;)if(48>(u=t.charCodeAt(i))||u>57){k=(46===u?o+t.slice(i+1):t.slice(i))+k,t=t.slice(0,i);break}}v&&!f&&(t=r(t,1/0));var A=h.length+t.length+k.length,E=A<g?new Array(g-A+1).join(n):"";switch(v&&f&&(t=r(E+t,E.length?g-k.length:1/0),E=""),e){case"<":t=h+t+k+E;break;case"=":t=h+E+t+k;break;case"^":t=E.slice(0,A=E.length>>1)+h+t+k+E.slice(A);break;default:t=E+h+t+k}return l(t)}return p=void 0===p?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,p)):Math.max(0,Math.min(20,p)),k.toString=function(){return t+""},k}return{format:d,formatPrefix:function(t,n){var e=d(((t=Ht(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(St(n)/3))),i=Math.pow(10,-r),a=Ot[8+r/3];return function(t){return e(i*t)+a}}}}function Lt(t,n,e,r){var i,a=function(t,n,e){var r=Math.abs(n-t)/Math.max(0,e),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),a=r/i;return a>=x?i*=10:a>=k?i*=5:a>=N&&(i*=2),n<t?-i:i}(t,n,e);switch((r=Ht(null==r?",f":r)).type){case"s":var o=Math.max(Math.abs(t),Math.abs(n));return null!=r.precision||isNaN(i=function(t,n){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(St(n)/3)))-St(Math.abs(t)))}(a,o))||(r.precision=i),$t(r,o);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(t,n){return t=Math.abs(t),n=Math.abs(n)-t,Math.max(0,St(n)-St(t))+1}(a,Math.max(Math.abs(t),Math.abs(n))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(t){return Math.max(0,-St(Math.abs(t)))}(a))||(r.precision=i-2*("%"===r.type))}return qt(r)}function Pt(t){var n=t.domain;return t.ticks=function(t){var e=n();return function(t,n,e){var r,i,a,o,l=-1;if(e=+e,(t=+t)==(n=+n)&&e>0)return[t];if((r=n<t)&&(i=t,t=n,n=i),0===(o=A(t,n,e))||!isFinite(o))return[];if(o>0){let e=Math.round(t/o),r=Math.round(n/o);for(e*o<t&&++e,r*o>n&&--r,a=new Array(i=r-e+1);++l<i;)a[l]=(e+l)*o}else{o=-o;let e=Math.round(t*o),r=Math.round(n*o);for(e/o<t&&++e,r/o>n&&--r,a=new Array(i=r-e+1);++l<i;)a[l]=(e+l)/o}return r&&a.reverse(),a}(e[0],e[e.length-1],null==t?10:t)},t.tickFormat=function(t,e){var r=n();return Lt(r[0],r[r.length-1],null==t?10:t,e)},t.nice=function(e){null==e&&(e=10);var r,i,a=n(),o=0,l=a.length-1,u=a[o],s=a[l],c=10;for(s<u&&(i=u,u=s,s=i,i=o,o=l,l=i);c-- >0;){if((i=A(u,s,e))===r)return a[o]=u,a[l]=s,n(a);if(i>0)u=Math.floor(u/i)*i,s=Math.ceil(s/i)*i;else{if(!(i<0))break;u=Math.ceil(u*i)/i,s=Math.floor(s*i)/i}r=i}return t},t}function Vt(){var t=Et();return t.copy=function(){return Nt(t,Vt())},E.apply(t,arguments),Pt(t)}It=zt({thousands:",",grouping:[3],currency:["$",""]}),qt=It.format,$t=It.formatPrefix;var Wt="__",Zt="mergedAnimatedHeatmap",Bt=function(t){var n=new Date(t);return new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes()))};function Gt(r,i,c){var f,m,y,b,w,M,x,k,N,A,E,T,S,D,R,H,j,F,U,C,I,q,$,_=i||{},O=_.debug,z=void 0!==O&&O,L=_.highlightedTime,P=_.highlightedEvent,V=t({id:r.id},r.config);switch(null===(f=r.config)||void 0===f?void 0:f.type){case d.Type.TileCluster:var W=n(r,o.Events),Z=W.dataset,B=W.url;return Z&&B?(V.tilesUrl=B,V):(console.warn("No dataset config for TileCluster generator",r),[]);case d.Type.Track:L&&(V.highlightedTime=L);var G=r.datasets&&(null===(y=null===(m=r.datasets)||void 0===m?void 0:m[0])||void 0===y?void 0:y.type)===o.UserTracks?o.UserTracks:o.Tracks,X=n(r,G).url;if(X&&(null==c?void 0:c[X])){var Y=null==c?void 0:c[X];V.data=Y.data}var J=n(r,o.Events).url;if(J&&(null===(b=null==c?void 0:c[J])||void 0===b?void 0:b.data)){var K=t(t({id:r.id+"__vessel_events",type:d.Type.VesselEvents,data:null==c?void 0:c[J].data,color:null===(w=r.config)||void 0===w?void 0:w.color},V.data&&{track:V.data}),P&&{currentEventId:P.id});return[V,K]}return V;case d.Type.Heatmap:var Q=null===(M=r.datasets)||void 0===M?void 0:M.find((function(t){return t.type===o.Fourwings})),tt=null===(x=null==Q?void 0:Q.endpoints)||void 0===x?void 0:x.find((function(t){return t.id===s.FourwingsTiles})),nt=null===(k=null==Q?void 0:Q.endpoints)||void 0===k?void 0:k.find((function(t){return t.id===s.FourwingsLegend}));return V=t(t({},V),{maxZoom:8,fetchStats:!r.config.steps,datasets:[null==Q?void 0:Q.id],tilesUrl:null==tt?void 0:tt.pathTemplate,statsUrl:null==nt?void 0:nt.pathTemplate,metadata:{color:null===(N=null==r?void 0:r.config)||void 0===N?void 0:N.color,group:h.OutlinePolygonsBackground,interactive:!0,legend:{label:null==Q?void 0:Q.name,unit:null==Q?void 0:Q.unit}}});case d.Type.HeatmapAnimated:var et=r.category===u.Environment,rt={},it=null===(A=r.datasets)||void 0===A?void 0:A.find((function(t){return t.type===o.Fourwings}));if(et){var at=r.config.datasets||(null===(E=r.datasetsConfig)||void 0===E?void 0:E.map((function(t){return t.datasetId})));rt={sublayers:[{id:V.id,colorRamp:null===(T=r.config)||void 0===T?void 0:T.colorRamp,colorRampWhiteEnd:!1,visible:null===(D=null===(S=r.config)||void 0===S?void 0:S.visible)||void 0===D||D,breaks:null===(R=r.config)||void 0===R?void 0:R.breaks,datasets:at,legend:{label:null==it?void 0:it.name,unit:null==it?void 0:it.unit,color:null==r?void 0:r.config.color}}],maxZoom:8,mode:d.HeatmapAnimatedMode.Single,aggregationOperation:v.Avg,interactive:!0,breaksMultiplier:(null===(H=r.config)||void 0===H?void 0:H.breaksMultiplier)||p,interval:(null===(j=r.config)||void 0===j?void 0:j.interval)||"month"}}var ot=null===(F=(V=t(t({},V),rt)).sublayers)||void 0===F?void 0:F.some((function(t){return!0===t.visible})),lt=(I=r.datasets,q=null==I?void 0:I.flatMap((function(t){return(null==t?void 0:t.startDate)?new Date(t.startDate).getTime():[]})),$=null==I?void 0:I.flatMap((function(t){return(null==t?void 0:t.endDate)?new Date(t.endDate).getTime():[]})),{extentStart:(null==q?void 0:q.length)?Bt(Math.min.apply(Math,q)).toISOString():void 0,extentEnd:(null==$?void 0:$.length)?Bt(Math.max.apply(Math,$)).toISOString():void 0}),ut=lt.extentStart,st=lt.extentEnd;return V=t(t(t(t({},V),{visible:ot,debug:z,debugLabels:z}),ut&&{datasetsStart:ut}),st&&{datasetsEnd:st});case d.Type.Context:case d.Type.UserContext:if(Array.isArray(r.config.layers))return(null===(U=r.config.layers)||void 0===U?void 0:U.flatMap((function(t){var e=t.id,i=t.dataset,o=n(r,i),l=o.dataset,u=o.url;return u&&(null==l?void 0:l.status)===a.Done?{id:e,tilesUrl:u,attribution:null==l?void 0:l.source}:[]}))).map((function(n){var e=n.id,i=n.tilesUrl,a=n.attribution;return t(t({},V),{id:r.id+"__"+e,layer:e,attribution:a,tilesUrl:i})}));V.id=r.config.layers?r.id+"__"+r.config.layers:r.id,V.layer=r.config.layers;var ct=n(r,o.Context),dt=(it=ct.dataset,ct.url);if((null==it?void 0:it.status)!==a.Done)return[];if(dt&&(V.tilesUrl=dt),(null==it?void 0:it.source)&&(V.attribution=it.source),it.category===l.Environment){var ht=(null===(C=it.configuration)||void 0===C?void 0:C.propertyToIncludeRange)||{},ft=ht.min,gt=ht.max,vt=Vt().range([ft,gt]).domain([0,1]),pt=g,mt=e([],Array(pt)).map((function(t,n){var e;return parseFloat(null===(e=n/(pt-1))||void 0===e?void 0:e.toFixed(2))})).map((function(t){var n;return parseFloat(null===(n=vt(t))||void 0===n?void 0:n.toFixed(3))}));V.steps=mt}return V.tilesUrl?V:(console.warn("Missing tiles url for dataview",r),[]);default:return V}}function Xt(n,e,r){var a=(e||{}).heatmapAnimatedMode,o=void 0===a?d.HeatmapAnimatedMode.Compare:a,l=[],s=n.filter((function(t){var n,e=(t.category===u.Fishing||t.category===u.Presence)&&(null===(n=t.config)||void 0===n?void 0:n.type)===d.Type.HeatmapAnimated;return e&&l.push(t),!e}));if(l.length){var c=l.flatMap((function(t){var n,e,r,a=t.config,o=t.datasetsConfig;if(!a||!o||!o.length)return[];var l=a.datasets||o.map((function(t){return t.datasetId})),u=i(null===(n=t.datasets)||void 0===n?void 0:n.map((function(t){return t.unit})));if(1!==u.length)throw new Error("Shouldnt have distinct units for the same heatmap layer");var s=i(null===(e=t.datasets)||void 0===e?void 0:e.map((function(t){var n;return(null===(n=t.configuration)||void 0===n?void 0:n.type)||"fishing-effort"})));if(1!==s.length)throw new Error("Shouldnt have distinct dataset config types for the same heatmap layer: "+s.toString());return{id:t.id,datasets:l,colorRamp:a.colorRamp,colorRampWhiteEnd:!0,filter:a.filter,visible:a.visible,legend:{label:t.name,unit:u[0],color:null===(r=null==t?void 0:t.config)||void 0===r?void 0:r.color},interactionType:s[0]}})),h=function(t){var n=f.find((function(n){return t.every((function(t){var e;return(null===(e=t.configuration)||void 0===e?void 0:e.resolution)===n}))}));return n&&f.slice(f.findIndex((function(t){return t===n})))}(l.flatMap((function(t){return t.datasets||[]})).filter((function(t){var n;return null===(n=null==t?void 0:t.configuration)||void 0===n?void 0:n.resolution}))),g={id:e.mergedActivityGeneratorId||"mergedAnimatedHeatmap",config:t({type:d.Type.HeatmapAnimated,sublayers:c,mode:o},h&&{interval:h})};s.push(g)}return s.flatMap((function(t){return Gt(t,e,r)}))}export{Zt as MERGED_ACTIVITY_ANIMATED_HEATMAP_GENERATOR_ID,Wt as MULTILAYER_SEPARATOR,Xt as getDataviewsGeneratorConfigs,Gt as getGeneratorConfig}; | ||
//# sourceMappingURL=index.js.map |
import { Resource, ApiEvent } from '@globalfishingwatch/api-types'; | ||
import { GeneratorDataviewConfig, Generators } from '@globalfishingwatch/layer-composer'; | ||
import { Generators } from '@globalfishingwatch/layer-composer'; | ||
import { UrlDataviewInstance } from './resolve-dataviews'; | ||
@@ -21,3 +21,3 @@ export declare const MULTILAYER_SEPARATOR = "__"; | ||
declare type DataviewsGeneratorResource = Record<string, Resource>; | ||
export declare function getGeneratorConfig(dataview: UrlDataviewInstance, params?: DataviewsGeneratorConfigsParams, resources?: DataviewsGeneratorResource): any[] | GeneratorDataviewConfig<Generators.Type>; | ||
export declare function getGeneratorConfig(dataview: UrlDataviewInstance, params?: DataviewsGeneratorConfigsParams, resources?: DataviewsGeneratorResource): any; | ||
/** | ||
@@ -24,0 +24,0 @@ * Generates generator configs to be consumed by LayerComposer, based on the list of dataviews provided, |
@@ -15,4 +15,4 @@ import { Dataset, DatasetTypes, Dataview, DataviewDatasetConfig, DataviewInstance } from '@globalfishingwatch/api-types'; | ||
export declare const resolveDataviewDatasetResource: (dataview: UrlDataviewInstance, typeOrId: DatasetTypes | DatasetTypes[] | string) => { | ||
dataset?: Dataset | undefined; | ||
datasetConfig?: DataviewDatasetConfig | undefined; | ||
dataset?: any; | ||
datasetConfig?: any; | ||
url?: string | undefined; | ||
@@ -26,3 +26,3 @@ }; | ||
*/ | ||
export default function resolveDataviews(dataviewInstances: UrlDataviewInstance[], dataviews: Dataview[], datasets: Dataset[]): UrlDataviewInstance<GeneratorType>[]; | ||
export default function resolveDataviews(dataviewInstances: UrlDataviewInstance[], dataviews: Dataview[], datasets: Dataset[]): UrlDataviewInstance<any>[]; | ||
//# sourceMappingURL=resolve-dataviews.d.ts.map |
@@ -1,4 +0,3 @@ | ||
import { Dataset, DataviewDatasetConfig } from '@globalfishingwatch/api-types'; | ||
declare const resolveEndpoint: (dataset: Dataset, datasetConfig: DataviewDatasetConfig) => string | null; | ||
declare const resolveEndpoint: (dataset: any, datasetConfig: any) => string | null; | ||
export default resolveEndpoint; | ||
//# sourceMappingURL=resolve-endpoint.d.ts.map |
{ | ||
"name": "@globalfishingwatch/dataviews-client", | ||
"version": "11.1.0", | ||
"version": "11.2.0", | ||
"description": "", | ||
@@ -36,3 +36,3 @@ "author": "satellitestudio <contact@satellitestud.io>", | ||
"@globalfishingwatch/api-types": "^4.4.0", | ||
"@globalfishingwatch/layer-composer": "^8.1.0", | ||
"@globalfishingwatch/layer-composer": "^8.2.0", | ||
"@rollup/plugin-commonjs": "^16.0.0", | ||
@@ -60,3 +60,3 @@ "@rollup/plugin-json": "^4.1.0", | ||
}, | ||
"gitHead": "5821a43e288cdc2c756d5bd5a4a676ddde236b00" | ||
"gitHead": "23b9e4af14db33f8555753aab77ed128be1ef3bd" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 4 instances in 1 package
1
3
311649
345