(window.webpackJsonp=window.webpackJsonp||[]).push([[191],{945:function(e,n,t){"use strict";t.r(n),t.d(n,"voronoi",(function(){return i}));var r=t(10),o=t(1),a=t(1351);function i(e){r.g.call(this,null,e)}i.Definition={type:"Voronoi",metadata:{modifies:!0},params:[{name:"x",type:"field",required:!0},{name:"y",type:"field",required:!0},{name:"size",type:"number",array:!0,length:2},{name:"extent",type:"array",array:!0,length:2,default:[[-1e5,-1e5],[1e5,1e5]],content:{type:"number",array:!0,length:2}},{name:"as",type:"string",default:"path"}]};const l=[-1e5,-1e5,1e5,1e5];function s(e){const n=e[0][0],t=e[0][1];let r=e.length-1;for(;e[r][0]===n&&e[r][1]===t;--r);return"M"+e.slice(0,r+1).join("L")+"Z"}Object(o.z)(i,r.g,{transform(e,n){const t=e.as||"path",r=n.source;if(!r||!r.length)return n;let o=e.size;o=o?[0,0,o[0],o[1]]:(o=e.extent)?[o[0][0],o[0][1],o[1][0],o[1][1]]:l;const i=this.value=a.a.from(r,e.x,e.y).voronoi(o);for(let e=0,n=r.length;e<n;++e){const n=i.cellPolygon(e);r[e][t]=n?s(n):null}return n.reflow(e.modified()).modifies(t)}})}}]);