team-10/venv/Lib/site-packages/streamlit/static/vendor/bokeh/bokeh-gl-2.4.3.min.js

66 lines
187 KiB
JavaScript
Raw Normal View History

2025-08-02 02:00:33 +02:00
/*!
* Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* Neither the name of Anaconda nor the names of any contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
(function(root, factory) {
factory(root["Bokeh"], "2.4.3");
})(this, function(Bokeh, version) {
let define;
return (function(modules, entry, aliases, externals) {
const bokeh = typeof Bokeh !== "undefined" && (version != null ? Bokeh[version] : Bokeh);
if (bokeh != null) {
return bokeh.register_plugin(modules, entry, aliases);
} else {
throw new Error("Cannot find Bokeh " + version + ". You have to load it prior to loading plugins.");
}
})
({
409: function _(n,c,f,i,o){i(),n(410)},
410: function _(t,_,r,e,o){e();const a=t(1);o("get_regl",t(411).get_regl),(0,a.__exportStar)(t(419),r),(0,a.__exportStar)(t(423),r),(0,a.__exportStar)(t(425),r),(0,a.__exportStar)(t(426),r),(0,a.__exportStar)(t(427),r),(0,a.__exportStar)(t(428),r),(0,a.__exportStar)(t(429),r),(0,a.__exportStar)(t(424),r)},
411: function _(t,i,e,_,a){_();const r=t(1),o=(0,r.__importDefault)(t(412)),n=t(413),s=(0,r.__importDefault)(t(415)),l=(0,r.__importDefault)(t(416)),p=(0,r.__importDefault)(t(417)),h=(0,r.__importDefault)(t(418));let c;e.get_regl=function(t){return null==c&&(c=new u(t)),c};class u{constructor(t){try{this._regl=(0,o.default)({gl:t,extensions:["ANGLE_instanced_arrays","EXT_blend_minmax"]}),this._regl_available=!0,this._line_geometry=this._regl.buffer({usage:"static",type:"float",data:[[-2,0],[-1,-1],[1,-1],[2,0],[1,1],[-1,1]]}),this._line_triangles=this._regl.elements({usage:"static",primitive:"triangles",data:[[0,1,5],[1,2,5],[5,2,4],[2,3,4]]})}catch(t){this._regl_available=!1}}buffer(t){return this._regl.buffer(t)}clear(t,i){this._viewport={x:0,y:0,width:t,height:i},this._regl.clear({color:[0,0,0,0]})}get has_webgl(){return this._regl_available}get scissor(){return this._scissor}set_scissor(t,i,e,_){this._scissor={x:t,y:i,width:e,height:_}}get viewport(){return this._viewport}dashed_line(){return null==this._dashed_line&&(this._dashed_line=function(t,i,e){const _={vert:`#define DASHED\n\n${s.default}`,frag:`#define DASHED\n\n${l.default}`,attributes:{a_position:{buffer:i,divisor:0},a_point_prev:(t,i)=>i.points.to_attribute_config(),a_point_start:(t,i)=>i.points.to_attribute_config(2*Float32Array.BYTES_PER_ELEMENT),a_point_end:(t,i)=>i.points.to_attribute_config(4*Float32Array.BYTES_PER_ELEMENT),a_point_next:(t,i)=>i.points.to_attribute_config(6*Float32Array.BYTES_PER_ELEMENT),a_show_prev:(t,i)=>i.show.to_attribute_config(),a_show_curr:(t,i)=>i.show.to_attribute_config(Uint8Array.BYTES_PER_ELEMENT),a_show_next:(t,i)=>i.show.to_attribute_config(2*Uint8Array.BYTES_PER_ELEMENT),a_length_so_far:(t,i)=>i.length_so_far.to_attribute_config()},uniforms:{u_canvas_size:t.prop("canvas_size"),u_pixel_ratio:t.prop("pixel_ratio"),u_antialias:t.prop("antialias"),u_line_color:t.prop("line_color"),u_linewidth:t.prop("linewidth"),u_miter_limit:t.prop("miter_limit"),u_line_join:t.prop("line_join"),u_line_cap:t.prop("line_cap"),u_dash_tex:t.prop("dash_tex"),u_dash_tex_info:t.prop("dash_tex_info"),u_dash_scale:t.prop("dash_scale"),u_dash_offset:t.prop("dash_offset")},elements:e,instances:t.prop("nsegments"),blend:{enable:!0,equation:"max",func:{srcRGB:1,srcAlpha:1,dstRGB:1,dstAlpha:1}},depth:{enable:!1},scissor:{enable:!0,box:t.prop("scissor")},viewport:t.prop("viewport")};return t(_)}(this._regl,this._line_geometry,this._line_triangles)),this._dashed_line}get_dash(t){return null==this._dash_cache&&(this._dash_cache=new n.DashCache(this._regl)),this._dash_cache.get(t)}marker_no_hatch(t){null==this._marker_no_hatch_map&&(this._marker_no_hatch_map=new Map);let i=this._marker_no_hatch_map.get(t);return null==i&&(i=function(t,i){const e={vert:p.default,frag:`#define USE_${i.toUpperCase()}\n${h.default}`,attributes:{a_position:{buffer:t.buffer([[-.5,-.5],[-.5,.5],[.5,.5],[.5,-.5]]),divisor:0},a_center:(t,i)=>i.center.to_attribute_config(),a_width:(t,i)=>i.width.to_attribute_config(),a_height:(t,i)=>i.height.to_attribute_config(),a_angle:(t,i)=>i.angle.to_attribute_config(),a_linewidth:(t,i)=>i.linewidth.to_attribute_config(),a_line_color:(t,i)=>i.line_color.to_attribute_config(),a_fill_color:(t,i)=>i.fill_color.to_attribute_config(),a_line_cap:(t,i)=>i.line_cap.to_attribute_config(),a_line_join:(t,i)=>i.line_join.to_attribute_config(),a_show:(t,i)=>i.show.to_attribute_config()},uniforms:{u_canvas_size:t.prop("canvas_size"),u_pixel_ratio:t.prop("pixel_ratio"),u_antialias:t.prop("antialias"),u_size_hint:t.prop("size_hint")},count:4,primitive:"triangle fan",instances:t.prop("nmarkers"),blend:{enable:!0,func:{srcRGB:"one",srcAlpha:"one",dstRGB:"one minus src alpha",dstAlpha:"one minus src alpha"}},depth:{enable:!1},scissor:{enable:!0,box:t.prop("scissor")},viewport:t.prop("viewport")};return t(e)}(this._regl,t),this._marker_no_hatch_map.set(t,i)),i}marker_hatch(t){null==this._marker_hatch_map&&(this._marker_hatch_map=new Map);let i=this._marker_hatch_map.get(t);return null==i&&(i=function(t,i){const e={vert:`#define HATCH\n${p.default}`,frag:`#define
412: function _(e,t,r,n,a){var i,o;i=this,o=function(){"use strict";var e=function(e){return e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Uint32Array||e instanceof Int8Array||e instanceof Int16Array||e instanceof Int32Array||e instanceof Float32Array||e instanceof Float64Array||e instanceof Uint8ClampedArray},t=function(e,t){for(var r=Object.keys(t),n=0;n<r.length;++n)e[r[n]]=t[r[n]];return e},r="\n";function n(e){var t=new Error("(regl) "+e);throw console.error(t),t}function a(e,t){e||n(t)}function i(e){return e?": "+e:""}function o(e,t){switch(t){case"number":return"number"==typeof e;case"object":return"object"==typeof e;case"string":return"string"==typeof e;case"boolean":return"boolean"==typeof e;case"function":return"function"==typeof e;case"undefined":return void 0===e;case"symbol":return"symbol"==typeof e}}function f(e,t,r){t.indexOf(e)<0&&n("invalid value"+i(r)+". must be one of: "+t)}var u=["gl","canvas","container","attributes","pixelRatio","extensions","optionalExtensions","profile","onDone"];function s(e,t){for(e+="";e.length<t;)e=" "+e;return e}function c(){this.name="unknown",this.lines=[],this.index={},this.hasErrors=!1}function l(e,t){this.number=e,this.line=t,this.errors=[]}function d(e,t,r){this.file=e,this.line=t,this.message=r}function m(){var e=new Error,t=(e.stack||e).toString(),r=/compileProcedure.*\n\s*at.*\((.*)\)/.exec(t);if(r)return r[1];var n=/compileProcedure.*\n\s*at\s+(.*)(\n|$)/.exec(t);return n?n[1]:"unknown"}function p(){var e=new Error,t=(e.stack||e).toString(),r=/at REGLCommand.*\n\s+at.*\((.*)\)/.exec(t);if(r)return r[1];var n=/at REGLCommand.*\n\s+at\s+(.*)\n/.exec(t);return n?n[1]:"unknown"}function h(e,t){var r,n=e.split("\n"),a=1,i=0,o={unknown:new c,0:new c};o.unknown.name=o[0].name=t||m(),o.unknown.lines.push(new l(0,""));for(var f=0;f<n.length;++f){var u=n[f],s=/^\s*#\s*(\w+)\s+(.+)\s*$/.exec(u);if(s)switch(s[1]){case"line":var d=/(\d+)(\s+\d+)?/.exec(s[2]);d&&(a=0|d[1],d[2]&&((i=0|d[2])in o||(o[i]=new c)));break;case"define":var p=/SHADER_NAME(_B64)?\s+(.*)$/.exec(s[2]);p&&(o[i].name=p[1]?(r=p[2],"undefined"!=typeof atob?atob(r):"base64:"+r):p[2])}o[i].lines.push(new l(a++,u))}return Object.keys(o).forEach((function(e){var t=o[e];t.lines.forEach((function(e){t.index[e.number]=e}))})),o}function b(e){e._commandRef=m()}function v(e,t){var r=p();n(e+" in command "+(t||m())+("unknown"===r?"":" called from "+r))}function g(e,t,r,n){o(e,t)||v("invalid parameter type"+i(r)+". expected "+t+", got "+typeof e,n||m())}var y=33071,x={};function w(e,t){return 32820===e||32819===e||33635===e?2:34042===e?4:x[e]*t}function A(e){return!(e&e-1||!e)}x[5120]=x[5121]=1,x[5122]=x[5123]=x[36193]=x[33635]=x[32819]=x[32820]=2,x[5124]=x[5125]=x[5126]=x[34042]=4;var _=t(a,{optional:function(e){e()},raise:n,commandRaise:v,command:function(e,t,r){e||v(t,r||m())},parameter:function(e,t,r){e in t||n("unknown parameter ("+e+")"+i(r)+". possible values: "+Object.keys(t).join())},commandParameter:function(e,t,r,n){e in t||v("unknown parameter ("+e+")"+i(r)+". possible values: "+Object.keys(t).join(),n||m())},constructor:function(e){Object.keys(e).forEach((function(e){u.indexOf(e)<0&&n('invalid regl constructor argument "'+e+'". must be one of '+u)}))},type:function(e,t,r){o(e,t)||n("invalid parameter type"+i(r)+". expected "+t+", got "+typeof e)},commandType:g,isTypedArray:function(t,r){e(t)||n("invalid parameter type"+i(r)+". must be a typed array")},nni:function(e,t){e>=0&&(0|e)===e||n("invalid parameter type, ("+e+")"+i(t)+". must be a nonnegative integer")},oneOf:f,shaderError:function(e,t,n,i,o){if(!e.getShaderParameter(t,e.COMPILE_STATUS)){var f=e.getShaderInfoLog(t),u=i===e.FRAGMENT_SHADER?"fragment":"vertex";g(n,"string",u+" shader source must be a string",o);var c=h(n,o),l=function(e){var t=[];return e.split("\n").forEach((function(e){if(!(e.length<5)){var r=/^ERROR:\s+(\d+):(\d+):\s*(.*)$/.exec(e);r?t.push(new d(0|r[1],0|r[2],r[3].trim())):e.length>0&&t.push(new d("unknown",0,e))}})),t}(f);!function(e,t){t.forEach((function(t){var r=e[t.file];if(r){var n=r.index[t.line];if(n)return
413: function _(t,e,a,s,r){s();const n=t(414),_=t(9),o=t(12);class c{constructor(t){this._regl=t,this._map=new Map}_create_texture(t){const e=t.length;let a=0;const s=[];let r=0,_=0;for(let n=0;n<e;n++)a+=t[n],s.push(t[n]+t[(n+1)%e]),n%2==0?_=Math.max(_,t[n]):r=Math.min(r,-t[n]);r*=.5,_*=.5;const o=(0,n.gcd)(s),c=[0];for(let a=0;a<e;a++)c.push(c[a]+t[a]);const h=2*a/o,i=(0,n.is_pow_2)(h),l=i?h:128,g=.5*o*h/l;let p;if(i){if(p=.5*t[0],g<p){p-=Math.floor(p/g)*g}}else p=0;const u=p-.5*g,m=new Uint8Array(l);let f=0;for(let e=0;e<l;e++){const a=p+e*g;a>c[f+1]&&f++;const s=t[f],n=c[f]+.5*s;let o=.5*s-Math.abs(a-n);f%2==1&&(o=-o),m[e]=Math.round(255*(o-r)/(_-r))}return[[a,u,r,_],this._regl.texture({shape:[l,1,1],data:m,wrapS:"repeat",format:"alpha",type:"uint8",mag:"linear",min:"linear"})]}_get_key(t){return t.join(",")}_get_or_create(t){const e=this._get_key(t);let a=this._map.get(e);if(null==a){const s=(0,n.gcd)(t);if(s>1){t=(0,o.map)(t,(t=>t/s)),a=this._get_or_create(t);const[r,n,_]=a;a=[r,n,s],this._map.set(e,a)}else{const[r,n]=this._create_texture(t);a=[r,n,s],this._map.set(e,a)}}return a}get(t){return t.length%2==1&&(t=(0,_.concat)([t,t])),this._get_or_create(t)}}a.DashCache=c,c.__name__="DashCache"},
414: function _(n,t,e,r,o){function u(n,t){let e,r;n>t?(e=n,r=t):(e=t,r=n);let o=e%r;for(;0!=o;)e=r,r=o,o=e%r;return r}r(),e.gcd=function(n){let t=n[0];for(let e=1;e<n.length;e++)t=u(t,n[e]);return t},e.is_pow_2=function(n){return!(n&n-1||!n)}},
415: function _(n,t,e,_,i){_();e.default="\nprecision mediump float;\n\nconst int butt_cap = 0;\nconst int round_cap = 1;\nconst int square_cap = 2;\n\nconst int miter_join = 0;\nconst int round_join = 1;\nconst int bevel_join = 2;\n\nattribute vec2 a_position;\nattribute vec2 a_point_prev;\nattribute vec2 a_point_start;\nattribute vec2 a_point_end;\nattribute vec2 a_point_next;\nattribute float a_show_prev;\nattribute float a_show_curr;\nattribute float a_show_next;\n#ifdef DASHED\nattribute float a_length_so_far;\n#endif\n\nuniform float u_pixel_ratio;\nuniform vec2 u_canvas_size;\nuniform float u_linewidth;\nuniform float u_antialias;\nuniform float u_line_join;\nuniform float u_line_cap;\nuniform float u_miter_limit;\n\nvarying float v_segment_length;\nvarying vec2 v_coords;\nvarying float v_flags; // Booleans for start/end caps and miters too long.\nvarying float v_cos_theta_turn_right_start; // Sign gives turn_right, abs gives\nvarying float v_cos_theta_turn_right_end; // cos(theta).\n#ifdef DASHED\nvarying float v_length_so_far;\n#endif\n\nfloat cross_z(in vec2 v0, in vec2 v1)\n{\n return v0.x*v1.y - v0.y*v1.x;\n}\n\nvec2 right_vector(in vec2 v)\n{\n return vec2(v.y, -v.x);\n}\n\nvec2 line_intersection(in vec2 point0, in vec2 dir0,\n in vec2 point1, in vec2 dir1)\n{\n // Line-line intersection: point0 + lambda0 dir0 = point1 + lambda1 dir1.\n // Not checking if lines are parallel!\n float lambda0 = cross_z(point1 - point0, dir1) / cross_z(dir0, dir1);\n return point0 + lambda0*dir0;\n}\n\nfloat sign_no_zero(in float x)\n{\n return x >= 0.0 ? 1.0 : -1.0;\n}\n\nvoid main()\n{\n if (a_show_curr < 0.5) {\n // Line segment has non-finite value at one or both ends, do not render.\n gl_Position = vec4(-2.0, -2.0, 0.0, 1.0);\n return;\n }\n\n const float min_miter_factor_round_join_mesh = sqrt(2.0);\n\n int join_type = int(u_line_join + 0.5);\n int cap_type = int(u_line_cap + 0.5);\n float halfwidth = 0.5*(u_linewidth + u_antialias);\n vec2 segment_along = normalize(a_point_end - a_point_start); // unit vector.\n v_segment_length = length(a_point_end - a_point_start);\n vec2 segment_right = right_vector(segment_along); // unit vector.\n vec2 xy;\n\n bool miter_too_large_start = false;\n bool miter_too_large_end = false;\n\n v_coords.y = a_position.y*halfwidth; // Overwritten later for end points.\n\n bool has_start_cap = a_show_prev < 0.5;\n bool has_end_cap = a_show_next < 0.5;\n\n vec2 point_normal_start;\n float cos_theta_start;\n float turn_right_start;\n if (has_start_cap)\n point_normal_start = segment_right;\n else {\n vec2 prev_right = right_vector(normalize(a_point_start - a_point_prev));\n point_normal_start = normalize(segment_right + prev_right);\n cos_theta_start = dot(segment_right, point_normal_start); // Always +ve\n turn_right_start = sign_no_zero(dot(segment_right, a_point_prev - a_point_start));\n }\n\n vec2 point_normal_end;\n float cos_theta_end;\n float turn_right_end;\n if (has_end_cap)\n point_normal_end = segment_right;\n else {\n vec2 next_right = right_vector(normalize(a_point_next - a_point_end));\n point_normal_end = normalize(segment_right + next_right);\n cos_theta_end = dot(segment_right, point_normal_end); // Always +ve\n turn_right_end = sign_no_zero(dot(segment_right, a_point_next - a_point_end));\n }\n\n float miter_factor_start = 1.0 / dot(segment_right, point_normal_start);\n float miter_factor_end = 1.0 / dot(segment_right, point_normal_end);\n if (join_type == miter_join) {\n // If miter too large, use bevel join instead.\n miter_too_large_start = (miter_factor_start > u_miter_limit);\n miter_too_large_end = (miter_factor_end > u_miter_limit);\n }\n\n float sign_at_start = -sign(a_position.x); // +ve at segment start, -ve end.\n vec2 point = sign_at_start > 0.0 ? a_point_start : a_point_end;\n vec2 adjacent_point =
416: function _(n,t,a,i,e){i();a.default="\nprecision mediump float;\n\nconst int butt_cap = 0;\nconst int round_cap = 1;\nconst int square_cap = 2;\n\nconst int miter_join = 0;\nconst int round_join = 1;\nconst int bevel_join = 2;\n\nuniform float u_linewidth;\nuniform float u_antialias;\nuniform float u_line_join;\nuniform float u_line_cap;\nuniform vec4 u_line_color;\n#ifdef DASHED\nuniform sampler2D u_dash_tex;\nuniform vec4 u_dash_tex_info;\nuniform float u_dash_scale;\nuniform float u_dash_offset;\n#endif\n\nvarying float v_segment_length;\nvarying vec2 v_coords;\nvarying float v_flags;\nvarying float v_cos_theta_turn_right_start;\nvarying float v_cos_theta_turn_right_end;\n#ifdef DASHED\nvarying float v_length_so_far;\n#endif\n\nfloat cross_z(in vec2 v0, in vec2 v1)\n{\n return v0.x*v1.y - v0.y*v1.x;\n}\n\nfloat point_line_side(in vec2 point, in vec2 start, in vec2 end)\n{\n // +ve if point to right of line.\n // Alternatively could do dot product with right_vector.\n return cross_z(point - start, end - start);\n}\n\nfloat point_line_distance(in vec2 point, in vec2 start, in vec2 end)\n{\n return point_line_side(point, start, end) / distance(start, end);\n}\n\nvec2 right_vector(in vec2 v)\n{\n return vec2(v.y, -v.x);\n}\n\nfloat bevel_join_distance(in float sign_start, in float halfwidth)\n{\n float cos_theta_turn_right = sign_start > 0.0 ? v_cos_theta_turn_right_start\n : v_cos_theta_turn_right_end;\n float cos_theta = abs(cos_theta_turn_right);\n float turn_right = sign(cos_theta_turn_right);\n float distance_along = sign_start > 0.0 ? 0.0 : v_segment_length;\n\n // In v_coords reference frame (x is along segment, y across).\n vec2 line_start = vec2(distance_along, halfwidth*turn_right);\n float sin_alpha = cos_theta;\n float cos_alpha = sqrt(1.0 - sin_alpha*sin_alpha);\n vec2 line_along = vec2(-sign_start*turn_right*sin_alpha, -cos_alpha);\n\n return halfwidth + sign_start*point_line_distance(\n v_coords, line_start, line_start+line_along);\n}\n\nfloat cap(in int cap_type, in float x, in float y)\n{\n // x is distance along segment in direction away from end of segment,\n // y is distance across segment.\n if (cap_type == butt_cap)\n return max(0.5*u_linewidth - x, abs(y));\n else if (cap_type == square_cap)\n return max(-x, abs(y));\n else // cap_type == round_cap\n return distance(vec2(min(x, 0.0), y), vec2(0.0, 0.0));\n}\n\nfloat distance_to_alpha(in float dist)\n{\n return 1.0 - smoothstep(0.5*(u_linewidth - u_antialias),\n 0.5*(u_linewidth + u_antialias), dist);\n}\n\n#ifdef DASHED\nfloat dash_distance(in float x)\n{\n // x is in direction of v_coords.x, i.e. along segment.\n float tex_length = u_dash_tex_info.x;\n float tex_offset = u_dash_tex_info.y;\n float tex_dist_min = u_dash_tex_info.z;\n float tex_dist_max = u_dash_tex_info.w;\n\n // Apply offset.\n x += v_length_so_far - u_dash_scale*tex_offset + u_dash_offset;\n\n // Interpolate within texture to obtain distance to dash.\n float dist = texture2D(u_dash_tex,\n vec2(x / (tex_length*u_dash_scale), 0.0)).a;\n\n // Scale distance within min and max limits.\n dist = tex_dist_min + dist*(tex_dist_max - tex_dist_min);\n\n return u_dash_scale*dist;\n}\n\nfloat clip_dash_distance(in float x, in float offset, in float sign_along)\n{\n // Return clipped dash distance, sign_along is +1.0 if looking forward\n // into next segment and -1.0 if looking backward into previous segment.\n float half_antialias = 0.5*u_antialias;\n\n if (sign_along*x > half_antialias) {\n // Outside antialias region, use usual dash distance.\n return dash_distance(offset + x);\n }\n else {\n // Inside antialias region.\n // Dash distance at edge of antialias region clipped to half_antialias.\n float edge_dist = min(dash_distance(offset + sign_along*half_antialias), half_antialias);\n\n // Phys
417: function _(n,i,e,t,a){t();e.default="\nprecision mediump float;\n\nattribute vec2 a_position;\nattribute vec2 a_center;\nattribute float a_width;\nattribute float a_height;\nattribute float a_angle; // In radians\nattribute float a_linewidth;\nattribute vec4 a_line_color;\nattribute vec4 a_fill_color;\nattribute float a_line_cap;\nattribute float a_line_join;\nattribute float a_show;\n#ifdef HATCH\nattribute float a_hatch_pattern;\nattribute float a_hatch_scale;\nattribute float a_hatch_weight;\nattribute vec4 a_hatch_color;\n#endif\n\nuniform float u_pixel_ratio;\nuniform vec2 u_canvas_size;\nuniform float u_antialias;\nuniform float u_size_hint;\n\nvarying float v_linewidth;\nvarying vec2 v_size; // 2D size for rects compared to 1D for markers.\nvarying vec4 v_line_color;\nvarying vec4 v_fill_color;\nvarying float v_line_cap;\nvarying float v_line_join;\nvarying vec2 v_coords;\n#ifdef HATCH\nvarying float v_hatch_pattern;\nvarying float v_hatch_scale;\nvarying float v_hatch_weight;\nvarying vec4 v_hatch_color;\nvarying vec2 v_hatch_coords;\n#endif\n\nvoid main()\n{\n if (a_show < 0.5) {\n // Do not show this rect.\n gl_Position = vec4(-2.0, -2.0, 0.0, 1.0);\n return;\n }\n\n v_size = vec2(a_width, a_height);\n v_linewidth = a_linewidth;\n v_line_color = a_line_color;\n v_fill_color = a_fill_color;\n v_line_cap = a_line_cap;\n v_line_join = a_line_join;\n\n if (v_linewidth < 1.0) {\n // Linewidth less than 1 is implemented as 1 but with reduced alpha.\n v_line_color.a *= v_linewidth;\n v_linewidth = 1.0;\n }\n\n#ifdef HATCH\n v_hatch_pattern = a_hatch_pattern;\n v_hatch_scale = a_hatch_scale;\n v_hatch_weight = a_hatch_weight;\n v_hatch_color = a_hatch_color;\n#endif\n\n vec2 enclosing_size;\n // Need extra size of (v_linewidth+u_antialias) if edge of marker parallel to\n // edge of bounding box. If symmetric spike towards edge then multiply by\n // 1/cos(theta) where theta is angle between spike and bbox edges.\n int size_hint = int(u_size_hint + 0.5);\n if (size_hint == 1) // Dash\n enclosing_size = vec2(v_size.x + v_linewidth + u_antialias,\n v_linewidth + u_antialias);\n else if (size_hint == 2) // Dot\n enclosing_size = 0.25*v_size + u_antialias;\n else if (size_hint == 3) // Diamond\n enclosing_size = vec2(v_size.x*(2.0/3.0) + (v_linewidth + u_antialias)*1.20185,\n v_size.y + (v_linewidth + u_antialias)*1.80278);\n else if (size_hint == 4) // Hex\n enclosing_size = v_size + (v_linewidth + u_antialias)*vec2(2.0/sqrt(3.0), 1.0);\n else if (size_hint == 5) // Square pin\n enclosing_size = v_size + (v_linewidth + u_antialias)*3.1;\n else if (size_hint == 6) // Triangle\n enclosing_size = vec2(v_size.x + (v_linewidth + u_antialias)*sqrt(3.0),\n v_size.y*(2.0/sqrt(3.0)) + (v_linewidth + u_antialias)*2.0);\n else if (size_hint == 7) // Triangle pin\n enclosing_size = v_size + (v_linewidth + u_antialias)*vec2(4.8, 6.0);\n else if (size_hint == 8) // Star\n enclosing_size = vec2(v_size.x*0.95106 + (v_linewidth + u_antialias)*3.0,\n v_size.y + (v_linewidth + u_antialias)*3.2);\n else\n enclosing_size = v_size + v_linewidth + u_antialias;\n\n // Coordinates in rotated frame with respect to center of marker, used for\n // distance functions in fragment shader.\n v_coords = a_position*enclosing_size;\n\n float c = cos(-a_angle);\n float s = sin(-a_angle);\n mat2 rotation = mat2(c, -s, s, c);\n\n vec2 pos = a_center + rotation*v_coords;\n#ifdef HATCH\n // Coordinates for hatching in unrotated frame of reference.\n v_hatch_coords = pos - 0.5;\n#endif\n pos += 0.5; // Make up for Bokeh's offset.\n pos /= u_canvas_size / u_pixel_ratio; // 0 to 1.\n gl_Position = vec4(2.0*pos.x - 1.0, 1.0 - 2.0*pos.y, 0.0, 1.0);\n}\n"},
418: function _(n,i,e,t,a){t();e.default="\nprecision mediump float;\n\nconst float SQRT2 = sqrt(2.0);\nconst float SQRT3 = sqrt(3.0);\nconst float PI = 3.14159265358979323846;\n\nconst int butt_cap = 0;\nconst int round_cap = 1;\nconst int square_cap = 2;\n\nconst int miter_join = 0;\nconst int round_join = 1;\nconst int bevel_join = 2;\n\n#ifdef HATCH\nconst int hatch_dot = 1;\nconst int hatch_ring = 2;\nconst int hatch_horizontal_line = 3;\nconst int hatch_vertical_line = 4;\nconst int hatch_cross = 5;\nconst int hatch_horizontal_dash = 6;\nconst int hatch_vertical_dash = 7;\nconst int hatch_spiral = 8;\nconst int hatch_right_diagonal_line = 9;\nconst int hatch_left_diagonal_line = 10;\nconst int hatch_diagonal_cross = 11;\nconst int hatch_right_diagonal_dash = 12;\nconst int hatch_left_diagonal_dash = 13;\nconst int hatch_horizontal_wave = 14;\nconst int hatch_vertical_wave = 15;\nconst int hatch_criss_cross = 16;\n#endif\n\nuniform float u_antialias;\n\nvarying float v_linewidth;\nvarying vec2 v_size;\nvarying vec4 v_line_color;\nvarying vec4 v_fill_color;\nvarying float v_line_cap;\nvarying float v_line_join;\nvarying vec2 v_coords;\n#ifdef HATCH\nvarying float v_hatch_pattern;\nvarying float v_hatch_scale;\nvarying float v_hatch_weight;\nvarying vec4 v_hatch_color;\nvarying vec2 v_hatch_coords;\n#endif\n\n// Lines within the marker (dot, cross, x and y) are added at the end as they are\n// on top of the fill rather than astride it.\n#if defined(USE_CIRCLE_DOT) || defined(USE_DIAMOND_DOT) || defined(USE_DOT) || defined(USE_HEX_DOT) || defined(USE_SQUARE_DOT) || defined(USE_STAR_DOT) || defined(USE_TRIANGLE_DOT)\n #define APPEND_DOT\n#endif\n\n#if defined(USE_CIRCLE_CROSS) || defined(USE_SQUARE_CROSS)\n #define APPEND_CROSS\n#endif\n\n#ifdef USE_DIAMOND_CROSS\n #define APPEND_CROSS_2\n#endif\n\n#ifdef USE_CIRCLE_X\n #define APPEND_X\n #define APPEND_X_LEN (0.5*v_size.x)\n#endif\n\n#ifdef USE_SQUARE_X\n #define APPEND_X\n #define APPEND_X_LEN (v_size.x/SQRT2)\n#endif\n\n#ifdef USE_CIRCLE_Y\n #define APPEND_Y\n#endif\n\n#if defined(USE_ASTERISK) || defined(USE_CROSS) || defined(USE_DASH) || defined(USE_DOT) || defined(USE_X) || defined(USE_Y)\n // No fill.\n #define LINE_ONLY\n#endif\n\n#if defined(LINE_ONLY) || defined(APPEND_CROSS) || defined(APPEND_CROSS_2) || defined(APPEND_X) || defined(APPEND_Y)\nfloat end_cap_distance(in vec2 p, in vec2 end_point, in vec2 unit_direction, in int line_cap)\n{\n vec2 offset = p - end_point;\n if (line_cap == butt_cap)\n return dot(offset, unit_direction) + 0.5*v_linewidth;\n else if (line_cap == square_cap)\n return dot(offset, unit_direction);\n else if (line_cap == round_cap && dot(offset, unit_direction) > 0.0)\n return length(offset);\n else\n // Default is outside of line and should be -0.5*(v_linewidth+u_antialias) or less,\n // so here avoid the multiplication.\n return -v_linewidth-u_antialias;\n}\n#endif\n\n#if !(defined(LINE_ONLY) || defined(USE_SQUARE_PIN) || defined(USE_TRIANGLE_PIN))\n// For line join at a vec2 corner where 2 line segments meet, consider bevel points which are the 2\n// points obtained by moving half a linewidth away from the corner point in the directions normal to\n// the line segments. The line through these points is the bevel line, characterised by a vec2\n// unit_normal and offset distance from the corner point. Edge of bevel join straddles this line,\n// round join occurs outside of this line centred on the corner point. In general\n// offset = (linewidth/2)*sin(alpha/2)\n// where alpha is the angle between the 2 line segments at the corner.\nfloat line_join_distance_no_miter(\n in vec2 p, in vec2 corner, in vec2 unit_normal, in float offset, in int line_join)\n{\n // Simplified version of line_join_distance ignoring miter which most markers do implicitly\n // as they are composed of straight line segments.\n float dist_outside = dot((p - corner), unit_normal) - offset;\n\n if (line_join == bevel_join && dist_outside > -0.5*u_antialias)\n return dist_outside + 0.5*v_linewidth;\n el
419: function _(t,_,i,h,e){h();const s=t(420),a=t(421),r=t(422);class l extends s.BaseGLGlyph{constructor(t,_){super(t,_),this.glyph=_,this._antialias=1.5,this._show_all=!1}_draw_one_marker_type(t,_,i){const h={scissor:this.regl_wrapper.scissor,viewport:this.regl_wrapper.viewport,canvas_size:[_.width,_.height],pixel_ratio:_.pixel_ratio,center:i._centers,width:i._widths,height:i._heights,angle:i._angles,size_hint:(0,r.marker_type_to_size_hint)(t),nmarkers:i.nvertices,antialias:this._antialias,linewidth:this._linewidths,line_color:this._line_rgba,fill_color:this._fill_rgba,line_cap:this._line_caps,line_join:this._line_joins,show:this._show};if(this._have_hatch){const _=Object.assign(Object.assign({},h),{hatch_pattern:this._hatch_patterns,hatch_scale:this._hatch_scales,hatch_weight:this._hatch_weights,hatch_color:this._hatch_rgba});this.regl_wrapper.marker_hatch(t)(_)}else this.regl_wrapper.marker_no_hatch(t)(h)}_set_visuals(){const t=this._get_visuals(),_=t.fill,i=t.line;if(null==this._linewidths&&(this._linewidths=new a.Float32Buffer(this.regl_wrapper),this._line_caps=new a.Uint8Buffer(this.regl_wrapper),this._line_joins=new a.Uint8Buffer(this.regl_wrapper),this._line_rgba=new a.NormalizedUint8Buffer(this.regl_wrapper),this._fill_rgba=new a.NormalizedUint8Buffer(this.regl_wrapper)),this._linewidths.set_from_prop(i.line_width),this._line_caps.set_from_line_cap(i.line_cap),this._line_joins.set_from_line_join(i.line_join),this._line_rgba.set_from_color(i.line_color,i.line_alpha),this._fill_rgba.set_from_color(_.fill_color,_.fill_alpha),this._have_hatch=t.hatch.doit,this._have_hatch){const _=t.hatch;null==this._hatch_patterns&&(this._hatch_patterns=new a.Uint8Buffer(this.regl_wrapper),this._hatch_scales=new a.Float32Buffer(this.regl_wrapper),this._hatch_weights=new a.Float32Buffer(this.regl_wrapper),this._hatch_rgba=new a.NormalizedUint8Buffer(this.regl_wrapper)),this._hatch_patterns.set_from_hatch_pattern(_.hatch_pattern),this._hatch_scales.set_from_prop(_.hatch_scale),this._hatch_weights.set_from_prop(_.hatch_weight),this._hatch_rgba.set_from_color(_.hatch_color,_.hatch_alpha)}}}i.BaseMarkerGL=l,l.__name__="BaseMarkerGL",l.missing_point=-1e4},
420: function _(e,t,s,i,h){i();class a{constructor(e,t){this.glyph=t,this.nvertices=0,this.size_changed=!1,this.data_changed=!1,this.visuals_changed=!1,this.regl_wrapper=e}set_data_changed(){const{data_size:e}=this.glyph;e!=this.nvertices&&(this.nvertices=e,this.size_changed=!0),this.data_changed=!0}set_visuals_changed(){this.visuals_changed=!0}render(e,t,s){if(0==t.length)return!0;const{width:i,height:h}=this.glyph.renderer.plot_view.canvas_view.webgl.canvas,a={pixel_ratio:this.glyph.renderer.plot_view.canvas_view.pixel_ratio,width:i,height:h};return this.draw(t,s,a),!0}}s.BaseGLGlyph=a,a.__name__="BaseGLGlyph"},
421: function _(r,t,a,e,s){e();const i=r(422),_=r(22);class n{constructor(r){this.regl_wrapper=r,this.is_scalar=!0}get_sized_array(r){return null!=this.array&&this.array.length==r||(this.array=this.new_array(r)),this.array}is_normalized(){return!1}get length(){return null!=this.array?this.array.length:0}set_from_array(r){const t=r.length,a=this.get_sized_array(t);for(let e=0;e<t;e++)a[e]=r[e];this.update()}set_from_prop(r,t=4){const a=r.is_Scalar()?t:r.length,e=this.get_sized_array(a);for(let t=0;t<a;t++)e[t]=r.get(t);this.update(r.is_Scalar())}set_from_scalar(r,t=4){this.get_sized_array(t).fill(r),this.update(!0)}to_attribute_config(r=0){return{buffer:this.buffer,divisor:this.is_scalar?0:1,normalized:this.is_normalized(),offset:r}}update(r=!1){null==this.buffer?this.buffer=this.regl_wrapper.buffer({usage:"dynamic",data:this.array}):this.buffer({data:this.array}),this.is_scalar=r}}n.__name__="WrappedBuffer";class l extends n{new_array(r){return new Float32Array(r)}}a.Float32Buffer=l,l.__name__="Float32Buffer";class o extends n{new_array(r){return new Uint8Array(r)}set_from_color(r,t,a=4){const e=r.is_Scalar()&&t.is_Scalar(),s=e?a:r.length,i=this.get_sized_array(4*s);for(let a=0;a<s;a++){const[e,s,n,l]=(0,_.color2rgba)(r.get(a),t.get(a));i[4*a]=e,i[4*a+1]=s,i[4*a+2]=n,i[4*a+3]=l}this.update(e)}set_from_hatch_pattern(r,t=4){const a=r.is_Scalar()?t:r.length,e=this.get_sized_array(a);for(let t=0;t<a;t++)e[t]=(0,i.hatch_pattern_to_index)(r.get(t));this.update(r.is_Scalar())}set_from_line_cap(r,t=4){const a=r.is_Scalar()?t:r.length,e=this.get_sized_array(a);for(let t=0;t<a;t++)e[t]=i.cap_lookup[r.get(t)];this.update(r.is_Scalar())}set_from_line_join(r,t=4){const a=r.is_Scalar()?t:r.length,e=this.get_sized_array(a);for(let t=0;t<a;t++)e[t]=i.join_lookup[r.get(t)];this.update(r.is_Scalar())}}a.Uint8Buffer=o,o.__name__="Uint8Buffer";class h extends o{is_normalized(){return!0}}a.NormalizedUint8Buffer=h,h.__name__="NormalizedUint8Buffer"},
422: function _(a,e,r,n,t){n();const i=a(52);r.cap_lookup={butt:0,round:1,square:2},r.join_lookup={miter:0,round:1,bevel:2};const o={blank:0,dot:1,ring:2,horizontal_line:3,vertical_line:4,cross:5,horizontal_dash:6,vertical_dash:7,spiral:8,right_diagonal_line:9,left_diagonal_line:10,diagonal_cross:11,right_diagonal_dash:12,left_diagonal_dash:13,horizontal_wave:14,vertical_wave:15,criss_cross:16};r.hatch_pattern_to_index=function(a){var e,r;return null!==(r=o[null!==(e=i.hatch_aliases[a])&&void 0!==e?e:a])&&void 0!==r?r:0},r.marker_type_to_size_hint=function(a){switch(a){case"dash":return 1;case"dot":return 2;case"diamond":case"diamond_cross":case"diamond_dot":return 3;case"hex":return 4;case"square_pin":return 5;case"inverted_triangle":case"triangle":case"triangle_dot":return 6;case"triangle_pin":return 7;case"star":case"star_dot":return 8;default:return 0}}},
423: function _(s,t,i,e,r){e();const h=s(421),_=s(424);class l extends _.SingleMarkerGL{constructor(s,t){super(s,t),this.glyph=t}draw(s,t,i){this._draw_impl(s,i,t.glglyph,"circle")}_get_visuals(){return this.glyph.visuals}_set_data(){const s=this.nvertices;null==this._centers&&(this._centers=new h.Float32Buffer(this.regl_wrapper),this._widths=new h.Float32Buffer(this.regl_wrapper),this._heights=this._widths,this._angles=new h.Float32Buffer(this.regl_wrapper));const t=this._centers.get_sized_array(2*s),i=this._widths.get_sized_array(s);for(let e=0;e<s;e++)isFinite(this.glyph.sx[e])&&isFinite(this.glyph.sy[e])?(t[2*e]=this.glyph.sx[e],t[2*e+1]=this.glyph.sy[e]):(t[2*e]=_.SingleMarkerGL.missing_point,t[2*e+1]=_.SingleMarkerGL.missing_point),i[e]=2*this.glyph.sradius[e];this._centers.update(),this._widths.update(),this._angles.set_from_prop(this.glyph.angle)}}i.CircleGL=l,l.__name__="CircleGL"},
424: function _(s,t,e,_,h){_();const a=s(419),i=s(421);class l extends a.BaseMarkerGL{constructor(s,t){super(s,t),this.glyph=t}_draw_impl(s,t,e,_){e.data_changed&&(e._set_data(),e.data_changed=!1),this.visuals_changed&&(this._set_visuals(),this.visuals_changed=!1);const h=e.nvertices;null==this._show&&(this._show=new i.Uint8Buffer(this.regl_wrapper));const a=this._show.length,l=this._show.get_sized_array(h);if(s.length<h){this._show_all=!1;for(let s=0;s<h;s++)l[s]=0;for(let t=0;t<s.length;t++)l[s[t]]=255}else if(!this._show_all||a!=h){this._show_all=!0;for(let s=0;s<h;s++)l[s]=255}this._show.update(),this._draw_one_marker_type(_,t,e)}}e.SingleMarkerGL=l,l.__name__="SingleMarkerGL"},
425: function _(s,t,e,i,h){i();const r=s(421),_=s(424);class l extends _.SingleMarkerGL{constructor(s,t){super(s,t),this.glyph=t}draw(s,t,e){this._draw_impl(s,e,t.glglyph,"hex")}_get_visuals(){return this.glyph.visuals}_set_data(){const s=this.nvertices;null==this._centers&&(this._centers=new r.Float32Buffer(this.regl_wrapper),this._widths=new r.Float32Buffer(this.regl_wrapper),this._heights=new r.Float32Buffer(this.regl_wrapper),this._angles=new r.Float32Buffer(this.regl_wrapper));const t=this._centers.get_sized_array(2*s);for(let e=0;e<s;e++)isFinite(this.glyph.sx[e])&&isFinite(this.glyph.sy[e])?(t[2*e]=this.glyph.sx[e],t[2*e+1]=this.glyph.sy[e]):(t[2*e]=_.SingleMarkerGL.missing_point,t[2*e+1]=_.SingleMarkerGL.missing_point);this._centers.update(),"pointytop"==this.glyph.model.orientation?(this._angles.set_from_scalar(.5*Math.PI),this._widths.set_from_scalar(2*this.glyph.svy[0]),this._heights.set_from_scalar(4*this.glyph.svx[4]/Math.sqrt(3))):(this._angles.set_from_scalar(0),this._widths.set_from_scalar(2*this.glyph.svx[0]),this._heights.set_from_scalar(4*this.glyph.svy[4]/Math.sqrt(3)))}}e.HexTileGL=l,l.__name__="HexTileGL"},
426: function _(s,i,t,h,e){h();const _=s(420),l=s(22),a=s(46),n=s(422),o=s(421);class r extends _.BaseGLGlyph{constructor(s,i){super(s,i),this.glyph=i,this._antialias=1.5,this._miter_limit=5}draw(s,i,t){const h=i.glglyph;this.visuals_changed&&(this._set_visuals(),this.visuals_changed=!1),h.data_changed&&(h._set_data(),h.data_changed=!1);const e=this.glyph.visuals.line,_=n.cap_lookup[e.line_cap.value],l=n.join_lookup[e.line_join.value],a=h._points,o={scissor:this.regl_wrapper.scissor,viewport:this.regl_wrapper.viewport,canvas_size:[t.width,t.height],pixel_ratio:t.pixel_ratio,line_color:this._color,linewidth:this._linewidth,antialias:this._antialias,miter_limit:this._miter_limit,points:a,show:h._show,nsegments:a.length/2-3,line_join:l,line_cap:_};if(this._is_dashed()){const s=Object.assign(Object.assign({},o),{length_so_far:this._length_so_far,dash_tex:this._dash_tex,dash_tex_info:this._dash_tex_info,dash_scale:this._dash_scale,dash_offset:this._dash_offset});this.regl_wrapper.dashed_line()(s)}else this.regl_wrapper.solid_line()(o)}_is_dashed(){return this._line_dash.length>0}_set_data(){const s=this.glyph.sx.length,i=s-1;this._is_closed=s>2&&this.glyph.sx[0]==this.glyph.sx[s-1]&&this.glyph.sy[0]==this.glyph.sy[s-1]&&isFinite(this.glyph.sx[0])&&isFinite(this.glyph.sy[0]),null==this._points&&(this._points=new o.Float32Buffer(this.regl_wrapper));const t=this._points.get_sized_array(2*(s+2));for(let i=1;i<s+1;i++)t[2*i]=this.glyph.sx[i-1],t[2*i+1]=this.glyph.sy[i-1];this._is_closed?(t[0]=t[2*s-2],t[1]=t[2*s-1],t[2*s+2]=t[4],t[2*s+3]=t[5]):(t[0]=0,t[1]=0,t[2*s+2]=0,t[2*s+3]=0),this._points.update(),null==this._show&&(this._show=new o.Uint8Buffer(this.regl_wrapper));const h=this._show.get_sized_array(s+1);let e=isFinite(this.glyph.sx[0])&&isFinite(this.glyph.sy[0]);for(let i=1;i<s;i++){const s=isFinite(this.glyph.sx[i])&&isFinite(this.glyph.sy[i]);h[i]=e&&s?1:0,e=s}if(this._is_closed?(h[0]=h[s-1],h[s]=h[1]):(h[0]=0,h[s]=0),this._show.update(),this._is_dashed()){null==this._length_so_far&&(this._length_so_far=new o.Float32Buffer(this.regl_wrapper));const s=this._length_so_far.get_sized_array(i);let e=0;for(let _=0;_<i;_++)s[_]=e,1==h[_+1]&&(e+=Math.sqrt((t[2*_+4]-t[2*_+2])**2+(t[2*_+5]-t[2*_+3])**2));this._length_so_far.update()}}_set_visuals(){const s=this.glyph.visuals.line,i=(0,l.color2rgba)(s.line_color.value,s.line_alpha.value);this._color=i.map((s=>s/255)),this._linewidth=s.line_width.value,this._linewidth<1&&(this._color[3]*=this._linewidth,this._linewidth=1),this._line_dash=(0,a.resolve_line_dash)(s.line_dash.value),this._is_dashed()&&([this._dash_tex_info,this._dash_tex,this._dash_scale]=this.regl_wrapper.get_dash(this._line_dash),this._dash_offset=s.line_dash_offset.value)}}t.LineGL=r,r.__name__="LineGL"},
427: function _(s,t,i,e,r){e();const h=s(421),a=s(424);class n extends a.SingleMarkerGL{constructor(s,t){super(s,t),this.glyph=t}draw(s,t,i){this._draw_impl(s,i,t.glglyph,"square")}_get_visuals(){return this.glyph.visuals}_set_data(){const s=this.nvertices;null==this._centers&&(this._centers=new h.Float32Buffer(this.regl_wrapper),this._widths=new h.Float32Buffer(this.regl_wrapper),this._heights=new h.Float32Buffer(this.regl_wrapper),this._angles=new h.Float32Buffer(this.regl_wrapper),this._angles.set_from_scalar(0));const t=this._centers.get_sized_array(2*s),i=this._heights.get_sized_array(s),e=this._widths.get_sized_array(s);for(let r=0;r<s;r++){const s=this.glyph.sleft[r],h=this.glyph.sright[r],n=this.glyph.stop[r],_=this.glyph.sbottom[r];isFinite(s)&&isFinite(h)&&isFinite(n)&&isFinite(_)?(t[2*r]=(s+h)/2,t[2*r+1]=(n+_)/2,i[r]=Math.abs(n-_),e[r]=Math.abs(h-s)):(t[2*r]=a.SingleMarkerGL.missing_point,t[2*r+1]=a.SingleMarkerGL.missing_point,i[r]=a.SingleMarkerGL.missing_point,e[r]=a.SingleMarkerGL.missing_point)}this._centers.update(),this._heights.update(),this._widths.update()}}i.LRTBGL=n,n.__name__="LRTBGL"},
428: function _(s,t,e,i,_){i();const h=s(419),r=s(421);class a extends h.BaseMarkerGL{constructor(s,t){super(s,t),this.glyph=t}draw(s,t,e){const i=t.glglyph;i.data_changed&&(i._set_data(),i.data_changed=!1),this.visuals_changed&&(this._set_visuals(),this.visuals_changed=!1);const _=i.nvertices;null==this._show&&(this._show=new r.Uint8Buffer(this.regl_wrapper));const h=i._unique_marker_types.length;for(const t of i._unique_marker_types){if(null==t)continue;let r=_;const a=this._show.length,n=this._show.get_sized_array(_);if(h>1||s.length<_){this._show_all=!1,n.fill(0),r=0;for(const e of s)1!=h&&i._marker_types.get(e)!=t||(n[e]=255,r++)}else this._show_all&&a==_||(this._show_all=!0,n.fill(255));this._show.update(),0!=r&&this._draw_one_marker_type(t,e,i)}}_get_visuals(){return this.glyph.visuals}_set_data(){const s=this.nvertices;null==this._centers&&(this._centers=new r.Float32Buffer(this.regl_wrapper),this._widths=new r.Float32Buffer(this.regl_wrapper),this._heights=this._widths,this._angles=new r.Float32Buffer(this.regl_wrapper));const t=this._centers.get_sized_array(2*s);for(let e=0;e<s;e++)isFinite(this.glyph.sx[e])&&isFinite(this.glyph.sy[e])?(t[2*e]=this.glyph.sx[e],t[2*e+1]=this.glyph.sy[e]):(t[2*e]=h.BaseMarkerGL.missing_point,t[2*e+1]=h.BaseMarkerGL.missing_point);this._centers.update(),this._widths.set_from_prop(this.glyph.size),this._angles.set_from_prop(this.glyph.angle),this._marker_types=this.glyph.marker,this._unique_marker_types=[...new Set(this._marker_types)]}}e.MultiMarkerGL=a,a.__name__="MultiMarkerGL"},
429: function _(s,t,e,i,r){i();const h=s(421),_=s(424);class l extends _.SingleMarkerGL{constructor(s,t){super(s,t),this.glyph=t}draw(s,t,e){this._draw_impl(s,e,t.glglyph,"square")}_get_visuals(){return this.glyph.visuals}_set_data(){const s=this.nvertices;null==this._centers&&(this._centers=new h.Float32Buffer(this.regl_wrapper),this._widths=new h.Float32Buffer(this.regl_wrapper),this._heights=new h.Float32Buffer(this.regl_wrapper),this._angles=new h.Float32Buffer(this.regl_wrapper));const t=this._centers.get_sized_array(2*s);for(let e=0;e<s;e++)isFinite(this.glyph.sx[e])&&isFinite(this.glyph.sy[e])?(t[2*e]=this.glyph.sx[e],t[2*e+1]=this.glyph.sy[e]):(t[2*e]=_.SingleMarkerGL.missing_point,t[2*e+1]=_.SingleMarkerGL.missing_point);this._centers.update(),this._widths.set_from_array(this.glyph.sw),this._heights.set_from_array(this.glyph.sh),this._angles.set_from_prop(this.glyph.angle)}}e.RectGL=l,l.__name__="RectGL"},
}, 409, {"models/glyphs/webgl/main":409,"models/glyphs/webgl/index":410,"models/glyphs/webgl/regl_wrap":411,"models/glyphs/webgl/dash_cache":413,"models/glyphs/webgl/utils/math":414,"models/glyphs/webgl/regl_line.vert":415,"models/glyphs/webgl/regl_line.frag":416,"models/glyphs/webgl/marker.vert":417,"models/glyphs/webgl/marker.frag":418,"models/glyphs/webgl/base_marker":419,"models/glyphs/webgl/base":420,"models/glyphs/webgl/buffer":421,"models/glyphs/webgl/webgl_utils":422,"models/glyphs/webgl/circle":423,"models/glyphs/webgl/single_marker":424,"models/glyphs/webgl/hex_tile":425,"models/glyphs/webgl/line_gl":426,"models/glyphs/webgl/lrtb":427,"models/glyphs/webgl/multi_marker":428,"models/glyphs/webgl/rect":429}, {});});