"use strict";(self.webpackChunkalvanon_analytics_platform_frontend=self.webpackChunkalvanon_analytics_platform_frontend||[]).push([[1601],{91683(r,t,e){function o(r,t){return function(r){if(Array.isArray(r))return r}(r)||function(r,t){var e=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=e){var o,n,a,i,l=[],s=!0,f=!1;try{if(a=(e=e.call(r)).next,0===t){if(Object(e)!==e)return;s=!1}else for(;!(s=(o=a.call(e)).done)&&(l.push(o.value),l.length!==t);s=!0);}catch(r){f=!0,n=r}finally{try{if(!s&&null!=e.return&&(i=e.return(),Object(i)!==i))return}finally{if(f)throw n}}return l}}(r,t)||a(r,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(r){return function(r){if(Array.isArray(r))return i(r)}(r)||function(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r)}(r)||a(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(r,t){if(r){if("string"==typeof r)return i(r,t);var e=Object.prototype.toString.call(r).slice(8,-1);return"Object"===e&&r.constructor&&(e=r.constructor.name),"Map"===e||"Set"===e?Array.from(r):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?i(r,t):void 0}}function i(r,t){(null==t||t>r.length)&&(t=r.length);for(var e=0,o=new Array(t);e 1.0 + delta) {\n\t\tdiscard;\n\t}\n\n\talpha -= smoothstep(1.0 - delta, 1.0 + delta, radius);\n\n\tfloat borderRadius = fragBorderRadius;\n\tfloat ratio = smoothstep(borderRadius - delta, borderRadius + delta, radius);\n\tvec4 color = mix(fragColor, fragBorderColor, ratio);\n\tcolor.a *= alpha * opacity;\n\tgl_FragColor = color;\n}\n"]),s.vert=d(["precision highp float;\n#define GLSLIFY 1\n\nattribute float x, y, xFract, yFract;\nattribute float size, borderSize;\nattribute vec4 colorId, borderColorId;\nattribute float isActive;\n\n// `invariant` effectively turns off optimizations for the position.\n// We need this because -fast-math on M1 Macs is re-ordering\n// floating point operations in a way that causes floating point\n// precision limits to put points in the wrong locations.\ninvariant gl_Position;\n\nuniform bool constPointSize;\nuniform float pixelRatio;\nuniform vec2 paletteSize, scale, scaleFract, translate, translateFract;\nuniform sampler2D paletteTexture;\n\nconst float maxSize = 100.;\n\nvarying vec4 fragColor, fragBorderColor;\nvarying float fragBorderRadius, fragWidth;\n\nfloat pointSizeScale = (constPointSize) ? 2. : pixelRatio;\n\nbool isDirect = (paletteSize.x < 1.);\n\nvec4 getColor(vec4 id) {\n return isDirect ? id / 255. : texture2D(paletteTexture,\n vec2(\n (id.x + .5) / paletteSize.x,\n (id.y + .5) / paletteSize.y\n )\n );\n}\n\nvoid main() {\n // ignore inactive points\n if (isActive == 0.) return;\n\n vec2 position = vec2(x, y);\n vec2 positionFract = vec2(xFract, yFract);\n\n vec4 color = getColor(colorId);\n vec4 borderColor = getColor(borderColorId);\n\n float size = size * maxSize / 255.;\n float borderSize = borderSize * maxSize / 255.;\n\n gl_PointSize = (size + borderSize) * pointSizeScale;\n\n vec2 pos = (position + translate) * scale\n + (positionFract + translateFract) * scale\n + (position + translate) * scaleFract\n + (positionFract + translateFract) * scaleFract;\n\n gl_Position = vec4(pos * 2. - 1., 0., 1.);\n\n fragBorderRadius = 1. - 2. * borderSize / (size + borderSize);\n fragColor = color;\n fragBorderColor = borderColor.a == 0. || borderSize == 0. ? vec4(color.rgb, 0.) : borderColor;\n fragWidth = 1. / gl_PointSize;\n}\n"]),y&&(s.frag=s.frag.replace("smoothstep","smoothStep"),l.frag=l.frag.replace("smoothstep","smoothStep")),this.drawCircle=r(s)}C.defaults={color:"black",borderColor:"transparent",borderSize:0,size:12,opacity:1,marker:void 0,viewport:null,range:null,pixelSize:null,count:0,offset:0,bounds:null,positions:[],snap:1e4},C.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this},C.prototype.draw=function(){for(var r=this,t=arguments.length,e=new Array(t),o=0;oo)?t.tree=u(r,{bounds:c}):o&&o.length&&(t.tree=o),t.tree){var d={primitive:"points",usage:"static",data:t.tree,type:"uint32"};t.elements?t.elements(d):t.elements=i.elements(d)}var p=v.float32(r);return n({data:p,usage:"dynamic"}),a({data:v.fract32(r,p),usage:"dynamic"}),l({data:new Uint8Array(f),type:"uint8",usage:"stream"}),r}},{marker:function(t,e,o){var n=e.activation;if(n.forEach(function(r){return r&&r.destroy&&r.destroy()}),n.length=0,t&&"number"!=typeof t[0]){for(var a=[],l=0,s=Math.min(t.length,e.count);l=0)return a;if(r instanceof Uint8Array||r instanceof Uint8ClampedArray)t=r;else{t=new Uint8Array(r.length);for(var i=0,l=r.length;i4*o&&(this.tooManyColors=!0),this.updatePalette(e),1===n.length?n[0]:n},C.prototype.updatePalette=function(r){if(!this.tooManyColors){var t=this.maxColors,e=this.paletteTexture,o=Math.ceil(.25*r.length/t);if(o>1)for(var n=.25*(r=r.slice()).length%t;n