@golstats/gsc-reports 1.0.56 → 1.0.57

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4027,12 +4027,12 @@ uniform ${De} ${qe} u_${it};
4027
4027
  #endif
4028
4028
  `}),staticAttributes:O,staticUniforms:ie}}class Dn{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(o,l,O,j,H,ie,he,we,Ee){this.context=o;let De=this.boundPaintVertexBuffers.length!==j.length;for(let qe=0;!De&&qe<j.length;qe++)this.boundPaintVertexBuffers[qe]!==j[qe]&&(De=!0);!this.vao||this.boundProgram!==l||this.boundLayoutVertexBuffer!==O||De||this.boundIndexBuffer!==H||this.boundVertexOffset!==ie||this.boundDynamicVertexBuffer!==he||this.boundDynamicVertexBuffer2!==we||this.boundDynamicVertexBuffer3!==Ee?this.freshBind(l,O,j,H,ie,he,we,Ee):(o.bindVertexArray.set(this.vao),he&&he.bind(),H&&H.dynamicDraw&&H.bind(),we&&we.bind(),Ee&&Ee.bind())}freshBind(o,l,O,j,H,ie,he,we){const Ee=o.numAttributes,De=this.context,qe=De.gl;this.vao&&this.destroy(),this.vao=De.createVertexArray(),De.bindVertexArray.set(this.vao),this.boundProgram=o,this.boundLayoutVertexBuffer=l,this.boundPaintVertexBuffers=O,this.boundIndexBuffer=j,this.boundVertexOffset=H,this.boundDynamicVertexBuffer=ie,this.boundDynamicVertexBuffer2=he,this.boundDynamicVertexBuffer3=we,l.enableAttributes(qe,o);for(const it of O)it.enableAttributes(qe,o);ie&&ie.enableAttributes(qe,o),he&&he.enableAttributes(qe,o),we&&we.enableAttributes(qe,o),l.bind(),l.setVertexAttribPointers(qe,o,H);for(const it of O)it.bind(),it.setVertexAttribPointers(qe,o,H);ie&&(ie.bind(),ie.setVertexAttribPointers(qe,o,H)),j&&j.bind(),he&&(he.bind(),he.setVertexAttribPointers(qe,o,H)),we&&(we.bind(),we.setVertexAttribPointers(qe,o,H)),De.currentNumAttributes=Ee}destroy(){this.vao&&(this.context.deleteVertexArray(this.vao),this.vao=null)}}const br=(F,o,l,O,j)=>({u_matrix:F,u_texture:0,u_ele_delta:o,u_fog_matrix:l,u_fog_color:O?O.properties.get("fog-color"):t.aN.white,u_fog_ground_blend:O?O.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:O?O.calculateFogBlendOpacity(j):0,u_horizon_color:O?O.properties.get("horizon-color"):t.aN.white,u_horizon_fog_blend:O?O.properties.get("horizon-fog-blend"):1});function Cr(F){const o=[];for(let l=0;l<F.length;l++){if(F[l]===null)continue;const O=F[l].split(" ");o.push(O.pop())}return o}class rn{constructor(o,l,O,j,H,ie){const he=o.gl;this.program=he.createProgram();const we=Cr(l.staticAttributes),Ee=O?O.getBinderAttributes():[],De=we.concat(Ee),qe=Tn.prelude.staticUniforms?Cr(Tn.prelude.staticUniforms):[],it=l.staticUniforms?Cr(l.staticUniforms):[],ut=O?O.getBinderUniforms():[],ht=qe.concat(it).concat(ut),bt=[];for(const Zt of ht)bt.indexOf(Zt)<0&&bt.push(Zt);const At=O?O.defines():[];H&&At.push("#define OVERDRAW_INSPECTOR;"),ie&&At.push("#define TERRAIN3D;");const Et=At.concat(Tn.prelude.fragmentSource,l.fragmentSource).join(`
4029
4029
  `),Ut=At.concat(Tn.prelude.vertexSource,l.vertexSource).join(`
4030
- `),Mt=he.createShader(he.FRAGMENT_SHADER);if(he.isContextLost())return void(this.failedToCreate=!0);if(he.shaderSource(Mt,Et),he.compileShader(Mt),!he.getShaderParameter(Mt,he.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${he.getShaderInfoLog(Mt)}`);he.attachShader(this.program,Mt);const Xt=he.createShader(he.VERTEX_SHADER);if(he.isContextLost())return void(this.failedToCreate=!0);if(he.shaderSource(Xt,Ut),he.compileShader(Xt),!he.getShaderParameter(Xt,he.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${he.getShaderInfoLog(Xt)}`);he.attachShader(this.program,Xt),this.attributes={};const Qt={};this.numAttributes=De.length;for(let Zt=0;Zt<this.numAttributes;Zt++)De[Zt]&&(he.bindAttribLocation(this.program,Zt,De[Zt]),this.attributes[De[Zt]]=Zt);if(he.linkProgram(this.program),!he.getProgramParameter(this.program,he.LINK_STATUS))throw new Error(`Program failed to link: ${he.getProgramInfoLog(this.program)}`);he.deleteShader(Xt),he.deleteShader(Mt);for(let Zt=0;Zt<bt.length;Zt++){const pr=bt[Zt];if(pr&&!Qt[pr]){const Tr=he.getUniformLocation(this.program,pr);Tr&&(Qt[pr]=Tr)}}this.fixedUniforms=j(o,Qt),this.terrainUniforms=((Zt,pr)=>({u_depth:new t.aI(Zt,pr.u_depth),u_terrain:new t.aI(Zt,pr.u_terrain),u_terrain_dim:new t.aJ(Zt,pr.u_terrain_dim),u_terrain_matrix:new t.aK(Zt,pr.u_terrain_matrix),u_terrain_unpack:new t.aL(Zt,pr.u_terrain_unpack),u_terrain_exaggeration:new t.aJ(Zt,pr.u_terrain_exaggeration)}))(o,Qt),this.binderUniforms=O?O.getUniforms(o,Qt):[]}draw(o,l,O,j,H,ie,he,we,Ee,De,qe,it,ut,ht,bt,At,Et,Ut){const Mt=o.gl;if(this.failedToCreate)return;if(o.program.set(this.program),o.setDepthMode(O),o.setStencilMode(j),o.setColorMode(H),o.setCullFace(ie),we){o.activeTexture.set(Mt.TEXTURE2),Mt.bindTexture(Mt.TEXTURE_2D,we.depthTexture),o.activeTexture.set(Mt.TEXTURE3),Mt.bindTexture(Mt.TEXTURE_2D,we.texture);for(const Qt in this.terrainUniforms)this.terrainUniforms[Qt].set(we[Qt])}for(const Qt in this.fixedUniforms)this.fixedUniforms[Qt].set(he[Qt]);bt&&bt.setUniforms(o,this.binderUniforms,ut,{zoom:ht});let Xt=0;switch(l){case Mt.LINES:Xt=2;break;case Mt.TRIANGLES:Xt=3;break;case Mt.LINE_STRIP:Xt=1}for(const Qt of it.get()){const Zt=Qt.vaos||(Qt.vaos={});(Zt[Ee]||(Zt[Ee]=new Dn)).bind(o,this,De,bt?bt.getPaintVertexBuffers():[],qe,Qt.vertexOffset,At,Et,Ut),Mt.drawElements(l,Qt.primitiveLength*Xt,Mt.UNSIGNED_SHORT,Qt.primitiveOffset*Xt*2)}}}function jr(F,o,l){const O=1/wt(l,1,o.transform.tileZoom),j=Math.pow(2,l.tileID.overscaledZ),H=l.tileSize*Math.pow(2,o.transform.tileZoom)/j,ie=H*(l.tileID.canonical.x+l.tileID.wrap*j),he=H*l.tileID.canonical.y;return{u_image:0,u_texsize:l.imageAtlasTexture.size,u_scale:[O,F.fromScale,F.toScale],u_fade:F.t,u_pixel_coord_upper:[ie>>16,he>>16],u_pixel_coord_lower:[65535&ie,65535&he]}}const an=(F,o,l,O)=>{const j=o.style.light,H=j.properties.get("position"),ie=[H.x,H.y,H.z],he=(function(){var Ee=new t.A(9);return t.A!=Float32Array&&(Ee[1]=0,Ee[2]=0,Ee[3]=0,Ee[5]=0,Ee[6]=0,Ee[7]=0),Ee[0]=1,Ee[4]=1,Ee[8]=1,Ee})();j.properties.get("anchor")==="viewport"&&(function(Ee,De){var qe=Math.sin(De),it=Math.cos(De);Ee[0]=it,Ee[1]=qe,Ee[2]=0,Ee[3]=-qe,Ee[4]=it,Ee[5]=0,Ee[6]=0,Ee[7]=0,Ee[8]=1})(he,-o.transform.angle),(function(Ee,De,qe){var it=De[0],ut=De[1],ht=De[2];Ee[0]=it*qe[0]+ut*qe[3]+ht*qe[6],Ee[1]=it*qe[1]+ut*qe[4]+ht*qe[7],Ee[2]=it*qe[2]+ut*qe[5]+ht*qe[8]})(ie,ie,he);const we=j.properties.get("color");return{u_matrix:F,u_lightpos:ie,u_lightintensity:j.properties.get("intensity"),u_lightcolor:[we.r,we.g,we.b],u_vertical_gradient:+l,u_opacity:O}},xn=(F,o,l,O,j,H,ie)=>t.e(an(F,o,l,O),jr(H,o,ie),{u_height_factor:-Math.pow(2,j.overscaledZ)/ie.tileSize/8}),yn=F=>({u_matrix:F}),In=(F,o,l,O)=>t.e(yn(F),jr(l,o,O)),Qn=(F,o)=>({u_matrix:F,u_world:o}),gr=(F,o,l,O,j)=>t.e(In(F,o,l,O),{u_world:j}),qr=(F,o,l,O)=>{const j=F.transform;let H,ie;if(O.paint.get("circle-pitch-alignment")==="map"){const he=wt(l,1,j.zoom);H=!0,ie=[he,he]}else H=!1,ie=j.pixelsToGLUnits;return{u_camera_to_center_distance:j.cameraToCenterDistance,u_scale_with_map:+(O.paint.get("circle-pitch-scale")==="map"),u_matrix:F.translatePosMatrix(o.posMatrix,l,O.paint.get("circle-translate"),O.paint.get("circle-translate-anchor")),u_pitch_with_map:+H,u_device_pixel_ratio:F.pixelRatio,u_extrude_scale:ie}},tr=(F,o)=>({u_matrix:o,u_pixel_extrude_scale:[1/F.width,1/F.height]}),or=(F,o,l)=>({u_matrix:F,u_inv_matrix:o,u_camera_to_center_distance:l.cameraToCenterDistance,u_viewport_size:[l.width,l.height]}),yr=(F,o,l=1)=>({u_matrix:F,u_color:o,u_overlay:0,u_overlay_scale:l}),Pr=F=>({u_matrix:F}),Or=(F,o,l,O)=>({u_matrix:F,u_extrude_scale:wt(o,1,l),u_intensity:O}),Jr=(F,o,l,O)=>{const j=t.H();t.aQ(j,0,F.width,F.height,0,0,1);const H=F.context.gl;return{u_matrix:j,u_world:[H.drawingBufferWidth,H.drawingBufferHeight],u_image:l,u_color_ramp:O,u_opacity:o.paint.get("heatmap-opacity")}},Fr=(F,o,l,O)=>{const j=l.paint.get("hillshade-shadow-color"),H=l.paint.get("hillshade-highlight-color"),ie=l.paint.get("hillshade-accent-color");let he=l.paint.get("hillshade-illumination-direction")*(Math.PI/180);l.paint.get("hillshade-illumination-anchor")==="viewport"&&(he-=F.transform.angle);const we=!F.options.moving;return{u_matrix:O?O.posMatrix:F.transform.calculatePosMatrix(o.tileID.toUnwrapped(),we),u_image:0,u_latrange:cr(0,o.tileID),u_light:[l.paint.get("hillshade-exaggeration"),he],u_shadow:j,u_highlight:H,u_accent:ie}},Rr=(F,o)=>{const l=o.stride,O=t.H();return t.aQ(O,0,t.X,-t.X,0,0,1),t.J(O,O,[0,-t.X,0]),{u_matrix:O,u_image:1,u_dimension:[l,l],u_zoom:F.overscaledZ,u_unpack:o.getUnpackVector()}};function cr(F,o){const l=Math.pow(2,o.canonical.z),O=o.canonical.y;return[new t.Z(0,O/l).toLngLat().lat,new t.Z(0,(O+1)/l).toLngLat().lat]}const lr=(F,o,l,O)=>{const j=F.transform;return{u_matrix:fn(F,o,l,O),u_ratio:1/wt(o,1,j.zoom),u_device_pixel_ratio:F.pixelRatio,u_units_to_pixels:[1/j.pixelsToGLUnits[0],1/j.pixelsToGLUnits[1]]}},Mr=(F,o,l,O,j)=>t.e(lr(F,o,l,j),{u_image:0,u_image_height:O}),Yr=(F,o,l,O,j)=>{const H=F.transform,ie=ln(o,H);return{u_matrix:fn(F,o,l,j),u_texsize:o.imageAtlasTexture.size,u_ratio:1/wt(o,1,H.zoom),u_device_pixel_ratio:F.pixelRatio,u_image:0,u_scale:[ie,O.fromScale,O.toScale],u_fade:O.t,u_units_to_pixels:[1/H.pixelsToGLUnits[0],1/H.pixelsToGLUnits[1]]}},cn=(F,o,l,O,j,H)=>{const ie=F.transform,he=F.lineAtlas,we=ln(o,ie),Ee=l.layout.get("line-cap")==="round",De=he.getDash(O.from,Ee),qe=he.getDash(O.to,Ee),it=De.width*j.fromScale,ut=qe.width*j.toScale;return t.e(lr(F,o,l,H),{u_patternscale_a:[we/it,-De.height/2],u_patternscale_b:[we/ut,-qe.height/2],u_sdfgamma:he.width/(256*Math.min(it,ut)*F.pixelRatio)/2,u_image:0,u_tex_y_a:De.y,u_tex_y_b:qe.y,u_mix:j.t})};function ln(F,o){return 1/wt(F,1,o.tileZoom)}function fn(F,o,l,O){return F.translatePosMatrix(O?O.posMatrix:o.tileID.posMatrix,o,l.paint.get("line-translate"),l.paint.get("line-translate-anchor"))}const Mn=(F,o,l,O,j)=>{return{u_matrix:F,u_tl_parent:o,u_scale_parent:l,u_buffer_scale:1,u_fade_t:O.mix,u_opacity:O.opacity*j.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:j.paint.get("raster-brightness-min"),u_brightness_high:j.paint.get("raster-brightness-max"),u_saturation_factor:(ie=j.paint.get("raster-saturation"),ie>0?1-1/(1.001-ie):-ie),u_contrast_factor:(H=j.paint.get("raster-contrast"),H>0?1/(1-H):1+H),u_spin_weights:wn(j.paint.get("raster-hue-rotate"))};var H,ie};function wn(F){F*=Math.PI/180;const o=Math.sin(F),l=Math.cos(F);return[(2*l+1)/3,(-Math.sqrt(3)*o-l+1)/3,(Math.sqrt(3)*o-l+1)/3]}const Ln=(F,o,l,O,j,H,ie,he,we,Ee,De,qe,it,ut)=>{const ht=ie.transform;return{u_is_size_zoom_constant:+(F==="constant"||F==="source"),u_is_size_feature_constant:+(F==="constant"||F==="camera"),u_size_t:o?o.uSizeT:0,u_size:o?o.uSize:0,u_camera_to_center_distance:ht.cameraToCenterDistance,u_pitch:ht.pitch/360*2*Math.PI,u_rotate_symbol:+l,u_aspect_ratio:ht.width/ht.height,u_fade_change:ie.options.fadeDuration?ie.symbolFadeChange:1,u_matrix:he,u_label_plane_matrix:we,u_coord_matrix:Ee,u_is_text:+qe,u_pitch_with_map:+O,u_is_along_line:j,u_is_variable_anchor:H,u_texsize:it,u_texture:0,u_translation:De,u_pitched_scale:ut}},_n=(F,o,l,O,j,H,ie,he,we,Ee,De,qe,it,ut,ht)=>{const bt=ie.transform;return t.e(Ln(F,o,l,O,j,H,ie,he,we,Ee,De,qe,it,ht),{u_gamma_scale:O?Math.cos(bt._pitch)*bt.cameraToCenterDistance:1,u_device_pixel_ratio:ie.pixelRatio,u_is_halo:1})},En=(F,o,l,O,j,H,ie,he,we,Ee,De,qe,it,ut)=>t.e(_n(F,o,l,O,j,H,ie,he,we,Ee,De,!0,qe,!0,ut),{u_texsize_icon:it,u_texture_icon:1}),Bn=(F,o,l)=>({u_matrix:F,u_opacity:o,u_color:l}),oi=(F,o,l,O,j,H)=>t.e((function(ie,he,we,Ee){const De=we.imageManager.getPattern(ie.from.toString()),qe=we.imageManager.getPattern(ie.to.toString()),{width:it,height:ut}=we.imageManager.getPixelSize(),ht=Math.pow(2,Ee.tileID.overscaledZ),bt=Ee.tileSize*Math.pow(2,we.transform.tileZoom)/ht,At=bt*(Ee.tileID.canonical.x+Ee.tileID.wrap*ht),Et=bt*Ee.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:De.tl,u_pattern_br_a:De.br,u_pattern_tl_b:qe.tl,u_pattern_br_b:qe.br,u_texsize:[it,ut],u_mix:he.t,u_pattern_size_a:De.displaySize,u_pattern_size_b:qe.displaySize,u_scale_a:he.fromScale,u_scale_b:he.toScale,u_tile_units_to_pixels:1/wt(Ee,1,we.transform.tileZoom),u_pixel_coord_upper:[At>>16,Et>>16],u_pixel_coord_lower:[65535&At,65535&Et]}})(O,H,l,j),{u_matrix:F,u_opacity:o}),Yn={fillExtrusion:(F,o)=>({u_matrix:new t.aK(F,o.u_matrix),u_lightpos:new t.aO(F,o.u_lightpos),u_lightintensity:new t.aJ(F,o.u_lightintensity),u_lightcolor:new t.aO(F,o.u_lightcolor),u_vertical_gradient:new t.aJ(F,o.u_vertical_gradient),u_opacity:new t.aJ(F,o.u_opacity)}),fillExtrusionPattern:(F,o)=>({u_matrix:new t.aK(F,o.u_matrix),u_lightpos:new t.aO(F,o.u_lightpos),u_lightintensity:new t.aJ(F,o.u_lightintensity),u_lightcolor:new t.aO(F,o.u_lightcolor),u_vertical_gradient:new t.aJ(F,o.u_vertical_gradient),u_height_factor:new t.aJ(F,o.u_height_factor),u_image:new t.aI(F,o.u_image),u_texsize:new t.aP(F,o.u_texsize),u_pixel_coord_upper:new t.aP(F,o.u_pixel_coord_upper),u_pixel_coord_lower:new t.aP(F,o.u_pixel_coord_lower),u_scale:new t.aO(F,o.u_scale),u_fade:new t.aJ(F,o.u_fade),u_opacity:new t.aJ(F,o.u_opacity)}),fill:(F,o)=>({u_matrix:new t.aK(F,o.u_matrix)}),fillPattern:(F,o)=>({u_matrix:new t.aK(F,o.u_matrix),u_image:new t.aI(F,o.u_image),u_texsize:new t.aP(F,o.u_texsize),u_pixel_coord_upper:new t.aP(F,o.u_pixel_coord_upper),u_pixel_coord_lower:new t.aP(F,o.u_pixel_coord_lower),u_scale:new t.aO(F,o.u_scale),u_fade:new t.aJ(F,o.u_fade)}),fillOutline:(F,o)=>({u_matrix:new t.aK(F,o.u_matrix),u_world:new t.aP(F,o.u_world)}),fillOutlinePattern:(F,o)=>({u_matrix:new t.aK(F,o.u_matrix),u_world:new t.aP(F,o.u_world),u_image:new t.aI(F,o.u_image),u_texsize:new t.aP(F,o.u_texsize),u_pixel_coord_upper:new t.aP(F,o.u_pixel_coord_upper),u_pixel_coord_lower:new t.aP(F,o.u_pixel_coord_lower),u_scale:new t.aO(F,o.u_scale),u_fade:new t.aJ(F,o.u_fade)}),circle:(F,o)=>({u_camera_to_center_distance:new t.aJ(F,o.u_camera_to_center_distance),u_scale_with_map:new t.aI(F,o.u_scale_with_map),u_pitch_with_map:new t.aI(F,o.u_pitch_with_map),u_extrude_scale:new t.aP(F,o.u_extrude_scale),u_device_pixel_ratio:new t.aJ(F,o.u_device_pixel_ratio),u_matrix:new t.aK(F,o.u_matrix)}),collisionBox:(F,o)=>({u_matrix:new t.aK(F,o.u_matrix),u_pixel_extrude_scale:new t.aP(F,o.u_pixel_extrude_scale)}),collisionCircle:(F,o)=>({u_matrix:new t.aK(F,o.u_matrix),u_inv_matrix:new t.aK(F,o.u_inv_matrix),u_camera_to_center_distance:new t.aJ(F,o.u_camera_to_center_distance),u_viewport_size:new t.aP(F,o.u_viewport_size)}),debug:(F,o)=>({u_color:new t.aM(F,o.u_color),u_matrix:new t.aK(F,o.u_matrix),u_overlay:new t.aI(F,o.u_overlay),u_overlay_scale:new t.aJ(F,o.u_overlay_scale)}),clippingMask:(F,o)=>({u_matrix:new t.aK(F,o.u_matrix)}),heatmap:(F,o)=>({u_extrude_scale:new t.aJ(F,o.u_extrude_scale),u_intensity:new t.aJ(F,o.u_intensity),u_matrix:new t.aK(F,o.u_matrix)}),heatmapTexture:(F,o)=>({u_matrix:new t.aK(F,o.u_matrix),u_world:new t.aP(F,o.u_world),u_image:new t.aI(F,o.u_image),u_color_ramp:new t.aI(F,o.u_color_ramp),u_opacity:new t.aJ(F,o.u_opacity)}),hillshade:(F,o)=>({u_matrix:new t.aK(F,o.u_matrix),u_image:new t.aI(F,o.u_image),u_latrange:new t.aP(F,o.u_latrange),u_light:new t.aP(F,o.u_light),u_shadow:new t.aM(F,o.u_shadow),u_highlight:new t.aM(F,o.u_highlight),u_accent:new t.aM(F,o.u_accent)}),hillshadePrepare:(F,o)=>({u_matrix:new t.aK(F,o.u_matrix),u_image:new t.aI(F,o.u_image),u_dimension:new t.aP(F,o.u_dimension),u_zoom:new t.aJ(F,o.u_zoom),u_unpack:new t.aL(F,o.u_unpack)}),line:(F,o)=>({u_matrix:new t.aK(F,o.u_matrix),u_ratio:new t.aJ(F,o.u_ratio),u_device_pixel_ratio:new t.aJ(F,o.u_device_pixel_ratio),u_units_to_pixels:new t.aP(F,o.u_units_to_pixels)}),lineGradient:(F,o)=>({u_matrix:new t.aK(F,o.u_matrix),u_ratio:new t.aJ(F,o.u_ratio),u_device_pixel_ratio:new t.aJ(F,o.u_device_pixel_ratio),u_units_to_pixels:new t.aP(F,o.u_units_to_pixels),u_image:new t.aI(F,o.u_image),u_image_height:new t.aJ(F,o.u_image_height)}),linePattern:(F,o)=>({u_matrix:new t.aK(F,o.u_matrix),u_texsize:new t.aP(F,o.u_texsize),u_ratio:new t.aJ(F,o.u_ratio),u_device_pixel_ratio:new t.aJ(F,o.u_device_pixel_ratio),u_image:new t.aI(F,o.u_image),u_units_to_pixels:new t.aP(F,o.u_units_to_pixels),u_scale:new t.aO(F,o.u_scale),u_fade:new t.aJ(F,o.u_fade)}),lineSDF:(F,o)=>({u_matrix:new t.aK(F,o.u_matrix),u_ratio:new t.aJ(F,o.u_ratio),u_device_pixel_ratio:new t.aJ(F,o.u_device_pixel_ratio),u_units_to_pixels:new t.aP(F,o.u_units_to_pixels),u_patternscale_a:new t.aP(F,o.u_patternscale_a),u_patternscale_b:new t.aP(F,o.u_patternscale_b),u_sdfgamma:new t.aJ(F,o.u_sdfgamma),u_image:new t.aI(F,o.u_image),u_tex_y_a:new t.aJ(F,o.u_tex_y_a),u_tex_y_b:new t.aJ(F,o.u_tex_y_b),u_mix:new t.aJ(F,o.u_mix)}),raster:(F,o)=>({u_matrix:new t.aK(F,o.u_matrix),u_tl_parent:new t.aP(F,o.u_tl_parent),u_scale_parent:new t.aJ(F,o.u_scale_parent),u_buffer_scale:new t.aJ(F,o.u_buffer_scale),u_fade_t:new t.aJ(F,o.u_fade_t),u_opacity:new t.aJ(F,o.u_opacity),u_image0:new t.aI(F,o.u_image0),u_image1:new t.aI(F,o.u_image1),u_brightness_low:new t.aJ(F,o.u_brightness_low),u_brightness_high:new t.aJ(F,o.u_brightness_high),u_saturation_factor:new t.aJ(F,o.u_saturation_factor),u_contrast_factor:new t.aJ(F,o.u_contrast_factor),u_spin_weights:new t.aO(F,o.u_spin_weights)}),symbolIcon:(F,o)=>({u_is_size_zoom_constant:new t.aI(F,o.u_is_size_zoom_constant),u_is_size_feature_constant:new t.aI(F,o.u_is_size_feature_constant),u_size_t:new t.aJ(F,o.u_size_t),u_size:new t.aJ(F,o.u_size),u_camera_to_center_distance:new t.aJ(F,o.u_camera_to_center_distance),u_pitch:new t.aJ(F,o.u_pitch),u_rotate_symbol:new t.aI(F,o.u_rotate_symbol),u_aspect_ratio:new t.aJ(F,o.u_aspect_ratio),u_fade_change:new t.aJ(F,o.u_fade_change),u_matrix:new t.aK(F,o.u_matrix),u_label_plane_matrix:new t.aK(F,o.u_label_plane_matrix),u_coord_matrix:new t.aK(F,o.u_coord_matrix),u_is_text:new t.aI(F,o.u_is_text),u_pitch_with_map:new t.aI(F,o.u_pitch_with_map),u_is_along_line:new t.aI(F,o.u_is_along_line),u_is_variable_anchor:new t.aI(F,o.u_is_variable_anchor),u_texsize:new t.aP(F,o.u_texsize),u_texture:new t.aI(F,o.u_texture),u_translation:new t.aP(F,o.u_translation),u_pitched_scale:new t.aJ(F,o.u_pitched_scale)}),symbolSDF:(F,o)=>({u_is_size_zoom_constant:new t.aI(F,o.u_is_size_zoom_constant),u_is_size_feature_constant:new t.aI(F,o.u_is_size_feature_constant),u_size_t:new t.aJ(F,o.u_size_t),u_size:new t.aJ(F,o.u_size),u_camera_to_center_distance:new t.aJ(F,o.u_camera_to_center_distance),u_pitch:new t.aJ(F,o.u_pitch),u_rotate_symbol:new t.aI(F,o.u_rotate_symbol),u_aspect_ratio:new t.aJ(F,o.u_aspect_ratio),u_fade_change:new t.aJ(F,o.u_fade_change),u_matrix:new t.aK(F,o.u_matrix),u_label_plane_matrix:new t.aK(F,o.u_label_plane_matrix),u_coord_matrix:new t.aK(F,o.u_coord_matrix),u_is_text:new t.aI(F,o.u_is_text),u_pitch_with_map:new t.aI(F,o.u_pitch_with_map),u_is_along_line:new t.aI(F,o.u_is_along_line),u_is_variable_anchor:new t.aI(F,o.u_is_variable_anchor),u_texsize:new t.aP(F,o.u_texsize),u_texture:new t.aI(F,o.u_texture),u_gamma_scale:new t.aJ(F,o.u_gamma_scale),u_device_pixel_ratio:new t.aJ(F,o.u_device_pixel_ratio),u_is_halo:new t.aI(F,o.u_is_halo),u_translation:new t.aP(F,o.u_translation),u_pitched_scale:new t.aJ(F,o.u_pitched_scale)}),symbolTextAndIcon:(F,o)=>({u_is_size_zoom_constant:new t.aI(F,o.u_is_size_zoom_constant),u_is_size_feature_constant:new t.aI(F,o.u_is_size_feature_constant),u_size_t:new t.aJ(F,o.u_size_t),u_size:new t.aJ(F,o.u_size),u_camera_to_center_distance:new t.aJ(F,o.u_camera_to_center_distance),u_pitch:new t.aJ(F,o.u_pitch),u_rotate_symbol:new t.aI(F,o.u_rotate_symbol),u_aspect_ratio:new t.aJ(F,o.u_aspect_ratio),u_fade_change:new t.aJ(F,o.u_fade_change),u_matrix:new t.aK(F,o.u_matrix),u_label_plane_matrix:new t.aK(F,o.u_label_plane_matrix),u_coord_matrix:new t.aK(F,o.u_coord_matrix),u_is_text:new t.aI(F,o.u_is_text),u_pitch_with_map:new t.aI(F,o.u_pitch_with_map),u_is_along_line:new t.aI(F,o.u_is_along_line),u_is_variable_anchor:new t.aI(F,o.u_is_variable_anchor),u_texsize:new t.aP(F,o.u_texsize),u_texsize_icon:new t.aP(F,o.u_texsize_icon),u_texture:new t.aI(F,o.u_texture),u_texture_icon:new t.aI(F,o.u_texture_icon),u_gamma_scale:new t.aJ(F,o.u_gamma_scale),u_device_pixel_ratio:new t.aJ(F,o.u_device_pixel_ratio),u_is_halo:new t.aI(F,o.u_is_halo),u_translation:new t.aP(F,o.u_translation),u_pitched_scale:new t.aJ(F,o.u_pitched_scale)}),background:(F,o)=>({u_matrix:new t.aK(F,o.u_matrix),u_opacity:new t.aJ(F,o.u_opacity),u_color:new t.aM(F,o.u_color)}),backgroundPattern:(F,o)=>({u_matrix:new t.aK(F,o.u_matrix),u_opacity:new t.aJ(F,o.u_opacity),u_image:new t.aI(F,o.u_image),u_pattern_tl_a:new t.aP(F,o.u_pattern_tl_a),u_pattern_br_a:new t.aP(F,o.u_pattern_br_a),u_pattern_tl_b:new t.aP(F,o.u_pattern_tl_b),u_pattern_br_b:new t.aP(F,o.u_pattern_br_b),u_texsize:new t.aP(F,o.u_texsize),u_mix:new t.aJ(F,o.u_mix),u_pattern_size_a:new t.aP(F,o.u_pattern_size_a),u_pattern_size_b:new t.aP(F,o.u_pattern_size_b),u_scale_a:new t.aJ(F,o.u_scale_a),u_scale_b:new t.aJ(F,o.u_scale_b),u_pixel_coord_upper:new t.aP(F,o.u_pixel_coord_upper),u_pixel_coord_lower:new t.aP(F,o.u_pixel_coord_lower),u_tile_units_to_pixels:new t.aJ(F,o.u_tile_units_to_pixels)}),terrain:(F,o)=>({u_matrix:new t.aK(F,o.u_matrix),u_texture:new t.aI(F,o.u_texture),u_ele_delta:new t.aJ(F,o.u_ele_delta),u_fog_matrix:new t.aK(F,o.u_fog_matrix),u_fog_color:new t.aM(F,o.u_fog_color),u_fog_ground_blend:new t.aJ(F,o.u_fog_ground_blend),u_fog_ground_blend_opacity:new t.aJ(F,o.u_fog_ground_blend_opacity),u_horizon_color:new t.aM(F,o.u_horizon_color),u_horizon_fog_blend:new t.aJ(F,o.u_horizon_fog_blend)}),terrainDepth:(F,o)=>({u_matrix:new t.aK(F,o.u_matrix),u_ele_delta:new t.aJ(F,o.u_ele_delta)}),terrainCoords:(F,o)=>({u_matrix:new t.aK(F,o.u_matrix),u_texture:new t.aI(F,o.u_texture),u_terrain_coords_id:new t.aJ(F,o.u_terrain_coords_id),u_ele_delta:new t.aJ(F,o.u_ele_delta)}),sky:(F,o)=>({u_sky_color:new t.aM(F,o.u_sky_color),u_horizon_color:new t.aM(F,o.u_horizon_color),u_horizon:new t.aJ(F,o.u_horizon),u_sky_horizon_blend:new t.aJ(F,o.u_sky_horizon_blend)})};class Pn{constructor(o,l,O){this.context=o;const j=o.gl;this.buffer=j.createBuffer(),this.dynamicDraw=!!O,this.context.unbindVAO(),o.bindElementBuffer.set(this.buffer),j.bufferData(j.ELEMENT_ARRAY_BUFFER,l.arrayBuffer,this.dynamicDraw?j.DYNAMIC_DRAW:j.STATIC_DRAW),this.dynamicDraw||delete l.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(o){const l=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),l.bufferSubData(l.ELEMENT_ARRAY_BUFFER,0,o.arrayBuffer)}destroy(){const o=this.context.gl;this.buffer&&(o.deleteBuffer(this.buffer),delete this.buffer)}}const ei={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class bi{constructor(o,l,O,j){this.length=l.length,this.attributes=O,this.itemSize=l.bytesPerElement,this.dynamicDraw=j,this.context=o;const H=o.gl;this.buffer=H.createBuffer(),o.bindVertexBuffer.set(this.buffer),H.bufferData(H.ARRAY_BUFFER,l.arrayBuffer,this.dynamicDraw?H.DYNAMIC_DRAW:H.STATIC_DRAW),this.dynamicDraw||delete l.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(o){if(o.length!==this.length)throw new Error(`Length of new data is ${o.length}, which doesn't match current length of ${this.length}`);const l=this.context.gl;this.bind(),l.bufferSubData(l.ARRAY_BUFFER,0,o.arrayBuffer)}enableAttributes(o,l){for(let O=0;O<this.attributes.length;O++){const j=this.attributes[O],H=l.attributes[j.name];H!==void 0&&o.enableVertexAttribArray(H)}}setVertexAttribPointers(o,l,O){for(let j=0;j<this.attributes.length;j++){const H=this.attributes[j],ie=l.attributes[H.name];ie!==void 0&&o.vertexAttribPointer(ie,H.components,o[ei[H.type]],!1,this.itemSize,H.offset+this.itemSize*(O||0))}}destroy(){const o=this.context.gl;this.buffer&&(o.deleteBuffer(this.buffer),delete this.buffer)}}const Mi=new WeakMap;function _a(F){var o;if(Mi.has(F))return Mi.get(F);{const l=(o=F.getParameter(F.VERSION))===null||o===void 0?void 0:o.startsWith("WebGL 2.0");return Mi.set(F,l),l}}class Li{constructor(o){this.gl=o.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(o){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class po extends Li{getDefault(){return t.aN.transparent}set(o){const l=this.current;(o.r!==l.r||o.g!==l.g||o.b!==l.b||o.a!==l.a||this.dirty)&&(this.gl.clearColor(o.r,o.g,o.b,o.a),this.current=o,this.dirty=!1)}}class Sa extends Li{getDefault(){return 1}set(o){(o!==this.current||this.dirty)&&(this.gl.clearDepth(o),this.current=o,this.dirty=!1)}}class Ua extends Li{getDefault(){return 0}set(o){(o!==this.current||this.dirty)&&(this.gl.clearStencil(o),this.current=o,this.dirty=!1)}}class Go extends Li{getDefault(){return[!0,!0,!0,!0]}set(o){const l=this.current;(o[0]!==l[0]||o[1]!==l[1]||o[2]!==l[2]||o[3]!==l[3]||this.dirty)&&(this.gl.colorMask(o[0],o[1],o[2],o[3]),this.current=o,this.dirty=!1)}}class Ni extends Li{getDefault(){return!0}set(o){(o!==this.current||this.dirty)&&(this.gl.depthMask(o),this.current=o,this.dirty=!1)}}class ro extends Li{getDefault(){return 255}set(o){(o!==this.current||this.dirty)&&(this.gl.stencilMask(o),this.current=o,this.dirty=!1)}}class Ts extends Li{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(o){const l=this.current;(o.func!==l.func||o.ref!==l.ref||o.mask!==l.mask||this.dirty)&&(this.gl.stencilFunc(o.func,o.ref,o.mask),this.current=o,this.dirty=!1)}}class $a extends Li{getDefault(){const o=this.gl;return[o.KEEP,o.KEEP,o.KEEP]}set(o){const l=this.current;(o[0]!==l[0]||o[1]!==l[1]||o[2]!==l[2]||this.dirty)&&(this.gl.stencilOp(o[0],o[1],o[2]),this.current=o,this.dirty=!1)}}class bl extends Li{getDefault(){return!1}set(o){if(o===this.current&&!this.dirty)return;const l=this.gl;o?l.enable(l.STENCIL_TEST):l.disable(l.STENCIL_TEST),this.current=o,this.dirty=!1}}class ds extends Li{getDefault(){return[0,1]}set(o){const l=this.current;(o[0]!==l[0]||o[1]!==l[1]||this.dirty)&&(this.gl.depthRange(o[0],o[1]),this.current=o,this.dirty=!1)}}class Mo extends Li{getDefault(){return!1}set(o){if(o===this.current&&!this.dirty)return;const l=this.gl;o?l.enable(l.DEPTH_TEST):l.disable(l.DEPTH_TEST),this.current=o,this.dirty=!1}}class _l extends Li{getDefault(){return this.gl.LESS}set(o){(o!==this.current||this.dirty)&&(this.gl.depthFunc(o),this.current=o,this.dirty=!1)}}class wl extends Li{getDefault(){return!1}set(o){if(o===this.current&&!this.dirty)return;const l=this.gl;o?l.enable(l.BLEND):l.disable(l.BLEND),this.current=o,this.dirty=!1}}class jl extends Li{getDefault(){const o=this.gl;return[o.ONE,o.ZERO]}set(o){const l=this.current;(o[0]!==l[0]||o[1]!==l[1]||this.dirty)&&(this.gl.blendFunc(o[0],o[1]),this.current=o,this.dirty=!1)}}class Ho extends Li{getDefault(){return t.aN.transparent}set(o){const l=this.current;(o.r!==l.r||o.g!==l.g||o.b!==l.b||o.a!==l.a||this.dirty)&&(this.gl.blendColor(o.r,o.g,o.b,o.a),this.current=o,this.dirty=!1)}}class nl extends Li{getDefault(){return this.gl.FUNC_ADD}set(o){(o!==this.current||this.dirty)&&(this.gl.blendEquation(o),this.current=o,this.dirty=!1)}}class ps extends Li{getDefault(){return!1}set(o){if(o===this.current&&!this.dirty)return;const l=this.gl;o?l.enable(l.CULL_FACE):l.disable(l.CULL_FACE),this.current=o,this.dirty=!1}}class Ca extends Li{getDefault(){return this.gl.BACK}set(o){(o!==this.current||this.dirty)&&(this.gl.cullFace(o),this.current=o,this.dirty=!1)}}class ho extends Li{getDefault(){return this.gl.CCW}set(o){(o!==this.current||this.dirty)&&(this.gl.frontFace(o),this.current=o,this.dirty=!1)}}class Tl extends Li{getDefault(){return null}set(o){(o!==this.current||this.dirty)&&(this.gl.useProgram(o),this.current=o,this.dirty=!1)}}class il extends Li{getDefault(){return this.gl.TEXTURE0}set(o){(o!==this.current||this.dirty)&&(this.gl.activeTexture(o),this.current=o,this.dirty=!1)}}class Us extends Li{getDefault(){const o=this.gl;return[0,0,o.drawingBufferWidth,o.drawingBufferHeight]}set(o){const l=this.current;(o[0]!==l[0]||o[1]!==l[1]||o[2]!==l[2]||o[3]!==l[3]||this.dirty)&&(this.gl.viewport(o[0],o[1],o[2],o[3]),this.current=o,this.dirty=!1)}}class kl extends Li{getDefault(){return null}set(o){if(o===this.current&&!this.dirty)return;const l=this.gl;l.bindFramebuffer(l.FRAMEBUFFER,o),this.current=o,this.dirty=!1}}class qs extends Li{getDefault(){return null}set(o){if(o===this.current&&!this.dirty)return;const l=this.gl;l.bindRenderbuffer(l.RENDERBUFFER,o),this.current=o,this.dirty=!1}}class Sl extends Li{getDefault(){return null}set(o){if(o===this.current&&!this.dirty)return;const l=this.gl;l.bindTexture(l.TEXTURE_2D,o),this.current=o,this.dirty=!1}}class Cl extends Li{getDefault(){return null}set(o){if(o===this.current&&!this.dirty)return;const l=this.gl;l.bindBuffer(l.ARRAY_BUFFER,o),this.current=o,this.dirty=!1}}class al extends Li{getDefault(){return null}set(o){const l=this.gl;l.bindBuffer(l.ELEMENT_ARRAY_BUFFER,o),this.current=o,this.dirty=!1}}class Ao extends Li{getDefault(){return null}set(o){var l;if(o===this.current&&!this.dirty)return;const O=this.gl;_a(O)?O.bindVertexArray(o):(l=O.getExtension("OES_vertex_array_object"))===null||l===void 0||l.bindVertexArrayOES(o),this.current=o,this.dirty=!1}}class qc extends Li{getDefault(){return 4}set(o){if(o===this.current&&!this.dirty)return;const l=this.gl;l.pixelStorei(l.UNPACK_ALIGNMENT,o),this.current=o,this.dirty=!1}}class Nc extends Li{getDefault(){return!1}set(o){if(o===this.current&&!this.dirty)return;const l=this.gl;l.pixelStorei(l.UNPACK_PREMULTIPLY_ALPHA_WEBGL,o),this.current=o,this.dirty=!1}}class Ul extends Li{getDefault(){return!1}set(o){if(o===this.current&&!this.dirty)return;const l=this.gl;l.pixelStorei(l.UNPACK_FLIP_Y_WEBGL,o),this.current=o,this.dirty=!1}}class Wc extends Li{constructor(o,l){super(o),this.context=o,this.parent=l}getDefault(){return null}}class gu extends Wc{setDirty(){this.dirty=!0}set(o){if(o===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const l=this.gl;l.framebufferTexture2D(l.FRAMEBUFFER,l.COLOR_ATTACHMENT0,l.TEXTURE_2D,o,0),this.current=o,this.dirty=!1}}class ks extends Wc{set(o){if(o===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const l=this.gl;l.framebufferRenderbuffer(l.FRAMEBUFFER,l.DEPTH_ATTACHMENT,l.RENDERBUFFER,o),this.current=o,this.dirty=!1}}class yu extends Wc{set(o){if(o===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const l=this.gl;l.framebufferRenderbuffer(l.FRAMEBUFFER,l.DEPTH_STENCIL_ATTACHMENT,l.RENDERBUFFER,o),this.current=o,this.dirty=!1}}class td{constructor(o,l,O,j,H){this.context=o,this.width=l,this.height=O;const ie=o.gl,he=this.framebuffer=ie.createFramebuffer();if(this.colorAttachment=new gu(o,he),j)this.depthAttachment=H?new yu(o,he):new ks(o,he);else if(H)throw new Error("Stencil cannot be set without depth");if(ie.checkFramebufferStatus(ie.FRAMEBUFFER)!==ie.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer is not complete")}destroy(){const o=this.context.gl,l=this.colorAttachment.get();if(l&&o.deleteTexture(l),this.depthAttachment){const O=this.depthAttachment.get();O&&o.deleteRenderbuffer(O)}o.deleteFramebuffer(this.framebuffer)}}class no{constructor(o,l,O){this.blendFunction=o,this.blendColor=l,this.mask=O}}no.Replace=[1,0],no.disabled=new no(no.Replace,t.aN.transparent,[!1,!1,!1,!1]),no.unblended=new no(no.Replace,t.aN.transparent,[!0,!0,!0,!0]),no.alphaBlended=new no([1,771],t.aN.transparent,[!0,!0,!0,!0]);class hc{constructor(o){var l,O;if(this.gl=o,this.clearColor=new po(this),this.clearDepth=new Sa(this),this.clearStencil=new Ua(this),this.colorMask=new Go(this),this.depthMask=new Ni(this),this.stencilMask=new ro(this),this.stencilFunc=new Ts(this),this.stencilOp=new $a(this),this.stencilTest=new bl(this),this.depthRange=new ds(this),this.depthTest=new Mo(this),this.depthFunc=new _l(this),this.blend=new wl(this),this.blendFunc=new jl(this),this.blendColor=new Ho(this),this.blendEquation=new nl(this),this.cullFace=new ps(this),this.cullFaceSide=new Ca(this),this.frontFace=new ho(this),this.program=new Tl(this),this.activeTexture=new il(this),this.viewport=new Us(this),this.bindFramebuffer=new kl(this),this.bindRenderbuffer=new qs(this),this.bindTexture=new Sl(this),this.bindVertexBuffer=new Cl(this),this.bindElementBuffer=new al(this),this.bindVertexArray=new Ao(this),this.pixelStoreUnpack=new qc(this),this.pixelStoreUnpackPremultiplyAlpha=new Nc(this),this.pixelStoreUnpackFlipY=new Ul(this),this.extTextureFilterAnisotropic=o.getExtension("EXT_texture_filter_anisotropic")||o.getExtension("MOZ_EXT_texture_filter_anisotropic")||o.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=o.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=o.getParameter(o.MAX_TEXTURE_SIZE),_a(o)){this.HALF_FLOAT=o.HALF_FLOAT;const j=o.getExtension("EXT_color_buffer_half_float");this.RGBA16F=(l=o.RGBA16F)!==null&&l!==void 0?l:j==null?void 0:j.RGBA16F_EXT,this.RGB16F=(O=o.RGB16F)!==null&&O!==void 0?O:j==null?void 0:j.RGB16F_EXT,o.getExtension("EXT_color_buffer_float")}else{o.getExtension("EXT_color_buffer_half_float"),o.getExtension("OES_texture_half_float_linear");const j=o.getExtension("OES_texture_half_float");this.HALF_FLOAT=j==null?void 0:j.HALF_FLOAT_OES}}setDefault(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}setDirty(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.bindVertexArray.dirty=!0,this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0}createIndexBuffer(o,l){return new Pn(this,o,l)}createVertexBuffer(o,l,O){return new bi(this,o,l,O)}createRenderbuffer(o,l,O){const j=this.gl,H=j.createRenderbuffer();return this.bindRenderbuffer.set(H),j.renderbufferStorage(j.RENDERBUFFER,o,l,O),this.bindRenderbuffer.set(null),H}createFramebuffer(o,l,O,j){return new td(this,o,l,O,j)}clear({color:o,depth:l,stencil:O}){const j=this.gl;let H=0;o&&(H|=j.COLOR_BUFFER_BIT,this.clearColor.set(o),this.colorMask.set([!0,!0,!0,!0])),l!==void 0&&(H|=j.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(l),this.depthMask.set(!0)),O!==void 0&&(H|=j.STENCIL_BUFFER_BIT,this.clearStencil.set(O),this.stencilMask.set(255)),j.clear(H)}setCullFace(o){o.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(o.mode),this.frontFace.set(o.frontFace))}setDepthMode(o){o.func!==this.gl.ALWAYS||o.mask?(this.depthTest.set(!0),this.depthFunc.set(o.func),this.depthMask.set(o.mask),this.depthRange.set(o.range)):this.depthTest.set(!1)}setStencilMode(o){o.test.func!==this.gl.ALWAYS||o.mask?(this.stencilTest.set(!0),this.stencilMask.set(o.mask),this.stencilOp.set([o.fail,o.depthFail,o.pass]),this.stencilFunc.set({func:o.test.func,ref:o.ref,mask:o.test.mask})):this.stencilTest.set(!1)}setColorMode(o){t.aF(o.blendFunction,no.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(o.blendFunction),this.blendColor.set(o.blendColor)),this.colorMask.set(o.mask)}createVertexArray(){var o;return _a(this.gl)?this.gl.createVertexArray():(o=this.gl.getExtension("OES_vertex_array_object"))===null||o===void 0?void 0:o.createVertexArrayOES()}deleteVertexArray(o){var l;return _a(this.gl)?this.gl.deleteVertexArray(o):(l=this.gl.getExtension("OES_vertex_array_object"))===null||l===void 0?void 0:l.deleteVertexArrayOES(o)}unbindVAO(){this.bindVertexArray.set(null)}}class Ui{constructor(o,l,O){this.func=o,this.mask=l,this.range=O}}Ui.ReadOnly=!1,Ui.ReadWrite=!0,Ui.disabled=new Ui(519,Ui.ReadOnly,[0,1]);const ql=7680;class wa{constructor(o,l,O,j,H,ie){this.test=o,this.ref=l,this.mask=O,this.fail=j,this.depthFail=H,this.pass=ie}}wa.disabled=new wa({func:519,mask:0},0,0,ql,ql,ql);class Ta{constructor(o,l,O){this.enable=o,this.mode=l,this.frontFace=O}}let Ss;function rs(F,o,l,O,j){const H=F.context,ie=H.gl,he=F.useProgram("collisionBox"),we=[];let Ee=0,De=0;for(let At=0;At<O.length;At++){const Et=O[At],Ut=o.getTile(Et).getBucket(l);if(!Ut)continue;const Mt=j?Ut.textCollisionBox:Ut.iconCollisionBox,Xt=Ut.collisionCircleArray;if(Xt.length>0){const Qt=t.H();t.aR(Qt,Ut.placementInvProjMatrix,F.transform.glCoordMatrix),t.aR(Qt,Qt,Ut.placementViewportMatrix),we.push({circleArray:Xt,circleOffset:De,transform:Et.posMatrix,invTransform:Qt,coord:Et}),Ee+=Xt.length/4,De=Ee}Mt&&he.draw(H,ie.LINES,Ui.disabled,wa.disabled,F.colorModeForRenderPass(),Ta.disabled,tr(F.transform,Et.posMatrix),F.style.map.terrain&&F.style.map.terrain.getTerrainData(Et),l.id,Mt.layoutVertexBuffer,Mt.indexBuffer,Mt.segments,null,F.transform.zoom,null,null,Mt.collisionVertexBuffer)}if(!j||!we.length)return;const qe=F.useProgram("collisionCircle"),it=new t.aS;it.resize(4*Ee),it._trim();let ut=0;for(const At of we)for(let Et=0;Et<At.circleArray.length/4;Et++){const Ut=4*Et,Mt=At.circleArray[Ut+0],Xt=At.circleArray[Ut+1],Qt=At.circleArray[Ut+2],Zt=At.circleArray[Ut+3];it.emplace(ut++,Mt,Xt,Qt,Zt,0),it.emplace(ut++,Mt,Xt,Qt,Zt,1),it.emplace(ut++,Mt,Xt,Qt,Zt,2),it.emplace(ut++,Mt,Xt,Qt,Zt,3)}(!Ss||Ss.length<2*Ee)&&(Ss=(function(At){const Et=2*At,Ut=new t.aU;Ut.resize(Et),Ut._trim();for(let Mt=0;Mt<Et;Mt++){const Xt=6*Mt;Ut.uint16[Xt+0]=4*Mt+0,Ut.uint16[Xt+1]=4*Mt+1,Ut.uint16[Xt+2]=4*Mt+2,Ut.uint16[Xt+3]=4*Mt+2,Ut.uint16[Xt+4]=4*Mt+3,Ut.uint16[Xt+5]=4*Mt+0}return Ut})(Ee));const ht=H.createIndexBuffer(Ss,!0),bt=H.createVertexBuffer(it,t.aT.members,!0);for(const At of we){const Et=or(At.transform,At.invTransform,F.transform);qe.draw(H,ie.TRIANGLES,Ui.disabled,wa.disabled,F.colorModeForRenderPass(),Ta.disabled,Et,F.style.map.terrain&&F.style.map.terrain.getTerrainData(At.coord),l.id,bt,ht,t.a0.simpleSegment(0,2*At.circleOffset,At.circleArray.length,At.circleArray.length/2),null,F.transform.zoom,null,null,null)}bt.destroy(),ht.destroy()}Ta.disabled=new Ta(!1,1029,2305),Ta.backCCW=new Ta(!0,1029,2305);const fc=t.ao(new Float32Array(16));function El(F,o,l,O,j){if(F.renderPass!=="translucent")return;const H=wa.disabled,ie=F.colorModeForRenderPass();(l._unevaluatedLayout.hasValue("text-variable-anchor")||l._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&(function(he,we,Ee,De,qe,it,ut,ht,bt){const At=we.transform,Et=Er(),Ut=qe==="map",Mt=it==="map";for(const Xt of he){const Qt=De.getTile(Xt),Zt=Qt.getBucket(Ee);if(!Zt||!Zt.text||!Zt.text.segments.get().length)continue;const pr=Zt.textSizeData,Tr=t.ah(pr,At.zoom),Br=wt(Qt,1,we.transform.zoom),Dr=Nt(Xt.posMatrix,Mt,Ut,we.transform,Br),Gr=Ee.layout.get("icon-text-fit")!=="none"&&Zt.hasIconData();if(Tr){const Zr=Math.pow(2,At.zoom-Qt.tileID.overscaledZ),vn=we.style.map.terrain?(bn,on)=>we.style.map.terrain.getElevation(Xt,bn,on):null,$r=Et.translatePosition(At,Qt,ut,ht);bo(Zt,Ut,Mt,bt,At,Dr,Xt.posMatrix,Zr,Tr,Gr,Et,$r,Xt.toUnwrapped(),vn)}}})(O,F,l,o,l.layout.get("text-rotation-alignment"),l.layout.get("text-pitch-alignment"),l.paint.get("text-translate"),l.paint.get("text-translate-anchor"),j),l.paint.get("icon-opacity").constantOr(1)!==0&&tc(F,o,l,O,!1,l.paint.get("icon-translate"),l.paint.get("icon-translate-anchor"),l.layout.get("icon-rotation-alignment"),l.layout.get("icon-pitch-alignment"),l.layout.get("icon-keep-upright"),H,ie),l.paint.get("text-opacity").constantOr(1)!==0&&tc(F,o,l,O,!0,l.paint.get("text-translate"),l.paint.get("text-translate-anchor"),l.layout.get("text-rotation-alignment"),l.layout.get("text-pitch-alignment"),l.layout.get("text-keep-upright"),H,ie),o.map.showCollisionBoxes&&(rs(F,o,l,O,!0),rs(F,o,l,O,!1))}function ns(F,o,l,O,j,H){const{horizontalAlign:ie,verticalAlign:he}=t.av(F),we=-(ie-.5)*o,Ee=-(he-.5)*l;return new t.P((we/j+O[0])*H,(Ee/j+O[1])*H)}function hs(F,o,l,O,j,H){const ie=o.tileAnchorPoint.add(new t.P(o.translation[0],o.translation[1]));if(o.pitchWithMap){let he=O.mult(H);return l||(he=he.rotate(-j)),Dt(ie.add(he),o.labelPlaneMatrix,o.getElevation).point}if(l){const he=Je(o.tileAnchorPoint.x+1,o.tileAnchorPoint.y,o).point.sub(F),we=Math.atan(he.y/he.x)+(he.x<0?Math.PI:0);return F.add(O.rotate(we))}return F.add(O)}function bo(F,o,l,O,j,H,ie,he,we,Ee,De,qe,it,ut){const ht=F.text.placedSymbolArray,bt=F.text.dynamicLayoutVertexArray,At=F.icon.dynamicLayoutVertexArray,Et={};bt.clear();for(let Ut=0;Ut<ht.length;Ut++){const Mt=ht.get(Ut),Xt=F.allowVerticalPlacement&&!Mt.placedOrientation,Qt=Mt.hidden||!Mt.crossTileID||Xt?null:O[Mt.crossTileID];if(Qt){const Zt=new t.P(Mt.anchorX,Mt.anchorY),pr={getElevation:ut,width:j.width,height:j.height,labelPlaneMatrix:H,pitchWithMap:l,projection:De,tileAnchorPoint:Zt,translation:qe,unwrappedTileID:it},Tr=l?Dt(Zt,ie,ut):Je(Zt.x,Zt.y,pr),Br=at(j.cameraToCenterDistance,Tr.signedDistanceFromCamera);let Dr=t.aj(F.textSizeData,we,Mt)*Br/t.aq;l&&(Dr*=F.tilePixelRatio/he);const{width:Gr,height:Zr,anchor:vn,textOffset:$r,textBoxScale:bn}=Qt,on=ns(vn,Gr,Zr,$r,bn,Dr),Sn=De.getPitchedTextCorrection(j,Zt.add(new t.P(qe[0],qe[1])),it),mn=hs(Tr.point,pr,o,on,j.angle,Sn),Rn=F.allowVerticalPlacement&&Mt.placedOrientation===t.ai.vertical?Math.PI/2:0;for(let ri=0;ri<Mt.numGlyphs;ri++)t.ak(bt,mn,Rn);Ee&&Mt.associatedIconIndex>=0&&(Et[Mt.associatedIconIndex]={shiftedAnchor:mn,angle:Rn})}else Lt(Mt.numGlyphs,bt)}if(Ee){At.clear();const Ut=F.icon.placedSymbolArray;for(let Mt=0;Mt<Ut.length;Mt++){const Xt=Ut.get(Mt);if(Xt.hidden)Lt(Xt.numGlyphs,At);else{const Qt=Et[Mt];if(Qt)for(let Zt=0;Zt<Xt.numGlyphs;Zt++)t.ak(At,Qt.shiftedAnchor,Qt.angle);else Lt(Xt.numGlyphs,At)}}F.icon.dynamicLayoutVertexBuffer.updateData(At)}F.text.dynamicLayoutVertexBuffer.updateData(bt)}function Xi(F,o,l){return l.iconsInText&&o?"symbolTextAndIcon":F?"symbolSDF":"symbolIcon"}function tc(F,o,l,O,j,H,ie,he,we,Ee,De,qe){const it=F.context,ut=it.gl,ht=F.transform,bt=Er(),At=he==="map",Et=we==="map",Ut=he!=="viewport"&&l.layout.get("symbol-placement")!=="point",Mt=At&&!Et&&!Ut,Xt=!Et&&Ut,Qt=!l.layout.get("symbol-sort-key").isConstant();let Zt=!1;const pr=F.depthModeForSublayer(0,Ui.ReadOnly),Tr=l._unevaluatedLayout.hasValue("text-variable-anchor")||l._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Br=[],Dr=bt.getCircleRadiusCorrection(ht);for(const Gr of O){const Zr=o.getTile(Gr),vn=Zr.getBucket(l);if(!vn)continue;const $r=j?vn.text:vn.icon;if(!$r||!$r.segments.get().length||!$r.hasVisibleVertices)continue;const bn=$r.programConfigurations.get(l.id),on=j||vn.sdfIcons,Sn=j?vn.textSizeData:vn.iconSizeData,mn=Et||ht.pitch!==0,Rn=F.useProgram(Xi(on,j,vn),bn),ri=t.ah(Sn,ht.zoom),An=F.style.map.terrain&&F.style.map.terrain.getTerrainData(Gr);let $n,di,Pi,Si,Di=[0,0],zi=null;if(j){if(di=Zr.glyphAtlasTexture,Pi=ut.LINEAR,$n=Zr.glyphAtlasTexture.size,vn.iconsInText){Di=Zr.imageAtlasTexture.size,zi=Zr.imageAtlasTexture;const Oi=Sn.kind==="composite"||Sn.kind==="camera";Si=mn||F.options.rotating||F.options.zooming||Oi?ut.LINEAR:ut.NEAREST}}else{const Oi=l.layout.get("icon-size").constantOr(0)!==1||vn.iconsNeedLinear;di=Zr.imageAtlasTexture,Pi=on||F.options.rotating||F.options.zooming||Oi||mn?ut.LINEAR:ut.NEAREST,$n=Zr.imageAtlasTexture.size}const qi=wt(Zr,1,F.transform.zoom),ta=Xt?Gr.posMatrix:fc,qa=Nt(ta,Et,At,F.transform,qi),za=Ft(ta,Et,At,F.transform,qi),so=Ft(Gr.posMatrix,Et,At,F.transform,qi),na=bt.translatePosition(F.transform,Zr,H,ie),Hi=Tr&&vn.hasTextData(),Aa=l.layout.get("icon-text-fit")!=="none"&&Hi&&vn.hasIconData();if(Ut){const Oi=F.style.map.terrain?(eo,gs)=>F.style.map.terrain.getElevation(Gr,eo,gs):null,ko=l.layout.get("text-rotation-alignment")==="map";ct(vn,Gr.posMatrix,F,j,qa,so,Et,Ee,ko,bt,Gr.toUnwrapped(),ht.width,ht.height,na,Oi)}const sa=Gr.posMatrix,Qi=j&&Tr||Aa,ia=Ut||Qi?fc:qa,ba=za,Ji=on&&l.paint.get(j?"text-halo-width":"icon-halo-width").constantOr(1)!==0;let zs;zs=on?vn.iconsInText?En(Sn.kind,ri,Mt,Et,Ut,Qi,F,sa,ia,ba,na,$n,Di,Dr):_n(Sn.kind,ri,Mt,Et,Ut,Qi,F,sa,ia,ba,na,j,$n,!0,Dr):Ln(Sn.kind,ri,Mt,Et,Ut,Qi,F,sa,ia,ba,na,j,$n,Dr);const Ja={program:Rn,buffers:$r,uniformValues:zs,atlasTexture:di,atlasTextureIcon:zi,atlasInterpolation:Pi,atlasInterpolationIcon:Si,isSDF:on,hasHalo:Ji};if(Qt&&vn.canOverlap){Zt=!0;const Oi=$r.segments.get();for(const ko of Oi)Br.push({segments:new t.a0([ko]),sortKey:ko.sortKey,state:Ja,terrainData:An})}else Br.push({segments:$r.segments,sortKey:0,state:Ja,terrainData:An})}Zt&&Br.sort((Gr,Zr)=>Gr.sortKey-Zr.sortKey);for(const Gr of Br){const Zr=Gr.state;if(it.activeTexture.set(ut.TEXTURE0),Zr.atlasTexture.bind(Zr.atlasInterpolation,ut.CLAMP_TO_EDGE),Zr.atlasTextureIcon&&(it.activeTexture.set(ut.TEXTURE1),Zr.atlasTextureIcon&&Zr.atlasTextureIcon.bind(Zr.atlasInterpolationIcon,ut.CLAMP_TO_EDGE)),Zr.isSDF){const vn=Zr.uniformValues;Zr.hasHalo&&(vn.u_is_halo=1,vu(Zr.buffers,Gr.segments,l,F,Zr.program,pr,De,qe,vn,Gr.terrainData)),vn.u_is_halo=0}vu(Zr.buffers,Gr.segments,l,F,Zr.program,pr,De,qe,Zr.uniformValues,Gr.terrainData)}}function vu(F,o,l,O,j,H,ie,he,we,Ee){const De=O.context,qe=De.gl;j.draw(De,qe.TRIANGLES,H,ie,he,Ta.disabled,we,Ee,l.id,F.layoutVertexBuffer,F.indexBuffer,o,l.paint,O.transform.zoom,F.programConfigurations.get(l.id),F.dynamicLayoutVertexBuffer,F.opacityVertexBuffer)}function Ml(F,o,l,O){if(l.paint.get("heatmap-opacity")!==0)if(F.renderPass==="offscreen"){const j=F.context,H=j.gl,ie=wa.disabled,he=new no([H.ONE,H.ONE],t.aN.transparent,[!0,!0,!0,!0]);(function(we,Ee,De){const qe=we.gl;we.activeTexture.set(qe.TEXTURE1),we.viewport.set([0,0,Ee.width/4,Ee.height/4]);let it=De.heatmapFbo;if(it)qe.bindTexture(qe.TEXTURE_2D,it.colorAttachment.get()),we.bindFramebuffer.set(it.framebuffer);else{const ut=qe.createTexture();qe.bindTexture(qe.TEXTURE_2D,ut),qe.texParameteri(qe.TEXTURE_2D,qe.TEXTURE_WRAP_S,qe.CLAMP_TO_EDGE),qe.texParameteri(qe.TEXTURE_2D,qe.TEXTURE_WRAP_T,qe.CLAMP_TO_EDGE),qe.texParameteri(qe.TEXTURE_2D,qe.TEXTURE_MIN_FILTER,qe.LINEAR),qe.texParameteri(qe.TEXTURE_2D,qe.TEXTURE_MAG_FILTER,qe.LINEAR),it=De.heatmapFbo=we.createFramebuffer(Ee.width/4,Ee.height/4,!1,!1),(function(ht,bt,At,Et){var Ut,Mt;const Xt=ht.gl,Qt=(Ut=ht.HALF_FLOAT)!==null&&Ut!==void 0?Ut:Xt.UNSIGNED_BYTE,Zt=(Mt=ht.RGBA16F)!==null&&Mt!==void 0?Mt:Xt.RGBA;Xt.texImage2D(Xt.TEXTURE_2D,0,Zt,bt.width/4,bt.height/4,0,Xt.RGBA,Qt,null),Et.colorAttachment.set(At)})(we,Ee,ut,it)}})(j,F,l),j.clear({color:t.aN.transparent});for(let we=0;we<O.length;we++){const Ee=O[we];if(o.hasRenderableParent(Ee))continue;const De=o.getTile(Ee),qe=De.getBucket(l);if(!qe)continue;const it=qe.programConfigurations.get(l.id),ut=F.useProgram("heatmap",it),{zoom:ht}=F.transform;ut.draw(j,H.TRIANGLES,Ui.disabled,ie,he,Ta.disabled,Or(Ee.posMatrix,De,ht,l.paint.get("heatmap-intensity")),null,l.id,qe.layoutVertexBuffer,qe.indexBuffer,qe.segments,l.paint,F.transform.zoom,it)}j.viewport.set([0,0,F.width,F.height])}else F.renderPass==="translucent"&&(F.context.setColorMode(F.colorModeForRenderPass()),(function(j,H){const ie=j.context,he=ie.gl,we=H.heatmapFbo;if(!we)return;ie.activeTexture.set(he.TEXTURE0),he.bindTexture(he.TEXTURE_2D,we.colorAttachment.get()),ie.activeTexture.set(he.TEXTURE1);let Ee=H.colorRampTexture;Ee||(Ee=H.colorRampTexture=new I(ie,H.colorRamp,he.RGBA)),Ee.bind(he.LINEAR,he.CLAMP_TO_EDGE),j.useProgram("heatmapTexture").draw(ie,he.TRIANGLES,Ui.disabled,wa.disabled,j.colorModeForRenderPass(),Ta.disabled,Jr(j,H,0,1),null,H.id,j.viewportBuffer,j.quadTriangleIndexBuffer,j.viewportSegments,H.paint,j.transform.zoom)})(F,l))}function Al(F,o,l,O,j){if(!l||!O||!O.imageAtlas)return;const H=O.imageAtlas.patternPositions;let ie=H[l.to.toString()],he=H[l.from.toString()];if(!ie&&he&&(ie=he),!he&&ie&&(he=ie),!ie||!he){const we=j.getPaintProperty(o);ie=H[we],he=H[we]}ie&&he&&F.setConstantPatternPositions(ie,he)}function Ic(F,o,l,O,j,H,ie){const he=F.context.gl,we="fill-pattern",Ee=l.paint.get(we),De=Ee&&Ee.constantOr(1),qe=l.getCrossfadeParameters();let it,ut,ht,bt,At;ie?(ut=De&&!l.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",it=he.LINES):(ut=De?"fillPattern":"fill",it=he.TRIANGLES);const Et=Ee.constantOr(null);for(const Ut of O){const Mt=o.getTile(Ut);if(De&&!Mt.patternsLoaded())continue;const Xt=Mt.getBucket(l);if(!Xt)continue;const Qt=Xt.programConfigurations.get(l.id),Zt=F.useProgram(ut,Qt),pr=F.style.map.terrain&&F.style.map.terrain.getTerrainData(Ut);De&&(F.context.activeTexture.set(he.TEXTURE0),Mt.imageAtlasTexture.bind(he.LINEAR,he.CLAMP_TO_EDGE),Qt.updatePaintBuffers(qe)),Al(Qt,we,Et,Mt,l);const Tr=pr?Ut:null,Br=Tr?Tr.posMatrix:Ut.posMatrix,Dr=F.translatePosMatrix(Br,Mt,l.paint.get("fill-translate"),l.paint.get("fill-translate-anchor"));if(ie){bt=Xt.indexBuffer2,At=Xt.segments2;const Gr=[he.drawingBufferWidth,he.drawingBufferHeight];ht=ut==="fillOutlinePattern"&&De?gr(Dr,F,qe,Mt,Gr):Qn(Dr,Gr)}else bt=Xt.indexBuffer,At=Xt.segments,ht=De?In(Dr,F,qe,Mt):yn(Dr);Zt.draw(F.context,it,j,F.stencilModeForClipping(Ut),H,Ta.disabled,ht,pr,l.id,Xt.layoutVertexBuffer,bt,At,l.paint,F.transform.zoom,Qt)}}function mc(F,o,l,O,j,H,ie){const he=F.context,we=he.gl,Ee="fill-extrusion-pattern",De=l.paint.get(Ee),qe=De.constantOr(1),it=l.getCrossfadeParameters(),ut=l.paint.get("fill-extrusion-opacity"),ht=De.constantOr(null);for(const bt of O){const At=o.getTile(bt),Et=At.getBucket(l);if(!Et)continue;const Ut=F.style.map.terrain&&F.style.map.terrain.getTerrainData(bt),Mt=Et.programConfigurations.get(l.id),Xt=F.useProgram(qe?"fillExtrusionPattern":"fillExtrusion",Mt);qe&&(F.context.activeTexture.set(we.TEXTURE0),At.imageAtlasTexture.bind(we.LINEAR,we.CLAMP_TO_EDGE),Mt.updatePaintBuffers(it)),Al(Mt,Ee,ht,At,l);const Qt=F.translatePosMatrix(bt.posMatrix,At,l.paint.get("fill-extrusion-translate"),l.paint.get("fill-extrusion-translate-anchor")),Zt=l.paint.get("fill-extrusion-vertical-gradient"),pr=qe?xn(Qt,F,Zt,ut,bt,it,At):an(Qt,F,Zt,ut);Xt.draw(he,he.gl.TRIANGLES,j,H,ie,Ta.backCCW,pr,Ut,l.id,Et.layoutVertexBuffer,Et.indexBuffer,Et.segments,l.paint,F.transform.zoom,Mt,F.style.map.terrain&&Et.centroidVertexBuffer)}}function gc(F,o,l,O,j,H,ie){const he=F.context,we=he.gl,Ee=l.fbo;if(!Ee)return;const De=F.useProgram("hillshade"),qe=F.style.map.terrain&&F.style.map.terrain.getTerrainData(o);he.activeTexture.set(we.TEXTURE0),we.bindTexture(we.TEXTURE_2D,Ee.colorAttachment.get());const it=qe?o:null;De.draw(he,we.TRIANGLES,j,H,ie,Ta.disabled,Fr(F,l,O,it),qe,O.id,F.rasterBoundsBuffer,F.quadTriangleIndexBuffer,F.rasterBoundsSegments)}function Au(F,o,l,O,j,H){const ie=F.context,he=ie.gl,we=o.dem;if(we&&we.data){const Ee=we.dim,De=we.stride,qe=we.getPixels();if(ie.activeTexture.set(he.TEXTURE1),ie.pixelStoreUnpackPremultiplyAlpha.set(!1),o.demTexture=o.demTexture||F.getTileTexture(De),o.demTexture){const ut=o.demTexture;ut.update(qe,{premultiply:!1}),ut.bind(he.NEAREST,he.CLAMP_TO_EDGE)}else o.demTexture=new I(ie,qe,he.RGBA,{premultiply:!1}),o.demTexture.bind(he.NEAREST,he.CLAMP_TO_EDGE);ie.activeTexture.set(he.TEXTURE0);let it=o.fbo;if(!it){const ut=new I(ie,{width:Ee,height:Ee,data:null},he.RGBA);ut.bind(he.LINEAR,he.CLAMP_TO_EDGE),it=o.fbo=ie.createFramebuffer(Ee,Ee,!0,!1),it.colorAttachment.set(ut.texture)}ie.bindFramebuffer.set(it.framebuffer),ie.viewport.set([0,0,Ee,Ee]),F.useProgram("hillshadePrepare").draw(ie,he.TRIANGLES,O,j,H,Ta.disabled,Rr(o.tileID,we),null,l.id,F.rasterBoundsBuffer,F.quadTriangleIndexBuffer,F.rasterBoundsSegments),o.needsHillshadePrepare=!1}}function Cs(F,o,l,O,j,H){const ie=O.paint.get("raster-fade-duration");if(!H&&ie>0){const he=p.now(),we=(he-F.timeAdded)/ie,Ee=o?(he-o.timeAdded)/ie:-1,De=l.getSource(),qe=j.coveringZoomLevel({tileSize:De.tileSize,roundZoom:De.roundZoom}),it=!o||Math.abs(o.tileID.overscaledZ-qe)>Math.abs(F.tileID.overscaledZ-qe),ut=it&&F.refreshedUponExpiration?1:t.ad(it?we:1-Ee,0,1);return F.refreshedUponExpiration&&we>=1&&(F.refreshedUponExpiration=!1),o?{opacity:1,mix:1-ut}:{opacity:ut,mix:0}}return{opacity:1,mix:0}}const Ws=new t.aN(1,0,0,1),Ll=new t.aN(0,1,0,1),Es=new t.aN(0,0,1,1),Yi=new t.aN(1,0,1,1),Gc=new t.aN(0,1,1,1);function Hc(F){const o=F.transform.padding;Pc(F,F.transform.height-(o.top||0),3,Ws),Pc(F,o.bottom||0,3,Ll),Lo(F,o.left||0,3,Es),Lo(F,F.transform.width-(o.right||0),3,Yi);const l=F.transform.centerPoint;(function(O,j,H,ie){yc(O,j-1,H-10,2,20,ie),yc(O,j-10,H-1,20,2,ie)})(F,l.x,F.transform.height-l.y,Gc)}function Pc(F,o,l,O){yc(F,0,o+l/2,F.transform.width,l,O)}function Lo(F,o,l,O){yc(F,o-l/2,0,l,F.transform.height,O)}function yc(F,o,l,O,j,H){const ie=F.context,he=ie.gl;he.enable(he.SCISSOR_TEST),he.scissor(o*F.pixelRatio,l*F.pixelRatio,O*F.pixelRatio,j*F.pixelRatio),ie.clear({color:H}),he.disable(he.SCISSOR_TEST)}function Pu(F,o,l){const O=F.context,j=O.gl,H=l.posMatrix,ie=F.useProgram("debug"),he=Ui.disabled,we=wa.disabled,Ee=F.colorModeForRenderPass(),De="$debug",qe=F.style.map.terrain&&F.style.map.terrain.getTerrainData(l);O.activeTexture.set(j.TEXTURE0);const it=o.getTileByID(l.key).latestRawTileData,ut=it&&it.byteLength||0,ht=Math.floor(ut/1024),bt=o.getTile(l).tileSize,At=512/Math.min(bt,512)*(l.overscaledZ/F.transform.zoom)*.5;let Et=l.canonical.toString();l.overscaledZ!==l.canonical.z&&(Et+=` => ${l.overscaledZ}`),(function(Ut,Mt){Ut.initDebugOverlayCanvas();const Xt=Ut.debugOverlayCanvas,Qt=Ut.context.gl,Zt=Ut.debugOverlayCanvas.getContext("2d");Zt.clearRect(0,0,Xt.width,Xt.height),Zt.shadowColor="white",Zt.shadowBlur=2,Zt.lineWidth=1.5,Zt.strokeStyle="white",Zt.textBaseline="top",Zt.font="bold 36px Open Sans, sans-serif",Zt.fillText(Mt,5,5),Zt.strokeText(Mt,5,5),Ut.debugOverlayTexture.update(Xt),Ut.debugOverlayTexture.bind(Qt.LINEAR,Qt.CLAMP_TO_EDGE)})(F,`${Et} ${ht}kB`),ie.draw(O,j.TRIANGLES,he,we,no.alphaBlended,Ta.disabled,yr(H,t.aN.transparent,At),null,De,F.debugBuffer,F.quadTriangleIndexBuffer,F.debugSegments),ie.draw(O,j.LINE_STRIP,he,we,Ee,Ta.disabled,yr(H,t.aN.red),qe,De,F.debugBuffer,F.tileBorderIndexBuffer,F.debugSegments)}function rc(F,o,l){const O=F.context,j=O.gl,H=F.colorModeForRenderPass(),ie=new Ui(j.LEQUAL,Ui.ReadWrite,F.depthRangeFor3D),he=F.useProgram("terrain"),we=o.getTerrainMesh();O.bindFramebuffer.set(null),O.viewport.set([0,0,F.width,F.height]);for(const Ee of l){const De=F.renderToTexture.getTexture(Ee),qe=o.getTerrainData(Ee.tileID);O.activeTexture.set(j.TEXTURE0),j.bindTexture(j.TEXTURE_2D,De.texture);const it=F.transform.calculatePosMatrix(Ee.tileID.toUnwrapped()),ut=o.getMeshFrameDelta(F.transform.zoom),ht=F.transform.calculateFogMatrix(Ee.tileID.toUnwrapped()),bt=br(it,ut,ht,F.style.sky,F.transform.pitch);he.draw(O,j.TRIANGLES,ie,wa.disabled,H,Ta.backCCW,bt,qe,"terrain",we.vertexBuffer,we.indexBuffer,we.segments)}}class nc{constructor(o,l,O){this.vertexBuffer=o,this.indexBuffer=l,this.segments=O}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}class ic{constructor(o,l){this.context=new hc(o),this.transform=l,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:t.ao(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=He.maxUnderzooming+He.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new en}resize(o,l,O){if(this.width=Math.floor(o*O),this.height=Math.floor(l*O),this.pixelRatio=O,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const j of this.style._order)this.style._layers[j].resize()}setup(){const o=this.context,l=new t.aX;l.emplaceBack(0,0),l.emplaceBack(t.X,0),l.emplaceBack(0,t.X),l.emplaceBack(t.X,t.X),this.tileExtentBuffer=o.createVertexBuffer(l,pn.members),this.tileExtentSegments=t.a0.simpleSegment(0,0,4,2);const O=new t.aX;O.emplaceBack(0,0),O.emplaceBack(t.X,0),O.emplaceBack(0,t.X),O.emplaceBack(t.X,t.X),this.debugBuffer=o.createVertexBuffer(O,pn.members),this.debugSegments=t.a0.simpleSegment(0,0,4,5);const j=new t.$;j.emplaceBack(0,0,0,0),j.emplaceBack(t.X,0,t.X,0),j.emplaceBack(0,t.X,0,t.X),j.emplaceBack(t.X,t.X,t.X,t.X),this.rasterBoundsBuffer=o.createVertexBuffer(j,je.members),this.rasterBoundsSegments=t.a0.simpleSegment(0,0,4,2);const H=new t.aX;H.emplaceBack(0,0),H.emplaceBack(1,0),H.emplaceBack(0,1),H.emplaceBack(1,1),this.viewportBuffer=o.createVertexBuffer(H,pn.members),this.viewportSegments=t.a0.simpleSegment(0,0,4,2);const ie=new t.aZ;ie.emplaceBack(0),ie.emplaceBack(1),ie.emplaceBack(3),ie.emplaceBack(2),ie.emplaceBack(0),this.tileBorderIndexBuffer=o.createIndexBuffer(ie);const he=new t.aY;he.emplaceBack(0,1,2),he.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=o.createIndexBuffer(he);const we=this.context.gl;this.stencilClearMode=new wa({func:we.ALWAYS,mask:0},0,255,we.ZERO,we.ZERO,we.ZERO)}clearStencil(){const o=this.context,l=o.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const O=t.H();t.aQ(O,0,this.width,this.height,0,0,1),t.K(O,O,[l.drawingBufferWidth,l.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(o,l.TRIANGLES,Ui.disabled,this.stencilClearMode,no.disabled,Ta.disabled,Pr(O),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(o,l){if(this.currentStencilSource===o.source||!o.isTileClipped()||!l||!l.length)return;this.currentStencilSource=o.source;const O=this.context,j=O.gl;this.nextStencilID+l.length>256&&this.clearStencil(),O.setColorMode(no.disabled),O.setDepthMode(Ui.disabled);const H=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(const ie of l){const he=this._tileClippingMaskIDs[ie.key]=this.nextStencilID++,we=this.style.map.terrain&&this.style.map.terrain.getTerrainData(ie);H.draw(O,j.TRIANGLES,Ui.disabled,new wa({func:j.ALWAYS,mask:0},he,255,j.KEEP,j.KEEP,j.REPLACE),no.disabled,Ta.disabled,Pr(ie.posMatrix),we,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const o=this.nextStencilID++,l=this.context.gl;return new wa({func:l.NOTEQUAL,mask:255},o,255,l.KEEP,l.KEEP,l.REPLACE)}stencilModeForClipping(o){const l=this.context.gl;return new wa({func:l.EQUAL,mask:255},this._tileClippingMaskIDs[o.key],0,l.KEEP,l.KEEP,l.REPLACE)}stencilConfigForOverlap(o){const l=this.context.gl,O=o.sort((ie,he)=>he.overscaledZ-ie.overscaledZ),j=O[O.length-1].overscaledZ,H=O[0].overscaledZ-j+1;if(H>1){this.currentStencilSource=void 0,this.nextStencilID+H>256&&this.clearStencil();const ie={};for(let he=0;he<H;he++)ie[he+j]=new wa({func:l.GEQUAL,mask:255},he+this.nextStencilID,255,l.KEEP,l.KEEP,l.REPLACE);return this.nextStencilID+=H,[ie,O]}return[{[j]:wa.disabled},O]}colorModeForRenderPass(){const o=this.context.gl;return this._showOverdrawInspector?new no([o.CONSTANT_COLOR,o.ONE],new t.aN(.125,.125,.125,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?no.unblended:no.alphaBlended}depthModeForSublayer(o,l,O){if(!this.opaquePassEnabledForLayer())return Ui.disabled;const j=1-((1+this.currentLayer)*this.numSublayers+o)*this.depthEpsilon;return new Ui(O||this.context.gl.LEQUAL,l,[j,j])}opaquePassEnabledForLayer(){return this.currentLayer<this.opaquePassCutoff}render(o,l){var O;this.style=o,this.options=l,this.lineAtlas=o.lineAtlas,this.imageManager=o.imageManager,this.glyphManager=o.glyphManager,this.symbolFadeChange=o.placement.symbolFadeChange(p.now()),this.imageManager.beginFrame();const j=this.style._order,H=this.style.sourceCaches,ie={},he={},we={};for(const Ee in H){const De=H[Ee];De.used&&De.prepare(this.context),ie[Ee]=De.getVisibleCoordinates(),he[Ee]=ie[Ee].slice().reverse(),we[Ee]=De.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let Ee=0;Ee<j.length;Ee++){const De=j[Ee];if(this.style._layers[De].is3D()){this.opaquePassCutoff=Ee;break}}this.maybeDrawDepthAndCoords(!1),this.renderToTexture&&(this.renderToTexture.prepareForRender(this.style,this.transform.zoom),this.opaquePassCutoff=0),this.renderPass="offscreen";for(const Ee of j){const De=this.style._layers[Ee];if(!De.hasOffscreenPass()||De.isHidden(this.transform.zoom))continue;const qe=he[De.source];(De.type==="custom"||qe.length)&&this.renderLayer(this,H[De.source],De,qe)}if(this.context.bindFramebuffer.set(null),this.context.clear({color:l.showOverdrawInspector?t.aN.black:t.aN.transparent,depth:1}),this.clearStencil(),!((O=this.style.stylesheet)===null||O===void 0)&&O.sky&&(function(Ee,De){const qe=Ee.context,it=qe.gl,ut=((Ut,Mt,Xt)=>({u_sky_color:Ut.properties.get("sky-color"),u_horizon_color:Ut.properties.get("horizon-color"),u_horizon:(Mt.height/2+Mt.getHorizon())*Xt,u_sky_horizon_blend:Ut.properties.get("sky-horizon-blend")*Mt.height/2*Xt}))(De,Ee.style.map.transform,Ee.pixelRatio),ht=new Ui(it.LEQUAL,Ui.ReadWrite,[0,1]),bt=wa.disabled,At=Ee.colorModeForRenderPass(),Et=Ee.useProgram("sky");if(!De.mesh){const Ut=new t.aX;Ut.emplaceBack(-1,-1),Ut.emplaceBack(1,-1),Ut.emplaceBack(1,1),Ut.emplaceBack(-1,1);const Mt=new t.aY;Mt.emplaceBack(0,1,2),Mt.emplaceBack(0,2,3),De.mesh=new nc(qe.createVertexBuffer(Ut,pn.members),qe.createIndexBuffer(Mt),t.a0.simpleSegment(0,0,Ut.length,Mt.length))}Et.draw(qe,it.TRIANGLES,ht,bt,At,Ta.disabled,ut,void 0,"sky",De.mesh.vertexBuffer,De.mesh.indexBuffer,De.mesh.segments)})(this,this.style.sky),this._showOverdrawInspector=l.showOverdrawInspector,this.depthRangeFor3D=[0,1-(o._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=j.length-1;this.currentLayer>=0;this.currentLayer--){const Ee=this.style._layers[j[this.currentLayer]],De=H[Ee.source],qe=ie[Ee.source];this._renderTileClippingMasks(Ee,qe),this.renderLayer(this,De,Ee,qe)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<j.length;this.currentLayer++){const Ee=this.style._layers[j[this.currentLayer]],De=H[Ee.source];if(this.renderToTexture&&this.renderToTexture.renderLayer(Ee))continue;const qe=(Ee.type==="symbol"?we:he)[Ee.source];this._renderTileClippingMasks(Ee,ie[Ee.source]),this.renderLayer(this,De,Ee,qe)}if(this.options.showTileBoundaries){const Ee=(function(De,qe){let it=null;const ut=Object.values(De._layers).flatMap(Et=>Et.source&&!Et.isHidden(qe)?[De.sourceCaches[Et.source]]:[]),ht=ut.filter(Et=>Et.getSource().type==="vector"),bt=ut.filter(Et=>Et.getSource().type!=="vector"),At=Et=>{(!it||it.getSource().maxzoom<Et.getSource().maxzoom)&&(it=Et)};return ht.forEach(Et=>At(Et)),it||bt.forEach(Et=>At(Et)),it})(this.style,this.transform.zoom);Ee&&(function(De,qe,it){for(let ut=0;ut<it.length;ut++)Pu(De,qe,it[ut])})(this,Ee,Ee.getVisibleCoordinates())}this.options.showPadding&&Hc(this),this.context.setDefault()}maybeDrawDepthAndCoords(o){if(!this.style||!this.style.map||!this.style.map.terrain)return;const l=this.terrainFacilitator.matrix,O=this.transform.modelViewProjectionMatrix;let j=this.terrainFacilitator.dirty;j||(j=o?!t.a_(l,O):!t.a$(l,O)),j||(j=this.style.map.terrain.sourceCache.tilesAfterTime(this.terrainFacilitator.renderTime).length>0),j&&(t.b0(l,O),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,(function(H,ie){const he=H.context,we=he.gl,Ee=no.unblended,De=new Ui(we.LEQUAL,Ui.ReadWrite,[0,1]),qe=ie.getTerrainMesh(),it=ie.sourceCache.getRenderableTiles(),ut=H.useProgram("terrainDepth");he.bindFramebuffer.set(ie.getFramebuffer("depth").framebuffer),he.viewport.set([0,0,H.width/devicePixelRatio,H.height/devicePixelRatio]),he.clear({color:t.aN.transparent,depth:1});for(const ht of it){const bt=ie.getTerrainData(ht.tileID),At={u_matrix:H.transform.calculatePosMatrix(ht.tileID.toUnwrapped()),u_ele_delta:ie.getMeshFrameDelta(H.transform.zoom)};ut.draw(he,we.TRIANGLES,De,wa.disabled,Ee,Ta.backCCW,At,bt,"terrain",qe.vertexBuffer,qe.indexBuffer,qe.segments)}he.bindFramebuffer.set(null),he.viewport.set([0,0,H.width,H.height])})(this,this.style.map.terrain),(function(H,ie){const he=H.context,we=he.gl,Ee=no.unblended,De=new Ui(we.LEQUAL,Ui.ReadWrite,[0,1]),qe=ie.getTerrainMesh(),it=ie.getCoordsTexture(),ut=ie.sourceCache.getRenderableTiles(),ht=H.useProgram("terrainCoords");he.bindFramebuffer.set(ie.getFramebuffer("coords").framebuffer),he.viewport.set([0,0,H.width/devicePixelRatio,H.height/devicePixelRatio]),he.clear({color:t.aN.transparent,depth:1}),ie.coordsIndex=[];for(const bt of ut){const At=ie.getTerrainData(bt.tileID);he.activeTexture.set(we.TEXTURE0),we.bindTexture(we.TEXTURE_2D,it.texture);const Et={u_matrix:H.transform.calculatePosMatrix(bt.tileID.toUnwrapped()),u_terrain_coords_id:(255-ie.coordsIndex.length)/255,u_texture:0,u_ele_delta:ie.getMeshFrameDelta(H.transform.zoom)};ht.draw(he,we.TRIANGLES,De,wa.disabled,Ee,Ta.backCCW,Et,At,"terrain",qe.vertexBuffer,qe.indexBuffer,qe.segments),ie.coordsIndex.push(bt.tileID.key)}he.bindFramebuffer.set(null),he.viewport.set([0,0,H.width,H.height])})(this,this.style.map.terrain))}renderLayer(o,l,O,j){if(!O.isHidden(this.transform.zoom)&&(O.type==="background"||O.type==="custom"||(j||[]).length))switch(this.id=O.id,O.type){case"symbol":El(o,l,O,j,this.style.placement.variableOffsets);break;case"circle":(function(H,ie,he,we){if(H.renderPass!=="translucent")return;const Ee=he.paint.get("circle-opacity"),De=he.paint.get("circle-stroke-width"),qe=he.paint.get("circle-stroke-opacity"),it=!he.layout.get("circle-sort-key").isConstant();if(Ee.constantOr(1)===0&&(De.constantOr(1)===0||qe.constantOr(1)===0))return;const ut=H.context,ht=ut.gl,bt=H.depthModeForSublayer(0,Ui.ReadOnly),At=wa.disabled,Et=H.colorModeForRenderPass(),Ut=[];for(let Mt=0;Mt<we.length;Mt++){const Xt=we[Mt],Qt=ie.getTile(Xt),Zt=Qt.getBucket(he);if(!Zt)continue;const pr=Zt.programConfigurations.get(he.id),Tr=H.useProgram("circle",pr),Br=Zt.layoutVertexBuffer,Dr=Zt.indexBuffer,Gr=H.style.map.terrain&&H.style.map.terrain.getTerrainData(Xt),Zr={programConfiguration:pr,program:Tr,layoutVertexBuffer:Br,indexBuffer:Dr,uniformValues:qr(H,Xt,Qt,he),terrainData:Gr};if(it){const vn=Zt.segments.get();for(const $r of vn)Ut.push({segments:new t.a0([$r]),sortKey:$r.sortKey,state:Zr})}else Ut.push({segments:Zt.segments,sortKey:0,state:Zr})}it&&Ut.sort((Mt,Xt)=>Mt.sortKey-Xt.sortKey);for(const Mt of Ut){const{programConfiguration:Xt,program:Qt,layoutVertexBuffer:Zt,indexBuffer:pr,uniformValues:Tr,terrainData:Br}=Mt.state,Dr=Mt.segments;Qt.draw(ut,ht.TRIANGLES,bt,At,Et,Ta.disabled,Tr,Br,he.id,Zt,pr,Dr,he.paint,H.transform.zoom,Xt)}})(o,l,O,j);break;case"heatmap":Ml(o,l,O,j);break;case"line":(function(H,ie,he,we){if(H.renderPass!=="translucent")return;const Ee=he.paint.get("line-opacity"),De=he.paint.get("line-width");if(Ee.constantOr(1)===0||De.constantOr(1)===0)return;const qe=H.depthModeForSublayer(0,Ui.ReadOnly),it=H.colorModeForRenderPass(),ut=he.paint.get("line-dasharray"),ht=he.paint.get("line-pattern"),bt=ht.constantOr(1),At=he.paint.get("line-gradient"),Et=he.getCrossfadeParameters(),Ut=bt?"linePattern":ut?"lineSDF":At?"lineGradient":"line",Mt=H.context,Xt=Mt.gl;let Qt=!0;for(const Zt of we){const pr=ie.getTile(Zt);if(bt&&!pr.patternsLoaded())continue;const Tr=pr.getBucket(he);if(!Tr)continue;const Br=Tr.programConfigurations.get(he.id),Dr=H.context.program.get(),Gr=H.useProgram(Ut,Br),Zr=Qt||Gr.program!==Dr,vn=H.style.map.terrain&&H.style.map.terrain.getTerrainData(Zt),$r=ht.constantOr(null);if($r&&pr.imageAtlas){const Sn=pr.imageAtlas,mn=Sn.patternPositions[$r.to.toString()],Rn=Sn.patternPositions[$r.from.toString()];mn&&Rn&&Br.setConstantPatternPositions(mn,Rn)}const bn=vn?Zt:null,on=bt?Yr(H,pr,he,Et,bn):ut?cn(H,pr,he,ut,Et,bn):At?Mr(H,pr,he,Tr.lineClipsArray.length,bn):lr(H,pr,he,bn);if(bt)Mt.activeTexture.set(Xt.TEXTURE0),pr.imageAtlasTexture.bind(Xt.LINEAR,Xt.CLAMP_TO_EDGE),Br.updatePaintBuffers(Et);else if(ut&&(Zr||H.lineAtlas.dirty))Mt.activeTexture.set(Xt.TEXTURE0),H.lineAtlas.bind(Mt);else if(At){const Sn=Tr.gradients[he.id];let mn=Sn.texture;if(he.gradientVersion!==Sn.version){let Rn=256;if(he.stepInterpolant){const ri=ie.getSource().maxzoom,An=Zt.canonical.z===ri?Math.ceil(1<<H.transform.maxZoom-Zt.canonical.z):1,$n=Tr.maxLineLength/t.X*1024*An;Rn=t.ad(t.aV($n),256,Mt.maxTextureSize)}Sn.gradient=t.aW({expression:he.gradientExpression(),evaluationKey:"lineProgress",resolution:Rn,image:Sn.gradient||void 0,clips:Tr.lineClipsArray}),Sn.texture?Sn.texture.update(Sn.gradient):Sn.texture=new I(Mt,Sn.gradient,Xt.RGBA),Sn.version=he.gradientVersion,mn=Sn.texture}Mt.activeTexture.set(Xt.TEXTURE0),mn.bind(he.stepInterpolant?Xt.NEAREST:Xt.LINEAR,Xt.CLAMP_TO_EDGE)}Gr.draw(Mt,Xt.TRIANGLES,qe,H.stencilModeForClipping(Zt),it,Ta.disabled,on,vn,he.id,Tr.layoutVertexBuffer,Tr.indexBuffer,Tr.segments,he.paint,H.transform.zoom,Br,Tr.layoutVertexBuffer2),Qt=!1}})(o,l,O,j);break;case"fill":(function(H,ie,he,we){const Ee=he.paint.get("fill-color"),De=he.paint.get("fill-opacity");if(De.constantOr(1)===0)return;const qe=H.colorModeForRenderPass(),it=he.paint.get("fill-pattern"),ut=H.opaquePassEnabledForLayer()&&!it.constantOr(1)&&Ee.constantOr(t.aN.transparent).a===1&&De.constantOr(0)===1?"opaque":"translucent";if(H.renderPass===ut){const ht=H.depthModeForSublayer(1,H.renderPass==="opaque"?Ui.ReadWrite:Ui.ReadOnly);Ic(H,ie,he,we,ht,qe,!1)}if(H.renderPass==="translucent"&&he.paint.get("fill-antialias")){const ht=H.depthModeForSublayer(he.getPaintProperty("fill-outline-color")?2:0,Ui.ReadOnly);Ic(H,ie,he,we,ht,qe,!0)}})(o,l,O,j);break;case"fill-extrusion":(function(H,ie,he,we){const Ee=he.paint.get("fill-extrusion-opacity");if(Ee!==0&&H.renderPass==="translucent"){const De=new Ui(H.context.gl.LEQUAL,Ui.ReadWrite,H.depthRangeFor3D);if(Ee!==1||he.paint.get("fill-extrusion-pattern").constantOr(1))mc(H,ie,he,we,De,wa.disabled,no.disabled),mc(H,ie,he,we,De,H.stencilModeFor3D(),H.colorModeForRenderPass());else{const qe=H.colorModeForRenderPass();mc(H,ie,he,we,De,wa.disabled,qe)}}})(o,l,O,j);break;case"hillshade":(function(H,ie,he,we){if(H.renderPass!=="offscreen"&&H.renderPass!=="translucent")return;const Ee=H.context,De=H.depthModeForSublayer(0,Ui.ReadOnly),qe=H.colorModeForRenderPass(),[it,ut]=H.renderPass==="translucent"?H.stencilConfigForOverlap(we):[{},we];for(const ht of ut){const bt=ie.getTile(ht);bt.needsHillshadePrepare!==void 0&&bt.needsHillshadePrepare&&H.renderPass==="offscreen"?Au(H,bt,he,De,wa.disabled,qe):H.renderPass==="translucent"&&gc(H,ht,bt,he,De,it[ht.overscaledZ],qe)}Ee.viewport.set([0,0,H.width,H.height])})(o,l,O,j);break;case"raster":(function(H,ie,he,we){if(H.renderPass!=="translucent"||he.paint.get("raster-opacity")===0||!we.length)return;const Ee=H.context,De=Ee.gl,qe=ie.getSource(),it=H.useProgram("raster"),ut=H.colorModeForRenderPass(),[ht,bt]=qe instanceof Ne?[{},we]:H.stencilConfigForOverlap(we),At=bt[bt.length-1].overscaledZ,Et=!H.options.moving;for(const Ut of bt){const Mt=H.depthModeForSublayer(Ut.overscaledZ-At,he.paint.get("raster-opacity")===1?Ui.ReadWrite:Ui.ReadOnly,De.LESS),Xt=ie.getTile(Ut);Xt.registerFadeDuration(he.paint.get("raster-fade-duration"));const Qt=ie.findLoadedParent(Ut,0),Zt=ie.findLoadedSibling(Ut),pr=Cs(Xt,Qt||Zt||null,ie,he,H.transform,H.style.map.terrain);let Tr,Br;const Dr=he.paint.get("raster-resampling")==="nearest"?De.NEAREST:De.LINEAR;Ee.activeTexture.set(De.TEXTURE0),Xt.texture.bind(Dr,De.CLAMP_TO_EDGE,De.LINEAR_MIPMAP_NEAREST),Ee.activeTexture.set(De.TEXTURE1),Qt?(Qt.texture.bind(Dr,De.CLAMP_TO_EDGE,De.LINEAR_MIPMAP_NEAREST),Tr=Math.pow(2,Qt.tileID.overscaledZ-Xt.tileID.overscaledZ),Br=[Xt.tileID.canonical.x*Tr%1,Xt.tileID.canonical.y*Tr%1]):Xt.texture.bind(Dr,De.CLAMP_TO_EDGE,De.LINEAR_MIPMAP_NEAREST),Xt.texture.useMipmap&&Ee.extTextureFilterAnisotropic&&H.transform.pitch>20&&De.texParameterf(De.TEXTURE_2D,Ee.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,Ee.extTextureFilterAnisotropicMax);const Gr=H.style.map.terrain&&H.style.map.terrain.getTerrainData(Ut),Zr=Gr?Ut:null,vn=Zr?Zr.posMatrix:H.transform.calculatePosMatrix(Ut.toUnwrapped(),Et),$r=Mn(vn,Br||[0,0],Tr||1,pr,he);qe instanceof Ne?it.draw(Ee,De.TRIANGLES,Mt,wa.disabled,ut,Ta.disabled,$r,Gr,he.id,qe.boundsBuffer,H.quadTriangleIndexBuffer,qe.boundsSegments):it.draw(Ee,De.TRIANGLES,Mt,ht[Ut.overscaledZ],ut,Ta.disabled,$r,Gr,he.id,H.rasterBoundsBuffer,H.quadTriangleIndexBuffer,H.rasterBoundsSegments)}})(o,l,O,j);break;case"background":(function(H,ie,he,we){const Ee=he.paint.get("background-color"),De=he.paint.get("background-opacity");if(De===0)return;const qe=H.context,it=qe.gl,ut=H.transform,ht=ut.tileSize,bt=he.paint.get("background-pattern");if(H.isPatternMissing(bt))return;const At=!bt&&Ee.a===1&&De===1&&H.opaquePassEnabledForLayer()?"opaque":"translucent";if(H.renderPass!==At)return;const Et=wa.disabled,Ut=H.depthModeForSublayer(0,At==="opaque"?Ui.ReadWrite:Ui.ReadOnly),Mt=H.colorModeForRenderPass(),Xt=H.useProgram(bt?"backgroundPattern":"background"),Qt=we||ut.coveringTiles({tileSize:ht,terrain:H.style.map.terrain});bt&&(qe.activeTexture.set(it.TEXTURE0),H.imageManager.bind(H.context));const Zt=he.getCrossfadeParameters();for(const pr of Qt){const Tr=we?pr.posMatrix:H.transform.calculatePosMatrix(pr.toUnwrapped()),Br=bt?oi(Tr,De,H,bt,{tileID:pr,tileSize:ht},Zt):Bn(Tr,De,Ee),Dr=H.style.map.terrain&&H.style.map.terrain.getTerrainData(pr);Xt.draw(qe,it.TRIANGLES,Ut,Et,Mt,Ta.disabled,Br,Dr,he.id,H.tileExtentBuffer,H.quadTriangleIndexBuffer,H.tileExtentSegments)}})(o,0,O,j);break;case"custom":(function(H,ie,he){const we=H.context,Ee=he.implementation;if(H.renderPass==="offscreen"){const De=Ee.prerender;De&&(H.setCustomLayerDefaults(),we.setColorMode(H.colorModeForRenderPass()),De.call(Ee,we.gl,H.transform.customLayerMatrix()),we.setDirty(),H.setBaseState())}else if(H.renderPass==="translucent"){H.setCustomLayerDefaults(),we.setColorMode(H.colorModeForRenderPass()),we.setStencilMode(wa.disabled);const De=Ee.renderingMode==="3d"?new Ui(H.context.gl.LEQUAL,Ui.ReadWrite,H.depthRangeFor3D):H.depthModeForSublayer(0,Ui.ReadOnly);we.setDepthMode(De),Ee.render(we.gl,H.transform.customLayerMatrix(),{farZ:H.transform.farZ,nearZ:H.transform.nearZ,fov:H.transform._fov,modelViewProjectionMatrix:H.transform.modelViewProjectionMatrix,projectionMatrix:H.transform.projectionMatrix}),we.setDirty(),H.setBaseState(),we.bindFramebuffer.set(null)}})(o,0,O)}}translatePosMatrix(o,l,O,j,H){if(!O[0]&&!O[1])return o;const ie=H?j==="map"?this.transform.angle:0:j==="viewport"?-this.transform.angle:0;if(ie){const Ee=Math.sin(ie),De=Math.cos(ie);O=[O[0]*De-O[1]*Ee,O[0]*Ee+O[1]*De]}const he=[H?O[0]:wt(l,O[0],this.transform.zoom),H?O[1]:wt(l,O[1],this.transform.zoom),0],we=new Float32Array(16);return t.J(we,o,he),we}saveTileTexture(o){const l=this._tileTextures[o.size[0]];l?l.push(o):this._tileTextures[o.size[0]]=[o]}getTileTexture(o){const l=this._tileTextures[o];return l&&l.length>0?l.pop():null}isPatternMissing(o){if(!o)return!1;if(!o.from||!o.to)return!0;const l=this.imageManager.getPattern(o.from.toString()),O=this.imageManager.getPattern(o.to.toString());return!l||!O}useProgram(o,l){this.cache=this.cache||{};const O=o+(l?l.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[O]||(this.cache[O]=new rn(this.context,Tn[o],l,Yn[o],this._showOverdrawInspector,this.style.map.terrain)),this.cache[O]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){const o=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(o.FUNC_ADD)}initDebugOverlayCanvas(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;const o=this.context.gl;this.debugOverlayTexture=new I(this.context,this.debugOverlayCanvas,o.RGBA)}}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){const{drawingBufferWidth:o,drawingBufferHeight:l}=this.context.gl;return this.width!==o||this.height!==l}}class Gs{constructor(o,l){this.points=o,this.planes=l}static fromInvProjectionMatrix(o,l,O){const j=Math.pow(2,O),H=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(he=>{const we=1/(he=t.ag([],he,o))[3]/l*j;return t.b1(he,he,[we,we,1/he[3],we])}),ie=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(he=>{const we=(function(it,ut){var ht=ut[0],bt=ut[1],At=ut[2],Et=ht*ht+bt*bt+At*At;return Et>0&&(Et=1/Math.sqrt(Et)),it[0]=ut[0]*Et,it[1]=ut[1]*Et,it[2]=ut[2]*Et,it})([],(function(it,ut,ht){var bt=ut[0],At=ut[1],Et=ut[2],Ut=ht[0],Mt=ht[1],Xt=ht[2];return it[0]=At*Xt-Et*Mt,it[1]=Et*Ut-bt*Xt,it[2]=bt*Mt-At*Ut,it})([],R([],H[he[0]],H[he[1]]),R([],H[he[2]],H[he[1]]))),Ee=(De=we,qe=H[he[1]],-(De[0]*qe[0]+De[1]*qe[1]+De[2]*qe[2]));var De,qe;return we.concat(Ee)});return new Gs(H,ie)}}class Ms{constructor(o,l){this.min=o,this.max=l,this.center=(function(O,j,H){return O[0]=j[0]*H,O[1]=j[1]*H,O[2]=j[2]*H,O})([],(function(O,j,H){return O[0]=j[0]+H[0],O[1]=j[1]+H[1],O[2]=j[2]+H[2],O})([],this.min,this.max),.5)}quadrant(o){const l=[o%2==0,o<2],O=S(this.min),j=S(this.max);for(let H=0;H<l.length;H++)O[H]=l[H]?this.min[H]:this.center[H],j[H]=l[H]?this.center[H]:this.max[H];return j[2]=this.max[2],new Ms(O,j)}distanceX(o){return Math.max(Math.min(this.max[0],o[0]),this.min[0])-o[0]}distanceY(o){return Math.max(Math.min(this.max[1],o[1]),this.min[1])-o[1]}intersects(o){const l=[[this.min[0],this.min[1],this.min[2],1],[this.max[0],this.min[1],this.min[2],1],[this.max[0],this.max[1],this.min[2],1],[this.min[0],this.max[1],this.min[2],1],[this.min[0],this.min[1],this.max[2],1],[this.max[0],this.min[1],this.max[2],1],[this.max[0],this.max[1],this.max[2],1],[this.min[0],this.max[1],this.max[2],1]];let O=!0;for(let j=0;j<o.planes.length;j++){const H=o.planes[j];let ie=0;for(let he=0;he<l.length;he++)t.b2(H,l[he])>=0&&ie++;if(ie===0)return 0;ie!==l.length&&(O=!1)}if(O)return 2;for(let j=0;j<3;j++){let H=Number.MAX_VALUE,ie=-Number.MAX_VALUE;for(let he=0;he<o.points.length;he++){const we=o.points[he][j]-this.min[j];H=Math.min(H,we),ie=Math.max(ie,we)}if(ie<0||H>this.max[j]-this.min[j])return 0}return 1}}class Rl{constructor(o=0,l=0,O=0,j=0){if(isNaN(o)||o<0||isNaN(l)||l<0||isNaN(O)||O<0||isNaN(j)||j<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=o,this.bottom=l,this.left=O,this.right=j}interpolate(o,l,O){return l.top!=null&&o.top!=null&&(this.top=t.z.number(o.top,l.top,O)),l.bottom!=null&&o.bottom!=null&&(this.bottom=t.z.number(o.bottom,l.bottom,O)),l.left!=null&&o.left!=null&&(this.left=t.z.number(o.left,l.left,O)),l.right!=null&&o.right!=null&&(this.right=t.z.number(o.right,l.right,O)),this}getCenter(o,l){const O=t.ad((this.left+o-this.right)/2,0,o),j=t.ad((this.top+l-this.bottom)/2,0,l);return new t.P(O,j)}equals(o){return this.top===o.top&&this.bottom===o.bottom&&this.left===o.left&&this.right===o.right}clone(){return new Rl(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}const vc=85.051129;class aa{constructor(o,l,O,j,H){this.tileSize=512,this._renderWorldCopies=H===void 0||!!H,this._minZoom=o||0,this._maxZoom=l||22,this._minPitch=O??0,this._maxPitch=j??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new t.N(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new Rl,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={},this.minElevationForCurrentTile=0}clone(){const o=new aa(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return o.apply(this),o}apply(o){this.tileSize=o.tileSize,this.latRange=o.latRange,this.width=o.width,this.height=o.height,this._center=o._center,this._elevation=o._elevation,this.minElevationForCurrentTile=o.minElevationForCurrentTile,this.zoom=o.zoom,this.angle=o.angle,this._fov=o._fov,this._pitch=o._pitch,this._unmodified=o._unmodified,this._edgeInsets=o._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(o){this._minZoom!==o&&(this._minZoom=o,this.zoom=Math.max(this.zoom,o))}get maxZoom(){return this._maxZoom}set maxZoom(o){this._maxZoom!==o&&(this._maxZoom=o,this.zoom=Math.min(this.zoom,o))}get minPitch(){return this._minPitch}set minPitch(o){this._minPitch!==o&&(this._minPitch=o,this.pitch=Math.max(this.pitch,o))}get maxPitch(){return this._maxPitch}set maxPitch(o){this._maxPitch!==o&&(this._maxPitch=o,this.pitch=Math.min(this.pitch,o))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(o){o===void 0?o=!0:o===null&&(o=!1),this._renderWorldCopies=o}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new t.P(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(o){const l=-t.b3(o,-180,180)*Math.PI/180;this.angle!==l&&(this._unmodified=!1,this.angle=l,this._calcMatrices(),this.rotationMatrix=(function(){var O=new t.A(4);return t.A!=Float32Array&&(O[1]=0,O[2]=0),O[0]=1,O[3]=1,O})(),(function(O,j,H){var ie=j[0],he=j[1],we=j[2],Ee=j[3],De=Math.sin(H),qe=Math.cos(H);O[0]=ie*qe+we*De,O[1]=he*qe+Ee*De,O[2]=ie*-De+we*qe,O[3]=he*-De+Ee*qe})(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(o){const l=t.ad(o,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==l&&(this._unmodified=!1,this._pitch=l,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(o){o=Math.max(.01,Math.min(60,o)),this._fov!==o&&(this._unmodified=!1,this._fov=o/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(o){const l=Math.min(Math.max(o,this.minZoom),this.maxZoom);this._zoom!==l&&(this._unmodified=!1,this._zoom=l,this.tileZoom=Math.max(0,Math.floor(l)),this.scale=this.zoomScale(l),this._constrain(),this._calcMatrices())}get center(){return this._center}set center(o){o.lat===this._center.lat&&o.lng===this._center.lng||(this._unmodified=!1,this._center=o,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(o){o!==this._elevation&&(this._elevation=o,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(o){this._edgeInsets.equals(o)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,o,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(o){return this._edgeInsets.equals(o)}interpolatePadding(o,l,O){this._unmodified=!1,this._edgeInsets.interpolate(o,l,O),this._constrain(),this._calcMatrices()}coveringZoomLevel(o){const l=(o.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/o.tileSize));return Math.max(0,l)}getVisibleUnwrappedCoordinates(o){const l=[new t.b4(0,o)];if(this._renderWorldCopies){const O=this.pointCoordinate(new t.P(0,0)),j=this.pointCoordinate(new t.P(this.width,0)),H=this.pointCoordinate(new t.P(this.width,this.height)),ie=this.pointCoordinate(new t.P(0,this.height)),he=Math.floor(Math.min(O.x,j.x,H.x,ie.x)),we=Math.floor(Math.max(O.x,j.x,H.x,ie.x)),Ee=1;for(let De=he-Ee;De<=we+Ee;De++)De!==0&&l.push(new t.b4(De,o))}return l}coveringTiles(o){var l,O;let j=this.coveringZoomLevel(o);const H=j;if(o.minzoom!==void 0&&j<o.minzoom)return[];o.maxzoom!==void 0&&j>o.maxzoom&&(j=o.maxzoom);const ie=this.pointCoordinate(this.getCameraPoint()),he=t.Z.fromLngLat(this.center),we=Math.pow(2,j),Ee=[we*ie.x,we*ie.y,0],De=[we*he.x,we*he.y,0],qe=Gs.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,j);let it=o.minzoom||0;!o.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(it=j);const ut=o.terrain?2/Math.min(this.tileSize,o.tileSize)*this.tileSize:3,ht=Mt=>({aabb:new Ms([Mt*we,0,0],[(Mt+1)*we,we,0]),zoom:0,x:0,y:0,wrap:Mt,fullyVisible:!1}),bt=[],At=[],Et=j,Ut=o.reparseOverscaled?H:j;if(this._renderWorldCopies)for(let Mt=1;Mt<=3;Mt++)bt.push(ht(-Mt)),bt.push(ht(Mt));for(bt.push(ht(0));bt.length>0;){const Mt=bt.pop(),Xt=Mt.x,Qt=Mt.y;let Zt=Mt.fullyVisible;if(!Zt){const Zr=Mt.aabb.intersects(qe);if(Zr===0)continue;Zt=Zr===2}const pr=o.terrain?Ee:De,Tr=Mt.aabb.distanceX(pr),Br=Mt.aabb.distanceY(pr),Dr=Math.max(Math.abs(Tr),Math.abs(Br)),Gr=ut+(1<<Et-Mt.zoom)-2;if(Mt.zoom===Et||Dr>Gr&&Mt.zoom>=it){const Zr=Et-Mt.zoom,vn=Ee[0]-.5-(Xt<<Zr),$r=Ee[1]-.5-(Qt<<Zr);At.push({tileID:new t.S(Mt.zoom===Et?Ut:Mt.zoom,Mt.wrap,Mt.zoom,Xt,Qt),distanceSq:E([De[0]-.5-Xt,De[1]-.5-Qt]),tileDistanceToCamera:Math.sqrt(vn*vn+$r*$r)})}else for(let Zr=0;Zr<4;Zr++){const vn=(Xt<<1)+Zr%2,$r=(Qt<<1)+(Zr>>1),bn=Mt.zoom+1;let on=Mt.aabb.quadrant(Zr);if(o.terrain){const Sn=new t.S(bn,Mt.wrap,bn,vn,$r),mn=o.terrain.getMinMaxElevation(Sn),Rn=(l=mn.minElevation)!==null&&l!==void 0?l:this.elevation,ri=(O=mn.maxElevation)!==null&&O!==void 0?O:this.elevation;on=new Ms([on.min[0],on.min[1],Rn],[on.max[0],on.max[1],ri])}bt.push({aabb:on,zoom:bn,x:vn,y:$r,wrap:Mt.wrap,fullyVisible:Zt})}}return At.sort((Mt,Xt)=>Mt.distanceSq-Xt.distanceSq).map(Mt=>Mt.tileID)}resize(o,l){this.width=o,this.height=l,this.pixelsToGLUnits=[2/o,-2/l],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(o){return Math.pow(2,o)}scaleZoom(o){return Math.log(o)/Math.LN2}project(o){const l=t.ad(o.lat,-85.051129,vc);return new t.P(t.O(o.lng)*this.worldSize,t.Q(l)*this.worldSize)}unproject(o){return new t.Z(o.x/this.worldSize,o.y/this.worldSize).toLngLat()}get point(){return this.project(this.center)}getCameraPosition(){return{lngLat:this.pointLocation(this.getCameraPoint()),altitude:Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter+this.elevation}}recalculateZoom(o){const l=this.elevation,O=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,j=this.pointLocation(this.centerPoint,o),H=o.getElevationForLngLatZoom(j,this.tileZoom);if(!(this.elevation-H))return;const ie=O+l-H,he=Math.cos(this._pitch)*this.cameraToCenterDistance/ie/t.b5(1,j.lat)/this.tileSize,we=this.scaleZoom(he);this._elevation=H,this._center=j,this.zoom=we}setLocationAtPoint(o,l){const O=this.pointCoordinate(l),j=this.pointCoordinate(this.centerPoint),H=this.locationCoordinate(o),ie=new t.Z(H.x-(O.x-j.x),H.y-(O.y-j.y));this.center=this.coordinateLocation(ie),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(o,l){return l?this.coordinatePoint(this.locationCoordinate(o),l.getElevationForLngLatZoom(o,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(o))}pointLocation(o,l){return this.coordinateLocation(this.pointCoordinate(o,l))}locationCoordinate(o){return t.Z.fromLngLat(o)}coordinateLocation(o){return o&&o.toLngLat()}pointCoordinate(o,l){if(l){const ht=l.pointCoordinate(o);if(ht!=null)return ht}const O=[o.x,o.y,0,1],j=[o.x,o.y,1,1];t.ag(O,O,this.pixelMatrixInverse),t.ag(j,j,this.pixelMatrixInverse);const H=O[3],ie=j[3],he=O[0]/H,we=j[0]/ie,Ee=O[1]/H,De=j[1]/ie,qe=O[2]/H,it=j[2]/ie,ut=qe===it?0:(0-qe)/(it-qe);return new t.Z(t.z.number(he,we,ut)/this.worldSize,t.z.number(Ee,De,ut)/this.worldSize)}coordinatePoint(o,l=0,O=this.pixelMatrix){const j=[o.x*this.worldSize,o.y*this.worldSize,l,1];return t.ag(j,j,O),new t.P(j[0]/j[3],j[1]/j[3])}getBounds(){const o=Math.max(0,this.height/2-this.getHorizon());return new Te().extend(this.pointLocation(new t.P(0,o))).extend(this.pointLocation(new t.P(this.width,o))).extend(this.pointLocation(new t.P(this.width,this.height))).extend(this.pointLocation(new t.P(0,this.height)))}getMaxBounds(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new Te([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null}getHorizon(){return Math.tan(Math.PI/2-this._pitch)*this.cameraToCenterDistance*.85}setMaxBounds(o){o?(this.lngRange=[o.getWest(),o.getEast()],this.latRange=[o.getSouth(),o.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-85.051129,vc])}calculateTileMatrix(o){const l=o.canonical,O=this.worldSize/this.zoomScale(l.z),j=l.x+Math.pow(2,l.z)*o.wrap,H=t.ao(new Float64Array(16));return t.J(H,H,[j*O,l.y*O,0]),t.K(H,H,[O/t.X,O/t.X,1]),H}calculatePosMatrix(o,l=!1){const O=o.key,j=l?this._alignedPosMatrixCache:this._posMatrixCache;if(j[O])return j[O];const H=this.calculateTileMatrix(o);return t.L(H,l?this.alignedModelViewProjectionMatrix:this.modelViewProjectionMatrix,H),j[O]=new Float32Array(H),j[O]}calculateFogMatrix(o){const l=o.key,O=this._fogMatrixCache;if(O[l])return O[l];const j=this.calculateTileMatrix(o);return t.L(j,this.fogMatrix,j),O[l]=new Float32Array(j),O[l]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(o,l){l=t.ad(+l,this.minZoom,this.maxZoom);const O={center:new t.N(o.lng,o.lat),zoom:l};let j=this.lngRange;if(!this._renderWorldCopies&&j===null){const Mt=179.9999999999;j=[-Mt,Mt]}const H=this.tileSize*this.zoomScale(O.zoom);let ie=0,he=H,we=0,Ee=H,De=0,qe=0;const{x:it,y:ut}=this.size;if(this.latRange){const Mt=this.latRange;ie=t.Q(Mt[1])*H,he=t.Q(Mt[0])*H,he-ie<ut&&(De=ut/(he-ie))}j&&(we=t.b3(t.O(j[0])*H,0,H),Ee=t.b3(t.O(j[1])*H,0,H),Ee<we&&(Ee+=H),Ee-we<it&&(qe=it/(Ee-we)));const{x:ht,y:bt}=this.project.call({worldSize:H},o);let At,Et;const Ut=Math.max(qe||0,De||0);if(Ut){const Mt=new t.P(qe?(Ee+we)/2:ht,De?(he+ie)/2:bt);return O.center=this.unproject.call({worldSize:H},Mt).wrap(),O.zoom+=this.scaleZoom(Ut),O}if(this.latRange){const Mt=ut/2;bt-Mt<ie&&(Et=ie+Mt),bt+Mt>he&&(Et=he-Mt)}if(j){const Mt=(we+Ee)/2;let Xt=ht;this._renderWorldCopies&&(Xt=t.b3(ht,Mt-H/2,Mt+H/2));const Qt=it/2;Xt-Qt<we&&(At=we+Qt),Xt+Qt>Ee&&(At=Ee-Qt)}if(At!==void 0||Et!==void 0){const Mt=new t.P(At??ht,Et??bt);O.center=this.unproject.call({worldSize:H},Mt).wrap()}return O}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;const o=this._unmodified,{center:l,zoom:O}=this.getConstrained(this.center,this.zoom);this.center=l,this.zoom=O,this._unmodified=o,this._constraining=!1}_calcMatrices(){if(!this.height)return;const o=this._fov/2,l=this.centerOffset,O=this.point.x,j=this.point.y;this.cameraToCenterDistance=.5/Math.tan(o)*this.height,this._pixelPerMeter=t.b5(1,this.center.lat)*this.worldSize;let H=t.ao(new Float64Array(16));t.K(H,H,[this.width/2,-this.height/2,1]),t.J(H,H,[1,-1,0]),this.labelPlaneMatrix=H,H=t.ao(new Float64Array(16)),t.K(H,H,[1,-1,1]),t.J(H,H,[-1,-1,0]),t.K(H,H,[2/this.width,2/this.height,1]),this.glCoordMatrix=H;const ie=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),he=Math.min(this.elevation,this.minElevationForCurrentTile),we=ie-he*this._pixelPerMeter/Math.cos(this._pitch),Ee=he<0?we:ie,De=Math.PI/2+this._pitch,qe=this._fov*(.5+l.y/this.height),it=Math.sin(qe)*Ee/Math.sin(t.ad(Math.PI-De-qe,.01,Math.PI-.01)),ut=this.getHorizon(),ht=2*Math.atan(ut/this.cameraToCenterDistance)*(.5+l.y/(2*ut)),bt=Math.sin(ht)*Ee/Math.sin(t.ad(Math.PI-De-ht,.01,Math.PI-.01)),At=Math.min(it,bt);this.farZ=1.01*(Math.cos(Math.PI/2-this._pitch)*At+Ee),this.nearZ=this.height/50,H=new Float64Array(16),t.b6(H,this._fov,this.width/this.height,this.nearZ,this.farZ),H[8]=2*-l.x/this.width,H[9]=2*l.y/this.height,this.projectionMatrix=t.af(H),t.K(H,H,[1,-1,1]),t.J(H,H,[0,0,-this.cameraToCenterDistance]),t.b7(H,H,this._pitch),t.ae(H,H,this.angle),t.J(H,H,[-O,-j,0]),this.mercatorMatrix=t.K([],H,[this.worldSize,this.worldSize,this.worldSize]),t.K(H,H,[1,1,this._pixelPerMeter]),this.pixelMatrix=t.L(new Float64Array(16),this.labelPlaneMatrix,H),t.J(H,H,[0,0,-this.elevation]),this.modelViewProjectionMatrix=H,this.invModelViewProjectionMatrix=t.at([],H),this.fogMatrix=new Float64Array(16),t.b6(this.fogMatrix,this._fov,this.width/this.height,ie,this.farZ),this.fogMatrix[8]=2*-l.x/this.width,this.fogMatrix[9]=2*l.y/this.height,t.K(this.fogMatrix,this.fogMatrix,[1,-1,1]),t.J(this.fogMatrix,this.fogMatrix,[0,0,-this.cameraToCenterDistance]),t.b7(this.fogMatrix,this.fogMatrix,this._pitch),t.ae(this.fogMatrix,this.fogMatrix,this.angle),t.J(this.fogMatrix,this.fogMatrix,[-O,-j,0]),t.K(this.fogMatrix,this.fogMatrix,[1,1,this._pixelPerMeter]),t.J(this.fogMatrix,this.fogMatrix,[0,0,-this.elevation]),this.pixelMatrix3D=t.L(new Float64Array(16),this.labelPlaneMatrix,H);const Et=this.width%2/2,Ut=this.height%2/2,Mt=Math.cos(this.angle),Xt=Math.sin(this.angle),Qt=O-Math.round(O)+Mt*Et+Xt*Ut,Zt=j-Math.round(j)+Mt*Ut+Xt*Et,pr=new Float64Array(H);if(t.J(pr,pr,[Qt>.5?Qt-1:Qt,Zt>.5?Zt-1:Zt,0]),this.alignedModelViewProjectionMatrix=pr,H=t.at(new Float64Array(16),this.pixelMatrix),!H)throw new Error("failed to invert matrix");this.pixelMatrixInverse=H,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;const o=this.pointCoordinate(new t.P(0,0)),l=[o.x*this.worldSize,o.y*this.worldSize,0,1];return t.ag(l,l,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){const o=this._pitch,l=Math.tan(o)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new t.P(0,l))}getCameraQueryGeometry(o){const l=this.getCameraPoint();if(o.length===1)return[o[0],l];{let O=l.x,j=l.y,H=l.x,ie=l.y;for(const he of o)O=Math.min(O,he.x),j=Math.min(j,he.y),H=Math.max(H,he.x),ie=Math.max(ie,he.y);return[new t.P(O,j),new t.P(H,j),new t.P(H,ie),new t.P(O,ie),new t.P(O,j)]}}lngLatToCameraDepth(o,l){const O=this.locationCoordinate(o),j=[O.x*this.worldSize,O.y*this.worldSize,l,1];return t.ag(j,j,this.modelViewProjectionMatrix),j[2]/j[3]}}function Hs(F,o){let l,O=!1,j=null,H=null;const ie=()=>{j=null,O&&(F.apply(H,l),j=setTimeout(ie,o),O=!1)};return(...he)=>(O=!0,H=this,l=he,j||ie(),j)}class io{constructor(o){this._getCurrentHash=()=>{const l=window.location.hash.replace("#","");if(this._hashName){let O;return l.split("&").map(j=>j.split("=")).forEach(j=>{j[0]===this._hashName&&(O=j)}),(O&&O[1]||"").split("/")}return l.split("/")},this._onHashChange=()=>{const l=this._getCurrentHash();if(l.length>=3&&!l.some(O=>isNaN(O))){const O=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(l[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+l[2],+l[1]],zoom:+l[0],bearing:O,pitch:+(l[4]||0)}),!0}return!1},this._updateHashUnthrottled=()=>{const l=window.location.href.replace(/(#.+)?$/,this.getHashString());window.history.replaceState(window.history.state,null,l)},this._removeHash=()=>{const l=this._getCurrentHash();if(l.length===0)return;const O=l.join("/");let j=O;j.split("&").length>0&&(j=j.split("&")[0]),this._hashName&&(j=`${this._hashName}=${O}`);let H=window.location.hash.replace(j,"");H.startsWith("#&")?H=H.slice(0,1)+H.slice(2):H==="#"&&(H="");let ie=window.location.href.replace(/(#.+)?$/,H);ie=ie.replace("&&","&"),window.history.replaceState(window.history.state,null,ie)},this._updateHash=Hs(this._updateHashUnthrottled,300),this._hashName=o&&encodeURIComponent(o)}addTo(o){return this._map=o,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),this._removeHash(),delete this._map,this}getHashString(o){const l=this._map.getCenter(),O=Math.round(100*this._map.getZoom())/100,j=Math.ceil((O*Math.LN2+Math.log(512/360/.5))/Math.LN10),H=Math.pow(10,j),ie=Math.round(l.lng*H)/H,he=Math.round(l.lat*H)/H,we=this._map.getBearing(),Ee=this._map.getPitch();let De="";if(De+=o?`/${ie}/${he}/${O}`:`${O}/${he}/${ie}`,(we||Ee)&&(De+="/"+Math.round(10*we)/10),Ee&&(De+=`/${Math.round(Ee)}`),this._hashName){const qe=this._hashName;let it=!1;const ut=window.location.hash.slice(1).split("&").map(ht=>{const bt=ht.split("=")[0];return bt===qe?(it=!0,`${bt}=${De}`):ht}).filter(ht=>ht);return it||ut.push(`${qe}=${De}`),`#${ut.join("&")}`}return`#${De}`}}const Jo={linearity:.3,easing:t.b8(0,0,.3,1)},ra=t.e({deceleration:2500,maxSpeed:1400},Jo),oa=t.e({deceleration:20,maxSpeed:1400},Jo),As=t.e({deceleration:1e3,maxSpeed:360},Jo),xc=t.e({deceleration:1e3,maxSpeed:90},Jo);class ac{constructor(o){this._map=o,this.clear()}clear(){this._inertiaBuffer=[]}record(o){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:p.now(),settings:o})}_drainInertiaBuffer(){const o=this._inertiaBuffer,l=p.now();for(;o.length>0&&l-o[0].time>160;)o.shift()}_onMoveEnd(o){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const l={zoom:0,bearing:0,pitch:0,pan:new t.P(0,0),pinchAround:void 0,around:void 0};for(const{settings:H}of this._inertiaBuffer)l.zoom+=H.zoomDelta||0,l.bearing+=H.bearingDelta||0,l.pitch+=H.pitchDelta||0,H.panDelta&&l.pan._add(H.panDelta),H.around&&(l.around=H.around),H.pinchAround&&(l.pinchAround=H.pinchAround);const O=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,j={};if(l.pan.mag()){const H=Gl(l.pan.mag(),O,t.e({},ra,o||{}));j.offset=l.pan.mult(H.amount/l.pan.mag()),j.center=this._map.transform.center,Wl(j,H)}if(l.zoom){const H=Gl(l.zoom,O,oa);j.zoom=this._map.transform.zoom+H.amount,Wl(j,H)}if(l.bearing){const H=Gl(l.bearing,O,As);j.bearing=this._map.transform.bearing+t.ad(H.amount,-179,179),Wl(j,H)}if(l.pitch){const H=Gl(l.pitch,O,xc);j.pitch=this._map.transform.pitch+H.amount,Wl(j,H)}if(j.zoom||j.bearing){const H=l.pinchAround===void 0?l.around:l.pinchAround;j.around=H?this._map.unproject(H):this._map.getCenter()}return this.clear(),t.e(j,{noMoveStart:!0})}}function Wl(F,o){(!F.duration||F.duration<o.duration)&&(F.duration=o.duration,F.easing=o.easing)}function Gl(F,o,l){const{maxSpeed:O,linearity:j,deceleration:H}=l,ie=t.ad(F*j/(o/1e3),-O,O),he=Math.abs(ie)/(H*j);return{easing:l.easing,duration:1e3*he,amount:ie*(he/2)}}class Ro extends t.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(o,l,O,j={}){const H=n.mousePos(l.getCanvas(),O),ie=l.unproject(H);super(o,t.e({point:H,lngLat:ie,originalEvent:O},j)),this._defaultPrevented=!1,this.target=l}}class _o extends t.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(o,l,O){const j=o==="touchend"?O.changedTouches:O.touches,H=n.touchPos(l.getCanvasContainer(),j),ie=H.map(we=>l.unproject(we)),he=H.reduce((we,Ee,De,qe)=>we.add(Ee.div(qe.length)),new t.P(0,0));super(o,{points:H,point:he,lngLats:ie,lngLat:l.unproject(he),originalEvent:O}),this._defaultPrevented=!1}}class ol extends t.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(o,l,O){super(o,{originalEvent:O}),this._defaultPrevented=!1}}class oc{constructor(o,l){this._map=o,this._clickTolerance=l.clickTolerance}reset(){delete this._mousedownPos}wheel(o){return this._firePreventable(new ol(o.type,this._map,o))}mousedown(o,l){return this._mousedownPos=l,this._firePreventable(new Ro(o.type,this._map,o))}mouseup(o){this._map.fire(new Ro(o.type,this._map,o))}click(o,l){this._mousedownPos&&this._mousedownPos.dist(l)>=this._clickTolerance||this._map.fire(new Ro(o.type,this._map,o))}dblclick(o){return this._firePreventable(new Ro(o.type,this._map,o))}mouseover(o){this._map.fire(new Ro(o.type,this._map,o))}mouseout(o){this._map.fire(new Ro(o.type,this._map,o))}touchstart(o){return this._firePreventable(new _o(o.type,this._map,o))}touchmove(o){this._map.fire(new _o(o.type,this._map,o))}touchend(o){this._map.fire(new _o(o.type,this._map,o))}touchcancel(o){this._map.fire(new _o(o.type,this._map,o))}_firePreventable(o){if(this._map.fire(o),o.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Oo{constructor(o){this._map=o}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(o){this._map.fire(new Ro(o.type,this._map,o))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Ro("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(o){this._delayContextMenu?this._contextMenuEvent=o:this._ignoreContextMenu||this._map.fire(new Ro(o.type,this._map,o)),this._map.listens("contextmenu")&&o.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Ea{constructor(o){this._map=o}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(o){return this.transform.pointLocation(t.P.convert(o),this._map.terrain)}}class wo{constructor(o,l){this._map=o,this._tr=new Ea(o),this._el=o.getCanvasContainer(),this._container=o.getContainer(),this._clickTolerance=l.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(o,l){this.isEnabled()&&o.shiftKey&&o.button===0&&(n.disableDrag(),this._startPos=this._lastPos=l,this._active=!0)}mousemoveWindow(o,l){if(!this._active)return;const O=l;if(this._lastPos.equals(O)||!this._box&&O.dist(this._startPos)<this._clickTolerance)return;const j=this._startPos;this._lastPos=O,this._box||(this._box=n.create("div","maplibregl-boxzoom",this._container),this._container.classList.add("maplibregl-crosshair"),this._fireEvent("boxzoomstart",o));const H=Math.min(j.x,O.x),ie=Math.max(j.x,O.x),he=Math.min(j.y,O.y),we=Math.max(j.y,O.y);n.setTransform(this._box,`translate(${H}px,${he}px)`),this._box.style.width=ie-H+"px",this._box.style.height=we-he+"px"}mouseupWindow(o,l){if(!this._active||o.button!==0)return;const O=this._startPos,j=l;if(this.reset(),n.suppressClick(),O.x!==j.x||O.y!==j.y)return this._map.fire(new t.k("boxzoomend",{originalEvent:o})),{cameraAnimation:H=>H.fitScreenCoordinates(O,j,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",o)}keydown(o){this._active&&o.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",o))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(n.remove(this._box),this._box=null),n.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(o,l){return this._map.fire(new t.k(o,{originalEvent:l}))}}function ca(F,o){if(F.length!==o.length)throw new Error(`The number of touches and points are not equal - touches ${F.length}, points ${o.length}`);const l={};for(let O=0;O<F.length;O++)l[F[O].identifier]=o[O];return l}class ao{constructor(o){this.reset(),this.numTouches=o.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(o,l,O){(this.centroid||O.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=o.timeStamp),O.length===this.numTouches&&(this.centroid=(function(j){const H=new t.P(0,0);for(const ie of j)H._add(ie);return H.div(j.length)})(l),this.touches=ca(O,l)))}touchmove(o,l,O){if(this.aborted||!this.centroid)return;const j=ca(O,l);for(const H in this.touches){const ie=this.touches[H],he=j[H];(!he||he.dist(ie)>30)&&(this.aborted=!0)}}touchend(o,l,O){if((!this.centroid||o.timeStamp-this.startTime>500)&&(this.aborted=!0),O.length===0){const j=!this.aborted&&this.centroid;if(this.reset(),j)return j}}}class ua{constructor(o){this.singleTap=new ao(o),this.numTaps=o.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(o,l,O){this.singleTap.touchstart(o,l,O)}touchmove(o,l,O){this.singleTap.touchmove(o,l,O)}touchend(o,l,O){const j=this.singleTap.touchend(o,l,O);if(j){const H=o.timeStamp-this.lastTime<500,ie=!this.lastTap||this.lastTap.dist(j)<30;if(H&&ie||this.reset(),this.count++,this.lastTime=o.timeStamp,this.lastTap=j,this.count===this.numTaps)return this.reset(),j}}}class fo{constructor(o){this._tr=new Ea(o),this._zoomIn=new ua({numTouches:1,numTaps:2}),this._zoomOut=new ua({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(o,l,O){this._zoomIn.touchstart(o,l,O),this._zoomOut.touchstart(o,l,O)}touchmove(o,l,O){this._zoomIn.touchmove(o,l,O),this._zoomOut.touchmove(o,l,O)}touchend(o,l,O){const j=this._zoomIn.touchend(o,l,O),H=this._zoomOut.touchend(o,l,O),ie=this._tr;return j?(this._active=!0,o.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:he=>he.easeTo({duration:300,zoom:ie.zoom+1,around:ie.unproject(j)},{originalEvent:o})}):H?(this._active=!0,o.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:he=>he.easeTo({duration:300,zoom:ie.zoom-1,around:ie.unproject(H)},{originalEvent:o})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class To{constructor(o){this._enabled=!!o.enable,this._moveStateManager=o.moveStateManager,this._clickTolerance=o.clickTolerance||1,this._moveFunction=o.move,this._activateOnStart=!!o.activateOnStart,o.assignEvents(this),this.reset()}reset(o){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(o)}_move(...o){const l=this._moveFunction(...o);if(l.bearingDelta||l.pitchDelta||l.around||l.panDelta)return this._active=!0,l}dragStart(o,l){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(o)&&(this._moveStateManager.startMove(o),this._lastPoint=l.length?l[0]:l,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(o,l){if(!this.isEnabled())return;const O=this._lastPoint;if(!O)return;if(o.preventDefault(),!this._moveStateManager.isValidMoveEvent(o))return void this.reset(o);const j=l.length?l[0]:l;return!this._moved&&j.dist(O)<this._clickTolerance?void 0:(this._moved=!0,this._lastPoint=j,this._move(O,j))}dragEnd(o){this.isEnabled()&&this._lastPoint&&this._moveStateManager.isValidEndEvent(o)&&(this._moved&&n.suppressClick(),this.reset(o))}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}getClickTolerance(){return this._clickTolerance}}const sl={0:1,2:2};class is{constructor(o){this._correctEvent=o.checkCorrectEvent}startMove(o){const l=n.mouseButton(o);this._eventButton=l}endMove(o){delete this._eventButton}isValidStartEvent(o){return this._correctEvent(o)}isValidMoveEvent(o){return!(function(l,O){const j=sl[O];return l.buttons===void 0||(l.buttons&j)!==j})(o,this._eventButton)}isValidEndEvent(o){return n.mouseButton(o)===this._eventButton}}class Nl{constructor(){this._firstTouch=void 0}_isOneFingerTouch(o){return o.targetTouches.length===1}_isSameTouchEvent(o){return o.targetTouches[0].identifier===this._firstTouch}startMove(o){const l=o.targetTouches[0].identifier;this._firstTouch=l}endMove(o){delete this._firstTouch}isValidStartEvent(o){return this._isOneFingerTouch(o)}isValidMoveEvent(o){return this._isOneFingerTouch(o)&&this._isSameTouchEvent(o)}isValidEndEvent(o){return this._isOneFingerTouch(o)&&this._isSameTouchEvent(o)}}const No=F=>{F.mousedown=F.dragStart,F.mousemoveWindow=F.dragMove,F.mouseup=F.dragEnd,F.contextmenu=o=>{o.preventDefault()}},Hl=({enable:F,clickTolerance:o,bearingDegreesPerPixelMoved:l=.8})=>{const O=new is({checkCorrectEvent:j=>n.mouseButton(j)===0&&j.ctrlKey||n.mouseButton(j)===2});return new To({clickTolerance:o,move:(j,H)=>({bearingDelta:(H.x-j.x)*l}),moveStateManager:O,enable:F,assignEvents:No})},ll=({enable:F,clickTolerance:o,pitchDegreesPerPixelMoved:l=-.5})=>{const O=new is({checkCorrectEvent:j=>n.mouseButton(j)===0&&j.ctrlKey||n.mouseButton(j)===2});return new To({clickTolerance:o,move:(j,H)=>({pitchDelta:(H.y-j.y)*l}),moveStateManager:O,enable:F,assignEvents:No})};class Ls{constructor(o,l){this._clickTolerance=o.clickTolerance||1,this._map=l,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new t.P(0,0)}_shouldBePrevented(o){return o<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(o,l,O){return this._calculateTransform(o,l,O)}touchmove(o,l,O){if(this._active){if(!this._shouldBePrevented(O.length))return o.preventDefault(),this._calculateTransform(o,l,O);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",o)}}touchend(o,l,O){this._calculateTransform(o,l,O),this._active&&this._shouldBePrevented(O.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(o,l,O){O.length>0&&(this._active=!0);const j=ca(O,l),H=new t.P(0,0),ie=new t.P(0,0);let he=0;for(const Ee in j){const De=j[Ee],qe=this._touches[Ee];qe&&(H._add(De),ie._add(De.sub(qe)),he++,j[Ee]=De)}if(this._touches=j,this._shouldBePrevented(he)||!ie.mag())return;const we=ie.div(he);return this._sum._add(we),this._sum.mag()<this._clickTolerance?void 0:{around:H.div(he),panDelta:we}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class mo{constructor(){this.reset()}reset(){this._active=!1,delete this._firstTwoTouches}touchstart(o,l,O){this._firstTwoTouches||O.length<2||(this._firstTwoTouches=[O[0].identifier,O[1].identifier],this._start([l[0],l[1]]))}touchmove(o,l,O){if(!this._firstTwoTouches)return;o.preventDefault();const[j,H]=this._firstTwoTouches,ie=xa(O,l,j),he=xa(O,l,H);if(!ie||!he)return;const we=this._aroundCenter?null:ie.add(he).div(2);return this._move([ie,he],we,o)}touchend(o,l,O){if(!this._firstTwoTouches)return;const[j,H]=this._firstTwoTouches,ie=xa(O,l,j),he=xa(O,l,H);ie&&he||(this._active&&n.suppressClick(),this.reset())}touchcancel(){this.reset()}enable(o){this._enabled=!0,this._aroundCenter=!!o&&o.around==="center"}disable(){this._enabled=!1,this.reset()}isEnabled(){return!!this._enabled}isActive(){return!!this._active}}function xa(F,o,l){for(let O=0;O<F.length;O++)if(F[O].identifier===l)return o[O]}function Rs(F,o){return Math.log(F/o)/Math.LN2}class gi extends mo{reset(){super.reset(),delete this._distance,delete this._startDistance}_start(o){this._startDistance=this._distance=o[0].dist(o[1])}_move(o,l){const O=this._distance;if(this._distance=o[0].dist(o[1]),this._active||!(Math.abs(Rs(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:Rs(this._distance,O),pinchAround:l}}}function bc(F,o){return 180*F.angleWith(o)/Math.PI}class Jc extends mo{reset(){super.reset(),delete this._minDiameter,delete this._startVector,delete this._vector}_start(o){this._startVector=this._vector=o[0].sub(o[1]),this._minDiameter=o[0].dist(o[1])}_move(o,l,O){const j=this._vector;if(this._vector=o[0].sub(o[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:bc(this._vector,j),pinchAround:l}}_isBelowThreshold(o){this._minDiameter=Math.min(this._minDiameter,o.mag());const l=25/(Math.PI*this._minDiameter)*360,O=bc(o,this._startVector);return Math.abs(O)<l}}function cl(F){return Math.abs(F.y)>Math.abs(F.x)}class Il extends mo{constructor(o){super(),this._currentTouchCount=0,this._map=o}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(o,l,O){super.touchstart(o,l,O),this._currentTouchCount=O.length}_start(o){this._lastPoints=o,cl(o[0].sub(o[1]))&&(this._valid=!1)}_move(o,l,O){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;const j=o[0].sub(this._lastPoints[0]),H=o[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(j,H,O.timeStamp),this._valid?(this._lastPoints=o,this._active=!0,{pitchDelta:(j.y+H.y)/2*-.5}):void 0}gestureBeginsVertically(o,l,O){if(this._valid!==void 0)return this._valid;const j=o.mag()>=2,H=l.mag()>=2;if(!j&&!H)return;if(!j||!H)return this._firstMove===void 0&&(this._firstMove=O),O-this._firstMove<100&&void 0;const ie=o.y>0==l.y>0;return cl(o)&&cl(l)&&ie}}const Pl={panStep:100,bearingStep:15,pitchStep:10};class sc{constructor(o){this._tr=new Ea(o);const l=Pl;this._panStep=l.panStep,this._bearingStep=l.bearingStep,this._pitchStep=l.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(o){if(o.altKey||o.ctrlKey||o.metaKey)return;let l=0,O=0,j=0,H=0,ie=0;switch(o.keyCode){case 61:case 107:case 171:case 187:l=1;break;case 189:case 109:case 173:l=-1;break;case 37:o.shiftKey?O=-1:(o.preventDefault(),H=-1);break;case 39:o.shiftKey?O=1:(o.preventDefault(),H=1);break;case 38:o.shiftKey?j=1:(o.preventDefault(),ie=-1);break;case 40:o.shiftKey?j=-1:(o.preventDefault(),ie=1);break;default:return}return this._rotationDisabled&&(O=0,j=0),{cameraAnimation:he=>{const we=this._tr;he.easeTo({duration:300,easeId:"keyboardHandler",easing:ti,zoom:l?Math.round(we.zoom)+l*(o.shiftKey?2:1):we.zoom,bearing:we.bearing+O*this._bearingStep,pitch:we.pitch+j*this._pitchStep,offset:[-H*this._panStep,-ie*this._panStep],center:we.center},{originalEvent:o})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function ti(F){return F*(2-F)}const as=4.000244140625;class ul{constructor(o,l){this._onTimeout=O=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(O)},this._map=o,this._tr=new Ea(o),this._triggerRenderFrame=l,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(o){this._defaultZoomRate=o}setWheelZoomRate(o){this._wheelZoomRate=o}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(o){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!o&&o.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(o){return!!this._map.cooperativeGestures.isEnabled()&&!(o.ctrlKey||this._map.cooperativeGestures.isBypassed(o))}wheel(o){if(!this.isEnabled())return;if(this._shouldBePrevented(o))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",o);let l=o.deltaMode===WheelEvent.DOM_DELTA_LINE?40*o.deltaY:o.deltaY;const O=p.now(),j=O-(this._lastWheelEventTime||0);this._lastWheelEventTime=O,l!==0&&l%as==0?this._type="wheel":l!==0&&Math.abs(l)<4?this._type="trackpad":j>400?(this._type=null,this._lastValue=l,this._timeout=setTimeout(this._onTimeout,40,o)):this._type||(this._type=Math.abs(j*l)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,l+=this._lastValue)),o.shiftKey&&l&&(l/=4),this._type&&(this._lastWheelEvent=o,this._delta-=l,this._active||this._start(o)),o.preventDefault()}_start(o){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);const l=n.mousePos(this._map.getCanvas(),o),O=this._tr;l.y>O.transform.height/2-O.transform.getHorizon()?this._around=t.N.convert(this._aroundCenter?O.center:O.unproject(l)):this._around=t.N.convert(O.center),this._aroundPoint=O.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;const o=this._tr.transform;if(this._delta!==0){const we=this._type==="wheel"&&Math.abs(this._delta)>as?this._wheelZoomRate:this._defaultZoomRate;let Ee=2/(1+Math.exp(-Math.abs(this._delta*we)));this._delta<0&&Ee!==0&&(Ee=1/Ee);const De=typeof this._targetZoom=="number"?o.zoomScale(this._targetZoom):o.scale;this._targetZoom=Math.min(o.maxZoom,Math.max(o.minZoom,o.scaleZoom(De*Ee))),this._type==="wheel"&&(this._startZoom=o.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const l=typeof this._targetZoom=="number"?this._targetZoom:o.zoom,O=this._startZoom,j=this._easing;let H,ie=!1;const he=p.now()-this._lastWheelEventTime;if(this._type==="wheel"&&O&&j&&he){const we=Math.min(he/200,1),Ee=j(we);H=t.z.number(O,l,Ee),we<1?this._frameId||(this._frameId=!0):ie=!0}else H=l,ie=!0;return this._active=!0,ie&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!ie,zoomDelta:H-o.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(o){let l=t.b9;if(this._prevEase){const O=this._prevEase,j=(p.now()-O.start)/O.duration,H=O.easing(j+.01)-O.easing(j),ie=.27/Math.sqrt(H*H+1e-4)*.01,he=Math.sqrt(.0729-ie*ie);l=t.b8(ie,he,.25,1)}return this._prevEase={start:p.now(),duration:o,easing:l},l}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class Ma{constructor(o,l){this._clickZoom=o,this._tapZoom=l}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class Ko{constructor(o){this._tr=new Ea(o),this.reset()}reset(){this._active=!1}dblclick(o,l){return o.preventDefault(),{cameraAnimation:O=>{O.easeTo({duration:300,zoom:this._tr.zoom+(o.shiftKey?-1:1),around:this._tr.unproject(l)},{originalEvent:o})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class dl{constructor(){this._tap=new ua({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(o,l,O){if(!this._swipePoint)if(this._tapTime){const j=l[0],H=o.timeStamp-this._tapTime<500,ie=this._tapPoint.dist(j)<30;H&&ie?O.length>0&&(this._swipePoint=j,this._swipeTouch=O[0].identifier):this.reset()}else this._tap.touchstart(o,l,O)}touchmove(o,l,O){if(this._tapTime){if(this._swipePoint){if(O[0].identifier!==this._swipeTouch)return;const j=l[0],H=j.y-this._swipePoint.y;return this._swipePoint=j,o.preventDefault(),this._active=!0,{zoomDelta:H/128}}}else this._tap.touchmove(o,l,O)}touchend(o,l,O){if(this._tapTime)this._swipePoint&&O.length===0&&this.reset();else{const j=this._tap.touchend(o,l,O);j&&(this._tapTime=o.timeStamp,this._tapPoint=j)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Ns{constructor(o,l,O){this._el=o,this._mousePan=l,this._touchPan=O}enable(o){this._inertiaOptions=o||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class zo{constructor(o,l,O){this._pitchWithRotate=o.pitchWithRotate,this._mouseRotate=l,this._mousePitch=O}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()}}class pl{constructor(o,l,O,j){this._el=o,this._touchZoom=l,this._touchRotate=O,this._tapDragZoom=j,this._rotationDisabled=!1,this._enabled=!0}enable(o){this._touchZoom.enable(o),this._rotationDisabled||this._touchRotate.enable(o),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class fs{constructor(o,l){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=o,this._options=l,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;const o=this._map.getCanvasContainer();o.classList.add("maplibregl-cooperative-gestures"),this._container=n.create("div","maplibregl-cooperative-gesture-screen",o);let l=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(l=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));const O=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),j=document.createElement("div");j.className="maplibregl-desktop-message",j.textContent=l,this._container.appendChild(j);const H=document.createElement("div");H.className="maplibregl-mobile-message",H.textContent=O,this._container.appendChild(H),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(n.remove(this._container),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(o){return o[this._bypassKey]}notifyGestureBlocked(o,l){this._enabled&&(this._map.fire(new t.k("cooperativegestureprevented",{gestureType:o,originalEvent:l})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}const Xo=F=>F.zoom||F.drag||F.pitch||F.rotate;class Is extends t.k{}function pi(F){return F.panDelta&&F.panDelta.mag()||F.zoomDelta||F.bearingDelta||F.pitchDelta}class $i{constructor(o,l){this.handleWindowEvent=j=>{this.handleEvent(j,`${j.type}Window`)},this.handleEvent=(j,H)=>{if(j.type==="blur")return void this.stop(!0);this._updatingCamera=!0;const ie=j.type==="renderFrame"?void 0:j,he={needsRenderFrame:!1},we={},Ee={},De=j.touches,qe=De?this._getMapTouches(De):void 0,it=qe?n.touchPos(this._map.getCanvas(),qe):n.mousePos(this._map.getCanvas(),j);for(const{handlerName:bt,handler:At,allowed:Et}of this._handlers){if(!At.isEnabled())continue;let Ut;this._blockedByActive(Ee,Et,bt)?At.reset():At[H||j.type]&&(Ut=At[H||j.type](j,it,qe),this.mergeHandlerResult(he,we,Ut,bt,ie),Ut&&Ut.needsRenderFrame&&this._triggerRenderFrame()),(Ut||At.isActive())&&(Ee[bt]=At)}const ut={};for(const bt in this._previousActiveHandlers)Ee[bt]||(ut[bt]=ie);this._previousActiveHandlers=Ee,(Object.keys(ut).length||pi(he))&&(this._changes.push([he,we,ut]),this._triggerRenderFrame()),(Object.keys(Ee).length||pi(he))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:ht}=he;ht&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],ht(this._map))},this._map=o,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new ac(o),this._bearingSnap=l.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(l);const O=this._el;this._listeners=[[O,"touchstart",{passive:!0}],[O,"touchmove",{passive:!1}],[O,"touchend",void 0],[O,"touchcancel",void 0],[O,"mousedown",void 0],[O,"mousemove",void 0],[O,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[O,"mouseover",void 0],[O,"mouseout",void 0],[O,"dblclick",void 0],[O,"click",void 0],[O,"keydown",{capture:!1}],[O,"keyup",void 0],[O,"wheel",{passive:!1}],[O,"contextmenu",void 0],[window,"blur",void 0]];for(const[j,H,ie]of this._listeners)n.addEventListener(j,H,j===document?this.handleWindowEvent:this.handleEvent,ie)}destroy(){for(const[o,l,O]of this._listeners)n.removeEventListener(o,l,o===document?this.handleWindowEvent:this.handleEvent,O)}_addDefaultHandlers(o){const l=this._map,O=l.getCanvasContainer();this._add("mapEvent",new oc(l,o));const j=l.boxZoom=new wo(l,o);this._add("boxZoom",j),o.interactive&&o.boxZoom&&j.enable();const H=l.cooperativeGestures=new fs(l,o.cooperativeGestures);this._add("cooperativeGestures",H),o.cooperativeGestures&&H.enable();const ie=new fo(l),he=new Ko(l);l.doubleClickZoom=new Ma(he,ie),this._add("tapZoom",ie),this._add("clickZoom",he),o.interactive&&o.doubleClickZoom&&l.doubleClickZoom.enable();const we=new dl;this._add("tapDragZoom",we);const Ee=l.touchPitch=new Il(l);this._add("touchPitch",Ee),o.interactive&&o.touchPitch&&l.touchPitch.enable(o.touchPitch);const De=Hl(o),qe=ll(o);l.dragRotate=new zo(o,De,qe),this._add("mouseRotate",De,["mousePitch"]),this._add("mousePitch",qe,["mouseRotate"]),o.interactive&&o.dragRotate&&l.dragRotate.enable();const it=(({enable:Ut,clickTolerance:Mt})=>{const Xt=new is({checkCorrectEvent:Qt=>n.mouseButton(Qt)===0&&!Qt.ctrlKey});return new To({clickTolerance:Mt,move:(Qt,Zt)=>({around:Zt,panDelta:Zt.sub(Qt)}),activateOnStart:!0,moveStateManager:Xt,enable:Ut,assignEvents:No})})(o),ut=new Ls(o,l);l.dragPan=new Ns(O,it,ut),this._add("mousePan",it),this._add("touchPan",ut,["touchZoom","touchRotate"]),o.interactive&&o.dragPan&&l.dragPan.enable(o.dragPan);const ht=new Jc,bt=new gi;l.touchZoomRotate=new pl(O,bt,ht,we),this._add("touchRotate",ht,["touchPan","touchZoom"]),this._add("touchZoom",bt,["touchPan","touchRotate"]),o.interactive&&o.touchZoomRotate&&l.touchZoomRotate.enable(o.touchZoomRotate);const At=l.scrollZoom=new ul(l,()=>this._triggerRenderFrame());this._add("scrollZoom",At,["mousePan"]),o.interactive&&o.scrollZoom&&l.scrollZoom.enable(o.scrollZoom);const Et=l.keyboard=new sc(l);this._add("keyboard",Et),o.interactive&&o.keyboard&&l.keyboard.enable(),this._add("blockableMapEvent",new Oo(l))}_add(o,l,O){this._handlers.push({handlerName:o,handler:l,allowed:O}),this._handlersById[o]=l}stop(o){if(!this._updatingCamera){for(const{handler:l}of this._handlers)l.reset();this._inertia.clear(),this._fireEvents({},{},o),this._changes=[]}}isActive(){for(const{handler:o}of this._handlers)if(o.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!Xo(this._eventsInProgress)||this.isZooming()}_blockedByActive(o,l,O){for(const j in o)if(j!==O&&(!l||l.indexOf(j)<0))return!0;return!1}_getMapTouches(o){const l=[];for(const O of o){const j=O.target;this._el.contains(j)&&l.push(O)}return l}mergeHandlerResult(o,l,O,j,H){if(!O)return;t.e(o,O);const ie={handlerName:j,originalEvent:O.originalEvent||H};O.zoomDelta!==void 0&&(l.zoom=ie),O.panDelta!==void 0&&(l.drag=ie),O.pitchDelta!==void 0&&(l.pitch=ie),O.bearingDelta!==void 0&&(l.rotate=ie)}_applyChanges(){const o={},l={},O={};for(const[j,H,ie]of this._changes)j.panDelta&&(o.panDelta=(o.panDelta||new t.P(0,0))._add(j.panDelta)),j.zoomDelta&&(o.zoomDelta=(o.zoomDelta||0)+j.zoomDelta),j.bearingDelta&&(o.bearingDelta=(o.bearingDelta||0)+j.bearingDelta),j.pitchDelta&&(o.pitchDelta=(o.pitchDelta||0)+j.pitchDelta),j.around!==void 0&&(o.around=j.around),j.pinchAround!==void 0&&(o.pinchAround=j.pinchAround),j.noInertia&&(o.noInertia=j.noInertia),t.e(l,H),t.e(O,ie);this._updateMapTransform(o,l,O),this._changes=[]}_updateMapTransform(o,l,O){const j=this._map,H=j._getTransformForUpdate(),ie=j.terrain;if(!(pi(o)||ie&&this._terrainMovement))return this._fireEvents(l,O,!0);let{panDelta:he,zoomDelta:we,bearingDelta:Ee,pitchDelta:De,around:qe,pinchAround:it}=o;it!==void 0&&(qe=it),j._stop(!0),qe=qe||j.transform.centerPoint;const ut=H.pointLocation(he?qe.sub(he):qe);Ee&&(H.bearing+=Ee),De&&(H.pitch+=De),we&&(H.zoom+=we),ie?this._terrainMovement||!l.drag&&!l.zoom?l.drag&&this._terrainMovement?H.center=H.pointLocation(H.centerPoint.sub(he)):H.setLocationAtPoint(ut,qe):(this._terrainMovement=!0,this._map._elevationFreeze=!0,H.setLocationAtPoint(ut,qe)):H.setLocationAtPoint(ut,qe),j._applyUpdatedTransform(H),this._map._update(),o.noInertia||this._inertia.record(o),this._fireEvents(l,O,!0)}_fireEvents(o,l,O){const j=Xo(this._eventsInProgress),H=Xo(o),ie={};for(const qe in o){const{originalEvent:it}=o[qe];this._eventsInProgress[qe]||(ie[`${qe}start`]=it),this._eventsInProgress[qe]=o[qe]}!j&&H&&this._fireEvent("movestart",H.originalEvent);for(const qe in ie)this._fireEvent(qe,ie[qe]);H&&this._fireEvent("move",H.originalEvent);for(const qe in o){const{originalEvent:it}=o[qe];this._fireEvent(qe,it)}const he={};let we;for(const qe in this._eventsInProgress){const{handlerName:it,originalEvent:ut}=this._eventsInProgress[qe];this._handlersById[it].isActive()||(delete this._eventsInProgress[qe],we=l[it]||ut,he[`${qe}end`]=we)}for(const qe in he)this._fireEvent(qe,he[qe]);const Ee=Xo(this._eventsInProgress),De=(j||H)&&!Ee;if(De&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;const qe=this._map._getTransformForUpdate();qe.recalculateZoom(this._map.terrain),this._map._applyUpdatedTransform(qe)}if(O&&De){this._updatingCamera=!0;const qe=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),it=ut=>ut!==0&&-this._bearingSnap<ut&&ut<this._bearingSnap;!qe||!qe.essential&&p.prefersReducedMotion?(this._map.fire(new t.k("moveend",{originalEvent:we})),it(this._map.getBearing())&&this._map.resetNorth()):(it(qe.bearing||this._map.getBearing())&&(qe.bearing=0),qe.freezeElevation=!0,this._map.easeTo(qe,{originalEvent:we})),this._updatingCamera=!1}}_fireEvent(o,l){this._map.fire(new t.k(o,l?{originalEvent:l}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add(o=>{delete this._frameId,this.handleEvent(new Is("renderFrame",{timeStamp:o})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class oo extends t.E{constructor(o,l){super(),this._renderFrameCallback=()=>{const O=Math.min((p.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(O)),O<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=o,this._bearingSnap=l.bearingSnap,this.on("moveend",()=>{delete this._requestedCameraState})}getCenter(){return new t.N(this.transform.center.lng,this.transform.center.lat)}setCenter(o,l){return this.jumpTo({center:o},l)}panBy(o,l,O){return o=t.P.convert(o).mult(-1),this.panTo(this.transform.center,t.e({offset:o},l),O)}panTo(o,l,O){return this.easeTo(t.e({center:o},l),O)}getZoom(){return this.transform.zoom}setZoom(o,l){return this.jumpTo({zoom:o},l),this}zoomTo(o,l,O){return this.easeTo(t.e({zoom:o},l),O)}zoomIn(o,l){return this.zoomTo(this.getZoom()+1,o,l),this}zoomOut(o,l){return this.zoomTo(this.getZoom()-1,o,l),this}getBearing(){return this.transform.bearing}setBearing(o,l){return this.jumpTo({bearing:o},l),this}getPadding(){return this.transform.padding}setPadding(o,l){return this.jumpTo({padding:o},l),this}rotateTo(o,l,O){return this.easeTo(t.e({bearing:o},l),O)}resetNorth(o,l){return this.rotateTo(0,t.e({duration:1e3},o),l),this}resetNorthPitch(o,l){return this.easeTo(t.e({bearing:0,pitch:0,duration:1e3},o),l),this}snapToNorth(o,l){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(o,l):this}getPitch(){return this.transform.pitch}setPitch(o,l){return this.jumpTo({pitch:o},l),this}cameraForBounds(o,l){o=Te.convert(o);const O=l&&l.bearing||0;return this._cameraForBoxAndBearing(o.getNorthWest(),o.getSouthEast(),O,l)}_cameraForBoxAndBearing(o,l,O,j){const H={top:0,bottom:0,right:0,left:0};if(typeof(j=t.e({padding:H,offset:[0,0],maxZoom:this.transform.maxZoom},j)).padding=="number"){const vn=j.padding;j.padding={top:vn,bottom:vn,right:vn,left:vn}}j.padding=t.e(H,j.padding);const ie=this.transform,he=ie.padding,we=new Te(o,l),Ee=ie.project(we.getNorthWest()),De=ie.project(we.getNorthEast()),qe=ie.project(we.getSouthEast()),it=ie.project(we.getSouthWest()),ut=t.ba(-O),ht=Ee.rotate(ut),bt=De.rotate(ut),At=qe.rotate(ut),Et=it.rotate(ut),Ut=new t.P(Math.max(ht.x,bt.x,Et.x,At.x),Math.max(ht.y,bt.y,Et.y,At.y)),Mt=new t.P(Math.min(ht.x,bt.x,Et.x,At.x),Math.min(ht.y,bt.y,Et.y,At.y)),Xt=Ut.sub(Mt),Qt=(ie.width-(he.left+he.right+j.padding.left+j.padding.right))/Xt.x,Zt=(ie.height-(he.top+he.bottom+j.padding.top+j.padding.bottom))/Xt.y;if(Zt<0||Qt<0)return void t.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.");const pr=Math.min(ie.scaleZoom(ie.scale*Math.min(Qt,Zt)),j.maxZoom),Tr=t.P.convert(j.offset),Br=(j.padding.left-j.padding.right)/2,Dr=(j.padding.top-j.padding.bottom)/2,Gr=new t.P(Br,Dr).rotate(t.ba(O)),Zr=Tr.add(Gr).mult(ie.scale/ie.zoomScale(pr));return{center:ie.unproject(Ee.add(qe).div(2).sub(Zr)),zoom:pr,bearing:O}}fitBounds(o,l,O){return this._fitInternal(this.cameraForBounds(o,l),l,O)}fitScreenCoordinates(o,l,O,j,H){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(t.P.convert(o)),this.transform.pointLocation(t.P.convert(l)),O,j),j,H)}_fitInternal(o,l,O){return o?(delete(l=t.e(o,l)).padding,l.linear?this.easeTo(l,O):this.flyTo(l,O)):this}jumpTo(o,l){this.stop();const O=this._getTransformForUpdate();let j=!1,H=!1,ie=!1;return"zoom"in o&&O.zoom!==+o.zoom&&(j=!0,O.zoom=+o.zoom),o.center!==void 0&&(O.center=t.N.convert(o.center)),"bearing"in o&&O.bearing!==+o.bearing&&(H=!0,O.bearing=+o.bearing),"pitch"in o&&O.pitch!==+o.pitch&&(ie=!0,O.pitch=+o.pitch),o.padding==null||O.isPaddingEqual(o.padding)||(O.padding=o.padding),this._applyUpdatedTransform(O),this.fire(new t.k("movestart",l)).fire(new t.k("move",l)),j&&this.fire(new t.k("zoomstart",l)).fire(new t.k("zoom",l)).fire(new t.k("zoomend",l)),H&&this.fire(new t.k("rotatestart",l)).fire(new t.k("rotate",l)).fire(new t.k("rotateend",l)),ie&&this.fire(new t.k("pitchstart",l)).fire(new t.k("pitch",l)).fire(new t.k("pitchend",l)),this.fire(new t.k("moveend",l))}calculateCameraOptionsFromTo(o,l,O,j=0){const H=t.Z.fromLngLat(o,l),ie=t.Z.fromLngLat(O,j),he=ie.x-H.x,we=ie.y-H.y,Ee=ie.z-H.z,De=Math.hypot(he,we,Ee);if(De===0)throw new Error("Can't calculate camera options with same From and To");const qe=Math.hypot(he,we),it=this.transform.scaleZoom(this.transform.cameraToCenterDistance/De/this.transform.tileSize),ut=180*Math.atan2(he,-we)/Math.PI;let ht=180*Math.acos(qe/De)/Math.PI;return ht=Ee<0?90-ht:90+ht,{center:ie.toLngLat(),zoom:it,pitch:ht,bearing:ut}}easeTo(o,l){var O;this._stop(!1,o.easeId),((o=t.e({offset:[0,0],duration:500,easing:t.b9},o)).animate===!1||!o.essential&&p.prefersReducedMotion)&&(o.duration=0);const j=this._getTransformForUpdate(),H=j.zoom,ie=j.bearing,he=j.pitch,we=j.padding,Ee="bearing"in o?this._normalizeBearing(o.bearing,ie):ie,De="pitch"in o?+o.pitch:he,qe="padding"in o?o.padding:j.padding,it=t.P.convert(o.offset);let ut=j.centerPoint.add(it);const ht=j.pointLocation(ut),{center:bt,zoom:At}=j.getConstrained(t.N.convert(o.center||ht),(O=o.zoom)!==null&&O!==void 0?O:H);this._normalizeCenter(bt,j);const Et=j.project(ht),Ut=j.project(bt).sub(Et),Mt=j.zoomScale(At-H);let Xt,Qt;o.around&&(Xt=t.N.convert(o.around),Qt=j.locationPoint(Xt));const Zt={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||At!==H,this._rotating=this._rotating||ie!==Ee,this._pitching=this._pitching||De!==he,this._padding=!j.isPaddingEqual(qe),this._easeId=o.easeId,this._prepareEase(l,o.noMoveStart,Zt),this.terrain&&this._prepareElevation(bt),this._ease(pr=>{if(this._zooming&&(j.zoom=t.z.number(H,At,pr)),this._rotating&&(j.bearing=t.z.number(ie,Ee,pr)),this._pitching&&(j.pitch=t.z.number(he,De,pr)),this._padding&&(j.interpolatePadding(we,qe,pr),ut=j.centerPoint.add(it)),this.terrain&&!o.freezeElevation&&this._updateElevation(pr),Xt)j.setLocationAtPoint(Xt,Qt);else{const Tr=j.zoomScale(j.zoom-H),Br=At>H?Math.min(2,Mt):Math.max(.5,Mt),Dr=Math.pow(Br,1-pr),Gr=j.unproject(Et.add(Ut.mult(pr*Dr)).mult(Tr));j.setLocationAtPoint(j.renderWorldCopies?Gr.wrap():Gr,ut)}this._applyUpdatedTransform(j),this._fireMoveEvents(l)},pr=>{this.terrain&&o.freezeElevation&&this._finalizeElevation(),this._afterEase(l,pr)},o),this}_prepareEase(o,l,O={}){this._moving=!0,l||O.moving||this.fire(new t.k("movestart",o)),this._zooming&&!O.zooming&&this.fire(new t.k("zoomstart",o)),this._rotating&&!O.rotating&&this.fire(new t.k("rotatestart",o)),this._pitching&&!O.pitching&&this.fire(new t.k("pitchstart",o))}_prepareElevation(o){this._elevationCenter=o,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(o,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(o){this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);const l=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(o<1&&l!==this._elevationTarget){const O=this._elevationTarget-this._elevationStart,j=(l-(O*o+this._elevationStart))/(1-o);this._elevationStart+=o*(O-j),this._elevationTarget=l}this.transform.elevation=t.z.number(this._elevationStart,this._elevationTarget,o)}_finalizeElevation(){this._elevationFreeze=!1,this.transform.recalculateZoom(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(o){const l=o.getCameraPosition(),O=this.terrain.getElevationForLngLatZoom(l.lngLat,o.zoom);if(l.altitude<O){const j=this.calculateCameraOptionsFromTo(l.lngLat,O,o.center,o.elevation);return{pitch:j.pitch,zoom:j.zoom}}return{}}_applyUpdatedTransform(o){const l=[];if(this.terrain&&l.push(j=>this._elevateCameraIfInsideTerrain(j)),this.transformCameraUpdate&&l.push(j=>this.transformCameraUpdate(j)),!l.length)return;const O=o.clone();for(const j of l){const H=O.clone(),{center:ie,zoom:he,pitch:we,bearing:Ee,elevation:De}=j(H);ie&&(H.center=ie),he!==void 0&&(H.zoom=he),we!==void 0&&(H.pitch=we),Ee!==void 0&&(H.bearing=Ee),De!==void 0&&(H.elevation=De),O.apply(H)}this.transform.apply(O)}_fireMoveEvents(o){this.fire(new t.k("move",o)),this._zooming&&this.fire(new t.k("zoom",o)),this._rotating&&this.fire(new t.k("rotate",o)),this._pitching&&this.fire(new t.k("pitch",o))}_afterEase(o,l){if(this._easeId&&l&&this._easeId===l)return;delete this._easeId;const O=this._zooming,j=this._rotating,H=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,O&&this.fire(new t.k("zoomend",o)),j&&this.fire(new t.k("rotateend",o)),H&&this.fire(new t.k("pitchend",o)),this.fire(new t.k("moveend",o))}flyTo(o,l){var O;if(!o.essential&&p.prefersReducedMotion){const on=t.M(o,["center","zoom","bearing","pitch","around"]);return this.jumpTo(on,l)}this.stop(),o=t.e({offset:[0,0],speed:1.2,curve:1.42,easing:t.b9},o);const j=this._getTransformForUpdate(),H=j.zoom,ie=j.bearing,he=j.pitch,we=j.padding,Ee="bearing"in o?this._normalizeBearing(o.bearing,ie):ie,De="pitch"in o?+o.pitch:he,qe="padding"in o?o.padding:j.padding,it=t.P.convert(o.offset);let ut=j.centerPoint.add(it);const ht=j.pointLocation(ut),{center:bt,zoom:At}=j.getConstrained(t.N.convert(o.center||ht),(O=o.zoom)!==null&&O!==void 0?O:H);this._normalizeCenter(bt,j);const Et=j.zoomScale(At-H),Ut=j.project(ht),Mt=j.project(bt).sub(Ut);let Xt=o.curve;const Qt=Math.max(j.width,j.height),Zt=Qt/Et,pr=Mt.mag();if("minZoom"in o){const on=t.ad(Math.min(o.minZoom,H,At),j.minZoom,j.maxZoom),Sn=Qt/j.zoomScale(on-H);Xt=Math.sqrt(Sn/pr*2)}const Tr=Xt*Xt;function Br(on){const Sn=(Zt*Zt-Qt*Qt+(on?-1:1)*Tr*Tr*pr*pr)/(2*(on?Zt:Qt)*Tr*pr);return Math.log(Math.sqrt(Sn*Sn+1)-Sn)}function Dr(on){return(Math.exp(on)-Math.exp(-on))/2}function Gr(on){return(Math.exp(on)+Math.exp(-on))/2}const Zr=Br(!1);let vn=function(on){return Gr(Zr)/Gr(Zr+Xt*on)},$r=function(on){return Qt*((Gr(Zr)*(Dr(Sn=Zr+Xt*on)/Gr(Sn))-Dr(Zr))/Tr)/pr;var Sn},bn=(Br(!0)-Zr)/Xt;if(Math.abs(pr)<1e-6||!isFinite(bn)){if(Math.abs(Qt-Zt)<1e-6)return this.easeTo(o,l);const on=Zt<Qt?-1:1;bn=Math.abs(Math.log(Zt/Qt))/Xt,$r=()=>0,vn=Sn=>Math.exp(on*Xt*Sn)}if("duration"in o)o.duration=+o.duration;else{const on="screenSpeed"in o?+o.screenSpeed/Xt:+o.speed;o.duration=1e3*bn/on}return o.maxDuration&&o.duration>o.maxDuration&&(o.duration=0),this._zooming=!0,this._rotating=ie!==Ee,this._pitching=De!==he,this._padding=!j.isPaddingEqual(qe),this._prepareEase(l,!1),this.terrain&&this._prepareElevation(bt),this._ease(on=>{const Sn=on*bn,mn=1/vn(Sn);j.zoom=on===1?At:H+j.scaleZoom(mn),this._rotating&&(j.bearing=t.z.number(ie,Ee,on)),this._pitching&&(j.pitch=t.z.number(he,De,on)),this._padding&&(j.interpolatePadding(we,qe,on),ut=j.centerPoint.add(it)),this.terrain&&!o.freezeElevation&&this._updateElevation(on);const Rn=on===1?bt:j.unproject(Ut.add(Mt.mult($r(Sn))).mult(mn));j.setLocationAtPoint(j.renderWorldCopies?Rn.wrap():Rn,ut),this._applyUpdatedTransform(j),this._fireMoveEvents(l)},()=>{this.terrain&&o.freezeElevation&&this._finalizeElevation(),this._afterEase(l)},o),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(o,l){var O;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const j=this._onEaseEnd;delete this._onEaseEnd,j.call(this,l)}return o||(O=this.handlers)===null||O===void 0||O.stop(!1),this}_ease(o,l,O){O.animate===!1||O.duration===0?(o(1),l()):(this._easeStart=p.now(),this._easeOptions=O,this._onEaseFrame=o,this._onEaseEnd=l,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(o,l){o=t.b3(o,-180,180);const O=Math.abs(o-l);return Math.abs(o-360-l)<O&&(o-=360),Math.abs(o+360-l)<O&&(o+=360),o}_normalizeCenter(o,l){if(!l.renderWorldCopies||l.lngRange)return;const O=o.lng-l.center.lng;o.lng+=O>180?-360:O<-180?360:0}queryTerrainElevation(o){return this.terrain?this.terrain.getElevationForLngLatZoom(t.N.convert(o),this.transform.tileZoom)-this.transform.elevation:null}}const Bo={compact:!0,customAttribution:'<a href="https://maplibre.org/" target="_blank">MapLibre</a>'};class os{constructor(o=Bo){this._toggleAttribution=()=>{this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show")):(this._container.classList.add("maplibregl-compact-show"),this._container.removeAttribute("open")))},this._updateData=l=>{!l||l.sourceDataType!=="metadata"&&l.sourceDataType!=="visibility"&&l.dataType!=="style"&&l.type!=="terrain"||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact===!1?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=o}getDefaultPosition(){return"bottom-right"}onAdd(o){return this._map=o,this._compact=this.options.compact,this._container=n.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=n.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=n.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){n.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(o,l){const O=this._map._getUIString(`AttributionControl.${l}`);o.title=O,o.setAttribute("aria-label",O)}_updateAttributions(){if(!this._map.style)return;let o=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?o=o.concat(this.options.customAttribution.map(j=>typeof j!="string"?"":j)):typeof this.options.customAttribution=="string"&&o.push(this.options.customAttribution)),this._map.style.stylesheet){const j=this._map.style.stylesheet;this.styleOwner=j.owner,this.styleId=j.id}const l=this._map.style.sourceCaches;for(const j in l){const H=l[j];if(H.used||H.usedForTerrain){const ie=H.getSource();ie.attribution&&o.indexOf(ie.attribution)<0&&o.push(ie.attribution)}}o=o.filter(j=>String(j).trim()),o.sort((j,H)=>j.length-H.length),o=o.filter((j,H)=>{for(let ie=H+1;ie<o.length;ie++)if(o[ie].indexOf(j)>=0)return!1;return!0});const O=o.join(" | ");O!==this._attribHTML&&(this._attribHTML=O,o.length?(this._innerContainer.innerHTML=O,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class go{constructor(o={}){this._updateCompact=()=>{const l=this._container.children;if(l.length){const O=l[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&O.classList.add("maplibregl-compact"):O.classList.remove("maplibregl-compact")}},this.options=o}getDefaultPosition(){return"bottom-left"}onAdd(o){this._map=o,this._compact=this.options&&this.options.compact,this._container=n.create("div","maplibregl-ctrl");const l=n.create("a","maplibregl-ctrl-logo");return l.target="_blank",l.rel="noopener nofollow",l.href="https://maplibre.org/",l.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),l.setAttribute("rel","noopener nofollow"),this._container.appendChild(l),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){n.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class _c{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(o){const l=++this._id;return this._queue.push({callback:o,id:l,cancelled:!1}),l}remove(o){const l=this._currentlyRunning,O=l?this._queue.concat(l):this._queue;for(const j of O)if(j.id===o)return void(j.cancelled=!0)}run(o=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const l=this._currentlyRunning=this._queue;this._queue=[];for(const O of l)if(!O.cancelled&&(O.callback(o),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var ci=t.Y([{name:"a_pos3d",type:"Int16",components:3}]);class Do extends t.E{constructor(o){super(),this.sourceCache=o,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,o.usedForTerrain=!0,o.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(o,l){this.sourceCache.update(o,l),this._renderableTilesKeys=[];const O={};for(const j of o.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:l}))O[j.key]=!0,this._renderableTilesKeys.push(j.key),this._tiles[j.key]||(j.posMatrix=new Float64Array(16),t.aQ(j.posMatrix,0,t.X,0,t.X,0,1),this._tiles[j.key]=new ke(j,this.tileSize));for(const j in this._tiles)O[j]||delete this._tiles[j]}freeRtt(o){for(const l in this._tiles){const O=this._tiles[l];(!o||O.tileID.equals(o)||O.tileID.isChildOf(o)||o.isChildOf(O.tileID))&&(O.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(o=>this.getTileByID(o))}getTileByID(o){return this._tiles[o]}getTerrainCoords(o){const l={};for(const O of this._renderableTilesKeys){const j=this._tiles[O].tileID;if(j.canonical.equals(o.canonical)){const H=o.clone();H.posMatrix=new Float64Array(16),t.aQ(H.posMatrix,0,t.X,0,t.X,0,1),l[O]=H}else if(j.canonical.isChildOf(o.canonical)){const H=o.clone();H.posMatrix=new Float64Array(16);const ie=j.canonical.z-o.canonical.z,he=j.canonical.x-(j.canonical.x>>ie<<ie),we=j.canonical.y-(j.canonical.y>>ie<<ie),Ee=t.X>>ie;t.aQ(H.posMatrix,0,Ee,0,Ee,0,1),t.J(H.posMatrix,H.posMatrix,[-he*Ee,-we*Ee,0]),l[O]=H}else if(o.canonical.isChildOf(j.canonical)){const H=o.clone();H.posMatrix=new Float64Array(16);const ie=o.canonical.z-j.canonical.z,he=o.canonical.x-(o.canonical.x>>ie<<ie),we=o.canonical.y-(o.canonical.y>>ie<<ie),Ee=t.X>>ie;t.aQ(H.posMatrix,0,t.X,0,t.X,0,1),t.J(H.posMatrix,H.posMatrix,[he*Ee,we*Ee,0]),t.K(H.posMatrix,H.posMatrix,[1/2**ie,1/2**ie,0]),l[O]=H}}return l}getSourceTile(o,l){const O=this.sourceCache._source;let j=o.overscaledZ-this.deltaZoom;if(j>O.maxzoom&&(j=O.maxzoom),j<O.minzoom)return null;this._sourceTileCache[o.key]||(this._sourceTileCache[o.key]=o.scaledTo(j).key);let H=this.sourceCache.getTileByID(this._sourceTileCache[o.key]);if((!H||!H.dem)&&l)for(;j>=O.minzoom&&(!H||!H.dem);)H=this.sourceCache.getTileByID(o.scaledTo(j--).key);return H}tilesAfterTime(o=Date.now()){return Object.values(this._tiles).filter(l=>l.timeAdded>=o)}}class ea{constructor(o,l,O){this.painter=o,this.sourceCache=new Do(l),this.options=O,this.exaggeration=typeof O.exaggeration=="number"?O.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(o,l,O,j=t.X){var H;if(!(l>=0&&l<j&&O>=0&&O<j))return 0;const ie=this.getTerrainData(o),he=(H=ie.tile)===null||H===void 0?void 0:H.dem;if(!he)return 0;const we=(function(ht,bt,At){var Et=bt[0],Ut=bt[1];return ht[0]=At[0]*Et+At[4]*Ut+At[12],ht[1]=At[1]*Et+At[5]*Ut+At[13],ht})([],[l/j*t.X,O/j*t.X],ie.u_terrain_matrix),Ee=[we[0]*he.dim,we[1]*he.dim],De=Math.floor(Ee[0]),qe=Math.floor(Ee[1]),it=Ee[0]-De,ut=Ee[1]-qe;return he.get(De,qe)*(1-it)*(1-ut)+he.get(De+1,qe)*it*(1-ut)+he.get(De,qe+1)*(1-it)*ut+he.get(De+1,qe+1)*it*ut}getElevationForLngLatZoom(o,l){const{tileID:O,mercatorX:j,mercatorY:H}=this._getOverscaledTileIDFromLngLatZoom(o,l);return this.getElevation(O,j%t.X,H%t.X,t.X)}getElevation(o,l,O,j=t.X){return this.getDEMElevation(o,l,O,j)*this.exaggeration}getTerrainData(o){if(!this._emptyDemTexture){const j=this.painter.context,H=new t.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new I(j,H,j.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new I(j,new t.R({width:1,height:1}),j.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(j.gl.NEAREST,j.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=t.ao([])}const l=this.sourceCache.getSourceTile(o,!0);if(l&&l.dem&&(!l.demTexture||l.needsTerrainPrepare)){const j=this.painter.context;l.demTexture=this.painter.getTileTexture(l.dem.stride),l.demTexture?l.demTexture.update(l.dem.getPixels(),{premultiply:!1}):l.demTexture=new I(j,l.dem.getPixels(),j.gl.RGBA,{premultiply:!1}),l.demTexture.bind(j.gl.NEAREST,j.gl.CLAMP_TO_EDGE),l.needsTerrainPrepare=!1}const O=l&&l+l.tileID.key+o.key;if(O&&!this._demMatrixCache[O]){const j=this.sourceCache.sourceCache._source.maxzoom;let H=o.canonical.z-l.tileID.canonical.z;o.overscaledZ>o.canonical.z&&(o.canonical.z>=j?H=o.canonical.z-j:t.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const ie=o.canonical.x-(o.canonical.x>>H<<H),he=o.canonical.y-(o.canonical.y>>H<<H),we=t.bb(new Float64Array(16),[1/(t.X<<H),1/(t.X<<H),0]);t.J(we,we,[ie*t.X,he*t.X,0]),this._demMatrixCache[o.key]={matrix:we,coord:o}}return{u_depth:2,u_terrain:3,u_terrain_dim:l&&l.dem&&l.dem.dim||1,u_terrain_matrix:O?this._demMatrixCache[o.key].matrix:this._emptyDemMatrix,u_terrain_unpack:l&&l.dem&&l.dem.getUnpackVector()||this._emptyDemUnpack,u_terrain_exaggeration:this.exaggeration,texture:(l&&l.demTexture||this._emptyDemTexture).texture,depthTexture:(this._fboDepthTexture||this._emptyDepthTexture).texture,tile:l}}getFramebuffer(o){const l=this.painter,O=l.width/devicePixelRatio,j=l.height/devicePixelRatio;return!this._fbo||this._fbo.width===O&&this._fbo.height===j||(this._fbo.destroy(),this._fboCoordsTexture.destroy(),this._fboDepthTexture.destroy(),delete this._fbo,delete this._fboDepthTexture,delete this._fboCoordsTexture),this._fboCoordsTexture||(this._fboCoordsTexture=new I(l.context,{width:O,height:j,data:null},l.context.gl.RGBA,{premultiply:!1}),this._fboCoordsTexture.bind(l.context.gl.NEAREST,l.context.gl.CLAMP_TO_EDGE)),this._fboDepthTexture||(this._fboDepthTexture=new I(l.context,{width:O,height:j,data:null},l.context.gl.RGBA,{premultiply:!1}),this._fboDepthTexture.bind(l.context.gl.NEAREST,l.context.gl.CLAMP_TO_EDGE)),this._fbo||(this._fbo=l.context.createFramebuffer(O,j,!0,!1),this._fbo.depthAttachment.set(l.context.createRenderbuffer(l.context.gl.DEPTH_COMPONENT16,O,j))),this._fbo.colorAttachment.set(o==="coords"?this._fboCoordsTexture.texture:this._fboDepthTexture.texture),this._fbo}getCoordsTexture(){const o=this.painter.context;if(this._coordsTexture)return this._coordsTexture;const l=new Uint8Array(this._coordsTextureSize*this._coordsTextureSize*4);for(let H=0,ie=0;H<this._coordsTextureSize;H++)for(let he=0;he<this._coordsTextureSize;he++,ie+=4)l[ie+0]=255&he,l[ie+1]=255&H,l[ie+2]=he>>8<<4|H>>8,l[ie+3]=0;const O=new t.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(l.buffer)),j=new I(o,O,o.gl.RGBA,{premultiply:!1});return j.bind(o.gl.NEAREST,o.gl.CLAMP_TO_EDGE),this._coordsTexture=j,j}pointCoordinate(o){this.painter.maybeDrawDepthAndCoords(!0);const l=new Uint8Array(4),O=this.painter.context,j=O.gl,H=Math.round(o.x*this.painter.pixelRatio/devicePixelRatio),ie=Math.round(o.y*this.painter.pixelRatio/devicePixelRatio),he=Math.round(this.painter.height/devicePixelRatio);O.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),j.readPixels(H,he-ie-1,1,1,j.RGBA,j.UNSIGNED_BYTE,l),O.bindFramebuffer.set(null);const we=l[0]+(l[2]>>4<<8),Ee=l[1]+((15&l[2])<<8),De=this.coordsIndex[255-l[3]],qe=De&&this.sourceCache.getTileByID(De);if(!qe)return null;const it=this._coordsTextureSize,ut=(1<<qe.tileID.canonical.z)*it;return new t.Z((qe.tileID.canonical.x*it+we)/ut+qe.tileID.wrap,(qe.tileID.canonical.y*it+Ee)/ut,this.getElevation(qe.tileID,we,Ee,it))}depthAtPoint(o){const l=new Uint8Array(4),O=this.painter.context,j=O.gl;return O.bindFramebuffer.set(this.getFramebuffer("depth").framebuffer),j.readPixels(o.x,this.painter.height/devicePixelRatio-o.y-1,1,1,j.RGBA,j.UNSIGNED_BYTE,l),O.bindFramebuffer.set(null),(l[0]/16777216+l[1]/65536+l[2]/256+l[3])/256}getTerrainMesh(){if(this._mesh)return this._mesh;const o=this.painter.context,l=new t.bc,O=new t.aY,j=this.meshSize,H=t.X/j,ie=j*j;for(let qe=0;qe<=j;qe++)for(let it=0;it<=j;it++)l.emplaceBack(it*H,qe*H,0);for(let qe=0;qe<ie;qe+=j+1)for(let it=0;it<j;it++)O.emplaceBack(it+qe,j+it+qe+1,j+it+qe+2),O.emplaceBack(it+qe,j+it+qe+2,it+qe+1);const he=l.length,we=he+2*(j+1);for(const qe of[0,1])for(let it=0;it<=j;it++)for(const ut of[0,1])l.emplaceBack(it*H,qe*t.X,ut);for(let qe=0;qe<2*j;qe+=2)O.emplaceBack(we+qe,we+qe+1,we+qe+3),O.emplaceBack(we+qe,we+qe+3,we+qe+2),O.emplaceBack(he+qe,he+qe+3,he+qe+1),O.emplaceBack(he+qe,he+qe+2,he+qe+3);const Ee=l.length,De=Ee+2*(j+1);for(const qe of[0,1])for(let it=0;it<=j;it++)for(const ut of[0,1])l.emplaceBack(qe*t.X,it*H,ut);for(let qe=0;qe<2*j;qe+=2)O.emplaceBack(Ee+qe,Ee+qe+1,Ee+qe+3),O.emplaceBack(Ee+qe,Ee+qe+3,Ee+qe+2),O.emplaceBack(De+qe,De+qe+3,De+qe+1),O.emplaceBack(De+qe,De+qe+2,De+qe+3);return this._mesh=new nc(o.createVertexBuffer(l,ci.members),o.createIndexBuffer(O),t.a0.simpleSegment(0,0,l.length,O.length)),this._mesh}getMeshFrameDelta(o){return 2*Math.PI*t.bd/Math.pow(2,o)/5}getMinTileElevationForLngLatZoom(o,l){var O;const{tileID:j}=this._getOverscaledTileIDFromLngLatZoom(o,l);return(O=this.getMinMaxElevation(j).minElevation)!==null&&O!==void 0?O:0}getMinMaxElevation(o){const l=this.getTerrainData(o).tile,O={minElevation:null,maxElevation:null};return l&&l.dem&&(O.minElevation=l.dem.min*this.exaggeration,O.maxElevation=l.dem.max*this.exaggeration),O}_getOverscaledTileIDFromLngLatZoom(o,l){const O=t.Z.fromLngLat(o.wrap()),j=(1<<l)*t.X,H=O.x*j,ie=O.y*j,he=Math.floor(H/t.X),we=Math.floor(ie/t.X);return{tileID:new t.S(l,0,l,he,we),mercatorX:H,mercatorY:ie}}}class Ol{constructor(o,l,O){this._context=o,this._size=l,this._tileSize=O,this._objects=[],this._recentlyUsed=[],this._stamp=0}destruct(){for(const o of this._objects)o.texture.destroy(),o.fbo.destroy()}_createObject(o){const l=this._context.createFramebuffer(this._tileSize,this._tileSize,!0,!0),O=new I(this._context,{width:this._tileSize,height:this._tileSize,data:null},this._context.gl.RGBA);return O.bind(this._context.gl.LINEAR,this._context.gl.CLAMP_TO_EDGE),l.depthAttachment.set(this._context.createRenderbuffer(this._context.gl.DEPTH_STENCIL,this._tileSize,this._tileSize)),l.colorAttachment.set(O.texture),{id:o,fbo:l,texture:O,stamp:-1,inUse:!1}}getObjectForId(o){return this._objects[o]}useObject(o){o.inUse=!0,this._recentlyUsed=this._recentlyUsed.filter(l=>o.id!==l),this._recentlyUsed.push(o.id)}stampObject(o){o.stamp=++this._stamp}getOrCreateFreeObject(){for(const l of this._recentlyUsed)if(!this._objects[l].inUse)return this._objects[l];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");const o=this._createObject(this._objects.length);return this._objects.push(o),o}freeObject(o){o.inUse=!1}freeAllObjects(){for(const o of this._objects)this.freeObject(o)}isFull(){return!(this._objects.length<this._size)&&this._objects.some(o=>!o.inUse)===!1}}const ms={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class Js{constructor(o,l){this.painter=o,this.terrain=l,this.pool=new Ol(o.context,30,l.sourceCache.tileSize*l.qualityFactor)}destruct(){this.pool.destruct()}getTexture(o){return this.pool.getObjectForId(o.rtt[this._stacks.length-1].id).texture}prepareForRender(o,l){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=o._order.filter(O=>!o._layers[O].isHidden(l)),this._coordsDescendingInv={};for(const O in o.sourceCaches){this._coordsDescendingInv[O]={};const j=o.sourceCaches[O].getVisibleCoordinates();for(const H of j){const ie=this.terrain.sourceCache.getTerrainCoords(H);for(const he in ie)this._coordsDescendingInv[O][he]||(this._coordsDescendingInv[O][he]=[]),this._coordsDescendingInv[O][he].push(ie[he])}}this._coordsDescendingInvStr={};for(const O of o._order){const j=o._layers[O],H=j.source;if(ms[j.type]&&!this._coordsDescendingInvStr[H]){this._coordsDescendingInvStr[H]={};for(const ie in this._coordsDescendingInv[H])this._coordsDescendingInvStr[H][ie]=this._coordsDescendingInv[H][ie].map(he=>he.key).sort().join()}}for(const O of this._renderableTiles)for(const j in this._coordsDescendingInvStr){const H=this._coordsDescendingInvStr[j][O.tileID.key];H&&H!==O.rttCoords[j]&&(O.rtt=[])}}renderLayer(o){if(o.isHidden(this.painter.transform.zoom))return!1;const l=o.type,O=this.painter,j=this._renderableLayerIds[this._renderableLayerIds.length-1]===o.id;if(ms[l]&&(this._prevType&&ms[this._prevType]||this._stacks.push([]),this._prevType=l,this._stacks[this._stacks.length-1].push(o.id),!j))return!0;if(ms[this._prevType]||ms[l]&&j){this._prevType=l;const H=this._stacks.length-1,ie=this._stacks[H]||[];for(const he of this._renderableTiles){if(this.pool.isFull()&&(rc(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(he),he.rtt[H]){const Ee=this.pool.getObjectForId(he.rtt[H].id);if(Ee.stamp===he.rtt[H].stamp){this.pool.useObject(Ee);continue}}const we=this.pool.getOrCreateFreeObject();this.pool.useObject(we),this.pool.stampObject(we),he.rtt[H]={id:we.id,stamp:we.stamp},O.context.bindFramebuffer.set(we.fbo.framebuffer),O.context.clear({color:t.aN.transparent,stencil:0}),O.currentStencilSource=void 0;for(let Ee=0;Ee<ie.length;Ee++){const De=O.style._layers[ie[Ee]],qe=De.source?this._coordsDescendingInv[De.source][he.tileID.key]:[he.tileID];O.context.viewport.set([0,0,we.fbo.width,we.fbo.height]),O._renderTileClippingMasks(De,qe),O.renderLayer(O,O.style.sourceCaches[De.source],De,qe),De.source&&(he.rttCoords[De.source]=this._coordsDescendingInvStr[De.source][he.tileID.key])}}return rc(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects(),ms[l]}return!1}}const Oc={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"MapLibre logo","Map.Title":"Map","Marker.Title":"Map marker","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","Popup.Close":"Close popup","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm","TerrainControl.Enable":"Enable terrain","TerrainControl.Disable":"Disable terrain","CooperativeGesturesHandler.WindowsHelpText":"Use Ctrl + scroll to zoom the map","CooperativeGesturesHandler.MacHelpText":"Use ⌘ + scroll to zoom the map","CooperativeGesturesHandler.MobileHelpText":"Use two fingers to move the map"},wc=w,hl={hash:!1,interactive:!0,bearingSnap:7,attributionControl:Bo,maplibreLogo:!1,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,refreshExpiredTiles:!0,scrollZoom:!0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,cooperativeGestures:!1,trackResize:!0,center:[0,0],zoom:0,bearing:0,pitch:0,renderWorldCopies:!0,maxTileCacheSize:null,maxTileCacheZoomLevels:t.a.MAX_TILE_CACHE_ZOOM_LEVELS,transformRequest:null,transformCameraUpdate:null,fadeDuration:300,crossSourceCollisions:!0,clickTolerance:3,localIdeographFontFamily:"sans-serif",pitchWithRotate:!0,validateStyle:!0,maxCanvasSize:[4096,4096],cancelPendingTileRequestsWhileZooming:!0},Ra=F=>{F.touchstart=F.dragStart,F.touchmoveWindow=F.dragMove,F.touchend=F.dragEnd},Ps={showCompass:!0,showZoom:!0,visualizePitch:!1};class ni{constructor(o,l,O=!1){this.mousedown=ie=>{this.startMouse(t.e({},ie,{ctrlKey:!0,preventDefault:()=>ie.preventDefault()}),n.mousePos(this.element,ie)),n.addEventListener(window,"mousemove",this.mousemove),n.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=ie=>{this.moveMouse(ie,n.mousePos(this.element,ie))},this.mouseup=ie=>{this.mouseRotate.dragEnd(ie),this.mousePitch&&this.mousePitch.dragEnd(ie),this.offTemp()},this.touchstart=ie=>{ie.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=n.touchPos(this.element,ie.targetTouches)[0],this.startTouch(ie,this._startPos),n.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),n.addEventListener(window,"touchend",this.touchend))},this.touchmove=ie=>{ie.targetTouches.length!==1?this.reset():(this._lastPos=n.touchPos(this.element,ie.targetTouches)[0],this.moveTouch(ie,this._lastPos))},this.touchend=ie=>{ie.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),delete this._startPos,delete this._lastPos,this.offTemp()},this.reset=()=>{this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),this.touchRotate.reset(),this.touchPitch&&this.touchPitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10;const j=o.dragRotate._mouseRotate.getClickTolerance(),H=o.dragRotate._mousePitch.getClickTolerance();this.element=l,this.mouseRotate=Hl({clickTolerance:j,enable:!0}),this.touchRotate=(({enable:ie,clickTolerance:he,bearingDegreesPerPixelMoved:we=.8})=>{const Ee=new Nl;return new To({clickTolerance:he,move:(De,qe)=>({bearingDelta:(qe.x-De.x)*we}),moveStateManager:Ee,enable:ie,assignEvents:Ra})})({clickTolerance:j,enable:!0}),this.map=o,O&&(this.mousePitch=ll({clickTolerance:H,enable:!0}),this.touchPitch=(({enable:ie,clickTolerance:he,pitchDegreesPerPixelMoved:we=-.5})=>{const Ee=new Nl;return new To({clickTolerance:he,move:(De,qe)=>({pitchDelta:(qe.y-De.y)*we}),moveStateManager:Ee,enable:ie,assignEvents:Ra})})({clickTolerance:H,enable:!0})),n.addEventListener(l,"mousedown",this.mousedown),n.addEventListener(l,"touchstart",this.touchstart,{passive:!1}),n.addEventListener(l,"touchcancel",this.reset)}startMouse(o,l){this.mouseRotate.dragStart(o,l),this.mousePitch&&this.mousePitch.dragStart(o,l),n.disableDrag()}startTouch(o,l){this.touchRotate.dragStart(o,l),this.touchPitch&&this.touchPitch.dragStart(o,l),n.disableDrag()}moveMouse(o,l){const O=this.map,{bearingDelta:j}=this.mouseRotate.dragMove(o,l)||{};if(j&&O.setBearing(O.getBearing()+j),this.mousePitch){const{pitchDelta:H}=this.mousePitch.dragMove(o,l)||{};H&&O.setPitch(O.getPitch()+H)}}moveTouch(o,l){const O=this.map,{bearingDelta:j}=this.touchRotate.dragMove(o,l)||{};if(j&&O.setBearing(O.getBearing()+j),this.touchPitch){const{pitchDelta:H}=this.touchPitch.dragMove(o,l)||{};H&&O.setPitch(O.getPitch()+H)}}off(){const o=this.element;n.removeEventListener(o,"mousedown",this.mousedown),n.removeEventListener(o,"touchstart",this.touchstart,{passive:!1}),n.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),n.removeEventListener(window,"touchend",this.touchend),n.removeEventListener(o,"touchcancel",this.reset),this.offTemp()}offTemp(){n.enableDrag(),n.removeEventListener(window,"mousemove",this.mousemove),n.removeEventListener(window,"mouseup",this.mouseup),n.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),n.removeEventListener(window,"touchend",this.touchend)}}let ki;function Zo(F,o,l){const O=new t.N(F.lng,F.lat);if(F=new t.N(F.lng,F.lat),o){const j=new t.N(F.lng-360,F.lat),H=new t.N(F.lng+360,F.lat),ie=l.locationPoint(F).distSqr(o);l.locationPoint(j).distSqr(o)<ie?F=j:l.locationPoint(H).distSqr(o)<ie&&(F=H)}for(;Math.abs(F.lng-l.center.lng)>180;){const j=l.locationPoint(F);if(j.x>=0&&j.y>=0&&j.x<=l.width&&j.y<=l.height)break;F.lng>l.center.lng?F.lng-=360:F.lng+=360}return F.lng!==O.lng&&l.locationPoint(F).y>l.height/2-l.getHorizon()?F:O}const Os={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function fl(F,o,l){const O=F.classList;for(const j in Os)O.remove(`maplibregl-${l}-anchor-${j}`);O.add(`maplibregl-${l}-anchor-${o}`)}class Ba extends t.E{constructor(o){if(super(),this._onKeyPress=l=>{const O=l.code,j=l.charCode||l.keyCode;O!=="Space"&&O!=="Enter"&&j!==32&&j!==13||this.togglePopup()},this._onMapClick=l=>{const O=l.originalEvent.target,j=this._element;this._popup&&(O===j||j.contains(O))&&this.togglePopup()},this._update=l=>{var O;if(!this._map)return;const j=this._map.loaded()&&!this._map.isMoving();((l==null?void 0:l.type)==="terrain"||(l==null?void 0:l.type)==="render"&&!j)&&this._map.once("render",this._update),this._map.transform.renderWorldCopies?this._lngLat=Zo(this._lngLat,this._flatPos,this._map.transform):this._lngLat=(O=this._lngLat)===null||O===void 0?void 0:O.wrap(),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationPoint(this._lngLat)._add(this._offset));let H="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?H=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(H=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let ie="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?ie="rotateX(0deg)":this._pitchAlignment==="map"&&(ie=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||l&&l.type!=="moveend"||(this._pos=this._pos.round()),n.setTransform(this._element,`${Os[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${ie} ${H}`),p.frameAsync(new AbortController).then(()=>{this._updateOpacity(l&&l.type==="moveend")}).catch(()=>{})},this._onMove=l=>{if(!this._isDragging){const O=this._clickTolerance||this._map._clickTolerance;this._isDragging=l.point.dist(this._pointerdownPos)>=O}this._isDragging&&(this._pos=l.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new t.k("dragstart"))),this.fire(new t.k("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new t.k("dragend")),this._state="inactive"},this._addDragHandler=l=>{this._element.contains(l.originalEvent.target)&&(l.preventDefault(),this._positionDelta=l.point.sub(this._pos).add(this._offset),this._pointerdownPos=l.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},this._anchor=o&&o.anchor||"center",this._color=o&&o.color||"#3FB1CE",this._scale=o&&o.scale||1,this._draggable=o&&o.draggable||!1,this._clickTolerance=o&&o.clickTolerance||0,this._subpixelPositioning=o&&o.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=o&&o.rotation||0,this._rotationAlignment=o&&o.rotationAlignment||"auto",this._pitchAlignment=o&&o.pitchAlignment&&o.pitchAlignment!=="auto"?o.pitchAlignment:this._rotationAlignment,this.setOpacity(),this.setOpacity(o==null?void 0:o.opacity,o==null?void 0:o.opacityWhenCovered),o&&o.element)this._element=o.element,this._offset=t.P.convert(o&&o.offset||[0,0]);else{this._defaultMarker=!0,this._element=n.create("div");const l=n.createNS("http://www.w3.org/2000/svg","svg"),O=41,j=27;l.setAttributeNS(null,"display","block"),l.setAttributeNS(null,"height",`${O}px`),l.setAttributeNS(null,"width",`${j}px`),l.setAttributeNS(null,"viewBox",`0 0 ${j} ${O}`);const H=n.createNS("http://www.w3.org/2000/svg","g");H.setAttributeNS(null,"stroke","none"),H.setAttributeNS(null,"stroke-width","1"),H.setAttributeNS(null,"fill","none"),H.setAttributeNS(null,"fill-rule","evenodd");const ie=n.createNS("http://www.w3.org/2000/svg","g");ie.setAttributeNS(null,"fill-rule","nonzero");const he=n.createNS("http://www.w3.org/2000/svg","g");he.setAttributeNS(null,"transform","translate(3.0, 29.0)"),he.setAttributeNS(null,"fill","#000000");const we=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];for(const Et of we){const Ut=n.createNS("http://www.w3.org/2000/svg","ellipse");Ut.setAttributeNS(null,"opacity","0.04"),Ut.setAttributeNS(null,"cx","10.5"),Ut.setAttributeNS(null,"cy","5.80029008"),Ut.setAttributeNS(null,"rx",Et.rx),Ut.setAttributeNS(null,"ry",Et.ry),he.appendChild(Ut)}const Ee=n.createNS("http://www.w3.org/2000/svg","g");Ee.setAttributeNS(null,"fill",this._color);const De=n.createNS("http://www.w3.org/2000/svg","path");De.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),Ee.appendChild(De);const qe=n.createNS("http://www.w3.org/2000/svg","g");qe.setAttributeNS(null,"opacity","0.25"),qe.setAttributeNS(null,"fill","#000000");const it=n.createNS("http://www.w3.org/2000/svg","path");it.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),qe.appendChild(it);const ut=n.createNS("http://www.w3.org/2000/svg","g");ut.setAttributeNS(null,"transform","translate(6.0, 7.0)"),ut.setAttributeNS(null,"fill","#FFFFFF");const ht=n.createNS("http://www.w3.org/2000/svg","g");ht.setAttributeNS(null,"transform","translate(8.0, 8.0)");const bt=n.createNS("http://www.w3.org/2000/svg","circle");bt.setAttributeNS(null,"fill","#000000"),bt.setAttributeNS(null,"opacity","0.25"),bt.setAttributeNS(null,"cx","5.5"),bt.setAttributeNS(null,"cy","5.5"),bt.setAttributeNS(null,"r","5.4999962");const At=n.createNS("http://www.w3.org/2000/svg","circle");At.setAttributeNS(null,"fill","#FFFFFF"),At.setAttributeNS(null,"cx","5.5"),At.setAttributeNS(null,"cy","5.5"),At.setAttributeNS(null,"r","5.4999962"),ht.appendChild(bt),ht.appendChild(At),ie.appendChild(he),ie.appendChild(Ee),ie.appendChild(qe),ie.appendChild(ut),ie.appendChild(ht),l.appendChild(ie),l.setAttributeNS(null,"height",O*this._scale+"px"),l.setAttributeNS(null,"width",j*this._scale+"px"),this._element.appendChild(l),this._offset=t.P.convert(o&&o.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",l=>{l.preventDefault()}),this._element.addEventListener("mousedown",l=>{l.preventDefault()}),fl(this._element,this._anchor,"marker"),o&&o.className)for(const l of o.className.split(" "))this._element.classList.add(l);this._popup=null}addTo(o){return this.remove(),this._map=o,this._element.setAttribute("aria-label",o._getUIString("Marker.Title")),o.getCanvasContainer().appendChild(this._element),o.on("move",this._update),o.on("moveend",this._update),o.on("terrain",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),n.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(o){return this._lngLat=t.N.convert(o),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(o){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),o){if(!("offset"in o.options)){const l=Math.abs(13.5)/Math.SQRT2;o.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[l,-1*(24.6+l)],"bottom-right":[-l,-1*(24.6+l)],left:[13.5,-24.6],right:[-13.5,-24.6]}:this._offset}this._popup=o,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(o){return this._subpixelPositioning=o,this}getPopup(){return this._popup}togglePopup(){const o=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:o?(o.isOpen()?o.remove():(o.setLngLat(this._lngLat),o.addTo(this._map)),this):this}_updateOpacity(o=!1){var l,O;if(!(!((l=this._map)===null||l===void 0)&&l.terrain))return void(this._element.style.opacity!==this._opacity&&(this._element.style.opacity=this._opacity));if(o)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}const j=this._map,H=j.terrain.depthAtPoint(this._pos),ie=j.terrain.getElevationForLngLatZoom(this._lngLat,j.transform.tileZoom);if(j.transform.lngLatToCameraDepth(this._lngLat,ie)-H<.006)return void(this._element.style.opacity=this._opacity);const he=-this._offset.y/j.transform._pixelPerMeter,we=Math.sin(j.getPitch()*Math.PI/180)*he,Ee=j.terrain.depthAtPoint(new t.P(this._pos.x,this._pos.y-this._offset.y)),De=j.transform.lngLatToCameraDepth(this._lngLat,ie+we)-Ee>.006;!((O=this._popup)===null||O===void 0)&&O.isOpen()&&De&&this._popup.remove(),this._element.style.opacity=De?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(o){return this._offset=t.P.convert(o),this._update(),this}addClassName(o){this._element.classList.add(o)}removeClassName(o){this._element.classList.remove(o)}toggleClassName(o){return this._element.classList.toggle(o)}setDraggable(o){return this._draggable=!!o,this._map&&(o?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(o){return this._rotation=o||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(o){return this._rotationAlignment=o||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(o){return this._pitchAlignment=o&&o!=="auto"?o:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(o,l){return o===void 0&&l===void 0&&(this._opacity="1",this._opacityWhenCovered="0.2"),o!==void 0&&(this._opacity=o),l!==void 0&&(this._opacityWhenCovered=l),this._map&&this._updateOpacity(!0),this}}const zl={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let Gi=0,Jl=!1;class fi extends t.E{constructor(o){super(),this._onSuccess=l=>{if(this._map){if(this._isOutOfMapMaxBounds(l))return this._setErrorState(),this.fire(new t.k("outofmaxbounds",l)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=l,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(l),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(l),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new t.k("geolocate",l)),this._finish()}},this._updateCamera=l=>{const O=new t.N(l.coords.longitude,l.coords.latitude),j=l.coords.accuracy,H=this._map.getBearing(),ie=t.e({bearing:H},this.options.fitBoundsOptions),he=Te.fromLngLat(O,j);this._map.fitBounds(he,ie,{geolocateSource:!0})},this._updateMarker=l=>{if(l){const O=new t.N(l.coords.longitude,l.coords.latitude);this._accuracyCircleMarker.setLngLat(O).addTo(this._map),this._userLocationDotMarker.setLngLat(O).addTo(this._map),this._accuracy=l.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onZoom=()=>{this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},this._onError=l=>{if(this._map){if(this.options.trackUserLocation)if(l.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;const O=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=O,this._geolocateButton.setAttribute("aria-label",O),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(l.code===3&&Jl)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new t.k("error",l)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",l=>l.preventDefault()),this._geolocateButton=n.create("button","maplibregl-ctrl-geolocate",this._container),n.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=l=>{if(this._map){if(l===!1){t.w("Geolocation support is not available so the GeolocateControl will be disabled.");const O=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=O,this._geolocateButton.setAttribute("aria-label",O)}else{const O=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=O,this._geolocateButton.setAttribute("aria-label",O)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=n.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new Ba({element:this._dotElement}),this._circleElement=n.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Ba({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",O=>{const j=O.originalEvent&&O.originalEvent.type==="resize";O.geolocateSource||this._watchState!=="ACTIVE_LOCK"||j||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new t.k("trackuserlocationend")),this.fire(new t.k("userlocationlostfocus")))})}},this.options=t.e({},zl,o)}onAdd(o){return this._map=o,this._container=n.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),(function(){return t._(this,arguments,void 0,function*(l=!1){if(ki!==void 0&&!l)return ki;if(window.navigator.permissions===void 0)return ki=!!window.navigator.geolocation,ki;try{ki=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{ki=!!window.navigator.geolocation}return ki})})().then(l=>this._finishSetupUI(l)),this._container}onRemove(){this._geolocationWatchID!==void 0&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),n.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Gi=0,Jl=!1}_isOutOfMapMaxBounds(o){const l=this._map.getMaxBounds(),O=o.coords;return l&&(O.longitude<l.getWest()||O.longitude>l.getEast()||O.latitude<l.getSouth()||O.latitude>l.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadius(){const o=this._map.getBounds(),l=o.getSouthEast(),O=o.getNorthEast(),j=l.distanceTo(O),H=this._map._container.clientHeight,ie=Math.ceil(this._accuracy/(j/H)*2);this._circleElement.style.width=`${ie}px`,this._circleElement.style.height=`${ie}px`}trigger(){if(!this._setup)return t.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new t.k("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Gi--,Jl=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new t.k("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new t.k("trackuserlocationstart")),this.fire(new t.k("userlocationfocus"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let o;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Gi++,Gi>1?(o={maximumAge:6e5,timeout:0},Jl=!0):(o=this.options.positionOptions,Jl=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,o)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}}const ui={maxWidth:100,unit:"metric"};function ka(F,o,l){const O=l&&l.maxWidth||100,j=F._container.clientHeight/2,H=F.unproject([0,j]),ie=F.unproject([O,j]),he=H.distanceTo(ie);if(l&&l.unit==="imperial"){const we=3.2808*he;we>5280?yo(o,O,we/5280,F._getUIString("ScaleControl.Miles")):yo(o,O,we,F._getUIString("ScaleControl.Feet"))}else l&&l.unit==="nautical"?yo(o,O,he/1852,F._getUIString("ScaleControl.NauticalMiles")):he>=1e3?yo(o,O,he/1e3,F._getUIString("ScaleControl.Kilometers")):yo(o,O,he,F._getUIString("ScaleControl.Meters"))}function yo(F,o,l,O){const j=(function(ie){const he=Math.pow(10,`${Math.floor(ie)}`.length-1);let we=ie/he;return we=we>=10?10:we>=5?5:we>=3?3:we>=2?2:we>=1?1:(function(Ee){const De=Math.pow(10,Math.ceil(-Math.log(Ee)/Math.LN10));return Math.round(Ee*De)/De})(we),he*we})(l),H=j/l;F.style.width=o*H+"px",F.innerHTML=`${j}&nbsp;${O}`}class Bl extends t.E{constructor(o={}){super(),this._onFullscreenChange=()=>{var l;let O=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((l=O==null?void 0:O.shadowRoot)===null||l===void 0)&&l.fullscreenElement;)O=O.shadowRoot.fullscreenElement;O===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,o&&o.container&&(o.container instanceof HTMLElement?this._container=o.container:t.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(o){return this._map=o,this._container||(this._container=this._map.getContainer()),this._controlContainer=n.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){n.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){const o=this._fullscreenButton=n.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);n.create("span","maplibregl-ctrl-icon",o).setAttribute("aria-hidden","true"),o.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){const o=this._getTitle();this._fullscreenButton.setAttribute("aria-label",o),this._fullscreenButton.title=o}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new t.k("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new t.k("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}}const Yo={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},xt=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");class kt extends t.E{constructor(o){super(),this.remove=()=>(this._content&&n.remove(this._content),this._container&&(n.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new t.k("close"))),this),this._onMouseUp=l=>{this._update(l.point)},this._onMouseMove=l=>{this._update(l.point)},this._onDrag=l=>{this._update(l.point)},this._update=l=>{var O;const j=this._lngLat||this._trackPointer;if(!this._map||!j||!this._content)return;if(!this._container){if(this._container=n.create("div","maplibregl-popup",this._map.getContainer()),this._tip=n.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(const Ee of this.options.className.split(" "))this._container.classList.add(Ee);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer?this._lngLat=Zo(this._lngLat,this._flatPos,this._map.transform):this._lngLat=(O=this._lngLat)===null||O===void 0?void 0:O.wrap(),this._trackPointer&&!l)return;const H=this._flatPos=this._pos=this._trackPointer&&l?l:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&l?l:this._map.transform.locationPoint(this._lngLat));let ie=this.options.anchor;const he=Bt(this.options.offset);if(!ie){const Ee=this._container.offsetWidth,De=this._container.offsetHeight;let qe;qe=H.y+he.bottom.y<De?["top"]:H.y>this._map.transform.height-De?["bottom"]:[],H.x<Ee/2?qe.push("left"):H.x>this._map.transform.width-Ee/2&&qe.push("right"),ie=qe.length===0?"bottom":qe.join("-")}let we=H.add(he[ie]);this.options.subpixelPositioning||(we=we.round()),n.setTransform(this._container,`${Os[ie]} translate(${we.x}px,${we.y}px)`),fl(this._container,ie,"popup")},this._onClose=()=>{this.remove()},this.options=t.e(Object.create(Yo),o)}addTo(o){return this._map&&this.remove(),this._map=o,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new t.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(o){return this._lngLat=t.N.convert(o),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(o){return this.setDOMContent(document.createTextNode(o))}setHTML(o){const l=document.createDocumentFragment(),O=document.createElement("body");let j;for(O.innerHTML=o;j=O.firstChild,j;)l.appendChild(j);return this.setDOMContent(l)}getMaxWidth(){var o;return(o=this._container)===null||o===void 0?void 0:o.style.maxWidth}setMaxWidth(o){return this.options.maxWidth=o,this._update(),this}setDOMContent(o){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=n.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(o),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(o){return this._container&&this._container.classList.add(o),this}removeClassName(o){return this._container&&this._container.classList.remove(o),this}setOffset(o){return this.options.offset=o,this._update(),this}toggleClassName(o){if(this._container)return this._container.classList.toggle(o)}setSubpixelPositioning(o){this.options.subpixelPositioning=o}_createCloseButton(){this.options.closeButton&&(this._closeButton=n.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="&#215;",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const o=this._container.querySelector(xt);o&&o.focus()}}function Bt(F){if(F){if(typeof F=="number"){const o=Math.round(Math.abs(F)/Math.SQRT2);return{center:new t.P(0,0),top:new t.P(0,F),"top-left":new t.P(o,o),"top-right":new t.P(-o,o),bottom:new t.P(0,-F),"bottom-left":new t.P(o,-o),"bottom-right":new t.P(-o,-o),left:new t.P(F,0),right:new t.P(-F,0)}}if(F instanceof t.P||Array.isArray(F)){const o=t.P.convert(F);return{center:o,top:o,"top-left":o,"top-right":o,bottom:o,"bottom-left":o,"bottom-right":o,left:o,right:o}}return{center:t.P.convert(F.center||[0,0]),top:t.P.convert(F.top||[0,0]),"top-left":t.P.convert(F["top-left"]||[0,0]),"top-right":t.P.convert(F["top-right"]||[0,0]),bottom:t.P.convert(F.bottom||[0,0]),"bottom-left":t.P.convert(F["bottom-left"]||[0,0]),"bottom-right":t.P.convert(F["bottom-right"]||[0,0]),left:t.P.convert(F.left||[0,0]),right:t.P.convert(F.right||[0,0])}}return Bt(new t.P(0,0))}const $=w;u.AJAXError=t.bg,u.Evented=t.E,u.LngLat=t.N,u.MercatorCoordinate=t.Z,u.Point=t.P,u.addProtocol=t.bh,u.config=t.a,u.removeProtocol=t.bi,u.AttributionControl=os,u.BoxZoomHandler=wo,u.CanvasSource=ye,u.CooperativeGesturesHandler=fs,u.DoubleClickZoomHandler=Ma,u.DragPanHandler=Ns,u.DragRotateHandler=zo,u.EdgeInsets=Rl,u.FullscreenControl=Bl,u.GeoJSONSource=Re,u.GeolocateControl=fi,u.Hash=io,u.ImageSource=Ne,u.KeyboardHandler=sc,u.LngLatBounds=Te,u.LogoControl=go,u.Map=class extends oo{constructor(F){t.be.mark(t.bf.create);const o=Object.assign(Object.assign({},hl),F);if(o.minZoom!=null&&o.maxZoom!=null&&o.minZoom>o.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(o.minPitch!=null&&o.maxPitch!=null&&o.minPitch>o.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(o.minPitch!=null&&o.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(o.maxPitch!=null&&o.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new aa(o.minZoom,o.maxZoom,o.minPitch,o.maxPitch,o.renderWorldCopies),{bearingSnap:o.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new _c,this._controls=[],this._mapId=t.a4(),this._contextLost=O=>{O.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new t.k("webglcontextlost",{originalEvent:O}))},this._contextRestored=O=>{this._setupPainter(),this.resize(),this._update(),this.fire(new t.k("webglcontextrestored",{originalEvent:O}))},this._onMapScroll=O=>{if(O.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=o.interactive,this._maxTileCacheSize=o.maxTileCacheSize,this._maxTileCacheZoomLevels=o.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=o.failIfMajorPerformanceCaveat===!0,this._preserveDrawingBuffer=o.preserveDrawingBuffer===!0,this._antialias=o.antialias===!0,this._trackResize=o.trackResize===!0,this._bearingSnap=o.bearingSnap,this._refreshExpiredTiles=o.refreshExpiredTiles===!0,this._fadeDuration=o.fadeDuration,this._crossSourceCollisions=o.crossSourceCollisions===!0,this._collectResourceTiming=o.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},Oc),o.locale),this._clickTolerance=o.clickTolerance,this._overridePixelRatio=o.pixelRatio,this._maxCanvasSize=o.maxCanvasSize,this.transformCameraUpdate=o.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=o.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=T.addThrottleControl(()=>this.isMoving()),this._requestManager=new C(o.transformRequest),typeof o.container=="string"){if(this._container=document.getElementById(o.container),!this._container)throw new Error(`Container '${o.container}' not found.`)}else{if(!(o.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=o.container}if(o.maxBounds&&this.setMaxBounds(o.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)).on("moveend",()=>this._update(!1)).on("zoom",()=>this._update(!0)).on("terrain",()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)}).once("idle",()=>{this._idleTriggered=!0}),typeof window<"u"){addEventListener("online",this._onWindowOnline,!1);let O=!1;const j=Hs(H=>{this._trackResize&&!this._removed&&this.resize(H)._update()},50);this._resizeObserver=new ResizeObserver(H=>{O?j(H):O=!0}),this._resizeObserver.observe(this._container)}this.handlers=new $i(this,o);const l=typeof o.hash=="string"&&o.hash||void 0;this._hash=o.hash&&new io(l).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:o.center,zoom:o.zoom,bearing:o.bearing,pitch:o.pitch}),o.bounds&&(this.resize(),this.fitBounds(o.bounds,t.e({},o.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=o.localIdeographFontFamily,this._validateStyle=o.validateStyle,o.style&&this.setStyle(o.style,{localIdeographFontFamily:o.localIdeographFontFamily}),o.attributionControl&&this.addControl(new os(typeof o.attributionControl=="boolean"?void 0:o.attributionControl)),o.maplibreLogo&&this.addControl(new go,o.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",O=>{this._update(O.dataType==="style"),this.fire(new t.k(`${O.dataType}data`,O))}),this.on("dataloading",O=>{this.fire(new t.k(`${O.dataType}dataloading`,O))}),this.on("dataabort",O=>{this.fire(new t.k("sourcedataabort",O))})}_getMapId(){return this._mapId}addControl(F,o){if(o===void 0&&(o=F.getDefaultPosition?F.getDefaultPosition():"top-right"),!F||!F.onAdd)return this.fire(new t.j(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const l=F.onAdd(this);this._controls.push(F);const O=this._controlPositions[o];return o.indexOf("bottom")!==-1?O.insertBefore(l,O.firstChild):O.appendChild(l),this}removeControl(F){if(!F||!F.onRemove)return this.fire(new t.j(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const o=this._controls.indexOf(F);return o>-1&&this._controls.splice(o,1),F.onRemove(this),this}hasControl(F){return this._controls.indexOf(F)>-1}calculateCameraOptionsFromTo(F,o,l,O){return O==null&&this.terrain&&(O=this.terrain.getElevationForLngLatZoom(l,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(F,o,l,O)}resize(F){var o;const l=this._containerDimensions(),O=l[0],j=l[1],H=this._getClampedPixelRatio(O,j);if(this._resizeCanvas(O,j,H),this.painter.resize(O,j,H),this.painter.overLimit()){const he=this.painter.context.gl;this._maxCanvasSize=[he.drawingBufferWidth,he.drawingBufferHeight];const we=this._getClampedPixelRatio(O,j);this._resizeCanvas(O,j,we),this.painter.resize(O,j,we)}this.transform.resize(O,j),(o=this._requestedCameraState)===null||o===void 0||o.resize(O,j);const ie=!this._moving;return ie&&(this.stop(),this.fire(new t.k("movestart",F)).fire(new t.k("move",F))),this.fire(new t.k("resize",F)),ie&&this.fire(new t.k("moveend",F)),this}_getClampedPixelRatio(F,o){const{0:l,1:O}=this._maxCanvasSize,j=this.getPixelRatio(),H=F*j,ie=o*j,he=H>l?l/H:1,we=ie>O?O/ie:1;return Math.min(he,we)*j}getPixelRatio(){var F;return(F=this._overridePixelRatio)!==null&&F!==void 0?F:devicePixelRatio}setPixelRatio(F){this._overridePixelRatio=F,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(F){return this.transform.setMaxBounds(Te.convert(F)),this._update()}setMinZoom(F){if((F=F??-2)>=-2&&F<=this.transform.maxZoom)return this.transform.minZoom=F,this._update(),this.getZoom()<F&&this.setZoom(F),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(F){if((F=F??22)>=this.transform.minZoom)return this.transform.maxZoom=F,this._update(),this.getZoom()>F&&this.setZoom(F),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(F){if((F=F??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(F>=0&&F<=this.transform.maxPitch)return this.transform.minPitch=F,this._update(),this.getPitch()<F&&this.setPitch(F),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(F){if((F=F??60)>85)throw new Error("maxPitch must be less than or equal to 85");if(F>=this.transform.minPitch)return this.transform.maxPitch=F,this._update(),this.getPitch()>F&&this.setPitch(F),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(F){return this.transform.renderWorldCopies=F,this._update()}project(F){return this.transform.locationPoint(t.N.convert(F),this.style&&this.terrain)}unproject(F){return this.transform.pointLocation(t.P.convert(F),this.terrain)}isMoving(){var F;return this._moving||((F=this.handlers)===null||F===void 0?void 0:F.isMoving())}isZooming(){var F;return this._zooming||((F=this.handlers)===null||F===void 0?void 0:F.isZooming())}isRotating(){var F;return this._rotating||((F=this.handlers)===null||F===void 0?void 0:F.isRotating())}_createDelegatedListener(F,o,l){if(F==="mouseenter"||F==="mouseover"){let O=!1;return{layer:o,listener:l,delegates:{mousemove:j=>{const H=this.getLayer(o)?this.queryRenderedFeatures(j.point,{layers:[o]}):[];H.length?O||(O=!0,l.call(this,new Ro(F,this,j.originalEvent,{features:H}))):O=!1},mouseout:()=>{O=!1}}}}if(F==="mouseleave"||F==="mouseout"){let O=!1;return{layer:o,listener:l,delegates:{mousemove:j=>{(this.getLayer(o)?this.queryRenderedFeatures(j.point,{layers:[o]}):[]).length?O=!0:O&&(O=!1,l.call(this,new Ro(F,this,j.originalEvent)))},mouseout:j=>{O&&(O=!1,l.call(this,new Ro(F,this,j.originalEvent)))}}}}{const O=j=>{const H=this.getLayer(o)?this.queryRenderedFeatures(j.point,{layers:[o]}):[];H.length&&(j.features=H,l.call(this,j),delete j.features)};return{layer:o,listener:l,delegates:{[F]:O}}}}on(F,o,l){if(l===void 0)return super.on(F,o);const O=this._createDelegatedListener(F,o,l);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[F]=this._delegatedListeners[F]||[],this._delegatedListeners[F].push(O);for(const j in O.delegates)this.on(j,O.delegates[j]);return this}once(F,o,l){if(l===void 0)return super.once(F,o);const O=this._createDelegatedListener(F,o,l);for(const j in O.delegates)this.once(j,O.delegates[j]);return this}off(F,o,l){return l===void 0?super.off(F,o):(this._delegatedListeners&&this._delegatedListeners[F]&&(O=>{const j=O[F];for(let H=0;H<j.length;H++){const ie=j[H];if(ie.layer===o&&ie.listener===l){for(const he in ie.delegates)this.off(he,ie.delegates[he]);return j.splice(H,1),this}}})(this._delegatedListeners),this)}queryRenderedFeatures(F,o){if(!this.style)return[];let l;const O=F instanceof t.P||Array.isArray(F),j=O?F:[[0,0],[this.transform.width,this.transform.height]];if(o=o||(O?{}:F)||{},j instanceof t.P||typeof j[0]=="number")l=[t.P.convert(j)];else{const H=t.P.convert(j[0]),ie=t.P.convert(j[1]);l=[H,new t.P(ie.x,H.y),ie,new t.P(H.x,ie.y),H]}return this.style.queryRenderedFeatures(l,o,this.transform)}querySourceFeatures(F,o){return this.style.querySourceFeatures(F,o)}setStyle(F,o){return(o=t.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},o)).diff!==!1&&o.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&F?(this._diffStyle(F,o),this):(this._localIdeographFontFamily=o.localIdeographFontFamily,this._updateStyle(F,o))}setTransformRequest(F){return this._requestManager.setTransformRequest(F),this}_getUIString(F){const o=this._locale[F];if(o==null)throw new Error(`Missing UI string '${F}'`);return o}_updateStyle(F,o){if(o.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(F,o));const l=this.style&&o.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!F)),F?(this.style=new Zn(this,o||{}),this.style.setEventedParent(this,{style:this.style}),typeof F=="string"?this.style.loadURL(F,o,l):this.style.loadJSON(F,o,l),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Zn(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(F,o){if(typeof F=="string"){const l=F,O=this._requestManager.transformRequest(l,"Style");t.h(O,new AbortController).then(j=>{this._updateDiff(j.data,o)}).catch(j=>{j&&this.fire(new t.j(j))})}else typeof F=="object"&&this._updateDiff(F,o)}_updateDiff(F,o){try{this.style.setState(F,o)&&this._update(!0)}catch(l){t.w(`Unable to perform style diff: ${l.message||l.error||l}. Rebuilding the style from scratch.`),this._updateStyle(F,o)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():t.w("There is no style added to the map.")}addSource(F,o){return this._lazyInitEmptyStyle(),this.style.addSource(F,o),this._update(!0)}isSourceLoaded(F){const o=this.style&&this.style.sourceCaches[F];if(o!==void 0)return o.loaded();this.fire(new t.j(new Error(`There is no source with ID '${F}'`)))}setTerrain(F){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),F){const o=this.style.sourceCaches[F.source];if(!o)throw new Error(`cannot load terrain, because there exists no source with ID: ${F.source}`);this.terrain===null&&o.reload();for(const l in this.style._layers){const O=this.style._layers[l];O.type==="hillshade"&&O.source===F.source&&t.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new ea(this.painter,o,F),this.painter.renderToTexture=new Js(this.painter,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._terrainDataCallback=l=>{l.dataType==="style"?this.terrain.sourceCache.freeRtt():l.dataType==="source"&&l.tile&&(l.sourceId!==F.source||this._elevationFreeze||(this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.terrain.sourceCache.freeRtt(l.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.sourceCache.destruct(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.minElevationForCurrentTile=0,this.transform.elevation=0;return this.fire(new t.k("terrain",{terrain:F})),this}getTerrain(){var F,o;return(o=(F=this.terrain)===null||F===void 0?void 0:F.options)!==null&&o!==void 0?o:null}areTilesLoaded(){const F=this.style&&this.style.sourceCaches;for(const o in F){const l=F[o]._tiles;for(const O in l){const j=l[O];if(j.state!=="loaded"&&j.state!=="errored")return!1}}return!0}removeSource(F){return this.style.removeSource(F),this._update(!0)}getSource(F){return this.style.getSource(F)}addImage(F,o,l={}){const{pixelRatio:O=1,sdf:j=!1,stretchX:H,stretchY:ie,content:he,textFitWidth:we,textFitHeight:Ee}=l;if(this._lazyInitEmptyStyle(),!(o instanceof HTMLImageElement||t.b(o))){if(o.width===void 0||o.height===void 0)return this.fire(new t.j(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{const{width:De,height:qe,data:it}=o,ut=o;return this.style.addImage(F,{data:new t.R({width:De,height:qe},new Uint8Array(it)),pixelRatio:O,stretchX:H,stretchY:ie,content:he,textFitWidth:we,textFitHeight:Ee,sdf:j,version:0,userImage:ut}),ut.onAdd&&ut.onAdd(this,F),this}}{const{width:De,height:qe,data:it}=p.getImageData(o);this.style.addImage(F,{data:new t.R({width:De,height:qe},it),pixelRatio:O,stretchX:H,stretchY:ie,content:he,textFitWidth:we,textFitHeight:Ee,sdf:j,version:0})}}updateImage(F,o){const l=this.style.getImage(F);if(!l)return this.fire(new t.j(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const O=o instanceof HTMLImageElement||t.b(o)?p.getImageData(o):o,{width:j,height:H,data:ie}=O;if(j===void 0||H===void 0)return this.fire(new t.j(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(j!==l.data.width||H!==l.data.height)return this.fire(new t.j(new Error("The width and height of the updated image must be that same as the previous version of the image")));const he=!(o instanceof HTMLImageElement||t.b(o));return l.data.replace(ie,he),this.style.updateImage(F,l),this}getImage(F){return this.style.getImage(F)}hasImage(F){return F?!!this.style.getImage(F):(this.fire(new t.j(new Error("Missing required image id"))),!1)}removeImage(F){this.style.removeImage(F)}loadImage(F){return T.getImage(this._requestManager.transformRequest(F,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(F,o){return this._lazyInitEmptyStyle(),this.style.addLayer(F,o),this._update(!0)}moveLayer(F,o){return this.style.moveLayer(F,o),this._update(!0)}removeLayer(F){return this.style.removeLayer(F),this._update(!0)}getLayer(F){return this.style.getLayer(F)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(F,o,l){return this.style.setLayerZoomRange(F,o,l),this._update(!0)}setFilter(F,o,l={}){return this.style.setFilter(F,o,l),this._update(!0)}getFilter(F){return this.style.getFilter(F)}setPaintProperty(F,o,l,O={}){return this.style.setPaintProperty(F,o,l,O),this._update(!0)}getPaintProperty(F,o){return this.style.getPaintProperty(F,o)}setLayoutProperty(F,o,l,O={}){return this.style.setLayoutProperty(F,o,l,O),this._update(!0)}getLayoutProperty(F,o){return this.style.getLayoutProperty(F,o)}setGlyphs(F,o={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(F,o),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(F,o,l={}){return this._lazyInitEmptyStyle(),this.style.addSprite(F,o,l,O=>{O||this._update(!0)}),this}removeSprite(F){return this._lazyInitEmptyStyle(),this.style.removeSprite(F),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(F,o={}){return this._lazyInitEmptyStyle(),this.style.setSprite(F,o,l=>{l||this._update(!0)}),this}setLight(F,o={}){return this._lazyInitEmptyStyle(),this.style.setLight(F,o),this._update(!0)}getLight(){return this.style.getLight()}setSky(F){return this._lazyInitEmptyStyle(),this.style.setSky(F),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(F,o){return this.style.setFeatureState(F,o),this._update()}removeFeatureState(F,o){return this.style.removeFeatureState(F,o),this._update()}getFeatureState(F){return this.style.getFeatureState(F)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let F=0,o=0;return this._container&&(F=this._container.clientWidth||400,o=this._container.clientHeight||300),[F,o]}_setupContainer(){const F=this._container;F.classList.add("maplibregl-map");const o=this._canvasContainer=n.create("div","maplibregl-canvas-container",F);this._interactive&&o.classList.add("maplibregl-interactive"),this._canvas=n.create("canvas","maplibregl-canvas",o),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex",this._interactive?"0":"-1"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region");const l=this._containerDimensions(),O=this._getClampedPixelRatio(l[0],l[1]);this._resizeCanvas(l[0],l[1],O);const j=this._controlContainer=n.create("div","maplibregl-control-container",F),H=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(ie=>{H[ie]=n.create("div",`maplibregl-ctrl-${ie} `,j)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(F,o,l){this._canvas.width=Math.floor(l*F),this._canvas.height=Math.floor(l*o),this._canvas.style.width=`${F}px`,this._canvas.style.height=`${o}px`}_setupPainter(){const F={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1};let o=null;this._canvas.addEventListener("webglcontextcreationerror",O=>{o={requestedAttributes:F},O&&(o.statusMessage=O.statusMessage,o.type=O.type)},{once:!0});const l=this._canvas.getContext("webgl2",F)||this._canvas.getContext("webgl",F);if(!l){const O="Failed to initialize WebGL";throw o?(o.message=O,new Error(JSON.stringify(o))):new Error(O)}this.painter=new ic(l,this.transform),i.testSupport(l)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(F){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||F,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(F){return this._update(),this._renderTaskQueue.add(F)}_cancelRenderFrame(F){this._renderTaskQueue.remove(F)}_render(F){const o=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(F),this._removed)return;let l=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const j=this.transform.zoom,H=p.now();this.style.zoomHistory.update(j,H);const ie=new t.a9(j,{now:H,fadeDuration:o,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),he=ie.crossFadingFactor();he===1&&he===this._crossFadingFactor||(l=!0,this._crossFadingFactor=he),this.style.update(ie)}this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._elevationFreeze||(this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.minElevationForCurrentTile=0,this.transform.elevation=0),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,o,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:o,showPadding:this.showPadding}),this.fire(new t.k("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,t.be.mark(t.bf.load),this.fire(new t.k("load"))),this.style&&(this.style.hasTransitions()||l)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();const O=this._sourcesDirty||this._styleDirty||this._placementDirty;return O||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new t.k("idle")),!this._loaded||this._fullyLoaded||O||(this._fullyLoaded=!0,t.be.mark(t.bf.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var F;this._hash&&this._hash.remove();for(const l of this._controls)l.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&removeEventListener("online",this._onWindowOnline,!1),T.removeThrottleControl(this._imageQueueHandle),(F=this._resizeObserver)===null||F===void 0||F.disconnect();const o=this.painter.context.gl.getExtension("WEBGL_lose_context");o!=null&&o.loseContext&&o.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),n.remove(this._canvasContainer),n.remove(this._controlContainer),this._container.classList.remove("maplibregl-map"),t.be.clearMetrics(),this._removed=!0,this.fire(new t.k("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,p.frameAsync(this._frameRequest).then(F=>{t.be.frame(F),this._frameRequest=null,this._render(F)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(F){this._showTileBoundaries!==F&&(this._showTileBoundaries=F,this._update())}get showPadding(){return!!this._showPadding}set showPadding(F){this._showPadding!==F&&(this._showPadding=F,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(F){this._showCollisionBoxes!==F&&(this._showCollisionBoxes=F,F?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(F){this._showOverdrawInspector!==F&&(this._showOverdrawInspector=F,this._update())}get repaint(){return!!this._repaint}set repaint(F){this._repaint!==F&&(this._repaint=F,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(F){this._vertices=F,this._update()}get version(){return wc}getCameraTargetElevation(){return this.transform.elevation}},u.MapMouseEvent=Ro,u.MapTouchEvent=_o,u.MapWheelEvent=ol,u.Marker=Ba,u.NavigationControl=class{constructor(F){this._updateZoomButtons=()=>{const o=this._map.getZoom(),l=o===this._map.getMaxZoom(),O=o===this._map.getMinZoom();this._zoomInButton.disabled=l,this._zoomOutButton.disabled=O,this._zoomInButton.setAttribute("aria-disabled",l.toString()),this._zoomOutButton.setAttribute("aria-disabled",O.toString())},this._rotateCompassArrow=()=>{const o=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${this._map.transform.angle*(180/Math.PI)}deg)`:`rotate(${this._map.transform.angle*(180/Math.PI)}deg)`;this._compassIcon.style.transform=o},this._setButtonTitle=(o,l)=>{const O=this._map._getUIString(`NavigationControl.${l}`);o.title=O,o.setAttribute("aria-label",O)},this.options=t.e({},Ps,F),this._container=n.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",o=>o.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",o=>this._map.zoomIn({},{originalEvent:o})),n.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",o=>this._map.zoomOut({},{originalEvent:o})),n.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",o=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:o}):this._map.resetNorth({},{originalEvent:o})}),this._compassIcon=n.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(F){return this._map=F,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new ni(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){n.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(F,o){const l=n.create("button",F,this._container);return l.type="button",l.addEventListener("click",o),l}},u.Popup=kt,u.RasterDEMTileSource=We,u.RasterTileSource=Pe,u.ScaleControl=class{constructor(F){this._onMove=()=>{ka(this._map,this._container,this.options)},this.setUnit=o=>{this.options.unit=o,ka(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},ui),F)}getDefaultPosition(){return"bottom-left"}onAdd(F){return this._map=F,this._container=n.create("div","maplibregl-ctrl maplibregl-ctrl-scale",F.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){n.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},u.ScrollZoomHandler=ul,u.Style=Zn,u.TerrainControl=class{constructor(F){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=F}onAdd(F){return this._map=F,this._container=n.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=n.create("button","maplibregl-ctrl-terrain",this._container),n.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){n.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},u.TwoFingersTouchPitchHandler=Il,u.TwoFingersTouchRotateHandler=Jc,u.TwoFingersTouchZoomHandler=gi,u.TwoFingersTouchZoomRotateHandler=pl,u.VectorTileSource=Le,u.VideoSource=ve,u.addSourceType=(F,o)=>t._(void 0,void 0,void 0,function*(){if(ze(F))throw new Error(`A source type called "${F}" already exists.`);((l,O)=>{ge[l]=O})(F,o)}),u.clearPrewarmedResources=function(){const F=fe;F&&(F.isPreloaded()&&F.numActive()===1?(F.release(ae),fe=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},u.getMaxParallelImageRequests=function(){return t.a.MAX_PARALLEL_IMAGE_REQUESTS},u.getRTLTextPluginStatus=function(){return Ke().getRTLTextPluginStatus()},u.getVersion=function(){return $},u.getWorkerCount=function(){return oe.workerCount},u.getWorkerUrl=function(){return t.a.WORKER_URL},u.importScriptInWorkers=function(F){return me().broadcast("IS",F)},u.prewarm=function(){ue().acquire(ae)},u.setMaxParallelImageRequests=function(F){t.a.MAX_PARALLEL_IMAGE_REQUESTS=F},u.setRTLTextPlugin=function(F,o){return Ke().setRTLTextPlugin(F,o)},u.setWorkerCount=function(F){oe.workerCount=F},u.setWorkerUrl=function(F){t.a.WORKER_URL=F}}),b})()},88640:function(A,b,e){function v(Se,Ae,Te){Se.prototype=Ae.prototype=Te,Te.constructor=Se}function u(Se,Ae){var Te=Object.create(Se.prototype);for(var Me in Ae)Te[Me]=Ae[Me];return Te}function t(){}e.d(b,{GW:function(){return be},Dj:function(){return oe}});var w=.7,y=1/w,x="\\s*([+-]?\\d+)\\s*",p="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",n="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",i=/^#([0-9a-f]{3,8})$/,d=new RegExp("^rgb\\(".concat(x,",").concat(x,",").concat(x,"\\)$")),s=new RegExp("^rgb\\(".concat(n,",").concat(n,",").concat(n,"\\)$")),c=new RegExp("^rgba\\(".concat(x,",").concat(x,",").concat(x,",").concat(p,"\\)$")),f=new RegExp("^rgba\\(".concat(n,",").concat(n,",").concat(n,",").concat(p,"\\)$")),m=new RegExp("^hsl\\(".concat(p,",").concat(n,",").concat(n,"\\)$")),T=new RegExp("^hsla\\(".concat(p,",").concat(n,",").concat(n,",").concat(p,"\\)$")),C={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 S(){return this.rgb().formatHex()}function L(){return this.rgb().formatRgb()}function R(Se){var Ae,Te;return Se=(Se+"").trim().toLowerCase(),(Ae=i.exec(Se))?(Te=Ae[1].length,Ae=parseInt(Ae[1],16),Te===6?E(Ae):Te===3?new k(Ae>>8&15|Ae>>4&240,Ae>>4&15|240&Ae,(15&Ae)<<4|15&Ae,1):Te===8?N(Ae>>24&255,Ae>>16&255,Ae>>8&255,(255&Ae)/255):Te===4?N(Ae>>12&15|Ae>>8&240,Ae>>8&15|Ae>>4&240,Ae>>4&15|240&Ae,((15&Ae)<<4|15&Ae)/255):null):(Ae=d.exec(Se))?new k(Ae[1],Ae[2],Ae[3],1):(Ae=s.exec(Se))?new k(255*Ae[1]/100,255*Ae[2]/100,255*Ae[3]/100,1):(Ae=c.exec(Se))?N(Ae[1],Ae[2],Ae[3],Ae[4]):(Ae=f.exec(Se))?N(255*Ae[1]/100,255*Ae[2]/100,255*Ae[3]/100,Ae[4]):(Ae=m.exec(Se))?U(Ae[1],Ae[2]/100,Ae[3]/100,1):(Ae=T.exec(Se))?U(Ae[1],Ae[2]/100,Ae[3]/100,Ae[4]):C.hasOwnProperty(Se)?E(C[Se]):Se==="transparent"?new k(NaN,NaN,NaN,0):null}function E(Se){return new k(Se>>16&255,Se>>8&255,255&Se,1)}function N(Se,Ae,Te,Me){return Me<=0&&(Se=Ae=Te=NaN),new k(Se,Ae,Te,Me)}function M(Se,Ae,Te,Me){return arguments.length===1?((Le=Se)instanceof t||(Le=R(Le)),Le?new k((Le=Le.rgb()).r,Le.g,Le.b,Le.opacity):new k):new k(Se,Ae,Te,Me??1);var Le}function k(Se,Ae,Te,Me){this.r=+Se,this.g=+Ae,this.b=+Te,this.opacity=+Me}function I(){return"#".concat(V(this.r)).concat(V(this.g)).concat(V(this.b))}function _(){var Se=P(this.opacity);return"".concat(Se===1?"rgb(":"rgba(").concat(z(this.r),", ").concat(z(this.g),", ").concat(z(this.b)).concat(Se===1?")":", ".concat(Se,")"))}function P(Se){return isNaN(Se)?1:Math.max(0,Math.min(1,Se))}function z(Se){return Math.max(0,Math.min(255,Math.round(Se)||0))}function V(Se){return((Se=z(Se))<16?"0":"")+Se.toString(16)}function U(Se,Ae,Te,Me){return Me<=0?Se=Ae=Te=NaN:Te<=0||Te>=1?Se=Ae=NaN:Ae<=0&&(Se=NaN),new W(Se,Ae,Te,Me)}function q(Se){if(Se instanceof W)return new W(Se.h,Se.s,Se.l,Se.opacity);if(Se instanceof t||(Se=R(Se)),!Se)return new W;if(Se instanceof W)return Se;var Ae=(Se=Se.rgb()).r/255,Te=Se.g/255,Me=Se.b/255,Le=Math.min(Ae,Te,Me),Pe=Math.max(Ae,Te,Me),We=NaN,Re=Pe-Le,je=(Pe+Le)/2;return Re?(We=Ae===Pe?(Te-Me)/Re+6*(Te<Me):Te===Pe?(Me-Ae)/Re+2:(Ae-Te)/Re+4,Re/=je<.5?Pe+Le:2-Pe-Le,We*=60):Re=je>0&&je<1?0:We,new W(We,Re,je,Se.opacity)}function W(Se,Ae,Te,Me){this.h=+Se,this.s=+Ae,this.l=+Te,this.opacity=+Me}function Y(Se){return(Se=(Se||0)%360)<0?Se+360:Se}function ne(Se){return Math.max(0,Math.min(1,Se||0))}function J(Se,Ae,Te){return 255*(Se<60?Ae+(Te-Ae)*Se/60:Se<180?Te:Se<240?Ae+(Te-Ae)*(240-Se)/60:Ae)}v(t,R,{copy:function(Se){return Object.assign(new this.constructor,this,Se)},displayable:function(){return this.rgb().displayable()},hex:S,formatHex:S,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return q(this).formatHsl()},formatRgb:L,toString:L}),v(k,M,u(t,{brighter:function(Se){return Se=Se==null?y:Math.pow(y,Se),new k(this.r*Se,this.g*Se,this.b*Se,this.opacity)},darker:function(Se){return Se=Se==null?w:Math.pow(w,Se),new k(this.r*Se,this.g*Se,this.b*Se,this.opacity)},rgb:function(){return this},clamp:function(){return new k(z(this.r),z(this.g),z(this.b),P(this.opacity))},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:I,formatHex:I,formatHex8:function(){return"#".concat(V(this.r)).concat(V(this.g)).concat(V(this.b)).concat(V(255*(isNaN(this.opacity)?1:this.opacity)))},formatRgb:_,toString:_})),v(W,function(Se,Ae,Te,Me){return arguments.length===1?q(Se):new W(Se,Ae,Te,Me??1)},u(t,{brighter:function(Se){return Se=Se==null?y:Math.pow(y,Se),new W(this.h,this.s,this.l*Se,this.opacity)},darker:function(Se){return Se=Se==null?w:Math.pow(w,Se),new W(this.h,this.s,this.l*Se,this.opacity)},rgb:function(){var Se=this.h%360+360*(this.h<0),Ae=isNaN(Se)||isNaN(this.s)?0:this.s,Te=this.l,Me=Te+(Te<.5?Te:1-Te)*Ae,Le=2*Te-Me;return new k(J(Se>=240?Se-240:Se+120,Le,Me),J(Se,Le,Me),J(Se<120?Se+240:Se-120,Le,Me),this.opacity)},clamp:function(){return new W(Y(this.h),ne(this.s),ne(this.l),P(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 Se=P(this.opacity);return"".concat(Se===1?"hsl(":"hsla(").concat(Y(this.h),", ").concat(100*ne(this.s),"%, ").concat(100*ne(this.l),"%").concat(Se===1?")":", ".concat(Se,")"))}}));var re=function(Se){return function(){return Se}};function ee(Se,Ae){var Te=Ae-Se;return Te?(function(Me,Le){return function(Pe){return Me+Pe*Le}})(Se,Te):re(isNaN(Se)?Ae:Se)}var Z=(function Se(Ae){var Te=(function(Le){return(Le=+Le)==1?ee:function(Pe,We){return We-Pe?(function(Re,je,Ne){return Re=Math.pow(Re,Ne),je=Math.pow(je,Ne)-Re,Ne=1/Ne,function(ve){return Math.pow(Re+ve*je,Ne)}})(Pe,We,Le):re(isNaN(Pe)?We:Pe)}})(Ae);function Me(Le,Pe){var We=Te((Le=M(Le)).r,(Pe=M(Pe)).r),Re=Te(Le.g,Pe.g),je=Te(Le.b,Pe.b),Ne=ee(Le.opacity,Pe.opacity);return function(ve){return Le.r=We(ve),Le.g=Re(ve),Le.b=je(ve),Le.opacity=Ne(ve),Le+""}}return Me.gamma=Se,Me})(1);function te(Se,Ae){var Te,Me=Ae?Ae.length:0,Le=Se?Math.min(Me,Se.length):0,Pe=new Array(Le),We=new Array(Me);for(Te=0;Te<Le;++Te)Pe[Te]=be(Se[Te],Ae[Te]);for(;Te<Me;++Te)We[Te]=Ae[Te];return function(Re){for(Te=0;Te<Le;++Te)We[Te]=Pe[Te](Re);return We}}function ae(Se,Ae){var Te=new Date;return Se=+Se,Ae=+Ae,function(Me){return Te.setTime(Se*(1-Me)+Ae*Me),Te}}function oe(Se,Ae){return Se=+Se,Ae=+Ae,function(Te){return Se*(1-Te)+Ae*Te}}function pe(Se){return pe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Ae){return typeof Ae}:function(Ae){return Ae&&typeof Symbol=="function"&&Ae.constructor===Symbol&&Ae!==Symbol.prototype?"symbol":typeof Ae},pe(Se)}function fe(Se,Ae){var Te,Me={},Le={};for(Te in Se!==null&&pe(Se)==="object"||(Se={}),Ae!==null&&pe(Ae)==="object"||(Ae={}),Ae)Te in Se?Me[Te]=be(Se[Te],Ae[Te]):Le[Te]=Ae[Te];return function(Pe){for(Te in Me)Le[Te]=Me[Te](Pe);return Le}}var se=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ue=new RegExp(se.source,"g");function de(Se,Ae){var Te,Me,Le,Pe=se.lastIndex=ue.lastIndex=0,We=-1,Re=[],je=[];for(Se+="",Ae+="";(Te=se.exec(Se))&&(Me=ue.exec(Ae));)(Le=Me.index)>Pe&&(Le=Ae.slice(Pe,Le),Re[We]?Re[We]+=Le:Re[++We]=Le),(Te=Te[0])===(Me=Me[0])?Re[We]?Re[We]+=Me:Re[++We]=Me:(Re[++We]=null,je.push({i:We,x:oe(Te,Me)})),Pe=ue.lastIndex;return Pe<Ae.length&&(Le=Ae.slice(Pe),Re[We]?Re[We]+=Le:Re[++We]=Le),Re.length<2?je[0]?(function(Ne){return function(ve){return Ne(ve)+""}})(je[0].x):(function(Ne){return function(){return Ne}})(Ae):(Ae=je.length,function(Ne){for(var ve,ye=0;ye<Ae;++ye)Re[(ve=je[ye]).i]=ve.x(Ne);return Re.join("")})}function me(Se,Ae){Ae||(Ae=[]);var Te,Me=Se?Math.min(Ae.length,Se.length):0,Le=Ae.slice();return function(Pe){for(Te=0;Te<Me;++Te)Le[Te]=Se[Te]*(1-Pe)+Ae[Te]*Pe;return Le}}function _e(Se){return _e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Ae){return typeof Ae}:function(Ae){return Ae&&typeof Symbol=="function"&&Ae.constructor===Symbol&&Ae!==Symbol.prototype?"symbol":typeof Ae},_e(Se)}function be(Se,Ae){var Te,Me,Le=_e(Ae);return Ae==null||Le==="boolean"?re(Ae):(Le==="number"?oe:Le==="string"?(Te=R(Ae))?(Ae=Te,Z):de:Ae instanceof R?Z:Ae instanceof Date?ae:(Me=Ae,!ArrayBuffer.isView(Me)||Me instanceof DataView?Array.isArray(Ae)?te:typeof Ae.valueOf!="function"&&typeof Ae.toString!="function"||isNaN(Ae)?fe:oe:me))(Se,Ae)}},23648:function(A){A.exports=JSON.parse('["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]')},2362:function(A){A.exports=JSON.parse('["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]')},87486:function(A){A.exports=JSON.parse('["normal","italic","oblique"]')},99803:function(A){A.exports=JSON.parse('["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]')},54324:function(A){A.exports=JSON.parse('["inherit","initial","unset"]')},94316:function(A){A.exports=JSON.parse('["caption","icon","menu","message-box","small-caption","status-bar"]')},37071:function(A){A.exports=JSON.parse(`{"version":8,"name":"orto","metadata":{"maputnik:renderer":"mlgljs"},"center":[1.537786,41.837539],"zoom":12,"bearing":0,"pitch":0,"light":{"anchor":"viewport","color":"white","intensity":0.4,"position":[1.15,45,30]},"sources":{"ortoEsri":{"type":"raster","tiles":["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],"tileSize":256,"maxzoom":18,"attribution":"ESRI &copy; <a href='http://www.esri.com'>ESRI</a>"},"ortoInstaMaps":{"type":"raster","tiles":["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],"tileSize":256,"maxzoom":13},"ortoICGC":{"type":"raster","tiles":["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],"tileSize":256,"minzoom":13.1,"maxzoom":20},"openmaptiles":{"type":"vector","url":"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},"sprite":"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1","glyphs":"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf","layers":[{"id":"background","type":"background","paint":{"background-color":"#F4F9F4"}},{"id":"ortoEsri","type":"raster","source":"ortoEsri","maxzoom":16,"layout":{"visibility":"visible"}},{"id":"ortoICGC","type":"raster","source":"ortoICGC","minzoom":13.1,"maxzoom":19,"layout":{"visibility":"visible"}},{"id":"ortoInstaMaps","type":"raster","source":"ortoInstaMaps","maxzoom":13,"layout":{"visibility":"visible"}},{"id":"waterway_tunnel","type":"line","source":"openmaptiles","source-layer":"waterway","minzoom":14,"filter":["all",["in","class","river","stream","canal"],["==","brunnel","tunnel"]],"layout":{"line-cap":"round"},"paint":{"line-color":"#a0c8f0","line-width":{"base":1.3,"stops":[[13,0.5],[20,6]]},"line-dasharray":[2,4]}},{"id":"waterway-other","type":"line","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"waterway","filter":["!in","class","canal","river","stream"],"layout":{"line-cap":"round"},"paint":{"line-color":"#a0c8f0","line-width":{"base":1.3,"stops":[[13,0.5],[20,2]]}}},{"id":"waterway-stream-canal","type":"line","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"waterway","filter":["all",["in","class","canal","stream"],["!=","brunnel","tunnel"]],"layout":{"line-cap":"round"},"paint":{"line-color":"#a0c8f0","line-width":{"base":1.3,"stops":[[13,0.5],[20,6]]}}},{"id":"waterway-river","type":"line","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"waterway","filter":["all",["==","class","river"],["!=","brunnel","tunnel"]],"layout":{"line-cap":"round"},"paint":{"line-color":"#a0c8f0","line-width":{"base":1.2,"stops":[[10,0.8],[20,4]]},"line-opacity":0.5}},{"id":"water-offset","type":"fill","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"water","maxzoom":8,"filter":["==","$type","Polygon"],"layout":{"visibility":"visible"},"paint":{"fill-opacity":0,"fill-color":"#a0c8f0","fill-translate":{"base":1,"stops":[[6,[2,0]],[8,[0,0]]]}}},{"id":"water","type":"fill","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"water","layout":{"visibility":"visible"},"paint":{"fill-color":"hsl(210, 67%, 85%)","fill-opacity":0}},{"id":"water-pattern","type":"fill","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"water","layout":{"visibility":"visible"},"paint":{"fill-translate":[0,2.5],"fill-pattern":"wave","fill-opacity":1}},{"id":"landcover-ice-shelf","type":"fill","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"landcover","filter":["==","subclass","ice_shelf"],"layout":{"visibility":"visible"},"paint":{"fill-color":"#fff","fill-opacity":{"base":1,"stops":[[0,0.9],[10,0.3]]}}},{"id":"tunnel-service-track-casing","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","service","track"]],"layout":{"line-join":"round"},"paint":{"line-color":"#cfcdca","line-dasharray":[0.5,0.25],"line-width":{"base":1.2,"stops":[[15,1],[16,4],[20,11]]}}},{"id":"tunnel-minor-casing","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["==","class","minor"]],"layout":{"line-join":"round"},"paint":{"line-color":"#cfcdca","line-opacity":{"stops":[[12,0],[12.5,1]]},"line-width":{"base":1.2,"stops":[[12,0.5],[13,1],[14,4],[20,15]]}}},{"id":"tunnel-secondary-tertiary-casing","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[8,1.5],[20,17]]}}},{"id":"tunnel-trunk-primary-casing","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-width":{"base":1.2,"stops":[[5,0.4],[6,0.6],[7,1.5],[20,22]]},"line-opacity":0.7}},{"id":"tunnel-motorway-casing","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["==","class","motorway"]],"layout":{"line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-dasharray":[0.5,0.25],"line-width":{"base":1.2,"stops":[[5,0.4],[6,0.6],[7,1.5],[20,22]]},"line-opacity":0.5}},{"id":"tunnel-path","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","brunnel","tunnel"],["==","class","path"]]],"paint":{"line-color":"#cba","line-dasharray":[1.5,0.75],"line-width":{"base":1.2,"stops":[[15,1.2],[20,4]]}}},{"id":"tunnel-service-track","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","service","track"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fff","line-width":{"base":1.2,"stops":[[15.5,0],[16,2],[20,7.5]]}}},{"id":"tunnel-minor","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["==","class","minor_road"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fff","line-opacity":1,"line-width":{"base":1.2,"stops":[[13.5,0],[14,2.5],[20,11.5]]}}},{"id":"tunnel-secondary-tertiary","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fff4c6","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,10]]}}},{"id":"tunnel-trunk-primary","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fff4c6","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]},"line-opacity":0.5}},{"id":"tunnel-motorway","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["==","class","motorway"]],"layout":{"line-join":"round","visibility":"visible"},"paint":{"line-color":"#ffdaa6","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]},"line-opacity":0.5}},{"id":"tunnel-railway","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["==","class","rail"]],"paint":{"line-color":"#bbb","line-width":{"base":1.4,"stops":[[14,0.4],[15,0.75],[20,2]]},"line-dasharray":[2,2]}},{"id":"ferry","type":"line","source":"openmaptiles","source-layer":"transportation","filter":["all",["in","class","ferry"]],"layout":{"line-join":"round","visibility":"visible"},"paint":{"line-color":"rgba(108, 159, 182, 1)","line-width":1.1,"line-dasharray":[2,2]}},{"id":"aeroway-taxiway-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"aeroway","minzoom":12,"filter":["all",["in","class","taxiway"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"rgba(153, 153, 153, 1)","line-width":{"base":1.5,"stops":[[11,2],[17,12]]},"line-opacity":1}},{"id":"aeroway-runway-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"aeroway","minzoom":12,"filter":["all",["in","class","runway"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"rgba(153, 153, 153, 1)","line-width":{"base":1.5,"stops":[[11,5],[17,55]]},"line-opacity":1}},{"id":"aeroway-taxiway","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"aeroway","minzoom":4,"filter":["all",["in","class","taxiway"],["==","$type","LineString"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"rgba(255, 255, 255, 1)","line-width":{"base":1.5,"stops":[[11,1],[17,10]]},"line-opacity":{"base":1,"stops":[[11,0],[12,1]]}}},{"id":"aeroway-runway","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"aeroway","minzoom":4,"filter":["all",["in","class","runway"],["==","$type","LineString"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"rgba(255, 255, 255, 1)","line-width":{"base":1.5,"stops":[[11,4],[17,50]]},"line-opacity":{"base":1,"stops":[[11,0],[12,1]]}}},{"id":"highway-motorway-link-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":12,"filter":["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[12,1],[13,3],[14,4],[20,15]]}}},{"id":"highway-link-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":13,"filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[12,1],[13,3],[14,4],[20,15]]}}},{"id":"highway-minor-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#cfcdca","line-opacity":{"stops":[[12,0],[12.5,0]]},"line-width":{"base":1.2,"stops":[[12,0.5],[13,1],[14,4],[20,15]]}}},{"id":"highway-secondary-tertiary-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],"layout":{"line-cap":"butt","line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-opacity":0.5,"line-width":{"base":1.2,"stops":[[8,1.5],[20,17]]}}},{"id":"highway-primary-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":5,"filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]],"layout":{"line-cap":"butt","line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-opacity":{"stops":[[7,0],[8,0.6]]},"line-width":{"base":1.2,"stops":[[7,0],[8,0.6],[9,1.5],[20,22]]}}},{"id":"highway-trunk-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":5,"filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]],"layout":{"line-cap":"butt","line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-opacity":{"stops":[[5,0],[6,0.5]]},"line-width":{"base":1.2,"stops":[[5,0],[6,0.6],[7,1.5],[20,22]]}}},{"id":"highway-motorway-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":4,"filter":["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]],"layout":{"line-cap":"butt","line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-width":{"base":1.2,"stops":[[4,0],[5,0.4],[6,0.6],[7,1.5],[20,22]]},"line-opacity":{"stops":[[4,0],[5,0.5]]}}},{"id":"highway-path","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","path"]]],"paint":{"line-color":"#cba","line-dasharray":[1.5,0.75],"line-width":{"base":1.2,"stops":[[15,1.2],[20,4]]}}},{"id":"highway-motorway-link","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":12,"filter":["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#fc8","line-width":{"base":1.2,"stops":[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{"id":"highway-link","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":13,"filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{"id":"highway-minor","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#fff","line-opacity":0.5,"line-width":{"base":1.2,"stops":[[13.5,0],[14,2.5],[20,11.5]]}}},{"id":"highway-secondary-tertiary","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[6.5,0],[8,0.5],[20,13]]},"line-opacity":0.5}},{"id":"highway-primary","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[8.5,0],[9,0.5],[20,18]]},"line-opacity":0}},{"id":"highway-trunk","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]},"line-opacity":0.5}},{"id":"highway-motorway","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":5,"filter":["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#fc8","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]},"line-opacity":0.5}},{"id":"railway-transit","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],"layout":{"visibility":"visible"},"paint":{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{"base":1.4,"stops":[[14,0.4],[20,1]]}}},{"id":"railway-transit-hatching","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],"layout":{"visibility":"visible"},"paint":{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[0.2,8],"line-width":{"base":1.4,"stops":[[14.5,0],[15,2],[20,6]]}}},{"id":"railway-service","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],"paint":{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{"base":1.4,"stops":[[14,0.4],[20,1]]}}},{"id":"railway-service-hatching","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],"layout":{"visibility":"visible"},"paint":{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[0.2,8],"line-width":{"base":1.4,"stops":[[14.5,0],[15,2],[20,6]]}}},{"id":"railway","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],"paint":{"line-color":"#bbb","line-width":{"base":1.4,"stops":[[14,0.4],[15,0.75],[20,2]]}}},{"id":"railway-hatching","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],"paint":{"line-color":"#bbb","line-dasharray":[0.2,8],"line-width":{"base":1.4,"stops":[[14.5,0],[15,3],[20,8]]}}},{"id":"bridge-motorway-link-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","motorway_link"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[12,1],[13,3],[14,4],[20,15]]}}},{"id":"bridge-link-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[12,1],[13,3],[14,4],[20,15]]}}},{"id":"bridge-secondary-tertiary-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[8,1.5],[20,28]]}}},{"id":"bridge-trunk-primary-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],"layout":{"line-join":"round"},"paint":{"line-color":"hsl(28, 76%, 67%)","line-width":{"base":1.2,"stops":[[5,0.4],[6,0.6],[7,1.5],[20,26]]}}},{"id":"bridge-motorway-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","motorway"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-width":{"base":1.2,"stops":[[5,0.4],[6,0.6],[7,1.5],[20,22]]},"line-opacity":0.5}},{"id":"bridge-path-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],"paint":{"line-color":"#f8f4f0","line-width":{"base":1.2,"stops":[[15,1.2],[20,18]]}}},{"id":"bridge-path","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],"paint":{"line-color":"#cba","line-width":{"base":1.2,"stops":[[15,1.2],[20,4]]},"line-dasharray":[1.5,0.75]}},{"id":"bridge-motorway-link","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","motorway_link"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fc8","line-width":{"base":1.2,"stops":[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{"id":"bridge-link","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{"id":"bridge-secondary-tertiary","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,20]]}}},{"id":"bridge-trunk-primary","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]}}},{"id":"bridge-motorway","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","motorway"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fc8","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]},"line-opacity":0.5}},{"id":"bridge-railway","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","rail"]],"paint":{"line-color":"#bbb","line-width":{"base":1.4,"stops":[[14,0.4],[15,0.75],[20,2]]}}},{"id":"bridge-railway-hatching","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","rail"]],"paint":{"line-color":"#bbb","line-dasharray":[0.2,8],"line-width":{"base":1.4,"stops":[[14.5,0],[15,3],[20,8]]}}},{"id":"cablecar","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":13,"filter":["==","class","cable_car"],"layout":{"visibility":"visible","line-cap":"round"},"paint":{"line-color":"hsl(0, 0%, 70%)","line-width":{"base":1,"stops":[[11,1],[19,2.5]]}}},{"id":"cablecar-dash","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":13,"filter":["==","class","cable_car"],"layout":{"visibility":"visible","line-cap":"round"},"paint":{"line-color":"hsl(0, 0%, 70%)","line-width":{"base":1,"stops":[[11,3],[19,5.5]]},"line-dasharray":[2,3]}},{"id":"boundary-land-level-4","type":"line","source":"openmaptiles","source-layer":"boundary","filter":["all",[">=","admin_level",4],["<=","admin_level",8],["!=","maritime",1]],"layout":{"line-join":"round"},"paint":{"line-color":"#9e9cab","line-dasharray":[3,1,1,1],"line-width":{"base":1.4,"stops":[[4,0.4],[5,1],[12,3]]},"line-opacity":0.6}},{"id":"boundary-land-level-2","type":"line","source":"openmaptiles","source-layer":"boundary","filter":["all",["==","admin_level",2],["!=","maritime",1],["!=","disputed",1]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"hsl(248, 7%, 66%)","line-width":{"base":1,"stops":[[0,0.6],[4,1.4],[5,2],[12,2]]}}},{"id":"boundary-land-disputed","type":"line","source":"openmaptiles","source-layer":"boundary","filter":["all",["!=","maritime",1],["==","disputed",1]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"hsl(248, 7%, 70%)","line-dasharray":[1,3],"line-width":{"base":1,"stops":[[0,0.6],[4,1.4],[5,2],[12,8]]}}},{"id":"boundary-water","type":"line","source":"openmaptiles","source-layer":"boundary","filter":["all",["in","admin_level",2,4],["==","maritime",1]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"rgba(154, 189, 214, 1)","line-width":{"base":1,"stops":[[0,0.6],[4,1],[5,1],[12,1]]},"line-opacity":{"stops":[[6,0],[10,0]]}}},{"id":"waterway-name","type":"symbol","source":"openmaptiles","source-layer":"waterway","minzoom":13,"filter":["all",["==","$type","LineString"],["has","name"]],"layout":{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin} {name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","text-letter-spacing":0.2,"symbol-spacing":350},"paint":{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{"id":"water-name-lakeline","type":"symbol","source":"openmaptiles","source-layer":"water_name","filter":["==","$type","LineString"],"layout":{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","symbol-spacing":350,"text-letter-spacing":0.2},"paint":{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{"id":"water-name-ocean","type":"symbol","source":"openmaptiles","source-layer":"water_name","filter":["all",["==","$type","Point"],["==","class","ocean"]],"layout":{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":0.2},"paint":{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{"id":"water-name-other","type":"symbol","source":"openmaptiles","source-layer":"water_name","filter":["all",["==","$type","Point"],["!in","class","ocean"]],"layout":{"text-font":["Noto Sans Italic"],"text-size":{"stops":[[0,10],[6,14]]},"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":0.2,"visibility":"visible"},"paint":{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{"id":"poi-level-3","type":"symbol","source":"openmaptiles","source-layer":"poi","minzoom":16,"filter":["all",["==","$type","Point"],[">=","rank",25]],"layout":{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":"{name:latin}\\n{name:nonlatin}","text-offset":[0,0.6],"text-size":12,"text-max-width":9},"paint":{"text-halo-blur":0.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{"id":"poi-level-2","type":"symbol","source":"openmaptiles","source-layer":"poi","minzoom":15,"filter":["all",["==","$type","Point"],["<=","rank",24],[">=","rank",15]],"layout":{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":"{name:latin}\\n{name:nonlatin}","text-offset":[0,0.6],"text-size":12,"text-max-width":9},"paint":{"text-halo-blur":0.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{"id":"poi-level-1","type":"symbol","source":"openmaptiles","source-layer":"poi","minzoom":14,"filter":["all",["==","$type","Point"],["<=","rank",14],["has","name"]],"layout":{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":"{name:latin}\\n{name:nonlatin}","text-offset":[0,0.6],"text-size":11,"text-max-width":9},"paint":{"text-halo-blur":0.5,"text-color":"rgba(191, 228, 172, 1)","text-halo-width":1,"text-halo-color":"rgba(30, 29, 29, 1)"}},{"id":"poi-railway","type":"symbol","source":"openmaptiles","source-layer":"poi","minzoom":13,"filter":["all",["==","$type","Point"],["has","name"],["==","class","railway"],["==","subclass","station"]],"layout":{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":"{name:latin}\\n{name:nonlatin}","text-offset":[0,0.6],"text-size":12,"text-max-width":9,"icon-optional":false,"icon-ignore-placement":false,"icon-allow-overlap":false,"text-ignore-placement":false,"text-allow-overlap":false,"text-optional":true},"paint":{"text-halo-blur":0.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{"id":"road_oneway","type":"symbol","source":"openmaptiles","source-layer":"transportation","minzoom":15,"filter":["all",["==","oneway",1],["in","class","motorway","trunk","primary","secondary","tertiary","minor","service"]],"layout":{"symbol-placement":"line","icon-image":"oneway","symbol-spacing":75,"icon-padding":2,"icon-rotation-alignment":"map","icon-rotate":90,"icon-size":{"stops":[[15,0.5],[19,1]]}},"paint":{"icon-opacity":0.5}},{"id":"road_oneway_opposite","type":"symbol","source":"openmaptiles","source-layer":"transportation","minzoom":15,"filter":["all",["==","oneway",-1],["in","class","motorway","trunk","primary","secondary","tertiary","minor","service"]],"layout":{"symbol-placement":"line","icon-image":"oneway","symbol-spacing":75,"icon-padding":2,"icon-rotation-alignment":"map","icon-rotate":-90,"icon-size":{"stops":[[15,0.5],[19,1]]}},"paint":{"icon-opacity":0.5}},{"id":"highway-name-path","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":15.5,"filter":["==","class","path"],"layout":{"text-size":{"base":1,"stops":[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},"paint":{"text-halo-color":"#f8f4f0","text-color":"hsl(30, 23%, 62%)","text-halo-width":0.5}},{"id":"highway-name-minor","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":15,"filter":["all",["==","$type","LineString"],["in","class","minor","service","track"]],"layout":{"text-size":{"base":1,"stops":[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},"paint":{"text-halo-blur":0.5,"text-color":"#765","text-halo-width":1}},{"id":"highway-name-major","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":12.2,"filter":["in","class","primary","secondary","tertiary","trunk"],"layout":{"text-size":{"base":1,"stops":[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},"paint":{"text-halo-blur":0.5,"text-color":"#765","text-halo-width":1}},{"id":"highway-shield","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":8,"filter":["all",["<=","ref_length",6],["==","$type","LineString"],["!in","network","us-interstate","us-highway","us-state"]],"layout":{"text-size":10,"icon-image":"road_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{"base":1,"stops":[[10,"point"],[11,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},"paint":{"text-opacity":1,"text-color":"rgba(20, 19, 19, 1)","text-halo-color":"rgba(230, 221, 221, 0)","text-halo-width":2,"icon-color":"rgba(183, 18, 18, 1)","icon-opacity":0.3,"icon-halo-color":"rgba(183, 55, 55, 0)"}},{"id":"highway-shield-us-interstate","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":7,"filter":["all",["<=","ref_length",6],["==","$type","LineString"],["in","network","us-interstate"]],"layout":{"text-size":10,"icon-image":"{network}_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{"base":1,"stops":[[7,"point"],[7,"line"],[8,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},"paint":{"text-color":"rgba(0, 0, 0, 1)"}},{"id":"highway-shield-us-other","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":9,"filter":["all",["<=","ref_length",6],["==","$type","LineString"],["in","network","us-highway","us-state"]],"layout":{"text-size":10,"icon-image":"{network}_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{"base":1,"stops":[[10,"point"],[11,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},"paint":{"text-color":"rgba(0, 0, 0, 1)"}},{"id":"place-other","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","minzoom":12,"filter":["!in","class","city","town","village","country","continent"],"layout":{"text-letter-spacing":0.1,"text-size":{"base":1.2,"stops":[[12,10],[15,14]]},"text-font":["Noto Sans Bold"],"text-field":"{name:latin}\\n{name:nonlatin}","text-transform":"uppercase","text-max-width":9,"visibility":"visible"},"paint":{"text-color":"rgba(255,255,255,1)","text-halo-width":1.2,"text-halo-color":"rgba(57, 28, 28, 1)"}},{"id":"place-village","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","minzoom":10,"filter":["==","class","village"],"layout":{"text-font":["Noto Sans Regular"],"text-size":{"base":1.2,"stops":[[10,12],[15,16]]},"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":8,"visibility":"visible"},"paint":{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(10, 9, 9, 0.8)"}},{"id":"place-town","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["==","class","town"],"layout":{"text-font":["Noto Sans Regular"],"text-size":{"base":1.2,"stops":[[10,14],[15,24]]},"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":8,"visibility":"visible"},"paint":{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(22, 22, 22, 0.8)"}},{"id":"place-city","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["!=","capital",2],["==","class","city"]],"layout":{"text-font":["Noto Sans Regular"],"text-size":{"base":1.2,"stops":[[7,14],[11,24]]},"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":8,"visibility":"visible"},"paint":{"text-color":"rgba(0, 0, 0, 1)","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-city-capital","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["==","capital",2],["==","class","city"]],"layout":{"text-font":["Noto Sans Regular"],"text-size":{"base":1.2,"stops":[[7,14],[11,24]]},"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":8,"icon-image":"star_11","text-offset":[0.4,0],"icon-size":0.8,"text-anchor":"left","visibility":"visible"},"paint":{"text-color":"#333","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-country-other","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["==","class","country"],[">=","rank",3],["!has","iso_a2"]],"layout":{"text-font":["Noto Sans Italic"],"text-field":"{name:latin}","text-size":{"stops":[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,"visibility":"visible"},"paint":{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-country-3","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["==","class","country"],[">=","rank",3],["has","iso_a2"]],"layout":{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{"stops":[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,"visibility":"visible"},"paint":{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-country-2","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["==","class","country"],["==","rank",2],["has","iso_a2"]],"layout":{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{"stops":[[2,11],[5,17]]},"text-transform":"uppercase","text-max-width":6.25,"visibility":"visible"},"paint":{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-country-1","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["==","class","country"],["==","rank",1],["has","iso_a2"]],"layout":{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{"stops":[[1,11],[4,17]]},"text-transform":"uppercase","text-max-width":6.25,"visibility":"visible"},"paint":{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-continent","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","maxzoom":1,"filter":["==","class","continent"],"layout":{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":14,"text-max-width":6.25,"text-transform":"uppercase","visibility":"visible"},"paint":{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}}],"id":"qebnlkra6"}`)},51962:function(A){A.exports=JSON.parse(`{"version":8,"name":"orto","metadata":{},"center":[1.537786,41.837539],"zoom":12,"bearing":0,"pitch":0,"light":{"anchor":"viewport","color":"white","intensity":0.4,"position":[1.15,45,30]},"sources":{"ortoEsri":{"type":"raster","tiles":["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],"tileSize":256,"maxzoom":18,"attribution":"ESRI &copy; <a href='http://www.esri.com'>ESRI</a>"},"ortoInstaMaps":{"type":"raster","tiles":["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],"tileSize":256,"maxzoom":13},"ortoICGC":{"type":"raster","tiles":["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],"tileSize":256,"minzoom":13.1,"maxzoom":20},"openmaptiles":{"type":"vector","url":"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},"sprite":"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1","glyphs":"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf","layers":[{"id":"background","type":"background","paint":{"background-color":"#F4F9F4"}},{"id":"ortoEsri","type":"raster","source":"ortoEsri","maxzoom":16,"layout":{"visibility":"visible"}},{"id":"ortoICGC","type":"raster","source":"ortoICGC","minzoom":13.1,"maxzoom":19,"layout":{"visibility":"visible"}},{"id":"ortoInstaMaps","type":"raster","source":"ortoInstaMaps","maxzoom":13,"layout":{"visibility":"visible"}}]}`)}},D={};function X(A){var b=D[A];if(b!==void 0)return b.exports;var e=D[A]={id:A,exports:{}};return g[A].call(e.exports,e,e.exports,X),e.exports}return X.m=g,X.n=function(A){var b=A&&A.__esModule?function(){return A.default}:function(){return A};return X.d(b,{a:b}),b},X.d=function(A,b){for(var e in b)X.o(b,e)&&!X.o(A,e)&&Object.defineProperty(A,e,{enumerable:!0,get:b[e]})},X.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}})(),X.o=function(A,b){return Object.prototype.hasOwnProperty.call(A,b)},X.r=function(A){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(A,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(A,"__esModule",{value:!0})},X.b=document.baseURI||self.location.href,X.nc=void 0,X(20260)})()})})(qx)),qx.exports}var sk=ok();const Gx=ak(sk),Hx=1,lk=800,Jx=300,ck=-46,Kx=100,Xx=-14,uk={__name:"VolumetricField",props:{passesPlays:{type:Array,default:()=>[]},playIndexes:{type:Object,default:()=>{}},isGhostEffect:{type:Boolean,default:!1}},setup(r){const a=new Set([2,20,308,310]),g=[[0,"rgb(12,31,82)"],[.2,"rgb(115,248,253)"],[.4,"rgb(117,251,98)"],[.6,"rgb(255,255,84)"],[.8,"rgb(242,168,59)"],[1,"rgb(234,55,36)"]];let D=null;const X=r,A=h.ref(null),b=h.ref(null),e=h.ref(0),v=h.ref(null),u=h.ref(0),t=h.computed(()=>`volumetric-field-${Date.now()}`),w=h.computed(()=>({"--top-surface-plot":u.value>244?"10%":u.value>175?"10px":"7%"}));h.watch(()=>X.passesPlays,T=>{const C=T.reduce((S,L)=>(a.has(L[X.playIndexes.categoryId])&&S.push({x1:L[X.playIndexes.coordinate1X],y1:L[X.playIndexes.coordinate1Y],x2:L[X.playIndexes.coordinate2X],y2:L[X.playIndexes.coordinate2Y],x3:L[X.playIndexes.coordinate3X],y3:L[X.playIndexes.coordinate3Y]}),S),[]);m(C)}),h.watch(()=>e.value,(T,C)=>{v.value&&(s(T),b.value.style.height=`${c(T)}px`,v.value.style.top=`${f(c(T))}px`,u.value=T)});function y(){D=new ResizeObserver(T=>{for(const C of T)e.value=C.contentRect.width}),D.observe(A.value)}function x(T){return Array.from({length:T},()=>0)}function p(T,C){let S=.01351,L=.02439,R=0,E=0,N=[];const M=C.length,k=Math.floor(M/10);for(;R<74;)E=C.filter(I=>1-I.y3>=R*S&&1-I.y3<=(R+1)*S&&1-I.x3>=T*L&&1-I.x3<=(T+1)*L).map(I=>I.y3).length,N.push(parseFloat((E/k).toFixed(4))),R++;return N.reverse()}function n(T){let C=[x(74),x(74)],S=[],L=39;for(;L>0&&L<=39;)S=p(L,T),C.push(S),L--;return C.push(x(74),x(74)),C}function i(T,C,S){const L=[];let R=0,E=0;L.push(T[0]);for(let N=1;N<S-1;N++){const M=[];M.push(T[N][0]);for(let k=1;k<C-1;k++)R=T[N][k-1],E=T[N][k+1],M.push(R+.5*(T[N][k]+E-R));M.push(T[N][C-1]),L.push(M)}L.push(T[S-1]);for(let N=1;N<C-1;N++)for(let M=1;M<S-1;M++)R=L[M-1][N],E=L[M+1][N],L[M][N]=R+.5*(L[M][N]+E-R);return L}function d(T){let C=0,S=0;for(let L=0;L<T.length;L++){S=S+T[L].reduce(function(E,N){return E+N});const R=Math.max.apply(null,T[L]);R>C&&(C=R)}return C}function s(T){Gx.relayout(A.value,{width:T,height:c(T)})}function c(T){return Math.round(Jx/lk*T,0)}function f(T){return Xx+(T-Kx)/(Jx-Kx)*(ck-Xx)}function m(T){let C=n(T),S=C.length,L=C[0].length;C=i(i(C,L,S),L,S),L=C[0].length,S=C.length;const R=d(C),E=[{z:C,type:"surface",connectgaps:!0,opacity:.25,colorscale:g,autoscale:!1,showscale:!1}],N=[0,L],M=[0,S],k=[0,R*5],I={scene:{xaxis:{title:"",showgrid:!1,showline:!1,zeroline:!1,showticklabels:!1,showbackground:!1,backgroundcolor:"transparent",range:N},yaxis:{title:"",showgrid:!1,showline:!1,zeroline:!1,showticklabels:!1,showbackground:!1,backgroundcolor:"transparent",range:M},zaxis:{title:"",showgrid:!1,showline:!1,zeroline:!1,showticklabels:!1,showbackground:!1,backgroundcolor:"transparent",range:k},aspectratio:{x:1,y:.419,z:1},camera:{eye:{x:-.006743829259037479,y:.33535167247712533,z:-.0014332540873207011},center:{x:-.00679220694254041,y:.10728256468650094,z:-.30848979628595363}}},showlegend:!1,width:e.value,height:c(e.value),paper_bgcolor:"rgba(0,0,0,0)",margin:{l:0,r:0,b:0,t:0}};b.value&&(b.value.style.height=`${c(e.value)}px`);const _=[];for(let z=0;z<L;z++){const V=[],U=[],q=[];for(let W=0;W<S;W++)V.push(z),U.push(W),q.push(E[0].z[W][z]);_.push({x:V,y:U,z:q,type:"scatter3d",mode:"lines",line:{cmin:-.1,cmax:R,width:Hx,color:q,colorscale:g,shape:"spline",smoothing:.6,dash:"dotline"}})}for(let z=0;z<S;z++){const V=[],U=[],q=[];for(let W=0;W<L;W++)V.push(W),U.push(z),q.push(E[0].z[z][W]);_.push({x:V,y:U,z:q,type:"scatter3d",mode:"lines",line:{cmin:-.1,cmax:R,width:Hx,color:q,colorscale:g,shape:"spline",smoothing:.6,dash:"dotline"}})}Gx.newPlot(A.value,E.concat(_),I,{displayModeBar:!1},{responsive:!0}),v.value=document.querySelector(`div.${t.value} > .plot-container`);const P=document.querySelector(`div.${t.value} div.plotly`);P&&X.isGhostEffect&&(P.style.opacity="0.2"),v.value&&(v.value.style.top=`${f(c(e.value))}px`)}return h.onMounted(()=>{A.value&&(A.value.style.pointerEvents="none"),y()}),(T,C)=>(h.openBlock(),h.createElementBlock("div",{ref:"card",class:"card-volumetric-field",style:h.normalizeStyle(w.value)},[h.createElementVNode("div",{ref_key:"volumetricField",ref:b,class:"card-volumetric-field__volumetric-field"},[h.createElementVNode("div",{ref_key:"surfacePlot",ref:A,id:"surface-plot",class:h.normalizeClass([t.value])},null,2)],512)],4))}},dk=Qm(uk,[["__scopeId","data-v-61af4a8e"]]),pk={__name:"AttackDirection",props:{team:{type:Object,required:!0}},setup(r){const a=r,g=h.computed(()=>({"--flex-direction-info":a.team.isHomeTeam?"flex":"row-reverse","--justify-content-info":a.team.isHomeTeam?"flex-start":"flex-end","--arrow-color":a.team.isHomeTeam?"#336dff":"#7ed321"}));return(D,X)=>(h.openBlock(),h.createElementBlock("div",{class:"attack-direction",style:h.normalizeStyle(g.value)},[X[0]||(X[0]=h.createElementVNode("div",{class:"attack-direction__line"},null,-1)),h.createElementVNode("div",{class:h.normalizeClass(`attack-direction__triangle-${r.team.isHomeTeam?"right":"left"}`)},null,2),X[1]||(X[1]=h.createElementVNode("div",{class:"attack-direction__text"},"Ataca",-1))],4))}},hk=Qm(pk,[["__scopeId","data-v-18aa328f"]]);function Zx(r,a){return function(){return r.apply(a,arguments)}}const{toString:fk}=Object.prototype,{getPrototypeOf:v1}=Object,{iterator:$m,toStringTag:Yx}=Symbol,e0=(r=>a=>{const g=fk.call(a);return r[g]||(r[g]=g.slice(8,-1).toLowerCase())})(Object.create(null)),Uu=r=>(r=r.toLowerCase(),a=>e0(a)===r),t0=r=>a=>typeof a===r,{isArray:Th}=Array,xf=t0("undefined");function mk(r){return r!==null&&!xf(r)&&r.constructor!==null&&!xf(r.constructor)&&$c(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}const Qx=Uu("ArrayBuffer");function gk(r){let a;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?a=ArrayBuffer.isView(r):a=r&&r.buffer&&Qx(r.buffer),a}const yk=t0("string"),$c=t0("function"),$x=t0("number"),r0=r=>r!==null&&typeof r=="object",vk=r=>r===!0||r===!1,n0=r=>{if(e0(r)!=="object")return!1;const a=v1(r);return(a===null||a===Object.prototype||Object.getPrototypeOf(a)===null)&&!(Yx in r)&&!($m in r)},xk=Uu("Date"),bk=Uu("File"),_k=Uu("Blob"),wk=Uu("FileList"),Tk=r=>r0(r)&&$c(r.pipe),kk=r=>{let a;return r&&(typeof FormData=="function"&&r instanceof FormData||$c(r.append)&&((a=e0(r))==="formdata"||a==="object"&&$c(r.toString)&&r.toString()==="[object FormData]"))},Sk=Uu("URLSearchParams"),[Ck,Ek,Mk,Ak]=["ReadableStream","Request","Response","Headers"].map(Uu),Lk=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function bf(r,a,{allOwnKeys:g=!1}={}){if(r===null||typeof r>"u")return;let D,X;if(typeof r!="object"&&(r=[r]),Th(r))for(D=0,X=r.length;D<X;D++)a.call(null,r[D],D,r);else{const A=g?Object.getOwnPropertyNames(r):Object.keys(r),b=A.length;let e;for(D=0;D<b;D++)e=A[D],a.call(null,r[e],e,r)}}function eb(r,a){a=a.toLowerCase();const g=Object.keys(r);let D=g.length,X;for(;D-- >0;)if(X=g[D],a===X.toLowerCase())return X;return null}const Mp=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,tb=r=>!xf(r)&&r!==Mp;function x1(){const{caseless:r}=tb(this)&&this||{},a={},g=(D,X)=>{const A=r&&eb(a,X)||X;n0(a[A])&&n0(D)?a[A]=x1(a[A],D):n0(D)?a[A]=x1({},D):Th(D)?a[A]=D.slice():a[A]=D};for(let D=0,X=arguments.length;D<X;D++)arguments[D]&&bf(arguments[D],g);return a}const Rk=(r,a,g,{allOwnKeys:D}={})=>(bf(a,(X,A)=>{g&&$c(X)?r[A]=Zx(X,g):r[A]=X},{allOwnKeys:D}),r),Nk=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),Ik=(r,a,g,D)=>{r.prototype=Object.create(a.prototype,D),r.prototype.constructor=r,Object.defineProperty(r,"super",{value:a.prototype}),g&&Object.assign(r.prototype,g)},Pk=(r,a,g,D)=>{let X,A,b;const e={};if(a=a||{},r==null)return a;do{for(X=Object.getOwnPropertyNames(r),A=X.length;A-- >0;)b=X[A],(!D||D(b,r,a))&&!e[b]&&(a[b]=r[b],e[b]=!0);r=g!==!1&&v1(r)}while(r&&(!g||g(r,a))&&r!==Object.prototype);return a},Ok=(r,a,g)=>{r=String(r),(g===void 0||g>r.length)&&(g=r.length),g-=a.length;const D=r.indexOf(a,g);return D!==-1&&D===g},zk=r=>{if(!r)return null;if(Th(r))return r;let a=r.length;if(!$x(a))return null;const g=new Array(a);for(;a-- >0;)g[a]=r[a];return g},Bk=(r=>a=>r&&a instanceof r)(typeof Uint8Array<"u"&&v1(Uint8Array)),Dk=(r,a)=>{const g=(r&&r[$m]).call(r);let D;for(;(D=g.next())&&!D.done;){const X=D.value;a.call(r,X[0],X[1])}},Vk=(r,a)=>{let g;const D=[];for(;(g=r.exec(a))!==null;)D.push(g);return D},Fk=Uu("HTMLFormElement"),jk=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(a,g,D){return g.toUpperCase()+D}),rb=(({hasOwnProperty:r})=>(a,g)=>r.call(a,g))(Object.prototype),Uk=Uu("RegExp"),nb=(r,a)=>{const g=Object.getOwnPropertyDescriptors(r),D={};bf(g,(X,A)=>{let b;(b=a(X,A,r))!==!1&&(D[A]=b||X)}),Object.defineProperties(r,D)},qk=r=>{nb(r,(a,g)=>{if($c(r)&&["arguments","caller","callee"].indexOf(g)!==-1)return!1;const D=r[g];if($c(D)){if(a.enumerable=!1,"writable"in a){a.writable=!1;return}a.set||(a.set=()=>{throw Error("Can not rewrite read-only method '"+g+"'")})}})},Wk=(r,a)=>{const g={},D=X=>{X.forEach(A=>{g[A]=!0})};return Th(r)?D(r):D(String(r).split(a)),g},Gk=()=>{},Hk=(r,a)=>r!=null&&Number.isFinite(r=+r)?r:a;function Jk(r){return!!(r&&$c(r.append)&&r[Yx]==="FormData"&&r[$m])}const Kk=r=>{const a=new Array(10),g=(D,X)=>{if(r0(D)){if(a.indexOf(D)>=0)return;if(!("toJSON"in D)){a[X]=D;const A=Th(D)?[]:{};return bf(D,(b,e)=>{const v=g(b,X+1);!xf(v)&&(A[e]=v)}),a[X]=void 0,A}}return D};return g(r,0)},Xk=Uu("AsyncFunction"),Zk=r=>r&&(r0(r)||$c(r))&&$c(r.then)&&$c(r.catch),ib=((r,a)=>r?setImmediate:a?((g,D)=>(Mp.addEventListener("message",({source:X,data:A})=>{X===Mp&&A===g&&D.length&&D.shift()()},!1),X=>{D.push(X),Mp.postMessage(g,"*")}))(`axios@${Math.random()}`,[]):g=>setTimeout(g))(typeof setImmediate=="function",$c(Mp.postMessage)),Yk=typeof queueMicrotask<"u"?queueMicrotask.bind(Mp):typeof process<"u"&&process.nextTick||ib,Qk=r=>r!=null&&$c(r[$m]),Fn={isArray:Th,isArrayBuffer:Qx,isBuffer:mk,isFormData:kk,isArrayBufferView:gk,isString:yk,isNumber:$x,isBoolean:vk,isObject:r0,isPlainObject:n0,isReadableStream:Ck,isRequest:Ek,isResponse:Mk,isHeaders:Ak,isUndefined:xf,isDate:xk,isFile:bk,isBlob:_k,isRegExp:Uk,isFunction:$c,isStream:Tk,isURLSearchParams:Sk,isTypedArray:Bk,isFileList:wk,forEach:bf,merge:x1,extend:Rk,trim:Lk,stripBOM:Nk,inherits:Ik,toFlatObject:Pk,kindOf:e0,kindOfTest:Uu,endsWith:Ok,toArray:zk,forEachEntry:Dk,matchAll:Vk,isHTMLForm:Fk,hasOwnProperty:rb,hasOwnProp:rb,reduceDescriptors:nb,freezeMethods:qk,toObjectSet:Wk,toCamelCase:jk,noop:Gk,toFiniteNumber:Hk,findKey:eb,global:Mp,isContextDefined:tb,isSpecCompliantForm:Jk,toJSONObject:Kk,isAsyncFn:Xk,isThenable:Zk,setImmediate:ib,asap:Yk,isIterable:Qk};function da(r,a,g,D,X){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=r,this.name="AxiosError",a&&(this.code=a),g&&(this.config=g),D&&(this.request=D),X&&(this.response=X,this.status=X.status?X.status:null)}Fn.inherits(da,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Fn.toJSONObject(this.config),code:this.code,status:this.status}}});const ab=da.prototype,ob={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(r=>{ob[r]={value:r}}),Object.defineProperties(da,ob),Object.defineProperty(ab,"isAxiosError",{value:!0}),da.from=(r,a,g,D,X,A)=>{const b=Object.create(ab);return Fn.toFlatObject(r,b,function(e){return e!==Error.prototype},e=>e!=="isAxiosError"),da.call(b,r.message,a,g,D,X),b.cause=r,b.name=r.name,A&&Object.assign(b,A),b};const $k=null;function b1(r){return Fn.isPlainObject(r)||Fn.isArray(r)}function sb(r){return Fn.endsWith(r,"[]")?r.slice(0,-2):r}function lb(r,a,g){return r?r.concat(a).map(function(D,X){return D=sb(D),!g&&X?"["+D+"]":D}).join(g?".":""):a}function eS(r){return Fn.isArray(r)&&!r.some(b1)}const tS=Fn.toFlatObject(Fn,{},null,function(r){return/^is[A-Z]/.test(r)});function i0(r,a,g){if(!Fn.isObject(r))throw new TypeError("target must be an object");a=a||new FormData,g=Fn.toFlatObject(g,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,p){return!Fn.isUndefined(p[x])});const D=g.metaTokens,X=g.visitor||u,A=g.dots,b=g.indexes,e=(g.Blob||typeof Blob<"u"&&Blob)&&Fn.isSpecCompliantForm(a);if(!Fn.isFunction(X))throw new TypeError("visitor must be a function");function v(x){if(x===null)return"";if(Fn.isDate(x))return x.toISOString();if(Fn.isBoolean(x))return x.toString();if(!e&&Fn.isBlob(x))throw new da("Blob is not supported. Use a Buffer instead.");return Fn.isArrayBuffer(x)||Fn.isTypedArray(x)?e&&typeof Blob=="function"?new Blob([x]):Buffer.from(x):x}function u(x,p,n){let i=x;if(x&&!n&&typeof x=="object"){if(Fn.endsWith(p,"{}"))p=D?p:p.slice(0,-2),x=JSON.stringify(x);else if(Fn.isArray(x)&&eS(x)||(Fn.isFileList(x)||Fn.endsWith(p,"[]"))&&(i=Fn.toArray(x)))return p=sb(p),i.forEach(function(d,s){!(Fn.isUndefined(d)||d===null)&&a.append(b===!0?lb([p],s,A):b===null?p:p+"[]",v(d))}),!1}return b1(x)?!0:(a.append(lb(n,p,A),v(x)),!1)}const t=[],w=Object.assign(tS,{defaultVisitor:u,convertValue:v,isVisitable:b1});function y(x,p){if(!Fn.isUndefined(x)){if(t.indexOf(x)!==-1)throw Error("Circular reference detected in "+p.join("."));t.push(x),Fn.forEach(x,function(n,i){(!(Fn.isUndefined(n)||n===null)&&X.call(a,n,Fn.isString(i)?i.trim():i,p,w))===!0&&y(n,p?p.concat(i):[i])}),t.pop()}}if(!Fn.isObject(r))throw new TypeError("data must be an object");return y(r),a}function cb(r){const a={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,function(g){return a[g]})}function _1(r,a){this._pairs=[],r&&i0(r,this,a)}const ub=_1.prototype;ub.append=function(r,a){this._pairs.push([r,a])},ub.toString=function(r){const a=r?function(g){return r.call(this,g,cb)}:cb;return this._pairs.map(function(g){return a(g[0])+"="+a(g[1])},"").join("&")};function rS(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function db(r,a,g){if(!a)return r;const D=g&&g.encode||rS;Fn.isFunction(g)&&(g={serialize:g});const X=g&&g.serialize;let A;if(X?A=X(a,g):A=Fn.isURLSearchParams(a)?a.toString():new _1(a,g).toString(D),A){const b=r.indexOf("#");b!==-1&&(r=r.slice(0,b)),r+=(r.indexOf("?")===-1?"?":"&")+A}return r}let pb=class{constructor(){this.handlers=[]}use(r,a,g){return this.handlers.push({fulfilled:r,rejected:a,synchronous:g?g.synchronous:!1,runWhen:g?g.runWhen:null}),this.handlers.length-1}eject(r){this.handlers[r]&&(this.handlers[r]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(r){Fn.forEach(this.handlers,function(a){a!==null&&r(a)})}};const hb={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},nS=typeof URLSearchParams<"u"?URLSearchParams:_1,iS=typeof FormData<"u"?FormData:null,aS=typeof Blob<"u"?Blob:null,oS={isBrowser:!0,classes:{URLSearchParams:nS,FormData:iS,Blob:aS},protocols:["http","https","file","blob","url","data"]},w1=typeof window<"u"&&typeof document<"u",T1=typeof navigator=="object"&&navigator||void 0,sS=w1&&(!T1||["ReactNative","NativeScript","NS"].indexOf(T1.product)<0),lS=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",cS=w1&&window.location.href||"http://localhost",uS=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:w1,hasStandardBrowserEnv:sS,hasStandardBrowserWebWorkerEnv:lS,navigator:T1,origin:cS},Symbol.toStringTag,{value:"Module"})),kc={...uS,...oS};function dS(r,a){return i0(r,new kc.classes.URLSearchParams,Object.assign({visitor:function(g,D,X,A){return kc.isNode&&Fn.isBuffer(g)?(this.append(D,g.toString("base64")),!1):A.defaultVisitor.apply(this,arguments)}},a))}function pS(r){return Fn.matchAll(/\w+|\[(\w*)]/g,r).map(a=>a[0]==="[]"?"":a[1]||a[0])}function hS(r){const a={},g=Object.keys(r);let D;const X=g.length;let A;for(D=0;D<X;D++)A=g[D],a[A]=r[A];return a}function fb(r){function a(g,D,X,A){let b=g[A++];if(b==="__proto__")return!0;const e=Number.isFinite(+b),v=A>=g.length;return b=!b&&Fn.isArray(X)?X.length:b,v?(Fn.hasOwnProp(X,b)?X[b]=[X[b],D]:X[b]=D,!e):((!X[b]||!Fn.isObject(X[b]))&&(X[b]=[]),a(g,D,X[b],A)&&Fn.isArray(X[b])&&(X[b]=hS(X[b])),!e)}if(Fn.isFormData(r)&&Fn.isFunction(r.entries)){const g={};return Fn.forEachEntry(r,(D,X)=>{a(pS(D),X,g,0)}),g}return null}function fS(r,a,g){if(Fn.isString(r))try{return(a||JSON.parse)(r),Fn.trim(r)}catch(D){if(D.name!=="SyntaxError")throw D}return(g||JSON.stringify)(r)}const _f={transitional:hb,adapter:["xhr","http","fetch"],transformRequest:[function(r,a){const g=a.getContentType()||"",D=g.indexOf("application/json")>-1,X=Fn.isObject(r);if(X&&Fn.isHTMLForm(r)&&(r=new FormData(r)),Fn.isFormData(r))return D?JSON.stringify(fb(r)):r;if(Fn.isArrayBuffer(r)||Fn.isBuffer(r)||Fn.isStream(r)||Fn.isFile(r)||Fn.isBlob(r)||Fn.isReadableStream(r))return r;if(Fn.isArrayBufferView(r))return r.buffer;if(Fn.isURLSearchParams(r))return a.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),r.toString();let A;if(X){if(g.indexOf("application/x-www-form-urlencoded")>-1)return dS(r,this.formSerializer).toString();if((A=Fn.isFileList(r))||g.indexOf("multipart/form-data")>-1){const b=this.env&&this.env.FormData;return i0(A?{"files[]":r}:r,b&&new b,this.formSerializer)}}return X||D?(a.setContentType("application/json",!1),fS(r)):r}],transformResponse:[function(r){const a=this.transitional||_f.transitional,g=a&&a.forcedJSONParsing,D=this.responseType==="json";if(Fn.isResponse(r)||Fn.isReadableStream(r))return r;if(r&&Fn.isString(r)&&(g&&!this.responseType||D)){const X=!(a&&a.silentJSONParsing)&&D;try{return JSON.parse(r)}catch(A){if(X)throw A.name==="SyntaxError"?da.from(A,da.ERR_BAD_RESPONSE,this,null,this.response):A}}return r}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:kc.classes.FormData,Blob:kc.classes.Blob},validateStatus:function(r){return r>=200&&r<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Fn.forEach(["delete","get","head","post","put","patch"],r=>{_f.headers[r]={}});const mS=Fn.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),gS=r=>{const a={};let g,D,X;return r&&r.split(`
4030
+ `),Mt=he.createShader(he.FRAGMENT_SHADER);if(he.isContextLost())return void(this.failedToCreate=!0);if(he.shaderSource(Mt,Et),he.compileShader(Mt),!he.getShaderParameter(Mt,he.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${he.getShaderInfoLog(Mt)}`);he.attachShader(this.program,Mt);const Xt=he.createShader(he.VERTEX_SHADER);if(he.isContextLost())return void(this.failedToCreate=!0);if(he.shaderSource(Xt,Ut),he.compileShader(Xt),!he.getShaderParameter(Xt,he.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${he.getShaderInfoLog(Xt)}`);he.attachShader(this.program,Xt),this.attributes={};const Qt={};this.numAttributes=De.length;for(let Zt=0;Zt<this.numAttributes;Zt++)De[Zt]&&(he.bindAttribLocation(this.program,Zt,De[Zt]),this.attributes[De[Zt]]=Zt);if(he.linkProgram(this.program),!he.getProgramParameter(this.program,he.LINK_STATUS))throw new Error(`Program failed to link: ${he.getProgramInfoLog(this.program)}`);he.deleteShader(Xt),he.deleteShader(Mt);for(let Zt=0;Zt<bt.length;Zt++){const pr=bt[Zt];if(pr&&!Qt[pr]){const Tr=he.getUniformLocation(this.program,pr);Tr&&(Qt[pr]=Tr)}}this.fixedUniforms=j(o,Qt),this.terrainUniforms=((Zt,pr)=>({u_depth:new t.aI(Zt,pr.u_depth),u_terrain:new t.aI(Zt,pr.u_terrain),u_terrain_dim:new t.aJ(Zt,pr.u_terrain_dim),u_terrain_matrix:new t.aK(Zt,pr.u_terrain_matrix),u_terrain_unpack:new t.aL(Zt,pr.u_terrain_unpack),u_terrain_exaggeration:new t.aJ(Zt,pr.u_terrain_exaggeration)}))(o,Qt),this.binderUniforms=O?O.getUniforms(o,Qt):[]}draw(o,l,O,j,H,ie,he,we,Ee,De,qe,it,ut,ht,bt,At,Et,Ut){const Mt=o.gl;if(this.failedToCreate)return;if(o.program.set(this.program),o.setDepthMode(O),o.setStencilMode(j),o.setColorMode(H),o.setCullFace(ie),we){o.activeTexture.set(Mt.TEXTURE2),Mt.bindTexture(Mt.TEXTURE_2D,we.depthTexture),o.activeTexture.set(Mt.TEXTURE3),Mt.bindTexture(Mt.TEXTURE_2D,we.texture);for(const Qt in this.terrainUniforms)this.terrainUniforms[Qt].set(we[Qt])}for(const Qt in this.fixedUniforms)this.fixedUniforms[Qt].set(he[Qt]);bt&&bt.setUniforms(o,this.binderUniforms,ut,{zoom:ht});let Xt=0;switch(l){case Mt.LINES:Xt=2;break;case Mt.TRIANGLES:Xt=3;break;case Mt.LINE_STRIP:Xt=1}for(const Qt of it.get()){const Zt=Qt.vaos||(Qt.vaos={});(Zt[Ee]||(Zt[Ee]=new Dn)).bind(o,this,De,bt?bt.getPaintVertexBuffers():[],qe,Qt.vertexOffset,At,Et,Ut),Mt.drawElements(l,Qt.primitiveLength*Xt,Mt.UNSIGNED_SHORT,Qt.primitiveOffset*Xt*2)}}}function jr(F,o,l){const O=1/wt(l,1,o.transform.tileZoom),j=Math.pow(2,l.tileID.overscaledZ),H=l.tileSize*Math.pow(2,o.transform.tileZoom)/j,ie=H*(l.tileID.canonical.x+l.tileID.wrap*j),he=H*l.tileID.canonical.y;return{u_image:0,u_texsize:l.imageAtlasTexture.size,u_scale:[O,F.fromScale,F.toScale],u_fade:F.t,u_pixel_coord_upper:[ie>>16,he>>16],u_pixel_coord_lower:[65535&ie,65535&he]}}const an=(F,o,l,O)=>{const j=o.style.light,H=j.properties.get("position"),ie=[H.x,H.y,H.z],he=(function(){var Ee=new t.A(9);return t.A!=Float32Array&&(Ee[1]=0,Ee[2]=0,Ee[3]=0,Ee[5]=0,Ee[6]=0,Ee[7]=0),Ee[0]=1,Ee[4]=1,Ee[8]=1,Ee})();j.properties.get("anchor")==="viewport"&&(function(Ee,De){var qe=Math.sin(De),it=Math.cos(De);Ee[0]=it,Ee[1]=qe,Ee[2]=0,Ee[3]=-qe,Ee[4]=it,Ee[5]=0,Ee[6]=0,Ee[7]=0,Ee[8]=1})(he,-o.transform.angle),(function(Ee,De,qe){var it=De[0],ut=De[1],ht=De[2];Ee[0]=it*qe[0]+ut*qe[3]+ht*qe[6],Ee[1]=it*qe[1]+ut*qe[4]+ht*qe[7],Ee[2]=it*qe[2]+ut*qe[5]+ht*qe[8]})(ie,ie,he);const we=j.properties.get("color");return{u_matrix:F,u_lightpos:ie,u_lightintensity:j.properties.get("intensity"),u_lightcolor:[we.r,we.g,we.b],u_vertical_gradient:+l,u_opacity:O}},xn=(F,o,l,O,j,H,ie)=>t.e(an(F,o,l,O),jr(H,o,ie),{u_height_factor:-Math.pow(2,j.overscaledZ)/ie.tileSize/8}),yn=F=>({u_matrix:F}),In=(F,o,l,O)=>t.e(yn(F),jr(l,o,O)),Qn=(F,o)=>({u_matrix:F,u_world:o}),gr=(F,o,l,O,j)=>t.e(In(F,o,l,O),{u_world:j}),qr=(F,o,l,O)=>{const j=F.transform;let H,ie;if(O.paint.get("circle-pitch-alignment")==="map"){const he=wt(l,1,j.zoom);H=!0,ie=[he,he]}else H=!1,ie=j.pixelsToGLUnits;return{u_camera_to_center_distance:j.cameraToCenterDistance,u_scale_with_map:+(O.paint.get("circle-pitch-scale")==="map"),u_matrix:F.translatePosMatrix(o.posMatrix,l,O.paint.get("circle-translate"),O.paint.get("circle-translate-anchor")),u_pitch_with_map:+H,u_device_pixel_ratio:F.pixelRatio,u_extrude_scale:ie}},tr=(F,o)=>({u_matrix:o,u_pixel_extrude_scale:[1/F.width,1/F.height]}),or=(F,o,l)=>({u_matrix:F,u_inv_matrix:o,u_camera_to_center_distance:l.cameraToCenterDistance,u_viewport_size:[l.width,l.height]}),yr=(F,o,l=1)=>({u_matrix:F,u_color:o,u_overlay:0,u_overlay_scale:l}),Pr=F=>({u_matrix:F}),Or=(F,o,l,O)=>({u_matrix:F,u_extrude_scale:wt(o,1,l),u_intensity:O}),Jr=(F,o,l,O)=>{const j=t.H();t.aQ(j,0,F.width,F.height,0,0,1);const H=F.context.gl;return{u_matrix:j,u_world:[H.drawingBufferWidth,H.drawingBufferHeight],u_image:l,u_color_ramp:O,u_opacity:o.paint.get("heatmap-opacity")}},Fr=(F,o,l,O)=>{const j=l.paint.get("hillshade-shadow-color"),H=l.paint.get("hillshade-highlight-color"),ie=l.paint.get("hillshade-accent-color");let he=l.paint.get("hillshade-illumination-direction")*(Math.PI/180);l.paint.get("hillshade-illumination-anchor")==="viewport"&&(he-=F.transform.angle);const we=!F.options.moving;return{u_matrix:O?O.posMatrix:F.transform.calculatePosMatrix(o.tileID.toUnwrapped(),we),u_image:0,u_latrange:cr(0,o.tileID),u_light:[l.paint.get("hillshade-exaggeration"),he],u_shadow:j,u_highlight:H,u_accent:ie}},Rr=(F,o)=>{const l=o.stride,O=t.H();return t.aQ(O,0,t.X,-t.X,0,0,1),t.J(O,O,[0,-t.X,0]),{u_matrix:O,u_image:1,u_dimension:[l,l],u_zoom:F.overscaledZ,u_unpack:o.getUnpackVector()}};function cr(F,o){const l=Math.pow(2,o.canonical.z),O=o.canonical.y;return[new t.Z(0,O/l).toLngLat().lat,new t.Z(0,(O+1)/l).toLngLat().lat]}const lr=(F,o,l,O)=>{const j=F.transform;return{u_matrix:fn(F,o,l,O),u_ratio:1/wt(o,1,j.zoom),u_device_pixel_ratio:F.pixelRatio,u_units_to_pixels:[1/j.pixelsToGLUnits[0],1/j.pixelsToGLUnits[1]]}},Mr=(F,o,l,O,j)=>t.e(lr(F,o,l,j),{u_image:0,u_image_height:O}),Yr=(F,o,l,O,j)=>{const H=F.transform,ie=ln(o,H);return{u_matrix:fn(F,o,l,j),u_texsize:o.imageAtlasTexture.size,u_ratio:1/wt(o,1,H.zoom),u_device_pixel_ratio:F.pixelRatio,u_image:0,u_scale:[ie,O.fromScale,O.toScale],u_fade:O.t,u_units_to_pixels:[1/H.pixelsToGLUnits[0],1/H.pixelsToGLUnits[1]]}},cn=(F,o,l,O,j,H)=>{const ie=F.transform,he=F.lineAtlas,we=ln(o,ie),Ee=l.layout.get("line-cap")==="round",De=he.getDash(O.from,Ee),qe=he.getDash(O.to,Ee),it=De.width*j.fromScale,ut=qe.width*j.toScale;return t.e(lr(F,o,l,H),{u_patternscale_a:[we/it,-De.height/2],u_patternscale_b:[we/ut,-qe.height/2],u_sdfgamma:he.width/(256*Math.min(it,ut)*F.pixelRatio)/2,u_image:0,u_tex_y_a:De.y,u_tex_y_b:qe.y,u_mix:j.t})};function ln(F,o){return 1/wt(F,1,o.tileZoom)}function fn(F,o,l,O){return F.translatePosMatrix(O?O.posMatrix:o.tileID.posMatrix,o,l.paint.get("line-translate"),l.paint.get("line-translate-anchor"))}const Mn=(F,o,l,O,j)=>{return{u_matrix:F,u_tl_parent:o,u_scale_parent:l,u_buffer_scale:1,u_fade_t:O.mix,u_opacity:O.opacity*j.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:j.paint.get("raster-brightness-min"),u_brightness_high:j.paint.get("raster-brightness-max"),u_saturation_factor:(ie=j.paint.get("raster-saturation"),ie>0?1-1/(1.001-ie):-ie),u_contrast_factor:(H=j.paint.get("raster-contrast"),H>0?1/(1-H):1+H),u_spin_weights:wn(j.paint.get("raster-hue-rotate"))};var H,ie};function wn(F){F*=Math.PI/180;const o=Math.sin(F),l=Math.cos(F);return[(2*l+1)/3,(-Math.sqrt(3)*o-l+1)/3,(Math.sqrt(3)*o-l+1)/3]}const Ln=(F,o,l,O,j,H,ie,he,we,Ee,De,qe,it,ut)=>{const ht=ie.transform;return{u_is_size_zoom_constant:+(F==="constant"||F==="source"),u_is_size_feature_constant:+(F==="constant"||F==="camera"),u_size_t:o?o.uSizeT:0,u_size:o?o.uSize:0,u_camera_to_center_distance:ht.cameraToCenterDistance,u_pitch:ht.pitch/360*2*Math.PI,u_rotate_symbol:+l,u_aspect_ratio:ht.width/ht.height,u_fade_change:ie.options.fadeDuration?ie.symbolFadeChange:1,u_matrix:he,u_label_plane_matrix:we,u_coord_matrix:Ee,u_is_text:+qe,u_pitch_with_map:+O,u_is_along_line:j,u_is_variable_anchor:H,u_texsize:it,u_texture:0,u_translation:De,u_pitched_scale:ut}},_n=(F,o,l,O,j,H,ie,he,we,Ee,De,qe,it,ut,ht)=>{const bt=ie.transform;return t.e(Ln(F,o,l,O,j,H,ie,he,we,Ee,De,qe,it,ht),{u_gamma_scale:O?Math.cos(bt._pitch)*bt.cameraToCenterDistance:1,u_device_pixel_ratio:ie.pixelRatio,u_is_halo:1})},En=(F,o,l,O,j,H,ie,he,we,Ee,De,qe,it,ut)=>t.e(_n(F,o,l,O,j,H,ie,he,we,Ee,De,!0,qe,!0,ut),{u_texsize_icon:it,u_texture_icon:1}),Bn=(F,o,l)=>({u_matrix:F,u_opacity:o,u_color:l}),oi=(F,o,l,O,j,H)=>t.e((function(ie,he,we,Ee){const De=we.imageManager.getPattern(ie.from.toString()),qe=we.imageManager.getPattern(ie.to.toString()),{width:it,height:ut}=we.imageManager.getPixelSize(),ht=Math.pow(2,Ee.tileID.overscaledZ),bt=Ee.tileSize*Math.pow(2,we.transform.tileZoom)/ht,At=bt*(Ee.tileID.canonical.x+Ee.tileID.wrap*ht),Et=bt*Ee.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:De.tl,u_pattern_br_a:De.br,u_pattern_tl_b:qe.tl,u_pattern_br_b:qe.br,u_texsize:[it,ut],u_mix:he.t,u_pattern_size_a:De.displaySize,u_pattern_size_b:qe.displaySize,u_scale_a:he.fromScale,u_scale_b:he.toScale,u_tile_units_to_pixels:1/wt(Ee,1,we.transform.tileZoom),u_pixel_coord_upper:[At>>16,Et>>16],u_pixel_coord_lower:[65535&At,65535&Et]}})(O,H,l,j),{u_matrix:F,u_opacity:o}),Yn={fillExtrusion:(F,o)=>({u_matrix:new t.aK(F,o.u_matrix),u_lightpos:new t.aO(F,o.u_lightpos),u_lightintensity:new t.aJ(F,o.u_lightintensity),u_lightcolor:new t.aO(F,o.u_lightcolor),u_vertical_gradient:new t.aJ(F,o.u_vertical_gradient),u_opacity:new t.aJ(F,o.u_opacity)}),fillExtrusionPattern:(F,o)=>({u_matrix:new t.aK(F,o.u_matrix),u_lightpos:new t.aO(F,o.u_lightpos),u_lightintensity:new t.aJ(F,o.u_lightintensity),u_lightcolor:new t.aO(F,o.u_lightcolor),u_vertical_gradient:new t.aJ(F,o.u_vertical_gradient),u_height_factor:new t.aJ(F,o.u_height_factor),u_image:new t.aI(F,o.u_image),u_texsize:new t.aP(F,o.u_texsize),u_pixel_coord_upper:new t.aP(F,o.u_pixel_coord_upper),u_pixel_coord_lower:new t.aP(F,o.u_pixel_coord_lower),u_scale:new t.aO(F,o.u_scale),u_fade:new t.aJ(F,o.u_fade),u_opacity:new t.aJ(F,o.u_opacity)}),fill:(F,o)=>({u_matrix:new t.aK(F,o.u_matrix)}),fillPattern:(F,o)=>({u_matrix:new t.aK(F,o.u_matrix),u_image:new t.aI(F,o.u_image),u_texsize:new t.aP(F,o.u_texsize),u_pixel_coord_upper:new t.aP(F,o.u_pixel_coord_upper),u_pixel_coord_lower:new t.aP(F,o.u_pixel_coord_lower),u_scale:new t.aO(F,o.u_scale),u_fade:new t.aJ(F,o.u_fade)}),fillOutline:(F,o)=>({u_matrix:new t.aK(F,o.u_matrix),u_world:new t.aP(F,o.u_world)}),fillOutlinePattern:(F,o)=>({u_matrix:new t.aK(F,o.u_matrix),u_world:new t.aP(F,o.u_world),u_image:new t.aI(F,o.u_image),u_texsize:new t.aP(F,o.u_texsize),u_pixel_coord_upper:new t.aP(F,o.u_pixel_coord_upper),u_pixel_coord_lower:new t.aP(F,o.u_pixel_coord_lower),u_scale:new t.aO(F,o.u_scale),u_fade:new t.aJ(F,o.u_fade)}),circle:(F,o)=>({u_camera_to_center_distance:new t.aJ(F,o.u_camera_to_center_distance),u_scale_with_map:new t.aI(F,o.u_scale_with_map),u_pitch_with_map:new t.aI(F,o.u_pitch_with_map),u_extrude_scale:new t.aP(F,o.u_extrude_scale),u_device_pixel_ratio:new t.aJ(F,o.u_device_pixel_ratio),u_matrix:new t.aK(F,o.u_matrix)}),collisionBox:(F,o)=>({u_matrix:new t.aK(F,o.u_matrix),u_pixel_extrude_scale:new t.aP(F,o.u_pixel_extrude_scale)}),collisionCircle:(F,o)=>({u_matrix:new t.aK(F,o.u_matrix),u_inv_matrix:new t.aK(F,o.u_inv_matrix),u_camera_to_center_distance:new t.aJ(F,o.u_camera_to_center_distance),u_viewport_size:new t.aP(F,o.u_viewport_size)}),debug:(F,o)=>({u_color:new t.aM(F,o.u_color),u_matrix:new t.aK(F,o.u_matrix),u_overlay:new t.aI(F,o.u_overlay),u_overlay_scale:new t.aJ(F,o.u_overlay_scale)}),clippingMask:(F,o)=>({u_matrix:new t.aK(F,o.u_matrix)}),heatmap:(F,o)=>({u_extrude_scale:new t.aJ(F,o.u_extrude_scale),u_intensity:new t.aJ(F,o.u_intensity),u_matrix:new t.aK(F,o.u_matrix)}),heatmapTexture:(F,o)=>({u_matrix:new t.aK(F,o.u_matrix),u_world:new t.aP(F,o.u_world),u_image:new t.aI(F,o.u_image),u_color_ramp:new t.aI(F,o.u_color_ramp),u_opacity:new t.aJ(F,o.u_opacity)}),hillshade:(F,o)=>({u_matrix:new t.aK(F,o.u_matrix),u_image:new t.aI(F,o.u_image),u_latrange:new t.aP(F,o.u_latrange),u_light:new t.aP(F,o.u_light),u_shadow:new t.aM(F,o.u_shadow),u_highlight:new t.aM(F,o.u_highlight),u_accent:new t.aM(F,o.u_accent)}),hillshadePrepare:(F,o)=>({u_matrix:new t.aK(F,o.u_matrix),u_image:new t.aI(F,o.u_image),u_dimension:new t.aP(F,o.u_dimension),u_zoom:new t.aJ(F,o.u_zoom),u_unpack:new t.aL(F,o.u_unpack)}),line:(F,o)=>({u_matrix:new t.aK(F,o.u_matrix),u_ratio:new t.aJ(F,o.u_ratio),u_device_pixel_ratio:new t.aJ(F,o.u_device_pixel_ratio),u_units_to_pixels:new t.aP(F,o.u_units_to_pixels)}),lineGradient:(F,o)=>({u_matrix:new t.aK(F,o.u_matrix),u_ratio:new t.aJ(F,o.u_ratio),u_device_pixel_ratio:new t.aJ(F,o.u_device_pixel_ratio),u_units_to_pixels:new t.aP(F,o.u_units_to_pixels),u_image:new t.aI(F,o.u_image),u_image_height:new t.aJ(F,o.u_image_height)}),linePattern:(F,o)=>({u_matrix:new t.aK(F,o.u_matrix),u_texsize:new t.aP(F,o.u_texsize),u_ratio:new t.aJ(F,o.u_ratio),u_device_pixel_ratio:new t.aJ(F,o.u_device_pixel_ratio),u_image:new t.aI(F,o.u_image),u_units_to_pixels:new t.aP(F,o.u_units_to_pixels),u_scale:new t.aO(F,o.u_scale),u_fade:new t.aJ(F,o.u_fade)}),lineSDF:(F,o)=>({u_matrix:new t.aK(F,o.u_matrix),u_ratio:new t.aJ(F,o.u_ratio),u_device_pixel_ratio:new t.aJ(F,o.u_device_pixel_ratio),u_units_to_pixels:new t.aP(F,o.u_units_to_pixels),u_patternscale_a:new t.aP(F,o.u_patternscale_a),u_patternscale_b:new t.aP(F,o.u_patternscale_b),u_sdfgamma:new t.aJ(F,o.u_sdfgamma),u_image:new t.aI(F,o.u_image),u_tex_y_a:new t.aJ(F,o.u_tex_y_a),u_tex_y_b:new t.aJ(F,o.u_tex_y_b),u_mix:new t.aJ(F,o.u_mix)}),raster:(F,o)=>({u_matrix:new t.aK(F,o.u_matrix),u_tl_parent:new t.aP(F,o.u_tl_parent),u_scale_parent:new t.aJ(F,o.u_scale_parent),u_buffer_scale:new t.aJ(F,o.u_buffer_scale),u_fade_t:new t.aJ(F,o.u_fade_t),u_opacity:new t.aJ(F,o.u_opacity),u_image0:new t.aI(F,o.u_image0),u_image1:new t.aI(F,o.u_image1),u_brightness_low:new t.aJ(F,o.u_brightness_low),u_brightness_high:new t.aJ(F,o.u_brightness_high),u_saturation_factor:new t.aJ(F,o.u_saturation_factor),u_contrast_factor:new t.aJ(F,o.u_contrast_factor),u_spin_weights:new t.aO(F,o.u_spin_weights)}),symbolIcon:(F,o)=>({u_is_size_zoom_constant:new t.aI(F,o.u_is_size_zoom_constant),u_is_size_feature_constant:new t.aI(F,o.u_is_size_feature_constant),u_size_t:new t.aJ(F,o.u_size_t),u_size:new t.aJ(F,o.u_size),u_camera_to_center_distance:new t.aJ(F,o.u_camera_to_center_distance),u_pitch:new t.aJ(F,o.u_pitch),u_rotate_symbol:new t.aI(F,o.u_rotate_symbol),u_aspect_ratio:new t.aJ(F,o.u_aspect_ratio),u_fade_change:new t.aJ(F,o.u_fade_change),u_matrix:new t.aK(F,o.u_matrix),u_label_plane_matrix:new t.aK(F,o.u_label_plane_matrix),u_coord_matrix:new t.aK(F,o.u_coord_matrix),u_is_text:new t.aI(F,o.u_is_text),u_pitch_with_map:new t.aI(F,o.u_pitch_with_map),u_is_along_line:new t.aI(F,o.u_is_along_line),u_is_variable_anchor:new t.aI(F,o.u_is_variable_anchor),u_texsize:new t.aP(F,o.u_texsize),u_texture:new t.aI(F,o.u_texture),u_translation:new t.aP(F,o.u_translation),u_pitched_scale:new t.aJ(F,o.u_pitched_scale)}),symbolSDF:(F,o)=>({u_is_size_zoom_constant:new t.aI(F,o.u_is_size_zoom_constant),u_is_size_feature_constant:new t.aI(F,o.u_is_size_feature_constant),u_size_t:new t.aJ(F,o.u_size_t),u_size:new t.aJ(F,o.u_size),u_camera_to_center_distance:new t.aJ(F,o.u_camera_to_center_distance),u_pitch:new t.aJ(F,o.u_pitch),u_rotate_symbol:new t.aI(F,o.u_rotate_symbol),u_aspect_ratio:new t.aJ(F,o.u_aspect_ratio),u_fade_change:new t.aJ(F,o.u_fade_change),u_matrix:new t.aK(F,o.u_matrix),u_label_plane_matrix:new t.aK(F,o.u_label_plane_matrix),u_coord_matrix:new t.aK(F,o.u_coord_matrix),u_is_text:new t.aI(F,o.u_is_text),u_pitch_with_map:new t.aI(F,o.u_pitch_with_map),u_is_along_line:new t.aI(F,o.u_is_along_line),u_is_variable_anchor:new t.aI(F,o.u_is_variable_anchor),u_texsize:new t.aP(F,o.u_texsize),u_texture:new t.aI(F,o.u_texture),u_gamma_scale:new t.aJ(F,o.u_gamma_scale),u_device_pixel_ratio:new t.aJ(F,o.u_device_pixel_ratio),u_is_halo:new t.aI(F,o.u_is_halo),u_translation:new t.aP(F,o.u_translation),u_pitched_scale:new t.aJ(F,o.u_pitched_scale)}),symbolTextAndIcon:(F,o)=>({u_is_size_zoom_constant:new t.aI(F,o.u_is_size_zoom_constant),u_is_size_feature_constant:new t.aI(F,o.u_is_size_feature_constant),u_size_t:new t.aJ(F,o.u_size_t),u_size:new t.aJ(F,o.u_size),u_camera_to_center_distance:new t.aJ(F,o.u_camera_to_center_distance),u_pitch:new t.aJ(F,o.u_pitch),u_rotate_symbol:new t.aI(F,o.u_rotate_symbol),u_aspect_ratio:new t.aJ(F,o.u_aspect_ratio),u_fade_change:new t.aJ(F,o.u_fade_change),u_matrix:new t.aK(F,o.u_matrix),u_label_plane_matrix:new t.aK(F,o.u_label_plane_matrix),u_coord_matrix:new t.aK(F,o.u_coord_matrix),u_is_text:new t.aI(F,o.u_is_text),u_pitch_with_map:new t.aI(F,o.u_pitch_with_map),u_is_along_line:new t.aI(F,o.u_is_along_line),u_is_variable_anchor:new t.aI(F,o.u_is_variable_anchor),u_texsize:new t.aP(F,o.u_texsize),u_texsize_icon:new t.aP(F,o.u_texsize_icon),u_texture:new t.aI(F,o.u_texture),u_texture_icon:new t.aI(F,o.u_texture_icon),u_gamma_scale:new t.aJ(F,o.u_gamma_scale),u_device_pixel_ratio:new t.aJ(F,o.u_device_pixel_ratio),u_is_halo:new t.aI(F,o.u_is_halo),u_translation:new t.aP(F,o.u_translation),u_pitched_scale:new t.aJ(F,o.u_pitched_scale)}),background:(F,o)=>({u_matrix:new t.aK(F,o.u_matrix),u_opacity:new t.aJ(F,o.u_opacity),u_color:new t.aM(F,o.u_color)}),backgroundPattern:(F,o)=>({u_matrix:new t.aK(F,o.u_matrix),u_opacity:new t.aJ(F,o.u_opacity),u_image:new t.aI(F,o.u_image),u_pattern_tl_a:new t.aP(F,o.u_pattern_tl_a),u_pattern_br_a:new t.aP(F,o.u_pattern_br_a),u_pattern_tl_b:new t.aP(F,o.u_pattern_tl_b),u_pattern_br_b:new t.aP(F,o.u_pattern_br_b),u_texsize:new t.aP(F,o.u_texsize),u_mix:new t.aJ(F,o.u_mix),u_pattern_size_a:new t.aP(F,o.u_pattern_size_a),u_pattern_size_b:new t.aP(F,o.u_pattern_size_b),u_scale_a:new t.aJ(F,o.u_scale_a),u_scale_b:new t.aJ(F,o.u_scale_b),u_pixel_coord_upper:new t.aP(F,o.u_pixel_coord_upper),u_pixel_coord_lower:new t.aP(F,o.u_pixel_coord_lower),u_tile_units_to_pixels:new t.aJ(F,o.u_tile_units_to_pixels)}),terrain:(F,o)=>({u_matrix:new t.aK(F,o.u_matrix),u_texture:new t.aI(F,o.u_texture),u_ele_delta:new t.aJ(F,o.u_ele_delta),u_fog_matrix:new t.aK(F,o.u_fog_matrix),u_fog_color:new t.aM(F,o.u_fog_color),u_fog_ground_blend:new t.aJ(F,o.u_fog_ground_blend),u_fog_ground_blend_opacity:new t.aJ(F,o.u_fog_ground_blend_opacity),u_horizon_color:new t.aM(F,o.u_horizon_color),u_horizon_fog_blend:new t.aJ(F,o.u_horizon_fog_blend)}),terrainDepth:(F,o)=>({u_matrix:new t.aK(F,o.u_matrix),u_ele_delta:new t.aJ(F,o.u_ele_delta)}),terrainCoords:(F,o)=>({u_matrix:new t.aK(F,o.u_matrix),u_texture:new t.aI(F,o.u_texture),u_terrain_coords_id:new t.aJ(F,o.u_terrain_coords_id),u_ele_delta:new t.aJ(F,o.u_ele_delta)}),sky:(F,o)=>({u_sky_color:new t.aM(F,o.u_sky_color),u_horizon_color:new t.aM(F,o.u_horizon_color),u_horizon:new t.aJ(F,o.u_horizon),u_sky_horizon_blend:new t.aJ(F,o.u_sky_horizon_blend)})};class Pn{constructor(o,l,O){this.context=o;const j=o.gl;this.buffer=j.createBuffer(),this.dynamicDraw=!!O,this.context.unbindVAO(),o.bindElementBuffer.set(this.buffer),j.bufferData(j.ELEMENT_ARRAY_BUFFER,l.arrayBuffer,this.dynamicDraw?j.DYNAMIC_DRAW:j.STATIC_DRAW),this.dynamicDraw||delete l.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(o){const l=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),l.bufferSubData(l.ELEMENT_ARRAY_BUFFER,0,o.arrayBuffer)}destroy(){const o=this.context.gl;this.buffer&&(o.deleteBuffer(this.buffer),delete this.buffer)}}const ei={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class bi{constructor(o,l,O,j){this.length=l.length,this.attributes=O,this.itemSize=l.bytesPerElement,this.dynamicDraw=j,this.context=o;const H=o.gl;this.buffer=H.createBuffer(),o.bindVertexBuffer.set(this.buffer),H.bufferData(H.ARRAY_BUFFER,l.arrayBuffer,this.dynamicDraw?H.DYNAMIC_DRAW:H.STATIC_DRAW),this.dynamicDraw||delete l.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(o){if(o.length!==this.length)throw new Error(`Length of new data is ${o.length}, which doesn't match current length of ${this.length}`);const l=this.context.gl;this.bind(),l.bufferSubData(l.ARRAY_BUFFER,0,o.arrayBuffer)}enableAttributes(o,l){for(let O=0;O<this.attributes.length;O++){const j=this.attributes[O],H=l.attributes[j.name];H!==void 0&&o.enableVertexAttribArray(H)}}setVertexAttribPointers(o,l,O){for(let j=0;j<this.attributes.length;j++){const H=this.attributes[j],ie=l.attributes[H.name];ie!==void 0&&o.vertexAttribPointer(ie,H.components,o[ei[H.type]],!1,this.itemSize,H.offset+this.itemSize*(O||0))}}destroy(){const o=this.context.gl;this.buffer&&(o.deleteBuffer(this.buffer),delete this.buffer)}}const Mi=new WeakMap;function _a(F){var o;if(Mi.has(F))return Mi.get(F);{const l=(o=F.getParameter(F.VERSION))===null||o===void 0?void 0:o.startsWith("WebGL 2.0");return Mi.set(F,l),l}}class Li{constructor(o){this.gl=o.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(o){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class po extends Li{getDefault(){return t.aN.transparent}set(o){const l=this.current;(o.r!==l.r||o.g!==l.g||o.b!==l.b||o.a!==l.a||this.dirty)&&(this.gl.clearColor(o.r,o.g,o.b,o.a),this.current=o,this.dirty=!1)}}class Sa extends Li{getDefault(){return 1}set(o){(o!==this.current||this.dirty)&&(this.gl.clearDepth(o),this.current=o,this.dirty=!1)}}class Ua extends Li{getDefault(){return 0}set(o){(o!==this.current||this.dirty)&&(this.gl.clearStencil(o),this.current=o,this.dirty=!1)}}class Go extends Li{getDefault(){return[!0,!0,!0,!0]}set(o){const l=this.current;(o[0]!==l[0]||o[1]!==l[1]||o[2]!==l[2]||o[3]!==l[3]||this.dirty)&&(this.gl.colorMask(o[0],o[1],o[2],o[3]),this.current=o,this.dirty=!1)}}class Ni extends Li{getDefault(){return!0}set(o){(o!==this.current||this.dirty)&&(this.gl.depthMask(o),this.current=o,this.dirty=!1)}}class ro extends Li{getDefault(){return 255}set(o){(o!==this.current||this.dirty)&&(this.gl.stencilMask(o),this.current=o,this.dirty=!1)}}class Ts extends Li{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(o){const l=this.current;(o.func!==l.func||o.ref!==l.ref||o.mask!==l.mask||this.dirty)&&(this.gl.stencilFunc(o.func,o.ref,o.mask),this.current=o,this.dirty=!1)}}class $a extends Li{getDefault(){const o=this.gl;return[o.KEEP,o.KEEP,o.KEEP]}set(o){const l=this.current;(o[0]!==l[0]||o[1]!==l[1]||o[2]!==l[2]||this.dirty)&&(this.gl.stencilOp(o[0],o[1],o[2]),this.current=o,this.dirty=!1)}}class bl extends Li{getDefault(){return!1}set(o){if(o===this.current&&!this.dirty)return;const l=this.gl;o?l.enable(l.STENCIL_TEST):l.disable(l.STENCIL_TEST),this.current=o,this.dirty=!1}}class ds extends Li{getDefault(){return[0,1]}set(o){const l=this.current;(o[0]!==l[0]||o[1]!==l[1]||this.dirty)&&(this.gl.depthRange(o[0],o[1]),this.current=o,this.dirty=!1)}}class Mo extends Li{getDefault(){return!1}set(o){if(o===this.current&&!this.dirty)return;const l=this.gl;o?l.enable(l.DEPTH_TEST):l.disable(l.DEPTH_TEST),this.current=o,this.dirty=!1}}class _l extends Li{getDefault(){return this.gl.LESS}set(o){(o!==this.current||this.dirty)&&(this.gl.depthFunc(o),this.current=o,this.dirty=!1)}}class wl extends Li{getDefault(){return!1}set(o){if(o===this.current&&!this.dirty)return;const l=this.gl;o?l.enable(l.BLEND):l.disable(l.BLEND),this.current=o,this.dirty=!1}}class jl extends Li{getDefault(){const o=this.gl;return[o.ONE,o.ZERO]}set(o){const l=this.current;(o[0]!==l[0]||o[1]!==l[1]||this.dirty)&&(this.gl.blendFunc(o[0],o[1]),this.current=o,this.dirty=!1)}}class Ho extends Li{getDefault(){return t.aN.transparent}set(o){const l=this.current;(o.r!==l.r||o.g!==l.g||o.b!==l.b||o.a!==l.a||this.dirty)&&(this.gl.blendColor(o.r,o.g,o.b,o.a),this.current=o,this.dirty=!1)}}class nl extends Li{getDefault(){return this.gl.FUNC_ADD}set(o){(o!==this.current||this.dirty)&&(this.gl.blendEquation(o),this.current=o,this.dirty=!1)}}class ps extends Li{getDefault(){return!1}set(o){if(o===this.current&&!this.dirty)return;const l=this.gl;o?l.enable(l.CULL_FACE):l.disable(l.CULL_FACE),this.current=o,this.dirty=!1}}class Ca extends Li{getDefault(){return this.gl.BACK}set(o){(o!==this.current||this.dirty)&&(this.gl.cullFace(o),this.current=o,this.dirty=!1)}}class ho extends Li{getDefault(){return this.gl.CCW}set(o){(o!==this.current||this.dirty)&&(this.gl.frontFace(o),this.current=o,this.dirty=!1)}}class Tl extends Li{getDefault(){return null}set(o){(o!==this.current||this.dirty)&&(this.gl.useProgram(o),this.current=o,this.dirty=!1)}}class il extends Li{getDefault(){return this.gl.TEXTURE0}set(o){(o!==this.current||this.dirty)&&(this.gl.activeTexture(o),this.current=o,this.dirty=!1)}}class Us extends Li{getDefault(){const o=this.gl;return[0,0,o.drawingBufferWidth,o.drawingBufferHeight]}set(o){const l=this.current;(o[0]!==l[0]||o[1]!==l[1]||o[2]!==l[2]||o[3]!==l[3]||this.dirty)&&(this.gl.viewport(o[0],o[1],o[2],o[3]),this.current=o,this.dirty=!1)}}class kl extends Li{getDefault(){return null}set(o){if(o===this.current&&!this.dirty)return;const l=this.gl;l.bindFramebuffer(l.FRAMEBUFFER,o),this.current=o,this.dirty=!1}}class qs extends Li{getDefault(){return null}set(o){if(o===this.current&&!this.dirty)return;const l=this.gl;l.bindRenderbuffer(l.RENDERBUFFER,o),this.current=o,this.dirty=!1}}class Sl extends Li{getDefault(){return null}set(o){if(o===this.current&&!this.dirty)return;const l=this.gl;l.bindTexture(l.TEXTURE_2D,o),this.current=o,this.dirty=!1}}class Cl extends Li{getDefault(){return null}set(o){if(o===this.current&&!this.dirty)return;const l=this.gl;l.bindBuffer(l.ARRAY_BUFFER,o),this.current=o,this.dirty=!1}}class al extends Li{getDefault(){return null}set(o){const l=this.gl;l.bindBuffer(l.ELEMENT_ARRAY_BUFFER,o),this.current=o,this.dirty=!1}}class Ao extends Li{getDefault(){return null}set(o){var l;if(o===this.current&&!this.dirty)return;const O=this.gl;_a(O)?O.bindVertexArray(o):(l=O.getExtension("OES_vertex_array_object"))===null||l===void 0||l.bindVertexArrayOES(o),this.current=o,this.dirty=!1}}class qc extends Li{getDefault(){return 4}set(o){if(o===this.current&&!this.dirty)return;const l=this.gl;l.pixelStorei(l.UNPACK_ALIGNMENT,o),this.current=o,this.dirty=!1}}class Nc extends Li{getDefault(){return!1}set(o){if(o===this.current&&!this.dirty)return;const l=this.gl;l.pixelStorei(l.UNPACK_PREMULTIPLY_ALPHA_WEBGL,o),this.current=o,this.dirty=!1}}class Ul extends Li{getDefault(){return!1}set(o){if(o===this.current&&!this.dirty)return;const l=this.gl;l.pixelStorei(l.UNPACK_FLIP_Y_WEBGL,o),this.current=o,this.dirty=!1}}class Wc extends Li{constructor(o,l){super(o),this.context=o,this.parent=l}getDefault(){return null}}class gu extends Wc{setDirty(){this.dirty=!0}set(o){if(o===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const l=this.gl;l.framebufferTexture2D(l.FRAMEBUFFER,l.COLOR_ATTACHMENT0,l.TEXTURE_2D,o,0),this.current=o,this.dirty=!1}}class ks extends Wc{set(o){if(o===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const l=this.gl;l.framebufferRenderbuffer(l.FRAMEBUFFER,l.DEPTH_ATTACHMENT,l.RENDERBUFFER,o),this.current=o,this.dirty=!1}}class yu extends Wc{set(o){if(o===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const l=this.gl;l.framebufferRenderbuffer(l.FRAMEBUFFER,l.DEPTH_STENCIL_ATTACHMENT,l.RENDERBUFFER,o),this.current=o,this.dirty=!1}}class td{constructor(o,l,O,j,H){this.context=o,this.width=l,this.height=O;const ie=o.gl,he=this.framebuffer=ie.createFramebuffer();if(this.colorAttachment=new gu(o,he),j)this.depthAttachment=H?new yu(o,he):new ks(o,he);else if(H)throw new Error("Stencil cannot be set without depth");if(ie.checkFramebufferStatus(ie.FRAMEBUFFER)!==ie.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer is not complete")}destroy(){const o=this.context.gl,l=this.colorAttachment.get();if(l&&o.deleteTexture(l),this.depthAttachment){const O=this.depthAttachment.get();O&&o.deleteRenderbuffer(O)}o.deleteFramebuffer(this.framebuffer)}}class no{constructor(o,l,O){this.blendFunction=o,this.blendColor=l,this.mask=O}}no.Replace=[1,0],no.disabled=new no(no.Replace,t.aN.transparent,[!1,!1,!1,!1]),no.unblended=new no(no.Replace,t.aN.transparent,[!0,!0,!0,!0]),no.alphaBlended=new no([1,771],t.aN.transparent,[!0,!0,!0,!0]);class hc{constructor(o){var l,O;if(this.gl=o,this.clearColor=new po(this),this.clearDepth=new Sa(this),this.clearStencil=new Ua(this),this.colorMask=new Go(this),this.depthMask=new Ni(this),this.stencilMask=new ro(this),this.stencilFunc=new Ts(this),this.stencilOp=new $a(this),this.stencilTest=new bl(this),this.depthRange=new ds(this),this.depthTest=new Mo(this),this.depthFunc=new _l(this),this.blend=new wl(this),this.blendFunc=new jl(this),this.blendColor=new Ho(this),this.blendEquation=new nl(this),this.cullFace=new ps(this),this.cullFaceSide=new Ca(this),this.frontFace=new ho(this),this.program=new Tl(this),this.activeTexture=new il(this),this.viewport=new Us(this),this.bindFramebuffer=new kl(this),this.bindRenderbuffer=new qs(this),this.bindTexture=new Sl(this),this.bindVertexBuffer=new Cl(this),this.bindElementBuffer=new al(this),this.bindVertexArray=new Ao(this),this.pixelStoreUnpack=new qc(this),this.pixelStoreUnpackPremultiplyAlpha=new Nc(this),this.pixelStoreUnpackFlipY=new Ul(this),this.extTextureFilterAnisotropic=o.getExtension("EXT_texture_filter_anisotropic")||o.getExtension("MOZ_EXT_texture_filter_anisotropic")||o.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=o.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=o.getParameter(o.MAX_TEXTURE_SIZE),_a(o)){this.HALF_FLOAT=o.HALF_FLOAT;const j=o.getExtension("EXT_color_buffer_half_float");this.RGBA16F=(l=o.RGBA16F)!==null&&l!==void 0?l:j==null?void 0:j.RGBA16F_EXT,this.RGB16F=(O=o.RGB16F)!==null&&O!==void 0?O:j==null?void 0:j.RGB16F_EXT,o.getExtension("EXT_color_buffer_float")}else{o.getExtension("EXT_color_buffer_half_float"),o.getExtension("OES_texture_half_float_linear");const j=o.getExtension("OES_texture_half_float");this.HALF_FLOAT=j==null?void 0:j.HALF_FLOAT_OES}}setDefault(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}setDirty(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.bindVertexArray.dirty=!0,this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0}createIndexBuffer(o,l){return new Pn(this,o,l)}createVertexBuffer(o,l,O){return new bi(this,o,l,O)}createRenderbuffer(o,l,O){const j=this.gl,H=j.createRenderbuffer();return this.bindRenderbuffer.set(H),j.renderbufferStorage(j.RENDERBUFFER,o,l,O),this.bindRenderbuffer.set(null),H}createFramebuffer(o,l,O,j){return new td(this,o,l,O,j)}clear({color:o,depth:l,stencil:O}){const j=this.gl;let H=0;o&&(H|=j.COLOR_BUFFER_BIT,this.clearColor.set(o),this.colorMask.set([!0,!0,!0,!0])),l!==void 0&&(H|=j.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(l),this.depthMask.set(!0)),O!==void 0&&(H|=j.STENCIL_BUFFER_BIT,this.clearStencil.set(O),this.stencilMask.set(255)),j.clear(H)}setCullFace(o){o.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(o.mode),this.frontFace.set(o.frontFace))}setDepthMode(o){o.func!==this.gl.ALWAYS||o.mask?(this.depthTest.set(!0),this.depthFunc.set(o.func),this.depthMask.set(o.mask),this.depthRange.set(o.range)):this.depthTest.set(!1)}setStencilMode(o){o.test.func!==this.gl.ALWAYS||o.mask?(this.stencilTest.set(!0),this.stencilMask.set(o.mask),this.stencilOp.set([o.fail,o.depthFail,o.pass]),this.stencilFunc.set({func:o.test.func,ref:o.ref,mask:o.test.mask})):this.stencilTest.set(!1)}setColorMode(o){t.aF(o.blendFunction,no.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(o.blendFunction),this.blendColor.set(o.blendColor)),this.colorMask.set(o.mask)}createVertexArray(){var o;return _a(this.gl)?this.gl.createVertexArray():(o=this.gl.getExtension("OES_vertex_array_object"))===null||o===void 0?void 0:o.createVertexArrayOES()}deleteVertexArray(o){var l;return _a(this.gl)?this.gl.deleteVertexArray(o):(l=this.gl.getExtension("OES_vertex_array_object"))===null||l===void 0?void 0:l.deleteVertexArrayOES(o)}unbindVAO(){this.bindVertexArray.set(null)}}class Ui{constructor(o,l,O){this.func=o,this.mask=l,this.range=O}}Ui.ReadOnly=!1,Ui.ReadWrite=!0,Ui.disabled=new Ui(519,Ui.ReadOnly,[0,1]);const ql=7680;class wa{constructor(o,l,O,j,H,ie){this.test=o,this.ref=l,this.mask=O,this.fail=j,this.depthFail=H,this.pass=ie}}wa.disabled=new wa({func:519,mask:0},0,0,ql,ql,ql);class Ta{constructor(o,l,O){this.enable=o,this.mode=l,this.frontFace=O}}let Ss;function rs(F,o,l,O,j){const H=F.context,ie=H.gl,he=F.useProgram("collisionBox"),we=[];let Ee=0,De=0;for(let At=0;At<O.length;At++){const Et=O[At],Ut=o.getTile(Et).getBucket(l);if(!Ut)continue;const Mt=j?Ut.textCollisionBox:Ut.iconCollisionBox,Xt=Ut.collisionCircleArray;if(Xt.length>0){const Qt=t.H();t.aR(Qt,Ut.placementInvProjMatrix,F.transform.glCoordMatrix),t.aR(Qt,Qt,Ut.placementViewportMatrix),we.push({circleArray:Xt,circleOffset:De,transform:Et.posMatrix,invTransform:Qt,coord:Et}),Ee+=Xt.length/4,De=Ee}Mt&&he.draw(H,ie.LINES,Ui.disabled,wa.disabled,F.colorModeForRenderPass(),Ta.disabled,tr(F.transform,Et.posMatrix),F.style.map.terrain&&F.style.map.terrain.getTerrainData(Et),l.id,Mt.layoutVertexBuffer,Mt.indexBuffer,Mt.segments,null,F.transform.zoom,null,null,Mt.collisionVertexBuffer)}if(!j||!we.length)return;const qe=F.useProgram("collisionCircle"),it=new t.aS;it.resize(4*Ee),it._trim();let ut=0;for(const At of we)for(let Et=0;Et<At.circleArray.length/4;Et++){const Ut=4*Et,Mt=At.circleArray[Ut+0],Xt=At.circleArray[Ut+1],Qt=At.circleArray[Ut+2],Zt=At.circleArray[Ut+3];it.emplace(ut++,Mt,Xt,Qt,Zt,0),it.emplace(ut++,Mt,Xt,Qt,Zt,1),it.emplace(ut++,Mt,Xt,Qt,Zt,2),it.emplace(ut++,Mt,Xt,Qt,Zt,3)}(!Ss||Ss.length<2*Ee)&&(Ss=(function(At){const Et=2*At,Ut=new t.aU;Ut.resize(Et),Ut._trim();for(let Mt=0;Mt<Et;Mt++){const Xt=6*Mt;Ut.uint16[Xt+0]=4*Mt+0,Ut.uint16[Xt+1]=4*Mt+1,Ut.uint16[Xt+2]=4*Mt+2,Ut.uint16[Xt+3]=4*Mt+2,Ut.uint16[Xt+4]=4*Mt+3,Ut.uint16[Xt+5]=4*Mt+0}return Ut})(Ee));const ht=H.createIndexBuffer(Ss,!0),bt=H.createVertexBuffer(it,t.aT.members,!0);for(const At of we){const Et=or(At.transform,At.invTransform,F.transform);qe.draw(H,ie.TRIANGLES,Ui.disabled,wa.disabled,F.colorModeForRenderPass(),Ta.disabled,Et,F.style.map.terrain&&F.style.map.terrain.getTerrainData(At.coord),l.id,bt,ht,t.a0.simpleSegment(0,2*At.circleOffset,At.circleArray.length,At.circleArray.length/2),null,F.transform.zoom,null,null,null)}bt.destroy(),ht.destroy()}Ta.disabled=new Ta(!1,1029,2305),Ta.backCCW=new Ta(!0,1029,2305);const fc=t.ao(new Float32Array(16));function El(F,o,l,O,j){if(F.renderPass!=="translucent")return;const H=wa.disabled,ie=F.colorModeForRenderPass();(l._unevaluatedLayout.hasValue("text-variable-anchor")||l._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&(function(he,we,Ee,De,qe,it,ut,ht,bt){const At=we.transform,Et=Er(),Ut=qe==="map",Mt=it==="map";for(const Xt of he){const Qt=De.getTile(Xt),Zt=Qt.getBucket(Ee);if(!Zt||!Zt.text||!Zt.text.segments.get().length)continue;const pr=Zt.textSizeData,Tr=t.ah(pr,At.zoom),Br=wt(Qt,1,we.transform.zoom),Dr=Nt(Xt.posMatrix,Mt,Ut,we.transform,Br),Gr=Ee.layout.get("icon-text-fit")!=="none"&&Zt.hasIconData();if(Tr){const Zr=Math.pow(2,At.zoom-Qt.tileID.overscaledZ),vn=we.style.map.terrain?(bn,on)=>we.style.map.terrain.getElevation(Xt,bn,on):null,$r=Et.translatePosition(At,Qt,ut,ht);bo(Zt,Ut,Mt,bt,At,Dr,Xt.posMatrix,Zr,Tr,Gr,Et,$r,Xt.toUnwrapped(),vn)}}})(O,F,l,o,l.layout.get("text-rotation-alignment"),l.layout.get("text-pitch-alignment"),l.paint.get("text-translate"),l.paint.get("text-translate-anchor"),j),l.paint.get("icon-opacity").constantOr(1)!==0&&tc(F,o,l,O,!1,l.paint.get("icon-translate"),l.paint.get("icon-translate-anchor"),l.layout.get("icon-rotation-alignment"),l.layout.get("icon-pitch-alignment"),l.layout.get("icon-keep-upright"),H,ie),l.paint.get("text-opacity").constantOr(1)!==0&&tc(F,o,l,O,!0,l.paint.get("text-translate"),l.paint.get("text-translate-anchor"),l.layout.get("text-rotation-alignment"),l.layout.get("text-pitch-alignment"),l.layout.get("text-keep-upright"),H,ie),o.map.showCollisionBoxes&&(rs(F,o,l,O,!0),rs(F,o,l,O,!1))}function ns(F,o,l,O,j,H){const{horizontalAlign:ie,verticalAlign:he}=t.av(F),we=-(ie-.5)*o,Ee=-(he-.5)*l;return new t.P((we/j+O[0])*H,(Ee/j+O[1])*H)}function hs(F,o,l,O,j,H){const ie=o.tileAnchorPoint.add(new t.P(o.translation[0],o.translation[1]));if(o.pitchWithMap){let he=O.mult(H);return l||(he=he.rotate(-j)),Dt(ie.add(he),o.labelPlaneMatrix,o.getElevation).point}if(l){const he=Je(o.tileAnchorPoint.x+1,o.tileAnchorPoint.y,o).point.sub(F),we=Math.atan(he.y/he.x)+(he.x<0?Math.PI:0);return F.add(O.rotate(we))}return F.add(O)}function bo(F,o,l,O,j,H,ie,he,we,Ee,De,qe,it,ut){const ht=F.text.placedSymbolArray,bt=F.text.dynamicLayoutVertexArray,At=F.icon.dynamicLayoutVertexArray,Et={};bt.clear();for(let Ut=0;Ut<ht.length;Ut++){const Mt=ht.get(Ut),Xt=F.allowVerticalPlacement&&!Mt.placedOrientation,Qt=Mt.hidden||!Mt.crossTileID||Xt?null:O[Mt.crossTileID];if(Qt){const Zt=new t.P(Mt.anchorX,Mt.anchorY),pr={getElevation:ut,width:j.width,height:j.height,labelPlaneMatrix:H,pitchWithMap:l,projection:De,tileAnchorPoint:Zt,translation:qe,unwrappedTileID:it},Tr=l?Dt(Zt,ie,ut):Je(Zt.x,Zt.y,pr),Br=at(j.cameraToCenterDistance,Tr.signedDistanceFromCamera);let Dr=t.aj(F.textSizeData,we,Mt)*Br/t.aq;l&&(Dr*=F.tilePixelRatio/he);const{width:Gr,height:Zr,anchor:vn,textOffset:$r,textBoxScale:bn}=Qt,on=ns(vn,Gr,Zr,$r,bn,Dr),Sn=De.getPitchedTextCorrection(j,Zt.add(new t.P(qe[0],qe[1])),it),mn=hs(Tr.point,pr,o,on,j.angle,Sn),Rn=F.allowVerticalPlacement&&Mt.placedOrientation===t.ai.vertical?Math.PI/2:0;for(let ri=0;ri<Mt.numGlyphs;ri++)t.ak(bt,mn,Rn);Ee&&Mt.associatedIconIndex>=0&&(Et[Mt.associatedIconIndex]={shiftedAnchor:mn,angle:Rn})}else Lt(Mt.numGlyphs,bt)}if(Ee){At.clear();const Ut=F.icon.placedSymbolArray;for(let Mt=0;Mt<Ut.length;Mt++){const Xt=Ut.get(Mt);if(Xt.hidden)Lt(Xt.numGlyphs,At);else{const Qt=Et[Mt];if(Qt)for(let Zt=0;Zt<Xt.numGlyphs;Zt++)t.ak(At,Qt.shiftedAnchor,Qt.angle);else Lt(Xt.numGlyphs,At)}}F.icon.dynamicLayoutVertexBuffer.updateData(At)}F.text.dynamicLayoutVertexBuffer.updateData(bt)}function Xi(F,o,l){return l.iconsInText&&o?"symbolTextAndIcon":F?"symbolSDF":"symbolIcon"}function tc(F,o,l,O,j,H,ie,he,we,Ee,De,qe){const it=F.context,ut=it.gl,ht=F.transform,bt=Er(),At=he==="map",Et=we==="map",Ut=he!=="viewport"&&l.layout.get("symbol-placement")!=="point",Mt=At&&!Et&&!Ut,Xt=!Et&&Ut,Qt=!l.layout.get("symbol-sort-key").isConstant();let Zt=!1;const pr=F.depthModeForSublayer(0,Ui.ReadOnly),Tr=l._unevaluatedLayout.hasValue("text-variable-anchor")||l._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Br=[],Dr=bt.getCircleRadiusCorrection(ht);for(const Gr of O){const Zr=o.getTile(Gr),vn=Zr.getBucket(l);if(!vn)continue;const $r=j?vn.text:vn.icon;if(!$r||!$r.segments.get().length||!$r.hasVisibleVertices)continue;const bn=$r.programConfigurations.get(l.id),on=j||vn.sdfIcons,Sn=j?vn.textSizeData:vn.iconSizeData,mn=Et||ht.pitch!==0,Rn=F.useProgram(Xi(on,j,vn),bn),ri=t.ah(Sn,ht.zoom),An=F.style.map.terrain&&F.style.map.terrain.getTerrainData(Gr);let $n,di,Pi,Si,Di=[0,0],zi=null;if(j){if(di=Zr.glyphAtlasTexture,Pi=ut.LINEAR,$n=Zr.glyphAtlasTexture.size,vn.iconsInText){Di=Zr.imageAtlasTexture.size,zi=Zr.imageAtlasTexture;const Oi=Sn.kind==="composite"||Sn.kind==="camera";Si=mn||F.options.rotating||F.options.zooming||Oi?ut.LINEAR:ut.NEAREST}}else{const Oi=l.layout.get("icon-size").constantOr(0)!==1||vn.iconsNeedLinear;di=Zr.imageAtlasTexture,Pi=on||F.options.rotating||F.options.zooming||Oi||mn?ut.LINEAR:ut.NEAREST,$n=Zr.imageAtlasTexture.size}const qi=wt(Zr,1,F.transform.zoom),ta=Xt?Gr.posMatrix:fc,qa=Nt(ta,Et,At,F.transform,qi),za=Ft(ta,Et,At,F.transform,qi),so=Ft(Gr.posMatrix,Et,At,F.transform,qi),na=bt.translatePosition(F.transform,Zr,H,ie),Hi=Tr&&vn.hasTextData(),Aa=l.layout.get("icon-text-fit")!=="none"&&Hi&&vn.hasIconData();if(Ut){const Oi=F.style.map.terrain?(eo,gs)=>F.style.map.terrain.getElevation(Gr,eo,gs):null,ko=l.layout.get("text-rotation-alignment")==="map";ct(vn,Gr.posMatrix,F,j,qa,so,Et,Ee,ko,bt,Gr.toUnwrapped(),ht.width,ht.height,na,Oi)}const sa=Gr.posMatrix,Qi=j&&Tr||Aa,ia=Ut||Qi?fc:qa,ba=za,Ji=on&&l.paint.get(j?"text-halo-width":"icon-halo-width").constantOr(1)!==0;let zs;zs=on?vn.iconsInText?En(Sn.kind,ri,Mt,Et,Ut,Qi,F,sa,ia,ba,na,$n,Di,Dr):_n(Sn.kind,ri,Mt,Et,Ut,Qi,F,sa,ia,ba,na,j,$n,!0,Dr):Ln(Sn.kind,ri,Mt,Et,Ut,Qi,F,sa,ia,ba,na,j,$n,Dr);const Ja={program:Rn,buffers:$r,uniformValues:zs,atlasTexture:di,atlasTextureIcon:zi,atlasInterpolation:Pi,atlasInterpolationIcon:Si,isSDF:on,hasHalo:Ji};if(Qt&&vn.canOverlap){Zt=!0;const Oi=$r.segments.get();for(const ko of Oi)Br.push({segments:new t.a0([ko]),sortKey:ko.sortKey,state:Ja,terrainData:An})}else Br.push({segments:$r.segments,sortKey:0,state:Ja,terrainData:An})}Zt&&Br.sort((Gr,Zr)=>Gr.sortKey-Zr.sortKey);for(const Gr of Br){const Zr=Gr.state;if(it.activeTexture.set(ut.TEXTURE0),Zr.atlasTexture.bind(Zr.atlasInterpolation,ut.CLAMP_TO_EDGE),Zr.atlasTextureIcon&&(it.activeTexture.set(ut.TEXTURE1),Zr.atlasTextureIcon&&Zr.atlasTextureIcon.bind(Zr.atlasInterpolationIcon,ut.CLAMP_TO_EDGE)),Zr.isSDF){const vn=Zr.uniformValues;Zr.hasHalo&&(vn.u_is_halo=1,vu(Zr.buffers,Gr.segments,l,F,Zr.program,pr,De,qe,vn,Gr.terrainData)),vn.u_is_halo=0}vu(Zr.buffers,Gr.segments,l,F,Zr.program,pr,De,qe,Zr.uniformValues,Gr.terrainData)}}function vu(F,o,l,O,j,H,ie,he,we,Ee){const De=O.context,qe=De.gl;j.draw(De,qe.TRIANGLES,H,ie,he,Ta.disabled,we,Ee,l.id,F.layoutVertexBuffer,F.indexBuffer,o,l.paint,O.transform.zoom,F.programConfigurations.get(l.id),F.dynamicLayoutVertexBuffer,F.opacityVertexBuffer)}function Ml(F,o,l,O){if(l.paint.get("heatmap-opacity")!==0)if(F.renderPass==="offscreen"){const j=F.context,H=j.gl,ie=wa.disabled,he=new no([H.ONE,H.ONE],t.aN.transparent,[!0,!0,!0,!0]);(function(we,Ee,De){const qe=we.gl;we.activeTexture.set(qe.TEXTURE1),we.viewport.set([0,0,Ee.width/4,Ee.height/4]);let it=De.heatmapFbo;if(it)qe.bindTexture(qe.TEXTURE_2D,it.colorAttachment.get()),we.bindFramebuffer.set(it.framebuffer);else{const ut=qe.createTexture();qe.bindTexture(qe.TEXTURE_2D,ut),qe.texParameteri(qe.TEXTURE_2D,qe.TEXTURE_WRAP_S,qe.CLAMP_TO_EDGE),qe.texParameteri(qe.TEXTURE_2D,qe.TEXTURE_WRAP_T,qe.CLAMP_TO_EDGE),qe.texParameteri(qe.TEXTURE_2D,qe.TEXTURE_MIN_FILTER,qe.LINEAR),qe.texParameteri(qe.TEXTURE_2D,qe.TEXTURE_MAG_FILTER,qe.LINEAR),it=De.heatmapFbo=we.createFramebuffer(Ee.width/4,Ee.height/4,!1,!1),(function(ht,bt,At,Et){var Ut,Mt;const Xt=ht.gl,Qt=(Ut=ht.HALF_FLOAT)!==null&&Ut!==void 0?Ut:Xt.UNSIGNED_BYTE,Zt=(Mt=ht.RGBA16F)!==null&&Mt!==void 0?Mt:Xt.RGBA;Xt.texImage2D(Xt.TEXTURE_2D,0,Zt,bt.width/4,bt.height/4,0,Xt.RGBA,Qt,null),Et.colorAttachment.set(At)})(we,Ee,ut,it)}})(j,F,l),j.clear({color:t.aN.transparent});for(let we=0;we<O.length;we++){const Ee=O[we];if(o.hasRenderableParent(Ee))continue;const De=o.getTile(Ee),qe=De.getBucket(l);if(!qe)continue;const it=qe.programConfigurations.get(l.id),ut=F.useProgram("heatmap",it),{zoom:ht}=F.transform;ut.draw(j,H.TRIANGLES,Ui.disabled,ie,he,Ta.disabled,Or(Ee.posMatrix,De,ht,l.paint.get("heatmap-intensity")),null,l.id,qe.layoutVertexBuffer,qe.indexBuffer,qe.segments,l.paint,F.transform.zoom,it)}j.viewport.set([0,0,F.width,F.height])}else F.renderPass==="translucent"&&(F.context.setColorMode(F.colorModeForRenderPass()),(function(j,H){const ie=j.context,he=ie.gl,we=H.heatmapFbo;if(!we)return;ie.activeTexture.set(he.TEXTURE0),he.bindTexture(he.TEXTURE_2D,we.colorAttachment.get()),ie.activeTexture.set(he.TEXTURE1);let Ee=H.colorRampTexture;Ee||(Ee=H.colorRampTexture=new I(ie,H.colorRamp,he.RGBA)),Ee.bind(he.LINEAR,he.CLAMP_TO_EDGE),j.useProgram("heatmapTexture").draw(ie,he.TRIANGLES,Ui.disabled,wa.disabled,j.colorModeForRenderPass(),Ta.disabled,Jr(j,H,0,1),null,H.id,j.viewportBuffer,j.quadTriangleIndexBuffer,j.viewportSegments,H.paint,j.transform.zoom)})(F,l))}function Al(F,o,l,O,j){if(!l||!O||!O.imageAtlas)return;const H=O.imageAtlas.patternPositions;let ie=H[l.to.toString()],he=H[l.from.toString()];if(!ie&&he&&(ie=he),!he&&ie&&(he=ie),!ie||!he){const we=j.getPaintProperty(o);ie=H[we],he=H[we]}ie&&he&&F.setConstantPatternPositions(ie,he)}function Ic(F,o,l,O,j,H,ie){const he=F.context.gl,we="fill-pattern",Ee=l.paint.get(we),De=Ee&&Ee.constantOr(1),qe=l.getCrossfadeParameters();let it,ut,ht,bt,At;ie?(ut=De&&!l.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",it=he.LINES):(ut=De?"fillPattern":"fill",it=he.TRIANGLES);const Et=Ee.constantOr(null);for(const Ut of O){const Mt=o.getTile(Ut);if(De&&!Mt.patternsLoaded())continue;const Xt=Mt.getBucket(l);if(!Xt)continue;const Qt=Xt.programConfigurations.get(l.id),Zt=F.useProgram(ut,Qt),pr=F.style.map.terrain&&F.style.map.terrain.getTerrainData(Ut);De&&(F.context.activeTexture.set(he.TEXTURE0),Mt.imageAtlasTexture.bind(he.LINEAR,he.CLAMP_TO_EDGE),Qt.updatePaintBuffers(qe)),Al(Qt,we,Et,Mt,l);const Tr=pr?Ut:null,Br=Tr?Tr.posMatrix:Ut.posMatrix,Dr=F.translatePosMatrix(Br,Mt,l.paint.get("fill-translate"),l.paint.get("fill-translate-anchor"));if(ie){bt=Xt.indexBuffer2,At=Xt.segments2;const Gr=[he.drawingBufferWidth,he.drawingBufferHeight];ht=ut==="fillOutlinePattern"&&De?gr(Dr,F,qe,Mt,Gr):Qn(Dr,Gr)}else bt=Xt.indexBuffer,At=Xt.segments,ht=De?In(Dr,F,qe,Mt):yn(Dr);Zt.draw(F.context,it,j,F.stencilModeForClipping(Ut),H,Ta.disabled,ht,pr,l.id,Xt.layoutVertexBuffer,bt,At,l.paint,F.transform.zoom,Qt)}}function mc(F,o,l,O,j,H,ie){const he=F.context,we=he.gl,Ee="fill-extrusion-pattern",De=l.paint.get(Ee),qe=De.constantOr(1),it=l.getCrossfadeParameters(),ut=l.paint.get("fill-extrusion-opacity"),ht=De.constantOr(null);for(const bt of O){const At=o.getTile(bt),Et=At.getBucket(l);if(!Et)continue;const Ut=F.style.map.terrain&&F.style.map.terrain.getTerrainData(bt),Mt=Et.programConfigurations.get(l.id),Xt=F.useProgram(qe?"fillExtrusionPattern":"fillExtrusion",Mt);qe&&(F.context.activeTexture.set(we.TEXTURE0),At.imageAtlasTexture.bind(we.LINEAR,we.CLAMP_TO_EDGE),Mt.updatePaintBuffers(it)),Al(Mt,Ee,ht,At,l);const Qt=F.translatePosMatrix(bt.posMatrix,At,l.paint.get("fill-extrusion-translate"),l.paint.get("fill-extrusion-translate-anchor")),Zt=l.paint.get("fill-extrusion-vertical-gradient"),pr=qe?xn(Qt,F,Zt,ut,bt,it,At):an(Qt,F,Zt,ut);Xt.draw(he,he.gl.TRIANGLES,j,H,ie,Ta.backCCW,pr,Ut,l.id,Et.layoutVertexBuffer,Et.indexBuffer,Et.segments,l.paint,F.transform.zoom,Mt,F.style.map.terrain&&Et.centroidVertexBuffer)}}function gc(F,o,l,O,j,H,ie){const he=F.context,we=he.gl,Ee=l.fbo;if(!Ee)return;const De=F.useProgram("hillshade"),qe=F.style.map.terrain&&F.style.map.terrain.getTerrainData(o);he.activeTexture.set(we.TEXTURE0),we.bindTexture(we.TEXTURE_2D,Ee.colorAttachment.get());const it=qe?o:null;De.draw(he,we.TRIANGLES,j,H,ie,Ta.disabled,Fr(F,l,O,it),qe,O.id,F.rasterBoundsBuffer,F.quadTriangleIndexBuffer,F.rasterBoundsSegments)}function Au(F,o,l,O,j,H){const ie=F.context,he=ie.gl,we=o.dem;if(we&&we.data){const Ee=we.dim,De=we.stride,qe=we.getPixels();if(ie.activeTexture.set(he.TEXTURE1),ie.pixelStoreUnpackPremultiplyAlpha.set(!1),o.demTexture=o.demTexture||F.getTileTexture(De),o.demTexture){const ut=o.demTexture;ut.update(qe,{premultiply:!1}),ut.bind(he.NEAREST,he.CLAMP_TO_EDGE)}else o.demTexture=new I(ie,qe,he.RGBA,{premultiply:!1}),o.demTexture.bind(he.NEAREST,he.CLAMP_TO_EDGE);ie.activeTexture.set(he.TEXTURE0);let it=o.fbo;if(!it){const ut=new I(ie,{width:Ee,height:Ee,data:null},he.RGBA);ut.bind(he.LINEAR,he.CLAMP_TO_EDGE),it=o.fbo=ie.createFramebuffer(Ee,Ee,!0,!1),it.colorAttachment.set(ut.texture)}ie.bindFramebuffer.set(it.framebuffer),ie.viewport.set([0,0,Ee,Ee]),F.useProgram("hillshadePrepare").draw(ie,he.TRIANGLES,O,j,H,Ta.disabled,Rr(o.tileID,we),null,l.id,F.rasterBoundsBuffer,F.quadTriangleIndexBuffer,F.rasterBoundsSegments),o.needsHillshadePrepare=!1}}function Cs(F,o,l,O,j,H){const ie=O.paint.get("raster-fade-duration");if(!H&&ie>0){const he=p.now(),we=(he-F.timeAdded)/ie,Ee=o?(he-o.timeAdded)/ie:-1,De=l.getSource(),qe=j.coveringZoomLevel({tileSize:De.tileSize,roundZoom:De.roundZoom}),it=!o||Math.abs(o.tileID.overscaledZ-qe)>Math.abs(F.tileID.overscaledZ-qe),ut=it&&F.refreshedUponExpiration?1:t.ad(it?we:1-Ee,0,1);return F.refreshedUponExpiration&&we>=1&&(F.refreshedUponExpiration=!1),o?{opacity:1,mix:1-ut}:{opacity:ut,mix:0}}return{opacity:1,mix:0}}const Ws=new t.aN(1,0,0,1),Ll=new t.aN(0,1,0,1),Es=new t.aN(0,0,1,1),Yi=new t.aN(1,0,1,1),Gc=new t.aN(0,1,1,1);function Hc(F){const o=F.transform.padding;Pc(F,F.transform.height-(o.top||0),3,Ws),Pc(F,o.bottom||0,3,Ll),Lo(F,o.left||0,3,Es),Lo(F,F.transform.width-(o.right||0),3,Yi);const l=F.transform.centerPoint;(function(O,j,H,ie){yc(O,j-1,H-10,2,20,ie),yc(O,j-10,H-1,20,2,ie)})(F,l.x,F.transform.height-l.y,Gc)}function Pc(F,o,l,O){yc(F,0,o+l/2,F.transform.width,l,O)}function Lo(F,o,l,O){yc(F,o-l/2,0,l,F.transform.height,O)}function yc(F,o,l,O,j,H){const ie=F.context,he=ie.gl;he.enable(he.SCISSOR_TEST),he.scissor(o*F.pixelRatio,l*F.pixelRatio,O*F.pixelRatio,j*F.pixelRatio),ie.clear({color:H}),he.disable(he.SCISSOR_TEST)}function Pu(F,o,l){const O=F.context,j=O.gl,H=l.posMatrix,ie=F.useProgram("debug"),he=Ui.disabled,we=wa.disabled,Ee=F.colorModeForRenderPass(),De="$debug",qe=F.style.map.terrain&&F.style.map.terrain.getTerrainData(l);O.activeTexture.set(j.TEXTURE0);const it=o.getTileByID(l.key).latestRawTileData,ut=it&&it.byteLength||0,ht=Math.floor(ut/1024),bt=o.getTile(l).tileSize,At=512/Math.min(bt,512)*(l.overscaledZ/F.transform.zoom)*.5;let Et=l.canonical.toString();l.overscaledZ!==l.canonical.z&&(Et+=` => ${l.overscaledZ}`),(function(Ut,Mt){Ut.initDebugOverlayCanvas();const Xt=Ut.debugOverlayCanvas,Qt=Ut.context.gl,Zt=Ut.debugOverlayCanvas.getContext("2d");Zt.clearRect(0,0,Xt.width,Xt.height),Zt.shadowColor="white",Zt.shadowBlur=2,Zt.lineWidth=1.5,Zt.strokeStyle="white",Zt.textBaseline="top",Zt.font="bold 36px Open Sans, sans-serif",Zt.fillText(Mt,5,5),Zt.strokeText(Mt,5,5),Ut.debugOverlayTexture.update(Xt),Ut.debugOverlayTexture.bind(Qt.LINEAR,Qt.CLAMP_TO_EDGE)})(F,`${Et} ${ht}kB`),ie.draw(O,j.TRIANGLES,he,we,no.alphaBlended,Ta.disabled,yr(H,t.aN.transparent,At),null,De,F.debugBuffer,F.quadTriangleIndexBuffer,F.debugSegments),ie.draw(O,j.LINE_STRIP,he,we,Ee,Ta.disabled,yr(H,t.aN.red),qe,De,F.debugBuffer,F.tileBorderIndexBuffer,F.debugSegments)}function rc(F,o,l){const O=F.context,j=O.gl,H=F.colorModeForRenderPass(),ie=new Ui(j.LEQUAL,Ui.ReadWrite,F.depthRangeFor3D),he=F.useProgram("terrain"),we=o.getTerrainMesh();O.bindFramebuffer.set(null),O.viewport.set([0,0,F.width,F.height]);for(const Ee of l){const De=F.renderToTexture.getTexture(Ee),qe=o.getTerrainData(Ee.tileID);O.activeTexture.set(j.TEXTURE0),j.bindTexture(j.TEXTURE_2D,De.texture);const it=F.transform.calculatePosMatrix(Ee.tileID.toUnwrapped()),ut=o.getMeshFrameDelta(F.transform.zoom),ht=F.transform.calculateFogMatrix(Ee.tileID.toUnwrapped()),bt=br(it,ut,ht,F.style.sky,F.transform.pitch);he.draw(O,j.TRIANGLES,ie,wa.disabled,H,Ta.backCCW,bt,qe,"terrain",we.vertexBuffer,we.indexBuffer,we.segments)}}class nc{constructor(o,l,O){this.vertexBuffer=o,this.indexBuffer=l,this.segments=O}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}class ic{constructor(o,l){this.context=new hc(o),this.transform=l,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:t.ao(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=He.maxUnderzooming+He.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new en}resize(o,l,O){if(this.width=Math.floor(o*O),this.height=Math.floor(l*O),this.pixelRatio=O,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const j of this.style._order)this.style._layers[j].resize()}setup(){const o=this.context,l=new t.aX;l.emplaceBack(0,0),l.emplaceBack(t.X,0),l.emplaceBack(0,t.X),l.emplaceBack(t.X,t.X),this.tileExtentBuffer=o.createVertexBuffer(l,pn.members),this.tileExtentSegments=t.a0.simpleSegment(0,0,4,2);const O=new t.aX;O.emplaceBack(0,0),O.emplaceBack(t.X,0),O.emplaceBack(0,t.X),O.emplaceBack(t.X,t.X),this.debugBuffer=o.createVertexBuffer(O,pn.members),this.debugSegments=t.a0.simpleSegment(0,0,4,5);const j=new t.$;j.emplaceBack(0,0,0,0),j.emplaceBack(t.X,0,t.X,0),j.emplaceBack(0,t.X,0,t.X),j.emplaceBack(t.X,t.X,t.X,t.X),this.rasterBoundsBuffer=o.createVertexBuffer(j,je.members),this.rasterBoundsSegments=t.a0.simpleSegment(0,0,4,2);const H=new t.aX;H.emplaceBack(0,0),H.emplaceBack(1,0),H.emplaceBack(0,1),H.emplaceBack(1,1),this.viewportBuffer=o.createVertexBuffer(H,pn.members),this.viewportSegments=t.a0.simpleSegment(0,0,4,2);const ie=new t.aZ;ie.emplaceBack(0),ie.emplaceBack(1),ie.emplaceBack(3),ie.emplaceBack(2),ie.emplaceBack(0),this.tileBorderIndexBuffer=o.createIndexBuffer(ie);const he=new t.aY;he.emplaceBack(0,1,2),he.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=o.createIndexBuffer(he);const we=this.context.gl;this.stencilClearMode=new wa({func:we.ALWAYS,mask:0},0,255,we.ZERO,we.ZERO,we.ZERO)}clearStencil(){const o=this.context,l=o.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const O=t.H();t.aQ(O,0,this.width,this.height,0,0,1),t.K(O,O,[l.drawingBufferWidth,l.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(o,l.TRIANGLES,Ui.disabled,this.stencilClearMode,no.disabled,Ta.disabled,Pr(O),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(o,l){if(this.currentStencilSource===o.source||!o.isTileClipped()||!l||!l.length)return;this.currentStencilSource=o.source;const O=this.context,j=O.gl;this.nextStencilID+l.length>256&&this.clearStencil(),O.setColorMode(no.disabled),O.setDepthMode(Ui.disabled);const H=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(const ie of l){const he=this._tileClippingMaskIDs[ie.key]=this.nextStencilID++,we=this.style.map.terrain&&this.style.map.terrain.getTerrainData(ie);H.draw(O,j.TRIANGLES,Ui.disabled,new wa({func:j.ALWAYS,mask:0},he,255,j.KEEP,j.KEEP,j.REPLACE),no.disabled,Ta.disabled,Pr(ie.posMatrix),we,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const o=this.nextStencilID++,l=this.context.gl;return new wa({func:l.NOTEQUAL,mask:255},o,255,l.KEEP,l.KEEP,l.REPLACE)}stencilModeForClipping(o){const l=this.context.gl;return new wa({func:l.EQUAL,mask:255},this._tileClippingMaskIDs[o.key],0,l.KEEP,l.KEEP,l.REPLACE)}stencilConfigForOverlap(o){const l=this.context.gl,O=o.sort((ie,he)=>he.overscaledZ-ie.overscaledZ),j=O[O.length-1].overscaledZ,H=O[0].overscaledZ-j+1;if(H>1){this.currentStencilSource=void 0,this.nextStencilID+H>256&&this.clearStencil();const ie={};for(let he=0;he<H;he++)ie[he+j]=new wa({func:l.GEQUAL,mask:255},he+this.nextStencilID,255,l.KEEP,l.KEEP,l.REPLACE);return this.nextStencilID+=H,[ie,O]}return[{[j]:wa.disabled},O]}colorModeForRenderPass(){const o=this.context.gl;return this._showOverdrawInspector?new no([o.CONSTANT_COLOR,o.ONE],new t.aN(.125,.125,.125,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?no.unblended:no.alphaBlended}depthModeForSublayer(o,l,O){if(!this.opaquePassEnabledForLayer())return Ui.disabled;const j=1-((1+this.currentLayer)*this.numSublayers+o)*this.depthEpsilon;return new Ui(O||this.context.gl.LEQUAL,l,[j,j])}opaquePassEnabledForLayer(){return this.currentLayer<this.opaquePassCutoff}render(o,l){var O;this.style=o,this.options=l,this.lineAtlas=o.lineAtlas,this.imageManager=o.imageManager,this.glyphManager=o.glyphManager,this.symbolFadeChange=o.placement.symbolFadeChange(p.now()),this.imageManager.beginFrame();const j=this.style._order,H=this.style.sourceCaches,ie={},he={},we={};for(const Ee in H){const De=H[Ee];De.used&&De.prepare(this.context),ie[Ee]=De.getVisibleCoordinates(),he[Ee]=ie[Ee].slice().reverse(),we[Ee]=De.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let Ee=0;Ee<j.length;Ee++){const De=j[Ee];if(this.style._layers[De].is3D()){this.opaquePassCutoff=Ee;break}}this.maybeDrawDepthAndCoords(!1),this.renderToTexture&&(this.renderToTexture.prepareForRender(this.style,this.transform.zoom),this.opaquePassCutoff=0),this.renderPass="offscreen";for(const Ee of j){const De=this.style._layers[Ee];if(!De.hasOffscreenPass()||De.isHidden(this.transform.zoom))continue;const qe=he[De.source];(De.type==="custom"||qe.length)&&this.renderLayer(this,H[De.source],De,qe)}if(this.context.bindFramebuffer.set(null),this.context.clear({color:l.showOverdrawInspector?t.aN.black:t.aN.transparent,depth:1}),this.clearStencil(),!((O=this.style.stylesheet)===null||O===void 0)&&O.sky&&(function(Ee,De){const qe=Ee.context,it=qe.gl,ut=((Ut,Mt,Xt)=>({u_sky_color:Ut.properties.get("sky-color"),u_horizon_color:Ut.properties.get("horizon-color"),u_horizon:(Mt.height/2+Mt.getHorizon())*Xt,u_sky_horizon_blend:Ut.properties.get("sky-horizon-blend")*Mt.height/2*Xt}))(De,Ee.style.map.transform,Ee.pixelRatio),ht=new Ui(it.LEQUAL,Ui.ReadWrite,[0,1]),bt=wa.disabled,At=Ee.colorModeForRenderPass(),Et=Ee.useProgram("sky");if(!De.mesh){const Ut=new t.aX;Ut.emplaceBack(-1,-1),Ut.emplaceBack(1,-1),Ut.emplaceBack(1,1),Ut.emplaceBack(-1,1);const Mt=new t.aY;Mt.emplaceBack(0,1,2),Mt.emplaceBack(0,2,3),De.mesh=new nc(qe.createVertexBuffer(Ut,pn.members),qe.createIndexBuffer(Mt),t.a0.simpleSegment(0,0,Ut.length,Mt.length))}Et.draw(qe,it.TRIANGLES,ht,bt,At,Ta.disabled,ut,void 0,"sky",De.mesh.vertexBuffer,De.mesh.indexBuffer,De.mesh.segments)})(this,this.style.sky),this._showOverdrawInspector=l.showOverdrawInspector,this.depthRangeFor3D=[0,1-(o._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=j.length-1;this.currentLayer>=0;this.currentLayer--){const Ee=this.style._layers[j[this.currentLayer]],De=H[Ee.source],qe=ie[Ee.source];this._renderTileClippingMasks(Ee,qe),this.renderLayer(this,De,Ee,qe)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<j.length;this.currentLayer++){const Ee=this.style._layers[j[this.currentLayer]],De=H[Ee.source];if(this.renderToTexture&&this.renderToTexture.renderLayer(Ee))continue;const qe=(Ee.type==="symbol"?we:he)[Ee.source];this._renderTileClippingMasks(Ee,ie[Ee.source]),this.renderLayer(this,De,Ee,qe)}if(this.options.showTileBoundaries){const Ee=(function(De,qe){let it=null;const ut=Object.values(De._layers).flatMap(Et=>Et.source&&!Et.isHidden(qe)?[De.sourceCaches[Et.source]]:[]),ht=ut.filter(Et=>Et.getSource().type==="vector"),bt=ut.filter(Et=>Et.getSource().type!=="vector"),At=Et=>{(!it||it.getSource().maxzoom<Et.getSource().maxzoom)&&(it=Et)};return ht.forEach(Et=>At(Et)),it||bt.forEach(Et=>At(Et)),it})(this.style,this.transform.zoom);Ee&&(function(De,qe,it){for(let ut=0;ut<it.length;ut++)Pu(De,qe,it[ut])})(this,Ee,Ee.getVisibleCoordinates())}this.options.showPadding&&Hc(this),this.context.setDefault()}maybeDrawDepthAndCoords(o){if(!this.style||!this.style.map||!this.style.map.terrain)return;const l=this.terrainFacilitator.matrix,O=this.transform.modelViewProjectionMatrix;let j=this.terrainFacilitator.dirty;j||(j=o?!t.a_(l,O):!t.a$(l,O)),j||(j=this.style.map.terrain.sourceCache.tilesAfterTime(this.terrainFacilitator.renderTime).length>0),j&&(t.b0(l,O),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,(function(H,ie){const he=H.context,we=he.gl,Ee=no.unblended,De=new Ui(we.LEQUAL,Ui.ReadWrite,[0,1]),qe=ie.getTerrainMesh(),it=ie.sourceCache.getRenderableTiles(),ut=H.useProgram("terrainDepth");he.bindFramebuffer.set(ie.getFramebuffer("depth").framebuffer),he.viewport.set([0,0,H.width/devicePixelRatio,H.height/devicePixelRatio]),he.clear({color:t.aN.transparent,depth:1});for(const ht of it){const bt=ie.getTerrainData(ht.tileID),At={u_matrix:H.transform.calculatePosMatrix(ht.tileID.toUnwrapped()),u_ele_delta:ie.getMeshFrameDelta(H.transform.zoom)};ut.draw(he,we.TRIANGLES,De,wa.disabled,Ee,Ta.backCCW,At,bt,"terrain",qe.vertexBuffer,qe.indexBuffer,qe.segments)}he.bindFramebuffer.set(null),he.viewport.set([0,0,H.width,H.height])})(this,this.style.map.terrain),(function(H,ie){const he=H.context,we=he.gl,Ee=no.unblended,De=new Ui(we.LEQUAL,Ui.ReadWrite,[0,1]),qe=ie.getTerrainMesh(),it=ie.getCoordsTexture(),ut=ie.sourceCache.getRenderableTiles(),ht=H.useProgram("terrainCoords");he.bindFramebuffer.set(ie.getFramebuffer("coords").framebuffer),he.viewport.set([0,0,H.width/devicePixelRatio,H.height/devicePixelRatio]),he.clear({color:t.aN.transparent,depth:1}),ie.coordsIndex=[];for(const bt of ut){const At=ie.getTerrainData(bt.tileID);he.activeTexture.set(we.TEXTURE0),we.bindTexture(we.TEXTURE_2D,it.texture);const Et={u_matrix:H.transform.calculatePosMatrix(bt.tileID.toUnwrapped()),u_terrain_coords_id:(255-ie.coordsIndex.length)/255,u_texture:0,u_ele_delta:ie.getMeshFrameDelta(H.transform.zoom)};ht.draw(he,we.TRIANGLES,De,wa.disabled,Ee,Ta.backCCW,Et,At,"terrain",qe.vertexBuffer,qe.indexBuffer,qe.segments),ie.coordsIndex.push(bt.tileID.key)}he.bindFramebuffer.set(null),he.viewport.set([0,0,H.width,H.height])})(this,this.style.map.terrain))}renderLayer(o,l,O,j){if(!O.isHidden(this.transform.zoom)&&(O.type==="background"||O.type==="custom"||(j||[]).length))switch(this.id=O.id,O.type){case"symbol":El(o,l,O,j,this.style.placement.variableOffsets);break;case"circle":(function(H,ie,he,we){if(H.renderPass!=="translucent")return;const Ee=he.paint.get("circle-opacity"),De=he.paint.get("circle-stroke-width"),qe=he.paint.get("circle-stroke-opacity"),it=!he.layout.get("circle-sort-key").isConstant();if(Ee.constantOr(1)===0&&(De.constantOr(1)===0||qe.constantOr(1)===0))return;const ut=H.context,ht=ut.gl,bt=H.depthModeForSublayer(0,Ui.ReadOnly),At=wa.disabled,Et=H.colorModeForRenderPass(),Ut=[];for(let Mt=0;Mt<we.length;Mt++){const Xt=we[Mt],Qt=ie.getTile(Xt),Zt=Qt.getBucket(he);if(!Zt)continue;const pr=Zt.programConfigurations.get(he.id),Tr=H.useProgram("circle",pr),Br=Zt.layoutVertexBuffer,Dr=Zt.indexBuffer,Gr=H.style.map.terrain&&H.style.map.terrain.getTerrainData(Xt),Zr={programConfiguration:pr,program:Tr,layoutVertexBuffer:Br,indexBuffer:Dr,uniformValues:qr(H,Xt,Qt,he),terrainData:Gr};if(it){const vn=Zt.segments.get();for(const $r of vn)Ut.push({segments:new t.a0([$r]),sortKey:$r.sortKey,state:Zr})}else Ut.push({segments:Zt.segments,sortKey:0,state:Zr})}it&&Ut.sort((Mt,Xt)=>Mt.sortKey-Xt.sortKey);for(const Mt of Ut){const{programConfiguration:Xt,program:Qt,layoutVertexBuffer:Zt,indexBuffer:pr,uniformValues:Tr,terrainData:Br}=Mt.state,Dr=Mt.segments;Qt.draw(ut,ht.TRIANGLES,bt,At,Et,Ta.disabled,Tr,Br,he.id,Zt,pr,Dr,he.paint,H.transform.zoom,Xt)}})(o,l,O,j);break;case"heatmap":Ml(o,l,O,j);break;case"line":(function(H,ie,he,we){if(H.renderPass!=="translucent")return;const Ee=he.paint.get("line-opacity"),De=he.paint.get("line-width");if(Ee.constantOr(1)===0||De.constantOr(1)===0)return;const qe=H.depthModeForSublayer(0,Ui.ReadOnly),it=H.colorModeForRenderPass(),ut=he.paint.get("line-dasharray"),ht=he.paint.get("line-pattern"),bt=ht.constantOr(1),At=he.paint.get("line-gradient"),Et=he.getCrossfadeParameters(),Ut=bt?"linePattern":ut?"lineSDF":At?"lineGradient":"line",Mt=H.context,Xt=Mt.gl;let Qt=!0;for(const Zt of we){const pr=ie.getTile(Zt);if(bt&&!pr.patternsLoaded())continue;const Tr=pr.getBucket(he);if(!Tr)continue;const Br=Tr.programConfigurations.get(he.id),Dr=H.context.program.get(),Gr=H.useProgram(Ut,Br),Zr=Qt||Gr.program!==Dr,vn=H.style.map.terrain&&H.style.map.terrain.getTerrainData(Zt),$r=ht.constantOr(null);if($r&&pr.imageAtlas){const Sn=pr.imageAtlas,mn=Sn.patternPositions[$r.to.toString()],Rn=Sn.patternPositions[$r.from.toString()];mn&&Rn&&Br.setConstantPatternPositions(mn,Rn)}const bn=vn?Zt:null,on=bt?Yr(H,pr,he,Et,bn):ut?cn(H,pr,he,ut,Et,bn):At?Mr(H,pr,he,Tr.lineClipsArray.length,bn):lr(H,pr,he,bn);if(bt)Mt.activeTexture.set(Xt.TEXTURE0),pr.imageAtlasTexture.bind(Xt.LINEAR,Xt.CLAMP_TO_EDGE),Br.updatePaintBuffers(Et);else if(ut&&(Zr||H.lineAtlas.dirty))Mt.activeTexture.set(Xt.TEXTURE0),H.lineAtlas.bind(Mt);else if(At){const Sn=Tr.gradients[he.id];let mn=Sn.texture;if(he.gradientVersion!==Sn.version){let Rn=256;if(he.stepInterpolant){const ri=ie.getSource().maxzoom,An=Zt.canonical.z===ri?Math.ceil(1<<H.transform.maxZoom-Zt.canonical.z):1,$n=Tr.maxLineLength/t.X*1024*An;Rn=t.ad(t.aV($n),256,Mt.maxTextureSize)}Sn.gradient=t.aW({expression:he.gradientExpression(),evaluationKey:"lineProgress",resolution:Rn,image:Sn.gradient||void 0,clips:Tr.lineClipsArray}),Sn.texture?Sn.texture.update(Sn.gradient):Sn.texture=new I(Mt,Sn.gradient,Xt.RGBA),Sn.version=he.gradientVersion,mn=Sn.texture}Mt.activeTexture.set(Xt.TEXTURE0),mn.bind(he.stepInterpolant?Xt.NEAREST:Xt.LINEAR,Xt.CLAMP_TO_EDGE)}Gr.draw(Mt,Xt.TRIANGLES,qe,H.stencilModeForClipping(Zt),it,Ta.disabled,on,vn,he.id,Tr.layoutVertexBuffer,Tr.indexBuffer,Tr.segments,he.paint,H.transform.zoom,Br,Tr.layoutVertexBuffer2),Qt=!1}})(o,l,O,j);break;case"fill":(function(H,ie,he,we){const Ee=he.paint.get("fill-color"),De=he.paint.get("fill-opacity");if(De.constantOr(1)===0)return;const qe=H.colorModeForRenderPass(),it=he.paint.get("fill-pattern"),ut=H.opaquePassEnabledForLayer()&&!it.constantOr(1)&&Ee.constantOr(t.aN.transparent).a===1&&De.constantOr(0)===1?"opaque":"translucent";if(H.renderPass===ut){const ht=H.depthModeForSublayer(1,H.renderPass==="opaque"?Ui.ReadWrite:Ui.ReadOnly);Ic(H,ie,he,we,ht,qe,!1)}if(H.renderPass==="translucent"&&he.paint.get("fill-antialias")){const ht=H.depthModeForSublayer(he.getPaintProperty("fill-outline-color")?2:0,Ui.ReadOnly);Ic(H,ie,he,we,ht,qe,!0)}})(o,l,O,j);break;case"fill-extrusion":(function(H,ie,he,we){const Ee=he.paint.get("fill-extrusion-opacity");if(Ee!==0&&H.renderPass==="translucent"){const De=new Ui(H.context.gl.LEQUAL,Ui.ReadWrite,H.depthRangeFor3D);if(Ee!==1||he.paint.get("fill-extrusion-pattern").constantOr(1))mc(H,ie,he,we,De,wa.disabled,no.disabled),mc(H,ie,he,we,De,H.stencilModeFor3D(),H.colorModeForRenderPass());else{const qe=H.colorModeForRenderPass();mc(H,ie,he,we,De,wa.disabled,qe)}}})(o,l,O,j);break;case"hillshade":(function(H,ie,he,we){if(H.renderPass!=="offscreen"&&H.renderPass!=="translucent")return;const Ee=H.context,De=H.depthModeForSublayer(0,Ui.ReadOnly),qe=H.colorModeForRenderPass(),[it,ut]=H.renderPass==="translucent"?H.stencilConfigForOverlap(we):[{},we];for(const ht of ut){const bt=ie.getTile(ht);bt.needsHillshadePrepare!==void 0&&bt.needsHillshadePrepare&&H.renderPass==="offscreen"?Au(H,bt,he,De,wa.disabled,qe):H.renderPass==="translucent"&&gc(H,ht,bt,he,De,it[ht.overscaledZ],qe)}Ee.viewport.set([0,0,H.width,H.height])})(o,l,O,j);break;case"raster":(function(H,ie,he,we){if(H.renderPass!=="translucent"||he.paint.get("raster-opacity")===0||!we.length)return;const Ee=H.context,De=Ee.gl,qe=ie.getSource(),it=H.useProgram("raster"),ut=H.colorModeForRenderPass(),[ht,bt]=qe instanceof Ne?[{},we]:H.stencilConfigForOverlap(we),At=bt[bt.length-1].overscaledZ,Et=!H.options.moving;for(const Ut of bt){const Mt=H.depthModeForSublayer(Ut.overscaledZ-At,he.paint.get("raster-opacity")===1?Ui.ReadWrite:Ui.ReadOnly,De.LESS),Xt=ie.getTile(Ut);Xt.registerFadeDuration(he.paint.get("raster-fade-duration"));const Qt=ie.findLoadedParent(Ut,0),Zt=ie.findLoadedSibling(Ut),pr=Cs(Xt,Qt||Zt||null,ie,he,H.transform,H.style.map.terrain);let Tr,Br;const Dr=he.paint.get("raster-resampling")==="nearest"?De.NEAREST:De.LINEAR;Ee.activeTexture.set(De.TEXTURE0),Xt.texture.bind(Dr,De.CLAMP_TO_EDGE,De.LINEAR_MIPMAP_NEAREST),Ee.activeTexture.set(De.TEXTURE1),Qt?(Qt.texture.bind(Dr,De.CLAMP_TO_EDGE,De.LINEAR_MIPMAP_NEAREST),Tr=Math.pow(2,Qt.tileID.overscaledZ-Xt.tileID.overscaledZ),Br=[Xt.tileID.canonical.x*Tr%1,Xt.tileID.canonical.y*Tr%1]):Xt.texture.bind(Dr,De.CLAMP_TO_EDGE,De.LINEAR_MIPMAP_NEAREST),Xt.texture.useMipmap&&Ee.extTextureFilterAnisotropic&&H.transform.pitch>20&&De.texParameterf(De.TEXTURE_2D,Ee.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,Ee.extTextureFilterAnisotropicMax);const Gr=H.style.map.terrain&&H.style.map.terrain.getTerrainData(Ut),Zr=Gr?Ut:null,vn=Zr?Zr.posMatrix:H.transform.calculatePosMatrix(Ut.toUnwrapped(),Et),$r=Mn(vn,Br||[0,0],Tr||1,pr,he);qe instanceof Ne?it.draw(Ee,De.TRIANGLES,Mt,wa.disabled,ut,Ta.disabled,$r,Gr,he.id,qe.boundsBuffer,H.quadTriangleIndexBuffer,qe.boundsSegments):it.draw(Ee,De.TRIANGLES,Mt,ht[Ut.overscaledZ],ut,Ta.disabled,$r,Gr,he.id,H.rasterBoundsBuffer,H.quadTriangleIndexBuffer,H.rasterBoundsSegments)}})(o,l,O,j);break;case"background":(function(H,ie,he,we){const Ee=he.paint.get("background-color"),De=he.paint.get("background-opacity");if(De===0)return;const qe=H.context,it=qe.gl,ut=H.transform,ht=ut.tileSize,bt=he.paint.get("background-pattern");if(H.isPatternMissing(bt))return;const At=!bt&&Ee.a===1&&De===1&&H.opaquePassEnabledForLayer()?"opaque":"translucent";if(H.renderPass!==At)return;const Et=wa.disabled,Ut=H.depthModeForSublayer(0,At==="opaque"?Ui.ReadWrite:Ui.ReadOnly),Mt=H.colorModeForRenderPass(),Xt=H.useProgram(bt?"backgroundPattern":"background"),Qt=we||ut.coveringTiles({tileSize:ht,terrain:H.style.map.terrain});bt&&(qe.activeTexture.set(it.TEXTURE0),H.imageManager.bind(H.context));const Zt=he.getCrossfadeParameters();for(const pr of Qt){const Tr=we?pr.posMatrix:H.transform.calculatePosMatrix(pr.toUnwrapped()),Br=bt?oi(Tr,De,H,bt,{tileID:pr,tileSize:ht},Zt):Bn(Tr,De,Ee),Dr=H.style.map.terrain&&H.style.map.terrain.getTerrainData(pr);Xt.draw(qe,it.TRIANGLES,Ut,Et,Mt,Ta.disabled,Br,Dr,he.id,H.tileExtentBuffer,H.quadTriangleIndexBuffer,H.tileExtentSegments)}})(o,0,O,j);break;case"custom":(function(H,ie,he){const we=H.context,Ee=he.implementation;if(H.renderPass==="offscreen"){const De=Ee.prerender;De&&(H.setCustomLayerDefaults(),we.setColorMode(H.colorModeForRenderPass()),De.call(Ee,we.gl,H.transform.customLayerMatrix()),we.setDirty(),H.setBaseState())}else if(H.renderPass==="translucent"){H.setCustomLayerDefaults(),we.setColorMode(H.colorModeForRenderPass()),we.setStencilMode(wa.disabled);const De=Ee.renderingMode==="3d"?new Ui(H.context.gl.LEQUAL,Ui.ReadWrite,H.depthRangeFor3D):H.depthModeForSublayer(0,Ui.ReadOnly);we.setDepthMode(De),Ee.render(we.gl,H.transform.customLayerMatrix(),{farZ:H.transform.farZ,nearZ:H.transform.nearZ,fov:H.transform._fov,modelViewProjectionMatrix:H.transform.modelViewProjectionMatrix,projectionMatrix:H.transform.projectionMatrix}),we.setDirty(),H.setBaseState(),we.bindFramebuffer.set(null)}})(o,0,O)}}translatePosMatrix(o,l,O,j,H){if(!O[0]&&!O[1])return o;const ie=H?j==="map"?this.transform.angle:0:j==="viewport"?-this.transform.angle:0;if(ie){const Ee=Math.sin(ie),De=Math.cos(ie);O=[O[0]*De-O[1]*Ee,O[0]*Ee+O[1]*De]}const he=[H?O[0]:wt(l,O[0],this.transform.zoom),H?O[1]:wt(l,O[1],this.transform.zoom),0],we=new Float32Array(16);return t.J(we,o,he),we}saveTileTexture(o){const l=this._tileTextures[o.size[0]];l?l.push(o):this._tileTextures[o.size[0]]=[o]}getTileTexture(o){const l=this._tileTextures[o];return l&&l.length>0?l.pop():null}isPatternMissing(o){if(!o)return!1;if(!o.from||!o.to)return!0;const l=this.imageManager.getPattern(o.from.toString()),O=this.imageManager.getPattern(o.to.toString());return!l||!O}useProgram(o,l){this.cache=this.cache||{};const O=o+(l?l.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[O]||(this.cache[O]=new rn(this.context,Tn[o],l,Yn[o],this._showOverdrawInspector,this.style.map.terrain)),this.cache[O]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){const o=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(o.FUNC_ADD)}initDebugOverlayCanvas(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;const o=this.context.gl;this.debugOverlayTexture=new I(this.context,this.debugOverlayCanvas,o.RGBA)}}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){const{drawingBufferWidth:o,drawingBufferHeight:l}=this.context.gl;return this.width!==o||this.height!==l}}class Gs{constructor(o,l){this.points=o,this.planes=l}static fromInvProjectionMatrix(o,l,O){const j=Math.pow(2,O),H=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(he=>{const we=1/(he=t.ag([],he,o))[3]/l*j;return t.b1(he,he,[we,we,1/he[3],we])}),ie=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(he=>{const we=(function(it,ut){var ht=ut[0],bt=ut[1],At=ut[2],Et=ht*ht+bt*bt+At*At;return Et>0&&(Et=1/Math.sqrt(Et)),it[0]=ut[0]*Et,it[1]=ut[1]*Et,it[2]=ut[2]*Et,it})([],(function(it,ut,ht){var bt=ut[0],At=ut[1],Et=ut[2],Ut=ht[0],Mt=ht[1],Xt=ht[2];return it[0]=At*Xt-Et*Mt,it[1]=Et*Ut-bt*Xt,it[2]=bt*Mt-At*Ut,it})([],R([],H[he[0]],H[he[1]]),R([],H[he[2]],H[he[1]]))),Ee=(De=we,qe=H[he[1]],-(De[0]*qe[0]+De[1]*qe[1]+De[2]*qe[2]));var De,qe;return we.concat(Ee)});return new Gs(H,ie)}}class Ms{constructor(o,l){this.min=o,this.max=l,this.center=(function(O,j,H){return O[0]=j[0]*H,O[1]=j[1]*H,O[2]=j[2]*H,O})([],(function(O,j,H){return O[0]=j[0]+H[0],O[1]=j[1]+H[1],O[2]=j[2]+H[2],O})([],this.min,this.max),.5)}quadrant(o){const l=[o%2==0,o<2],O=S(this.min),j=S(this.max);for(let H=0;H<l.length;H++)O[H]=l[H]?this.min[H]:this.center[H],j[H]=l[H]?this.center[H]:this.max[H];return j[2]=this.max[2],new Ms(O,j)}distanceX(o){return Math.max(Math.min(this.max[0],o[0]),this.min[0])-o[0]}distanceY(o){return Math.max(Math.min(this.max[1],o[1]),this.min[1])-o[1]}intersects(o){const l=[[this.min[0],this.min[1],this.min[2],1],[this.max[0],this.min[1],this.min[2],1],[this.max[0],this.max[1],this.min[2],1],[this.min[0],this.max[1],this.min[2],1],[this.min[0],this.min[1],this.max[2],1],[this.max[0],this.min[1],this.max[2],1],[this.max[0],this.max[1],this.max[2],1],[this.min[0],this.max[1],this.max[2],1]];let O=!0;for(let j=0;j<o.planes.length;j++){const H=o.planes[j];let ie=0;for(let he=0;he<l.length;he++)t.b2(H,l[he])>=0&&ie++;if(ie===0)return 0;ie!==l.length&&(O=!1)}if(O)return 2;for(let j=0;j<3;j++){let H=Number.MAX_VALUE,ie=-Number.MAX_VALUE;for(let he=0;he<o.points.length;he++){const we=o.points[he][j]-this.min[j];H=Math.min(H,we),ie=Math.max(ie,we)}if(ie<0||H>this.max[j]-this.min[j])return 0}return 1}}class Rl{constructor(o=0,l=0,O=0,j=0){if(isNaN(o)||o<0||isNaN(l)||l<0||isNaN(O)||O<0||isNaN(j)||j<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=o,this.bottom=l,this.left=O,this.right=j}interpolate(o,l,O){return l.top!=null&&o.top!=null&&(this.top=t.z.number(o.top,l.top,O)),l.bottom!=null&&o.bottom!=null&&(this.bottom=t.z.number(o.bottom,l.bottom,O)),l.left!=null&&o.left!=null&&(this.left=t.z.number(o.left,l.left,O)),l.right!=null&&o.right!=null&&(this.right=t.z.number(o.right,l.right,O)),this}getCenter(o,l){const O=t.ad((this.left+o-this.right)/2,0,o),j=t.ad((this.top+l-this.bottom)/2,0,l);return new t.P(O,j)}equals(o){return this.top===o.top&&this.bottom===o.bottom&&this.left===o.left&&this.right===o.right}clone(){return new Rl(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}const vc=85.051129;class aa{constructor(o,l,O,j,H){this.tileSize=512,this._renderWorldCopies=H===void 0||!!H,this._minZoom=o||0,this._maxZoom=l||22,this._minPitch=O??0,this._maxPitch=j??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new t.N(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new Rl,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={},this.minElevationForCurrentTile=0}clone(){const o=new aa(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return o.apply(this),o}apply(o){this.tileSize=o.tileSize,this.latRange=o.latRange,this.width=o.width,this.height=o.height,this._center=o._center,this._elevation=o._elevation,this.minElevationForCurrentTile=o.minElevationForCurrentTile,this.zoom=o.zoom,this.angle=o.angle,this._fov=o._fov,this._pitch=o._pitch,this._unmodified=o._unmodified,this._edgeInsets=o._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(o){this._minZoom!==o&&(this._minZoom=o,this.zoom=Math.max(this.zoom,o))}get maxZoom(){return this._maxZoom}set maxZoom(o){this._maxZoom!==o&&(this._maxZoom=o,this.zoom=Math.min(this.zoom,o))}get minPitch(){return this._minPitch}set minPitch(o){this._minPitch!==o&&(this._minPitch=o,this.pitch=Math.max(this.pitch,o))}get maxPitch(){return this._maxPitch}set maxPitch(o){this._maxPitch!==o&&(this._maxPitch=o,this.pitch=Math.min(this.pitch,o))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(o){o===void 0?o=!0:o===null&&(o=!1),this._renderWorldCopies=o}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new t.P(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(o){const l=-t.b3(o,-180,180)*Math.PI/180;this.angle!==l&&(this._unmodified=!1,this.angle=l,this._calcMatrices(),this.rotationMatrix=(function(){var O=new t.A(4);return t.A!=Float32Array&&(O[1]=0,O[2]=0),O[0]=1,O[3]=1,O})(),(function(O,j,H){var ie=j[0],he=j[1],we=j[2],Ee=j[3],De=Math.sin(H),qe=Math.cos(H);O[0]=ie*qe+we*De,O[1]=he*qe+Ee*De,O[2]=ie*-De+we*qe,O[3]=he*-De+Ee*qe})(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(o){const l=t.ad(o,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==l&&(this._unmodified=!1,this._pitch=l,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(o){o=Math.max(.01,Math.min(60,o)),this._fov!==o&&(this._unmodified=!1,this._fov=o/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(o){const l=Math.min(Math.max(o,this.minZoom),this.maxZoom);this._zoom!==l&&(this._unmodified=!1,this._zoom=l,this.tileZoom=Math.max(0,Math.floor(l)),this.scale=this.zoomScale(l),this._constrain(),this._calcMatrices())}get center(){return this._center}set center(o){o.lat===this._center.lat&&o.lng===this._center.lng||(this._unmodified=!1,this._center=o,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(o){o!==this._elevation&&(this._elevation=o,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(o){this._edgeInsets.equals(o)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,o,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(o){return this._edgeInsets.equals(o)}interpolatePadding(o,l,O){this._unmodified=!1,this._edgeInsets.interpolate(o,l,O),this._constrain(),this._calcMatrices()}coveringZoomLevel(o){const l=(o.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/o.tileSize));return Math.max(0,l)}getVisibleUnwrappedCoordinates(o){const l=[new t.b4(0,o)];if(this._renderWorldCopies){const O=this.pointCoordinate(new t.P(0,0)),j=this.pointCoordinate(new t.P(this.width,0)),H=this.pointCoordinate(new t.P(this.width,this.height)),ie=this.pointCoordinate(new t.P(0,this.height)),he=Math.floor(Math.min(O.x,j.x,H.x,ie.x)),we=Math.floor(Math.max(O.x,j.x,H.x,ie.x)),Ee=1;for(let De=he-Ee;De<=we+Ee;De++)De!==0&&l.push(new t.b4(De,o))}return l}coveringTiles(o){var l,O;let j=this.coveringZoomLevel(o);const H=j;if(o.minzoom!==void 0&&j<o.minzoom)return[];o.maxzoom!==void 0&&j>o.maxzoom&&(j=o.maxzoom);const ie=this.pointCoordinate(this.getCameraPoint()),he=t.Z.fromLngLat(this.center),we=Math.pow(2,j),Ee=[we*ie.x,we*ie.y,0],De=[we*he.x,we*he.y,0],qe=Gs.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,j);let it=o.minzoom||0;!o.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(it=j);const ut=o.terrain?2/Math.min(this.tileSize,o.tileSize)*this.tileSize:3,ht=Mt=>({aabb:new Ms([Mt*we,0,0],[(Mt+1)*we,we,0]),zoom:0,x:0,y:0,wrap:Mt,fullyVisible:!1}),bt=[],At=[],Et=j,Ut=o.reparseOverscaled?H:j;if(this._renderWorldCopies)for(let Mt=1;Mt<=3;Mt++)bt.push(ht(-Mt)),bt.push(ht(Mt));for(bt.push(ht(0));bt.length>0;){const Mt=bt.pop(),Xt=Mt.x,Qt=Mt.y;let Zt=Mt.fullyVisible;if(!Zt){const Zr=Mt.aabb.intersects(qe);if(Zr===0)continue;Zt=Zr===2}const pr=o.terrain?Ee:De,Tr=Mt.aabb.distanceX(pr),Br=Mt.aabb.distanceY(pr),Dr=Math.max(Math.abs(Tr),Math.abs(Br)),Gr=ut+(1<<Et-Mt.zoom)-2;if(Mt.zoom===Et||Dr>Gr&&Mt.zoom>=it){const Zr=Et-Mt.zoom,vn=Ee[0]-.5-(Xt<<Zr),$r=Ee[1]-.5-(Qt<<Zr);At.push({tileID:new t.S(Mt.zoom===Et?Ut:Mt.zoom,Mt.wrap,Mt.zoom,Xt,Qt),distanceSq:E([De[0]-.5-Xt,De[1]-.5-Qt]),tileDistanceToCamera:Math.sqrt(vn*vn+$r*$r)})}else for(let Zr=0;Zr<4;Zr++){const vn=(Xt<<1)+Zr%2,$r=(Qt<<1)+(Zr>>1),bn=Mt.zoom+1;let on=Mt.aabb.quadrant(Zr);if(o.terrain){const Sn=new t.S(bn,Mt.wrap,bn,vn,$r),mn=o.terrain.getMinMaxElevation(Sn),Rn=(l=mn.minElevation)!==null&&l!==void 0?l:this.elevation,ri=(O=mn.maxElevation)!==null&&O!==void 0?O:this.elevation;on=new Ms([on.min[0],on.min[1],Rn],[on.max[0],on.max[1],ri])}bt.push({aabb:on,zoom:bn,x:vn,y:$r,wrap:Mt.wrap,fullyVisible:Zt})}}return At.sort((Mt,Xt)=>Mt.distanceSq-Xt.distanceSq).map(Mt=>Mt.tileID)}resize(o,l){this.width=o,this.height=l,this.pixelsToGLUnits=[2/o,-2/l],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(o){return Math.pow(2,o)}scaleZoom(o){return Math.log(o)/Math.LN2}project(o){const l=t.ad(o.lat,-85.051129,vc);return new t.P(t.O(o.lng)*this.worldSize,t.Q(l)*this.worldSize)}unproject(o){return new t.Z(o.x/this.worldSize,o.y/this.worldSize).toLngLat()}get point(){return this.project(this.center)}getCameraPosition(){return{lngLat:this.pointLocation(this.getCameraPoint()),altitude:Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter+this.elevation}}recalculateZoom(o){const l=this.elevation,O=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,j=this.pointLocation(this.centerPoint,o),H=o.getElevationForLngLatZoom(j,this.tileZoom);if(!(this.elevation-H))return;const ie=O+l-H,he=Math.cos(this._pitch)*this.cameraToCenterDistance/ie/t.b5(1,j.lat)/this.tileSize,we=this.scaleZoom(he);this._elevation=H,this._center=j,this.zoom=we}setLocationAtPoint(o,l){const O=this.pointCoordinate(l),j=this.pointCoordinate(this.centerPoint),H=this.locationCoordinate(o),ie=new t.Z(H.x-(O.x-j.x),H.y-(O.y-j.y));this.center=this.coordinateLocation(ie),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(o,l){return l?this.coordinatePoint(this.locationCoordinate(o),l.getElevationForLngLatZoom(o,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(o))}pointLocation(o,l){return this.coordinateLocation(this.pointCoordinate(o,l))}locationCoordinate(o){return t.Z.fromLngLat(o)}coordinateLocation(o){return o&&o.toLngLat()}pointCoordinate(o,l){if(l){const ht=l.pointCoordinate(o);if(ht!=null)return ht}const O=[o.x,o.y,0,1],j=[o.x,o.y,1,1];t.ag(O,O,this.pixelMatrixInverse),t.ag(j,j,this.pixelMatrixInverse);const H=O[3],ie=j[3],he=O[0]/H,we=j[0]/ie,Ee=O[1]/H,De=j[1]/ie,qe=O[2]/H,it=j[2]/ie,ut=qe===it?0:(0-qe)/(it-qe);return new t.Z(t.z.number(he,we,ut)/this.worldSize,t.z.number(Ee,De,ut)/this.worldSize)}coordinatePoint(o,l=0,O=this.pixelMatrix){const j=[o.x*this.worldSize,o.y*this.worldSize,l,1];return t.ag(j,j,O),new t.P(j[0]/j[3],j[1]/j[3])}getBounds(){const o=Math.max(0,this.height/2-this.getHorizon());return new Te().extend(this.pointLocation(new t.P(0,o))).extend(this.pointLocation(new t.P(this.width,o))).extend(this.pointLocation(new t.P(this.width,this.height))).extend(this.pointLocation(new t.P(0,this.height)))}getMaxBounds(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new Te([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null}getHorizon(){return Math.tan(Math.PI/2-this._pitch)*this.cameraToCenterDistance*.85}setMaxBounds(o){o?(this.lngRange=[o.getWest(),o.getEast()],this.latRange=[o.getSouth(),o.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-85.051129,vc])}calculateTileMatrix(o){const l=o.canonical,O=this.worldSize/this.zoomScale(l.z),j=l.x+Math.pow(2,l.z)*o.wrap,H=t.ao(new Float64Array(16));return t.J(H,H,[j*O,l.y*O,0]),t.K(H,H,[O/t.X,O/t.X,1]),H}calculatePosMatrix(o,l=!1){const O=o.key,j=l?this._alignedPosMatrixCache:this._posMatrixCache;if(j[O])return j[O];const H=this.calculateTileMatrix(o);return t.L(H,l?this.alignedModelViewProjectionMatrix:this.modelViewProjectionMatrix,H),j[O]=new Float32Array(H),j[O]}calculateFogMatrix(o){const l=o.key,O=this._fogMatrixCache;if(O[l])return O[l];const j=this.calculateTileMatrix(o);return t.L(j,this.fogMatrix,j),O[l]=new Float32Array(j),O[l]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(o,l){l=t.ad(+l,this.minZoom,this.maxZoom);const O={center:new t.N(o.lng,o.lat),zoom:l};let j=this.lngRange;if(!this._renderWorldCopies&&j===null){const Mt=179.9999999999;j=[-Mt,Mt]}const H=this.tileSize*this.zoomScale(O.zoom);let ie=0,he=H,we=0,Ee=H,De=0,qe=0;const{x:it,y:ut}=this.size;if(this.latRange){const Mt=this.latRange;ie=t.Q(Mt[1])*H,he=t.Q(Mt[0])*H,he-ie<ut&&(De=ut/(he-ie))}j&&(we=t.b3(t.O(j[0])*H,0,H),Ee=t.b3(t.O(j[1])*H,0,H),Ee<we&&(Ee+=H),Ee-we<it&&(qe=it/(Ee-we)));const{x:ht,y:bt}=this.project.call({worldSize:H},o);let At,Et;const Ut=Math.max(qe||0,De||0);if(Ut){const Mt=new t.P(qe?(Ee+we)/2:ht,De?(he+ie)/2:bt);return O.center=this.unproject.call({worldSize:H},Mt).wrap(),O.zoom+=this.scaleZoom(Ut),O}if(this.latRange){const Mt=ut/2;bt-Mt<ie&&(Et=ie+Mt),bt+Mt>he&&(Et=he-Mt)}if(j){const Mt=(we+Ee)/2;let Xt=ht;this._renderWorldCopies&&(Xt=t.b3(ht,Mt-H/2,Mt+H/2));const Qt=it/2;Xt-Qt<we&&(At=we+Qt),Xt+Qt>Ee&&(At=Ee-Qt)}if(At!==void 0||Et!==void 0){const Mt=new t.P(At??ht,Et??bt);O.center=this.unproject.call({worldSize:H},Mt).wrap()}return O}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;const o=this._unmodified,{center:l,zoom:O}=this.getConstrained(this.center,this.zoom);this.center=l,this.zoom=O,this._unmodified=o,this._constraining=!1}_calcMatrices(){if(!this.height)return;const o=this._fov/2,l=this.centerOffset,O=this.point.x,j=this.point.y;this.cameraToCenterDistance=.5/Math.tan(o)*this.height,this._pixelPerMeter=t.b5(1,this.center.lat)*this.worldSize;let H=t.ao(new Float64Array(16));t.K(H,H,[this.width/2,-this.height/2,1]),t.J(H,H,[1,-1,0]),this.labelPlaneMatrix=H,H=t.ao(new Float64Array(16)),t.K(H,H,[1,-1,1]),t.J(H,H,[-1,-1,0]),t.K(H,H,[2/this.width,2/this.height,1]),this.glCoordMatrix=H;const ie=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),he=Math.min(this.elevation,this.minElevationForCurrentTile),we=ie-he*this._pixelPerMeter/Math.cos(this._pitch),Ee=he<0?we:ie,De=Math.PI/2+this._pitch,qe=this._fov*(.5+l.y/this.height),it=Math.sin(qe)*Ee/Math.sin(t.ad(Math.PI-De-qe,.01,Math.PI-.01)),ut=this.getHorizon(),ht=2*Math.atan(ut/this.cameraToCenterDistance)*(.5+l.y/(2*ut)),bt=Math.sin(ht)*Ee/Math.sin(t.ad(Math.PI-De-ht,.01,Math.PI-.01)),At=Math.min(it,bt);this.farZ=1.01*(Math.cos(Math.PI/2-this._pitch)*At+Ee),this.nearZ=this.height/50,H=new Float64Array(16),t.b6(H,this._fov,this.width/this.height,this.nearZ,this.farZ),H[8]=2*-l.x/this.width,H[9]=2*l.y/this.height,this.projectionMatrix=t.af(H),t.K(H,H,[1,-1,1]),t.J(H,H,[0,0,-this.cameraToCenterDistance]),t.b7(H,H,this._pitch),t.ae(H,H,this.angle),t.J(H,H,[-O,-j,0]),this.mercatorMatrix=t.K([],H,[this.worldSize,this.worldSize,this.worldSize]),t.K(H,H,[1,1,this._pixelPerMeter]),this.pixelMatrix=t.L(new Float64Array(16),this.labelPlaneMatrix,H),t.J(H,H,[0,0,-this.elevation]),this.modelViewProjectionMatrix=H,this.invModelViewProjectionMatrix=t.at([],H),this.fogMatrix=new Float64Array(16),t.b6(this.fogMatrix,this._fov,this.width/this.height,ie,this.farZ),this.fogMatrix[8]=2*-l.x/this.width,this.fogMatrix[9]=2*l.y/this.height,t.K(this.fogMatrix,this.fogMatrix,[1,-1,1]),t.J(this.fogMatrix,this.fogMatrix,[0,0,-this.cameraToCenterDistance]),t.b7(this.fogMatrix,this.fogMatrix,this._pitch),t.ae(this.fogMatrix,this.fogMatrix,this.angle),t.J(this.fogMatrix,this.fogMatrix,[-O,-j,0]),t.K(this.fogMatrix,this.fogMatrix,[1,1,this._pixelPerMeter]),t.J(this.fogMatrix,this.fogMatrix,[0,0,-this.elevation]),this.pixelMatrix3D=t.L(new Float64Array(16),this.labelPlaneMatrix,H);const Et=this.width%2/2,Ut=this.height%2/2,Mt=Math.cos(this.angle),Xt=Math.sin(this.angle),Qt=O-Math.round(O)+Mt*Et+Xt*Ut,Zt=j-Math.round(j)+Mt*Ut+Xt*Et,pr=new Float64Array(H);if(t.J(pr,pr,[Qt>.5?Qt-1:Qt,Zt>.5?Zt-1:Zt,0]),this.alignedModelViewProjectionMatrix=pr,H=t.at(new Float64Array(16),this.pixelMatrix),!H)throw new Error("failed to invert matrix");this.pixelMatrixInverse=H,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;const o=this.pointCoordinate(new t.P(0,0)),l=[o.x*this.worldSize,o.y*this.worldSize,0,1];return t.ag(l,l,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){const o=this._pitch,l=Math.tan(o)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new t.P(0,l))}getCameraQueryGeometry(o){const l=this.getCameraPoint();if(o.length===1)return[o[0],l];{let O=l.x,j=l.y,H=l.x,ie=l.y;for(const he of o)O=Math.min(O,he.x),j=Math.min(j,he.y),H=Math.max(H,he.x),ie=Math.max(ie,he.y);return[new t.P(O,j),new t.P(H,j),new t.P(H,ie),new t.P(O,ie),new t.P(O,j)]}}lngLatToCameraDepth(o,l){const O=this.locationCoordinate(o),j=[O.x*this.worldSize,O.y*this.worldSize,l,1];return t.ag(j,j,this.modelViewProjectionMatrix),j[2]/j[3]}}function Hs(F,o){let l,O=!1,j=null,H=null;const ie=()=>{j=null,O&&(F.apply(H,l),j=setTimeout(ie,o),O=!1)};return(...he)=>(O=!0,H=this,l=he,j||ie(),j)}class io{constructor(o){this._getCurrentHash=()=>{const l=window.location.hash.replace("#","");if(this._hashName){let O;return l.split("&").map(j=>j.split("=")).forEach(j=>{j[0]===this._hashName&&(O=j)}),(O&&O[1]||"").split("/")}return l.split("/")},this._onHashChange=()=>{const l=this._getCurrentHash();if(l.length>=3&&!l.some(O=>isNaN(O))){const O=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(l[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+l[2],+l[1]],zoom:+l[0],bearing:O,pitch:+(l[4]||0)}),!0}return!1},this._updateHashUnthrottled=()=>{const l=window.location.href.replace(/(#.+)?$/,this.getHashString());window.history.replaceState(window.history.state,null,l)},this._removeHash=()=>{const l=this._getCurrentHash();if(l.length===0)return;const O=l.join("/");let j=O;j.split("&").length>0&&(j=j.split("&")[0]),this._hashName&&(j=`${this._hashName}=${O}`);let H=window.location.hash.replace(j,"");H.startsWith("#&")?H=H.slice(0,1)+H.slice(2):H==="#"&&(H="");let ie=window.location.href.replace(/(#.+)?$/,H);ie=ie.replace("&&","&"),window.history.replaceState(window.history.state,null,ie)},this._updateHash=Hs(this._updateHashUnthrottled,300),this._hashName=o&&encodeURIComponent(o)}addTo(o){return this._map=o,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),this._removeHash(),delete this._map,this}getHashString(o){const l=this._map.getCenter(),O=Math.round(100*this._map.getZoom())/100,j=Math.ceil((O*Math.LN2+Math.log(512/360/.5))/Math.LN10),H=Math.pow(10,j),ie=Math.round(l.lng*H)/H,he=Math.round(l.lat*H)/H,we=this._map.getBearing(),Ee=this._map.getPitch();let De="";if(De+=o?`/${ie}/${he}/${O}`:`${O}/${he}/${ie}`,(we||Ee)&&(De+="/"+Math.round(10*we)/10),Ee&&(De+=`/${Math.round(Ee)}`),this._hashName){const qe=this._hashName;let it=!1;const ut=window.location.hash.slice(1).split("&").map(ht=>{const bt=ht.split("=")[0];return bt===qe?(it=!0,`${bt}=${De}`):ht}).filter(ht=>ht);return it||ut.push(`${qe}=${De}`),`#${ut.join("&")}`}return`#${De}`}}const Jo={linearity:.3,easing:t.b8(0,0,.3,1)},ra=t.e({deceleration:2500,maxSpeed:1400},Jo),oa=t.e({deceleration:20,maxSpeed:1400},Jo),As=t.e({deceleration:1e3,maxSpeed:360},Jo),xc=t.e({deceleration:1e3,maxSpeed:90},Jo);class ac{constructor(o){this._map=o,this.clear()}clear(){this._inertiaBuffer=[]}record(o){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:p.now(),settings:o})}_drainInertiaBuffer(){const o=this._inertiaBuffer,l=p.now();for(;o.length>0&&l-o[0].time>160;)o.shift()}_onMoveEnd(o){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const l={zoom:0,bearing:0,pitch:0,pan:new t.P(0,0),pinchAround:void 0,around:void 0};for(const{settings:H}of this._inertiaBuffer)l.zoom+=H.zoomDelta||0,l.bearing+=H.bearingDelta||0,l.pitch+=H.pitchDelta||0,H.panDelta&&l.pan._add(H.panDelta),H.around&&(l.around=H.around),H.pinchAround&&(l.pinchAround=H.pinchAround);const O=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,j={};if(l.pan.mag()){const H=Gl(l.pan.mag(),O,t.e({},ra,o||{}));j.offset=l.pan.mult(H.amount/l.pan.mag()),j.center=this._map.transform.center,Wl(j,H)}if(l.zoom){const H=Gl(l.zoom,O,oa);j.zoom=this._map.transform.zoom+H.amount,Wl(j,H)}if(l.bearing){const H=Gl(l.bearing,O,As);j.bearing=this._map.transform.bearing+t.ad(H.amount,-179,179),Wl(j,H)}if(l.pitch){const H=Gl(l.pitch,O,xc);j.pitch=this._map.transform.pitch+H.amount,Wl(j,H)}if(j.zoom||j.bearing){const H=l.pinchAround===void 0?l.around:l.pinchAround;j.around=H?this._map.unproject(H):this._map.getCenter()}return this.clear(),t.e(j,{noMoveStart:!0})}}function Wl(F,o){(!F.duration||F.duration<o.duration)&&(F.duration=o.duration,F.easing=o.easing)}function Gl(F,o,l){const{maxSpeed:O,linearity:j,deceleration:H}=l,ie=t.ad(F*j/(o/1e3),-O,O),he=Math.abs(ie)/(H*j);return{easing:l.easing,duration:1e3*he,amount:ie*(he/2)}}class Ro extends t.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(o,l,O,j={}){const H=n.mousePos(l.getCanvas(),O),ie=l.unproject(H);super(o,t.e({point:H,lngLat:ie,originalEvent:O},j)),this._defaultPrevented=!1,this.target=l}}class _o extends t.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(o,l,O){const j=o==="touchend"?O.changedTouches:O.touches,H=n.touchPos(l.getCanvasContainer(),j),ie=H.map(we=>l.unproject(we)),he=H.reduce((we,Ee,De,qe)=>we.add(Ee.div(qe.length)),new t.P(0,0));super(o,{points:H,point:he,lngLats:ie,lngLat:l.unproject(he),originalEvent:O}),this._defaultPrevented=!1}}class ol extends t.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(o,l,O){super(o,{originalEvent:O}),this._defaultPrevented=!1}}class oc{constructor(o,l){this._map=o,this._clickTolerance=l.clickTolerance}reset(){delete this._mousedownPos}wheel(o){return this._firePreventable(new ol(o.type,this._map,o))}mousedown(o,l){return this._mousedownPos=l,this._firePreventable(new Ro(o.type,this._map,o))}mouseup(o){this._map.fire(new Ro(o.type,this._map,o))}click(o,l){this._mousedownPos&&this._mousedownPos.dist(l)>=this._clickTolerance||this._map.fire(new Ro(o.type,this._map,o))}dblclick(o){return this._firePreventable(new Ro(o.type,this._map,o))}mouseover(o){this._map.fire(new Ro(o.type,this._map,o))}mouseout(o){this._map.fire(new Ro(o.type,this._map,o))}touchstart(o){return this._firePreventable(new _o(o.type,this._map,o))}touchmove(o){this._map.fire(new _o(o.type,this._map,o))}touchend(o){this._map.fire(new _o(o.type,this._map,o))}touchcancel(o){this._map.fire(new _o(o.type,this._map,o))}_firePreventable(o){if(this._map.fire(o),o.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Oo{constructor(o){this._map=o}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(o){this._map.fire(new Ro(o.type,this._map,o))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Ro("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(o){this._delayContextMenu?this._contextMenuEvent=o:this._ignoreContextMenu||this._map.fire(new Ro(o.type,this._map,o)),this._map.listens("contextmenu")&&o.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Ea{constructor(o){this._map=o}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(o){return this.transform.pointLocation(t.P.convert(o),this._map.terrain)}}class wo{constructor(o,l){this._map=o,this._tr=new Ea(o),this._el=o.getCanvasContainer(),this._container=o.getContainer(),this._clickTolerance=l.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(o,l){this.isEnabled()&&o.shiftKey&&o.button===0&&(n.disableDrag(),this._startPos=this._lastPos=l,this._active=!0)}mousemoveWindow(o,l){if(!this._active)return;const O=l;if(this._lastPos.equals(O)||!this._box&&O.dist(this._startPos)<this._clickTolerance)return;const j=this._startPos;this._lastPos=O,this._box||(this._box=n.create("div","maplibregl-boxzoom",this._container),this._container.classList.add("maplibregl-crosshair"),this._fireEvent("boxzoomstart",o));const H=Math.min(j.x,O.x),ie=Math.max(j.x,O.x),he=Math.min(j.y,O.y),we=Math.max(j.y,O.y);n.setTransform(this._box,`translate(${H}px,${he}px)`),this._box.style.width=ie-H+"px",this._box.style.height=we-he+"px"}mouseupWindow(o,l){if(!this._active||o.button!==0)return;const O=this._startPos,j=l;if(this.reset(),n.suppressClick(),O.x!==j.x||O.y!==j.y)return this._map.fire(new t.k("boxzoomend",{originalEvent:o})),{cameraAnimation:H=>H.fitScreenCoordinates(O,j,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",o)}keydown(o){this._active&&o.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",o))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(n.remove(this._box),this._box=null),n.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(o,l){return this._map.fire(new t.k(o,{originalEvent:l}))}}function ca(F,o){if(F.length!==o.length)throw new Error(`The number of touches and points are not equal - touches ${F.length}, points ${o.length}`);const l={};for(let O=0;O<F.length;O++)l[F[O].identifier]=o[O];return l}class ao{constructor(o){this.reset(),this.numTouches=o.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(o,l,O){(this.centroid||O.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=o.timeStamp),O.length===this.numTouches&&(this.centroid=(function(j){const H=new t.P(0,0);for(const ie of j)H._add(ie);return H.div(j.length)})(l),this.touches=ca(O,l)))}touchmove(o,l,O){if(this.aborted||!this.centroid)return;const j=ca(O,l);for(const H in this.touches){const ie=this.touches[H],he=j[H];(!he||he.dist(ie)>30)&&(this.aborted=!0)}}touchend(o,l,O){if((!this.centroid||o.timeStamp-this.startTime>500)&&(this.aborted=!0),O.length===0){const j=!this.aborted&&this.centroid;if(this.reset(),j)return j}}}class ua{constructor(o){this.singleTap=new ao(o),this.numTaps=o.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(o,l,O){this.singleTap.touchstart(o,l,O)}touchmove(o,l,O){this.singleTap.touchmove(o,l,O)}touchend(o,l,O){const j=this.singleTap.touchend(o,l,O);if(j){const H=o.timeStamp-this.lastTime<500,ie=!this.lastTap||this.lastTap.dist(j)<30;if(H&&ie||this.reset(),this.count++,this.lastTime=o.timeStamp,this.lastTap=j,this.count===this.numTaps)return this.reset(),j}}}class fo{constructor(o){this._tr=new Ea(o),this._zoomIn=new ua({numTouches:1,numTaps:2}),this._zoomOut=new ua({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(o,l,O){this._zoomIn.touchstart(o,l,O),this._zoomOut.touchstart(o,l,O)}touchmove(o,l,O){this._zoomIn.touchmove(o,l,O),this._zoomOut.touchmove(o,l,O)}touchend(o,l,O){const j=this._zoomIn.touchend(o,l,O),H=this._zoomOut.touchend(o,l,O),ie=this._tr;return j?(this._active=!0,o.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:he=>he.easeTo({duration:300,zoom:ie.zoom+1,around:ie.unproject(j)},{originalEvent:o})}):H?(this._active=!0,o.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:he=>he.easeTo({duration:300,zoom:ie.zoom-1,around:ie.unproject(H)},{originalEvent:o})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class To{constructor(o){this._enabled=!!o.enable,this._moveStateManager=o.moveStateManager,this._clickTolerance=o.clickTolerance||1,this._moveFunction=o.move,this._activateOnStart=!!o.activateOnStart,o.assignEvents(this),this.reset()}reset(o){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(o)}_move(...o){const l=this._moveFunction(...o);if(l.bearingDelta||l.pitchDelta||l.around||l.panDelta)return this._active=!0,l}dragStart(o,l){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(o)&&(this._moveStateManager.startMove(o),this._lastPoint=l.length?l[0]:l,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(o,l){if(!this.isEnabled())return;const O=this._lastPoint;if(!O)return;if(o.preventDefault(),!this._moveStateManager.isValidMoveEvent(o))return void this.reset(o);const j=l.length?l[0]:l;return!this._moved&&j.dist(O)<this._clickTolerance?void 0:(this._moved=!0,this._lastPoint=j,this._move(O,j))}dragEnd(o){this.isEnabled()&&this._lastPoint&&this._moveStateManager.isValidEndEvent(o)&&(this._moved&&n.suppressClick(),this.reset(o))}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}getClickTolerance(){return this._clickTolerance}}const sl={0:1,2:2};class is{constructor(o){this._correctEvent=o.checkCorrectEvent}startMove(o){const l=n.mouseButton(o);this._eventButton=l}endMove(o){delete this._eventButton}isValidStartEvent(o){return this._correctEvent(o)}isValidMoveEvent(o){return!(function(l,O){const j=sl[O];return l.buttons===void 0||(l.buttons&j)!==j})(o,this._eventButton)}isValidEndEvent(o){return n.mouseButton(o)===this._eventButton}}class Nl{constructor(){this._firstTouch=void 0}_isOneFingerTouch(o){return o.targetTouches.length===1}_isSameTouchEvent(o){return o.targetTouches[0].identifier===this._firstTouch}startMove(o){const l=o.targetTouches[0].identifier;this._firstTouch=l}endMove(o){delete this._firstTouch}isValidStartEvent(o){return this._isOneFingerTouch(o)}isValidMoveEvent(o){return this._isOneFingerTouch(o)&&this._isSameTouchEvent(o)}isValidEndEvent(o){return this._isOneFingerTouch(o)&&this._isSameTouchEvent(o)}}const No=F=>{F.mousedown=F.dragStart,F.mousemoveWindow=F.dragMove,F.mouseup=F.dragEnd,F.contextmenu=o=>{o.preventDefault()}},Hl=({enable:F,clickTolerance:o,bearingDegreesPerPixelMoved:l=.8})=>{const O=new is({checkCorrectEvent:j=>n.mouseButton(j)===0&&j.ctrlKey||n.mouseButton(j)===2});return new To({clickTolerance:o,move:(j,H)=>({bearingDelta:(H.x-j.x)*l}),moveStateManager:O,enable:F,assignEvents:No})},ll=({enable:F,clickTolerance:o,pitchDegreesPerPixelMoved:l=-.5})=>{const O=new is({checkCorrectEvent:j=>n.mouseButton(j)===0&&j.ctrlKey||n.mouseButton(j)===2});return new To({clickTolerance:o,move:(j,H)=>({pitchDelta:(H.y-j.y)*l}),moveStateManager:O,enable:F,assignEvents:No})};class Ls{constructor(o,l){this._clickTolerance=o.clickTolerance||1,this._map=l,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new t.P(0,0)}_shouldBePrevented(o){return o<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(o,l,O){return this._calculateTransform(o,l,O)}touchmove(o,l,O){if(this._active){if(!this._shouldBePrevented(O.length))return o.preventDefault(),this._calculateTransform(o,l,O);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",o)}}touchend(o,l,O){this._calculateTransform(o,l,O),this._active&&this._shouldBePrevented(O.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(o,l,O){O.length>0&&(this._active=!0);const j=ca(O,l),H=new t.P(0,0),ie=new t.P(0,0);let he=0;for(const Ee in j){const De=j[Ee],qe=this._touches[Ee];qe&&(H._add(De),ie._add(De.sub(qe)),he++,j[Ee]=De)}if(this._touches=j,this._shouldBePrevented(he)||!ie.mag())return;const we=ie.div(he);return this._sum._add(we),this._sum.mag()<this._clickTolerance?void 0:{around:H.div(he),panDelta:we}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class mo{constructor(){this.reset()}reset(){this._active=!1,delete this._firstTwoTouches}touchstart(o,l,O){this._firstTwoTouches||O.length<2||(this._firstTwoTouches=[O[0].identifier,O[1].identifier],this._start([l[0],l[1]]))}touchmove(o,l,O){if(!this._firstTwoTouches)return;o.preventDefault();const[j,H]=this._firstTwoTouches,ie=xa(O,l,j),he=xa(O,l,H);if(!ie||!he)return;const we=this._aroundCenter?null:ie.add(he).div(2);return this._move([ie,he],we,o)}touchend(o,l,O){if(!this._firstTwoTouches)return;const[j,H]=this._firstTwoTouches,ie=xa(O,l,j),he=xa(O,l,H);ie&&he||(this._active&&n.suppressClick(),this.reset())}touchcancel(){this.reset()}enable(o){this._enabled=!0,this._aroundCenter=!!o&&o.around==="center"}disable(){this._enabled=!1,this.reset()}isEnabled(){return!!this._enabled}isActive(){return!!this._active}}function xa(F,o,l){for(let O=0;O<F.length;O++)if(F[O].identifier===l)return o[O]}function Rs(F,o){return Math.log(F/o)/Math.LN2}class gi extends mo{reset(){super.reset(),delete this._distance,delete this._startDistance}_start(o){this._startDistance=this._distance=o[0].dist(o[1])}_move(o,l){const O=this._distance;if(this._distance=o[0].dist(o[1]),this._active||!(Math.abs(Rs(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:Rs(this._distance,O),pinchAround:l}}}function bc(F,o){return 180*F.angleWith(o)/Math.PI}class Jc extends mo{reset(){super.reset(),delete this._minDiameter,delete this._startVector,delete this._vector}_start(o){this._startVector=this._vector=o[0].sub(o[1]),this._minDiameter=o[0].dist(o[1])}_move(o,l,O){const j=this._vector;if(this._vector=o[0].sub(o[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:bc(this._vector,j),pinchAround:l}}_isBelowThreshold(o){this._minDiameter=Math.min(this._minDiameter,o.mag());const l=25/(Math.PI*this._minDiameter)*360,O=bc(o,this._startVector);return Math.abs(O)<l}}function cl(F){return Math.abs(F.y)>Math.abs(F.x)}class Il extends mo{constructor(o){super(),this._currentTouchCount=0,this._map=o}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(o,l,O){super.touchstart(o,l,O),this._currentTouchCount=O.length}_start(o){this._lastPoints=o,cl(o[0].sub(o[1]))&&(this._valid=!1)}_move(o,l,O){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;const j=o[0].sub(this._lastPoints[0]),H=o[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(j,H,O.timeStamp),this._valid?(this._lastPoints=o,this._active=!0,{pitchDelta:(j.y+H.y)/2*-.5}):void 0}gestureBeginsVertically(o,l,O){if(this._valid!==void 0)return this._valid;const j=o.mag()>=2,H=l.mag()>=2;if(!j&&!H)return;if(!j||!H)return this._firstMove===void 0&&(this._firstMove=O),O-this._firstMove<100&&void 0;const ie=o.y>0==l.y>0;return cl(o)&&cl(l)&&ie}}const Pl={panStep:100,bearingStep:15,pitchStep:10};class sc{constructor(o){this._tr=new Ea(o);const l=Pl;this._panStep=l.panStep,this._bearingStep=l.bearingStep,this._pitchStep=l.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(o){if(o.altKey||o.ctrlKey||o.metaKey)return;let l=0,O=0,j=0,H=0,ie=0;switch(o.keyCode){case 61:case 107:case 171:case 187:l=1;break;case 189:case 109:case 173:l=-1;break;case 37:o.shiftKey?O=-1:(o.preventDefault(),H=-1);break;case 39:o.shiftKey?O=1:(o.preventDefault(),H=1);break;case 38:o.shiftKey?j=1:(o.preventDefault(),ie=-1);break;case 40:o.shiftKey?j=-1:(o.preventDefault(),ie=1);break;default:return}return this._rotationDisabled&&(O=0,j=0),{cameraAnimation:he=>{const we=this._tr;he.easeTo({duration:300,easeId:"keyboardHandler",easing:ti,zoom:l?Math.round(we.zoom)+l*(o.shiftKey?2:1):we.zoom,bearing:we.bearing+O*this._bearingStep,pitch:we.pitch+j*this._pitchStep,offset:[-H*this._panStep,-ie*this._panStep],center:we.center},{originalEvent:o})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function ti(F){return F*(2-F)}const as=4.000244140625;class ul{constructor(o,l){this._onTimeout=O=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(O)},this._map=o,this._tr=new Ea(o),this._triggerRenderFrame=l,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(o){this._defaultZoomRate=o}setWheelZoomRate(o){this._wheelZoomRate=o}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(o){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!o&&o.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(o){return!!this._map.cooperativeGestures.isEnabled()&&!(o.ctrlKey||this._map.cooperativeGestures.isBypassed(o))}wheel(o){if(!this.isEnabled())return;if(this._shouldBePrevented(o))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",o);let l=o.deltaMode===WheelEvent.DOM_DELTA_LINE?40*o.deltaY:o.deltaY;const O=p.now(),j=O-(this._lastWheelEventTime||0);this._lastWheelEventTime=O,l!==0&&l%as==0?this._type="wheel":l!==0&&Math.abs(l)<4?this._type="trackpad":j>400?(this._type=null,this._lastValue=l,this._timeout=setTimeout(this._onTimeout,40,o)):this._type||(this._type=Math.abs(j*l)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,l+=this._lastValue)),o.shiftKey&&l&&(l/=4),this._type&&(this._lastWheelEvent=o,this._delta-=l,this._active||this._start(o)),o.preventDefault()}_start(o){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);const l=n.mousePos(this._map.getCanvas(),o),O=this._tr;l.y>O.transform.height/2-O.transform.getHorizon()?this._around=t.N.convert(this._aroundCenter?O.center:O.unproject(l)):this._around=t.N.convert(O.center),this._aroundPoint=O.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;const o=this._tr.transform;if(this._delta!==0){const we=this._type==="wheel"&&Math.abs(this._delta)>as?this._wheelZoomRate:this._defaultZoomRate;let Ee=2/(1+Math.exp(-Math.abs(this._delta*we)));this._delta<0&&Ee!==0&&(Ee=1/Ee);const De=typeof this._targetZoom=="number"?o.zoomScale(this._targetZoom):o.scale;this._targetZoom=Math.min(o.maxZoom,Math.max(o.minZoom,o.scaleZoom(De*Ee))),this._type==="wheel"&&(this._startZoom=o.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const l=typeof this._targetZoom=="number"?this._targetZoom:o.zoom,O=this._startZoom,j=this._easing;let H,ie=!1;const he=p.now()-this._lastWheelEventTime;if(this._type==="wheel"&&O&&j&&he){const we=Math.min(he/200,1),Ee=j(we);H=t.z.number(O,l,Ee),we<1?this._frameId||(this._frameId=!0):ie=!0}else H=l,ie=!0;return this._active=!0,ie&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!ie,zoomDelta:H-o.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(o){let l=t.b9;if(this._prevEase){const O=this._prevEase,j=(p.now()-O.start)/O.duration,H=O.easing(j+.01)-O.easing(j),ie=.27/Math.sqrt(H*H+1e-4)*.01,he=Math.sqrt(.0729-ie*ie);l=t.b8(ie,he,.25,1)}return this._prevEase={start:p.now(),duration:o,easing:l},l}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class Ma{constructor(o,l){this._clickZoom=o,this._tapZoom=l}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class Ko{constructor(o){this._tr=new Ea(o),this.reset()}reset(){this._active=!1}dblclick(o,l){return o.preventDefault(),{cameraAnimation:O=>{O.easeTo({duration:300,zoom:this._tr.zoom+(o.shiftKey?-1:1),around:this._tr.unproject(l)},{originalEvent:o})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class dl{constructor(){this._tap=new ua({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(o,l,O){if(!this._swipePoint)if(this._tapTime){const j=l[0],H=o.timeStamp-this._tapTime<500,ie=this._tapPoint.dist(j)<30;H&&ie?O.length>0&&(this._swipePoint=j,this._swipeTouch=O[0].identifier):this.reset()}else this._tap.touchstart(o,l,O)}touchmove(o,l,O){if(this._tapTime){if(this._swipePoint){if(O[0].identifier!==this._swipeTouch)return;const j=l[0],H=j.y-this._swipePoint.y;return this._swipePoint=j,o.preventDefault(),this._active=!0,{zoomDelta:H/128}}}else this._tap.touchmove(o,l,O)}touchend(o,l,O){if(this._tapTime)this._swipePoint&&O.length===0&&this.reset();else{const j=this._tap.touchend(o,l,O);j&&(this._tapTime=o.timeStamp,this._tapPoint=j)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Ns{constructor(o,l,O){this._el=o,this._mousePan=l,this._touchPan=O}enable(o){this._inertiaOptions=o||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class zo{constructor(o,l,O){this._pitchWithRotate=o.pitchWithRotate,this._mouseRotate=l,this._mousePitch=O}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()}}class pl{constructor(o,l,O,j){this._el=o,this._touchZoom=l,this._touchRotate=O,this._tapDragZoom=j,this._rotationDisabled=!1,this._enabled=!0}enable(o){this._touchZoom.enable(o),this._rotationDisabled||this._touchRotate.enable(o),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class fs{constructor(o,l){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=o,this._options=l,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;const o=this._map.getCanvasContainer();o.classList.add("maplibregl-cooperative-gestures"),this._container=n.create("div","maplibregl-cooperative-gesture-screen",o);let l=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(l=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));const O=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),j=document.createElement("div");j.className="maplibregl-desktop-message",j.textContent=l,this._container.appendChild(j);const H=document.createElement("div");H.className="maplibregl-mobile-message",H.textContent=O,this._container.appendChild(H),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(n.remove(this._container),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(o){return o[this._bypassKey]}notifyGestureBlocked(o,l){this._enabled&&(this._map.fire(new t.k("cooperativegestureprevented",{gestureType:o,originalEvent:l})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}const Xo=F=>F.zoom||F.drag||F.pitch||F.rotate;class Is extends t.k{}function pi(F){return F.panDelta&&F.panDelta.mag()||F.zoomDelta||F.bearingDelta||F.pitchDelta}class $i{constructor(o,l){this.handleWindowEvent=j=>{this.handleEvent(j,`${j.type}Window`)},this.handleEvent=(j,H)=>{if(j.type==="blur")return void this.stop(!0);this._updatingCamera=!0;const ie=j.type==="renderFrame"?void 0:j,he={needsRenderFrame:!1},we={},Ee={},De=j.touches,qe=De?this._getMapTouches(De):void 0,it=qe?n.touchPos(this._map.getCanvas(),qe):n.mousePos(this._map.getCanvas(),j);for(const{handlerName:bt,handler:At,allowed:Et}of this._handlers){if(!At.isEnabled())continue;let Ut;this._blockedByActive(Ee,Et,bt)?At.reset():At[H||j.type]&&(Ut=At[H||j.type](j,it,qe),this.mergeHandlerResult(he,we,Ut,bt,ie),Ut&&Ut.needsRenderFrame&&this._triggerRenderFrame()),(Ut||At.isActive())&&(Ee[bt]=At)}const ut={};for(const bt in this._previousActiveHandlers)Ee[bt]||(ut[bt]=ie);this._previousActiveHandlers=Ee,(Object.keys(ut).length||pi(he))&&(this._changes.push([he,we,ut]),this._triggerRenderFrame()),(Object.keys(Ee).length||pi(he))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:ht}=he;ht&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],ht(this._map))},this._map=o,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new ac(o),this._bearingSnap=l.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(l);const O=this._el;this._listeners=[[O,"touchstart",{passive:!0}],[O,"touchmove",{passive:!1}],[O,"touchend",void 0],[O,"touchcancel",void 0],[O,"mousedown",void 0],[O,"mousemove",void 0],[O,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[O,"mouseover",void 0],[O,"mouseout",void 0],[O,"dblclick",void 0],[O,"click",void 0],[O,"keydown",{capture:!1}],[O,"keyup",void 0],[O,"wheel",{passive:!1}],[O,"contextmenu",void 0],[window,"blur",void 0]];for(const[j,H,ie]of this._listeners)n.addEventListener(j,H,j===document?this.handleWindowEvent:this.handleEvent,ie)}destroy(){for(const[o,l,O]of this._listeners)n.removeEventListener(o,l,o===document?this.handleWindowEvent:this.handleEvent,O)}_addDefaultHandlers(o){const l=this._map,O=l.getCanvasContainer();this._add("mapEvent",new oc(l,o));const j=l.boxZoom=new wo(l,o);this._add("boxZoom",j),o.interactive&&o.boxZoom&&j.enable();const H=l.cooperativeGestures=new fs(l,o.cooperativeGestures);this._add("cooperativeGestures",H),o.cooperativeGestures&&H.enable();const ie=new fo(l),he=new Ko(l);l.doubleClickZoom=new Ma(he,ie),this._add("tapZoom",ie),this._add("clickZoom",he),o.interactive&&o.doubleClickZoom&&l.doubleClickZoom.enable();const we=new dl;this._add("tapDragZoom",we);const Ee=l.touchPitch=new Il(l);this._add("touchPitch",Ee),o.interactive&&o.touchPitch&&l.touchPitch.enable(o.touchPitch);const De=Hl(o),qe=ll(o);l.dragRotate=new zo(o,De,qe),this._add("mouseRotate",De,["mousePitch"]),this._add("mousePitch",qe,["mouseRotate"]),o.interactive&&o.dragRotate&&l.dragRotate.enable();const it=(({enable:Ut,clickTolerance:Mt})=>{const Xt=new is({checkCorrectEvent:Qt=>n.mouseButton(Qt)===0&&!Qt.ctrlKey});return new To({clickTolerance:Mt,move:(Qt,Zt)=>({around:Zt,panDelta:Zt.sub(Qt)}),activateOnStart:!0,moveStateManager:Xt,enable:Ut,assignEvents:No})})(o),ut=new Ls(o,l);l.dragPan=new Ns(O,it,ut),this._add("mousePan",it),this._add("touchPan",ut,["touchZoom","touchRotate"]),o.interactive&&o.dragPan&&l.dragPan.enable(o.dragPan);const ht=new Jc,bt=new gi;l.touchZoomRotate=new pl(O,bt,ht,we),this._add("touchRotate",ht,["touchPan","touchZoom"]),this._add("touchZoom",bt,["touchPan","touchRotate"]),o.interactive&&o.touchZoomRotate&&l.touchZoomRotate.enable(o.touchZoomRotate);const At=l.scrollZoom=new ul(l,()=>this._triggerRenderFrame());this._add("scrollZoom",At,["mousePan"]),o.interactive&&o.scrollZoom&&l.scrollZoom.enable(o.scrollZoom);const Et=l.keyboard=new sc(l);this._add("keyboard",Et),o.interactive&&o.keyboard&&l.keyboard.enable(),this._add("blockableMapEvent",new Oo(l))}_add(o,l,O){this._handlers.push({handlerName:o,handler:l,allowed:O}),this._handlersById[o]=l}stop(o){if(!this._updatingCamera){for(const{handler:l}of this._handlers)l.reset();this._inertia.clear(),this._fireEvents({},{},o),this._changes=[]}}isActive(){for(const{handler:o}of this._handlers)if(o.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!Xo(this._eventsInProgress)||this.isZooming()}_blockedByActive(o,l,O){for(const j in o)if(j!==O&&(!l||l.indexOf(j)<0))return!0;return!1}_getMapTouches(o){const l=[];for(const O of o){const j=O.target;this._el.contains(j)&&l.push(O)}return l}mergeHandlerResult(o,l,O,j,H){if(!O)return;t.e(o,O);const ie={handlerName:j,originalEvent:O.originalEvent||H};O.zoomDelta!==void 0&&(l.zoom=ie),O.panDelta!==void 0&&(l.drag=ie),O.pitchDelta!==void 0&&(l.pitch=ie),O.bearingDelta!==void 0&&(l.rotate=ie)}_applyChanges(){const o={},l={},O={};for(const[j,H,ie]of this._changes)j.panDelta&&(o.panDelta=(o.panDelta||new t.P(0,0))._add(j.panDelta)),j.zoomDelta&&(o.zoomDelta=(o.zoomDelta||0)+j.zoomDelta),j.bearingDelta&&(o.bearingDelta=(o.bearingDelta||0)+j.bearingDelta),j.pitchDelta&&(o.pitchDelta=(o.pitchDelta||0)+j.pitchDelta),j.around!==void 0&&(o.around=j.around),j.pinchAround!==void 0&&(o.pinchAround=j.pinchAround),j.noInertia&&(o.noInertia=j.noInertia),t.e(l,H),t.e(O,ie);this._updateMapTransform(o,l,O),this._changes=[]}_updateMapTransform(o,l,O){const j=this._map,H=j._getTransformForUpdate(),ie=j.terrain;if(!(pi(o)||ie&&this._terrainMovement))return this._fireEvents(l,O,!0);let{panDelta:he,zoomDelta:we,bearingDelta:Ee,pitchDelta:De,around:qe,pinchAround:it}=o;it!==void 0&&(qe=it),j._stop(!0),qe=qe||j.transform.centerPoint;const ut=H.pointLocation(he?qe.sub(he):qe);Ee&&(H.bearing+=Ee),De&&(H.pitch+=De),we&&(H.zoom+=we),ie?this._terrainMovement||!l.drag&&!l.zoom?l.drag&&this._terrainMovement?H.center=H.pointLocation(H.centerPoint.sub(he)):H.setLocationAtPoint(ut,qe):(this._terrainMovement=!0,this._map._elevationFreeze=!0,H.setLocationAtPoint(ut,qe)):H.setLocationAtPoint(ut,qe),j._applyUpdatedTransform(H),this._map._update(),o.noInertia||this._inertia.record(o),this._fireEvents(l,O,!0)}_fireEvents(o,l,O){const j=Xo(this._eventsInProgress),H=Xo(o),ie={};for(const qe in o){const{originalEvent:it}=o[qe];this._eventsInProgress[qe]||(ie[`${qe}start`]=it),this._eventsInProgress[qe]=o[qe]}!j&&H&&this._fireEvent("movestart",H.originalEvent);for(const qe in ie)this._fireEvent(qe,ie[qe]);H&&this._fireEvent("move",H.originalEvent);for(const qe in o){const{originalEvent:it}=o[qe];this._fireEvent(qe,it)}const he={};let we;for(const qe in this._eventsInProgress){const{handlerName:it,originalEvent:ut}=this._eventsInProgress[qe];this._handlersById[it].isActive()||(delete this._eventsInProgress[qe],we=l[it]||ut,he[`${qe}end`]=we)}for(const qe in he)this._fireEvent(qe,he[qe]);const Ee=Xo(this._eventsInProgress),De=(j||H)&&!Ee;if(De&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;const qe=this._map._getTransformForUpdate();qe.recalculateZoom(this._map.terrain),this._map._applyUpdatedTransform(qe)}if(O&&De){this._updatingCamera=!0;const qe=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),it=ut=>ut!==0&&-this._bearingSnap<ut&&ut<this._bearingSnap;!qe||!qe.essential&&p.prefersReducedMotion?(this._map.fire(new t.k("moveend",{originalEvent:we})),it(this._map.getBearing())&&this._map.resetNorth()):(it(qe.bearing||this._map.getBearing())&&(qe.bearing=0),qe.freezeElevation=!0,this._map.easeTo(qe,{originalEvent:we})),this._updatingCamera=!1}}_fireEvent(o,l){this._map.fire(new t.k(o,l?{originalEvent:l}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add(o=>{delete this._frameId,this.handleEvent(new Is("renderFrame",{timeStamp:o})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class oo extends t.E{constructor(o,l){super(),this._renderFrameCallback=()=>{const O=Math.min((p.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(O)),O<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=o,this._bearingSnap=l.bearingSnap,this.on("moveend",()=>{delete this._requestedCameraState})}getCenter(){return new t.N(this.transform.center.lng,this.transform.center.lat)}setCenter(o,l){return this.jumpTo({center:o},l)}panBy(o,l,O){return o=t.P.convert(o).mult(-1),this.panTo(this.transform.center,t.e({offset:o},l),O)}panTo(o,l,O){return this.easeTo(t.e({center:o},l),O)}getZoom(){return this.transform.zoom}setZoom(o,l){return this.jumpTo({zoom:o},l),this}zoomTo(o,l,O){return this.easeTo(t.e({zoom:o},l),O)}zoomIn(o,l){return this.zoomTo(this.getZoom()+1,o,l),this}zoomOut(o,l){return this.zoomTo(this.getZoom()-1,o,l),this}getBearing(){return this.transform.bearing}setBearing(o,l){return this.jumpTo({bearing:o},l),this}getPadding(){return this.transform.padding}setPadding(o,l){return this.jumpTo({padding:o},l),this}rotateTo(o,l,O){return this.easeTo(t.e({bearing:o},l),O)}resetNorth(o,l){return this.rotateTo(0,t.e({duration:1e3},o),l),this}resetNorthPitch(o,l){return this.easeTo(t.e({bearing:0,pitch:0,duration:1e3},o),l),this}snapToNorth(o,l){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(o,l):this}getPitch(){return this.transform.pitch}setPitch(o,l){return this.jumpTo({pitch:o},l),this}cameraForBounds(o,l){o=Te.convert(o);const O=l&&l.bearing||0;return this._cameraForBoxAndBearing(o.getNorthWest(),o.getSouthEast(),O,l)}_cameraForBoxAndBearing(o,l,O,j){const H={top:0,bottom:0,right:0,left:0};if(typeof(j=t.e({padding:H,offset:[0,0],maxZoom:this.transform.maxZoom},j)).padding=="number"){const vn=j.padding;j.padding={top:vn,bottom:vn,right:vn,left:vn}}j.padding=t.e(H,j.padding);const ie=this.transform,he=ie.padding,we=new Te(o,l),Ee=ie.project(we.getNorthWest()),De=ie.project(we.getNorthEast()),qe=ie.project(we.getSouthEast()),it=ie.project(we.getSouthWest()),ut=t.ba(-O),ht=Ee.rotate(ut),bt=De.rotate(ut),At=qe.rotate(ut),Et=it.rotate(ut),Ut=new t.P(Math.max(ht.x,bt.x,Et.x,At.x),Math.max(ht.y,bt.y,Et.y,At.y)),Mt=new t.P(Math.min(ht.x,bt.x,Et.x,At.x),Math.min(ht.y,bt.y,Et.y,At.y)),Xt=Ut.sub(Mt),Qt=(ie.width-(he.left+he.right+j.padding.left+j.padding.right))/Xt.x,Zt=(ie.height-(he.top+he.bottom+j.padding.top+j.padding.bottom))/Xt.y;if(Zt<0||Qt<0)return void t.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.");const pr=Math.min(ie.scaleZoom(ie.scale*Math.min(Qt,Zt)),j.maxZoom),Tr=t.P.convert(j.offset),Br=(j.padding.left-j.padding.right)/2,Dr=(j.padding.top-j.padding.bottom)/2,Gr=new t.P(Br,Dr).rotate(t.ba(O)),Zr=Tr.add(Gr).mult(ie.scale/ie.zoomScale(pr));return{center:ie.unproject(Ee.add(qe).div(2).sub(Zr)),zoom:pr,bearing:O}}fitBounds(o,l,O){return this._fitInternal(this.cameraForBounds(o,l),l,O)}fitScreenCoordinates(o,l,O,j,H){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(t.P.convert(o)),this.transform.pointLocation(t.P.convert(l)),O,j),j,H)}_fitInternal(o,l,O){return o?(delete(l=t.e(o,l)).padding,l.linear?this.easeTo(l,O):this.flyTo(l,O)):this}jumpTo(o,l){this.stop();const O=this._getTransformForUpdate();let j=!1,H=!1,ie=!1;return"zoom"in o&&O.zoom!==+o.zoom&&(j=!0,O.zoom=+o.zoom),o.center!==void 0&&(O.center=t.N.convert(o.center)),"bearing"in o&&O.bearing!==+o.bearing&&(H=!0,O.bearing=+o.bearing),"pitch"in o&&O.pitch!==+o.pitch&&(ie=!0,O.pitch=+o.pitch),o.padding==null||O.isPaddingEqual(o.padding)||(O.padding=o.padding),this._applyUpdatedTransform(O),this.fire(new t.k("movestart",l)).fire(new t.k("move",l)),j&&this.fire(new t.k("zoomstart",l)).fire(new t.k("zoom",l)).fire(new t.k("zoomend",l)),H&&this.fire(new t.k("rotatestart",l)).fire(new t.k("rotate",l)).fire(new t.k("rotateend",l)),ie&&this.fire(new t.k("pitchstart",l)).fire(new t.k("pitch",l)).fire(new t.k("pitchend",l)),this.fire(new t.k("moveend",l))}calculateCameraOptionsFromTo(o,l,O,j=0){const H=t.Z.fromLngLat(o,l),ie=t.Z.fromLngLat(O,j),he=ie.x-H.x,we=ie.y-H.y,Ee=ie.z-H.z,De=Math.hypot(he,we,Ee);if(De===0)throw new Error("Can't calculate camera options with same From and To");const qe=Math.hypot(he,we),it=this.transform.scaleZoom(this.transform.cameraToCenterDistance/De/this.transform.tileSize),ut=180*Math.atan2(he,-we)/Math.PI;let ht=180*Math.acos(qe/De)/Math.PI;return ht=Ee<0?90-ht:90+ht,{center:ie.toLngLat(),zoom:it,pitch:ht,bearing:ut}}easeTo(o,l){var O;this._stop(!1,o.easeId),((o=t.e({offset:[0,0],duration:500,easing:t.b9},o)).animate===!1||!o.essential&&p.prefersReducedMotion)&&(o.duration=0);const j=this._getTransformForUpdate(),H=j.zoom,ie=j.bearing,he=j.pitch,we=j.padding,Ee="bearing"in o?this._normalizeBearing(o.bearing,ie):ie,De="pitch"in o?+o.pitch:he,qe="padding"in o?o.padding:j.padding,it=t.P.convert(o.offset);let ut=j.centerPoint.add(it);const ht=j.pointLocation(ut),{center:bt,zoom:At}=j.getConstrained(t.N.convert(o.center||ht),(O=o.zoom)!==null&&O!==void 0?O:H);this._normalizeCenter(bt,j);const Et=j.project(ht),Ut=j.project(bt).sub(Et),Mt=j.zoomScale(At-H);let Xt,Qt;o.around&&(Xt=t.N.convert(o.around),Qt=j.locationPoint(Xt));const Zt={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||At!==H,this._rotating=this._rotating||ie!==Ee,this._pitching=this._pitching||De!==he,this._padding=!j.isPaddingEqual(qe),this._easeId=o.easeId,this._prepareEase(l,o.noMoveStart,Zt),this.terrain&&this._prepareElevation(bt),this._ease(pr=>{if(this._zooming&&(j.zoom=t.z.number(H,At,pr)),this._rotating&&(j.bearing=t.z.number(ie,Ee,pr)),this._pitching&&(j.pitch=t.z.number(he,De,pr)),this._padding&&(j.interpolatePadding(we,qe,pr),ut=j.centerPoint.add(it)),this.terrain&&!o.freezeElevation&&this._updateElevation(pr),Xt)j.setLocationAtPoint(Xt,Qt);else{const Tr=j.zoomScale(j.zoom-H),Br=At>H?Math.min(2,Mt):Math.max(.5,Mt),Dr=Math.pow(Br,1-pr),Gr=j.unproject(Et.add(Ut.mult(pr*Dr)).mult(Tr));j.setLocationAtPoint(j.renderWorldCopies?Gr.wrap():Gr,ut)}this._applyUpdatedTransform(j),this._fireMoveEvents(l)},pr=>{this.terrain&&o.freezeElevation&&this._finalizeElevation(),this._afterEase(l,pr)},o),this}_prepareEase(o,l,O={}){this._moving=!0,l||O.moving||this.fire(new t.k("movestart",o)),this._zooming&&!O.zooming&&this.fire(new t.k("zoomstart",o)),this._rotating&&!O.rotating&&this.fire(new t.k("rotatestart",o)),this._pitching&&!O.pitching&&this.fire(new t.k("pitchstart",o))}_prepareElevation(o){this._elevationCenter=o,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(o,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(o){this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);const l=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(o<1&&l!==this._elevationTarget){const O=this._elevationTarget-this._elevationStart,j=(l-(O*o+this._elevationStart))/(1-o);this._elevationStart+=o*(O-j),this._elevationTarget=l}this.transform.elevation=t.z.number(this._elevationStart,this._elevationTarget,o)}_finalizeElevation(){this._elevationFreeze=!1,this.transform.recalculateZoom(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(o){const l=o.getCameraPosition(),O=this.terrain.getElevationForLngLatZoom(l.lngLat,o.zoom);if(l.altitude<O){const j=this.calculateCameraOptionsFromTo(l.lngLat,O,o.center,o.elevation);return{pitch:j.pitch,zoom:j.zoom}}return{}}_applyUpdatedTransform(o){const l=[];if(this.terrain&&l.push(j=>this._elevateCameraIfInsideTerrain(j)),this.transformCameraUpdate&&l.push(j=>this.transformCameraUpdate(j)),!l.length)return;const O=o.clone();for(const j of l){const H=O.clone(),{center:ie,zoom:he,pitch:we,bearing:Ee,elevation:De}=j(H);ie&&(H.center=ie),he!==void 0&&(H.zoom=he),we!==void 0&&(H.pitch=we),Ee!==void 0&&(H.bearing=Ee),De!==void 0&&(H.elevation=De),O.apply(H)}this.transform.apply(O)}_fireMoveEvents(o){this.fire(new t.k("move",o)),this._zooming&&this.fire(new t.k("zoom",o)),this._rotating&&this.fire(new t.k("rotate",o)),this._pitching&&this.fire(new t.k("pitch",o))}_afterEase(o,l){if(this._easeId&&l&&this._easeId===l)return;delete this._easeId;const O=this._zooming,j=this._rotating,H=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,O&&this.fire(new t.k("zoomend",o)),j&&this.fire(new t.k("rotateend",o)),H&&this.fire(new t.k("pitchend",o)),this.fire(new t.k("moveend",o))}flyTo(o,l){var O;if(!o.essential&&p.prefersReducedMotion){const on=t.M(o,["center","zoom","bearing","pitch","around"]);return this.jumpTo(on,l)}this.stop(),o=t.e({offset:[0,0],speed:1.2,curve:1.42,easing:t.b9},o);const j=this._getTransformForUpdate(),H=j.zoom,ie=j.bearing,he=j.pitch,we=j.padding,Ee="bearing"in o?this._normalizeBearing(o.bearing,ie):ie,De="pitch"in o?+o.pitch:he,qe="padding"in o?o.padding:j.padding,it=t.P.convert(o.offset);let ut=j.centerPoint.add(it);const ht=j.pointLocation(ut),{center:bt,zoom:At}=j.getConstrained(t.N.convert(o.center||ht),(O=o.zoom)!==null&&O!==void 0?O:H);this._normalizeCenter(bt,j);const Et=j.zoomScale(At-H),Ut=j.project(ht),Mt=j.project(bt).sub(Ut);let Xt=o.curve;const Qt=Math.max(j.width,j.height),Zt=Qt/Et,pr=Mt.mag();if("minZoom"in o){const on=t.ad(Math.min(o.minZoom,H,At),j.minZoom,j.maxZoom),Sn=Qt/j.zoomScale(on-H);Xt=Math.sqrt(Sn/pr*2)}const Tr=Xt*Xt;function Br(on){const Sn=(Zt*Zt-Qt*Qt+(on?-1:1)*Tr*Tr*pr*pr)/(2*(on?Zt:Qt)*Tr*pr);return Math.log(Math.sqrt(Sn*Sn+1)-Sn)}function Dr(on){return(Math.exp(on)-Math.exp(-on))/2}function Gr(on){return(Math.exp(on)+Math.exp(-on))/2}const Zr=Br(!1);let vn=function(on){return Gr(Zr)/Gr(Zr+Xt*on)},$r=function(on){return Qt*((Gr(Zr)*(Dr(Sn=Zr+Xt*on)/Gr(Sn))-Dr(Zr))/Tr)/pr;var Sn},bn=(Br(!0)-Zr)/Xt;if(Math.abs(pr)<1e-6||!isFinite(bn)){if(Math.abs(Qt-Zt)<1e-6)return this.easeTo(o,l);const on=Zt<Qt?-1:1;bn=Math.abs(Math.log(Zt/Qt))/Xt,$r=()=>0,vn=Sn=>Math.exp(on*Xt*Sn)}if("duration"in o)o.duration=+o.duration;else{const on="screenSpeed"in o?+o.screenSpeed/Xt:+o.speed;o.duration=1e3*bn/on}return o.maxDuration&&o.duration>o.maxDuration&&(o.duration=0),this._zooming=!0,this._rotating=ie!==Ee,this._pitching=De!==he,this._padding=!j.isPaddingEqual(qe),this._prepareEase(l,!1),this.terrain&&this._prepareElevation(bt),this._ease(on=>{const Sn=on*bn,mn=1/vn(Sn);j.zoom=on===1?At:H+j.scaleZoom(mn),this._rotating&&(j.bearing=t.z.number(ie,Ee,on)),this._pitching&&(j.pitch=t.z.number(he,De,on)),this._padding&&(j.interpolatePadding(we,qe,on),ut=j.centerPoint.add(it)),this.terrain&&!o.freezeElevation&&this._updateElevation(on);const Rn=on===1?bt:j.unproject(Ut.add(Mt.mult($r(Sn))).mult(mn));j.setLocationAtPoint(j.renderWorldCopies?Rn.wrap():Rn,ut),this._applyUpdatedTransform(j),this._fireMoveEvents(l)},()=>{this.terrain&&o.freezeElevation&&this._finalizeElevation(),this._afterEase(l)},o),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(o,l){var O;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const j=this._onEaseEnd;delete this._onEaseEnd,j.call(this,l)}return o||(O=this.handlers)===null||O===void 0||O.stop(!1),this}_ease(o,l,O){O.animate===!1||O.duration===0?(o(1),l()):(this._easeStart=p.now(),this._easeOptions=O,this._onEaseFrame=o,this._onEaseEnd=l,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(o,l){o=t.b3(o,-180,180);const O=Math.abs(o-l);return Math.abs(o-360-l)<O&&(o-=360),Math.abs(o+360-l)<O&&(o+=360),o}_normalizeCenter(o,l){if(!l.renderWorldCopies||l.lngRange)return;const O=o.lng-l.center.lng;o.lng+=O>180?-360:O<-180?360:0}queryTerrainElevation(o){return this.terrain?this.terrain.getElevationForLngLatZoom(t.N.convert(o),this.transform.tileZoom)-this.transform.elevation:null}}const Bo={compact:!0,customAttribution:'<a href="https://maplibre.org/" target="_blank">MapLibre</a>'};class os{constructor(o=Bo){this._toggleAttribution=()=>{this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show")):(this._container.classList.add("maplibregl-compact-show"),this._container.removeAttribute("open")))},this._updateData=l=>{!l||l.sourceDataType!=="metadata"&&l.sourceDataType!=="visibility"&&l.dataType!=="style"&&l.type!=="terrain"||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact===!1?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=o}getDefaultPosition(){return"bottom-right"}onAdd(o){return this._map=o,this._compact=this.options.compact,this._container=n.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=n.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=n.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){n.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(o,l){const O=this._map._getUIString(`AttributionControl.${l}`);o.title=O,o.setAttribute("aria-label",O)}_updateAttributions(){if(!this._map.style)return;let o=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?o=o.concat(this.options.customAttribution.map(j=>typeof j!="string"?"":j)):typeof this.options.customAttribution=="string"&&o.push(this.options.customAttribution)),this._map.style.stylesheet){const j=this._map.style.stylesheet;this.styleOwner=j.owner,this.styleId=j.id}const l=this._map.style.sourceCaches;for(const j in l){const H=l[j];if(H.used||H.usedForTerrain){const ie=H.getSource();ie.attribution&&o.indexOf(ie.attribution)<0&&o.push(ie.attribution)}}o=o.filter(j=>String(j).trim()),o.sort((j,H)=>j.length-H.length),o=o.filter((j,H)=>{for(let ie=H+1;ie<o.length;ie++)if(o[ie].indexOf(j)>=0)return!1;return!0});const O=o.join(" | ");O!==this._attribHTML&&(this._attribHTML=O,o.length?(this._innerContainer.innerHTML=O,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class go{constructor(o={}){this._updateCompact=()=>{const l=this._container.children;if(l.length){const O=l[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&O.classList.add("maplibregl-compact"):O.classList.remove("maplibregl-compact")}},this.options=o}getDefaultPosition(){return"bottom-left"}onAdd(o){this._map=o,this._compact=this.options&&this.options.compact,this._container=n.create("div","maplibregl-ctrl");const l=n.create("a","maplibregl-ctrl-logo");return l.target="_blank",l.rel="noopener nofollow",l.href="https://maplibre.org/",l.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),l.setAttribute("rel","noopener nofollow"),this._container.appendChild(l),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){n.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class _c{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(o){const l=++this._id;return this._queue.push({callback:o,id:l,cancelled:!1}),l}remove(o){const l=this._currentlyRunning,O=l?this._queue.concat(l):this._queue;for(const j of O)if(j.id===o)return void(j.cancelled=!0)}run(o=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const l=this._currentlyRunning=this._queue;this._queue=[];for(const O of l)if(!O.cancelled&&(O.callback(o),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var ci=t.Y([{name:"a_pos3d",type:"Int16",components:3}]);class Do extends t.E{constructor(o){super(),this.sourceCache=o,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,o.usedForTerrain=!0,o.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(o,l){this.sourceCache.update(o,l),this._renderableTilesKeys=[];const O={};for(const j of o.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:l}))O[j.key]=!0,this._renderableTilesKeys.push(j.key),this._tiles[j.key]||(j.posMatrix=new Float64Array(16),t.aQ(j.posMatrix,0,t.X,0,t.X,0,1),this._tiles[j.key]=new ke(j,this.tileSize));for(const j in this._tiles)O[j]||delete this._tiles[j]}freeRtt(o){for(const l in this._tiles){const O=this._tiles[l];(!o||O.tileID.equals(o)||O.tileID.isChildOf(o)||o.isChildOf(O.tileID))&&(O.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(o=>this.getTileByID(o))}getTileByID(o){return this._tiles[o]}getTerrainCoords(o){const l={};for(const O of this._renderableTilesKeys){const j=this._tiles[O].tileID;if(j.canonical.equals(o.canonical)){const H=o.clone();H.posMatrix=new Float64Array(16),t.aQ(H.posMatrix,0,t.X,0,t.X,0,1),l[O]=H}else if(j.canonical.isChildOf(o.canonical)){const H=o.clone();H.posMatrix=new Float64Array(16);const ie=j.canonical.z-o.canonical.z,he=j.canonical.x-(j.canonical.x>>ie<<ie),we=j.canonical.y-(j.canonical.y>>ie<<ie),Ee=t.X>>ie;t.aQ(H.posMatrix,0,Ee,0,Ee,0,1),t.J(H.posMatrix,H.posMatrix,[-he*Ee,-we*Ee,0]),l[O]=H}else if(o.canonical.isChildOf(j.canonical)){const H=o.clone();H.posMatrix=new Float64Array(16);const ie=o.canonical.z-j.canonical.z,he=o.canonical.x-(o.canonical.x>>ie<<ie),we=o.canonical.y-(o.canonical.y>>ie<<ie),Ee=t.X>>ie;t.aQ(H.posMatrix,0,t.X,0,t.X,0,1),t.J(H.posMatrix,H.posMatrix,[he*Ee,we*Ee,0]),t.K(H.posMatrix,H.posMatrix,[1/2**ie,1/2**ie,0]),l[O]=H}}return l}getSourceTile(o,l){const O=this.sourceCache._source;let j=o.overscaledZ-this.deltaZoom;if(j>O.maxzoom&&(j=O.maxzoom),j<O.minzoom)return null;this._sourceTileCache[o.key]||(this._sourceTileCache[o.key]=o.scaledTo(j).key);let H=this.sourceCache.getTileByID(this._sourceTileCache[o.key]);if((!H||!H.dem)&&l)for(;j>=O.minzoom&&(!H||!H.dem);)H=this.sourceCache.getTileByID(o.scaledTo(j--).key);return H}tilesAfterTime(o=Date.now()){return Object.values(this._tiles).filter(l=>l.timeAdded>=o)}}class ea{constructor(o,l,O){this.painter=o,this.sourceCache=new Do(l),this.options=O,this.exaggeration=typeof O.exaggeration=="number"?O.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(o,l,O,j=t.X){var H;if(!(l>=0&&l<j&&O>=0&&O<j))return 0;const ie=this.getTerrainData(o),he=(H=ie.tile)===null||H===void 0?void 0:H.dem;if(!he)return 0;const we=(function(ht,bt,At){var Et=bt[0],Ut=bt[1];return ht[0]=At[0]*Et+At[4]*Ut+At[12],ht[1]=At[1]*Et+At[5]*Ut+At[13],ht})([],[l/j*t.X,O/j*t.X],ie.u_terrain_matrix),Ee=[we[0]*he.dim,we[1]*he.dim],De=Math.floor(Ee[0]),qe=Math.floor(Ee[1]),it=Ee[0]-De,ut=Ee[1]-qe;return he.get(De,qe)*(1-it)*(1-ut)+he.get(De+1,qe)*it*(1-ut)+he.get(De,qe+1)*(1-it)*ut+he.get(De+1,qe+1)*it*ut}getElevationForLngLatZoom(o,l){const{tileID:O,mercatorX:j,mercatorY:H}=this._getOverscaledTileIDFromLngLatZoom(o,l);return this.getElevation(O,j%t.X,H%t.X,t.X)}getElevation(o,l,O,j=t.X){return this.getDEMElevation(o,l,O,j)*this.exaggeration}getTerrainData(o){if(!this._emptyDemTexture){const j=this.painter.context,H=new t.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new I(j,H,j.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new I(j,new t.R({width:1,height:1}),j.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(j.gl.NEAREST,j.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=t.ao([])}const l=this.sourceCache.getSourceTile(o,!0);if(l&&l.dem&&(!l.demTexture||l.needsTerrainPrepare)){const j=this.painter.context;l.demTexture=this.painter.getTileTexture(l.dem.stride),l.demTexture?l.demTexture.update(l.dem.getPixels(),{premultiply:!1}):l.demTexture=new I(j,l.dem.getPixels(),j.gl.RGBA,{premultiply:!1}),l.demTexture.bind(j.gl.NEAREST,j.gl.CLAMP_TO_EDGE),l.needsTerrainPrepare=!1}const O=l&&l+l.tileID.key+o.key;if(O&&!this._demMatrixCache[O]){const j=this.sourceCache.sourceCache._source.maxzoom;let H=o.canonical.z-l.tileID.canonical.z;o.overscaledZ>o.canonical.z&&(o.canonical.z>=j?H=o.canonical.z-j:t.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const ie=o.canonical.x-(o.canonical.x>>H<<H),he=o.canonical.y-(o.canonical.y>>H<<H),we=t.bb(new Float64Array(16),[1/(t.X<<H),1/(t.X<<H),0]);t.J(we,we,[ie*t.X,he*t.X,0]),this._demMatrixCache[o.key]={matrix:we,coord:o}}return{u_depth:2,u_terrain:3,u_terrain_dim:l&&l.dem&&l.dem.dim||1,u_terrain_matrix:O?this._demMatrixCache[o.key].matrix:this._emptyDemMatrix,u_terrain_unpack:l&&l.dem&&l.dem.getUnpackVector()||this._emptyDemUnpack,u_terrain_exaggeration:this.exaggeration,texture:(l&&l.demTexture||this._emptyDemTexture).texture,depthTexture:(this._fboDepthTexture||this._emptyDepthTexture).texture,tile:l}}getFramebuffer(o){const l=this.painter,O=l.width/devicePixelRatio,j=l.height/devicePixelRatio;return!this._fbo||this._fbo.width===O&&this._fbo.height===j||(this._fbo.destroy(),this._fboCoordsTexture.destroy(),this._fboDepthTexture.destroy(),delete this._fbo,delete this._fboDepthTexture,delete this._fboCoordsTexture),this._fboCoordsTexture||(this._fboCoordsTexture=new I(l.context,{width:O,height:j,data:null},l.context.gl.RGBA,{premultiply:!1}),this._fboCoordsTexture.bind(l.context.gl.NEAREST,l.context.gl.CLAMP_TO_EDGE)),this._fboDepthTexture||(this._fboDepthTexture=new I(l.context,{width:O,height:j,data:null},l.context.gl.RGBA,{premultiply:!1}),this._fboDepthTexture.bind(l.context.gl.NEAREST,l.context.gl.CLAMP_TO_EDGE)),this._fbo||(this._fbo=l.context.createFramebuffer(O,j,!0,!1),this._fbo.depthAttachment.set(l.context.createRenderbuffer(l.context.gl.DEPTH_COMPONENT16,O,j))),this._fbo.colorAttachment.set(o==="coords"?this._fboCoordsTexture.texture:this._fboDepthTexture.texture),this._fbo}getCoordsTexture(){const o=this.painter.context;if(this._coordsTexture)return this._coordsTexture;const l=new Uint8Array(this._coordsTextureSize*this._coordsTextureSize*4);for(let H=0,ie=0;H<this._coordsTextureSize;H++)for(let he=0;he<this._coordsTextureSize;he++,ie+=4)l[ie+0]=255&he,l[ie+1]=255&H,l[ie+2]=he>>8<<4|H>>8,l[ie+3]=0;const O=new t.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(l.buffer)),j=new I(o,O,o.gl.RGBA,{premultiply:!1});return j.bind(o.gl.NEAREST,o.gl.CLAMP_TO_EDGE),this._coordsTexture=j,j}pointCoordinate(o){this.painter.maybeDrawDepthAndCoords(!0);const l=new Uint8Array(4),O=this.painter.context,j=O.gl,H=Math.round(o.x*this.painter.pixelRatio/devicePixelRatio),ie=Math.round(o.y*this.painter.pixelRatio/devicePixelRatio),he=Math.round(this.painter.height/devicePixelRatio);O.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),j.readPixels(H,he-ie-1,1,1,j.RGBA,j.UNSIGNED_BYTE,l),O.bindFramebuffer.set(null);const we=l[0]+(l[2]>>4<<8),Ee=l[1]+((15&l[2])<<8),De=this.coordsIndex[255-l[3]],qe=De&&this.sourceCache.getTileByID(De);if(!qe)return null;const it=this._coordsTextureSize,ut=(1<<qe.tileID.canonical.z)*it;return new t.Z((qe.tileID.canonical.x*it+we)/ut+qe.tileID.wrap,(qe.tileID.canonical.y*it+Ee)/ut,this.getElevation(qe.tileID,we,Ee,it))}depthAtPoint(o){const l=new Uint8Array(4),O=this.painter.context,j=O.gl;return O.bindFramebuffer.set(this.getFramebuffer("depth").framebuffer),j.readPixels(o.x,this.painter.height/devicePixelRatio-o.y-1,1,1,j.RGBA,j.UNSIGNED_BYTE,l),O.bindFramebuffer.set(null),(l[0]/16777216+l[1]/65536+l[2]/256+l[3])/256}getTerrainMesh(){if(this._mesh)return this._mesh;const o=this.painter.context,l=new t.bc,O=new t.aY,j=this.meshSize,H=t.X/j,ie=j*j;for(let qe=0;qe<=j;qe++)for(let it=0;it<=j;it++)l.emplaceBack(it*H,qe*H,0);for(let qe=0;qe<ie;qe+=j+1)for(let it=0;it<j;it++)O.emplaceBack(it+qe,j+it+qe+1,j+it+qe+2),O.emplaceBack(it+qe,j+it+qe+2,it+qe+1);const he=l.length,we=he+2*(j+1);for(const qe of[0,1])for(let it=0;it<=j;it++)for(const ut of[0,1])l.emplaceBack(it*H,qe*t.X,ut);for(let qe=0;qe<2*j;qe+=2)O.emplaceBack(we+qe,we+qe+1,we+qe+3),O.emplaceBack(we+qe,we+qe+3,we+qe+2),O.emplaceBack(he+qe,he+qe+3,he+qe+1),O.emplaceBack(he+qe,he+qe+2,he+qe+3);const Ee=l.length,De=Ee+2*(j+1);for(const qe of[0,1])for(let it=0;it<=j;it++)for(const ut of[0,1])l.emplaceBack(qe*t.X,it*H,ut);for(let qe=0;qe<2*j;qe+=2)O.emplaceBack(Ee+qe,Ee+qe+1,Ee+qe+3),O.emplaceBack(Ee+qe,Ee+qe+3,Ee+qe+2),O.emplaceBack(De+qe,De+qe+3,De+qe+1),O.emplaceBack(De+qe,De+qe+2,De+qe+3);return this._mesh=new nc(o.createVertexBuffer(l,ci.members),o.createIndexBuffer(O),t.a0.simpleSegment(0,0,l.length,O.length)),this._mesh}getMeshFrameDelta(o){return 2*Math.PI*t.bd/Math.pow(2,o)/5}getMinTileElevationForLngLatZoom(o,l){var O;const{tileID:j}=this._getOverscaledTileIDFromLngLatZoom(o,l);return(O=this.getMinMaxElevation(j).minElevation)!==null&&O!==void 0?O:0}getMinMaxElevation(o){const l=this.getTerrainData(o).tile,O={minElevation:null,maxElevation:null};return l&&l.dem&&(O.minElevation=l.dem.min*this.exaggeration,O.maxElevation=l.dem.max*this.exaggeration),O}_getOverscaledTileIDFromLngLatZoom(o,l){const O=t.Z.fromLngLat(o.wrap()),j=(1<<l)*t.X,H=O.x*j,ie=O.y*j,he=Math.floor(H/t.X),we=Math.floor(ie/t.X);return{tileID:new t.S(l,0,l,he,we),mercatorX:H,mercatorY:ie}}}class Ol{constructor(o,l,O){this._context=o,this._size=l,this._tileSize=O,this._objects=[],this._recentlyUsed=[],this._stamp=0}destruct(){for(const o of this._objects)o.texture.destroy(),o.fbo.destroy()}_createObject(o){const l=this._context.createFramebuffer(this._tileSize,this._tileSize,!0,!0),O=new I(this._context,{width:this._tileSize,height:this._tileSize,data:null},this._context.gl.RGBA);return O.bind(this._context.gl.LINEAR,this._context.gl.CLAMP_TO_EDGE),l.depthAttachment.set(this._context.createRenderbuffer(this._context.gl.DEPTH_STENCIL,this._tileSize,this._tileSize)),l.colorAttachment.set(O.texture),{id:o,fbo:l,texture:O,stamp:-1,inUse:!1}}getObjectForId(o){return this._objects[o]}useObject(o){o.inUse=!0,this._recentlyUsed=this._recentlyUsed.filter(l=>o.id!==l),this._recentlyUsed.push(o.id)}stampObject(o){o.stamp=++this._stamp}getOrCreateFreeObject(){for(const l of this._recentlyUsed)if(!this._objects[l].inUse)return this._objects[l];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");const o=this._createObject(this._objects.length);return this._objects.push(o),o}freeObject(o){o.inUse=!1}freeAllObjects(){for(const o of this._objects)this.freeObject(o)}isFull(){return!(this._objects.length<this._size)&&this._objects.some(o=>!o.inUse)===!1}}const ms={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class Js{constructor(o,l){this.painter=o,this.terrain=l,this.pool=new Ol(o.context,30,l.sourceCache.tileSize*l.qualityFactor)}destruct(){this.pool.destruct()}getTexture(o){return this.pool.getObjectForId(o.rtt[this._stacks.length-1].id).texture}prepareForRender(o,l){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=o._order.filter(O=>!o._layers[O].isHidden(l)),this._coordsDescendingInv={};for(const O in o.sourceCaches){this._coordsDescendingInv[O]={};const j=o.sourceCaches[O].getVisibleCoordinates();for(const H of j){const ie=this.terrain.sourceCache.getTerrainCoords(H);for(const he in ie)this._coordsDescendingInv[O][he]||(this._coordsDescendingInv[O][he]=[]),this._coordsDescendingInv[O][he].push(ie[he])}}this._coordsDescendingInvStr={};for(const O of o._order){const j=o._layers[O],H=j.source;if(ms[j.type]&&!this._coordsDescendingInvStr[H]){this._coordsDescendingInvStr[H]={};for(const ie in this._coordsDescendingInv[H])this._coordsDescendingInvStr[H][ie]=this._coordsDescendingInv[H][ie].map(he=>he.key).sort().join()}}for(const O of this._renderableTiles)for(const j in this._coordsDescendingInvStr){const H=this._coordsDescendingInvStr[j][O.tileID.key];H&&H!==O.rttCoords[j]&&(O.rtt=[])}}renderLayer(o){if(o.isHidden(this.painter.transform.zoom))return!1;const l=o.type,O=this.painter,j=this._renderableLayerIds[this._renderableLayerIds.length-1]===o.id;if(ms[l]&&(this._prevType&&ms[this._prevType]||this._stacks.push([]),this._prevType=l,this._stacks[this._stacks.length-1].push(o.id),!j))return!0;if(ms[this._prevType]||ms[l]&&j){this._prevType=l;const H=this._stacks.length-1,ie=this._stacks[H]||[];for(const he of this._renderableTiles){if(this.pool.isFull()&&(rc(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(he),he.rtt[H]){const Ee=this.pool.getObjectForId(he.rtt[H].id);if(Ee.stamp===he.rtt[H].stamp){this.pool.useObject(Ee);continue}}const we=this.pool.getOrCreateFreeObject();this.pool.useObject(we),this.pool.stampObject(we),he.rtt[H]={id:we.id,stamp:we.stamp},O.context.bindFramebuffer.set(we.fbo.framebuffer),O.context.clear({color:t.aN.transparent,stencil:0}),O.currentStencilSource=void 0;for(let Ee=0;Ee<ie.length;Ee++){const De=O.style._layers[ie[Ee]],qe=De.source?this._coordsDescendingInv[De.source][he.tileID.key]:[he.tileID];O.context.viewport.set([0,0,we.fbo.width,we.fbo.height]),O._renderTileClippingMasks(De,qe),O.renderLayer(O,O.style.sourceCaches[De.source],De,qe),De.source&&(he.rttCoords[De.source]=this._coordsDescendingInvStr[De.source][he.tileID.key])}}return rc(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects(),ms[l]}return!1}}const Oc={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"MapLibre logo","Map.Title":"Map","Marker.Title":"Map marker","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","Popup.Close":"Close popup","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm","TerrainControl.Enable":"Enable terrain","TerrainControl.Disable":"Disable terrain","CooperativeGesturesHandler.WindowsHelpText":"Use Ctrl + scroll to zoom the map","CooperativeGesturesHandler.MacHelpText":"Use ⌘ + scroll to zoom the map","CooperativeGesturesHandler.MobileHelpText":"Use two fingers to move the map"},wc=w,hl={hash:!1,interactive:!0,bearingSnap:7,attributionControl:Bo,maplibreLogo:!1,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,refreshExpiredTiles:!0,scrollZoom:!0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,cooperativeGestures:!1,trackResize:!0,center:[0,0],zoom:0,bearing:0,pitch:0,renderWorldCopies:!0,maxTileCacheSize:null,maxTileCacheZoomLevels:t.a.MAX_TILE_CACHE_ZOOM_LEVELS,transformRequest:null,transformCameraUpdate:null,fadeDuration:300,crossSourceCollisions:!0,clickTolerance:3,localIdeographFontFamily:"sans-serif",pitchWithRotate:!0,validateStyle:!0,maxCanvasSize:[4096,4096],cancelPendingTileRequestsWhileZooming:!0},Ra=F=>{F.touchstart=F.dragStart,F.touchmoveWindow=F.dragMove,F.touchend=F.dragEnd},Ps={showCompass:!0,showZoom:!0,visualizePitch:!1};class ni{constructor(o,l,O=!1){this.mousedown=ie=>{this.startMouse(t.e({},ie,{ctrlKey:!0,preventDefault:()=>ie.preventDefault()}),n.mousePos(this.element,ie)),n.addEventListener(window,"mousemove",this.mousemove),n.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=ie=>{this.moveMouse(ie,n.mousePos(this.element,ie))},this.mouseup=ie=>{this.mouseRotate.dragEnd(ie),this.mousePitch&&this.mousePitch.dragEnd(ie),this.offTemp()},this.touchstart=ie=>{ie.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=n.touchPos(this.element,ie.targetTouches)[0],this.startTouch(ie,this._startPos),n.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),n.addEventListener(window,"touchend",this.touchend))},this.touchmove=ie=>{ie.targetTouches.length!==1?this.reset():(this._lastPos=n.touchPos(this.element,ie.targetTouches)[0],this.moveTouch(ie,this._lastPos))},this.touchend=ie=>{ie.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),delete this._startPos,delete this._lastPos,this.offTemp()},this.reset=()=>{this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),this.touchRotate.reset(),this.touchPitch&&this.touchPitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10;const j=o.dragRotate._mouseRotate.getClickTolerance(),H=o.dragRotate._mousePitch.getClickTolerance();this.element=l,this.mouseRotate=Hl({clickTolerance:j,enable:!0}),this.touchRotate=(({enable:ie,clickTolerance:he,bearingDegreesPerPixelMoved:we=.8})=>{const Ee=new Nl;return new To({clickTolerance:he,move:(De,qe)=>({bearingDelta:(qe.x-De.x)*we}),moveStateManager:Ee,enable:ie,assignEvents:Ra})})({clickTolerance:j,enable:!0}),this.map=o,O&&(this.mousePitch=ll({clickTolerance:H,enable:!0}),this.touchPitch=(({enable:ie,clickTolerance:he,pitchDegreesPerPixelMoved:we=-.5})=>{const Ee=new Nl;return new To({clickTolerance:he,move:(De,qe)=>({pitchDelta:(qe.y-De.y)*we}),moveStateManager:Ee,enable:ie,assignEvents:Ra})})({clickTolerance:H,enable:!0})),n.addEventListener(l,"mousedown",this.mousedown),n.addEventListener(l,"touchstart",this.touchstart,{passive:!1}),n.addEventListener(l,"touchcancel",this.reset)}startMouse(o,l){this.mouseRotate.dragStart(o,l),this.mousePitch&&this.mousePitch.dragStart(o,l),n.disableDrag()}startTouch(o,l){this.touchRotate.dragStart(o,l),this.touchPitch&&this.touchPitch.dragStart(o,l),n.disableDrag()}moveMouse(o,l){const O=this.map,{bearingDelta:j}=this.mouseRotate.dragMove(o,l)||{};if(j&&O.setBearing(O.getBearing()+j),this.mousePitch){const{pitchDelta:H}=this.mousePitch.dragMove(o,l)||{};H&&O.setPitch(O.getPitch()+H)}}moveTouch(o,l){const O=this.map,{bearingDelta:j}=this.touchRotate.dragMove(o,l)||{};if(j&&O.setBearing(O.getBearing()+j),this.touchPitch){const{pitchDelta:H}=this.touchPitch.dragMove(o,l)||{};H&&O.setPitch(O.getPitch()+H)}}off(){const o=this.element;n.removeEventListener(o,"mousedown",this.mousedown),n.removeEventListener(o,"touchstart",this.touchstart,{passive:!1}),n.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),n.removeEventListener(window,"touchend",this.touchend),n.removeEventListener(o,"touchcancel",this.reset),this.offTemp()}offTemp(){n.enableDrag(),n.removeEventListener(window,"mousemove",this.mousemove),n.removeEventListener(window,"mouseup",this.mouseup),n.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),n.removeEventListener(window,"touchend",this.touchend)}}let ki;function Zo(F,o,l){const O=new t.N(F.lng,F.lat);if(F=new t.N(F.lng,F.lat),o){const j=new t.N(F.lng-360,F.lat),H=new t.N(F.lng+360,F.lat),ie=l.locationPoint(F).distSqr(o);l.locationPoint(j).distSqr(o)<ie?F=j:l.locationPoint(H).distSqr(o)<ie&&(F=H)}for(;Math.abs(F.lng-l.center.lng)>180;){const j=l.locationPoint(F);if(j.x>=0&&j.y>=0&&j.x<=l.width&&j.y<=l.height)break;F.lng>l.center.lng?F.lng-=360:F.lng+=360}return F.lng!==O.lng&&l.locationPoint(F).y>l.height/2-l.getHorizon()?F:O}const Os={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function fl(F,o,l){const O=F.classList;for(const j in Os)O.remove(`maplibregl-${l}-anchor-${j}`);O.add(`maplibregl-${l}-anchor-${o}`)}class Ba extends t.E{constructor(o){if(super(),this._onKeyPress=l=>{const O=l.code,j=l.charCode||l.keyCode;O!=="Space"&&O!=="Enter"&&j!==32&&j!==13||this.togglePopup()},this._onMapClick=l=>{const O=l.originalEvent.target,j=this._element;this._popup&&(O===j||j.contains(O))&&this.togglePopup()},this._update=l=>{var O;if(!this._map)return;const j=this._map.loaded()&&!this._map.isMoving();((l==null?void 0:l.type)==="terrain"||(l==null?void 0:l.type)==="render"&&!j)&&this._map.once("render",this._update),this._map.transform.renderWorldCopies?this._lngLat=Zo(this._lngLat,this._flatPos,this._map.transform):this._lngLat=(O=this._lngLat)===null||O===void 0?void 0:O.wrap(),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationPoint(this._lngLat)._add(this._offset));let H="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?H=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(H=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let ie="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?ie="rotateX(0deg)":this._pitchAlignment==="map"&&(ie=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||l&&l.type!=="moveend"||(this._pos=this._pos.round()),n.setTransform(this._element,`${Os[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${ie} ${H}`),p.frameAsync(new AbortController).then(()=>{this._updateOpacity(l&&l.type==="moveend")}).catch(()=>{})},this._onMove=l=>{if(!this._isDragging){const O=this._clickTolerance||this._map._clickTolerance;this._isDragging=l.point.dist(this._pointerdownPos)>=O}this._isDragging&&(this._pos=l.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new t.k("dragstart"))),this.fire(new t.k("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new t.k("dragend")),this._state="inactive"},this._addDragHandler=l=>{this._element.contains(l.originalEvent.target)&&(l.preventDefault(),this._positionDelta=l.point.sub(this._pos).add(this._offset),this._pointerdownPos=l.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},this._anchor=o&&o.anchor||"center",this._color=o&&o.color||"#3FB1CE",this._scale=o&&o.scale||1,this._draggable=o&&o.draggable||!1,this._clickTolerance=o&&o.clickTolerance||0,this._subpixelPositioning=o&&o.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=o&&o.rotation||0,this._rotationAlignment=o&&o.rotationAlignment||"auto",this._pitchAlignment=o&&o.pitchAlignment&&o.pitchAlignment!=="auto"?o.pitchAlignment:this._rotationAlignment,this.setOpacity(),this.setOpacity(o==null?void 0:o.opacity,o==null?void 0:o.opacityWhenCovered),o&&o.element)this._element=o.element,this._offset=t.P.convert(o&&o.offset||[0,0]);else{this._defaultMarker=!0,this._element=n.create("div");const l=n.createNS("http://www.w3.org/2000/svg","svg"),O=41,j=27;l.setAttributeNS(null,"display","block"),l.setAttributeNS(null,"height",`${O}px`),l.setAttributeNS(null,"width",`${j}px`),l.setAttributeNS(null,"viewBox",`0 0 ${j} ${O}`);const H=n.createNS("http://www.w3.org/2000/svg","g");H.setAttributeNS(null,"stroke","none"),H.setAttributeNS(null,"stroke-width","1"),H.setAttributeNS(null,"fill","none"),H.setAttributeNS(null,"fill-rule","evenodd");const ie=n.createNS("http://www.w3.org/2000/svg","g");ie.setAttributeNS(null,"fill-rule","nonzero");const he=n.createNS("http://www.w3.org/2000/svg","g");he.setAttributeNS(null,"transform","translate(3.0, 29.0)"),he.setAttributeNS(null,"fill","#000000");const we=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];for(const Et of we){const Ut=n.createNS("http://www.w3.org/2000/svg","ellipse");Ut.setAttributeNS(null,"opacity","0.04"),Ut.setAttributeNS(null,"cx","10.5"),Ut.setAttributeNS(null,"cy","5.80029008"),Ut.setAttributeNS(null,"rx",Et.rx),Ut.setAttributeNS(null,"ry",Et.ry),he.appendChild(Ut)}const Ee=n.createNS("http://www.w3.org/2000/svg","g");Ee.setAttributeNS(null,"fill",this._color);const De=n.createNS("http://www.w3.org/2000/svg","path");De.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),Ee.appendChild(De);const qe=n.createNS("http://www.w3.org/2000/svg","g");qe.setAttributeNS(null,"opacity","0.25"),qe.setAttributeNS(null,"fill","#000000");const it=n.createNS("http://www.w3.org/2000/svg","path");it.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),qe.appendChild(it);const ut=n.createNS("http://www.w3.org/2000/svg","g");ut.setAttributeNS(null,"transform","translate(6.0, 7.0)"),ut.setAttributeNS(null,"fill","#FFFFFF");const ht=n.createNS("http://www.w3.org/2000/svg","g");ht.setAttributeNS(null,"transform","translate(8.0, 8.0)");const bt=n.createNS("http://www.w3.org/2000/svg","circle");bt.setAttributeNS(null,"fill","#000000"),bt.setAttributeNS(null,"opacity","0.25"),bt.setAttributeNS(null,"cx","5.5"),bt.setAttributeNS(null,"cy","5.5"),bt.setAttributeNS(null,"r","5.4999962");const At=n.createNS("http://www.w3.org/2000/svg","circle");At.setAttributeNS(null,"fill","#FFFFFF"),At.setAttributeNS(null,"cx","5.5"),At.setAttributeNS(null,"cy","5.5"),At.setAttributeNS(null,"r","5.4999962"),ht.appendChild(bt),ht.appendChild(At),ie.appendChild(he),ie.appendChild(Ee),ie.appendChild(qe),ie.appendChild(ut),ie.appendChild(ht),l.appendChild(ie),l.setAttributeNS(null,"height",O*this._scale+"px"),l.setAttributeNS(null,"width",j*this._scale+"px"),this._element.appendChild(l),this._offset=t.P.convert(o&&o.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",l=>{l.preventDefault()}),this._element.addEventListener("mousedown",l=>{l.preventDefault()}),fl(this._element,this._anchor,"marker"),o&&o.className)for(const l of o.className.split(" "))this._element.classList.add(l);this._popup=null}addTo(o){return this.remove(),this._map=o,this._element.setAttribute("aria-label",o._getUIString("Marker.Title")),o.getCanvasContainer().appendChild(this._element),o.on("move",this._update),o.on("moveend",this._update),o.on("terrain",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),n.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(o){return this._lngLat=t.N.convert(o),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(o){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),o){if(!("offset"in o.options)){const l=Math.abs(13.5)/Math.SQRT2;o.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[l,-1*(24.6+l)],"bottom-right":[-l,-1*(24.6+l)],left:[13.5,-24.6],right:[-13.5,-24.6]}:this._offset}this._popup=o,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(o){return this._subpixelPositioning=o,this}getPopup(){return this._popup}togglePopup(){const o=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:o?(o.isOpen()?o.remove():(o.setLngLat(this._lngLat),o.addTo(this._map)),this):this}_updateOpacity(o=!1){var l,O;if(!(!((l=this._map)===null||l===void 0)&&l.terrain))return void(this._element.style.opacity!==this._opacity&&(this._element.style.opacity=this._opacity));if(o)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}const j=this._map,H=j.terrain.depthAtPoint(this._pos),ie=j.terrain.getElevationForLngLatZoom(this._lngLat,j.transform.tileZoom);if(j.transform.lngLatToCameraDepth(this._lngLat,ie)-H<.006)return void(this._element.style.opacity=this._opacity);const he=-this._offset.y/j.transform._pixelPerMeter,we=Math.sin(j.getPitch()*Math.PI/180)*he,Ee=j.terrain.depthAtPoint(new t.P(this._pos.x,this._pos.y-this._offset.y)),De=j.transform.lngLatToCameraDepth(this._lngLat,ie+we)-Ee>.006;!((O=this._popup)===null||O===void 0)&&O.isOpen()&&De&&this._popup.remove(),this._element.style.opacity=De?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(o){return this._offset=t.P.convert(o),this._update(),this}addClassName(o){this._element.classList.add(o)}removeClassName(o){this._element.classList.remove(o)}toggleClassName(o){return this._element.classList.toggle(o)}setDraggable(o){return this._draggable=!!o,this._map&&(o?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(o){return this._rotation=o||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(o){return this._rotationAlignment=o||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(o){return this._pitchAlignment=o&&o!=="auto"?o:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(o,l){return o===void 0&&l===void 0&&(this._opacity="1",this._opacityWhenCovered="0.2"),o!==void 0&&(this._opacity=o),l!==void 0&&(this._opacityWhenCovered=l),this._map&&this._updateOpacity(!0),this}}const zl={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let Gi=0,Jl=!1;class fi extends t.E{constructor(o){super(),this._onSuccess=l=>{if(this._map){if(this._isOutOfMapMaxBounds(l))return this._setErrorState(),this.fire(new t.k("outofmaxbounds",l)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=l,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(l),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(l),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new t.k("geolocate",l)),this._finish()}},this._updateCamera=l=>{const O=new t.N(l.coords.longitude,l.coords.latitude),j=l.coords.accuracy,H=this._map.getBearing(),ie=t.e({bearing:H},this.options.fitBoundsOptions),he=Te.fromLngLat(O,j);this._map.fitBounds(he,ie,{geolocateSource:!0})},this._updateMarker=l=>{if(l){const O=new t.N(l.coords.longitude,l.coords.latitude);this._accuracyCircleMarker.setLngLat(O).addTo(this._map),this._userLocationDotMarker.setLngLat(O).addTo(this._map),this._accuracy=l.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onZoom=()=>{this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},this._onError=l=>{if(this._map){if(this.options.trackUserLocation)if(l.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;const O=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=O,this._geolocateButton.setAttribute("aria-label",O),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(l.code===3&&Jl)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new t.k("error",l)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",l=>l.preventDefault()),this._geolocateButton=n.create("button","maplibregl-ctrl-geolocate",this._container),n.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=l=>{if(this._map){if(l===!1){t.w("Geolocation support is not available so the GeolocateControl will be disabled.");const O=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=O,this._geolocateButton.setAttribute("aria-label",O)}else{const O=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=O,this._geolocateButton.setAttribute("aria-label",O)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=n.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new Ba({element:this._dotElement}),this._circleElement=n.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Ba({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",O=>{const j=O.originalEvent&&O.originalEvent.type==="resize";O.geolocateSource||this._watchState!=="ACTIVE_LOCK"||j||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new t.k("trackuserlocationend")),this.fire(new t.k("userlocationlostfocus")))})}},this.options=t.e({},zl,o)}onAdd(o){return this._map=o,this._container=n.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),(function(){return t._(this,arguments,void 0,function*(l=!1){if(ki!==void 0&&!l)return ki;if(window.navigator.permissions===void 0)return ki=!!window.navigator.geolocation,ki;try{ki=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{ki=!!window.navigator.geolocation}return ki})})().then(l=>this._finishSetupUI(l)),this._container}onRemove(){this._geolocationWatchID!==void 0&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),n.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Gi=0,Jl=!1}_isOutOfMapMaxBounds(o){const l=this._map.getMaxBounds(),O=o.coords;return l&&(O.longitude<l.getWest()||O.longitude>l.getEast()||O.latitude<l.getSouth()||O.latitude>l.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadius(){const o=this._map.getBounds(),l=o.getSouthEast(),O=o.getNorthEast(),j=l.distanceTo(O),H=this._map._container.clientHeight,ie=Math.ceil(this._accuracy/(j/H)*2);this._circleElement.style.width=`${ie}px`,this._circleElement.style.height=`${ie}px`}trigger(){if(!this._setup)return t.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new t.k("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Gi--,Jl=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new t.k("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new t.k("trackuserlocationstart")),this.fire(new t.k("userlocationfocus"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let o;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Gi++,Gi>1?(o={maximumAge:6e5,timeout:0},Jl=!0):(o=this.options.positionOptions,Jl=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,o)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}}const ui={maxWidth:100,unit:"metric"};function ka(F,o,l){const O=l&&l.maxWidth||100,j=F._container.clientHeight/2,H=F.unproject([0,j]),ie=F.unproject([O,j]),he=H.distanceTo(ie);if(l&&l.unit==="imperial"){const we=3.2808*he;we>5280?yo(o,O,we/5280,F._getUIString("ScaleControl.Miles")):yo(o,O,we,F._getUIString("ScaleControl.Feet"))}else l&&l.unit==="nautical"?yo(o,O,he/1852,F._getUIString("ScaleControl.NauticalMiles")):he>=1e3?yo(o,O,he/1e3,F._getUIString("ScaleControl.Kilometers")):yo(o,O,he,F._getUIString("ScaleControl.Meters"))}function yo(F,o,l,O){const j=(function(ie){const he=Math.pow(10,`${Math.floor(ie)}`.length-1);let we=ie/he;return we=we>=10?10:we>=5?5:we>=3?3:we>=2?2:we>=1?1:(function(Ee){const De=Math.pow(10,Math.ceil(-Math.log(Ee)/Math.LN10));return Math.round(Ee*De)/De})(we),he*we})(l),H=j/l;F.style.width=o*H+"px",F.innerHTML=`${j}&nbsp;${O}`}class Bl extends t.E{constructor(o={}){super(),this._onFullscreenChange=()=>{var l;let O=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((l=O==null?void 0:O.shadowRoot)===null||l===void 0)&&l.fullscreenElement;)O=O.shadowRoot.fullscreenElement;O===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,o&&o.container&&(o.container instanceof HTMLElement?this._container=o.container:t.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(o){return this._map=o,this._container||(this._container=this._map.getContainer()),this._controlContainer=n.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){n.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){const o=this._fullscreenButton=n.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);n.create("span","maplibregl-ctrl-icon",o).setAttribute("aria-hidden","true"),o.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){const o=this._getTitle();this._fullscreenButton.setAttribute("aria-label",o),this._fullscreenButton.title=o}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new t.k("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new t.k("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}}const Yo={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},xt=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");class kt extends t.E{constructor(o){super(),this.remove=()=>(this._content&&n.remove(this._content),this._container&&(n.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new t.k("close"))),this),this._onMouseUp=l=>{this._update(l.point)},this._onMouseMove=l=>{this._update(l.point)},this._onDrag=l=>{this._update(l.point)},this._update=l=>{var O;const j=this._lngLat||this._trackPointer;if(!this._map||!j||!this._content)return;if(!this._container){if(this._container=n.create("div","maplibregl-popup",this._map.getContainer()),this._tip=n.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(const Ee of this.options.className.split(" "))this._container.classList.add(Ee);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer?this._lngLat=Zo(this._lngLat,this._flatPos,this._map.transform):this._lngLat=(O=this._lngLat)===null||O===void 0?void 0:O.wrap(),this._trackPointer&&!l)return;const H=this._flatPos=this._pos=this._trackPointer&&l?l:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&l?l:this._map.transform.locationPoint(this._lngLat));let ie=this.options.anchor;const he=Bt(this.options.offset);if(!ie){const Ee=this._container.offsetWidth,De=this._container.offsetHeight;let qe;qe=H.y+he.bottom.y<De?["top"]:H.y>this._map.transform.height-De?["bottom"]:[],H.x<Ee/2?qe.push("left"):H.x>this._map.transform.width-Ee/2&&qe.push("right"),ie=qe.length===0?"bottom":qe.join("-")}let we=H.add(he[ie]);this.options.subpixelPositioning||(we=we.round()),n.setTransform(this._container,`${Os[ie]} translate(${we.x}px,${we.y}px)`),fl(this._container,ie,"popup")},this._onClose=()=>{this.remove()},this.options=t.e(Object.create(Yo),o)}addTo(o){return this._map&&this.remove(),this._map=o,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new t.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(o){return this._lngLat=t.N.convert(o),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(o){return this.setDOMContent(document.createTextNode(o))}setHTML(o){const l=document.createDocumentFragment(),O=document.createElement("body");let j;for(O.innerHTML=o;j=O.firstChild,j;)l.appendChild(j);return this.setDOMContent(l)}getMaxWidth(){var o;return(o=this._container)===null||o===void 0?void 0:o.style.maxWidth}setMaxWidth(o){return this.options.maxWidth=o,this._update(),this}setDOMContent(o){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=n.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(o),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(o){return this._container&&this._container.classList.add(o),this}removeClassName(o){return this._container&&this._container.classList.remove(o),this}setOffset(o){return this.options.offset=o,this._update(),this}toggleClassName(o){if(this._container)return this._container.classList.toggle(o)}setSubpixelPositioning(o){this.options.subpixelPositioning=o}_createCloseButton(){this.options.closeButton&&(this._closeButton=n.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="&#215;",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const o=this._container.querySelector(xt);o&&o.focus()}}function Bt(F){if(F){if(typeof F=="number"){const o=Math.round(Math.abs(F)/Math.SQRT2);return{center:new t.P(0,0),top:new t.P(0,F),"top-left":new t.P(o,o),"top-right":new t.P(-o,o),bottom:new t.P(0,-F),"bottom-left":new t.P(o,-o),"bottom-right":new t.P(-o,-o),left:new t.P(F,0),right:new t.P(-F,0)}}if(F instanceof t.P||Array.isArray(F)){const o=t.P.convert(F);return{center:o,top:o,"top-left":o,"top-right":o,bottom:o,"bottom-left":o,"bottom-right":o,left:o,right:o}}return{center:t.P.convert(F.center||[0,0]),top:t.P.convert(F.top||[0,0]),"top-left":t.P.convert(F["top-left"]||[0,0]),"top-right":t.P.convert(F["top-right"]||[0,0]),bottom:t.P.convert(F.bottom||[0,0]),"bottom-left":t.P.convert(F["bottom-left"]||[0,0]),"bottom-right":t.P.convert(F["bottom-right"]||[0,0]),left:t.P.convert(F.left||[0,0]),right:t.P.convert(F.right||[0,0])}}return Bt(new t.P(0,0))}const $=w;u.AJAXError=t.bg,u.Evented=t.E,u.LngLat=t.N,u.MercatorCoordinate=t.Z,u.Point=t.P,u.addProtocol=t.bh,u.config=t.a,u.removeProtocol=t.bi,u.AttributionControl=os,u.BoxZoomHandler=wo,u.CanvasSource=ye,u.CooperativeGesturesHandler=fs,u.DoubleClickZoomHandler=Ma,u.DragPanHandler=Ns,u.DragRotateHandler=zo,u.EdgeInsets=Rl,u.FullscreenControl=Bl,u.GeoJSONSource=Re,u.GeolocateControl=fi,u.Hash=io,u.ImageSource=Ne,u.KeyboardHandler=sc,u.LngLatBounds=Te,u.LogoControl=go,u.Map=class extends oo{constructor(F){t.be.mark(t.bf.create);const o=Object.assign(Object.assign({},hl),F);if(o.minZoom!=null&&o.maxZoom!=null&&o.minZoom>o.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(o.minPitch!=null&&o.maxPitch!=null&&o.minPitch>o.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(o.minPitch!=null&&o.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(o.maxPitch!=null&&o.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new aa(o.minZoom,o.maxZoom,o.minPitch,o.maxPitch,o.renderWorldCopies),{bearingSnap:o.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new _c,this._controls=[],this._mapId=t.a4(),this._contextLost=O=>{O.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new t.k("webglcontextlost",{originalEvent:O}))},this._contextRestored=O=>{this._setupPainter(),this.resize(),this._update(),this.fire(new t.k("webglcontextrestored",{originalEvent:O}))},this._onMapScroll=O=>{if(O.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=o.interactive,this._maxTileCacheSize=o.maxTileCacheSize,this._maxTileCacheZoomLevels=o.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=o.failIfMajorPerformanceCaveat===!0,this._preserveDrawingBuffer=o.preserveDrawingBuffer===!0,this._antialias=o.antialias===!0,this._trackResize=o.trackResize===!0,this._bearingSnap=o.bearingSnap,this._refreshExpiredTiles=o.refreshExpiredTiles===!0,this._fadeDuration=o.fadeDuration,this._crossSourceCollisions=o.crossSourceCollisions===!0,this._collectResourceTiming=o.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},Oc),o.locale),this._clickTolerance=o.clickTolerance,this._overridePixelRatio=o.pixelRatio,this._maxCanvasSize=o.maxCanvasSize,this.transformCameraUpdate=o.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=o.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=T.addThrottleControl(()=>this.isMoving()),this._requestManager=new C(o.transformRequest),typeof o.container=="string"){if(this._container=document.getElementById(o.container),!this._container)throw new Error(`Container '${o.container}' not found.`)}else{if(!(o.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=o.container}if(o.maxBounds&&this.setMaxBounds(o.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)).on("moveend",()=>this._update(!1)).on("zoom",()=>this._update(!0)).on("terrain",()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)}).once("idle",()=>{this._idleTriggered=!0}),typeof window<"u"){addEventListener("online",this._onWindowOnline,!1);let O=!1;const j=Hs(H=>{this._trackResize&&!this._removed&&this.resize(H)._update()},50);this._resizeObserver=new ResizeObserver(H=>{O?j(H):O=!0}),this._resizeObserver.observe(this._container)}this.handlers=new $i(this,o);const l=typeof o.hash=="string"&&o.hash||void 0;this._hash=o.hash&&new io(l).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:o.center,zoom:o.zoom,bearing:o.bearing,pitch:o.pitch}),o.bounds&&(this.resize(),this.fitBounds(o.bounds,t.e({},o.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=o.localIdeographFontFamily,this._validateStyle=o.validateStyle,o.style&&this.setStyle(o.style,{localIdeographFontFamily:o.localIdeographFontFamily}),o.attributionControl&&this.addControl(new os(typeof o.attributionControl=="boolean"?void 0:o.attributionControl)),o.maplibreLogo&&this.addControl(new go,o.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",O=>{this._update(O.dataType==="style"),this.fire(new t.k(`${O.dataType}data`,O))}),this.on("dataloading",O=>{this.fire(new t.k(`${O.dataType}dataloading`,O))}),this.on("dataabort",O=>{this.fire(new t.k("sourcedataabort",O))})}_getMapId(){return this._mapId}addControl(F,o){if(o===void 0&&(o=F.getDefaultPosition?F.getDefaultPosition():"top-right"),!F||!F.onAdd)return this.fire(new t.j(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const l=F.onAdd(this);this._controls.push(F);const O=this._controlPositions[o];return o.indexOf("bottom")!==-1?O.insertBefore(l,O.firstChild):O.appendChild(l),this}removeControl(F){if(!F||!F.onRemove)return this.fire(new t.j(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const o=this._controls.indexOf(F);return o>-1&&this._controls.splice(o,1),F.onRemove(this),this}hasControl(F){return this._controls.indexOf(F)>-1}calculateCameraOptionsFromTo(F,o,l,O){return O==null&&this.terrain&&(O=this.terrain.getElevationForLngLatZoom(l,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(F,o,l,O)}resize(F){var o;const l=this._containerDimensions(),O=l[0],j=l[1],H=this._getClampedPixelRatio(O,j);if(this._resizeCanvas(O,j,H),this.painter.resize(O,j,H),this.painter.overLimit()){const he=this.painter.context.gl;this._maxCanvasSize=[he.drawingBufferWidth,he.drawingBufferHeight];const we=this._getClampedPixelRatio(O,j);this._resizeCanvas(O,j,we),this.painter.resize(O,j,we)}this.transform.resize(O,j),(o=this._requestedCameraState)===null||o===void 0||o.resize(O,j);const ie=!this._moving;return ie&&(this.stop(),this.fire(new t.k("movestart",F)).fire(new t.k("move",F))),this.fire(new t.k("resize",F)),ie&&this.fire(new t.k("moveend",F)),this}_getClampedPixelRatio(F,o){const{0:l,1:O}=this._maxCanvasSize,j=this.getPixelRatio(),H=F*j,ie=o*j,he=H>l?l/H:1,we=ie>O?O/ie:1;return Math.min(he,we)*j}getPixelRatio(){var F;return(F=this._overridePixelRatio)!==null&&F!==void 0?F:devicePixelRatio}setPixelRatio(F){this._overridePixelRatio=F,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(F){return this.transform.setMaxBounds(Te.convert(F)),this._update()}setMinZoom(F){if((F=F??-2)>=-2&&F<=this.transform.maxZoom)return this.transform.minZoom=F,this._update(),this.getZoom()<F&&this.setZoom(F),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(F){if((F=F??22)>=this.transform.minZoom)return this.transform.maxZoom=F,this._update(),this.getZoom()>F&&this.setZoom(F),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(F){if((F=F??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(F>=0&&F<=this.transform.maxPitch)return this.transform.minPitch=F,this._update(),this.getPitch()<F&&this.setPitch(F),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(F){if((F=F??60)>85)throw new Error("maxPitch must be less than or equal to 85");if(F>=this.transform.minPitch)return this.transform.maxPitch=F,this._update(),this.getPitch()>F&&this.setPitch(F),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(F){return this.transform.renderWorldCopies=F,this._update()}project(F){return this.transform.locationPoint(t.N.convert(F),this.style&&this.terrain)}unproject(F){return this.transform.pointLocation(t.P.convert(F),this.terrain)}isMoving(){var F;return this._moving||((F=this.handlers)===null||F===void 0?void 0:F.isMoving())}isZooming(){var F;return this._zooming||((F=this.handlers)===null||F===void 0?void 0:F.isZooming())}isRotating(){var F;return this._rotating||((F=this.handlers)===null||F===void 0?void 0:F.isRotating())}_createDelegatedListener(F,o,l){if(F==="mouseenter"||F==="mouseover"){let O=!1;return{layer:o,listener:l,delegates:{mousemove:j=>{const H=this.getLayer(o)?this.queryRenderedFeatures(j.point,{layers:[o]}):[];H.length?O||(O=!0,l.call(this,new Ro(F,this,j.originalEvent,{features:H}))):O=!1},mouseout:()=>{O=!1}}}}if(F==="mouseleave"||F==="mouseout"){let O=!1;return{layer:o,listener:l,delegates:{mousemove:j=>{(this.getLayer(o)?this.queryRenderedFeatures(j.point,{layers:[o]}):[]).length?O=!0:O&&(O=!1,l.call(this,new Ro(F,this,j.originalEvent)))},mouseout:j=>{O&&(O=!1,l.call(this,new Ro(F,this,j.originalEvent)))}}}}{const O=j=>{const H=this.getLayer(o)?this.queryRenderedFeatures(j.point,{layers:[o]}):[];H.length&&(j.features=H,l.call(this,j),delete j.features)};return{layer:o,listener:l,delegates:{[F]:O}}}}on(F,o,l){if(l===void 0)return super.on(F,o);const O=this._createDelegatedListener(F,o,l);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[F]=this._delegatedListeners[F]||[],this._delegatedListeners[F].push(O);for(const j in O.delegates)this.on(j,O.delegates[j]);return this}once(F,o,l){if(l===void 0)return super.once(F,o);const O=this._createDelegatedListener(F,o,l);for(const j in O.delegates)this.once(j,O.delegates[j]);return this}off(F,o,l){return l===void 0?super.off(F,o):(this._delegatedListeners&&this._delegatedListeners[F]&&(O=>{const j=O[F];for(let H=0;H<j.length;H++){const ie=j[H];if(ie.layer===o&&ie.listener===l){for(const he in ie.delegates)this.off(he,ie.delegates[he]);return j.splice(H,1),this}}})(this._delegatedListeners),this)}queryRenderedFeatures(F,o){if(!this.style)return[];let l;const O=F instanceof t.P||Array.isArray(F),j=O?F:[[0,0],[this.transform.width,this.transform.height]];if(o=o||(O?{}:F)||{},j instanceof t.P||typeof j[0]=="number")l=[t.P.convert(j)];else{const H=t.P.convert(j[0]),ie=t.P.convert(j[1]);l=[H,new t.P(ie.x,H.y),ie,new t.P(H.x,ie.y),H]}return this.style.queryRenderedFeatures(l,o,this.transform)}querySourceFeatures(F,o){return this.style.querySourceFeatures(F,o)}setStyle(F,o){return(o=t.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},o)).diff!==!1&&o.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&F?(this._diffStyle(F,o),this):(this._localIdeographFontFamily=o.localIdeographFontFamily,this._updateStyle(F,o))}setTransformRequest(F){return this._requestManager.setTransformRequest(F),this}_getUIString(F){const o=this._locale[F];if(o==null)throw new Error(`Missing UI string '${F}'`);return o}_updateStyle(F,o){if(o.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(F,o));const l=this.style&&o.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!F)),F?(this.style=new Zn(this,o||{}),this.style.setEventedParent(this,{style:this.style}),typeof F=="string"?this.style.loadURL(F,o,l):this.style.loadJSON(F,o,l),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Zn(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(F,o){if(typeof F=="string"){const l=F,O=this._requestManager.transformRequest(l,"Style");t.h(O,new AbortController).then(j=>{this._updateDiff(j.data,o)}).catch(j=>{j&&this.fire(new t.j(j))})}else typeof F=="object"&&this._updateDiff(F,o)}_updateDiff(F,o){try{this.style.setState(F,o)&&this._update(!0)}catch(l){t.w(`Unable to perform style diff: ${l.message||l.error||l}. Rebuilding the style from scratch.`),this._updateStyle(F,o)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():t.w("There is no style added to the map.")}addSource(F,o){return this._lazyInitEmptyStyle(),this.style.addSource(F,o),this._update(!0)}isSourceLoaded(F){const o=this.style&&this.style.sourceCaches[F];if(o!==void 0)return o.loaded();this.fire(new t.j(new Error(`There is no source with ID '${F}'`)))}setTerrain(F){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),F){const o=this.style.sourceCaches[F.source];if(!o)throw new Error(`cannot load terrain, because there exists no source with ID: ${F.source}`);this.terrain===null&&o.reload();for(const l in this.style._layers){const O=this.style._layers[l];O.type==="hillshade"&&O.source===F.source&&t.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new ea(this.painter,o,F),this.painter.renderToTexture=new Js(this.painter,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._terrainDataCallback=l=>{l.dataType==="style"?this.terrain.sourceCache.freeRtt():l.dataType==="source"&&l.tile&&(l.sourceId!==F.source||this._elevationFreeze||(this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.terrain.sourceCache.freeRtt(l.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.sourceCache.destruct(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.minElevationForCurrentTile=0,this.transform.elevation=0;return this.fire(new t.k("terrain",{terrain:F})),this}getTerrain(){var F,o;return(o=(F=this.terrain)===null||F===void 0?void 0:F.options)!==null&&o!==void 0?o:null}areTilesLoaded(){const F=this.style&&this.style.sourceCaches;for(const o in F){const l=F[o]._tiles;for(const O in l){const j=l[O];if(j.state!=="loaded"&&j.state!=="errored")return!1}}return!0}removeSource(F){return this.style.removeSource(F),this._update(!0)}getSource(F){return this.style.getSource(F)}addImage(F,o,l={}){const{pixelRatio:O=1,sdf:j=!1,stretchX:H,stretchY:ie,content:he,textFitWidth:we,textFitHeight:Ee}=l;if(this._lazyInitEmptyStyle(),!(o instanceof HTMLImageElement||t.b(o))){if(o.width===void 0||o.height===void 0)return this.fire(new t.j(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{const{width:De,height:qe,data:it}=o,ut=o;return this.style.addImage(F,{data:new t.R({width:De,height:qe},new Uint8Array(it)),pixelRatio:O,stretchX:H,stretchY:ie,content:he,textFitWidth:we,textFitHeight:Ee,sdf:j,version:0,userImage:ut}),ut.onAdd&&ut.onAdd(this,F),this}}{const{width:De,height:qe,data:it}=p.getImageData(o);this.style.addImage(F,{data:new t.R({width:De,height:qe},it),pixelRatio:O,stretchX:H,stretchY:ie,content:he,textFitWidth:we,textFitHeight:Ee,sdf:j,version:0})}}updateImage(F,o){const l=this.style.getImage(F);if(!l)return this.fire(new t.j(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const O=o instanceof HTMLImageElement||t.b(o)?p.getImageData(o):o,{width:j,height:H,data:ie}=O;if(j===void 0||H===void 0)return this.fire(new t.j(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(j!==l.data.width||H!==l.data.height)return this.fire(new t.j(new Error("The width and height of the updated image must be that same as the previous version of the image")));const he=!(o instanceof HTMLImageElement||t.b(o));return l.data.replace(ie,he),this.style.updateImage(F,l),this}getImage(F){return this.style.getImage(F)}hasImage(F){return F?!!this.style.getImage(F):(this.fire(new t.j(new Error("Missing required image id"))),!1)}removeImage(F){this.style.removeImage(F)}loadImage(F){return T.getImage(this._requestManager.transformRequest(F,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(F,o){return this._lazyInitEmptyStyle(),this.style.addLayer(F,o),this._update(!0)}moveLayer(F,o){return this.style.moveLayer(F,o),this._update(!0)}removeLayer(F){return this.style.removeLayer(F),this._update(!0)}getLayer(F){return this.style.getLayer(F)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(F,o,l){return this.style.setLayerZoomRange(F,o,l),this._update(!0)}setFilter(F,o,l={}){return this.style.setFilter(F,o,l),this._update(!0)}getFilter(F){return this.style.getFilter(F)}setPaintProperty(F,o,l,O={}){return this.style.setPaintProperty(F,o,l,O),this._update(!0)}getPaintProperty(F,o){return this.style.getPaintProperty(F,o)}setLayoutProperty(F,o,l,O={}){return this.style.setLayoutProperty(F,o,l,O),this._update(!0)}getLayoutProperty(F,o){return this.style.getLayoutProperty(F,o)}setGlyphs(F,o={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(F,o),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(F,o,l={}){return this._lazyInitEmptyStyle(),this.style.addSprite(F,o,l,O=>{O||this._update(!0)}),this}removeSprite(F){return this._lazyInitEmptyStyle(),this.style.removeSprite(F),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(F,o={}){return this._lazyInitEmptyStyle(),this.style.setSprite(F,o,l=>{l||this._update(!0)}),this}setLight(F,o={}){return this._lazyInitEmptyStyle(),this.style.setLight(F,o),this._update(!0)}getLight(){return this.style.getLight()}setSky(F){return this._lazyInitEmptyStyle(),this.style.setSky(F),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(F,o){return this.style.setFeatureState(F,o),this._update()}removeFeatureState(F,o){return this.style.removeFeatureState(F,o),this._update()}getFeatureState(F){return this.style.getFeatureState(F)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let F=0,o=0;return this._container&&(F=this._container.clientWidth||400,o=this._container.clientHeight||300),[F,o]}_setupContainer(){const F=this._container;F.classList.add("maplibregl-map");const o=this._canvasContainer=n.create("div","maplibregl-canvas-container",F);this._interactive&&o.classList.add("maplibregl-interactive"),this._canvas=n.create("canvas","maplibregl-canvas",o),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex",this._interactive?"0":"-1"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region");const l=this._containerDimensions(),O=this._getClampedPixelRatio(l[0],l[1]);this._resizeCanvas(l[0],l[1],O);const j=this._controlContainer=n.create("div","maplibregl-control-container",F),H=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(ie=>{H[ie]=n.create("div",`maplibregl-ctrl-${ie} `,j)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(F,o,l){this._canvas.width=Math.floor(l*F),this._canvas.height=Math.floor(l*o),this._canvas.style.width=`${F}px`,this._canvas.style.height=`${o}px`}_setupPainter(){const F={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1};let o=null;this._canvas.addEventListener("webglcontextcreationerror",O=>{o={requestedAttributes:F},O&&(o.statusMessage=O.statusMessage,o.type=O.type)},{once:!0});const l=this._canvas.getContext("webgl2",F)||this._canvas.getContext("webgl",F);if(!l){const O="Failed to initialize WebGL";throw o?(o.message=O,new Error(JSON.stringify(o))):new Error(O)}this.painter=new ic(l,this.transform),i.testSupport(l)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(F){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||F,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(F){return this._update(),this._renderTaskQueue.add(F)}_cancelRenderFrame(F){this._renderTaskQueue.remove(F)}_render(F){const o=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(F),this._removed)return;let l=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const j=this.transform.zoom,H=p.now();this.style.zoomHistory.update(j,H);const ie=new t.a9(j,{now:H,fadeDuration:o,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),he=ie.crossFadingFactor();he===1&&he===this._crossFadingFactor||(l=!0,this._crossFadingFactor=he),this.style.update(ie)}this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._elevationFreeze||(this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.minElevationForCurrentTile=0,this.transform.elevation=0),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,o,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:o,showPadding:this.showPadding}),this.fire(new t.k("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,t.be.mark(t.bf.load),this.fire(new t.k("load"))),this.style&&(this.style.hasTransitions()||l)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();const O=this._sourcesDirty||this._styleDirty||this._placementDirty;return O||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new t.k("idle")),!this._loaded||this._fullyLoaded||O||(this._fullyLoaded=!0,t.be.mark(t.bf.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var F;this._hash&&this._hash.remove();for(const l of this._controls)l.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&removeEventListener("online",this._onWindowOnline,!1),T.removeThrottleControl(this._imageQueueHandle),(F=this._resizeObserver)===null||F===void 0||F.disconnect();const o=this.painter.context.gl.getExtension("WEBGL_lose_context");o!=null&&o.loseContext&&o.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),n.remove(this._canvasContainer),n.remove(this._controlContainer),this._container.classList.remove("maplibregl-map"),t.be.clearMetrics(),this._removed=!0,this.fire(new t.k("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,p.frameAsync(this._frameRequest).then(F=>{t.be.frame(F),this._frameRequest=null,this._render(F)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(F){this._showTileBoundaries!==F&&(this._showTileBoundaries=F,this._update())}get showPadding(){return!!this._showPadding}set showPadding(F){this._showPadding!==F&&(this._showPadding=F,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(F){this._showCollisionBoxes!==F&&(this._showCollisionBoxes=F,F?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(F){this._showOverdrawInspector!==F&&(this._showOverdrawInspector=F,this._update())}get repaint(){return!!this._repaint}set repaint(F){this._repaint!==F&&(this._repaint=F,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(F){this._vertices=F,this._update()}get version(){return wc}getCameraTargetElevation(){return this.transform.elevation}},u.MapMouseEvent=Ro,u.MapTouchEvent=_o,u.MapWheelEvent=ol,u.Marker=Ba,u.NavigationControl=class{constructor(F){this._updateZoomButtons=()=>{const o=this._map.getZoom(),l=o===this._map.getMaxZoom(),O=o===this._map.getMinZoom();this._zoomInButton.disabled=l,this._zoomOutButton.disabled=O,this._zoomInButton.setAttribute("aria-disabled",l.toString()),this._zoomOutButton.setAttribute("aria-disabled",O.toString())},this._rotateCompassArrow=()=>{const o=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${this._map.transform.angle*(180/Math.PI)}deg)`:`rotate(${this._map.transform.angle*(180/Math.PI)}deg)`;this._compassIcon.style.transform=o},this._setButtonTitle=(o,l)=>{const O=this._map._getUIString(`NavigationControl.${l}`);o.title=O,o.setAttribute("aria-label",O)},this.options=t.e({},Ps,F),this._container=n.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",o=>o.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",o=>this._map.zoomIn({},{originalEvent:o})),n.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",o=>this._map.zoomOut({},{originalEvent:o})),n.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",o=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:o}):this._map.resetNorth({},{originalEvent:o})}),this._compassIcon=n.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(F){return this._map=F,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new ni(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){n.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(F,o){const l=n.create("button",F,this._container);return l.type="button",l.addEventListener("click",o),l}},u.Popup=kt,u.RasterDEMTileSource=We,u.RasterTileSource=Pe,u.ScaleControl=class{constructor(F){this._onMove=()=>{ka(this._map,this._container,this.options)},this.setUnit=o=>{this.options.unit=o,ka(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},ui),F)}getDefaultPosition(){return"bottom-left"}onAdd(F){return this._map=F,this._container=n.create("div","maplibregl-ctrl maplibregl-ctrl-scale",F.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){n.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},u.ScrollZoomHandler=ul,u.Style=Zn,u.TerrainControl=class{constructor(F){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=F}onAdd(F){return this._map=F,this._container=n.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=n.create("button","maplibregl-ctrl-terrain",this._container),n.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){n.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},u.TwoFingersTouchPitchHandler=Il,u.TwoFingersTouchRotateHandler=Jc,u.TwoFingersTouchZoomHandler=gi,u.TwoFingersTouchZoomRotateHandler=pl,u.VectorTileSource=Le,u.VideoSource=ve,u.addSourceType=(F,o)=>t._(void 0,void 0,void 0,function*(){if(ze(F))throw new Error(`A source type called "${F}" already exists.`);((l,O)=>{ge[l]=O})(F,o)}),u.clearPrewarmedResources=function(){const F=fe;F&&(F.isPreloaded()&&F.numActive()===1?(F.release(ae),fe=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},u.getMaxParallelImageRequests=function(){return t.a.MAX_PARALLEL_IMAGE_REQUESTS},u.getRTLTextPluginStatus=function(){return Ke().getRTLTextPluginStatus()},u.getVersion=function(){return $},u.getWorkerCount=function(){return oe.workerCount},u.getWorkerUrl=function(){return t.a.WORKER_URL},u.importScriptInWorkers=function(F){return me().broadcast("IS",F)},u.prewarm=function(){ue().acquire(ae)},u.setMaxParallelImageRequests=function(F){t.a.MAX_PARALLEL_IMAGE_REQUESTS=F},u.setRTLTextPlugin=function(F,o){return Ke().setRTLTextPlugin(F,o)},u.setWorkerCount=function(F){oe.workerCount=F},u.setWorkerUrl=function(F){t.a.WORKER_URL=F}}),b})()},88640:function(A,b,e){function v(Se,Ae,Te){Se.prototype=Ae.prototype=Te,Te.constructor=Se}function u(Se,Ae){var Te=Object.create(Se.prototype);for(var Me in Ae)Te[Me]=Ae[Me];return Te}function t(){}e.d(b,{GW:function(){return be},Dj:function(){return oe}});var w=.7,y=1/w,x="\\s*([+-]?\\d+)\\s*",p="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",n="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",i=/^#([0-9a-f]{3,8})$/,d=new RegExp("^rgb\\(".concat(x,",").concat(x,",").concat(x,"\\)$")),s=new RegExp("^rgb\\(".concat(n,",").concat(n,",").concat(n,"\\)$")),c=new RegExp("^rgba\\(".concat(x,",").concat(x,",").concat(x,",").concat(p,"\\)$")),f=new RegExp("^rgba\\(".concat(n,",").concat(n,",").concat(n,",").concat(p,"\\)$")),m=new RegExp("^hsl\\(".concat(p,",").concat(n,",").concat(n,"\\)$")),T=new RegExp("^hsla\\(".concat(p,",").concat(n,",").concat(n,",").concat(p,"\\)$")),C={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 S(){return this.rgb().formatHex()}function L(){return this.rgb().formatRgb()}function R(Se){var Ae,Te;return Se=(Se+"").trim().toLowerCase(),(Ae=i.exec(Se))?(Te=Ae[1].length,Ae=parseInt(Ae[1],16),Te===6?E(Ae):Te===3?new k(Ae>>8&15|Ae>>4&240,Ae>>4&15|240&Ae,(15&Ae)<<4|15&Ae,1):Te===8?N(Ae>>24&255,Ae>>16&255,Ae>>8&255,(255&Ae)/255):Te===4?N(Ae>>12&15|Ae>>8&240,Ae>>8&15|Ae>>4&240,Ae>>4&15|240&Ae,((15&Ae)<<4|15&Ae)/255):null):(Ae=d.exec(Se))?new k(Ae[1],Ae[2],Ae[3],1):(Ae=s.exec(Se))?new k(255*Ae[1]/100,255*Ae[2]/100,255*Ae[3]/100,1):(Ae=c.exec(Se))?N(Ae[1],Ae[2],Ae[3],Ae[4]):(Ae=f.exec(Se))?N(255*Ae[1]/100,255*Ae[2]/100,255*Ae[3]/100,Ae[4]):(Ae=m.exec(Se))?U(Ae[1],Ae[2]/100,Ae[3]/100,1):(Ae=T.exec(Se))?U(Ae[1],Ae[2]/100,Ae[3]/100,Ae[4]):C.hasOwnProperty(Se)?E(C[Se]):Se==="transparent"?new k(NaN,NaN,NaN,0):null}function E(Se){return new k(Se>>16&255,Se>>8&255,255&Se,1)}function N(Se,Ae,Te,Me){return Me<=0&&(Se=Ae=Te=NaN),new k(Se,Ae,Te,Me)}function M(Se,Ae,Te,Me){return arguments.length===1?((Le=Se)instanceof t||(Le=R(Le)),Le?new k((Le=Le.rgb()).r,Le.g,Le.b,Le.opacity):new k):new k(Se,Ae,Te,Me??1);var Le}function k(Se,Ae,Te,Me){this.r=+Se,this.g=+Ae,this.b=+Te,this.opacity=+Me}function I(){return"#".concat(V(this.r)).concat(V(this.g)).concat(V(this.b))}function _(){var Se=P(this.opacity);return"".concat(Se===1?"rgb(":"rgba(").concat(z(this.r),", ").concat(z(this.g),", ").concat(z(this.b)).concat(Se===1?")":", ".concat(Se,")"))}function P(Se){return isNaN(Se)?1:Math.max(0,Math.min(1,Se))}function z(Se){return Math.max(0,Math.min(255,Math.round(Se)||0))}function V(Se){return((Se=z(Se))<16?"0":"")+Se.toString(16)}function U(Se,Ae,Te,Me){return Me<=0?Se=Ae=Te=NaN:Te<=0||Te>=1?Se=Ae=NaN:Ae<=0&&(Se=NaN),new W(Se,Ae,Te,Me)}function q(Se){if(Se instanceof W)return new W(Se.h,Se.s,Se.l,Se.opacity);if(Se instanceof t||(Se=R(Se)),!Se)return new W;if(Se instanceof W)return Se;var Ae=(Se=Se.rgb()).r/255,Te=Se.g/255,Me=Se.b/255,Le=Math.min(Ae,Te,Me),Pe=Math.max(Ae,Te,Me),We=NaN,Re=Pe-Le,je=(Pe+Le)/2;return Re?(We=Ae===Pe?(Te-Me)/Re+6*(Te<Me):Te===Pe?(Me-Ae)/Re+2:(Ae-Te)/Re+4,Re/=je<.5?Pe+Le:2-Pe-Le,We*=60):Re=je>0&&je<1?0:We,new W(We,Re,je,Se.opacity)}function W(Se,Ae,Te,Me){this.h=+Se,this.s=+Ae,this.l=+Te,this.opacity=+Me}function Y(Se){return(Se=(Se||0)%360)<0?Se+360:Se}function ne(Se){return Math.max(0,Math.min(1,Se||0))}function J(Se,Ae,Te){return 255*(Se<60?Ae+(Te-Ae)*Se/60:Se<180?Te:Se<240?Ae+(Te-Ae)*(240-Se)/60:Ae)}v(t,R,{copy:function(Se){return Object.assign(new this.constructor,this,Se)},displayable:function(){return this.rgb().displayable()},hex:S,formatHex:S,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return q(this).formatHsl()},formatRgb:L,toString:L}),v(k,M,u(t,{brighter:function(Se){return Se=Se==null?y:Math.pow(y,Se),new k(this.r*Se,this.g*Se,this.b*Se,this.opacity)},darker:function(Se){return Se=Se==null?w:Math.pow(w,Se),new k(this.r*Se,this.g*Se,this.b*Se,this.opacity)},rgb:function(){return this},clamp:function(){return new k(z(this.r),z(this.g),z(this.b),P(this.opacity))},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:I,formatHex:I,formatHex8:function(){return"#".concat(V(this.r)).concat(V(this.g)).concat(V(this.b)).concat(V(255*(isNaN(this.opacity)?1:this.opacity)))},formatRgb:_,toString:_})),v(W,function(Se,Ae,Te,Me){return arguments.length===1?q(Se):new W(Se,Ae,Te,Me??1)},u(t,{brighter:function(Se){return Se=Se==null?y:Math.pow(y,Se),new W(this.h,this.s,this.l*Se,this.opacity)},darker:function(Se){return Se=Se==null?w:Math.pow(w,Se),new W(this.h,this.s,this.l*Se,this.opacity)},rgb:function(){var Se=this.h%360+360*(this.h<0),Ae=isNaN(Se)||isNaN(this.s)?0:this.s,Te=this.l,Me=Te+(Te<.5?Te:1-Te)*Ae,Le=2*Te-Me;return new k(J(Se>=240?Se-240:Se+120,Le,Me),J(Se,Le,Me),J(Se<120?Se+240:Se-120,Le,Me),this.opacity)},clamp:function(){return new W(Y(this.h),ne(this.s),ne(this.l),P(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 Se=P(this.opacity);return"".concat(Se===1?"hsl(":"hsla(").concat(Y(this.h),", ").concat(100*ne(this.s),"%, ").concat(100*ne(this.l),"%").concat(Se===1?")":", ".concat(Se,")"))}}));var re=function(Se){return function(){return Se}};function ee(Se,Ae){var Te=Ae-Se;return Te?(function(Me,Le){return function(Pe){return Me+Pe*Le}})(Se,Te):re(isNaN(Se)?Ae:Se)}var Z=(function Se(Ae){var Te=(function(Le){return(Le=+Le)==1?ee:function(Pe,We){return We-Pe?(function(Re,je,Ne){return Re=Math.pow(Re,Ne),je=Math.pow(je,Ne)-Re,Ne=1/Ne,function(ve){return Math.pow(Re+ve*je,Ne)}})(Pe,We,Le):re(isNaN(Pe)?We:Pe)}})(Ae);function Me(Le,Pe){var We=Te((Le=M(Le)).r,(Pe=M(Pe)).r),Re=Te(Le.g,Pe.g),je=Te(Le.b,Pe.b),Ne=ee(Le.opacity,Pe.opacity);return function(ve){return Le.r=We(ve),Le.g=Re(ve),Le.b=je(ve),Le.opacity=Ne(ve),Le+""}}return Me.gamma=Se,Me})(1);function te(Se,Ae){var Te,Me=Ae?Ae.length:0,Le=Se?Math.min(Me,Se.length):0,Pe=new Array(Le),We=new Array(Me);for(Te=0;Te<Le;++Te)Pe[Te]=be(Se[Te],Ae[Te]);for(;Te<Me;++Te)We[Te]=Ae[Te];return function(Re){for(Te=0;Te<Le;++Te)We[Te]=Pe[Te](Re);return We}}function ae(Se,Ae){var Te=new Date;return Se=+Se,Ae=+Ae,function(Me){return Te.setTime(Se*(1-Me)+Ae*Me),Te}}function oe(Se,Ae){return Se=+Se,Ae=+Ae,function(Te){return Se*(1-Te)+Ae*Te}}function pe(Se){return pe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Ae){return typeof Ae}:function(Ae){return Ae&&typeof Symbol=="function"&&Ae.constructor===Symbol&&Ae!==Symbol.prototype?"symbol":typeof Ae},pe(Se)}function fe(Se,Ae){var Te,Me={},Le={};for(Te in Se!==null&&pe(Se)==="object"||(Se={}),Ae!==null&&pe(Ae)==="object"||(Ae={}),Ae)Te in Se?Me[Te]=be(Se[Te],Ae[Te]):Le[Te]=Ae[Te];return function(Pe){for(Te in Me)Le[Te]=Me[Te](Pe);return Le}}var se=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ue=new RegExp(se.source,"g");function de(Se,Ae){var Te,Me,Le,Pe=se.lastIndex=ue.lastIndex=0,We=-1,Re=[],je=[];for(Se+="",Ae+="";(Te=se.exec(Se))&&(Me=ue.exec(Ae));)(Le=Me.index)>Pe&&(Le=Ae.slice(Pe,Le),Re[We]?Re[We]+=Le:Re[++We]=Le),(Te=Te[0])===(Me=Me[0])?Re[We]?Re[We]+=Me:Re[++We]=Me:(Re[++We]=null,je.push({i:We,x:oe(Te,Me)})),Pe=ue.lastIndex;return Pe<Ae.length&&(Le=Ae.slice(Pe),Re[We]?Re[We]+=Le:Re[++We]=Le),Re.length<2?je[0]?(function(Ne){return function(ve){return Ne(ve)+""}})(je[0].x):(function(Ne){return function(){return Ne}})(Ae):(Ae=je.length,function(Ne){for(var ve,ye=0;ye<Ae;++ye)Re[(ve=je[ye]).i]=ve.x(Ne);return Re.join("")})}function me(Se,Ae){Ae||(Ae=[]);var Te,Me=Se?Math.min(Ae.length,Se.length):0,Le=Ae.slice();return function(Pe){for(Te=0;Te<Me;++Te)Le[Te]=Se[Te]*(1-Pe)+Ae[Te]*Pe;return Le}}function _e(Se){return _e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Ae){return typeof Ae}:function(Ae){return Ae&&typeof Symbol=="function"&&Ae.constructor===Symbol&&Ae!==Symbol.prototype?"symbol":typeof Ae},_e(Se)}function be(Se,Ae){var Te,Me,Le=_e(Ae);return Ae==null||Le==="boolean"?re(Ae):(Le==="number"?oe:Le==="string"?(Te=R(Ae))?(Ae=Te,Z):de:Ae instanceof R?Z:Ae instanceof Date?ae:(Me=Ae,!ArrayBuffer.isView(Me)||Me instanceof DataView?Array.isArray(Ae)?te:typeof Ae.valueOf!="function"&&typeof Ae.toString!="function"||isNaN(Ae)?fe:oe:me))(Se,Ae)}},23648:function(A){A.exports=JSON.parse('["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]')},2362:function(A){A.exports=JSON.parse('["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]')},87486:function(A){A.exports=JSON.parse('["normal","italic","oblique"]')},99803:function(A){A.exports=JSON.parse('["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]')},54324:function(A){A.exports=JSON.parse('["inherit","initial","unset"]')},94316:function(A){A.exports=JSON.parse('["caption","icon","menu","message-box","small-caption","status-bar"]')},37071:function(A){A.exports=JSON.parse(`{"version":8,"name":"orto","metadata":{"maputnik:renderer":"mlgljs"},"center":[1.537786,41.837539],"zoom":12,"bearing":0,"pitch":0,"light":{"anchor":"viewport","color":"white","intensity":0.4,"position":[1.15,45,30]},"sources":{"ortoEsri":{"type":"raster","tiles":["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],"tileSize":256,"maxzoom":18,"attribution":"ESRI &copy; <a href='http://www.esri.com'>ESRI</a>"},"ortoInstaMaps":{"type":"raster","tiles":["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],"tileSize":256,"maxzoom":13},"ortoICGC":{"type":"raster","tiles":["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],"tileSize":256,"minzoom":13.1,"maxzoom":20},"openmaptiles":{"type":"vector","url":"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},"sprite":"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1","glyphs":"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf","layers":[{"id":"background","type":"background","paint":{"background-color":"#F4F9F4"}},{"id":"ortoEsri","type":"raster","source":"ortoEsri","maxzoom":16,"layout":{"visibility":"visible"}},{"id":"ortoICGC","type":"raster","source":"ortoICGC","minzoom":13.1,"maxzoom":19,"layout":{"visibility":"visible"}},{"id":"ortoInstaMaps","type":"raster","source":"ortoInstaMaps","maxzoom":13,"layout":{"visibility":"visible"}},{"id":"waterway_tunnel","type":"line","source":"openmaptiles","source-layer":"waterway","minzoom":14,"filter":["all",["in","class","river","stream","canal"],["==","brunnel","tunnel"]],"layout":{"line-cap":"round"},"paint":{"line-color":"#a0c8f0","line-width":{"base":1.3,"stops":[[13,0.5],[20,6]]},"line-dasharray":[2,4]}},{"id":"waterway-other","type":"line","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"waterway","filter":["!in","class","canal","river","stream"],"layout":{"line-cap":"round"},"paint":{"line-color":"#a0c8f0","line-width":{"base":1.3,"stops":[[13,0.5],[20,2]]}}},{"id":"waterway-stream-canal","type":"line","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"waterway","filter":["all",["in","class","canal","stream"],["!=","brunnel","tunnel"]],"layout":{"line-cap":"round"},"paint":{"line-color":"#a0c8f0","line-width":{"base":1.3,"stops":[[13,0.5],[20,6]]}}},{"id":"waterway-river","type":"line","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"waterway","filter":["all",["==","class","river"],["!=","brunnel","tunnel"]],"layout":{"line-cap":"round"},"paint":{"line-color":"#a0c8f0","line-width":{"base":1.2,"stops":[[10,0.8],[20,4]]},"line-opacity":0.5}},{"id":"water-offset","type":"fill","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"water","maxzoom":8,"filter":["==","$type","Polygon"],"layout":{"visibility":"visible"},"paint":{"fill-opacity":0,"fill-color":"#a0c8f0","fill-translate":{"base":1,"stops":[[6,[2,0]],[8,[0,0]]]}}},{"id":"water","type":"fill","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"water","layout":{"visibility":"visible"},"paint":{"fill-color":"hsl(210, 67%, 85%)","fill-opacity":0}},{"id":"water-pattern","type":"fill","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"water","layout":{"visibility":"visible"},"paint":{"fill-translate":[0,2.5],"fill-pattern":"wave","fill-opacity":1}},{"id":"landcover-ice-shelf","type":"fill","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"landcover","filter":["==","subclass","ice_shelf"],"layout":{"visibility":"visible"},"paint":{"fill-color":"#fff","fill-opacity":{"base":1,"stops":[[0,0.9],[10,0.3]]}}},{"id":"tunnel-service-track-casing","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","service","track"]],"layout":{"line-join":"round"},"paint":{"line-color":"#cfcdca","line-dasharray":[0.5,0.25],"line-width":{"base":1.2,"stops":[[15,1],[16,4],[20,11]]}}},{"id":"tunnel-minor-casing","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["==","class","minor"]],"layout":{"line-join":"round"},"paint":{"line-color":"#cfcdca","line-opacity":{"stops":[[12,0],[12.5,1]]},"line-width":{"base":1.2,"stops":[[12,0.5],[13,1],[14,4],[20,15]]}}},{"id":"tunnel-secondary-tertiary-casing","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[8,1.5],[20,17]]}}},{"id":"tunnel-trunk-primary-casing","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-width":{"base":1.2,"stops":[[5,0.4],[6,0.6],[7,1.5],[20,22]]},"line-opacity":0.7}},{"id":"tunnel-motorway-casing","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["==","class","motorway"]],"layout":{"line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-dasharray":[0.5,0.25],"line-width":{"base":1.2,"stops":[[5,0.4],[6,0.6],[7,1.5],[20,22]]},"line-opacity":0.5}},{"id":"tunnel-path","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","brunnel","tunnel"],["==","class","path"]]],"paint":{"line-color":"#cba","line-dasharray":[1.5,0.75],"line-width":{"base":1.2,"stops":[[15,1.2],[20,4]]}}},{"id":"tunnel-service-track","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","service","track"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fff","line-width":{"base":1.2,"stops":[[15.5,0],[16,2],[20,7.5]]}}},{"id":"tunnel-minor","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["==","class","minor_road"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fff","line-opacity":1,"line-width":{"base":1.2,"stops":[[13.5,0],[14,2.5],[20,11.5]]}}},{"id":"tunnel-secondary-tertiary","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fff4c6","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,10]]}}},{"id":"tunnel-trunk-primary","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fff4c6","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]},"line-opacity":0.5}},{"id":"tunnel-motorway","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["==","class","motorway"]],"layout":{"line-join":"round","visibility":"visible"},"paint":{"line-color":"#ffdaa6","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]},"line-opacity":0.5}},{"id":"tunnel-railway","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["==","class","rail"]],"paint":{"line-color":"#bbb","line-width":{"base":1.4,"stops":[[14,0.4],[15,0.75],[20,2]]},"line-dasharray":[2,2]}},{"id":"ferry","type":"line","source":"openmaptiles","source-layer":"transportation","filter":["all",["in","class","ferry"]],"layout":{"line-join":"round","visibility":"visible"},"paint":{"line-color":"rgba(108, 159, 182, 1)","line-width":1.1,"line-dasharray":[2,2]}},{"id":"aeroway-taxiway-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"aeroway","minzoom":12,"filter":["all",["in","class","taxiway"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"rgba(153, 153, 153, 1)","line-width":{"base":1.5,"stops":[[11,2],[17,12]]},"line-opacity":1}},{"id":"aeroway-runway-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"aeroway","minzoom":12,"filter":["all",["in","class","runway"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"rgba(153, 153, 153, 1)","line-width":{"base":1.5,"stops":[[11,5],[17,55]]},"line-opacity":1}},{"id":"aeroway-taxiway","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"aeroway","minzoom":4,"filter":["all",["in","class","taxiway"],["==","$type","LineString"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"rgba(255, 255, 255, 1)","line-width":{"base":1.5,"stops":[[11,1],[17,10]]},"line-opacity":{"base":1,"stops":[[11,0],[12,1]]}}},{"id":"aeroway-runway","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"aeroway","minzoom":4,"filter":["all",["in","class","runway"],["==","$type","LineString"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"rgba(255, 255, 255, 1)","line-width":{"base":1.5,"stops":[[11,4],[17,50]]},"line-opacity":{"base":1,"stops":[[11,0],[12,1]]}}},{"id":"highway-motorway-link-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":12,"filter":["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[12,1],[13,3],[14,4],[20,15]]}}},{"id":"highway-link-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":13,"filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[12,1],[13,3],[14,4],[20,15]]}}},{"id":"highway-minor-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#cfcdca","line-opacity":{"stops":[[12,0],[12.5,0]]},"line-width":{"base":1.2,"stops":[[12,0.5],[13,1],[14,4],[20,15]]}}},{"id":"highway-secondary-tertiary-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],"layout":{"line-cap":"butt","line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-opacity":0.5,"line-width":{"base":1.2,"stops":[[8,1.5],[20,17]]}}},{"id":"highway-primary-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":5,"filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]],"layout":{"line-cap":"butt","line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-opacity":{"stops":[[7,0],[8,0.6]]},"line-width":{"base":1.2,"stops":[[7,0],[8,0.6],[9,1.5],[20,22]]}}},{"id":"highway-trunk-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":5,"filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]],"layout":{"line-cap":"butt","line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-opacity":{"stops":[[5,0],[6,0.5]]},"line-width":{"base":1.2,"stops":[[5,0],[6,0.6],[7,1.5],[20,22]]}}},{"id":"highway-motorway-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":4,"filter":["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]],"layout":{"line-cap":"butt","line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-width":{"base":1.2,"stops":[[4,0],[5,0.4],[6,0.6],[7,1.5],[20,22]]},"line-opacity":{"stops":[[4,0],[5,0.5]]}}},{"id":"highway-path","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","path"]]],"paint":{"line-color":"#cba","line-dasharray":[1.5,0.75],"line-width":{"base":1.2,"stops":[[15,1.2],[20,4]]}}},{"id":"highway-motorway-link","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":12,"filter":["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#fc8","line-width":{"base":1.2,"stops":[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{"id":"highway-link","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":13,"filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{"id":"highway-minor","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#fff","line-opacity":0.5,"line-width":{"base":1.2,"stops":[[13.5,0],[14,2.5],[20,11.5]]}}},{"id":"highway-secondary-tertiary","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[6.5,0],[8,0.5],[20,13]]},"line-opacity":0.5}},{"id":"highway-primary","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[8.5,0],[9,0.5],[20,18]]},"line-opacity":0}},{"id":"highway-trunk","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]},"line-opacity":0.5}},{"id":"highway-motorway","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":5,"filter":["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#fc8","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]},"line-opacity":0.5}},{"id":"railway-transit","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],"layout":{"visibility":"visible"},"paint":{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{"base":1.4,"stops":[[14,0.4],[20,1]]}}},{"id":"railway-transit-hatching","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],"layout":{"visibility":"visible"},"paint":{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[0.2,8],"line-width":{"base":1.4,"stops":[[14.5,0],[15,2],[20,6]]}}},{"id":"railway-service","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],"paint":{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{"base":1.4,"stops":[[14,0.4],[20,1]]}}},{"id":"railway-service-hatching","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],"layout":{"visibility":"visible"},"paint":{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[0.2,8],"line-width":{"base":1.4,"stops":[[14.5,0],[15,2],[20,6]]}}},{"id":"railway","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],"paint":{"line-color":"#bbb","line-width":{"base":1.4,"stops":[[14,0.4],[15,0.75],[20,2]]}}},{"id":"railway-hatching","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],"paint":{"line-color":"#bbb","line-dasharray":[0.2,8],"line-width":{"base":1.4,"stops":[[14.5,0],[15,3],[20,8]]}}},{"id":"bridge-motorway-link-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","motorway_link"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[12,1],[13,3],[14,4],[20,15]]}}},{"id":"bridge-link-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[12,1],[13,3],[14,4],[20,15]]}}},{"id":"bridge-secondary-tertiary-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[8,1.5],[20,28]]}}},{"id":"bridge-trunk-primary-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],"layout":{"line-join":"round"},"paint":{"line-color":"hsl(28, 76%, 67%)","line-width":{"base":1.2,"stops":[[5,0.4],[6,0.6],[7,1.5],[20,26]]}}},{"id":"bridge-motorway-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","motorway"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-width":{"base":1.2,"stops":[[5,0.4],[6,0.6],[7,1.5],[20,22]]},"line-opacity":0.5}},{"id":"bridge-path-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],"paint":{"line-color":"#f8f4f0","line-width":{"base":1.2,"stops":[[15,1.2],[20,18]]}}},{"id":"bridge-path","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],"paint":{"line-color":"#cba","line-width":{"base":1.2,"stops":[[15,1.2],[20,4]]},"line-dasharray":[1.5,0.75]}},{"id":"bridge-motorway-link","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","motorway_link"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fc8","line-width":{"base":1.2,"stops":[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{"id":"bridge-link","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{"id":"bridge-secondary-tertiary","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,20]]}}},{"id":"bridge-trunk-primary","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]}}},{"id":"bridge-motorway","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","motorway"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fc8","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]},"line-opacity":0.5}},{"id":"bridge-railway","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","rail"]],"paint":{"line-color":"#bbb","line-width":{"base":1.4,"stops":[[14,0.4],[15,0.75],[20,2]]}}},{"id":"bridge-railway-hatching","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","rail"]],"paint":{"line-color":"#bbb","line-dasharray":[0.2,8],"line-width":{"base":1.4,"stops":[[14.5,0],[15,3],[20,8]]}}},{"id":"cablecar","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":13,"filter":["==","class","cable_car"],"layout":{"visibility":"visible","line-cap":"round"},"paint":{"line-color":"hsl(0, 0%, 70%)","line-width":{"base":1,"stops":[[11,1],[19,2.5]]}}},{"id":"cablecar-dash","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":13,"filter":["==","class","cable_car"],"layout":{"visibility":"visible","line-cap":"round"},"paint":{"line-color":"hsl(0, 0%, 70%)","line-width":{"base":1,"stops":[[11,3],[19,5.5]]},"line-dasharray":[2,3]}},{"id":"boundary-land-level-4","type":"line","source":"openmaptiles","source-layer":"boundary","filter":["all",[">=","admin_level",4],["<=","admin_level",8],["!=","maritime",1]],"layout":{"line-join":"round"},"paint":{"line-color":"#9e9cab","line-dasharray":[3,1,1,1],"line-width":{"base":1.4,"stops":[[4,0.4],[5,1],[12,3]]},"line-opacity":0.6}},{"id":"boundary-land-level-2","type":"line","source":"openmaptiles","source-layer":"boundary","filter":["all",["==","admin_level",2],["!=","maritime",1],["!=","disputed",1]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"hsl(248, 7%, 66%)","line-width":{"base":1,"stops":[[0,0.6],[4,1.4],[5,2],[12,2]]}}},{"id":"boundary-land-disputed","type":"line","source":"openmaptiles","source-layer":"boundary","filter":["all",["!=","maritime",1],["==","disputed",1]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"hsl(248, 7%, 70%)","line-dasharray":[1,3],"line-width":{"base":1,"stops":[[0,0.6],[4,1.4],[5,2],[12,8]]}}},{"id":"boundary-water","type":"line","source":"openmaptiles","source-layer":"boundary","filter":["all",["in","admin_level",2,4],["==","maritime",1]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"rgba(154, 189, 214, 1)","line-width":{"base":1,"stops":[[0,0.6],[4,1],[5,1],[12,1]]},"line-opacity":{"stops":[[6,0],[10,0]]}}},{"id":"waterway-name","type":"symbol","source":"openmaptiles","source-layer":"waterway","minzoom":13,"filter":["all",["==","$type","LineString"],["has","name"]],"layout":{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin} {name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","text-letter-spacing":0.2,"symbol-spacing":350},"paint":{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{"id":"water-name-lakeline","type":"symbol","source":"openmaptiles","source-layer":"water_name","filter":["==","$type","LineString"],"layout":{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","symbol-spacing":350,"text-letter-spacing":0.2},"paint":{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{"id":"water-name-ocean","type":"symbol","source":"openmaptiles","source-layer":"water_name","filter":["all",["==","$type","Point"],["==","class","ocean"]],"layout":{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":0.2},"paint":{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{"id":"water-name-other","type":"symbol","source":"openmaptiles","source-layer":"water_name","filter":["all",["==","$type","Point"],["!in","class","ocean"]],"layout":{"text-font":["Noto Sans Italic"],"text-size":{"stops":[[0,10],[6,14]]},"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":0.2,"visibility":"visible"},"paint":{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{"id":"poi-level-3","type":"symbol","source":"openmaptiles","source-layer":"poi","minzoom":16,"filter":["all",["==","$type","Point"],[">=","rank",25]],"layout":{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":"{name:latin}\\n{name:nonlatin}","text-offset":[0,0.6],"text-size":12,"text-max-width":9},"paint":{"text-halo-blur":0.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{"id":"poi-level-2","type":"symbol","source":"openmaptiles","source-layer":"poi","minzoom":15,"filter":["all",["==","$type","Point"],["<=","rank",24],[">=","rank",15]],"layout":{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":"{name:latin}\\n{name:nonlatin}","text-offset":[0,0.6],"text-size":12,"text-max-width":9},"paint":{"text-halo-blur":0.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{"id":"poi-level-1","type":"symbol","source":"openmaptiles","source-layer":"poi","minzoom":14,"filter":["all",["==","$type","Point"],["<=","rank",14],["has","name"]],"layout":{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":"{name:latin}\\n{name:nonlatin}","text-offset":[0,0.6],"text-size":11,"text-max-width":9},"paint":{"text-halo-blur":0.5,"text-color":"rgba(191, 228, 172, 1)","text-halo-width":1,"text-halo-color":"rgba(30, 29, 29, 1)"}},{"id":"poi-railway","type":"symbol","source":"openmaptiles","source-layer":"poi","minzoom":13,"filter":["all",["==","$type","Point"],["has","name"],["==","class","railway"],["==","subclass","station"]],"layout":{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":"{name:latin}\\n{name:nonlatin}","text-offset":[0,0.6],"text-size":12,"text-max-width":9,"icon-optional":false,"icon-ignore-placement":false,"icon-allow-overlap":false,"text-ignore-placement":false,"text-allow-overlap":false,"text-optional":true},"paint":{"text-halo-blur":0.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{"id":"road_oneway","type":"symbol","source":"openmaptiles","source-layer":"transportation","minzoom":15,"filter":["all",["==","oneway",1],["in","class","motorway","trunk","primary","secondary","tertiary","minor","service"]],"layout":{"symbol-placement":"line","icon-image":"oneway","symbol-spacing":75,"icon-padding":2,"icon-rotation-alignment":"map","icon-rotate":90,"icon-size":{"stops":[[15,0.5],[19,1]]}},"paint":{"icon-opacity":0.5}},{"id":"road_oneway_opposite","type":"symbol","source":"openmaptiles","source-layer":"transportation","minzoom":15,"filter":["all",["==","oneway",-1],["in","class","motorway","trunk","primary","secondary","tertiary","minor","service"]],"layout":{"symbol-placement":"line","icon-image":"oneway","symbol-spacing":75,"icon-padding":2,"icon-rotation-alignment":"map","icon-rotate":-90,"icon-size":{"stops":[[15,0.5],[19,1]]}},"paint":{"icon-opacity":0.5}},{"id":"highway-name-path","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":15.5,"filter":["==","class","path"],"layout":{"text-size":{"base":1,"stops":[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},"paint":{"text-halo-color":"#f8f4f0","text-color":"hsl(30, 23%, 62%)","text-halo-width":0.5}},{"id":"highway-name-minor","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":15,"filter":["all",["==","$type","LineString"],["in","class","minor","service","track"]],"layout":{"text-size":{"base":1,"stops":[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},"paint":{"text-halo-blur":0.5,"text-color":"#765","text-halo-width":1}},{"id":"highway-name-major","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":12.2,"filter":["in","class","primary","secondary","tertiary","trunk"],"layout":{"text-size":{"base":1,"stops":[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},"paint":{"text-halo-blur":0.5,"text-color":"#765","text-halo-width":1}},{"id":"highway-shield","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":8,"filter":["all",["<=","ref_length",6],["==","$type","LineString"],["!in","network","us-interstate","us-highway","us-state"]],"layout":{"text-size":10,"icon-image":"road_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{"base":1,"stops":[[10,"point"],[11,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},"paint":{"text-opacity":1,"text-color":"rgba(20, 19, 19, 1)","text-halo-color":"rgba(230, 221, 221, 0)","text-halo-width":2,"icon-color":"rgba(183, 18, 18, 1)","icon-opacity":0.3,"icon-halo-color":"rgba(183, 55, 55, 0)"}},{"id":"highway-shield-us-interstate","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":7,"filter":["all",["<=","ref_length",6],["==","$type","LineString"],["in","network","us-interstate"]],"layout":{"text-size":10,"icon-image":"{network}_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{"base":1,"stops":[[7,"point"],[7,"line"],[8,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},"paint":{"text-color":"rgba(0, 0, 0, 1)"}},{"id":"highway-shield-us-other","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":9,"filter":["all",["<=","ref_length",6],["==","$type","LineString"],["in","network","us-highway","us-state"]],"layout":{"text-size":10,"icon-image":"{network}_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{"base":1,"stops":[[10,"point"],[11,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},"paint":{"text-color":"rgba(0, 0, 0, 1)"}},{"id":"place-other","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","minzoom":12,"filter":["!in","class","city","town","village","country","continent"],"layout":{"text-letter-spacing":0.1,"text-size":{"base":1.2,"stops":[[12,10],[15,14]]},"text-font":["Noto Sans Bold"],"text-field":"{name:latin}\\n{name:nonlatin}","text-transform":"uppercase","text-max-width":9,"visibility":"visible"},"paint":{"text-color":"rgba(255,255,255,1)","text-halo-width":1.2,"text-halo-color":"rgba(57, 28, 28, 1)"}},{"id":"place-village","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","minzoom":10,"filter":["==","class","village"],"layout":{"text-font":["Noto Sans Regular"],"text-size":{"base":1.2,"stops":[[10,12],[15,16]]},"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":8,"visibility":"visible"},"paint":{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(10, 9, 9, 0.8)"}},{"id":"place-town","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["==","class","town"],"layout":{"text-font":["Noto Sans Regular"],"text-size":{"base":1.2,"stops":[[10,14],[15,24]]},"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":8,"visibility":"visible"},"paint":{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(22, 22, 22, 0.8)"}},{"id":"place-city","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["!=","capital",2],["==","class","city"]],"layout":{"text-font":["Noto Sans Regular"],"text-size":{"base":1.2,"stops":[[7,14],[11,24]]},"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":8,"visibility":"visible"},"paint":{"text-color":"rgba(0, 0, 0, 1)","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-city-capital","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["==","capital",2],["==","class","city"]],"layout":{"text-font":["Noto Sans Regular"],"text-size":{"base":1.2,"stops":[[7,14],[11,24]]},"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":8,"icon-image":"star_11","text-offset":[0.4,0],"icon-size":0.8,"text-anchor":"left","visibility":"visible"},"paint":{"text-color":"#333","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-country-other","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["==","class","country"],[">=","rank",3],["!has","iso_a2"]],"layout":{"text-font":["Noto Sans Italic"],"text-field":"{name:latin}","text-size":{"stops":[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,"visibility":"visible"},"paint":{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-country-3","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["==","class","country"],[">=","rank",3],["has","iso_a2"]],"layout":{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{"stops":[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,"visibility":"visible"},"paint":{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-country-2","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["==","class","country"],["==","rank",2],["has","iso_a2"]],"layout":{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{"stops":[[2,11],[5,17]]},"text-transform":"uppercase","text-max-width":6.25,"visibility":"visible"},"paint":{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-country-1","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["==","class","country"],["==","rank",1],["has","iso_a2"]],"layout":{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{"stops":[[1,11],[4,17]]},"text-transform":"uppercase","text-max-width":6.25,"visibility":"visible"},"paint":{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-continent","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","maxzoom":1,"filter":["==","class","continent"],"layout":{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":14,"text-max-width":6.25,"text-transform":"uppercase","visibility":"visible"},"paint":{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}}],"id":"qebnlkra6"}`)},51962:function(A){A.exports=JSON.parse(`{"version":8,"name":"orto","metadata":{},"center":[1.537786,41.837539],"zoom":12,"bearing":0,"pitch":0,"light":{"anchor":"viewport","color":"white","intensity":0.4,"position":[1.15,45,30]},"sources":{"ortoEsri":{"type":"raster","tiles":["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],"tileSize":256,"maxzoom":18,"attribution":"ESRI &copy; <a href='http://www.esri.com'>ESRI</a>"},"ortoInstaMaps":{"type":"raster","tiles":["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],"tileSize":256,"maxzoom":13},"ortoICGC":{"type":"raster","tiles":["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],"tileSize":256,"minzoom":13.1,"maxzoom":20},"openmaptiles":{"type":"vector","url":"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},"sprite":"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1","glyphs":"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf","layers":[{"id":"background","type":"background","paint":{"background-color":"#F4F9F4"}},{"id":"ortoEsri","type":"raster","source":"ortoEsri","maxzoom":16,"layout":{"visibility":"visible"}},{"id":"ortoICGC","type":"raster","source":"ortoICGC","minzoom":13.1,"maxzoom":19,"layout":{"visibility":"visible"}},{"id":"ortoInstaMaps","type":"raster","source":"ortoInstaMaps","maxzoom":13,"layout":{"visibility":"visible"}}]}`)}},D={};function X(A){var b=D[A];if(b!==void 0)return b.exports;var e=D[A]={id:A,exports:{}};return g[A].call(e.exports,e,e.exports,X),e.exports}return X.m=g,X.n=function(A){var b=A&&A.__esModule?function(){return A.default}:function(){return A};return X.d(b,{a:b}),b},X.d=function(A,b){for(var e in b)X.o(b,e)&&!X.o(A,e)&&Object.defineProperty(A,e,{enumerable:!0,get:b[e]})},X.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}})(),X.o=function(A,b){return Object.prototype.hasOwnProperty.call(A,b)},X.r=function(A){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(A,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(A,"__esModule",{value:!0})},X.b=document.baseURI||self.location.href,X.nc=void 0,X(20260)})()})})(qx)),qx.exports}var sk=ok();const Gx=ak(sk),Hx=1,lk=800,Jx=300,ck=-46,Kx=100,Xx=-14,uk={__name:"VolumetricField",props:{passesPlays:{type:Array,default:()=>[]},playIndexes:{type:Object,default:()=>{}},isGhostEffect:{type:Boolean,default:!1}},setup(r){const a=new Set([2,20,308,310]),g=[[0,"rgb(12,31,82)"],[.2,"rgb(115,248,253)"],[.4,"rgb(117,251,98)"],[.6,"rgb(255,255,84)"],[.8,"rgb(242,168,59)"],[1,"rgb(234,55,36)"]];let D=null;const X=r,A=h.ref(null),b=h.ref(null),e=h.ref(0),v=h.ref(null),u=h.ref(0),t=h.computed(()=>`volumetric-field-${Date.now()}`),w=h.computed(()=>({"--top-surface-plot":u.value>244?"10%":u.value>175?"10px":"7%"}));h.watch(()=>X.passesPlays,T=>{const C=T.reduce((S,L)=>(a.has(L[X.playIndexes.categoryId])&&S.push({x1:L[X.playIndexes.coordinate1X],y1:L[X.playIndexes.coordinate1Y],x2:L[X.playIndexes.coordinate2X],y2:L[X.playIndexes.coordinate2Y],x3:L[X.playIndexes.coordinate3X],y3:L[X.playIndexes.coordinate3Y]}),S),[]);m(C)}),h.watch(()=>e.value,(T,C)=>{v.value&&(s(T),b.value.style.height=`${c(T)}px`,v.value.style.top=`${f(c(T))}px`,u.value=T)});function y(){D=new ResizeObserver(T=>{for(const C of T)e.value=C.contentRect.width}),D.observe(A.value)}function x(T){return Array.from({length:T},()=>0)}function p(T,C){let S=.01351,L=.02439,R=0,E=0,N=[];const M=C.length,k=Math.floor(M/10);for(;R<74;)E=C.filter(I=>1-I.y3>=R*S&&1-I.y3<=(R+1)*S&&1-I.x3>=T*L&&1-I.x3<=(T+1)*L).map(I=>I.y3).length,N.push(parseFloat((E/k).toFixed(4))),R++;return N.reverse()}function n(T){let C=[x(74),x(74)],S=[],L=39;for(;L>0&&L<=39;)S=p(L,T),C.push(S),L--;return C.push(x(74),x(74)),C}function i(T,C,S){const L=[];let R=0,E=0;L.push(T[0]);for(let N=1;N<S-1;N++){const M=[];M.push(T[N][0]);for(let k=1;k<C-1;k++)R=T[N][k-1],E=T[N][k+1],M.push(R+.5*(T[N][k]+E-R));M.push(T[N][C-1]),L.push(M)}L.push(T[S-1]);for(let N=1;N<C-1;N++)for(let M=1;M<S-1;M++)R=L[M-1][N],E=L[M+1][N],L[M][N]=R+.5*(L[M][N]+E-R);return L}function d(T){let C=0,S=0;for(let L=0;L<T.length;L++){S=S+T[L].reduce(function(E,N){return E+N});const R=Math.max.apply(null,T[L]);R>C&&(C=R)}return C}function s(T){Gx.relayout(A.value,{width:T,height:c(T)})}function c(T){return Math.round(Jx/lk*T,0)}function f(T){return Xx+(T-Kx)/(Jx-Kx)*(ck-Xx)}function m(T){let C=n(T),S=C.length,L=C[0].length;C=i(i(C,L,S),L,S),L=C[0].length,S=C.length;const R=d(C),E=[{z:C,type:"surface",connectgaps:!0,opacity:.25,colorscale:g,autoscale:!1,showscale:!1}],N=[0,L],M=[0,S],k=[0,R*5],I={scene:{xaxis:{title:"",showgrid:!1,showline:!1,zeroline:!1,showticklabels:!1,showbackground:!1,backgroundcolor:"transparent",range:N},yaxis:{title:"",showgrid:!1,showline:!1,zeroline:!1,showticklabels:!1,showbackground:!1,backgroundcolor:"transparent",range:M},zaxis:{title:"",showgrid:!1,showline:!1,zeroline:!1,showticklabels:!1,showbackground:!1,backgroundcolor:"transparent",range:k},aspectratio:{x:1,y:.419,z:1},camera:{eye:{x:-.006743829259037479,y:.33535167247712533,z:-.0014332540873207011},center:{x:-.00679220694254041,y:.10728256468650094,z:-.30848979628595363}}},showlegend:!1,width:e.value,height:c(e.value),paper_bgcolor:"rgba(0,0,0,0)",margin:{l:0,r:0,b:0,t:0}};b.value&&(b.value.style.height=`${c(e.value)}px`);const _=[];for(let z=0;z<L;z++){const V=[],U=[],q=[];for(let W=0;W<S;W++)V.push(z),U.push(W),q.push(E[0].z[W][z]);_.push({x:V,y:U,z:q,type:"scatter3d",mode:"lines",line:{cmin:-.1,cmax:R,width:Hx,color:q,colorscale:g,shape:"spline",smoothing:.6,dash:"dotline"}})}for(let z=0;z<S;z++){const V=[],U=[],q=[];for(let W=0;W<L;W++)V.push(W),U.push(z),q.push(E[0].z[z][W]);_.push({x:V,y:U,z:q,type:"scatter3d",mode:"lines",line:{cmin:-.1,cmax:R,width:Hx,color:q,colorscale:g,shape:"spline",smoothing:.6,dash:"dotline"}})}Gx.newPlot(A.value,E.concat(_),I,{displayModeBar:!1},{responsive:!0}),v.value=document.querySelector(`div.${t.value} > .plot-container`);const P=document.querySelector(`div.${t.value} div.plotly`);P&&X.isGhostEffect&&(P.style.opacity="0.2"),v.value&&(v.value.style.top=`${f(c(e.value))}px`)}return h.onMounted(()=>{A.value&&(A.value.style.pointerEvents="none"),y()}),(T,C)=>(h.openBlock(),h.createElementBlock("div",{ref:"card",class:"card-volumetric-field",style:h.normalizeStyle(w.value)},[h.createElementVNode("div",{ref_key:"volumetricField",ref:b,class:"card-volumetric-field__volumetric-field"},[h.createElementVNode("div",{ref_key:"surfacePlot",ref:A,id:"surface-plot",class:h.normalizeClass([t.value])},null,2)],512)],4))}},dk=Qm(uk,[["__scopeId","data-v-c9484b3e"]]),pk={__name:"AttackDirection",props:{team:{type:Object,required:!0}},setup(r){const a=r,g=h.computed(()=>({"--flex-direction-info":a.team.isHomeTeam?"flex":"row-reverse","--justify-content-info":a.team.isHomeTeam?"flex-start":"flex-end","--arrow-color":a.team.isHomeTeam?"#336dff":"#7ed321"}));return(D,X)=>(h.openBlock(),h.createElementBlock("div",{class:"attack-direction",style:h.normalizeStyle(g.value)},[X[0]||(X[0]=h.createElementVNode("div",{class:"attack-direction__line"},null,-1)),h.createElementVNode("div",{class:h.normalizeClass(`attack-direction__triangle-${r.team.isHomeTeam?"right":"left"}`)},null,2),X[1]||(X[1]=h.createElementVNode("div",{class:"attack-direction__text"},"Ataca",-1))],4))}},hk=Qm(pk,[["__scopeId","data-v-18aa328f"]]);function Zx(r,a){return function(){return r.apply(a,arguments)}}const{toString:fk}=Object.prototype,{getPrototypeOf:v1}=Object,{iterator:$m,toStringTag:Yx}=Symbol,e0=(r=>a=>{const g=fk.call(a);return r[g]||(r[g]=g.slice(8,-1).toLowerCase())})(Object.create(null)),Uu=r=>(r=r.toLowerCase(),a=>e0(a)===r),t0=r=>a=>typeof a===r,{isArray:Th}=Array,xf=t0("undefined");function mk(r){return r!==null&&!xf(r)&&r.constructor!==null&&!xf(r.constructor)&&$c(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}const Qx=Uu("ArrayBuffer");function gk(r){let a;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?a=ArrayBuffer.isView(r):a=r&&r.buffer&&Qx(r.buffer),a}const yk=t0("string"),$c=t0("function"),$x=t0("number"),r0=r=>r!==null&&typeof r=="object",vk=r=>r===!0||r===!1,n0=r=>{if(e0(r)!=="object")return!1;const a=v1(r);return(a===null||a===Object.prototype||Object.getPrototypeOf(a)===null)&&!(Yx in r)&&!($m in r)},xk=Uu("Date"),bk=Uu("File"),_k=Uu("Blob"),wk=Uu("FileList"),Tk=r=>r0(r)&&$c(r.pipe),kk=r=>{let a;return r&&(typeof FormData=="function"&&r instanceof FormData||$c(r.append)&&((a=e0(r))==="formdata"||a==="object"&&$c(r.toString)&&r.toString()==="[object FormData]"))},Sk=Uu("URLSearchParams"),[Ck,Ek,Mk,Ak]=["ReadableStream","Request","Response","Headers"].map(Uu),Lk=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function bf(r,a,{allOwnKeys:g=!1}={}){if(r===null||typeof r>"u")return;let D,X;if(typeof r!="object"&&(r=[r]),Th(r))for(D=0,X=r.length;D<X;D++)a.call(null,r[D],D,r);else{const A=g?Object.getOwnPropertyNames(r):Object.keys(r),b=A.length;let e;for(D=0;D<b;D++)e=A[D],a.call(null,r[e],e,r)}}function eb(r,a){a=a.toLowerCase();const g=Object.keys(r);let D=g.length,X;for(;D-- >0;)if(X=g[D],a===X.toLowerCase())return X;return null}const Mp=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,tb=r=>!xf(r)&&r!==Mp;function x1(){const{caseless:r}=tb(this)&&this||{},a={},g=(D,X)=>{const A=r&&eb(a,X)||X;n0(a[A])&&n0(D)?a[A]=x1(a[A],D):n0(D)?a[A]=x1({},D):Th(D)?a[A]=D.slice():a[A]=D};for(let D=0,X=arguments.length;D<X;D++)arguments[D]&&bf(arguments[D],g);return a}const Rk=(r,a,g,{allOwnKeys:D}={})=>(bf(a,(X,A)=>{g&&$c(X)?r[A]=Zx(X,g):r[A]=X},{allOwnKeys:D}),r),Nk=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),Ik=(r,a,g,D)=>{r.prototype=Object.create(a.prototype,D),r.prototype.constructor=r,Object.defineProperty(r,"super",{value:a.prototype}),g&&Object.assign(r.prototype,g)},Pk=(r,a,g,D)=>{let X,A,b;const e={};if(a=a||{},r==null)return a;do{for(X=Object.getOwnPropertyNames(r),A=X.length;A-- >0;)b=X[A],(!D||D(b,r,a))&&!e[b]&&(a[b]=r[b],e[b]=!0);r=g!==!1&&v1(r)}while(r&&(!g||g(r,a))&&r!==Object.prototype);return a},Ok=(r,a,g)=>{r=String(r),(g===void 0||g>r.length)&&(g=r.length),g-=a.length;const D=r.indexOf(a,g);return D!==-1&&D===g},zk=r=>{if(!r)return null;if(Th(r))return r;let a=r.length;if(!$x(a))return null;const g=new Array(a);for(;a-- >0;)g[a]=r[a];return g},Bk=(r=>a=>r&&a instanceof r)(typeof Uint8Array<"u"&&v1(Uint8Array)),Dk=(r,a)=>{const g=(r&&r[$m]).call(r);let D;for(;(D=g.next())&&!D.done;){const X=D.value;a.call(r,X[0],X[1])}},Vk=(r,a)=>{let g;const D=[];for(;(g=r.exec(a))!==null;)D.push(g);return D},Fk=Uu("HTMLFormElement"),jk=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(a,g,D){return g.toUpperCase()+D}),rb=(({hasOwnProperty:r})=>(a,g)=>r.call(a,g))(Object.prototype),Uk=Uu("RegExp"),nb=(r,a)=>{const g=Object.getOwnPropertyDescriptors(r),D={};bf(g,(X,A)=>{let b;(b=a(X,A,r))!==!1&&(D[A]=b||X)}),Object.defineProperties(r,D)},qk=r=>{nb(r,(a,g)=>{if($c(r)&&["arguments","caller","callee"].indexOf(g)!==-1)return!1;const D=r[g];if($c(D)){if(a.enumerable=!1,"writable"in a){a.writable=!1;return}a.set||(a.set=()=>{throw Error("Can not rewrite read-only method '"+g+"'")})}})},Wk=(r,a)=>{const g={},D=X=>{X.forEach(A=>{g[A]=!0})};return Th(r)?D(r):D(String(r).split(a)),g},Gk=()=>{},Hk=(r,a)=>r!=null&&Number.isFinite(r=+r)?r:a;function Jk(r){return!!(r&&$c(r.append)&&r[Yx]==="FormData"&&r[$m])}const Kk=r=>{const a=new Array(10),g=(D,X)=>{if(r0(D)){if(a.indexOf(D)>=0)return;if(!("toJSON"in D)){a[X]=D;const A=Th(D)?[]:{};return bf(D,(b,e)=>{const v=g(b,X+1);!xf(v)&&(A[e]=v)}),a[X]=void 0,A}}return D};return g(r,0)},Xk=Uu("AsyncFunction"),Zk=r=>r&&(r0(r)||$c(r))&&$c(r.then)&&$c(r.catch),ib=((r,a)=>r?setImmediate:a?((g,D)=>(Mp.addEventListener("message",({source:X,data:A})=>{X===Mp&&A===g&&D.length&&D.shift()()},!1),X=>{D.push(X),Mp.postMessage(g,"*")}))(`axios@${Math.random()}`,[]):g=>setTimeout(g))(typeof setImmediate=="function",$c(Mp.postMessage)),Yk=typeof queueMicrotask<"u"?queueMicrotask.bind(Mp):typeof process<"u"&&process.nextTick||ib,Qk=r=>r!=null&&$c(r[$m]),Fn={isArray:Th,isArrayBuffer:Qx,isBuffer:mk,isFormData:kk,isArrayBufferView:gk,isString:yk,isNumber:$x,isBoolean:vk,isObject:r0,isPlainObject:n0,isReadableStream:Ck,isRequest:Ek,isResponse:Mk,isHeaders:Ak,isUndefined:xf,isDate:xk,isFile:bk,isBlob:_k,isRegExp:Uk,isFunction:$c,isStream:Tk,isURLSearchParams:Sk,isTypedArray:Bk,isFileList:wk,forEach:bf,merge:x1,extend:Rk,trim:Lk,stripBOM:Nk,inherits:Ik,toFlatObject:Pk,kindOf:e0,kindOfTest:Uu,endsWith:Ok,toArray:zk,forEachEntry:Dk,matchAll:Vk,isHTMLForm:Fk,hasOwnProperty:rb,hasOwnProp:rb,reduceDescriptors:nb,freezeMethods:qk,toObjectSet:Wk,toCamelCase:jk,noop:Gk,toFiniteNumber:Hk,findKey:eb,global:Mp,isContextDefined:tb,isSpecCompliantForm:Jk,toJSONObject:Kk,isAsyncFn:Xk,isThenable:Zk,setImmediate:ib,asap:Yk,isIterable:Qk};function da(r,a,g,D,X){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=r,this.name="AxiosError",a&&(this.code=a),g&&(this.config=g),D&&(this.request=D),X&&(this.response=X,this.status=X.status?X.status:null)}Fn.inherits(da,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Fn.toJSONObject(this.config),code:this.code,status:this.status}}});const ab=da.prototype,ob={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(r=>{ob[r]={value:r}}),Object.defineProperties(da,ob),Object.defineProperty(ab,"isAxiosError",{value:!0}),da.from=(r,a,g,D,X,A)=>{const b=Object.create(ab);return Fn.toFlatObject(r,b,function(e){return e!==Error.prototype},e=>e!=="isAxiosError"),da.call(b,r.message,a,g,D,X),b.cause=r,b.name=r.name,A&&Object.assign(b,A),b};const $k=null;function b1(r){return Fn.isPlainObject(r)||Fn.isArray(r)}function sb(r){return Fn.endsWith(r,"[]")?r.slice(0,-2):r}function lb(r,a,g){return r?r.concat(a).map(function(D,X){return D=sb(D),!g&&X?"["+D+"]":D}).join(g?".":""):a}function eS(r){return Fn.isArray(r)&&!r.some(b1)}const tS=Fn.toFlatObject(Fn,{},null,function(r){return/^is[A-Z]/.test(r)});function i0(r,a,g){if(!Fn.isObject(r))throw new TypeError("target must be an object");a=a||new FormData,g=Fn.toFlatObject(g,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,p){return!Fn.isUndefined(p[x])});const D=g.metaTokens,X=g.visitor||u,A=g.dots,b=g.indexes,e=(g.Blob||typeof Blob<"u"&&Blob)&&Fn.isSpecCompliantForm(a);if(!Fn.isFunction(X))throw new TypeError("visitor must be a function");function v(x){if(x===null)return"";if(Fn.isDate(x))return x.toISOString();if(Fn.isBoolean(x))return x.toString();if(!e&&Fn.isBlob(x))throw new da("Blob is not supported. Use a Buffer instead.");return Fn.isArrayBuffer(x)||Fn.isTypedArray(x)?e&&typeof Blob=="function"?new Blob([x]):Buffer.from(x):x}function u(x,p,n){let i=x;if(x&&!n&&typeof x=="object"){if(Fn.endsWith(p,"{}"))p=D?p:p.slice(0,-2),x=JSON.stringify(x);else if(Fn.isArray(x)&&eS(x)||(Fn.isFileList(x)||Fn.endsWith(p,"[]"))&&(i=Fn.toArray(x)))return p=sb(p),i.forEach(function(d,s){!(Fn.isUndefined(d)||d===null)&&a.append(b===!0?lb([p],s,A):b===null?p:p+"[]",v(d))}),!1}return b1(x)?!0:(a.append(lb(n,p,A),v(x)),!1)}const t=[],w=Object.assign(tS,{defaultVisitor:u,convertValue:v,isVisitable:b1});function y(x,p){if(!Fn.isUndefined(x)){if(t.indexOf(x)!==-1)throw Error("Circular reference detected in "+p.join("."));t.push(x),Fn.forEach(x,function(n,i){(!(Fn.isUndefined(n)||n===null)&&X.call(a,n,Fn.isString(i)?i.trim():i,p,w))===!0&&y(n,p?p.concat(i):[i])}),t.pop()}}if(!Fn.isObject(r))throw new TypeError("data must be an object");return y(r),a}function cb(r){const a={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,function(g){return a[g]})}function _1(r,a){this._pairs=[],r&&i0(r,this,a)}const ub=_1.prototype;ub.append=function(r,a){this._pairs.push([r,a])},ub.toString=function(r){const a=r?function(g){return r.call(this,g,cb)}:cb;return this._pairs.map(function(g){return a(g[0])+"="+a(g[1])},"").join("&")};function rS(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function db(r,a,g){if(!a)return r;const D=g&&g.encode||rS;Fn.isFunction(g)&&(g={serialize:g});const X=g&&g.serialize;let A;if(X?A=X(a,g):A=Fn.isURLSearchParams(a)?a.toString():new _1(a,g).toString(D),A){const b=r.indexOf("#");b!==-1&&(r=r.slice(0,b)),r+=(r.indexOf("?")===-1?"?":"&")+A}return r}let pb=class{constructor(){this.handlers=[]}use(r,a,g){return this.handlers.push({fulfilled:r,rejected:a,synchronous:g?g.synchronous:!1,runWhen:g?g.runWhen:null}),this.handlers.length-1}eject(r){this.handlers[r]&&(this.handlers[r]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(r){Fn.forEach(this.handlers,function(a){a!==null&&r(a)})}};const hb={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},nS=typeof URLSearchParams<"u"?URLSearchParams:_1,iS=typeof FormData<"u"?FormData:null,aS=typeof Blob<"u"?Blob:null,oS={isBrowser:!0,classes:{URLSearchParams:nS,FormData:iS,Blob:aS},protocols:["http","https","file","blob","url","data"]},w1=typeof window<"u"&&typeof document<"u",T1=typeof navigator=="object"&&navigator||void 0,sS=w1&&(!T1||["ReactNative","NativeScript","NS"].indexOf(T1.product)<0),lS=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",cS=w1&&window.location.href||"http://localhost",uS=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:w1,hasStandardBrowserEnv:sS,hasStandardBrowserWebWorkerEnv:lS,navigator:T1,origin:cS},Symbol.toStringTag,{value:"Module"})),kc={...uS,...oS};function dS(r,a){return i0(r,new kc.classes.URLSearchParams,Object.assign({visitor:function(g,D,X,A){return kc.isNode&&Fn.isBuffer(g)?(this.append(D,g.toString("base64")),!1):A.defaultVisitor.apply(this,arguments)}},a))}function pS(r){return Fn.matchAll(/\w+|\[(\w*)]/g,r).map(a=>a[0]==="[]"?"":a[1]||a[0])}function hS(r){const a={},g=Object.keys(r);let D;const X=g.length;let A;for(D=0;D<X;D++)A=g[D],a[A]=r[A];return a}function fb(r){function a(g,D,X,A){let b=g[A++];if(b==="__proto__")return!0;const e=Number.isFinite(+b),v=A>=g.length;return b=!b&&Fn.isArray(X)?X.length:b,v?(Fn.hasOwnProp(X,b)?X[b]=[X[b],D]:X[b]=D,!e):((!X[b]||!Fn.isObject(X[b]))&&(X[b]=[]),a(g,D,X[b],A)&&Fn.isArray(X[b])&&(X[b]=hS(X[b])),!e)}if(Fn.isFormData(r)&&Fn.isFunction(r.entries)){const g={};return Fn.forEachEntry(r,(D,X)=>{a(pS(D),X,g,0)}),g}return null}function fS(r,a,g){if(Fn.isString(r))try{return(a||JSON.parse)(r),Fn.trim(r)}catch(D){if(D.name!=="SyntaxError")throw D}return(g||JSON.stringify)(r)}const _f={transitional:hb,adapter:["xhr","http","fetch"],transformRequest:[function(r,a){const g=a.getContentType()||"",D=g.indexOf("application/json")>-1,X=Fn.isObject(r);if(X&&Fn.isHTMLForm(r)&&(r=new FormData(r)),Fn.isFormData(r))return D?JSON.stringify(fb(r)):r;if(Fn.isArrayBuffer(r)||Fn.isBuffer(r)||Fn.isStream(r)||Fn.isFile(r)||Fn.isBlob(r)||Fn.isReadableStream(r))return r;if(Fn.isArrayBufferView(r))return r.buffer;if(Fn.isURLSearchParams(r))return a.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),r.toString();let A;if(X){if(g.indexOf("application/x-www-form-urlencoded")>-1)return dS(r,this.formSerializer).toString();if((A=Fn.isFileList(r))||g.indexOf("multipart/form-data")>-1){const b=this.env&&this.env.FormData;return i0(A?{"files[]":r}:r,b&&new b,this.formSerializer)}}return X||D?(a.setContentType("application/json",!1),fS(r)):r}],transformResponse:[function(r){const a=this.transitional||_f.transitional,g=a&&a.forcedJSONParsing,D=this.responseType==="json";if(Fn.isResponse(r)||Fn.isReadableStream(r))return r;if(r&&Fn.isString(r)&&(g&&!this.responseType||D)){const X=!(a&&a.silentJSONParsing)&&D;try{return JSON.parse(r)}catch(A){if(X)throw A.name==="SyntaxError"?da.from(A,da.ERR_BAD_RESPONSE,this,null,this.response):A}}return r}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:kc.classes.FormData,Blob:kc.classes.Blob},validateStatus:function(r){return r>=200&&r<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Fn.forEach(["delete","get","head","post","put","patch"],r=>{_f.headers[r]={}});const mS=Fn.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),gS=r=>{const a={};let g,D,X;return r&&r.split(`
4031
4031
  `).forEach(function(A){X=A.indexOf(":"),g=A.substring(0,X).trim().toLowerCase(),D=A.substring(X+1).trim(),!(!g||a[g]&&mS[g])&&(g==="set-cookie"?a[g]?a[g].push(D):a[g]=[D]:a[g]=a[g]?a[g]+", "+D:D)}),a},mb=Symbol("internals");function wf(r){return r&&String(r).trim().toLowerCase()}function a0(r){return r===!1||r==null?r:Fn.isArray(r)?r.map(a0):String(r)}function yS(r){const a=Object.create(null),g=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let D;for(;D=g.exec(r);)a[D[1]]=D[2];return a}const vS=r=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim());function k1(r,a,g,D,X){if(Fn.isFunction(D))return D.call(this,a,g);if(X&&(a=g),!!Fn.isString(a)){if(Fn.isString(D))return a.indexOf(D)!==-1;if(Fn.isRegExp(D))return D.test(a)}}function xS(r){return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(a,g,D)=>g.toUpperCase()+D)}function bS(r,a){const g=Fn.toCamelCase(" "+a);["get","set","has"].forEach(D=>{Object.defineProperty(r,D+g,{value:function(X,A,b){return this[D].call(this,a,X,A,b)},configurable:!0})})}let eu=class{constructor(r){r&&this.set(r)}set(r,a,g){const D=this;function X(b,e,v){const u=wf(e);if(!u)throw new Error("header name must be a non-empty string");const t=Fn.findKey(D,u);(!t||D[t]===void 0||v===!0||v===void 0&&D[t]!==!1)&&(D[t||e]=a0(b))}const A=(b,e)=>Fn.forEach(b,(v,u)=>X(v,u,e));if(Fn.isPlainObject(r)||r instanceof this.constructor)A(r,a);else if(Fn.isString(r)&&(r=r.trim())&&!vS(r))A(gS(r),a);else if(Fn.isObject(r)&&Fn.isIterable(r)){let b={},e,v;for(const u of r){if(!Fn.isArray(u))throw TypeError("Object iterator must return a key-value pair");b[v=u[0]]=(e=b[v])?Fn.isArray(e)?[...e,u[1]]:[e,u[1]]:u[1]}A(b,a)}else r!=null&&X(a,r,g);return this}get(r,a){if(r=wf(r),r){const g=Fn.findKey(this,r);if(g){const D=this[g];if(!a)return D;if(a===!0)return yS(D);if(Fn.isFunction(a))return a.call(this,D,g);if(Fn.isRegExp(a))return a.exec(D);throw new TypeError("parser must be boolean|regexp|function")}}}has(r,a){if(r=wf(r),r){const g=Fn.findKey(this,r);return!!(g&&this[g]!==void 0&&(!a||k1(this,this[g],g,a)))}return!1}delete(r,a){const g=this;let D=!1;function X(A){if(A=wf(A),A){const b=Fn.findKey(g,A);b&&(!a||k1(g,g[b],b,a))&&(delete g[b],D=!0)}}return Fn.isArray(r)?r.forEach(X):X(r),D}clear(r){const a=Object.keys(this);let g=a.length,D=!1;for(;g--;){const X=a[g];(!r||k1(this,this[X],X,r,!0))&&(delete this[X],D=!0)}return D}normalize(r){const a=this,g={};return Fn.forEach(this,(D,X)=>{const A=Fn.findKey(g,X);if(A){a[A]=a0(D),delete a[X];return}const b=r?xS(X):String(X).trim();b!==X&&delete a[X],a[b]=a0(D),g[b]=!0}),this}concat(...r){return this.constructor.concat(this,...r)}toJSON(r){const a=Object.create(null);return Fn.forEach(this,(g,D)=>{g!=null&&g!==!1&&(a[D]=r&&Fn.isArray(g)?g.join(", "):g)}),a}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([r,a])=>r+": "+a).join(`
4032
4032
  `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(r){return r instanceof this?r:new this(r)}static concat(r,...a){const g=new this(r);return a.forEach(D=>g.set(D)),g}static accessor(r){const a=(this[mb]=this[mb]={accessors:{}}).accessors,g=this.prototype;function D(X){const A=wf(X);a[A]||(bS(g,X),a[A]=!0)}return Fn.isArray(r)?r.forEach(D):D(r),this}};eu.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Fn.reduceDescriptors(eu.prototype,({value:r},a)=>{let g=a[0].toUpperCase()+a.slice(1);return{get:()=>r,set(D){this[g]=D}}}),Fn.freezeMethods(eu);function S1(r,a){const g=this||_f,D=a||g,X=eu.from(D.headers);let A=D.data;return Fn.forEach(r,function(b){A=b.call(g,A,X.normalize(),a?a.status:void 0)}),X.normalize(),A}function gb(r){return!!(r&&r.__CANCEL__)}function kh(r,a,g){da.call(this,r??"canceled",da.ERR_CANCELED,a,g),this.name="CanceledError"}Fn.inherits(kh,da,{__CANCEL__:!0});function yb(r,a,g){const D=g.config.validateStatus;!g.status||!D||D(g.status)?r(g):a(new da("Request failed with status code "+g.status,[da.ERR_BAD_REQUEST,da.ERR_BAD_RESPONSE][Math.floor(g.status/100)-4],g.config,g.request,g))}function _S(r){const a=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return a&&a[1]||""}function wS(r,a){r=r||10;const g=new Array(r),D=new Array(r);let X=0,A=0,b;return a=a!==void 0?a:1e3,function(e){const v=Date.now(),u=D[A];b||(b=v),g[X]=e,D[X]=v;let t=A,w=0;for(;t!==X;)w+=g[t++],t=t%r;if(X=(X+1)%r,X===A&&(A=(A+1)%r),v-b<a)return;const y=u&&v-u;return y?Math.round(w*1e3/y):void 0}}function TS(r,a){let g=0,D=1e3/a,X,A;const b=(e,v=Date.now())=>{g=v,X=null,A&&(clearTimeout(A),A=null),r.apply(null,e)};return[(...e)=>{const v=Date.now(),u=v-g;u>=D?b(e,v):(X=e,A||(A=setTimeout(()=>{A=null,b(X)},D-u)))},()=>X&&b(X)]}const o0=(r,a,g=3)=>{let D=0;const X=wS(50,250);return TS(A=>{const b=A.loaded,e=A.lengthComputable?A.total:void 0,v=b-D,u=X(v),t=b<=e;D=b;const w={loaded:b,total:e,progress:e?b/e:void 0,bytes:v,rate:u||void 0,estimated:u&&e&&t?(e-b)/u:void 0,event:A,lengthComputable:e!=null,[a?"download":"upload"]:!0};r(w)},g)},vb=(r,a)=>{const g=r!=null;return[D=>a[0]({lengthComputable:g,total:r,loaded:D}),a[1]]},xb=r=>(...a)=>Fn.asap(()=>r(...a)),kS=kc.hasStandardBrowserEnv?((r,a)=>g=>(g=new URL(g,kc.origin),r.protocol===g.protocol&&r.host===g.host&&(a||r.port===g.port)))(new URL(kc.origin),kc.navigator&&/(msie|trident)/i.test(kc.navigator.userAgent)):()=>!0,SS=kc.hasStandardBrowserEnv?{write(r,a,g,D,X,A){const b=[r+"="+encodeURIComponent(a)];Fn.isNumber(g)&&b.push("expires="+new Date(g).toGMTString()),Fn.isString(D)&&b.push("path="+D),Fn.isString(X)&&b.push("domain="+X),A===!0&&b.push("secure"),document.cookie=b.join("; ")},read(r){const a=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return a?decodeURIComponent(a[3]):null},remove(r){this.write(r,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function CS(r){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}function ES(r,a){return a?r.replace(/\/?\/$/,"")+"/"+a.replace(/^\/+/,""):r}function bb(r,a,g){let D=!CS(a);return r&&(D||g==!1)?ES(r,a):a}const _b=r=>r instanceof eu?{...r}:r;function Ap(r,a){a=a||{};const g={};function D(u,t,w,y){return Fn.isPlainObject(u)&&Fn.isPlainObject(t)?Fn.merge.call({caseless:y},u,t):Fn.isPlainObject(t)?Fn.merge({},t):Fn.isArray(t)?t.slice():t}function X(u,t,w,y){if(Fn.isUndefined(t)){if(!Fn.isUndefined(u))return D(void 0,u,w,y)}else return D(u,t,w,y)}function A(u,t){if(!Fn.isUndefined(t))return D(void 0,t)}function b(u,t){if(Fn.isUndefined(t)){if(!Fn.isUndefined(u))return D(void 0,u)}else return D(void 0,t)}function e(u,t,w){if(w in a)return D(u,t);if(w in r)return D(void 0,u)}const v={url:A,method:A,data:A,baseURL:b,transformRequest:b,transformResponse:b,paramsSerializer:b,timeout:b,timeoutMessage:b,withCredentials:b,withXSRFToken:b,adapter:b,responseType:b,xsrfCookieName:b,xsrfHeaderName:b,onUploadProgress:b,onDownloadProgress:b,decompress:b,maxContentLength:b,maxBodyLength:b,beforeRedirect:b,transport:b,httpAgent:b,httpsAgent:b,cancelToken:b,socketPath:b,responseEncoding:b,validateStatus:e,headers:(u,t,w)=>X(_b(u),_b(t),w,!0)};return Fn.forEach(Object.keys(Object.assign({},r,a)),function(u){const t=v[u]||X,w=t(r[u],a[u],u);Fn.isUndefined(w)&&t!==e||(g[u]=w)}),g}const wb=r=>{const a=Ap({},r);let{data:g,withXSRFToken:D,xsrfHeaderName:X,xsrfCookieName:A,headers:b,auth:e}=a;a.headers=b=eu.from(b),a.url=db(bb(a.baseURL,a.url,a.allowAbsoluteUrls),r.params,r.paramsSerializer),e&&b.set("Authorization","Basic "+btoa((e.username||"")+":"+(e.password?unescape(encodeURIComponent(e.password)):"")));let v;if(Fn.isFormData(g)){if(kc.hasStandardBrowserEnv||kc.hasStandardBrowserWebWorkerEnv)b.setContentType(void 0);else if((v=b.getContentType())!==!1){const[u,...t]=v?v.split(";").map(w=>w.trim()).filter(Boolean):[];b.setContentType([u||"multipart/form-data",...t].join("; "))}}if(kc.hasStandardBrowserEnv&&(D&&Fn.isFunction(D)&&(D=D(a)),D||D!==!1&&kS(a.url))){const u=X&&A&&SS.read(A);u&&b.set(X,u)}return a},MS=typeof XMLHttpRequest<"u",AS=MS&&function(r){return new Promise(function(a,g){const D=wb(r);let X=D.data;const A=eu.from(D.headers).normalize();let{responseType:b,onUploadProgress:e,onDownloadProgress:v}=D,u,t,w,y,x;function p(){y&&y(),x&&x(),D.cancelToken&&D.cancelToken.unsubscribe(u),D.signal&&D.signal.removeEventListener("abort",u)}let n=new XMLHttpRequest;n.open(D.method.toUpperCase(),D.url,!0),n.timeout=D.timeout;function i(){if(!n)return;const s=eu.from("getAllResponseHeaders"in n&&n.getAllResponseHeaders()),c={data:!b||b==="text"||b==="json"?n.responseText:n.response,status:n.status,statusText:n.statusText,headers:s,config:r,request:n};yb(function(f){a(f),p()},function(f){g(f),p()},c),n=null}"onloadend"in n?n.onloadend=i:n.onreadystatechange=function(){!n||n.readyState!==4||n.status===0&&!(n.responseURL&&n.responseURL.indexOf("file:")===0)||setTimeout(i)},n.onabort=function(){n&&(g(new da("Request aborted",da.ECONNABORTED,r,n)),n=null)},n.onerror=function(){g(new da("Network Error",da.ERR_NETWORK,r,n)),n=null},n.ontimeout=function(){let s=D.timeout?"timeout of "+D.timeout+"ms exceeded":"timeout exceeded";const c=D.transitional||hb;D.timeoutErrorMessage&&(s=D.timeoutErrorMessage),g(new da(s,c.clarifyTimeoutError?da.ETIMEDOUT:da.ECONNABORTED,r,n)),n=null},X===void 0&&A.setContentType(null),"setRequestHeader"in n&&Fn.forEach(A.toJSON(),function(s,c){n.setRequestHeader(c,s)}),Fn.isUndefined(D.withCredentials)||(n.withCredentials=!!D.withCredentials),b&&b!=="json"&&(n.responseType=D.responseType),v&&([w,x]=o0(v,!0),n.addEventListener("progress",w)),e&&n.upload&&([t,y]=o0(e),n.upload.addEventListener("progress",t),n.upload.addEventListener("loadend",y)),(D.cancelToken||D.signal)&&(u=s=>{n&&(g(!s||s.type?new kh(null,r,n):s),n.abort(),n=null)},D.cancelToken&&D.cancelToken.subscribe(u),D.signal&&(D.signal.aborted?u():D.signal.addEventListener("abort",u)));const d=_S(D.url);if(d&&kc.protocols.indexOf(d)===-1){g(new da("Unsupported protocol "+d+":",da.ERR_BAD_REQUEST,r));return}n.send(X||null)})},LS=(r,a)=>{const{length:g}=r=r?r.filter(Boolean):[];if(a||g){let D=new AbortController,X;const A=function(u){if(!X){X=!0,e();const t=u instanceof Error?u:this.reason;D.abort(t instanceof da?t:new kh(t instanceof Error?t.message:t))}};let b=a&&setTimeout(()=>{b=null,A(new da(`timeout ${a} of ms exceeded`,da.ETIMEDOUT))},a);const e=()=>{r&&(b&&clearTimeout(b),b=null,r.forEach(u=>{u.unsubscribe?u.unsubscribe(A):u.removeEventListener("abort",A)}),r=null)};r.forEach(u=>u.addEventListener("abort",A));const{signal:v}=D;return v.unsubscribe=()=>Fn.asap(e),v}},RS=function*(r,a){let g=r.byteLength;if(g<a){yield r;return}let D=0,X;for(;D<g;)X=D+a,yield r.slice(D,X),D=X},NS=async function*(r,a){for await(const g of IS(r))yield*RS(g,a)},IS=async function*(r){if(r[Symbol.asyncIterator]){yield*r;return}const a=r.getReader();try{for(;;){const{done:g,value:D}=await a.read();if(g)break;yield D}}finally{await a.cancel()}},Tb=(r,a,g,D)=>{const X=NS(r,a);let A=0,b,e=v=>{b||(b=!0,D&&D(v))};return new ReadableStream({async pull(v){try{const{done:u,value:t}=await X.next();if(u){e(),v.close();return}let w=t.byteLength;if(g){let y=A+=w;g(y)}v.enqueue(new Uint8Array(t))}catch(u){throw e(u),u}},cancel(v){return e(v),X.return()}},{highWaterMark:2})},s0=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",kb=s0&&typeof ReadableStream=="function",PS=s0&&(typeof TextEncoder=="function"?(r=>a=>r.encode(a))(new TextEncoder):async r=>new Uint8Array(await new Response(r).arrayBuffer())),Sb=(r,...a)=>{try{return!!r(...a)}catch{return!1}},OS=kb&&Sb(()=>{let r=!1;const a=new Request(kc.origin,{body:new ReadableStream,method:"POST",get duplex(){return r=!0,"half"}}).headers.has("Content-Type");return r&&!a}),Cb=64*1024,C1=kb&&Sb(()=>Fn.isReadableStream(new Response("").body)),l0={stream:C1&&(r=>r.body)};s0&&(r=>{["text","arrayBuffer","blob","formData","stream"].forEach(a=>{!l0[a]&&(l0[a]=Fn.isFunction(r[a])?g=>g[a]():(g,D)=>{throw new da(`Response type '${a}' is not supported`,da.ERR_NOT_SUPPORT,D)})})})(new Response);const zS=async r=>{if(r==null)return 0;if(Fn.isBlob(r))return r.size;if(Fn.isSpecCompliantForm(r))return(await new Request(kc.origin,{method:"POST",body:r}).arrayBuffer()).byteLength;if(Fn.isArrayBufferView(r)||Fn.isArrayBuffer(r))return r.byteLength;if(Fn.isURLSearchParams(r)&&(r=r+""),Fn.isString(r))return(await PS(r)).byteLength},BS=async(r,a)=>Fn.toFiniteNumber(r.getContentLength())??zS(a),DS=s0&&(async r=>{let{url:a,method:g,data:D,signal:X,cancelToken:A,timeout:b,onDownloadProgress:e,onUploadProgress:v,responseType:u,headers:t,withCredentials:w="same-origin",fetchOptions:y}=wb(r);u=u?(u+"").toLowerCase():"text";let x=LS([X,A&&A.toAbortSignal()],b),p;const n=x&&x.unsubscribe&&(()=>{x.unsubscribe()});let i;try{if(v&&OS&&g!=="get"&&g!=="head"&&(i=await BS(t,D))!==0){let m=new Request(a,{method:"POST",body:D,duplex:"half"}),T;if(Fn.isFormData(D)&&(T=m.headers.get("content-type"))&&t.setContentType(T),m.body){const[C,S]=vb(i,o0(xb(v)));D=Tb(m.body,Cb,C,S)}}Fn.isString(w)||(w=w?"include":"omit");const d="credentials"in Request.prototype;p=new Request(a,{...y,signal:x,method:g.toUpperCase(),headers:t.normalize().toJSON(),body:D,duplex:"half",credentials:d?w:void 0});let s=await fetch(p,y);const c=C1&&(u==="stream"||u==="response");if(C1&&(e||c&&n)){const m={};["status","statusText","headers"].forEach(L=>{m[L]=s[L]});const T=Fn.toFiniteNumber(s.headers.get("content-length")),[C,S]=e&&vb(T,o0(xb(e),!0))||[];s=new Response(Tb(s.body,Cb,C,()=>{S&&S(),n&&n()}),m)}u=u||"text";let f=await l0[Fn.findKey(l0,u)||"text"](s,r);return!c&&n&&n(),await new Promise((m,T)=>{yb(m,T,{data:f,headers:eu.from(s.headers),status:s.status,statusText:s.statusText,config:r,request:p})})}catch(d){throw n&&n(),d&&d.name==="TypeError"&&/Load failed|fetch/i.test(d.message)?Object.assign(new da("Network Error",da.ERR_NETWORK,r,p),{cause:d.cause||d}):da.from(d,d&&d.code,r,p)}}),E1={http:$k,xhr:AS,fetch:DS};Fn.forEach(E1,(r,a)=>{if(r){try{Object.defineProperty(r,"name",{value:a})}catch{}Object.defineProperty(r,"adapterName",{value:a})}});const Eb=r=>`- ${r}`,VS=r=>Fn.isFunction(r)||r===null||r===!1,Mb={getAdapter:r=>{r=Fn.isArray(r)?r:[r];const{length:a}=r;let g,D;const X={};for(let A=0;A<a;A++){g=r[A];let b;if(D=g,!VS(g)&&(D=E1[(b=String(g)).toLowerCase()],D===void 0))throw new da(`Unknown adapter '${b}'`);if(D)break;X[b||"#"+A]=D}if(!D){const A=Object.entries(X).map(([e,v])=>`adapter ${e} `+(v===!1?"is not supported by the environment":"is not available in the build"));let b=a?A.length>1?`since :
4033
4033
  `+A.map(Eb).join(`
4034
4034
  `):" "+Eb(A[0]):"as no adapter specified";throw new da("There is no suitable adapter to dispatch the request "+b,"ERR_NOT_SUPPORT")}return D},adapters:E1};function M1(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new kh(null,r)}function Ab(r){return M1(r),r.headers=eu.from(r.headers),r.data=S1.call(r,r.transformRequest),["post","put","patch"].indexOf(r.method)!==-1&&r.headers.setContentType("application/x-www-form-urlencoded",!1),Mb.getAdapter(r.adapter||_f.adapter)(r).then(function(a){return M1(r),a.data=S1.call(r,r.transformResponse,a),a.headers=eu.from(a.headers),a},function(a){return gb(a)||(M1(r),a&&a.response&&(a.response.data=S1.call(r,r.transformResponse,a.response),a.response.headers=eu.from(a.response.headers))),Promise.reject(a)})}const Lb="1.10.0",c0={};["object","boolean","number","function","string","symbol"].forEach((r,a)=>{c0[r]=function(g){return typeof g===r||"a"+(a<1?"n ":" ")+r}});const Rb={};c0.transitional=function(r,a,g){function D(X,A){return"[Axios v"+Lb+"] Transitional option '"+X+"'"+A+(g?". "+g:"")}return(X,A,b)=>{if(r===!1)throw new da(D(A," has been removed"+(a?" in "+a:"")),da.ERR_DEPRECATED);return a&&!Rb[A]&&(Rb[A]=!0,console.warn(D(A," has been deprecated since v"+a+" and will be removed in the near future"))),r?r(X,A,b):!0}},c0.spelling=function(r){return(a,g)=>(console.warn(`${g} is likely a misspelling of ${r}`),!0)};function FS(r,a,g){if(typeof r!="object")throw new da("options must be an object",da.ERR_BAD_OPTION_VALUE);const D=Object.keys(r);let X=D.length;for(;X-- >0;){const A=D[X],b=a[A];if(b){const e=r[A],v=e===void 0||b(e,A,r);if(v!==!0)throw new da("option "+A+" must be "+v,da.ERR_BAD_OPTION_VALUE);continue}if(g!==!0)throw new da("Unknown option "+A,da.ERR_BAD_OPTION)}}const u0={assertOptions:FS,validators:c0},pd=u0.validators;let Lp=class{constructor(r){this.defaults=r||{},this.interceptors={request:new pb,response:new pb}}async request(r,a){try{return await this._request(r,a)}catch(g){if(g instanceof Error){let D={};Error.captureStackTrace?Error.captureStackTrace(D):D=new Error;const X=D.stack?D.stack.replace(/^.+\n/,""):"";try{g.stack?X&&!String(g.stack).endsWith(X.replace(/^.+\n.+\n/,""))&&(g.stack+=`
4035
- `+X):g.stack=X}catch{}}throw g}}_request(r,a){typeof r=="string"?(a=a||{},a.url=r):a=r||{},a=Ap(this.defaults,a);const{transitional:g,paramsSerializer:D,headers:X}=a;g!==void 0&&u0.assertOptions(g,{silentJSONParsing:pd.transitional(pd.boolean),forcedJSONParsing:pd.transitional(pd.boolean),clarifyTimeoutError:pd.transitional(pd.boolean)},!1),D!=null&&(Fn.isFunction(D)?a.paramsSerializer={serialize:D}:u0.assertOptions(D,{encode:pd.function,serialize:pd.function},!0)),a.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?a.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:a.allowAbsoluteUrls=!0),u0.assertOptions(a,{baseUrl:pd.spelling("baseURL"),withXsrfToken:pd.spelling("withXSRFToken")},!0),a.method=(a.method||this.defaults.method||"get").toLowerCase();let A=X&&Fn.merge(X.common,X[a.method]);X&&Fn.forEach(["delete","get","head","post","put","patch","common"],x=>{delete X[x]}),a.headers=eu.concat(A,X);const b=[];let e=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(a)===!1||(e=e&&x.synchronous,b.unshift(x.fulfilled,x.rejected))});const v=[];this.interceptors.response.forEach(function(x){v.push(x.fulfilled,x.rejected)});let u,t=0,w;if(!e){const x=[Ab.bind(this),void 0];for(x.unshift.apply(x,b),x.push.apply(x,v),w=x.length,u=Promise.resolve(a);t<w;)u=u.then(x[t++],x[t++]);return u}w=b.length;let y=a;for(t=0;t<w;){const x=b[t++],p=b[t++];try{y=x(y)}catch(n){p.call(this,n);break}}try{u=Ab.call(this,y)}catch(x){return Promise.reject(x)}for(t=0,w=v.length;t<w;)u=u.then(v[t++],v[t++]);return u}getUri(r){r=Ap(this.defaults,r);const a=bb(r.baseURL,r.url,r.allowAbsoluteUrls);return db(a,r.params,r.paramsSerializer)}};Fn.forEach(["delete","get","head","options"],function(r){Lp.prototype[r]=function(a,g){return this.request(Ap(g||{},{method:r,url:a,data:(g||{}).data}))}}),Fn.forEach(["post","put","patch"],function(r){function a(g){return function(D,X,A){return this.request(Ap(A||{},{method:r,headers:g?{"Content-Type":"multipart/form-data"}:{},url:D,data:X}))}}Lp.prototype[r]=a(),Lp.prototype[r+"Form"]=a(!0)});let jS=class zT{constructor(a){if(typeof a!="function")throw new TypeError("executor must be a function.");let g;this.promise=new Promise(function(X){g=X});const D=this;this.promise.then(X=>{if(!D._listeners)return;let A=D._listeners.length;for(;A-- >0;)D._listeners[A](X);D._listeners=null}),this.promise.then=X=>{let A;const b=new Promise(e=>{D.subscribe(e),A=e}).then(X);return b.cancel=function(){D.unsubscribe(A)},b},a(function(X,A,b){D.reason||(D.reason=new kh(X,A,b),g(D.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(a){if(this.reason){a(this.reason);return}this._listeners?this._listeners.push(a):this._listeners=[a]}unsubscribe(a){if(!this._listeners)return;const g=this._listeners.indexOf(a);g!==-1&&this._listeners.splice(g,1)}toAbortSignal(){const a=new AbortController,g=D=>{a.abort(D)};return this.subscribe(g),a.signal.unsubscribe=()=>this.unsubscribe(g),a.signal}static source(){let a;return{token:new zT(function(g){a=g}),cancel:a}}};function US(r){return function(a){return r.apply(null,a)}}function qS(r){return Fn.isObject(r)&&r.isAxiosError===!0}const A1={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(A1).forEach(([r,a])=>{A1[a]=r});function Nb(r){const a=new Lp(r),g=Zx(Lp.prototype.request,a);return Fn.extend(g,Lp.prototype,a,{allOwnKeys:!0}),Fn.extend(g,a,null,{allOwnKeys:!0}),g.create=function(D){return Nb(Ap(r,D))},g}const _s=Nb(_f);_s.Axios=Lp,_s.CanceledError=kh,_s.CancelToken=jS,_s.isCancel=gb,_s.VERSION=Lb,_s.toFormData=i0,_s.AxiosError=da,_s.Cancel=_s.CanceledError,_s.all=function(r){return Promise.all(r)},_s.spread=US,_s.isAxiosError=qS,_s.mergeConfig=Ap,_s.AxiosHeaders=eu,_s.formToJSON=r=>fb(Fn.isHTMLForm(r)?new FormData(r):r),_s.getAdapter=Mb.getAdapter,_s.HttpStatusCode=A1,_s.default=_s;const{Axios:Iye,AxiosError:Pye,CanceledError:Oye,isCancel:zye,CancelToken:Bye,VERSION:Dye,all:Vye,Cancel:Fye,isAxiosError:jye,spread:Uye,toFormData:qye,AxiosHeaders:Wye,HttpStatusCode:Gye,formToJSON:Hye,getAdapter:Jye,mergeConfig:Kye}=_s;function WS(r){return r.reduce((a,g,D)=>(a[g]=D,a),{})}const GS=["playId","gameId","teamId","playerId","momentOfPlay","categoryId","categoryType","matchLapse","section","matchResult","playingAs","total","coordinate1X","coordinate1Y","coordinate2X","coordinate2Y","coordinate3X","coordinate3Y","xGi","xGf","distance","fieldArea"];let L1=null;function HS(){return L1||(L1=WS(GS)),L1}const JS={class:"volumetric-section-container"},KS={key:0,class:"volumetric-section-container__title"},XS={class:"volumetric-section-container__switch"},ZS={class:"volumetric-section-container__attack-direction"},YS={class:"volumetric-section-container__field"},QS={__name:"GSC-VolumetricField",props:{game:{type:Object,default:()=>({gameId:90209,id:90209,seasonId:1943,regularSeasonId:1933,matchday_name:"Playoffs 6",status:1,score:[2,0],game_status:1,dateTimeUTC:"2025-05-26T00:00:00Z",homeTeam:{logo:"https://golstatsimages.blob.core.windows.net/teams-80/18.png",team_id:18,provisional_logo:"https://golstatsimages.blob.core.windows.net/teams-provisional/18.png",colloquial_name:"Toluca",acronym:"TOL",team_name:"Toluca"},awayTeam:{logo:"https://golstatsimages.blob.core.windows.net/teams-80/2.png",team_id:2,provisional_logo:"https://golstatsimages.blob.core.windows.net/teams-provisional/2.png",colloquial_name:"América",acronym:"AME",team_name:"America"},is_live:0,minutes:{home_goals_minutes:["L. Garcia 65'","A. Vega 82'"],visiting_goals_minutes:[],home_yellow_cards_minutes:["L. Garcia 90'","A. Vega 90 + 3'"],away_yellow_cards_minutes:["S. Caceres 78'"],home_red_cards_minutes:[],away_red_cards_minutes:[]}})},token:{type:String,default:""},isGamePreMatch:{type:Boolean,default:!1},teamSelectedPreMatch:{type:Object,default:()=>({})},volumetricFieldIntervalMinutes:{type:Number,default:2},areTeamsVisible:{type:Boolean,default:!0},isTitleVisible:{type:Boolean,default:!0},isGhostEffect:{type:Boolean,default:!1},preMatchType:{type:Number,default:0}},setup(r){const a=HS(),g=new Set([2,20,308,310]),D=new Set([3,21,309]),X=new Set([...g,...D]);let A=null;const b=r,e=h.ref(0),v=h.ref(new Map),u=h.ref({teamId:0}),t=h.computed(()=>[{teamId:b.game.homeTeam.team_id,text:b.game.homeTeam.colloquial_name,img:b.game.homeTeam.logo,isHomeTeam:!0},{teamId:b.game.awayTeam.team_id,text:b.game.awayTeam.colloquial_name,img:b.game.awayTeam.logo,isHomeTeam:!1}]),w=h.computed(()=>v.value.get(u.value.teamId)||[]);h.watch(()=>t.value,()=>{y()},{immediate:!0}),h.watch(()=>b.preMatchType,()=>{y()},{immediate:!0}),h.watch(()=>b.game.gameId,f=>{f&&(c(),p())},{immediate:!0});function y(){e.value=0,u.value=b.preMatchType?b.preMatchType===1?t.value[0]:t.value[1]:t.value[e.value]}function x(){A=setInterval(()=>{p()},1e3*60*b.volumetricFieldIntervalMinutes)}async function p(f=!1){try{const m=await i();v.value.set(b.game.homeTeam.team_id,m.homeTeam),v.value.set(b.game.awayTeam.team_id,m.awayTeam),f&&x()}catch(m){throw new Error(m)}}function n(f){return b.game.game_status===4&&!b.game.is_live?f[a.gameId]!==b.game.gameId:f[a.gameId]===b.game.gameId}async function i(f=0){try{let m={homeTeam:[],awayTeam:[]};if(b.game.is_live||b.game.game_status===0){const T=await _s.get(`https://2uj7ojhmt5.execute-api.us-west-2.amazonaws.com/prod/V2/statisticsLive/${b.game.gameId}`),C=T.data?T.data.data||[]:[],S=new Set;C.forEach(L=>{S.add(L[a.categoryId]),L[a.teamId]===b.game.homeTeam.team_id&&X.has(L[a.categoryId])&&n(L)?(d(L),m.homeTeam.push(L)):L[a.teamId]===b.game.awayTeam.team_id&&X.has(L[a.categoryId])&&n(L)&&(L[a.coordinate1Y]=1-L[a.coordinate1Y],L[a.coordinate2Y]=1-L[a.coordinate2Y],L[a.coordinate3Y]=1-L[a.coordinate3Y],L[a.coordinate1X]=1-L[a.coordinate1X],L[a.coordinate2X]=1-L[a.coordinate2X],L[a.coordinate3X]=1-L[a.coordinate3X],d(L),m.awayTeam.push(L))})}else{const[T,C]=await Promise.all([_s.get(`https://golstats-microservices.s3-us-west-2.amazonaws.com/statsTeamBySeason-${f||b.game.seasonId}-${b.game.homeTeam.team_id}.json`,{headers:{Authorization:b.token||""}}),_s.get(`https://golstats-microservices.s3-us-west-2.amazonaws.com/statsTeamBySeason-${f||b.game.seasonId}-${b.game.awayTeam.team_id}.json`,{headers:{Authorization:b.token||""}})]);if(!T.data.data.posession.length&&!C.data.data.posession.length&&!f)return i(b.game.regularSeasonId);m={homeTeam:T.data.data.posession.filter(S=>S[a.teamId]===b.game.homeTeam.team_id&&X.has(S[a.categoryId])&&n(S)),awayTeam:C.data.data.posession.filter(S=>S[a.teamId]===b.game.awayTeam.team_id&&X.has(S[a.categoryId])&&n(S)?(S[a.coordinate1Y]=1-S[a.coordinate1Y],S[a.coordinate2Y]=1-S[a.coordinate2Y],S[a.coordinate3Y]=1-S[a.coordinate3Y],S[a.coordinate1X]=1-S[a.coordinate1X],S[a.coordinate2X]=1-S[a.coordinate2X],S[a.coordinate3X]=1-S[a.coordinate3X],!0):!1)}}return m}catch(m){throw new Error(m)}}function d(f){const m=f[a.coordinate1X],T=f[a.coordinate2X],C=f[a.coordinate3X];return f[a.coordinate1X]=f[a.coordinate1Y],f[a.coordinate2X]=f[a.coordinate2Y],f[a.coordinate3X]=f[a.coordinate3Y],f[a.coordinate1Y]=m,f[a.coordinate2Y]=T,f[a.coordinate3Y]=C,f}function s(f){e.value=f.index,u.value=f.button}function c(){A&&clearInterval(A)}return h.onUnmounted(()=>{c()}),(f,m)=>(h.openBlock(),h.createElementBlock("div",JS,[r.isTitleVisible?(h.openBlock(),h.createElementBlock("div",KS,"Volumétrica")):h.createCommentVNode("",!0),h.withDirectives(h.createElementVNode("div",XS,[h.createVNode(ik,{"selected-button-index":e.value,buttons:t.value,width:"320px","border-radius":"16px",onChange:s},null,8,["selected-button-index","buttons"])],512),[[h.vShow,!r.isGamePreMatch&&r.areTeamsVisible]]),h.createElementVNode("div",ZS,[h.createVNode(hk,{team:u.value},null,8,["team"])]),h.createElementVNode("div",YS,[h.createVNode(dk,{"passes-plays":w.value,"play-indexes":h.unref(a),"is-ghost-effect":r.isGhostEffect},null,8,["passes-plays","play-indexes","is-ghost-effect"])])]))}},Ib=Qm(QS,[["__scopeId","data-v-8a1d3941"]]);function Pb(r,a){return function(){return r.apply(a,arguments)}}const{toString:$S}=Object.prototype,{getPrototypeOf:R1}=Object,{iterator:d0,toStringTag:Ob}=Symbol,p0=(r=>a=>{const g=$S.call(a);return r[g]||(r[g]=g.slice(8,-1).toLowerCase())})(Object.create(null)),qu=r=>(r=r.toLowerCase(),a=>p0(a)===r),h0=r=>a=>typeof a===r,{isArray:Sh}=Array,Tf=h0("undefined");function e8(r){return r!==null&&!Tf(r)&&r.constructor!==null&&!Tf(r.constructor)&&tu(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}const zb=qu("ArrayBuffer");function t8(r){let a;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?a=ArrayBuffer.isView(r):a=r&&r.buffer&&zb(r.buffer),a}const r8=h0("string"),tu=h0("function"),Bb=h0("number"),f0=r=>r!==null&&typeof r=="object",n8=r=>r===!0||r===!1,m0=r=>{if(p0(r)!=="object")return!1;const a=R1(r);return(a===null||a===Object.prototype||Object.getPrototypeOf(a)===null)&&!(Ob in r)&&!(d0 in r)},i8=qu("Date"),a8=qu("File"),o8=qu("Blob"),s8=qu("FileList"),l8=r=>f0(r)&&tu(r.pipe),c8=r=>{let a;return r&&(typeof FormData=="function"&&r instanceof FormData||tu(r.append)&&((a=p0(r))==="formdata"||a==="object"&&tu(r.toString)&&r.toString()==="[object FormData]"))},u8=qu("URLSearchParams"),[d8,p8,h8,f8]=["ReadableStream","Request","Response","Headers"].map(qu),m8=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function kf(r,a,{allOwnKeys:g=!1}={}){if(r===null||typeof r>"u")return;let D,X;if(typeof r!="object"&&(r=[r]),Sh(r))for(D=0,X=r.length;D<X;D++)a.call(null,r[D],D,r);else{const A=g?Object.getOwnPropertyNames(r):Object.keys(r),b=A.length;let e;for(D=0;D<b;D++)e=A[D],a.call(null,r[e],e,r)}}function Db(r,a){a=a.toLowerCase();const g=Object.keys(r);let D=g.length,X;for(;D-- >0;)if(X=g[D],a===X.toLowerCase())return X;return null}const Rp=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Vb=r=>!Tf(r)&&r!==Rp;function N1(){const{caseless:r}=Vb(this)&&this||{},a={},g=(D,X)=>{const A=r&&Db(a,X)||X;m0(a[A])&&m0(D)?a[A]=N1(a[A],D):m0(D)?a[A]=N1({},D):Sh(D)?a[A]=D.slice():a[A]=D};for(let D=0,X=arguments.length;D<X;D++)arguments[D]&&kf(arguments[D],g);return a}const g8=(r,a,g,{allOwnKeys:D}={})=>(kf(a,(X,A)=>{g&&tu(X)?r[A]=Pb(X,g):r[A]=X},{allOwnKeys:D}),r),y8=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),v8=(r,a,g,D)=>{r.prototype=Object.create(a.prototype,D),r.prototype.constructor=r,Object.defineProperty(r,"super",{value:a.prototype}),g&&Object.assign(r.prototype,g)},x8=(r,a,g,D)=>{let X,A,b;const e={};if(a=a||{},r==null)return a;do{for(X=Object.getOwnPropertyNames(r),A=X.length;A-- >0;)b=X[A],(!D||D(b,r,a))&&!e[b]&&(a[b]=r[b],e[b]=!0);r=g!==!1&&R1(r)}while(r&&(!g||g(r,a))&&r!==Object.prototype);return a},b8=(r,a,g)=>{r=String(r),(g===void 0||g>r.length)&&(g=r.length),g-=a.length;const D=r.indexOf(a,g);return D!==-1&&D===g},_8=r=>{if(!r)return null;if(Sh(r))return r;let a=r.length;if(!Bb(a))return null;const g=new Array(a);for(;a-- >0;)g[a]=r[a];return g},w8=(r=>a=>r&&a instanceof r)(typeof Uint8Array<"u"&&R1(Uint8Array)),T8=(r,a)=>{const g=(r&&r[d0]).call(r);let D;for(;(D=g.next())&&!D.done;){const X=D.value;a.call(r,X[0],X[1])}},k8=(r,a)=>{let g;const D=[];for(;(g=r.exec(a))!==null;)D.push(g);return D},S8=qu("HTMLFormElement"),C8=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(a,g,D){return g.toUpperCase()+D}),Fb=(({hasOwnProperty:r})=>(a,g)=>r.call(a,g))(Object.prototype),E8=qu("RegExp"),jb=(r,a)=>{const g=Object.getOwnPropertyDescriptors(r),D={};kf(g,(X,A)=>{let b;(b=a(X,A,r))!==!1&&(D[A]=b||X)}),Object.defineProperties(r,D)},M8=r=>{jb(r,(a,g)=>{if(tu(r)&&["arguments","caller","callee"].indexOf(g)!==-1)return!1;const D=r[g];if(tu(D)){if(a.enumerable=!1,"writable"in a){a.writable=!1;return}a.set||(a.set=()=>{throw Error("Can not rewrite read-only method '"+g+"'")})}})},A8=(r,a)=>{const g={},D=X=>{X.forEach(A=>{g[A]=!0})};return Sh(r)?D(r):D(String(r).split(a)),g},L8=()=>{},R8=(r,a)=>r!=null&&Number.isFinite(r=+r)?r:a;function N8(r){return!!(r&&tu(r.append)&&r[Ob]==="FormData"&&r[d0])}const I8=r=>{const a=new Array(10),g=(D,X)=>{if(f0(D)){if(a.indexOf(D)>=0)return;if(!("toJSON"in D)){a[X]=D;const A=Sh(D)?[]:{};return kf(D,(b,e)=>{const v=g(b,X+1);!Tf(v)&&(A[e]=v)}),a[X]=void 0,A}}return D};return g(r,0)},P8=qu("AsyncFunction"),O8=r=>r&&(f0(r)||tu(r))&&tu(r.then)&&tu(r.catch),Ub=((r,a)=>r?setImmediate:a?((g,D)=>(Rp.addEventListener("message",({source:X,data:A})=>{X===Rp&&A===g&&D.length&&D.shift()()},!1),X=>{D.push(X),Rp.postMessage(g,"*")}))(`axios@${Math.random()}`,[]):g=>setTimeout(g))(typeof setImmediate=="function",tu(Rp.postMessage)),z8=typeof queueMicrotask<"u"?queueMicrotask.bind(Rp):typeof process<"u"&&process.nextTick||Ub,B8=r=>r!=null&&tu(r[d0]),jn={isArray:Sh,isArrayBuffer:zb,isBuffer:e8,isFormData:c8,isArrayBufferView:t8,isString:r8,isNumber:Bb,isBoolean:n8,isObject:f0,isPlainObject:m0,isReadableStream:d8,isRequest:p8,isResponse:h8,isHeaders:f8,isUndefined:Tf,isDate:i8,isFile:a8,isBlob:o8,isRegExp:E8,isFunction:tu,isStream:l8,isURLSearchParams:u8,isTypedArray:w8,isFileList:s8,forEach:kf,merge:N1,extend:g8,trim:m8,stripBOM:y8,inherits:v8,toFlatObject:x8,kindOf:p0,kindOfTest:qu,endsWith:b8,toArray:_8,forEachEntry:T8,matchAll:k8,isHTMLForm:S8,hasOwnProperty:Fb,hasOwnProp:Fb,reduceDescriptors:jb,freezeMethods:M8,toObjectSet:A8,toCamelCase:C8,noop:L8,toFiniteNumber:R8,findKey:Db,global:Rp,isContextDefined:Vb,isSpecCompliantForm:N8,toJSONObject:I8,isAsyncFn:P8,isThenable:O8,setImmediate:Ub,asap:z8,isIterable:B8};function pa(r,a,g,D,X){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=r,this.name="AxiosError",a&&(this.code=a),g&&(this.config=g),D&&(this.request=D),X&&(this.response=X,this.status=X.status?X.status:null)}jn.inherits(pa,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:jn.toJSONObject(this.config),code:this.code,status:this.status}}});const qb=pa.prototype,Wb={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(r=>{Wb[r]={value:r}}),Object.defineProperties(pa,Wb),Object.defineProperty(qb,"isAxiosError",{value:!0}),pa.from=(r,a,g,D,X,A)=>{const b=Object.create(qb);return jn.toFlatObject(r,b,function(e){return e!==Error.prototype},e=>e!=="isAxiosError"),pa.call(b,r.message,a,g,D,X),b.cause=r,b.name=r.name,A&&Object.assign(b,A),b};const D8=null;function I1(r){return jn.isPlainObject(r)||jn.isArray(r)}function Gb(r){return jn.endsWith(r,"[]")?r.slice(0,-2):r}function Hb(r,a,g){return r?r.concat(a).map(function(D,X){return D=Gb(D),!g&&X?"["+D+"]":D}).join(g?".":""):a}function V8(r){return jn.isArray(r)&&!r.some(I1)}const F8=jn.toFlatObject(jn,{},null,function(r){return/^is[A-Z]/.test(r)});function g0(r,a,g){if(!jn.isObject(r))throw new TypeError("target must be an object");a=a||new FormData,g=jn.toFlatObject(g,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,p){return!jn.isUndefined(p[x])});const D=g.metaTokens,X=g.visitor||u,A=g.dots,b=g.indexes,e=(g.Blob||typeof Blob<"u"&&Blob)&&jn.isSpecCompliantForm(a);if(!jn.isFunction(X))throw new TypeError("visitor must be a function");function v(x){if(x===null)return"";if(jn.isDate(x))return x.toISOString();if(jn.isBoolean(x))return x.toString();if(!e&&jn.isBlob(x))throw new pa("Blob is not supported. Use a Buffer instead.");return jn.isArrayBuffer(x)||jn.isTypedArray(x)?e&&typeof Blob=="function"?new Blob([x]):Buffer.from(x):x}function u(x,p,n){let i=x;if(x&&!n&&typeof x=="object"){if(jn.endsWith(p,"{}"))p=D?p:p.slice(0,-2),x=JSON.stringify(x);else if(jn.isArray(x)&&V8(x)||(jn.isFileList(x)||jn.endsWith(p,"[]"))&&(i=jn.toArray(x)))return p=Gb(p),i.forEach(function(d,s){!(jn.isUndefined(d)||d===null)&&a.append(b===!0?Hb([p],s,A):b===null?p:p+"[]",v(d))}),!1}return I1(x)?!0:(a.append(Hb(n,p,A),v(x)),!1)}const t=[],w=Object.assign(F8,{defaultVisitor:u,convertValue:v,isVisitable:I1});function y(x,p){if(!jn.isUndefined(x)){if(t.indexOf(x)!==-1)throw Error("Circular reference detected in "+p.join("."));t.push(x),jn.forEach(x,function(n,i){(!(jn.isUndefined(n)||n===null)&&X.call(a,n,jn.isString(i)?i.trim():i,p,w))===!0&&y(n,p?p.concat(i):[i])}),t.pop()}}if(!jn.isObject(r))throw new TypeError("data must be an object");return y(r),a}function Jb(r){const a={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,function(g){return a[g]})}function P1(r,a){this._pairs=[],r&&g0(r,this,a)}const Kb=P1.prototype;Kb.append=function(r,a){this._pairs.push([r,a])},Kb.toString=function(r){const a=r?function(g){return r.call(this,g,Jb)}:Jb;return this._pairs.map(function(g){return a(g[0])+"="+a(g[1])},"").join("&")};function j8(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Xb(r,a,g){if(!a)return r;const D=g&&g.encode||j8;jn.isFunction(g)&&(g={serialize:g});const X=g&&g.serialize;let A;if(X?A=X(a,g):A=jn.isURLSearchParams(a)?a.toString():new P1(a,g).toString(D),A){const b=r.indexOf("#");b!==-1&&(r=r.slice(0,b)),r+=(r.indexOf("?")===-1?"?":"&")+A}return r}let Zb=class{constructor(){this.handlers=[]}use(r,a,g){return this.handlers.push({fulfilled:r,rejected:a,synchronous:g?g.synchronous:!1,runWhen:g?g.runWhen:null}),this.handlers.length-1}eject(r){this.handlers[r]&&(this.handlers[r]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(r){jn.forEach(this.handlers,function(a){a!==null&&r(a)})}};const Yb={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},U8=typeof URLSearchParams<"u"?URLSearchParams:P1,q8=typeof FormData<"u"?FormData:null,W8=typeof Blob<"u"?Blob:null,G8={isBrowser:!0,classes:{URLSearchParams:U8,FormData:q8,Blob:W8},protocols:["http","https","file","blob","url","data"]},O1=typeof window<"u"&&typeof document<"u",z1=typeof navigator=="object"&&navigator||void 0,H8=O1&&(!z1||["ReactNative","NativeScript","NS"].indexOf(z1.product)<0),J8=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",K8=O1&&window.location.href||"http://localhost",X8=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:O1,hasStandardBrowserEnv:H8,hasStandardBrowserWebWorkerEnv:J8,navigator:z1,origin:K8},Symbol.toStringTag,{value:"Module"})),Sc={...X8,...G8};function Z8(r,a){return g0(r,new Sc.classes.URLSearchParams,Object.assign({visitor:function(g,D,X,A){return Sc.isNode&&jn.isBuffer(g)?(this.append(D,g.toString("base64")),!1):A.defaultVisitor.apply(this,arguments)}},a))}function Y8(r){return jn.matchAll(/\w+|\[(\w*)]/g,r).map(a=>a[0]==="[]"?"":a[1]||a[0])}function Q8(r){const a={},g=Object.keys(r);let D;const X=g.length;let A;for(D=0;D<X;D++)A=g[D],a[A]=r[A];return a}function Qb(r){function a(g,D,X,A){let b=g[A++];if(b==="__proto__")return!0;const e=Number.isFinite(+b),v=A>=g.length;return b=!b&&jn.isArray(X)?X.length:b,v?(jn.hasOwnProp(X,b)?X[b]=[X[b],D]:X[b]=D,!e):((!X[b]||!jn.isObject(X[b]))&&(X[b]=[]),a(g,D,X[b],A)&&jn.isArray(X[b])&&(X[b]=Q8(X[b])),!e)}if(jn.isFormData(r)&&jn.isFunction(r.entries)){const g={};return jn.forEachEntry(r,(D,X)=>{a(Y8(D),X,g,0)}),g}return null}function $8(r,a,g){if(jn.isString(r))try{return(a||JSON.parse)(r),jn.trim(r)}catch(D){if(D.name!=="SyntaxError")throw D}return(g||JSON.stringify)(r)}const Sf={transitional:Yb,adapter:["xhr","http","fetch"],transformRequest:[function(r,a){const g=a.getContentType()||"",D=g.indexOf("application/json")>-1,X=jn.isObject(r);if(X&&jn.isHTMLForm(r)&&(r=new FormData(r)),jn.isFormData(r))return D?JSON.stringify(Qb(r)):r;if(jn.isArrayBuffer(r)||jn.isBuffer(r)||jn.isStream(r)||jn.isFile(r)||jn.isBlob(r)||jn.isReadableStream(r))return r;if(jn.isArrayBufferView(r))return r.buffer;if(jn.isURLSearchParams(r))return a.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),r.toString();let A;if(X){if(g.indexOf("application/x-www-form-urlencoded")>-1)return Z8(r,this.formSerializer).toString();if((A=jn.isFileList(r))||g.indexOf("multipart/form-data")>-1){const b=this.env&&this.env.FormData;return g0(A?{"files[]":r}:r,b&&new b,this.formSerializer)}}return X||D?(a.setContentType("application/json",!1),$8(r)):r}],transformResponse:[function(r){const a=this.transitional||Sf.transitional,g=a&&a.forcedJSONParsing,D=this.responseType==="json";if(jn.isResponse(r)||jn.isReadableStream(r))return r;if(r&&jn.isString(r)&&(g&&!this.responseType||D)){const X=!(a&&a.silentJSONParsing)&&D;try{return JSON.parse(r)}catch(A){if(X)throw A.name==="SyntaxError"?pa.from(A,pa.ERR_BAD_RESPONSE,this,null,this.response):A}}return r}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Sc.classes.FormData,Blob:Sc.classes.Blob},validateStatus:function(r){return r>=200&&r<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};jn.forEach(["delete","get","head","post","put","patch"],r=>{Sf.headers[r]={}});const e7=jn.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),t7=r=>{const a={};let g,D,X;return r&&r.split(`
4035
+ `+X):g.stack=X}catch{}}throw g}}_request(r,a){typeof r=="string"?(a=a||{},a.url=r):a=r||{},a=Ap(this.defaults,a);const{transitional:g,paramsSerializer:D,headers:X}=a;g!==void 0&&u0.assertOptions(g,{silentJSONParsing:pd.transitional(pd.boolean),forcedJSONParsing:pd.transitional(pd.boolean),clarifyTimeoutError:pd.transitional(pd.boolean)},!1),D!=null&&(Fn.isFunction(D)?a.paramsSerializer={serialize:D}:u0.assertOptions(D,{encode:pd.function,serialize:pd.function},!0)),a.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?a.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:a.allowAbsoluteUrls=!0),u0.assertOptions(a,{baseUrl:pd.spelling("baseURL"),withXsrfToken:pd.spelling("withXSRFToken")},!0),a.method=(a.method||this.defaults.method||"get").toLowerCase();let A=X&&Fn.merge(X.common,X[a.method]);X&&Fn.forEach(["delete","get","head","post","put","patch","common"],x=>{delete X[x]}),a.headers=eu.concat(A,X);const b=[];let e=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(a)===!1||(e=e&&x.synchronous,b.unshift(x.fulfilled,x.rejected))});const v=[];this.interceptors.response.forEach(function(x){v.push(x.fulfilled,x.rejected)});let u,t=0,w;if(!e){const x=[Ab.bind(this),void 0];for(x.unshift.apply(x,b),x.push.apply(x,v),w=x.length,u=Promise.resolve(a);t<w;)u=u.then(x[t++],x[t++]);return u}w=b.length;let y=a;for(t=0;t<w;){const x=b[t++],p=b[t++];try{y=x(y)}catch(n){p.call(this,n);break}}try{u=Ab.call(this,y)}catch(x){return Promise.reject(x)}for(t=0,w=v.length;t<w;)u=u.then(v[t++],v[t++]);return u}getUri(r){r=Ap(this.defaults,r);const a=bb(r.baseURL,r.url,r.allowAbsoluteUrls);return db(a,r.params,r.paramsSerializer)}};Fn.forEach(["delete","get","head","options"],function(r){Lp.prototype[r]=function(a,g){return this.request(Ap(g||{},{method:r,url:a,data:(g||{}).data}))}}),Fn.forEach(["post","put","patch"],function(r){function a(g){return function(D,X,A){return this.request(Ap(A||{},{method:r,headers:g?{"Content-Type":"multipart/form-data"}:{},url:D,data:X}))}}Lp.prototype[r]=a(),Lp.prototype[r+"Form"]=a(!0)});let jS=class zT{constructor(a){if(typeof a!="function")throw new TypeError("executor must be a function.");let g;this.promise=new Promise(function(X){g=X});const D=this;this.promise.then(X=>{if(!D._listeners)return;let A=D._listeners.length;for(;A-- >0;)D._listeners[A](X);D._listeners=null}),this.promise.then=X=>{let A;const b=new Promise(e=>{D.subscribe(e),A=e}).then(X);return b.cancel=function(){D.unsubscribe(A)},b},a(function(X,A,b){D.reason||(D.reason=new kh(X,A,b),g(D.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(a){if(this.reason){a(this.reason);return}this._listeners?this._listeners.push(a):this._listeners=[a]}unsubscribe(a){if(!this._listeners)return;const g=this._listeners.indexOf(a);g!==-1&&this._listeners.splice(g,1)}toAbortSignal(){const a=new AbortController,g=D=>{a.abort(D)};return this.subscribe(g),a.signal.unsubscribe=()=>this.unsubscribe(g),a.signal}static source(){let a;return{token:new zT(function(g){a=g}),cancel:a}}};function US(r){return function(a){return r.apply(null,a)}}function qS(r){return Fn.isObject(r)&&r.isAxiosError===!0}const A1={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(A1).forEach(([r,a])=>{A1[a]=r});function Nb(r){const a=new Lp(r),g=Zx(Lp.prototype.request,a);return Fn.extend(g,Lp.prototype,a,{allOwnKeys:!0}),Fn.extend(g,a,null,{allOwnKeys:!0}),g.create=function(D){return Nb(Ap(r,D))},g}const _s=Nb(_f);_s.Axios=Lp,_s.CanceledError=kh,_s.CancelToken=jS,_s.isCancel=gb,_s.VERSION=Lb,_s.toFormData=i0,_s.AxiosError=da,_s.Cancel=_s.CanceledError,_s.all=function(r){return Promise.all(r)},_s.spread=US,_s.isAxiosError=qS,_s.mergeConfig=Ap,_s.AxiosHeaders=eu,_s.formToJSON=r=>fb(Fn.isHTMLForm(r)?new FormData(r):r),_s.getAdapter=Mb.getAdapter,_s.HttpStatusCode=A1,_s.default=_s;const{Axios:Iye,AxiosError:Pye,CanceledError:Oye,isCancel:zye,CancelToken:Bye,VERSION:Dye,all:Vye,Cancel:Fye,isAxiosError:jye,spread:Uye,toFormData:qye,AxiosHeaders:Wye,HttpStatusCode:Gye,formToJSON:Hye,getAdapter:Jye,mergeConfig:Kye}=_s;function WS(r){return r.reduce((a,g,D)=>(a[g]=D,a),{})}const GS=["playId","gameId","teamId","playerId","momentOfPlay","categoryId","categoryType","matchLapse","section","matchResult","playingAs","total","coordinate1X","coordinate1Y","coordinate2X","coordinate2Y","coordinate3X","coordinate3Y","xGi","xGf","distance","fieldArea"];let L1=null;function HS(){return L1||(L1=WS(GS)),L1}const JS={class:"volumetric-section-container"},KS={key:0,class:"volumetric-section-container__title"},XS={class:"volumetric-section-container__switch"},ZS={class:"volumetric-section-container__attack-direction"},YS={class:"volumetric-section-container__field"},QS={__name:"GSC-VolumetricField",props:{game:{type:Object,default:()=>({gameId:90209,id:90209,seasonId:1943,regularSeasonId:1933,matchday_name:"Playoffs 6",status:1,score:[2,0],game_status:1,dateTimeUTC:"2025-05-26T00:00:00Z",homeTeam:{logo:"https://golstatsimages.blob.core.windows.net/teams-80/18.png",team_id:18,provisional_logo:"https://golstatsimages.blob.core.windows.net/teams-provisional/18.png",colloquial_name:"Toluca",acronym:"TOL",team_name:"Toluca"},awayTeam:{logo:"https://golstatsimages.blob.core.windows.net/teams-80/2.png",team_id:2,provisional_logo:"https://golstatsimages.blob.core.windows.net/teams-provisional/2.png",colloquial_name:"América",acronym:"AME",team_name:"America"},is_live:0,minutes:{home_goals_minutes:["L. Garcia 65'","A. Vega 82'"],visiting_goals_minutes:[],home_yellow_cards_minutes:["L. Garcia 90'","A. Vega 90 + 3'"],away_yellow_cards_minutes:["S. Caceres 78'"],home_red_cards_minutes:[],away_red_cards_minutes:[]}})},token:{type:String,default:""},isGamePreMatch:{type:Boolean,default:!1},teamSelectedPreMatch:{type:Object,default:()=>({})},volumetricFieldIntervalMinutes:{type:Number,default:2},areTeamsVisible:{type:Boolean,default:!0},isTitleVisible:{type:Boolean,default:!0},isGhostEffect:{type:Boolean,default:!1},preMatchType:{type:Number,default:0}},setup(r){const a=HS(),g=new Set([2,20,308,310]),D=new Set([3,21,309]),X=new Set([...g,...D]);let A=null;const b=r,e=h.ref(0),v=h.ref(new Map),u=h.ref({teamId:0}),t=h.computed(()=>[{teamId:b.game.homeTeam.team_id,text:b.game.homeTeam.colloquial_name,img:b.game.homeTeam.logo,isHomeTeam:!0},{teamId:b.game.awayTeam.team_id,text:b.game.awayTeam.colloquial_name,img:b.game.awayTeam.logo,isHomeTeam:!1}]),w=h.computed(()=>v.value.get(u.value.teamId)||[]);h.watch(()=>t.value,()=>{y()},{immediate:!0}),h.watch(()=>b.preMatchType,()=>{y()},{immediate:!0}),h.watch(()=>b.game.gameId,f=>{f&&(c(),p())},{immediate:!0});function y(){e.value=0,u.value=b.preMatchType?b.preMatchType===1?t.value[0]:t.value[1]:t.value[e.value]}function x(){A=setInterval(()=>{p()},1e3*60*b.volumetricFieldIntervalMinutes)}async function p(f=!1){try{const m=await i();v.value.set(b.game.homeTeam.team_id,m.homeTeam),v.value.set(b.game.awayTeam.team_id,m.awayTeam),f&&x()}catch(m){throw new Error(m)}}function n(f){return b.game.game_status===4&&!b.game.is_live?f[a.gameId]!==b.game.gameId:f[a.gameId]===b.game.gameId}async function i(f=0){try{let m={homeTeam:[],awayTeam:[]};if(b.game.is_live||b.game.game_status===0){const T=await _s.get(`https://2uj7ojhmt5.execute-api.us-west-2.amazonaws.com/prod/V2/statisticsLive/${b.game.gameId}`),C=T.data?T.data.data||[]:[],S=new Set;C.forEach(L=>{S.add(L[a.categoryId]),L[a.teamId]===b.game.homeTeam.team_id&&X.has(L[a.categoryId])&&n(L)?(d(L),m.homeTeam.push(L)):L[a.teamId]===b.game.awayTeam.team_id&&X.has(L[a.categoryId])&&n(L)&&(L[a.coordinate1Y]=1-L[a.coordinate1Y],L[a.coordinate2Y]=1-L[a.coordinate2Y],L[a.coordinate3Y]=1-L[a.coordinate3Y],L[a.coordinate1X]=1-L[a.coordinate1X],L[a.coordinate2X]=1-L[a.coordinate2X],L[a.coordinate3X]=1-L[a.coordinate3X],d(L),m.awayTeam.push(L))})}else{const[T,C]=await Promise.all([_s.get(`https://golstats-microservices.s3-us-west-2.amazonaws.com/statsTeamBySeason-${f||b.game.seasonId}-${b.game.homeTeam.team_id}.json`,{headers:{Authorization:b.token||""}}),_s.get(`https://golstats-microservices.s3-us-west-2.amazonaws.com/statsTeamBySeason-${f||b.game.seasonId}-${b.game.awayTeam.team_id}.json`,{headers:{Authorization:b.token||""}})]);if(!T.data.data.posession.length&&!C.data.data.posession.length&&!f)return i(b.game.regularSeasonId);m={homeTeam:T.data.data.posession.filter(S=>S[a.teamId]===b.game.homeTeam.team_id&&X.has(S[a.categoryId])&&n(S)),awayTeam:C.data.data.posession.filter(S=>S[a.teamId]===b.game.awayTeam.team_id&&X.has(S[a.categoryId])&&n(S)?(S[a.coordinate1Y]=1-S[a.coordinate1Y],S[a.coordinate2Y]=1-S[a.coordinate2Y],S[a.coordinate3Y]=1-S[a.coordinate3Y],S[a.coordinate1X]=1-S[a.coordinate1X],S[a.coordinate2X]=1-S[a.coordinate2X],S[a.coordinate3X]=1-S[a.coordinate3X],!0):!1)}}return m}catch(m){throw new Error(m)}}function d(f){const m=f[a.coordinate1X],T=f[a.coordinate2X],C=f[a.coordinate3X];return f[a.coordinate1X]=f[a.coordinate1Y],f[a.coordinate2X]=f[a.coordinate2Y],f[a.coordinate3X]=f[a.coordinate3Y],f[a.coordinate1Y]=m,f[a.coordinate2Y]=T,f[a.coordinate3Y]=C,f}function s(f){e.value=f.index,u.value=f.button}function c(){A&&clearInterval(A)}return h.onUnmounted(()=>{c()}),(f,m)=>(h.openBlock(),h.createElementBlock("div",JS,[r.isTitleVisible?(h.openBlock(),h.createElementBlock("div",KS,"Volumétrica")):h.createCommentVNode("",!0),h.withDirectives(h.createElementVNode("div",XS,[h.createVNode(ik,{"selected-button-index":e.value,buttons:t.value,width:"320px","border-radius":"16px",onChange:s},null,8,["selected-button-index","buttons"])],512),[[h.vShow,!r.isGamePreMatch&&r.areTeamsVisible]]),h.createElementVNode("div",ZS,[h.createVNode(hk,{team:u.value},null,8,["team"])]),h.createElementVNode("div",YS,[h.createVNode(dk,{"passes-plays":w.value,"play-indexes":h.unref(a),"is-ghost-effect":r.isGhostEffect},null,8,["passes-plays","play-indexes","is-ghost-effect"])])]))}},Ib=Qm(QS,[["__scopeId","data-v-80397fae"]]);function Pb(r,a){return function(){return r.apply(a,arguments)}}const{toString:$S}=Object.prototype,{getPrototypeOf:R1}=Object,{iterator:d0,toStringTag:Ob}=Symbol,p0=(r=>a=>{const g=$S.call(a);return r[g]||(r[g]=g.slice(8,-1).toLowerCase())})(Object.create(null)),qu=r=>(r=r.toLowerCase(),a=>p0(a)===r),h0=r=>a=>typeof a===r,{isArray:Sh}=Array,Tf=h0("undefined");function e8(r){return r!==null&&!Tf(r)&&r.constructor!==null&&!Tf(r.constructor)&&tu(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}const zb=qu("ArrayBuffer");function t8(r){let a;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?a=ArrayBuffer.isView(r):a=r&&r.buffer&&zb(r.buffer),a}const r8=h0("string"),tu=h0("function"),Bb=h0("number"),f0=r=>r!==null&&typeof r=="object",n8=r=>r===!0||r===!1,m0=r=>{if(p0(r)!=="object")return!1;const a=R1(r);return(a===null||a===Object.prototype||Object.getPrototypeOf(a)===null)&&!(Ob in r)&&!(d0 in r)},i8=qu("Date"),a8=qu("File"),o8=qu("Blob"),s8=qu("FileList"),l8=r=>f0(r)&&tu(r.pipe),c8=r=>{let a;return r&&(typeof FormData=="function"&&r instanceof FormData||tu(r.append)&&((a=p0(r))==="formdata"||a==="object"&&tu(r.toString)&&r.toString()==="[object FormData]"))},u8=qu("URLSearchParams"),[d8,p8,h8,f8]=["ReadableStream","Request","Response","Headers"].map(qu),m8=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function kf(r,a,{allOwnKeys:g=!1}={}){if(r===null||typeof r>"u")return;let D,X;if(typeof r!="object"&&(r=[r]),Sh(r))for(D=0,X=r.length;D<X;D++)a.call(null,r[D],D,r);else{const A=g?Object.getOwnPropertyNames(r):Object.keys(r),b=A.length;let e;for(D=0;D<b;D++)e=A[D],a.call(null,r[e],e,r)}}function Db(r,a){a=a.toLowerCase();const g=Object.keys(r);let D=g.length,X;for(;D-- >0;)if(X=g[D],a===X.toLowerCase())return X;return null}const Rp=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Vb=r=>!Tf(r)&&r!==Rp;function N1(){const{caseless:r}=Vb(this)&&this||{},a={},g=(D,X)=>{const A=r&&Db(a,X)||X;m0(a[A])&&m0(D)?a[A]=N1(a[A],D):m0(D)?a[A]=N1({},D):Sh(D)?a[A]=D.slice():a[A]=D};for(let D=0,X=arguments.length;D<X;D++)arguments[D]&&kf(arguments[D],g);return a}const g8=(r,a,g,{allOwnKeys:D}={})=>(kf(a,(X,A)=>{g&&tu(X)?r[A]=Pb(X,g):r[A]=X},{allOwnKeys:D}),r),y8=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),v8=(r,a,g,D)=>{r.prototype=Object.create(a.prototype,D),r.prototype.constructor=r,Object.defineProperty(r,"super",{value:a.prototype}),g&&Object.assign(r.prototype,g)},x8=(r,a,g,D)=>{let X,A,b;const e={};if(a=a||{},r==null)return a;do{for(X=Object.getOwnPropertyNames(r),A=X.length;A-- >0;)b=X[A],(!D||D(b,r,a))&&!e[b]&&(a[b]=r[b],e[b]=!0);r=g!==!1&&R1(r)}while(r&&(!g||g(r,a))&&r!==Object.prototype);return a},b8=(r,a,g)=>{r=String(r),(g===void 0||g>r.length)&&(g=r.length),g-=a.length;const D=r.indexOf(a,g);return D!==-1&&D===g},_8=r=>{if(!r)return null;if(Sh(r))return r;let a=r.length;if(!Bb(a))return null;const g=new Array(a);for(;a-- >0;)g[a]=r[a];return g},w8=(r=>a=>r&&a instanceof r)(typeof Uint8Array<"u"&&R1(Uint8Array)),T8=(r,a)=>{const g=(r&&r[d0]).call(r);let D;for(;(D=g.next())&&!D.done;){const X=D.value;a.call(r,X[0],X[1])}},k8=(r,a)=>{let g;const D=[];for(;(g=r.exec(a))!==null;)D.push(g);return D},S8=qu("HTMLFormElement"),C8=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(a,g,D){return g.toUpperCase()+D}),Fb=(({hasOwnProperty:r})=>(a,g)=>r.call(a,g))(Object.prototype),E8=qu("RegExp"),jb=(r,a)=>{const g=Object.getOwnPropertyDescriptors(r),D={};kf(g,(X,A)=>{let b;(b=a(X,A,r))!==!1&&(D[A]=b||X)}),Object.defineProperties(r,D)},M8=r=>{jb(r,(a,g)=>{if(tu(r)&&["arguments","caller","callee"].indexOf(g)!==-1)return!1;const D=r[g];if(tu(D)){if(a.enumerable=!1,"writable"in a){a.writable=!1;return}a.set||(a.set=()=>{throw Error("Can not rewrite read-only method '"+g+"'")})}})},A8=(r,a)=>{const g={},D=X=>{X.forEach(A=>{g[A]=!0})};return Sh(r)?D(r):D(String(r).split(a)),g},L8=()=>{},R8=(r,a)=>r!=null&&Number.isFinite(r=+r)?r:a;function N8(r){return!!(r&&tu(r.append)&&r[Ob]==="FormData"&&r[d0])}const I8=r=>{const a=new Array(10),g=(D,X)=>{if(f0(D)){if(a.indexOf(D)>=0)return;if(!("toJSON"in D)){a[X]=D;const A=Sh(D)?[]:{};return kf(D,(b,e)=>{const v=g(b,X+1);!Tf(v)&&(A[e]=v)}),a[X]=void 0,A}}return D};return g(r,0)},P8=qu("AsyncFunction"),O8=r=>r&&(f0(r)||tu(r))&&tu(r.then)&&tu(r.catch),Ub=((r,a)=>r?setImmediate:a?((g,D)=>(Rp.addEventListener("message",({source:X,data:A})=>{X===Rp&&A===g&&D.length&&D.shift()()},!1),X=>{D.push(X),Rp.postMessage(g,"*")}))(`axios@${Math.random()}`,[]):g=>setTimeout(g))(typeof setImmediate=="function",tu(Rp.postMessage)),z8=typeof queueMicrotask<"u"?queueMicrotask.bind(Rp):typeof process<"u"&&process.nextTick||Ub,B8=r=>r!=null&&tu(r[d0]),jn={isArray:Sh,isArrayBuffer:zb,isBuffer:e8,isFormData:c8,isArrayBufferView:t8,isString:r8,isNumber:Bb,isBoolean:n8,isObject:f0,isPlainObject:m0,isReadableStream:d8,isRequest:p8,isResponse:h8,isHeaders:f8,isUndefined:Tf,isDate:i8,isFile:a8,isBlob:o8,isRegExp:E8,isFunction:tu,isStream:l8,isURLSearchParams:u8,isTypedArray:w8,isFileList:s8,forEach:kf,merge:N1,extend:g8,trim:m8,stripBOM:y8,inherits:v8,toFlatObject:x8,kindOf:p0,kindOfTest:qu,endsWith:b8,toArray:_8,forEachEntry:T8,matchAll:k8,isHTMLForm:S8,hasOwnProperty:Fb,hasOwnProp:Fb,reduceDescriptors:jb,freezeMethods:M8,toObjectSet:A8,toCamelCase:C8,noop:L8,toFiniteNumber:R8,findKey:Db,global:Rp,isContextDefined:Vb,isSpecCompliantForm:N8,toJSONObject:I8,isAsyncFn:P8,isThenable:O8,setImmediate:Ub,asap:z8,isIterable:B8};function pa(r,a,g,D,X){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=r,this.name="AxiosError",a&&(this.code=a),g&&(this.config=g),D&&(this.request=D),X&&(this.response=X,this.status=X.status?X.status:null)}jn.inherits(pa,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:jn.toJSONObject(this.config),code:this.code,status:this.status}}});const qb=pa.prototype,Wb={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(r=>{Wb[r]={value:r}}),Object.defineProperties(pa,Wb),Object.defineProperty(qb,"isAxiosError",{value:!0}),pa.from=(r,a,g,D,X,A)=>{const b=Object.create(qb);return jn.toFlatObject(r,b,function(e){return e!==Error.prototype},e=>e!=="isAxiosError"),pa.call(b,r.message,a,g,D,X),b.cause=r,b.name=r.name,A&&Object.assign(b,A),b};const D8=null;function I1(r){return jn.isPlainObject(r)||jn.isArray(r)}function Gb(r){return jn.endsWith(r,"[]")?r.slice(0,-2):r}function Hb(r,a,g){return r?r.concat(a).map(function(D,X){return D=Gb(D),!g&&X?"["+D+"]":D}).join(g?".":""):a}function V8(r){return jn.isArray(r)&&!r.some(I1)}const F8=jn.toFlatObject(jn,{},null,function(r){return/^is[A-Z]/.test(r)});function g0(r,a,g){if(!jn.isObject(r))throw new TypeError("target must be an object");a=a||new FormData,g=jn.toFlatObject(g,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,p){return!jn.isUndefined(p[x])});const D=g.metaTokens,X=g.visitor||u,A=g.dots,b=g.indexes,e=(g.Blob||typeof Blob<"u"&&Blob)&&jn.isSpecCompliantForm(a);if(!jn.isFunction(X))throw new TypeError("visitor must be a function");function v(x){if(x===null)return"";if(jn.isDate(x))return x.toISOString();if(jn.isBoolean(x))return x.toString();if(!e&&jn.isBlob(x))throw new pa("Blob is not supported. Use a Buffer instead.");return jn.isArrayBuffer(x)||jn.isTypedArray(x)?e&&typeof Blob=="function"?new Blob([x]):Buffer.from(x):x}function u(x,p,n){let i=x;if(x&&!n&&typeof x=="object"){if(jn.endsWith(p,"{}"))p=D?p:p.slice(0,-2),x=JSON.stringify(x);else if(jn.isArray(x)&&V8(x)||(jn.isFileList(x)||jn.endsWith(p,"[]"))&&(i=jn.toArray(x)))return p=Gb(p),i.forEach(function(d,s){!(jn.isUndefined(d)||d===null)&&a.append(b===!0?Hb([p],s,A):b===null?p:p+"[]",v(d))}),!1}return I1(x)?!0:(a.append(Hb(n,p,A),v(x)),!1)}const t=[],w=Object.assign(F8,{defaultVisitor:u,convertValue:v,isVisitable:I1});function y(x,p){if(!jn.isUndefined(x)){if(t.indexOf(x)!==-1)throw Error("Circular reference detected in "+p.join("."));t.push(x),jn.forEach(x,function(n,i){(!(jn.isUndefined(n)||n===null)&&X.call(a,n,jn.isString(i)?i.trim():i,p,w))===!0&&y(n,p?p.concat(i):[i])}),t.pop()}}if(!jn.isObject(r))throw new TypeError("data must be an object");return y(r),a}function Jb(r){const a={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,function(g){return a[g]})}function P1(r,a){this._pairs=[],r&&g0(r,this,a)}const Kb=P1.prototype;Kb.append=function(r,a){this._pairs.push([r,a])},Kb.toString=function(r){const a=r?function(g){return r.call(this,g,Jb)}:Jb;return this._pairs.map(function(g){return a(g[0])+"="+a(g[1])},"").join("&")};function j8(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Xb(r,a,g){if(!a)return r;const D=g&&g.encode||j8;jn.isFunction(g)&&(g={serialize:g});const X=g&&g.serialize;let A;if(X?A=X(a,g):A=jn.isURLSearchParams(a)?a.toString():new P1(a,g).toString(D),A){const b=r.indexOf("#");b!==-1&&(r=r.slice(0,b)),r+=(r.indexOf("?")===-1?"?":"&")+A}return r}let Zb=class{constructor(){this.handlers=[]}use(r,a,g){return this.handlers.push({fulfilled:r,rejected:a,synchronous:g?g.synchronous:!1,runWhen:g?g.runWhen:null}),this.handlers.length-1}eject(r){this.handlers[r]&&(this.handlers[r]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(r){jn.forEach(this.handlers,function(a){a!==null&&r(a)})}};const Yb={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},U8=typeof URLSearchParams<"u"?URLSearchParams:P1,q8=typeof FormData<"u"?FormData:null,W8=typeof Blob<"u"?Blob:null,G8={isBrowser:!0,classes:{URLSearchParams:U8,FormData:q8,Blob:W8},protocols:["http","https","file","blob","url","data"]},O1=typeof window<"u"&&typeof document<"u",z1=typeof navigator=="object"&&navigator||void 0,H8=O1&&(!z1||["ReactNative","NativeScript","NS"].indexOf(z1.product)<0),J8=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",K8=O1&&window.location.href||"http://localhost",X8=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:O1,hasStandardBrowserEnv:H8,hasStandardBrowserWebWorkerEnv:J8,navigator:z1,origin:K8},Symbol.toStringTag,{value:"Module"})),Sc={...X8,...G8};function Z8(r,a){return g0(r,new Sc.classes.URLSearchParams,Object.assign({visitor:function(g,D,X,A){return Sc.isNode&&jn.isBuffer(g)?(this.append(D,g.toString("base64")),!1):A.defaultVisitor.apply(this,arguments)}},a))}function Y8(r){return jn.matchAll(/\w+|\[(\w*)]/g,r).map(a=>a[0]==="[]"?"":a[1]||a[0])}function Q8(r){const a={},g=Object.keys(r);let D;const X=g.length;let A;for(D=0;D<X;D++)A=g[D],a[A]=r[A];return a}function Qb(r){function a(g,D,X,A){let b=g[A++];if(b==="__proto__")return!0;const e=Number.isFinite(+b),v=A>=g.length;return b=!b&&jn.isArray(X)?X.length:b,v?(jn.hasOwnProp(X,b)?X[b]=[X[b],D]:X[b]=D,!e):((!X[b]||!jn.isObject(X[b]))&&(X[b]=[]),a(g,D,X[b],A)&&jn.isArray(X[b])&&(X[b]=Q8(X[b])),!e)}if(jn.isFormData(r)&&jn.isFunction(r.entries)){const g={};return jn.forEachEntry(r,(D,X)=>{a(Y8(D),X,g,0)}),g}return null}function $8(r,a,g){if(jn.isString(r))try{return(a||JSON.parse)(r),jn.trim(r)}catch(D){if(D.name!=="SyntaxError")throw D}return(g||JSON.stringify)(r)}const Sf={transitional:Yb,adapter:["xhr","http","fetch"],transformRequest:[function(r,a){const g=a.getContentType()||"",D=g.indexOf("application/json")>-1,X=jn.isObject(r);if(X&&jn.isHTMLForm(r)&&(r=new FormData(r)),jn.isFormData(r))return D?JSON.stringify(Qb(r)):r;if(jn.isArrayBuffer(r)||jn.isBuffer(r)||jn.isStream(r)||jn.isFile(r)||jn.isBlob(r)||jn.isReadableStream(r))return r;if(jn.isArrayBufferView(r))return r.buffer;if(jn.isURLSearchParams(r))return a.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),r.toString();let A;if(X){if(g.indexOf("application/x-www-form-urlencoded")>-1)return Z8(r,this.formSerializer).toString();if((A=jn.isFileList(r))||g.indexOf("multipart/form-data")>-1){const b=this.env&&this.env.FormData;return g0(A?{"files[]":r}:r,b&&new b,this.formSerializer)}}return X||D?(a.setContentType("application/json",!1),$8(r)):r}],transformResponse:[function(r){const a=this.transitional||Sf.transitional,g=a&&a.forcedJSONParsing,D=this.responseType==="json";if(jn.isResponse(r)||jn.isReadableStream(r))return r;if(r&&jn.isString(r)&&(g&&!this.responseType||D)){const X=!(a&&a.silentJSONParsing)&&D;try{return JSON.parse(r)}catch(A){if(X)throw A.name==="SyntaxError"?pa.from(A,pa.ERR_BAD_RESPONSE,this,null,this.response):A}}return r}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Sc.classes.FormData,Blob:Sc.classes.Blob},validateStatus:function(r){return r>=200&&r<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};jn.forEach(["delete","get","head","post","put","patch"],r=>{Sf.headers[r]={}});const e7=jn.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),t7=r=>{const a={};let g,D,X;return r&&r.split(`
4036
4036
  `).forEach(function(A){X=A.indexOf(":"),g=A.substring(0,X).trim().toLowerCase(),D=A.substring(X+1).trim(),!(!g||a[g]&&e7[g])&&(g==="set-cookie"?a[g]?a[g].push(D):a[g]=[D]:a[g]=a[g]?a[g]+", "+D:D)}),a},$b=Symbol("internals");function Cf(r){return r&&String(r).trim().toLowerCase()}function y0(r){return r===!1||r==null?r:jn.isArray(r)?r.map(y0):String(r)}function r7(r){const a=Object.create(null),g=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let D;for(;D=g.exec(r);)a[D[1]]=D[2];return a}const n7=r=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim());function B1(r,a,g,D,X){if(jn.isFunction(D))return D.call(this,a,g);if(X&&(a=g),!!jn.isString(a)){if(jn.isString(D))return a.indexOf(D)!==-1;if(jn.isRegExp(D))return D.test(a)}}function i7(r){return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(a,g,D)=>g.toUpperCase()+D)}function a7(r,a){const g=jn.toCamelCase(" "+a);["get","set","has"].forEach(D=>{Object.defineProperty(r,D+g,{value:function(X,A,b){return this[D].call(this,a,X,A,b)},configurable:!0})})}let ru=class{constructor(r){r&&this.set(r)}set(r,a,g){const D=this;function X(b,e,v){const u=Cf(e);if(!u)throw new Error("header name must be a non-empty string");const t=jn.findKey(D,u);(!t||D[t]===void 0||v===!0||v===void 0&&D[t]!==!1)&&(D[t||e]=y0(b))}const A=(b,e)=>jn.forEach(b,(v,u)=>X(v,u,e));if(jn.isPlainObject(r)||r instanceof this.constructor)A(r,a);else if(jn.isString(r)&&(r=r.trim())&&!n7(r))A(t7(r),a);else if(jn.isObject(r)&&jn.isIterable(r)){let b={},e,v;for(const u of r){if(!jn.isArray(u))throw TypeError("Object iterator must return a key-value pair");b[v=u[0]]=(e=b[v])?jn.isArray(e)?[...e,u[1]]:[e,u[1]]:u[1]}A(b,a)}else r!=null&&X(a,r,g);return this}get(r,a){if(r=Cf(r),r){const g=jn.findKey(this,r);if(g){const D=this[g];if(!a)return D;if(a===!0)return r7(D);if(jn.isFunction(a))return a.call(this,D,g);if(jn.isRegExp(a))return a.exec(D);throw new TypeError("parser must be boolean|regexp|function")}}}has(r,a){if(r=Cf(r),r){const g=jn.findKey(this,r);return!!(g&&this[g]!==void 0&&(!a||B1(this,this[g],g,a)))}return!1}delete(r,a){const g=this;let D=!1;function X(A){if(A=Cf(A),A){const b=jn.findKey(g,A);b&&(!a||B1(g,g[b],b,a))&&(delete g[b],D=!0)}}return jn.isArray(r)?r.forEach(X):X(r),D}clear(r){const a=Object.keys(this);let g=a.length,D=!1;for(;g--;){const X=a[g];(!r||B1(this,this[X],X,r,!0))&&(delete this[X],D=!0)}return D}normalize(r){const a=this,g={};return jn.forEach(this,(D,X)=>{const A=jn.findKey(g,X);if(A){a[A]=y0(D),delete a[X];return}const b=r?i7(X):String(X).trim();b!==X&&delete a[X],a[b]=y0(D),g[b]=!0}),this}concat(...r){return this.constructor.concat(this,...r)}toJSON(r){const a=Object.create(null);return jn.forEach(this,(g,D)=>{g!=null&&g!==!1&&(a[D]=r&&jn.isArray(g)?g.join(", "):g)}),a}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([r,a])=>r+": "+a).join(`
4037
4037
  `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(r){return r instanceof this?r:new this(r)}static concat(r,...a){const g=new this(r);return a.forEach(D=>g.set(D)),g}static accessor(r){const a=(this[$b]=this[$b]={accessors:{}}).accessors,g=this.prototype;function D(X){const A=Cf(X);a[A]||(a7(g,X),a[A]=!0)}return jn.isArray(r)?r.forEach(D):D(r),this}};ru.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),jn.reduceDescriptors(ru.prototype,({value:r},a)=>{let g=a[0].toUpperCase()+a.slice(1);return{get:()=>r,set(D){this[g]=D}}}),jn.freezeMethods(ru);function D1(r,a){const g=this||Sf,D=a||g,X=ru.from(D.headers);let A=D.data;return jn.forEach(r,function(b){A=b.call(g,A,X.normalize(),a?a.status:void 0)}),X.normalize(),A}function e_(r){return!!(r&&r.__CANCEL__)}function Ch(r,a,g){pa.call(this,r??"canceled",pa.ERR_CANCELED,a,g),this.name="CanceledError"}jn.inherits(Ch,pa,{__CANCEL__:!0});function t_(r,a,g){const D=g.config.validateStatus;!g.status||!D||D(g.status)?r(g):a(new pa("Request failed with status code "+g.status,[pa.ERR_BAD_REQUEST,pa.ERR_BAD_RESPONSE][Math.floor(g.status/100)-4],g.config,g.request,g))}function o7(r){const a=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return a&&a[1]||""}function s7(r,a){r=r||10;const g=new Array(r),D=new Array(r);let X=0,A=0,b;return a=a!==void 0?a:1e3,function(e){const v=Date.now(),u=D[A];b||(b=v),g[X]=e,D[X]=v;let t=A,w=0;for(;t!==X;)w+=g[t++],t=t%r;if(X=(X+1)%r,X===A&&(A=(A+1)%r),v-b<a)return;const y=u&&v-u;return y?Math.round(w*1e3/y):void 0}}function l7(r,a){let g=0,D=1e3/a,X,A;const b=(e,v=Date.now())=>{g=v,X=null,A&&(clearTimeout(A),A=null),r.apply(null,e)};return[(...e)=>{const v=Date.now(),u=v-g;u>=D?b(e,v):(X=e,A||(A=setTimeout(()=>{A=null,b(X)},D-u)))},()=>X&&b(X)]}const v0=(r,a,g=3)=>{let D=0;const X=s7(50,250);return l7(A=>{const b=A.loaded,e=A.lengthComputable?A.total:void 0,v=b-D,u=X(v),t=b<=e;D=b;const w={loaded:b,total:e,progress:e?b/e:void 0,bytes:v,rate:u||void 0,estimated:u&&e&&t?(e-b)/u:void 0,event:A,lengthComputable:e!=null,[a?"download":"upload"]:!0};r(w)},g)},r_=(r,a)=>{const g=r!=null;return[D=>a[0]({lengthComputable:g,total:r,loaded:D}),a[1]]},n_=r=>(...a)=>jn.asap(()=>r(...a)),c7=Sc.hasStandardBrowserEnv?((r,a)=>g=>(g=new URL(g,Sc.origin),r.protocol===g.protocol&&r.host===g.host&&(a||r.port===g.port)))(new URL(Sc.origin),Sc.navigator&&/(msie|trident)/i.test(Sc.navigator.userAgent)):()=>!0,u7=Sc.hasStandardBrowserEnv?{write(r,a,g,D,X,A){const b=[r+"="+encodeURIComponent(a)];jn.isNumber(g)&&b.push("expires="+new Date(g).toGMTString()),jn.isString(D)&&b.push("path="+D),jn.isString(X)&&b.push("domain="+X),A===!0&&b.push("secure"),document.cookie=b.join("; ")},read(r){const a=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return a?decodeURIComponent(a[3]):null},remove(r){this.write(r,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function d7(r){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}function p7(r,a){return a?r.replace(/\/?\/$/,"")+"/"+a.replace(/^\/+/,""):r}function i_(r,a,g){let D=!d7(a);return r&&(D||g==!1)?p7(r,a):a}const a_=r=>r instanceof ru?{...r}:r;function Np(r,a){a=a||{};const g={};function D(u,t,w,y){return jn.isPlainObject(u)&&jn.isPlainObject(t)?jn.merge.call({caseless:y},u,t):jn.isPlainObject(t)?jn.merge({},t):jn.isArray(t)?t.slice():t}function X(u,t,w,y){if(jn.isUndefined(t)){if(!jn.isUndefined(u))return D(void 0,u,w,y)}else return D(u,t,w,y)}function A(u,t){if(!jn.isUndefined(t))return D(void 0,t)}function b(u,t){if(jn.isUndefined(t)){if(!jn.isUndefined(u))return D(void 0,u)}else return D(void 0,t)}function e(u,t,w){if(w in a)return D(u,t);if(w in r)return D(void 0,u)}const v={url:A,method:A,data:A,baseURL:b,transformRequest:b,transformResponse:b,paramsSerializer:b,timeout:b,timeoutMessage:b,withCredentials:b,withXSRFToken:b,adapter:b,responseType:b,xsrfCookieName:b,xsrfHeaderName:b,onUploadProgress:b,onDownloadProgress:b,decompress:b,maxContentLength:b,maxBodyLength:b,beforeRedirect:b,transport:b,httpAgent:b,httpsAgent:b,cancelToken:b,socketPath:b,responseEncoding:b,validateStatus:e,headers:(u,t,w)=>X(a_(u),a_(t),w,!0)};return jn.forEach(Object.keys(Object.assign({},r,a)),function(u){const t=v[u]||X,w=t(r[u],a[u],u);jn.isUndefined(w)&&t!==e||(g[u]=w)}),g}const o_=r=>{const a=Np({},r);let{data:g,withXSRFToken:D,xsrfHeaderName:X,xsrfCookieName:A,headers:b,auth:e}=a;a.headers=b=ru.from(b),a.url=Xb(i_(a.baseURL,a.url,a.allowAbsoluteUrls),r.params,r.paramsSerializer),e&&b.set("Authorization","Basic "+btoa((e.username||"")+":"+(e.password?unescape(encodeURIComponent(e.password)):"")));let v;if(jn.isFormData(g)){if(Sc.hasStandardBrowserEnv||Sc.hasStandardBrowserWebWorkerEnv)b.setContentType(void 0);else if((v=b.getContentType())!==!1){const[u,...t]=v?v.split(";").map(w=>w.trim()).filter(Boolean):[];b.setContentType([u||"multipart/form-data",...t].join("; "))}}if(Sc.hasStandardBrowserEnv&&(D&&jn.isFunction(D)&&(D=D(a)),D||D!==!1&&c7(a.url))){const u=X&&A&&u7.read(A);u&&b.set(X,u)}return a},h7=typeof XMLHttpRequest<"u",f7=h7&&function(r){return new Promise(function(a,g){const D=o_(r);let X=D.data;const A=ru.from(D.headers).normalize();let{responseType:b,onUploadProgress:e,onDownloadProgress:v}=D,u,t,w,y,x;function p(){y&&y(),x&&x(),D.cancelToken&&D.cancelToken.unsubscribe(u),D.signal&&D.signal.removeEventListener("abort",u)}let n=new XMLHttpRequest;n.open(D.method.toUpperCase(),D.url,!0),n.timeout=D.timeout;function i(){if(!n)return;const s=ru.from("getAllResponseHeaders"in n&&n.getAllResponseHeaders()),c={data:!b||b==="text"||b==="json"?n.responseText:n.response,status:n.status,statusText:n.statusText,headers:s,config:r,request:n};t_(function(f){a(f),p()},function(f){g(f),p()},c),n=null}"onloadend"in n?n.onloadend=i:n.onreadystatechange=function(){!n||n.readyState!==4||n.status===0&&!(n.responseURL&&n.responseURL.indexOf("file:")===0)||setTimeout(i)},n.onabort=function(){n&&(g(new pa("Request aborted",pa.ECONNABORTED,r,n)),n=null)},n.onerror=function(){g(new pa("Network Error",pa.ERR_NETWORK,r,n)),n=null},n.ontimeout=function(){let s=D.timeout?"timeout of "+D.timeout+"ms exceeded":"timeout exceeded";const c=D.transitional||Yb;D.timeoutErrorMessage&&(s=D.timeoutErrorMessage),g(new pa(s,c.clarifyTimeoutError?pa.ETIMEDOUT:pa.ECONNABORTED,r,n)),n=null},X===void 0&&A.setContentType(null),"setRequestHeader"in n&&jn.forEach(A.toJSON(),function(s,c){n.setRequestHeader(c,s)}),jn.isUndefined(D.withCredentials)||(n.withCredentials=!!D.withCredentials),b&&b!=="json"&&(n.responseType=D.responseType),v&&([w,x]=v0(v,!0),n.addEventListener("progress",w)),e&&n.upload&&([t,y]=v0(e),n.upload.addEventListener("progress",t),n.upload.addEventListener("loadend",y)),(D.cancelToken||D.signal)&&(u=s=>{n&&(g(!s||s.type?new Ch(null,r,n):s),n.abort(),n=null)},D.cancelToken&&D.cancelToken.subscribe(u),D.signal&&(D.signal.aborted?u():D.signal.addEventListener("abort",u)));const d=o7(D.url);if(d&&Sc.protocols.indexOf(d)===-1){g(new pa("Unsupported protocol "+d+":",pa.ERR_BAD_REQUEST,r));return}n.send(X||null)})},m7=(r,a)=>{const{length:g}=r=r?r.filter(Boolean):[];if(a||g){let D=new AbortController,X;const A=function(u){if(!X){X=!0,e();const t=u instanceof Error?u:this.reason;D.abort(t instanceof pa?t:new Ch(t instanceof Error?t.message:t))}};let b=a&&setTimeout(()=>{b=null,A(new pa(`timeout ${a} of ms exceeded`,pa.ETIMEDOUT))},a);const e=()=>{r&&(b&&clearTimeout(b),b=null,r.forEach(u=>{u.unsubscribe?u.unsubscribe(A):u.removeEventListener("abort",A)}),r=null)};r.forEach(u=>u.addEventListener("abort",A));const{signal:v}=D;return v.unsubscribe=()=>jn.asap(e),v}},g7=function*(r,a){let g=r.byteLength;if(g<a){yield r;return}let D=0,X;for(;D<g;)X=D+a,yield r.slice(D,X),D=X},y7=async function*(r,a){for await(const g of v7(r))yield*g7(g,a)},v7=async function*(r){if(r[Symbol.asyncIterator]){yield*r;return}const a=r.getReader();try{for(;;){const{done:g,value:D}=await a.read();if(g)break;yield D}}finally{await a.cancel()}},s_=(r,a,g,D)=>{const X=y7(r,a);let A=0,b,e=v=>{b||(b=!0,D&&D(v))};return new ReadableStream({async pull(v){try{const{done:u,value:t}=await X.next();if(u){e(),v.close();return}let w=t.byteLength;if(g){let y=A+=w;g(y)}v.enqueue(new Uint8Array(t))}catch(u){throw e(u),u}},cancel(v){return e(v),X.return()}},{highWaterMark:2})},x0=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",l_=x0&&typeof ReadableStream=="function",x7=x0&&(typeof TextEncoder=="function"?(r=>a=>r.encode(a))(new TextEncoder):async r=>new Uint8Array(await new Response(r).arrayBuffer())),c_=(r,...a)=>{try{return!!r(...a)}catch{return!1}},b7=l_&&c_(()=>{let r=!1;const a=new Request(Sc.origin,{body:new ReadableStream,method:"POST",get duplex(){return r=!0,"half"}}).headers.has("Content-Type");return r&&!a}),u_=64*1024,V1=l_&&c_(()=>jn.isReadableStream(new Response("").body)),b0={stream:V1&&(r=>r.body)};x0&&(r=>{["text","arrayBuffer","blob","formData","stream"].forEach(a=>{!b0[a]&&(b0[a]=jn.isFunction(r[a])?g=>g[a]():(g,D)=>{throw new pa(`Response type '${a}' is not supported`,pa.ERR_NOT_SUPPORT,D)})})})(new Response);const _7=async r=>{if(r==null)return 0;if(jn.isBlob(r))return r.size;if(jn.isSpecCompliantForm(r))return(await new Request(Sc.origin,{method:"POST",body:r}).arrayBuffer()).byteLength;if(jn.isArrayBufferView(r)||jn.isArrayBuffer(r))return r.byteLength;if(jn.isURLSearchParams(r)&&(r=r+""),jn.isString(r))return(await x7(r)).byteLength},w7=async(r,a)=>jn.toFiniteNumber(r.getContentLength())??_7(a),T7=x0&&(async r=>{let{url:a,method:g,data:D,signal:X,cancelToken:A,timeout:b,onDownloadProgress:e,onUploadProgress:v,responseType:u,headers:t,withCredentials:w="same-origin",fetchOptions:y}=o_(r);u=u?(u+"").toLowerCase():"text";let x=m7([X,A&&A.toAbortSignal()],b),p;const n=x&&x.unsubscribe&&(()=>{x.unsubscribe()});let i;try{if(v&&b7&&g!=="get"&&g!=="head"&&(i=await w7(t,D))!==0){let m=new Request(a,{method:"POST",body:D,duplex:"half"}),T;if(jn.isFormData(D)&&(T=m.headers.get("content-type"))&&t.setContentType(T),m.body){const[C,S]=r_(i,v0(n_(v)));D=s_(m.body,u_,C,S)}}jn.isString(w)||(w=w?"include":"omit");const d="credentials"in Request.prototype;p=new Request(a,{...y,signal:x,method:g.toUpperCase(),headers:t.normalize().toJSON(),body:D,duplex:"half",credentials:d?w:void 0});let s=await fetch(p,y);const c=V1&&(u==="stream"||u==="response");if(V1&&(e||c&&n)){const m={};["status","statusText","headers"].forEach(L=>{m[L]=s[L]});const T=jn.toFiniteNumber(s.headers.get("content-length")),[C,S]=e&&r_(T,v0(n_(e),!0))||[];s=new Response(s_(s.body,u_,C,()=>{S&&S(),n&&n()}),m)}u=u||"text";let f=await b0[jn.findKey(b0,u)||"text"](s,r);return!c&&n&&n(),await new Promise((m,T)=>{t_(m,T,{data:f,headers:ru.from(s.headers),status:s.status,statusText:s.statusText,config:r,request:p})})}catch(d){throw n&&n(),d&&d.name==="TypeError"&&/Load failed|fetch/i.test(d.message)?Object.assign(new pa("Network Error",pa.ERR_NETWORK,r,p),{cause:d.cause||d}):pa.from(d,d&&d.code,r,p)}}),F1={http:D8,xhr:f7,fetch:T7};jn.forEach(F1,(r,a)=>{if(r){try{Object.defineProperty(r,"name",{value:a})}catch{}Object.defineProperty(r,"adapterName",{value:a})}});const d_=r=>`- ${r}`,k7=r=>jn.isFunction(r)||r===null||r===!1,p_={getAdapter:r=>{r=jn.isArray(r)?r:[r];const{length:a}=r;let g,D;const X={};for(let A=0;A<a;A++){g=r[A];let b;if(D=g,!k7(g)&&(D=F1[(b=String(g)).toLowerCase()],D===void 0))throw new pa(`Unknown adapter '${b}'`);if(D)break;X[b||"#"+A]=D}if(!D){const A=Object.entries(X).map(([e,v])=>`adapter ${e} `+(v===!1?"is not supported by the environment":"is not available in the build"));let b=a?A.length>1?`since :
4038
4038
  `+A.map(d_).join(`
@@ -4070,7 +4070,7 @@ uniform ${De} ${qe} u_${it};
4070
4070
  `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(r){return r instanceof this?r:new this(r)}static concat(r,...a){const g=new this(r);return a.forEach(D=>g.set(D)),g}static accessor(r){const a=(this[Y4]=this[Y4]={accessors:{}}).accessors,g=this.prototype;function D(X){const A=tm(X);a[A]||(sae(g,X),a[A]=!0)}return Gn.isArray(r)?r.forEach(D):D(r),this}};hu.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Gn.reduceDescriptors(hu.prototype,({value:r},a)=>{let g=a[0].toUpperCase()+a.slice(1);return{get:()=>r,set(D){this[g]=D}}}),Gn.freezeMethods(hu);function B2(r,a){const g=this||em,D=a||g,X=hu.from(D.headers);let A=D.data;return Gn.forEach(r,function(b){A=b.call(g,A,X.normalize(),a?a.status:void 0)}),X.normalize(),A}function Q4(r){return!!(r&&r.__CANCEL__)}function jh(r,a,g){ya.call(this,r??"canceled",ya.ERR_CANCELED,a,g),this.name="CanceledError"}Gn.inherits(jh,ya,{__CANCEL__:!0});function $4(r,a,g){const D=g.config.validateStatus;!g.status||!D||D(g.status)?r(g):a(new ya("Request failed with status code "+g.status,[ya.ERR_BAD_REQUEST,ya.ERR_BAD_RESPONSE][Math.floor(g.status/100)-4],g.config,g.request,g))}function lae(r){const a=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return a&&a[1]||""}function cae(r,a){r=r||10;const g=new Array(r),D=new Array(r);let X=0,A=0,b;return a=a!==void 0?a:1e3,function(e){const v=Date.now(),u=D[A];b||(b=v),g[X]=e,D[X]=v;let t=A,w=0;for(;t!==X;)w+=g[t++],t=t%r;if(X=(X+1)%r,X===A&&(A=(A+1)%r),v-b<a)return;const y=u&&v-u;return y?Math.round(w*1e3/y):void 0}}function uae(r,a){let g=0,D=1e3/a,X,A;const b=(e,v=Date.now())=>{g=v,X=null,A&&(clearTimeout(A),A=null),r(...e)};return[(...e)=>{const v=Date.now(),u=v-g;u>=D?b(e,v):(X=e,A||(A=setTimeout(()=>{A=null,b(X)},D-u)))},()=>X&&b(X)]}const Wg=(r,a,g=3)=>{let D=0;const X=cae(50,250);return uae(A=>{const b=A.loaded,e=A.lengthComputable?A.total:void 0,v=b-D,u=X(v),t=b<=e;D=b;const w={loaded:b,total:e,progress:e?b/e:void 0,bytes:v,rate:u||void 0,estimated:u&&e&&t?(e-b)/u:void 0,event:A,lengthComputable:e!=null,[a?"download":"upload"]:!0};r(w)},g)},e6=(r,a)=>{const g=r!=null;return[D=>a[0]({lengthComputable:g,total:r,loaded:D}),a[1]]},t6=r=>(...a)=>Gn.asap(()=>r(...a)),dae=Lc.hasStandardBrowserEnv?((r,a)=>g=>(g=new URL(g,Lc.origin),r.protocol===g.protocol&&r.host===g.host&&(a||r.port===g.port)))(new URL(Lc.origin),Lc.navigator&&/(msie|trident)/i.test(Lc.navigator.userAgent)):()=>!0,pae=Lc.hasStandardBrowserEnv?{write(r,a,g,D,X,A){const b=[r+"="+encodeURIComponent(a)];Gn.isNumber(g)&&b.push("expires="+new Date(g).toGMTString()),Gn.isString(D)&&b.push("path="+D),Gn.isString(X)&&b.push("domain="+X),A===!0&&b.push("secure"),document.cookie=b.join("; ")},read(r){const a=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return a?decodeURIComponent(a[3]):null},remove(r){this.write(r,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function hae(r){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}function fae(r,a){return a?r.replace(/\/?\/$/,"")+"/"+a.replace(/^\/+/,""):r}function r6(r,a,g){let D=!hae(a);return r&&(D||g==!1)?fae(r,a):a}const n6=r=>r instanceof hu?{...r}:r;function Xp(r,a){a=a||{};const g={};function D(u,t,w,y){return Gn.isPlainObject(u)&&Gn.isPlainObject(t)?Gn.merge.call({caseless:y},u,t):Gn.isPlainObject(t)?Gn.merge({},t):Gn.isArray(t)?t.slice():t}function X(u,t,w,y){if(Gn.isUndefined(t)){if(!Gn.isUndefined(u))return D(void 0,u,w,y)}else return D(u,t,w,y)}function A(u,t){if(!Gn.isUndefined(t))return D(void 0,t)}function b(u,t){if(Gn.isUndefined(t)){if(!Gn.isUndefined(u))return D(void 0,u)}else return D(void 0,t)}function e(u,t,w){if(w in a)return D(u,t);if(w in r)return D(void 0,u)}const v={url:A,method:A,data:A,baseURL:b,transformRequest:b,transformResponse:b,paramsSerializer:b,timeout:b,timeoutMessage:b,withCredentials:b,withXSRFToken:b,adapter:b,responseType:b,xsrfCookieName:b,xsrfHeaderName:b,onUploadProgress:b,onDownloadProgress:b,decompress:b,maxContentLength:b,maxBodyLength:b,beforeRedirect:b,transport:b,httpAgent:b,httpsAgent:b,cancelToken:b,socketPath:b,responseEncoding:b,validateStatus:e,headers:(u,t,w)=>X(n6(u),n6(t),w,!0)};return Gn.forEach(Object.keys({...r,...a}),function(u){const t=v[u]||X,w=t(r[u],a[u],u);Gn.isUndefined(w)&&t!==e||(g[u]=w)}),g}const i6=r=>{const a=Xp({},r);let{data:g,withXSRFToken:D,xsrfHeaderName:X,xsrfCookieName:A,headers:b,auth:e}=a;a.headers=b=hu.from(b),a.url=J4(r6(a.baseURL,a.url,a.allowAbsoluteUrls),r.params,r.paramsSerializer),e&&b.set("Authorization","Basic "+btoa((e.username||"")+":"+(e.password?unescape(encodeURIComponent(e.password)):"")));let v;if(Gn.isFormData(g)){if(Lc.hasStandardBrowserEnv||Lc.hasStandardBrowserWebWorkerEnv)b.setContentType(void 0);else if((v=b.getContentType())!==!1){const[u,...t]=v?v.split(";").map(w=>w.trim()).filter(Boolean):[];b.setContentType([u||"multipart/form-data",...t].join("; "))}}if(Lc.hasStandardBrowserEnv&&(D&&Gn.isFunction(D)&&(D=D(a)),D||D!==!1&&dae(a.url))){const u=X&&A&&pae.read(A);u&&b.set(X,u)}return a},mae=typeof XMLHttpRequest<"u",gae=mae&&function(r){return new Promise(function(a,g){const D=i6(r);let X=D.data;const A=hu.from(D.headers).normalize();let{responseType:b,onUploadProgress:e,onDownloadProgress:v}=D,u,t,w,y,x;function p(){y&&y(),x&&x(),D.cancelToken&&D.cancelToken.unsubscribe(u),D.signal&&D.signal.removeEventListener("abort",u)}let n=new XMLHttpRequest;n.open(D.method.toUpperCase(),D.url,!0),n.timeout=D.timeout;function i(){if(!n)return;const s=hu.from("getAllResponseHeaders"in n&&n.getAllResponseHeaders()),c={data:!b||b==="text"||b==="json"?n.responseText:n.response,status:n.status,statusText:n.statusText,headers:s,config:r,request:n};$4(function(f){a(f),p()},function(f){g(f),p()},c),n=null}"onloadend"in n?n.onloadend=i:n.onreadystatechange=function(){!n||n.readyState!==4||n.status===0&&!(n.responseURL&&n.responseURL.indexOf("file:")===0)||setTimeout(i)},n.onabort=function(){n&&(g(new ya("Request aborted",ya.ECONNABORTED,r,n)),n=null)},n.onerror=function(){g(new ya("Network Error",ya.ERR_NETWORK,r,n)),n=null},n.ontimeout=function(){let s=D.timeout?"timeout of "+D.timeout+"ms exceeded":"timeout exceeded";const c=D.transitional||X4;D.timeoutErrorMessage&&(s=D.timeoutErrorMessage),g(new ya(s,c.clarifyTimeoutError?ya.ETIMEDOUT:ya.ECONNABORTED,r,n)),n=null},X===void 0&&A.setContentType(null),"setRequestHeader"in n&&Gn.forEach(A.toJSON(),function(s,c){n.setRequestHeader(c,s)}),Gn.isUndefined(D.withCredentials)||(n.withCredentials=!!D.withCredentials),b&&b!=="json"&&(n.responseType=D.responseType),v&&([w,x]=Wg(v,!0),n.addEventListener("progress",w)),e&&n.upload&&([t,y]=Wg(e),n.upload.addEventListener("progress",t),n.upload.addEventListener("loadend",y)),(D.cancelToken||D.signal)&&(u=s=>{n&&(g(!s||s.type?new jh(null,r,n):s),n.abort(),n=null)},D.cancelToken&&D.cancelToken.subscribe(u),D.signal&&(D.signal.aborted?u():D.signal.addEventListener("abort",u)));const d=lae(D.url);if(d&&Lc.protocols.indexOf(d)===-1){g(new ya("Unsupported protocol "+d+":",ya.ERR_BAD_REQUEST,r));return}n.send(X||null)})},yae=(r,a)=>{const{length:g}=r=r?r.filter(Boolean):[];if(a||g){let D=new AbortController,X;const A=function(u){if(!X){X=!0,e();const t=u instanceof Error?u:this.reason;D.abort(t instanceof ya?t:new jh(t instanceof Error?t.message:t))}};let b=a&&setTimeout(()=>{b=null,A(new ya(`timeout ${a} of ms exceeded`,ya.ETIMEDOUT))},a);const e=()=>{r&&(b&&clearTimeout(b),b=null,r.forEach(u=>{u.unsubscribe?u.unsubscribe(A):u.removeEventListener("abort",A)}),r=null)};r.forEach(u=>u.addEventListener("abort",A));const{signal:v}=D;return v.unsubscribe=()=>Gn.asap(e),v}},vae=function*(r,a){let g=r.byteLength;if(g<a){yield r;return}let D=0,X;for(;D<g;)X=D+a,yield r.slice(D,X),D=X},xae=async function*(r,a){for await(const g of bae(r))yield*vae(g,a)},bae=async function*(r){if(r[Symbol.asyncIterator]){yield*r;return}const a=r.getReader();try{for(;;){const{done:g,value:D}=await a.read();if(g)break;yield D}}finally{await a.cancel()}},a6=(r,a,g,D)=>{const X=xae(r,a);let A=0,b,e=v=>{b||(b=!0,D&&D(v))};return new ReadableStream({async pull(v){try{const{done:u,value:t}=await X.next();if(u){e(),v.close();return}let w=t.byteLength;if(g){let y=A+=w;g(y)}v.enqueue(new Uint8Array(t))}catch(u){throw e(u),u}},cancel(v){return e(v),X.return()}},{highWaterMark:2})},Gg=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",o6=Gg&&typeof ReadableStream=="function",_ae=Gg&&(typeof TextEncoder=="function"?(r=>a=>r.encode(a))(new TextEncoder):async r=>new Uint8Array(await new Response(r).arrayBuffer())),s6=(r,...a)=>{try{return!!r(...a)}catch{return!1}},wae=o6&&s6(()=>{let r=!1;const a=new Request(Lc.origin,{body:new ReadableStream,method:"POST",get duplex(){return r=!0,"half"}}).headers.has("Content-Type");return r&&!a}),l6=64*1024,D2=o6&&s6(()=>Gn.isReadableStream(new Response("").body)),Hg={stream:D2&&(r=>r.body)};Gg&&(r=>{["text","arrayBuffer","blob","formData","stream"].forEach(a=>{!Hg[a]&&(Hg[a]=Gn.isFunction(r[a])?g=>g[a]():(g,D)=>{throw new ya(`Response type '${a}' is not supported`,ya.ERR_NOT_SUPPORT,D)})})})(new Response);const Tae=async r=>{if(r==null)return 0;if(Gn.isBlob(r))return r.size;if(Gn.isSpecCompliantForm(r))return(await new Request(Lc.origin,{method:"POST",body:r}).arrayBuffer()).byteLength;if(Gn.isArrayBufferView(r)||Gn.isArrayBuffer(r))return r.byteLength;if(Gn.isURLSearchParams(r)&&(r=r+""),Gn.isString(r))return(await _ae(r)).byteLength},kae=async(r,a)=>Gn.toFiniteNumber(r.getContentLength())??Tae(a),Sae=Gg&&(async r=>{let{url:a,method:g,data:D,signal:X,cancelToken:A,timeout:b,onDownloadProgress:e,onUploadProgress:v,responseType:u,headers:t,withCredentials:w="same-origin",fetchOptions:y}=i6(r);u=u?(u+"").toLowerCase():"text";let x=yae([X,A&&A.toAbortSignal()],b),p;const n=x&&x.unsubscribe&&(()=>{x.unsubscribe()});let i;try{if(v&&wae&&g!=="get"&&g!=="head"&&(i=await kae(t,D))!==0){let m=new Request(a,{method:"POST",body:D,duplex:"half"}),T;if(Gn.isFormData(D)&&(T=m.headers.get("content-type"))&&t.setContentType(T),m.body){const[C,S]=e6(i,Wg(t6(v)));D=a6(m.body,l6,C,S)}}Gn.isString(w)||(w=w?"include":"omit");const d="credentials"in Request.prototype;p=new Request(a,{...y,signal:x,method:g.toUpperCase(),headers:t.normalize().toJSON(),body:D,duplex:"half",credentials:d?w:void 0});let s=await fetch(p,y);const c=D2&&(u==="stream"||u==="response");if(D2&&(e||c&&n)){const m={};["status","statusText","headers"].forEach(L=>{m[L]=s[L]});const T=Gn.toFiniteNumber(s.headers.get("content-length")),[C,S]=e&&e6(T,Wg(t6(e),!0))||[];s=new Response(a6(s.body,l6,C,()=>{S&&S(),n&&n()}),m)}u=u||"text";let f=await Hg[Gn.findKey(Hg,u)||"text"](s,r);return!c&&n&&n(),await new Promise((m,T)=>{$4(m,T,{data:f,headers:hu.from(s.headers),status:s.status,statusText:s.statusText,config:r,request:p})})}catch(d){throw n&&n(),d&&d.name==="TypeError"&&/Load failed|fetch/i.test(d.message)?Object.assign(new ya("Network Error",ya.ERR_NETWORK,r,p),{cause:d.cause||d}):ya.from(d,d&&d.code,r,p)}}),V2={http:Fie,xhr:gae,fetch:Sae};Gn.forEach(V2,(r,a)=>{if(r){try{Object.defineProperty(r,"name",{value:a})}catch{}Object.defineProperty(r,"adapterName",{value:a})}});const c6=r=>`- ${r}`,Cae=r=>Gn.isFunction(r)||r===null||r===!1,u6={getAdapter:r=>{r=Gn.isArray(r)?r:[r];const{length:a}=r;let g,D;const X={};for(let A=0;A<a;A++){g=r[A];let b;if(D=g,!Cae(g)&&(D=V2[(b=String(g)).toLowerCase()],D===void 0))throw new ya(`Unknown adapter '${b}'`);if(D)break;X[b||"#"+A]=D}if(!D){const A=Object.entries(X).map(([e,v])=>`adapter ${e} `+(v===!1?"is not supported by the environment":"is not available in the build"));let b=a?A.length>1?`since :
4071
4071
  `+A.map(c6).join(`
4072
4072
  `):" "+c6(A[0]):"as no adapter specified";throw new ya("There is no suitable adapter to dispatch the request "+b,"ERR_NOT_SUPPORT")}return D},adapters:V2};function F2(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new jh(null,r)}function d6(r){return F2(r),r.headers=hu.from(r.headers),r.data=B2.call(r,r.transformRequest),["post","put","patch"].indexOf(r.method)!==-1&&r.headers.setContentType("application/x-www-form-urlencoded",!1),u6.getAdapter(r.adapter||em.adapter)(r).then(function(a){return F2(r),a.data=B2.call(r,r.transformResponse,a),a.headers=hu.from(a.headers),a},function(a){return Q4(a)||(F2(r),a&&a.response&&(a.response.data=B2.call(r,r.transformResponse,a.response),a.response.headers=hu.from(a.response.headers))),Promise.reject(a)})}const p6="1.11.0",Jg={};["object","boolean","number","function","string","symbol"].forEach((r,a)=>{Jg[r]=function(g){return typeof g===r||"a"+(a<1?"n ":" ")+r}});const h6={};Jg.transitional=function(r,a,g){function D(X,A){return"[Axios v"+p6+"] Transitional option '"+X+"'"+A+(g?". "+g:"")}return(X,A,b)=>{if(r===!1)throw new ya(D(A," has been removed"+(a?" in "+a:"")),ya.ERR_DEPRECATED);return a&&!h6[A]&&(h6[A]=!0,console.warn(D(A," has been deprecated since v"+a+" and will be removed in the near future"))),r?r(X,A,b):!0}},Jg.spelling=function(r){return(a,g)=>(console.warn(`${g} is likely a misspelling of ${r}`),!0)};function Eae(r,a,g){if(typeof r!="object")throw new ya("options must be an object",ya.ERR_BAD_OPTION_VALUE);const D=Object.keys(r);let X=D.length;for(;X-- >0;){const A=D[X],b=a[A];if(b){const e=r[A],v=e===void 0||b(e,A,r);if(v!==!0)throw new ya("option "+A+" must be "+v,ya.ERR_BAD_OPTION_VALUE);continue}if(g!==!0)throw new ya("Unknown option "+A,ya.ERR_BAD_OPTION)}}const Kg={assertOptions:Eae,validators:Jg},bd=Kg.validators;let Zp=class{constructor(r){this.defaults=r||{},this.interceptors={request:new K4,response:new K4}}async request(r,a){try{return await this._request(r,a)}catch(g){if(g instanceof Error){let D={};Error.captureStackTrace?Error.captureStackTrace(D):D=new Error;const X=D.stack?D.stack.replace(/^.+\n/,""):"";try{g.stack?X&&!String(g.stack).endsWith(X.replace(/^.+\n.+\n/,""))&&(g.stack+=`
4073
- `+X):g.stack=X}catch{}}throw g}}_request(r,a){typeof r=="string"?(a=a||{},a.url=r):a=r||{},a=Xp(this.defaults,a);const{transitional:g,paramsSerializer:D,headers:X}=a;g!==void 0&&Kg.assertOptions(g,{silentJSONParsing:bd.transitional(bd.boolean),forcedJSONParsing:bd.transitional(bd.boolean),clarifyTimeoutError:bd.transitional(bd.boolean)},!1),D!=null&&(Gn.isFunction(D)?a.paramsSerializer={serialize:D}:Kg.assertOptions(D,{encode:bd.function,serialize:bd.function},!0)),a.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?a.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:a.allowAbsoluteUrls=!0),Kg.assertOptions(a,{baseUrl:bd.spelling("baseURL"),withXsrfToken:bd.spelling("withXSRFToken")},!0),a.method=(a.method||this.defaults.method||"get").toLowerCase();let A=X&&Gn.merge(X.common,X[a.method]);X&&Gn.forEach(["delete","get","head","post","put","patch","common"],x=>{delete X[x]}),a.headers=hu.concat(A,X);const b=[];let e=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(a)===!1||(e=e&&x.synchronous,b.unshift(x.fulfilled,x.rejected))});const v=[];this.interceptors.response.forEach(function(x){v.push(x.fulfilled,x.rejected)});let u,t=0,w;if(!e){const x=[d6.bind(this),void 0];for(x.unshift(...b),x.push(...v),w=x.length,u=Promise.resolve(a);t<w;)u=u.then(x[t++],x[t++]);return u}w=b.length;let y=a;for(t=0;t<w;){const x=b[t++],p=b[t++];try{y=x(y)}catch(n){p.call(this,n);break}}try{u=d6.call(this,y)}catch(x){return Promise.reject(x)}for(t=0,w=v.length;t<w;)u=u.then(v[t++],v[t++]);return u}getUri(r){r=Xp(this.defaults,r);const a=r6(r.baseURL,r.url,r.allowAbsoluteUrls);return J4(a,r.params,r.paramsSerializer)}};Gn.forEach(["delete","get","head","options"],function(r){Zp.prototype[r]=function(a,g){return this.request(Xp(g||{},{method:r,url:a,data:(g||{}).data}))}}),Gn.forEach(["post","put","patch"],function(r){function a(g){return function(D,X,A){return this.request(Xp(A||{},{method:r,headers:g?{"Content-Type":"multipart/form-data"}:{},url:D,data:X}))}}Zp.prototype[r]=a(),Zp.prototype[r+"Form"]=a(!0)});let Mae=class qT{constructor(a){if(typeof a!="function")throw new TypeError("executor must be a function.");let g;this.promise=new Promise(function(X){g=X});const D=this;this.promise.then(X=>{if(!D._listeners)return;let A=D._listeners.length;for(;A-- >0;)D._listeners[A](X);D._listeners=null}),this.promise.then=X=>{let A;const b=new Promise(e=>{D.subscribe(e),A=e}).then(X);return b.cancel=function(){D.unsubscribe(A)},b},a(function(X,A,b){D.reason||(D.reason=new jh(X,A,b),g(D.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(a){if(this.reason){a(this.reason);return}this._listeners?this._listeners.push(a):this._listeners=[a]}unsubscribe(a){if(!this._listeners)return;const g=this._listeners.indexOf(a);g!==-1&&this._listeners.splice(g,1)}toAbortSignal(){const a=new AbortController,g=D=>{a.abort(D)};return this.subscribe(g),a.signal.unsubscribe=()=>this.unsubscribe(g),a.signal}static source(){let a;return{token:new qT(function(g){a=g}),cancel:a}}};function Aae(r){return function(a){return r.apply(null,a)}}function Lae(r){return Gn.isObject(r)&&r.isAxiosError===!0}const j2={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(j2).forEach(([r,a])=>{j2[a]=r});function f6(r){const a=new Zp(r),g=N4(Zp.prototype.request,a);return Gn.extend(g,Zp.prototype,a,{allOwnKeys:!0}),Gn.extend(g,a,null,{allOwnKeys:!0}),g.create=function(D){return f6(Xp(r,D))},g}const rl=f6(em);rl.Axios=Zp,rl.CanceledError=jh,rl.CancelToken=Mae,rl.isCancel=Q4,rl.VERSION=p6,rl.toFormData=Ug,rl.AxiosError=ya,rl.Cancel=rl.CanceledError,rl.all=function(r){return Promise.all(r)},rl.spread=Aae,rl.isAxiosError=Lae,rl.mergeConfig=Xp,rl.AxiosHeaders=hu,rl.formToJSON=r=>Z4(Gn.isHTMLForm(r)?new FormData(r):r),rl.getAdapter=u6.getAdapter,rl.HttpStatusCode=j2,rl.default=rl;const{Axios:cve,AxiosError:uve,CanceledError:dve,isCancel:pve,CancelToken:hve,VERSION:fve,all:mve,Cancel:gve,isAxiosError:yve,spread:vve,toFormData:xve,AxiosHeaders:bve,HttpStatusCode:_ve,formToJSON:wve,getAdapter:Tve,mergeConfig:kve}=rl,Rae=(r,a)=>{const g=r.__vccOpts||r;for(const[D,X]of a)g[D]=X;return g},Nae={class:"header"},Iae={class:"team-logo left-team"},Pae=["src"],Oae={class:"team-logo right-team"},zae=["src"],Bae={class:"stats-container"},Dae={class:"stat-bar-container"},Vae={class:"stat-label"},Fae={class:"stat-bars"},jae={class:"bar-section"},Uae={class:"bar-number"},qae={class:"bar-section"},Wae={class:"bar-number"},Gae={__name:"gsc-comparative-reports",props:{type:{type:String,required:!0,validator:r=>["general","offensive","defensive","possession","stoppedBall","penalties"].includes(r)},gameId:{type:String,required:!0},seasonId:{type:String,required:!0},token:{type:String,required:!0,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"},homeLogo:{type:String,required:!0},awayLogo:{type:String,required:!0},typegame:{type:String,required:!0},default:{type:Boolean,default:!1}},setup(r){const a=r,g=h.ref([]),D=h.ref(!0),X=h.ref(null),A=h.computed(()=>a.default||!a.gameId?"https://golstatsimages.blob.core.windows.net/todoelfut/lineups/escudo1.png":a.homeLogo),b=h.computed(()=>a.default||!a.gameId?"https://golstatsimages.blob.core.windows.net/todoelfut/lineups/escudo2.png":a.awayLogo);h.computed(()=>({general:"General",offensive:"Ofensivo",defensive:"Defensivo",possession:"Posesión",stoppedBall:"Balón parado",penalties:"Infracciones"})[a.type]||"General");const e=h.ref(null),v=async()=>{try{if(D.value=!0,X.value=null,a.default||!a.gameId){const i=u[a.type]||u.general;g.value=i.map(d=>({label:d,local:0,away:0})),D.value=!1;return}const p=`https://a4dcb6avog.execute-api.us-west-2.amazonaws.com/prod/v3/statisticsTeamBySeason/${a.seasonId}/games/${a.gameId}?type=${a.typegame}`,n=await rl.get(p,{headers:{Authorization:`${a.token}`,"Content-Type":"application/json"}});console.log("API Response:",n.data.result),g.value=t(n.data.result,a.type)}catch(p){X.value=p.message,console.error("Error loading statistics:",p)}finally{D.value=!1}},u={general:["Goles","Remates a destino","Tarjetas amarillas","Tarjetas rojas","Centros totales"],offensive:["Tiros a gol","Tiros a gol destino","Remates a destino","Balones ganados área rival","Centros por derecha","Centros por izquierda","Enfrentamientos ofensivos exitosos","Enfrentamientos ofensivos no exitosos"],defensive:["Atajadas","Balones ganados área propia","Enfrentamientos defensivos exitosos","Enfrentamientos defensivos no exitosos","Juego aéreo resto del campo","Rechaces"],possession:["Pases totales","Pases acertados","Pases acertados en cancha rival","Balones recuperados en disputa","Balones recuperados sin disputa","Balones perdidos en disputa","Balones perdidos sin disputa"],stoppedBall:["Tiros libres 4/4","Tiros libres 3/4","Tiros libres cancha propia","Tiros de esquina por derecha","Tiros de esquina por izquierda","Saques de meta"],penalties:["Faltas totales","Faltas cerca de su propia portería","Faltas resto del campo","Penales cometidos","Fueras de lugar"]},t=(p,n)=>{if(console.log("Transformando datos para tipo:",n,"Datos recibidos:",p[a.type]),a.default){const d=u[a.type]||u.general;return console.log(`Modo default - categorías para tipo '${a.type}':`,d),d.map(s=>({label:s,local:0,away:0}))}const i=p[a.type];return!i||!Array.isArray(i)?(console.warn(`No se encontraron datos para el tipo: ${a.type}`,i),[]):(console.log(`Estadísticas para tipo '${a.type}':`,i),i.map(d=>({label:d.category_name,local:d.home,away:d.away})))},w=(p,n,i)=>{const d=p+n;return d===0?0:Math.round(i==="local"?p/d*100:n/d*100)},y=()=>{if(!e.value)return;const p=e.value.offsetWidth,n=e.value;n.classList.remove("size-large","size-medium","size-small","size-tiny"),p>=1024?n.classList.add("size-large"):p>=768?n.classList.add("size-medium"):p>=580?n.classList.add("size-small"):n.classList.add("size-tiny")};let x=null;return h.onMounted(()=>{y(),v(),x=new ResizeObserver(()=>{y()}),e.value&&x.observe(e.value)}),h.watch([()=>a.type,()=>a.typegame,()=>a.gameId,()=>a.seasonId,()=>a.token,()=>a.homeLogo,()=>a.awayLogo,()=>a.default],()=>{v()}),h.onUnmounted(()=>{x&&x.disconnect()}),(p,n)=>(h.openBlock(),h.createElementBlock("div",{class:"comparative-reports",ref_key:"containerRef",ref:e},[h.createElementVNode("div",Nae,[h.createElementVNode("div",Iae,[h.createElementVNode("img",{src:A.value,alt:"Equipo local",class:h.normalizeClass(["logo",{"default-logo":a.default||!r.gameId}])},null,10,Pae)]),h.createElementVNode("div",Oae,[h.createElementVNode("img",{src:b.value,alt:"Equipo visitante",class:h.normalizeClass(["logo",{"default-logo":a.default||!r.gameId}])},null,10,zae)])]),h.createElementVNode("div",Bae,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(g.value,i=>(h.openBlock(),h.createElementBlock("div",{class:"stat-item",key:i.label},[h.createElementVNode("div",Dae,[h.createElementVNode("div",Vae,h.toDisplayString(i.label),1),h.createElementVNode("div",Fae,[h.createElementVNode("div",jae,[h.createElementVNode("span",Uae,h.toDisplayString(i.local),1),h.createElementVNode("div",{class:"bar left-bar",style:h.normalizeStyle({width:w(i.local,i.away,"local")+"%"})},null,4)]),h.createElementVNode("div",qae,[h.createElementVNode("span",Wae,h.toDisplayString(i.away),1),h.createElementVNode("div",{class:"bar right-bar",style:h.normalizeStyle({width:w(i.local,i.away,"away")+"%"})},null,4)])])])]))),128))])],512))}},m6=Rae(Gae,[["__scopeId","data-v-06bbe73e"]]),Xg=(r,a)=>{const g=r.__vccOpts||r;for(const[D,X]of a)g[D]=X;return g},Hae={name:"SoccerBall",props:{play:{type:Object,require:!0}},data(){return{currentPlayId:0}},computed:{idGradient(){let r;switch(this.play.st){case"st1g":r="green";break;case"st1y":r="yellow";break;case"st1r":r="red";break;case"st1b":r="blue";break}return r},x(){if(this.isLeftArea)return this.play.x*2.66666666667*58-135;if(this.isLeftPost)return-57;if(this.isGoalArea)return(this.play.x-.391)*4.31034482759*637-37;if(this.isRightPost)return 620;if(this.isRightArea)return(this.play.x-.639)*2.77008310249*65+640},y(){return this.isSuperiorPost?128:340-this.play.y*1371.42857143},isLeftArea(){return this.play.x>=0&&this.play.x<.3738},isLeftPost(){return this.play.x>=.3738&&this.play.x<=.3822},isGoalArea(){return this.play.x>.3822&&this.play.x<.6232},isRightPost(){return this.play.x>=.6232&&this.play.x<=.6266},isRightArea(){return this.play.x>.6266&&this.play.x<=1},isSuperiorPost(){return this.play.x>=.3738&&this.play.x<=.6266&&this.play.y>=.1384&&this.play.y<=.1442}},methods:{onClickOver(r,a){let g={x:this.x<350?r.pageX:r.pageX-120,y:r.clientY,playerName:this.play.playerName,minute:parseInt(this.play.time.split(":")[0])||"",rivalName:this.play.rivalName,rivalLogo:this.play.rivalLogo,playInfo:a};this.$emit("getDataTooltip",g)},onMouseOver(r,a){if(this.currentPlayId!==a.play_id){let g={x:r.pageX+120>=window.innerWidth?r.layerX-120:r.layerX,y:r.layerY+20,playerName:this.play.playerName,minute:parseInt(this.play.time.split(":")[0])||"",rivalName:this.play.rivalName,rivalLogo:this.play.rivalLogo,playInfo:a};this.$emit("show-tooltip",g)}},onMouseLeave(){this.$emit("hide-tooltip")}}},Jae=["x","y"],Kae=["xlink:href"];function Xae(r,a,g,D,X,A){return h.openBlock(),h.createElementBlock("svg",{onMouseover:a[0]||(a[0]=b=>A.onMouseOver(b,g.play)),onMouseleave:a[1]||(a[1]=b=>A.onMouseLeave()),onClick:a[2]||(a[2]=b=>A.onClickOver(b,g.play)),version:"1.1",id:"ball","xmlns:cc":"http://creativecommons.org/ns#","xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:rdf":"http://www.w3.org/1999/02/22-rdf-syntax-ns#","xmlns:svg":"http://www.w3.org/2000/svg",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:A.x,y:A.y,viewBox:"0 0 6753 7174.5",style:{"enable-background":"new 0 0 450.2 478.3",cursor:"pointer"},"xml:space":"preserve"},[h.createElementVNode("image",{width:"400",height:"400","xlink:href":g.play.imgData},null,8,Kae)],40,Jae)}const Zae=Xg(Hae,[["render",Xae],["__scopeId","data-v-f203fd76"]]),Yae={key:0,class:"soccer-goal-tooltip__button-play"},Qae={class:"soccer-goal-tooltip__game"},$ae={key:0,class:"soccer-goal-tooltip__game__teams-logos"},eoe={class:"soccer-goal-tooltip__game__teams-logos__logo"},toe=["src"],roe={class:"soccer-goal-tooltip__game__teams-logos__logo"},noe=["src"],ioe={class:"soccer-goal-tooltip__game__info"},aoe={key:0,class:"soccer-goal-tooltip__game__info__score"},ooe={class:"soccer-goal-tooltip__game__info__match-day"},soe={class:"soccer-goal-tooltip__player-and-minute"},loe={class:"soccer-goal-tooltip__player-and-minute__player"},coe={class:"soccer-goal-tooltip__player-and-minute__player__photo"},uoe=["src"],doe={class:"soccer-goal-tooltip__player-and-minute__player__name"},poe={class:"soccer-goal-tooltip__player-and-minute__minute"},hoe={__name:"SoccerGoalTooltip",props:{play:{type:Object,required:!0},isMobileDevice:{type:Boolean,default:!1}},emits:["close","play"],setup(r,{emit:a}){const g=a;function D(){g("close")}function X(){g("play")}function A(){return null}return h.onBeforeMount(()=>{document.body.addEventListener("click",D,!1)}),h.onBeforeUnmount(()=>{document.body.removeEventListener("click",D,!1)}),(b,e)=>(h.openBlock(),h.createElementBlock("div",{class:"soccer-goal-tooltip",onClick:h.withModifiers(A,["stop","prevent"])},[r.isMobileDevice?(h.openBlock(),h.createElementBlock("div",Yae,[h.createElementVNode("div",{role:"button",class:"soccer-goal-tooltip__button-play__button",onClick:h.withModifiers(X,["stop","prevent"])},e[0]||(e[0]=[h.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"10",height:"10",viewBox:"0 0 10 10",fill:"none"},[h.createElementVNode("path",{d:"M3.0492 8.92004C2.9831 8.88243 2.92785 8.82624 2.88941 8.75753C2.85097 8.68882 2.83079 8.61018 2.83106 8.53011V1.46888C2.83115 1.38908 2.85146 1.3108 2.88982 1.24236C2.92819 1.17392 2.98318 1.11788 3.04895 1.08019C3.11472 1.0425 3.18881 1.02458 3.26334 1.02832C3.33788 1.03206 3.41007 1.05733 3.47225 1.10145L8.4249 4.63248C8.48147 4.67271 8.52786 4.72726 8.55995 4.79129C8.59204 4.85533 8.60883 4.92685 8.60883 4.9995C8.60883 5.07214 8.59204 5.14367 8.55995 5.2077C8.52786 5.27173 8.48147 5.32629 8.4249 5.36651L3.47225 8.89838C3.41016 8.94259 3.33803 8.96796 3.26352 8.97177C3.18902 8.97559 3.11495 8.95771 3.0492 8.92004ZM3.24397 8.53095L8.19663 4.99991L3.24397 8.53095Z",fill:"#CBEE6B"})],-1)]))])):h.createCommentVNode("",!0),h.createElementVNode("div",Qae,[r.play.homeTeam?(h.openBlock(),h.createElementBlock("div",$ae,[h.createElementVNode("div",eoe,[h.createElementVNode("img",{src:`https://golstatsimages.blob.core.windows.net/teams-80/${r.play.homeTeam.id}.png`},null,8,toe)]),h.createElementVNode("div",roe,[h.createElementVNode("img",{src:`https://golstatsimages.blob.core.windows.net/teams-80/${r.play.awayTeam.id}.png`},null,8,noe)])])):h.createCommentVNode("",!0),h.createElementVNode("div",ioe,[r.play.homeTeam?(h.openBlock(),h.createElementBlock("div",aoe,h.toDisplayString(r.play.homeTeam.acronym)+" "+h.toDisplayString(r.play.score[0])+":"+h.toDisplayString(r.play.score[1])+" "+h.toDisplayString(r.play.awayTeam.acronym),1)):h.createCommentVNode("",!0),h.createElementVNode("div",ooe,h.toDisplayString(r.play.roundAbbreviation),1)])]),h.createElementVNode("div",soe,[h.createElementVNode("div",loe,[h.createElementVNode("div",coe,[h.createElementVNode("img",{src:`https://golstatsimages.blob.core.windows.net/players-profile/${r.play.playerId}.png`},null,8,uoe)]),h.createElementVNode("div",doe,h.toDisplayString(r.play.playerShortName),1)]),h.createElementVNode("div",poe,h.toDisplayString(r.play.minute)+'"',1)])]))}},foe=Xg(hoe,[["__scopeId","data-v-74a34e4c"]]);function moe(r){return r.reduce((a,g,D)=>(a[g]=D,a),{})}const goe=["playId","gameId","playerId","momentOfPlay","categoryId","categoryType","matchLapse","section","matchResult","playingAs","total","coordinateX","coordinateY"];let U2=null;function g6(){return U2||(U2=moe(goe)),U2}const y6={2:[{category_id:12e3,category_name:"Gol",category_color:"#00FF00",categoryColorName:"green",st:"st1g",translationKey:"goal.goal",generalName:"Goles",singleName:"Gol",imgData:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADoAAAA6CAYAAADhu0ooAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAABU4SURBVHgB7Vt7dJTlnX6++9xnciV3EgyEi1wEVKiIwdpW0Va6ra5ne6y0p931tLZ1u91z9uy2u912265ne051u9t211bxHLultD1yrEVFXCKigGJRIRAQJCEh92Qmc/3mu+7zTSCQQsIE6D97+tOYmcnM972/93d7nucdgT/Z/y8T8Eeye3a2LhMke5UgiSsEOD7XRTNcoers310BFm8+LMBN8HE/HOGoAHHv5pvb2vBHsKvmaOvOVvnId/wrS8rcuxf8RX6jWmZX4fIsLbjuVlvE5iFTermttU3HVbArdrT1P+8JnXwp+Vc1862Hqpa6jWq9hatoCf5sEkzjsc3r9nbiCuyKHK1e+7GvVF+nP8Sf5lDzjD4KKykh2RHBWG8Q+piFdMIPiAJiZXn4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bGjO0Kzqbf/gHrbFFwvsPKsHUF153o3WD7ZLw2vYIEsNZlITzWHM7jyMb/OheU1HU9VTPYab9WfJQ6OSe0CsKv5Al4R9/vqqtB5dpV+VLCBufWRbbsSP+Sck271VHSm8bO6khM2QKBkfJrHILtz8YhLMoiIw6AxXfRSdXt9kxxZ8xgsdxhXbVv23R+PD8xkyfcpfvlLbeSaE1lTF9HhW7aWkOS9aXCoOLNGSVizrsdSnvi4sv8Ljwxc03727DVbQ/2v8lcdYaV61qlF23SlGtqsGh0bpFVapUt6ICsdYwRkPpMSrVnUQRnbruS2xd11b0F43/ZFPY/wGvrSx99fSrawAAAABJRU5ErkJggg=="},{category_id:59800,category_name:"Poste",category_color:"#FFFF00",categoryColorName:"yellow",st:"st1y",translationKey:"goal.goal_post",generalName:"Remates al poste",singleName:"Remate al poste",imgData:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADoAAAA7CAYAAAAq55mNAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAABl2SURBVHgB7Vt5nFTVmT33vnpV1dVNd9NNA91szSKLgqBERREFxSWKiRiXqIlLZjRGTUJinIzJzKhJTOLEySTRmGh0olncoxKNoJEBF0BUFLRlUXYEGpqG3mt5y51z732vqjFiiDp/zG/y/BVVXfXefffcbzvfuU/g78ffj/+Th8D/wnHDnOrqi49vm+4nMpO8lDNICjEpAAZLoaoVRDq+sxRoDkO1yXFksx+qlSkp1jjwFw2f0d2Mj/n42IDecAPSj76QnHVwf3HVl2cGU6rr3HTecfmLgiSihBPdUCAGCaXsF5LnCCh7gn5LiBch1F3JSmfu8MPa2vAxHB8Z6OTp6Bcg9c3TD5NXnHqMU1FeLuFI+5uMQIUh5x8SMD9o0IqvCunB9X04QYAgtOeHEVapLxL8g6sTKnWP6wU31s/GJnyE40MDbZyEatdNXjNzspxz1tRERU1fTk/qScK+Szt4MvCRVB6SBKWt5nP+3QWBlVsF3uBr3S6J1bsE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f/+Bzv+AgerjwSe85nPPLvs9u4xBNMqhqZTEVP1MUDrE7maJh+nPI1MeBpG/eo7ch4DrmNLP+pnKoIHTRFmdpHTc8qTBdNcZ1J76s2ZmqfG2e7qdIZMiS9qyjnsrG7g5XBCKu2yLPnW0f/aXfxgu/1vmLvAhj8du73Nm617/P2V30Kh7Vv3I241PCLP9fwHVBq27dlMZ15KI3oUrr4gonCw9xBHXxjKeVU7VMEMpgeqMUSHWc5xVtPB68uGuHNRIid3HjHGuO+c67258iONDA9XHwvv69Gtp6pmV7Qqub/LQuIXy+KLVFLU4yVp2ItMoPU4cTk1pnBvx0nj/pSR7Fh/F0fotU6oGmwopgjP+9Q4mM1sbBY5bEvnw9sPm4EM/jf2RgPY+JlzmXNLZhovddkxp24l0drdtqeoYg1fP4m5XI+lgDFTYzicGHYONqxPFb5/a7osVafyprCJzx4xzW7rwEY+PDWh83HJHn353/rFnptgtz8y1qYkdPWpsnuVjGomC3jcZPozSRzJ+lKx4maL80UxC8SKNuiAfJB+8ZM7H8yx9fHzsQN97zJlTXb10adf4na2kvewHxlSr9MlHOqjXFg5lW2WVzKUzwabTL/n4/8+I/5fH/wDRbtt32OccVQAAAABJRU5ErkJggg=="},{category_id:53800,category_name:"Fuera",category_color:"#DADADA",categoryColorName:"grey",st:"st1r",translationKey:"goal.missed",generalName:"Remates desviados",singleName:"Remate desviado",imgData:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADoAAAA7CAYAAAAq55mNAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAABwdSURBVHgB7Vt3fFRlun5Omd7Se0ISeglEigpKUxELC0i/IKsLrnLFVdfVu+oWdW13vateu7J2ViyAqCBLEZDeRIIQWoB00jPJZNqZM+ec+37nzAzB1bu2+8f9/fbjNyaZcs73vO/zPm/5RuBf61/r/+Xi8H+0Tq3PzEjLHDo+aLnhwqi1fy+Oc/XTOMGsxW/M6bdmfzbToxE8v0/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fPiYOjKBvfjLSnX6s2J2hNfiUR5e8uucP33Xv38mj8bVy5erAoMGlS1I8LtagjeWEAu7SVCvs9joq5SQs2+yBNbQDpUVhREwD9XzKFjvi6+pshzspRT/OY2ocoflwQBxHDW0X5WTqNVNDuKy0E31TyCAtdnh9HnqXDRHKs6c7MrD98xQ6qrBoVS18tWr2z3nxpYOvfo+t//CvsS5d+lpfkVPfo/6y1N71OnUvzXhqbTb2HFbJ+kHMmzIYjpzroIhJkEN+2EhmRZNVT+zGcT6vf82OtVOmaDmNXN6BRS2HlQp7moziZIsFXzS7UO5z0iDOg7RWTSrJVt6aNqL6/gHTfG3fc7s//ovJbz6YOys/ueHR416hV22nHe9uLUbjWTo0IkpOGamhb14qCofdqk8r2Let9YHWN0wFGZ1NVNnY1e1wqPuIzcQSnn3R1Q2RC3/ERTt/O2AGKvAD10/2VfPeiwsmdUqhGZY2+3S5Md0ZbKYhWCCif7Nk0eQBGDriChKiVP0cx1Dic03Bua8ExL63y77fx2tNotb0EhdqXH3N3IcP4keun/x/Hki+otgjJluuEuusM7Q2rn9IVnpJ4ahlVHEE1105GNkFI6BZswmQ+Vydxr4eBK6JYrmZ/PyZwIurD5WXb3vwwQdV/ETr/+z/kogv2iz/9sr1AwVBzWpqas6ym+GZMTpfuHjUFZLFU9AV5YWaYDByeuHChWfxr/Xj1/8AcWYIcU4PRoUAAAAASUVORK5CYII="},{category_id:6e4,category_name:"Parado por el portero",category_name_femenil:"Parado por la portera",category_color:"#00B8FF",categoryColorName:"blue",st:"st1b",translationKey:"goal.saved_by_goalkeeper",generalName:"Atajadas de portero",singleName:"Atajada",imgData:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADoAAAA6CAYAAADhu0ooAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAABqKSURBVHgB7VpplFxlmX7uVrequvbeO71lX0hCQkAWgZEgiONyBhfE7bhvnMFt9LjNCI6j4/Eojjpu44I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2XfPAk/4c7lkF2j7WX7DmYsWdvXyxoazxqimlMNNHsBUY7DNjyTr6BODMhVII6+TEzu8ZfFHbLwQEeTXkjp3m7Sa4rOyHufd5q+IufuKeH2VvwzM4njHQ9mGcuWmb2mq9yytpL/Sq5qAn5B72jToVguH16xAbOo/u3BPUpu1fabdLuHbq8K3sQJvgOd9zPe07D/3wRRN4Fo5nDejxh75x+3la2XuBV28sJ9hxz3Y2pjJ1Iz4wppipk6lgDLIgEDqw0In0qgf9MIu4exnRhyzPvHH/j196D57l468C9PGO2OYL+1qLxQFvaUpNjw976ZUXNAralqW5n79gHv9/PHvH/wAARBI8ZVjYSQAAAABJRU5ErkJggg=="}],3:[{category_id:12e3,category_name:"Gol Recibido",category_color:"#FF0000",categoryColorName:"red",st:"st1r",translationKey:"goal.goal_received",generalName:"Goles recibidos",singleName:"Gol recibido",imgData:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADkAAAA5CAYAAACMGIOFAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAABf/SURBVHgB5Vp5tF1Vef/2PsOd3n33jXkvCSFkQWJ0AREhWWHQimltIeKqZRDFVrtWHUqxtsvaVVuwWkBFlqVYdHWJFau2pShasS4kihWWAYEQDGGSMUrGN9333p3OPefsvfv79hnuDUMMAfuPJ+/mTufss3/7+77f9/u+fYl+Aw5B/0+HGRur4qnadt3l2WdKiEY1ihbFzMxe+jUevxaQDAhg1ipjNhnHnKCkfK2S/ogW0tOCHIlzNB6ScRqjHKW6eLtTxvHTjta343Fv5RUE/oqCbE1Orn9W6w89acKNp5SjpbE7WIpFRUghyJAFZZ9F32vCd7JvDKlUR+q45UTqPi8Mv/hKAH7ZINlq08J99xYV/ZlwnaM6jlc5s+wI/MO3DmmAgLWSc3E3gZcM2sULz3RxRheTiPG5IravsZDxEB4ZpQI3ojps/TUv1NceKdiXBbI5MbHpW1H8yZ3GnPTWwao36XnZFGEgYQe3D6Op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/vV/a1UzxjIvQgFirGHBgx5hZ0DL59pOCy4xUD2X8A8FoPgPdhv+aJWL32aaWW7NXan1WxuwobFWv9Ao27vt0I9vlncQAGUOGAMdurxtyFOL69FsePvdCPAY/k+D9q7vgxYZEy9AAAAABJRU5ErkJggg=="},{category_id:59800,category_name:"Poste",category_color:"#FFFF00",categoryColorName:"yellow",st:"st1y",translationKey:"goal.goal_post",generalName:"Remates al poste",singleName:"Remate al poste",imgData:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADoAAAA7CAYAAAAq55mNAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAABl2SURBVHgB7Vt5nFTVmT33vnpV1dVNd9NNA91szSKLgqBERREFxSWKiRiXqIlLZjRGTUJinIzJzKhJTOLEySTRmGh0olncoxKNoJEBF0BUFLRlUXYEGpqG3mt5y51z732vqjFiiDp/zG/y/BVVXfXefffcbzvfuU/g78ffj/+Th8D/wnHDnOrqi49vm+4nMpO8lDNICjEpAAZLoaoVRDq+sxRoDkO1yXFksx+qlSkp1jjwFw2f0d2Mj/n42IDecAPSj76QnHVwf3HVl2cGU6rr3HTecfmLgiSihBPdUCAGCaXsF5LnCCh7gn5LiBch1F3JSmfu8MPa2vAxHB8Z6OTp6Bcg9c3TD5NXnHqMU1FeLuFI+5uMQIUh5x8SMD9o0IqvCunB9X04QYAgtOeHEVapLxL8g6sTKnWP6wU31s/GJnyE40MDbZyEatdNXjNzspxz1tRERU1fTk/qScK+Szt4MvCRVB6SBKWt5nP+3QWBlVsF3uBr3S6J1bsEWjrtNWPqFAp5YG8WaOgnMLw6xJgBwNhB6p4RDcGN4z4k4A8F9O4bEjN/+yJ+feWnU4Mbh0ljJW097ZaOY10yrXxkgjwcRYsxQPd0AUvXScxnFC5eJ7A3b++urwmicRPapXnxyCqBb5wc4vtPAFUVAjUpgR3twMHD0DmyXn79+/+Ruwt/4/E3AV34UF3FD+/r+MGRjbh61nEupCt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3oUrr4gonCw9xBHXxjKeVU7VMEMpgeqMUSHWc5xVtPB68uGuHNRIid3HjHGuO+c67258iONDA9XHwvv69Gtp6pmV7Qqub/LQuIXy+KLVFLU4yVp2ItMoPU4cTk1pnBvx0nj/pSR7Fh/F0fotU6oGmwopgjP+9Q4mM1sbBY5bEvnw9sPm4EM/jf2RgPY+JlzmXNLZhovddkxp24l0drdtqeoYg1fP4m5XI+lgDFTYzicGHYONqxPFb5/a7osVafyprCJzx4xzW7rwEY+PDWh83HJHn353/rFnptgtz8y1qYkdPWpsnuVjGomC3jcZPozSRzJ+lKx4maL80UxC8SKNuiAfJB+8ZM7H8yx9fHzsQN97zJlTXb10adf4na2kvewHxlSr9MlHOqjXFg5lW2WVzKUzwabTL/n4/8+I/5fH/wDRbtt32OccVQAAAABJRU5ErkJggg=="},{category_id:53800,category_name:"Fuera",category_color:"#DADADA",categoryColorName:"grey",st:"st1b",translationKey:"goal.missed",generalName:"Remates desviados",singleName:"Remate desviado",imgData:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADoAAAA7CAYAAAAq55mNAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAABwdSURBVHgB7Vt3fFRlun5Omd7Se0ISeglEigpKUxELC0i/IKsLrnLFVdfVu+oWdW13vateu7J2ViyAqCBLEZDeRIIQWoB00jPJZNqZM+ec+37nzAzB1bu2+8f9/fbjNyaZcs73vO/zPm/5RuBf61/r/+Xi8H+0Tq3PzEjLHDo+aLnhwqi1fy+Oc/XTOMGsxW/M6bdmfzbToxE8v0/guH1er3fboEGDIviJ108K1FY64ZJLeuaPXnCNd/Klw3JHyvabEYUZomCCwPMGOHpwsYdG/zheBK+pBNlHjyC7iqQK7rUQbas4Ofx5Xl5eLX6C9ZMAtZZOHTd1eN4DU64aP650UH+YRStdWYt7DRoBUch3nOoDDwUQ02ETDsGmrIMY3QGodfRQCbZA77XT5ywAnwpNSFei0cBSHnseSu4fr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lpfkVPfo/6y1N71OnUvzXhqbTb2HFbJ+kHMmzIYjpzroIhJkEN+2EhmRZNVT+zGcT6vf82OtVOmaDmNXN6BRS2HlQp7moziZIsFXzS7UO5z0iDOg7RWTSrJVt6aNqL6/gHTfG3fc7s//ovJbz6YOys/ueHR416hV22nHe9uLUbjWTo0IkpOGamhb14qCofdqk8r2Let9YHWN0wFGZ1NVNnY1e1wqPuIzcQSnn3R1Q2RC3/ERTt/O2AGKvAD10/2VfPeiwsmdUqhGZY2+3S5Md0ZbKYhWCCif7Nk0eQBGDriChKiVP0cx1Dic03Bua8ExL63y77fx2tNotb0EhdqXH3N3IcP4keun/x/Hki+otgjJluuEuusM7Q2rn9IVnpJ4ahlVHEE1105GNkFI6BZswmQ+Vydxr4eBK6JYrmZ/PyZwIurD5WXb3vwwQdV/ETr/+z/kogv2iz/9sr1AwVBzWpqas6ym+GZMTpfuHjUFZLFU9AV5YWaYDByeuHChWfxr/Xj1/8AcWYIcU4PRoUAAAAASUVORK5CYII="},{category_id:6e4,category_name:"Parado por el portero",category_name_femenil:"Parado por la portera",category_color:"#00B8FF",categoryColorName:"blue",st:"st1g",translationKey:"goal.saved_by_goalkeeper",generalName:"Atajadas de portero",singleName:"Atajada",imgData:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADoAAAA6CAYAAADhu0ooAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAABqKSURBVHgB7VpplFxlmX7uVrequvbeO71lX0hCQkAWgZEgiONyBhfE7bhvnMFt9LjNCI6j4/Eojjpu44IOLqOICiOIKCAoBIEECEmAkK27093VXdXdtW93m+f77q1K8ICA4PyZuUl1bffe73u+932f932fr4D/I4eC/4Vj9F2700NmPNn5wOSjyf+a6ZX3DWYP/Epp4q98/FWADm9/8XNWnLB4Tkv74JmqmtnmqUMDihJS/NH4xwsGFy891XM8HFRU7Fag/rpWNX73wFd69+NZPp49oAMX/k26b+RV6dGxlwy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xh75x+3la2XuBV28sJ9hxz3Y2pjJ1Iz4wppipk6lgDLIgEDqw0In0qgf9MIu4exnRhyzPvHH/j196D57l468C9PGO2OYL+1qLxQFvaUpNjw976ZUXNAralqW5n79gHv9/PHvH/wAARBI8ZVjYSQAAAABJRU5ErkJggg=="}]},yoe={id:"Capa_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 888.5 651.6",style:{"enable-background":"new 0 0 888.5 651.6"},"xml:space":"preserve"},voe={__name:"SoccerGoal",props:{game:{type:Object,default:()=>({})},players:{type:Array,default:()=>[]},teams:{type:Array,default:()=>[]},plays:{type:Array,default:()=>[]},visualizationType:{type:String,default:"game"},type:{type:String,default:"offensive"},categoriesSelected:{type:Array,default:()=>[]}},emits:["openmedia"],setup(r,{emit:a}){const g=g6(),D=a,X=r,A=h.ref({}),b=h.ref(!1),e=h.ref({left:"0"}),v=h.ref(null),u=h.ref(null),t=h.ref([]),w=h.computed(()=>/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)),y=h.computed(()=>X.plays),x=h.computed(()=>y.value.map(f=>{let m={},T=0,C=null,S=null,L="",R="";if(f[g.momentOfPlay]){const M=f[g.momentOfPlay].split(":");R=Number(M[0])}if(X.game){const M=f[g.playingAs]===1?X.game.awayTeam.team_id:X.game.homeTeam.team_id;T=f[g.playingAs]===1?X.game.homeTeam.team_id:X.game.awayTeam.team_id,m=X.teams.find(k=>k.team_id===M),m=m||{},C={id:X.game.homeTeam.team_id,acronym:X.game.homeTeam.acronym,name:X.game.homeTeam.team_name},S={id:X.game.awayTeam.team_id,acronym:X.game.awayTeam.acronym,name:X.game.awayTeam.team_name}}const E=X.players.find(M=>M.player_id===f[g.playerId]),N=t.value.find(M=>M.category_id===f[g.categoryId]);if(console.log("------"),console.log("category",N),E){const M=E.player_name||E.name||",";let[k,I]=M.split(",");I=I.trim(),L=`${I.charAt(0)}. ${k.split(" ")[0].trim()}`}return{play_id:f[g.playId],playerName:E?E.player_name:"",playerShortName:L,playerId:E?E.player_id:"",time:f[g.momentOfPlay],minute:R,category_id:f[g.categoryId],category_color:t.value.find(M=>M.category_id===f[g.categoryId]).category_color,st:t.value.find(M=>M.category_id===f[g.categoryId]).st,category_type:f[g.categoryType],x:f[g.coordinateX],y:f[g.coordinateY],rivalName:m.team_name||"",rivalLogo:m.logo||"",rivalId:m.team_id||"",homeTeam:C,awayTeam:S,score:X.game?X.game.score:["",""],roundAbbreviation:X.game?X.game.roundAbbreviation:"",categoryColorName:N.categoryColorName,generalName:N.generalName,singleName:N.singleName,imgData:N.imgData,teamId:T}}));h.watch(()=>X.type,f=>{t.value=y6[f==="offensive"?2:3]},{immediate:!0});function p(f){const m=w.value?126:80;if(u.value=f.playInfo,A.value=f.playInfo,v.value){const T=v.value.getBoundingClientRect();e.value.left=f.x+77>T.width?`${T.width-158}px`:f.x-77<0?"4px":`${f.x-77}px`,f.y+m>T.height?e.value.top=`${f.y-m-30}px`:e.value.top=`${f.y}px`}}function n(){A.value={},e.value={top:"0",left:"0"},b.value=!1}function i(f){w.value||d(f.playInfo)}function d(f){if(!f)return;let m=[];if(X.sectionType==="team")if(X.type==="offensive")switch(f.category_id){case 12e3:m=[12,55,"35_r","54_r"];break;case 53800:m=[538,541,545,548,159,168,177,331,334];break;case 59800:m=[598,600,602,604,582,580,572,574,578];break;case 6e4:m=[598,600,602,604,582,580,572,574,578];break}else switch(f.category_id){case 12e3:m=[257,40];break;case 53800:m=["538_r","541_r","545_r","548_r","159_r","168_r","177_r","331_r","334_r"];break;case 59800:m=["598_r","600_r","602_r","604_r","582_r","580_r","572_r","574_r","578_r"];break;case 6e4:m=[39];break}else switch(f.category_id){case 12e3:m=X.players[0].position_id==1?[40]:[12,55];break;case 53800:m=[538,541,545,548,159,168,177,331,334];break;case 59800:m=[598,600,602,604,582,580,572,574,578];break;case 6e4:m=X.players[0].position_id==1?[39]:[598,600,602,604,582,580,572,574,578];break}const T={tournaments:[],categoryIds:m,categorySingleName:X.type==="offensive"&&X.sectionType==="player"&&f.category_id===6e4?"Remate a destino":f.generalName,mainSectionType:1,playListType:X.sectionType==="team"?3:2,matchResult:[1,2],playData:{playId:f.play_id},isPost:f.category_id===59800?1:0,advancedFilter:{playListTitle:X.type==="offensive"&&X.sectionType==="player"&&f.category_id===6e4?"Remates a destino":f.generalName,mainCategoryId:{},fieldSections:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]}};X.sectionType==="team"?(T.playerIds=[],T.teamId=f.teamId):(T.playerIds=[X.players[0].player_id],T.teamId=0),n(),D("open-media",T)}function s(){d(u.value)}function c(){n()}return(f,m)=>(h.openBlock(),h.createElementBlock("div",{class:"soccer-goal",ref_key:"soccerGoal",ref:v},[b.value?(h.openBlock(),h.createElementBlock("div",{key:0,class:"soccer-goal__tooltip",style:h.normalizeStyle(e.value)},[h.createVNode(foe,{"is-mobile-device":w.value,play:A.value,onPlay:s,onClose:c},null,8,["is-mobile-device","play"])],4)):h.createCommentVNode("",!0),(h.openBlock(),h.createElementBlock("svg",yoe,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(x.value,(T,C)=>(h.openBlock(),h.createBlock(Zae,{class:"hover-ball",play:T,key:C,onShowTooltip:p,onHideTooltip:n,onGetDataTooltip:i},null,8,["play"]))),128))]))],512))}},xoe=Xg(voe,[["__scopeId","data-v-6de8d9df"]]),boe=(r,a)=>{const g=r.__vccOpts||r;for(const[D,X]of a)g[D]=X;return g},_oe={key:1},woe={width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Toe=["fill"],koe={key:0,class:"checkbox__teams"},Soe={class:"checkbox__teams__logo"},Coe=["src"],Eoe={class:"checkbox__teams__logo"},Moe=["src"],Aoe={__name:"GSC-Checkbox",props:{width:{type:String,default:"fit-content"},height:{type:String,default:"fit-content"},label:{type:String,default:""},labelWhiteSpace:{type:String,default:"normal"},labelColor:{type:String,default:"white"},fontFamily:{type:String,default:"sans-serif"},labelFontSize:{type:String,default:"12px"},modelValue:{type:Boolean,default:!1},justifyContent:{type:String,default:"flex-start"},alignItems:{type:String,default:"center"},boxBackgroundColor:{type:String,default:"#CBEE6B"},boxValueColor:{type:String,default:"#0d1d29"},boxValue:{type:[String,Number],default:""},boxPosition:{type:String,default:"left",validator(r){return["left","right","top","bottom"].includes(r)}},boxMarginTop:{type:String,default:"0.2em"},boxWidthAndHeight:{type:String,default:"16px"},boxBorderColor:{type:String,default:"#969da2"},boxBorderWidth:{type:String,default:"2px"},boxBorderRadius:{type:String,default:"4px"},boxValueFontSize:{type:String,default:"10px"},boxValueFontFamily:{type:String,default:"sans-serif"},avoidInteraction:{type:Boolean,default:!1},avoidToCheck:{type:Boolean,default:!1},isBoxOnly:{type:Boolean,default:!1},teamsIds:{type:Array,default:()=>null}},emits:["update:modelValue"],setup(r,{emit:a}){const g=r;h.useCssVars(u=>({"7bd9d47b":r.width,"34dc7ddc":r.height}));const D=h.ref(!1),X=h.computed(()=>{const u={color:g.boxValueColor,"font-family":g.fontFamily,height:g.boxWidthAndHeight,width:g.boxWidthAndHeight,minWidth:g.boxWidthAndHeight,"border-radius":g.boxBorderRadius,"margin-top":g.boxMarginTop};return D.value?(u["background-color"]=g.boxBackgroundColor,u.border=`solid ${g.boxBorderWidth} ${g.boxBackgroundColor}`):u.border=`solid ${g.boxBorderWidth} ${g.boxBorderColor}`,u}),A=h.computed(()=>({"font-family":g.boxValueFontFamily,"font-size":g.boxValueFontSize,color:g.boxValueColor,"line-height":1})),b=h.computed(()=>{const u={color:g.labelColor,"font-family":g.fontFamily,"font-size":g.labelFontSize,"white-space":g.labelWhiteSpace,"text-align":g.boxPosition==="top"||g.boxPosition==="bottom"?"center":g.boxPosition};return(g.boxPosition==="left"||g.boxPosition==="right")&&(u[`margin-${g.boxPosition}`]=g.isBoxOnly?"0":g.teamsIds?"8px":"10px"),u});h.watch(()=>g.modelValue,u=>{u!==D.value&&(D.value=u)},{immediate:!0});function e(){g.avoidInteraction||!D.value&&g.avoidToCheck||(D.value=!D.value,a("update:modelValue",D.value))}function v(u){return`${{}.TEAM_LOGOS_URL||"https://golstatsimages.blob.core.windows.net/teams-80/"}${u}.png`}return(u,t)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["checkbox",`box-${r.boxPosition}`]),onClick:e},[h.createElementVNode("div",{class:"checkbox__box",style:h.normalizeStyle(X.value)},[D.value?(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[g.boxValue?(h.openBlock(),h.createElementBlock("div",{key:0,class:"checkbox__box__value",style:h.normalizeStyle(A.value)},h.toDisplayString(r.boxValue),5)):(h.openBlock(),h.createElementBlock("div",_oe,[(h.openBlock(),h.createElementBlock("svg",woe,[h.createElementVNode("path",{d:"M9.77994 1.70133L4.10994 7.37133C3.96994 7.51133 3.77994 7.59133 3.57994 7.59133C3.37994 7.59133 3.18994 7.51133 3.04994 7.37133L0.219941 4.54133C-0.0700586 4.25133 -0.0700586 3.77133 0.219941 3.48133C0.509941 3.19133 0.989941 3.19133 1.27994 3.48133L3.57994 5.78133L8.71994 0.641328C9.00994 0.351328 9.48994 0.351328 9.77994 0.641328C10.0699 0.931328 10.0699 1.40133 9.77994 1.70133Z",fill:r.boxValueColor},null,8,Toe)]))]))],64)):h.createCommentVNode("",!0)],4),r.teamsIds&&r.teamsIds.length?(h.openBlock(),h.createElementBlock("div",koe,[h.createElementVNode("div",Soe,[h.createElementVNode("img",{src:v(r.teamsIds[0]),alt:""},null,8,Coe)]),h.createElementVNode("div",Eoe,[h.createElementVNode("img",{src:v(r.teamsIds[1]),alt:""},null,8,Moe)])])):h.createCommentVNode("",!0),h.createElementVNode("div",{class:"checkbox__label",style:h.normalizeStyle(b.value)},h.toDisplayString(r.label),5)],2))}},Loe=boe(Aoe,[["__scopeId","data-v-b6f124d8"]]);function Roe(r,a){return r.reduce((g,D)=>{switch(D[a.categoryType]){case 1:g.possession.push(D);break;case 2:g.offensive.push(D);break;case 3:g.defensive.push(D);break}return g},{possession:[],offensive:[],defensive:[]})}const Noe={key:0,class:"goal-data__title"},Ioe={class:"goal-data__filters"},Poe={key:1},Ooe=["src"],zoe={__name:"GSC-GoalData",props:{isPreMatch:{type:Boolean,default:!1},game:{type:Object,default:()=>null},team:{type:Object,default:()=>({})},player:{type:Object,default:()=>({})},visualizationType:{type:String,default:"game"},isHomeTeamForAnalysis:{type:Boolean,default:!0},token:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"},analysisType:{type:String,default:"offensive"},canPlayVideos:{type:Boolean,default:!0},canInteract:{type:Boolean,default:!0}},emits:["openmedia"],setup(r,{emit:a}){let g=null;const D=a,X=r,A={gameId:90209,id:90209,seasonId:1943,regularSeasonId:1933,matchday_name:"Playoffs 6",status:1,score:[2,0],game_status:1,dateTimeUTC:"2025-05-26T00:00:00Z",homeTeam:{logo:"https://golstatsimages.blob.core.windows.net/teams-80/18.png",team_id:18,provisional_logo:"https://golstatsimages.blob.core.windows.net/teams-provisional/18.png",colloquial_name:"Toluca",acronym:"TOL",team_name:"Toluca"},awayTeam:{logo:"https://golstatsimages.blob.core.windows.net/teams-80/2.png",team_id:2,provisional_logo:"https://golstatsimages.blob.core.windows.net/teams-provisional/2.png",colloquial_name:"América",acronym:"AME",team_name:"America"},is_live:0,minutes:{home_goals_minutes:["L. Garcia 65'","A. Vega 82'"],visiting_goals_minutes:[],home_yellow_cards_minutes:["L. Garcia 90'","A. Vega 90 + 3'"],away_yellow_cards_minutes:["S. Caceres 78'"],home_red_cards_minutes:[],away_red_cards_minutes:[]}},b=h.ref([]),e=h.ref(null),v=h.ref(0),u=h.ref({home:{offensive:[],defensive:[]},away:{offensive:[],defensive:[]}}),t=h.computed(()=>X.game||A),w=h.computed(()=>t.value?X.isHomeTeamForAnalysis?t.value.homeTeam.team_id:t.value.awayTeam.team_id:0),y=h.computed(()=>b.value.reduce((f,m)=>(m.isSelected&&f.push(m.id),f),[])),x=h.computed(()=>({"--filters-gap":v.value>440?"8px":"4px"})),p=h.computed(()=>{const f=X.visualizationType==="game"?t.value.homeTeam.team_id===w.value:!1;return u.value[f?"home":"away"][X.analysisType].map(m=>({...m,isSelected:y.value.includes(m.category_id),teamId:X.team.teamId||t.value.homeTeam.team_id,playerId:X.player.playerId||0,gameId:t.value.id||0}))});h.watch(()=>X.analysisType,f=>{console.log("Analysis type changed to:",f),b.value=y6[f==="offensive"?2:3].map(m=>({id:m.category_id,name:t.value.isFemale&&m.category_id==6e4?m.category_name_femenil:m.category_name,isSelected:!0,imgData:m.imgData})),console.log("Available categories:",b.value)},{immediate:!0}),h.watch(()=>t.value.id,f=>{f&&c()},{immediate:!0});function n(){g=new ResizeObserver(f=>{for(const m of f)v.value=m.contentRect.width}),g.observe(e.value)}function i(f){X.canPlayVideos&&(f.seasonId=t.value.seasonId,D("openmedia",f))}async function d({seasonId:f,teamId:m}){try{const T=`https://3xbsvx7zre.execute-api.us-west-2.amazonaws.com/prod/goalsTeamBySeason/${f}/${m||""}`;return(await(await fetch(T,{method:"GET",headers:{Authorization:X.token||""}})).json())[0]}catch(T){return Promise.reject(T)}}async function s({seasonId:f,gameId:m,teamId:T}){try{return(await(await fetch(`https://3xbsvx7zre.execute-api.us-west-2.amazonaws.com/prod/goalsTeamBySeason/${f}/games/${m}/teams/${T}`,{headers:{Authorization:X.token||""}})).json())[0]}catch(C){return Promise.reject(C)}}async function c(){if(t.value.homeTeam&&t.value.awayTeam&&X.token){const f=[];X.isPreMatch?(f.push(d({seasonId:t.value.seasonId,teamId:t.value.homeTeam.team_id})),f.push(d({seasonId:t.value.seasonId,teamId:t.value.awayTeam.team_id}))):(f.push(s({seasonId:t.value.seasonId,gameId:t.value.id,teamId:t.value.homeTeam.team_id})),f.push(s({seasonId:t.value.seasonId,gameId:t.value.id,teamId:t.value.awayTeam.team_id})));const m=await Promise.all(f);for(const T of m){const{offensive:C,defensive:S}=Roe(T.data_combination,g6());T.team_id===t.value.homeTeam.team_id?(u.value.home.offensive=C,u.value.home.defensive=S):(u.value.away.offensive=C,u.value.away.defensive=S)}}}return h.onMounted(()=>{n()}),(f,m)=>(h.openBlock(),h.createElementBlock("div",{ref_key:"goalData",ref:e,class:"goal-data",style:h.normalizeStyle(x.value)},[r.canPlayVideos?(h.openBlock(),h.createElementBlock("div",Noe,"Haz click en un balón para ver el video")):h.createCommentVNode("",!0),h.createVNode(xoe,h.mergeProps(X,{plays:p.value,"categories-selected":y.value,type:r.analysisType,onOpenMedia:i}),null,16,["plays","categories-selected","type"]),h.createElementVNode("div",Ioe,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(b.value,T=>(h.openBlock(),h.createElementBlock("div",{key:T.id,class:"goal-data__filters__filter"},[r.canInteract?(h.openBlock(),h.createBlock(h.unref(Loe),{key:0,modelValue:T.isSelected,"onUpdate:modelValue":C=>T.isSelected=C,label:T.name,"label-font-size":v.value>440?"11px":"9px"},null,8,["modelValue","onUpdate:modelValue","label","label-font-size"])):(h.openBlock(),h.createElementBlock("div",Poe,h.toDisplayString(T.name),1)),h.createElementVNode("img",{src:T.imgData},null,8,Ooe)]))),128))])],4))}},v6=Xg(zoe,[["__scopeId","data-v-e4bc32cd"]]),Zg=(r,a)=>{const g=r.__vccOpts||r;for(const[D,X]of a)g[D]=X;return g},Boe={name:"tooltip",props:{data:{type:Object,required:!0}},computed:{positionTooltip(){return{top:`${this.data.y}px`,left:`${this.data.x}px`}},showTooltip(){return{visible:this.data.visible}}},methods:{tooltipClick:function(r){this.visible=!1}}};function Doe(r,a,g,D,X,A){return h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["box-tooltip",A.showTooltip]),style:h.normalizeStyle(A.positionTooltip),onClick:a[0]||(a[0]=(...b)=>A.tooltipClick&&A.tooltipClick(...b))},[h.renderSlot(r.$slots,"default",{},void 0,!0)],6)}const Voe=Zg(Boe,[["render",Doe],["__scopeId","data-v-740977d0"]]),Foe={name:"SoccerChalkboardXg",components:{Tooltip:Voe},props:{plays:{type:Array,required:!0},categories:{type:Array,required:!0},team:{type:Object,default:()=>({})},rivalTeam:{type:Object,default:()=>({})}},data(){return{negativeColor:"red",data:{x:0,y:0,visible:!1},dataPlay:{playerName:"",photo:"",minute:0,rivalLogo:"",rivalName:"",categoryName:"",xGi:0,xGf:0,isOwnGoal:!1}}},computed:{preparedPlays(){return this.plays.map(r=>({...r,playingAs:r.playing_as,teamId:r.team_id,photo:r.photo,categoryId:r.category_id,matchResult:r.match_result,matchLapse:r.matchlapse,x1:r.x1*100,y1:r.y1*100,x2:r.x2*100,y2:r.y2*100,x3:r.x3*100,y3:r.y3*100,xGi:r.xG1,xGf:r.xG2}))},localCategories(){return this.categories.map((r,a)=>({id:a,name:r.name,negative:r.negative||!1,color:r.color,points:r.points,numPoints:r.points.length,categories:r.categories,invert:r.invert||[]}))},graphPlays(){let r=this.localCategories.reduce((a,g)=>[...a,g.categories],[]);return this.preparedPlays.filter(a=>this.findCategoryInPlay(r,a)).reduce((a,g)=>{let D=this.localCategories.find(X=>this.findCategoryInPlay(X.categories,g));if(D){let X={category:D.id,categoryName:D.name,arrowColor:D.negative?this.negativeColor:D.color,arrowMarkerColor:D.negative?"url(#arrow-negative)":`url(#arrow-${D.id})`,markerColor:D.color,jersey:g.jersey_number,matchlapse:g.matchLapse,playerName:g.player_name,photo:g.photo,rivalLogo:g.rival_id,x1:D.invert.includes(g.categoryId)?100-g[`x${D.points[0]}`]:g[`x${D.points[0]}`],y1:D.invert.includes(g.categoryId)?100-g[`y${D.points[0]}`]:g[`y${D.points[0]}`],x2:D.invert.includes(g.categoryId)?100-g[`x${D.points[1]}`]:g[`x${D.points[1]}`],y2:D.invert.includes(g.categoryId)?100-g[`y${D.points[1]}`]:g[`y${D.points[1]}`],x3:D.invert.includes(g.categoryId)?100-g[`x${D.points[2]}`]:g[`x${D.points[2]}`],y3:D.invert.includes(g.categoryId)?100-g[`y${D.points[2]}`]:g[`y${D.points[2]}`],momentOfPlay:g.moment_of_play,isOwnGoal:D.invert.includes(g.categoryId),xGi:g.xGi,xGf:g.xGf};a.push(X)}return a},[])}},methods:{findCategoryInPlay(r,a){return r.find(g=>typeof g=="number"?g===a.categoryId:g.includes(a.categoryId))},onMouseOver(r,a){this.dataPlay.playerName=a.playerName||"",this.dataPlay.photo=a.photo||"",this.dataPlay.minute=parseInt(a.momentOfPlay.split(":")[0])||"",this.dataPlay.rivalLogo=a.rivalLogo||"",this.dataPlay.categoryName=a.categoryName||"",this.dataPlay.rivalName=this.rivalTeam.colloquial_name,this.dataPlay.xGi=String(a.xGi),this.dataPlay.xGf=String(a.xGf),this.dataPlay.isOwnGoal=a.isOwnGoal,this.data.visible=!0},onMouseLeave(){this.data.visible=!1}}},joe={class:"soccer-chalkboard-xg"},Uoe={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 490 684","xmlns:xlink":"http://www.w3.org/1999/xlink",class:"soccer-chalkboard"},qoe={xmlns:"http://www.w3.org/2000/svg",viewBox:"30 0 452 684","xmlns:xlink":"http://www.w3.org/1999/xlink"},Woe=["id"],Goe=["fill"],Hoe=["id"],Joe=["x1","y1","x2","y2","stroke"],Koe=["x1","y1","x2","y2","stroke","marker-end"],Xoe=["onMouseover"],Zoe=["x","y","fill"],Yoe=["x","y"];function Qoe(r,a,g,D,X,A){return h.resolveComponent("Tooltip"),h.openBlock(),h.createElementBlock("div",joe,[(h.openBlock(),h.createElementBlock("svg",Uoe,[(h.openBlock(),h.createElementBlock("svg",qoe,[h.createElementVNode("defs",null,[a[1]||(a[1]=h.createElementVNode("marker",{id:"arrow-negative",viewBox:"0 0 10 10",refX:"5",refY:"5",markerWidth:"6",markerHeight:"6",markerUnits:"strokeWidth",orient:"auto"},[h.createElementVNode("path",{d:"M 0 0 L 10 5 L 0 10 z","stroke-width":"2",fill:"red"})],-1)),(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(A.localCategories,b=>(h.openBlock(),h.createElementBlock("marker",{key:`arrow-color-${b.id}`,id:`arrow-${b.id}`,viewBox:"0 0 10 10",refX:"5",refY:"5",markerWidth:"6",markerHeight:"6",markerUnits:"strokeWidth",orient:"auto"},[h.createElementVNode("path",{d:"M 0 0 L 10 5 L 0 10 z","stroke-width":"2",fill:b.color},null,8,Goe)],8,Woe))),128)),a[2]||(a[2]=h.createElementVNode("pattern",{id:"fieldBackground",width:"1",height:"1",viewBox:"0 0 100 100",preserveAspectRatio:"none"},[h.createElementVNode("image",{"xlink:href":"https://golstatsimages.blob.core.windows.net/todoelfut/fieldbg.png",width:"100",height:"100",preserveAspectRatio:"none",id:"image2"})],-1))]),(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(A.graphPlays,b=>(h.openBlock(),h.createElementBlock("g",{key:b.id,id:`play-${b.playId}`},[h.createElementVNode("line",{x1:`${b.x1}%`,y1:`${b.y1}%`,x2:`${b.x2}%`,y2:`${b.y2}%`,stroke:b.arrowColor,"stroke-width":"2"},null,8,Joe),h.createElementVNode("line",{x1:`${b.x2}%`,y1:`${b.y2}%`,x2:`${b.x3}%`,y2:`${b.y3}%`,stroke:b.arrowColor,"stroke-width":"2","marker-end":b.arrowMarkerColor},null,8,Koe),h.createElementVNode("g",{onMouseover:e=>A.onMouseOver(e,b),onMouseleave:a[0]||(a[0]=(...e)=>A.onMouseLeave&&A.onMouseLeave(...e)),class:"is-pointer"},[h.createElementVNode("rect",{x:`${b.x1}%`,y:`${b.y1}%`,transform:"translate(-14, -14)",height:"28",width:"28","stroke-width":"2",fill:b.markerColor,stroke:"#999",rx:"14",ry:"14"},null,8,Zoe),h.createElementVNode("text",{"text-anchor":"middle","dominant-baseline":"middle",x:`${b.x1}%`,y:`${b.y1}%`,dy:"1","font-size":"15",fill:"#fff","font-family":"'Poppins-SemiBold', sans-serif"},h.toDisplayString(b.jersey),9,Yoe)],40,Xoe)],8,Hoe))),128))]))])),h.createCommentVNode("",!0)])}const $oe=Zg(Foe,[["render",Qoe],["__scopeId","data-v-0b19a10a"]]),x6=(r,a)=>{let g={};return r.forEach((D,X)=>{X==3&&(a[0]==35||a[0]==54)&&(a[X]==2?a[X]=1:a[X]=2),X==2&&(a[0]==35||a[0]==54)&&(a[X]==1?a[X]=2:a[X]==2&&(a[X]=1)),g[D]=a[X]}),g};(function(){function r(a,g,D){return typeof D>"u"||+D==0?Math[a](g):(g=+g,D=+D,isNaN(g)||!(typeof D=="number"&&D%1===0)?NaN:(g=g.toString().split("e"),g=Math[a](+(g[0]+"e"+(g[1]?+g[1]-D:-D))),g=g.toString().split("e"),+(g[0]+"e"+(g[1]?+g[1]+D:D))))}Math.ceil10||(Math.ceil10=function(a,g){return r("ceil",a,g)})})();function ese(r,a){let g=a*-1;return Math.ceil10(r,g)}const b6=[12,55,35,54],_6=[510],w6=[330,331,333,334,423,424,343,344],T6=[29,269],k6=new Set(b6),S6=new Set(_6),C6=new Set(w6),E6=new Set(T6),Yg=[{name:"Goles",color:"#336DFF",points:[1,2,3],categories:b6,invert:[35,54],negative:!1},{name:"Tiros a gol",color:"#7ED321",points:[1,2,3],categories:_6},{name:"Remates con cabeza",color:"#990BFF",points:[1,2,3],categories:w6},{name:"Penales",color:"#21BBD3",points:[1,2,3],categories:T6}],tse={name:"XgField",components:{SoccerChalkboard:$oe},props:{game:{type:Object,default:()=>({})},isTitleVisible:{type:Boolean,default:!0},isPostMatch:{type:Boolean,default:!0},containerWidth:{type:Number,default:0},isHomeTeamForAnalysis:{type:Boolean,default:!0},token:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"}},data(){return{categories:Yg,xgData:[],xgLocalPlays:[],xgAwayPlays:[]}},computed:{style(){return{"--flex-direction":this.containerWidth<478?"column":"row","--width-info":this.containerWidth<478?"100%":"40%","--padding-table-row":this.containerWidth<478?"0":"6px 0","--font-size-row":this.containerWidth<478?"8px":"10px"}},team(){return!this.game||!this.game.homeTeam||!this.game.awayTeam?{}:this.isHomeTeamForAnalysis?this.game.homeTeam:this.game.awayTeam},rivalTeam(){return!this.game||!this.game.homeTeam||!this.game.awayTeam?{}:this.isHomeTeamForAnalysis?this.game.awayTeam:this.game.homeTeam},xgPlays(){return this.isHomeTeamForAnalysis?this.xgLocalPlays:this.xgAwayPlays},goalsQty(){const r=Yg.find(a=>a.name==="Goles");return this.xgPlays.filter(a=>r.categories.includes(a.category_id)).length},shotsOnGoalQty(){return this.xgPlays.filter(r=>r.category_id===510).length},headQty(){const r=Yg.find(a=>a.name==="Remates con cabeza");return this.xgPlays.filter(a=>r.categories.includes(a.category_id)).length},penaltiesQty(){const r=Yg.find(a=>a.name==="Penales");return this.xgPlays.filter(a=>r.categories.includes(a.category_id)).length},xG(){const r=new Set;let a=this.xgPlays.reduce((g,D)=>(r.has(D.moment_of_play)||(r.add(D.moment_of_play),g+=D.xG2),g),0);return ese(a,2)},gxInfoItems(){return[{title:"Goles",value:this.goalsQty},{title:"Tiros a Gol",value:this.shotsOnGoalQty},{title:"Remates con cabeza",value:this.headQty},{title:"Penales",value:this.penaltiesQty},{title:"Goles esperados (xG)",value:this.xG}]}},watch:{game:{handler(r,a){r&&r.id&&(!a||a.id!==r.id)&&this.fillXgData()},immediate:!0,deep:!0}},methods:{async fetchXgData(){try{const r=this.isPostMatch?`https://bzznnzehtf.execute-api.us-west-2.amazonaws.com/prod/xg/game/${this.game.id}/teams/${this.game.homeTeam.team_id}/${this.game.awayTeam.team_id}`:`https://bzznnzehtf.execute-api.us-west-2.amazonaws.com/prod/xg/seasons/${this.game.seasonId}/teams/${this.game.homeTeam.team_id}/${this.game.awayTeam.team_id}`;return await(await fetch(r,{method:"GET",headers:{Authorization:this.token}})).json()||{local_team:[],visiting_team:[],data_headers:[]}}catch(r){console.error("Error fetching xG data:",r)}},async fillXgData(){try{const r=await this.fetchXgData(),a=r.local_team.map(x=>x6(r.data_headers,x)),g=[],D=[],X=[],A=[],b=new Set;a.forEach(x=>{k6.has(x.category_id)?b.has(x.moment_of_play)||(b.add(x.moment_of_play),g.push(x)):S6.has(x.category_id)?D.push(x):C6.has(x.category_id)?X.push(x):E6.has(x.category_id)&&A.push(x)}),this.xgLocalPlays=[...D,...g,...X,...A];const e=r.visiting_team.map(x=>x6(r.data_headers,x)),v=new Set,u=[],t=[],w=[],y=[];e.forEach(x=>{k6.has(x.category_id)?v.has(x.moment_of_play)||(v.add(x.moment_of_play),u.push(x)):S6.has(x.category_id)?t.push(x):C6.has(x.category_id)?w.push(x):E6.has(x.category_id)&&y.push(x)}),this.xgAwayPlays=[...t,...u,...w,y]}catch(r){console.error("Error filling xG data:",r)}}},beforeMount(){if(!this.game||!this.game.id){console.warn("No game data provided for xG analysis.");return}this.fillXgData()}},rse={class:"xg-container__info"},nse={key:0,class:"title"},ise={class:"table"},ase={class:"table__row"},ose={class:"table__row__title"},sse={class:"table__row__value"},lse=["src"],cse={class:"table__row__title"},use={class:"table__row__value"},dse={key:1,class:"table-description"},pse={class:"xg-container__field"};function hse(r,a,g,D,X,A){const b=h.resolveComponent("SoccerChalkboard");return h.openBlock(),h.createElementBlock("div",{class:"xg-container",style:h.normalizeStyle(A.style)},[h.createElementVNode("div",rse,[g.isTitleVisible?(h.openBlock(),h.createElementBlock("div",nse,"Goles esperados (xG)")):h.createCommentVNode("",!0),h.createElementVNode("div",ise,[h.createElementVNode("div",ase,[h.createElementVNode("div",ose,h.toDisplayString(A.gxInfoItems[0].title),1),h.createElementVNode("div",sse,[h.createTextVNode(h.toDisplayString(A.gxInfoItems[0].value),1),h.createElementVNode("img",{class:"img-abs",src:r.stringSelectedTeamLogo},null,8,lse)])]),(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(A.gxInfoItems.slice(1),(e,v)=>(h.openBlock(),h.createElementBlock("div",{key:v,class:"table__row"},[h.createElementVNode("div",cse,h.toDisplayString(e.title),1),h.createElementVNode("div",use,h.toDisplayString(e.value),1)]))),128))]),g.containerWidth>478?(h.openBlock(),h.createElementBlock("div",dse,a[0]||(a[0]=[h.createElementVNode("span",null,"xG:",-1),h.createTextVNode(" es la medida para estimar la probabilidad de que un tiro o una jugada termine en gol, basándose en factores como la ubicación y la dificultad de la acción. ",-1)]))):h.createCommentVNode("",!0)]),h.createElementVNode("div",pse,[h.createVNode(b,{plays:A.xgPlays,categories:X.categories,team:A.team,"rival-team":A.rivalTeam},null,8,["plays","categories","team","rival-team"])])],4)}const fse=Zg(tse,[["render",hse],["__scopeId","data-v-1d894c92"]]);let M6=null;const mse={name:"XgMain",components:{SoccerChalkboard:fse},props:{game:{type:Object,default:()=>({})},isHomeTeamForAnalysis:{type:Boolean,default:!0},isTitleVisible:{type:Boolean,default:!1},isPostMatch:{type:Boolean,default:!0},token:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"}},data(){return{gamesContainerWidth:0,containerHeight:0}},methods:{setUpResizeObserver(){if(window.ResizeObserver)M6=new ResizeObserver(()=>{this.gamesContainerWidth=this.$refs.gamesContainer.clientWidth,this.containerHeight=this.$refs.gamesContainer.clientHeight}),M6.observe(this.$refs.gamesContainer);else throw new Error("Resize observer not supported!")}},mounted(){setTimeout(()=>{this.setUpResizeObserver()},100)}},gse={class:"xg",ref:"gamesContainer"};function yse(r,a,g,D,X,A){const b=h.resolveComponent("SoccerChalkboard");return h.openBlock(),h.createElementBlock("div",gse,[h.createVNode(b,{game:g.game,"container-width":X.gamesContainerWidth,"container-height":X.containerHeight,"is-home-team-for-analysis":g.isHomeTeamForAnalysis,"is-title-visible":g.isTitleVisible,"is-post-match":g.isPostMatch,token:g.token,class:"local"},null,8,["game","container-width","container-height","is-home-team-for-analysis","is-title-visible","is-post-match","token"])],512)}const A6=Zg(mse,[["render",yse],["__scopeId","data-v-7550c0dc"]]),vse={class:"tooltip-options"},xse={__name:"TooltipOptions",props:{optionsType:{type:String,default:"page"}},emits:["close-tooltip","change-sort","delete-page","edit","clone","delete"],setup(r,{emit:a}){const g=r,D=a,X=h.computed(()=>g.optionsType==="page");function A(){D("close-tooltip")}function b(e){D(e),A()}return(e,v)=>(h.openBlock(),h.createElementBlock(h.Fragment,null,[h.createElementVNode("div",{class:"tooltip-overlay",onClick:A}),h.createElementVNode("div",vse,[h.createElementVNode("ul",null,[X.value?(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[h.createElementVNode("li",{class:"option",onClick:v[0]||(v[0]=u=>b("change-sort"))},[...v[4]||(v[4]=[h.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/report-maker/icn-rename.svg",alt:"Renombrar template",class:"icon"},null,-1),h.createTextVNode(" Cambiar orden ",-1)])]),h.createElementVNode("li",{class:"option",onClick:v[1]||(v[1]=u=>b("delete-page"))},[...v[5]||(v[5]=[h.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/report-maker/icn-delete.svg",alt:"Eliminar template",class:"icon"},null,-1),h.createTextVNode(" Eliminar ",-1)])])],64)):(h.openBlock(),h.createElementBlock(h.Fragment,{key:1},[h.createElementVNode("li",{class:"option",onClick:v[2]||(v[2]=u=>b("edit"))},[...v[6]||(v[6]=[h.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/report-maker/icn-rename.svg",alt:"Renombrar template",class:"icon"},null,-1),h.createTextVNode(" Editar ",-1)])]),h.createElementVNode("li",{class:"option",onClick:v[3]||(v[3]=u=>b("delete"))},[...v[7]||(v[7]=[h.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/report-maker/icn-delete.svg",alt:"Eliminar template",class:"icon"},null,-1),h.createTextVNode(" Eliminar ",-1)])])],64))])])],64))}},L6=dd(xse,[["__scopeId","data-v-998e2429"]]),bse={class:"report-view"},_se={class:"report-view__header"},wse={class:"report-view__header__team-and-name"},Tse={key:0,class:"report-view__header__logo"},kse=["src"],Sse={class:"report-view__header__name"},Cse={class:"report-view__content"},Ese={__name:"ReportView",props:{title:{type:String,default:"Item name"},isEmpty:{type:Boolean,default:!1},isTemplateMode:{type:Boolean,default:!1},game:{type:Object,default:()=>null},isHomeTeam:{type:Boolean,default:!0},isFilterVisible:{type:Boolean,default:!1},viewId:{type:Number,default:0}},emits:["edit","delete"],setup(r,{emit:a}){const g=r,D=h.ref(!1),X=a,A=[1,2,3,4,6,8],b=h.computed(()=>!A.includes(g.viewId)),e=h.computed(()=>{if(g.game){const w=g.isHomeTeam?g.game.homeTeam:g.game.awayTeam;if(w&&w.logo)return w.logo}return""});function v(){t(),X("edit")}function u(){t(),X("delete")}function t(){D.value=!1}return(w,y)=>(h.openBlock(),h.createElementBlock("div",bse,[h.createElementVNode("div",_se,[D.value?(h.openBlock(),h.createBlock(L6,{key:0,"options-type":"view",onClick:y[0]||(y[0]=h.withModifiers(x=>D.value=!1,["self"])),onMouseleave:y[1]||(y[1]=x=>D.value=!1),onCloseTooltip:t,onEdit:v,onDelete:u})):h.createCommentVNode("",!0),h.createElementVNode("div",wse,[e.value&&b.value?(h.openBlock(),h.createElementBlock("div",Tse,[h.createElementVNode("img",{src:e.value,alt:""},null,8,kse)])):h.createCommentVNode("",!0),h.createElementVNode("div",Sse,h.toDisplayString(r.title),1)]),h.withDirectives(h.createElementVNode("div",{role:"button",class:"report-view__header__actions",onClick:y[2]||(y[2]=x=>D.value=!0)},[...y[3]||(y[3]=[h.createElementVNode("svg",{width:"17",height:"13",viewBox:"0 0 17 13",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[h.createElementVNode("path",{d:"M3.56953 6.28672C3.56953 7.19972 2.83253 7.93672 1.91953 7.93672C1.00653 7.93672 0.269531 7.19972 0.269531 6.28672C0.269531 5.37372 1.00653 4.63672 1.91953 4.63672C2.83253 4.63672 3.56953 5.37372 3.56953 6.28672ZM8.51953 4.63672C7.60653 4.63672 6.86953 5.37372 6.86953 6.28672C6.86953 7.19972 7.60653 7.93672 8.51953 7.93672C9.43253 7.93672 10.1695 7.19972 10.1695 6.28672C10.1695 5.37372 9.43253 4.63672 8.51953 4.63672ZM15.1195 4.63672C14.2065 4.63672 13.4695 5.37372 13.4695 6.28672C13.4695 7.19972 14.2065 7.93672 15.1195 7.93672C16.0325 7.93672 16.7695 7.19972 16.7695 6.28672C16.7695 5.37372 16.0325 4.63672 15.1195 4.63672Z",fill:"white"})],-1)])],512),[[h.vShow,r.isTemplateMode&&!r.isFilterVisible]])]),h.createElementVNode("div",Cse,[h.createElementVNode("div",{class:h.normalizeClass({"field-possession-component":r.viewId===8,"timeline-component":r.viewId===4})},[h.renderSlot(w.$slots,"default",{},void 0,!0)],2)])]))}},Mse=dd(Ese,[["__scopeId","data-v-e59c21d6"]]);function Ase(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Qg={exports:{}},R6;function Lse(){if(R6)return Qg.exports;R6=1;function r(){}return r.prototype={on:function(a,g,D){var X=this.e||(this.e={});return(X[a]||(X[a]=[])).push({fn:g,ctx:D}),this},once:function(a,g,D){var X=this;function A(){X.off(a,A),g.apply(D,arguments)}return A._=g,this.on(a,A,D)},emit:function(a){var g=[].slice.call(arguments,1),D=((this.e||(this.e={}))[a]||[]).slice(),X=0,A=D.length;for(X;X<A;X++)D[X].fn.apply(D[X].ctx,g);return this},off:function(a,g){var D=this.e||(this.e={}),X=D[a],A=[];if(X&&g)for(var b=0,e=X.length;b<e;b++)X[b].fn!==g&&X[b].fn._!==g&&A.push(X[b]);return A.length?D[a]=A:delete D[a],this}},Qg.exports=r,Qg.exports.TinyEmitter=r,Qg.exports}var q2,N6;function Rse(){if(N6)return q2;N6=1;var r=Lse();return q2=new r,q2}var Nse=Rse();const xi=Ase(Nse);function Ise(r,a,g,D,X){const A=(...b)=>(console.warn("gridstack.js: Function `"+g+"` is deprecated in "+X+" and has been replaced with `"+D+"`. It will be **removed** in a future release"),a.apply(r,b));return A.prototype=a.prototype,A}class zn{static getElements(a,g=document){if(typeof a=="string"){const D="getElementById"in g?g:void 0;if(D&&!isNaN(+a[0])){const A=D.getElementById(a);return A?[A]:[]}let X=g.querySelectorAll(a);return!X.length&&a[0]!=="."&&a[0]!=="#"&&(X=g.querySelectorAll("."+a),X.length||(X=g.querySelectorAll("#"+a))),Array.from(X)}return[a]}static getElement(a,g=document){if(typeof a=="string"){const D="getElementById"in g?g:void 0;if(!a.length)return null;if(D&&a[0]==="#")return D.getElementById(a.substring(1));if(a[0]==="#"||a[0]==="."||a[0]==="[")return g.querySelector(a);if(D&&!isNaN(+a[0]))return D.getElementById(a);let X=g.querySelector(a);return D&&!X&&(X=D.getElementById(a)),X||(X=g.querySelector("."+a)),X}return a}static lazyLoad(a){var g,D;return a.lazyLoad||((D=(g=a.grid)==null?void 0:g.opts)==null?void 0:D.lazyLoad)&&a.lazyLoad!==!1}static createDiv(a,g){const D=document.createElement("div");return a.forEach(X=>{X&&D.classList.add(X)}),g==null||g.appendChild(D),D}static shouldSizeToContent(a,g=!1){return(a==null?void 0:a.grid)&&(g?a.sizeToContent===!0||a.grid.opts.sizeToContent===!0&&a.sizeToContent===void 0:!!a.sizeToContent||a.grid.opts.sizeToContent&&a.sizeToContent!==!1)}static isIntercepted(a,g){return!(a.y>=g.y+g.h||a.y+a.h<=g.y||a.x+a.w<=g.x||a.x>=g.x+g.w)}static isTouching(a,g){return zn.isIntercepted(a,{x:g.x-.5,y:g.y-.5,w:g.w+1,h:g.h+1})}static areaIntercept(a,g){const D=a.x>g.x?a.x:g.x,X=a.x+a.w<g.x+g.w?a.x+a.w:g.x+g.w;if(X<=D)return 0;const A=a.y>g.y?a.y:g.y,b=a.y+a.h<g.y+g.h?a.y+a.h:g.y+g.h;return b<=A?0:(X-D)*(b-A)}static area(a){return a.w*a.h}static sort(a,g=1){return a.sort((D,X)=>{const A=g*((D.y??1e4)-(X.y??1e4));return A===0?g*((D.x??1e4)-(X.x??1e4)):A})}static find(a,g){return g?a.find(D=>D.id===g):void 0}static toBool(a){return typeof a=="boolean"?a:typeof a=="string"?(a=a.toLowerCase(),!(a===""||a==="no"||a==="false"||a==="0")):!!a}static toNumber(a){return a===null||a.length===0?void 0:Number(a)}static parseHeight(a){let g,D="px";if(typeof a=="string")if(a==="auto"||a==="")g=0;else{const X=a.match(/^(-[0-9]+\.[0-9]+|[0-9]*\.[0-9]+|-[0-9]+|[0-9]+)(px|em|rem|vh|vw|%|cm|mm)?$/);if(!X)throw new Error(`Invalid height val = ${a}`);D=X[2]||"px",g=parseFloat(X[1])}else g=a;return{h:g,unit:D}}static defaults(a,...g){return g.forEach(D=>{for(const X in D){if(!D.hasOwnProperty(X))return;a[X]===null||a[X]===void 0?a[X]=D[X]:typeof D[X]=="object"&&typeof a[X]=="object"&&zn.defaults(a[X],D[X])}}),a}static same(a,g){if(typeof a!="object")return a==g;if(typeof a!=typeof g||Object.keys(a).length!==Object.keys(g).length)return!1;for(const D in a)if(a[D]!==g[D])return!1;return!0}static copyPos(a,g,D=!1){return g.x!==void 0&&(a.x=g.x),g.y!==void 0&&(a.y=g.y),g.w!==void 0&&(a.w=g.w),g.h!==void 0&&(a.h=g.h),D&&(g.minW&&(a.minW=g.minW),g.minH&&(a.minH=g.minH),g.maxW&&(a.maxW=g.maxW),g.maxH&&(a.maxH=g.maxH)),a}static samePos(a,g){return a&&g&&a.x===g.x&&a.y===g.y&&(a.w||1)===(g.w||1)&&(a.h||1)===(g.h||1)}static sanitizeMinMax(a){a.minW||delete a.minW,a.minH||delete a.minH,a.maxW||delete a.maxW,a.maxH||delete a.maxH}static removeInternalAndSame(a,g){if(!(typeof a!="object"||typeof g!="object"))for(let D in a){const X=a[D],A=g[D];D[0]==="_"||X===A?delete a[D]:X&&typeof X=="object"&&A!==void 0&&(zn.removeInternalAndSame(X,A),Object.keys(X).length||delete a[D])}}static removeInternalForSave(a,g=!0){for(let D in a)(D[0]==="_"||a[D]===null||a[D]===void 0)&&delete a[D];delete a.grid,g&&delete a.el,a.autoPosition||delete a.autoPosition,a.noResize||delete a.noResize,a.noMove||delete a.noMove,a.locked||delete a.locked,(a.w===1||a.w===a.minW)&&delete a.w,(a.h===1||a.h===a.minH)&&delete a.h}static throttle(a,g){let D=!1;return(...X)=>{D||(D=!0,setTimeout(()=>{a(...X),D=!1},g))}}static removePositioningStyles(a){const g=a.style;g.position&&g.removeProperty("position"),g.left&&g.removeProperty("left"),g.top&&g.removeProperty("top"),g.width&&g.removeProperty("width"),g.height&&g.removeProperty("height")}static getScrollElement(a){if(!a)return document.scrollingElement||document.documentElement;const g=getComputedStyle(a);return/(auto|scroll)/.test(g.overflow+g.overflowY)?a:zn.getScrollElement(a.parentElement)}static updateScrollPosition(a,g,D){const X=zn.getScrollElement(a);if(!X)return;const A=a.getBoundingClientRect(),b=X.getBoundingClientRect(),e=window.innerHeight||document.documentElement.clientHeight,v=A.bottom-Math.min(b.bottom,e),u=A.top-Math.max(b.top,0),t=X.scrollTop;u<0&&D<0?a.offsetHeight>b.height?X.scrollTop+=D:X.scrollTop+=Math.abs(u)>Math.abs(D)?D:u:v>0&&D>0&&(a.offsetHeight>b.height?X.scrollTop+=D:X.scrollTop+=v>D?D:v),g.top+=X.scrollTop-t}static updateScrollResize(a,g,D){const X=zn.getScrollElement(g),A=X.clientHeight,b=X===zn.getScrollElement()?0:X.getBoundingClientRect().top,e=a.clientY-b,v=e<D,u=e>A-D;v?X.scrollBy({behavior:"smooth",top:e-D}):u&&X.scrollBy({behavior:"smooth",top:D-(A-e)})}static clone(a){return a==null||typeof a!="object"?a:a instanceof Array?[...a]:{...a}}static cloneDeep(a){const g=["parentGrid","el","grid","subGrid","engine"],D=zn.clone(a);for(const X in D)D.hasOwnProperty(X)&&typeof D[X]=="object"&&X.substring(0,2)!=="__"&&!g.find(A=>A===X)&&(D[X]=zn.cloneDeep(a[X]));return D}static cloneNode(a){const g=a.cloneNode(!0);return g.removeAttribute("id"),g}static appendTo(a,g){let D;typeof g=="string"?D=zn.getElement(g):D=g,D&&D.appendChild(a)}static addElStyles(a,g){if(g instanceof Object)for(const D in g)g.hasOwnProperty(D)&&(Array.isArray(g[D])?g[D].forEach(X=>{a.style[D]=X}):a.style[D]=g[D])}static initEvent(a,g){const D={type:g.type},X={button:0,which:0,buttons:1,bubbles:!0,cancelable:!0,target:g.target?g.target:a.target};return["altKey","ctrlKey","metaKey","shiftKey"].forEach(A=>D[A]=a[A]),["pageX","pageY","clientX","clientY","screenX","screenY"].forEach(A=>D[A]=a[A]),{...D,...X}}static simulateMouseEvent(a,g,D){const X=a,A=new MouseEvent(g,{bubbles:!0,composed:!0,cancelable:!0,view:window,detail:1,screenX:a.screenX,screenY:a.screenY,clientX:a.clientX,clientY:a.clientY,ctrlKey:X.ctrlKey??!1,altKey:X.altKey??!1,shiftKey:X.shiftKey??!1,metaKey:X.metaKey??!1,button:0,relatedTarget:a.target});(D||a.target).dispatchEvent(A)}static getValuesFromTransformedElement(a){const g=document.createElement("div");zn.addElStyles(g,{opacity:"0",position:"fixed",top:"0px",left:"0px",width:"1px",height:"1px",zIndex:"-999999"}),a.appendChild(g);const D=g.getBoundingClientRect();return a.removeChild(g),g.remove(),{xScale:1/D.width,yScale:1/D.height,xOffset:D.left,yOffset:D.top}}static swap(a,g,D){if(!a)return;const X=a[g];a[g]=a[D],a[D]=X}static canBeRotated(a){var g;return!(!a||a.w===a.h||a.locked||a.noResize||(g=a.grid)!=null&&g.opts.disableResize||a.minW&&a.minW===a.maxW||a.minH&&a.minH===a.maxH)}}class Dd{constructor(a={}){this.addedNodes=[],this.removedNodes=[],this.defaultColumn=12,this.column=a.column||this.defaultColumn,this.column>this.defaultColumn&&(this.defaultColumn=this.column),this.maxRow=a.maxRow,this._float=a.float,this.nodes=a.nodes||[],this.onChange=a.onChange}batchUpdate(a=!0,g=!0){return!!this.batchMode===a?this:(this.batchMode=a,a?(this._prevFloat=this._float,this._float=!0,this.cleanNodes(),this.saveInitial()):(this._float=this._prevFloat,delete this._prevFloat,g&&this._packNodes(),this._notify()),this)}_useEntireRowArea(a,g){return(!this.float||this.batchMode&&!this._prevFloat)&&!this._hasLocked&&(!a._moving||a._skipDown||g.y<=a.y)}_fixCollisions(a,g=a,D,X={}){if(this.sortNodes(-1),D=D||this.collide(a,g),!D)return!1;if(a._moving&&!X.nested&&!this.float&&this.swap(a,D))return!0;let A=g;!this._loading&&this._useEntireRowArea(a,g)&&(A={x:0,w:this.column,y:g.y,h:g.h},D=this.collide(a,A,X.skip));let b=!1;const e={nested:!0,pack:!1};let v=0;for(;D=D||this.collide(a,A,X.skip);){if(v++>this.nodes.length*2)throw new Error("Infinite collide check");let u;if(D.locked||this._loading||a._moving&&!a._skipDown&&g.y>a.y&&!this.float&&(!this.collide(D,{...D,y:a.y},a)||!this.collide(D,{...D,y:g.y-D.h},a))){a._skipDown=a._skipDown||g.y>a.y;const t={...g,y:D.y+D.h,...e};u=this._loading&&zn.samePos(a,t)?!0:this.moveNode(a,t),(D.locked||this._loading)&&u?zn.copyPos(g,a):!D.locked&&u&&X.pack&&(this._packNodes(),g.y=D.y+D.h,zn.copyPos(a,g)),b=b||u}else u=this.moveNode(D,{...D,y:g.y+g.h,skip:a,...e});if(!u)return b;D=void 0}return b}collide(a,g=a,D){const X=a._id,A=D==null?void 0:D._id;return this.nodes.find(b=>b._id!==X&&b._id!==A&&zn.isIntercepted(b,g))}collideAll(a,g=a,D){const X=a._id,A=D==null?void 0:D._id;return this.nodes.filter(b=>b._id!==X&&b._id!==A&&zn.isIntercepted(b,g))}directionCollideCoverage(a,g,D){if(!g.rect||!a._rect)return;const X=a._rect,A={...g.rect};A.y>X.y?(A.h+=A.y-X.y,A.y=X.y):A.h+=X.y-A.y,A.x>X.x?(A.w+=A.x-X.x,A.x=X.x):A.w+=X.x-A.x;let b,e=.5;for(let v of D){if(v.locked||!v._rect)break;const u=v._rect;let t=Number.MAX_VALUE,w=Number.MAX_VALUE;X.y<u.y?t=(A.y+A.h-u.y)/u.h:X.y+X.h>u.y+u.h&&(t=(u.y+u.h-A.y)/u.h),X.x<u.x?w=(A.x+A.w-u.x)/u.w:X.x+X.w>u.x+u.w&&(w=(u.x+u.w-A.x)/u.w);const y=Math.min(w,t);y>e&&(e=y,b=v)}return g.collide=b,b}cacheRects(a,g,D,X,A,b){return this.nodes.forEach(e=>e._rect={y:e.y*g+D,x:e.x*a+b,w:e.w*a-b-X,h:e.h*g-D-A}),this}swap(a,g){if(!g||g.locked||!a||a.locked)return!1;function D(){const A=g.x,b=g.y;return g.x=a.x,g.y=a.y,a.h!=g.h?(a.x=A,a.y=g.y+g.h):a.w!=g.w?(a.x=g.x+g.w,a.y=b):(a.x=A,a.y=b),a._dirty=g._dirty=!0,!0}let X;if(a.w===g.w&&a.h===g.h&&(a.x===g.x||a.y===g.y)&&(X=zn.isTouching(a,g)))return D();if(X!==!1){if(a.w===g.w&&a.x===g.x&&(X||(X=zn.isTouching(a,g)))){if(g.y<a.y){const A=a;a=g,g=A}return D()}if(X!==!1){if(a.h===g.h&&a.y===g.y&&(X||(X=zn.isTouching(a,g)))){if(g.x<a.x){const A=a;a=g,g=A}return D()}return!1}}}isAreaEmpty(a,g,D,X){const A={x:a||0,y:g||0,w:D||1,h:X||1};return!this.collide(A)}compact(a="compact",g=!0){if(this.nodes.length===0)return this;g&&this.sortNodes();const D=this.batchMode;D||this.batchUpdate();const X=this._inColumnResize;X||(this._inColumnResize=!0);const A=this.nodes;return this.nodes=[],A.forEach((b,e,v)=>{let u;b.locked||(b.autoPosition=!0,a==="list"&&e&&(u=v[e-1])),this.addNode(b,!1,u)}),X||delete this._inColumnResize,D||this.batchUpdate(!1),this}set float(a){this._float!==a&&(this._float=a||!1,a||this._packNodes()._notify())}get float(){return this._float||!1}sortNodes(a=1){return this.nodes=zn.sort(this.nodes,a),this}_packNodes(){return this.batchMode?this:(this.sortNodes(),this.float?this.nodes.forEach(a=>{if(a._updating||a._orig===void 0||a.y===a._orig.y)return;let g=a.y;for(;g>a._orig.y;)--g,this.collide(a,{x:a.x,y:g,w:a.w,h:a.h})||(a._dirty=!0,a.y=g)}):this.nodes.forEach((a,g)=>{if(!a.locked)for(;a.y>0;){const D=g===0?0:a.y-1;if(!(g===0||!this.collide(a,{x:a.x,y:D,w:a.w,h:a.h})))break;a._dirty=a.y!==D,a.y=D}}),this)}prepareNode(a,g){a._id=a._id??Dd._idSeq++;const D=a.id;if(D){let A=1;for(;this.nodes.find(b=>b.id===a.id&&b!==a);)a.id=D+"_"+A++}(a.x===void 0||a.y===void 0||a.x===null||a.y===null)&&(a.autoPosition=!0);const X={x:0,y:0,w:1,h:1};return zn.defaults(a,X),a.autoPosition||delete a.autoPosition,a.noResize||delete a.noResize,a.noMove||delete a.noMove,zn.sanitizeMinMax(a),typeof a.x=="string"&&(a.x=Number(a.x)),typeof a.y=="string"&&(a.y=Number(a.y)),typeof a.w=="string"&&(a.w=Number(a.w)),typeof a.h=="string"&&(a.h=Number(a.h)),isNaN(a.x)&&(a.x=X.x,a.autoPosition=!0),isNaN(a.y)&&(a.y=X.y,a.autoPosition=!0),isNaN(a.w)&&(a.w=X.w),isNaN(a.h)&&(a.h=X.h),this.nodeBoundFix(a,g),a}nodeBoundFix(a,g){const D=a._orig||zn.copyPos({},a);if(a.maxW&&(a.w=Math.min(a.w||1,a.maxW)),a.maxH&&(a.h=Math.min(a.h||1,a.maxH)),a.minW&&(a.w=Math.max(a.w||1,a.minW)),a.minH&&(a.h=Math.max(a.h||1,a.minH)),(a.x||0)+(a.w||1)>this.column&&this.column<this.defaultColumn&&!this._inColumnResize&&!this.skipCacheUpdate&&a._id!=null&&this.findCacheLayout(a,this.defaultColumn)===-1){const X={...a};X.autoPosition||X.x===void 0?(delete X.x,delete X.y):X.x=Math.min(this.defaultColumn-1,X.x),X.w=Math.min(this.defaultColumn,X.w||1),this.cacheOneLayout(X,this.defaultColumn)}return a.w>this.column?a.w=this.column:a.w<1&&(a.w=1),this.maxRow&&a.h>this.maxRow?a.h=this.maxRow:a.h<1&&(a.h=1),a.x<0&&(a.x=0),a.y<0&&(a.y=0),a.x+a.w>this.column&&(g?a.w=this.column-a.x:a.x=this.column-a.w),this.maxRow&&a.y+a.h>this.maxRow&&(g?a.h=this.maxRow-a.y:a.y=this.maxRow-a.h),zn.samePos(a,D)||(a._dirty=!0),this}getDirtyNodes(a){return a?this.nodes.filter(g=>g._dirty&&!zn.samePos(g,g._orig)):this.nodes.filter(g=>g._dirty)}_notify(a){if(this.batchMode||!this.onChange)return this;const g=(a||[]).concat(this.getDirtyNodes());return this.onChange(g),this}cleanNodes(){return this.batchMode?this:(this.nodes.forEach(a=>{delete a._dirty,delete a._lastTried}),this)}saveInitial(){return this.nodes.forEach(a=>{a._orig=zn.copyPos({},a),delete a._dirty}),this._hasLocked=this.nodes.some(a=>a.locked),this}restoreInitial(){return this.nodes.forEach(a=>{!a._orig||zn.samePos(a,a._orig)||(zn.copyPos(a,a._orig),a._dirty=!0)}),this._notify(),this}findEmptyPosition(a,g=this.nodes,D=this.column,X){const A=X?X.y*D+(X.x+X.w):0;let b=!1;for(let e=A;!b;++e){const v=e%D,u=Math.floor(e/D);if(v+a.w>D)continue;const t={x:v,y:u,w:a.w,h:a.h};g.find(w=>zn.isIntercepted(t,w))||((a.x!==v||a.y!==u)&&(a._dirty=!0),a.x=v,a.y=u,delete a.autoPosition,b=!0)}return b}addNode(a,g=!1,D){const X=this.nodes.find(b=>b._id===a._id);if(X)return X;this._inColumnResize?this.nodeBoundFix(a):this.prepareNode(a),delete a._temporaryRemoved,delete a._removeDOM;let A;return a.autoPosition&&this.findEmptyPosition(a,this.nodes,this.column,D)&&(delete a.autoPosition,A=!0),this.nodes.push(a),g&&this.addedNodes.push(a),A||this._fixCollisions(a),this.batchMode||this._packNodes()._notify(),a}removeNode(a,g=!0,D=!1){return this.nodes.find(X=>X._id===a._id)?(D&&this.removedNodes.push(a),g&&(a._removeDOM=!0),this.nodes=this.nodes.filter(X=>X._id!==a._id),a._isAboutToRemove||this._packNodes(),this._notify([a]),this):this}removeAll(a=!0,g=!0){if(delete this._layouts,!this.nodes.length)return this;a&&this.nodes.forEach(X=>X._removeDOM=!0);const D=this.nodes;return this.removedNodes=g?D:[],this.nodes=[],this._notify(D)}moveNodeCheck(a,g){if(!this.changedPosConstrain(a,g))return!1;if(g.pack=!0,!this.maxRow)return this.moveNode(a,g);let D;const X=new Dd({column:this.column,float:this.float,nodes:this.nodes.map(b=>b._id===a._id?(D={...b},D):{...b})});if(!D)return!1;const A=X.moveNode(D,g)&&X.getRow()<=Math.max(this.getRow(),this.maxRow);if(!A&&!g.resizing&&g.collide){const b=g.collide.el.gridstackNode;if(this.swap(a,b))return this._notify(),!0}return A?(X.nodes.filter(b=>b._dirty).forEach(b=>{const e=this.nodes.find(v=>v._id===b._id);e&&(zn.copyPos(e,b),e._dirty=!0)}),this._notify(),!0):!1}willItFit(a){if(delete a._willFitPos,!this.maxRow)return!0;const g=new Dd({column:this.column,float:this.float,nodes:this.nodes.map(X=>({...X}))}),D={...a};return this.cleanupNode(D),delete D.el,delete D._id,delete D.content,delete D.grid,g.addNode(D),g.getRow()<=this.maxRow?(a._willFitPos=zn.copyPos({},D),!0):!1}changedPosConstrain(a,g){return g.w=g.w||a.w,g.h=g.h||a.h,a.x!==g.x||a.y!==g.y?!0:(a.maxW&&(g.w=Math.min(g.w,a.maxW)),a.maxH&&(g.h=Math.min(g.h,a.maxH)),a.minW&&(g.w=Math.max(g.w,a.minW)),a.minH&&(g.h=Math.max(g.h,a.minH)),a.w!==g.w||a.h!==g.h)}moveNode(a,g){var D,X;if(!a||!g)return!1;let A;g.pack===void 0&&!this.batchMode&&(A=g.pack=!0),typeof g.x!="number"&&(g.x=a.x),typeof g.y!="number"&&(g.y=a.y),typeof g.w!="number"&&(g.w=a.w),typeof g.h!="number"&&(g.h=a.h);const b=a.w!==g.w||a.h!==g.h,e=zn.copyPos({},a,!0);if(zn.copyPos(e,g),this.nodeBoundFix(e,b),zn.copyPos(g,e),!g.forceCollide&&zn.samePos(a,g))return!1;const v=zn.copyPos({},a),u=this.collideAll(a,e,g.skip);let t=!0;if(u.length){const w=a._moving&&!g.nested;let y=w?this.directionCollideCoverage(a,g,u):u[0];if(w&&y&&(X=(D=a.grid)==null?void 0:D.opts)!=null&&X.subGridDynamic&&!a.grid._isTemp){const x=zn.areaIntercept(g.rect,y._rect),p=zn.area(g.rect),n=zn.area(y._rect);x/(p<n?p:n)>.8&&(y.grid.makeSubGrid(y.el,void 0,a),y=void 0)}y?t=!this._fixCollisions(a,e,y,g):(t=!1,A&&delete g.pack)}return t&&!zn.samePos(a,e)&&(a._dirty=!0,zn.copyPos(a,e)),g.pack&&this._packNodes()._notify(),!zn.samePos(a,v)}getRow(){return this.nodes.reduce((a,g)=>Math.max(a,g.y+g.h),0)}beginUpdate(a){return a._updating||(a._updating=!0,delete a._skipDown,this.batchMode||this.saveInitial()),this}endUpdate(){const a=this.nodes.find(g=>g._updating);return a&&(delete a._updating,delete a._skipDown),this}save(a=!0,g,D){var X;const A=((X=this._layouts)==null?void 0:X.length)||0;let b;A&&(D?D!==this.column&&(b=this._layouts[D]):this.column!==A-1&&(b=this._layouts[A-1]));const e=[];return this.sortNodes(),this.nodes.forEach(v=>{const u=b==null?void 0:b.find(w=>w._id===v._id),t={...v,...u||{}};zn.removeInternalForSave(t,!a),g&&g(v,t),e.push(t)}),e}layoutsNodesChange(a){return!this._layouts||this._inColumnResize?this:(this._layouts.forEach((g,D)=>{if(!g||D===this.column)return this;if(D<this.column)this._layouts[D]=void 0;else{const X=D/this.column;a.forEach(A=>{if(!A._orig)return;const b=g.find(e=>e._id===A._id);b&&(b.y>=0&&A.y!==A._orig.y&&(b.y+=A.y-A._orig.y),A.x!==A._orig.x&&(b.x=Math.round(A.x*X)),A.w!==A._orig.w&&(b.w=Math.round(A.w*X)))})}}),this)}columnChanged(a,g,D="moveScale"){var X;if(!this.nodes.length||!g||a===g)return this;const A=D==="compact"||D==="list";A&&this.sortNodes(1),g<a&&this.cacheLayout(this.nodes,a),this.batchUpdate();let b=[],e=A?this.nodes:zn.sort(this.nodes,-1);if(g>a&&this._layouts){const v=this._layouts[g]||[],u=this._layouts.length-1;!v.length&&a!==u&&(X=this._layouts[u])!=null&&X.length&&(a=u,this._layouts[u].forEach(t=>{const w=e.find(y=>y._id===t._id);w&&(!A&&!t.autoPosition&&(w.x=t.x??w.x,w.y=t.y??w.y),w.w=t.w??w.w,(t.x==null||t.y===void 0)&&(w.autoPosition=!0))})),v.forEach(t=>{const w=e.findIndex(y=>y._id===t._id);if(w!==-1){const y=e[w];if(A){y.w=t.w;return}(t.autoPosition||isNaN(t.x)||isNaN(t.y))&&this.findEmptyPosition(t,b),t.autoPosition||(y.x=t.x??y.x,y.y=t.y??y.y,y.w=t.w??y.w,b.push(y)),e.splice(w,1)}})}if(A)this.compact(D,!1);else{if(e.length)if(typeof D=="function")D(g,a,b,e);else{const v=A||D==="none"?1:g/a,u=D==="move"||D==="moveScale",t=D==="scale"||D==="moveScale";e.forEach(w=>{w.x=g===1?0:u?Math.round(w.x*v):Math.min(w.x,g-1),w.w=g===1||a===1?1:t?Math.round(w.w*v)||1:Math.min(w.w,g),b.push(w)}),e=[]}b=zn.sort(b,-1),this._inColumnResize=!0,this.nodes=[],b.forEach(v=>{this.addNode(v,!1),delete v._orig})}return this.nodes.forEach(v=>delete v._orig),this.batchUpdate(!1,!A),delete this._inColumnResize,this}cacheLayout(a,g,D=!1){const X=[];return a.forEach((A,b)=>{if(A._id===void 0){const e=A.id?this.nodes.find(v=>v.id===A.id):void 0;A._id=(e==null?void 0:e._id)??Dd._idSeq++}X[b]={x:A.x,y:A.y,w:A.w,_id:A._id}}),this._layouts=D?[]:this._layouts||[],this._layouts[g]=X,this}cacheOneLayout(a,g){a._id=a._id??Dd._idSeq++;const D={x:a.x,y:a.y,w:a.w,_id:a._id};(a.autoPosition||a.x===void 0)&&(delete D.x,delete D.y,a.autoPosition&&(D.autoPosition=!0)),this._layouts=this._layouts||[],this._layouts[g]=this._layouts[g]||[];const X=this.findCacheLayout(a,g);return X===-1?this._layouts[g].push(D):this._layouts[g][X]=D,this}findCacheLayout(a,g){var D,X;return((X=(D=this._layouts)==null?void 0:D[g])==null?void 0:X.findIndex(A=>A._id===a._id))??-1}removeNodeFromLayoutCache(a){if(this._layouts)for(let g=0;g<this._layouts.length;g++){const D=this.findCacheLayout(a,g);D!==-1&&this._layouts[g].splice(D,1)}}cleanupNode(a){for(const g in a)g[0]==="_"&&g!=="_id"&&delete a[g];return this}}Dd._idSeq=0;const Mu={alwaysShowResizeHandle:"mobile",animate:!0,auto:!0,cellHeight:"auto",cellHeightThrottle:100,cellHeightUnit:"px",column:12,draggable:{handle:".grid-stack-item-content",appendTo:"body",scroll:!0},handle:".grid-stack-item-content",itemClass:"grid-stack-item",margin:10,marginUnit:"px",maxRow:0,minRow:0,placeholderClass:"grid-stack-placeholder",placeholderText:"",removableOptions:{accept:"grid-stack-item",decline:"grid-stack-non-removable"},resizable:{handles:"se"},rtl:"auto"};class Zi{}const $u=typeof window<"u"&&typeof document<"u"&&("ontouchstart"in document||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0);class _d{}function $g(r,a){r.touches.length>1||(r.cancelable&&r.preventDefault(),zn.simulateMouseEvent(r.changedTouches[0],a))}function I6(r,a){r.cancelable&&r.preventDefault(),zn.simulateMouseEvent(r,a)}function ey(r){_d.touchHandled||(_d.touchHandled=!0,$g(r,"mousedown"))}function ty(r){_d.touchHandled&&$g(r,"mousemove")}function ry(r){if(!_d.touchHandled)return;_d.pointerLeaveTimeout&&(window.clearTimeout(_d.pointerLeaveTimeout),delete _d.pointerLeaveTimeout);const a=!!Zi.dragElement;$g(r,"mouseup"),a||$g(r,"click"),_d.touchHandled=!1}function ny(r){r.pointerType!=="mouse"&&r.target.releasePointerCapture(r.pointerId)}function P6(r){Zi.dragElement&&r.pointerType!=="mouse"&&I6(r,"mouseenter")}function O6(r){Zi.dragElement&&r.pointerType!=="mouse"&&(_d.pointerLeaveTimeout=window.setTimeout(()=>{delete _d.pointerLeaveTimeout,I6(r,"mouseleave")},10))}class iy{constructor(a,g,D){this.host=a,this.dir=g,this.option=D,this.moving=!1,this._mouseDown=this._mouseDown.bind(this),this._mouseMove=this._mouseMove.bind(this),this._mouseUp=this._mouseUp.bind(this),this._keyEvent=this._keyEvent.bind(this),this._init()}_init(){const a=this.el=document.createElement("div");return a.classList.add("ui-resizable-handle"),a.classList.add(`${iy.prefix}${this.dir}`),a.style.zIndex="100",a.style.userSelect="none",this.host.appendChild(this.el),this.el.addEventListener("mousedown",this._mouseDown),$u&&(this.el.addEventListener("touchstart",ey),this.el.addEventListener("pointerdown",ny)),this}destroy(){return this.moving&&this._mouseUp(this.mouseDownEvent),this.el.removeEventListener("mousedown",this._mouseDown),$u&&(this.el.removeEventListener("touchstart",ey),this.el.removeEventListener("pointerdown",ny)),this.host.removeChild(this.el),delete this.el,delete this.host,this}_mouseDown(a){this.mouseDownEvent=a,document.addEventListener("mousemove",this._mouseMove,{capture:!0,passive:!0}),document.addEventListener("mouseup",this._mouseUp,!0),$u&&(this.el.addEventListener("touchmove",ty),this.el.addEventListener("touchend",ry)),a.stopPropagation(),a.preventDefault()}_mouseMove(a){const g=this.mouseDownEvent;this.moving?this._triggerEvent("move",a):Math.abs(a.x-g.x)+Math.abs(a.y-g.y)>2&&(this.moving=!0,this._triggerEvent("start",this.mouseDownEvent),this._triggerEvent("move",a),document.addEventListener("keydown",this._keyEvent)),a.stopPropagation()}_mouseUp(a){this.moving&&(this._triggerEvent("stop",a),document.removeEventListener("keydown",this._keyEvent)),document.removeEventListener("mousemove",this._mouseMove,!0),document.removeEventListener("mouseup",this._mouseUp,!0),$u&&(this.el.removeEventListener("touchmove",ty),this.el.removeEventListener("touchend",ry)),delete this.moving,delete this.mouseDownEvent,a.stopPropagation(),a.preventDefault()}_keyEvent(a){var g,D;a.key==="Escape"&&((D=(g=this.host.gridstackNode)==null?void 0:g.grid)==null||D.engine.restoreInitial(),this._mouseUp(this.mouseDownEvent))}_triggerEvent(a,g){return this.option[a]&&this.option[a](g),this}}iy.prefix="ui-resizable-";class W2{constructor(){this._eventRegister={}}get disabled(){return this._disabled}on(a,g){this._eventRegister[a]=g}off(a){delete this._eventRegister[a]}enable(){this._disabled=!1}disable(){this._disabled=!0}destroy(){delete this._eventRegister}triggerEvent(a,g){if(!this.disabled&&this._eventRegister&&this._eventRegister[a])return this._eventRegister[a](g)}}class rm extends W2{constructor(a,g={}){super(),this.el=a,this.option=g,this.rectScale={x:1,y:1},this._ui=()=>{const D=this.el.parentElement.getBoundingClientRect(),X={width:this.originalRect.width,height:this.originalRect.height+this.scrolled,left:this.originalRect.left,top:this.originalRect.top-this.scrolled},A=this.temporalRect||X;return{position:{left:(A.left-D.left)*this.rectScale.x,top:(A.top-D.top)*this.rectScale.y},size:{width:A.width*this.rectScale.x,height:A.height*this.rectScale.y}}},this._mouseOver=this._mouseOver.bind(this),this._mouseOut=this._mouseOut.bind(this),this.enable(),this._setupAutoHide(this.option.autoHide),this._setupHandlers()}on(a,g){super.on(a,g)}off(a){super.off(a)}enable(){super.enable(),this.el.classList.remove("ui-resizable-disabled"),this._setupAutoHide(this.option.autoHide)}disable(){super.disable(),this.el.classList.add("ui-resizable-disabled"),this._setupAutoHide(!1)}destroy(){this._removeHandlers(),this._setupAutoHide(!1),delete this.el,super.destroy()}updateOption(a){const g=a.handles&&a.handles!==this.option.handles,D=a.autoHide&&a.autoHide!==this.option.autoHide;return Object.keys(a).forEach(X=>this.option[X]=a[X]),g&&(this._removeHandlers(),this._setupHandlers()),D&&this._setupAutoHide(this.option.autoHide),this}_setupAutoHide(a){return a?(this.el.classList.add("ui-resizable-autohide"),this.el.addEventListener("mouseover",this._mouseOver),this.el.addEventListener("mouseout",this._mouseOut)):(this.el.classList.remove("ui-resizable-autohide"),this.el.removeEventListener("mouseover",this._mouseOver),this.el.removeEventListener("mouseout",this._mouseOut),Zi.overResizeElement===this&&delete Zi.overResizeElement),this}_mouseOver(a){Zi.overResizeElement||Zi.dragElement||(Zi.overResizeElement=this,this.el.classList.remove("ui-resizable-autohide"))}_mouseOut(a){Zi.overResizeElement===this&&(delete Zi.overResizeElement,this.el.classList.add("ui-resizable-autohide"))}_setupHandlers(){return this.handlers=this.option.handles.split(",").map(a=>a.trim()).map(a=>new iy(this.el,a,{start:g=>{this._resizeStart(g)},stop:g=>{this._resizeStop(g)},move:g=>{this._resizing(g,a)}})),this}_resizeStart(a){this.sizeToContent=zn.shouldSizeToContent(this.el.gridstackNode,!0),this.originalRect=this.el.getBoundingClientRect(),this.scrollEl=zn.getScrollElement(this.el),this.scrollY=this.scrollEl.scrollTop,this.scrolled=0,this.startEvent=a,this._setupHelper(),this._applyChange();const g=zn.initEvent(a,{type:"resizestart",target:this.el});return this.option.start&&this.option.start(g,this._ui()),this.el.classList.add("ui-resizable-resizing"),this.triggerEvent("resizestart",g),this}_resizing(a,g){this.scrolled=this.scrollEl.scrollTop-this.scrollY,this.temporalRect=this._getChange(a,g),this._applyChange();const D=zn.initEvent(a,{type:"resize",target:this.el});return this.option.resize&&this.option.resize(D,this._ui()),this.triggerEvent("resize",D),this}_resizeStop(a){const g=zn.initEvent(a,{type:"resizestop",target:this.el});return this._cleanHelper(),this.option.stop&&this.option.stop(g),this.el.classList.remove("ui-resizable-resizing"),this.triggerEvent("resizestop",g),delete this.startEvent,delete this.originalRect,delete this.temporalRect,delete this.scrollY,delete this.scrolled,this}_setupHelper(){this.elOriginStyleVal=rm._originStyleProp.map(D=>this.el.style[D]),this.parentOriginStylePosition=this.el.parentElement.style.position;const a=this.el.parentElement,g=zn.getValuesFromTransformedElement(a);return this.rectScale={x:g.xScale,y:g.yScale},getComputedStyle(this.el.parentElement).position.match(/static/)&&(this.el.parentElement.style.position="relative"),this.el.style.position="absolute",this.el.style.opacity="0.8",this}_cleanHelper(){return rm._originStyleProp.forEach((a,g)=>{this.el.style[a]=this.elOriginStyleVal[g]||null}),this.el.parentElement.style.position=this.parentOriginStylePosition||null,this}_getChange(a,g){const D=this.startEvent,X={width:this.originalRect.width,height:this.originalRect.height+this.scrolled,left:this.originalRect.left,top:this.originalRect.top-this.scrolled},A=a.clientX-D.clientX,b=this.sizeToContent?0:a.clientY-D.clientY;let e,v;g.indexOf("e")>-1?X.width+=A:g.indexOf("w")>-1&&(X.width-=A,X.left+=A,e=!0),g.indexOf("s")>-1?X.height+=b:g.indexOf("n")>-1&&(X.height-=b,X.top+=b,v=!0);const u=this._constrainSize(X.width,X.height,e,v);return Math.round(X.width)!==Math.round(u.width)&&(g.indexOf("w")>-1&&(X.left+=X.width-u.width),X.width=u.width),Math.round(X.height)!==Math.round(u.height)&&(g.indexOf("n")>-1&&(X.top+=X.height-u.height),X.height=u.height),X}_constrainSize(a,g,D,X){const A=this.option,b=(D?A.maxWidthMoveLeft:A.maxWidth)||Number.MAX_SAFE_INTEGER,e=A.minWidth/this.rectScale.x||a,v=(X?A.maxHeightMoveUp:A.maxHeight)||Number.MAX_SAFE_INTEGER,u=A.minHeight/this.rectScale.y||g,t=Math.min(b,Math.max(e,a)),w=Math.min(v,Math.max(u,g));return{width:t,height:w}}_applyChange(){let a={left:0,top:0,width:0,height:0};if(this.el.style.position==="absolute"){const g=this.el.parentElement,{left:D,top:X}=g.getBoundingClientRect();a={left:D,top:X,width:0,height:0}}return this.temporalRect?(Object.keys(this.temporalRect).forEach(g=>{const D=this.temporalRect[g],X=g==="width"||g==="left"?this.rectScale.x:g==="height"||g==="top"?this.rectScale.y:1;this.el.style[g]=(D-a[g])*X+"px"}),this):this}_removeHandlers(){return this.handlers.forEach(a=>a.destroy()),delete this.handlers,this}}rm._originStyleProp=["width","height","position","left","top","opacity","zIndex"];const Pse='input,textarea,button,select,option,[contenteditable="true"],.ui-resizable-handle';class nm extends W2{constructor(a,g={}){var D;super(),this.el=a,this.option=g,this.dragTransform={xScale:1,yScale:1,xOffset:0,yOffset:0};const X=(D=g==null?void 0:g.handle)==null?void 0:D.substring(1),A=a.gridstackNode;this.dragEls=!X||a.classList.contains(X)?[a]:A!=null&&A.subGrid?[a.querySelector(g.handle)||a]:Array.from(a.querySelectorAll(g.handle)),this.dragEls.length===0&&(this.dragEls=[a]),this._mouseDown=this._mouseDown.bind(this),this._mouseMove=this._mouseMove.bind(this),this._mouseUp=this._mouseUp.bind(this),this._keyEvent=this._keyEvent.bind(this),this.enable()}on(a,g){super.on(a,g)}off(a){super.off(a)}enable(){this.disabled!==!1&&(super.enable(),this.dragEls.forEach(a=>{a.addEventListener("mousedown",this._mouseDown),$u&&(a.addEventListener("touchstart",ey),a.addEventListener("pointerdown",ny))}),this.el.classList.remove("ui-draggable-disabled"))}disable(a=!1){this.disabled!==!0&&(super.disable(),this.dragEls.forEach(g=>{g.removeEventListener("mousedown",this._mouseDown),$u&&(g.removeEventListener("touchstart",ey),g.removeEventListener("pointerdown",ny))}),a||this.el.classList.add("ui-draggable-disabled"))}destroy(){this.dragTimeout&&window.clearTimeout(this.dragTimeout),delete this.dragTimeout,this.mouseDownEvent&&this._mouseUp(this.mouseDownEvent),this.disable(!0),delete this.el,delete this.helper,delete this.option,super.destroy()}updateOption(a){return Object.keys(a).forEach(g=>this.option[g]=a[g]),this}_mouseDown(a){if(!Zi.mouseHandled)return a.button!==0||!this.dragEls.find(g=>g===a.target)&&a.target.closest(Pse)||this.option.cancel&&a.target.closest(this.option.cancel)||(this.mouseDownEvent=a,delete this.dragging,delete Zi.dragElement,delete Zi.dropElement,document.addEventListener("mousemove",this._mouseMove,{capture:!0,passive:!0}),document.addEventListener("mouseup",this._mouseUp,!0),$u&&(a.currentTarget.addEventListener("touchmove",ty),a.currentTarget.addEventListener("touchend",ry)),a.preventDefault(),document.activeElement&&document.activeElement.blur(),Zi.mouseHandled=!0),!0}_callDrag(a){if(!this.dragging)return;const g=zn.initEvent(a,{target:this.el,type:"drag"});this.option.drag&&this.option.drag(g,this.ui()),this.triggerEvent("drag",g)}_mouseMove(a){var g;const D=this.mouseDownEvent;if(this.lastDrag=a,this.dragging)if(this._dragFollow(a),Zi.pauseDrag){const X=Number.isInteger(Zi.pauseDrag)?Zi.pauseDrag:100;this.dragTimeout&&window.clearTimeout(this.dragTimeout),this.dragTimeout=window.setTimeout(()=>this._callDrag(a),X)}else this._callDrag(a);else if(Math.abs(a.x-D.x)+Math.abs(a.y-D.y)>3){this.dragging=!0,Zi.dragElement=this;const X=(g=this.el.gridstackNode)==null?void 0:g.grid;X?Zi.dropElement=X.el.ddElement.ddDroppable:delete Zi.dropElement,this.helper=this._createHelper(),this._setupHelperContainmentStyle(),this.dragTransform=zn.getValuesFromTransformedElement(this.helperContainment),this.dragOffset=this._getDragOffset(a,this.el,this.helperContainment),this._setupHelperStyle(a);const A=zn.initEvent(a,{target:this.el,type:"dragstart"});this.option.start&&this.option.start(A,this.ui()),this.triggerEvent("dragstart",A),document.addEventListener("keydown",this._keyEvent)}return!0}_mouseUp(a){var g,D;if(document.removeEventListener("mousemove",this._mouseMove,!0),document.removeEventListener("mouseup",this._mouseUp,!0),$u&&a.currentTarget&&(a.currentTarget.removeEventListener("touchmove",ty,!0),a.currentTarget.removeEventListener("touchend",ry,!0)),this.dragging){delete this.dragging,(g=this.el.gridstackNode)==null||delete g._origRotate,document.removeEventListener("keydown",this._keyEvent),((D=Zi.dropElement)==null?void 0:D.el)===this.el.parentElement&&delete Zi.dropElement,this.helperContainment.style.position=this.parentOriginStylePosition||null,this.helper!==this.el&&this.helper.remove(),this._removeHelperStyle();const X=zn.initEvent(a,{target:this.el,type:"dragstop"});this.option.stop&&this.option.stop(X),this.triggerEvent("dragstop",X),Zi.dropElement&&Zi.dropElement.drop(a)}delete this.helper,delete this.mouseDownEvent,delete Zi.dragElement,delete Zi.dropElement,delete Zi.mouseHandled,a.preventDefault()}_keyEvent(a){var g,D;const X=this.el.gridstackNode,A=(X==null?void 0:X.grid)||((D=(g=Zi.dropElement)==null?void 0:g.el)==null?void 0:D.gridstack);if(a.key==="Escape")X&&X._origRotate&&(X._orig=X._origRotate,delete X._origRotate),A==null||A.cancelDrag(),this._mouseUp(this.mouseDownEvent);else if(X&&A&&(a.key==="r"||a.key==="R")){if(!zn.canBeRotated(X))return;X._origRotate=X._origRotate||{...X._orig},delete X._moving,A.setAnimation(!1).rotate(X.el,{top:-this.dragOffset.offsetTop,left:-this.dragOffset.offsetLeft}).setAnimation(),X._moving=!0,this.dragOffset=this._getDragOffset(this.lastDrag,X.el,this.helperContainment),this.helper.style.width=this.dragOffset.width+"px",this.helper.style.height=this.dragOffset.height+"px",zn.swap(X._orig,"w","h"),delete X._rect,this._mouseMove(this.lastDrag)}}_createHelper(){let a=this.el;return typeof this.option.helper=="function"?a=this.option.helper(this.el):this.option.helper==="clone"&&(a=zn.cloneNode(this.el)),a.parentElement||zn.appendTo(a,this.option.appendTo==="parent"?this.el.parentElement:this.option.appendTo),this.dragElementOriginStyle=nm.originStyleProp.map(g=>this.el.style[g]),a}_setupHelperStyle(a){var g,D;this.helper.classList.add("ui-draggable-dragging"),(D=(g=this.el.gridstackNode)==null?void 0:g.grid)==null||D.el.classList.add("grid-stack-dragging");const X=this.helper.style;return X.pointerEvents="none",X.width=this.dragOffset.width+"px",X.height=this.dragOffset.height+"px",X.willChange="left, top",X.position="fixed",this._dragFollow(a),X.transition="none",setTimeout(()=>{this.helper&&(X.transition=null)},0),this}_removeHelperStyle(){var a,g,D;this.helper.classList.remove("ui-draggable-dragging"),(g=(a=this.el.gridstackNode)==null?void 0:a.grid)==null||g.el.classList.remove("grid-stack-dragging");const X=(D=this.helper)==null?void 0:D.gridstackNode;if(!(X!=null&&X._isAboutToRemove)&&this.dragElementOriginStyle){const A=this.helper,b=this.dragElementOriginStyle.transition||null;A.style.transition=this.dragElementOriginStyle.transition="none",nm.originStyleProp.forEach(e=>A.style[e]=this.dragElementOriginStyle[e]||null),setTimeout(()=>A.style.transition=b,50)}return delete this.dragElementOriginStyle,this}_dragFollow(a){const g={left:0,top:0},D=this.helper.style,X=this.dragOffset;D.left=(a.clientX+X.offsetLeft-g.left)*this.dragTransform.xScale+"px",D.top=(a.clientY+X.offsetTop-g.top)*this.dragTransform.yScale+"px"}_setupHelperContainmentStyle(){return this.helperContainment=this.helper.parentElement,this.helper.style.position!=="fixed"&&(this.parentOriginStylePosition=this.helperContainment.style.position,getComputedStyle(this.helperContainment).position.match(/static/)&&(this.helperContainment.style.position="relative")),this}_getDragOffset(a,g,D){let X=0,A=0;D&&(X=this.dragTransform.xOffset,A=this.dragTransform.yOffset);const b=g.getBoundingClientRect();return{left:b.left,top:b.top,offsetLeft:-a.clientX+b.left-X,offsetTop:-a.clientY+b.top-A,width:b.width*this.dragTransform.xScale,height:b.height*this.dragTransform.yScale}}ui(){const a=this.el.parentElement.getBoundingClientRect(),g=this.helper.getBoundingClientRect();return{position:{top:(g.top-a.top)*this.dragTransform.yScale,left:(g.left-a.left)*this.dragTransform.xScale}}}}nm.originStyleProp=["width","height","transform","transform-origin","transition","pointerEvents","position","left","top","minWidth","willChange"];class Ose extends W2{constructor(a,g={}){super(),this.el=a,this.option=g,this._mouseEnter=this._mouseEnter.bind(this),this._mouseLeave=this._mouseLeave.bind(this),this.enable(),this._setupAccept()}on(a,g){super.on(a,g)}off(a){super.off(a)}enable(){this.disabled!==!1&&(super.enable(),this.el.classList.add("ui-droppable"),this.el.classList.remove("ui-droppable-disabled"),this.el.addEventListener("mouseenter",this._mouseEnter),this.el.addEventListener("mouseleave",this._mouseLeave),$u&&(this.el.addEventListener("pointerenter",P6),this.el.addEventListener("pointerleave",O6)))}disable(a=!1){this.disabled!==!0&&(super.disable(),this.el.classList.remove("ui-droppable"),a||this.el.classList.add("ui-droppable-disabled"),this.el.removeEventListener("mouseenter",this._mouseEnter),this.el.removeEventListener("mouseleave",this._mouseLeave),$u&&(this.el.removeEventListener("pointerenter",P6),this.el.removeEventListener("pointerleave",O6)))}destroy(){this.disable(!0),this.el.classList.remove("ui-droppable"),this.el.classList.remove("ui-droppable-disabled"),super.destroy()}updateOption(a){return Object.keys(a).forEach(g=>this.option[g]=a[g]),this._setupAccept(),this}_mouseEnter(a){if(!Zi.dragElement||!this._canDrop(Zi.dragElement.el))return;a.preventDefault(),a.stopPropagation(),Zi.dropElement&&Zi.dropElement!==this&&Zi.dropElement._mouseLeave(a,!0),Zi.dropElement=this;const g=zn.initEvent(a,{target:this.el,type:"dropover"});this.option.over&&this.option.over(g,this._ui(Zi.dragElement)),this.triggerEvent("dropover",g),this.el.classList.add("ui-droppable-over")}_mouseLeave(a,g=!1){var D;if(!Zi.dragElement||Zi.dropElement!==this)return;a.preventDefault(),a.stopPropagation();const X=zn.initEvent(a,{target:this.el,type:"dropout"});if(this.option.out&&this.option.out(X,this._ui(Zi.dragElement)),this.triggerEvent("dropout",X),Zi.dropElement===this&&(delete Zi.dropElement,!g)){let A,b=this.el.parentElement;for(;!A&&b;)A=(D=b.ddElement)==null?void 0:D.ddDroppable,b=b.parentElement;A&&A._mouseEnter(a)}}drop(a){a.preventDefault();const g=zn.initEvent(a,{target:this.el,type:"drop"});this.option.drop&&this.option.drop(g,this._ui(Zi.dragElement)),this.triggerEvent("drop",g)}_canDrop(a){return a&&(!this.accept||this.accept(a))}_setupAccept(){return this.option.accept?(typeof this.option.accept=="string"?this.accept=a=>a.classList.contains(this.option.accept)||a.matches(this.option.accept):this.accept=this.option.accept,this):this}_ui(a){return{draggable:a.el,...a.ui()}}}class G2{static init(a){return a.ddElement||(a.ddElement=new G2(a)),a.ddElement}constructor(a){this.el=a}on(a,g){return this.ddDraggable&&["drag","dragstart","dragstop"].indexOf(a)>-1?this.ddDraggable.on(a,g):this.ddDroppable&&["drop","dropover","dropout"].indexOf(a)>-1?this.ddDroppable.on(a,g):this.ddResizable&&["resizestart","resize","resizestop"].indexOf(a)>-1&&this.ddResizable.on(a,g),this}off(a){return this.ddDraggable&&["drag","dragstart","dragstop"].indexOf(a)>-1?this.ddDraggable.off(a):this.ddDroppable&&["drop","dropover","dropout"].indexOf(a)>-1?this.ddDroppable.off(a):this.ddResizable&&["resizestart","resize","resizestop"].indexOf(a)>-1&&this.ddResizable.off(a),this}setupDraggable(a){return this.ddDraggable?this.ddDraggable.updateOption(a):this.ddDraggable=new nm(this.el,a),this}cleanDraggable(){return this.ddDraggable&&(this.ddDraggable.destroy(),delete this.ddDraggable),this}setupResizable(a){return this.ddResizable?this.ddResizable.updateOption(a):this.ddResizable=new rm(this.el,a),this}cleanResizable(){return this.ddResizable&&(this.ddResizable.destroy(),delete this.ddResizable),this}setupDroppable(a){return this.ddDroppable?this.ddDroppable.updateOption(a):this.ddDroppable=new Ose(this.el,a),this}cleanDroppable(){return this.ddDroppable&&(this.ddDroppable.destroy(),delete this.ddDroppable),this}}class zse{resizable(a,g,D,X){return this._getDDElements(a,g).forEach(A=>{if(g==="disable"||g==="enable")A.ddResizable&&A.ddResizable[g]();else if(g==="destroy")A.ddResizable&&A.cleanResizable();else if(g==="option")A.setupResizable({[D]:X});else{const b=A.el.gridstackNode.grid;let e=A.el.getAttribute("gs-resize-handles")||b.opts.resizable.handles||"e,s,se";e==="all"&&(e="n,e,s,w,se,sw,ne,nw");const v=!b.opts.alwaysShowResizeHandle;A.setupResizable({...b.opts.resizable,handles:e,autoHide:v,start:g.start,stop:g.stop,resize:g.resize})}}),this}draggable(a,g,D,X){return this._getDDElements(a,g).forEach(A=>{if(g==="disable"||g==="enable")A.ddDraggable&&A.ddDraggable[g]();else if(g==="destroy")A.ddDraggable&&A.cleanDraggable();else if(g==="option")A.setupDraggable({[D]:X});else{const b=A.el.gridstackNode.grid;A.setupDraggable({...b.opts.draggable,start:g.start,stop:g.stop,drag:g.drag})}}),this}dragIn(a,g){return this._getDDElements(a).forEach(D=>D.setupDraggable(g)),this}droppable(a,g,D,X){return typeof g.accept=="function"&&!g._accept&&(g._accept=g.accept,g.accept=A=>g._accept(A)),this._getDDElements(a,g).forEach(A=>{g==="disable"||g==="enable"?A.ddDroppable&&A.ddDroppable[g]():g==="destroy"?A.ddDroppable&&A.cleanDroppable():g==="option"?A.setupDroppable({[D]:X}):A.setupDroppable(g)}),this}isDroppable(a){var g;return!!((g=a==null?void 0:a.ddElement)!=null&&g.ddDroppable&&!a.ddElement.ddDroppable.disabled)}isDraggable(a){var g;return!!((g=a==null?void 0:a.ddElement)!=null&&g.ddDraggable&&!a.ddElement.ddDraggable.disabled)}isResizable(a){var g;return!!((g=a==null?void 0:a.ddElement)!=null&&g.ddResizable&&!a.ddElement.ddResizable.disabled)}on(a,g,D){return this._getDDElements(a).forEach(X=>X.on(g,A=>{D(A,Zi.dragElement?Zi.dragElement.el:A.target,Zi.dragElement?Zi.dragElement.helper:null)})),this}off(a,g){return this._getDDElements(a).forEach(D=>D.off(g)),this}_getDDElements(a,g){const D=a.gridstack||g!=="destroy"&&g!=="disable",X=zn.getElements(a);return X.length?X.map(A=>A.ddElement||(D?G2.init(A):null)).filter(A=>A):[]}}/*!
4073
+ `+X):g.stack=X}catch{}}throw g}}_request(r,a){typeof r=="string"?(a=a||{},a.url=r):a=r||{},a=Xp(this.defaults,a);const{transitional:g,paramsSerializer:D,headers:X}=a;g!==void 0&&Kg.assertOptions(g,{silentJSONParsing:bd.transitional(bd.boolean),forcedJSONParsing:bd.transitional(bd.boolean),clarifyTimeoutError:bd.transitional(bd.boolean)},!1),D!=null&&(Gn.isFunction(D)?a.paramsSerializer={serialize:D}:Kg.assertOptions(D,{encode:bd.function,serialize:bd.function},!0)),a.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?a.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:a.allowAbsoluteUrls=!0),Kg.assertOptions(a,{baseUrl:bd.spelling("baseURL"),withXsrfToken:bd.spelling("withXSRFToken")},!0),a.method=(a.method||this.defaults.method||"get").toLowerCase();let A=X&&Gn.merge(X.common,X[a.method]);X&&Gn.forEach(["delete","get","head","post","put","patch","common"],x=>{delete X[x]}),a.headers=hu.concat(A,X);const b=[];let e=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(a)===!1||(e=e&&x.synchronous,b.unshift(x.fulfilled,x.rejected))});const v=[];this.interceptors.response.forEach(function(x){v.push(x.fulfilled,x.rejected)});let u,t=0,w;if(!e){const x=[d6.bind(this),void 0];for(x.unshift(...b),x.push(...v),w=x.length,u=Promise.resolve(a);t<w;)u=u.then(x[t++],x[t++]);return u}w=b.length;let y=a;for(t=0;t<w;){const x=b[t++],p=b[t++];try{y=x(y)}catch(n){p.call(this,n);break}}try{u=d6.call(this,y)}catch(x){return Promise.reject(x)}for(t=0,w=v.length;t<w;)u=u.then(v[t++],v[t++]);return u}getUri(r){r=Xp(this.defaults,r);const a=r6(r.baseURL,r.url,r.allowAbsoluteUrls);return J4(a,r.params,r.paramsSerializer)}};Gn.forEach(["delete","get","head","options"],function(r){Zp.prototype[r]=function(a,g){return this.request(Xp(g||{},{method:r,url:a,data:(g||{}).data}))}}),Gn.forEach(["post","put","patch"],function(r){function a(g){return function(D,X,A){return this.request(Xp(A||{},{method:r,headers:g?{"Content-Type":"multipart/form-data"}:{},url:D,data:X}))}}Zp.prototype[r]=a(),Zp.prototype[r+"Form"]=a(!0)});let Mae=class qT{constructor(a){if(typeof a!="function")throw new TypeError("executor must be a function.");let g;this.promise=new Promise(function(X){g=X});const D=this;this.promise.then(X=>{if(!D._listeners)return;let A=D._listeners.length;for(;A-- >0;)D._listeners[A](X);D._listeners=null}),this.promise.then=X=>{let A;const b=new Promise(e=>{D.subscribe(e),A=e}).then(X);return b.cancel=function(){D.unsubscribe(A)},b},a(function(X,A,b){D.reason||(D.reason=new jh(X,A,b),g(D.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(a){if(this.reason){a(this.reason);return}this._listeners?this._listeners.push(a):this._listeners=[a]}unsubscribe(a){if(!this._listeners)return;const g=this._listeners.indexOf(a);g!==-1&&this._listeners.splice(g,1)}toAbortSignal(){const a=new AbortController,g=D=>{a.abort(D)};return this.subscribe(g),a.signal.unsubscribe=()=>this.unsubscribe(g),a.signal}static source(){let a;return{token:new qT(function(g){a=g}),cancel:a}}};function Aae(r){return function(a){return r.apply(null,a)}}function Lae(r){return Gn.isObject(r)&&r.isAxiosError===!0}const j2={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(j2).forEach(([r,a])=>{j2[a]=r});function f6(r){const a=new Zp(r),g=N4(Zp.prototype.request,a);return Gn.extend(g,Zp.prototype,a,{allOwnKeys:!0}),Gn.extend(g,a,null,{allOwnKeys:!0}),g.create=function(D){return f6(Xp(r,D))},g}const rl=f6(em);rl.Axios=Zp,rl.CanceledError=jh,rl.CancelToken=Mae,rl.isCancel=Q4,rl.VERSION=p6,rl.toFormData=Ug,rl.AxiosError=ya,rl.Cancel=rl.CanceledError,rl.all=function(r){return Promise.all(r)},rl.spread=Aae,rl.isAxiosError=Lae,rl.mergeConfig=Xp,rl.AxiosHeaders=hu,rl.formToJSON=r=>Z4(Gn.isHTMLForm(r)?new FormData(r):r),rl.getAdapter=u6.getAdapter,rl.HttpStatusCode=j2,rl.default=rl;const{Axios:cve,AxiosError:uve,CanceledError:dve,isCancel:pve,CancelToken:hve,VERSION:fve,all:mve,Cancel:gve,isAxiosError:yve,spread:vve,toFormData:xve,AxiosHeaders:bve,HttpStatusCode:_ve,formToJSON:wve,getAdapter:Tve,mergeConfig:kve}=rl,Rae=(r,a)=>{const g=r.__vccOpts||r;for(const[D,X]of a)g[D]=X;return g},Nae={class:"header"},Iae={class:"team-logo left-team"},Pae=["src"],Oae={class:"team-logo right-team"},zae=["src"],Bae={class:"stats-container"},Dae={class:"stat-bar-container"},Vae={class:"stat-label"},Fae={class:"stat-bars"},jae={class:"bar-section"},Uae={class:"bar-number"},qae={class:"bar-section"},Wae={class:"bar-number"},Gae={__name:"gsc-comparative-reports",props:{type:{type:String,required:!0,validator:r=>["general","offensive","defensive","possession","stoppedBall","penalties"].includes(r)},gameId:{type:String,required:!0},seasonId:{type:String,required:!0},token:{type:String,required:!0,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"},homeLogo:{type:String,required:!0},awayLogo:{type:String,required:!0},typegame:{type:String,required:!0},default:{type:Boolean,default:!1}},setup(r){const a=r,g=h.ref([]),D=h.ref(!0),X=h.ref(null),A=h.computed(()=>a.default||!a.gameId?"https://golstatsimages.blob.core.windows.net/todoelfut/lineups/escudo1.png":a.homeLogo),b=h.computed(()=>a.default||!a.gameId?"https://golstatsimages.blob.core.windows.net/todoelfut/lineups/escudo2.png":a.awayLogo);h.computed(()=>({general:"General",offensive:"Ofensivo",defensive:"Defensivo",possession:"Posesión",stoppedBall:"Balón parado",penalties:"Infracciones"})[a.type]||"General");const e=h.ref(null),v=async()=>{try{if(D.value=!0,X.value=null,a.default||!a.gameId){const i=u[a.type]||u.general;g.value=i.map(d=>({label:d,local:0,away:0})),D.value=!1;return}const p=`https://a4dcb6avog.execute-api.us-west-2.amazonaws.com/prod/v3/statisticsTeamBySeason/${a.seasonId}/games/${a.gameId}?type=${a.typegame}`,n=await rl.get(p,{headers:{Authorization:`${a.token}`,"Content-Type":"application/json"}});console.log("API Response:",n.data.result),g.value=t(n.data.result,a.type)}catch(p){X.value=p.message,console.error("Error loading statistics:",p)}finally{D.value=!1}},u={general:["Goles","Remates a destino","Tarjetas amarillas","Tarjetas rojas","Centros totales"],offensive:["Tiros a gol","Tiros a gol destino","Remates a destino","Balones ganados área rival","Centros por derecha","Centros por izquierda","Enfrentamientos ofensivos exitosos","Enfrentamientos ofensivos no exitosos"],defensive:["Atajadas","Balones ganados área propia","Enfrentamientos defensivos exitosos","Enfrentamientos defensivos no exitosos","Juego aéreo resto del campo","Rechaces"],possession:["Pases totales","Pases acertados","Pases acertados en cancha rival","Balones recuperados en disputa","Balones recuperados sin disputa","Balones perdidos en disputa","Balones perdidos sin disputa"],stoppedBall:["Tiros libres 4/4","Tiros libres 3/4","Tiros libres cancha propia","Tiros de esquina por derecha","Tiros de esquina por izquierda","Saques de meta"],penalties:["Faltas totales","Faltas cerca de su propia portería","Faltas resto del campo","Penales cometidos","Fueras de lugar"]},t=(p,n)=>{if(console.log("Transformando datos para tipo:",n,"Datos recibidos:",p[a.type]),a.default){const d=u[a.type]||u.general;return console.log(`Modo default - categorías para tipo '${a.type}':`,d),d.map(s=>({label:s,local:0,away:0}))}const i=p[a.type];return!i||!Array.isArray(i)?(console.warn(`No se encontraron datos para el tipo: ${a.type}`,i),[]):(console.log(`Estadísticas para tipo '${a.type}':`,i),i.map(d=>({label:d.category_name,local:d.home,away:d.away})))},w=(p,n,i)=>{const d=p+n;return d===0?0:Math.round(i==="local"?p/d*100:n/d*100)},y=()=>{if(!e.value)return;const p=e.value.offsetWidth,n=e.value;n.classList.remove("size-large","size-medium","size-small","size-tiny"),p>=1024?n.classList.add("size-large"):p>=768?n.classList.add("size-medium"):p>=580?n.classList.add("size-small"):n.classList.add("size-tiny")};let x=null;return h.onMounted(()=>{y(),v(),x=new ResizeObserver(()=>{y()}),e.value&&x.observe(e.value)}),h.watch([()=>a.type,()=>a.typegame,()=>a.gameId,()=>a.seasonId,()=>a.token,()=>a.homeLogo,()=>a.awayLogo,()=>a.default],()=>{v()}),h.onUnmounted(()=>{x&&x.disconnect()}),(p,n)=>(h.openBlock(),h.createElementBlock("div",{class:"comparative-reports",ref_key:"containerRef",ref:e},[h.createElementVNode("div",Nae,[h.createElementVNode("div",Iae,[h.createElementVNode("img",{src:A.value,alt:"Equipo local",class:h.normalizeClass(["logo",{"default-logo":a.default||!r.gameId}])},null,10,Pae)]),h.createElementVNode("div",Oae,[h.createElementVNode("img",{src:b.value,alt:"Equipo visitante",class:h.normalizeClass(["logo",{"default-logo":a.default||!r.gameId}])},null,10,zae)])]),h.createElementVNode("div",Bae,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(g.value,i=>(h.openBlock(),h.createElementBlock("div",{class:"stat-item",key:i.label},[h.createElementVNode("div",Dae,[h.createElementVNode("div",Vae,h.toDisplayString(i.label),1),h.createElementVNode("div",Fae,[h.createElementVNode("div",jae,[h.createElementVNode("span",Uae,h.toDisplayString(i.local),1),h.createElementVNode("div",{class:"bar left-bar",style:h.normalizeStyle({width:w(i.local,i.away,"local")+"%"})},null,4)]),h.createElementVNode("div",qae,[h.createElementVNode("span",Wae,h.toDisplayString(i.away),1),h.createElementVNode("div",{class:"bar right-bar",style:h.normalizeStyle({width:w(i.local,i.away,"away")+"%"})},null,4)])])])]))),128))])],512))}},m6=Rae(Gae,[["__scopeId","data-v-06bbe73e"]]),Xg=(r,a)=>{const g=r.__vccOpts||r;for(const[D,X]of a)g[D]=X;return g},Hae={name:"SoccerBall",props:{play:{type:Object,require:!0}},data(){return{currentPlayId:0}},computed:{idGradient(){let r;switch(this.play.st){case"st1g":r="green";break;case"st1y":r="yellow";break;case"st1r":r="red";break;case"st1b":r="blue";break}return r},x(){if(this.isLeftArea)return this.play.x*2.66666666667*58-135;if(this.isLeftPost)return-57;if(this.isGoalArea)return(this.play.x-.391)*4.31034482759*637-37;if(this.isRightPost)return 620;if(this.isRightArea)return(this.play.x-.639)*2.77008310249*65+640},y(){return this.isSuperiorPost?128:340-this.play.y*1371.42857143},isLeftArea(){return this.play.x>=0&&this.play.x<.3738},isLeftPost(){return this.play.x>=.3738&&this.play.x<=.3822},isGoalArea(){return this.play.x>.3822&&this.play.x<.6232},isRightPost(){return this.play.x>=.6232&&this.play.x<=.6266},isRightArea(){return this.play.x>.6266&&this.play.x<=1},isSuperiorPost(){return this.play.x>=.3738&&this.play.x<=.6266&&this.play.y>=.1384&&this.play.y<=.1442}},methods:{onClickOver(r,a){let g={x:this.x<350?r.pageX:r.pageX-120,y:r.clientY,playerName:this.play.playerName,minute:parseInt(this.play.time.split(":")[0])||"",rivalName:this.play.rivalName,rivalLogo:this.play.rivalLogo,playInfo:a};this.$emit("getDataTooltip",g)},onMouseOver(r,a){if(this.currentPlayId!==a.play_id){let g={x:r.pageX+120>=window.innerWidth?r.layerX-120:r.layerX,y:r.layerY+20,playerName:this.play.playerName,minute:parseInt(this.play.time.split(":")[0])||"",rivalName:this.play.rivalName,rivalLogo:this.play.rivalLogo,playInfo:a};this.$emit("show-tooltip",g)}},onMouseLeave(){this.$emit("hide-tooltip")}}},Jae=["x","y"],Kae=["xlink:href"];function Xae(r,a,g,D,X,A){return h.openBlock(),h.createElementBlock("svg",{onMouseover:a[0]||(a[0]=b=>A.onMouseOver(b,g.play)),onMouseleave:a[1]||(a[1]=b=>A.onMouseLeave()),onClick:a[2]||(a[2]=b=>A.onClickOver(b,g.play)),version:"1.1",id:"ball","xmlns:cc":"http://creativecommons.org/ns#","xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:rdf":"http://www.w3.org/1999/02/22-rdf-syntax-ns#","xmlns:svg":"http://www.w3.org/2000/svg",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:A.x,y:A.y,viewBox:"0 0 6753 7174.5",style:{"enable-background":"new 0 0 450.2 478.3",cursor:"pointer"},"xml:space":"preserve"},[h.createElementVNode("image",{width:"400",height:"400","xlink:href":g.play.imgData},null,8,Kae)],40,Jae)}const Zae=Xg(Hae,[["render",Xae],["__scopeId","data-v-f203fd76"]]),Yae={key:0,class:"soccer-goal-tooltip__button-play"},Qae={class:"soccer-goal-tooltip__game"},$ae={key:0,class:"soccer-goal-tooltip__game__teams-logos"},eoe={class:"soccer-goal-tooltip__game__teams-logos__logo"},toe=["src"],roe={class:"soccer-goal-tooltip__game__teams-logos__logo"},noe=["src"],ioe={class:"soccer-goal-tooltip__game__info"},aoe={key:0,class:"soccer-goal-tooltip__game__info__score"},ooe={class:"soccer-goal-tooltip__game__info__match-day"},soe={class:"soccer-goal-tooltip__player-and-minute"},loe={class:"soccer-goal-tooltip__player-and-minute__player"},coe={class:"soccer-goal-tooltip__player-and-minute__player__photo"},uoe=["src"],doe={class:"soccer-goal-tooltip__player-and-minute__player__name"},poe={class:"soccer-goal-tooltip__player-and-minute__minute"},hoe={__name:"SoccerGoalTooltip",props:{play:{type:Object,required:!0},isMobileDevice:{type:Boolean,default:!1}},emits:["close","play"],setup(r,{emit:a}){const g=a;function D(){g("close")}function X(){g("play")}function A(){return null}return h.onBeforeMount(()=>{document.body.addEventListener("click",D,!1)}),h.onBeforeUnmount(()=>{document.body.removeEventListener("click",D,!1)}),(b,e)=>(h.openBlock(),h.createElementBlock("div",{class:"soccer-goal-tooltip",onClick:h.withModifiers(A,["stop","prevent"])},[r.isMobileDevice?(h.openBlock(),h.createElementBlock("div",Yae,[h.createElementVNode("div",{role:"button",class:"soccer-goal-tooltip__button-play__button",onClick:h.withModifiers(X,["stop","prevent"])},e[0]||(e[0]=[h.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"10",height:"10",viewBox:"0 0 10 10",fill:"none"},[h.createElementVNode("path",{d:"M3.0492 8.92004C2.9831 8.88243 2.92785 8.82624 2.88941 8.75753C2.85097 8.68882 2.83079 8.61018 2.83106 8.53011V1.46888C2.83115 1.38908 2.85146 1.3108 2.88982 1.24236C2.92819 1.17392 2.98318 1.11788 3.04895 1.08019C3.11472 1.0425 3.18881 1.02458 3.26334 1.02832C3.33788 1.03206 3.41007 1.05733 3.47225 1.10145L8.4249 4.63248C8.48147 4.67271 8.52786 4.72726 8.55995 4.79129C8.59204 4.85533 8.60883 4.92685 8.60883 4.9995C8.60883 5.07214 8.59204 5.14367 8.55995 5.2077C8.52786 5.27173 8.48147 5.32629 8.4249 5.36651L3.47225 8.89838C3.41016 8.94259 3.33803 8.96796 3.26352 8.97177C3.18902 8.97559 3.11495 8.95771 3.0492 8.92004ZM3.24397 8.53095L8.19663 4.99991L3.24397 8.53095Z",fill:"#CBEE6B"})],-1)]))])):h.createCommentVNode("",!0),h.createElementVNode("div",Qae,[r.play.homeTeam?(h.openBlock(),h.createElementBlock("div",$ae,[h.createElementVNode("div",eoe,[h.createElementVNode("img",{src:`https://golstatsimages.blob.core.windows.net/teams-80/${r.play.homeTeam.id}.png`},null,8,toe)]),h.createElementVNode("div",roe,[h.createElementVNode("img",{src:`https://golstatsimages.blob.core.windows.net/teams-80/${r.play.awayTeam.id}.png`},null,8,noe)])])):h.createCommentVNode("",!0),h.createElementVNode("div",ioe,[r.play.homeTeam?(h.openBlock(),h.createElementBlock("div",aoe,h.toDisplayString(r.play.homeTeam.acronym)+" "+h.toDisplayString(r.play.score[0])+":"+h.toDisplayString(r.play.score[1])+" "+h.toDisplayString(r.play.awayTeam.acronym),1)):h.createCommentVNode("",!0),h.createElementVNode("div",ooe,h.toDisplayString(r.play.roundAbbreviation),1)])]),h.createElementVNode("div",soe,[h.createElementVNode("div",loe,[h.createElementVNode("div",coe,[h.createElementVNode("img",{src:`https://golstatsimages.blob.core.windows.net/players-profile/${r.play.playerId}.png`},null,8,uoe)]),h.createElementVNode("div",doe,h.toDisplayString(r.play.playerShortName),1)]),h.createElementVNode("div",poe,h.toDisplayString(r.play.minute)+'"',1)])]))}},foe=Xg(hoe,[["__scopeId","data-v-74a34e4c"]]);function moe(r){return r.reduce((a,g,D)=>(a[g]=D,a),{})}const goe=["playId","gameId","playerId","momentOfPlay","categoryId","categoryType","matchLapse","section","matchResult","playingAs","total","coordinateX","coordinateY"];let U2=null;function g6(){return U2||(U2=moe(goe)),U2}const y6={2:[{category_id:12e3,category_name:"Gol",category_color:"#00FF00",categoryColorName:"green",st:"st1g",translationKey:"goal.goal",generalName:"Goles",singleName:"Gol",imgData:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADoAAAA6CAYAAADhu0ooAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAABU4SURBVHgB7Vt7dJTlnX6++9xnciV3EgyEi1wEVKiIwdpW0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ssjkqfAM1pGiKNnrYJr68llexzEcxpsprLJFOoZHkJPbwLp7TxdJz4Ok2vKPD4b/IXfO//+8u7Ht3+jyOVjRtjq0M86hxd/uukZwoxZlihcK2uK4DkbdMegDvmxb1sOjf4sqqtFpNRzo0HVNfhSPuTD57j92ZT00tlm17UbAqi+SUUj8a40KCOd1zj7otzEAEYP+DHyCplOJ+v4iPRe1RJnw7Pf3PlrzMAu+8j6vl03b6Ri861oIlvXcOKk8Hq2Gm88TeGqP4+bN0hY/XENnaWlpHwygiNhJCvjU15Lo3OGKI07zboM8GTN6sljtFfHCJWCVJYneG7MCjcKj4ZuwD//al1bGjO0Kzqbf/gHrbFFwvsPKsHUF153o3WD7ZLw2vYIEsNZlITzWHM7jyMb/OheU1HU9VTPYab9WfJQ6OSe0CsKv5Al4R9/vqqtB5dpV+VLCBufWRbbsSP+Sck271VHSm8bO6khM2QKBkfJrHILtz8YhLMoiIw6AxXfRSdXt9kxxZ8xgsdxhXbVv23R+PD8xkyfcpfvlLbeSaE1lTF9HhW7aWkOS9aXCoOLNGSVizrsdSnvi4sv8Ljwxc03727DVbQ/2v8lcdYaV61qlF23SlGtqsGh0bpFVapUt6ICsdYwRkPpMSrVnUQRnbruS2xd11b0F43/ZFPY/wGvrSx99fSrawAAAABJRU5ErkJggg=="},{category_id:59800,category_name:"Poste",category_color:"#FFFF00",categoryColorName:"yellow",st:"st1y",translationKey:"goal.goal_post",generalName:"Remates al poste",singleName:"Remate al poste",imgData:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADoAAAA7CAYAAAAq55mNAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAABl2SURBVHgB7Vt5nFTVmT33vnpV1dVNd9NNA91szSKLgqBERREFxSWKiRiXqIlLZjRGTUJinIzJzKhJTOLEySTRmGh0olncoxKNoJEBF0BUFLRlUXYEGpqG3mt5y51z732vqjFiiDp/zG/y/BVVXfXefffcbzvfuU/g78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oIiPQGlXAQcKg9Nid2Y6kq88nyI2t4U2PPe5d/9dw/FWg+vjDfO/Vi89JvZXvUadxSy/p0K1OZEexRIbYw4kvfpllZwhZRoVjJvbefjYG3UUvkOUJOPo5Ilp3BGmf1p12sGw1d3FjVxuQUudKeszTlEHTdPUpSY7bFRjm44XSyKs5Ct4PLPDU4P742i/v8X9wIBgOCKg+HniisOqic5Lzcll1KjNxdZIdzTFskV5lS7WH2XT5amBqfyadCsasEvuC1EIXuxCXHFQ/KpDVe6o8J8m47UO6d9w4SipDrIe0asmTpJ+nYzE/zyVZeXsJY5HdUR33MANKKY8uwdaRg9RnvnObf/+Bzv+AgerjwSe85nPPLvs9u4xBNMqhqZTEVP1MUDrE7maJh+nPI1MeBpG/eo7ch4DrmNLP+pnKoIHTRFmdpHTc8qTBdNcZ1J76s2ZmqfG2e7qdIZMiS9qyjnsrG7g5XBCKu2yLPnW0f/aXfxgu/1vmLvAhj8du73Nm617/P2V30Kh7Vv3I241PCLP9fwHVBq27dlMZ15KI3oUrr4gonCw9xBHXxjKeVU7VMEMpgeqMUSHWc5xVtPB68uGuHNRIid3HjHGuO+c67258iONDA9XHwvv69Gtp6pmV7Qqub/LQuIXy+KLVFLU4yVp2ItMoPU4cTk1pnBvx0nj/pSR7Fh/F0fotU6oGmwopgjP+9Q4mM1sbBY5bEvnw9sPm4EM/jf2RgPY+JlzmXNLZhovddkxp24l0drdtqeoYg1fP4m5XI+lgDFTYzicGHYONqxPFb5/a7osVafyprCJzx4xzW7rwEY+PDWh83HJHn353/rFnptgtz8y1qYkdPWpsnuVjGomC3jcZPozSRzJ+lKx4maL80UxC8SKNuiAfJB+8ZM7H8yx9fHzsQN97zJlTXb10adf4na2kvewHxlSr9MlHOqjXFg5lW2WVzKUzwabTL/n4/8+I/5fH/wDRbtt32OccVQAAAABJRU5ErkJggg=="},{category_id:53800,category_name:"Fuera",category_color:"#DADADA",categoryColorName:"grey",st:"st1r",translationKey:"goal.missed",generalName:"Remates desviados",singleName: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4PRoUAAAAASUVORK5CYII="},{category_id:6e4,category_name:"Parado por el portero",category_name_femenil:"Parado por la portera",category_color:"#00B8FF",categoryColorName:"blue",st:"st1b",translationKey:"goal.saved_by_goalkeeper",generalName:"Atajadas de portero",singleName:"Atajada",imgData:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADoAAAA6CAYAAADhu0ooAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAABqKSURBVHgB7VpplFxlmX7uVrequvbeO71lX0hCQkAWgZEgiONyBhfE7bhvnMFt9LjNCI6j4/Eojjpu44IOLqOICiOIKCAoBIEECEmAkK27093VXdXdtW93m+f77q1K8ICA4PyZuUl1bffe73u+932f932fr4D/I4eC/4Vj9F2700NmPNn5wOSjyf+a6ZX3DWYP/Epp4q98/FWADm9/8XNWnLB4Tkv74JmqmtnmqUMDihJS/NH4xwsGFy891XM8HFRU7Fag/rpWNX73wFd69+NZPp49oAMX/k26b+RV6dGxlwyMTQx7oZfBUwYh0HmeC0UNEZgq0SmqRqz8zLP57TwvniLiBr8yeG6G16l7Xa/nppY3/pWdn0sdxLNwPGOg+tirtyd7uv9pYPWZz4sPbuFkNf+2AhCBeeLZawHuYT4e5mdpQI1B9X7Az++E51RgN1S4rs5rwjBCFbh2VC6GamR4r6n/tJzIF+/6yswuPIPjLwZqrLjklJBW+NrIpu3bUqNncmLqsdtxksIt4dWgud+E4l7Fb5akyzqugmatB0szQyjmR1FeSsG2aEk4UHmWpouFstCqNRDqSiHaVUG8ewHR7uZ/JZft+Mhd/9Y4gr/geNpAV136woS1L3eZ617wvoG1L1S0MFedllMEMuGaYrrKUQK8Eqp7DcGVCURFcW4QS9kRFBaGUS8b0tJqyAcIj9d5ImAdaFyw7oElDI4/iOkDI4jEB/hxHLWiA8dLZ/Vo9Iu5HZ/6DJ7m8bSAJs+8YoVe2XVj/6ozV8eXndUB57soXQ01gvseQX6FsdaEYykoZrtxePcG1KtpaCEN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5jox8FeO2Jau4ajGKo/v7UGyZcFMNyiHsRSPMsUtJJMtppCj9pPpo7WoL+fzobalV+mv3X33L9FOd+1OyaPvI77m24Gz9yJUxZ55NlXa2oq1UUrRA1LifClwG2QMWO53rWREp/j6M6ysSTiMP1YjIFsoLWNnBWpaTz+d7Np7OYYTCLepPJKsIy8U6ZZpWkm5OkUzl60IataUUmo1EyVVCH50d/8MlC1e/sfh05v60LHr8Mfqya58bdie+FGpdu9Wt3KK0rASmDg5y26CF3mVl9Kw+A3r8XO64Mc1oYSqGomwMsln7RxueL6BqeISu/CtmnXuYTepST241NVQbXdxG7JIxryl910fT7of2XfPAk/4c7lkF2j7WX7DmYsWdvXyxoazxqimlMNNHsBUY7DNjyTr6BODMhVII6+TEzu8ZfFHbLwQEeTXkjp3m7Sa4rOyHufd5q+IufuKeH2VvwzM4njHQ9mGcuWmb2mq9yytpL/Sq5qAn5B72jToVguH16xAbOo/u3BPUpu1fabdLuHbq8K3sQJvgOd9zPe07D/3wRRN4Fo5nDejxh75x+3la2XuBV28sJ9hxz3Y2pjJ1Iz4wppipk6lgDLIgEDqw0In0qgf9MIu4exnRhyzPvHH/j196D57l468C9PGO2OYL+1qLxQFvaUpNjw976ZUXNAralqW5n79gHv9/PHvH/wAARBI8ZVjYSQAAAABJRU5ErkJggg=="}],3:[{category_id:12e3,category_name:"Gol Recibido",category_color:"#FF0000",categoryColorName:"red",st:"st1r",translationKey:"goal.goal_received",generalName:"Goles recibidos",singleName:"Gol recibido",imgData:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADkAAAA5CAYAAACMGIOFAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAABf/SURBVHgB5Vp5tF1Vef/2PsOd3n33jXkvCSFkQWJ0AREhWWHQimltIeKqZRDFVrtWHUqxtsvaVVuwWkBFlqVYdHWJFau2pShasS4kihWWAYEQDGGSMUrGN9333p3OPefsvfv79hnuDUMMAfuPJ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p2ak0GW0uZYtmPGX9lekWnTIIpqn3ezydjf5O2ESrof0u4ZgG3BTX0I/RMdoTf7zvTJTuny2v79nz/c+R4RyOzYMzHx57sovIxEoxZgN/ApNJ7+HS36qUjbfcZ3YatlxEX9J7GV5rjphnuWwvt+ydwHtgJIRZstk0zKZRSIx9RMoT6oS7dCBF8B6z1GL+F4WSD5YKtK373kPhW85wYVjLZj4y1ELuIG1YvizRdNlwwVIA0HcDenpz/7fgIjKNmjNGlPN6ku0DkysR7XenbEuLe5Rn5uaP/+++gIjpcNkvrAOo6zfquJP/Kgitc8GKmBX0a62NZkOXED9hzOLHs04FbyJJ/vV/a1UzxjIvQgFirGHBgx5hZ0DL59pOCy4xUD2X8A8FoPgPdhv+aJWL32aaWW7NXan1WxuwobFWv9Ao27vt0I9vlncQAGUOGAMdurxtyFOL69FsePvdCPAY/k+D9q7vgxYZEy9AAAAABJRU5ErkJggg=="},{category_id:59800,category_name:"Poste",category_color:"#FFFF00",categoryColorName:"yellow",st:"st1y",translationKey:"goal.goal_post",generalName:"Remates al poste",singleName:"Remate al poste",imgData:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADoAAAA7CAYAAAAq55mNAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAABl2SURBVHgB7Vt5nFTVmT33vnpV1dVNd9NNA91szSKLgqBERREFxSWKiRiXqIlLZjRGTUJinIzJzKhJTOLEySTRmGh0olncoxKNoJEBF0BUFLRlUXYEGpqG3mt5y51z732vqjFiiDp/zG/y/BVVXfXefffcbzvfuU/g78ffj/+Th8D/wnHDnOrqi49vm+4nMpO8lDNICjEpAAZLoaoVRDq+sxRoDkO1yXFksx+qlSkp1jjwFw2f0d2Mj/n42IDecAPSj76QnHVwf3HVl2cGU6rr3HTecfmLgiSihBPdUCAGCaXsF5LnCCh7gn5LiBch1F3JSmfu8MPa2vAxHB8Z6OTp6Bcg9c3TD5NXnHqMU1FeLuFI+5u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ic5Lzcll1KjNxdZIdzTFskV5lS7WH2XT5amBqfyadCsasEvuC1EIXuxCXHFQ/KpDVe6o8J8m47UO6d9w4SipDrIe0asmTpJ+nYzE/zyVZeXsJY5HdUR33MANKKY8uwdaRg9RnvnObf/+Bzv+AgerjwSe85nPPLvs9u4xBNMqhqZTEVP1MUDrE7maJh+nPI1MeBpG/eo7ch4DrmNLP+pnKoIHTRFmdpHTc8qTBdNcZ1J76s2ZmqfG2e7qdIZMiS9qyjnsrG7g5XBCKu2yLPnW0f/aXfxgu/1vmLvAhj8du73Nm617/P2V30Kh7Vv3I241PCLP9fwHVBq27dlMZ15KI3oUrr4gonCw9xBHXxjKeVU7VMEMpgeqMUSHWc5xVtPB68uGuHNRIid3HjHGuO+c67258iONDA9XHwvv69Gtp6pmV7Qqub/LQuIXy+KLVFLU4yVp2ItMoPU4cTk1pnBvx0nj/pSR7Fh/F0fotU6oGmwopgjP+9Q4mM1sbBY5bEvnw9sPm4EM/jf2RgPY+JlzmXNLZhovddkxp24l0drdtqeoYg1fP4m5XI+lgDFTYzicGHYONqxPFb5/a7osVafyprCJzx4xzW7rwEY+PDWh83HJHn353/rFnptgtz8y1qYkdPWpsnuVjGomC3jcZPozSRzJ+lKx4maL80UxC8SKNuiAfJB+8ZM7H8yx9fHzsQN97zJlTXb10adf4na2kvewHxlSr9MlHOqjXFg5lW2WVzKUzwabTL/n4/8+I/5fH/wDRbtt32OccVQAAAABJRU5ErkJggg=="},{category_id:53800,category_name:"Fuera",category_color:"#DADADA",categoryColorName:"grey",st:"st1b",translationKey:"goal.missed",generalName:"Remates desviados",singleName:"Remate desviado",imgData:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADoAAAA7CAYAAAAq55mNAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAABwdSURBVHgB7Vt3fFRlun5Omd7Se0ISeglEigpKUxELC0i/IKsLrnLFVdfVu+oWdW13vateu7J2ViyAq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m/3/DMP3+ubYsmV/zeQ10wby0WAzVWxaaDPuK1uP0/vp9mddeGhyJwZevAiSdajRKAvnxiesdAwFfPCkZOivOSJbkRZ+GSYTzZuo8f6C5kxLN9qxq92FQE/KrcltlOaiMKfKuHJfPiYOjKBvfjLSnX6s2J2hNfiUR5e8uucP33Xv38mj8bVy5erAoMGlS1I8LtagjeWEAu7SVCvs9joq5SQs2+yBNbQDpUVhREwD9XzKFjvi6+pshzspRT/OY2ocoflwQBxHDW0X5WTqNVNDuKy0E31TyCAtdnh9HnqXDRHKs6c7MrD98xQ6qrBoVS18tWr2z3nxpYOvfo+t//CvsS5d+lpfkVPfo/6y1N71OnUvzXhqbTb2HFbJ+kHMmzIYjpzroIhJkEN+2EhmRZNVT+zGcT6vf82OtVOmaDmNXN6BRS2HlQp7moziZIsFXzS7UO5z0iDOg7RWTSrJVt6aNqL6/gHTfG3fc7s//ovJbz6YOys/ueHR416hV22nHe9uLUbjWTo0IkpOGamhb14qCofdqk8r2Let9YHWN0wFGZ1NVNnY1e1wqPuIzcQSnn3R1Q2RC3/ERTt/O2AGKvAD10/2VfPeiwsmdUqhGZY2+3S5Md0ZbKYhWCCif7Nk0eQBGDriChKiVP0cx1Dic03Bua8ExL63y77fx2tNotb0EhdqXH3N3IcP4keun/x/Hki+otgjJluuEuusM7Q2rn9IVnpJ4ahlVHEE1105GNkFI6BZswmQ+Vydxr4eBK6JYrmZ/PyZwIurD5WXb3vwwQdV/ETr/+z/kogv2iz/9sr1AwVBzWpqas6ym+GZMTpfuHjUFZLFU9AV5YWaYDByeuHChWfxr/Xj1/8AcWYIcU4PRoUAAAAASUVORK5CYII="},{category_id:6e4,category_name:"Parado por el portero",category_name_femenil:"Parado por la portera",category_color:"#00B8FF",categoryColorName:"blue",st:"st1g",translationKey:"goal.saved_by_goalkeeper",generalName:"Atajadas de portero",singleName:"Atajada",imgData:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADoAAAA6CAYAAADhu0ooAAAACXBIWXM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VCH50d/8MlC1e/sfh05v60LHr8Mfqya58bdie+FGpdu9Wt3KK0rASmDg5y26CF3mVl9Kw+A3r8XO64Mc1oYSqGomwMsln7RxueL6BqeISu/CtmnXuYTepST241NVQbXdxG7JIxryl910fT7of2XfPAk/4c7lkF2j7WX7DmYsWdvXyxoazxqimlMNNHsBUY7DNjyTr6BODMhVII6+TEzu8ZfFHbLwQEeTXkjp3m7Sa4rOyHufd5q+IufuKeH2VvwzM4njHQ9mGcuWmb2mq9yytpL/Sq5qAn5B72jToVguH16xAbOo/u3BPUpu1fabdLuHbq8K3sQJvgOd9zPe07D/3wRRN4Fo5nDejxh75x+3la2XuBV28sJ9hxz3Y2pjJ1Iz4wppipk6lgDLIgEDqw0In0qgf9MIu4exnRhyzPvHH/j196D57l468C9PGO2OYL+1qLxQFvaUpNjw976ZUXNAralqW5n79gHv9/PHvH/wAARBI8ZVjYSQAAAABJRU5ErkJggg=="}]},yoe={id:"Capa_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 888.5 651.6",style:{"enable-background":"new 0 0 888.5 651.6"},"xml:space":"preserve"},voe={__name:"SoccerGoal",props:{game:{type:Object,default:()=>({})},players:{type:Array,default:()=>[]},teams:{type:Array,default:()=>[]},plays:{type:Array,default:()=>[]},visualizationType:{type:String,default:"game"},type:{type:String,default:"offensive"},categoriesSelected:{type:Array,default:()=>[]}},emits:["openmedia"],setup(r,{emit:a}){const g=g6(),D=a,X=r,A=h.ref({}),b=h.ref(!1),e=h.ref({left:"0"}),v=h.ref(null),u=h.ref(null),t=h.ref([]),w=h.computed(()=>/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)),y=h.computed(()=>X.plays),x=h.computed(()=>y.value.map(f=>{let m={},T=0,C=null,S=null,L="",R="";if(f[g.momentOfPlay]){const M=f[g.momentOfPlay].split(":");R=Number(M[0])}if(X.game){const M=f[g.playingAs]===1?X.game.awayTeam.team_id:X.game.homeTeam.team_id;T=f[g.playingAs]===1?X.game.homeTeam.team_id:X.game.awayTeam.team_id,m=X.teams.find(k=>k.team_id===M),m=m||{},C={id:X.game.homeTeam.team_id,acronym:X.game.homeTeam.acronym,name:X.game.homeTeam.team_name},S={id:X.game.awayTeam.team_id,acronym:X.game.awayTeam.acronym,name:X.game.awayTeam.team_name}}const E=X.players.find(M=>M.player_id===f[g.playerId]),N=t.value.find(M=>M.category_id===f[g.categoryId]);if(console.log("------"),console.log("category",N),E){const M=E.player_name||E.name||",";let[k,I]=M.split(",");I=I.trim(),L=`${I.charAt(0)}. ${k.split(" ")[0].trim()}`}return{play_id:f[g.playId],playerName:E?E.player_name:"",playerShortName:L,playerId:E?E.player_id:"",time:f[g.momentOfPlay],minute:R,category_id:f[g.categoryId],category_color:t.value.find(M=>M.category_id===f[g.categoryId]).category_color,st:t.value.find(M=>M.category_id===f[g.categoryId]).st,category_type:f[g.categoryType],x:f[g.coordinateX],y:f[g.coordinateY],rivalName:m.team_name||"",rivalLogo:m.logo||"",rivalId:m.team_id||"",homeTeam:C,awayTeam:S,score:X.game?X.game.score:["",""],roundAbbreviation:X.game?X.game.roundAbbreviation:"",categoryColorName:N.categoryColorName,generalName:N.generalName,singleName:N.singleName,imgData:N.imgData,teamId:T}}));h.watch(()=>X.type,f=>{t.value=y6[f==="offensive"?2:3]},{immediate:!0});function p(f){const m=w.value?126:80;if(u.value=f.playInfo,A.value=f.playInfo,v.value){const T=v.value.getBoundingClientRect();e.value.left=f.x+77>T.width?`${T.width-158}px`:f.x-77<0?"4px":`${f.x-77}px`,f.y+m>T.height?e.value.top=`${f.y-m-30}px`:e.value.top=`${f.y}px`}}function n(){A.value={},e.value={top:"0",left:"0"},b.value=!1}function i(f){w.value||d(f.playInfo)}function d(f){if(!f)return;let m=[];if(X.sectionType==="team")if(X.type==="offensive")switch(f.category_id){case 12e3:m=[12,55,"35_r","54_r"];break;case 53800:m=[538,541,545,548,159,168,177,331,334];break;case 59800:m=[598,600,602,604,582,580,572,574,578];break;case 6e4:m=[598,600,602,604,582,580,572,574,578];break}else switch(f.category_id){case 12e3:m=[257,40];break;case 53800:m=["538_r","541_r","545_r","548_r","159_r","168_r","177_r","331_r","334_r"];break;case 59800:m=["598_r","600_r","602_r","604_r","582_r","580_r","572_r","574_r","578_r"];break;case 6e4:m=[39];break}else switch(f.category_id){case 12e3:m=X.players[0].position_id==1?[40]:[12,55];break;case 53800:m=[538,541,545,548,159,168,177,331,334];break;case 59800:m=[598,600,602,604,582,580,572,574,578];break;case 6e4:m=X.players[0].position_id==1?[39]:[598,600,602,604,582,580,572,574,578];break}const T={tournaments:[],categoryIds:m,categorySingleName:X.type==="offensive"&&X.sectionType==="player"&&f.category_id===6e4?"Remate a destino":f.generalName,mainSectionType:1,playListType:X.sectionType==="team"?3:2,matchResult:[1,2],playData:{playId:f.play_id},isPost:f.category_id===59800?1:0,advancedFilter:{playListTitle:X.type==="offensive"&&X.sectionType==="player"&&f.category_id===6e4?"Remates a destino":f.generalName,mainCategoryId:{},fieldSections:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]}};X.sectionType==="team"?(T.playerIds=[],T.teamId=f.teamId):(T.playerIds=[X.players[0].player_id],T.teamId=0),n(),D("open-media",T)}function s(){d(u.value)}function c(){n()}return(f,m)=>(h.openBlock(),h.createElementBlock("div",{class:"soccer-goal",ref_key:"soccerGoal",ref:v},[b.value?(h.openBlock(),h.createElementBlock("div",{key:0,class:"soccer-goal__tooltip",style:h.normalizeStyle(e.value)},[h.createVNode(foe,{"is-mobile-device":w.value,play:A.value,onPlay:s,onClose:c},null,8,["is-mobile-device","play"])],4)):h.createCommentVNode("",!0),(h.openBlock(),h.createElementBlock("svg",yoe,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(x.value,(T,C)=>(h.openBlock(),h.createBlock(Zae,{class:"hover-ball",play:T,key:C,onShowTooltip:p,onHideTooltip:n,onGetDataTooltip:i},null,8,["play"]))),128))]))],512))}},xoe=Xg(voe,[["__scopeId","data-v-6de8d9df"]]),boe=(r,a)=>{const g=r.__vccOpts||r;for(const[D,X]of a)g[D]=X;return g},_oe={key:1},woe={width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Toe=["fill"],koe={key:0,class:"checkbox__teams"},Soe={class:"checkbox__teams__logo"},Coe=["src"],Eoe={class:"checkbox__teams__logo"},Moe=["src"],Aoe={__name:"GSC-Checkbox",props:{width:{type:String,default:"fit-content"},height:{type:String,default:"fit-content"},label:{type:String,default:""},labelWhiteSpace:{type:String,default:"normal"},labelColor:{type:String,default:"white"},fontFamily:{type:String,default:"sans-serif"},labelFontSize:{type:String,default:"12px"},modelValue:{type:Boolean,default:!1},justifyContent:{type:String,default:"flex-start"},alignItems:{type:String,default:"center"},boxBackgroundColor:{type:String,default:"#CBEE6B"},boxValueColor:{type:String,default:"#0d1d29"},boxValue:{type:[String,Number],default:""},boxPosition:{type:String,default:"left",validator(r){return["left","right","top","bottom"].includes(r)}},boxMarginTop:{type:String,default:"0.2em"},boxWidthAndHeight:{type:String,default:"16px"},boxBorderColor:{type:String,default:"#969da2"},boxBorderWidth:{type:String,default:"2px"},boxBorderRadius:{type:String,default:"4px"},boxValueFontSize:{type:String,default:"10px"},boxValueFontFamily:{type:String,default:"sans-serif"},avoidInteraction:{type:Boolean,default:!1},avoidToCheck:{type:Boolean,default:!1},isBoxOnly:{type:Boolean,default:!1},teamsIds:{type:Array,default:()=>null}},emits:["update:modelValue"],setup(r,{emit:a}){const g=r;h.useCssVars(u=>({"7bd9d47b":r.width,"34dc7ddc":r.height}));const D=h.ref(!1),X=h.computed(()=>{const u={color:g.boxValueColor,"font-family":g.fontFamily,height:g.boxWidthAndHeight,width:g.boxWidthAndHeight,minWidth:g.boxWidthAndHeight,"border-radius":g.boxBorderRadius,"margin-top":g.boxMarginTop};return D.value?(u["background-color"]=g.boxBackgroundColor,u.border=`solid ${g.boxBorderWidth} ${g.boxBackgroundColor}`):u.border=`solid ${g.boxBorderWidth} ${g.boxBorderColor}`,u}),A=h.computed(()=>({"font-family":g.boxValueFontFamily,"font-size":g.boxValueFontSize,color:g.boxValueColor,"line-height":1})),b=h.computed(()=>{const u={color:g.labelColor,"font-family":g.fontFamily,"font-size":g.labelFontSize,"white-space":g.labelWhiteSpace,"text-align":g.boxPosition==="top"||g.boxPosition==="bottom"?"center":g.boxPosition};return(g.boxPosition==="left"||g.boxPosition==="right")&&(u[`margin-${g.boxPosition}`]=g.isBoxOnly?"0":g.teamsIds?"8px":"10px"),u});h.watch(()=>g.modelValue,u=>{u!==D.value&&(D.value=u)},{immediate:!0});function e(){g.avoidInteraction||!D.value&&g.avoidToCheck||(D.value=!D.value,a("update:modelValue",D.value))}function v(u){return`${{}.TEAM_LOGOS_URL||"https://golstatsimages.blob.core.windows.net/teams-80/"}${u}.png`}return(u,t)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["checkbox",`box-${r.boxPosition}`]),onClick:e},[h.createElementVNode("div",{class:"checkbox__box",style:h.normalizeStyle(X.value)},[D.value?(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[g.boxValue?(h.openBlock(),h.createElementBlock("div",{key:0,class:"checkbox__box__value",style:h.normalizeStyle(A.value)},h.toDisplayString(r.boxValue),5)):(h.openBlock(),h.createElementBlock("div",_oe,[(h.openBlock(),h.createElementBlock("svg",woe,[h.createElementVNode("path",{d:"M9.77994 1.70133L4.10994 7.37133C3.96994 7.51133 3.77994 7.59133 3.57994 7.59133C3.37994 7.59133 3.18994 7.51133 3.04994 7.37133L0.219941 4.54133C-0.0700586 4.25133 -0.0700586 3.77133 0.219941 3.48133C0.509941 3.19133 0.989941 3.19133 1.27994 3.48133L3.57994 5.78133L8.71994 0.641328C9.00994 0.351328 9.48994 0.351328 9.77994 0.641328C10.0699 0.931328 10.0699 1.40133 9.77994 1.70133Z",fill:r.boxValueColor},null,8,Toe)]))]))],64)):h.createCommentVNode("",!0)],4),r.teamsIds&&r.teamsIds.length?(h.openBlock(),h.createElementBlock("div",koe,[h.createElementVNode("div",Soe,[h.createElementVNode("img",{src:v(r.teamsIds[0]),alt:""},null,8,Coe)]),h.createElementVNode("div",Eoe,[h.createElementVNode("img",{src:v(r.teamsIds[1]),alt:""},null,8,Moe)])])):h.createCommentVNode("",!0),h.createElementVNode("div",{class:"checkbox__label",style:h.normalizeStyle(b.value)},h.toDisplayString(r.label),5)],2))}},Loe=boe(Aoe,[["__scopeId","data-v-b6f124d8"]]);function Roe(r,a){return r.reduce((g,D)=>{switch(D[a.categoryType]){case 1:g.possession.push(D);break;case 2:g.offensive.push(D);break;case 3:g.defensive.push(D);break}return g},{possession:[],offensive:[],defensive:[]})}const Noe={key:0,class:"goal-data__title"},Ioe={class:"goal-data__filters"},Poe={key:1},Ooe=["src"],zoe={__name:"GSC-GoalData",props:{isPreMatch:{type:Boolean,default:!1},game:{type:Object,default:()=>null},team:{type:Object,default:()=>({})},player:{type:Object,default:()=>({})},visualizationType:{type:String,default:"game"},isHomeTeamForAnalysis:{type:Boolean,default:!0},token:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"},analysisType:{type:String,default:"offensive"},canPlayVideos:{type:Boolean,default:!0},canInteract:{type:Boolean,default:!0}},emits:["openmedia"],setup(r,{emit:a}){let g=null;const D=a,X=r,A={gameId:90209,id:90209,seasonId:1943,regularSeasonId:1933,matchday_name:"Playoffs 6",status:1,score:[2,0],game_status:1,dateTimeUTC:"2025-05-26T00:00:00Z",homeTeam:{logo:"https://golstatsimages.blob.core.windows.net/teams-80/18.png",team_id:18,provisional_logo:"https://golstatsimages.blob.core.windows.net/teams-provisional/18.png",colloquial_name:"Toluca",acronym:"TOL",team_name:"Toluca"},awayTeam:{logo:"https://golstatsimages.blob.core.windows.net/teams-80/2.png",team_id:2,provisional_logo:"https://golstatsimages.blob.core.windows.net/teams-provisional/2.png",colloquial_name:"América",acronym:"AME",team_name:"America"},is_live:0,minutes:{home_goals_minutes:["L. Garcia 65'","A. Vega 82'"],visiting_goals_minutes:[],home_yellow_cards_minutes:["L. Garcia 90'","A. Vega 90 + 3'"],away_yellow_cards_minutes:["S. Caceres 78'"],home_red_cards_minutes:[],away_red_cards_minutes:[]}},b=h.ref([]),e=h.ref(null),v=h.ref(0),u=h.ref({home:{offensive:[],defensive:[]},away:{offensive:[],defensive:[]}}),t=h.computed(()=>X.game||A),w=h.computed(()=>t.value?X.isHomeTeamForAnalysis?t.value.homeTeam.team_id:t.value.awayTeam.team_id:0),y=h.computed(()=>b.value.reduce((f,m)=>(m.isSelected&&f.push(m.id),f),[])),x=h.computed(()=>({"--filters-gap":v.value>440?"8px":"4px"})),p=h.computed(()=>{const f=X.visualizationType==="game"?t.value.homeTeam.team_id===w.value:!1;return u.value[f?"home":"away"][X.analysisType].map(m=>({...m,isSelected:y.value.includes(m.category_id),teamId:X.team.teamId||t.value.homeTeam.team_id,playerId:X.player.playerId||0,gameId:t.value.id||0}))});h.watch(()=>X.analysisType,f=>{console.log("Analysis type changed to:",f),b.value=y6[f==="offensive"?2:3].map(m=>({id:m.category_id,name:t.value.isFemale&&m.category_id==6e4?m.category_name_femenil:m.category_name,isSelected:!0,imgData:m.imgData})),console.log("Available categories:",b.value)},{immediate:!0}),h.watch(()=>t.value.id,f=>{f&&c()},{immediate:!0});function n(){g=new ResizeObserver(f=>{for(const m of f)v.value=m.contentRect.width}),g.observe(e.value)}function i(f){X.canPlayVideos&&(f.seasonId=t.value.seasonId,D("openmedia",f))}async function d({seasonId:f,teamId:m}){try{const T=`https://3xbsvx7zre.execute-api.us-west-2.amazonaws.com/prod/goalsTeamBySeason/${f}/${m||""}`;return(await(await fetch(T,{method:"GET",headers:{Authorization:X.token||""}})).json())[0]}catch(T){return Promise.reject(T)}}async function s({seasonId:f,gameId:m,teamId:T}){try{return(await(await fetch(`https://3xbsvx7zre.execute-api.us-west-2.amazonaws.com/prod/goalsTeamBySeason/${f}/games/${m}/teams/${T}`,{headers:{Authorization:X.token||""}})).json())[0]}catch(C){return Promise.reject(C)}}async function c(){if(t.value.homeTeam&&t.value.awayTeam&&X.token){const f=[];X.isPreMatch?(f.push(d({seasonId:t.value.seasonId,teamId:t.value.homeTeam.team_id})),f.push(d({seasonId:t.value.seasonId,teamId:t.value.awayTeam.team_id}))):(f.push(s({seasonId:t.value.seasonId,gameId:t.value.id,teamId:t.value.homeTeam.team_id})),f.push(s({seasonId:t.value.seasonId,gameId:t.value.id,teamId:t.value.awayTeam.team_id})));const m=await Promise.all(f);for(const T of m){const{offensive:C,defensive:S}=Roe(T.data_combination,g6());T.team_id===t.value.homeTeam.team_id?(u.value.home.offensive=C,u.value.home.defensive=S):(u.value.away.offensive=C,u.value.away.defensive=S)}}}return h.onMounted(()=>{n()}),(f,m)=>(h.openBlock(),h.createElementBlock("div",{ref_key:"goalData",ref:e,class:"goal-data",style:h.normalizeStyle(x.value)},[r.canPlayVideos?(h.openBlock(),h.createElementBlock("div",Noe,"Haz click en un balón para ver el video")):h.createCommentVNode("",!0),h.createVNode(xoe,h.mergeProps(X,{plays:p.value,"categories-selected":y.value,type:r.analysisType,onOpenMedia:i}),null,16,["plays","categories-selected","type"]),h.createElementVNode("div",Ioe,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(b.value,T=>(h.openBlock(),h.createElementBlock("div",{key:T.id,class:"goal-data__filters__filter"},[r.canInteract?(h.openBlock(),h.createBlock(h.unref(Loe),{key:0,modelValue:T.isSelected,"onUpdate:modelValue":C=>T.isSelected=C,label:T.name,"label-font-size":v.value>440?"11px":"9px"},null,8,["modelValue","onUpdate:modelValue","label","label-font-size"])):(h.openBlock(),h.createElementBlock("div",Poe,h.toDisplayString(T.name),1)),h.createElementVNode("img",{src:T.imgData},null,8,Ooe)]))),128))])],4))}},v6=Xg(zoe,[["__scopeId","data-v-e4bc32cd"]]),Zg=(r,a)=>{const g=r.__vccOpts||r;for(const[D,X]of a)g[D]=X;return g},Boe={name:"tooltip",props:{data:{type:Object,required:!0}},computed:{positionTooltip(){return{top:`${this.data.y}px`,left:`${this.data.x}px`}},showTooltip(){return{visible:this.data.visible}}},methods:{tooltipClick:function(r){this.visible=!1}}};function Doe(r,a,g,D,X,A){return h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["box-tooltip",A.showTooltip]),style:h.normalizeStyle(A.positionTooltip),onClick:a[0]||(a[0]=(...b)=>A.tooltipClick&&A.tooltipClick(...b))},[h.renderSlot(r.$slots,"default",{},void 0,!0)],6)}const Voe=Zg(Boe,[["render",Doe],["__scopeId","data-v-740977d0"]]),Foe={name:"SoccerChalkboardXg",components:{Tooltip:Voe},props:{plays:{type:Array,required:!0},categories:{type:Array,required:!0},team:{type:Object,default:()=>({})},rivalTeam:{type:Object,default:()=>({})}},data(){return{negativeColor:"red",data:{x:0,y:0,visible:!1},dataPlay:{playerName:"",photo:"",minute:0,rivalLogo:"",rivalName:"",categoryName:"",xGi:0,xGf:0,isOwnGoal:!1}}},computed:{preparedPlays(){return this.plays.map(r=>({...r,playingAs:r.playing_as,teamId:r.team_id,photo:r.photo,categoryId:r.category_id,matchResult:r.match_result,matchLapse:r.matchlapse,x1:r.x1*100,y1:r.y1*100,x2:r.x2*100,y2:r.y2*100,x3:r.x3*100,y3:r.y3*100,xGi:r.xG1,xGf:r.xG2}))},localCategories(){return this.categories.map((r,a)=>({id:a,name:r.name,negative:r.negative||!1,color:r.color,points:r.points,numPoints:r.points.length,categories:r.categories,invert:r.invert||[]}))},graphPlays(){let r=this.localCategories.reduce((a,g)=>[...a,g.categories],[]);return this.preparedPlays.filter(a=>this.findCategoryInPlay(r,a)).reduce((a,g)=>{let D=this.localCategories.find(X=>this.findCategoryInPlay(X.categories,g));if(D){let X={category:D.id,categoryName:D.name,arrowColor:D.negative?this.negativeColor:D.color,arrowMarkerColor:D.negative?"url(#arrow-negative)":`url(#arrow-${D.id})`,markerColor:D.color,jersey:g.jersey_number,matchlapse:g.matchLapse,playerName:g.player_name,photo:g.photo,rivalLogo:g.rival_id,x1:D.invert.includes(g.categoryId)?100-g[`x${D.points[0]}`]:g[`x${D.points[0]}`],y1:D.invert.includes(g.categoryId)?100-g[`y${D.points[0]}`]:g[`y${D.points[0]}`],x2:D.invert.includes(g.categoryId)?100-g[`x${D.points[1]}`]:g[`x${D.points[1]}`],y2:D.invert.includes(g.categoryId)?100-g[`y${D.points[1]}`]:g[`y${D.points[1]}`],x3:D.invert.includes(g.categoryId)?100-g[`x${D.points[2]}`]:g[`x${D.points[2]}`],y3:D.invert.includes(g.categoryId)?100-g[`y${D.points[2]}`]:g[`y${D.points[2]}`],momentOfPlay:g.moment_of_play,isOwnGoal:D.invert.includes(g.categoryId),xGi:g.xGi,xGf:g.xGf};a.push(X)}return a},[])}},methods:{findCategoryInPlay(r,a){return r.find(g=>typeof g=="number"?g===a.categoryId:g.includes(a.categoryId))},onMouseOver(r,a){this.dataPlay.playerName=a.playerName||"",this.dataPlay.photo=a.photo||"",this.dataPlay.minute=parseInt(a.momentOfPlay.split(":")[0])||"",this.dataPlay.rivalLogo=a.rivalLogo||"",this.dataPlay.categoryName=a.categoryName||"",this.dataPlay.rivalName=this.rivalTeam.colloquial_name,this.dataPlay.xGi=String(a.xGi),this.dataPlay.xGf=String(a.xGf),this.dataPlay.isOwnGoal=a.isOwnGoal,this.data.visible=!0},onMouseLeave(){this.data.visible=!1}}},joe={class:"soccer-chalkboard-xg"},Uoe={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 490 684","xmlns:xlink":"http://www.w3.org/1999/xlink",class:"soccer-chalkboard"},qoe={xmlns:"http://www.w3.org/2000/svg",viewBox:"30 0 452 684","xmlns:xlink":"http://www.w3.org/1999/xlink"},Woe=["id"],Goe=["fill"],Hoe=["id"],Joe=["x1","y1","x2","y2","stroke"],Koe=["x1","y1","x2","y2","stroke","marker-end"],Xoe=["onMouseover"],Zoe=["x","y","fill"],Yoe=["x","y"];function Qoe(r,a,g,D,X,A){return h.resolveComponent("Tooltip"),h.openBlock(),h.createElementBlock("div",joe,[(h.openBlock(),h.createElementBlock("svg",Uoe,[(h.openBlock(),h.createElementBlock("svg",qoe,[h.createElementVNode("defs",null,[a[1]||(a[1]=h.createElementVNode("marker",{id:"arrow-negative",viewBox:"0 0 10 10",refX:"5",refY:"5",markerWidth:"6",markerHeight:"6",markerUnits:"strokeWidth",orient:"auto"},[h.createElementVNode("path",{d:"M 0 0 L 10 5 L 0 10 z","stroke-width":"2",fill:"red"})],-1)),(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(A.localCategories,b=>(h.openBlock(),h.createElementBlock("marker",{key:`arrow-color-${b.id}`,id:`arrow-${b.id}`,viewBox:"0 0 10 10",refX:"5",refY:"5",markerWidth:"6",markerHeight:"6",markerUnits:"strokeWidth",orient:"auto"},[h.createElementVNode("path",{d:"M 0 0 L 10 5 L 0 10 z","stroke-width":"2",fill:b.color},null,8,Goe)],8,Woe))),128)),a[2]||(a[2]=h.createElementVNode("pattern",{id:"fieldBackground",width:"1",height:"1",viewBox:"0 0 100 100",preserveAspectRatio:"none"},[h.createElementVNode("image",{"xlink:href":"https://golstatsimages.blob.core.windows.net/todoelfut/fieldbg.png",width:"100",height:"100",preserveAspectRatio:"none",id:"image2"})],-1))]),(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(A.graphPlays,b=>(h.openBlock(),h.createElementBlock("g",{key:b.id,id:`play-${b.playId}`},[h.createElementVNode("line",{x1:`${b.x1}%`,y1:`${b.y1}%`,x2:`${b.x2}%`,y2:`${b.y2}%`,stroke:b.arrowColor,"stroke-width":"2"},null,8,Joe),h.createElementVNode("line",{x1:`${b.x2}%`,y1:`${b.y2}%`,x2:`${b.x3}%`,y2:`${b.y3}%`,stroke:b.arrowColor,"stroke-width":"2","marker-end":b.arrowMarkerColor},null,8,Koe),h.createElementVNode("g",{onMouseover:e=>A.onMouseOver(e,b),onMouseleave:a[0]||(a[0]=(...e)=>A.onMouseLeave&&A.onMouseLeave(...e)),class:"is-pointer"},[h.createElementVNode("rect",{x:`${b.x1}%`,y:`${b.y1}%`,transform:"translate(-14, -14)",height:"28",width:"28","stroke-width":"2",fill:b.markerColor,stroke:"#999",rx:"14",ry:"14"},null,8,Zoe),h.createElementVNode("text",{"text-anchor":"middle","dominant-baseline":"middle",x:`${b.x1}%`,y:`${b.y1}%`,dy:"1","font-size":"15",fill:"#fff","font-family":"'Poppins-SemiBold', sans-serif"},h.toDisplayString(b.jersey),9,Yoe)],40,Xoe)],8,Hoe))),128))]))])),h.createCommentVNode("",!0)])}const $oe=Zg(Foe,[["render",Qoe],["__scopeId","data-v-6a97d30b"]]),x6=(r,a)=>{let g={};return r.forEach((D,X)=>{X==3&&(a[0]==35||a[0]==54)&&(a[X]==2?a[X]=1:a[X]=2),X==2&&(a[0]==35||a[0]==54)&&(a[X]==1?a[X]=2:a[X]==2&&(a[X]=1)),g[D]=a[X]}),g};(function(){function r(a,g,D){return typeof D>"u"||+D==0?Math[a](g):(g=+g,D=+D,isNaN(g)||!(typeof D=="number"&&D%1===0)?NaN:(g=g.toString().split("e"),g=Math[a](+(g[0]+"e"+(g[1]?+g[1]-D:-D))),g=g.toString().split("e"),+(g[0]+"e"+(g[1]?+g[1]+D:D))))}Math.ceil10||(Math.ceil10=function(a,g){return r("ceil",a,g)})})();function ese(r,a){let g=a*-1;return Math.ceil10(r,g)}const b6=[12,55,35,54],_6=[510],w6=[330,331,333,334,423,424,343,344],T6=[29,269],k6=new Set(b6),S6=new Set(_6),C6=new Set(w6),E6=new Set(T6),Yg=[{name:"Goles",color:"#336DFF",points:[1,2,3],categories:b6,invert:[35,54],negative:!1},{name:"Tiros a gol",color:"#7ED321",points:[1,2,3],categories:_6},{name:"Remates con cabeza",color:"#990BFF",points:[1,2,3],categories:w6},{name:"Penales",color:"#21BBD3",points:[1,2,3],categories:T6}],tse={name:"XgField",components:{SoccerChalkboard:$oe},props:{game:{type:Object,default:()=>({})},isTitleVisible:{type:Boolean,default:!0},isPostMatch:{type:Boolean,default:!0},containerWidth:{type:Number,default:0},isHomeTeamForAnalysis:{type:Boolean,default:!0},token:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"}},data(){return{categories:Yg,xgData:[],xgLocalPlays:[],xgAwayPlays:[]}},computed:{style(){return{"--flex-direction":this.containerWidth<478?"column":"row","--width-info":this.containerWidth<478?"100%":"40%","--padding-table-row":this.containerWidth<478?"0":"6px 0","--font-size-row":this.containerWidth<478?"8px":"10px"}},team(){return!this.game||!this.game.homeTeam||!this.game.awayTeam?{}:this.isHomeTeamForAnalysis?this.game.homeTeam:this.game.awayTeam},rivalTeam(){return!this.game||!this.game.homeTeam||!this.game.awayTeam?{}:this.isHomeTeamForAnalysis?this.game.awayTeam:this.game.homeTeam},xgPlays(){return this.isHomeTeamForAnalysis?this.xgLocalPlays:this.xgAwayPlays},goalsQty(){const r=Yg.find(a=>a.name==="Goles");return this.xgPlays.filter(a=>r.categories.includes(a.category_id)).length},shotsOnGoalQty(){return this.xgPlays.filter(r=>r.category_id===510).length},headQty(){const r=Yg.find(a=>a.name==="Remates con cabeza");return this.xgPlays.filter(a=>r.categories.includes(a.category_id)).length},penaltiesQty(){const r=Yg.find(a=>a.name==="Penales");return this.xgPlays.filter(a=>r.categories.includes(a.category_id)).length},xG(){const r=new Set;let a=this.xgPlays.reduce((g,D)=>(!r.has(D.moment_of_play)&&D.xG2&&(r.add(D.moment_of_play),g+=D.xG2||0),g),0);return ese(a,2)},gxInfoItems(){return[{title:"Goles",value:this.goalsQty},{title:"Tiros a Gol",value:this.shotsOnGoalQty},{title:"Remates con cabeza",value:this.headQty},{title:"Penales",value:this.penaltiesQty},{title:"Goles esperados (xG)",value:this.xG}]}},watch:{game:{handler(r,a){r&&r.id&&(!a||a.id!==r.id)&&this.fillXgData()},immediate:!0,deep:!0}},methods:{async fetchXgData(){try{const r=this.isPostMatch?`https://bzznnzehtf.execute-api.us-west-2.amazonaws.com/prod/xg/game/${this.game.id}/teams/${this.game.homeTeam.team_id}/${this.game.awayTeam.team_id}`:`https://bzznnzehtf.execute-api.us-west-2.amazonaws.com/prod/xg/seasons/${this.game.seasonId}/teams/${this.game.homeTeam.team_id}/${this.game.awayTeam.team_id}`;return await(await fetch(r,{method:"GET",headers:{Authorization:this.token}})).json()||{local_team:[],visiting_team:[],data_headers:[]}}catch(r){console.error("Error fetching xG data:",r)}},async fillXgData(){try{const r=await this.fetchXgData(),a=r.local_team.map(x=>x6(r.data_headers,x)),g=[],D=[],X=[],A=[],b=new Set;a.forEach(x=>{k6.has(x.category_id)?b.has(x.moment_of_play)||(b.add(x.moment_of_play),g.push(x)):S6.has(x.category_id)?D.push(x):C6.has(x.category_id)?X.push(x):E6.has(x.category_id)&&A.push(x)}),this.xgLocalPlays=[...D,...g,...X,...A];const e=r.visiting_team.map(x=>x6(r.data_headers,x)),v=new Set,u=[],t=[],w=[],y=[];e.forEach(x=>{k6.has(x.category_id)?v.has(x.moment_of_play)||(v.add(x.moment_of_play),u.push(x)):S6.has(x.category_id)?t.push(x):C6.has(x.category_id)?w.push(x):E6.has(x.category_id)&&y.push(x)}),this.xgAwayPlays=[...t,...u,...w,y]}catch(r){console.error("Error filling xG data:",r)}}},beforeMount(){if(!this.game||!this.game.id){console.warn("No game data provided for xG analysis.");return}this.fillXgData()}},rse={class:"xg-container__info"},nse={key:0,class:"title"},ise={class:"table"},ase={class:"table__row"},ose={class:"table__row__title"},sse={class:"table__row__value"},lse=["src"],cse={class:"table__row__title"},use={class:"table__row__value"},dse={key:1,class:"table-description"},pse={class:"xg-container__field"};function hse(r,a,g,D,X,A){const b=h.resolveComponent("SoccerChalkboard");return h.openBlock(),h.createElementBlock("div",{class:"xg-container",style:h.normalizeStyle(A.style)},[h.createElementVNode("div",rse,[g.isTitleVisible?(h.openBlock(),h.createElementBlock("div",nse,"Goles esperados (xG)")):h.createCommentVNode("",!0),h.createElementVNode("div",ise,[h.createElementVNode("div",ase,[h.createElementVNode("div",ose,h.toDisplayString(A.gxInfoItems[0].title),1),h.createElementVNode("div",sse,[h.createTextVNode(h.toDisplayString(A.gxInfoItems[0].value),1),h.createElementVNode("img",{class:"img-abs",src:r.stringSelectedTeamLogo},null,8,lse)])]),(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(A.gxInfoItems.slice(1),(e,v)=>(h.openBlock(),h.createElementBlock("div",{key:v,class:"table__row"},[h.createElementVNode("div",cse,h.toDisplayString(e.title),1),h.createElementVNode("div",use,h.toDisplayString(e.value),1)]))),128))]),g.containerWidth>478?(h.openBlock(),h.createElementBlock("div",dse,a[0]||(a[0]=[h.createElementVNode("span",null,"xG:",-1),h.createTextVNode(" es la medida para estimar la probabilidad de que un tiro o una jugada termine en gol, basándose en factores como la ubicación y la dificultad de la acción. ",-1)]))):h.createCommentVNode("",!0)]),h.createElementVNode("div",pse,[h.createVNode(b,{plays:A.xgPlays,categories:X.categories,team:A.team,"rival-team":A.rivalTeam},null,8,["plays","categories","team","rival-team"])])],4)}const fse=Zg(tse,[["render",hse],["__scopeId","data-v-c65308b3"]]);let M6=null;const mse={name:"XgMain",components:{SoccerChalkboard:fse},props:{game:{type:Object,default:()=>({})},isHomeTeamForAnalysis:{type:Boolean,default:!0},isTitleVisible:{type:Boolean,default:!1},isPostMatch:{type:Boolean,default:!0},token:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"}},data(){return{gamesContainerWidth:0,containerHeight:0}},methods:{setUpResizeObserver(){if(window.ResizeObserver)M6=new ResizeObserver(()=>{this.gamesContainerWidth=this.$refs.gamesContainer.clientWidth,this.containerHeight=this.$refs.gamesContainer.clientHeight}),M6.observe(this.$refs.gamesContainer);else throw new Error("Resize observer not supported!")}},mounted(){setTimeout(()=>{this.setUpResizeObserver()},100)}},gse={class:"xg",ref:"gamesContainer"};function yse(r,a,g,D,X,A){const b=h.resolveComponent("SoccerChalkboard");return h.openBlock(),h.createElementBlock("div",gse,[h.createVNode(b,{game:g.game,"container-width":X.gamesContainerWidth,"container-height":X.containerHeight,"is-home-team-for-analysis":g.isHomeTeamForAnalysis,"is-title-visible":g.isTitleVisible,"is-post-match":g.isPostMatch,token:g.token,class:"local"},null,8,["game","container-width","container-height","is-home-team-for-analysis","is-title-visible","is-post-match","token"])],512)}const A6=Zg(mse,[["render",yse],["__scopeId","data-v-7550c0dc"]]),vse={class:"tooltip-options"},xse={__name:"TooltipOptions",props:{optionsType:{type:String,default:"page"}},emits:["close-tooltip","change-sort","delete-page","edit","clone","delete"],setup(r,{emit:a}){const g=r,D=a,X=h.computed(()=>g.optionsType==="page");function A(){D("close-tooltip")}function b(e){D(e),A()}return(e,v)=>(h.openBlock(),h.createElementBlock(h.Fragment,null,[h.createElementVNode("div",{class:"tooltip-overlay",onClick:A}),h.createElementVNode("div",vse,[h.createElementVNode("ul",null,[X.value?(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[h.createElementVNode("li",{class:"option",onClick:v[0]||(v[0]=u=>b("change-sort"))},[...v[4]||(v[4]=[h.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/report-maker/icn-rename.svg",alt:"Renombrar template",class:"icon"},null,-1),h.createTextVNode(" Cambiar orden ",-1)])]),h.createElementVNode("li",{class:"option",onClick:v[1]||(v[1]=u=>b("delete-page"))},[...v[5]||(v[5]=[h.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/report-maker/icn-delete.svg",alt:"Eliminar template",class:"icon"},null,-1),h.createTextVNode(" Eliminar ",-1)])])],64)):(h.openBlock(),h.createElementBlock(h.Fragment,{key:1},[h.createElementVNode("li",{class:"option",onClick:v[2]||(v[2]=u=>b("edit"))},[...v[6]||(v[6]=[h.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/report-maker/icn-rename.svg",alt:"Renombrar template",class:"icon"},null,-1),h.createTextVNode(" Editar ",-1)])]),h.createElementVNode("li",{class:"option",onClick:v[3]||(v[3]=u=>b("delete"))},[...v[7]||(v[7]=[h.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/report-maker/icn-delete.svg",alt:"Eliminar template",class:"icon"},null,-1),h.createTextVNode(" Eliminar ",-1)])])],64))])])],64))}},L6=dd(xse,[["__scopeId","data-v-998e2429"]]),bse={class:"report-view"},_se={class:"report-view__header"},wse={class:"report-view__header__team-and-name"},Tse={key:0,class:"report-view__header__logo"},kse=["src"],Sse={class:"report-view__header__name"},Cse={class:"report-view__content"},Ese={__name:"ReportView",props:{title:{type:String,default:"Item name"},isEmpty:{type:Boolean,default:!1},isTemplateMode:{type:Boolean,default:!1},game:{type:Object,default:()=>null},isHomeTeam:{type:Boolean,default:!0},isFilterVisible:{type:Boolean,default:!1},viewId:{type:Number,default:0}},emits:["edit","delete"],setup(r,{emit:a}){const g=r,D=h.ref(!1),X=a,A=[1,2,3,4,6,8],b=h.computed(()=>!A.includes(g.viewId)),e=h.computed(()=>{if(g.game){const w=g.isHomeTeam?g.game.homeTeam:g.game.awayTeam;if(w&&w.logo)return w.logo}return""});function v(){t(),X("edit")}function u(){t(),X("delete")}function t(){D.value=!1}return(w,y)=>(h.openBlock(),h.createElementBlock("div",bse,[h.createElementVNode("div",_se,[D.value?(h.openBlock(),h.createBlock(L6,{key:0,"options-type":"view",onClick:y[0]||(y[0]=h.withModifiers(x=>D.value=!1,["self"])),onMouseleave:y[1]||(y[1]=x=>D.value=!1),onCloseTooltip:t,onEdit:v,onDelete:u})):h.createCommentVNode("",!0),h.createElementVNode("div",wse,[e.value&&b.value?(h.openBlock(),h.createElementBlock("div",Tse,[h.createElementVNode("img",{src:e.value,alt:""},null,8,kse)])):h.createCommentVNode("",!0),h.createElementVNode("div",Sse,h.toDisplayString(r.title),1)]),h.withDirectives(h.createElementVNode("div",{role:"button",class:"report-view__header__actions",onClick:y[2]||(y[2]=x=>D.value=!0)},[...y[3]||(y[3]=[h.createElementVNode("svg",{width:"17",height:"13",viewBox:"0 0 17 13",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[h.createElementVNode("path",{d:"M3.56953 6.28672C3.56953 7.19972 2.83253 7.93672 1.91953 7.93672C1.00653 7.93672 0.269531 7.19972 0.269531 6.28672C0.269531 5.37372 1.00653 4.63672 1.91953 4.63672C2.83253 4.63672 3.56953 5.37372 3.56953 6.28672ZM8.51953 4.63672C7.60653 4.63672 6.86953 5.37372 6.86953 6.28672C6.86953 7.19972 7.60653 7.93672 8.51953 7.93672C9.43253 7.93672 10.1695 7.19972 10.1695 6.28672C10.1695 5.37372 9.43253 4.63672 8.51953 4.63672ZM15.1195 4.63672C14.2065 4.63672 13.4695 5.37372 13.4695 6.28672C13.4695 7.19972 14.2065 7.93672 15.1195 7.93672C16.0325 7.93672 16.7695 7.19972 16.7695 6.28672C16.7695 5.37372 16.0325 4.63672 15.1195 4.63672Z",fill:"white"})],-1)])],512),[[h.vShow,r.isTemplateMode&&!r.isFilterVisible]])]),h.createElementVNode("div",Cse,[h.createElementVNode("div",{class:h.normalizeClass({"field-possession-component":r.viewId===8,"timeline-component":r.viewId===4,"field-data-by-zones-component":r.viewId===9})},[h.renderSlot(w.$slots,"default",{},void 0,!0)],2)])]))}},Mse=dd(Ese,[["__scopeId","data-v-d2181cf1"]]);function Ase(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Qg={exports:{}},R6;function Lse(){if(R6)return Qg.exports;R6=1;function r(){}return r.prototype={on:function(a,g,D){var X=this.e||(this.e={});return(X[a]||(X[a]=[])).push({fn:g,ctx:D}),this},once:function(a,g,D){var X=this;function A(){X.off(a,A),g.apply(D,arguments)}return A._=g,this.on(a,A,D)},emit:function(a){var g=[].slice.call(arguments,1),D=((this.e||(this.e={}))[a]||[]).slice(),X=0,A=D.length;for(X;X<A;X++)D[X].fn.apply(D[X].ctx,g);return this},off:function(a,g){var D=this.e||(this.e={}),X=D[a],A=[];if(X&&g)for(var b=0,e=X.length;b<e;b++)X[b].fn!==g&&X[b].fn._!==g&&A.push(X[b]);return A.length?D[a]=A:delete D[a],this}},Qg.exports=r,Qg.exports.TinyEmitter=r,Qg.exports}var q2,N6;function Rse(){if(N6)return q2;N6=1;var r=Lse();return q2=new r,q2}var Nse=Rse();const xi=Ase(Nse);function Ise(r,a,g,D,X){const A=(...b)=>(console.warn("gridstack.js: Function `"+g+"` is deprecated in "+X+" and has been replaced with `"+D+"`. It will be **removed** in a future release"),a.apply(r,b));return A.prototype=a.prototype,A}class zn{static getElements(a,g=document){if(typeof a=="string"){const D="getElementById"in g?g:void 0;if(D&&!isNaN(+a[0])){const A=D.getElementById(a);return A?[A]:[]}let X=g.querySelectorAll(a);return!X.length&&a[0]!=="."&&a[0]!=="#"&&(X=g.querySelectorAll("."+a),X.length||(X=g.querySelectorAll("#"+a))),Array.from(X)}return[a]}static getElement(a,g=document){if(typeof a=="string"){const D="getElementById"in g?g:void 0;if(!a.length)return null;if(D&&a[0]==="#")return D.getElementById(a.substring(1));if(a[0]==="#"||a[0]==="."||a[0]==="[")return g.querySelector(a);if(D&&!isNaN(+a[0]))return D.getElementById(a);let X=g.querySelector(a);return D&&!X&&(X=D.getElementById(a)),X||(X=g.querySelector("."+a)),X}return a}static lazyLoad(a){var g,D;return a.lazyLoad||((D=(g=a.grid)==null?void 0:g.opts)==null?void 0:D.lazyLoad)&&a.lazyLoad!==!1}static createDiv(a,g){const D=document.createElement("div");return a.forEach(X=>{X&&D.classList.add(X)}),g==null||g.appendChild(D),D}static shouldSizeToContent(a,g=!1){return(a==null?void 0:a.grid)&&(g?a.sizeToContent===!0||a.grid.opts.sizeToContent===!0&&a.sizeToContent===void 0:!!a.sizeToContent||a.grid.opts.sizeToContent&&a.sizeToContent!==!1)}static isIntercepted(a,g){return!(a.y>=g.y+g.h||a.y+a.h<=g.y||a.x+a.w<=g.x||a.x>=g.x+g.w)}static isTouching(a,g){return zn.isIntercepted(a,{x:g.x-.5,y:g.y-.5,w:g.w+1,h:g.h+1})}static areaIntercept(a,g){const D=a.x>g.x?a.x:g.x,X=a.x+a.w<g.x+g.w?a.x+a.w:g.x+g.w;if(X<=D)return 0;const A=a.y>g.y?a.y:g.y,b=a.y+a.h<g.y+g.h?a.y+a.h:g.y+g.h;return b<=A?0:(X-D)*(b-A)}static area(a){return a.w*a.h}static sort(a,g=1){return a.sort((D,X)=>{const A=g*((D.y??1e4)-(X.y??1e4));return A===0?g*((D.x??1e4)-(X.x??1e4)):A})}static find(a,g){return g?a.find(D=>D.id===g):void 0}static toBool(a){return typeof a=="boolean"?a:typeof a=="string"?(a=a.toLowerCase(),!(a===""||a==="no"||a==="false"||a==="0")):!!a}static toNumber(a){return a===null||a.length===0?void 0:Number(a)}static parseHeight(a){let g,D="px";if(typeof a=="string")if(a==="auto"||a==="")g=0;else{const X=a.match(/^(-[0-9]+\.[0-9]+|[0-9]*\.[0-9]+|-[0-9]+|[0-9]+)(px|em|rem|vh|vw|%|cm|mm)?$/);if(!X)throw new Error(`Invalid height val = ${a}`);D=X[2]||"px",g=parseFloat(X[1])}else g=a;return{h:g,unit:D}}static defaults(a,...g){return g.forEach(D=>{for(const X in D){if(!D.hasOwnProperty(X))return;a[X]===null||a[X]===void 0?a[X]=D[X]:typeof D[X]=="object"&&typeof a[X]=="object"&&zn.defaults(a[X],D[X])}}),a}static same(a,g){if(typeof a!="object")return a==g;if(typeof a!=typeof g||Object.keys(a).length!==Object.keys(g).length)return!1;for(const D in a)if(a[D]!==g[D])return!1;return!0}static copyPos(a,g,D=!1){return g.x!==void 0&&(a.x=g.x),g.y!==void 0&&(a.y=g.y),g.w!==void 0&&(a.w=g.w),g.h!==void 0&&(a.h=g.h),D&&(g.minW&&(a.minW=g.minW),g.minH&&(a.minH=g.minH),g.maxW&&(a.maxW=g.maxW),g.maxH&&(a.maxH=g.maxH)),a}static samePos(a,g){return a&&g&&a.x===g.x&&a.y===g.y&&(a.w||1)===(g.w||1)&&(a.h||1)===(g.h||1)}static sanitizeMinMax(a){a.minW||delete a.minW,a.minH||delete a.minH,a.maxW||delete a.maxW,a.maxH||delete a.maxH}static removeInternalAndSame(a,g){if(!(typeof a!="object"||typeof g!="object"))for(let D in a){const X=a[D],A=g[D];D[0]==="_"||X===A?delete a[D]:X&&typeof X=="object"&&A!==void 0&&(zn.removeInternalAndSame(X,A),Object.keys(X).length||delete a[D])}}static removeInternalForSave(a,g=!0){for(let D in a)(D[0]==="_"||a[D]===null||a[D]===void 0)&&delete a[D];delete a.grid,g&&delete a.el,a.autoPosition||delete a.autoPosition,a.noResize||delete a.noResize,a.noMove||delete a.noMove,a.locked||delete a.locked,(a.w===1||a.w===a.minW)&&delete a.w,(a.h===1||a.h===a.minH)&&delete a.h}static throttle(a,g){let D=!1;return(...X)=>{D||(D=!0,setTimeout(()=>{a(...X),D=!1},g))}}static removePositioningStyles(a){const g=a.style;g.position&&g.removeProperty("position"),g.left&&g.removeProperty("left"),g.top&&g.removeProperty("top"),g.width&&g.removeProperty("width"),g.height&&g.removeProperty("height")}static getScrollElement(a){if(!a)return document.scrollingElement||document.documentElement;const g=getComputedStyle(a);return/(auto|scroll)/.test(g.overflow+g.overflowY)?a:zn.getScrollElement(a.parentElement)}static updateScrollPosition(a,g,D){const X=zn.getScrollElement(a);if(!X)return;const A=a.getBoundingClientRect(),b=X.getBoundingClientRect(),e=window.innerHeight||document.documentElement.clientHeight,v=A.bottom-Math.min(b.bottom,e),u=A.top-Math.max(b.top,0),t=X.scrollTop;u<0&&D<0?a.offsetHeight>b.height?X.scrollTop+=D:X.scrollTop+=Math.abs(u)>Math.abs(D)?D:u:v>0&&D>0&&(a.offsetHeight>b.height?X.scrollTop+=D:X.scrollTop+=v>D?D:v),g.top+=X.scrollTop-t}static updateScrollResize(a,g,D){const X=zn.getScrollElement(g),A=X.clientHeight,b=X===zn.getScrollElement()?0:X.getBoundingClientRect().top,e=a.clientY-b,v=e<D,u=e>A-D;v?X.scrollBy({behavior:"smooth",top:e-D}):u&&X.scrollBy({behavior:"smooth",top:D-(A-e)})}static clone(a){return a==null||typeof a!="object"?a:a instanceof Array?[...a]:{...a}}static cloneDeep(a){const g=["parentGrid","el","grid","subGrid","engine"],D=zn.clone(a);for(const X in D)D.hasOwnProperty(X)&&typeof D[X]=="object"&&X.substring(0,2)!=="__"&&!g.find(A=>A===X)&&(D[X]=zn.cloneDeep(a[X]));return D}static cloneNode(a){const g=a.cloneNode(!0);return g.removeAttribute("id"),g}static appendTo(a,g){let D;typeof g=="string"?D=zn.getElement(g):D=g,D&&D.appendChild(a)}static addElStyles(a,g){if(g instanceof Object)for(const D in g)g.hasOwnProperty(D)&&(Array.isArray(g[D])?g[D].forEach(X=>{a.style[D]=X}):a.style[D]=g[D])}static initEvent(a,g){const D={type:g.type},X={button:0,which:0,buttons:1,bubbles:!0,cancelable:!0,target:g.target?g.target:a.target};return["altKey","ctrlKey","metaKey","shiftKey"].forEach(A=>D[A]=a[A]),["pageX","pageY","clientX","clientY","screenX","screenY"].forEach(A=>D[A]=a[A]),{...D,...X}}static simulateMouseEvent(a,g,D){const X=a,A=new MouseEvent(g,{bubbles:!0,composed:!0,cancelable:!0,view:window,detail:1,screenX:a.screenX,screenY:a.screenY,clientX:a.clientX,clientY:a.clientY,ctrlKey:X.ctrlKey??!1,altKey:X.altKey??!1,shiftKey:X.shiftKey??!1,metaKey:X.metaKey??!1,button:0,relatedTarget:a.target});(D||a.target).dispatchEvent(A)}static getValuesFromTransformedElement(a){const g=document.createElement("div");zn.addElStyles(g,{opacity:"0",position:"fixed",top:"0px",left:"0px",width:"1px",height:"1px",zIndex:"-999999"}),a.appendChild(g);const D=g.getBoundingClientRect();return a.removeChild(g),g.remove(),{xScale:1/D.width,yScale:1/D.height,xOffset:D.left,yOffset:D.top}}static swap(a,g,D){if(!a)return;const X=a[g];a[g]=a[D],a[D]=X}static canBeRotated(a){var g;return!(!a||a.w===a.h||a.locked||a.noResize||(g=a.grid)!=null&&g.opts.disableResize||a.minW&&a.minW===a.maxW||a.minH&&a.minH===a.maxH)}}class Dd{constructor(a={}){this.addedNodes=[],this.removedNodes=[],this.defaultColumn=12,this.column=a.column||this.defaultColumn,this.column>this.defaultColumn&&(this.defaultColumn=this.column),this.maxRow=a.maxRow,this._float=a.float,this.nodes=a.nodes||[],this.onChange=a.onChange}batchUpdate(a=!0,g=!0){return!!this.batchMode===a?this:(this.batchMode=a,a?(this._prevFloat=this._float,this._float=!0,this.cleanNodes(),this.saveInitial()):(this._float=this._prevFloat,delete this._prevFloat,g&&this._packNodes(),this._notify()),this)}_useEntireRowArea(a,g){return(!this.float||this.batchMode&&!this._prevFloat)&&!this._hasLocked&&(!a._moving||a._skipDown||g.y<=a.y)}_fixCollisions(a,g=a,D,X={}){if(this.sortNodes(-1),D=D||this.collide(a,g),!D)return!1;if(a._moving&&!X.nested&&!this.float&&this.swap(a,D))return!0;let A=g;!this._loading&&this._useEntireRowArea(a,g)&&(A={x:0,w:this.column,y:g.y,h:g.h},D=this.collide(a,A,X.skip));let b=!1;const e={nested:!0,pack:!1};let v=0;for(;D=D||this.collide(a,A,X.skip);){if(v++>this.nodes.length*2)throw new Error("Infinite collide check");let u;if(D.locked||this._loading||a._moving&&!a._skipDown&&g.y>a.y&&!this.float&&(!this.collide(D,{...D,y:a.y},a)||!this.collide(D,{...D,y:g.y-D.h},a))){a._skipDown=a._skipDown||g.y>a.y;const t={...g,y:D.y+D.h,...e};u=this._loading&&zn.samePos(a,t)?!0:this.moveNode(a,t),(D.locked||this._loading)&&u?zn.copyPos(g,a):!D.locked&&u&&X.pack&&(this._packNodes(),g.y=D.y+D.h,zn.copyPos(a,g)),b=b||u}else u=this.moveNode(D,{...D,y:g.y+g.h,skip:a,...e});if(!u)return b;D=void 0}return b}collide(a,g=a,D){const X=a._id,A=D==null?void 0:D._id;return this.nodes.find(b=>b._id!==X&&b._id!==A&&zn.isIntercepted(b,g))}collideAll(a,g=a,D){const X=a._id,A=D==null?void 0:D._id;return this.nodes.filter(b=>b._id!==X&&b._id!==A&&zn.isIntercepted(b,g))}directionCollideCoverage(a,g,D){if(!g.rect||!a._rect)return;const X=a._rect,A={...g.rect};A.y>X.y?(A.h+=A.y-X.y,A.y=X.y):A.h+=X.y-A.y,A.x>X.x?(A.w+=A.x-X.x,A.x=X.x):A.w+=X.x-A.x;let b,e=.5;for(let v of D){if(v.locked||!v._rect)break;const u=v._rect;let t=Number.MAX_VALUE,w=Number.MAX_VALUE;X.y<u.y?t=(A.y+A.h-u.y)/u.h:X.y+X.h>u.y+u.h&&(t=(u.y+u.h-A.y)/u.h),X.x<u.x?w=(A.x+A.w-u.x)/u.w:X.x+X.w>u.x+u.w&&(w=(u.x+u.w-A.x)/u.w);const y=Math.min(w,t);y>e&&(e=y,b=v)}return g.collide=b,b}cacheRects(a,g,D,X,A,b){return this.nodes.forEach(e=>e._rect={y:e.y*g+D,x:e.x*a+b,w:e.w*a-b-X,h:e.h*g-D-A}),this}swap(a,g){if(!g||g.locked||!a||a.locked)return!1;function D(){const A=g.x,b=g.y;return g.x=a.x,g.y=a.y,a.h!=g.h?(a.x=A,a.y=g.y+g.h):a.w!=g.w?(a.x=g.x+g.w,a.y=b):(a.x=A,a.y=b),a._dirty=g._dirty=!0,!0}let X;if(a.w===g.w&&a.h===g.h&&(a.x===g.x||a.y===g.y)&&(X=zn.isTouching(a,g)))return D();if(X!==!1){if(a.w===g.w&&a.x===g.x&&(X||(X=zn.isTouching(a,g)))){if(g.y<a.y){const A=a;a=g,g=A}return D()}if(X!==!1){if(a.h===g.h&&a.y===g.y&&(X||(X=zn.isTouching(a,g)))){if(g.x<a.x){const A=a;a=g,g=A}return D()}return!1}}}isAreaEmpty(a,g,D,X){const A={x:a||0,y:g||0,w:D||1,h:X||1};return!this.collide(A)}compact(a="compact",g=!0){if(this.nodes.length===0)return this;g&&this.sortNodes();const D=this.batchMode;D||this.batchUpdate();const X=this._inColumnResize;X||(this._inColumnResize=!0);const A=this.nodes;return this.nodes=[],A.forEach((b,e,v)=>{let u;b.locked||(b.autoPosition=!0,a==="list"&&e&&(u=v[e-1])),this.addNode(b,!1,u)}),X||delete this._inColumnResize,D||this.batchUpdate(!1),this}set float(a){this._float!==a&&(this._float=a||!1,a||this._packNodes()._notify())}get float(){return this._float||!1}sortNodes(a=1){return this.nodes=zn.sort(this.nodes,a),this}_packNodes(){return this.batchMode?this:(this.sortNodes(),this.float?this.nodes.forEach(a=>{if(a._updating||a._orig===void 0||a.y===a._orig.y)return;let g=a.y;for(;g>a._orig.y;)--g,this.collide(a,{x:a.x,y:g,w:a.w,h:a.h})||(a._dirty=!0,a.y=g)}):this.nodes.forEach((a,g)=>{if(!a.locked)for(;a.y>0;){const D=g===0?0:a.y-1;if(!(g===0||!this.collide(a,{x:a.x,y:D,w:a.w,h:a.h})))break;a._dirty=a.y!==D,a.y=D}}),this)}prepareNode(a,g){a._id=a._id??Dd._idSeq++;const D=a.id;if(D){let A=1;for(;this.nodes.find(b=>b.id===a.id&&b!==a);)a.id=D+"_"+A++}(a.x===void 0||a.y===void 0||a.x===null||a.y===null)&&(a.autoPosition=!0);const X={x:0,y:0,w:1,h:1};return zn.defaults(a,X),a.autoPosition||delete a.autoPosition,a.noResize||delete a.noResize,a.noMove||delete a.noMove,zn.sanitizeMinMax(a),typeof a.x=="string"&&(a.x=Number(a.x)),typeof a.y=="string"&&(a.y=Number(a.y)),typeof a.w=="string"&&(a.w=Number(a.w)),typeof a.h=="string"&&(a.h=Number(a.h)),isNaN(a.x)&&(a.x=X.x,a.autoPosition=!0),isNaN(a.y)&&(a.y=X.y,a.autoPosition=!0),isNaN(a.w)&&(a.w=X.w),isNaN(a.h)&&(a.h=X.h),this.nodeBoundFix(a,g),a}nodeBoundFix(a,g){const D=a._orig||zn.copyPos({},a);if(a.maxW&&(a.w=Math.min(a.w||1,a.maxW)),a.maxH&&(a.h=Math.min(a.h||1,a.maxH)),a.minW&&(a.w=Math.max(a.w||1,a.minW)),a.minH&&(a.h=Math.max(a.h||1,a.minH)),(a.x||0)+(a.w||1)>this.column&&this.column<this.defaultColumn&&!this._inColumnResize&&!this.skipCacheUpdate&&a._id!=null&&this.findCacheLayout(a,this.defaultColumn)===-1){const X={...a};X.autoPosition||X.x===void 0?(delete X.x,delete X.y):X.x=Math.min(this.defaultColumn-1,X.x),X.w=Math.min(this.defaultColumn,X.w||1),this.cacheOneLayout(X,this.defaultColumn)}return a.w>this.column?a.w=this.column:a.w<1&&(a.w=1),this.maxRow&&a.h>this.maxRow?a.h=this.maxRow:a.h<1&&(a.h=1),a.x<0&&(a.x=0),a.y<0&&(a.y=0),a.x+a.w>this.column&&(g?a.w=this.column-a.x:a.x=this.column-a.w),this.maxRow&&a.y+a.h>this.maxRow&&(g?a.h=this.maxRow-a.y:a.y=this.maxRow-a.h),zn.samePos(a,D)||(a._dirty=!0),this}getDirtyNodes(a){return a?this.nodes.filter(g=>g._dirty&&!zn.samePos(g,g._orig)):this.nodes.filter(g=>g._dirty)}_notify(a){if(this.batchMode||!this.onChange)return this;const g=(a||[]).concat(this.getDirtyNodes());return this.onChange(g),this}cleanNodes(){return this.batchMode?this:(this.nodes.forEach(a=>{delete a._dirty,delete a._lastTried}),this)}saveInitial(){return this.nodes.forEach(a=>{a._orig=zn.copyPos({},a),delete a._dirty}),this._hasLocked=this.nodes.some(a=>a.locked),this}restoreInitial(){return this.nodes.forEach(a=>{!a._orig||zn.samePos(a,a._orig)||(zn.copyPos(a,a._orig),a._dirty=!0)}),this._notify(),this}findEmptyPosition(a,g=this.nodes,D=this.column,X){const A=X?X.y*D+(X.x+X.w):0;let b=!1;for(let e=A;!b;++e){const v=e%D,u=Math.floor(e/D);if(v+a.w>D)continue;const t={x:v,y:u,w:a.w,h:a.h};g.find(w=>zn.isIntercepted(t,w))||((a.x!==v||a.y!==u)&&(a._dirty=!0),a.x=v,a.y=u,delete a.autoPosition,b=!0)}return b}addNode(a,g=!1,D){const X=this.nodes.find(b=>b._id===a._id);if(X)return X;this._inColumnResize?this.nodeBoundFix(a):this.prepareNode(a),delete a._temporaryRemoved,delete a._removeDOM;let A;return a.autoPosition&&this.findEmptyPosition(a,this.nodes,this.column,D)&&(delete a.autoPosition,A=!0),this.nodes.push(a),g&&this.addedNodes.push(a),A||this._fixCollisions(a),this.batchMode||this._packNodes()._notify(),a}removeNode(a,g=!0,D=!1){return this.nodes.find(X=>X._id===a._id)?(D&&this.removedNodes.push(a),g&&(a._removeDOM=!0),this.nodes=this.nodes.filter(X=>X._id!==a._id),a._isAboutToRemove||this._packNodes(),this._notify([a]),this):this}removeAll(a=!0,g=!0){if(delete this._layouts,!this.nodes.length)return this;a&&this.nodes.forEach(X=>X._removeDOM=!0);const D=this.nodes;return this.removedNodes=g?D:[],this.nodes=[],this._notify(D)}moveNodeCheck(a,g){if(!this.changedPosConstrain(a,g))return!1;if(g.pack=!0,!this.maxRow)return this.moveNode(a,g);let D;const X=new Dd({column:this.column,float:this.float,nodes:this.nodes.map(b=>b._id===a._id?(D={...b},D):{...b})});if(!D)return!1;const A=X.moveNode(D,g)&&X.getRow()<=Math.max(this.getRow(),this.maxRow);if(!A&&!g.resizing&&g.collide){const b=g.collide.el.gridstackNode;if(this.swap(a,b))return this._notify(),!0}return A?(X.nodes.filter(b=>b._dirty).forEach(b=>{const e=this.nodes.find(v=>v._id===b._id);e&&(zn.copyPos(e,b),e._dirty=!0)}),this._notify(),!0):!1}willItFit(a){if(delete a._willFitPos,!this.maxRow)return!0;const g=new Dd({column:this.column,float:this.float,nodes:this.nodes.map(X=>({...X}))}),D={...a};return this.cleanupNode(D),delete D.el,delete D._id,delete D.content,delete D.grid,g.addNode(D),g.getRow()<=this.maxRow?(a._willFitPos=zn.copyPos({},D),!0):!1}changedPosConstrain(a,g){return g.w=g.w||a.w,g.h=g.h||a.h,a.x!==g.x||a.y!==g.y?!0:(a.maxW&&(g.w=Math.min(g.w,a.maxW)),a.maxH&&(g.h=Math.min(g.h,a.maxH)),a.minW&&(g.w=Math.max(g.w,a.minW)),a.minH&&(g.h=Math.max(g.h,a.minH)),a.w!==g.w||a.h!==g.h)}moveNode(a,g){var D,X;if(!a||!g)return!1;let A;g.pack===void 0&&!this.batchMode&&(A=g.pack=!0),typeof g.x!="number"&&(g.x=a.x),typeof g.y!="number"&&(g.y=a.y),typeof g.w!="number"&&(g.w=a.w),typeof g.h!="number"&&(g.h=a.h);const b=a.w!==g.w||a.h!==g.h,e=zn.copyPos({},a,!0);if(zn.copyPos(e,g),this.nodeBoundFix(e,b),zn.copyPos(g,e),!g.forceCollide&&zn.samePos(a,g))return!1;const v=zn.copyPos({},a),u=this.collideAll(a,e,g.skip);let t=!0;if(u.length){const w=a._moving&&!g.nested;let y=w?this.directionCollideCoverage(a,g,u):u[0];if(w&&y&&(X=(D=a.grid)==null?void 0:D.opts)!=null&&X.subGridDynamic&&!a.grid._isTemp){const x=zn.areaIntercept(g.rect,y._rect),p=zn.area(g.rect),n=zn.area(y._rect);x/(p<n?p:n)>.8&&(y.grid.makeSubGrid(y.el,void 0,a),y=void 0)}y?t=!this._fixCollisions(a,e,y,g):(t=!1,A&&delete g.pack)}return t&&!zn.samePos(a,e)&&(a._dirty=!0,zn.copyPos(a,e)),g.pack&&this._packNodes()._notify(),!zn.samePos(a,v)}getRow(){return this.nodes.reduce((a,g)=>Math.max(a,g.y+g.h),0)}beginUpdate(a){return a._updating||(a._updating=!0,delete a._skipDown,this.batchMode||this.saveInitial()),this}endUpdate(){const a=this.nodes.find(g=>g._updating);return a&&(delete a._updating,delete a._skipDown),this}save(a=!0,g,D){var X;const A=((X=this._layouts)==null?void 0:X.length)||0;let b;A&&(D?D!==this.column&&(b=this._layouts[D]):this.column!==A-1&&(b=this._layouts[A-1]));const e=[];return this.sortNodes(),this.nodes.forEach(v=>{const u=b==null?void 0:b.find(w=>w._id===v._id),t={...v,...u||{}};zn.removeInternalForSave(t,!a),g&&g(v,t),e.push(t)}),e}layoutsNodesChange(a){return!this._layouts||this._inColumnResize?this:(this._layouts.forEach((g,D)=>{if(!g||D===this.column)return this;if(D<this.column)this._layouts[D]=void 0;else{const X=D/this.column;a.forEach(A=>{if(!A._orig)return;const b=g.find(e=>e._id===A._id);b&&(b.y>=0&&A.y!==A._orig.y&&(b.y+=A.y-A._orig.y),A.x!==A._orig.x&&(b.x=Math.round(A.x*X)),A.w!==A._orig.w&&(b.w=Math.round(A.w*X)))})}}),this)}columnChanged(a,g,D="moveScale"){var X;if(!this.nodes.length||!g||a===g)return this;const A=D==="compact"||D==="list";A&&this.sortNodes(1),g<a&&this.cacheLayout(this.nodes,a),this.batchUpdate();let b=[],e=A?this.nodes:zn.sort(this.nodes,-1);if(g>a&&this._layouts){const v=this._layouts[g]||[],u=this._layouts.length-1;!v.length&&a!==u&&(X=this._layouts[u])!=null&&X.length&&(a=u,this._layouts[u].forEach(t=>{const w=e.find(y=>y._id===t._id);w&&(!A&&!t.autoPosition&&(w.x=t.x??w.x,w.y=t.y??w.y),w.w=t.w??w.w,(t.x==null||t.y===void 0)&&(w.autoPosition=!0))})),v.forEach(t=>{const w=e.findIndex(y=>y._id===t._id);if(w!==-1){const y=e[w];if(A){y.w=t.w;return}(t.autoPosition||isNaN(t.x)||isNaN(t.y))&&this.findEmptyPosition(t,b),t.autoPosition||(y.x=t.x??y.x,y.y=t.y??y.y,y.w=t.w??y.w,b.push(y)),e.splice(w,1)}})}if(A)this.compact(D,!1);else{if(e.length)if(typeof D=="function")D(g,a,b,e);else{const v=A||D==="none"?1:g/a,u=D==="move"||D==="moveScale",t=D==="scale"||D==="moveScale";e.forEach(w=>{w.x=g===1?0:u?Math.round(w.x*v):Math.min(w.x,g-1),w.w=g===1||a===1?1:t?Math.round(w.w*v)||1:Math.min(w.w,g),b.push(w)}),e=[]}b=zn.sort(b,-1),this._inColumnResize=!0,this.nodes=[],b.forEach(v=>{this.addNode(v,!1),delete v._orig})}return this.nodes.forEach(v=>delete v._orig),this.batchUpdate(!1,!A),delete this._inColumnResize,this}cacheLayout(a,g,D=!1){const X=[];return a.forEach((A,b)=>{if(A._id===void 0){const e=A.id?this.nodes.find(v=>v.id===A.id):void 0;A._id=(e==null?void 0:e._id)??Dd._idSeq++}X[b]={x:A.x,y:A.y,w:A.w,_id:A._id}}),this._layouts=D?[]:this._layouts||[],this._layouts[g]=X,this}cacheOneLayout(a,g){a._id=a._id??Dd._idSeq++;const D={x:a.x,y:a.y,w:a.w,_id:a._id};(a.autoPosition||a.x===void 0)&&(delete D.x,delete D.y,a.autoPosition&&(D.autoPosition=!0)),this._layouts=this._layouts||[],this._layouts[g]=this._layouts[g]||[];const X=this.findCacheLayout(a,g);return X===-1?this._layouts[g].push(D):this._layouts[g][X]=D,this}findCacheLayout(a,g){var D,X;return((X=(D=this._layouts)==null?void 0:D[g])==null?void 0:X.findIndex(A=>A._id===a._id))??-1}removeNodeFromLayoutCache(a){if(this._layouts)for(let g=0;g<this._layouts.length;g++){const D=this.findCacheLayout(a,g);D!==-1&&this._layouts[g].splice(D,1)}}cleanupNode(a){for(const g in a)g[0]==="_"&&g!=="_id"&&delete a[g];return this}}Dd._idSeq=0;const Mu={alwaysShowResizeHandle:"mobile",animate:!0,auto:!0,cellHeight:"auto",cellHeightThrottle:100,cellHeightUnit:"px",column:12,draggable:{handle:".grid-stack-item-content",appendTo:"body",scroll:!0},handle:".grid-stack-item-content",itemClass:"grid-stack-item",margin:10,marginUnit:"px",maxRow:0,minRow:0,placeholderClass:"grid-stack-placeholder",placeholderText:"",removableOptions:{accept:"grid-stack-item",decline:"grid-stack-non-removable"},resizable:{handles:"se"},rtl:"auto"};class Zi{}const $u=typeof window<"u"&&typeof document<"u"&&("ontouchstart"in document||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0);class _d{}function $g(r,a){r.touches.length>1||(r.cancelable&&r.preventDefault(),zn.simulateMouseEvent(r.changedTouches[0],a))}function I6(r,a){r.cancelable&&r.preventDefault(),zn.simulateMouseEvent(r,a)}function ey(r){_d.touchHandled||(_d.touchHandled=!0,$g(r,"mousedown"))}function ty(r){_d.touchHandled&&$g(r,"mousemove")}function ry(r){if(!_d.touchHandled)return;_d.pointerLeaveTimeout&&(window.clearTimeout(_d.pointerLeaveTimeout),delete _d.pointerLeaveTimeout);const a=!!Zi.dragElement;$g(r,"mouseup"),a||$g(r,"click"),_d.touchHandled=!1}function ny(r){r.pointerType!=="mouse"&&r.target.releasePointerCapture(r.pointerId)}function P6(r){Zi.dragElement&&r.pointerType!=="mouse"&&I6(r,"mouseenter")}function O6(r){Zi.dragElement&&r.pointerType!=="mouse"&&(_d.pointerLeaveTimeout=window.setTimeout(()=>{delete _d.pointerLeaveTimeout,I6(r,"mouseleave")},10))}class iy{constructor(a,g,D){this.host=a,this.dir=g,this.option=D,this.moving=!1,this._mouseDown=this._mouseDown.bind(this),this._mouseMove=this._mouseMove.bind(this),this._mouseUp=this._mouseUp.bind(this),this._keyEvent=this._keyEvent.bind(this),this._init()}_init(){const a=this.el=document.createElement("div");return a.classList.add("ui-resizable-handle"),a.classList.add(`${iy.prefix}${this.dir}`),a.style.zIndex="100",a.style.userSelect="none",this.host.appendChild(this.el),this.el.addEventListener("mousedown",this._mouseDown),$u&&(this.el.addEventListener("touchstart",ey),this.el.addEventListener("pointerdown",ny)),this}destroy(){return this.moving&&this._mouseUp(this.mouseDownEvent),this.el.removeEventListener("mousedown",this._mouseDown),$u&&(this.el.removeEventListener("touchstart",ey),this.el.removeEventListener("pointerdown",ny)),this.host.removeChild(this.el),delete this.el,delete this.host,this}_mouseDown(a){this.mouseDownEvent=a,document.addEventListener("mousemove",this._mouseMove,{capture:!0,passive:!0}),document.addEventListener("mouseup",this._mouseUp,!0),$u&&(this.el.addEventListener("touchmove",ty),this.el.addEventListener("touchend",ry)),a.stopPropagation(),a.preventDefault()}_mouseMove(a){const g=this.mouseDownEvent;this.moving?this._triggerEvent("move",a):Math.abs(a.x-g.x)+Math.abs(a.y-g.y)>2&&(this.moving=!0,this._triggerEvent("start",this.mouseDownEvent),this._triggerEvent("move",a),document.addEventListener("keydown",this._keyEvent)),a.stopPropagation()}_mouseUp(a){this.moving&&(this._triggerEvent("stop",a),document.removeEventListener("keydown",this._keyEvent)),document.removeEventListener("mousemove",this._mouseMove,!0),document.removeEventListener("mouseup",this._mouseUp,!0),$u&&(this.el.removeEventListener("touchmove",ty),this.el.removeEventListener("touchend",ry)),delete this.moving,delete this.mouseDownEvent,a.stopPropagation(),a.preventDefault()}_keyEvent(a){var g,D;a.key==="Escape"&&((D=(g=this.host.gridstackNode)==null?void 0:g.grid)==null||D.engine.restoreInitial(),this._mouseUp(this.mouseDownEvent))}_triggerEvent(a,g){return this.option[a]&&this.option[a](g),this}}iy.prefix="ui-resizable-";class W2{constructor(){this._eventRegister={}}get disabled(){return this._disabled}on(a,g){this._eventRegister[a]=g}off(a){delete this._eventRegister[a]}enable(){this._disabled=!1}disable(){this._disabled=!0}destroy(){delete this._eventRegister}triggerEvent(a,g){if(!this.disabled&&this._eventRegister&&this._eventRegister[a])return this._eventRegister[a](g)}}class rm extends W2{constructor(a,g={}){super(),this.el=a,this.option=g,this.rectScale={x:1,y:1},this._ui=()=>{const D=this.el.parentElement.getBoundingClientRect(),X={width:this.originalRect.width,height:this.originalRect.height+this.scrolled,left:this.originalRect.left,top:this.originalRect.top-this.scrolled},A=this.temporalRect||X;return{position:{left:(A.left-D.left)*this.rectScale.x,top:(A.top-D.top)*this.rectScale.y},size:{width:A.width*this.rectScale.x,height:A.height*this.rectScale.y}}},this._mouseOver=this._mouseOver.bind(this),this._mouseOut=this._mouseOut.bind(this),this.enable(),this._setupAutoHide(this.option.autoHide),this._setupHandlers()}on(a,g){super.on(a,g)}off(a){super.off(a)}enable(){super.enable(),this.el.classList.remove("ui-resizable-disabled"),this._setupAutoHide(this.option.autoHide)}disable(){super.disable(),this.el.classList.add("ui-resizable-disabled"),this._setupAutoHide(!1)}destroy(){this._removeHandlers(),this._setupAutoHide(!1),delete this.el,super.destroy()}updateOption(a){const g=a.handles&&a.handles!==this.option.handles,D=a.autoHide&&a.autoHide!==this.option.autoHide;return Object.keys(a).forEach(X=>this.option[X]=a[X]),g&&(this._removeHandlers(),this._setupHandlers()),D&&this._setupAutoHide(this.option.autoHide),this}_setupAutoHide(a){return a?(this.el.classList.add("ui-resizable-autohide"),this.el.addEventListener("mouseover",this._mouseOver),this.el.addEventListener("mouseout",this._mouseOut)):(this.el.classList.remove("ui-resizable-autohide"),this.el.removeEventListener("mouseover",this._mouseOver),this.el.removeEventListener("mouseout",this._mouseOut),Zi.overResizeElement===this&&delete Zi.overResizeElement),this}_mouseOver(a){Zi.overResizeElement||Zi.dragElement||(Zi.overResizeElement=this,this.el.classList.remove("ui-resizable-autohide"))}_mouseOut(a){Zi.overResizeElement===this&&(delete Zi.overResizeElement,this.el.classList.add("ui-resizable-autohide"))}_setupHandlers(){return this.handlers=this.option.handles.split(",").map(a=>a.trim()).map(a=>new iy(this.el,a,{start:g=>{this._resizeStart(g)},stop:g=>{this._resizeStop(g)},move:g=>{this._resizing(g,a)}})),this}_resizeStart(a){this.sizeToContent=zn.shouldSizeToContent(this.el.gridstackNode,!0),this.originalRect=this.el.getBoundingClientRect(),this.scrollEl=zn.getScrollElement(this.el),this.scrollY=this.scrollEl.scrollTop,this.scrolled=0,this.startEvent=a,this._setupHelper(),this._applyChange();const g=zn.initEvent(a,{type:"resizestart",target:this.el});return this.option.start&&this.option.start(g,this._ui()),this.el.classList.add("ui-resizable-resizing"),this.triggerEvent("resizestart",g),this}_resizing(a,g){this.scrolled=this.scrollEl.scrollTop-this.scrollY,this.temporalRect=this._getChange(a,g),this._applyChange();const D=zn.initEvent(a,{type:"resize",target:this.el});return this.option.resize&&this.option.resize(D,this._ui()),this.triggerEvent("resize",D),this}_resizeStop(a){const g=zn.initEvent(a,{type:"resizestop",target:this.el});return this._cleanHelper(),this.option.stop&&this.option.stop(g),this.el.classList.remove("ui-resizable-resizing"),this.triggerEvent("resizestop",g),delete this.startEvent,delete this.originalRect,delete this.temporalRect,delete this.scrollY,delete this.scrolled,this}_setupHelper(){this.elOriginStyleVal=rm._originStyleProp.map(D=>this.el.style[D]),this.parentOriginStylePosition=this.el.parentElement.style.position;const a=this.el.parentElement,g=zn.getValuesFromTransformedElement(a);return this.rectScale={x:g.xScale,y:g.yScale},getComputedStyle(this.el.parentElement).position.match(/static/)&&(this.el.parentElement.style.position="relative"),this.el.style.position="absolute",this.el.style.opacity="0.8",this}_cleanHelper(){return rm._originStyleProp.forEach((a,g)=>{this.el.style[a]=this.elOriginStyleVal[g]||null}),this.el.parentElement.style.position=this.parentOriginStylePosition||null,this}_getChange(a,g){const D=this.startEvent,X={width:this.originalRect.width,height:this.originalRect.height+this.scrolled,left:this.originalRect.left,top:this.originalRect.top-this.scrolled},A=a.clientX-D.clientX,b=this.sizeToContent?0:a.clientY-D.clientY;let e,v;g.indexOf("e")>-1?X.width+=A:g.indexOf("w")>-1&&(X.width-=A,X.left+=A,e=!0),g.indexOf("s")>-1?X.height+=b:g.indexOf("n")>-1&&(X.height-=b,X.top+=b,v=!0);const u=this._constrainSize(X.width,X.height,e,v);return Math.round(X.width)!==Math.round(u.width)&&(g.indexOf("w")>-1&&(X.left+=X.width-u.width),X.width=u.width),Math.round(X.height)!==Math.round(u.height)&&(g.indexOf("n")>-1&&(X.top+=X.height-u.height),X.height=u.height),X}_constrainSize(a,g,D,X){const A=this.option,b=(D?A.maxWidthMoveLeft:A.maxWidth)||Number.MAX_SAFE_INTEGER,e=A.minWidth/this.rectScale.x||a,v=(X?A.maxHeightMoveUp:A.maxHeight)||Number.MAX_SAFE_INTEGER,u=A.minHeight/this.rectScale.y||g,t=Math.min(b,Math.max(e,a)),w=Math.min(v,Math.max(u,g));return{width:t,height:w}}_applyChange(){let a={left:0,top:0,width:0,height:0};if(this.el.style.position==="absolute"){const g=this.el.parentElement,{left:D,top:X}=g.getBoundingClientRect();a={left:D,top:X,width:0,height:0}}return this.temporalRect?(Object.keys(this.temporalRect).forEach(g=>{const D=this.temporalRect[g],X=g==="width"||g==="left"?this.rectScale.x:g==="height"||g==="top"?this.rectScale.y:1;this.el.style[g]=(D-a[g])*X+"px"}),this):this}_removeHandlers(){return this.handlers.forEach(a=>a.destroy()),delete this.handlers,this}}rm._originStyleProp=["width","height","position","left","top","opacity","zIndex"];const Pse='input,textarea,button,select,option,[contenteditable="true"],.ui-resizable-handle';class nm extends W2{constructor(a,g={}){var D;super(),this.el=a,this.option=g,this.dragTransform={xScale:1,yScale:1,xOffset:0,yOffset:0};const X=(D=g==null?void 0:g.handle)==null?void 0:D.substring(1),A=a.gridstackNode;this.dragEls=!X||a.classList.contains(X)?[a]:A!=null&&A.subGrid?[a.querySelector(g.handle)||a]:Array.from(a.querySelectorAll(g.handle)),this.dragEls.length===0&&(this.dragEls=[a]),this._mouseDown=this._mouseDown.bind(this),this._mouseMove=this._mouseMove.bind(this),this._mouseUp=this._mouseUp.bind(this),this._keyEvent=this._keyEvent.bind(this),this.enable()}on(a,g){super.on(a,g)}off(a){super.off(a)}enable(){this.disabled!==!1&&(super.enable(),this.dragEls.forEach(a=>{a.addEventListener("mousedown",this._mouseDown),$u&&(a.addEventListener("touchstart",ey),a.addEventListener("pointerdown",ny))}),this.el.classList.remove("ui-draggable-disabled"))}disable(a=!1){this.disabled!==!0&&(super.disable(),this.dragEls.forEach(g=>{g.removeEventListener("mousedown",this._mouseDown),$u&&(g.removeEventListener("touchstart",ey),g.removeEventListener("pointerdown",ny))}),a||this.el.classList.add("ui-draggable-disabled"))}destroy(){this.dragTimeout&&window.clearTimeout(this.dragTimeout),delete this.dragTimeout,this.mouseDownEvent&&this._mouseUp(this.mouseDownEvent),this.disable(!0),delete this.el,delete this.helper,delete this.option,super.destroy()}updateOption(a){return Object.keys(a).forEach(g=>this.option[g]=a[g]),this}_mouseDown(a){if(!Zi.mouseHandled)return a.button!==0||!this.dragEls.find(g=>g===a.target)&&a.target.closest(Pse)||this.option.cancel&&a.target.closest(this.option.cancel)||(this.mouseDownEvent=a,delete this.dragging,delete Zi.dragElement,delete Zi.dropElement,document.addEventListener("mousemove",this._mouseMove,{capture:!0,passive:!0}),document.addEventListener("mouseup",this._mouseUp,!0),$u&&(a.currentTarget.addEventListener("touchmove",ty),a.currentTarget.addEventListener("touchend",ry)),a.preventDefault(),document.activeElement&&document.activeElement.blur(),Zi.mouseHandled=!0),!0}_callDrag(a){if(!this.dragging)return;const g=zn.initEvent(a,{target:this.el,type:"drag"});this.option.drag&&this.option.drag(g,this.ui()),this.triggerEvent("drag",g)}_mouseMove(a){var g;const D=this.mouseDownEvent;if(this.lastDrag=a,this.dragging)if(this._dragFollow(a),Zi.pauseDrag){const X=Number.isInteger(Zi.pauseDrag)?Zi.pauseDrag:100;this.dragTimeout&&window.clearTimeout(this.dragTimeout),this.dragTimeout=window.setTimeout(()=>this._callDrag(a),X)}else this._callDrag(a);else if(Math.abs(a.x-D.x)+Math.abs(a.y-D.y)>3){this.dragging=!0,Zi.dragElement=this;const X=(g=this.el.gridstackNode)==null?void 0:g.grid;X?Zi.dropElement=X.el.ddElement.ddDroppable:delete Zi.dropElement,this.helper=this._createHelper(),this._setupHelperContainmentStyle(),this.dragTransform=zn.getValuesFromTransformedElement(this.helperContainment),this.dragOffset=this._getDragOffset(a,this.el,this.helperContainment),this._setupHelperStyle(a);const A=zn.initEvent(a,{target:this.el,type:"dragstart"});this.option.start&&this.option.start(A,this.ui()),this.triggerEvent("dragstart",A),document.addEventListener("keydown",this._keyEvent)}return!0}_mouseUp(a){var g,D;if(document.removeEventListener("mousemove",this._mouseMove,!0),document.removeEventListener("mouseup",this._mouseUp,!0),$u&&a.currentTarget&&(a.currentTarget.removeEventListener("touchmove",ty,!0),a.currentTarget.removeEventListener("touchend",ry,!0)),this.dragging){delete this.dragging,(g=this.el.gridstackNode)==null||delete g._origRotate,document.removeEventListener("keydown",this._keyEvent),((D=Zi.dropElement)==null?void 0:D.el)===this.el.parentElement&&delete Zi.dropElement,this.helperContainment.style.position=this.parentOriginStylePosition||null,this.helper!==this.el&&this.helper.remove(),this._removeHelperStyle();const X=zn.initEvent(a,{target:this.el,type:"dragstop"});this.option.stop&&this.option.stop(X),this.triggerEvent("dragstop",X),Zi.dropElement&&Zi.dropElement.drop(a)}delete this.helper,delete this.mouseDownEvent,delete Zi.dragElement,delete Zi.dropElement,delete Zi.mouseHandled,a.preventDefault()}_keyEvent(a){var g,D;const X=this.el.gridstackNode,A=(X==null?void 0:X.grid)||((D=(g=Zi.dropElement)==null?void 0:g.el)==null?void 0:D.gridstack);if(a.key==="Escape")X&&X._origRotate&&(X._orig=X._origRotate,delete X._origRotate),A==null||A.cancelDrag(),this._mouseUp(this.mouseDownEvent);else if(X&&A&&(a.key==="r"||a.key==="R")){if(!zn.canBeRotated(X))return;X._origRotate=X._origRotate||{...X._orig},delete X._moving,A.setAnimation(!1).rotate(X.el,{top:-this.dragOffset.offsetTop,left:-this.dragOffset.offsetLeft}).setAnimation(),X._moving=!0,this.dragOffset=this._getDragOffset(this.lastDrag,X.el,this.helperContainment),this.helper.style.width=this.dragOffset.width+"px",this.helper.style.height=this.dragOffset.height+"px",zn.swap(X._orig,"w","h"),delete X._rect,this._mouseMove(this.lastDrag)}}_createHelper(){let a=this.el;return typeof this.option.helper=="function"?a=this.option.helper(this.el):this.option.helper==="clone"&&(a=zn.cloneNode(this.el)),a.parentElement||zn.appendTo(a,this.option.appendTo==="parent"?this.el.parentElement:this.option.appendTo),this.dragElementOriginStyle=nm.originStyleProp.map(g=>this.el.style[g]),a}_setupHelperStyle(a){var g,D;this.helper.classList.add("ui-draggable-dragging"),(D=(g=this.el.gridstackNode)==null?void 0:g.grid)==null||D.el.classList.add("grid-stack-dragging");const X=this.helper.style;return X.pointerEvents="none",X.width=this.dragOffset.width+"px",X.height=this.dragOffset.height+"px",X.willChange="left, top",X.position="fixed",this._dragFollow(a),X.transition="none",setTimeout(()=>{this.helper&&(X.transition=null)},0),this}_removeHelperStyle(){var a,g,D;this.helper.classList.remove("ui-draggable-dragging"),(g=(a=this.el.gridstackNode)==null?void 0:a.grid)==null||g.el.classList.remove("grid-stack-dragging");const X=(D=this.helper)==null?void 0:D.gridstackNode;if(!(X!=null&&X._isAboutToRemove)&&this.dragElementOriginStyle){const A=this.helper,b=this.dragElementOriginStyle.transition||null;A.style.transition=this.dragElementOriginStyle.transition="none",nm.originStyleProp.forEach(e=>A.style[e]=this.dragElementOriginStyle[e]||null),setTimeout(()=>A.style.transition=b,50)}return delete this.dragElementOriginStyle,this}_dragFollow(a){const g={left:0,top:0},D=this.helper.style,X=this.dragOffset;D.left=(a.clientX+X.offsetLeft-g.left)*this.dragTransform.xScale+"px",D.top=(a.clientY+X.offsetTop-g.top)*this.dragTransform.yScale+"px"}_setupHelperContainmentStyle(){return this.helperContainment=this.helper.parentElement,this.helper.style.position!=="fixed"&&(this.parentOriginStylePosition=this.helperContainment.style.position,getComputedStyle(this.helperContainment).position.match(/static/)&&(this.helperContainment.style.position="relative")),this}_getDragOffset(a,g,D){let X=0,A=0;D&&(X=this.dragTransform.xOffset,A=this.dragTransform.yOffset);const b=g.getBoundingClientRect();return{left:b.left,top:b.top,offsetLeft:-a.clientX+b.left-X,offsetTop:-a.clientY+b.top-A,width:b.width*this.dragTransform.xScale,height:b.height*this.dragTransform.yScale}}ui(){const a=this.el.parentElement.getBoundingClientRect(),g=this.helper.getBoundingClientRect();return{position:{top:(g.top-a.top)*this.dragTransform.yScale,left:(g.left-a.left)*this.dragTransform.xScale}}}}nm.originStyleProp=["width","height","transform","transform-origin","transition","pointerEvents","position","left","top","minWidth","willChange"];class Ose extends W2{constructor(a,g={}){super(),this.el=a,this.option=g,this._mouseEnter=this._mouseEnter.bind(this),this._mouseLeave=this._mouseLeave.bind(this),this.enable(),this._setupAccept()}on(a,g){super.on(a,g)}off(a){super.off(a)}enable(){this.disabled!==!1&&(super.enable(),this.el.classList.add("ui-droppable"),this.el.classList.remove("ui-droppable-disabled"),this.el.addEventListener("mouseenter",this._mouseEnter),this.el.addEventListener("mouseleave",this._mouseLeave),$u&&(this.el.addEventListener("pointerenter",P6),this.el.addEventListener("pointerleave",O6)))}disable(a=!1){this.disabled!==!0&&(super.disable(),this.el.classList.remove("ui-droppable"),a||this.el.classList.add("ui-droppable-disabled"),this.el.removeEventListener("mouseenter",this._mouseEnter),this.el.removeEventListener("mouseleave",this._mouseLeave),$u&&(this.el.removeEventListener("pointerenter",P6),this.el.removeEventListener("pointerleave",O6)))}destroy(){this.disable(!0),this.el.classList.remove("ui-droppable"),this.el.classList.remove("ui-droppable-disabled"),super.destroy()}updateOption(a){return Object.keys(a).forEach(g=>this.option[g]=a[g]),this._setupAccept(),this}_mouseEnter(a){if(!Zi.dragElement||!this._canDrop(Zi.dragElement.el))return;a.preventDefault(),a.stopPropagation(),Zi.dropElement&&Zi.dropElement!==this&&Zi.dropElement._mouseLeave(a,!0),Zi.dropElement=this;const g=zn.initEvent(a,{target:this.el,type:"dropover"});this.option.over&&this.option.over(g,this._ui(Zi.dragElement)),this.triggerEvent("dropover",g),this.el.classList.add("ui-droppable-over")}_mouseLeave(a,g=!1){var D;if(!Zi.dragElement||Zi.dropElement!==this)return;a.preventDefault(),a.stopPropagation();const X=zn.initEvent(a,{target:this.el,type:"dropout"});if(this.option.out&&this.option.out(X,this._ui(Zi.dragElement)),this.triggerEvent("dropout",X),Zi.dropElement===this&&(delete Zi.dropElement,!g)){let A,b=this.el.parentElement;for(;!A&&b;)A=(D=b.ddElement)==null?void 0:D.ddDroppable,b=b.parentElement;A&&A._mouseEnter(a)}}drop(a){a.preventDefault();const g=zn.initEvent(a,{target:this.el,type:"drop"});this.option.drop&&this.option.drop(g,this._ui(Zi.dragElement)),this.triggerEvent("drop",g)}_canDrop(a){return a&&(!this.accept||this.accept(a))}_setupAccept(){return this.option.accept?(typeof this.option.accept=="string"?this.accept=a=>a.classList.contains(this.option.accept)||a.matches(this.option.accept):this.accept=this.option.accept,this):this}_ui(a){return{draggable:a.el,...a.ui()}}}class G2{static init(a){return a.ddElement||(a.ddElement=new G2(a)),a.ddElement}constructor(a){this.el=a}on(a,g){return this.ddDraggable&&["drag","dragstart","dragstop"].indexOf(a)>-1?this.ddDraggable.on(a,g):this.ddDroppable&&["drop","dropover","dropout"].indexOf(a)>-1?this.ddDroppable.on(a,g):this.ddResizable&&["resizestart","resize","resizestop"].indexOf(a)>-1&&this.ddResizable.on(a,g),this}off(a){return this.ddDraggable&&["drag","dragstart","dragstop"].indexOf(a)>-1?this.ddDraggable.off(a):this.ddDroppable&&["drop","dropover","dropout"].indexOf(a)>-1?this.ddDroppable.off(a):this.ddResizable&&["resizestart","resize","resizestop"].indexOf(a)>-1&&this.ddResizable.off(a),this}setupDraggable(a){return this.ddDraggable?this.ddDraggable.updateOption(a):this.ddDraggable=new nm(this.el,a),this}cleanDraggable(){return this.ddDraggable&&(this.ddDraggable.destroy(),delete this.ddDraggable),this}setupResizable(a){return this.ddResizable?this.ddResizable.updateOption(a):this.ddResizable=new rm(this.el,a),this}cleanResizable(){return this.ddResizable&&(this.ddResizable.destroy(),delete this.ddResizable),this}setupDroppable(a){return this.ddDroppable?this.ddDroppable.updateOption(a):this.ddDroppable=new Ose(this.el,a),this}cleanDroppable(){return this.ddDroppable&&(this.ddDroppable.destroy(),delete this.ddDroppable),this}}class zse{resizable(a,g,D,X){return this._getDDElements(a,g).forEach(A=>{if(g==="disable"||g==="enable")A.ddResizable&&A.ddResizable[g]();else if(g==="destroy")A.ddResizable&&A.cleanResizable();else if(g==="option")A.setupResizable({[D]:X});else{const b=A.el.gridstackNode.grid;let e=A.el.getAttribute("gs-resize-handles")||b.opts.resizable.handles||"e,s,se";e==="all"&&(e="n,e,s,w,se,sw,ne,nw");const v=!b.opts.alwaysShowResizeHandle;A.setupResizable({...b.opts.resizable,handles:e,autoHide:v,start:g.start,stop:g.stop,resize:g.resize})}}),this}draggable(a,g,D,X){return this._getDDElements(a,g).forEach(A=>{if(g==="disable"||g==="enable")A.ddDraggable&&A.ddDraggable[g]();else if(g==="destroy")A.ddDraggable&&A.cleanDraggable();else if(g==="option")A.setupDraggable({[D]:X});else{const b=A.el.gridstackNode.grid;A.setupDraggable({...b.opts.draggable,start:g.start,stop:g.stop,drag:g.drag})}}),this}dragIn(a,g){return this._getDDElements(a).forEach(D=>D.setupDraggable(g)),this}droppable(a,g,D,X){return typeof g.accept=="function"&&!g._accept&&(g._accept=g.accept,g.accept=A=>g._accept(A)),this._getDDElements(a,g).forEach(A=>{g==="disable"||g==="enable"?A.ddDroppable&&A.ddDroppable[g]():g==="destroy"?A.ddDroppable&&A.cleanDroppable():g==="option"?A.setupDroppable({[D]:X}):A.setupDroppable(g)}),this}isDroppable(a){var g;return!!((g=a==null?void 0:a.ddElement)!=null&&g.ddDroppable&&!a.ddElement.ddDroppable.disabled)}isDraggable(a){var g;return!!((g=a==null?void 0:a.ddElement)!=null&&g.ddDraggable&&!a.ddElement.ddDraggable.disabled)}isResizable(a){var g;return!!((g=a==null?void 0:a.ddElement)!=null&&g.ddResizable&&!a.ddElement.ddResizable.disabled)}on(a,g,D){return this._getDDElements(a).forEach(X=>X.on(g,A=>{D(A,Zi.dragElement?Zi.dragElement.el:A.target,Zi.dragElement?Zi.dragElement.helper:null)})),this}off(a,g){return this._getDDElements(a).forEach(D=>D.off(g)),this}_getDDElements(a,g){const D=a.gridstack||g!=="destroy"&&g!=="disable",X=zn.getElements(a);return X.length?X.map(A=>A.ddElement||(D?G2.init(A):null)).filter(A=>A):[]}}/*!
4074
4074
  * GridStack 12.3.2
4075
4075
  * https://gridstackjs.com/
4076
4076
  *
@@ -4078,7 +4078,7 @@ uniform ${De} ${qe} u_${it};
4078
4078
  * see root license https://github.com/gridstack/gridstack.js/tree/master/LICENSE
4079
4079
  */const Uc=new zse;class Wi{static init(a={},g=".grid-stack"){if(typeof document>"u")return null;const D=Wi.getGridElement(g);return D?(D.gridstack||(D.gridstack=new Wi(D,zn.cloneDeep(a))),D.gridstack):(console.error(typeof g=="string"?'GridStack.initAll() no grid was found with selector "'+g+`" - element missing or wrong selector ?
4080
4080
  Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.`:"GridStack.init() no grid element was passed."),null)}static initAll(a={},g=".grid-stack"){const D=[];return typeof document>"u"||(Wi.getGridElements(g).forEach(X=>{X.gridstack||(X.gridstack=new Wi(X,zn.cloneDeep(a))),D.push(X.gridstack)}),D.length===0&&console.error('GridStack.initAll() no grid was found with selector "'+g+`" - element missing or wrong selector ?
4081
- Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.`)),D}static addGrid(a,g={}){if(!a)return null;let D=a;if(D.gridstack){const X=D.gridstack;return g&&(X.opts={...X.opts,...g}),g.children!==void 0&&X.load(g.children),X}return(!a.classList.contains("grid-stack")||Wi.addRemoveCB)&&(Wi.addRemoveCB?D=Wi.addRemoveCB(a,g,!0,!0):D=zn.createDiv(["grid-stack",g.class],a)),Wi.init(g,D)}static registerEngine(a){Wi.engineClass=a}get placeholder(){if(!this._placeholder){this._placeholder=zn.createDiv([this.opts.placeholderClass,Mu.itemClass,this.opts.itemClass]);const a=zn.createDiv(["placeholder-content"],this._placeholder);this.opts.placeholderText&&(a.textContent=this.opts.placeholderText)}return this._placeholder}constructor(a,g={}){var D;this.el=a,this.opts=g,this.animationDelay=310,this._gsEventHandler={},this._extraDragRow=0,this.dragTransform={xScale:1,yScale:1,xOffset:0,yOffset:0},a.gridstack=this,this.opts=g=g||{},a.classList.contains("grid-stack")||this.el.classList.add("grid-stack"),g.row&&(g.minRow=g.maxRow=g.row,delete g.row);const X=zn.toNumber(a.getAttribute("gs-row"));g.column==="auto"&&delete g.column,g.alwaysShowResizeHandle!==void 0&&(g._alwaysShowResizeHandle=g.alwaysShowResizeHandle);const A=g.columnOpts;if(A){const t=A.breakpoints;!A.columnWidth&&!(t!=null&&t.length)?delete g.columnOpts:(A.columnMax=A.columnMax||12,(t==null?void 0:t.length)>1&&t.sort((w,y)=>(y.w||0)-(w.w||0)))}const b={...zn.cloneDeep(Mu),column:zn.toNumber(a.getAttribute("gs-column"))||Mu.column,minRow:X||zn.toNumber(a.getAttribute("gs-min-row"))||Mu.minRow,maxRow:X||zn.toNumber(a.getAttribute("gs-max-row"))||Mu.maxRow,staticGrid:zn.toBool(a.getAttribute("gs-static"))||Mu.staticGrid,sizeToContent:zn.toBool(a.getAttribute("gs-size-to-content"))||void 0,draggable:{handle:(g.handleClass?"."+g.handleClass:g.handle?g.handle:"")||Mu.draggable.handle},removableOptions:{accept:g.itemClass||Mu.removableOptions.accept,decline:Mu.removableOptions.decline}};a.getAttribute("gs-animate")&&(b.animate=zn.toBool(a.getAttribute("gs-animate"))),g=zn.defaults(g,b),this._initMargin(),this.checkDynamicColumn(),this._updateColumnVar(g),g.rtl==="auto"&&(g.rtl=a.style.direction==="rtl"),g.rtl&&this.el.classList.add("grid-stack-rtl");const e=this.el.closest("."+Mu.itemClass),v=e==null?void 0:e.gridstackNode;if(v&&(v.subGrid=this,this.parentGridNode=v,this.el.classList.add("grid-stack-nested"),v.el.classList.add("grid-stack-sub-grid")),this._isAutoCellHeight=g.cellHeight==="auto",this._isAutoCellHeight||g.cellHeight==="initial")this.cellHeight(void 0);else{typeof g.cellHeight=="number"&&g.cellHeightUnit&&g.cellHeightUnit!==Mu.cellHeightUnit&&(g.cellHeight=g.cellHeight+g.cellHeightUnit,delete g.cellHeightUnit);const t=g.cellHeight;delete g.cellHeight,this.cellHeight(t)}g.alwaysShowResizeHandle==="mobile"&&(g.alwaysShowResizeHandle=$u),this._setStaticClass();const u=g.engineClass||Wi.engineClass||Dd;if(this.engine=new u({column:this.getColumn(),float:g.float,maxRow:g.maxRow,onChange:t=>{t.forEach(w=>{const y=w.el;y&&(w._removeDOM?(y&&y.remove(),delete w._removeDOM):this._writePosAttr(y,w))}),this._updateContainerHeight()}}),g.auto&&(this.batchUpdate(),this.engine._loading=!0,this.getGridItems().forEach(t=>this._prepareElement(t)),delete this.engine._loading,this.batchUpdate(!1)),g.children){const t=g.children;delete g.children,t.length&&this.load(t)}this.setAnimation(),g.subGridDynamic&&!Zi.pauseDrag&&(Zi.pauseDrag=!0),((D=g.draggable)==null?void 0:D.pause)!==void 0&&(Zi.pauseDrag=g.draggable.pause),this._setupRemoveDrop(),this._setupAcceptWidget(),this._updateResizeEvent()}_updateColumnVar(a=this.opts){this.el.classList.add("gs-"+a.column),typeof a.column=="number"&&this.el.style.setProperty("--gs-column-width",`${100/a.column}%`)}addWidget(a){if(!a)return;if(typeof a=="string"){console.error("V11: GridStack.addWidget() does not support string anymore. see #2736");return}if(a.ELEMENT_NODE)return console.error("V11: GridStack.addWidget() does not support HTMLElement anymore. use makeWidget()"),this.makeWidget(a);let g,D=a;if(D.grid=this,D.el?g=D.el:Wi.addRemoveCB?g=Wi.addRemoveCB(this.el,a,!0,!1):g=this.createWidgetDivs(D),!g)return;if(D=g.gridstackNode,D&&g.parentElement===this.el&&this.engine.nodes.find(A=>A._id===D._id))return g;const X=this._readAttr(g);return zn.defaults(a,X),this.engine.prepareNode(a),this.el.appendChild(g),this.makeWidget(g,a),g}createWidgetDivs(a){const g=zn.createDiv(["grid-stack-item",this.opts.itemClass]),D=zn.createDiv(["grid-stack-item-content"],g);return zn.lazyLoad(a)?a.visibleObservable||(a.visibleObservable=new IntersectionObserver(([X])=>{var A,b;X.isIntersecting&&((A=a.visibleObservable)==null||A.disconnect(),delete a.visibleObservable,Wi.renderCB(D,a),(b=a.grid)==null||b.prepareDragDrop(a.el))}),window.setTimeout(()=>{var X;return(X=a.visibleObservable)==null?void 0:X.observe(g)})):Wi.renderCB(D,a),g}makeSubGrid(a,g,D,X=!0){var A,b,e;let v=a.gridstackNode;if(v||(v=this.makeWidget(a).gridstackNode),(A=v.subGrid)!=null&&A.el)return v.subGrid;let u,t=this;for(;t&&!u;)u=(b=t.opts)==null?void 0:b.subGridOpts,t=(e=t.parentGridNode)==null?void 0:e.grid;g=zn.cloneDeep({...this.opts,id:void 0,children:void 0,column:"auto",columnOpts:void 0,layout:"list",subGridOpts:void 0,...u||{},...g||v.subGridOpts||{}}),v.subGridOpts=g;let w;g.column==="auto"&&(w=!0,g.column=Math.max(v.w||1,(D==null?void 0:D.w)||1),delete g.columnOpts);let y=v.el.querySelector(".grid-stack-item-content"),x,p;if(X&&(this._removeDD(v.el),p={...v,x:0,y:0},zn.removeInternalForSave(p),delete p.subGridOpts,v.content&&(p.content=v.content,delete v.content),Wi.addRemoveCB?x=Wi.addRemoveCB(this.el,p,!0,!1):(x=zn.createDiv(["grid-stack-item"]),x.appendChild(y),y=zn.createDiv(["grid-stack-item-content"],v.el)),this.prepareDragDrop(v.el)),D){const i=w?g.column:v.w,d=v.h+D.h,s=v.el.style;s.transition="none",this.update(v.el,{w:i,h:d}),setTimeout(()=>s.transition=null)}const n=v.subGrid=Wi.addGrid(y,g);return D!=null&&D._moving&&(n._isTemp=!0),w&&(n._autoColumn=!0),X&&n.makeWidget(x,p),D&&(D._moving?window.setTimeout(()=>zn.simulateMouseEvent(D._event,"mouseenter",n.el),0):n.makeWidget(v.el,v)),this.resizeToContentCheck(!1,v),n}removeAsSubGrid(a){var g;const D=(g=this.parentGridNode)==null?void 0:g.grid;D&&(D.batchUpdate(),D.removeWidget(this.parentGridNode.el,!0,!0),this.engine.nodes.forEach(X=>{X.x+=this.parentGridNode.x,X.y+=this.parentGridNode.y,D.makeWidget(X.el,X)}),D.batchUpdate(!1),this.parentGridNode&&delete this.parentGridNode.subGrid,delete this.parentGridNode,a&&window.setTimeout(()=>zn.simulateMouseEvent(a._event,"mouseenter",D.el),0))}save(a=!0,g=!1,D=Wi.saveCB,X){const A=this.engine.save(a,D,X);if(A.forEach(b=>{var e;if(a&&b.el&&!b.subGrid&&!D){const v=b.el.querySelector(".grid-stack-item-content");b.content=v==null?void 0:v.innerHTML,b.content||delete b.content}else if(!a&&!D&&delete b.content,(e=b.subGrid)!=null&&e.el){const v=b.w||b.subGrid.getColumn(),u=b.subGrid.save(a,g,D,v);b.subGridOpts=g?u:{children:u},delete b.subGrid}delete b.el}),g){const b=zn.cloneDeep(this.opts);b.marginBottom===b.marginTop&&b.marginRight===b.marginLeft&&b.marginTop===b.marginRight&&(b.margin=b.marginTop,delete b.marginTop,delete b.marginRight,delete b.marginBottom,delete b.marginLeft),b.rtl===(this.el.style.direction==="rtl")&&(b.rtl="auto"),this._isAutoCellHeight&&(b.cellHeight="auto"),this._autoColumn&&(b.column="auto");const e=b._alwaysShowResizeHandle;return delete b._alwaysShowResizeHandle,e!==void 0?b.alwaysShowResizeHandle=e:delete b.alwaysShowResizeHandle,zn.removeInternalAndSame(b,Mu),b.children=A,b}return A}load(a,g=Wi.addRemoveCB||!0){a=zn.cloneDeep(a);const D=this.getColumn();a.forEach(t=>{t.w=t.w||t.minW||1,t.h=t.h||t.minH||1}),a=zn.sort(a),this.engine.skipCacheUpdate=this._ignoreLayoutsNodeChange=!0;let X=0;a.forEach(t=>{X=Math.max(X,(t.x||0)+t.w)}),X>this.engine.defaultColumn&&(this.engine.defaultColumn=X),X>D&&(this.engine.nodes.length===0&&this.responseLayout?(this.engine.nodes=a,this.engine.columnChanged(X,D,this.responseLayout),a=this.engine.nodes,this.engine.nodes=[],delete this.responseLayout):this.engine.cacheLayout(a,X,!0));const A=Wi.addRemoveCB;typeof g=="function"&&(Wi.addRemoveCB=g);const b=[];this.batchUpdate();const e=!this.engine.nodes.length,v=e&&this.opts.animate;v&&this.setAnimation(!1),!e&&g&&[...this.engine.nodes].forEach(t=>{t.id&&(zn.find(a,t.id)||(Wi.addRemoveCB&&Wi.addRemoveCB(this.el,t,!1,!1),b.push(t),this.removeWidget(t.el,!0,!1)))}),this.engine._loading=!0;const u=[];return this.engine.nodes=this.engine.nodes.filter(t=>zn.find(a,t.id)?(u.push(t),!1):!0),a.forEach(t=>{var w;const y=zn.find(u,t.id);if(y){if(zn.shouldSizeToContent(y)&&(t.h=y.h),this.engine.nodeBoundFix(t),(t.autoPosition||t.x===void 0||t.y===void 0)&&(t.w=t.w||y.w,t.h=t.h||y.h,this.engine.findEmptyPosition(t)),this.engine.nodes.push(y),zn.samePos(y,t)&&this.engine.nodes.length>1&&(this.moveNode(y,{...t,forceCollide:!0}),zn.copyPos(t,y)),this.update(y.el,t),(w=t.subGridOpts)!=null&&w.children){const x=y.el.querySelector(".grid-stack");x&&x.gridstack&&x.gridstack.load(t.subGridOpts.children)}}else g&&this.addWidget(t)}),delete this.engine._loading,this.engine.removedNodes=b,this.batchUpdate(!1),delete this._ignoreLayoutsNodeChange,delete this.engine.skipCacheUpdate,A?Wi.addRemoveCB=A:delete Wi.addRemoveCB,v&&this.setAnimation(!0,!0),this}batchUpdate(a=!0){return this.engine.batchUpdate(a),a||(this._updateContainerHeight(),this._triggerRemoveEvent(),this._triggerAddEvent(),this._triggerChangeEvent()),this}getCellHeight(a=!1){if(this.opts.cellHeight&&this.opts.cellHeight!=="auto"&&(!a||!this.opts.cellHeightUnit||this.opts.cellHeightUnit==="px"))return this.opts.cellHeight;if(this.opts.cellHeightUnit==="rem")return this.opts.cellHeight*parseFloat(getComputedStyle(document.documentElement).fontSize);if(this.opts.cellHeightUnit==="em")return this.opts.cellHeight*parseFloat(getComputedStyle(this.el).fontSize);if(this.opts.cellHeightUnit==="cm")return this.opts.cellHeight*(96/2.54);if(this.opts.cellHeightUnit==="mm")return this.opts.cellHeight*(96/2.54)/10;const g=this.el.querySelector("."+this.opts.itemClass);if(g){const X=zn.toNumber(g.getAttribute("gs-h"))||1;return Math.round(g.offsetHeight/X)}const D=parseInt(this.el.getAttribute("gs-current-row"));return D?Math.round(this.el.getBoundingClientRect().height/D):this.opts.cellHeight}cellHeight(a){if(a!==void 0&&this._isAutoCellHeight!==(a==="auto")&&(this._isAutoCellHeight=a==="auto",this._updateResizeEvent()),(a==="initial"||a==="auto")&&(a=void 0),a===void 0){const D=-this.opts.marginRight-this.opts.marginLeft+this.opts.marginTop+this.opts.marginBottom;a=this.cellWidth()+D}const g=zn.parseHeight(a);return this.opts.cellHeightUnit===g.unit&&this.opts.cellHeight===g.h?this:(this.opts.cellHeightUnit=g.unit,this.opts.cellHeight=g.h,this.el.style.setProperty("--gs-cell-height",`${this.opts.cellHeight}${this.opts.cellHeightUnit}`),this._updateContainerHeight(),this.resizeToContentCheck(),this)}cellWidth(){return this._widthOrContainer()/this.getColumn()}_widthOrContainer(a=!1){var g;return a&&(g=this.opts.columnOpts)!=null&&g.breakpointForWindow?window.innerWidth:this.el.clientWidth||this.el.parentElement.clientWidth||window.innerWidth}checkDynamicColumn(){var a,g;const D=this.opts.columnOpts;if(!D||!D.columnWidth&&!((a=D.breakpoints)!=null&&a.length))return!1;const X=this.getColumn();let A=X;const b=this._widthOrContainer(!0);if(D.columnWidth)A=Math.min(Math.round(b/D.columnWidth)||1,D.columnMax);else{A=D.columnMax;let e=0;for(;e<D.breakpoints.length&&b<=D.breakpoints[e].w;)A=D.breakpoints[e++].c||X}if(A!==X){const e=(g=D.breakpoints)==null?void 0:g.find(v=>v.c===A);return this.column(A,(e==null?void 0:e.layout)||D.layout),!0}return!1}compact(a="compact",g=!0){return this.engine.compact(a,g),this._triggerChangeEvent(),this}column(a,g="moveScale"){if(!a||a<1||this.opts.column===a)return this;const D=this.getColumn();return this.opts.column=a,this.engine?(this.engine.column=a,this.el.classList.remove("gs-"+D),this._updateColumnVar(),this.engine.columnChanged(D,a,g),this._isAutoCellHeight&&this.cellHeight(),this.resizeToContentCheck(!0),this._ignoreLayoutsNodeChange=!0,this._triggerChangeEvent(),delete this._ignoreLayoutsNodeChange,this):(this.responseLayout=g,this)}getColumn(){return this.opts.column}getGridItems(){return Array.from(this.el.children).filter(a=>a.matches("."+this.opts.itemClass)&&!a.matches("."+this.opts.placeholderClass))}isIgnoreChangeCB(){return this._ignoreLayoutsNodeChange}destroy(a=!0){var g;if(this.el)return this.offAll(),this._updateResizeEvent(!0),this.setStatic(!0,!1),this.setAnimation(!1),a?this.el.parentNode.removeChild(this.el):(this.removeAll(a),this.el.removeAttribute("gs-current-row")),this.parentGridNode&&delete this.parentGridNode.subGrid,delete this.parentGridNode,delete this.opts,(g=this._placeholder)==null||delete g.gridstackNode,delete this._placeholder,delete this.engine,delete this.el.gridstack,delete this.el,this}float(a){return this.opts.float!==a&&(this.opts.float=this.engine.float=a,this._triggerChangeEvent()),this}getFloat(){return this.engine.float}getCellFromPixel(a,g=!1){const D=this.el.getBoundingClientRect();let X;g?X={top:D.top+document.documentElement.scrollTop,left:D.left}:X={top:this.el.offsetTop,left:this.el.offsetLeft};const A=a.left-X.left,b=a.top-X.top,e=D.width/this.getColumn(),v=D.height/parseInt(this.el.getAttribute("gs-current-row"));return{x:Math.floor(A/e),y:Math.floor(b/v)}}getRow(){return Math.max(this.engine.getRow(),this.opts.minRow||0)}isAreaEmpty(a,g,D,X){return this.engine.isAreaEmpty(a,g,D,X)}makeWidget(a,g){const D=Wi.getElement(a);if(!D||D.gridstackNode)return D;D.parentElement||this.el.appendChild(D),this._prepareElement(D,!0,g);const X=D.gridstackNode;this._updateContainerHeight(),X.subGridOpts&&this.makeSubGrid(D,X.subGridOpts,void 0,!1);let A;return this.opts.column===1&&!this._ignoreLayoutsNodeChange&&(A=this._ignoreLayoutsNodeChange=!0),this._triggerAddEvent(),this._triggerChangeEvent(),A&&delete this._ignoreLayoutsNodeChange,D}on(a,g){return a.indexOf(" ")!==-1?(a.split(" ").forEach(D=>this.on(D,g)),this):(a==="change"||a==="added"||a==="removed"||a==="enable"||a==="disable"?(a==="enable"||a==="disable"?this._gsEventHandler[a]=D=>g(D):this._gsEventHandler[a]=D=>{D.detail&&g(D,D.detail)},this.el.addEventListener(a,this._gsEventHandler[a])):a==="drag"||a==="dragstart"||a==="dragstop"||a==="resizestart"||a==="resize"||a==="resizestop"||a==="dropped"||a==="resizecontent"?this._gsEventHandler[a]=g:console.error("GridStack.on("+a+") event not supported"),this)}off(a){return a.indexOf(" ")!==-1?(a.split(" ").forEach(g=>this.off(g)),this):((a==="change"||a==="added"||a==="removed"||a==="enable"||a==="disable")&&this._gsEventHandler[a]&&this.el.removeEventListener(a,this._gsEventHandler[a]),delete this._gsEventHandler[a],this)}offAll(){return Object.keys(this._gsEventHandler).forEach(a=>this.off(a)),this}removeWidget(a,g=!0,D=!0){return a?(Wi.getElements(a).forEach(X=>{if(X.parentElement&&X.parentElement!==this.el)return;let A=X.gridstackNode;A||(A=this.engine.nodes.find(b=>X===b.el)),A&&(g&&Wi.addRemoveCB&&Wi.addRemoveCB(this.el,A,!1,!1),delete X.gridstackNode,this._removeDD(X),this.engine.removeNode(A,g,D),g&&X.parentElement&&X.remove())}),D&&(this._triggerRemoveEvent(),this._triggerChangeEvent()),this):(console.error("Error: GridStack.removeWidget(undefined) called"),this)}removeAll(a=!0,g=!0){return this.engine.nodes.forEach(D=>{a&&Wi.addRemoveCB&&Wi.addRemoveCB(this.el,D,!1,!1),delete D.el.gridstackNode,this.opts.staticGrid||this._removeDD(D.el)}),this.engine.removeAll(a,g),g&&this._triggerRemoveEvent(),this}setAnimation(a=this.opts.animate,g){return g?setTimeout(()=>{this.opts&&this.setAnimation(a)}):a?this.el.classList.add("grid-stack-animate"):this.el.classList.remove("grid-stack-animate"),this.opts.animate=a,this}hasAnimationCSS(){return this.el.classList.contains("grid-stack-animate")}setStatic(a,g=!0,D=!0){return!!this.opts.staticGrid===a?this:(a?this.opts.staticGrid=!0:delete this.opts.staticGrid,this._setupRemoveDrop(),this._setupAcceptWidget(),this.engine.nodes.forEach(X=>{this.prepareDragDrop(X.el),X.subGrid&&D&&X.subGrid.setStatic(a,g,D)}),g&&this._setStaticClass(),this)}updateOptions(a){var g;const D=this.opts;return a===D?this:(a.acceptWidgets!==void 0&&(D.acceptWidgets=a.acceptWidgets,this._setupAcceptWidget()),a.animate!==void 0&&this.setAnimation(a.animate),a.cellHeight&&this.cellHeight(a.cellHeight),a.class!==void 0&&a.class!==D.class&&(D.class&&this.el.classList.remove(D.class),a.class&&this.el.classList.add(a.class)),a.columnOpts?(this.opts.columnOpts=a.columnOpts,this.checkDynamicColumn()):a.columnOpts===null&&this.opts.columnOpts?(delete this.opts.columnOpts,this._updateResizeEvent()):typeof a.column=="number"&&this.column(a.column),a.margin!==void 0&&this.margin(a.margin),a.staticGrid!==void 0&&this.setStatic(a.staticGrid),a.disableDrag!==void 0&&!a.staticGrid&&this.enableMove(!a.disableDrag),a.disableResize!==void 0&&!a.staticGrid&&this.enableResize(!a.disableResize),a.float!==void 0&&this.float(a.float),a.row!==void 0?(D.minRow=D.maxRow=D.row=a.row,this._updateContainerHeight()):(a.minRow!==void 0&&(D.minRow=a.minRow,this._updateContainerHeight()),a.maxRow!==void 0&&(D.maxRow=a.maxRow)),(g=a.children)!=null&&g.length&&this.load(a.children),this)}update(a,g){return Wi.getElements(a).forEach(D=>{var X;const A=D==null?void 0:D.gridstackNode;if(!A)return;const b={...zn.copyPos({},A),...zn.cloneDeep(g)};this.engine.nodeBoundFix(b),delete b.autoPosition;const e=["x","y","w","h"];let v;if(e.some(w=>b[w]!==void 0&&b[w]!==A[w])&&(v={},e.forEach(w=>{v[w]=b[w]!==void 0?b[w]:A[w],delete b[w]})),!v&&(b.minW||b.minH||b.maxW||b.maxH)&&(v={}),b.content!==void 0){const w=D.querySelector(".grid-stack-item-content");w&&w.textContent!==b.content&&(A.content=b.content,Wi.renderCB(w,b),(X=A.subGrid)!=null&&X.el&&(w.appendChild(A.subGrid.el),A.subGrid._updateContainerHeight())),delete b.content}let u=!1,t=!1;for(const w in b)w[0]!=="_"&&A[w]!==b[w]&&(A[w]=b[w],u=!0,t=t||!this.opts.staticGrid&&(w==="noResize"||w==="noMove"||w==="locked"));if(zn.sanitizeMinMax(A),v){const w=v.w!==void 0&&v.w!==A.w;this.moveNode(A,v),w&&A.subGrid?A.subGrid.onResize(this.hasAnimationCSS()?A.w:void 0):this.resizeToContentCheck(w,A),delete A._orig}(v||u)&&this._writeAttr(D,A),t&&this.prepareDragDrop(A.el),Wi.updateCB&&Wi.updateCB(A)}),this}moveNode(a,g){const D=a._updating;D||this.engine.cleanNodes().beginUpdate(a),this.engine.moveNode(a,g),this._updateContainerHeight(),D||(this._triggerChangeEvent(),this.engine.endUpdate())}resizeToContent(a){var g,D;if(!a||(a.classList.remove("size-to-content-max"),!a.clientHeight))return;const X=a.gridstackNode;if(!X)return;const A=X.grid;if(!A||a.parentElement!==A.el)return;const b=A.getCellHeight(!0);if(!b)return;let e=X.h?X.h*b:a.clientHeight,v;if(X.resizeToContentParent&&(v=a.querySelector(X.resizeToContentParent)),v||(v=a.querySelector(Wi.resizeToContentParent)),!v)return;const u=a.clientHeight-v.clientHeight,t=X.h?X.h*b-u:v.clientHeight;let w;if(X.subGrid){w=X.subGrid.getRow()*X.subGrid.getCellHeight(!0);const p=X.subGrid.el.getBoundingClientRect(),n=a.getBoundingClientRect();w+=p.top-n.top}else{if((D=(g=X.subGridOpts)==null?void 0:g.children)!=null&&D.length)return;{const p=v.firstElementChild;if(!p){console.error(`Error: GridStack.resizeToContent() widget id:${X.id} '${Wi.resizeToContentParent}'.firstElementChild is null, make sure to have a div like container. Skipping sizing.`);return}w=p.getBoundingClientRect().height||t}}if(t===w)return;e+=w-t;let y=Math.ceil(e/b);const x=Number.isInteger(X.sizeToContent)?X.sizeToContent:0;x&&y>x&&(y=x,a.classList.add("size-to-content-max")),X.minH&&y<X.minH?y=X.minH:X.maxH&&y>X.maxH&&(y=X.maxH),y!==X.h&&(A._ignoreLayoutsNodeChange=!0,A.moveNode(X,{h:y}),delete A._ignoreLayoutsNodeChange)}resizeToContentCBCheck(a){Wi.resizeToContentCB?Wi.resizeToContentCB(a):this.resizeToContent(a)}rotate(a,g){return Wi.getElements(a).forEach(D=>{const X=D.gridstackNode;if(!zn.canBeRotated(X))return;const A={w:X.h,h:X.w,minH:X.minW,minW:X.minH,maxH:X.maxW,maxW:X.maxH};if(g){const e=g.left>0?Math.floor(g.left/this.cellWidth()):0,v=g.top>0?Math.floor(g.top/this.opts.cellHeight):0;A.x=X.x+e-(X.h-(v+1)),A.y=X.y+v-e}Object.keys(A).forEach(e=>{A[e]===void 0&&delete A[e]});const b=X._orig;this.update(D,A),X._orig=b}),this}margin(a){if(!(typeof a=="string"&&a.split(" ").length>1)){const g=zn.parseHeight(a);if(this.opts.marginUnit===g.unit&&this.opts.margin===g.h)return}return this.opts.margin=a,this.opts.marginTop=this.opts.marginBottom=this.opts.marginLeft=this.opts.marginRight=void 0,this._initMargin(),this}getMargin(){return this.opts.margin}willItFit(a){if(arguments.length>1){console.warn("gridstack.ts: `willItFit(x,y,w,h,autoPosition)` is deprecated. Use `willItFit({x, y,...})`. It will be removed soon");const g=arguments;let D=0,X={x:g[D++],y:g[D++],w:g[D++],h:g[D++],autoPosition:g[D++]};return this.willItFit(X)}return this.engine.willItFit(a)}_triggerChangeEvent(){if(this.engine.batchMode)return this;const a=this.engine.getDirtyNodes(!0);return a&&a.length&&(this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(a),this._triggerEvent("change",a)),this.engine.saveInitial(),this}_triggerAddEvent(){var a;if(this.engine.batchMode)return this;if((a=this.engine.addedNodes)!=null&&a.length){this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(this.engine.addedNodes),this.engine.addedNodes.forEach(D=>{delete D._dirty});const g=[...this.engine.addedNodes];this.engine.addedNodes=[],this._triggerEvent("added",g)}return this}_triggerRemoveEvent(){var a;if(this.engine.batchMode)return this;if((a=this.engine.removedNodes)!=null&&a.length){const g=[...this.engine.removedNodes];this.engine.removedNodes=[],this._triggerEvent("removed",g)}return this}_triggerEvent(a,g){const D=g?new CustomEvent(a,{bubbles:!1,detail:g}):new Event(a);let X=this;for(;X.parentGridNode;)X=X.parentGridNode.grid;return X.el.dispatchEvent(D),this}_updateContainerHeight(){if(!this.engine||this.engine.batchMode)return this;const a=this.parentGridNode;let g=this.getRow()+this._extraDragRow;const D=this.opts.cellHeight,X=this.opts.cellHeightUnit;if(!D)return this;if(!a&&!this.opts.minRow){const A=zn.parseHeight(getComputedStyle(this.el).minHeight);if(A.h>0&&A.unit===X){const b=Math.floor(A.h/D);g<b&&(g=b)}}return this.el.setAttribute("gs-current-row",String(g)),this.el.style.removeProperty("min-height"),this.el.style.removeProperty("height"),g&&(this.el.style[a?"minHeight":"height"]=g*D+X),a&&zn.shouldSizeToContent(a)&&a.grid.resizeToContentCBCheck(a.el),this}_prepareElement(a,g=!1,D){D=D||this._readAttr(a),a.gridstackNode=D,D.el=a,D.grid=this,D=this.engine.addNode(D,g),this._writeAttr(a,D),a.classList.add(Mu.itemClass,this.opts.itemClass);const X=zn.shouldSizeToContent(D);return X?a.classList.add("size-to-content"):a.classList.remove("size-to-content"),X&&this.resizeToContentCheck(!1,D),zn.lazyLoad(D)||this.prepareDragDrop(D.el),this}_writePosAttr(a,g){return(!g._moving&&!g._resizing||this._placeholder===a)&&(a.style.top=g.y?g.y===1?"var(--gs-cell-height)":`calc(${g.y} * var(--gs-cell-height))`:null,a.style.left=g.x?g.x===1?"var(--gs-column-width)":`calc(${g.x} * var(--gs-column-width))`:null,a.style.width=g.w>1?`calc(${g.w} * var(--gs-column-width))`:null,a.style.height=g.h>1?`calc(${g.h} * var(--gs-cell-height))`:null),g.x>0?a.setAttribute("gs-x",String(g.x)):a.removeAttribute("gs-x"),g.y>0?a.setAttribute("gs-y",String(g.y)):a.removeAttribute("gs-y"),g.w>1?a.setAttribute("gs-w",String(g.w)):a.removeAttribute("gs-w"),g.h>1?a.setAttribute("gs-h",String(g.h)):a.removeAttribute("gs-h"),this}_writeAttr(a,g){if(!g)return this;this._writePosAttr(a,g);const D={noResize:"gs-no-resize",noMove:"gs-no-move",locked:"gs-locked",id:"gs-id",sizeToContent:"gs-size-to-content"};for(const X in D)g[X]?a.setAttribute(D[X],String(g[X])):a.removeAttribute(D[X]);return this}_readAttr(a,g=!0){const D={};D.x=zn.toNumber(a.getAttribute("gs-x")),D.y=zn.toNumber(a.getAttribute("gs-y")),D.w=zn.toNumber(a.getAttribute("gs-w")),D.h=zn.toNumber(a.getAttribute("gs-h")),D.autoPosition=zn.toBool(a.getAttribute("gs-auto-position")),D.noResize=zn.toBool(a.getAttribute("gs-no-resize")),D.noMove=zn.toBool(a.getAttribute("gs-no-move")),D.locked=zn.toBool(a.getAttribute("gs-locked"));const X=a.getAttribute("gs-size-to-content");X&&(X==="true"||X==="false"?D.sizeToContent=zn.toBool(X):D.sizeToContent=parseInt(X,10)),D.id=a.getAttribute("gs-id"),D.maxW=zn.toNumber(a.getAttribute("gs-max-w")),D.minW=zn.toNumber(a.getAttribute("gs-min-w")),D.maxH=zn.toNumber(a.getAttribute("gs-max-h")),D.minH=zn.toNumber(a.getAttribute("gs-min-h")),g&&(D.w===1&&a.removeAttribute("gs-w"),D.h===1&&a.removeAttribute("gs-h"),D.maxW&&a.removeAttribute("gs-max-w"),D.minW&&a.removeAttribute("gs-min-w"),D.maxH&&a.removeAttribute("gs-max-h"),D.minH&&a.removeAttribute("gs-min-h"));for(const A in D){if(!D.hasOwnProperty(A))return;!D[A]&&D[A]!==0&&A!=="sizeToContent"&&delete D[A]}return D}_setStaticClass(){const a=["grid-stack-static"];return this.opts.staticGrid?(this.el.classList.add(...a),this.el.setAttribute("gs-static","true")):(this.el.classList.remove(...a),this.el.removeAttribute("gs-static")),this}onResize(a=(g=>(g=this.el)==null?void 0:g.clientWidth)()){if(!a||this.prevWidth===a)return;this.prevWidth=a,this.batchUpdate();let g=!1;return this._autoColumn&&this.parentGridNode?this.opts.column!==this.parentGridNode.w&&(this.column(this.parentGridNode.w,this.opts.layout||"list"),g=!0):g=this.checkDynamicColumn(),this._isAutoCellHeight&&this.cellHeight(),this.engine.nodes.forEach(D=>{D.subGrid&&D.subGrid.onResize()}),this._skipInitialResize||this.resizeToContentCheck(g),delete this._skipInitialResize,this.batchUpdate(!1),this}resizeToContentCheck(a=!1,g=void 0){if(this.engine){if(a&&this.hasAnimationCSS())return setTimeout(()=>this.resizeToContentCheck(!1,g),this.animationDelay);if(g)zn.shouldSizeToContent(g)&&this.resizeToContentCBCheck(g.el);else if(this.engine.nodes.some(D=>zn.shouldSizeToContent(D))){const D=[...this.engine.nodes];this.batchUpdate(),D.forEach(X=>{zn.shouldSizeToContent(X)&&this.resizeToContentCBCheck(X.el)}),this._ignoreLayoutsNodeChange=!0,this.batchUpdate(!1),this._ignoreLayoutsNodeChange=!1}this._gsEventHandler.resizecontent&&this._gsEventHandler.resizecontent(null,g?[g]:this.engine.nodes)}}_updateResizeEvent(a=!1){const g=!this.parentGridNode&&(this._isAutoCellHeight||this.opts.sizeToContent||this.opts.columnOpts||this.engine.nodes.find(D=>D.sizeToContent));return!a&&g&&!this.resizeObserver?(this._sizeThrottle=zn.throttle(()=>this.onResize(),this.opts.cellHeightThrottle),this.resizeObserver=new ResizeObserver(()=>this._sizeThrottle()),this.resizeObserver.observe(this.el),this._skipInitialResize=!0):(a||!g)&&this.resizeObserver&&(this.resizeObserver.disconnect(),delete this.resizeObserver,delete this._sizeThrottle),this}static getElement(a=".grid-stack-item"){return zn.getElement(a)}static getElements(a=".grid-stack-item"){return zn.getElements(a)}static getGridElement(a){return Wi.getElement(a)}static getGridElements(a){return zn.getElements(a)}_initMargin(){let a,g=0,D=[];typeof this.opts.margin=="string"&&(D=this.opts.margin.split(" ")),D.length===2?(this.opts.marginTop=this.opts.marginBottom=D[0],this.opts.marginLeft=this.opts.marginRight=D[1]):D.length===4?(this.opts.marginTop=D[0],this.opts.marginRight=D[1],this.opts.marginBottom=D[2],this.opts.marginLeft=D[3]):(a=zn.parseHeight(this.opts.margin),this.opts.marginUnit=a.unit,g=this.opts.margin=a.h),["marginTop","marginRight","marginBottom","marginLeft"].forEach(A=>{this.opts[A]===void 0?this.opts[A]=g:(a=zn.parseHeight(this.opts[A]),this.opts[A]=a.h,delete this.opts.margin)}),this.opts.marginUnit=a.unit,this.opts.marginTop===this.opts.marginBottom&&this.opts.marginLeft===this.opts.marginRight&&this.opts.marginTop===this.opts.marginRight&&(this.opts.margin=this.opts.marginTop);const X=this.el.style;return X.setProperty("--gs-item-margin-top",`${this.opts.marginTop}${this.opts.marginUnit}`),X.setProperty("--gs-item-margin-bottom",`${this.opts.marginBottom}${this.opts.marginUnit}`),X.setProperty("--gs-item-margin-right",`${this.opts.marginRight}${this.opts.marginUnit}`),X.setProperty("--gs-item-margin-left",`${this.opts.marginLeft}${this.opts.marginUnit}`),this}static getDD(){return Uc}static setupDragIn(a,g,D,X=document){(g==null?void 0:g.pause)!==void 0&&(Zi.pauseDrag=g.pause),g={appendTo:"body",helper:"clone",...g||{}},(typeof a=="string"?zn.getElements(a,X):a).forEach((A,b)=>{Uc.isDraggable(A)||Uc.dragIn(A,g),D!=null&&D[b]&&(A.gridstackNode=D[b])})}movable(a,g){return this.opts.staticGrid?this:(Wi.getElements(a).forEach(D=>{const X=D.gridstackNode;X&&(g?delete X.noMove:X.noMove=!0,this.prepareDragDrop(X.el))}),this)}resizable(a,g){return this.opts.staticGrid?this:(Wi.getElements(a).forEach(D=>{const X=D.gridstackNode;X&&(g?delete X.noResize:X.noResize=!0,this.prepareDragDrop(X.el))}),this)}disable(a=!0){if(!this.opts.staticGrid)return this.enableMove(!1,a),this.enableResize(!1,a),this._triggerEvent("disable"),this}enable(a=!0){if(!this.opts.staticGrid)return this.enableMove(!0,a),this.enableResize(!0,a),this._triggerEvent("enable"),this}enableMove(a,g=!0){return this.opts.staticGrid?this:(a?delete this.opts.disableDrag:this.opts.disableDrag=!0,this.engine.nodes.forEach(D=>{this.prepareDragDrop(D.el),D.subGrid&&g&&D.subGrid.enableMove(a,g)}),this)}enableResize(a,g=!0){return this.opts.staticGrid?this:(a?delete this.opts.disableResize:this.opts.disableResize=!0,this.engine.nodes.forEach(D=>{this.prepareDragDrop(D.el),D.subGrid&&g&&D.subGrid.enableResize(a,g)}),this)}cancelDrag(){var a;const g=(a=this._placeholder)==null?void 0:a.gridstackNode;g&&(g._isExternal?(g._isAboutToRemove=!0,this.engine.removeNode(g)):g._isAboutToRemove&&Wi._itemRemoving(g.el,!1),this.engine.restoreInitial())}_removeDD(a){return Uc.draggable(a,"destroy").resizable(a,"destroy"),a.gridstackNode&&delete a.gridstackNode._initDD,delete a.ddElement,this}_setupAcceptWidget(){if(this.opts.staticGrid||!this.opts.acceptWidgets&&!this.opts.removable)return Uc.droppable(this.el,"destroy"),this;let a,g;const D=(X,A,b)=>{var e;b=b||A;const v=b.gridstackNode;if(!v)return;if(!((e=v.grid)!=null&&e.el)){b.style.transform=`scale(${1/this.dragTransform.xScale},${1/this.dragTransform.yScale})`;const x=b.getBoundingClientRect();b.style.left=x.x+(this.dragTransform.xScale-1)*(X.clientX-x.x)/this.dragTransform.xScale+"px",b.style.top=x.y+(this.dragTransform.yScale-1)*(X.clientY-x.y)/this.dragTransform.yScale+"px",b.style.transformOrigin="0px 0px"}let{top:u,left:t}=b.getBoundingClientRect();const w=this.el.getBoundingClientRect();t-=w.left,u-=w.top;const y={position:{top:u*this.dragTransform.xScale,left:t*this.dragTransform.yScale}};if(v._temporaryRemoved){if(v.x=Math.max(0,Math.round(t/g)),v.y=Math.max(0,Math.round(u/a)),delete v.autoPosition,this.engine.nodeBoundFix(v),!this.engine.willItFit(v)){if(v.autoPosition=!0,!this.engine.willItFit(v)){Uc.off(A,"drag");return}v._willFitPos&&(zn.copyPos(v,v._willFitPos),delete v._willFitPos)}this._onStartMoving(b,X,y,v,g,a)}else this._dragOrResize(b,X,y,v,g,a)};return Uc.droppable(this.el,{accept:X=>{const A=X.gridstackNode||this._readAttr(X,!1);if((A==null?void 0:A.grid)===this)return!0;if(!this.opts.acceptWidgets)return!1;let b=!0;if(typeof this.opts.acceptWidgets=="function")b=this.opts.acceptWidgets(X);else{const e=this.opts.acceptWidgets===!0?".grid-stack-item":this.opts.acceptWidgets;b=X.matches(e)}if(b&&A&&this.opts.maxRow){const e={w:A.w,h:A.h,minW:A.minW,minH:A.minH};b=this.engine.willItFit(e)}return b}}).on(this.el,"dropover",(X,A,b)=>{let e=(b==null?void 0:b.gridstackNode)||A.gridstackNode;if((e==null?void 0:e.grid)===this&&!e._temporaryRemoved)return!1;if(e!=null&&e._sidebarOrig&&(e.w=e._sidebarOrig.w,e.h=e._sidebarOrig.h),e!=null&&e.grid&&e.grid!==this&&!e._temporaryRemoved&&e.grid._leave(A,b),b=b||A,g=this.cellWidth(),a=this.getCellHeight(!0),!e){const t=b.getAttribute("data-gs-widget")||b.getAttribute("gridstacknode");if(t){try{e=JSON.parse(t)}catch{console.error("Gridstack dropover: Bad JSON format: ",t)}b.removeAttribute("data-gs-widget"),b.removeAttribute("gridstacknode")}e||(e=this._readAttr(b)),e._sidebarOrig={w:e.w,h:e.h}}e.grid||(e.el||(e={...e}),e._isExternal=!0,b.gridstackNode=e);const v=e.w||Math.round(b.offsetWidth/g)||1,u=e.h||Math.round(b.offsetHeight/a)||1;return e.grid&&e.grid!==this?(A._gridstackNodeOrig||(A._gridstackNodeOrig=e),A.gridstackNode=e={...e,w:v,h:u,grid:this},delete e.x,delete e.y,this.engine.cleanupNode(e).nodeBoundFix(e),e._initDD=e._isExternal=e._temporaryRemoved=!0):(e.w=v,e.h=u,e._temporaryRemoved=!0),Wi._itemRemoving(e.el,!1),Uc.on(A,"drag",D),D(X,A,b),!1}).on(this.el,"dropout",(X,A,b)=>{const e=(b==null?void 0:b.gridstackNode)||A.gridstackNode;return e&&(!e.grid||e.grid===this)&&(this._leave(A,b),this._isTemp&&this.removeAsSubGrid(e)),!1}).on(this.el,"drop",(X,A,b)=>{var e,v,u;const t=(b==null?void 0:b.gridstackNode)||A.gridstackNode;if((t==null?void 0:t.grid)===this&&!t._isExternal)return!1;const w=!!this.placeholder.parentElement,y=A!==b;this.placeholder.remove(),delete this.placeholder.gridstackNode,w&&this.opts.animate&&(this.setAnimation(!1),this.setAnimation(!0,!0));const x=A._gridstackNodeOrig;if(delete A._gridstackNodeOrig,w&&x!=null&&x.grid&&x.grid!==this){const n=x.grid;n.engine.removeNodeFromLayoutCache(x),n.engine.removedNodes.push(x),n._triggerRemoveEvent()._triggerChangeEvent(),n.parentGridNode&&!n.engine.nodes.length&&n.opts.subGridDynamic&&n.removeAsSubGrid()}if(!t||(w&&(this.engine.cleanupNode(t),t.grid=this),(e=t.grid)==null||delete e._isTemp,Uc.off(A,"drag"),b!==A?(b.remove(),A=b):A.remove(),this._removeDD(A),!w))return!1;const p=(u=(v=t.subGrid)==null?void 0:v.el)==null?void 0:u.gridstack;return zn.copyPos(t,this._readAttr(this.placeholder)),zn.removePositioningStyles(A),y&&(t.content||t.subGridOpts||Wi.addRemoveCB)?(delete t.el,A=this.addWidget(t)):(this._prepareElement(A,!0,t),this.el.appendChild(A),this.resizeToContentCheck(!1,t),p&&(p.parentGridNode=t),this._updateContainerHeight()),this.engine.addedNodes.push(t),this._triggerAddEvent(),this._triggerChangeEvent(),this.engine.endUpdate(),this._gsEventHandler.dropped&&this._gsEventHandler.dropped({...X,type:"dropped"},x&&x.grid?x:void 0,t),!1}),this}static _itemRemoving(a,g){if(!a)return;const D=a?a.gridstackNode:void 0;!(D!=null&&D.grid)||a.classList.contains(D.grid.opts.removableOptions.decline)||(g?D._isAboutToRemove=!0:delete D._isAboutToRemove,g?a.classList.add("grid-stack-item-removing"):a.classList.remove("grid-stack-item-removing"))}_setupRemoveDrop(){if(typeof this.opts.removable!="string")return this;const a=document.querySelector(this.opts.removable);return a?(!this.opts.staticGrid&&!Uc.isDroppable(a)&&Uc.droppable(a,this.opts.removableOptions).on(a,"dropover",(g,D)=>Wi._itemRemoving(D,!0)).on(a,"dropout",(g,D)=>Wi._itemRemoving(D,!1)),this):this}prepareDragDrop(a,g=!1){const D=a==null?void 0:a.gridstackNode;if(!D)return;const X=D.noMove||this.opts.disableDrag,A=D.noResize||this.opts.disableResize,b=this.opts.staticGrid||X&&A;if((g||b)&&(D._initDD&&(this._removeDD(a),delete D._initDD),b&&a.classList.add("ui-draggable-disabled","ui-resizable-disabled"),!g))return this;if(!D._initDD){let e,v;const u=(y,x)=>{this.triggerEvent(y,y.target),e=this.cellWidth(),v=this.getCellHeight(!0),this._onStartMoving(a,y,x,D,e,v)},t=(y,x)=>{this._dragOrResize(a,y,x,D,e,v)},w=y=>{this.placeholder.remove(),delete this.placeholder.gridstackNode,delete D._moving,delete D._resizing,delete D._event,delete D._lastTried;const x=D.w!==D._orig.w,p=y.target;if(!(!p.gridstackNode||p.gridstackNode.grid!==this)){if(D.el=p,D._isAboutToRemove){const n=a.gridstackNode.grid;n._gsEventHandler[y.type]&&n._gsEventHandler[y.type](y,p),n.engine.nodes.push(D),n.removeWidget(a,!0,!0)}else zn.removePositioningStyles(p),D._temporaryRemoved?(this._writePosAttr(p,D),this.engine.addNode(D)):this._writePosAttr(p,D),this.triggerEvent(y,p);this._extraDragRow=0,this._updateContainerHeight(),this._triggerChangeEvent(),this.engine.endUpdate(),y.type==="resizestop"&&(Number.isInteger(D.sizeToContent)&&(D.sizeToContent=D.h),this.resizeToContentCheck(x,D))}};Uc.draggable(a,{start:u,stop:w,drag:t}).resizable(a,{start:u,stop:w,resize:t}),D._initDD=!0}return Uc.draggable(a,X?"disable":"enable").resizable(a,A?"disable":"enable"),this}_onStartMoving(a,g,D,X,A,b){var e;if(this.engine.cleanNodes().beginUpdate(X),this._writePosAttr(this.placeholder,X),this.el.appendChild(this.placeholder),this.placeholder.gridstackNode=X,(e=X.grid)!=null&&e.el)this.dragTransform=zn.getValuesFromTransformedElement(a);else if(this.placeholder&&this.placeholder.closest(".grid-stack")){const v=this.placeholder.closest(".grid-stack");this.dragTransform=zn.getValuesFromTransformedElement(v)}else this.dragTransform={xScale:1,xOffset:0,yScale:1,yOffset:0};if(X.el=this.placeholder,X._lastUiPosition=D.position,X._prevYPix=D.position.top,X._moving=g.type==="dragstart",X._resizing=g.type==="resizestart",delete X._lastTried,g.type==="dropover"&&X._temporaryRemoved&&(this.engine.addNode(X),X._moving=!0),this.engine.cacheRects(A,b,this.opts.marginTop,this.opts.marginRight,this.opts.marginBottom,this.opts.marginLeft),g.type==="resizestart"){const v=this.getColumn()-X.x,u=(this.opts.maxRow||Number.MAX_SAFE_INTEGER)-X.y;Uc.resizable(a,"option","minWidth",A*Math.min(X.minW||1,v)).resizable(a,"option","minHeight",b*Math.min(X.minH||1,u)).resizable(a,"option","maxWidth",A*Math.min(X.maxW||Number.MAX_SAFE_INTEGER,v)).resizable(a,"option","maxWidthMoveLeft",A*Math.min(X.maxW||Number.MAX_SAFE_INTEGER,X.x+X.w)).resizable(a,"option","maxHeight",b*Math.min(X.maxH||Number.MAX_SAFE_INTEGER,u)).resizable(a,"option","maxHeightMoveUp",b*Math.min(X.maxH||Number.MAX_SAFE_INTEGER,X.y+X.h))}}_dragOrResize(a,g,D,X,A,b){const e={...X._orig};let v,u=this.opts.marginLeft,t=this.opts.marginRight,w=this.opts.marginTop,y=this.opts.marginBottom;const x=Math.round(b*.1),p=Math.round(A*.1);if(u=Math.min(u,p),t=Math.min(t,p),w=Math.min(w,x),y=Math.min(y,x),g.type==="drag"){if(X._temporaryRemoved)return;const i=D.position.top-X._prevYPix;X._prevYPix=D.position.top,this.opts.draggable.scroll!==!1&&zn.updateScrollPosition(a,D.position,i);const d=D.position.left+(D.position.left>X._lastUiPosition.left?-t:u),s=D.position.top+(D.position.top>X._lastUiPosition.top?-y:w);e.x=Math.round(d/A),e.y=Math.round(s/b);const c=this._extraDragRow;if(this.engine.collide(X,e)){const f=this.getRow();let m=Math.max(0,e.y+X.h-f);this.opts.maxRow&&f+m>this.opts.maxRow&&(m=Math.max(0,this.opts.maxRow-f)),this._extraDragRow=m}else this._extraDragRow=0;if(this._extraDragRow!==c&&this._updateContainerHeight(),X.x===e.x&&X.y===e.y)return}else if(g.type==="resize"){if(e.x<0||(zn.updateScrollResize(g,a,b),e.w=Math.round((D.size.width-u)/A),e.h=Math.round((D.size.height-w)/b),X.w===e.w&&X.h===e.h)||X._lastTried&&X._lastTried.w===e.w&&X._lastTried.h===e.h)return;const i=D.position.left+u,d=D.position.top+w;e.x=Math.round(i/A),e.y=Math.round(d/b),v=!0}X._event=g,X._lastTried=e;const n={x:D.position.left+u,y:D.position.top+w,w:(D.size?D.size.width:X.w*A)-u-t,h:(D.size?D.size.height:X.h*b)-w-y};if(this.engine.moveNodeCheck(X,{...e,cellWidth:A,cellHeight:b,rect:n,resizing:v})){X._lastUiPosition=D.position,this.engine.cacheRects(A,b,w,t,y,u),delete X._skipDown,v&&X.subGrid&&X.subGrid.onResize(),this._extraDragRow=0,this._updateContainerHeight();const i=g.target;X._sidebarOrig||this._writePosAttr(i,X),this.triggerEvent(g,i)}}triggerEvent(a,g){let D=this;for(;D.parentGridNode;)D=D.parentGridNode.grid;D._gsEventHandler[a.type]&&D._gsEventHandler[a.type](a,g)}_leave(a,g){g=g||a;const D=g.gridstackNode;if(!D||(g.style.transform=g.style.transformOrigin=null,Uc.off(a,"drag"),D._temporaryRemoved))return;D._temporaryRemoved=!0,this.engine.removeNode(D),D.el=D._isExternal&&g?g:a;const X=D._sidebarOrig;D._isExternal&&this.engine.cleanupNode(D),D._sidebarOrig=X,this.opts.removable===!0&&Wi._itemRemoving(a,!0),a._gridstackNodeOrig?(a.gridstackNode=a._gridstackNodeOrig,delete a._gridstackNodeOrig):D._isExternal&&this.engine.restoreInitial()}commit(){return Ise(this,this.batchUpdate(!1),"commit","batchUpdate","5.2"),this}}Wi.renderCB=(r,a)=>{r&&a!=null&&a.content&&(r.textContent=a.content)},Wi.resizeToContentParent=".grid-stack-item-content",Wi.Utils=zn,Wi.Engine=Dd,Wi.GDRev="12.3.2";const Bse=[{id:1,name:"Goles",isSelected:!1},{id:2,name:"Pases acertados",isSelected:!1},{id:23,name:"Tiros de Esquina",isSelected:!1},{id:3,name:"Balones recuperados en disputa",isSelected:!1},{id:4,name:"Asistencias",isSelected:!1},{id:5,name:"Participaciones en gol",isSelected:!1},{id:6,name:"Tiros a gol",isSelected:!1},{id:7,name:"Tiros a gol que llegaron a la portería",isSelected:!1},{id:8,name:"Cabeceos en área rival",isSelected:!1},{id:9,name:"Cabeceos en área propia",isSelected:!1},{id:10,name:"Centros",isSelected:!1},{id:11,name:"Centros acertados",isSelected:!1},{id:12,name:"1vs1 exitosos ofensivos",isSelected:!1},{id:13,name:"1vs1 exitosos ofensivos que terminaron en gol",isSelected:!1},{id:14,name:"1vs1 defensivos exitoso",isSelected:!1},{id:15,name:"Rechaces",isSelected:!1},{id:16,name:"Balones ganados en área propia",isSelected:!1},{id:17,name:"Balones ganados en área rival",isSelected:!1},{id:18,name:"Faltas cometidas",isSelected:!1},{id:19,name:"Faltas recibidas",isSelected:!1},{id:20,name:"Tarjetas amarillas",isSelected:!1},{id:21,name:"Tarjetas rojas",isSelected:!1},{id:22,name:"Atajadas",isSelected:!1},{id:24,name:"Oportunidades de gol",isSelected:!1},{id:25,name:"Balones recuperados en cancha rival",isSelected:!1}],Vd=r=>Bse.find(a=>a.id===r),Fd=new Map([[9,{id:9,analysisTypes:new Map([["2-20",{analysisType:"successfulPasses",name:"Pases acertados",title:"Mapeo de pases acertados",titleShort:"Pases acertados"}],["3-21",{analysisType:"unsuccessfulPasses",name:"Pases no acertados",title:"Mapeo de pases no acertados",titleShort:"Pases no acertados"}],["222-223-224-225",{analysisType:"recoveredBalls",name:"Balones recuperados",title:"Mapeo de balones recuperados",titleShort:"Balones recuperados"}],["226-227-228-229",{analysisType:"lostBalls",name:"Balones perdidos",title:"Mapeo de balones perdidos",titleShort:"Balones perdidos"}]])}],[1,{general:"General",offensive:"Ofensivo",defensive:"Defensivo",possession:"Posesión",stoppedBall:"Balón parado",penalties:"Infracción"}]]);class ay{constructor(a,g=new Map,D,X=null,A=!1,b=!1,e=null,v=null){ud(this,"id",""),ud(this,"childViews",[]),ud(this,"viewId",0),ud(this,"dynamicFilters",null),ud(this,"componentSpecificFilters",new Map),ud(this,"isPostMatch",!1),ud(this,"isTemplateMode",!1),ud(this,"filtresJSON",null),ud(this,"token",null),ud(this,"_isUpdating",!1),this.id=a,this.viewId=D,this.childViews=g,this.dynamicFilters=X,this.isPostMatch=A,this.isTemplateMode=b,this.filtresJSON=e,this.token=v,this.componentSpecificFilters=new Map}hasEventTypeId(a,g){return!a||!Array.isArray(a)?!1:a.some(D=>D&&D.event_type_id===g)}hasCategoryId(a,g){return!a||!Array.isArray(a)?!1:a.some(D=>D&&D.category_id===g)}getId(){return this.id}setViewId(a){this.viewId=a}setFiltersJSON(a){this.filtresJSON=a}setDynamicFilters(a,g=null){g?this.componentSpecificFilters.set(g,[...a]):this.dynamicFilters=a}getComponentDynamicFilters(a){return a&&this.componentSpecificFilters.has(a)?this.componentSpecificFilters.get(a):this.dynamicFilters}getAllComponentFilters(){return this.componentSpecificFilters}debugComponentFilters(){this.componentSpecificFilters.forEach((a,g)=>{console.log(` Component ${g}:`,a)})}static debugAllComponentFilters(){document.querySelectorAll("[data-container-id]").forEach(a=>{a.getAttribute("data-container-id")})}clearAllComponentFilters(){this.componentSpecificFilters.clear()}getDynamicFilters(){return this.dynamicFilters}getHomeTeamViews(){return this.childViews.filter(a=>a.view.isHomeTeam)}getAwayTeamViews(){return this.childViews.filter(a=>!a.view.isHomeTeam)}addView(a,g=!1){var D,X,A,b,e,v,u,t,w,y;if(a.view.filterAndViewsContainer=this,xi.emit("component-added-to-container",this),this.viewId===5&&a.view.componentProps&&!g&&(a.view.componentProps.preMatchType=this.dynamicFilters[0]!==3&&this.dynamicFilters[0]||1,a.view.filterMultiple={isHomeTeam:a.view.componentProps.preMatchType===1}),this.viewId===10&&a.view.componentProps&&!g&&(a.view.componentProps.isHomeTeamForAnalysis=this.dynamicFilters[0]!==3?this.dynamicFilters[0]===1:1),this.viewId===7&&a.view.componentProps&&!g){const x=this.getComponentDynamicFilters(a.view.id),p=x||this.dynamicFilters;!x&&this.dynamicFilters&&this.dynamicFilters.length>0&&this.setDynamicFilters(this.dynamicFilters,a.view.id);const n=p[0]===1?"offensive":"defensive",i=p[1]===1;a.view.componentProps.analysisType=n,a.view.componentProps.isHomeTeamForAnalysis=i,a.isHomeTeam=i,a.view.filterMultiple={isHomeTeam:i},xi.emit("component-props-updated",{viewId:a.view.id,componentProps:a.view.componentProps,dynamicFilters:p})}if(this.viewId===1&&a.view.componentProps&&!g){const x=this.dynamicFilters[0]||[];if(x&&x.length>0){let p;if(Array.isArray(x)){const i=this.childViews.map(s=>{var c;return(c=s.view.componentProps)==null?void 0:c.type}).filter(s=>s!==void 0),d=x.filter(s=>!i.includes(s));d.length>0?p=d[0]:p=x[0]}else p=x;const n=Fd.get(this.viewId);a.view.componentProps.type=p,a.view.componentProps.default=!1,a.view.title=`Comparativa ${n[p]}`,a.view.filterMultiple={category:p}}}if(this.viewId===9&&a.view.componentProps&&!g){const x=this.dynamicFilters[0].map(d=>d.join("-"));let p="";const n=this.dynamicFilters[1],i=Fd.get(this.viewId);if(n===3){this.getHomeTeamViews().length===0&&this.getAwayTeamViews().length>0&&this.getAwayTeamViews().forEach(m=>{m.view.componentProps.isHomeTeamForAnalysis=!0,m.view.isHomeTeam=!0,m.view.filterMultiple&&(m.view.filterMultiple.isHomeTeam=!0)});let d=null;const s=this.getHomeTeamViews(),c=this.getAwayTeamViews();let f=!0;for(let m=0;m<x.length;m++){p=x[m],d=i.analysisTypes.get(x[m]);const T=s.find(S=>S.view.componentProps.analysisType===d.analysisType),C=c.find(S=>S.view.componentProps.analysisType===d.analysisType);if(!T||!C){f=!T;break}}f?this.childViews.length===0?(a.view.componentProps.analysisType=d.analysisType,a.view.componentProps.isHomeTeamForAnalysis=!0,a.view.title=d.title,a.view.titleShort=d.titleShort,a.view.isHomeTeam=!0,a.view.filterMultiple={isHomeTeam:a.view.isHomeTeam,categoryIds:p.split("-").map(m=>parseInt(m))}):this.childViews.reduce((m,T,C,S)=>{let L={analysisType:T.view.componentProps.analysisType,title:T.view.title,isHomeTeamForAnalysis:T.view.componentProps.isHomeTeamForAnalysis,isHomeTeam:T.view.isHomeTeam};return m&&(m.isHomeTeam&&!T.view.isHomeTeam?(T.view.componentProps.analysisType=d.analysisType,T.view.componentProps.isHomeTeamForAnalysis=!0,T.view.title=d.title,a.view.titleShort=d.titleShort,T.view.isHomeTeam=!0,T.view.filterMultiple={isHomeTeam:T.view.isHomeTeam,categoryIds:p.split("-").map(R=>parseInt(R))}):!m.isHomeTeam&&!T.view.isHomeTeam&&(T.view.componentProps.analysisType=m.analysisType,T.view.componentProps.isHomeTeamForAnalysis=m.isHomeTeamForAnalysis,T.view.title=m.title,T.view.titleShort=m.titleShort,T.view.isHomeTeam=m.isHomeTeam,T.view.filterMultiple={isHomeTeam:T.view.isHomeTeam,categoryIds:p.split("-").map(R=>parseInt(R))}),C===S.length-1&&(a.view.componentProps.analysisType=L.analysisType,a.view.componentProps.isHomeTeamForAnalysis=L.isHomeTeamForAnalysis,a.view.title=L.title,a.view.titleShort=L.titleShort,a.view.isHomeTeam=L.isHomeTeam,a.view.filterMultiple={isHomeTeam:a.view.isHomeTeam,categoryIds:p.split("-").map(R=>parseInt(R))})),L},null):(a.view.componentProps.analysisType=d.analysisType,a.view.componentProps.isHomeTeamForAnalysis=!1,a.view.title=d.title,a.view.titleShort=d.titleShort,a.view.isHomeTeam=!1,a.view.filterMultiple={isHomeTeam:a.view.isHomeTeam,categoryIds:p.split("-").map(m=>parseInt(m))})}else{const d=n===1,s=d?this.getHomeTeamViews():this.getAwayTeamViews();a.view.componentProps.isHomeTeamForAnalysis=d,a.view.isHomeTeam=d;for(let c=0;c<x.length;c++){const f=i.analysisTypes.get(x[c]);if(!s.find(m=>m.view.componentProps.analysisType===f.analysisType)){a.view.componentProps.analysisType=f.analysisType,a.view.title=f.title,a.view.titleShort=f.titleShort,a.view.filterMultiple={categoryIds:x[c].split("-").map(m=>parseInt(m)),isHomeTeam:a.view.isHomeTeam};break}}}}if(this.viewId===2&&!g&&a.view.componentProps){const x=this.getComponentDynamicFilters(a.view.id),p=x||this.dynamicFilters;!x&&this.dynamicFilters&&this.dynamicFilters.length>0&&(this.setDynamicFilters(this.dynamicFilters,a.view.id),console.log(`GscTopPlayer - initialized specific filters for component ${a.view.id} with default filters:`,this.dynamicFilters)),a.view.componentProps.game&&(a.view.componentProps.gameid=a.view.componentProps.game.id,a.view.componentProps.season=a.view.componentProps.game.season_id,a.view.componentProps.teamView=p[1]===2?a.view.componentProps.game.awayTeam.team_id:p[1]===1?a.view.componentProps.game.homeTeam.team_id:0);const n=this.dynamicFilters[0]||[];let i=null;if(Array.isArray(n)){if(n.length>0){const c=this.childViews.map(m=>{var T;const C=(T=m.view.componentProps)==null?void 0:T.categoryView;return C&&C.length>0?C[0].id:null}).filter(m=>m!==null),f=n.filter(m=>!c.includes(m));console.log("GSCtops addView (array mode) - existingCategories:",c),console.log("GSCtops addView (array mode) - categoriesWithoutComponent:",f),f.length>0?i=f[0]:console.log("GSCtops addView (array mode) - all categories already have components")}}else{const c=n;c&&(this.childViews.find(f=>{var m;const T=(m=f.view.componentProps)==null?void 0:m.categoryView;return T&&T.length>0&&T[0].id===c})?console.log("GSCtops addView (single mode) - component already exists, skipping creation"):i=c)}let d=null;if(i)try{d=Vd(i)}catch(c){console.warn("Error getting category by ID:",c)}const s=p&&p.length>1?p[1]:1;a.view.filterMultiple={categoryId:i,teamType:s},a.view.componentProps.categoryView=d?[{id:i,name:d.name}]:i?[{id:i,name:`Category ${i}`}]:[{id:0,name:"Category"}]}if(this.viewId===8&&a.view.componentProps&&!g&&a.view.game&&(a.view.componentProps._isReactive||(a.view.componentProps=h.reactive(a.view.componentProps),a.view.componentProps._isReactive=!0),a.view.componentProps.areInactiveVisible=this.dynamicFilters[0]||!1,a.view.componentProps.game=(D=a.view)==null?void 0:D.game,a.view.componentProps.teamSelected={teamId:(A=(X=a.view)==null?void 0:X.game)==null?void 0:A.home_team},a.view.componentProps.isDefault=!1,xi.emit("component-props-updated",{viewId:a.view.id,componentProps:a.view.componentProps,dynamicFilters:this.dynamicFilters})),this.viewId===6&&a.view.componentProps&&!g){a.view.componentProps._isReactive||(a.view.componentProps=h.reactive(a.view.componentProps),a.view.componentProps._isReactive=!0);const x=this.getComponentDynamicFilters(a.view.id),p=x||this.dynamicFilters;!x&&this.dynamicFilters&&this.dynamicFilters.length>0&&this.setDynamicFilters(this.dynamicFilters,a.view.id);const n=p&&p.length>0?p[0]:[];if(n&&n.length>0){let i=0;for(const d of n)if(!this.childViews.find(s=>s.view.componentProps.gameNumber===d)){i=d;break}i&&(a.view.componentProps.gameNumber=i,a.view.filterMultiple={gameNumber:i})}xi.emit("component-props-updated",{viewId:a.view.id,componentProps:a.view.componentProps,dynamicFilters:p})}if(this.viewId===3&&a.view.componentProps&&!g&&a.view.game){a.view.componentProps._isReactive||(a.view.componentProps=h.reactive(a.view.componentProps),a.view.componentProps._isReactive=!0);const x=this.getComponentDynamicFilters(a.view.id),p=x||this.dynamicFilters;!x&&this.dynamicFilters&&this.dynamicFilters.length>0&&this.setDynamicFilters(this.dynamicFilters,a.view.id);const n=p&&p.length>0?p[0]:!1;a.view.componentProps.desplegable=n,a.view.componentProps.key=n,a.view.componentProps.game=(b=a.view)==null?void 0:b.game,a.view.componentProps.defaultShields=!1,xi.emit("component-props-updated",{viewId:a.view.id,componentProps:a.view.componentProps,dynamicFilters:p})}if(this.viewId===4&&(console.log("TIMELINE TIMELINE - TIMELINE TIMELINE - TIMELINE TIMELINE - TIMELINE TIMELINE - TIMELINE TIMELINE - TIMELINE TIMELINE"),console.log("*********************** *********************** this.token *********************** *********************** ",this.token),a.view.componentProps&&!g&&a.view.game)){if(a.view.componentProps._isReactive||(a.view.componentProps=h.reactive(a.view.componentProps),a.view.componentProps._isReactive=!0),this.isPostMatch){a.view.componentProps.key=!1,a.view.componentProps.isDefault=!1,a.view.componentProps.token=this.token,a.view.componentProps.gameId=(v=(e=a.view)==null?void 0:e.game)==null?void 0:v.game_id,a.view.componentProps.homeTeam=(t=(u=a.view)==null?void 0:u.game)==null?void 0:t.home_team,a.view.componentProps.awayTeam=(y=(w=a.view)==null?void 0:w.game)==null?void 0:y.visiting_team;const n=this.getComponentDynamicFilters(a.view.id),i=n||this.dynamicFilters;!n&&this.dynamicFilters&&this.dynamicFilters.length>0&&this.setDynamicFilters(this.dynamicFilters,a.view.id);const d=i&&i.length>0?i[0]:[],s=this.hasEventTypeId(d,1),c=this.hasCategoryId(d,8),f=this.hasCategoryId(d,9),m=this.hasEventTypeId(d,3);console.log("Timeline - Events check:",{goals:s,yellowCards:c,redCards:f,substitutions:m,selectedEvents:d,componentId:a.view.id,usingSpecificFilters:!!n}),a.view.componentProps.goals=s,a.view.componentProps.yellowCards=c,a.view.componentProps.redCards=f,a.view.componentProps.substitutions=m}const x=this.getComponentDynamicFilters(a.view.id)||this.dynamicFilters,p=x&&x.length>0?x[0]:[];a.view.componentProps.selectedEvents=p,a.view.componentProps.key=p.length>0,xi.emit("component-props-updated",{viewId:a.view.id,componentProps:a.view.componentProps,dynamicFilters:x})}this.childViews.push(a),xi.emit("view-added"),console.log("this.childViews",this.childViews)}getHowManyViewsToAdd(a){if(this.viewId===5)return 1;if(this.viewId===6){const g=a[0];return g===2||g===3?g:1}if(this.viewId===4){const g=a&&a.length>0&&Array.isArray(a[0])&&a[0].length>0,D=this.childViews.length===0&&g;return console.log("Timeline getHowManyViewsToAdd:",{hasSelectedEvents:g,childViewsLength:this.childViews.length,shouldAdd:D,dynamicFilters:a}),g?1:0}if(this.viewId===9){const g=a[0],D=a[1];if(D===1||D===2){const X=D===1?this.getHomeTeamViews():this.getAwayTeamViews();return g.length-X.length}else return g*2-(this.getHomeTeamViews().length+this.getAwayTeamViews().length)}if(this.viewId===2){const g=a[0]||[],D=a[1]||1;if(console.log("GSCtops getHowManyViewsToAdd - categoriesIdsSelected:",g),console.log("GSCtops getHowManyViewsToAdd - teamType:",D),console.log("GSCtops getHowManyViewsToAdd - childViews.length:",this.childViews.length),!g||g.length===0)return 0;if(Array.isArray(g)){const X=this.childViews.map(b=>{var e;const v=(e=b.view.componentProps)==null?void 0:e.categoryView;return v&&v.length>0?v[0].id:null}).filter(b=>b!==null),A=g.filter(b=>!X.includes(b));return console.log("GSCtops getHowManyViewsToAdd (array mode) - existingCategories:",X),console.log("GSCtops getHowManyViewsToAdd (array mode) - categoriesWithoutComponent:",A),A.length}else{const X=g,A=this.childViews.find(b=>{var e,v;const u=(e=b.view.componentProps)==null?void 0:e.categoryView,t=((v=b.view.filterMultiple)==null?void 0:v.teamType)||1;return u&&u.length>0&&u[0].id===X&&t===D});return console.log("GSCtops getHowManyViewsToAdd (edit mode) - categoryId:",X),console.log("GSCtops getHowManyViewsToAdd (edit mode) - teamType:",D),console.log("GSCtops getHowManyViewsToAdd (edit mode) - existingComponent:",A),A?0:1}}if(this.viewId===1){const g=a[0]||[];if(console.log("GSCComparativeReports getHowManyViewsToAdd - selectedAnalysisTypes:",g),console.log("GSCComparativeReports getHowManyViewsToAdd - childViews.length:",this.childViews.length),!g||g.length===0)return 0;if(Array.isArray(g)){const D=this.childViews.map(A=>{var b;return(b=A.view.componentProps)==null?void 0:b.type}).filter(A=>A!==void 0),X=g.filter(A=>!D.includes(A));return console.log("GSCComparativeReports getHowManyViewsToAdd (array mode) - existingTypes:",D),console.log("GSCComparativeReports getHowManyViewsToAdd (array mode) - typesWithoutComponent:",X),X.length}else{const D=g,X=this.childViews.find(A=>{var b;return((b=A.view.componentProps)==null?void 0:b.type)===D});return console.log("GSCComparativeReports getHowManyViewsToAdd (edit mode) - analysisType:",D),console.log("GSCComparativeReports getHowManyViewsToAdd (edit mode) - existingComponent:",X),X?0:1}}return 0}getRequiresAddView(a){if(console.log("getRequiresAddView",this.viewId,a),this.viewId===5)return console.log("this.childViews:",this.childViews),a[0]===3?this.childViews.length<2:this.childViews.length===0;if(this.viewId===10)return a[0]===3?this.childViews.length<2:this.childViews.length===0;if(this.viewId===7)return a[1]===3?this.childViews.length<2:this.childViews.length===0;if(this.viewId===6){const g=a[0];return g?g.length>this.childViews.length:this.childViews.length===0}if(this.viewId===4){const g=a&&a.length>0&&Array.isArray(a[0])&&a[0].length>0,D=this.childViews.length===0&&g;return console.log("Timeline getRequiresAddView:",{hasSelectedEvents:g,childViewsLength:this.childViews.length,shouldAdd:D,dynamicFilters:a}),D}if(this.viewId===9)return this.getRequiresAddViewMultipleAndBothTeams(a);if(this.viewId===1){const g=a[0]||[];if(console.log("GSCComparativeReports getRequiresAddView - selectedAnalysisTypes:",g),console.log("GSCComparativeReports getRequiresAddView - childViews.length:",this.childViews.length),!g||g.length===0)return!1;if(Array.isArray(g)){const D=this.childViews.map(b=>{var e;return(e=b.view.componentProps)==null?void 0:e.type}).filter(b=>b!==void 0),X=g.filter(b=>!D.includes(b));console.log("GSCComparativeReports getRequiresAddView (array mode) - existingTypes:",D),console.log("GSCComparativeReports getRequiresAddView (array mode) - typesWithoutComponent:",X);const A=X.length>0;return console.log("GSCComparativeReports getRequiresAddView (array mode) - shouldAdd:",A),A}else{const D=g,X=this.childViews.find(b=>{var e;return((e=b.view.componentProps)==null?void 0:e.type)===D});console.log("GSCComparativeReports getRequiresAddView (edit mode) - analysisType:",D),console.log("GSCComparativeReports getRequiresAddView (edit mode) - existingComponent:",X);const A=!X;return console.log("GSCComparativeReports getRequiresAddView (edit mode) - shouldAdd:",A),A}}if(this.viewId===2){const g=a[0]||[];if(console.log("2222222222222222222222222222222222222222222222222222222222"),console.log(""),Array.isArray(g)){if(g.length>0){const D=this.childViews.map(b=>{var e;const v=(e=b.view.componentProps)==null?void 0:e.categoryView;return v&&v.length>0?v[0].id:null}).filter(b=>b!==null),X=g.filter(b=>!D.includes(b));console.log("GSCtops getRequiresAddView (array mode) - existingCategories:",D),console.log("GSCtops getRequiresAddView (array mode) - categoriesWithoutComponent:",X);const A=X.length>0;return console.log("GSCtops getRequiresAddView (array mode) - shouldAdd:",A),A}return!1}else{const D=g,X=a[1]||1;if(D){const A=this.childViews.find(e=>{var v,u;const t=(v=e.view.componentProps)==null?void 0:v.categoryView,w=((u=e.view.filterMultiple)==null?void 0:u.teamType)||1;return t&&t.length>0&&t[0].id===D&&w===X});console.log("GSCtops getRequiresAddView (single mode) - categoryId:",D,"teamType:",X),console.log("GSCtops getRequiresAddView (single mode) - existingComponent:",A);const b=!A;return console.log("GSCtops getRequiresAddView (single mode) - shouldAdd:",b),b}return!1}}return this.viewId===8||this.viewId===3?this.childViews.length===0:!1}getRequiresAddViewMultipleAndBothTeams(a){console.log("*******************************************************"),console.log("dynamicFilters",a);const g=this.childViews.filter(v=>v.view.isHomeTeam),D=this.childViews.filter(v=>!v.view.isHomeTeam),X=a[0].length,A=a[1],b=X*(A===1||A===2?1:2),e=A===3?g.length+D.length:g.length||D.length;return b>e}getRequiresLessViews(a){if(this.viewId===5)return a[0]!==3&&this.childViews.length>1;if(this.viewId===6){const g=a[0];return g===2||g===3}return this.viewId,!1}updateSummary({dynamicFilters:a}){const g=this.childViews[0],D=document.querySelector(`[gs-id="${g.view.id}"]`),X=g.grid;if(console.log("sumaryyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyYYYYYYYYYYYYYYYYYy"),console.log("childView",g),console.log("dynamicFilters",a),g&&D&&X){const A=!a[0],b=`min_column${A?"_2":""}`,e=`min_row${A?"_2":""}`,v=`max_column${A?"_2":""}`,u=`max_row${A?"_2":""}`,t=`colspan${A?"_2":""}`,w=`rowspan${A?"_2":""}`,y=g.view.coreView[t],x=g.view.coreView[w],p=g.view.coreView[b],n=g.view.coreView[e],i=g.view.coreView[v],d=g.view.coreView[u];g.view.w=y,g.view.h=x,g.view.maxWidth=i,g.view.maxHeight=d,g.view.minWidth=p,g.view.minHeight=n,D.setAttribute("gs-w",y),D.setAttribute("gs-h",x),D.setAttribute("gs-max-w",i),D.setAttribute("gs-max-h",d),D.setAttribute("gs-min-w",p),D.setAttribute("gs-min-h",n),console.log("childView.view",g.view),X.update(D,{h:x,w:y,"gs-max-h":d,"gs-max-w":i,"gs-min-h":n,"gs-min-w":p})}}updateDynamicFilters(a,g=null){if(this._isUpdating){console.log("Skipping updateDynamicFilters due to update in progress");return}this._isUpdating=!0,g?(this.componentSpecificFilters.set(g,[...a]),console.log(`Updated specific filters for component ${g}:`,a)):this.dynamicFilters=a,xi.emit("component-added-to-container",this);try{if(this.viewId===5){const D=a[0]||1;if(D<3)if(this.childViews.length===1){const X=this.childViews[0];X.view.componentProps&&(X.view.componentProps.preMatchType=D,X.view.filterMultiple={isHomeTeam:X.view.componentProps.preMatchType===1})}else{const X=this.childViews.pop(),A=X.grid,b=X.page,e=document.querySelector(`[gs-id="${X.view.id}"]`);if(A&&e&&(A.removeWidget(e),b)){const u=b.items.findIndex(t=>t.id===X.view.id);u!==-1&&b.items.splice(u,1)}const v=this.childViews[0];v.view.componentProps&&(v.view.componentProps.preMatchType=D,v.view.filterMultiple={isHomeTeam:v.view.componentProps.preMatchType})}else this.childViews.forEach((X,A)=>{X.view.componentProps.preMatchType=A+1,X.view.filterMultiple={isHomeTeam:X.view.componentProps.preMatchType}})}if(this.viewId===10){const D=a[0]||1;if(D<3)if(this.childViews.length===1){const X=this.childViews[0];X.view.componentProps&&(X.view.componentProps.isHomeTeamForAnalysis=D===1)}else{const X=this.childViews.pop(),A=X.grid,b=X.page,e=document.querySelector(`[gs-id="${X.view.id}"]`);if(A&&e&&(A.removeWidget(e),b)){const u=b.items.findIndex(t=>t.id===X.view.id);u!==-1&&b.items.splice(u,1)}const v=this.childViews[0];v.view.componentProps&&(v.view.componentProps.isHomeTeamForAnalysis=D===1)}else this.childViews.forEach((X,A)=>{X.view.componentProps.isHomeTeamForAnalysis=A%2===0})}if(this.viewId===7){const D=a[1];if(D===3)this.childViews.forEach((X,A)=>{X.view.componentProps.isHomeTeamForAnalysis=A%2===0,X.view.isHomeTeam=A%2===0,X.view.componentProps.analysisType=this.dynamicFilters[0]===1?"offensive":"defensive",X.view.filterMultiple={isHomeTeam:X.view.isHomeTeam}});else{const X=D===1;if(this.childViews.length>0){const A=this.childViews[0];A.view.componentProps.isHomeTeamForAnalysis=X,A.view.isHomeTeam=X,A.view.componentProps.analysisType=this.dynamicFilters[0]===1?"offensive":"defensive",A.view.filterMultiple={isHomeTeam:X},this.childViews.length>1&&this.removeChildView(this.childViews[1])}}}if(this.viewId===9){const D=a[0],X=a[1];if(X===3){if(this.childViews.length>D.length){const A=D.map(b=>{const e=b.join("-");return Fd.get(this.viewId).analysisTypes.get(e).analysisType});this.childViews.reduce((b,e)=>(A.includes(e.view.componentProps.analysisType)||b.push(e.view.componentProps.analysisType),b),[]).forEach(b=>{const e=this.childViews.findIndex(v=>v.view.componentProps.analysisType===b);if(e!==-1){for(let v=e;v<this.childViews.length;v++){const u=this.childViews[v+1],t=this.childViews[v];u&&(t.view.componentProps.analysisType=u.view.componentProps.analysisType,t.view.componentProps.isHomeTeamForAnalysis=u.view.componentProps.isHomeTeamForAnalysis,t.view.title=u.view.title,t.view.titleShort=u.view.titleShort,t.view.isHomeTeam=u.view.isHomeTeam)}this.removeChildView(this.childViews[this.childViews.length-1])}})}}else{const A=X===1,b=this.getHomeTeamViews(),e=this.getAwayTeamViews();if(A&&b.length===0)e.forEach(v=>{v.view.componentProps.isHomeTeamForAnalysis=!0,v.view.isHomeTeam=!0});else if(!A&&e.length===0)b.forEach(v=>{v.view.componentProps.isHomeTeamForAnalysis=!1,v.view.isHomeTeam=!1});else if(b.length===e.length)A||b.forEach(v=>{v.view.componentProps.isHomeTeam=!1,v.view.isHomeTeam=!1}),e.forEach(v=>{this.removeChildView(v)});else{const v=A?this.getHomeTeamViews():this.getAwayTeamViews();if(v.length>D.length){const u=D.map(t=>{const w=t.join("-");return Fd.get(this.viewId).analysisTypes.get(w).analysisType});v.forEach(t=>{u.includes(t.view.componentProps.analysisType)||this.removeChildView(t)})}}}}if(this.viewId===2){console.log("GSCtops updateDynamicFilters - processing category changes"),console.log("GSCtops updateDynamicFilters - componentId:",g);const D=a[0]||[];if(Array.isArray(D)){console.log("GSCtops updateDynamicFilters - array mode, selected categories:",D);const X=this.childViews.map(b=>{var e,v;const u=(e=b.view.componentProps)==null?void 0:e.categoryView,t=((v=b.view.filterMultiple)==null?void 0:v.teamType)||1,w=u&&u.length>0?u[0].id:null;return w?{categoryId:w,teamType:t,viewId:b.view.id}:null}).filter(b=>b!==null);if(console.log("GSCtops updateDynamicFilters - existing category-team combinations:",X),g){console.log("GSCtops updateDynamicFilters - updating specific component:",g);const b=this.childViews.find(e=>e.view.id===g);if(b){const e=a[1]||1,v=D[0];if(v){let u=null;try{u=Vd(v)}catch(t){console.warn("Error getting category by ID:",t)}b.view.filterMultiple={categoryId:v,teamType:e},b.view.componentProps.game&&(e===1?b.view.componentProps.teamView=b.view.componentProps.game.homeTeam.team_id:e===2?b.view.componentProps.teamView=b.view.componentProps.game.awayTeam.team_id:b.view.componentProps.teamView=0),b.view.componentProps.categoryView=u?[{id:v,name:u.name}]:[{id:v,name:`Category ${v}`}],console.log("GSCtops updateDynamicFilters - updated specific component:",g,"categoryId:",v,"teamType:",e)}}}else{const b=a[1]||1;D.forEach(e=>{const v=X.find(u=>u.categoryId===e&&u.teamType===b);console.log(v?"GSCtops updateDynamicFilters - component already exists for category:":"GSCtops updateDynamicFilters - creating new component for category:",e,"teamType:",b)})}const A=X.map(b=>b.categoryId).filter(b=>!D.includes(b));if(console.log("GSCtops updateDynamicFilters - categories to remove:",A),A.forEach(b=>{this.childViews.filter(e=>{var v;const u=(v=e.view.componentProps)==null?void 0:v.categoryView;return u&&u.length>0&&u[0].id===b}).forEach(e=>{console.log("GSCtops updateDynamicFilters - removing component for category:",b),console.log("GSCtops updateDynamicFilters - view to remove:",e.view.id),this.removeChildView(e),xi.emit("component-removed",{viewId:e.view.id,categoryId:b})})}),g){const b=D[0];if(b){const e=this.childViews.find(v=>v.view.id===g);if(e){let v=null;try{v=Vd(b)}catch(t){console.warn("Error getting category by ID:",t)}const u=a[1]||1;e.view.filterMultiple={categoryId:b,teamType:u},e.view.componentProps.game&&(e.view.componentProps.teamView=u===2?e.view.componentProps.game.awayTeam.team_id:u===1?e.view.componentProps.game.homeTeam.team_id:0),e.view.componentProps.categoryView=v?[{id:b,name:v.name}]:[{id:b,name:`Category ${b}`}]}}}}else{const X=D;if(X&&g){const A=this.childViews.find(b=>b.view.id===g);if(A){let b=null;try{b=Vd(X)}catch(v){console.warn("Error getting category by ID:",v)}const e=a[1]||1;A.view.filterMultiple={categoryId:X,teamType:e},A.view.componentProps.game&&(A.view.componentProps.teamView=e===2?A.view.componentProps.game.awayTeam.team_id:e===1?A.view.componentProps.game.homeTeam.team_id:0),A.view.componentProps.categoryView=b?[{id:X,name:b.name}]:[{id:X,name:`Category ${X}`}]}}}}if(this.viewId===8){const D=a[0]||!1;this.childViews.forEach(X=>{X.view.componentProps&&(X.view.componentProps._isReactive||(X.view.componentProps=h.reactive(X.view.componentProps),X.view.componentProps._isReactive=!0),X.view.componentProps.areInactiveVisible=D,X.view.componentProps.key=D,xi.emit("component-props-updated",{viewId:X.view.id,componentProps:X.view.componentProps,dynamicFilters:a}),xi.emit("dynamic-filters-changed",{containerViewId:this.viewId,viewId:X.view.id,dynamicFilters:a}))})}if(this.viewId===1){const D=a[0]||[];if(console.log("GSCComparativeReports updateDynamicFilters - selectedAnalysisTypes:",D),console.log("GSCComparativeReports updateDynamicFilters - componentId:",g),g){console.log(`GSCComparativeReports - updating specific filters for component ${g}`),this.setDynamicFilters(a,g);const X=this.childViews.find(A=>A.view.id===g);X&&this.updateComparative(X,a)}else if(console.log("GSCComparativeReports - updating all components with global filters"),Array.isArray(D))console.log("GSCComparativeReports updateDynamicFilters (array mode) - skipping removal logic to prevent cross-page deletions"),this.childViews.length>0&&D.length>0&&this.childViews.forEach((X,A)=>{if(X.view.componentProps&&A<D.length){const b=D[A],e=Fd.get(this.viewId);X.view.componentProps.type=b,X.view.componentProps.default=!1,X.view.title=`Comparativa ${e[b]}`,X.view.filterMultiple={category:b},console.log(`GSCComparativeReports updateDynamicFilters - updated component ${A} with type:`,b)}});else{const X=D;if(X&&this.childViews.length>0){const A=this.childViews[0];if(A.view.componentProps){const b=Fd.get(this.viewId);A.view.componentProps.type=X,A.view.componentProps.default=!1,A.view.title=`Comparativa ${b[X]}`,A.view.filterMultiple={category:X}}}}console.log("-------------------------------------------------------------"),console.log("childViews",this.childViews)}if(this.viewId===6){const D=a[0];if(console.log("GSCLineupsReports updateDynamicFilters - selectedGameNumber:",D),g){console.log(`GSCLineupsReports - updating specific filters for component ${g}`),this.setDynamicFilters(a,g);const X=this.childViews.find(A=>A.view.id===g);X&&this.updateGSCLineupsReports(X,a)}else console.log("GSCLineupsReports - updating all components with global filters"),this.childViews.forEach(X=>{X.view.componentProps&&(X.view.componentProps._isReactive||(X.view.componentProps=h.reactive(X.view.componentProps),X.view.componentProps._isReactive=!0),X.view.componentProps.gameNumber=D,X.view.filterMultiple={gameNumber:D},xi.emit("component-props-updated",{viewId:X.view.id,componentProps:X.view.componentProps,dynamicFilters:a}),xi.emit("dynamic-filters-changed",{containerViewId:this.viewId,viewId:X.view.id,dynamicFilters:a}))})}if(this.viewId===3){if(console.log("GSCMatchSummary updateDynamicFilters:",{dynamicFilters:a,componentId:g,childViewsLength:this.childViews.length}),g){console.log(`GSCMatchSummary - updating specific filters for component ${g}`),this.setDynamicFilters(a,g);const D=this.childViews.find(X=>X.view.id===g);D&&this.updateMatchSummary(D,a)}else{console.log("GSCMatchSummary - updating all components with global filters");const D=a[0]||!1;this.childViews.forEach(X=>{X.view.componentProps&&(X.view.componentProps._isReactive||(X.view.componentProps=h.reactive(X.view.componentProps),X.view.componentProps._isReactive=!0),X.view.componentProps.desplegable=D,X.view.componentProps.key=D,xi.emit("component-props-updated",{viewId:X.view.id,componentProps:X.view.componentProps,dynamicFilters:a}),xi.emit("dynamic-filters-changed",{containerViewId:this.viewId,viewId:X.view.id,dynamicFilters:a}))})}this.updateSummary({dynamicFilters:a})}if(this.viewId===4){const D=a&&a.length>0&&Array.isArray(a[0])&&a[0].length>0;if(console.log("Timeline updateDynamicFilters:",{hasSelectedEvents:D,childViewsLength:this.childViews.length,dynamicFilters:a,componentId:g}),g){console.log(`Timeline - updating specific filters for component ${g}`),this.setDynamicFilters(a,g);const X=this.childViews.find(A=>A.view.id===g);X&&this.updateTimeline(X,a)}else if(console.log("Timeline - updating all components with global filters"),!D&&this.childViews.length>0)console.log("Timeline - removing views due to no events"),this.childViews.forEach(X=>{this.removeChildView(X)});else if(D&&this.childViews.length===0){console.log("Timeline - emitting add-view event");const X={pageId:null,view:{id:this.viewId,name:"Timeline",title:"Timeline",colspan:12,rowspan:6,max_column:12,max_row:12,min_column:6,min_row:4},filterAndWidgetContainer:this};xi.emit("add-view",X)}else this.childViews.forEach(X=>{this.updateTimeline(X,a)})}}finally{this._isUpdating=!1}}removeAllChildViews(){[...this.childViews].forEach(a=>{this.removeChildView(a)})}removeChildView(a){const g=this.childViews.findIndex(D=>D.view.id===a.view.id);if(g!==-1){const D=this.childViews[g];this.childViews.splice(g,1),D.view.id&&(this.componentSpecificFilters.delete(D.view.id),console.log(`Cleaned specific filters for component ${D.view.id}`));const X=D.grid,A=D.page,b=document.querySelector(`[gs-id="${D.view.id}"]`);if(X&&b&&(X.removeWidget(b),A)){const e=A.items.findIndex(v=>v.id===D.view.id);e!==-1&&(A.items.splice(e,1),A.items.length===0&&xi.emit("empty-page",A))}}}updateView({view:a,dynamicFilters:g,filtersJSON:D}){this.dynamicFilters=g;const X=this.childViews.find(A=>A.view.id===a.view.id);if(X){X.view.filtersJSON=D,X.view.coreView&&(X.view.coreView.filtersJSON=D);let A=g;if(this.viewId===4){const b=this.getComponentDynamicFilters(a.view.id);b&&(A=b,console.log(`Timeline updateView - using specific filters for component ${a.view.id}:`,A))}else if(this.viewId===8){const b=this.getComponentDynamicFilters(a.view.id);b&&(A=b,console.log(`FieldPosesion updateView - using specific filters for component ${a.view.id}:`,A))}else if(this.viewId===3){const b=this.getComponentDynamicFilters(a.view.id);console.log(`GSCMatchSummary updateView - component ${a.view.id}:`,{componentSpecificFilters:b,dynamicFilters:g,willUseSpecific:!!b}),b?(A=b,console.log(`GSCMatchSummary updateView - using specific filters for component ${a.view.id}:`,A)):console.log("GSCMatchSummary updateView - no specific filters found, using dynamicFilters:",A),this.updateSummary({dynamicFilters:A})}else if(this.viewId===1){const b=this.getComponentDynamicFilters(a.view.id);console.log(`GSCComparativeReports updateView - component ${a.view.id}:`,{componentSpecificFilters:b,dynamicFilters:g,willUseSpecific:!!b}),b?(A=b,console.log(`GSCComparativeReports updateView - using specific filters for component ${a.view.id}:`,A)):console.log("GSCComparativeReports updateView - no specific filters found, using dynamicFilters:",A)}else if(this.viewId===6){const b=this.getComponentDynamicFilters(a.view.id);console.log(`GSCLineupsReports updateView - component ${a.view.id}:`,{componentSpecificFilters:b,dynamicFilters:g,willUseSpecific:!!b}),b?(A=b,console.log(`GSCLineupsReports updateView - using specific filters for component ${a.view.id}:`,A)):console.log("GSCLineupsReports updateView - no specific filters found, using dynamicFilters:",A)}else if(this.viewId===7){const b=this.getComponentDynamicFilters(a.view.id);console.log(`GSCGoalData updateView - component ${a.view.id}:`,{componentSpecificFilters:b,dynamicFilters:g,willUseSpecific:!!b}),b?(A=b,console.log(`GSCGoalData updateView - using specific filters for component ${a.view.id}:`,A)):console.log("GSCGoalData updateView - no specific filters found, using dynamicFilters:",A)}else if(this.viewId===9){const b=this.getComponentDynamicFilters(a.view.id);console.log(`GSCFieldDataByZones updateView - component ${a.view.id}:`,{componentSpecificFilters:b,dynamicFilters:g,willUseSpecific:!!b}),b?(A=b,console.log(`GSCFieldDataByZones updateView - using specific filters for component ${a.view.id}:`,A)):console.log("GSCFieldDataByZones updateView - no specific filters found, using dynamicFilters:",A)}this.viewId===5?this.updateVolumetricField(X,A):this.viewId===7?this.updateGoalData(X,A):this.viewId===9?this.updateFieldDataByZones(X,A):this.viewId===10?this.updateXg(X,A):this.viewId===3?this.updateMatchSummary(X,A):this.viewId===4?this.updateTimeline(X,A):this.viewId===8?this.updateFieldPosesion(X,A):this.viewId===1?this.updateComparative(X,A):this.viewId===2?this.updateGSCtops(X,A):this.viewId===6&&this.updateGSCLineupsReports(X,A)}else console.log("viewToUpdate not found")}updateComparative(a,g){if(console.log("update comparative",g),a.view.componentProps){const D=g[0]||[];if(console.log("GSCComparativeReports updateComparative - selectedAnalysisTypes:",D),D&&D.length>0){let X;if(Array.isArray(D)){const b=this.childViews.findIndex(e=>e.view.id===a.view.id);b>=0&&b<D.length?X=D[b]:X=D[0]}else X=D;const A=Fd.get(this.viewId);a.view.componentProps.type=X,a.view.componentProps.default=!1,a.view.title=`Comparativa ${A[X]}`,a.view.filterMultiple={category:X},console.log("GSCComparativeReports updateComparative - updated component with type:",X)}xi.emit("component-props-updated",{viewId:a.view.id,componentProps:a.view.componentProps,dynamicFilters:g}),xi.emit("dynamic-filters-changed",{containerViewId:this.viewId,viewId:a.view.id,dynamicFilters:g})}}updateVolumetricField(a,g){if(console.log("updateVolumetricField",g),a.view.componentProps){const D=g[0]||1;a.view.isHomeTeam=D===1,a.view.componentProps.preMatchType=D,a.view.filterMultiple={isHomeTeam:D},console.log("GSCVolumetricField updateVolumetricField - updated component with:",{isHomeTeam:D,preMatchType:a.view.componentProps.preMatchType,filterMultiple:a.view.filterMultiple}),xi.emit("component-props-updated",{viewId:a.view.id,componentProps:a.view.componentProps,dynamicFilters:g}),xi.emit("dynamic-filters-changed",{containerViewId:this.viewId,viewId:a.view.id,dynamicFilters:g}),xi.emit("force-component-update",{itemId:a.view.id,componentProps:a.view.componentProps})}}updateGoalData(a,g){if(console.log("updateGoalData",g),a.view.componentProps){const D=g[0]===1?"offensive":"defensive",X=g[1]===1;a.view.componentProps.analysisType=D,a.view.componentProps.isHomeTeamForAnalysis=X,a.view.isHomeTeam=X,a.view.filterMultiple={isHomeTeam:X},console.log("GSCGoalData updateGoalData - updated component with:",{analysisType:D,isHomeTeam:X,filterMultiple:a.view.filterMultiple}),xi.emit("component-props-updated",{viewId:a.view.id,componentProps:a.view.componentProps,dynamicFilters:g}),xi.emit("dynamic-filters-changed",{containerViewId:this.viewId,viewId:a.view.id,dynamicFilters:g}),xi.emit("force-component-update",{itemId:a.view.id,componentProps:a.view.componentProps})}}updateFieldDataByZones(a,g){if(console.log("updateFieldDataByZones",g),a.view.componentProps){a.view.componentProps._isReactive||(a.view.componentProps=h.reactive(a.view.componentProps),a.view.componentProps._isReactive=!0);const D=g[0],X=g[1]===1;if(a.view.componentProps.isHomeTeamForAnalysis=X,a.view.isHomeTeam=X,a.view.filterMultiple={categoryIds:D,isHomeTeam:X},D&&D.length){const A=D.join("-"),b=Fd.get(this.viewId).analysisTypes.get(A);b&&(a.view.componentProps.analysisType=b.analysisType,a.view.title=b.title)}a.view.componentProps._updateKey=Date.now(),xi.emit("component-props-updated",{viewId:a.view.id,componentProps:a.view.componentProps,dynamicFilters:g}),xi.emit("dynamic-filters-changed",{containerViewId:this.viewId,viewId:a.view.id,dynamicFilters:g}),xi.emit("force-component-update",{itemId:a.view.id,componentProps:a.view.componentProps}),console.log("GSCFieldDataByZones updateFieldDataByZones - updated component with:",{categoryIds:D,isHomeTeam:X,analysisType:a.view.componentProps.analysisType,title:a.view.title,filterMultiple:a.view.filterMultiple})}}updateXg(a,g){a.view.componentProps&&(a.view.isHomeTeam=g[0]===1,a.view.componentProps.isHomeTeamForAnalysis=g[0]||1)}updateMatchSummary(a,g){if(a.view.componentProps){a.view.componentProps._isReactive||(a.view.componentProps=h.reactive(a.view.componentProps),a.view.componentProps._isReactive=!0);const D=g&&g.length>0?g[0]:!1;a.view.componentProps.desplegable=D,a.view.componentProps.key=D,xi.emit("component-props-updated",{viewId:a.view.id,componentProps:a.view.componentProps,dynamicFilters:g}),xi.emit("dynamic-filters-changed",{containerViewId:this.viewId,viewId:a.view.id,dynamicFilters:g})}}updateTimeline(a,g){if(a.view.componentProps){a.view.componentProps._isReactive||(a.view.componentProps=h.reactive(a.view.componentProps),a.view.componentProps._isReactive=!0);const D=this.getComponentDynamicFilters(a.view.id),X=D||g,A=X&&X.length>0?X[0]:[];a.view.componentProps.selectedEvents=A,a.view.componentProps.key=A.length>0;const b=this.hasEventTypeId(A,1),e=this.hasCategoryId(A,8),v=this.hasCategoryId(A,9),u=this.hasEventTypeId(A,3);console.log("Timeline update - Events check:",{goals:b,yellowCards:e,redCards:v,substitutions:u,selectedEvents:A,componentId:a.view.id,usingSpecificFilters:!!D}),a.view.componentProps.goals=b,a.view.componentProps.yellowCards=e,a.view.componentProps.redCards=v,a.view.componentProps.substitutions=u,a.view.componentProps._updateKey=Date.now(),xi.emit("component-props-updated",{viewId:a.view.id,componentProps:a.view.componentProps,dynamicFilters:X}),xi.emit("dynamic-filters-changed",{containerViewId:this.viewId,viewId:a.view.id,dynamicFilters:X}),xi.emit("force-component-update",{itemId:a.view.id,componentProps:a.view.componentProps})}}updateFieldPosesion(a,g){if(a.view.componentProps){a.view.componentProps._isReactive||(a.view.componentProps=h.reactive(a.view.componentProps),a.view.componentProps._isReactive=!0);const D=g&&g.length>0?g[0]:!1;a.view.componentProps.areInactiveVisible=D,a.view.componentProps.key=D,xi.emit("component-props-updated",{viewId:a.view.id,componentProps:a.view.componentProps,dynamicFilters:g}),xi.emit("dynamic-filters-changed",{containerViewId:this.viewId,viewId:a.view.id,dynamicFilters:g})}}updateGSCtops(a,g){if(console.log("updateGSCtops",g),a.view.componentProps){const D=g[0]||[];if(Array.isArray(D)){if(console.log("GSCtops updateGSCtops (array mode) - skipping removal logic to prevent cross-page deletions"),D.length>0){const X=D[0];let A=null;try{A=Vd(X)}catch(e){console.warn("Error getting category by ID:",e)}const b=g[1]||1;a.view.filterMultiple={categoryId:X,teamType:b},a.view.componentProps.game&&(b===1?a.view.componentProps.teamView=a.view.componentProps.game.homeTeam.team_id:b===2?a.view.componentProps.teamView=a.view.componentProps.game.awayTeam.team_id:a.view.componentProps.teamView=0),a.view.componentProps.categoryView=A?[{id:X,name:A.name}]:[{id:X,name:`Category ${X}`}]}}else{const X=D;if(X){let A=null;try{A=Vd(X)}catch(e){console.warn("Error getting category by ID:",e)}const b=g[1]||1;a.view.filterMultiple={categoryId:X,teamType:b},a.view.componentProps.game&&(b===1?a.view.componentProps.teamView=a.view.componentProps.game.homeTeam.team_id:b===2?a.view.componentProps.teamView=a.view.componentProps.game.awayTeam.team_id:a.view.componentProps.teamView=0),a.view.componentProps.categoryView=A?[{id:X,name:A.name}]:[{id:X,name:`Category ${X}`}]}}}}updateGSCLineupsReports(a,g){if(console.log("updateGSCLineupsReports",g),a.view.componentProps){const D=g[0]||[];if(Array.isArray(D)){if(console.log("GSCLineupsReports updateGSCLineupsReports (array mode) - skipping removal logic to prevent cross-page deletions"),D.length>0){const X=D[0];a.view.filterMultiple={gameNumber:X},a.view.componentProps.gameNumber=X}}else{const X=D;X&&(a.view.filterMultiple={gameNumber:X},a.view.componentProps.gameNumber=X)}xi.emit("component-props-updated",{viewId:a.view.id,componentProps:a.view.componentProps,dynamicFilters:g}),xi.emit("dynamic-filters-changed",{containerViewId:this.viewId,viewId:a.view.id,dynamicFilters:g}),xi.emit("force-component-update",{itemId:a.view.id,componentProps:a.view.componentProps})}}}const Dse={class:"template-page__header"},Vse={class:"template-page__header__name"},Fse=["value"],jse={class:"template-page__header__details"},Use={class:"template-page__header__details__teams"},qse={class:"template-page__header__details__teams__team"},Wse={key:0,class:"template-page__header__details__teams__team__logo"},Gse=["src"],Hse={key:1,width:"25",height:"25",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Jse={class:"template-page__header__details__teams__team"},Kse={key:0,class:"template-page__header__details__teams__team__logo"},Xse=["src"],Zse={key:1,width:"25",height:"25",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Yse={class:"template-page__content"},Qse=["id"],$se=["gs-id","gs-x","gs-y","gs-w","gs-h","gs-max-w","gs-max-h","gs-min-w","gs-min-h","gs-no-resize","gs-no-move","gs-auto-position"],ele=h.defineComponent({__name:"TemplateReportPage",props:{token:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"},game:{type:Object,default:()=>null},lastGames:{type:Array,default:()=>null},id:{type:[String,Number],default:()=>String(Date.now())},page:{type:Object,default:()=>({title:"Page 1",items:[{name:"Tabla jugadores",id:`w-${String(Date.now())}`,x:0,y:0,w:4,h:4,maxWidth:4,maxHeight:4,noResize:!1,noMove:!1,componentProps:{}}]})},isPostMatch:{type:Boolean,default:!1},isTemplateMode:{type:Boolean,default:!1},isFilterVisible:{type:Boolean,default:!1}},emits:["intersection-changed","delete-page","change-sort","edit-view","view-changed","component-props-updated","delete-view","dynamic-filters-changed"],setup(r,{emit:a}){var g,D;const X=h.ref(null);let A=null;const b=r,e=h.ref(!1),v=a,u=h.computed(()=>b.page.items.reduce((z,V)=>(z.set(V.id,V),z),new Map)),t=h.computed(()=>{var z,V,U,q;return b.game&&b.game.homeTeam&&b.game.awayTeam?{homeTeam:{name:((z=b.game.homeTeam)==null?void 0:z.acronym)||"LOC",logo:((V=b.game.homeTeam)==null?void 0:V.logo)||null},awayTeam:{name:((U=b.game.awayTeam)==null?void 0:U.acronym)||"VIS",logo:((q=b.game.awayTeam)==null?void 0:q.logo)||null}}:{homeTeam:{name:"LOC"},awayTeam:{name:"VIS"}}});let w=null,y=null,x=!1,p=null,n=!1;const i=()=>{n=!0},d=()=>{n=!1};function s(){n||(x=!0,p&&clearTimeout(p),p=setTimeout(()=>{x=!1},150))}function c(){const z={root:null,rootMargin:"0px",threshold:.7};w=new IntersectionObserver(q=>{q.forEach(W=>{if(console.log("Intersection observer triggered:",W.isIntersecting,"isScrolling:",x),x){console.log("Scroll in progress, delaying intersection event"),y&&clearTimeout(y),y=setTimeout(()=>{console.log("Emitting delayed intersection event:",W.isIntersecting),v("intersection-changed",W.isIntersecting)},100);return}y&&clearTimeout(y),y=setTimeout(()=>{console.log("Emitting immediate intersection event:",W.isIntersecting),v("intersection-changed",W.isIntersecting)},50)})},z);const V=X.value;V&&w.observe(V);const U=document.querySelector(".container-main");U&&U.addEventListener("scroll",s,{passive:!0}),document.addEventListener("programmatic-scroll-start",i),document.addEventListener("programmatic-scroll-end",d)}function f(z){console.log("newValue:",z),b.page.title=z.target.value,v("view-changed")}const m={game_id:0,season_id:0,prematch:!1},T={gameId:90209,id:90209,seasonId:1909,regularSeasonId:1909,matchday_name:"Matchday 1",status:1,score:[1,3],game_status:1,dateTimeUTC:"2024-09-05T22:00:00Z",homeTeam:{logo:"https://golstatsimages.blob.core.windows.net/teams-80/2936.png",team_id:2936,provisional_logo:"https://golstatsimages.blob.core.windows.net/teams-provisional/2936.png",colloquial_name:"Guyana",acronym:"GUY",team_name:"Guyana"},awayTeam:{logo:"https://golstatsimages.blob.core.windows.net/teams-80/3279.png",team_id:3279,provisional_logo:"https://golstatsimages.blob.core.windows.net/teams-provisional/3279.png",colloquial_name:"Surinam",acronym:"SUR",team_name:"Surinam"},is_live:0,minutes:{home_goals_minutes:[],visiting_goals_minutes:[],home_yellow_cards_minutes:[],away_yellow_cards_minutes:[],home_red_cards_minutes:[],away_red_cards_minutes:[]}},C=new Map([[5,{component:Ib,componentName:"GSCVolumetricField",props:{isGamePreMatch:!b.isPostMatch,areTeamsVisible:!1,isTitleVisible:!1,isGhostEffect:b.isTemplateMode,isTemplateMode:b.isTemplateMode,preMatchType:1}}],[2,{component:Tw,componentName:"GscTopPlayer",props:{categoryView:[{id:0,name:"Category"}],gamed:b.game?b.game.id:T.gameId,game:b.game,season:b.game?(g=b==null?void 0:b.game)==null?void 0:g.season_id:T.seasonId,teamView:0,useDummyData:b.isTemplateMode}}],[8,{component:C3,componentName:"FieldPosesion",props:{widthSection:600,game:T,teamSelected:{teamId:0},areInactiveVisible:!0,showTitle:!1,isDefault:!0,key:!1}}],[6,{component:L4,componentName:"GSCLineupsReports",props:{selectedOption:b.isPostMatch?"Postmatch":"Prematch",game:m,gamehome:m,gameaway:m}}],[3,{component:A3,componentName:"GSCMatchSummary",props:{game:T,defaultShields:!0,desplegable:!1}}],[4,{component:h5,componentName:"GSCTimelineReports",props:{key:!0,isDefault:!0,gameId:T.gameId,homeTeam:T.homeTeam.team_id,awayTeam:T.awayTeam.team_id,token:b.token,goals:!0,yellowCards:!0,redCards:!0,substitutions:!0}}],[7,{component:v6,componentName:"GSCGoalData",props:{game:b.game,isHomeTeamForAnalysis:!0,canInteract:!1,canPlayVideos:!1,isPreMatch:!b.isPostMatch,analysisType:1}}],[9,{component:R4,componentName:"GSCFieldDataByZones",props:{game:b.game,isHomeTeamForAnalysis:!0,analysisType:"successfulPasses",canPlayVideos:!1,isPreMatch:!b.isPostMatch}}],[10,{component:A6,componentName:"GSCGameXg",props:{game:b.game,isHomeTeamForAnalysis:!0,isPostMatch:b.isPostMatch}}],[1,{component:m6,componentName:"GSCComparativeReports",props:{gameId:b.game?b.game.id:"",homeLogo:b.game?b.game.homeTeam.logo:"",awayLogo:b.game?b.game.awayTeam.logo:"",seasonId:b.game?(D=b==null?void 0:b.game)==null?void 0:D.season_id:0,typeGame:b.isPostMatch,type:"stoppedBall",default:b.isTemplateMode}}]]);function S(z){if(z)if(typeof z=="string"){let V=null;switch(z){case"GSCVolumetricField":V=Ib;break;case"GSCGoalData":V=v6;break;case"GscTopPlayer":V=Tw;break;case"FieldPosesion":V=C3;break;case"GSCLineupsReports":V=L4;break;case"GSCMatchSummary":V=A3;break;case"GSCTimelineReports":V=h5;break;case"GSCFieldDataByZones":V=R4;break;case"GSCGameXg":V=A6;break;case"GSCComparativeReports":V=m6;break;default:V=null}return V}else return z;return null}function L({pageId:z,view:V,filterAndWidgetContainer:U,applyMinimumSize:q=!1,dynamicFilters:W=[]}){if(b.page.id===z&&A){let Y=!1;V.id===3&&(Y=W[0]);const ne=`min_column${Y?"_2":""}`,J=`min_row${Y?"_2":""}`,re=`colspan${Y?"_2":""}`,ee=`rowspan${Y?"_2":""}`,Z={w:q?V[ne]:V[re],h:q?V[J]:V[ee]};if(A.willItFit(0,0,Z.w,Z.h,!0)){const te=A.addWidget(Z),ae=Number(te.getAttribute("gs-x")||0),oe=Number(te.getAttribute("gs-y")||0);A.removeWidget(te);const pe=C.get(V.id),fe=h.reactive({...JSON.parse(JSON.stringify(pe.props))||{},_isReactive:!0}),se=h.reactive({pageId:z,grid:A,page:b.page,view:{name:V.name,title:V.title,key:Date.now()-7*Math.random(),id:`w-${String(Date.now())}`,x:ae,y:oe,w:Z.w,h:Z.h,maxWidth:V.max_column,maxHeight:V.max_row,minWidth:V.min_column,minHeight:V.min_row,componentName:pe.componentName,componentProps:fe,pageId:z,coreView:V}});U.addView(se),xi.emit("add-page-view",se)}else xi.emit("add-page-and-view",{pageId:z,view:V,filterAndWidgetContainer:U})}}function R(z){if(A){const V=document.querySelector(`[gs-id="${z.id}"]`);V&&(A.removeWidget(V),v("delete-view",z))}v("view-changed")}function E(z){if(!z.filterAndViewsContainer&&z.coreView){const V=new ay(`FAWC-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,[z],z.coreView.id,z.dynamicFilters||[],b.isPostMatch,b.isTemplateMode,z.filtersJSON);z.filterAndViewsContainer=V}v("edit-view",z)}function N(){v("delete-page",b.page)}function M(){xi.emit("change-sort",b.page)}function k(z){if(x)return;console.log("force-component-update event received:",z);const V=b.page.items.find(U=>U.id===z.itemId||U.id===z.viewId);V?(console.log("Found item to update in force-component-update:",V.id),Object.assign(V.componentProps,z.componentProps),V._updateKey=Date.now(),console.log("Updated item in force-component-update:",V.componentProps)):console.log("Item not found in force-component-update for id:",z.itemId||z.viewId)}function I(z){if(x)return;console.log("component-props-updated event received:",z);const V=b.page.items.find(U=>U.id===z.viewId);V?(console.log("Found item to update in component-props-updated:",V.id),Object.assign(V.componentProps,z.componentProps),V._updateKey=Date.now(),console.log("Updated item in component-props-updated:",V.componentProps)):console.log("Item not found in component-props-updated for id:",z.viewId)}function _(z){if(x)return;console.log("dynamic-filters-changed event received:",z);const V=b.page.items.find(U=>U.id===z.viewId);V?(console.log("Found item to update in dynamic-filters-changed:",V.id),Object.assign(V.componentProps,z.componentProps||{}),V._updateKey=Date.now(),console.log("Updated item in dynamic-filters-changed:",V.componentProps)):console.log("Item not found in dynamic-filters-changed for id:",z.viewId)}const P=function(){xi.off("add-view",L),xi.off("force-component-update",k),xi.off("component-props-updated",I),xi.off("dynamic-filters-changed",_);const z=document.querySelector(".container-main");z&&z.removeEventListener("scroll",s),y&&clearTimeout(y),p&&clearTimeout(p)};return xi.on("add-view",L),xi.on("force-component-update",k),xi.on("component-props-updated",I),xi.on("dynamic-filters-changed",_),h.onMounted(async()=>{await h.nextTick(),A=Wi.init({column:12,row:12,maxRow:12,cellHeight:60,float:!0,resizable:{handles:"e, se, s, sw, w"}},`#grid-stack-${b.id}`),A.on("change",(z,V)=>{const U=V[0];if(U){const q=u.value.get(U.id);q&&(q.x=U.x,q.y=U.y,q.w=U.w,q.h=U.h,v("view-changed"))}}),c(),b.page.grid=A,b.page.offListeners=P}),h.onUnmounted(()=>{w&&w.disconnect(),P(),y&&clearTimeout(y),p&&clearTimeout(p),document.removeEventListener("programmatic-scroll-start",i),document.removeEventListener("programmatic-scroll-end",d)}),(z,V)=>(h.openBlock(),h.createElementBlock("div",{ref_key:"templatePage",ref:X,class:"template-page"},[h.createElementVNode("div",Dse,[e.value?(h.openBlock(),h.createBlock(L6,{key:0,"options-type":"page",onClick:V[0]||(V[0]=h.withModifiers(U=>e.value=!1,["self"])),onMouseleave:V[1]||(V[1]=U=>e.value=!1),onCloseTooltip:V[2]||(V[2]=U=>e.value=!1),onDeletePage:N,onChangeSort:M})):h.createCommentVNode("",!0),h.createElementVNode("div",Vse,[V[4]||(V[4]=h.createElementVNode("div",null,[h.createElementVNode("svg",{width:"19",height:"21",viewBox:"0 0 19 21",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[h.createElementVNode("path",{d:"M11.2986 12.9994C7.62909 14.8341 4.11744 16.0178 1.35547 16.4518L9.18763 20.0029C9.34545 20.0818 9.60192 20.0818 9.74002 20.0029L17.8878 16.3137C18.0457 16.2348 18.164 16.0572 18.164 15.8797V8.75781C16.2898 10.2177 13.9422 11.6776 11.2986 12.9994Z",fill:"white"}),h.createElementVNode("path",{d:"M4.7152 8.89735C4.7152 8.89735 10.9494 3.76802 16.8482 1.20335C15.0529 0.946887 11.3637 0.43395 9.3711 0.453678C4.41928 0.493135 1.06546 1.34145 1.06546 1.34145C0.90763 1.3809 0.769531 1.55846 0.769531 1.71629V8.12795C3.01857 6.56942 5.34651 5.56329 5.34651 5.56329C5.34651 5.56329 2.72264 7.06263 0.769531 8.81844V9.41028V14.1648C3.09748 13.9675 6.62886 12.7641 10.3575 10.7321C13.6719 8.91707 16.4733 6.84562 18.17 5.05035V2.40677C14.3032 3.37346 4.7152 8.89735 4.7152 8.89735Z",fill:"white"})])],-1)),V[5]||(V[5]=h.createElementVNode("div",{class:"separator"},null,-1)),h.createElementVNode("input",{value:r.page.title,type:"text",class:"page-title-input",onclick:"this.select()",onInput:f},null,40,Fse)]),h.createElementVNode("div",jse,[h.createElementVNode("div",Use,[h.createElementVNode("div",qse,[t.value.homeTeam.logo?(h.openBlock(),h.createElementBlock("div",Wse,[h.createElementVNode("img",{src:t.value.homeTeam.logo,alt:"Home Team Logo",width:"25",height:"25"},null,8,Gse)])):(h.openBlock(),h.createElementBlock("svg",Hse,[...V[6]||(V[6]=[h.createElementVNode("path",{opacity:"0.4",d:"M12.0153 0.261719C12.0153 0.261719 13.6664 1.94994 17.7355 2.06744C21.149 2.16638 22.3796 1.30063 22.3796 1.30063C22.3796 1.30063 25.4902 10.2488 20.3822 17.7005C17.6983 21.615 12.5533 24.1504 12.0091 24.2617C11.4711 24.1504 6.31984 21.615 3.636 17.7005C-1.4596 10.2488 1.65094 1.30063 1.65094 1.30063C1.65094 1.30063 2.88155 2.16638 6.2951 2.06744C10.3642 1.94994 12.0153 0.261719 12.0153 0.261719Z",fill:"#54728B"},null,-1)])])),h.createElementVNode("span",null,h.toDisplayString(t.value.homeTeam.name),1)]),V[8]||(V[8]=h.createElementVNode("div",{class:"template-page__header__details__teams__vs"}," VS ",-1)),h.createElementVNode("div",Jse,[h.createElementVNode("span",null,h.toDisplayString(t.value.awayTeam.name),1),t.value.awayTeam.logo?(h.openBlock(),h.createElementBlock("div",Kse,[h.createElementVNode("img",{src:t.value.awayTeam.logo,alt:"Away Team Logo",width:"25",height:"25"},null,8,Xse)])):(h.openBlock(),h.createElementBlock("svg",Zse,[...V[7]||(V[7]=[h.createElementVNode("path",{opacity:"0.4",d:"M12.0153 0.261719C12.0153 0.261719 13.6664 1.94994 17.7355 2.06744C21.149 2.16638 22.3796 1.30063 22.3796 1.30063C22.3796 1.30063 25.4902 10.2488 20.3822 17.7005C17.6983 21.615 12.5533 24.1504 12.0091 24.2617C11.4711 24.1504 6.31984 21.615 3.636 17.7005C-1.4596 10.2488 1.65094 1.30063 1.65094 1.30063C1.65094 1.30063 2.88155 2.16638 6.2951 2.06744C10.3642 1.94994 12.0153 0.261719 12.0153 0.261719Z",fill:"#54728B"},null,-1)])]))])]),r.isTemplateMode&&!r.isFilterVisible?(h.openBlock(),h.createElementBlock("div",{key:0,class:"template-page__header__details__options",onClick:V[3]||(V[3]=U=>e.value=!0)},[...V[9]||(V[9]=[h.createElementVNode("svg",{width:"17",height:"13",viewBox:"0 0 17 13",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[h.createElementVNode("path",{d:"M3.56953 6.28672C3.56953 7.19972 2.83253 7.93672 1.91953 7.93672C1.00653 7.93672 0.269531 7.19972 0.269531 6.28672C0.269531 5.37372 1.00653 4.63672 1.91953 4.63672C2.83253 4.63672 3.56953 5.37372 3.56953 6.28672ZM8.51953 4.63672C7.60653 4.63672 6.86953 5.37372 6.86953 6.28672C6.86953 7.19972 7.60653 7.93672 8.51953 7.93672C9.43253 7.93672 10.1695 7.19972 10.1695 6.28672C10.1695 5.37372 9.43253 4.63672 8.51953 4.63672ZM15.1195 4.63672C14.2065 4.63672 13.4695 5.37372 13.4695 6.28672C13.4695 7.19972 14.2065 7.93672 15.1195 7.93672C16.0325 7.93672 16.7695 7.19972 16.7695 6.28672C16.7695 5.37372 16.0325 4.63672 15.1195 4.63672Z",fill:"white"})],-1)])])):h.createCommentVNode("",!0)])]),h.createElementVNode("div",Yse,[h.createElementVNode("div",{id:`grid-stack-${r.id}`,class:"grid-stack"},[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(r.page.items,U=>{var q,W,Y;return h.openBlock(),h.createElementBlock("div",{class:"grid-stack-item",key:U.key,"gs-id":U.id,"gs-x":U.x,"gs-y":U.y,"gs-w":U.w,"gs-h":U.h,"gs-max-w":U.maxWidth,"gs-max-h":U.maxHeight,"gs-min-w":U.minWidth,"gs-min-h":U.minHeight,"gs-no-resize":!r.isTemplateMode,"gs-no-move":!b.isTemplateMode,"gs-auto-position":U.x===0&&U.y===0},[h.createElementVNode("div",{class:h.normalizeClass(["grid-stack-item-content",{"is-selected":U.isSelected}])},[h.createVNode(Mse,{title:U.coreView&&U.coreView.id===9&&U.w<4&&U.titleShort||U.title,"is-template-mode":r.isTemplateMode,game:r.game,lastGames:r.lastGames,"is-home-team":(q=U.componentProps)!=null&&q.preMatchType?((W=U.componentProps)==null?void 0:W.preMatchType)===1:U.isHomeTeam,"is-filter-visible":r.isFilterVisible,"view-id":((Y=U==null?void 0:U.coreView)==null?void 0:Y.id)||0,onEdit:ne=>E(U),onDelete:ne=>R(U)},{default:h.withCtx(()=>[(h.openBlock(),h.createBlock(h.resolveDynamicComponent(S(U.componentName)),h.mergeProps({ref_for:!0},U.componentProps,{key:`${U.id}-${U._updateKey||0}`}),null,16))]),_:2},1032,["title","is-template-mode","game","lastGames","is-home-team","is-filter-visible","view-id","onEdit","onDelete"])],2)],8,$se)}),128))],8,Qse)])],512))}}),tle=dd(ele,[["__scopeId","data-v-c6c9b088"]]),rle={PO1:"CFI",PO2:"CFV",PO3:"SFI",PO4:"SFV",PO5:"FI",PO6:"FV"},nle={key:0,class:"cover__main-logo cover__main-logo__home"},ile={key:0,class:"team-logo"},ale=["src"],ole={key:1,width:"575",height:"675",viewBox:"0 0 160 161",fill:"none",xmlns:"http://www.w3.org/2000/svg"},sle=["fill"],lle={key:1,class:"cover__main-logo cover__main-logo__away"},cle={key:0,class:"team-logo"},ule=["src"],dle={key:1,width:"575",height:"575",viewBox:"0 0 161 161",fill:"none",xmlns:"http://www.w3.org/2000/svg"},ple=["fill"],hle={class:"cover__title-subtitle"},fle={class:"cover__title-subtitle__title"},mle={class:"cover__title-subtitle__subtitle"},gle={key:2,class:"cover-type-one"},yle={class:"team-info-one"},vle={class:"team-data"},xle={key:0,class:"team-logo"},ble=["src"],_le={key:1,width:"160",height:"161",viewBox:"0 0 160 161",fill:"none",xmlns:"http://www.w3.org/2000/svg"},wle=["fill","opacity"],Tle={class:"team-name"},kle={key:0,class:"team-events"},Sle={class:"score-one"},Cle={key:0},Ele={class:"team-info-one"},Mle={class:"team-data"},Ale={key:0,class:"team-logo"},Lle=["src"],Rle={key:1,width:"161",height:"161",viewBox:"0 0 161 161",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Nle=["fill","opacity"],Ile={class:"team-name"},Ple={key:0,class:"team-events"},Ole={key:3,class:"cover-type-two"},zle={class:"team-data"},Ble={class:"team-info"},Dle={key:0,class:"team-logo"},Vle=["src"],Fle={key:1,width:"160",height:"161",viewBox:"0 0 160 161",fill:"none",xmlns:"http://www.w3.org/2000/svg"},jle=["fill","opacity"],Ule={key:2,class:"team-score-two"},qle={key:0,class:"team-goals"},Wle={class:"team-data"},Gle={class:"team-info"},Hle={key:0,class:"team-score-two"},Jle={key:1,class:"team-logo"},Kle=["src"],Xle={key:2,width:"161",height:"161",viewBox:"0 0 161 161",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Zle=["fill","opacity"],Yle={key:0,class:"team-goals"},Qle={__name:"CoverPage",props:{game:{type:Object,default:()=>null},coverId:{type:Number,default:1},isPostMatch:{type:Boolean,default:!0}},emits:["intersection-changed"],setup(r,{emit:a}){const g=r,D=a,X=h.ref(null),A=h.computed(()=>[1,2].includes(g.coverId)),b=h.computed(()=>[1,3].includes(g.coverId)),e=h.computed(()=>g.coverId===1?{homeTeam:"#1558CC",awayTeam:"#0046BF",opacity:1}:g.coverId===3?{homeTeam:"#000A1A",awayTeam:"#000A1A",opacity:.4}:{homeTeam:"#576883",awayTeam:"#576883",opacity:.4}),v=h.computed(()=>g.game&&g.game.score?g.game.score:["0","0"]),u=h.computed(()=>{var L,R,E,N,M,k,I,_;if(g.game&&g.game.homeTeam&&g.game.awayTeam){const P={homeTeam:{name:((L=g.game.homeTeam)==null?void 0:L.acronym)||"LOC",logo:((R=g.game.homeTeam)==null?void 0:R.logo)||null},awayTeam:{name:((E=g.game.awayTeam)==null?void 0:E.acronym)||"VIS",logo:((N=g.game.awayTeam)==null?void 0:N.logo)||null}};return A.value?(P.homeTeam.goalsMinutes=n(g.game.minutes.home_goals_minutes),P.homeTeam.totalYellowCards=((M=g.game.minutes.home_yellow_cards_minutes)==null?void 0:M.length)||0,P.homeTeam.totalRedCards=((k=g.game.minutes.home_red_cards_minutes)==null?void 0:k.length)||0,P.awayTeam.goalsMinutes=n(g.game.minutes.visiting_goals_minutes),P.awayTeam.totalYellowCards=((I=g.game.minutes.away_yellow_cards_minutes)==null?void 0:I.length)||0,P.awayTeam.totalRedCards=((_=g.game.minutes.away_red_cards_minutes)==null?void 0:_.length)||0):(P.homeTeam.goalsEvents=p(g.game.report_minutes.home_goals_minutes),P.awayTeam.goalsEvents=p(g.game.report_minutes.visiting_goals_minutes)),P}return{homeTeam:{name:"LOC",logo:null,goalsMinutes:"00'",totalYellowCards:0,totalRedCards:0,goalsEvents:[{playerName:"Nombre",goalTime:"00'"}]},awayTeam:{name:"VIS",logo:null,goalsMinutes:"00'",totalYellowCards:0,totalRedCards:0,goalsEvents:[{playerName:"Nombre",goalTime:"00'"}]}}}),t=h.computed(()=>({"--background-image":b.value?"url(https://golstatsimages.blob.core.windows.net/report-maker/background-postmatch-template-01@2x.jpg)":"url(https://golstatsimages.blob.core.windows.net/report-maker/background-postmatch-template-02@2x.jpg)","--grid-template-columns-type-one":g.isPostMatch?"1fr min-content 1fr":"320px min-content 320px","--width-type-one":g.isPostMatch?"100%":"fit-content","--grid-template-columns-type-two":g.isPostMatch?"1fr min-content 1fr":"320px min-content 320px","--width-type-two":g.isPostMatch?"100%":"fit-content"})),w=h.computed(()=>g.isPostMatch?"Postmatch":"Prematch"),y=["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],x=h.computed(()=>{if(g.game){let L=rle[g.game.matchday_abbreviation];L||(L=g.game.matchday_abbreviation.replace("M","J"));const[R,E,N]=g.game.date.split("-");return`${L} - ${N} ${y[Number(E)-1]}, ${R}`}return"Jornada - Día 00 Mes"});function p(L){return!L||!Array.isArray(L)||L.length===0?"":(console.log("%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"),console.log("goalsDetails",L),L.map(R=>{const E=R.split(", ");let N=E[0].replace("'","");N=N.replace("+",""),N=N.replace("’",""),console.log("playerGoalsArray",E);const M=N.split(" "),{strings:k,numbers:I}=M.reduce((z,V)=>(isNaN(Number(V))?z.strings.push(V):z.numbers.push(V),z),{strings:[],numbers:[]}),_=k.join(" "),P=I.length===1?`${I[0]}'`:`${I[0]}' ${I.slice(1).join(" + ")}'`;return{playerName:_,goalTime:E.length===1?P:`${P}, ${E.reduce((z,V,U)=>U===0?z:`${z}${V}${U<E.length-1?", ":""}`,"")}`}}))}function n(L){return!L||!Array.isArray(L)||L.length===0?"":L.reduce((R,E,N)=>{const M=E.split(" ");let k="";return M.length===3?k=M[2]:M.length===5&&(k=`${M[2]} ${M[3]} ${M[4]}`),k&&(R+=`${k}${N<L.length-1?", ":""}`),R},"")}let i=null,d=null,s=!1,c=null,f=!1;const m=()=>{f=!0},T=()=>{f=!1};function C(){if(f){console.log("Cover: Ignoring programmatic scroll");return}s=!0,c&&clearTimeout(c),c=setTimeout(()=>{s=!1},150)}function S(){const L={root:null,rootMargin:"0px",threshold:.7};i=new IntersectionObserver(N=>{N.forEach(M=>{if(console.log("Cover: Intersection observer triggered:",M.isIntersecting,"isScrolling:",s),s){console.log("Cover: Scroll in progress, delaying intersection event"),d&&clearTimeout(d),d=setTimeout(()=>{console.log("Cover: Emitting delayed intersection event:",M.isIntersecting),D("intersection-changed",M.isIntersecting)},100);return}d&&clearTimeout(d),d=setTimeout(()=>{console.log("Cover: Emitting immediate intersection event:",M.isIntersecting),D("intersection-changed",M.isIntersecting)},50)})},L);const R=X.value;R&&i.observe(R);const E=document.querySelector(".container-main");E&&E.addEventListener("scroll",C,{passive:!0}),document.addEventListener("programmatic-scroll-start",m),document.addEventListener("programmatic-scroll-end",T)}return h.onMounted(()=>{S()}),h.onUnmounted(()=>{i&&i.disconnect();const L=document.querySelector(".container-main");L&&L.removeEventListener("scroll",C),document.removeEventListener("programmatic-scroll-start",m),document.removeEventListener("programmatic-scroll-end",T),d&&clearTimeout(d),c&&clearTimeout(c)}),(L,R)=>(h.openBlock(),h.createElementBlock("div",{ref_key:"coverPage",ref:X,class:"cover",style:h.normalizeStyle(t.value)},[A.value?(h.openBlock(),h.createElementBlock("div",nle,[u.value.homeTeam.logo?(h.openBlock(),h.createElementBlock("div",ile,[h.createElementVNode("img",{src:u.value.homeTeam.logo||"/default-logo.png",alt:"Team 1 Logo"},null,8,ale)])):(h.openBlock(),h.createElementBlock("svg",ole,[h.createElementVNode("path",{d:"M80.0068 0.953125C80.0068 0.953125 91.0143 12.208 118.141 12.9913C140.898 13.6509 149.102 7.87917 149.102 7.87917C149.102 7.87917 169.839 67.5339 135.786 117.212C117.894 143.308 83.5935 160.211 79.9656 160.953C76.3789 160.211 42.0372 143.308 24.1449 117.212C-9.8257 67.5339 10.9112 7.87917 10.9112 7.87917C10.9112 7.87917 19.1153 13.6509 41.8723 12.9913C68.9993 12.208 80.0068 0.953125 80.0068 0.953125Z",fill:e.value.homeTeam},null,8,sle)]))])):h.createCommentVNode("",!0),A.value?(h.openBlock(),h.createElementBlock("div",lle,[u.value.awayTeam.logo?(h.openBlock(),h.createElementBlock("div",cle,[h.createElementVNode("img",{src:u.value.awayTeam.logo||"/default-logo.png",alt:"Team 2 Logo"},null,8,ule)])):(h.openBlock(),h.createElementBlock("svg",dle,[h.createElementVNode("path",{d:"M80.8504 0.953125C80.8504 0.953125 92.9822 3.39499 119.261 10.1779C144.106 16.5733 152.827 19.1314 152.827 19.1314C152.827 19.1314 156.936 44.2089 145.657 90.5655C136.548 127.969 106.742 152.038 80.8504 160.953C54.9977 152.038 25.1527 128.007 16.0442 90.5655C4.8039 44.2477 8.91243 19.1314 8.91243 19.1314C8.91243 19.1314 17.6334 16.5733 42.4783 10.1779C68.7574 3.39499 80.8504 0.953125 80.8504 0.953125Z",fill:e.value.awayTeam},null,8,ple)]))])):h.createCommentVNode("",!0),h.createElementVNode("div",hle,[h.createElementVNode("div",fle,[R[0]||(R[0]=h.createElementVNode("div",null,"Análisis",-1)),h.createElementVNode("div",null,h.toDisplayString(w.value),1)]),h.createElementVNode("div",mle,h.toDisplayString(x.value),1)]),A.value?(h.openBlock(),h.createElementBlock("div",gle,[h.createElementVNode("div",yle,[h.createElementVNode("div",vle,[u.value.homeTeam.logo?(h.openBlock(),h.createElementBlock("div",xle,[h.createElementVNode("img",{src:u.value.homeTeam.logo||"/default-logo.png",alt:"Team 1 Logo"},null,8,ble)])):(h.openBlock(),h.createElementBlock("svg",_le,[h.createElementVNode("path",{d:"M80.0068 0.953125C80.0068 0.953125 91.0143 12.208 118.141 12.9913C140.898 13.6509 149.102 7.87917 149.102 7.87917C149.102 7.87917 169.839 67.5339 135.786 117.212C117.894 143.308 83.5935 160.211 79.9656 160.953C76.3789 160.211 42.0372 143.308 24.1449 117.212C-9.8257 67.5339 10.9112 7.87917 10.9112 7.87917C10.9112 7.87917 19.1153 13.6509 41.8723 12.9913C68.9993 12.208 80.0068 0.953125 80.0068 0.953125Z",fill:e.value.homeTeam,opacity:e.value.opacity},null,8,wle)])),h.createElementVNode("div",Tle,h.toDisplayString(u.value.homeTeam.name),1)]),r.isPostMatch?(h.openBlock(),h.createElementBlock("div",kle,[R[1]||(R[1]=h.createStaticVNode('<svg class="ball" width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-0364d256><path fill-rule="evenodd" clip-rule="evenodd" d="M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path fill-rule="evenodd" clip-rule="evenodd" d="M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M12.7277 3.39453L10.0276 4.54375L7.32812 3.39453" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M4.65662 5.34766L4.91603 8.27341L2.98828 10.4871" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M4.01562 13.6523L6.87533 14.3093L8.38436 16.8279" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M11.7031 16.8213L13.2109 14.3015L16.0697 13.6445" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M17.1051 10.4865L15.1758 8.27156L15.4349 5.34766" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M10.0456 4.54688V6.92693" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M13.2109 9.32248L15.1681 8.27344" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M11.9961 12.9609L13.2064 14.3086" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M8.08198 12.9609L6.87109 14.3099" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M4.91797 8.27344L6.87609 9.22818" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path></svg>',1)),h.createElementVNode("div",null,h.toDisplayString(u.value.homeTeam.goalsMinutes),1),R[2]||(R[2]=h.createElementVNode("div",{class:"separator"},null,-1)),R[3]||(R[3]=h.createElementVNode("svg",{class:"card",width:"10",height:"14",viewBox:"0 0 10 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[h.createElementVNode("rect",{x:"0.367188",y:"0.09375",width:"9.14286",height:"13.7143",rx:"2.28571",fill:"#F7C330"})],-1)),h.createElementVNode("div",null,h.toDisplayString(u.value.homeTeam.totalYellowCards),1),R[4]||(R[4]=h.createElementVNode("svg",{class:"card",width:"10",height:"14",viewBox:"0 0 10 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[h.createElementVNode("rect",{x:"0.109375",y:"0.09375",width:"9.14286",height:"13.7143",rx:"1.82857",fill:"#FF0000"})],-1)),h.createElementVNode("div",null,h.toDisplayString(u.value.homeTeam.totalRedCards),1)])):h.createCommentVNode("",!0)]),h.createElementVNode("div",Sle,[r.isPostMatch?(h.openBlock(),h.createElementBlock("div",Cle,h.toDisplayString(v.value[0])+" : "+h.toDisplayString(v.value[1]),1)):h.createCommentVNode("",!0)]),h.createElementVNode("div",Ele,[h.createElementVNode("div",Mle,[u.value.awayTeam.logo?(h.openBlock(),h.createElementBlock("div",Ale,[h.createElementVNode("img",{src:u.value.awayTeam.logo||"/default-logo.png",alt:"Team 2 Logo"},null,8,Lle)])):(h.openBlock(),h.createElementBlock("svg",Rle,[h.createElementVNode("path",{d:"M80.8504 0.953125C80.8504 0.953125 92.9822 3.39499 119.261 10.1779C144.106 16.5733 152.827 19.1314 152.827 19.1314C152.827 19.1314 156.936 44.2089 145.657 90.5655C136.548 127.969 106.742 152.038 80.8504 160.953C54.9977 152.038 25.1527 128.007 16.0442 90.5655C4.8039 44.2477 8.91243 19.1314 8.91243 19.1314C8.91243 19.1314 17.6334 16.5733 42.4783 10.1779C68.7574 3.39499 80.8504 0.953125 80.8504 0.953125Z",fill:e.value.awayTeam,opacity:e.value.opacity},null,8,Nle)])),h.createElementVNode("div",Ile,h.toDisplayString(u.value.awayTeam.name),1)]),r.isPostMatch?(h.openBlock(),h.createElementBlock("div",Ple,[h.createElementVNode("div",null,h.toDisplayString(u.value.awayTeam.totalYellowCards),1),R[5]||(R[5]=h.createElementVNode("svg",{width:"10",height:"14",viewBox:"0 0 10 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[h.createElementVNode("rect",{x:"0.367188",y:"0.09375",width:"9.14286",height:"13.7143",rx:"2.28571",fill:"#F7C330"})],-1)),h.createElementVNode("div",null,h.toDisplayString(u.value.awayTeam.totalRedCards),1),R[6]||(R[6]=h.createElementVNode("svg",{width:"10",height:"14",viewBox:"0 0 10 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[h.createElementVNode("rect",{x:"0.109375",y:"0.09375",width:"9.14286",height:"13.7143",rx:"1.82857",fill:"#FF0000"})],-1)),R[7]||(R[7]=h.createElementVNode("div",{class:"separator"},null,-1)),h.createElementVNode("div",null,h.toDisplayString(u.value.awayTeam.goalsMinutes),1),R[8]||(R[8]=h.createStaticVNode('<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-0364d256><path fill-rule="evenodd" clip-rule="evenodd" d="M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path fill-rule="evenodd" clip-rule="evenodd" d="M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M12.7277 3.39453L10.0276 4.54375L7.32812 3.39453" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M4.65662 5.34766L4.91603 8.27341L2.98828 10.4871" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M4.01562 13.6523L6.87533 14.3093L8.38436 16.8279" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M11.7031 16.8213L13.2109 14.3015L16.0697 13.6445" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M17.1051 10.4865L15.1758 8.27156L15.4349 5.34766" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M10.0456 4.54688V6.92693" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M13.2109 9.32248L15.1681 8.27344" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M11.9961 12.9609L13.2064 14.3086" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M8.08198 12.9609L6.87109 14.3099" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M4.91797 8.27344L6.87609 9.22818" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path></svg>',1))])):h.createCommentVNode("",!0)])])):(h.openBlock(),h.createElementBlock("div",Ole,[h.createElementVNode("div",zle,[h.createElementVNode("div",Ble,[u.value.homeTeam.logo?(h.openBlock(),h.createElementBlock("div",Dle,[h.createElementVNode("img",{src:u.value.homeTeam.logo||"/default-logo.png",alt:"Team 1 Logo"},null,8,Vle)])):(h.openBlock(),h.createElementBlock("svg",Fle,[h.createElementVNode("path",{d:"M80.0068 0.953125C80.0068 0.953125 91.0143 12.208 118.141 12.9913C140.898 13.6509 149.102 7.87917 149.102 7.87917C149.102 7.87917 169.839 67.5339 135.786 117.212C117.894 143.308 83.5935 160.211 79.9656 160.953C76.3789 160.211 42.0372 143.308 24.1449 117.212C-9.8257 67.5339 10.9112 7.87917 10.9112 7.87917C10.9112 7.87917 19.1153 13.6509 41.8723 12.9913C68.9993 12.208 80.0068 0.953125 80.0068 0.953125Z",fill:e.value.homeTeam,opacity:e.value.opacity},null,8,jle)])),r.isPostMatch?(h.openBlock(),h.createElementBlock("div",Ule,h.toDisplayString(v.value[0]),1)):h.createCommentVNode("",!0)]),r.isPostMatch?(h.openBlock(),h.createElementBlock("div",qle,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(u.value.homeTeam.goalsEvents,(E,N)=>(h.openBlock(),h.createElementBlock("div",{key:`goal-${N}`,class:"goal"},[h.createElementVNode("div",null,h.toDisplayString(E.playerName),1),R[9]||(R[9]=h.createElementVNode("div",{class:"bullet"},null,-1)),h.createElementVNode("div",null,h.toDisplayString(E.goalTime),1),R[10]||(R[10]=h.createStaticVNode('<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-0364d256><path fill-rule="evenodd" clip-rule="evenodd" d="M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path fill-rule="evenodd" clip-rule="evenodd" d="M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M12.7277 3.39453L10.0276 4.54375L7.32812 3.39453" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M4.65662 5.34766L4.91603 8.27341L2.98828 10.4871" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M4.01562 13.6523L6.87533 14.3093L8.38436 16.8279" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M11.7031 16.8213L13.2109 14.3015L16.0697 13.6445" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M17.1051 10.4865L15.1758 8.27156L15.4349 5.34766" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M10.0456 4.54688V6.92693" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M13.2109 9.32248L15.1681 8.27344" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M11.9961 12.9609L13.2064 14.3086" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M8.08198 12.9609L6.87109 14.3099" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M4.91797 8.27344L6.87609 9.22818" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path></svg>',1))]))),128))])):h.createCommentVNode("",!0)]),R[13]||(R[13]=h.createElementVNode("div",{class:"separator"},null,-1)),h.createElementVNode("div",Wle,[h.createElementVNode("div",Gle,[r.isPostMatch?(h.openBlock(),h.createElementBlock("div",Hle,h.toDisplayString(v.value[1]),1)):h.createCommentVNode("",!0),u.value.awayTeam.logo?(h.openBlock(),h.createElementBlock("div",Jle,[h.createElementVNode("img",{src:u.value.awayTeam.logo||"/default-logo.png",alt:"Team 2 Logo"},null,8,Kle)])):(h.openBlock(),h.createElementBlock("svg",Xle,[h.createElementVNode("path",{d:"M80.8504 0.953125C80.8504 0.953125 92.9822 3.39499 119.261 10.1779C144.106 16.5733 152.827 19.1314 152.827 19.1314C152.827 19.1314 156.936 44.2089 145.657 90.5655C136.548 127.969 106.742 152.038 80.8504 160.953C54.9977 152.038 25.1527 128.007 16.0442 90.5655C4.8039 44.2477 8.91243 19.1314 8.91243 19.1314C8.91243 19.1314 17.6334 16.5733 42.4783 10.1779C68.7574 3.39499 80.8504 0.953125 80.8504 0.953125Z",fill:e.value.awayTeam,opacity:e.value.opacity},null,8,Zle)]))]),r.isPostMatch?(h.openBlock(),h.createElementBlock("div",Yle,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(u.value.awayTeam.goalsEvents,(E,N)=>(h.openBlock(),h.createElementBlock("div",{key:`goal-a-${N}`,class:"goal"},[R[11]||(R[11]=h.createStaticVNode('<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-0364d256><path fill-rule="evenodd" clip-rule="evenodd" d="M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path fill-rule="evenodd" clip-rule="evenodd" d="M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M12.7277 3.39453L10.0276 4.54375L7.32812 3.39453" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M4.65662 5.34766L4.91603 8.27341L2.98828 10.4871" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M4.01562 13.6523L6.87533 14.3093L8.38436 16.8279" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M11.7031 16.8213L13.2109 14.3015L16.0697 13.6445" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M17.1051 10.4865L15.1758 8.27156L15.4349 5.34766" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M10.0456 4.54688V6.92693" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M13.2109 9.32248L15.1681 8.27344" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M11.9961 12.9609L13.2064 14.3086" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M8.08198 12.9609L6.87109 14.3099" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M4.91797 8.27344L6.87609 9.22818" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path></svg>',1)),h.createElementVNode("div",null,h.toDisplayString(E.goalTime),1),R[12]||(R[12]=h.createElementVNode("div",{class:"bullet"},null,-1)),h.createElementVNode("div",null,h.toDisplayString(E.playerName),1)]))),128))])):h.createCommentVNode("",!0)])]))],4))}},$le=dd(Qle,[["__scopeId","data-v-0364d256"]]),ece={class:"floating-bar"},tce={class:"tab active"},rce={class:"select-display"},nce={class:"select-icon"},ice=["src"],ace={key:1,src:"https://golstatsimages.blob.core.windows.net/images-library/vector2.png",alt:"icono",class:"option-img-default"},oce={key:0,class:"select-placeholder select-label"},sce={key:1,class:"select-label"},lce={key:0,class:"dropdown-menu field-menu"},cce=["onClick"],uce={class:"option-icon"},dce=["src","data-hover-src"],pce={class:"option-content"},hce={class:"option-title"},fce={key:0,class:"option-description"},mce={class:"select-display"},gce={class:"select-icon"},yce=["src"],vce=["src"],xce={class:"select-label"},bce={key:0,class:"dropdown-menu type-menu type-menu-grid"},_ce={class:"option-grid"},wce=["onClick"],Tce={class:"option-grid-title"},kce={class:"option-grid-icon"},Sce=["src"],Cce={key:1,class:"filter-separator"},Ece=["onClick"],Mce={class:"select-display"},Ace={key:0,class:"badge-categorias"},Lce={key:0,class:"dropdown-menu type-menu multi-select-menu"},Rce={class:"multi-select-scroll-area"},Nce={class:"select-all-checkbox"},Ice=["checked","indeterminate","onChange"],Pce={class:"option-checkbox"},Oce=["checked","onChange"],zce=["onClick"],Bce={class:"option-title"},Dce={class:"multi-select-footer"},Vce={key:1,class:"custom-radio-group filter-inline"},Fce={class:"radio-label"},jce={class:"radio-options"},Uce=["name","value","onUpdate:modelValue","disabled","onChange"],qce={key:2,class:"check-group filter-inline"},Wce=["onUpdate:modelValue","checked","onChange"],Gce=["data-filter-type","onClick"],Hce={class:"select-display"},Jce={key:0,class:"dropdown-menu type-menu simple-select-menu"},Kce={class:"simple-select-scroll-area"},Xce=["onMouseenter","onClick"],Zce={class:"option-content"},Yce={class:"option-title"},Qce={key:0,class:"option-checkmark"},$ce={key:4,class:"filter-separator"},eue=Object.assign({name:"FloatingFiltersBar"},{__name:"filters",props:{token:{type:String,required:!0},view:{type:Object,default:()=>null},isPostMatch:{type:Boolean,default:!1},filters_edition_mode:{type:Array,default:()=>null}},emits:["filters-changed","close"],setup(r,{expose:a,emit:g}){const D=r,X=g,A=h.ref([]);let b=null,e=null,v=null;const u=h.ref(!1),t=h.ref(!1),w=h.ref(!1),y=h.ref(!1),x=h.ref(!1),p=h.ref(!1),n=h.computed(()=>A.value),i=h.ref(null),d=h.computed(()=>n.value[i.value]||null),s=h.computed(()=>{var ye;const ge=((ye=d.value)==null?void 0:ye.views)||[];return N(ge)}),c=h.ref(null),f=h.computed(()=>s.value.find(ye=>ye.id===c.value)||null),m=h.ref([]),T=h.computed(()=>{var ye,ge;return u.value?((ye=f.value)==null?void 0:ye.filters_edition_mode)||[]:((ge=f.value)==null?void 0:ge.filters)||[]});h.watch(u,ye=>{ye||(t.value=!1)}),h.watch(f,ye=>{var ge,ze;if(!ye){m.value=[];return}const Ie=ye.id===6&&D.isPostMatch;if(!Array.isArray(T.value)&&!Ie){m.value=[];return}if(y.value)return;Ie?m.value=[]:m.value=T.value.map((Ge,Ke)=>{var ke,Be,Fe,He,rt,nt,pt,vt,ft,Nt,Ft,Dt,at,Ze,ct,gt,Rt,Ct;if(Ge.type==="select"){if(u.value&&v&&v.dynamicFilters){const tt=v.dynamicFilters[Ke];if(tt){if(tt.selectedOptions&&Array.isArray(tt.selectedOptions)){const st=tt.selectedOptions.map(Je=>Je.value);return console.log(`Using saved select values for filter ${Ke}:`,st),st}else if(tt.selectedValue&&Array.isArray(tt.selectedValue))if(tt.selectedValue.length>0&&tt.selectedValue[0]&&typeof tt.selectedValue[0]=="object"){const st=We(tt.selectedValue);return console.log(`Using saved Timeline values for filter ${Ke}:`,st),st}else return console.log(`Using saved selectedValue for filter ${Ke}:`,tt.selectedValue),tt.selectedValue}}if(ye.id===4&&Ge.options&&Array.isArray(Ge.options)){const tt=Ge.options.map(st=>st.value);return console.log(`Timeline detected - preselecting all options for filter ${Ke}:`,tt),console.log("Timeline - filter options:",Ge.options),console.log("Timeline - filter type:",Ge.type),tt}return[]}else if(Ge.type==="radio-button"){if(u.value&&v&&v.dynamicFilters){const tt=v.dynamicFilters[Ke];if(tt&&tt.selectedOption)return console.log(`Using saved radio-button value for filter ${Ke}:`,tt.selectedOption.value),tt.selectedOption.value}if(ye.id===7&&u.value&&e!=null&&e.view){if(console.log(`GSCGoalData - checking for stored values in initialization for filter ${Ke}:`,e.view),console.log("GSCGoalData - filter index:",Ke,"filter type:",Ge.type,"filter label:",Ge.label),Ke===0&&(ke=e.view.componentProps)!=null&&ke.analysisType){const tt=e.view.componentProps.analysisType,st=tt==="offensive"?1:2;return console.log(`GSCGoalData - setting radio-button filter ${Ke} to analysis value:`,st,"analysisType:",tt),console.log("GSCGoalData - filter options:",Ge.options),st}if(Ke===1&&((Be=e.view.filterMultiple)==null?void 0:Be.isHomeTeam)!==void 0){const tt=e.view.filterMultiple.isHomeTeam,st=tt?1:2;return console.log(`GSCGoalData - setting radio-button filter ${Ke} to team value:`,st,"isHomeTeam:",tt),console.log("GSCGoalData - filter options:",Ge.options),st}console.log(`GSCGoalData - filter index ${Ke} - no stored value found or not applicable`)}else console.log(`GSCGoalData - conditions not met: newVal.id=${ye.id}, isEditMode=${u.value}, hasView=${!!(e!=null&&e.view)}`);return((He=(Fe=Ge.options)==null?void 0:Fe[0])==null?void 0:He.value)??null}else if(Ge.type==="select-simple"){if(u.value&&v&&v.dynamicFilters){const tt=v.dynamicFilters[Ke];if(tt&&tt.selectedValue!==void 0){console.log(`Using saved select-simple value for filter ${Ke}:`,tt.selectedValue),console.log("Saved selectedValue type:",typeof tt.selectedValue),console.log("Saved selectedValue is array:",Array.isArray(tt.selectedValue));let st;return ye.id===2&&(nt=(rt=e==null?void 0:e.view)==null?void 0:rt.filterMultiple)!=null&&nt.categoryId?(st=e.view.filterMultiple.categoryId,console.log("GSCtops - using filterMultiple.categoryId in initialization:",st)):ye.id===1&&(vt=(pt=e==null?void 0:e.view)==null?void 0:pt.filterMultiple)!=null&&vt.category?(st=e.view.filterMultiple.category,console.log("GSCComparativeReports - using filterMultiple.category in initialization:",st)):ye.id===6&&(Nt=(ft=e==null?void 0:e.view)==null?void 0:ft.filterMultiple)!=null&&Nt.gameNumber?(st=e.view.filterMultiple.gameNumber,console.log("GSCLineupsReports - using filterMultiple.gameNumber in initialization:",st)):st=Array.isArray(tt.selectedValue)?tt.selectedValue[0]:tt.selectedValue,console.log(`Returning select-simple value for filter ${Ke}:`,st),st}}if(ye.id===2&&u.value&&e!=null&&e.view){if(b&&e.view.id){const tt=b.getComponentDynamicFilters(e.view.id);if(tt&&tt[Ke]!==void 0)return console.log(`GSCtops - using component specific filter for index ${Ke}:`,tt[Ke]),tt[Ke]}if(e.view.filterMultiple){if(console.log("111 ************************************************************",e.view.filterMultiple),Ge.type==="select-simple"&&e.view.filterMultiple.categoryId){const tt=e.view.filterMultiple.categoryId,st=(Ge.options||[]).find(Je=>Je.value==tt);return console.log("GSCtops - matching option in initialization:",st),tt}if(Ge.type==="radio-button"&&e.view.filterMultiple.teamType!==void 0){const tt=e.view.filterMultiple.teamType;return(Ge.options||[]).find(st=>st.value==tt)?(console.log("GSCtops - returning teamType:",tt),tt):(console.log("GSCtops - no matching option found for teamType:",tt),console.log("GSCtops - returning teamType anyway for consistency:",tt),tt)}else console.log("GSCtops - radio-button condition not met:",{isRadioButton:Ge.type==="radio-button",hasTeamType:e.view.filterMultiple.teamType!==void 0,teamType:e.view.filterMultiple.teamType})}}if(ye.id===1&&u.value&&(Ft=e==null?void 0:e.view)!=null&&Ft.filterMultiple&&(console.log(`GSCComparativeReports - checking filterMultiple in initialization for filter ${Ke}:`,e.view.filterMultiple),e.view.filterMultiple.category)){const tt=e.view.filterMultiple.category,st=(Ge.options||[]).find(Je=>Je.value==tt);return console.log("GSCComparativeReports - matching option in initialization:",st),tt}if(ye.id===9&&u.value&&(Dt=e==null?void 0:e.view)!=null&&Dt.filterMultiple&&(console.log(`GSCFieldDataByZones - checking filterMultiple in initialization for filter ${Ke}:`,e.view.filterMultiple),Ge.type==="select-simple"&&e.view.filterMultiple.categoryIds)){const tt=Array.isArray(e.view.filterMultiple.categoryIds)?e.view.filterMultiple.categoryIds:[e.view.filterMultiple.categoryIds];console.log(`GSCFieldDataByZones - setting select-simple filter ${Ke} to categoryIds:`,tt),console.log("GSCFieldDataByZones - categoryIds type in initialization:",typeof tt),console.log("GSCFieldDataByZones - filter options in initialization:",Ge.options);const st=(Ge.options||[]).filter(Je=>Array.isArray(Je.value)?Me(Je.value,tt):tt.includes(Je.value));if(st.length>0){const Je=st[0];return console.log("GSCFieldDataByZones - found matching option in initialization:",Je),Je.value}else return console.log("GSCFieldDataByZones - no matching options found, using categoryIds directly:",tt),tt}if(ye.id===6&&u.value&&(at=e==null?void 0:e.view)!=null&&at.filterMultiple&&(console.log(`GSCLineupsReports - checking filterMultiple in initialization for filter ${Ke}:`,e.view.filterMultiple),e.view.filterMultiple.gameNumber)){const tt=e.view.filterMultiple.gameNumber;console.log(`GSCLineupsReports - setting select-simple filter ${Ke} to gameNumber:`,tt),console.log("GSCLineupsReports - gameNumber type in initialization:",typeof tt),console.log("GSCLineupsReports - filter options in initialization:",Ge.options);const st=(Ge.options||[]).find(Je=>Je.value==tt);return console.log("GSCLineupsReports - matching option in initialization:",st),tt}if(ye.id===5&&u.value&&(Ze=e==null?void 0:e.view)!=null&&Ze.filterMultiple&&(console.log(`GSCVolumetricField - checking filterMultiple in initialization for filter ${Ke}:`,e.view.filterMultiple),console.log("GSCVolumetricField - filter details:",{type:Ge.type,label:Ge.label,options:Ge.options}),e.view.filterMultiple.isHomeTeam!==void 0)){const tt=e.view.filterMultiple.isHomeTeam;console.log(`GSCVolumetricField - setting radio-button filter ${Ke} to isHomeTeam:`,tt),console.log("GSCVolumetricField - isHomeTeam type in initialization:",typeof tt),console.log("GSCVolumetricField - filter options in initialization:",Ge.options);let st;typeof tt=="boolean"?(st=tt?1:2,console.log("GSCVolumetricField - isHomeTeam is boolean in initialization, converting:",tt,"-> teamValue:",st)):typeof tt=="number"?(st=tt===1?1:2,console.log("GSCVolumetricField - isHomeTeam is number in initialization, using directly:",tt,"-> teamValue:",st)):(st=1,console.log("GSCVolumetricField - isHomeTeam is unknown type in initialization, using default:",st));const Je=(Ge.options||[]).find(lt=>lt.value==st);if(console.log("GSCVolumetricField - matching option in initialization:",Je),Ge.type==="radio-button"&&(Ge.label==="Equipo"||Ge.label==="Team"||Ge.label==="Equipo seleccionado"))return console.log("GSCVolumetricField - applying team filter value:",st),st;console.log("GSCVolumetricField - filter is not a team filter, skipping:",Ge.label)}if(ye.id===9&&u.value&&(ct=e==null?void 0:e.view)!=null&&ct.filterMultiple&&(console.log(`GSCFieldDataByZones - checking filterMultiple in initialization for filter ${Ke}:`,e.view.filterMultiple),Ge.type==="radio-button"&&e.view.filterMultiple.isHomeTeam!==void 0)){const tt=e.view.filterMultiple.isHomeTeam,st=tt?1:2;console.log(`GSCFieldDataByZones - setting radio-button filter ${Ke} to team value:`,st,"isHomeTeam:",tt),console.log("GSCFieldDataByZones - filter options:",Ge.options);const Je=((gt=Ge.options)==null?void 0:gt.map(lt=>lt.value))||[];return Je.includes(st)?(console.log("GSCFieldDataByZones - using valid team value from filterMultiple:",st),st):(console.log("GSCFieldDataByZones - team value not in valid options, using default:",Je[0]),Je[0]||1)}return((Ct=(Rt=Ge.options)==null?void 0:Rt[0])==null?void 0:Ct.value)??null}else if(Ge.type==="check"){if(u.value&&v&&v.dynamicFilters){const tt=v.dynamicFilters[Ke];if(tt&&tt.isChecked!==void 0)return console.log(`Using saved checkbox value for filter ${Ke}:`,tt.isChecked),tt.isChecked}if(ye.id===8)return!0;if(ye.id===3){if(u.value&&v&&v.dynamicFilters){const tt=v.dynamicFilters[Ke];if(tt&&tt.isChecked!==void 0)return console.log(`GSCMatchSummary - Using saved checkbox value for filter ${Ke}:`,tt.isChecked),tt.isChecked}return!1}return!1}return null});const Ve=((ge=ye.name)==null?void 0:ge.toLowerCase().includes("tops players"))||((ze=ye.title)==null?void 0:ze.toLowerCase().includes("tops players"));!Ve&&(!u.value||Ie)&&h.nextTick(()=>{var Ge,Ke,ke;console.log("Timeline - about to emit change:",{esTopsPlayers:Ve,isEditMode:u.value,selectedSecond:(Ge=f.value)==null?void 0:Ge.id}),ye.id===4&&u.value&&(Ke=e==null?void 0:e.view)!=null&&Ke.id&&(console.log("Timeline - saving specific filters for component:",e.view.id),b&&b.setDynamicFilters(m.value,e.view.id)),ye.id===3&&u.value&&(ke=e==null?void 0:e.view)!=null&&ke.id&&(console.log("GSCMatchSummary - saving specific filters for component:",e.view.id),b&&b.setDynamicFilters(m.value,e.view.id)),pe()})},{immediate:!0}),h.watch(()=>b,ye=>{ye&&ye.dynamicFilters&&(console.log("FilterAndViewsContainer changed, updating dynamicFilters:",ye.dynamicFilters),Array.isArray(ye.dynamicFilters)&&(y.value=!0,m.value=[...ye.dynamicFilters],h.nextTick(()=>{y.value=!1})))},{deep:!0}),h.watch(()=>b==null?void 0:b.dynamicFilters,ye=>{if(ye&&Array.isArray(ye)){if(console.log("Container dynamicFilters changed, updating:",ye),x.value){console.log("Skipping container update due to user update in progress");return}y.value=!0,m.value=[...ye],h.nextTick(()=>{y.value=!1})}},{deep:!0}),h.watch(()=>f.value,ye=>{if(u.value&&v&&ye&&ye.filters){if(y.value)return;if(p.value){console.log("Skipping force updates in selectedSecond watcher - already in force update");return}if(ye.id===3){if(console.log("GSCMatchSummary detected in edit mode, loading saved filters"),x.value||p.value){console.log("GSCMatchSummary - Skipping due to update in progress");return}const ge=v.dynamicFilters.find(ze=>ze.filterType==="check");ge&&ge.isChecked!==void 0&&(console.log("GSCMatchSummary - Found saved checkbox value:",ge.isChecked),m.value&&m.value.length>0&&(x.value=!0,m.value[0]=ge.isChecked,console.log("GSCMatchSummary - Updated dynamicFilters:",m.value),h.nextTick(()=>{m.value=[...m.value],console.log("GSCMatchSummary - Forced UI update"),x.value=!1})))}setTimeout(()=>{(!m.value||m.value.length===0)&&(Le(),Re(),je()),ye.id===4&&Pe()},100)}},{deep:!0}),h.watch(()=>{var ye;return(ye=f.value)==null?void 0:ye.id},ye=>{if(u.value&&v&&ye===4){if(console.log("Timeline detected, preselecting filters"),y.value)return;if(p.value){console.log("Skipping force updates in Timeline watcher - already in force update");return}setTimeout(()=>{Pe()},200)}}),h.watch(()=>m.value,ye=>{if(u.value&&v&&ye&&ye.length>0){if(console.log("(((((((((((((((((((((((((((((((((((((((((((((())))))))))))))))))))))))))))))))))))))))))))))",v),console.log("Dynamic filters initialized, forcing update"),y.value||x.value)return;if(p.value){console.log("Skipping force updates - already in force update");return}setTimeout(()=>{var ge;ve()&&(Le(),Re(),je(),((ge=f.value)==null?void 0:ge.id)===4&&Pe())},50)}},{deep:!0});function C(ye,ge){var ze,Ie,Ve,Ge,Ke;const ke=m.value[ye];if(((ze=f.value)==null?void 0:ze.id)===4&&ye===0&&console.log("Timeline filter check - optionValue:",ge,"selectedValues:",ke),((Ie=f.value)==null?void 0:Ie.id)===6&&ye===0&&console.log("GSCLineupsReports filter check - optionValue:",ge,"selectedValues:",ke,"type:",typeof ke),Array.isArray(ke)){if(((Ve=f.value)==null?void 0:Ve.id)===4&&ye===0){const Be=ke.some(Fe=>ge.category_id&&ge.event_type_id?Fe.category_id===ge.category_id&&Fe.event_type_id===ge.event_type_id:ge.event_type_id?Fe.event_type_id===ge.event_type_id:ge.category_id?Fe.category_id===ge.category_id:!1);return((Ge=f.value)==null?void 0:Ge.id)===4&&ye===0&&console.log("Timeline comparison (IDs) - optionValue:",ge,"selectedValues:",ke,"isSelected:",Be),Be}return ke.includes(ge)}else if(ke!=null){if(((Ke=f.value)==null?void 0:Ke.id)===6&&ye===0){const Be=ke===ge;return console.log("GSCLineupsReports comparison - optionValue:",ge,"selectedValues:",ke,"isSelected:",Be),Be}return ke===ge}return!1}function S(ye,ge){var ze,Ie;const Ve=(Ie=(ze=f.value)==null?void 0:ze.filters)==null?void 0:Ie[ye];if((Ve==null?void 0:Ve.type)==="select-simple"){console.log("toggleMultiSelectOption called for select-simple filter, using selectSimpleOption instead"),ae(ye,ge);return}Array.isArray(m.value[ye])||(m.value[ye]=[]);const Ge=m.value[ye],Ke=Ge.indexOf(ge);Ke>-1?Ge.splice(Ke,1):Ge.push(ge),u.value&&Ne(),pe()}function L(ye){var ge,ze;const Ie=m.value[ye],Ve=(ze=(ge=f.value)==null?void 0:ge.filters)==null?void 0:ze[ye];return(Ve==null?void 0:Ve.type)==="select-simple"||!Ve||!Ve.options||!Array.isArray(Ie)?!1:Ie.length===Ve.options.length}function R(ye){var ge,ze;const Ie=m.value[ye],Ve=(ze=(ge=f.value)==null?void 0:ge.filters)==null?void 0:ze[ye];return(Ve==null?void 0:Ve.type)==="select-simple"||!Ve||!Ve.options||!Array.isArray(Ie)?!1:Ie.length>0&&Ie.length<Ve.options.length}function E(){var ye;return console.log("props.isPostMatch",D.isPostMatch),!(((ye=f.value)==null?void 0:ye.id)===6&&D.isPostMatch)}function N(ye){return!ye||!Array.isArray(ye)?ye:ye.filter(ge=>{const ze=(ge.name||ge.title||"").toLowerCase();return D.isPostMatch?D.isPostMatch?!["fortalezas","tabla general"].some(Ie=>ze.includes(Ie)):!0:!["resumen general","timeline","datos relevantes"].some(Ie=>ze.includes(Ie))})}function M(){var ye,ge;const ze=((ge=(ye=d.value)==null?void 0:ye.name)==null?void 0:ge.toLowerCase())||"";return ze.includes("cancha")||ze.includes("volumétrica")||ze.includes("volumetric")}function k(ye,ge){if(!u.value||!M())return!1;const ze=String(ye||"").toLowerCase(),Ie=String(ge||"").toLowerCase();return ze.includes("ambos")||Ie.includes("ambos")}function I(ye){var ge,ze;const Ie=(ze=(ge=f.value)==null?void 0:ge.filters)==null?void 0:ze[ye];if(!Ie||!Ie.options)return;const Ve=Ie.options.map(Ge=>Ge.value);Array.isArray(m.value[ye])||(m.value[ye]=[]),L(ye)?m.value[ye]=[]:m.value[ye]=[...Ve],V.value=ye,pe()}const _=h.ref("ambos"),P=h.ref(!1),z=h.ref(!1),V=h.ref(null),U=h.ref(null);function q(ye,ge=!1){const ze="https://golstatsimages.blob.core.windows.net/images-library/",Ie="https://golstatsimages.blob.core.windows.net/reports-images/",Ve={cancha:"icn_cancha",grafico:"icn_grafico",gráfico:"icn_grafico",chart:"icn_grafico",volumetrica:"icn_cancha",volumétrica:"icn_cancha",volumetric:"icn_cancha",tabla:"icn_tabla",tablas:"icn_tabla",Tablas:"icn_tabla"},Ge=Object.keys(Ve).find(Ke=>ye==null?void 0:ye.toLowerCase().includes(Ke.toLowerCase()));if(Ge){const Ke=Ve[Ge],ke=ge?"":"-def";return Ge.toLowerCase().includes("tabla")?`${Ie}${Ke}${ke}@2x.png`:`${ze}${Ke}${ke}@2x.png`}return`${ze}icn_default${ge?"":"-def"}.png`}function W(){return d.value?d.value.name:"Tipo de vista"}function Y(){return f.value?f.value.name||f.value.title:"Visualización"}function ne(){u.value||(P.value=!P.value,P.value&&(z.value=!1,h.nextTick(()=>{Se()})))}function J(){u.value||d.value&&(z.value=!z.value,z.value&&(P.value=!1))}function re(ye){u.value||(i.value=ye,P.value=!1,c.value=null,pe())}function ee(ye){var ge,ze;u.value||(c.value=ye.id,z.value=!1,(ge=ye.name)!=null&&ge.toLowerCase().includes("tops players")||(ze=ye.title)==null||ze.toLowerCase().includes("tops players"))}function Z(ye){var ge;V.value=V.value===ye?null:ye,((ge=f.value)==null?void 0:ge.id)===4&&u.value&&ye===0&&(console.log("Timeline dropdown opened, forcing checkbox update"),setTimeout(()=>{m.value=[...m.value]},50))}function te(ye){U.value=U.value===ye?null:ye}function ae(ye,ge){var ze,Ie,Ve,Ge,Ke,ke,Be;if(console.log("selectSimpleOption called:",{idx:ye,optionValue:ge,isEditMode:u.value}),((ze=f.value)==null?void 0:ze.id)===2){console.log("GSCtops - selectSimpleOption for GSCtops");const Fe=T.value.findIndex(He=>He.type==="select-simple"&&He.label==="Tipo de análisis");ye===Fe?(m.value[0]=ge,console.log("GSCtops - updated dynamicFilters[0] (category) to:",ge)):(m.value[ye]=ge,console.log("GSCtops - updated dynamicFilters["+ye+"] to:",ge))}else if(((Ie=f.value)==null?void 0:Ie.id)===1)console.log("GSCComparativeReports - selectSimpleOption for GSCComparativeReports"),m.value[0]=ge,console.log("GSCComparativeReports - updated dynamicFilters[0] (analysis type) to:",ge);else if(((Ve=f.value)==null?void 0:Ve.id)===6)console.log("GSCLineupsReports - selectSimpleOption for GSCLineupsReports"),m.value[0]=ge,console.log("GSCLineupsReports - updated dynamicFilters[0] (game number) to:",ge);else if(((Ge=f.value)==null?void 0:Ge.id)===9)if(console.log("GSCFieldDataByZones - selectSimpleOption for GSCFieldDataByZones"),ye===0){Array.isArray(ge)?(m.value[ye]=ge,console.log("GSCFieldDataByZones - updated dynamicFilters[0] (categories) to:",ge)):(m.value[ye]=[ge],console.log("GSCFieldDataByZones - converted to array and updated dynamicFilters[0] (categories) to:",[ge]));const Fe=((Ke=T.value[ye])==null?void 0:Ke.options)||[];console.log("GSCFieldDataByZones - filterOptions for comparison:",Fe);const He=Array.isArray(ge)?ge:[ge],rt=Fe.find(nt=>Array.isArray(nt.value)?Me(nt.value,He):He.includes(nt.value));console.log("GSCFieldDataByZones - matching option found:",rt),rt?(console.log("GSCFieldDataByZones - using matching option value:",rt.value),m.value[ye]=rt.value,console.log("GSCFieldDataByZones - updated dynamicFilters["+ye+"] to matching option value:",rt.value)):(console.log("GSCFieldDataByZones - no matching option found, using selectedValue directly"),m.value[ye]=He)}else m.value[ye]=ge,console.log("GSCFieldDataByZones - updated dynamicFilters["+ye+"] to:",ge);else m.value[ye]=ge;U.value=null,console.log("dynamicFilters after selectSimpleOption:",m.value),((ke=f.value)==null?void 0:ke.id)===6&&(console.log("GSCLineupsReports - selectSimpleOption called"),console.log("GSCLineupsReports - isEditMode:",u.value),console.log("GSCLineupsReports - viewToEdit:",e),console.log("GSCLineupsReports - dynamicFilters:",m.value)),u.value&&(console.log("calling updateContainerOnUserChange"),console.log("isEditMode.value:",u.value),console.log("viewToEdit:",e),console.log("filterAndViewsContainer:",b),Ne(),((Be=f.value)==null?void 0:Be.id)===9&&(console.log("GSCFieldDataByZones - forcing component refresh after category change"),h.nextTick(()=>{var Fe,He,rt,nt,pt,vt,ft,Nt;xi.emit("force-component-update",{itemId:(Fe=e==null?void 0:e.view)==null?void 0:Fe.id,componentProps:(He=e==null?void 0:e.view)==null?void 0:He.componentProps,filterMultiple:(rt=e==null?void 0:e.view)==null?void 0:rt.filterMultiple}),console.log("GSCFieldDataByZones - emitted force-component-update event"),xi.emit("dynamic-filters-changed",{containerViewId:(nt=f.value)==null?void 0:nt.id,viewId:(pt=e==null?void 0:e.view)==null?void 0:pt.id,dynamicFilters:m.value}),console.log("GSCFieldDataByZones - emitted dynamic-filters-changed event"),xi.emit("component-props-updated",{viewId:(vt=e==null?void 0:e.view)==null?void 0:vt.id,componentProps:(ft=e==null?void 0:e.view)==null?void 0:ft.componentProps,dynamicFilters:m.value}),console.log("GSCFieldDataByZones - emitted component-props-updated event"),(Nt=e==null?void 0:e.view)!=null&&Nt.componentProps&&(e.view.componentProps={...e.view.componentProps},console.log("GSCFieldDataByZones - forced componentProps reactivity")),e!=null&&e.view&&(e.view._updateKey,e.view._updateKey=Date.now(),console.log("GSCFieldDataByZones - updated _updateKey:",e.view._updateKey))}))),console.log("calling emitChange"),pe()}function oe(ye){ye.target.closest(".custom-select")||(P.value=!1,z.value=!1,U.value=null)}function pe(){var ye,ge,ze,Ie,Ve,Ge,Ke,ke,Be,Fe,He,rt,nt,pt,vt,ft,Nt,Ft,Dt,at,Ze,ct,gt,Rt,Ct,tt,st,Je,lt,Tt,yt,It,Lt,Qe;if(console.log("emitChange called"),console.log("isEditMode.value:",u.value),console.log("viewToEdit:",e),console.log("dynamicFilters.value:",m.value),y.value){console.log("Skipping emitChange due to container update in progress");return}((ye=f.value)==null?void 0:ye.id)===8&&(console.log("FieldPosesion detected - dynamicFilters:",m.value),console.log("Current filters:",T.value)),((ge=f.value)==null?void 0:ge.id)===4&&(console.log("Timeline detected - dynamicFilters:",m.value),console.log("Current filters:",T.value),console.log("Timeline - will emit change:",!y.value)),((ze=f.value)==null?void 0:ze.id)===2&&(console.log("GSCtops detected - dynamicFilters:",m.value),console.log("Current filters:",T.value),console.log("GSCtops - will emit change:",!y.value)),((Ie=f.value)==null?void 0:Ie.id)===6&&(console.log("GSCLineupsReports detected - dynamicFilters:",m.value),console.log("Current filters:",T.value),console.log("GSCLineupsReports - will emit change:",!y.value),console.log("GSCLineupsReports - isEditMode:",u.value),console.log("GSCLineupsReports - viewToEdit:",e)),((Ve=f.value)==null?void 0:Ve.id)===9&&(console.log("GSCFieldDataByZones detected - dynamicFilters:",m.value),console.log("Current filters:",T.value),console.log("GSCFieldDataByZones - will emit change:",!y.value),console.log("GSCFieldDataByZones - isEditMode:",u.value),console.log("GSCFieldDataByZones - viewToEdit:",e));let et=[],wt=[];f.value&&Array.isArray(T.value)&&T.value.forEach((Ht,Wt)=>{if(Ht.type==="select"&&Ht.label==="Tipo de análisis"&&Ht.id===2){const Gt=m.value[Wt]||[];Array.isArray(Gt)&&Gt.length>0&&(et=Gt.map(rr=>{var nr;const Sr=(nr=Ht.options)==null?void 0:nr.find(Ar=>Ar.value===rr);return{value:rr,label:(Sr==null?void 0:Sr.label)||rr}}))}});const zt=((Ke=(Ge=f.value)==null?void 0:Ge.name)==null?void 0:Ke.toLowerCase().includes("tops players"))||((Be=(ke=f.value)==null?void 0:ke.title)==null?void 0:Be.toLowerCase().includes("tops players")),Ot=((Fe=f.value)==null?void 0:Fe.id)===4,St=f.value&&Array.isArray(f.value.filters)?f.value.filters.some(Ht=>Ht.type==="select"&&Ht.label==="Tipo de análisis"&&Ht.id===2):!1;if(zt&&St&&et.length===0||St&&et.length===0&&!Ot)return;if(Ot&&m.value&&m.value.length>0){const Ht=m.value[0];Array.isArray(Ht)&&Ht.length>0&&console.log("Timeline - emitting change with events:",Ht)}wt=((He=T.value)==null?void 0:He.map((Ht,Wt)=>{var Gt,rr,nr,Sr,Ar;const wr=m.value[Wt];((Gt=f.value)==null?void 0:Gt.id)===8&&console.log(`FieldPosesion filter ${Wt}:`,{type:Ht.type,label:Ht.label,selectedValue:wr,selectedValueType:typeof wr,isRadioButton:Ht.type==="radio-button"});let ar=Ht.id||`filter_${Wt}`;return((rr=f.value)==null?void 0:rr.id)===3&&u.value&&(nr=e==null?void 0:e.view)!=null&&nr.id&&(ar=`filter_${Wt}_component_${e.view.id}`,console.log(`GSCMatchSummary - Generated unique filterId: ${ar} for component ${e.view.id}`)),{filterId:ar,filterType:Ht.type,filterLabel:Ht.label,filterIcon:Ht.icon||null,selectedValue:wr,selectedOptions:Ht.type==="select"&&Array.isArray(wr)&&wr.length>0?wr.map(vr=>{var Wr;const xr=(Wr=Ht.options)==null?void 0:Wr.find(fr=>fr.value===vr);return{value:vr,label:(xr==null?void 0:xr.label)||vr,icon:(xr==null?void 0:xr.icon)||null}}):null,selectedOption:Ht.type==="radio-button"&&wr!=null?{value:wr,label:((Ar=(Sr=Ht.options)==null?void 0:Sr.find(vr=>vr.value===wr))==null?void 0:Ar.label)||wr}:null,isChecked:Ht.type==="check"?wr:null}}))||[];const Jt={mainSelector:{id:((rt=d.value)==null?void 0:rt.id)||null,name:((nt=d.value)==null?void 0:nt.name)||null,url:((pt=d.value)==null?void 0:pt.url)||null},viewSelector:{id:((vt=f.value)==null?void 0:vt.id)||null,name:((ft=f.value)==null?void 0:ft.name)||((Nt=f.value)==null?void 0:Nt.title)||null,url:((Ft=f.value)==null?void 0:Ft.url)||null},team:_.value,dynamicFilters:wt,categoriasSeleccionadas:et,timestamp:new Date().toISOString(),summary:{mainSelected:!!d.value,viewSelected:!!f.value,totalDynamicFilters:((Dt=T.value)==null?void 0:Dt.length)||0,activeFilters:((at=T.value)==null?void 0:at.filter((Ht,Wt)=>{const Gt=m.value[Wt];return Array.isArray(Gt)?Gt.length>0:Gt!=null&&Gt!==!1}).length)||0}};e&&(console.log("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"),console.log("viewToEdit.view.filterAndViewsContainer",e.view.filterAndViewsContainer),console.log("viewToEdit.view.filterAndViewsContainer.childViews.length",e.view.filterAndViewsContainer.childViews.length));const qt={main:d.value,view:f.value,team:_.value,dynamicFilters:m.value,filtersJSON:Jt,filterAndViewsContainer:b,viewToEdit:e};if(console.log("GSCtops - emitting filters-changed with data:",qt),X("filters-changed",qt),u.value&&e){if(v=Jt,console.log("Updated editFiltersJSON:",v),((Ze=f.value)==null?void 0:Ze.id)===8&&(console.log("FieldPosesion - editFiltersJSON updated:",v),console.log("FieldPosesion - dynamicFilters in JSON:",v.dynamicFilters)),((ct=f.value)==null?void 0:ct.id)===2){console.log("GSCtops - editFiltersJSON updated:",v),console.log("GSCtops - dynamicFilters in JSON:",v.dynamicFilters),console.log("GSCtops - viewToEdit.filterMultiple:",(gt=e.view)==null?void 0:gt.filterMultiple);const Ht=v.dynamicFilters.findIndex(Wt=>Wt.filterType==="select-simple"&&Wt.filterLabel==="Tipo de análisis");Ht!==-1&&(Ct=(Rt=e.view)==null?void 0:Rt.filterMultiple)!=null&&Ct.categoryId&&(v.dynamicFilters[Ht].selectedValue=e.view.filterMultiple.categoryId,console.log("GSCtops - updated editFiltersJSON with filterMultiple.categoryId:",e.view.filterMultiple.categoryId))}if(((tt=f.value)==null?void 0:tt.id)===1){console.log("GSCComparativeReports - editFiltersJSON updated:",v),console.log("GSCComparativeReports - dynamicFilters in JSON:",v.dynamicFilters),console.log("GSCComparativeReports - viewToEdit.filterMultiple:",(st=e.view)==null?void 0:st.filterMultiple);const Ht=v.dynamicFilters.findIndex(Wt=>Wt.filterType==="select-simple"&&Wt.filterLabel==="Tipo de análisis");Ht!==-1&&(lt=(Je=e.view)==null?void 0:Je.filterMultiple)!=null&&lt.category&&(v.dynamicFilters[Ht].selectedValue=e.view.filterMultiple.category,console.log("GSCComparativeReports - updated editFiltersJSON with filterMultiple.category:",e.view.filterMultiple.category))}}if(((Tt=f.value)==null?void 0:Tt.id)===6&&u.value&&(yt=e==null?void 0:e.view)!=null&&yt.filterMultiple&&(console.log("GSCLineupsReports - viewToEdit.filterMultiple:",(It=e.view)==null?void 0:It.filterMultiple),e.view.filterMultiple.gameNumber&&v)){const Ht=v.dynamicFilters.findIndex(Wt=>Wt.filterType==="select-simple"&&Wt.filterLabel==="Número de juego");Ht!==-1&&(Qe=(Lt=e.view)==null?void 0:Lt.filterMultiple)!=null&&Qe.gameNumber&&(v.dynamicFilters[Ht].selectedValue=e.view.filterMultiple.gameNumber,console.log("GSCLineupsReports - updated editFiltersJSON with filterMultiple.gameNumber:",e.view.filterMultiple.gameNumber))}b&&!u.value?(b.setDynamicFilters(m.value),console.log("Updated container with new dynamicFilters:",m.value)):b&&u.value&&console.log("In edit mode, not updating container automatically")}function fe(){e=null,v=null,b=null,i.value=null,c.value=null,_.value="ambos",m.value=[],P.value=!1,z.value=!1,V.value=null,U.value=null,u.value=!1,t.value=!1,w.value=!1}function se(ye){if(ye&&ye.dynamicFilters){if(console.log("Updating filters from container:",ye.dynamicFilters),x.value){console.log("Skipping container update due to user update in progress");return}Array.isArray(ye.dynamicFilters)&&ye.dynamicFilters.length>0&&(y.value=!0,m.value=[...ye.dynamicFilters],h.nextTick(()=>{y.value=!1}))}}function ue(ye){if(console.log("preselectFiltersFromJSON called with:",ye),u.value=!0,ye.mainSelector&&ye.mainSelector.id){const ge=A.value.findIndex(ze=>ze.id===ye.mainSelector.id);ge!==-1&&(i.value=ge,console.log("Selected main index:",ge))}ye.viewSelector&&ye.viewSelector.id&&d.value&&d.value.views.findIndex(ge=>ge.id===ye.viewSelector.id)!==-1&&(c.value=ye.viewSelector.id,console.log("Selected second id:",ye.viewSelector.id)),ye.dynamicFilters&&Array.isArray(ye.dynamicFilters)&&(console.log("Processing dynamic filters:",ye.dynamicFilters),h.nextTick(()=>{setTimeout(()=>{var ge,ze,Ie,Ve,Ge,Ke,ke,Be,Fe,He,rt,nt,pt,vt,ft,Nt,Ft,Dt,at,Ze,ct,gt,Rt,Ct,tt,st,Je,lt,Tt,yt,It;if(console.log("Processing filters after delay"),console.log("selectedSecond.value:",f.value),f.value&&T.value){if(console.log("Filters available:",T.value),y.value){console.log("Skipping preselect due to container update in progress");return}if(x.value=!0,console.log("&666&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&",ye.dynamicFilters),ye.dynamicFilters.forEach((Lt,Qe)=>{var et,wt,zt,Ot,St,Jt,qt,Ht,Wt,Gt,rr,nr,Sr,Ar;if(Qe<T.value.length){const wr=T.value[Qe];if(((et=f.value)==null?void 0:et.id)===3&&u.value&&console.log(`GSCMatchSummary - Processing filter ${Qe} for component ${((wt=e==null?void 0:e.view)==null?void 0:wt.id)||"unknown"}`),wr.type==="check"){const ar=Lt.isChecked;console.log(`Setting check filter ${Qe} to:`,ar),typeof ar=="boolean"?(m.value[Qe]=ar,console.log(`Successfully set check filter ${Qe} to:`,ar)):console.log(`Invalid isChecked value for filter ${Qe}:`,ar)}else if(wr.type==="select"&&Lt.selectedOptions){const ar=Lt.selectedOptions.map(vr=>vr.value);console.log(`Setting select filter ${Qe} to:`,ar),m.value[Qe]=ar,console.log(`Successfully set select filter ${Qe} to:`,ar)}else if(wr.type==="select"&&Lt.selectedValue&&Array.isArray(Lt.selectedValue))if(Lt.selectedValue.length>0&&Lt.selectedValue[0]&&typeof Lt.selectedValue[0]=="object"){const ar=We(Lt.selectedValue);console.log(`Setting Timeline select filter ${Qe} to:`,ar),m.value[Qe]=ar,console.log(`Successfully set Timeline select filter ${Qe} to:`,ar)}else console.log(`Setting select filter ${Qe} to:`,Lt.selectedValue),m.value[Qe]=Lt.selectedValue,console.log(`Successfully set select filter ${Qe} to:`,Lt.selectedValue);else if(wr.type==="radio-button"&&Lt.selectedOption)console.log(`Setting radio filter ${Qe} to:`,Lt.selectedOption.value),m.value[Qe]=Lt.selectedOption.value;else if(wr.type==="select-simple"&&Lt.selectedValue!==void 0){console.log(`Setting select-simple filter ${Qe} to:`,Lt.selectedValue),console.log("select-simple filterData.selectedValue type:",typeof Lt.selectedValue),console.log("select-simple filterData.selectedValue is array:",Array.isArray(Lt.selectedValue));let ar;((zt=f.value)==null?void 0:zt.id)===2&&(St=(Ot=e==null?void 0:e.view)==null?void 0:Ot.filterMultiple)!=null&&St.categoryId?(ar=e.view.filterMultiple.categoryId,console.log("GSCtops - using filterMultiple.categoryId instead of selectedValue:",ar)):((Jt=f.value)==null?void 0:Jt.id)===1&&(Ht=(qt=e==null?void 0:e.view)==null?void 0:qt.filterMultiple)!=null&&Ht.category?(ar=e.view.filterMultiple.category,console.log("GSCComparativeReports - using filterMultiple.category instead of selectedValue:",ar)):((Wt=f.value)==null?void 0:Wt.id)===6&&(rr=(Gt=e==null?void 0:e.view)==null?void 0:Gt.filterMultiple)!=null&&rr.gameNumber?(ar=e.view.filterMultiple.gameNumber,console.log("GSCLineupsReports - using filterMultiple.gameNumber instead of selectedValue:",ar)):((nr=f.value)==null?void 0:nr.id)===9&&(Ar=(Sr=e==null?void 0:e.view)==null?void 0:Sr.filterMultiple)!=null&&Ar.categoryIds?(ar=e.view.filterMultiple.categoryIds,console.log("GSCFieldDataByZones - using filterMultiple.categoryIds instead of selectedValue:",ar)):ar=Array.isArray(Lt.selectedValue)?Lt.selectedValue[0]:Lt.selectedValue,m.value[Qe]=ar,console.log(`Successfully set select-simple filter ${Qe} to:`,ar)}}else console.log(`Filter index ${Qe} out of range`)}),console.log("Final dynamicFilters.value:",m.value),((ge=f.value)==null?void 0:ge.id)===3&&u.value&&console.log("GSCMatchSummary - Final dynamicFilters after processing:",m.value),((ze=f.value)==null?void 0:ze.id)===2&&u.value&&(Ie=e==null?void 0:e.view)!=null&&Ie.filterMultiple){if(console.log("GSCtops - checking filterMultiple after preselecting filters:",e.view.filterMultiple),console.log("GSCtops - currentFilters:",T.value),console.log("GSCtops - dynamicFilters before:",m.value),e.view.filterMultiple.categoryId){console.log("GSCtops - found categoryId in filterMultiple:",e.view.filterMultiple.categoryId);const Lt=T.value.findIndex(Qe=>Qe.type==="select-simple"&&Qe.label==="Tipo de análisis");if(console.log("GSCtops - categoryFilterIndex:",Lt),console.log("GSCtops - all filters:",T.value.map((Qe,et)=>({index:et,type:Qe.type,label:Qe.label}))),Lt!==-1){console.log("GSCtops - found category filter at index:",Lt);const Qe=e.view.filterMultiple.categoryId;if(console.log("GSCtops - setting category filter directly from filterMultiple.categoryId:",Qe),m.value[0]=Qe,e.view.componentProps&&Qe){let wt=`Category ${Qe}`,zt=null;try{zt=Vd(Qe),zt&&(wt=zt.name,console.log("GSCtops - found category info from getCategoryById in preselectFiltersFromJSON:",zt))}catch{console.log("GSCtops - getCategoryById failed in preselectFiltersFromJSON, using filter options");const Ot=T.value.findIndex(St=>St.type==="select-simple"&&St.label==="Tipo de análisis");if(Ot!==-1){const St=(((Ve=T.value[Ot])==null?void 0:Ve.options)||[]).find(Jt=>Jt.value==Qe);St&&(wt=St.label,console.log("GSCtops - found category name from options in preselectFiltersFromJSON:",wt))}}e.view.componentProps.categoryView=[{id:Qe,name:wt}],console.log("GSCtops - updated componentProps.categoryView in preselectFiltersFromJSON:",e.view.componentProps.categoryView)}console.log("GSCtops - automatically set category filter to:",Qe),console.log("GSCtops - categoryId type:",typeof Qe),console.log("GSCtops - updated dynamicFilters:",m.value),console.log("GSCtops - filter options:",(Ge=T.value[Lt])==null?void 0:Ge.options);const et=(((Ke=T.value[Lt])==null?void 0:Ke.options)||[]).find(wt=>wt.value==Qe);console.log("GSCtops - matching option:",et),h.nextTick(()=>{m.value=[...m.value],console.log("GSCtops - forced reactivity update")})}else console.log("GSCtops - category filter not found!")}if(e.view.filterMultiple.teamType!==void 0){console.log("GSCtops - found teamType in filterMultiple:",e.view.filterMultiple.teamType),console.log("MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM ------------------------------------> ",T.value);const Lt=T.value.findIndex(Qe=>Qe.type==="radio-button");if(console.log("GSCtops - teamFilterIndex:",Lt),console.log("GSCtops - all filters:",T.value.map((Qe,et)=>({index:et,type:Qe.type,label:Qe.label}))),Lt!==-1){console.log("GSCtops - found team filter at index:",Lt);const Qe=e.view.filterMultiple.teamType;console.log("GSCtops - setting team filter directly from filterMultiple.teamType:",Qe),m.value[Lt]=Qe,console.log("GSCtops - automatically set team filter to:",Qe),console.log("GSCtops - teamType type:",typeof Qe),console.log("GSCtops - updated dynamicFilters:",m.value),console.log("GSCtops - filter options:",(ke=T.value[Lt])==null?void 0:ke.options);const et=(((Be=T.value[Lt])==null?void 0:Be.options)||[]).find(wt=>wt.value==Qe);console.log("GSCtops - matching option for team:",et),h.nextTick(()=>{m.value=[...m.value],console.log("GSCtops - forced reactivity update for team filter")})}else console.log("GSCtops - team filter not found!")}}if(((Fe=f.value)==null?void 0:Fe.id)===9&&u.value&&(He=e==null?void 0:e.view)!=null&&He.filterMultiple){if(console.log("55555 GSCFieldDataByZones - checking filterMultiple after preselecting filters:",e.view.filterMultiple),console.log("55555 GSCFieldDataByZones - currentFilters:",T.value),console.log(" 55555GSCFieldDataByZones - dynamicFilters before:",m.value),e.view.filterMultiple.categoryIds){console.log("55555 GSCFieldDataByZones - found categoryIds in filterMultiple:",e.view.filterMultiple.categoryIds);const Lt=T.value.findIndex(Qe=>Qe.type==="select-simple");if(console.log("55555 GSCFieldDataByZones - analysisTypeFilterIndex:",Lt),console.log("55555 GSCFieldDataByZones - all filters:",T.value.map((Qe,et)=>({index:et,type:Qe.type,label:Qe.label}))),Lt!==-1){console.log("55555 GSCFieldDataByZones - found analysis type filter at index:",Lt);const Qe=Array.isArray(e.view.filterMultiple.categoryIds)?e.view.filterMultiple.categoryIds:[e.view.filterMultiple.categoryIds];console.log("55555 GSCFieldDataByZones - setting category filter directly from filterMultiple.categoryIds:",Qe),m.value[0]=Qe,console.log("55555 GSCFieldDataByZones - automatically set category filter to:",Qe),console.log("55555 GSCFieldDataByZones - categoryIds type:",typeof Qe),console.log("55555 GSCFieldDataByZones - categoryIds is array:",Array.isArray(Qe)),console.log("55555 GSCFieldDataByZones - updated dynamicFilters:",m.value),console.log("55555 GSCFieldDataByZones - filter options:",(rt=T.value[Lt])==null?void 0:rt.options);const et=((nt=T.value[Lt])==null?void 0:nt.options)||[];console.log("55555 filterOptions :",et);const wt=et.filter(St=>Array.isArray(St.value)?Me(St.value,Qe):Qe.includes(St.value));if(console.log("55555 GSCFieldDataByZones - matching options:",wt),wt.length>0){const St=wt[0];console.log("55555 GSCFieldDataByZones - found matching option:",St);const Jt=St.value;console.log("55555 GSCFieldDataByZones - using option value:",Jt),m.value[Lt]=Jt,console.log("55555 GSCFieldDataByZones - set dynamicFilters["+Lt+"] to option value:",Jt)}else console.log("55555 GSCFieldDataByZones - no matching options found, using categoryIds directly"),m.value[Lt]=Qe;const zt=m.value[Lt],Ot=Me(zt,Qe);console.log("55555 GSCFieldDataByZones - arrays match:",Ot),console.log("55555 GSCFieldDataByZones - current filter value:",zt,"categoryIds:",Qe),h.nextTick(()=>{m.value=[...m.value],console.log("55555 GSCFieldDataByZones - forced reactivity update")})}else console.log("55555 GSCFieldDataByZones - analysis type filter not found!")}if(e.view.filterMultiple.isHomeTeam!==void 0){console.log("444444444 GSCFieldDataByZones - found isHomeTeam in filterMultiple:",e.view.filterMultiple.isHomeTeam);const Lt=T.value.findIndex(Qe=>Qe.type==="radio-button");if(console.log("444444444 GSCFieldDataByZones - teamFilterIndex:",Lt),console.log("444444444 GSCFieldDataByZones - all filters:",T.value.map((Qe,et)=>({index:et,type:Qe.type,label:Qe.label}))),Lt!==-1){console.log("444444444 GSCFieldDataByZones - found team filter at index:",Lt);const Qe=e.view.filterMultiple.isHomeTeam;console.log("444444444 GSCFieldDataByZones - isHomeTeam type:",typeof Qe,"value:",Qe);let et;typeof Qe=="boolean"?(et=Qe?1:2,console.log("444444444 GSCFieldDataByZones - converted boolean isHomeTeam to teamValue:",Qe,"->",et)):typeof Qe=="number"?(et=Qe===1?1:2,console.log("444444444 GSCFieldDataByZones - converted numeric isHomeTeam to teamValue:",Qe,"->",et)):(et=1,console.log("444444444 GSCFieldDataByZones - using default teamValue:",et)),console.log("444444444 GSCFieldDataByZones - setting team filter directly from filterMultiple.isHomeTeam:",Qe,"-> teamValue:",et),m.value[Lt]=et,console.log("444444444 GSCFieldDataByZones - automatically set team filter to:",et),console.log("444444444 GSCFieldDataByZones - teamValue type:",typeof et),console.log("444444444 GSCFieldDataByZones - updated dynamicFilters:",m.value),console.log(" 444444444 GSCFieldDataByZones - filter options:",(pt=T.value[Lt])==null?void 0:pt.options);const wt=(((vt=T.value[Lt])==null?void 0:vt.options)||[]).find(zt=>zt.value==et);console.log("444444444 GSCFieldDataByZones - matching option for team:",wt),h.nextTick(()=>{console.log("4444444 **************************************** dynamicFilters *************",m.value),m.value=[...m.value],console.log(" 444444444GSCFieldDataByZones - forced reactivity update for team filter")})}else console.log(" 444444444GSCFieldDataByZones - team filter not found!")}}if(((ft=f.value)==null?void 0:ft.id)===1&&u.value&&(Nt=e==null?void 0:e.view)!=null&&Nt.filterMultiple&&(console.log("GSCComparativeReports - checking filterMultiple after preselecting filters:",e.view.filterMultiple),console.log("GSCComparativeReports - currentFilters:",T.value),console.log("GSCComparativeReports - dynamicFilters before:",m.value),e.view.filterMultiple.category)){console.log("GSCComparativeReports - found category in filterMultiple:",e.view.filterMultiple.category);const Lt=T.value.findIndex(Qe=>Qe.type==="select-simple"&&Qe.label==="Tipo de análisis");if(console.log("GSCComparativeReports - analysisTypeFilterIndex:",Lt),console.log("GSCComparativeReports - all filters:",T.value.map((Qe,et)=>({index:et,type:Qe.type,label:Qe.label}))),Lt!==-1){console.log("GSCComparativeReports - found analysis type filter at index:",Lt);const Qe=e.view.filterMultiple.category;console.log("GSCComparativeReports - setting analysis type filter directly from filterMultiple.category:",Qe),m.value[0]=Qe,e.view.componentProps&&Qe&&(e.view.componentProps.type=Qe,console.log("GSCComparativeReports - updated componentProps.type:",e.view.componentProps.type)),console.log("GSCComparativeReports - automatically set analysis type filter to:",Qe),console.log("GSCComparativeReports - category type:",typeof Qe),console.log("GSCComparativeReports - updated dynamicFilters:",m.value),console.log("GSCComparativeReports - filter options:",(Ft=T.value[Lt])==null?void 0:Ft.options);const et=(((Dt=T.value[Lt])==null?void 0:Dt.options)||[]).find(wt=>wt.value==Qe);console.log("GSCComparativeReports - matching option:",et),h.nextTick(()=>{m.value=[...m.value],console.log("GSCComparativeReports - forced reactivity update")})}else console.log("GSCComparativeReports - analysis type filter not found!")}if(((at=f.value)==null?void 0:at.id)===6&&u.value&&(Ze=e==null?void 0:e.view)!=null&&Ze.filterMultiple&&(console.log("GSCLineupsReports - checking filterMultiple after preselecting filters:",e.view.filterMultiple),console.log("GSCLineupsReports - currentFilters:",T.value),console.log("GSCLineupsReports - dynamicFilters before:",m.value),e.view.filterMultiple.gameNumber)){console.log("GSCLineupsReports - found gameNumber in filterMultiple:",e.view.filterMultiple.gameNumber);const Lt=T.value.findIndex(Qe=>Qe.type==="select-simple"&&Qe.label==="Número de juego");if(console.log("GSCLineupsReports - gameNumberFilterIndex:",Lt),console.log("GSCLineupsReports - all filters:",T.value.map((Qe,et)=>({index:et,type:Qe.type,label:Qe.label}))),Lt!==-1){console.log("GSCLineupsReports - found game number filter at index:",Lt);const Qe=e.view.filterMultiple.gameNumber;console.log("GSCLineupsReports - setting game number filter directly from filterMultiple.gameNumber:",Qe),m.value[0]=Qe,e.view.componentProps&&Qe&&(e.view.componentProps.gameNumber=Qe,console.log("GSCLineupsReports - updated componentProps.gameNumber:",e.view.componentProps.gameNumber)),console.log("GSCLineupsReports - automatically set game number filter to:",Qe),console.log("GSCLineupsReports - gameNumber type:",typeof Qe),console.log("GSCLineupsReports - updated dynamicFilters:",m.value),console.log("GSCLineupsReports - filter options:",(ct=T.value[Lt])==null?void 0:ct.options);const et=(((gt=T.value[Lt])==null?void 0:gt.options)||[]).find(wt=>wt.value==Qe);console.log("GSCLineupsReports - matching option:",et),h.nextTick(()=>{m.value=[...m.value],console.log("GSCLineupsReports - forced reactivity update")})}else console.log("GSCLineupsReports - game number filter not found!")}if(((Rt=f.value)==null?void 0:Rt.id)===7&&u.value&&e!=null&&e.view){if(console.log("GSCGoalData - checking stored values after preselecting filters:",e.view),console.log("GSCGoalData - currentFilters:",T.value),console.log("GSCGoalData - dynamicFilters before:",m.value),(Ct=e.view.componentProps)!=null&&Ct.analysisType&&T.value.length>0&&((tt=T.value[0])==null?void 0:tt.type)==="radio-button"){const Lt=e.view.componentProps.analysisType,Qe=Lt==="offensive"?1:2;console.log("GSCGoalData - setting analysis type filter from componentProps.analysisType:",Qe,"analysisType:",Lt),m.value[0]=Qe}if(((st=e.view.filterMultiple)==null?void 0:st.isHomeTeam)!==void 0){console.log("GSCGoalData - found isHomeTeam in filterMultiple:",e.view.filterMultiple.isHomeTeam),console.log('GSCGoalData - searching for radio-button filter with label "Equipo"'),console.log("GSCGoalData - all filters details:",T.value.map((Qe,et)=>({index:et,type:Qe.type,label:Qe.label,options:Qe.options})));const Lt=T.value.findIndex(Qe=>Qe.type==="radio-button"&&Qe.label==="Equipo");if(console.log("GSCGoalData - teamFilterIndex:",Lt),console.log("GSCGoalData - all filters:",T.value.map((Qe,et)=>({index:et,type:Qe.type,label:Qe.label}))),Lt!==-1){console.log("GSCGoalData - found team filter at index:",Lt);const Qe=e.view.filterMultiple.isHomeTeam,et=Qe?1:2;console.log("GSCGoalData - setting team filter directly from filterMultiple.isHomeTeam:",et,"isHomeTeam:",Qe),m.value[1]=et}else if(console.log("GSCGoalData - team filter not found by label, trying by index"),T.value.length>1&&((Je=T.value[1])==null?void 0:Je.type)==="radio-button"){console.log("GSCGoalData - found radio-button filter at index 1 by fallback");const Qe=e.view.filterMultiple.isHomeTeam,et=Qe?1:2;console.log("GSCGoalData - setting team filter by fallback:",et,"isHomeTeam:",Qe),m.value[1]=et,e.view.componentProps&&(e.view.componentProps.isHomeTeamForAnalysis=Qe,console.log("GSCGoalData - updated componentProps.isHomeTeamForAnalysis:",e.view.componentProps.isHomeTeamForAnalysis)),console.log("GSCGoalData - automatically set team filter to:",et),console.log("GSCGoalData - teamValue type:",typeof et),console.log("GSCGoalData - updated dynamicFilters:",m.value),console.log("GSCGoalData - filter options:",(lt=T.value[1])==null?void 0:lt.options);const wt=(((Tt=T.value[1])==null?void 0:Tt.options)||[]).find(zt=>zt.value==et);console.log("GSCGoalData - matching option:",wt),h.nextTick(()=>{m.value=[...m.value],console.log("GSCGoalData - forced reactivity update")})}else console.log("GSCGoalData - no radio-button filter found at index 1 either");if(Lt!==-1&&e.view.componentProps){const Qe=e.view.filterMultiple.isHomeTeam,et=Qe?1:2;e.view.componentProps.isHomeTeamForAnalysis=Qe,console.log("GSCGoalData - updated componentProps.isHomeTeamForAnalysis:",e.view.componentProps.isHomeTeamForAnalysis),console.log("GSCGoalData - automatically set team filter to:",et),console.log("GSCGoalData - teamValue type:",typeof et),console.log("GSCGoalData - updated dynamicFilters:",m.value),console.log("GSCGoalData - filter options:",(yt=T.value[Lt])==null?void 0:yt.options);const wt=(((It=T.value[Lt])==null?void 0:It.options)||[]).find(zt=>zt.value==et);console.log("GSCGoalData - matching option:",wt),h.nextTick(()=>{m.value=[...m.value],console.log("GSCGoalData - forced reactivity update")})}}else console.log("GSCGoalData - isHomeTeam is undefined in filterMultiple")}h.nextTick(()=>{x.value=!1})}},100)}))}function de(){var ye,ge,ze,Ie,Ve,Ge,Ke,ke,Be,Fe;return{mainSelector:{id:((ye=d.value)==null?void 0:ye.id)||null,name:((ge=d.value)==null?void 0:ge.name)||null,url:((ze=d.value)==null?void 0:ze.url)||null},viewSelector:{id:((Ie=f.value)==null?void 0:Ie.id)||null,name:((Ve=f.value)==null?void 0:Ve.name)||((Ge=f.value)==null?void 0:Ge.title)||null,url:((Ke=f.value)==null?void 0:Ke.url)||null},team:_.value,dynamicFilters:((ke=T.value)==null?void 0:ke.map((He,rt)=>{var nt,pt;const vt=m.value[rt];return{filterId:He.id||`filter_${rt}`,filterType:He.type,filterLabel:He.label,filterIcon:He.icon||null,selectedValue:vt,selectedOptions:He.type==="select"&&Array.isArray(vt)&&vt.length>0?vt.map(ft=>{var Nt;const Ft=(Nt=He.options)==null?void 0:Nt.find(Dt=>Dt.value===ft);return{value:ft,label:(Ft==null?void 0:Ft.label)||ft,icon:(Ft==null?void 0:Ft.icon)||null}}):null,selectedOption:He.type==="radio-button"&&vt?{value:vt,label:((pt=(nt=He.options)==null?void 0:nt.find(ft=>ft.value===vt))==null?void 0:pt.label)||vt}:null,isChecked:He.type==="check"?vt:null}}))||[],timestamp:new Date().toISOString(),summary:{mainSelected:!!d.value,viewSelected:!!f.value,totalDynamicFilters:((Be=T.value)==null?void 0:Be.length)||0,activeFilters:((Fe=T.value)==null?void 0:Fe.filter((He,rt)=>{const nt=m.value[rt];return Array.isArray(nt)?nt.length>0:nt!=null&&nt!==!1}).length)||0}}}a({getCurrentFiltersJSON:de});function me(){fe(),X("close")}function _e(){t.value=!1,me()}function be(){w.value&&(xi.emit("filters-cancelled",b),w.value=!1),t.value=!1,me()}h.onMounted(async()=>{document.addEventListener("click",oe),h.nextTick(()=>{Se()});try{const ye=await(await fetch("https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/views",{headers:{Authorization:`${D.token}`}})).json();A.value=ye.data||[]}catch(ye){console.error("Error al obtener datos:",ye)}});function Se(){document.querySelectorAll(".field-menu .option-card").forEach(ye=>{const ge=ye.querySelector(".option-img");if(!ge||!ge.dataset.hoverSrc)return;const ze=ge.src,Ie=ge.dataset.hoverSrc;ye.addEventListener("mouseenter",()=>{ge.src=Ie}),ye.addEventListener("mouseleave",()=>{ge.src=ze})})}h.onUnmounted(()=>{document.removeEventListener("click",oe)}),xi.on("set-filter-and-views-container",ye=>{b=ye,ye&&se(ye)}),xi.on("view-added",()=>{console.log("View ************************************************************* add"),t.value=!0,w.value=!0}),xi.on("component-added-to-container",ye=>{console.log("Component added to container, updating filters, container:",ye),!u.value||b&&ye.id===b.id?se(ye):console.log("Skipping container update - edit mode or different container")}),xi.on("edit-view",ye=>{var ge,ze,Ie,Ve,Ge,Ke,ke,Be,Fe,He,rt,nt,pt,vt,ft,Nt;console.log("edit-view received:",ye),e=ye,b=((ge=ye.view)==null?void 0:ge.filterAndViewsContainer)||null,v=null;const Ft=[(Ie=(ze=ye.view)==null?void 0:ze.coreView)==null?void 0:Ie.filtersJSON,(Ve=ye.view)==null?void 0:Ve.filtersJSON,(Ge=ye.coreView)==null?void 0:Ge.filtersJSON,ye.filtersJSON,(ke=(Ke=ye.view)==null?void 0:Ke.componentProps)==null?void 0:ke.filtersJSON];for(const Dt of Ft)if(Dt){v=Dt,console.log("Found editFiltersJSON in:",Dt);break}if(b&&(b.viewId===4||b.viewId===8||b.viewId===3||b.viewId===1||b.viewId===2)&&(Be=ye.view)!=null&&Be.id){const Dt=b.getComponentDynamicFilters(ye.view.id);if(Dt){let at="Unknown";b.viewId===4?at="Timeline":b.viewId===8?at="FieldPosesion":b.viewId===3?at="GSCMatchSummary":b.viewId===1?at="GSCComparativeReports":b.viewId===2&&(at="GscTopPlayer"),console.log(`${at} - found component specific filters:`,Dt),v&&(v={...v,dynamicFilters:Dt.map((Ze,ct)=>Array.isArray(Ze)?{selectedValue:Ze,selectedOptions:Ze.map(gt=>({value:gt,label:gt}))}:typeof Ze=="boolean"?{isChecked:Ze}:at==="GSCComparativeReports"&&ct===0?{selectedValue:Ze,selectedOptions:[{value:Ze,label:Ze}]}:at==="GscTopPlayer"&&ct===0?{selectedValue:Ze,selectedOptions:[{value:Ze,label:Ze}]}:at==="GscTopPlayer"&&ct===1?{selectedOption:{value:Ze,label:Ze}}:{selectedOption:{value:Ze,label:Ze}})},console.log(`${at} - updated editFiltersJSON with component specific filters:`,v))}}if(b&&b.viewId===2&&(Fe=ye.view)!=null&&Fe.filterMultiple){if(console.log("2222************************************************************",e.view.filterMultiple),console.log("GSCtops detected - checking filterMultiple:",ye.view.filterMultiple),ye.view.filterMultiple.categoryId&&v){console.log("GSCtops - found categoryId in filterMultiple:",ye.view.filterMultiple.categoryId);const Dt=v.dynamicFilters.findIndex(at=>at.filterType==="select-simple"&&at.filterLabel==="Tipo de análisis");Dt!==-1&&(console.log("GSCtops - found category filter at index:",Dt),v.dynamicFilters[Dt]={...v.dynamicFilters[Dt],selectedValue:ye.view.filterMultiple.categoryId,selectedOptions:[{value:ye.view.filterMultiple.categoryId,label:`Category ${ye.view.filterMultiple.categoryId}`}]},console.log("GSCtops - updated filter with single value:",ye.view.filterMultiple.categoryId),console.log("GSCtops - updated filter structure:",v.dynamicFilters[Dt]),console.log("GSCtops - updated category filter with filterMultiple.categoryId:",ye.view.filterMultiple.categoryId))}if(ye.view.filterMultiple.teamType!==void 0&&v){console.log("GSCtops - found teamType in filterMultiple:",ye.view.filterMultiple.teamType);const Dt=v.dynamicFilters.findIndex(at=>at.filterType==="radio-button");if(Dt!==-1){console.log("GSCtops - found team filter at index:",Dt);const at=ye.view.filterMultiple.teamType,Ze=at===1?"Mi equipo":at===2?"Rival":at===3?"Ambos":"Equipo";v.dynamicFilters[Dt]={...v.dynamicFilters[Dt],selectedOption:{value:at,label:Ze}},console.log("GSCtops - updated team filter with teamType:",at,"label:",Ze),console.log("GSCtops - updated team filter structure:",v.dynamicFilters[Dt]),console.log("GSCtops - updated team filter with filterMultiple.teamType:",ye.view.filterMultiple.teamType)}}}if(b&&b.viewId===1&&(He=ye.view)!=null&&He.filterMultiple&&(console.log("GSCComparativeReports detected - checking filterMultiple:",ye.view.filterMultiple),ye.view.filterMultiple.category&&v)){console.log("GSCComparativeReports - found category in filterMultiple:",ye.view.filterMultiple.category);const Dt=v.dynamicFilters.findIndex(at=>at.filterType==="select-simple"&&at.filterLabel==="Tipo de análisis");Dt!==-1&&(console.log("GSCComparativeReports - found analysis type filter at index:",Dt),v.dynamicFilters[Dt]={...v.dynamicFilters[Dt],selectedValue:ye.view.filterMultiple.category,selectedOptions:[{value:ye.view.filterMultiple.category,label:ye.view.filterMultiple.category}]},console.log("GSCComparativeReports - updated filter with single value:",ye.view.filterMultiple.category),console.log("GSCComparativeReports - updated filter structure:",v.dynamicFilters[Dt]),console.log("GSCComparativeReports - updated analysis type filter with filterMultiple.category:",ye.view.filterMultiple.category))}if(b&&b.viewId===9&&(rt=ye.view)!=null&&rt.filterMultiple){if(console.log("GSCFieldDataByZones detected - checking filterMultiple:",ye.view.filterMultiple),ye.view.filterMultiple.categoryIds&&v){console.log("GSCFieldDataByZones - found categoryIds in filterMultiple:",ye.view.filterMultiple.categoryIds);const Dt=v.dynamicFilters.findIndex(at=>at.filterType==="select"&&at.filterLabel==="Tipo de análisis");if(Dt!==-1){console.log("GSCFieldDataByZones - found analysis type filter at index:",Dt);const at=Array.isArray(ye.view.filterMultiple.categoryIds)?ye.view.filterMultiple.categoryIds:[ye.view.filterMultiple.categoryIds];console.log("GSCFieldDataByZones - processing categoryIds array:",at),v.dynamicFilters[Dt]={...v.dynamicFilters[Dt],selectedValue:at,selectedOptions:at.map(Rt=>({value:Rt,label:`Category ${Rt}`}))},console.log("GSCFieldDataByZones - updated filter with categoryIds:",at),console.log("GSCFieldDataByZones - updated filter structure:",v.dynamicFilters[Dt]);const Ze=ye.view.filterMultiple.categoryIds,ct=Me(Ze,at);console.log("GSCFieldDataByZones - category arrays match with original:",ct),console.log("GSCFieldDataByZones - original categoryIds:",Ze,"processed categoryIds:",at);const gt=(((nt=T.value[Dt])==null?void 0:nt.options)||[]).filter(Rt=>Array.isArray(Rt.value)?Me(Rt.value,at):at.includes(Rt.value));if(console.log("GSCFieldDataByZones - matching options in editFiltersJSON:",gt),gt.length>0){const Rt=gt[0];console.log("GSCFieldDataByZones - found matching option in editFiltersJSON:",Rt),v.dynamicFilters[Dt]={...v.dynamicFilters[Dt],selectedValue:Rt.value,selectedOptions:[Rt]},console.log("GSCFieldDataByZones - updated editFiltersJSON with matching option value:",Rt.value)}console.log("GSCFieldDataByZones - updated analysis type filter with filterMultiple.categoryIds:",at)}}if(ye.view.filterMultiple.isHomeTeam!==void 0&&v){console.log("GSCFieldDataByZones - found isHomeTeam in filterMultiple:",ye.view.filterMultiple.isHomeTeam),console.log("GSCFieldDataByZones - isHomeTeam type:",typeof ye.view.filterMultiple.isHomeTeam);const Dt=v.dynamicFilters.findIndex(at=>at.filterType==="radio-button");if(Dt!==-1){console.log("GSCFieldDataByZones - found team filter at index:",Dt);const at=ye.view.filterMultiple.isHomeTeam;let Ze,ct;typeof at=="boolean"?(Ze=at?1:2,ct=at?"Mi equipo":"Rival",console.log("GSCFieldDataByZones - converted boolean isHomeTeam to teamValue:",at,"->",Ze,"label:",ct)):typeof at=="number"?(Ze=at===1?1:2,ct=at===1?"Mi equipo":"Rival",console.log("GSCFieldDataByZones - converted numeric isHomeTeam to teamValue:",at,"->",Ze,"label:",ct)):(Ze=1,ct="Mi equipo",console.log("GSCFieldDataByZones - using default teamValue:",Ze,"label:",ct)),v.dynamicFilters[Dt]={...v.dynamicFilters[Dt],selectedOption:{value:Ze,label:ct}},console.log("GSCFieldDataByZones - updated team filter with isHomeTeam:",at,"teamValue:",Ze,"teamLabel:",ct),console.log("GSCFieldDataByZones - updated team filter structure:",v.dynamicFilters[Dt]),console.log("GSCFieldDataByZones - updated team filter with filterMultiple.isHomeTeam:",ye.view.filterMultiple.isHomeTeam)}}}if(b&&b.viewId===6&&(pt=ye.view)!=null&&pt.filterMultiple&&(console.log("GSCLineupsReports detected - checking filterMultiple:",ye.view.filterMultiple),ye.view.filterMultiple.gameNumber&&v)){console.log("GSCLineupsReports - found gameNumber in filterMultiple:",ye.view.filterMultiple.gameNumber);const Dt=v.dynamicFilters.findIndex(at=>at.filterType==="select-simple"&&at.filterLabel==="Número de juego");Dt!==-1&&(console.log("GSCLineupsReports - found game number filter at index:",Dt),v.dynamicFilters[Dt]={...v.dynamicFilters[Dt],selectedValue:ye.view.filterMultiple.gameNumber,selectedOptions:[{value:ye.view.filterMultiple.gameNumber,label:`Juego ${ye.view.filterMultiple.gameNumber}`}]},console.log("GSCLineupsReports - updated filter with single value:",ye.view.filterMultiple.gameNumber),console.log("GSCLineupsReports - updated filter structure:",v.dynamicFilters[Dt]),console.log("GSCLineupsReports - updated game number filter with filterMultiple.gameNumber:",ye.view.filterMultiple.gameNumber))}if(b&&b.viewId===7&&ye.view&&v){if(console.log("GSCGoalData detected - checking stored values:",ye.view),(vt=ye.view.componentProps)!=null&&vt.analysisType){console.log("GSCGoalData - found analysisType in componentProps:",ye.view.componentProps.analysisType);const Dt=v.dynamicFilters.findIndex((at,Ze)=>at.filterType==="radio-button"&&Ze===0);if(Dt!==-1){console.log("GSCGoalData - found analysis type filter at index:",Dt);const at=ye.view.componentProps.analysisType,Ze=at==="offensive"?1:2,ct=at==="offensive"?"A favor":"En contra";v.dynamicFilters[Dt]={...v.dynamicFilters[Dt],selectedOption:{value:Ze,label:ct}},console.log("GSCGoalData - updated analysis filter with value:",Ze,"analysisType:",at),console.log("GSCGoalData - updated analysis filter structure:",v.dynamicFilters[Dt])}}if(((ft=ye.view.filterMultiple)==null?void 0:ft.isHomeTeam)!==void 0){console.log("GSCGoalData - found isHomeTeam in filterMultiple:",ye.view.filterMultiple.isHomeTeam);const Dt=v.dynamicFilters.findIndex(at=>at.filterType==="radio-button"&&at.filterLabel==="Equipo");if(Dt!==-1){console.log("GSCGoalData - found team filter at index:",Dt);const at=ye.view.filterMultiple.isHomeTeam,Ze=at?1:2,ct=at?"Equipo propio":"Equipo rival";v.dynamicFilters[Dt]={...v.dynamicFilters[Dt],selectedOption:{value:Ze,label:ct}},console.log("GSCGoalData - updated filter with team value:",Ze,"isHomeTeam:",at),console.log("GSCGoalData - updated filter structure:",v.dynamicFilters[Dt]),console.log("GSCGoalData - updated team filter with filterMultiple.isHomeTeam:",at)}}}if(b&&b.viewId===5&&(Nt=ye.view)!=null&&Nt.filterMultiple&&(console.log("GSCVolumetricField detected - checking filterMultiple:",ye.view.filterMultiple),ye.view.filterMultiple.isHomeTeam!==void 0&&v)){console.log("GSCVolumetricField - found isHomeTeam in filterMultiple:",ye.view.filterMultiple.isHomeTeam),console.log("GSCVolumetricField - editFiltersJSON.dynamicFilters:",v.dynamicFilters),console.log("GSCVolumetricField - searching for team filter in editFiltersJSON");const Dt=v.dynamicFilters.findIndex(at=>at.filterType==="radio-button"&&at.filterLabel==="Equipo");if(console.log("GSCVolumetricField - teamFilterIndex:",Dt),console.log("GSCVolumetricField - all filters in editFiltersJSON:",v.dynamicFilters.map((at,Ze)=>({index:Ze,filterType:at.filterType,filterLabel:at.filterLabel}))),Dt!==-1){console.log("GSCVolumetricField - found team filter at index:",Dt);const at=ye.view.filterMultiple.isHomeTeam;console.log("GSCVolumetricField - isHomeTeam type in editFiltersJSON:",typeof at,"value:",at);let Ze,ct;typeof at=="boolean"?(Ze=at?1:2,ct=at?"Equipo propio":"Equipo rival",console.log("GSCVolumetricField - isHomeTeam is boolean in editFiltersJSON, converting:",at,"-> teamValue:",Ze,"teamLabel:",ct)):typeof at=="number"?(Ze=at===1?1:2,ct=at===1?"Equipo propio":"Equipo rival",console.log("GSCVolumetricField - isHomeTeam is number in editFiltersJSON, using directly:",at,"-> teamValue:",Ze,"teamLabel:",ct)):(Ze=1,ct="Equipo propio",console.log("GSCVolumetricField - isHomeTeam is unknown type in editFiltersJSON, using default:",Ze,"teamLabel:",ct)),v.dynamicFilters[Dt]={...v.dynamicFilters[Dt],selectedOption:{value:Ze,label:ct}},console.log("GSCVolumetricField - updated filter with team value:",Ze,"isHomeTeam:",at),console.log("GSCVolumetricField - updated filter structure:",v.dynamicFilters[Dt]),console.log("GSCVolumetricField - updated team filter with filterMultiple.isHomeTeam:",at)}else{console.log("GSCVolumetricField - team filter not found in editFiltersJSON, trying fallback");const at=v.dynamicFilters.findIndex(Ze=>Ze.filterType==="radio-button");if(at!==-1){console.log("GSCVolumetricField - found radio-button filter at index:",at);const Ze=ye.view.filterMultiple.isHomeTeam;console.log("GSCVolumetricField - isHomeTeam type in editFiltersJSON fallback:",typeof Ze,"value:",Ze);let ct,gt;typeof Ze=="boolean"?(ct=Ze?1:2,gt=Ze?"Equipo propio":"Equipo rival",console.log("GSCVolumetricField - isHomeTeam is boolean in editFiltersJSON fallback, converting:",Ze,"-> teamValue:",ct,"teamLabel:",gt)):typeof Ze=="number"?(ct=Ze===1?1:2,gt=Ze===1?"Equipo propio":"Equipo rival",console.log("GSCVolumetricField - isHomeTeam is number in editFiltersJSON fallback, using directly:",Ze,"-> teamValue:",ct,"teamLabel:",gt)):(ct=1,gt="Equipo propio",console.log("GSCVolumetricField - isHomeTeam is unknown type in editFiltersJSON fallback, using default:",ct,"teamLabel:",gt)),v.dynamicFilters[at]={...v.dynamicFilters[at],selectedOption:{value:ct,label:gt}},console.log("GSCVolumetricField - updated filter with team value (fallback):",ct,"isHomeTeam:",Ze),console.log("GSCVolumetricField - updated filter structure (fallback):",v.dynamicFilters[at])}else console.log("GSCVolumetricField - no radio-button filters found in editFiltersJSON at all!")}}console.log("Final editFiltersJSON:",v),v?ue(v):console.log("No editFiltersJSON found, cannot preselect filters"),t.value=!0});function Ae(){V.value=null}function Te(ye,ge){var ze;((ze=f.value)==null?void 0:ze.id)===2&&console.log("GSCtops - debugSelectSimple:",{idx:ye,optionValue:ge,optionValueType:typeof ge,dynamicFiltersValue:m.value[ye],dynamicFiltersValueType:typeof m.value[ye],isEqual:m.value[ye]===ge,isEqualLoose:m.value[ye]==ge})}function Me(ye,ge){if(!Array.isArray(ye)||!Array.isArray(ge)||ye.length!==ge.length)return!1;const ze=[...ye].sort((Ve,Ge)=>Ve-Ge),Ie=[...ge].sort((Ve,Ge)=>Ve-Ge);return JSON.stringify(ze)===JSON.stringify(Ie)}function Le(){var ye;if(u.value&&v&&v.dynamicFilters){if(console.log("Forcing checkbox and select filter update from editFiltersJSON"),((ye=f.value)==null?void 0:ye.id)===8&&(console.log("FieldPosesion - forceCheckboxUpdate called"),console.log("FieldPosesion - viewToEdit:",e),console.log("FieldPosesion - editFiltersJSON:",v)),p.value){console.log("Skipping forceCheckboxUpdate - already in force update");return}if(y.value)return;p.value=!0,x.value=!0,v.dynamicFilters.forEach((ge,ze)=>{var Ie,Ve,Ge;if(ge&&(Ie=T.value)!=null&&Ie[ze]){const Ke=T.value[ze];if(Ke.type==="check"&&ge.isChecked!==void 0)console.log(`Forcing checkbox ${ze} to:`,ge.isChecked),m.value[ze]=ge.isChecked,((Ve=f.value)==null?void 0:Ve.id)===8&&console.log("FieldPosesion - Checkbox filter updated:",{index:ze,value:ge.isChecked,componentId:(Ge=e==null?void 0:e.view)==null?void 0:Ge.id});else if(Ke.type==="select"&&ge.selectedOptions){const ke=ge.selectedOptions.map(Be=>Be.value);console.log(`Forcing select filter ${ze} to:`,ke),m.value[ze]=ke}else Ke.type==="select"&&ge.selectedValue&&Array.isArray(ge.selectedValue)&&(console.log(`Forcing select filter ${ze} to:`,ge.selectedValue),m.value[ze]=ge.selectedValue)}}),h.nextTick(()=>{x.value=!1,p.value=!1})}}function Pe(){var ye;if(u.value&&v&&v.dynamicFilters&&((ye=f.value)==null?void 0:ye.id)===4){if(console.log("Preselecting Timeline filters specifically"),p.value){console.log("Skipping preselectTimelineFilters - already in force update");return}if(y.value)return;p.value=!0,x.value=!0,v.dynamicFilters.forEach((ge,ze)=>{var Ie,Ve;if(ge&&((Ve=(Ie=T.value)==null?void 0:Ie[ze])==null?void 0:Ve.type)==="select"){if(ge.selectedOptions){const Ge=ge.selectedOptions.map(Ke=>Ke.value);console.log(`Preselecting Timeline select filter ${ze} to:`,Ge),m.value[ze]=Ge}else if(ge.selectedValue&&Array.isArray(ge.selectedValue))if(ge.selectedValue.length>0&&ge.selectedValue[0]&&typeof ge.selectedValue[0]=="object"){const Ge=We(ge.selectedValue);console.log(`Preselecting Timeline select filter ${ze} to:`,Ge),m.value[ze]=Ge}else console.log(`Preselecting Timeline select filter ${ze} to:`,ge.selectedValue),m.value[ze]=ge.selectedValue}}),setTimeout(()=>{console.log("Forcing UI update after preselecting Timeline filters"),m.value=[...m.value]},200),h.nextTick(()=>{x.value=!1,p.value=!1})}}function We(ye){return!Array.isArray(ye)||ye.length===0?[]:ye.map(ge=>{if(ge&&typeof ge=="object"){if(ge.event_type_id&&ge.category_id)return`${ge.category_id}-${ge.event_type_id}`;if(ge.event_type_id)return ge.event_type_id.toString();if(ge.category_id)return ge.category_id.toString()}return ge})}function Re(){var ye,ge,ze,Ie,Ve,Ge,Ke,ke,Be,Fe,He,rt,nt,pt;if(u.value&&v&&v.dynamicFilters&&T.value){if(console.log("Force updating select filters immediately"),p.value){console.log("Skipping forceSelectFilterUpdate - already in force update");return}if(y.value)return;if(p.value=!0,x.value=!0,v.dynamicFilters.forEach((vt,ft)=>{var Nt,Ft,Dt,at,Ze,ct,gt,Rt,Ct,tt,st;if(vt&&((Nt=T.value[ft])==null?void 0:Nt.type)==="select"){if(vt.selectedOptions){const Je=vt.selectedOptions.map(lt=>lt.value);console.log(`Force setting select filter ${ft} to:`,Je),m.value[ft]=Je}else if(vt.selectedValue&&Array.isArray(vt.selectedValue))if(vt.selectedValue.length>0&&vt.selectedValue[0]&&typeof vt.selectedValue[0]=="object"){const Je=We(vt.selectedValue);console.log(`Force setting Timeline select filter ${ft} to:`,Je),m.value[ft]=Je}else console.log(`Force setting select filter ${ft} to:`,vt.selectedValue),m.value[ft]=vt.selectedValue}else if(vt&&((Ft=T.value[ft])==null?void 0:Ft.type)==="select-simple"&&vt.selectedValue!==void 0){console.log(`Force setting select-simple filter ${ft} to:`,vt.selectedValue),console.log("forceSelectFilterUpdate - selectedValue type:",typeof vt.selectedValue),console.log("forceSelectFilterUpdate - selectedValue is array:",Array.isArray(vt.selectedValue));let Je;((Dt=f.value)==null?void 0:Dt.id)===2&&(Ze=(at=e==null?void 0:e.view)==null?void 0:at.filterMultiple)!=null&&Ze.categoryId?(Je=e.view.filterMultiple.categoryId,console.log("GSCtops - using filterMultiple.categoryId in forceSelectFilterUpdate:",Je)):((ct=f.value)==null?void 0:ct.id)===1&&(Rt=(gt=e==null?void 0:e.view)==null?void 0:gt.filterMultiple)!=null&&Rt.category?(Je=e.view.filterMultiple.category,console.log("GSCComparativeReports - using filterMultiple.category in forceSelectFilterUpdate:",Je)):((Ct=f.value)==null?void 0:Ct.id)===6&&(st=(tt=e==null?void 0:e.view)==null?void 0:tt.filterMultiple)!=null&&st.gameNumber?(Je=e.view.filterMultiple.gameNumber,console.log("GSCLineupsReports - using filterMultiple.gameNumber in forceSelectFilterUpdate:",Je)):Je=Array.isArray(vt.selectedValue)?vt.selectedValue[0]:vt.selectedValue,m.value[ft]=Je,console.log(`Force setting select-simple filter ${ft} to:`,Je)}}),((ye=f.value)==null?void 0:ye.id)===4&&setTimeout(()=>{console.log("Forcing UI update for Timeline filters"),m.value=[...m.value]},100),((ge=f.value)==null?void 0:ge.id)===2&&(ze=e==null?void 0:e.view)!=null&&ze.filterMultiple){if(console.log("GSCtops - checking filterMultiple in forceSelectFilterUpdate:",e.view.filterMultiple),console.log("GSCtops - currentFilters in forceSelectFilterUpdate:",T.value),e.view.filterMultiple.categoryId){console.log("GSCtops - found categoryId in filterMultiple:",e.view.filterMultiple.categoryId);const vt=T.value.findIndex(ft=>ft.type==="select-simple"&&ft.label==="Tipo de análisis");if(console.log("GSCtops - categoryFilterIndex in forceSelectFilterUpdate:",vt),console.log("GSCtops - all filters in forceSelectFilterUpdate:",T.value.map((ft,Nt)=>({index:Nt,type:ft.type,label:ft.label}))),vt!==-1){console.log("GSCtops - found category filter at index:",vt);const ft=e.view.filterMultiple.categoryId;if(console.log("GSCtops - setting category filter directly from filterMultiple.categoryId in forceSelectFilterUpdate:",ft),m.value[0]=ft,e.view.componentProps&&ft){let Ft=`Category ${ft}`,Dt=null;try{Dt=Vd(ft),Dt&&(Ft=Dt.name,console.log("GSCtops - found category info from getCategoryById in forceSelectFilterUpdate:",Dt))}catch{console.log("GSCtops - getCategoryById failed in forceSelectFilterUpdate, using filter options");const at=T.value.findIndex(Ze=>Ze.type==="select-simple"&&Ze.label==="Tipo de análisis");if(at!==-1){const Ze=(((Ie=T.value[at])==null?void 0:Ie.options)||[]).find(ct=>ct.value==ft);Ze&&(Ft=Ze.label,console.log("GSCtops - found category name from options in forceSelectFilterUpdate:",Ft))}}e.view.componentProps.categoryView=[{id:ft,name:Ft}],console.log("GSCtops - updated componentProps.categoryView in forceSelectFilterUpdate:",e.view.componentProps.categoryView)}console.log("GSCtops - automatically set category filter to:",ft),console.log("GSCtops - categoryId type:",typeof ft),console.log("GSCtops - updated dynamicFilters:",m.value),console.log("GSCtops - filter options:",(Ve=T.value[vt])==null?void 0:Ve.options);const Nt=(((Ge=T.value[vt])==null?void 0:Ge.options)||[]).find(Ft=>Ft.value==ft);console.log("GSCtops - matching option:",Nt),h.nextTick(()=>{m.value=[...m.value],console.log("GSCtops - forced reactivity update in forceSelectFilterUpdate")})}else console.log("GSCtops - category filter not found in forceSelectFilterUpdate!")}if(e.view.filterMultiple.teamType!==void 0){console.log("GSCtops - found teamType in filterMultiple in forceSelectFilterUpdate:",e.view.filterMultiple.teamType);const vt=T.value.findIndex(ft=>ft.type==="radio-button");if(console.log("GSCtops - teamFilterIndex in forceSelectFilterUpdate:",vt),console.log("GSCtops - all filters in forceSelectFilterUpdate:",T.value.map((ft,Nt)=>({index:Nt,type:ft.type,label:ft.label}))),vt!==-1){console.log("GSCtops - found team filter at index in forceSelectFilterUpdate:",vt);const ft=e.view.filterMultiple.teamType;console.log("GSCtops - setting team filter directly from filterMultiple.teamType in forceSelectFilterUpdate:",ft),m.value[vt]=ft,console.log("GSCtops - automatically set team filter to in forceSelectFilterUpdate:",ft),console.log("GSCtops - teamType type in forceSelectFilterUpdate:",typeof ft),console.log("GSCtops - updated dynamicFilters in forceSelectFilterUpdate:",m.value),console.log("GSCtops - filter options in forceSelectFilterUpdate:",(Ke=T.value[vt])==null?void 0:Ke.options);const Nt=(((ke=T.value[vt])==null?void 0:ke.options)||[]).find(Ft=>Ft.value==ft);console.log("GSCtops - matching option for team in forceSelectFilterUpdate:",Nt),h.nextTick(()=>{m.value=[...m.value],console.log("GSCtops - forced reactivity update for team filter in forceSelectFilterUpdate")})}else console.log("GSCtops - team filter not found in forceSelectFilterUpdate!")}}if(((Be=f.value)==null?void 0:Be.id)===1&&(Fe=e==null?void 0:e.view)!=null&&Fe.filterMultiple&&(console.log("GSCComparativeReports - checking filterMultiple in forceSelectFilterUpdate:",e.view.filterMultiple),console.log("GSCComparativeReports - currentFilters in forceSelectFilterUpdate:",T.value),e.view.filterMultiple.category)){console.log("GSCComparativeReports - found category in filterMultiple:",e.view.filterMultiple.category);const vt=T.value.findIndex(ft=>ft.type==="select-simple"&&ft.label==="Tipo de análisis");if(console.log("GSCComparativeReports - analysisTypeFilterIndex in forceSelectFilterUpdate:",vt),console.log("GSCComparativeReports - all filters in forceSelectFilterUpdate:",T.value.map((ft,Nt)=>({index:Nt,type:ft.type,label:ft.label}))),vt!==-1){console.log("GSCComparativeReports - found analysis type filter at index:",vt);const ft=e.view.filterMultiple.category;console.log("GSCComparativeReports - setting analysis type filter directly from filterMultiple.category in forceSelectFilterUpdate:",ft),m.value[0]=ft,e.view.componentProps&&ft&&(e.view.componentProps.type=ft,console.log("GSCComparativeReports - updated componentProps.type in forceSelectFilterUpdate:",e.view.componentProps.type)),h.nextTick(()=>{m.value=[...m.value],console.log("GSCComparativeReports - forced reactivity update in forceSelectFilterUpdate")})}else console.log("GSCComparativeReports - analysis type filter not found in forceSelectFilterUpdate!")}if(((He=f.value)==null?void 0:He.id)===6&&(rt=e==null?void 0:e.view)!=null&&rt.filterMultiple&&(console.log("GSCLineupsReports - checking filterMultiple in forceSelectFilterUpdate:",e.view.filterMultiple),console.log("GSCLineupsReports - currentFilters in forceSelectFilterUpdate:",T.value),e.view.filterMultiple.gameNumber)){console.log("GSCLineupsReports - found gameNumber in filterMultiple:",e.view.filterMultiple.gameNumber);const vt=T.value.findIndex(ft=>ft.type==="select-simple"&&ft.label==="Número de juego");if(console.log("GSCLineupsReports - gameNumberFilterIndex in forceSelectFilterUpdate:",vt),console.log("GSCLineupsReports - all filters in forceSelectFilterUpdate:",T.value.map((ft,Nt)=>({index:Nt,type:ft.type,label:ft.label}))),vt!==-1){console.log("GSCLineupsReports - found game number filter at index:",vt);const ft=e.view.filterMultiple.gameNumber;console.log("GSCLineupsReports - setting game number filter directly from filterMultiple.gameNumber in forceSelectFilterUpdate:",ft),m.value[0]=ft,e.view.componentProps&&ft&&(e.view.componentProps.gameNumber=ft,console.log("GSCLineupsReports - updated componentProps.gameNumber in forceSelectFilterUpdate:",e.view.componentProps.gameNumber)),h.nextTick(()=>{m.value=[...m.value],console.log("GSCLineupsReports - forced reactivity update in forceSelectFilterUpdate")})}else console.log("GSCLineupsReports - game number filter not found in forceSelectFilterUpdate!")}if(((nt=f.value)==null?void 0:nt.id)===5&&(pt=e==null?void 0:e.view)!=null&&pt.filterMultiple&&(console.log("GSCVolumetricField - checking filterMultiple in forceSelectFilterUpdate:",e.view.filterMultiple),console.log("GSCVolumetricField - currentFilters in forceSelectFilterUpdate:",T.value),e.view.filterMultiple.isHomeTeam!==void 0)){console.log("GSCVolumetricField - found isHomeTeam in filterMultiple:",e.view.filterMultiple.isHomeTeam),console.log('GSCVolumetricField - searching for team filter with label "Equipo"'),console.log("GSCVolumetricField - all filters details:",T.value.map((ft,Nt)=>({index:Nt,type:ft.type,label:ft.label,options:ft.options})));const vt=T.value.findIndex(ft=>ft.type==="radio-button"&&ft.label==="Equipo");if(console.log("GSCVolumetricField - teamFilterIndex in forceSelectFilterUpdate:",vt),console.log("GSCVolumetricField - all filters in forceSelectFilterUpdate:",T.value.map((ft,Nt)=>({index:Nt,type:ft.type,label:ft.label}))),vt!==-1){console.log("GSCVolumetricField - found team filter at index:",vt);const ft=e.view.filterMultiple.isHomeTeam;console.log("GSCVolumetricField - isHomeTeam type:",typeof ft,"value:",ft);let Nt;typeof ft=="boolean"?(Nt=ft?1:2,console.log("GSCVolumetricField - isHomeTeam is boolean, converting:",ft,"-> teamValue:",Nt)):typeof ft=="number"?(Nt=ft===1?1:2,console.log("GSCVolumetricField - isHomeTeam is number, using directly:",ft,"-> teamValue:",Nt)):(Nt=1,console.log("GSCVolumetricField - isHomeTeam is unknown type, using default:",Nt)),console.log("GSCVolumetricField - setting team filter directly from filterMultiple.isHomeTeam in forceSelectFilterUpdate:",Nt),m.value[0]=Nt,e.view.componentProps&&ft!==void 0&&(e.view.componentProps.isHomeTeamForAnalysis=ft===1,console.log("GSCVolumetricField - updated componentProps.isHomeTeamForAnalysis in forceSelectFilterUpdate:",e.view.componentProps.isHomeTeamForAnalysis)),h.nextTick(()=>{m.value=[...m.value],console.log("GSCVolumetricField - forced reactivity update in forceSelectFilterUpdate")})}else{console.log("GSCVolumetricField - team filter not found in forceSelectFilterUpdate!"),console.log("GSCVolumetricField - trying fallback: looking for any radio-button filter");const ft=T.value.findIndex(Nt=>Nt.type==="radio-button");if(ft!==-1){console.log("GSCVolumetricField - found radio-button filter at index:",ft);const Nt=e.view.filterMultiple.isHomeTeam;console.log("GSCVolumetricField - isHomeTeam type in fallback:",typeof Nt,"value:",Nt);let Ft;typeof Nt=="boolean"?(Ft=Nt?1:2,console.log("GSCVolumetricField - isHomeTeam is boolean in fallback, converting:",Nt,"-> teamValue:",Ft)):typeof Nt=="number"?(Ft=Nt===1?1:2,console.log("GSCVolumetricField - isHomeTeam is number in fallback, using directly:",Nt,"-> teamValue:",Ft)):(Ft=1,console.log("GSCVolumetricField - isHomeTeam is unknown type in fallback, using default:",Ft)),console.log("GSCVolumetricField - setting radio-button filter by fallback:",Ft),m.value[ft]=Ft,e.view.componentProps&&Nt!==void 0&&(e.view.componentProps.preMatchType=Nt,console.log("GSCVolumetricField - updated componentProps.preMatchType in fallback:",e.view.componentProps.preMatchType)),h.nextTick(()=>{m.value=[...m.value],console.log("GSCVolumetricField - forced reactivity update in fallback")})}else console.log("GSCVolumetricField - no radio-button filters found at all!")}}h.nextTick(()=>{x.value=!1,p.value=!1})}}function je(){if(console.log("FUNCION: forceRadioFilterUpdate"),p.value){console.log("Skipping forceRadioFilterUpdate - already in force update");return}if(u.value&&v&&v.dynamicFilters&&T.value){if(console.log("1"),y.value)return;p.value=!0,x.value=!0,v.dynamicFilters.forEach((ye,ge)=>{var ze,Ie;if(ye&&((ze=T.value[ge])==null?void 0:ze.type)==="radio-button"&&(console.log("2"),ye.selectedOption&&ye.selectedOption.value!==void 0)){console.log("3"),console.log("filterData: ----------------->",ye),console.log("editFiltersJSON: ",v),console.log(`Force setting radio filter ${ge} to:`,ye.selectedOption.value);const Ve=ye.selectedOption.value;m.value[ge]=Ve,console.log(`Radio filter ${ge} set to:`,Ve,"Type:",typeof Ve),((Ie=f.value)==null?void 0:Ie.id)===8&&(console.log("FieldPosesion - Radio filter updated to:",ye.selectedOption.value),console.log("FieldPosesion - Current dynamicFilters after update:",m.value))}}),h.nextTick(()=>{x.value=!1,p.value=!1})}}function Ne(){var ye,ge,ze,Ie,Ve,Ge,Ke,ke,Be,Fe,He,rt,nt,pt,vt,ft,Nt,Ft,Dt,at,Ze,ct,gt,Rt,Ct,tt,st,Je,lt,Tt,yt,It,Lt,Qe,et,wt,zt,Ot,St,Jt,qt,Ht,Wt,Gt,rr,nr,Sr,Ar,wr,ar,vr,Wr;if(console.log("updateContainerOnUserChange function called"),console.log("filterAndViewsContainer:",b),console.log("isEditMode.value:",u.value),console.log("viewToEdit:",e),b&&u.value&&e){if(console.log("User made changes, updating container for specific component"),console.log("Current dynamicFilters:",m.value),console.log("Component ID:",(ye=e.view)==null?void 0:ye.id),console.log("Selected component ID:",(ge=f.value)==null?void 0:ge.id),y.value){console.log("Skipping container update due to container update in progress");return}if(x.value=!0,((ze=f.value)==null?void 0:ze.id)===4)b.setDynamicFilters(m.value,(Ie=e.view)==null?void 0:Ie.id),b.updateDynamicFilters(m.value,(Ve=e.view)==null?void 0:Ve.id),console.log("Timeline - updated specific filters for component:",(Ge=e.view)==null?void 0:Ge.id);else if(((Ke=f.value)==null?void 0:Ke.id)===8)b.setDynamicFilters(m.value,(ke=e.view)==null?void 0:ke.id),b.updateDynamicFilters(m.value,(Be=e.view)==null?void 0:Be.id),console.log("FieldPosesion - updated specific filters for component:",(Fe=e.view)==null?void 0:Fe.id);else if(((He=f.value)==null?void 0:He.id)===3)b.setDynamicFilters(m.value,(rt=e.view)==null?void 0:rt.id),b.updateDynamicFilters(m.value,(nt=e.view)==null?void 0:nt.id),console.log("GSCMatchSummary - updated specific filters for component:",(pt=e.view)==null?void 0:pt.id);else if(((vt=f.value)==null?void 0:vt.id)===2){console.log("GSCtops - updateContainerOnUserChange - starting GSCtops logic"),console.log("GSCtops - current dynamicFilters:",m.value),console.log("GSCtops - currentFilters:",T.value),b.setDynamicFilters(m.value,(ft=e.view)==null?void 0:ft.id),b.updateDynamicFilters(m.value,(Nt=e.view)==null?void 0:Nt.id);const xr=m.value[0];if(console.log("GSCtops - newCategoryId from dynamicFilters[0]:",xr),xr!==void 0){e.view.filterMultiple||(e.view.filterMultiple={},console.log("GSCtops - created new filterMultiple object"));const Er=e.view.filterMultiple.categoryId;if(e.view.filterMultiple.categoryId=xr,console.log("GSCtops - updated filterMultiple.categoryId from",Er,"to:",xr),console.log("GSCtops - updated component filterMultiple:",e.view.filterMultiple),e.view.componentProps){let dr=`Category ${xr}`,kr=null;try{kr=Vd(xr),kr&&(dr=kr.name,console.log("GSCtops - found category info from getCategoryById:",kr))}catch{console.log("GSCtops - getCategoryById failed, using filter options");const Hr=T.value.findIndex(zr=>zr.type==="select-simple"&&zr.label==="Tipo de análisis");if(Hr!==-1){const zr=(((Ft=T.value[Hr])==null?void 0:Ft.options)||[]).find(tn=>tn.value==xr);zr&&(dr=zr.label,console.log("GSCtops - found category name from options:",dr))}}e.view.componentProps.categoryView=[{id:xr,name:dr}],console.log("GSCtops - updated componentProps.categoryView:",e.view.componentProps.categoryView),xi.emit("force-component-update",{itemId:e.view.id,componentProps:e.view.componentProps,filterMultiple:e.view.filterMultiple}),console.log("GSCtops - emitted force-component-update event")}}else console.log("GSCtops - newCategoryId is undefined!");const fr=m.value[1];if(console.log("GSCtops - newTeamType from dynamicFilters[1]:",fr),fr!==void 0){e.view.filterMultiple||(e.view.filterMultiple={},console.log("GSCtops - created new filterMultiple object for teamType"));const Er=e.view.filterMultiple.teamType;e.view.filterMultiple.teamType=fr,console.log("GSCtops - updated filterMultiple.teamType from",Er,"to:",fr),console.log("GSCtops - updated component filterMultiple:",e.view.filterMultiple),e.view.componentProps&&e.view.componentProps.game&&(fr===1?e.view.componentProps.teamView=e.view.componentProps.game.homeTeam.team_id:fr===2?e.view.componentProps.teamView=e.view.componentProps.game.awayTeam.team_id:e.view.componentProps.teamView=0,console.log("GSCtops - updated componentProps.teamView:",e.view.componentProps.teamView)),xi.emit("force-component-update",{itemId:e.view.id,componentProps:e.view.componentProps,filterMultiple:e.view.filterMultiple}),console.log("GSCtops - emitted force-component-update event for teamType")}else console.log("GSCtops - newTeamType is undefined!");console.log("GSCtops - updated specific filters for component:",(Dt=e.view)==null?void 0:Dt.id)}else if(((at=f.value)==null?void 0:at.id)===1){console.log("GSCComparativeReports - updateContainerOnUserChange - starting GSCComparativeReports logic"),console.log("GSCComparativeReports - current dynamicFilters:",m.value),console.log("GSCComparativeReports - currentFilters:",T.value),b.setDynamicFilters(m.value,(Ze=e.view)==null?void 0:Ze.id),b.updateDynamicFilters(m.value,(ct=e.view)==null?void 0:ct.id);const xr=m.value[0];if(console.log("GSCComparativeReports - newCategory from dynamicFilters[0]:",xr),xr!==void 0){e.view.filterMultiple||(e.view.filterMultiple={},console.log("GSCComparativeReports - created new filterMultiple object"));const fr=e.view.filterMultiple.category;e.view.filterMultiple.category=xr,console.log("GSCComparativeReports - updated filterMultiple.category from",fr,"to:",xr),console.log("GSCComparativeReports - updated component filterMultiple:",e.view.filterMultiple),e.view.componentProps&&(e.view.componentProps.type=xr,console.log("GSCComparativeReports - updated componentProps.type:",e.view.componentProps.type)),xi.emit("force-component-update",{itemId:e.view.id,componentProps:e.view.componentProps,filterMultiple:e.view.filterMultiple}),console.log("GSCComparativeReports - emitted force-component-update event")}else console.log("GSCComparativeReports - newCategory is undefined!");console.log("GSCComparativeReports - updated specific filters for component:",(gt=e.view)==null?void 0:gt.id)}else if(((Rt=f.value)==null?void 0:Rt.id)===6){console.log("GSCLineupsReports - updateContainerOnUserChange - starting GSCLineupsReports logic"),console.log("GSCLineupsReports - current dynamicFilters:",m.value),console.log("GSCLineupsReports - currentFilters:",T.value),console.log("GSCLineupsReports - viewToEdit:",e),console.log("GSCLineupsReports - filterAndViewsContainer:",b),b.setDynamicFilters(m.value,(Ct=e.view)==null?void 0:Ct.id),b.updateDynamicFilters(m.value,(tt=e.view)==null?void 0:tt.id);const xr=m.value[0];if(console.log("GSCLineupsReports - newGameNumber from dynamicFilters[0]:",xr),xr!==void 0){e.view.filterMultiple||(e.view.filterMultiple={},console.log("GSCLineupsReports - created new filterMultiple object"));const fr=e.view.filterMultiple.gameNumber;e.view.filterMultiple.gameNumber=xr,console.log("GSCLineupsReports - updated filterMultiple.gameNumber from",fr,"to:",xr),console.log("GSCLineupsReports - updated component filterMultiple:",e.view.filterMultiple),e.view.componentProps&&(e.view.componentProps.gameNumber=xr,console.log("GSCLineupsReports - updated componentProps.gameNumber:",e.view.componentProps.gameNumber),e.view._updateKey,e.view._updateKey=Date.now(),console.log("GSCLineupsReports - updated _updateKey:",e.view._updateKey)),xi.emit("force-component-update",{itemId:e.view.id,componentProps:e.view.componentProps,filterMultiple:e.view.filterMultiple}),console.log("GSCLineupsReports - emitted force-component-update event"),xi.emit("dynamic-filters-changed",{containerViewId:(st=f.value)==null?void 0:st.id,viewId:e.view.id,dynamicFilters:m.value}),console.log("GSCLineupsReports - emitted dynamic-filters-changed event"),xi.emit("component-props-updated",{viewId:e.view.id,componentProps:e.view.componentProps,dynamicFilters:m.value}),console.log("GSCLineupsReports - emitted component-props-updated event"),h.nextTick(()=>{console.log("GSCLineupsReports - forcing reactivity update"),e.view.componentProps&&(e.view.componentProps={...e.view.componentProps})})}else console.log("GSCLineupsReports - newGameNumber is undefined!");console.log("GSCLineupsReports - updated specific filters for component:",(Je=e.view)==null?void 0:Je.id)}else if(((lt=f.value)==null?void 0:lt.id)===7){console.log("GSCGoalData - updateContainerOnUserChange - starting GSCGoalData logic"),console.log("GSCGoalData - current dynamicFilters:",m.value),console.log("GSCGoalData - currentFilters:",T.value),console.log("GSCGoalData - viewToEdit:",e),console.log("GSCGoalData - filterAndViewsContainer:",b),b.setDynamicFilters(m.value,(Tt=e.view)==null?void 0:Tt.id),b.updateDynamicFilters(m.value,(yt=e.view)==null?void 0:yt.id);const xr=m.value[0],fr=m.value[1];if(console.log("GSCGoalData - newAnalysisValue from dynamicFilters[0]:",xr),console.log("GSCGoalData - newTeamValue from dynamicFilters[1]:",fr),xr!==void 0&&e.view.componentProps){const Er=xr===1?"offensive":"defensive";e.view.componentProps.analysisType=Er,console.log("GSCGoalData - updated componentProps.analysisType to:",Er)}if(fr!==void 0){e.view.filterMultiple||(e.view.filterMultiple={},console.log("GSCGoalData - created new filterMultiple object"));const Er=e.view.filterMultiple.isHomeTeam,dr=fr===1;e.view.filterMultiple.isHomeTeam=dr,console.log("GSCGoalData - updated filterMultiple.isHomeTeam from",Er,"to:",dr),console.log("GSCGoalData - updated component filterMultiple:",e.view.filterMultiple),e.view.componentProps&&(e.view.componentProps.isHomeTeamForAnalysis=dr,console.log("GSCGoalData - updated componentProps.isHomeTeamForAnalysis:",e.view.componentProps.isHomeTeamForAnalysis),e.view._updateKey,e.view._updateKey=Date.now(),console.log("GSCGoalData - updated _updateKey:",e.view._updateKey)),xi.emit("force-component-update",{itemId:e.view.id,componentProps:e.view.componentProps,filterMultiple:e.view.filterMultiple}),console.log("GSCGoalData - emitted force-component-update event"),xi.emit("dynamic-filters-changed",{containerViewId:(It=f.value)==null?void 0:It.id,viewId:e.view.id,dynamicFilters:m.value}),console.log("GSCGoalData - emitted dynamic-filters-changed event"),xi.emit("component-props-updated",{viewId:e.view.id,componentProps:e.view.componentProps,dynamicFilters:m.value}),console.log("GSCGoalData - emitted component-props-updated event"),h.nextTick(()=>{console.log("GSCGoalData - forcing reactivity update"),e.view.componentProps&&(e.view.componentProps={...e.view.componentProps})})}else console.log("GSCGoalData - newTeamValue is undefined!");console.log("GSCGoalData - updated specific filters for component:",(Lt=e.view)==null?void 0:Lt.id)}else if(((Qe=f.value)==null?void 0:Qe.id)===5){console.log("GSCVolumetricField - updateContainerOnUserChange - starting GSCVolumetricField logic"),console.log("GSCVolumetricField - current dynamicFilters:",m.value),console.log("GSCVolumetricField - currentFilters:",T.value),console.log("GSCVolumetricField - viewToEdit:",e),console.log("GSCVolumetricField - filterAndViewsContainer:",b),b.setDynamicFilters(m.value,(et=e.view)==null?void 0:et.id),b.updateDynamicFilters(m.value,(wt=e.view)==null?void 0:wt.id);const xr=m.value[0];if(console.log("GSCVolumetricField - newTeamValue from dynamicFilters[0]:",xr),xr!==void 0){e.view.filterMultiple||(e.view.filterMultiple={},console.log("GSCVolumetricField - created new filterMultiple object"));const fr=e.view.filterMultiple.isHomeTeam,Er=xr===1?1:2;e.view.filterMultiple.isHomeTeam=Er,console.log("GSCVolumetricField - updated filterMultiple.isHomeTeam from",fr,"to:",Er),console.log("GSCVolumetricField - updated component filterMultiple:",e.view.filterMultiple),e.view.componentProps&&(e.view.componentProps.isHomeTeamForAnalysis=Er===1,console.log("GSCVolumetricField - updated componentProps.isHomeTeamForAnalysis:",e.view.componentProps.isHomeTeamForAnalysis),e.view._updateKey,e.view._updateKey=Date.now(),console.log("GSCVolumetricField - updated _updateKey:",e.view._updateKey)),xi.emit("force-component-update",{itemId:e.view.id,componentProps:e.view.componentProps,filterMultiple:e.view.filterMultiple}),console.log("GSCVolumetricField - emitted force-component-update event"),xi.emit("dynamic-filters-changed",{containerViewId:(zt=f.value)==null?void 0:zt.id,viewId:e.view.id,dynamicFilters:m.value}),console.log("GSCVolumetricField - emitted dynamic-filters-changed event"),xi.emit("component-props-updated",{viewId:e.view.id,componentProps:e.view.componentProps,dynamicFilters:m.value}),console.log("GSCVolumetricField - emitted component-props-updated event"),h.nextTick(()=>{console.log("GSCVolumetricField - forcing reactivity update"),e.view.componentProps&&(e.view.componentProps={...e.view.componentProps})})}else console.log("GSCVolumetricField - newPreMatchType is undefined!");console.log("GSCVolumetricField - updated specific filters for component:",(Ot=e.view)==null?void 0:Ot.id)}else if(((St=f.value)==null?void 0:St.id)===9){console.log("GSCFieldDataByZones - updateContainerOnUserChange - starting GSCFieldDataByZones logic"),console.log("GSCFieldDataByZones - current dynamicFilters:",m.value),console.log("GSCFieldDataByZones - currentFilters:",T.value),console.log("GSCFieldDataByZones - viewToEdit:",e),console.log("GSCFieldDataByZones - filterAndViewsContainer:",b);const xr=m.value[1];console.log("GSCFieldDataByZones - current radio button value:",xr),b.setDynamicFilters(m.value,(Jt=e.view)==null?void 0:Jt.id),b.updateDynamicFilters(m.value,(qt=e.view)==null?void 0:qt.id),xi.emit("activate-save-button"),console.log("GSCFieldDataByZones - emitted activate-save-button event"),e.view.filterMultiple||(e.view.filterMultiple={},console.log("GSCFieldDataByZones - created new filterMultiple object"));const fr=m.value[0];if(console.log("GSCFieldDataByZones - newCategoryIds from dynamicFilters[0]:",fr),fr!==void 0){const dr=Array.isArray(fr)?fr:[fr];console.log("GSCFieldDataByZones - processing categoryIdsArray:",dr);const kr=e.view.filterMultiple.categoryIds;e.view.filterMultiple.categoryIds=dr,console.log("GSCFieldDataByZones - updated filterMultiple.categoryIds from",kr,"to:",dr);const Hr=(((Ht=T.value[0])==null?void 0:Ht.options)||[]).filter(zr=>Array.isArray(zr.value)?Me(zr.value,dr):dr.includes(zr.value));if(console.log("GSCFieldDataByZones - matching options for categories:",Hr),Hr.length>0){const zr=Hr[0];console.log("GSCFieldDataByZones - found matching option for categories:",zr);const tn=zr.value;if(console.log("GSCFieldDataByZones - using matching option value for categories:",tn),e.view.filterMultiple.categoryIds=Array.isArray(tn)?tn:[tn],console.log("GSCFieldDataByZones - updated filterMultiple.categoryIds with matching option value:",e.view.filterMultiple.categoryIds),e.view.componentProps){const Ur=Array.isArray(tn)?tn.join("-"):tn,en=Fd.get((Wt=f.value)==null?void 0:Wt.id);if(en&&en.analysisTypes){const nn=en.analysisTypes.get(Ur);nn&&(e.view.componentProps.analysisType=nn.analysisType,e.view.title=nn.title,console.log("GSCFieldDataByZones - updated componentProps.analysisType:",nn.analysisType),console.log("GSCFieldDataByZones - updated title:",nn.title))}}}}else console.log("GSCFieldDataByZones - newCategoryIds is undefined!");const Er=xr!==void 0?xr:m.value[1];if(console.log("GSCFieldDataByZones - newTeamValue (using current radio value):",Er),console.log("GSCFieldDataByZones - currentRadioValue:",xr),console.log("GSCFieldDataByZones - dynamicFilters[1]:",m.value[1]),Er!==void 0){const dr=e.view.filterMultiple.isHomeTeam;let kr;Er===1?(kr=!0,console.log("GSCFieldDataByZones - converted teamValue 1 to isHomeTeam true (Mi equipo)")):Er===2?(kr=!1,console.log("GSCFieldDataByZones - converted teamValue 2 to isHomeTeam false (Rival)")):(kr=!0,console.log("GSCFieldDataByZones - using default isHomeTeam true for unknown teamValue:",Er)),e.view.filterMultiple.isHomeTeam=kr,console.log("GSCFieldDataByZones - updated filterMultiple.isHomeTeam from",dr,"to:",kr),console.log("GSCFieldDataByZones - updated component filterMultiple:",e.view.filterMultiple),m.value[1]!==Er&&(m.value[1]=Er,console.log("GSCFieldDataByZones - synchronized dynamicFilters[1] with newTeamValue:",Er)),e.view.componentProps&&(e.view.componentProps.isHomeTeamForAnalysis=kr,console.log("GSCFieldDataByZones - updated componentProps.isHomeTeamForAnalysis:",e.view.componentProps.isHomeTeamForAnalysis))}else console.log("GSCFieldDataByZones - newTeamValue is undefined!");e.view._updateKey,e.view._updateKey=Date.now(),console.log("GSCFieldDataByZones - updated _updateKey:",e.view._updateKey),xi.emit("force-component-update",{itemId:e.view.id,componentProps:e.view.componentProps,filterMultiple:e.view.filterMultiple}),console.log("GSCFieldDataByZones - emitted force-component-update event"),xi.emit("dynamic-filters-changed",{containerViewId:(Gt=f.value)==null?void 0:Gt.id,viewId:e.view.id,dynamicFilters:m.value}),console.log("GSCFieldDataByZones - emitted dynamic-filters-changed event"),xi.emit("component-props-updated",{viewId:e.view.id,componentProps:e.view.componentProps,dynamicFilters:m.value}),console.log("GSCFieldDataByZones - emitted component-props-updated event"),h.nextTick(()=>{console.log("GSCFieldDataByZones - forcing reactivity update"),e.view.componentProps&&(e.view.componentProps={...e.view.componentProps})}),console.log("GSCFieldDataByZones - updated specific filters for component:",(rr=e.view)==null?void 0:rr.id),v&&v.dynamicFilters&&(v.dynamicFilters=m.value.map((dr,kr)=>{var Hr,zr;console.log("99999999 ==================================================, ",T.value[kr]),console.log("99999999 currentRadioValue",xr);const tn=T.value[kr];if(console.log("99999999 filter.options",tn.options),!tn)return{selectedValue:dr};let Ur=dr;return console.log("99999999 finalValue",tn.options),kr===1&&tn.type==="radio-button"&&xr!==void 0&&(Ur=xr,console.log("GSCFieldDataByZones - using current radio value in editFiltersJSON:",Ur)),console.log("99999999 finalValue 55555555",tn.options),{filterId:tn.id||`filter_${kr}`,filterType:tn.type,filterLabel:tn.label,selectedValue:Ur,selectedOptions:tn.type==="select"&&Array.isArray(Ur)&&Ur.length>0?Ur.map(en=>{var nn;const Cn=(nn=tn.options)==null?void 0:nn.find(Zn=>Zn.value===en);return{value:en,label:(Cn==null?void 0:Cn.label)||en}}):null,selectedOption:tn.type==="radio-button"&&Ur!=null?{value:Ur,label:((zr=(Hr=tn.options)==null?void 0:Hr.find(en=>en.value===Ur))==null?void 0:zr.label)||Ur}:null,isChecked:tn.type==="check"?Ur:null}}),console.log("GSCFieldDataByZones - updated editFiltersJSON with current radio value:",v.dynamicFilters))}else b.setDynamicFilters(m.value),b.updateDynamicFilters(m.value);((nr=f.value)==null?void 0:nr.id)===8&&console.log("FieldPosesion - Container updated with dynamicFilters:",m.value),((Sr=f.value)==null?void 0:Sr.id)===3&&console.log("GSCMatchSummary - Container updated with dynamicFilters:",m.value),((Ar=f.value)==null?void 0:Ar.id)===2&&console.log("GSCtops - Container updated with dynamicFilters:",m.value),((wr=f.value)==null?void 0:wr.id)===1&&console.log("GSCComparativeReports - Container updated with dynamicFilters:",m.value),((ar=f.value)==null?void 0:ar.id)===6&&console.log("GSCLineupsReports - Container updated with dynamicFilters:",m.value),((vr=f.value)==null?void 0:vr.id)===5&&console.log("GSCVolumetricField - Container updated with dynamicFilters:",m.value),((Wr=f.value)==null?void 0:Wr.id)===9&&console.log("GSCFieldDataByZones - Container updated with dynamicFilters:",m.value),h.nextTick(()=>{x.value=!1,console.log("updateContainerOnUserChange completed")})}else console.log("updateContainerOnUserChange - conditions not met"),console.log("filterAndViewsContainer exists:",!!b),console.log("isEditMode.value:",u.value),console.log("viewToEdit exists:",!!e)}function ve(){var ye,ge,ze;if(!v||!v.dynamicFilters||!T.value)return!1;for(let Ie=0;Ie<v.dynamicFilters.length;Ie++){const Ve=v.dynamicFilters[Ie],Ge=T.value[Ie],Ke=m.value[Ie];if(!(!Ve||!Ge)){if(Ge.type==="check"){if(Ve.isChecked!==Ke)return console.log(`Check filter ${Ie} needs update: saved=${Ve.isChecked}, current=${Ke}`),!0}else if(Ge.type==="radio-button"){if(((ye=Ve.selectedOption)==null?void 0:ye.value)!==Ke)return console.log(`Radio filter ${Ie} needs update: saved=${(ge=Ve.selectedOption)==null?void 0:ge.value}, current=${Ke}`),!0}else if(Ge.type==="select"){const ke=((ze=Ve.selectedOptions)==null?void 0:ze.map(Fe=>Fe.value))||Ve.selectedValue||[],Be=Array.isArray(Ke)?Ke:[];if(JSON.stringify(ke)!==JSON.stringify(Be))return console.log(`Select filter ${Ie} needs update: saved=${JSON.stringify(ke)}, current=${JSON.stringify(Be)}`),!0}}}return console.log("No force update needed - values already match"),!1}return(ye,ge)=>(h.openBlock(),h.createElementBlock("div",ece,[h.createElementVNode("button",tce,h.toDisplayString(u.value?"Editando visualización":"Nueva visualización"),1),h.createElementVNode("div",{class:h.normalizeClass(["custom-select main-select",{disabled:u.value}]),onClick:ne},[h.createElementVNode("div",rce,[h.createElementVNode("span",nce,[d.value?(h.openBlock(),h.createElementBlock("img",{key:0,src:q(d.value.name,!1),alt:"icono",class:"option-img"},null,8,ice)):(h.openBlock(),h.createElementBlock("img",ace))]),d.value?(h.openBlock(),h.createElementBlock("span",sce,h.toDisplayString(W()),1)):(h.openBlock(),h.createElementBlock("span",oce,"Tipo de vista")),h.createElementVNode("span",{class:h.normalizeClass(["arrow",{open:P.value}])},[...ge[4]||(ge[4]=[h.createElementVNode("svg",{width:"16",height:"14",viewBox:"0 0 16 14",fill:"none"},[h.createElementVNode("path",{d:"M3 5L8 10L13 5",stroke:"#AAB4BE","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],2)]),P.value?(h.openBlock(),h.createElementBlock("div",lce,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(n.value,(ze,Ie)=>(h.openBlock(),h.createElementBlock("div",{key:ze.id,class:h.normalizeClass(["option-card",{active:i.value===Ie}]),onClick:h.withModifiers(Ve=>re(Ie),["stop"])},[h.createElementVNode("div",uce,[h.createElementVNode("img",{src:q(ze.name,!1),"data-hover-src":q(ze.name,!0),alt:"icono",class:"option-img-34"},null,8,dce)]),h.createElementVNode("div",pce,[h.createElementVNode("div",hce,h.toDisplayString(ze.name),1),ze.description?(h.openBlock(),h.createElementBlock("div",fce,h.toDisplayString(ze.description),1)):h.createCommentVNode("",!0)])],10,cce))),128))])):h.createCommentVNode("",!0)],2),d.value?(h.openBlock(),h.createElementBlock("div",{key:0,class:h.normalizeClass(["custom-select second-select",{disabled:u.value}]),onClick:J},[h.createElementVNode("div",mce,[h.createElementVNode("span",gce,[f.value?(h.openBlock(),h.createElementBlock("img",{key:0,src:f.value.url,alt:"icono",class:"option-img-graph2"},null,8,yce)):d.value?(h.openBlock(),h.createElementBlock("img",{key:1,src:q(d.value.name,!1),alt:"icono",class:"option-img"},null,8,vce)):h.createCommentVNode("",!0)]),h.createElementVNode("span",xce,h.toDisplayString(Y()),1),h.createElementVNode("span",{class:h.normalizeClass(["arrow",{open:z.value}])},[...ge[5]||(ge[5]=[h.createElementVNode("svg",{width:"16",height:"14",viewBox:"0 0 16 14",fill:"none"},[h.createElementVNode("path",{d:"M3 5L8 10L13 5",stroke:"#AAB4BE","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],2)]),z.value&&d.value?(h.openBlock(),h.createElementBlock("div",bce,[h.createElementVNode("div",_ce,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(s.value,ze=>(h.openBlock(),h.createElementBlock("div",{key:ze.id,class:h.normalizeClass(["option-card-grid",{active:c.value===ze.id}]),onClick:h.withModifiers(Ie=>ee(ze),["stop"])},[h.createElementVNode("div",Tce,h.toDisplayString(ze.name||ze.title),1),h.createElementVNode("div",kce,[h.createElementVNode("img",{src:ze.url,alt:"icono",class:"option-img-grid"},null,8,Sce)])],10,wce))),128))])])):h.createCommentVNode("",!0)],2)):h.createCommentVNode("",!0),f.value?(h.openBlock(),h.createElementBlock("div",Cce)):h.createCommentVNode("",!0),f.value&&T.value&&E()?(h.openBlock(),h.createElementBlock("div",{key:2,class:h.normalizeClass(["dynamic-filters",{"dynamic-filters-wide":T.value.length>=2}])},[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(T.value,(ze,Ie)=>(h.openBlock(),h.createElementBlock(h.Fragment,{key:Ie},[ze.type==="select"?(h.openBlock(),h.createElementBlock("div",{key:0,class:"custom-select dynamic-select filter-inline",onClick:h.withModifiers(Ve=>Z(Ie),["stop"])},[h.createElementVNode("div",Mce,[ge[7]||(ge[7]=h.createElementVNode("span",{class:"select-icon select-analisis-icon"},[h.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/report-maker/iconocategorias.png",alt:"icono categorías",style:{width:"18px",height:"18px","object-fit":"contain"}})],-1)),ge[8]||(ge[8]=h.createElementVNode("span",{class:"select-label"}," Tipo de análisis ",-1)),Array.isArray(m.value[Ie])&&m.value[Ie].length>0?(h.openBlock(),h.createElementBlock("span",Ace,h.toDisplayString(m.value[Ie].length),1)):h.createCommentVNode("",!0),h.createElementVNode("span",{class:h.normalizeClass(["arrow",{open:V.value===Ie}])},[...ge[6]||(ge[6]=[h.createElementVNode("svg",{width:"16",height:"14",viewBox:"0 0 16 14",fill:"none"},[h.createElementVNode("path",{d:"M3 5L8 10L13 5",stroke:"#AAB4BE","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],2)]),V.value===Ie?(h.openBlock(),h.createElementBlock("div",Lce,[h.createElementVNode("div",Rce,[h.createElementVNode("div",{class:"multi-select-header",onClick:ge[1]||(ge[1]=h.withModifiers(()=>{},["stop"]))},[h.createElementVNode("label",Nce,[h.createElementVNode("input",{type:"checkbox",checked:L(Ie),indeterminate:R(Ie),onChange:h.withModifiers(Ve=>I(Ie),["stop"]),onClick:ge[0]||(ge[0]=h.withModifiers(()=>{},["stop"]))},null,40,Ice),ge[9]||(ge[9]=h.createElementVNode("span",{class:"select-all-label"},"Agregar todas",-1))])]),(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(ze.options,Ve=>(h.openBlock(),h.createElementBlock("div",{key:Ve.value,class:h.normalizeClass(["option-card multi-select-option",{active:C(Ie,Ve.value)}]),onClick:ge[2]||(ge[2]=h.withModifiers(()=>{},["stop"]))},[h.createElementVNode("div",Pce,[h.createElementVNode("input",{type:"checkbox",checked:C(Ie,Ve.value),onChange:h.withModifiers(Ge=>S(Ie,Ve.value),["stop"])},null,40,Oce)]),h.createElementVNode("div",{class:"option-content",onClick:Ge=>S(Ie,Ve.value)},[h.createElementVNode("div",Bce,h.toDisplayString(Ve.label),1)],8,zce)],2))),128))]),h.createElementVNode("div",Dce,[h.createElementVNode("button",{class:"btn-listo",onClick:ge[3]||(ge[3]=h.withModifiers(Ve=>Ae(),["stop"]))},"Listo")])])):h.createCommentVNode("",!0)],8,Ece)):ze.type==="radio-button"?(h.openBlock(),h.createElementBlock("div",Vce,[h.createElementVNode("div",Fce,h.toDisplayString(ze.label),1),h.createElementVNode("div",jce,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(ze.options,Ve=>(h.openBlock(),h.createElementBlock("label",{key:Ve.value,class:h.normalizeClass(["radio-option-card",{active:m.value[Ie]===Ve.value}])},[h.withDirectives(h.createElementVNode("input",{type:"radio",name:"dynamic-radio-"+Ie,value:Ve.value,"onUpdate:modelValue":Ge=>m.value[Ie]=Ge,disabled:k(Ve.value,Ve.label),onChange:()=>{var Ge,Ke,ke;if(console.log("Radio button changed for GSCFieldDataByZones:",m.value[Ie]),((Ge=f.value.value)==null?void 0:Ge.id)===9&&u.value.value&&(ke=(Ke=h.unref(e))==null?void 0:Ke.view)!=null&&ke.filterMultiple){const Be=m.value[Ie]===1;h.unref(e).view.filterMultiple.isHomeTeam=Be,console.log("GSCFieldDataByZones - preserved radio-button value in filterMultiple:",Be)}u.value.value&&Ne(),pe()}},null,40,Uce),[[h.vModelRadio,m.value[Ie]]]),h.createElementVNode("span",null,h.toDisplayString(Ve.label),1)],2))),128))])])):ze.type==="check"?(h.openBlock(),h.createElementBlock("div",qce,[h.createElementVNode("label",null,[h.withDirectives(h.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":Ve=>m.value[Ie]=Ve,checked:m.value[Ie],onChange:()=>{console.log(`Checkbox ${Ie} changed to:`,m.value[Ie]),u.value.value&&Ne(),pe()}},null,40,Wce),[[h.vModelCheckbox,m.value[Ie]]]),h.createTextVNode(" "+h.toDisplayString(ze.label),1)])])):ze.type==="select-simple"?(h.openBlock(),h.createElementBlock("div",{key:3,class:"custom-select dynamic-select filter-inline","data-filter-type":ze.type,onClick:h.withModifiers(Ve=>te(Ie),["stop"])},[h.createElementVNode("div",Hce,[ge[11]||(ge[11]=h.createElementVNode("span",{class:"select-icon select-analisis-icon"},[h.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/report-maker/iconocategorias.png",alt:"icono categorías",style:{width:"18px",height:"18px","object-fit":"contain"}})],-1)),ge[12]||(ge[12]=h.createElementVNode("span",{class:"select-label"}," Tipo de análisis ",-1)),h.createElementVNode("span",{class:h.normalizeClass(["arrow",{open:U.value===Ie}])},[...ge[10]||(ge[10]=[h.createElementVNode("svg",{width:"16",height:"14",viewBox:"0 0 16 14",fill:"none"},[h.createElementVNode("path",{d:"M3 5L8 10L13 5",stroke:"#AAB4BE","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],2)]),U.value===Ie?(h.openBlock(),h.createElementBlock("div",Jce,[h.createElementVNode("div",Kce,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(ze.options,Ve=>(h.openBlock(),h.createElementBlock("div",{key:Ve.value,class:h.normalizeClass(["option-card simple-select-option",{active:m.value[Ie]===Ve.value}]),onMouseenter:Ge=>Te(Ie,Ve.value),onClick:h.withModifiers(Ge=>ae(Ie,Ve.value),["stop"])},[h.createElementVNode("div",Zce,[h.createElementVNode("div",Yce,h.toDisplayString(Ve.label),1)]),m.value[Ie]===Ve.value?(h.openBlock(),h.createElementBlock("div",Qce,[...ge[13]||(ge[13]=[h.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},[h.createElementVNode("path",{d:"M13.5 4.5L6 12L2.5 8.5",stroke:"#cbee6b","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])])):h.createCommentVNode("",!0)],42,Xce))),128))])])):h.createCommentVNode("",!0)],8,Gce)):h.createCommentVNode("",!0),Ie===1&&T.value.length>2?(h.openBlock(),h.createElementBlock("div",$ce)):h.createCommentVNode("",!0)],64))),128))],2)):h.createCommentVNode("",!0),u.value?h.createCommentVNode("",!0):(h.openBlock(),h.createElementBlock("button",{key:3,class:"cancel-btn",onClick:be},"Cancelar")),t.value?(h.openBlock(),h.createElementBlock("button",{key:4,class:"ok-btn",onClick:_e},"OK")):h.createCommentVNode("",!0)]))}}),tue=dd(eue,[["__scopeId","data-v-b7992a81"]]),rue={key:0,class:"modal-simple"},nue={class:"modal-simple__content"},iue={class:"modal-simple__content__header"},aue={class:"modal-simple__content__body"},oue={class:"modal-simple__content__footer"},sue={__name:"ModalSimple",props:{modelValue:{type:Boolean,default:!1}},setup(r){return(a,g)=>(h.openBlock(),h.createBlock(h.Teleport,{to:"body"},[r.modelValue?(h.openBlock(),h.createElementBlock("div",rue,[h.createElementVNode("div",nue,[h.createElementVNode("div",iue,[h.renderSlot(a.$slots,"header",{},void 0,!0)]),h.createElementVNode("div",aue,[h.renderSlot(a.$slots,"body",{},void 0,!0)]),h.createElementVNode("div",oue,[h.renderSlot(a.$slots,"footer",{},void 0,!0)])])])):h.createCommentVNode("",!0)]))}},lue=dd(sue,[["__scopeId","data-v-1cc4f590"]]),cue={class:"footer"},uue={__name:"ModalCautionClose",props:{value:{type:Boolean,default:!1}},emits:["update:modelValue","action"],setup(r,{emit:a}){const g=a;function D(A){g("update:modelValue",A)}function X(A){g("action",A),g("update:modelValue",!1)}return(A,b)=>(h.openBlock(),h.createBlock(lue,{"modle-value":r.value,"onUpdate:modelValue":D},{header:h.withCtx(()=>[...b[2]||(b[2]=[h.createElementVNode("div",{class:"header"},"Descartar template",-1)])]),body:h.withCtx(()=>[...b[3]||(b[3]=[h.createElementVNode("div",{class:"body"},"¿Estás seguro que deseas abandonar el proceso?",-1)])]),footer:h.withCtx(()=>[h.createElementVNode("div",cue,[h.createElementVNode("div",{role:"button",class:"btn btn-cancel",onClick:b[0]||(b[0]=e=>X(!1))}," Seguir editando "),h.createElementVNode("div",{role:"button",class:"btn btn-confirm",onClick:b[1]||(b[1]=e=>X(!0))}," Descartar ")])]),_:1},8,["modle-value"]))}},due=dd(uue,[["__scopeId","data-v-ed9b5088"]]),pue={key:0,class:"modal-simple"},hue={__name:"ModalChangesSaved",props:{modelValue:{type:Boolean,default:!1}},setup(r){return(a,g)=>(h.openBlock(),h.createBlock(h.Teleport,{to:"body"},[h.createVNode(h.Transition,null,{default:h.withCtx(()=>[r.modelValue?(h.openBlock(),h.createElementBlock("div",pue,[...g[0]||(g[0]=[h.createElementVNode("div",{class:"modal-simple__content"},[h.createElementVNode("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[h.createElementVNode("path",{d:"M29.3346 14.7823V16.0089C29.333 18.8842 28.402 21.6818 26.6804 23.9847C24.9589 26.2876 22.539 27.9722 19.7818 28.7875C17.0245 29.6027 14.0776 29.5048 11.3806 28.5084C8.68354 27.512 6.38084 25.6704 4.81592 23.2584C3.25099 20.8463 2.50769 17.993 2.69687 15.124C2.88605 12.255 3.99758 9.52404 5.86568 7.33836C7.73377 5.15269 10.2583 3.62944 13.0629 2.9958C15.8674 2.36215 18.8017 2.65205 21.428 3.82227",stroke:"#CDEF71","stroke-width":"2.66667","stroke-linecap":"round","stroke-linejoin":"round"}),h.createElementVNode("path",{d:"M29.3333 5.33203L16 18.6787L12 14.6787",stroke:"#CDEF71","stroke-width":"2.66667","stroke-linecap":"round","stroke-linejoin":"round"})]),h.createElementVNode("div",{class:"modal-simple__content__text"}," Los cambios se han guardado correctamente ")],-1)])])):h.createCommentVNode("",!0)]),_:1})]))}},fue=dd(hue,[["__scopeId","data-v-2bc30783"]]),mue={class:"template-maker__header"},gue={key:0,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},yue={class:"template-maker__content"},vue={class:"template-maker__content__main"},xue={id:"containerMain",class:"container-main"},bue={class:"template-maker__content__main__cover-selector"},_ue=["id"],wue={class:"page-indicator"},Tue={class:"page-indicator__index"},kue=["onClick"],Sue=["onClick"],Cue={key:0,class:"template-maker__content__main__footer"},Eue={class:"template-maker__content__main__footer__paginator"},Mue={class:"template-maker__content__main__footer__paginator__nav"},Aue={class:"template-maker__content__main__footer__paginator__numbers"},Lue=["onClick"],Rue={__name:"GSC-TemplateReportMaker",props:{token:{type:String,default:""},userTeamId:{type:Number,default:0}},emits:["close"],setup(r,{expose:a,emit:g}){const D=new Map,X=h.ref([{title:"Page 1",id:String(Date.now()),items:[{name:"Volumetrica",id:`w-${String(Date.now())}`,x:0,y:0,w:4,h:6,maxWidth:4,maxHeight:4,noResize:!1,noMove:!1,componentProps:{}},{name:"Volumetrica",id:String(Date.now()),x:4,y:0,w:4,h:4,maxWidth:4,maxHeight:4,noResize:!1,noMove:!1,componentProps:{}}]}]),A=h.ref(null),b=h.ref(0),e=h.ref(!1),v=h.ref(null),u=h.ref(null),t=h.ref(!0),w=h.ref(!1),y=h.ref(!1),x=h.ref(0),p=h.ref(!1),n=h.ref(null),i=h.ref(new Map),d=h.ref(null),s=h.ref(null),c=h.ref(!1),f=h.ref(!1),m=h.ref(!1),T=h.computed(()=>({"--overflow-y-template-maker":w.value?"scroll":"hidden","--height-container-main":w.value?"fit-content":"calc(100vh - 64px)","--margin-bottom-container-main":(w.value,"0")})),C=h.computed(()=>b.value+1);h.watch(()=>e.value,Te=>{const Me=document.getElementById("app");Te?(b.value=0,document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden",Me&&(Me.style.overflow="hidden")):(document.body.style.overflow="",document.documentElement.style.overflow="",Me&&(Me.style.overflow=""))});function S(Te){return Te<10?`0${Te}`:Te}async function L({templateId:Te,userId:Me}){try{return(await(await fetch(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${Me}/templates/${Te}`,{method:"GET",headers:{Authorization:Z.token}})).json()).data}catch(Le){console.error("Error fetching template by ID:",Le)}}async function R({reportId:Te,userId:Me}){try{return(await(await fetch(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${Me}/reports/${Te}`,{method:"GET",headers:{Authorization:Z.token}})).json()).data}catch(Le){console.error("Error fetching report by ID:",Le)}}let E=0;function N(Te){A.value=Te,E>0&&(c.value=!0),E++}function M(Te){Te&&oe(null,!0)}let k=null;function I(Te,Me){let Le=Te.getBoundingClientRect(),Pe={height:Te.clientHeight,width:Te.clientWidth},We=Me.getBoundingClientRect();if(!(We.top>=Le.top&&We.bottom<=Le.top+Pe.height)){const Re=We.top-Le.top,je=We.bottom-Le.bottom;Math.abs(Re)<Math.abs(je)?Te.scrollTop+=Re:Te.scrollTop+=je}}function _(Te,Me){let Le=Te.getBoundingClientRect();const Pe=Me.getBoundingClientRect().top-Le.top;Te.scrollTop+=Pe}function P(Te,Me=!1){const Le={title:`Page ${X.value.length+1}`,id:`p-${Date.now()}`,items:[]};if(me(),Te!==void 0&&Te>=-1?X.value.splice(Te+1,0,Le):X.value.push(Le),h.nextTick(()=>{const Pe=X.value.findIndex(Re=>Re.id===Le.id),We=document.getElementById(`page-${Pe+1}`);k||(k=document.getElementById("containerMain")),We&&k?I(k,We):console.error("Page element or container main element not found")}),Me)return Le;c.value=!0}function z(Te){if(console.log("onClickPage",Te),Te<0||Te>X.value.length){console.log("Invalid page index:",Te,"Valid range: 0 to",X.value.length);return}b.value=Te;const Me=document.getElementById(`page-${Te}`);if(console.log("pageElement found:",Me),k||(k=document.getElementById("containerMain")),console.log("containerMainEl found:",k),Me&&k){const Le=new CustomEvent("programmatic-scroll-start");document.dispatchEvent(Le),_(k,Me),setTimeout(()=>{const Pe=new CustomEvent("programmatic-scroll-end");document.dispatchEvent(Pe)},300)}else console.error("Page element or container main element not found")}function V(Te){d.value=Te,p.value=!0}function U(Te,Me){const Le=Me+1;Te&&b.value!==Le&&(b.value=Le)}function q(Te){p.value=!0,xi.emit("edit-view",{view:Te})}async function W({templateReportId:Te,userId:Me,isTemplateMode:Le}){try{return Le?L({templateId:Te,userId:Me}):R({reportId:Te,userId:Me})}catch(Pe){throw new Error("Error fetching template or report by ID: "+Pe.message)}}function Y(){E=0,p.value=!1,b.value=0,d.value=null,s.value=null,i.value.clear(),k=null}async function ne(Te){if(console.log("show, initialConfig",Te),Y(),t.value=Te.isTemplateMode,console.log("****************************************** isTemplateMode.value",t.value),w.value=!!Te.isPDFMode,Te.isPDFMode?v.value=await R({reportId:Te.reportId,userId:Te.userId}):(v.value=Te.template,v.value=await W({templateReportId:Te.template.id,userId:Te.template.user_id,isTemplateMode:Te.isTemplateMode})),!v.value)return;v.value&&v.value.game&&(v.value.game=ae(v.value.game)),console.log("templateToEdit.value",v.value),u.value=JSON.parse(JSON.stringify(v.value)),y.value=v.value.template_type===2;const Me=v.value.pages.find(Le=>Le.is_front_page);x.value=Me?Me.type:1,e.value=!0,X.value=v.value.pages.reduce((Le,Pe,We)=>{if(!Pe.is_front_page){Pe.name||(Pe.name="");const Re={originalPage:JSON.parse(JSON.stringify(Pe)),title:Pe.name,id:`p-${Date.now()-We*9}`,items:[],components:Pe.components};Pe.components&&Pe.components.length>0&&(Re.items=Pe.components.map((je,Ne)=>{const ve=new ay(`FAWC-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,[],je.coreView.id,je.dynamicFilters,y.value,t.value,je.filtersJSON||null,Z.token),ye={originalComponent:JSON.parse(JSON.stringify(je)),title:je.title,game:v.value.game,idAux:je.id,id:`w-${Date.now()-Ne*7}`,x:je.column,y:je.row,w:je.colspan,h:je.rowspan,maxWidth:je.max_column,maxHeight:je.max_row,minWidth:je.min_column,minHeight:je.min_row,noResize:!t.value,noMove:!t.value,coreView:je.coreView||null,isTemplateMode:t.value,componentName:je.componentName,componentProps:ee({currentProps:je.componentProps,coreView:je.coreView,isTemplateMode:t.value,templateToEdit:v.value,game:v.value.game||null})||{},filterMultiple:je.filterMultiple,isHomeTeam:re({game:v.value.game,isTemplateMode:t.value,currentIsHomeTeam:je.isHomeTeam||je.componentProps.isHomeTeamForAnalysis}),filtersJSON:je.filtersJSON||null,dynamicFilters:je.dynamicFilters||[],filterAndViewsContainer:ve},ge=h.reactive({view:ye});return ve.addView(ge,!0),i.value.set(ve.getId(),ve),ye})),Le.push(Re)}return Le},[]),console.log("pages.value",X.value),console.log("isvisible.value",e.value)}function J({game:Te,isTemplateMode:Me}){const Le=Te&&Te.homeTeam&&Te.awayTeam&&(Te.homeTeam.team_id===Z.userTeamId||Te.awayTeam.team_id===Z.userTeamId);return{isUserTeamHome:Le&&Te.homeTeam.team_id===Z.userTeamId,requiresUserTeamAdjustment:Le&&!Me}}function re({game:Te,isTemplateMode:Me,currentIsHomeTeam:Le}){const{isUserTeamHome:Pe,requiresUserTeamAdjustment:We}=J({game:Te,isTemplateMode:Me});return We?Le?Pe:!Pe:Le}function ee({currentProps:Te,coreView:Me,templateToEdit:Le,isTemplateMode:Pe,game:We}){var Re,je,Ne,ve;if(!Te||!Me)return Te||{};const{isUserTeamHome:ye,requiresUserTeamAdjustment:ge}=J({game:We,isTemplateMode:Pe}),ze={...Te};if(Me.id===5&&(ze.isGhostEffect=Pe,ge)){const Ie=ze.preMatchType===1;ze.preMatchType=Ie?ye?1:2:ye?2:1}if(Me.id===7&&ge){const Ie=ze.isHomeTeamForAnalysis;ze.isHomeTeamForAnalysis=Ie?ye:!ye}if(Me.id===9&&ge){const Ie=ze.isHomeTeamForAnalysis;ze.isHomeTeamForAnalysis=Ie?ye:!ye}if(Me.id===10&&ge){const Ie=ze.isHomeTeamForAnalysis;ze.isHomeTeamForAnalysis=Ie?ye:!ye}if(Me.id===1&&(ze.gameId=We?We.id:"",ze.homeLogo=We?We.homeTeam.logo:"",ze.awayLogo=We?We.awayTeam.logo:"",ze.seasonId=We?We.season_id:0,ze.default=Pe),Me.id===6&&(ze.game=We||"",ze.lastGames=Le.last_games,ze.selectedOption=Le.template_type===2?"Postmatch":"Prematch"),Me.id===3&&(ze.defaultShields=Pe),Me.id===2){let Ie=!0,Ve=0,Ge=0;We&&(Ie=Le.main_team==We.home_team||Le.main_team==We.visiting_team,Ve=Ie?Le.main_team==(We==null?void 0:We.home_team)?We==null?void 0:We.home_team:We==null?void 0:We.visiting_team:We==null?void 0:We.home_team,Ge=Ie?Le.main_team==(We==null?void 0:We.home_team)?We==null?void 0:We.visiting_team:We==null?void 0:We.home_team:We==null?void 0:We.visiting_team),ze.gamed=We?We.id:"",ze.game=We||"",ze.season=We?We.season_id:0,ze.teamView=((je=(Re=Me==null?void 0:Me.filtersJSON)==null?void 0:Re.dynamicFilters[1])==null?void 0:je.selectedValue)==3?0:((ve=(Ne=Me==null?void 0:Me.filtersJSON)==null?void 0:Ne.dynamicFilters[1])==null?void 0:ve.selectedValue)==1?Ve:Ge,ze.useDummyData=Pe}return Me.id===8&&(ze.teamSelected=We?{teamId:We.home_team}:1,ze.isDefault=Pe),We&&(ze.game=We),ze}const Z=r,te=g;h.watch(()=>Z.token,(Te,Me)=>{console.log("Token changed:",{newToken:Te,oldToken:Me})},{immediate:!0}),a({show:ne}),xi.on("add-page-view",Te=>{console.log("88888888888888888888888888888888888888888888888888888888888888888"),console.log("viewConfig",Te),D.set(Te.view.id,Te.view);const Me=X.value.find(Le=>Le.id===Te.pageId);Me&&(Me.items||(Me.items=[]),Me.items.push(Te.view),h.nextTick(()=>{const Le=document.querySelector(`[gs-id="${Te.view.id}"]`);Te.grid.makeWidget(Le)}))}),xi.on("add-page-and-view",Te=>{const Me=X.value.findIndex(Le=>Le.id===Te.pageId);if(Me>-1){const Le=P(Me,!0);setTimeout(()=>{xi.emit("add-view",{pageId:Le.id,view:Te.view,filterAndWidgetContainer:Te.filterAndWidgetContainer}),s.value&&(Le.stepBackPage=s.value),s.value=Le},500)}else console.error("Page not found for adding view:",Te.pageId)}),xi.on("empty-page",Te=>{p.value&&d.value&&d.value.id===Te.id||(_e(Te),s.value&&s.value.id===Te.id&&(s.value.stepBackPage?s.value=s.value.stepBackPage:s.value=null))}),xi.on("filters-cancelled",Te=>{Te&&Te.removeAllChildViews()}),xi.on("activate-save-button",()=>{console.log("GSC-TemplateReportMaker - activate-save-button event received"),c.value=!0,console.log("GSC-TemplateReportMaker - isSaveActive set to true")});function ae(Te){return{...Te,gameId:Te.game_id,id:Te.game_id,seasonId:Te.season_id,status:Te.game_status,homeTeam:{logo:`https://golstatsimages.blob.core.windows.net/teams-150/${Te.home_team}.png`,team_id:Te.home_team,provisional_logo:`https://golstatsimages.blob.core.windows.net/teams-provisional/${Te.home_team}.png`,colloquial_name:Te.home_team_name,acronym:Te.home_team_acronym,team_name:Te.home_team_name},awayTeam:{logo:`https://golstatsimages.blob.core.windows.net/teams-150/${Te.visiting_team}.png`,team_id:Te.visiting_team,provisional_logo:`https://golstatsimages.blob.core.windows.net/teams-provisional/${Te.visiting_team}.png`,colloquial_name:Te.visiting_team_name,acronym:Te.visiting_team_acronym,team_name:Te.visiting_team_name}}}function oe(Te,Me=!1){Me||!t.value?(e.value=!1,Y(),te("close")):c.value?f.value=!0:(e.value=!1,Y(),te("close"))}function pe(){n.value=null,p.value=!1}function fe({page:Te,view:Me,applyMinimumSize:Le=!1}){const Pe=Te.grid;if(!Te||!Me||!Pe)return null;const We=Le?{w:Me.min_column,h:Me.min_row}:{w:Me.colspan,h:Me.rowspan},Re=Pe.willItFit(0,0,We.w,We.h,!0);return Re?{willFit:Re,applyMinimumSize:Le}:Le?null:fe({page:Te,view:Me,applyMinimumSize:!0})}const se=new Set([9]);function ue(Te){var Me,Le,Pe,We,Re,je,Ne;if(console.log("onFiltersChanged",Te),Te.dynamicFilters&&Te.dynamicFilters.length>0&&Te.viewToEdit&&Te.viewToEdit.view){const ve=Te.viewToEdit.view.id;X.value.forEach(ye=>{ye.items.forEach(ge=>{ge.id===ve&&ge.coreView&&ge.coreView.id===3&&(ge.componentProps.desplegable=Te.dynamicFilters[0]||!1,ge.componentProps.key=Te.dynamicFilters[0]||!1,h.nextTick(()=>{xi.emit("force-component-update",{itemId:ge.id,componentProps:ge.componentProps})}))})})}if(Te.viewToEdit){if(!Te.viewToEdit.view.filterAndViewsContainer){const ve=new ay(`FAWC-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,[Te.viewToEdit.view],((Me=Te.viewToEdit.view.coreView)==null?void 0:Me.id)||Te.viewToEdit.view.id,Te.dynamicFilters||[],y.value,t.value,Te.filtersJSON,Z.token);Te.viewToEdit.view.filterAndViewsContainer=ve}Te.viewToEdit.view.filterAndViewsContainer.updateView({view:Te.viewToEdit,dynamicFilters:Te.dynamicFilters||[],filtersJSON:Te.filtersJSON||null}),c.value=!0}else if(Te.view){Te.view.id&&Te.filterAndViewsContainer&&Te.view.id!==Te.filterAndViewsContainer.viewId&&(Te.filterAndViewsContainer.removeAllChildViews(),Te.filterAndViewsContainer.setViewId(Te.view.id),Te.filterAndViewsContainer.setFiltersJSON(Te.filtersJSON||null)),Te.view.id&&se.has(Te.view.id)&&Te.dynamicFilters[0]&&Te.dynamicFilters[0].length===0&&Te.filterAndViewsContainer&&(Te.filterAndViewsContainer.updateDynamicFilters(Te.dynamicFilters,(Pe=(Le=Te.viewToEdit)==null?void 0:Le.view)==null?void 0:Pe.id),c.value=!0);const ve=s.value||d.value,ye=fe({page:ve,view:Te.view,applyMinimumSize:!1});Te.view.filtersJSON=Te.filtersJSON||null;const ge=Te.filterAndViewsContainer,ze=X.value.findIndex(Ie=>Ie.id===ve.id);if(ge){const Ie=Te.filterAndViewsContainer.getRequiresAddView(Te.dynamicFilters);console.log("111111111111111111111111111111111"),console.log("requiersAddView",Ie),Ie?(ge.setDynamicFilters(Te.dynamicFilters),(ye||ze===X.value.length-1)&&(xi.emit("add-view",{pageId:ve.id,view:Te.view,filterAndWidgetContainer:ge,avoidWillFit:!1,applyMinimumSize:ye?ye.applyMinimumSize:!1,dynamicFilters:Te.dynamicFilters}),Te.filterAndViewsContainer.updateDynamicFilters(Te.dynamicFilters,(Re=(We=Te.viewToEdit)==null?void 0:We.view)==null?void 0:Re.id),c.value=!0,setTimeout(()=>{Te.filterAndViewsContainer.getRequiresAddView(Te.dynamicFilters)?(console.log("GSCtops - still requires add view, calling recursively"),ue(Te)):console.log("GSCtops - no more views needed, stopping recursion")},1e3))):(Te.filterAndViewsContainer.updateDynamicFilters(Te.dynamicFilters,(Ne=(je=Te.viewToEdit)==null?void 0:je.view)==null?void 0:Ne.id),c.value=!0)}else if(ye||ze===X.value.length-1){const Ie=new ay(`FAWC-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,[],Te.view.id,Te.dynamicFilters,y.value,t.value,Te.filtersJSON,Z.token);xi.emit("set-filter-and-views-container",Ie),i.value.set(Ie.getId(),Ie),Te.dynamicFilters&&Array.isArray(Te.dynamicFilters[0])?(Te.filterAndViewsContainer=Ie,ue(Te)):xi.emit("add-view",{pageId:ve.id,view:Te.view,filterAndWidgetContainer:Ie,avoidWillFit:!1,applyMinimumSize:ye?ye.applyMinimumSize:!1,dynamicFilters:Te.dynamicFilters}),c.value=!0}}}async function de(){if(c.value)try{const Te=[{is_front_page:!0,template_type:A.value.isPostMatch?2:1,type:A.value.id},...X.value.map(Le=>({columns:Le.originalPage?Le.originalPage.columns:12,rows:Le.originalPage?Le.originalPage.rows:12,gap:Le.originalPage?Le.originalPage.gap:10,name:Le.title,width:Le.originalPage?Le.originalPage.width:968,height:Le.originalPage?Le.originalPage.height:702,components:Le.items.map(Pe=>({min_column:Pe.minWidth,min_row:Pe.minHeight,max_column:Pe.maxWidth,max_row:Pe.maxHeight,column:Pe.x,row:Pe.y,colspan:Pe.w,rowspan:Pe.h,name:Pe.name,title:Pe.title,dynamicFilters:Pe.filterAndViewsContainer.getComponentDynamicFilters(Pe.id)||Pe.filterAndViewsContainer.getDynamicFilters()||[],coreView:Pe.coreView||null,componentName:Pe.componentName,componentProps:Pe.componentProps||{},isHomeTeam:Pe.isHomeTeam||Pe.componentProps.isHomeTeamForAnalysis,filterMultiple:Pe.filterMultiple}))}))];console.log("pagesAux",Te);const Me=await fetch(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${v.value.user_id}/templates/${v.value.id}/pages`,{method:"PATCH",headers:{Authorization:Z.token},body:JSON.stringify({pages:Te})});m.value=!0,await Me.json(),c.value=!1,setTimeout(()=>{m.value=!1},2e3)}catch(Te){console.error("Error saving template:",Te)}}function me(){X.value.forEach(Te=>{Te.offListeners&&Te.offListeners()})}function _e(Te){const Me=X.value.findIndex(Le=>Le.id===Te.id);Me>-1&&(me(),X.value=X.value.filter(Le=>Le.id!==Te.id),b.value>=Me&&(b.value=Math.max(0,b.value-1)),c.value=!0)}function be(){c.value=!0}function Se(Te){const Me=X.value.find(Le=>Le.items.some(Pe=>Pe.id===Te.id));if(Me){const Le=Me.items.findIndex(Pe=>Pe.id===Te.id);Le!==-1&&(Me.items.splice(Le,1),c.value=!0)}}function Ae(Te){console.log("onChangeSort",Te)}return(Te,Me)=>(h.openBlock(),h.createElementBlock(h.Fragment,null,[h.createVNode(due,{modelValue:f.value,"onUpdate:modelValue":Me[0]||(Me[0]=Le=>f.value=Le),onAction:M},null,8,["modelValue"]),h.createVNode(fue,{"model-value":m.value},null,8,["model-value"]),(h.openBlock(),h.createBlock(h.Teleport,{to:"body"},[e.value&&v.value?(h.openBlock(),h.createElementBlock("div",{key:0,class:"template-maker",style:h.normalizeStyle(T.value)},[h.withDirectives(h.createVNode(tue,{token:r.token,view:n.value,"is-post-match":y.value,onClose:pe,onFiltersChanged:ue},null,8,["token","view","is-post-match"]),[[h.vShow,t.value&&p.value]]),h.createElementVNode("div",mue,[h.createTextVNode(h.toDisplayString(v.value?v.value.name:"Nuevo template")+" ",1),h.createElementVNode("div",{class:"template-maker__header__close",onClick:oe},[w.value?h.createCommentVNode("",!0):(h.openBlock(),h.createElementBlock("svg",gue,[...Me[6]||(Me[6]=[h.createElementVNode("path",{d:"M1.33398 1.33398L14.6673 14.6673",stroke:"#FFFFFF","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),h.createElementVNode("path",{d:"M14.666 1.33398L1.33268 14.6673",stroke:"#FFFFFF","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])]))])]),h.createElementVNode("div",yue,[Me[13]||(Me[13]=h.createElementVNode("div",{class:"template-maker__content__sidebar"},null,-1)),h.createElementVNode("div",vue,[h.createElementVNode("div",xue,[h.createElementVNode("div",bue,[h.withDirectives(h.createVNode(QT,{"is-post-match":y.value,"initial-cover-id":x.value,onSelectCover:N},null,8,["is-post-match","initial-cover-id"]),[[h.vShow,t.value]])]),(h.openBlock(),h.createElementBlock("div",{class:"template-maker__content__main__pages",key:X.value.length},[A.value?(h.openBlock(),h.createBlock($le,{key:0,id:"page-0",game:v.value.game||null,"cover-id":A.value.id,"is-post-match":A.value.isPostMatch,onIntersectionChanged:Me[1]||(Me[1]=Le=>U(Le,-1))},null,8,["game","cover-id","is-post-match"])):h.createCommentVNode("",!0),t.value?(h.openBlock(),h.createElementBlock("div",{key:1,class:"new-items-buttons",style:h.normalizeStyle({"margin-bottom":X.value.length===0?"30px":"0"})},[p.value?h.createCommentVNode("",!0):(h.openBlock(),h.createElementBlock("div",{key:0,class:"new-items-buttons__add-page new-item-button",onClick:Me[2]||(Me[2]=Le=>P(-1))},[...Me[7]||(Me[7]=[h.createElementVNode("div",null,"+ Nueva página",-1),h.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[h.createElementVNode("path",{d:"M8.66797 1.33203H4.0013C3.64768 1.33203 3.30854 1.47251 3.05849 1.72256C2.80844 1.9726 2.66797 2.31174 2.66797 2.66536V13.332C2.66797 13.6857 2.80844 14.0248 3.05849 14.2748C3.30854 14.5249 3.64768 14.6654 4.0013 14.6654H12.0013C12.3549 14.6654 12.6941 14.5249 12.9441 14.2748C13.1942 14.0248 13.3346 13.6857 13.3346 13.332V5.9987L8.66797 1.33203Z",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"}),h.createElementVNode("path",{d:"M8.66797 1.33203V5.9987H13.3346",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])]))],4)):h.createCommentVNode("",!0),(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(X.value,(Le,Pe)=>(h.openBlock(),h.createElementBlock("div",{key:Pe,id:`page-${Pe+1}`,class:"template-maker__content__main__pages__page"},[h.createElementVNode("div",wue,[h.createElementVNode("div",Tue,"Pag "+h.toDisplayString(S(Pe+2)),1)]),A.value?(h.openBlock(),h.createBlock(tle,{key:0,page:Le,"is-template-mode":t.value,"is-post-match":A.value.isPostMatch,game:v.value.game||null,lastGames:v.value.lastGames||[],"is-filter-visible":p.value,onEditView:q,onIntersectionChanged:We=>U(We,Pe),onChangeSort:Ae,onDeletePage:_e,onViewChanged:be,onDeleteView:Se},null,8,["page","is-template-mode","is-post-match","game","lastGames","is-filter-visible","onIntersectionChanged"])):h.createCommentVNode("",!0),t.value&&!p.value?(h.openBlock(),h.createElementBlock("div",{key:1,class:"new-items-buttons",style:h.normalizeStyle({"margin-bottom":Pe+1===X.value.length?"30px":"0","margin-top":"10px"})},[h.createElementVNode("div",{class:"new-items-buttons__add-page new-item-button",onClick:We=>P(Pe)},[...Me[8]||(Me[8]=[h.createElementVNode("div",null,"+ Nueva página",-1),h.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[h.createElementVNode("path",{d:"M8.66797 1.33203H4.0013C3.64768 1.33203 3.30854 1.47251 3.05849 1.72256C2.80844 1.9726 2.66797 2.31174 2.66797 2.66536V13.332C2.66797 13.6857 2.80844 14.0248 3.05849 14.2748C3.30854 14.5249 3.64768 14.6654 4.0013 14.6654H12.0013C12.3549 14.6654 12.6941 14.5249 12.9441 14.2748C13.1942 14.0248 13.3346 13.6857 13.3346 13.332V5.9987L8.66797 1.33203Z",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"}),h.createElementVNode("path",{d:"M8.66797 1.33203V5.9987H13.3346",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],8,kue),h.createElementVNode("div",{class:"new-items-buttons__add-item new-item-button",onClick:We=>V(Le)},[...Me[9]||(Me[9]=[h.createElementVNode("div",null,"+ Agregar gráfico",-1),h.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[h.createElementVNode("path",{d:"M12 13.3346V6.66797",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"}),h.createElementVNode("path",{d:"M8 13.3346V2.66797",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"}),h.createElementVNode("path",{d:"M4 13.332V9.33203",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],8,Sue)],4)):h.createCommentVNode("",!0)],8,_ue))),128))]))]),w.value?h.createCommentVNode("",!0):(h.openBlock(),h.createElementBlock("div",Cue,[h.createElementVNode("div",Eue,[h.createElementVNode("div",Mue,[h.createElementVNode("div",null,"Páginas "+h.toDisplayString(C.value),1),h.createElementVNode("div",{class:h.normalizeClass(["template-maker__content__main__footer__paginator__nav__arrow",{disabled:b.value<=0}]),onClick:Me[3]||(Me[3]=Le=>b.value>0&&z(b.value-1))},[...Me[10]||(Me[10]=[h.createElementVNode("svg",{width:"6",height:"10",viewBox:"0 0 6 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[h.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.22444 5L5.29079 8.57741C5.56974 8.90285 5.56974 9.43049 5.29079 9.75592C5.01184 10.0814 4.55958 10.0814 4.28064 9.75592L0.709209 5.58926C0.430263 5.26382 0.430263 4.73618 0.709209 4.41074L4.28064 0.244078C4.55958 -0.0813593 5.01184 -0.0813592 5.29079 0.244078C5.56974 0.569515 5.56974 1.09715 5.29079 1.42259L2.22444 5Z",fill:"#92929D"})],-1)])],2),h.createElementVNode("div",{class:h.normalizeClass(["template-maker__content__main__footer__paginator__nav__arrow",{disabled:b.value>=X.value.length}]),onClick:Me[4]||(Me[4]=Le=>b.value<X.value.length&&z(b.value+1))},[...Me[11]||(Me[11]=[h.createElementVNode("svg",{width:"6",height:"10",viewBox:"0 0 6 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[h.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.77556 5L0.70921 8.57741C0.430264 8.90285 0.430264 9.43049 0.70921 9.75592C0.988156 10.0814 1.44042 10.0814 1.71936 9.75592L5.29079 5.58926C5.56974 5.26382 5.56974 4.73618 5.29079 4.41074L1.71936 0.244078C1.44042 -0.0813593 0.988155 -0.0813592 0.709209 0.244078C0.430264 0.569515 0.430264 1.09715 0.70921 1.42259L3.77556 5Z",fill:"#92929D"})],-1)])],2)]),h.createElementVNode("div",Aue,[h.createElementVNode("div",{role:"button",class:h.normalizeClass({active:b.value===0}),onClick:Me[5]||(Me[5]=Le=>z(0))},h.toDisplayString(S(1)),3),(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(X.value,(Le,Pe)=>(h.openBlock(),h.createElementBlock("div",{role:"button",key:Pe,class:h.normalizeClass({active:Pe+1===b.value}),onClick:We=>z(Pe+1)},h.toDisplayString(S(Pe+2)),11,Lue))),128))])]),t.value?(h.openBlock(),h.createElementBlock("div",{key:0,role:"button",class:h.normalizeClass(["template-maker__content__main__footer__save save-button",{disabled:!c.value}]),onClick:de},[...Me[12]||(Me[12]=[h.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[h.createElementVNode("path",{d:"M12.6667 14H3.33333C2.97971 14 2.64057 13.8595 2.39052 13.6095C2.14048 13.3594 2 13.0203 2 12.6667V3.33333C2 2.97971 2.14048 2.64057 2.39052 2.39052C2.64057 2.14048 2.97971 2 3.33333 2H10.6667L14 5.33333V12.6667C14 13.0203 13.8595 13.3594 13.6095 13.6095C13.3594 13.8595 13.0203 14 12.6667 14Z",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"}),h.createElementVNode("path",{d:"M11.3346 14.0013V8.66797H4.66797V14.0013",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"}),h.createElementVNode("path",{d:"M4.66797 2V5.33333H10.0013",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"})],-1),h.createElementVNode("div",null,"Guardar",-1)])],2)):h.createCommentVNode("",!0)]))])])],4)):h.createCommentVNode("",!0)]))],64))}},Nue=dd(Rue,[["__scopeId","data-v-98ee0802"]]);function z6(r,a){return function(){return r.apply(a,arguments)}}const{toString:Iue}=Object.prototype,{getPrototypeOf:H2}=Object,{iterator:oy,toStringTag:B6}=Symbol,sy=(r=>a=>{const g=Iue.call(a);return r[g]||(r[g]=g.slice(8,-1).toLowerCase())})(Object.create(null)),ed=r=>(r=r.toLowerCase(),a=>sy(a)===r),ly=r=>a=>typeof a===r,{isArray:Uh}=Array,im=ly("undefined");function am(r){return r!==null&&!im(r)&&r.constructor!==null&&!im(r.constructor)&&fu(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}const D6=ed("ArrayBuffer");function Pue(r){let a;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?a=ArrayBuffer.isView(r):a=r&&r.buffer&&D6(r.buffer),a}const Oue=ly("string"),fu=ly("function"),V6=ly("number"),om=r=>r!==null&&typeof r=="object",zue=r=>r===!0||r===!1,cy=r=>{if(sy(r)!=="object")return!1;const a=H2(r);return(a===null||a===Object.prototype||Object.getPrototypeOf(a)===null)&&!(B6 in r)&&!(oy in r)},Bue=r=>{if(!om(r)||am(r))return!1;try{return Object.keys(r).length===0&&Object.getPrototypeOf(r)===Object.prototype}catch{return!1}},Due=ed("Date"),Vue=ed("File"),Fue=ed("Blob"),jue=ed("FileList"),Uue=r=>om(r)&&fu(r.pipe),que=r=>{let a;return r&&(typeof FormData=="function"&&r instanceof FormData||fu(r.append)&&((a=sy(r))==="formdata"||a==="object"&&fu(r.toString)&&r.toString()==="[object FormData]"))},Wue=ed("URLSearchParams"),[Gue,Hue,Jue,Kue]=["ReadableStream","Request","Response","Headers"].map(ed),Xue=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function sm(r,a,{allOwnKeys:g=!1}={}){if(r===null||typeof r>"u")return;let D,X;if(typeof r!="object"&&(r=[r]),Uh(r))for(D=0,X=r.length;D<X;D++)a.call(null,r[D],D,r);else{if(am(r))return;const A=g?Object.getOwnPropertyNames(r):Object.keys(r),b=A.length;let e;for(D=0;D<b;D++)e=A[D],a.call(null,r[e],e,r)}}function F6(r,a){if(am(r))return null;a=a.toLowerCase();const g=Object.keys(r);let D=g.length,X;for(;D-- >0;)if(X=g[D],a===X.toLowerCase())return X;return null}const Yp=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,j6=r=>!im(r)&&r!==Yp;function J2(){const{caseless:r}=j6(this)&&this||{},a={},g=(D,X)=>{const A=r&&F6(a,X)||X;cy(a[A])&&cy(D)?a[A]=J2(a[A],D):cy(D)?a[A]=J2({},D):Uh(D)?a[A]=D.slice():a[A]=D};for(let D=0,X=arguments.length;D<X;D++)arguments[D]&&sm(arguments[D],g);return a}const Zue=(r,a,g,{allOwnKeys:D}={})=>(sm(a,(X,A)=>{g&&fu(X)?r[A]=z6(X,g):r[A]=X},{allOwnKeys:D}),r),Yue=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),Que=(r,a,g,D)=>{r.prototype=Object.create(a.prototype,D),r.prototype.constructor=r,Object.defineProperty(r,"super",{value:a.prototype}),g&&Object.assign(r.prototype,g)},$ue=(r,a,g,D)=>{let X,A,b;const e={};if(a=a||{},r==null)return a;do{for(X=Object.getOwnPropertyNames(r),A=X.length;A-- >0;)b=X[A],(!D||D(b,r,a))&&!e[b]&&(a[b]=r[b],e[b]=!0);r=g!==!1&&H2(r)}while(r&&(!g||g(r,a))&&r!==Object.prototype);return a},ede=(r,a,g)=>{r=String(r),(g===void 0||g>r.length)&&(g=r.length),g-=a.length;const D=r.indexOf(a,g);return D!==-1&&D===g},tde=r=>{if(!r)return null;if(Uh(r))return r;let a=r.length;if(!V6(a))return null;const g=new Array(a);for(;a-- >0;)g[a]=r[a];return g},rde=(r=>a=>r&&a instanceof r)(typeof Uint8Array<"u"&&H2(Uint8Array)),nde=(r,a)=>{const D=(r&&r[oy]).call(r);let X;for(;(X=D.next())&&!X.done;){const A=X.value;a.call(r,A[0],A[1])}},ide=(r,a)=>{let g;const D=[];for(;(g=r.exec(a))!==null;)D.push(g);return D},ade=ed("HTMLFormElement"),ode=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(g,D,X){return D.toUpperCase()+X}),U6=(({hasOwnProperty:r})=>(a,g)=>r.call(a,g))(Object.prototype),sde=ed("RegExp"),q6=(r,a)=>{const g=Object.getOwnPropertyDescriptors(r),D={};sm(g,(X,A)=>{let b;(b=a(X,A,r))!==!1&&(D[A]=b||X)}),Object.defineProperties(r,D)},lde=r=>{q6(r,(a,g)=>{if(fu(r)&&["arguments","caller","callee"].indexOf(g)!==-1)return!1;const D=r[g];if(fu(D)){if(a.enumerable=!1,"writable"in a){a.writable=!1;return}a.set||(a.set=()=>{throw Error("Can not rewrite read-only method '"+g+"'")})}})},cde=(r,a)=>{const g={},D=X=>{X.forEach(A=>{g[A]=!0})};return Uh(r)?D(r):D(String(r).split(a)),g},ude=()=>{},dde=(r,a)=>r!=null&&Number.isFinite(r=+r)?r:a;function pde(r){return!!(r&&fu(r.append)&&r[B6]==="FormData"&&r[oy])}const hde=r=>{const a=new Array(10),g=(D,X)=>{if(om(D)){if(a.indexOf(D)>=0)return;if(am(D))return D;if(!("toJSON"in D)){a[X]=D;const A=Uh(D)?[]:{};return sm(D,(b,e)=>{const v=g(b,X+1);!im(v)&&(A[e]=v)}),a[X]=void 0,A}}return D};return g(r,0)},fde=ed("AsyncFunction"),mde=r=>r&&(om(r)||fu(r))&&fu(r.then)&&fu(r.catch),W6=((r,a)=>r?setImmediate:a?((g,D)=>(Yp.addEventListener("message",({source:X,data:A})=>{X===Yp&&A===g&&D.length&&D.shift()()},!1),X=>{D.push(X),Yp.postMessage(g,"*")}))(`axios@${Math.random()}`,[]):g=>setTimeout(g))(typeof setImmediate=="function",fu(Yp.postMessage)),gde=typeof queueMicrotask<"u"?queueMicrotask.bind(Yp):typeof process<"u"&&process.nextTick||W6,Hn={isArray:Uh,isArrayBuffer:D6,isBuffer:am,isFormData:que,isArrayBufferView:Pue,isString:Oue,isNumber:V6,isBoolean:zue,isObject:om,isPlainObject:cy,isEmptyObject:Bue,isReadableStream:Gue,isRequest:Hue,isResponse:Jue,isHeaders:Kue,isUndefined:im,isDate:Due,isFile:Vue,isBlob:Fue,isRegExp:sde,isFunction:fu,isStream:Uue,isURLSearchParams:Wue,isTypedArray:rde,isFileList:jue,forEach:sm,merge:J2,extend:Zue,trim:Xue,stripBOM:Yue,inherits:Que,toFlatObject:$ue,kindOf:sy,kindOfTest:ed,endsWith:ede,toArray:tde,forEachEntry:nde,matchAll:ide,isHTMLForm:ade,hasOwnProperty:U6,hasOwnProp:U6,reduceDescriptors:q6,freezeMethods:lde,toObjectSet:cde,toCamelCase:ode,noop:ude,toFiniteNumber:dde,findKey:F6,global:Yp,isContextDefined:j6,isSpecCompliantForm:pde,toJSONObject:hde,isAsyncFn:fde,isThenable:mde,setImmediate:W6,asap:gde,isIterable:r=>r!=null&&fu(r[oy])};function va(r,a,g,D,X){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=r,this.name="AxiosError",a&&(this.code=a),g&&(this.config=g),D&&(this.request=D),X&&(this.response=X,this.status=X.status?X.status:null)}Hn.inherits(va,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Hn.toJSONObject(this.config),code:this.code,status:this.status}}});const G6=va.prototype,H6={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(r=>{H6[r]={value:r}}),Object.defineProperties(va,H6),Object.defineProperty(G6,"isAxiosError",{value:!0}),va.from=(r,a,g,D,X,A)=>{const b=Object.create(G6);return Hn.toFlatObject(r,b,function(v){return v!==Error.prototype},e=>e!=="isAxiosError"),va.call(b,r.message,a,g,D,X),b.cause=r,b.name=r.name,A&&Object.assign(b,A),b};const yde=null;function K2(r){return Hn.isPlainObject(r)||Hn.isArray(r)}function J6(r){return Hn.endsWith(r,"[]")?r.slice(0,-2):r}function K6(r,a,g){return r?r.concat(a).map(function(X,A){return X=J6(X),!g&&A?"["+X+"]":X}).join(g?".":""):a}function vde(r){return Hn.isArray(r)&&!r.some(K2)}const xde=Hn.toFlatObject(Hn,{},null,function(a){return/^is[A-Z]/.test(a)});function uy(r,a,g){if(!Hn.isObject(r))throw new TypeError("target must be an object");a=a||new FormData,g=Hn.toFlatObject(g,{metaTokens:!0,dots:!1,indexes:!1},!1,function(n,i){return!Hn.isUndefined(i[n])});const D=g.metaTokens,X=g.visitor||t,A=g.dots,b=g.indexes,v=(g.Blob||typeof Blob<"u"&&Blob)&&Hn.isSpecCompliantForm(a);if(!Hn.isFunction(X))throw new TypeError("visitor must be a function");function u(p){if(p===null)return"";if(Hn.isDate(p))return p.toISOString();if(Hn.isBoolean(p))return p.toString();if(!v&&Hn.isBlob(p))throw new va("Blob is not supported. Use a Buffer instead.");return Hn.isArrayBuffer(p)||Hn.isTypedArray(p)?v&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function t(p,n,i){let d=p;if(p&&!i&&typeof p=="object"){if(Hn.endsWith(n,"{}"))n=D?n:n.slice(0,-2),p=JSON.stringify(p);else if(Hn.isArray(p)&&vde(p)||(Hn.isFileList(p)||Hn.endsWith(n,"[]"))&&(d=Hn.toArray(p)))return n=J6(n),d.forEach(function(c,f){!(Hn.isUndefined(c)||c===null)&&a.append(b===!0?K6([n],f,A):b===null?n:n+"[]",u(c))}),!1}return K2(p)?!0:(a.append(K6(i,n,A),u(p)),!1)}const w=[],y=Object.assign(xde,{defaultVisitor:t,convertValue:u,isVisitable:K2});function x(p,n){if(!Hn.isUndefined(p)){if(w.indexOf(p)!==-1)throw Error("Circular reference detected in "+n.join("."));w.push(p),Hn.forEach(p,function(d,s){(!(Hn.isUndefined(d)||d===null)&&X.call(a,d,Hn.isString(s)?s.trim():s,n,y))===!0&&x(d,n?n.concat(s):[s])}),w.pop()}}if(!Hn.isObject(r))throw new TypeError("data must be an object");return x(r),a}function X6(r){const a={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,function(D){return a[D]})}function X2(r,a){this._pairs=[],r&&uy(r,this,a)}const Z6=X2.prototype;Z6.append=function(a,g){this._pairs.push([a,g])},Z6.toString=function(a){const g=a?function(D){return a.call(this,D,X6)}:X6;return this._pairs.map(function(X){return g(X[0])+"="+g(X[1])},"").join("&")};function bde(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Y6(r,a,g){if(!a)return r;const D=g&&g.encode||bde;Hn.isFunction(g)&&(g={serialize:g});const X=g&&g.serialize;let A;if(X?A=X(a,g):A=Hn.isURLSearchParams(a)?a.toString():new X2(a,g).toString(D),A){const b=r.indexOf("#");b!==-1&&(r=r.slice(0,b)),r+=(r.indexOf("?")===-1?"?":"&")+A}return r}class Q6{constructor(){this.handlers=[]}use(a,g,D){return this.handlers.push({fulfilled:a,rejected:g,synchronous:D?D.synchronous:!1,runWhen:D?D.runWhen:null}),this.handlers.length-1}eject(a){this.handlers[a]&&(this.handlers[a]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(a){Hn.forEach(this.handlers,function(D){D!==null&&a(D)})}}const $6={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},_de={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:X2,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Z2=typeof window<"u"&&typeof document<"u",Y2=typeof navigator=="object"&&navigator||void 0,wde=Z2&&(!Y2||["ReactNative","NativeScript","NS"].indexOf(Y2.product)<0),Tde=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",kde=Z2&&window.location.href||"http://localhost",Rc={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Z2,hasStandardBrowserEnv:wde,hasStandardBrowserWebWorkerEnv:Tde,navigator:Y2,origin:kde},Symbol.toStringTag,{value:"Module"})),..._de};function Sde(r,a){return uy(r,new Rc.classes.URLSearchParams,{visitor:function(g,D,X,A){return Rc.isNode&&Hn.isBuffer(g)?(this.append(D,g.toString("base64")),!1):A.defaultVisitor.apply(this,arguments)},...a})}function Cde(r){return Hn.matchAll(/\w+|\[(\w*)]/g,r).map(a=>a[0]==="[]"?"":a[1]||a[0])}function Ede(r){const a={},g=Object.keys(r);let D;const X=g.length;let A;for(D=0;D<X;D++)A=g[D],a[A]=r[A];return a}function eT(r){function a(g,D,X,A){let b=g[A++];if(b==="__proto__")return!0;const e=Number.isFinite(+b),v=A>=g.length;return b=!b&&Hn.isArray(X)?X.length:b,v?(Hn.hasOwnProp(X,b)?X[b]=[X[b],D]:X[b]=D,!e):((!X[b]||!Hn.isObject(X[b]))&&(X[b]=[]),a(g,D,X[b],A)&&Hn.isArray(X[b])&&(X[b]=Ede(X[b])),!e)}if(Hn.isFormData(r)&&Hn.isFunction(r.entries)){const g={};return Hn.forEachEntry(r,(D,X)=>{a(Cde(D),X,g,0)}),g}return null}function Mde(r,a,g){if(Hn.isString(r))try{return(a||JSON.parse)(r),Hn.trim(r)}catch(D){if(D.name!=="SyntaxError")throw D}return(g||JSON.stringify)(r)}const lm={transitional:$6,adapter:["xhr","http","fetch"],transformRequest:[function(a,g){const D=g.getContentType()||"",X=D.indexOf("application/json")>-1,A=Hn.isObject(a);if(A&&Hn.isHTMLForm(a)&&(a=new FormData(a)),Hn.isFormData(a))return X?JSON.stringify(eT(a)):a;if(Hn.isArrayBuffer(a)||Hn.isBuffer(a)||Hn.isStream(a)||Hn.isFile(a)||Hn.isBlob(a)||Hn.isReadableStream(a))return a;if(Hn.isArrayBufferView(a))return a.buffer;if(Hn.isURLSearchParams(a))return g.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),a.toString();let e;if(A){if(D.indexOf("application/x-www-form-urlencoded")>-1)return Sde(a,this.formSerializer).toString();if((e=Hn.isFileList(a))||D.indexOf("multipart/form-data")>-1){const v=this.env&&this.env.FormData;return uy(e?{"files[]":a}:a,v&&new v,this.formSerializer)}}return A||X?(g.setContentType("application/json",!1),Mde(a)):a}],transformResponse:[function(a){const g=this.transitional||lm.transitional,D=g&&g.forcedJSONParsing,X=this.responseType==="json";if(Hn.isResponse(a)||Hn.isReadableStream(a))return a;if(a&&Hn.isString(a)&&(D&&!this.responseType||X)){const b=!(g&&g.silentJSONParsing)&&X;try{return JSON.parse(a)}catch(e){if(b)throw e.name==="SyntaxError"?va.from(e,va.ERR_BAD_RESPONSE,this,null,this.response):e}}return a}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Rc.classes.FormData,Blob:Rc.classes.Blob},validateStatus:function(a){return a>=200&&a<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Hn.forEach(["delete","get","head","post","put","patch"],r=>{lm.headers[r]={}});const Ade=Hn.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Lde=r=>{const a={};let g,D,X;return r&&r.split(`
4081
+ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.`)),D}static addGrid(a,g={}){if(!a)return null;let D=a;if(D.gridstack){const X=D.gridstack;return g&&(X.opts={...X.opts,...g}),g.children!==void 0&&X.load(g.children),X}return(!a.classList.contains("grid-stack")||Wi.addRemoveCB)&&(Wi.addRemoveCB?D=Wi.addRemoveCB(a,g,!0,!0):D=zn.createDiv(["grid-stack",g.class],a)),Wi.init(g,D)}static registerEngine(a){Wi.engineClass=a}get placeholder(){if(!this._placeholder){this._placeholder=zn.createDiv([this.opts.placeholderClass,Mu.itemClass,this.opts.itemClass]);const a=zn.createDiv(["placeholder-content"],this._placeholder);this.opts.placeholderText&&(a.textContent=this.opts.placeholderText)}return this._placeholder}constructor(a,g={}){var D;this.el=a,this.opts=g,this.animationDelay=310,this._gsEventHandler={},this._extraDragRow=0,this.dragTransform={xScale:1,yScale:1,xOffset:0,yOffset:0},a.gridstack=this,this.opts=g=g||{},a.classList.contains("grid-stack")||this.el.classList.add("grid-stack"),g.row&&(g.minRow=g.maxRow=g.row,delete g.row);const X=zn.toNumber(a.getAttribute("gs-row"));g.column==="auto"&&delete g.column,g.alwaysShowResizeHandle!==void 0&&(g._alwaysShowResizeHandle=g.alwaysShowResizeHandle);const A=g.columnOpts;if(A){const t=A.breakpoints;!A.columnWidth&&!(t!=null&&t.length)?delete g.columnOpts:(A.columnMax=A.columnMax||12,(t==null?void 0:t.length)>1&&t.sort((w,y)=>(y.w||0)-(w.w||0)))}const b={...zn.cloneDeep(Mu),column:zn.toNumber(a.getAttribute("gs-column"))||Mu.column,minRow:X||zn.toNumber(a.getAttribute("gs-min-row"))||Mu.minRow,maxRow:X||zn.toNumber(a.getAttribute("gs-max-row"))||Mu.maxRow,staticGrid:zn.toBool(a.getAttribute("gs-static"))||Mu.staticGrid,sizeToContent:zn.toBool(a.getAttribute("gs-size-to-content"))||void 0,draggable:{handle:(g.handleClass?"."+g.handleClass:g.handle?g.handle:"")||Mu.draggable.handle},removableOptions:{accept:g.itemClass||Mu.removableOptions.accept,decline:Mu.removableOptions.decline}};a.getAttribute("gs-animate")&&(b.animate=zn.toBool(a.getAttribute("gs-animate"))),g=zn.defaults(g,b),this._initMargin(),this.checkDynamicColumn(),this._updateColumnVar(g),g.rtl==="auto"&&(g.rtl=a.style.direction==="rtl"),g.rtl&&this.el.classList.add("grid-stack-rtl");const e=this.el.closest("."+Mu.itemClass),v=e==null?void 0:e.gridstackNode;if(v&&(v.subGrid=this,this.parentGridNode=v,this.el.classList.add("grid-stack-nested"),v.el.classList.add("grid-stack-sub-grid")),this._isAutoCellHeight=g.cellHeight==="auto",this._isAutoCellHeight||g.cellHeight==="initial")this.cellHeight(void 0);else{typeof g.cellHeight=="number"&&g.cellHeightUnit&&g.cellHeightUnit!==Mu.cellHeightUnit&&(g.cellHeight=g.cellHeight+g.cellHeightUnit,delete g.cellHeightUnit);const t=g.cellHeight;delete g.cellHeight,this.cellHeight(t)}g.alwaysShowResizeHandle==="mobile"&&(g.alwaysShowResizeHandle=$u),this._setStaticClass();const u=g.engineClass||Wi.engineClass||Dd;if(this.engine=new u({column:this.getColumn(),float:g.float,maxRow:g.maxRow,onChange:t=>{t.forEach(w=>{const y=w.el;y&&(w._removeDOM?(y&&y.remove(),delete w._removeDOM):this._writePosAttr(y,w))}),this._updateContainerHeight()}}),g.auto&&(this.batchUpdate(),this.engine._loading=!0,this.getGridItems().forEach(t=>this._prepareElement(t)),delete this.engine._loading,this.batchUpdate(!1)),g.children){const t=g.children;delete g.children,t.length&&this.load(t)}this.setAnimation(),g.subGridDynamic&&!Zi.pauseDrag&&(Zi.pauseDrag=!0),((D=g.draggable)==null?void 0:D.pause)!==void 0&&(Zi.pauseDrag=g.draggable.pause),this._setupRemoveDrop(),this._setupAcceptWidget(),this._updateResizeEvent()}_updateColumnVar(a=this.opts){this.el.classList.add("gs-"+a.column),typeof a.column=="number"&&this.el.style.setProperty("--gs-column-width",`${100/a.column}%`)}addWidget(a){if(!a)return;if(typeof a=="string"){console.error("V11: GridStack.addWidget() does not support string anymore. see #2736");return}if(a.ELEMENT_NODE)return console.error("V11: GridStack.addWidget() does not support HTMLElement anymore. use makeWidget()"),this.makeWidget(a);let g,D=a;if(D.grid=this,D.el?g=D.el:Wi.addRemoveCB?g=Wi.addRemoveCB(this.el,a,!0,!1):g=this.createWidgetDivs(D),!g)return;if(D=g.gridstackNode,D&&g.parentElement===this.el&&this.engine.nodes.find(A=>A._id===D._id))return g;const X=this._readAttr(g);return zn.defaults(a,X),this.engine.prepareNode(a),this.el.appendChild(g),this.makeWidget(g,a),g}createWidgetDivs(a){const g=zn.createDiv(["grid-stack-item",this.opts.itemClass]),D=zn.createDiv(["grid-stack-item-content"],g);return zn.lazyLoad(a)?a.visibleObservable||(a.visibleObservable=new IntersectionObserver(([X])=>{var A,b;X.isIntersecting&&((A=a.visibleObservable)==null||A.disconnect(),delete a.visibleObservable,Wi.renderCB(D,a),(b=a.grid)==null||b.prepareDragDrop(a.el))}),window.setTimeout(()=>{var X;return(X=a.visibleObservable)==null?void 0:X.observe(g)})):Wi.renderCB(D,a),g}makeSubGrid(a,g,D,X=!0){var A,b,e;let v=a.gridstackNode;if(v||(v=this.makeWidget(a).gridstackNode),(A=v.subGrid)!=null&&A.el)return v.subGrid;let u,t=this;for(;t&&!u;)u=(b=t.opts)==null?void 0:b.subGridOpts,t=(e=t.parentGridNode)==null?void 0:e.grid;g=zn.cloneDeep({...this.opts,id:void 0,children:void 0,column:"auto",columnOpts:void 0,layout:"list",subGridOpts:void 0,...u||{},...g||v.subGridOpts||{}}),v.subGridOpts=g;let w;g.column==="auto"&&(w=!0,g.column=Math.max(v.w||1,(D==null?void 0:D.w)||1),delete g.columnOpts);let y=v.el.querySelector(".grid-stack-item-content"),x,p;if(X&&(this._removeDD(v.el),p={...v,x:0,y:0},zn.removeInternalForSave(p),delete p.subGridOpts,v.content&&(p.content=v.content,delete v.content),Wi.addRemoveCB?x=Wi.addRemoveCB(this.el,p,!0,!1):(x=zn.createDiv(["grid-stack-item"]),x.appendChild(y),y=zn.createDiv(["grid-stack-item-content"],v.el)),this.prepareDragDrop(v.el)),D){const i=w?g.column:v.w,d=v.h+D.h,s=v.el.style;s.transition="none",this.update(v.el,{w:i,h:d}),setTimeout(()=>s.transition=null)}const n=v.subGrid=Wi.addGrid(y,g);return D!=null&&D._moving&&(n._isTemp=!0),w&&(n._autoColumn=!0),X&&n.makeWidget(x,p),D&&(D._moving?window.setTimeout(()=>zn.simulateMouseEvent(D._event,"mouseenter",n.el),0):n.makeWidget(v.el,v)),this.resizeToContentCheck(!1,v),n}removeAsSubGrid(a){var g;const D=(g=this.parentGridNode)==null?void 0:g.grid;D&&(D.batchUpdate(),D.removeWidget(this.parentGridNode.el,!0,!0),this.engine.nodes.forEach(X=>{X.x+=this.parentGridNode.x,X.y+=this.parentGridNode.y,D.makeWidget(X.el,X)}),D.batchUpdate(!1),this.parentGridNode&&delete this.parentGridNode.subGrid,delete this.parentGridNode,a&&window.setTimeout(()=>zn.simulateMouseEvent(a._event,"mouseenter",D.el),0))}save(a=!0,g=!1,D=Wi.saveCB,X){const A=this.engine.save(a,D,X);if(A.forEach(b=>{var e;if(a&&b.el&&!b.subGrid&&!D){const v=b.el.querySelector(".grid-stack-item-content");b.content=v==null?void 0:v.innerHTML,b.content||delete b.content}else if(!a&&!D&&delete b.content,(e=b.subGrid)!=null&&e.el){const v=b.w||b.subGrid.getColumn(),u=b.subGrid.save(a,g,D,v);b.subGridOpts=g?u:{children:u},delete b.subGrid}delete b.el}),g){const b=zn.cloneDeep(this.opts);b.marginBottom===b.marginTop&&b.marginRight===b.marginLeft&&b.marginTop===b.marginRight&&(b.margin=b.marginTop,delete b.marginTop,delete b.marginRight,delete b.marginBottom,delete b.marginLeft),b.rtl===(this.el.style.direction==="rtl")&&(b.rtl="auto"),this._isAutoCellHeight&&(b.cellHeight="auto"),this._autoColumn&&(b.column="auto");const e=b._alwaysShowResizeHandle;return delete b._alwaysShowResizeHandle,e!==void 0?b.alwaysShowResizeHandle=e:delete b.alwaysShowResizeHandle,zn.removeInternalAndSame(b,Mu),b.children=A,b}return A}load(a,g=Wi.addRemoveCB||!0){a=zn.cloneDeep(a);const D=this.getColumn();a.forEach(t=>{t.w=t.w||t.minW||1,t.h=t.h||t.minH||1}),a=zn.sort(a),this.engine.skipCacheUpdate=this._ignoreLayoutsNodeChange=!0;let X=0;a.forEach(t=>{X=Math.max(X,(t.x||0)+t.w)}),X>this.engine.defaultColumn&&(this.engine.defaultColumn=X),X>D&&(this.engine.nodes.length===0&&this.responseLayout?(this.engine.nodes=a,this.engine.columnChanged(X,D,this.responseLayout),a=this.engine.nodes,this.engine.nodes=[],delete this.responseLayout):this.engine.cacheLayout(a,X,!0));const A=Wi.addRemoveCB;typeof g=="function"&&(Wi.addRemoveCB=g);const b=[];this.batchUpdate();const e=!this.engine.nodes.length,v=e&&this.opts.animate;v&&this.setAnimation(!1),!e&&g&&[...this.engine.nodes].forEach(t=>{t.id&&(zn.find(a,t.id)||(Wi.addRemoveCB&&Wi.addRemoveCB(this.el,t,!1,!1),b.push(t),this.removeWidget(t.el,!0,!1)))}),this.engine._loading=!0;const u=[];return this.engine.nodes=this.engine.nodes.filter(t=>zn.find(a,t.id)?(u.push(t),!1):!0),a.forEach(t=>{var w;const y=zn.find(u,t.id);if(y){if(zn.shouldSizeToContent(y)&&(t.h=y.h),this.engine.nodeBoundFix(t),(t.autoPosition||t.x===void 0||t.y===void 0)&&(t.w=t.w||y.w,t.h=t.h||y.h,this.engine.findEmptyPosition(t)),this.engine.nodes.push(y),zn.samePos(y,t)&&this.engine.nodes.length>1&&(this.moveNode(y,{...t,forceCollide:!0}),zn.copyPos(t,y)),this.update(y.el,t),(w=t.subGridOpts)!=null&&w.children){const x=y.el.querySelector(".grid-stack");x&&x.gridstack&&x.gridstack.load(t.subGridOpts.children)}}else g&&this.addWidget(t)}),delete this.engine._loading,this.engine.removedNodes=b,this.batchUpdate(!1),delete this._ignoreLayoutsNodeChange,delete this.engine.skipCacheUpdate,A?Wi.addRemoveCB=A:delete Wi.addRemoveCB,v&&this.setAnimation(!0,!0),this}batchUpdate(a=!0){return this.engine.batchUpdate(a),a||(this._updateContainerHeight(),this._triggerRemoveEvent(),this._triggerAddEvent(),this._triggerChangeEvent()),this}getCellHeight(a=!1){if(this.opts.cellHeight&&this.opts.cellHeight!=="auto"&&(!a||!this.opts.cellHeightUnit||this.opts.cellHeightUnit==="px"))return this.opts.cellHeight;if(this.opts.cellHeightUnit==="rem")return this.opts.cellHeight*parseFloat(getComputedStyle(document.documentElement).fontSize);if(this.opts.cellHeightUnit==="em")return this.opts.cellHeight*parseFloat(getComputedStyle(this.el).fontSize);if(this.opts.cellHeightUnit==="cm")return this.opts.cellHeight*(96/2.54);if(this.opts.cellHeightUnit==="mm")return this.opts.cellHeight*(96/2.54)/10;const g=this.el.querySelector("."+this.opts.itemClass);if(g){const X=zn.toNumber(g.getAttribute("gs-h"))||1;return Math.round(g.offsetHeight/X)}const D=parseInt(this.el.getAttribute("gs-current-row"));return D?Math.round(this.el.getBoundingClientRect().height/D):this.opts.cellHeight}cellHeight(a){if(a!==void 0&&this._isAutoCellHeight!==(a==="auto")&&(this._isAutoCellHeight=a==="auto",this._updateResizeEvent()),(a==="initial"||a==="auto")&&(a=void 0),a===void 0){const D=-this.opts.marginRight-this.opts.marginLeft+this.opts.marginTop+this.opts.marginBottom;a=this.cellWidth()+D}const g=zn.parseHeight(a);return this.opts.cellHeightUnit===g.unit&&this.opts.cellHeight===g.h?this:(this.opts.cellHeightUnit=g.unit,this.opts.cellHeight=g.h,this.el.style.setProperty("--gs-cell-height",`${this.opts.cellHeight}${this.opts.cellHeightUnit}`),this._updateContainerHeight(),this.resizeToContentCheck(),this)}cellWidth(){return this._widthOrContainer()/this.getColumn()}_widthOrContainer(a=!1){var g;return a&&(g=this.opts.columnOpts)!=null&&g.breakpointForWindow?window.innerWidth:this.el.clientWidth||this.el.parentElement.clientWidth||window.innerWidth}checkDynamicColumn(){var a,g;const D=this.opts.columnOpts;if(!D||!D.columnWidth&&!((a=D.breakpoints)!=null&&a.length))return!1;const X=this.getColumn();let A=X;const b=this._widthOrContainer(!0);if(D.columnWidth)A=Math.min(Math.round(b/D.columnWidth)||1,D.columnMax);else{A=D.columnMax;let e=0;for(;e<D.breakpoints.length&&b<=D.breakpoints[e].w;)A=D.breakpoints[e++].c||X}if(A!==X){const e=(g=D.breakpoints)==null?void 0:g.find(v=>v.c===A);return this.column(A,(e==null?void 0:e.layout)||D.layout),!0}return!1}compact(a="compact",g=!0){return this.engine.compact(a,g),this._triggerChangeEvent(),this}column(a,g="moveScale"){if(!a||a<1||this.opts.column===a)return this;const D=this.getColumn();return this.opts.column=a,this.engine?(this.engine.column=a,this.el.classList.remove("gs-"+D),this._updateColumnVar(),this.engine.columnChanged(D,a,g),this._isAutoCellHeight&&this.cellHeight(),this.resizeToContentCheck(!0),this._ignoreLayoutsNodeChange=!0,this._triggerChangeEvent(),delete this._ignoreLayoutsNodeChange,this):(this.responseLayout=g,this)}getColumn(){return this.opts.column}getGridItems(){return Array.from(this.el.children).filter(a=>a.matches("."+this.opts.itemClass)&&!a.matches("."+this.opts.placeholderClass))}isIgnoreChangeCB(){return this._ignoreLayoutsNodeChange}destroy(a=!0){var g;if(this.el)return this.offAll(),this._updateResizeEvent(!0),this.setStatic(!0,!1),this.setAnimation(!1),a?this.el.parentNode.removeChild(this.el):(this.removeAll(a),this.el.removeAttribute("gs-current-row")),this.parentGridNode&&delete this.parentGridNode.subGrid,delete this.parentGridNode,delete this.opts,(g=this._placeholder)==null||delete g.gridstackNode,delete this._placeholder,delete this.engine,delete this.el.gridstack,delete this.el,this}float(a){return this.opts.float!==a&&(this.opts.float=this.engine.float=a,this._triggerChangeEvent()),this}getFloat(){return this.engine.float}getCellFromPixel(a,g=!1){const D=this.el.getBoundingClientRect();let X;g?X={top:D.top+document.documentElement.scrollTop,left:D.left}:X={top:this.el.offsetTop,left:this.el.offsetLeft};const A=a.left-X.left,b=a.top-X.top,e=D.width/this.getColumn(),v=D.height/parseInt(this.el.getAttribute("gs-current-row"));return{x:Math.floor(A/e),y:Math.floor(b/v)}}getRow(){return Math.max(this.engine.getRow(),this.opts.minRow||0)}isAreaEmpty(a,g,D,X){return this.engine.isAreaEmpty(a,g,D,X)}makeWidget(a,g){const D=Wi.getElement(a);if(!D||D.gridstackNode)return D;D.parentElement||this.el.appendChild(D),this._prepareElement(D,!0,g);const X=D.gridstackNode;this._updateContainerHeight(),X.subGridOpts&&this.makeSubGrid(D,X.subGridOpts,void 0,!1);let A;return this.opts.column===1&&!this._ignoreLayoutsNodeChange&&(A=this._ignoreLayoutsNodeChange=!0),this._triggerAddEvent(),this._triggerChangeEvent(),A&&delete this._ignoreLayoutsNodeChange,D}on(a,g){return a.indexOf(" ")!==-1?(a.split(" ").forEach(D=>this.on(D,g)),this):(a==="change"||a==="added"||a==="removed"||a==="enable"||a==="disable"?(a==="enable"||a==="disable"?this._gsEventHandler[a]=D=>g(D):this._gsEventHandler[a]=D=>{D.detail&&g(D,D.detail)},this.el.addEventListener(a,this._gsEventHandler[a])):a==="drag"||a==="dragstart"||a==="dragstop"||a==="resizestart"||a==="resize"||a==="resizestop"||a==="dropped"||a==="resizecontent"?this._gsEventHandler[a]=g:console.error("GridStack.on("+a+") event not supported"),this)}off(a){return a.indexOf(" ")!==-1?(a.split(" ").forEach(g=>this.off(g)),this):((a==="change"||a==="added"||a==="removed"||a==="enable"||a==="disable")&&this._gsEventHandler[a]&&this.el.removeEventListener(a,this._gsEventHandler[a]),delete this._gsEventHandler[a],this)}offAll(){return Object.keys(this._gsEventHandler).forEach(a=>this.off(a)),this}removeWidget(a,g=!0,D=!0){return a?(Wi.getElements(a).forEach(X=>{if(X.parentElement&&X.parentElement!==this.el)return;let A=X.gridstackNode;A||(A=this.engine.nodes.find(b=>X===b.el)),A&&(g&&Wi.addRemoveCB&&Wi.addRemoveCB(this.el,A,!1,!1),delete X.gridstackNode,this._removeDD(X),this.engine.removeNode(A,g,D),g&&X.parentElement&&X.remove())}),D&&(this._triggerRemoveEvent(),this._triggerChangeEvent()),this):(console.error("Error: GridStack.removeWidget(undefined) called"),this)}removeAll(a=!0,g=!0){return this.engine.nodes.forEach(D=>{a&&Wi.addRemoveCB&&Wi.addRemoveCB(this.el,D,!1,!1),delete D.el.gridstackNode,this.opts.staticGrid||this._removeDD(D.el)}),this.engine.removeAll(a,g),g&&this._triggerRemoveEvent(),this}setAnimation(a=this.opts.animate,g){return g?setTimeout(()=>{this.opts&&this.setAnimation(a)}):a?this.el.classList.add("grid-stack-animate"):this.el.classList.remove("grid-stack-animate"),this.opts.animate=a,this}hasAnimationCSS(){return this.el.classList.contains("grid-stack-animate")}setStatic(a,g=!0,D=!0){return!!this.opts.staticGrid===a?this:(a?this.opts.staticGrid=!0:delete this.opts.staticGrid,this._setupRemoveDrop(),this._setupAcceptWidget(),this.engine.nodes.forEach(X=>{this.prepareDragDrop(X.el),X.subGrid&&D&&X.subGrid.setStatic(a,g,D)}),g&&this._setStaticClass(),this)}updateOptions(a){var g;const D=this.opts;return a===D?this:(a.acceptWidgets!==void 0&&(D.acceptWidgets=a.acceptWidgets,this._setupAcceptWidget()),a.animate!==void 0&&this.setAnimation(a.animate),a.cellHeight&&this.cellHeight(a.cellHeight),a.class!==void 0&&a.class!==D.class&&(D.class&&this.el.classList.remove(D.class),a.class&&this.el.classList.add(a.class)),a.columnOpts?(this.opts.columnOpts=a.columnOpts,this.checkDynamicColumn()):a.columnOpts===null&&this.opts.columnOpts?(delete this.opts.columnOpts,this._updateResizeEvent()):typeof a.column=="number"&&this.column(a.column),a.margin!==void 0&&this.margin(a.margin),a.staticGrid!==void 0&&this.setStatic(a.staticGrid),a.disableDrag!==void 0&&!a.staticGrid&&this.enableMove(!a.disableDrag),a.disableResize!==void 0&&!a.staticGrid&&this.enableResize(!a.disableResize),a.float!==void 0&&this.float(a.float),a.row!==void 0?(D.minRow=D.maxRow=D.row=a.row,this._updateContainerHeight()):(a.minRow!==void 0&&(D.minRow=a.minRow,this._updateContainerHeight()),a.maxRow!==void 0&&(D.maxRow=a.maxRow)),(g=a.children)!=null&&g.length&&this.load(a.children),this)}update(a,g){return Wi.getElements(a).forEach(D=>{var X;const A=D==null?void 0:D.gridstackNode;if(!A)return;const b={...zn.copyPos({},A),...zn.cloneDeep(g)};this.engine.nodeBoundFix(b),delete b.autoPosition;const e=["x","y","w","h"];let v;if(e.some(w=>b[w]!==void 0&&b[w]!==A[w])&&(v={},e.forEach(w=>{v[w]=b[w]!==void 0?b[w]:A[w],delete b[w]})),!v&&(b.minW||b.minH||b.maxW||b.maxH)&&(v={}),b.content!==void 0){const w=D.querySelector(".grid-stack-item-content");w&&w.textContent!==b.content&&(A.content=b.content,Wi.renderCB(w,b),(X=A.subGrid)!=null&&X.el&&(w.appendChild(A.subGrid.el),A.subGrid._updateContainerHeight())),delete b.content}let u=!1,t=!1;for(const w in b)w[0]!=="_"&&A[w]!==b[w]&&(A[w]=b[w],u=!0,t=t||!this.opts.staticGrid&&(w==="noResize"||w==="noMove"||w==="locked"));if(zn.sanitizeMinMax(A),v){const w=v.w!==void 0&&v.w!==A.w;this.moveNode(A,v),w&&A.subGrid?A.subGrid.onResize(this.hasAnimationCSS()?A.w:void 0):this.resizeToContentCheck(w,A),delete A._orig}(v||u)&&this._writeAttr(D,A),t&&this.prepareDragDrop(A.el),Wi.updateCB&&Wi.updateCB(A)}),this}moveNode(a,g){const D=a._updating;D||this.engine.cleanNodes().beginUpdate(a),this.engine.moveNode(a,g),this._updateContainerHeight(),D||(this._triggerChangeEvent(),this.engine.endUpdate())}resizeToContent(a){var g,D;if(!a||(a.classList.remove("size-to-content-max"),!a.clientHeight))return;const X=a.gridstackNode;if(!X)return;const A=X.grid;if(!A||a.parentElement!==A.el)return;const b=A.getCellHeight(!0);if(!b)return;let e=X.h?X.h*b:a.clientHeight,v;if(X.resizeToContentParent&&(v=a.querySelector(X.resizeToContentParent)),v||(v=a.querySelector(Wi.resizeToContentParent)),!v)return;const u=a.clientHeight-v.clientHeight,t=X.h?X.h*b-u:v.clientHeight;let w;if(X.subGrid){w=X.subGrid.getRow()*X.subGrid.getCellHeight(!0);const p=X.subGrid.el.getBoundingClientRect(),n=a.getBoundingClientRect();w+=p.top-n.top}else{if((D=(g=X.subGridOpts)==null?void 0:g.children)!=null&&D.length)return;{const p=v.firstElementChild;if(!p){console.error(`Error: GridStack.resizeToContent() widget id:${X.id} '${Wi.resizeToContentParent}'.firstElementChild is null, make sure to have a div like container. Skipping sizing.`);return}w=p.getBoundingClientRect().height||t}}if(t===w)return;e+=w-t;let y=Math.ceil(e/b);const x=Number.isInteger(X.sizeToContent)?X.sizeToContent:0;x&&y>x&&(y=x,a.classList.add("size-to-content-max")),X.minH&&y<X.minH?y=X.minH:X.maxH&&y>X.maxH&&(y=X.maxH),y!==X.h&&(A._ignoreLayoutsNodeChange=!0,A.moveNode(X,{h:y}),delete A._ignoreLayoutsNodeChange)}resizeToContentCBCheck(a){Wi.resizeToContentCB?Wi.resizeToContentCB(a):this.resizeToContent(a)}rotate(a,g){return Wi.getElements(a).forEach(D=>{const X=D.gridstackNode;if(!zn.canBeRotated(X))return;const A={w:X.h,h:X.w,minH:X.minW,minW:X.minH,maxH:X.maxW,maxW:X.maxH};if(g){const e=g.left>0?Math.floor(g.left/this.cellWidth()):0,v=g.top>0?Math.floor(g.top/this.opts.cellHeight):0;A.x=X.x+e-(X.h-(v+1)),A.y=X.y+v-e}Object.keys(A).forEach(e=>{A[e]===void 0&&delete A[e]});const b=X._orig;this.update(D,A),X._orig=b}),this}margin(a){if(!(typeof a=="string"&&a.split(" ").length>1)){const g=zn.parseHeight(a);if(this.opts.marginUnit===g.unit&&this.opts.margin===g.h)return}return this.opts.margin=a,this.opts.marginTop=this.opts.marginBottom=this.opts.marginLeft=this.opts.marginRight=void 0,this._initMargin(),this}getMargin(){return this.opts.margin}willItFit(a){if(arguments.length>1){console.warn("gridstack.ts: `willItFit(x,y,w,h,autoPosition)` is deprecated. Use `willItFit({x, y,...})`. It will be removed soon");const g=arguments;let D=0,X={x:g[D++],y:g[D++],w:g[D++],h:g[D++],autoPosition:g[D++]};return this.willItFit(X)}return this.engine.willItFit(a)}_triggerChangeEvent(){if(this.engine.batchMode)return this;const a=this.engine.getDirtyNodes(!0);return a&&a.length&&(this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(a),this._triggerEvent("change",a)),this.engine.saveInitial(),this}_triggerAddEvent(){var a;if(this.engine.batchMode)return this;if((a=this.engine.addedNodes)!=null&&a.length){this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(this.engine.addedNodes),this.engine.addedNodes.forEach(D=>{delete D._dirty});const g=[...this.engine.addedNodes];this.engine.addedNodes=[],this._triggerEvent("added",g)}return this}_triggerRemoveEvent(){var a;if(this.engine.batchMode)return this;if((a=this.engine.removedNodes)!=null&&a.length){const g=[...this.engine.removedNodes];this.engine.removedNodes=[],this._triggerEvent("removed",g)}return this}_triggerEvent(a,g){const D=g?new CustomEvent(a,{bubbles:!1,detail:g}):new Event(a);let X=this;for(;X.parentGridNode;)X=X.parentGridNode.grid;return X.el.dispatchEvent(D),this}_updateContainerHeight(){if(!this.engine||this.engine.batchMode)return this;const a=this.parentGridNode;let g=this.getRow()+this._extraDragRow;const D=this.opts.cellHeight,X=this.opts.cellHeightUnit;if(!D)return this;if(!a&&!this.opts.minRow){const A=zn.parseHeight(getComputedStyle(this.el).minHeight);if(A.h>0&&A.unit===X){const b=Math.floor(A.h/D);g<b&&(g=b)}}return this.el.setAttribute("gs-current-row",String(g)),this.el.style.removeProperty("min-height"),this.el.style.removeProperty("height"),g&&(this.el.style[a?"minHeight":"height"]=g*D+X),a&&zn.shouldSizeToContent(a)&&a.grid.resizeToContentCBCheck(a.el),this}_prepareElement(a,g=!1,D){D=D||this._readAttr(a),a.gridstackNode=D,D.el=a,D.grid=this,D=this.engine.addNode(D,g),this._writeAttr(a,D),a.classList.add(Mu.itemClass,this.opts.itemClass);const X=zn.shouldSizeToContent(D);return X?a.classList.add("size-to-content"):a.classList.remove("size-to-content"),X&&this.resizeToContentCheck(!1,D),zn.lazyLoad(D)||this.prepareDragDrop(D.el),this}_writePosAttr(a,g){return(!g._moving&&!g._resizing||this._placeholder===a)&&(a.style.top=g.y?g.y===1?"var(--gs-cell-height)":`calc(${g.y} * var(--gs-cell-height))`:null,a.style.left=g.x?g.x===1?"var(--gs-column-width)":`calc(${g.x} * var(--gs-column-width))`:null,a.style.width=g.w>1?`calc(${g.w} * var(--gs-column-width))`:null,a.style.height=g.h>1?`calc(${g.h} * var(--gs-cell-height))`:null),g.x>0?a.setAttribute("gs-x",String(g.x)):a.removeAttribute("gs-x"),g.y>0?a.setAttribute("gs-y",String(g.y)):a.removeAttribute("gs-y"),g.w>1?a.setAttribute("gs-w",String(g.w)):a.removeAttribute("gs-w"),g.h>1?a.setAttribute("gs-h",String(g.h)):a.removeAttribute("gs-h"),this}_writeAttr(a,g){if(!g)return this;this._writePosAttr(a,g);const D={noResize:"gs-no-resize",noMove:"gs-no-move",locked:"gs-locked",id:"gs-id",sizeToContent:"gs-size-to-content"};for(const X in D)g[X]?a.setAttribute(D[X],String(g[X])):a.removeAttribute(D[X]);return this}_readAttr(a,g=!0){const D={};D.x=zn.toNumber(a.getAttribute("gs-x")),D.y=zn.toNumber(a.getAttribute("gs-y")),D.w=zn.toNumber(a.getAttribute("gs-w")),D.h=zn.toNumber(a.getAttribute("gs-h")),D.autoPosition=zn.toBool(a.getAttribute("gs-auto-position")),D.noResize=zn.toBool(a.getAttribute("gs-no-resize")),D.noMove=zn.toBool(a.getAttribute("gs-no-move")),D.locked=zn.toBool(a.getAttribute("gs-locked"));const X=a.getAttribute("gs-size-to-content");X&&(X==="true"||X==="false"?D.sizeToContent=zn.toBool(X):D.sizeToContent=parseInt(X,10)),D.id=a.getAttribute("gs-id"),D.maxW=zn.toNumber(a.getAttribute("gs-max-w")),D.minW=zn.toNumber(a.getAttribute("gs-min-w")),D.maxH=zn.toNumber(a.getAttribute("gs-max-h")),D.minH=zn.toNumber(a.getAttribute("gs-min-h")),g&&(D.w===1&&a.removeAttribute("gs-w"),D.h===1&&a.removeAttribute("gs-h"),D.maxW&&a.removeAttribute("gs-max-w"),D.minW&&a.removeAttribute("gs-min-w"),D.maxH&&a.removeAttribute("gs-max-h"),D.minH&&a.removeAttribute("gs-min-h"));for(const A in D){if(!D.hasOwnProperty(A))return;!D[A]&&D[A]!==0&&A!=="sizeToContent"&&delete D[A]}return D}_setStaticClass(){const a=["grid-stack-static"];return this.opts.staticGrid?(this.el.classList.add(...a),this.el.setAttribute("gs-static","true")):(this.el.classList.remove(...a),this.el.removeAttribute("gs-static")),this}onResize(a=(g=>(g=this.el)==null?void 0:g.clientWidth)()){if(!a||this.prevWidth===a)return;this.prevWidth=a,this.batchUpdate();let g=!1;return this._autoColumn&&this.parentGridNode?this.opts.column!==this.parentGridNode.w&&(this.column(this.parentGridNode.w,this.opts.layout||"list"),g=!0):g=this.checkDynamicColumn(),this._isAutoCellHeight&&this.cellHeight(),this.engine.nodes.forEach(D=>{D.subGrid&&D.subGrid.onResize()}),this._skipInitialResize||this.resizeToContentCheck(g),delete this._skipInitialResize,this.batchUpdate(!1),this}resizeToContentCheck(a=!1,g=void 0){if(this.engine){if(a&&this.hasAnimationCSS())return setTimeout(()=>this.resizeToContentCheck(!1,g),this.animationDelay);if(g)zn.shouldSizeToContent(g)&&this.resizeToContentCBCheck(g.el);else if(this.engine.nodes.some(D=>zn.shouldSizeToContent(D))){const D=[...this.engine.nodes];this.batchUpdate(),D.forEach(X=>{zn.shouldSizeToContent(X)&&this.resizeToContentCBCheck(X.el)}),this._ignoreLayoutsNodeChange=!0,this.batchUpdate(!1),this._ignoreLayoutsNodeChange=!1}this._gsEventHandler.resizecontent&&this._gsEventHandler.resizecontent(null,g?[g]:this.engine.nodes)}}_updateResizeEvent(a=!1){const g=!this.parentGridNode&&(this._isAutoCellHeight||this.opts.sizeToContent||this.opts.columnOpts||this.engine.nodes.find(D=>D.sizeToContent));return!a&&g&&!this.resizeObserver?(this._sizeThrottle=zn.throttle(()=>this.onResize(),this.opts.cellHeightThrottle),this.resizeObserver=new ResizeObserver(()=>this._sizeThrottle()),this.resizeObserver.observe(this.el),this._skipInitialResize=!0):(a||!g)&&this.resizeObserver&&(this.resizeObserver.disconnect(),delete this.resizeObserver,delete this._sizeThrottle),this}static getElement(a=".grid-stack-item"){return zn.getElement(a)}static getElements(a=".grid-stack-item"){return zn.getElements(a)}static getGridElement(a){return Wi.getElement(a)}static getGridElements(a){return zn.getElements(a)}_initMargin(){let a,g=0,D=[];typeof this.opts.margin=="string"&&(D=this.opts.margin.split(" ")),D.length===2?(this.opts.marginTop=this.opts.marginBottom=D[0],this.opts.marginLeft=this.opts.marginRight=D[1]):D.length===4?(this.opts.marginTop=D[0],this.opts.marginRight=D[1],this.opts.marginBottom=D[2],this.opts.marginLeft=D[3]):(a=zn.parseHeight(this.opts.margin),this.opts.marginUnit=a.unit,g=this.opts.margin=a.h),["marginTop","marginRight","marginBottom","marginLeft"].forEach(A=>{this.opts[A]===void 0?this.opts[A]=g:(a=zn.parseHeight(this.opts[A]),this.opts[A]=a.h,delete this.opts.margin)}),this.opts.marginUnit=a.unit,this.opts.marginTop===this.opts.marginBottom&&this.opts.marginLeft===this.opts.marginRight&&this.opts.marginTop===this.opts.marginRight&&(this.opts.margin=this.opts.marginTop);const X=this.el.style;return X.setProperty("--gs-item-margin-top",`${this.opts.marginTop}${this.opts.marginUnit}`),X.setProperty("--gs-item-margin-bottom",`${this.opts.marginBottom}${this.opts.marginUnit}`),X.setProperty("--gs-item-margin-right",`${this.opts.marginRight}${this.opts.marginUnit}`),X.setProperty("--gs-item-margin-left",`${this.opts.marginLeft}${this.opts.marginUnit}`),this}static getDD(){return Uc}static setupDragIn(a,g,D,X=document){(g==null?void 0:g.pause)!==void 0&&(Zi.pauseDrag=g.pause),g={appendTo:"body",helper:"clone",...g||{}},(typeof a=="string"?zn.getElements(a,X):a).forEach((A,b)=>{Uc.isDraggable(A)||Uc.dragIn(A,g),D!=null&&D[b]&&(A.gridstackNode=D[b])})}movable(a,g){return this.opts.staticGrid?this:(Wi.getElements(a).forEach(D=>{const X=D.gridstackNode;X&&(g?delete X.noMove:X.noMove=!0,this.prepareDragDrop(X.el))}),this)}resizable(a,g){return this.opts.staticGrid?this:(Wi.getElements(a).forEach(D=>{const X=D.gridstackNode;X&&(g?delete X.noResize:X.noResize=!0,this.prepareDragDrop(X.el))}),this)}disable(a=!0){if(!this.opts.staticGrid)return this.enableMove(!1,a),this.enableResize(!1,a),this._triggerEvent("disable"),this}enable(a=!0){if(!this.opts.staticGrid)return this.enableMove(!0,a),this.enableResize(!0,a),this._triggerEvent("enable"),this}enableMove(a,g=!0){return this.opts.staticGrid?this:(a?delete this.opts.disableDrag:this.opts.disableDrag=!0,this.engine.nodes.forEach(D=>{this.prepareDragDrop(D.el),D.subGrid&&g&&D.subGrid.enableMove(a,g)}),this)}enableResize(a,g=!0){return this.opts.staticGrid?this:(a?delete this.opts.disableResize:this.opts.disableResize=!0,this.engine.nodes.forEach(D=>{this.prepareDragDrop(D.el),D.subGrid&&g&&D.subGrid.enableResize(a,g)}),this)}cancelDrag(){var a;const g=(a=this._placeholder)==null?void 0:a.gridstackNode;g&&(g._isExternal?(g._isAboutToRemove=!0,this.engine.removeNode(g)):g._isAboutToRemove&&Wi._itemRemoving(g.el,!1),this.engine.restoreInitial())}_removeDD(a){return Uc.draggable(a,"destroy").resizable(a,"destroy"),a.gridstackNode&&delete a.gridstackNode._initDD,delete a.ddElement,this}_setupAcceptWidget(){if(this.opts.staticGrid||!this.opts.acceptWidgets&&!this.opts.removable)return Uc.droppable(this.el,"destroy"),this;let a,g;const D=(X,A,b)=>{var e;b=b||A;const v=b.gridstackNode;if(!v)return;if(!((e=v.grid)!=null&&e.el)){b.style.transform=`scale(${1/this.dragTransform.xScale},${1/this.dragTransform.yScale})`;const x=b.getBoundingClientRect();b.style.left=x.x+(this.dragTransform.xScale-1)*(X.clientX-x.x)/this.dragTransform.xScale+"px",b.style.top=x.y+(this.dragTransform.yScale-1)*(X.clientY-x.y)/this.dragTransform.yScale+"px",b.style.transformOrigin="0px 0px"}let{top:u,left:t}=b.getBoundingClientRect();const w=this.el.getBoundingClientRect();t-=w.left,u-=w.top;const y={position:{top:u*this.dragTransform.xScale,left:t*this.dragTransform.yScale}};if(v._temporaryRemoved){if(v.x=Math.max(0,Math.round(t/g)),v.y=Math.max(0,Math.round(u/a)),delete v.autoPosition,this.engine.nodeBoundFix(v),!this.engine.willItFit(v)){if(v.autoPosition=!0,!this.engine.willItFit(v)){Uc.off(A,"drag");return}v._willFitPos&&(zn.copyPos(v,v._willFitPos),delete v._willFitPos)}this._onStartMoving(b,X,y,v,g,a)}else this._dragOrResize(b,X,y,v,g,a)};return Uc.droppable(this.el,{accept:X=>{const A=X.gridstackNode||this._readAttr(X,!1);if((A==null?void 0:A.grid)===this)return!0;if(!this.opts.acceptWidgets)return!1;let b=!0;if(typeof this.opts.acceptWidgets=="function")b=this.opts.acceptWidgets(X);else{const e=this.opts.acceptWidgets===!0?".grid-stack-item":this.opts.acceptWidgets;b=X.matches(e)}if(b&&A&&this.opts.maxRow){const e={w:A.w,h:A.h,minW:A.minW,minH:A.minH};b=this.engine.willItFit(e)}return b}}).on(this.el,"dropover",(X,A,b)=>{let e=(b==null?void 0:b.gridstackNode)||A.gridstackNode;if((e==null?void 0:e.grid)===this&&!e._temporaryRemoved)return!1;if(e!=null&&e._sidebarOrig&&(e.w=e._sidebarOrig.w,e.h=e._sidebarOrig.h),e!=null&&e.grid&&e.grid!==this&&!e._temporaryRemoved&&e.grid._leave(A,b),b=b||A,g=this.cellWidth(),a=this.getCellHeight(!0),!e){const t=b.getAttribute("data-gs-widget")||b.getAttribute("gridstacknode");if(t){try{e=JSON.parse(t)}catch{console.error("Gridstack dropover: Bad JSON format: ",t)}b.removeAttribute("data-gs-widget"),b.removeAttribute("gridstacknode")}e||(e=this._readAttr(b)),e._sidebarOrig={w:e.w,h:e.h}}e.grid||(e.el||(e={...e}),e._isExternal=!0,b.gridstackNode=e);const v=e.w||Math.round(b.offsetWidth/g)||1,u=e.h||Math.round(b.offsetHeight/a)||1;return e.grid&&e.grid!==this?(A._gridstackNodeOrig||(A._gridstackNodeOrig=e),A.gridstackNode=e={...e,w:v,h:u,grid:this},delete e.x,delete e.y,this.engine.cleanupNode(e).nodeBoundFix(e),e._initDD=e._isExternal=e._temporaryRemoved=!0):(e.w=v,e.h=u,e._temporaryRemoved=!0),Wi._itemRemoving(e.el,!1),Uc.on(A,"drag",D),D(X,A,b),!1}).on(this.el,"dropout",(X,A,b)=>{const e=(b==null?void 0:b.gridstackNode)||A.gridstackNode;return e&&(!e.grid||e.grid===this)&&(this._leave(A,b),this._isTemp&&this.removeAsSubGrid(e)),!1}).on(this.el,"drop",(X,A,b)=>{var e,v,u;const t=(b==null?void 0:b.gridstackNode)||A.gridstackNode;if((t==null?void 0:t.grid)===this&&!t._isExternal)return!1;const w=!!this.placeholder.parentElement,y=A!==b;this.placeholder.remove(),delete this.placeholder.gridstackNode,w&&this.opts.animate&&(this.setAnimation(!1),this.setAnimation(!0,!0));const x=A._gridstackNodeOrig;if(delete A._gridstackNodeOrig,w&&x!=null&&x.grid&&x.grid!==this){const n=x.grid;n.engine.removeNodeFromLayoutCache(x),n.engine.removedNodes.push(x),n._triggerRemoveEvent()._triggerChangeEvent(),n.parentGridNode&&!n.engine.nodes.length&&n.opts.subGridDynamic&&n.removeAsSubGrid()}if(!t||(w&&(this.engine.cleanupNode(t),t.grid=this),(e=t.grid)==null||delete e._isTemp,Uc.off(A,"drag"),b!==A?(b.remove(),A=b):A.remove(),this._removeDD(A),!w))return!1;const p=(u=(v=t.subGrid)==null?void 0:v.el)==null?void 0:u.gridstack;return zn.copyPos(t,this._readAttr(this.placeholder)),zn.removePositioningStyles(A),y&&(t.content||t.subGridOpts||Wi.addRemoveCB)?(delete t.el,A=this.addWidget(t)):(this._prepareElement(A,!0,t),this.el.appendChild(A),this.resizeToContentCheck(!1,t),p&&(p.parentGridNode=t),this._updateContainerHeight()),this.engine.addedNodes.push(t),this._triggerAddEvent(),this._triggerChangeEvent(),this.engine.endUpdate(),this._gsEventHandler.dropped&&this._gsEventHandler.dropped({...X,type:"dropped"},x&&x.grid?x:void 0,t),!1}),this}static _itemRemoving(a,g){if(!a)return;const D=a?a.gridstackNode:void 0;!(D!=null&&D.grid)||a.classList.contains(D.grid.opts.removableOptions.decline)||(g?D._isAboutToRemove=!0:delete D._isAboutToRemove,g?a.classList.add("grid-stack-item-removing"):a.classList.remove("grid-stack-item-removing"))}_setupRemoveDrop(){if(typeof this.opts.removable!="string")return this;const a=document.querySelector(this.opts.removable);return a?(!this.opts.staticGrid&&!Uc.isDroppable(a)&&Uc.droppable(a,this.opts.removableOptions).on(a,"dropover",(g,D)=>Wi._itemRemoving(D,!0)).on(a,"dropout",(g,D)=>Wi._itemRemoving(D,!1)),this):this}prepareDragDrop(a,g=!1){const D=a==null?void 0:a.gridstackNode;if(!D)return;const X=D.noMove||this.opts.disableDrag,A=D.noResize||this.opts.disableResize,b=this.opts.staticGrid||X&&A;if((g||b)&&(D._initDD&&(this._removeDD(a),delete D._initDD),b&&a.classList.add("ui-draggable-disabled","ui-resizable-disabled"),!g))return this;if(!D._initDD){let e,v;const u=(y,x)=>{this.triggerEvent(y,y.target),e=this.cellWidth(),v=this.getCellHeight(!0),this._onStartMoving(a,y,x,D,e,v)},t=(y,x)=>{this._dragOrResize(a,y,x,D,e,v)},w=y=>{this.placeholder.remove(),delete this.placeholder.gridstackNode,delete D._moving,delete D._resizing,delete D._event,delete D._lastTried;const x=D.w!==D._orig.w,p=y.target;if(!(!p.gridstackNode||p.gridstackNode.grid!==this)){if(D.el=p,D._isAboutToRemove){const n=a.gridstackNode.grid;n._gsEventHandler[y.type]&&n._gsEventHandler[y.type](y,p),n.engine.nodes.push(D),n.removeWidget(a,!0,!0)}else zn.removePositioningStyles(p),D._temporaryRemoved?(this._writePosAttr(p,D),this.engine.addNode(D)):this._writePosAttr(p,D),this.triggerEvent(y,p);this._extraDragRow=0,this._updateContainerHeight(),this._triggerChangeEvent(),this.engine.endUpdate(),y.type==="resizestop"&&(Number.isInteger(D.sizeToContent)&&(D.sizeToContent=D.h),this.resizeToContentCheck(x,D))}};Uc.draggable(a,{start:u,stop:w,drag:t}).resizable(a,{start:u,stop:w,resize:t}),D._initDD=!0}return Uc.draggable(a,X?"disable":"enable").resizable(a,A?"disable":"enable"),this}_onStartMoving(a,g,D,X,A,b){var e;if(this.engine.cleanNodes().beginUpdate(X),this._writePosAttr(this.placeholder,X),this.el.appendChild(this.placeholder),this.placeholder.gridstackNode=X,(e=X.grid)!=null&&e.el)this.dragTransform=zn.getValuesFromTransformedElement(a);else if(this.placeholder&&this.placeholder.closest(".grid-stack")){const v=this.placeholder.closest(".grid-stack");this.dragTransform=zn.getValuesFromTransformedElement(v)}else this.dragTransform={xScale:1,xOffset:0,yScale:1,yOffset:0};if(X.el=this.placeholder,X._lastUiPosition=D.position,X._prevYPix=D.position.top,X._moving=g.type==="dragstart",X._resizing=g.type==="resizestart",delete X._lastTried,g.type==="dropover"&&X._temporaryRemoved&&(this.engine.addNode(X),X._moving=!0),this.engine.cacheRects(A,b,this.opts.marginTop,this.opts.marginRight,this.opts.marginBottom,this.opts.marginLeft),g.type==="resizestart"){const v=this.getColumn()-X.x,u=(this.opts.maxRow||Number.MAX_SAFE_INTEGER)-X.y;Uc.resizable(a,"option","minWidth",A*Math.min(X.minW||1,v)).resizable(a,"option","minHeight",b*Math.min(X.minH||1,u)).resizable(a,"option","maxWidth",A*Math.min(X.maxW||Number.MAX_SAFE_INTEGER,v)).resizable(a,"option","maxWidthMoveLeft",A*Math.min(X.maxW||Number.MAX_SAFE_INTEGER,X.x+X.w)).resizable(a,"option","maxHeight",b*Math.min(X.maxH||Number.MAX_SAFE_INTEGER,u)).resizable(a,"option","maxHeightMoveUp",b*Math.min(X.maxH||Number.MAX_SAFE_INTEGER,X.y+X.h))}}_dragOrResize(a,g,D,X,A,b){const e={...X._orig};let v,u=this.opts.marginLeft,t=this.opts.marginRight,w=this.opts.marginTop,y=this.opts.marginBottom;const x=Math.round(b*.1),p=Math.round(A*.1);if(u=Math.min(u,p),t=Math.min(t,p),w=Math.min(w,x),y=Math.min(y,x),g.type==="drag"){if(X._temporaryRemoved)return;const i=D.position.top-X._prevYPix;X._prevYPix=D.position.top,this.opts.draggable.scroll!==!1&&zn.updateScrollPosition(a,D.position,i);const d=D.position.left+(D.position.left>X._lastUiPosition.left?-t:u),s=D.position.top+(D.position.top>X._lastUiPosition.top?-y:w);e.x=Math.round(d/A),e.y=Math.round(s/b);const c=this._extraDragRow;if(this.engine.collide(X,e)){const f=this.getRow();let m=Math.max(0,e.y+X.h-f);this.opts.maxRow&&f+m>this.opts.maxRow&&(m=Math.max(0,this.opts.maxRow-f)),this._extraDragRow=m}else this._extraDragRow=0;if(this._extraDragRow!==c&&this._updateContainerHeight(),X.x===e.x&&X.y===e.y)return}else if(g.type==="resize"){if(e.x<0||(zn.updateScrollResize(g,a,b),e.w=Math.round((D.size.width-u)/A),e.h=Math.round((D.size.height-w)/b),X.w===e.w&&X.h===e.h)||X._lastTried&&X._lastTried.w===e.w&&X._lastTried.h===e.h)return;const i=D.position.left+u,d=D.position.top+w;e.x=Math.round(i/A),e.y=Math.round(d/b),v=!0}X._event=g,X._lastTried=e;const n={x:D.position.left+u,y:D.position.top+w,w:(D.size?D.size.width:X.w*A)-u-t,h:(D.size?D.size.height:X.h*b)-w-y};if(this.engine.moveNodeCheck(X,{...e,cellWidth:A,cellHeight:b,rect:n,resizing:v})){X._lastUiPosition=D.position,this.engine.cacheRects(A,b,w,t,y,u),delete X._skipDown,v&&X.subGrid&&X.subGrid.onResize(),this._extraDragRow=0,this._updateContainerHeight();const i=g.target;X._sidebarOrig||this._writePosAttr(i,X),this.triggerEvent(g,i)}}triggerEvent(a,g){let D=this;for(;D.parentGridNode;)D=D.parentGridNode.grid;D._gsEventHandler[a.type]&&D._gsEventHandler[a.type](a,g)}_leave(a,g){g=g||a;const D=g.gridstackNode;if(!D||(g.style.transform=g.style.transformOrigin=null,Uc.off(a,"drag"),D._temporaryRemoved))return;D._temporaryRemoved=!0,this.engine.removeNode(D),D.el=D._isExternal&&g?g:a;const X=D._sidebarOrig;D._isExternal&&this.engine.cleanupNode(D),D._sidebarOrig=X,this.opts.removable===!0&&Wi._itemRemoving(a,!0),a._gridstackNodeOrig?(a.gridstackNode=a._gridstackNodeOrig,delete a._gridstackNodeOrig):D._isExternal&&this.engine.restoreInitial()}commit(){return Ise(this,this.batchUpdate(!1),"commit","batchUpdate","5.2"),this}}Wi.renderCB=(r,a)=>{r&&a!=null&&a.content&&(r.textContent=a.content)},Wi.resizeToContentParent=".grid-stack-item-content",Wi.Utils=zn,Wi.Engine=Dd,Wi.GDRev="12.3.2";const Bse=[{id:1,name:"Goles",isSelected:!1},{id:2,name:"Pases acertados",isSelected:!1},{id:23,name:"Tiros de Esquina",isSelected:!1},{id:3,name:"Balones recuperados en disputa",isSelected:!1},{id:4,name:"Asistencias",isSelected:!1},{id:5,name:"Participaciones en gol",isSelected:!1},{id:6,name:"Tiros a gol",isSelected:!1},{id:7,name:"Tiros a gol que llegaron a la portería",isSelected:!1},{id:8,name:"Cabeceos en área rival",isSelected:!1},{id:9,name:"Cabeceos en área propia",isSelected:!1},{id:10,name:"Centros",isSelected:!1},{id:11,name:"Centros acertados",isSelected:!1},{id:12,name:"1vs1 exitosos ofensivos",isSelected:!1},{id:13,name:"1vs1 exitosos ofensivos que terminaron en gol",isSelected:!1},{id:14,name:"1vs1 defensivos exitoso",isSelected:!1},{id:15,name:"Rechaces",isSelected:!1},{id:16,name:"Balones ganados en área propia",isSelected:!1},{id:17,name:"Balones ganados en área rival",isSelected:!1},{id:18,name:"Faltas cometidas",isSelected:!1},{id:19,name:"Faltas recibidas",isSelected:!1},{id:20,name:"Tarjetas amarillas",isSelected:!1},{id:21,name:"Tarjetas rojas",isSelected:!1},{id:22,name:"Atajadas",isSelected:!1},{id:24,name:"Oportunidades de gol",isSelected:!1},{id:25,name:"Balones recuperados en cancha rival",isSelected:!1}],Vd=r=>Bse.find(a=>a.id===r),Fd=new Map([[9,{id:9,analysisTypes:new Map([["2-20",{analysisType:"successfulPasses",name:"Pases acertados",title:"Mapeo de pases acertados",titleShort:"Pases acertados"}],["3-21",{analysisType:"unsuccessfulPasses",name:"Pases no acertados",title:"Mapeo de pases no acertados",titleShort:"Pases no acertados"}],["222-223-224-225",{analysisType:"recoveredBalls",name:"Balones recuperados",title:"Mapeo de balones recuperados",titleShort:"Balones recuperados"}],["226-227-228-229",{analysisType:"lostBalls",name:"Balones perdidos",title:"Mapeo de balones perdidos",titleShort:"Balones perdidos"}]])}],[1,{general:"General",offensive:"Ofensivo",defensive:"Defensivo",possession:"Posesión",stoppedBall:"Balón parado",penalties:"Infracción"}]]);class ay{constructor(a,g=new Map,D,X=null,A=!1,b=!1,e=null,v=null){ud(this,"id",""),ud(this,"childViews",[]),ud(this,"viewId",0),ud(this,"dynamicFilters",null),ud(this,"componentSpecificFilters",new Map),ud(this,"isPostMatch",!1),ud(this,"isTemplateMode",!1),ud(this,"filtresJSON",null),ud(this,"token",null),ud(this,"_isUpdating",!1),this.id=a,this.viewId=D,this.childViews=g,this.dynamicFilters=X,this.isPostMatch=A,this.isTemplateMode=b,this.filtresJSON=e,this.token=v,this.componentSpecificFilters=new Map}hasEventTypeId(a,g){return!a||!Array.isArray(a)?!1:a.some(D=>D&&D.event_type_id===g)}hasCategoryId(a,g){return!a||!Array.isArray(a)?!1:a.some(D=>D&&D.category_id===g)}getId(){return this.id}setViewId(a){this.viewId=a}setFiltersJSON(a){this.filtresJSON=a}setDynamicFilters(a,g=null){g?this.componentSpecificFilters.set(g,[...a]):this.dynamicFilters=a}getComponentDynamicFilters(a){return a&&this.componentSpecificFilters.has(a)?this.componentSpecificFilters.get(a):this.dynamicFilters}getAllComponentFilters(){return this.componentSpecificFilters}debugComponentFilters(){this.componentSpecificFilters.forEach((a,g)=>{console.log(` Component ${g}:`,a)})}static debugAllComponentFilters(){document.querySelectorAll("[data-container-id]").forEach(a=>{a.getAttribute("data-container-id")})}clearAllComponentFilters(){this.componentSpecificFilters.clear()}getDynamicFilters(){return this.dynamicFilters}getHomeTeamViews(){return this.childViews.filter(a=>a.view.isHomeTeam)}getAwayTeamViews(){return this.childViews.filter(a=>!a.view.isHomeTeam)}addView(a,g=!1){var D,X,A,b,e,v,u,t,w,y;if(a.view.filterAndViewsContainer=this,xi.emit("component-added-to-container",this),this.viewId===5&&a.view.componentProps&&!g&&(a.view.componentProps.preMatchType=this.dynamicFilters[0]!==3&&this.dynamicFilters[0]||1,a.view.filterMultiple={isHomeTeam:a.view.componentProps.preMatchType===1}),this.viewId===10&&a.view.componentProps&&!g&&(a.view.componentProps.isHomeTeamForAnalysis=this.dynamicFilters[0]!==3?this.dynamicFilters[0]===1:1),this.viewId===7&&a.view.componentProps&&!g){const x=this.getComponentDynamicFilters(a.view.id),p=x||this.dynamicFilters;!x&&this.dynamicFilters&&this.dynamicFilters.length>0&&this.setDynamicFilters(this.dynamicFilters,a.view.id);const n=p[0]===1?"offensive":"defensive",i=p[1]===1;a.view.componentProps.analysisType=n,a.view.componentProps.isHomeTeamForAnalysis=i,a.isHomeTeam=i,a.view.filterMultiple={isHomeTeam:i},xi.emit("component-props-updated",{viewId:a.view.id,componentProps:a.view.componentProps,dynamicFilters:p})}if(this.viewId===1&&a.view.componentProps&&!g){const x=this.dynamicFilters[0]||[];if(x&&x.length>0){let p;if(Array.isArray(x)){const i=this.childViews.map(s=>{var c;return(c=s.view.componentProps)==null?void 0:c.type}).filter(s=>s!==void 0),d=x.filter(s=>!i.includes(s));d.length>0?p=d[0]:p=x[0]}else p=x;const n=Fd.get(this.viewId);a.view.componentProps.type=p,a.view.componentProps.default=!1,a.view.title=`Comparativa ${n[p]}`,a.view.filterMultiple={category:p}}}if(this.viewId===9&&a.view.componentProps&&!g){const x=this.dynamicFilters[0].map(d=>d.join("-"));let p="";const n=this.dynamicFilters[1],i=Fd.get(this.viewId);if(n===3){this.getHomeTeamViews().length===0&&this.getAwayTeamViews().length>0&&this.getAwayTeamViews().forEach(m=>{m.view.componentProps.isHomeTeamForAnalysis=!0,m.view.isHomeTeam=!0,m.view.filterMultiple&&(m.view.filterMultiple.isHomeTeam=!0)});let d=null;const s=this.getHomeTeamViews(),c=this.getAwayTeamViews();let f=!0;for(let m=0;m<x.length;m++){p=x[m],d=i.analysisTypes.get(x[m]);const T=s.find(S=>S.view.componentProps.analysisType===d.analysisType),C=c.find(S=>S.view.componentProps.analysisType===d.analysisType);if(!T||!C){f=!T;break}}f?this.childViews.length===0?(a.view.componentProps.analysisType=d.analysisType,a.view.componentProps.isHomeTeamForAnalysis=!0,a.view.title=d.title,a.view.titleShort=d.titleShort,a.view.isHomeTeam=!0,a.view.filterMultiple={isHomeTeam:a.view.isHomeTeam,categoryIds:p.split("-").map(m=>parseInt(m))}):this.childViews.reduce((m,T,C,S)=>{let L={analysisType:T.view.componentProps.analysisType,title:T.view.title,isHomeTeamForAnalysis:T.view.componentProps.isHomeTeamForAnalysis,isHomeTeam:T.view.isHomeTeam};return m&&(m.isHomeTeam&&!T.view.isHomeTeam?(T.view.componentProps.analysisType=d.analysisType,T.view.componentProps.isHomeTeamForAnalysis=!0,T.view.title=d.title,a.view.titleShort=d.titleShort,T.view.isHomeTeam=!0,T.view.filterMultiple={isHomeTeam:T.view.isHomeTeam,categoryIds:p.split("-").map(R=>parseInt(R))}):!m.isHomeTeam&&!T.view.isHomeTeam&&(T.view.componentProps.analysisType=m.analysisType,T.view.componentProps.isHomeTeamForAnalysis=m.isHomeTeamForAnalysis,T.view.title=m.title,T.view.titleShort=m.titleShort,T.view.isHomeTeam=m.isHomeTeam,T.view.filterMultiple={isHomeTeam:T.view.isHomeTeam,categoryIds:p.split("-").map(R=>parseInt(R))}),C===S.length-1&&(a.view.componentProps.analysisType=L.analysisType,a.view.componentProps.isHomeTeamForAnalysis=L.isHomeTeamForAnalysis,a.view.title=L.title,a.view.titleShort=L.titleShort,a.view.isHomeTeam=L.isHomeTeam,a.view.filterMultiple={isHomeTeam:a.view.isHomeTeam,categoryIds:p.split("-").map(R=>parseInt(R))})),L},null):(a.view.componentProps.analysisType=d.analysisType,a.view.componentProps.isHomeTeamForAnalysis=!1,a.view.title=d.title,a.view.titleShort=d.titleShort,a.view.isHomeTeam=!1,a.view.filterMultiple={isHomeTeam:a.view.isHomeTeam,categoryIds:p.split("-").map(m=>parseInt(m))})}else{const d=n===1,s=d?this.getHomeTeamViews():this.getAwayTeamViews();a.view.componentProps.isHomeTeamForAnalysis=d,a.view.isHomeTeam=d;for(let c=0;c<x.length;c++){const f=i.analysisTypes.get(x[c]);if(!s.find(m=>m.view.componentProps.analysisType===f.analysisType)){a.view.componentProps.analysisType=f.analysisType,a.view.title=f.title,a.view.titleShort=f.titleShort,a.view.filterMultiple={categoryIds:x[c].split("-").map(m=>parseInt(m)),isHomeTeam:a.view.isHomeTeam};break}}}}if(this.viewId===2&&!g&&a.view.componentProps){const x=this.getComponentDynamicFilters(a.view.id),p=x||this.dynamicFilters;!x&&this.dynamicFilters&&this.dynamicFilters.length>0&&(this.setDynamicFilters(this.dynamicFilters,a.view.id),console.log(`GscTopPlayer - initialized specific filters for component ${a.view.id} with default filters:`,this.dynamicFilters)),a.view.componentProps.game&&(a.view.componentProps.gameid=a.view.componentProps.game.id,a.view.componentProps.season=a.view.componentProps.game.season_id,a.view.componentProps.teamView=p[1]===2?a.view.componentProps.game.awayTeam.team_id:p[1]===1?a.view.componentProps.game.homeTeam.team_id:0);const n=this.dynamicFilters[0]||[];let i=null;if(Array.isArray(n)){if(n.length>0){const c=this.childViews.map(m=>{var T;const C=(T=m.view.componentProps)==null?void 0:T.categoryView;return C&&C.length>0?C[0].id:null}).filter(m=>m!==null),f=n.filter(m=>!c.includes(m));console.log("GSCtops addView (array mode) - existingCategories:",c),console.log("GSCtops addView (array mode) - categoriesWithoutComponent:",f),f.length>0?i=f[0]:console.log("GSCtops addView (array mode) - all categories already have components")}}else{const c=n;c&&(this.childViews.find(f=>{var m;const T=(m=f.view.componentProps)==null?void 0:m.categoryView;return T&&T.length>0&&T[0].id===c})?console.log("GSCtops addView (single mode) - component already exists, skipping creation"):i=c)}let d=null;if(i)try{d=Vd(i)}catch(c){console.warn("Error getting category by ID:",c)}const s=p&&p.length>1?p[1]:1;a.view.filterMultiple={categoryId:i,teamType:s},a.view.componentProps.categoryView=d?[{id:i,name:d.name}]:i?[{id:i,name:`Category ${i}`}]:[{id:0,name:"Category"}]}if(this.viewId===8&&a.view.componentProps&&!g&&a.view.game&&(a.view.componentProps._isReactive||(a.view.componentProps=h.reactive(a.view.componentProps),a.view.componentProps._isReactive=!0),a.view.componentProps.areInactiveVisible=this.dynamicFilters[0]||!1,a.view.componentProps.game=(D=a.view)==null?void 0:D.game,a.view.componentProps.teamSelected={teamId:(A=(X=a.view)==null?void 0:X.game)==null?void 0:A.home_team},a.view.componentProps.isDefault=!1,xi.emit("component-props-updated",{viewId:a.view.id,componentProps:a.view.componentProps,dynamicFilters:this.dynamicFilters})),this.viewId===6&&a.view.componentProps&&!g){a.view.componentProps._isReactive||(a.view.componentProps=h.reactive(a.view.componentProps),a.view.componentProps._isReactive=!0);const x=this.getComponentDynamicFilters(a.view.id),p=x||this.dynamicFilters;!x&&this.dynamicFilters&&this.dynamicFilters.length>0&&this.setDynamicFilters(this.dynamicFilters,a.view.id);const n=p&&p.length>0?p[0]:[];if(n&&n.length>0){let i=0;for(const d of n)if(!this.childViews.find(s=>s.view.componentProps.gameNumber===d)){i=d;break}console.log("************************************************** newGameNumberToShow: ",i),i&&(console.log("2 ************************************************** newGameNumberToShow: entro",i),a.view.componentProps.gameNumber=i,a.view.filterMultiple={gameNumber:i})}console.log(" /////////---------------------------------------> ",a.view.filterMultiple),xi.emit("component-props-updated",{viewId:a.view.id,componentProps:a.view.componentProps,dynamicFilters:p})}if(this.viewId===3&&a.view.componentProps&&!g&&a.view.game){a.view.componentProps._isReactive||(a.view.componentProps=h.reactive(a.view.componentProps),a.view.componentProps._isReactive=!0);const x=this.getComponentDynamicFilters(a.view.id),p=x||this.dynamicFilters;!x&&this.dynamicFilters&&this.dynamicFilters.length>0&&this.setDynamicFilters(this.dynamicFilters,a.view.id);const n=p&&p.length>0?p[0]:!1;a.view.componentProps.desplegable=n,a.view.componentProps.key=n,a.view.componentProps.game=(b=a.view)==null?void 0:b.game,a.view.componentProps.defaultShields=!1,xi.emit("component-props-updated",{viewId:a.view.id,componentProps:a.view.componentProps,dynamicFilters:p})}if(this.viewId===4&&(console.log("TIMELINE TIMELINE - TIMELINE TIMELINE - TIMELINE TIMELINE - TIMELINE TIMELINE - TIMELINE TIMELINE - TIMELINE TIMELINE"),console.log("*********************** *********************** this.token *********************** *********************** ",this.token),a.view.componentProps&&!g&&a.view.game)){if(a.view.componentProps._isReactive||(a.view.componentProps=h.reactive(a.view.componentProps),a.view.componentProps._isReactive=!0),this.isPostMatch){a.view.componentProps.key=!1,a.view.componentProps.isDefault=!1,a.view.componentProps.token=this.token,a.view.componentProps.gameId=(v=(e=a.view)==null?void 0:e.game)==null?void 0:v.game_id,a.view.componentProps.homeTeam=(t=(u=a.view)==null?void 0:u.game)==null?void 0:t.home_team,a.view.componentProps.awayTeam=(y=(w=a.view)==null?void 0:w.game)==null?void 0:y.visiting_team;const n=this.getComponentDynamicFilters(a.view.id),i=n||this.dynamicFilters;!n&&this.dynamicFilters&&this.dynamicFilters.length>0&&this.setDynamicFilters(this.dynamicFilters,a.view.id);const d=i&&i.length>0?i[0]:[],s=this.hasEventTypeId(d,1),c=this.hasCategoryId(d,8),f=this.hasCategoryId(d,9),m=this.hasEventTypeId(d,3);console.log("Timeline - Events check:",{goals:s,yellowCards:c,redCards:f,substitutions:m,selectedEvents:d,componentId:a.view.id,usingSpecificFilters:!!n}),a.view.componentProps.goals=s,a.view.componentProps.yellowCards=c,a.view.componentProps.redCards=f,a.view.componentProps.substitutions=m}const x=this.getComponentDynamicFilters(a.view.id)||this.dynamicFilters,p=x&&x.length>0?x[0]:[];a.view.componentProps.selectedEvents=p,a.view.componentProps.key=p.length>0,xi.emit("component-props-updated",{viewId:a.view.id,componentProps:a.view.componentProps,dynamicFilters:x})}this.childViews.push(a),xi.emit("view-added"),console.log("this.childViews",this.childViews)}getHowManyViewsToAdd(a){if(this.viewId===5)return 1;if(this.viewId===6){const g=a[0];return g===2||g===3?g:1}if(this.viewId===4){const g=a&&a.length>0&&Array.isArray(a[0])&&a[0].length>0,D=this.childViews.length===0&&g;return console.log("Timeline getHowManyViewsToAdd:",{hasSelectedEvents:g,childViewsLength:this.childViews.length,shouldAdd:D,dynamicFilters:a}),g?1:0}if(this.viewId===9){const g=a[0],D=a[1];if(D===1||D===2){const X=D===1?this.getHomeTeamViews():this.getAwayTeamViews();return g.length-X.length}else return g*2-(this.getHomeTeamViews().length+this.getAwayTeamViews().length)}if(this.viewId===2){const g=a[0]||[],D=a[1]||1;if(console.log("GSCtops getHowManyViewsToAdd - categoriesIdsSelected:",g),console.log("GSCtops getHowManyViewsToAdd - teamType:",D),console.log("GSCtops getHowManyViewsToAdd - childViews.length:",this.childViews.length),!g||g.length===0)return 0;if(Array.isArray(g)){const X=this.childViews.map(b=>{var e;const v=(e=b.view.componentProps)==null?void 0:e.categoryView;return v&&v.length>0?v[0].id:null}).filter(b=>b!==null),A=g.filter(b=>!X.includes(b));return console.log("GSCtops getHowManyViewsToAdd (array mode) - existingCategories:",X),console.log("GSCtops getHowManyViewsToAdd (array mode) - categoriesWithoutComponent:",A),A.length}else{const X=g,A=this.childViews.find(b=>{var e,v;const u=(e=b.view.componentProps)==null?void 0:e.categoryView,t=((v=b.view.filterMultiple)==null?void 0:v.teamType)||1;return u&&u.length>0&&u[0].id===X&&t===D});return console.log("GSCtops getHowManyViewsToAdd (edit mode) - categoryId:",X),console.log("GSCtops getHowManyViewsToAdd (edit mode) - teamType:",D),console.log("GSCtops getHowManyViewsToAdd (edit mode) - existingComponent:",A),A?0:1}}if(this.viewId===1){const g=a[0]||[];if(console.log("GSCComparativeReports getHowManyViewsToAdd - selectedAnalysisTypes:",g),console.log("GSCComparativeReports getHowManyViewsToAdd - childViews.length:",this.childViews.length),!g||g.length===0)return 0;if(Array.isArray(g)){const D=this.childViews.map(A=>{var b;return(b=A.view.componentProps)==null?void 0:b.type}).filter(A=>A!==void 0),X=g.filter(A=>!D.includes(A));return console.log("GSCComparativeReports getHowManyViewsToAdd (array mode) - existingTypes:",D),console.log("GSCComparativeReports getHowManyViewsToAdd (array mode) - typesWithoutComponent:",X),X.length}else{const D=g,X=this.childViews.find(A=>{var b;return((b=A.view.componentProps)==null?void 0:b.type)===D});return console.log("GSCComparativeReports getHowManyViewsToAdd (edit mode) - analysisType:",D),console.log("GSCComparativeReports getHowManyViewsToAdd (edit mode) - existingComponent:",X),X?0:1}}return 0}getRequiresAddView(a){if(console.log("getRequiresAddView",this.viewId,a),this.viewId===5)return console.log("this.childViews:",this.childViews),a[0]===3?this.childViews.length<2:this.childViews.length===0;if(this.viewId===10)return a[0]===3?this.childViews.length<2:this.childViews.length===0;if(this.viewId===7)return a[1]===3?this.childViews.length<2:this.childViews.length===0;if(this.viewId===6){const g=a[0];return g?g.length>this.childViews.length:this.childViews.length===0}if(this.viewId===4){const g=a&&a.length>0&&Array.isArray(a[0])&&a[0].length>0,D=this.childViews.length===0&&g;return console.log("Timeline getRequiresAddView:",{hasSelectedEvents:g,childViewsLength:this.childViews.length,shouldAdd:D,dynamicFilters:a}),D}if(this.viewId===9)return this.getRequiresAddViewMultipleAndBothTeams(a);if(this.viewId===1){const g=a[0]||[];if(console.log("GSCComparativeReports getRequiresAddView - selectedAnalysisTypes:",g),console.log("GSCComparativeReports getRequiresAddView - childViews.length:",this.childViews.length),!g||g.length===0)return!1;if(Array.isArray(g)){const D=this.childViews.map(b=>{var e;return(e=b.view.componentProps)==null?void 0:e.type}).filter(b=>b!==void 0),X=g.filter(b=>!D.includes(b));console.log("GSCComparativeReports getRequiresAddView (array mode) - existingTypes:",D),console.log("GSCComparativeReports getRequiresAddView (array mode) - typesWithoutComponent:",X);const A=X.length>0;return console.log("GSCComparativeReports getRequiresAddView (array mode) - shouldAdd:",A),A}else{const D=g,X=this.childViews.find(b=>{var e;return((e=b.view.componentProps)==null?void 0:e.type)===D});console.log("GSCComparativeReports getRequiresAddView (edit mode) - analysisType:",D),console.log("GSCComparativeReports getRequiresAddView (edit mode) - existingComponent:",X);const A=!X;return console.log("GSCComparativeReports getRequiresAddView (edit mode) - shouldAdd:",A),A}}if(this.viewId===2){const g=a[0]||[];if(console.log("2222222222222222222222222222222222222222222222222222222222"),console.log(""),Array.isArray(g)){if(g.length>0){const D=this.childViews.map(b=>{var e;const v=(e=b.view.componentProps)==null?void 0:e.categoryView;return v&&v.length>0?v[0].id:null}).filter(b=>b!==null),X=g.filter(b=>!D.includes(b));console.log("GSCtops getRequiresAddView (array mode) - existingCategories:",D),console.log("GSCtops getRequiresAddView (array mode) - categoriesWithoutComponent:",X);const A=X.length>0;return console.log("GSCtops getRequiresAddView (array mode) - shouldAdd:",A),A}return!1}else{const D=g,X=a[1]||1;if(D){const A=this.childViews.find(e=>{var v,u;const t=(v=e.view.componentProps)==null?void 0:v.categoryView,w=((u=e.view.filterMultiple)==null?void 0:u.teamType)||1;return t&&t.length>0&&t[0].id===D&&w===X});console.log("GSCtops getRequiresAddView (single mode) - categoryId:",D,"teamType:",X),console.log("GSCtops getRequiresAddView (single mode) - existingComponent:",A);const b=!A;return console.log("GSCtops getRequiresAddView (single mode) - shouldAdd:",b),b}return!1}}return this.viewId===8||this.viewId===3?this.childViews.length===0:!1}getRequiresAddViewMultipleAndBothTeams(a){console.log("*******************************************************"),console.log("dynamicFilters",a);const g=this.childViews.filter(v=>v.view.isHomeTeam),D=this.childViews.filter(v=>!v.view.isHomeTeam),X=a[0].length,A=a[1],b=X*(A===1||A===2?1:2),e=A===3?g.length+D.length:g.length||D.length;return b>e}getRequiresLessViews(a){if(this.viewId===5)return a[0]!==3&&this.childViews.length>1;if(this.viewId===6){const g=a[0];return g===2||g===3}return this.viewId,!1}updateSummary({dynamicFilters:a}){const g=this.childViews[0],D=document.querySelector(`[gs-id="${g.view.id}"]`),X=g.grid;if(console.log("sumaryyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyYYYYYYYYYYYYYYYYYy"),console.log("childView",g),console.log("dynamicFilters",a),g&&D&&X){const A=a[0],b=`min_column${A?"_2":""}`,e=`min_row${A?"_2":""}`,v=`max_column${A?"_2":""}`,u=`max_row${A?"_2":""}`,t=`colspan${A?"_2":""}`,w=`rowspan${A?"_2":""}`,y=g.view.coreView[t],x=g.view.coreView[w],p=g.view.coreView[b],n=g.view.coreView[e],i=g.view.coreView[v],d=g.view.coreView[u];g.view.w=y,g.view.h=x,g.view.maxWidth=i,g.view.maxHeight=d,g.view.minWidth=p,g.view.minHeight=n,D.setAttribute("gs-w",y),D.setAttribute("gs-h",x),D.setAttribute("gs-max-w",i),D.setAttribute("gs-max-h",d),D.setAttribute("gs-min-w",p),D.setAttribute("gs-min-h",n),console.log("childView.view",g.view),X.update(D,{h:x,w:y,"gs-max-h":d,"gs-max-w":i,"gs-min-h":n,"gs-min-w":p})}}updateDynamicFilters(a,g=null){if(this._isUpdating){console.log("Skipping updateDynamicFilters due to update in progress");return}this._isUpdating=!0,g?(this.componentSpecificFilters.set(g,[...a]),console.log(`Updated specific filters for component ${g}:`,a)):this.dynamicFilters=a,xi.emit("component-added-to-container",this);try{if(this.viewId===5){const D=a[0]||1;if(D<3)if(this.childViews.length===1){const X=this.childViews[0];X.view.componentProps&&(X.view.componentProps.preMatchType=D,X.view.filterMultiple={isHomeTeam:X.view.componentProps.preMatchType===1})}else{const X=this.childViews.pop(),A=X.grid,b=X.page,e=document.querySelector(`[gs-id="${X.view.id}"]`);if(A&&e&&(A.removeWidget(e),b)){const u=b.items.findIndex(t=>t.id===X.view.id);u!==-1&&b.items.splice(u,1)}const v=this.childViews[0];v.view.componentProps&&(v.view.componentProps.preMatchType=D,v.view.filterMultiple={isHomeTeam:v.view.componentProps.preMatchType})}else this.childViews.forEach((X,A)=>{X.view.componentProps.preMatchType=A+1,X.view.filterMultiple={isHomeTeam:X.view.componentProps.preMatchType}})}if(this.viewId===10){const D=a[0]||1;if(D<3)if(this.childViews.length===1){const X=this.childViews[0];X.view.componentProps&&(X.view.componentProps.isHomeTeamForAnalysis=D===1)}else{const X=this.childViews.pop(),A=X.grid,b=X.page,e=document.querySelector(`[gs-id="${X.view.id}"]`);if(A&&e&&(A.removeWidget(e),b)){const u=b.items.findIndex(t=>t.id===X.view.id);u!==-1&&b.items.splice(u,1)}const v=this.childViews[0];v.view.componentProps&&(v.view.componentProps.isHomeTeamForAnalysis=D===1)}else this.childViews.forEach((X,A)=>{X.view.componentProps.isHomeTeamForAnalysis=A%2===0})}if(this.viewId===7){const D=a[1];if(D===3)this.childViews.forEach((X,A)=>{X.view.componentProps.isHomeTeamForAnalysis=A%2===0,X.view.isHomeTeam=A%2===0,X.view.componentProps.analysisType=this.dynamicFilters[0]===1?"offensive":"defensive",X.view.filterMultiple={isHomeTeam:X.view.isHomeTeam}});else{const X=D===1;if(this.childViews.length>0){const A=this.childViews[0];A.view.componentProps.isHomeTeamForAnalysis=X,A.view.isHomeTeam=X,A.view.componentProps.analysisType=this.dynamicFilters[0]===1?"offensive":"defensive",A.view.filterMultiple={isHomeTeam:X},this.childViews.length>1&&this.removeChildView(this.childViews[1])}}}if(this.viewId===9){const D=a[0],X=a[1];if(X===3){if(this.childViews.length>D.length){const A=D.map(b=>{const e=b.join("-");return Fd.get(this.viewId).analysisTypes.get(e).analysisType});this.childViews.reduce((b,e)=>(A.includes(e.view.componentProps.analysisType)||b.push(e.view.componentProps.analysisType),b),[]).forEach(b=>{const e=this.childViews.findIndex(v=>v.view.componentProps.analysisType===b);if(e!==-1){for(let v=e;v<this.childViews.length;v++){const u=this.childViews[v+1],t=this.childViews[v];u&&(t.view.componentProps.analysisType=u.view.componentProps.analysisType,t.view.componentProps.isHomeTeamForAnalysis=u.view.componentProps.isHomeTeamForAnalysis,t.view.title=u.view.title,t.view.titleShort=u.view.titleShort,t.view.isHomeTeam=u.view.isHomeTeam)}this.removeChildView(this.childViews[this.childViews.length-1])}})}}else{const A=X===1,b=this.getHomeTeamViews(),e=this.getAwayTeamViews();if(A&&b.length===0)e.forEach(v=>{v.view.componentProps.isHomeTeamForAnalysis=!0,v.view.isHomeTeam=!0});else if(!A&&e.length===0)b.forEach(v=>{v.view.componentProps.isHomeTeamForAnalysis=!1,v.view.isHomeTeam=!1});else if(b.length===e.length)A||b.forEach(v=>{v.view.componentProps.isHomeTeam=!1,v.view.isHomeTeam=!1}),e.forEach(v=>{this.removeChildView(v)});else{const v=A?this.getHomeTeamViews():this.getAwayTeamViews();if(v.length>D.length){const u=D.map(t=>{const w=t.join("-");return Fd.get(this.viewId).analysisTypes.get(w).analysisType});v.forEach(t=>{u.includes(t.view.componentProps.analysisType)||this.removeChildView(t)})}}}}if(this.viewId===2){console.log("GSCtops updateDynamicFilters - processing category changes"),console.log("GSCtops updateDynamicFilters - componentId:",g);const D=a[0]||[];if(Array.isArray(D)){console.log("GSCtops updateDynamicFilters - array mode, selected categories:",D);const X=this.childViews.map(b=>{var e,v;const u=(e=b.view.componentProps)==null?void 0:e.categoryView,t=((v=b.view.filterMultiple)==null?void 0:v.teamType)||1,w=u&&u.length>0?u[0].id:null;return w?{categoryId:w,teamType:t,viewId:b.view.id}:null}).filter(b=>b!==null);if(console.log("GSCtops updateDynamicFilters - existing category-team combinations:",X),g){console.log("GSCtops updateDynamicFilters - updating specific component:",g);const b=this.childViews.find(e=>e.view.id===g);if(b){const e=a[1]||1,v=D[0];if(v){let u=null;try{u=Vd(v)}catch(t){console.warn("Error getting category by ID:",t)}b.view.filterMultiple={categoryId:v,teamType:e},b.view.componentProps.game&&(e===1?b.view.componentProps.teamView=b.view.componentProps.game.homeTeam.team_id:e===2?b.view.componentProps.teamView=b.view.componentProps.game.awayTeam.team_id:b.view.componentProps.teamView=0),b.view.componentProps.categoryView=u?[{id:v,name:u.name}]:[{id:v,name:`Category ${v}`}],console.log("GSCtops updateDynamicFilters - updated specific component:",g,"categoryId:",v,"teamType:",e)}}}else{const b=a[1]||1;D.forEach(e=>{const v=X.find(u=>u.categoryId===e&&u.teamType===b);console.log(v?"GSCtops updateDynamicFilters - component already exists for category:":"GSCtops updateDynamicFilters - creating new component for category:",e,"teamType:",b)})}const A=X.map(b=>b.categoryId).filter(b=>!D.includes(b));if(console.log("GSCtops updateDynamicFilters - categories to remove:",A),A.forEach(b=>{this.childViews.filter(e=>{var v;const u=(v=e.view.componentProps)==null?void 0:v.categoryView;return u&&u.length>0&&u[0].id===b}).forEach(e=>{console.log("GSCtops updateDynamicFilters - removing component for category:",b),console.log("GSCtops updateDynamicFilters - view to remove:",e.view.id),this.removeChildView(e),xi.emit("component-removed",{viewId:e.view.id,categoryId:b})})}),g){const b=D[0];if(b){const e=this.childViews.find(v=>v.view.id===g);if(e){let v=null;try{v=Vd(b)}catch(t){console.warn("Error getting category by ID:",t)}const u=a[1]||1;e.view.filterMultiple={categoryId:b,teamType:u},e.view.componentProps.game&&(e.view.componentProps.teamView=u===2?e.view.componentProps.game.awayTeam.team_id:u===1?e.view.componentProps.game.homeTeam.team_id:0),e.view.componentProps.categoryView=v?[{id:b,name:v.name}]:[{id:b,name:`Category ${b}`}]}}}}else{const X=D;if(X&&g){const A=this.childViews.find(b=>b.view.id===g);if(A){let b=null;try{b=Vd(X)}catch(v){console.warn("Error getting category by ID:",v)}const e=a[1]||1;A.view.filterMultiple={categoryId:X,teamType:e},A.view.componentProps.game&&(A.view.componentProps.teamView=e===2?A.view.componentProps.game.awayTeam.team_id:e===1?A.view.componentProps.game.homeTeam.team_id:0),A.view.componentProps.categoryView=b?[{id:X,name:b.name}]:[{id:X,name:`Category ${X}`}]}}}}if(this.viewId===8){const D=a[0]||!1;this.childViews.forEach(X=>{X.view.componentProps&&(X.view.componentProps._isReactive||(X.view.componentProps=h.reactive(X.view.componentProps),X.view.componentProps._isReactive=!0),X.view.componentProps.areInactiveVisible=D,X.view.componentProps.key=D,xi.emit("component-props-updated",{viewId:X.view.id,componentProps:X.view.componentProps,dynamicFilters:a}),xi.emit("dynamic-filters-changed",{containerViewId:this.viewId,viewId:X.view.id,dynamicFilters:a}))})}if(this.viewId===1){const D=a[0]||[];if(console.log("GSCComparativeReports updateDynamicFilters - selectedAnalysisTypes:",D),console.log("GSCComparativeReports updateDynamicFilters - componentId:",g),g){console.log(`GSCComparativeReports - updating specific filters for component ${g}`),this.setDynamicFilters(a,g);const X=this.childViews.find(A=>A.view.id===g);X&&this.updateComparative(X,a)}else if(console.log("GSCComparativeReports - updating all components with global filters"),Array.isArray(D))console.log("GSCComparativeReports updateDynamicFilters (array mode) - skipping removal logic to prevent cross-page deletions"),this.childViews.length>0&&D.length>0&&this.childViews.forEach((X,A)=>{if(X.view.componentProps&&A<D.length){const b=D[A],e=Fd.get(this.viewId);X.view.componentProps.type=b,X.view.componentProps.default=!1,X.view.title=`Comparativa ${e[b]}`,X.view.filterMultiple={category:b},console.log(`GSCComparativeReports updateDynamicFilters - updated component ${A} with type:`,b)}});else{const X=D;if(X&&this.childViews.length>0){const A=this.childViews[0];if(A.view.componentProps){const b=Fd.get(this.viewId);A.view.componentProps.type=X,A.view.componentProps.default=!1,A.view.title=`Comparativa ${b[X]}`,A.view.filterMultiple={category:X}}}}console.log("-------------------------------------------------------------"),console.log("childViews",this.childViews)}if(this.viewId===6){console.log("************************************************** GSCLineupsReports updateDynamicFilters - dynamicFilters:",a),console.log("************************************************** GSCLineupsReports updateDynamicFilters - childViews:",this.childViews);const D=a[0];let X=0;for(const A of D)if(!this.childViews.find(b=>b.view.componentProps.gameNumber===A)){X=A;break}if(console.log("************************************************** newGameNumberToShow: ",X),X&&(a[0]=X,console.log("************************************************** newGameNumberToShow: ",X)),console.log("/////////////// ************************************************** GSCLineupsReports updateDynamicFilters - selectedGameNumber:"),g){console.log(`GSCLineupsReports - updating specific filters for component ${g}`),this.setDynamicFilters(a,g);const A=this.childViews.find(b=>b.view.id===g);A&&this.updateGSCLineupsReports(A,a)}else console.log("GSCLineupsReports - updating all components with global filters"),this.childViews.forEach(A=>{A.view.componentProps&&(A.view.componentProps._isReactive||(A.view.componentProps=h.reactive(A.view.componentProps),A.view.componentProps._isReactive=!0),xi.emit("component-props-updated",{viewId:A.view.id,componentProps:A.view.componentProps,dynamicFilters:a}),xi.emit("dynamic-filters-changed",{containerViewId:this.viewId,viewId:A.view.id,dynamicFilters:a}))})}if(this.viewId===3){if(console.log("GSCMatchSummary updateDynamicFilters:",{dynamicFilters:a,componentId:g,childViewsLength:this.childViews.length}),g){console.log(`GSCMatchSummary - updating specific filters for component ${g}`),this.setDynamicFilters(a,g);const D=this.childViews.find(X=>X.view.id===g);D&&this.updateMatchSummary(D,a)}else{console.log("GSCMatchSummary - updating all components with global filters");const D=a[0]||!1;this.childViews.forEach(X=>{X.view.componentProps&&(X.view.componentProps._isReactive||(X.view.componentProps=h.reactive(X.view.componentProps),X.view.componentProps._isReactive=!0),X.view.componentProps.desplegable=D,X.view.componentProps.key=D,xi.emit("component-props-updated",{viewId:X.view.id,componentProps:X.view.componentProps,dynamicFilters:a}),xi.emit("dynamic-filters-changed",{containerViewId:this.viewId,viewId:X.view.id,dynamicFilters:a}))})}this.updateSummary({dynamicFilters:a})}if(this.viewId===4){const D=a&&a.length>0&&Array.isArray(a[0])&&a[0].length>0;if(console.log("Timeline updateDynamicFilters:",{hasSelectedEvents:D,childViewsLength:this.childViews.length,dynamicFilters:a,componentId:g}),g){console.log(`Timeline - updating specific filters for component ${g}`),this.setDynamicFilters(a,g);const X=this.childViews.find(A=>A.view.id===g);X&&this.updateTimeline(X,a)}else if(console.log("Timeline - updating all components with global filters"),!D&&this.childViews.length>0)console.log("Timeline - removing views due to no events"),this.childViews.forEach(X=>{this.removeChildView(X)});else if(D&&this.childViews.length===0){console.log("Timeline - emitting add-view event");const X={pageId:null,view:{id:this.viewId,name:"Timeline",title:"Timeline",colspan:12,rowspan:6,max_column:12,max_row:12,min_column:6,min_row:4},filterAndWidgetContainer:this};xi.emit("add-view",X)}else this.childViews.forEach(X=>{this.updateTimeline(X,a)})}}finally{this._isUpdating=!1}}removeAllChildViews(){[...this.childViews].forEach(a=>{this.removeChildView(a)})}removeChildView(a){const g=this.childViews.findIndex(D=>D.view.id===a.view.id);if(g!==-1){const D=this.childViews[g];this.childViews.splice(g,1),D.view.id&&(this.componentSpecificFilters.delete(D.view.id),console.log(`Cleaned specific filters for component ${D.view.id}`));const X=D.grid,A=D.page,b=document.querySelector(`[gs-id="${D.view.id}"]`);if(X&&b&&(X.removeWidget(b),A)){const e=A.items.findIndex(v=>v.id===D.view.id);e!==-1&&(A.items.splice(e,1),A.items.length===0&&xi.emit("empty-page",A))}}}updateView({view:a,dynamicFilters:g,filtersJSON:D}){this.dynamicFilters=g;const X=this.childViews.find(A=>A.view.id===a.view.id);if(X){X.view.filtersJSON=D,X.view.coreView&&(X.view.coreView.filtersJSON=D);let A=g;if(this.viewId===4){const b=this.getComponentDynamicFilters(a.view.id);b&&(A=b,console.log(`Timeline updateView - using specific filters for component ${a.view.id}:`,A))}else if(this.viewId===8){const b=this.getComponentDynamicFilters(a.view.id);b&&(A=b,console.log(`FieldPosesion updateView - using specific filters for component ${a.view.id}:`,A))}else if(this.viewId===3){const b=this.getComponentDynamicFilters(a.view.id);console.log(`GSCMatchSummary updateView - component ${a.view.id}:`,{componentSpecificFilters:b,dynamicFilters:g,willUseSpecific:!!b}),b?(A=b,console.log(`GSCMatchSummary updateView - using specific filters for component ${a.view.id}:`,A)):console.log("GSCMatchSummary updateView - no specific filters found, using dynamicFilters:",A),this.updateSummary({dynamicFilters:A})}else if(this.viewId===1){const b=this.getComponentDynamicFilters(a.view.id);console.log(`GSCComparativeReports updateView - component ${a.view.id}:`,{componentSpecificFilters:b,dynamicFilters:g,willUseSpecific:!!b}),b?(A=b,console.log(`GSCComparativeReports updateView - using specific filters for component ${a.view.id}:`,A)):console.log("GSCComparativeReports updateView - no specific filters found, using dynamicFilters:",A)}else if(this.viewId===6){const b=this.getComponentDynamicFilters(a.view.id);console.log(`GSCLineupsReports updateView - component ${a.view.id}:`,{componentSpecificFilters:b,dynamicFilters:g,willUseSpecific:!!b}),b?(A=b,console.log(`GSCLineupsReports updateView - using specific filters for component ${a.view.id}:`,A)):console.log("GSCLineupsReports updateView - no specific filters found, using dynamicFilters:",A)}else if(this.viewId===7){const b=this.getComponentDynamicFilters(a.view.id);console.log(`GSCGoalData updateView - component ${a.view.id}:`,{componentSpecificFilters:b,dynamicFilters:g,willUseSpecific:!!b}),b?(A=b,console.log(`GSCGoalData updateView - using specific filters for component ${a.view.id}:`,A)):console.log("GSCGoalData updateView - no specific filters found, using dynamicFilters:",A)}else if(this.viewId===9){const b=this.getComponentDynamicFilters(a.view.id);console.log(`GSCFieldDataByZones updateView - component ${a.view.id}:`,{componentSpecificFilters:b,dynamicFilters:g,willUseSpecific:!!b}),b?(A=b,console.log(`GSCFieldDataByZones updateView - using specific filters for component ${a.view.id}:`,A)):console.log("GSCFieldDataByZones updateView - no specific filters found, using dynamicFilters:",A)}this.viewId===5?this.updateVolumetricField(X,A):this.viewId===7?this.updateGoalData(X,A):this.viewId===9?this.updateFieldDataByZones(X,A):this.viewId===10?this.updateXg(X,A):this.viewId===3?this.updateMatchSummary(X,A):this.viewId===4?this.updateTimeline(X,A):this.viewId===8?this.updateFieldPosesion(X,A):this.viewId===1?this.updateComparative(X,A):this.viewId===2?this.updateGSCtops(X,A):this.viewId===6&&this.updateGSCLineupsReports(X,A)}else console.log("viewToUpdate not found")}updateComparative(a,g){if(console.log("update comparative",g),a.view.componentProps){const D=g[0]||[];if(console.log("GSCComparativeReports updateComparative - selectedAnalysisTypes:",D),D&&D.length>0){let X;if(Array.isArray(D)){const b=this.childViews.findIndex(e=>e.view.id===a.view.id);b>=0&&b<D.length?X=D[b]:X=D[0]}else X=D;const A=Fd.get(this.viewId);a.view.componentProps.type=X,a.view.componentProps.default=!1,a.view.title=`Comparativa ${A[X]}`,a.view.filterMultiple={category:X},console.log("GSCComparativeReports updateComparative - updated component with type:",X)}xi.emit("component-props-updated",{viewId:a.view.id,componentProps:a.view.componentProps,dynamicFilters:g}),xi.emit("dynamic-filters-changed",{containerViewId:this.viewId,viewId:a.view.id,dynamicFilters:g})}}updateVolumetricField(a,g){if(console.log("updateVolumetricField",g),a.view.componentProps){const D=g[0]||1;a.view.isHomeTeam=D===1,a.view.componentProps.preMatchType=D,a.view.filterMultiple={isHomeTeam:D},console.log("GSCVolumetricField updateVolumetricField - updated component with:",{isHomeTeam:D,preMatchType:a.view.componentProps.preMatchType,filterMultiple:a.view.filterMultiple}),xi.emit("component-props-updated",{viewId:a.view.id,componentProps:a.view.componentProps,dynamicFilters:g}),xi.emit("dynamic-filters-changed",{containerViewId:this.viewId,viewId:a.view.id,dynamicFilters:g}),xi.emit("force-component-update",{itemId:a.view.id,componentProps:a.view.componentProps})}}updateGoalData(a,g){if(console.log("updateGoalData",g),a.view.componentProps){const D=g[0]===1?"offensive":"defensive",X=g[1]===1;a.view.componentProps.analysisType=D,a.view.componentProps.isHomeTeamForAnalysis=X,a.view.isHomeTeam=X,a.view.filterMultiple={isHomeTeam:X},console.log("GSCGoalData updateGoalData - updated component with:",{analysisType:D,isHomeTeam:X,filterMultiple:a.view.filterMultiple}),xi.emit("component-props-updated",{viewId:a.view.id,componentProps:a.view.componentProps,dynamicFilters:g}),xi.emit("dynamic-filters-changed",{containerViewId:this.viewId,viewId:a.view.id,dynamicFilters:g}),xi.emit("force-component-update",{itemId:a.view.id,componentProps:a.view.componentProps})}}updateFieldDataByZones(a,g){if(console.log("updateFieldDataByZones",g),a.view.componentProps){a.view.componentProps._isReactive||(a.view.componentProps=h.reactive(a.view.componentProps),a.view.componentProps._isReactive=!0);const D=g[0],X=g[1]===1;if(a.view.componentProps.isHomeTeamForAnalysis=X,a.view.isHomeTeam=X,a.view.filterMultiple={categoryIds:D,isHomeTeam:X},D&&D.length){const A=D.join("-"),b=Fd.get(this.viewId).analysisTypes.get(A);b&&(a.view.componentProps.analysisType=b.analysisType,a.view.title=b.title)}a.view.componentProps._updateKey=Date.now(),xi.emit("component-props-updated",{viewId:a.view.id,componentProps:a.view.componentProps,dynamicFilters:g}),xi.emit("dynamic-filters-changed",{containerViewId:this.viewId,viewId:a.view.id,dynamicFilters:g}),xi.emit("force-component-update",{itemId:a.view.id,componentProps:a.view.componentProps}),console.log("GSCFieldDataByZones updateFieldDataByZones - updated component with:",{categoryIds:D,isHomeTeam:X,analysisType:a.view.componentProps.analysisType,title:a.view.title,filterMultiple:a.view.filterMultiple})}}updateXg(a,g){a.view.componentProps&&(a.view.isHomeTeam=g[0]===1,a.view.componentProps.isHomeTeamForAnalysis=g[0]||1)}updateMatchSummary(a,g){if(a.view.componentProps){a.view.componentProps._isReactive||(a.view.componentProps=h.reactive(a.view.componentProps),a.view.componentProps._isReactive=!0);const D=g&&g.length>0?g[0]:!1;a.view.componentProps.desplegable=D,a.view.componentProps.key=D,xi.emit("component-props-updated",{viewId:a.view.id,componentProps:a.view.componentProps,dynamicFilters:g}),xi.emit("dynamic-filters-changed",{containerViewId:this.viewId,viewId:a.view.id,dynamicFilters:g})}}updateTimeline(a,g){if(a.view.componentProps){a.view.componentProps._isReactive||(a.view.componentProps=h.reactive(a.view.componentProps),a.view.componentProps._isReactive=!0);const D=this.getComponentDynamicFilters(a.view.id),X=D||g,A=X&&X.length>0?X[0]:[];a.view.componentProps.selectedEvents=A,a.view.componentProps.key=A.length>0;const b=this.hasEventTypeId(A,1),e=this.hasCategoryId(A,8),v=this.hasCategoryId(A,9),u=this.hasEventTypeId(A,3);console.log("Timeline update - Events check:",{goals:b,yellowCards:e,redCards:v,substitutions:u,selectedEvents:A,componentId:a.view.id,usingSpecificFilters:!!D}),a.view.componentProps.goals=b,a.view.componentProps.yellowCards=e,a.view.componentProps.redCards=v,a.view.componentProps.substitutions=u,a.view.componentProps._updateKey=Date.now(),xi.emit("component-props-updated",{viewId:a.view.id,componentProps:a.view.componentProps,dynamicFilters:X}),xi.emit("dynamic-filters-changed",{containerViewId:this.viewId,viewId:a.view.id,dynamicFilters:X}),xi.emit("force-component-update",{itemId:a.view.id,componentProps:a.view.componentProps})}}updateFieldPosesion(a,g){if(a.view.componentProps){a.view.componentProps._isReactive||(a.view.componentProps=h.reactive(a.view.componentProps),a.view.componentProps._isReactive=!0);const D=g&&g.length>0?g[0]:!1;a.view.componentProps.areInactiveVisible=D,a.view.componentProps.key=D,xi.emit("component-props-updated",{viewId:a.view.id,componentProps:a.view.componentProps,dynamicFilters:g}),xi.emit("dynamic-filters-changed",{containerViewId:this.viewId,viewId:a.view.id,dynamicFilters:g})}}updateGSCtops(a,g){if(console.log("updateGSCtops",g),a.view.componentProps){const D=g[0]||[];if(Array.isArray(D)){if(console.log("GSCtops updateGSCtops (array mode) - skipping removal logic to prevent cross-page deletions"),D.length>0){const X=D[0];let A=null;try{A=Vd(X)}catch(e){console.warn("Error getting category by ID:",e)}const b=g[1]||1;a.view.filterMultiple={categoryId:X,teamType:b},a.view.componentProps.game&&(b===1?a.view.componentProps.teamView=a.view.componentProps.game.homeTeam.team_id:b===2?a.view.componentProps.teamView=a.view.componentProps.game.awayTeam.team_id:a.view.componentProps.teamView=0),a.view.componentProps.categoryView=A?[{id:X,name:A.name}]:[{id:X,name:`Category ${X}`}]}}else{const X=D;if(X){let A=null;try{A=Vd(X)}catch(e){console.warn("Error getting category by ID:",e)}const b=g[1]||1;a.view.filterMultiple={categoryId:X,teamType:b},a.view.componentProps.game&&(b===1?a.view.componentProps.teamView=a.view.componentProps.game.homeTeam.team_id:b===2?a.view.componentProps.teamView=a.view.componentProps.game.awayTeam.team_id:a.view.componentProps.teamView=0),a.view.componentProps.categoryView=A?[{id:X,name:A.name}]:[{id:X,name:`Category ${X}`}]}}}}updateGSCLineupsReports(a,g){if(console.log("updateGSCLineupsReports",g),a.view.componentProps){const D=g[0]||[];if(Array.isArray(D)){if(console.log("GSCLineupsReports updateGSCLineupsReports (array mode) - skipping removal logic to prevent cross-page deletions"),D.length>0){const X=D[0];a.view.filterMultiple={gameNumber:X},a.view.componentProps.gameNumber=X}}else{const X=D;X&&(a.view.filterMultiple={gameNumber:X},a.view.componentProps.gameNumber=X)}xi.emit("component-props-updated",{viewId:a.view.id,componentProps:a.view.componentProps,dynamicFilters:g}),xi.emit("dynamic-filters-changed",{containerViewId:this.viewId,viewId:a.view.id,dynamicFilters:g}),xi.emit("force-component-update",{itemId:a.view.id,componentProps:a.view.componentProps})}}}const Dse={class:"template-page__header"},Vse={class:"template-page__header__name"},Fse=["value"],jse={class:"template-page__header__details"},Use={class:"template-page__header__details__teams"},qse={class:"template-page__header__details__teams__team"},Wse={key:0,class:"template-page__header__details__teams__team__logo"},Gse=["src"],Hse={key:1,width:"25",height:"25",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Jse={class:"template-page__header__details__teams__team"},Kse={key:0,class:"template-page__header__details__teams__team__logo"},Xse=["src"],Zse={key:1,width:"25",height:"25",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Yse={class:"template-page__content"},Qse=["id"],$se=["gs-id","gs-x","gs-y","gs-w","gs-h","gs-max-w","gs-max-h","gs-min-w","gs-min-h","gs-no-resize","gs-no-move","gs-auto-position"],ele=h.defineComponent({__name:"TemplateReportPage",props:{token:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"},game:{type:Object,default:()=>null},lastGames:{type:Array,default:()=>null},id:{type:[String,Number],default:()=>String(Date.now())},page:{type:Object,default:()=>({title:"Page 1",items:[{name:"Tabla jugadores",id:`w-${String(Date.now())}`,x:0,y:0,w:4,h:4,maxWidth:4,maxHeight:4,noResize:!1,noMove:!1,componentProps:{}}]})},isPostMatch:{type:Boolean,default:!1},isTemplateMode:{type:Boolean,default:!1},isFilterVisible:{type:Boolean,default:!1}},emits:["intersection-changed","delete-page","change-sort","edit-view","view-changed","component-props-updated","delete-view","dynamic-filters-changed"],setup(r,{emit:a}){var g,D;const X=h.ref(null);let A=null;const b=r,e=h.ref(!1),v=a,u=h.computed(()=>b.page.items.reduce((z,V)=>(z.set(V.id,V),z),new Map)),t=h.computed(()=>{var z,V,U,q;return b.game&&b.game.homeTeam&&b.game.awayTeam?{homeTeam:{name:((z=b.game.homeTeam)==null?void 0:z.acronym)||"LOC",logo:((V=b.game.homeTeam)==null?void 0:V.logo)||null},awayTeam:{name:((U=b.game.awayTeam)==null?void 0:U.acronym)||"VIS",logo:((q=b.game.awayTeam)==null?void 0:q.logo)||null}}:{homeTeam:{name:"LOC"},awayTeam:{name:"VIS"}}});let w=null,y=null,x=!1,p=null,n=!1;const i=()=>{n=!0},d=()=>{n=!1};function s(){n||(x=!0,p&&clearTimeout(p),p=setTimeout(()=>{x=!1},150))}function c(){const z={root:null,rootMargin:"0px",threshold:.7};w=new IntersectionObserver(q=>{q.forEach(W=>{if(console.log("Intersection observer triggered:",W.isIntersecting,"isScrolling:",x),x){console.log("Scroll in progress, delaying intersection event"),y&&clearTimeout(y),y=setTimeout(()=>{console.log("Emitting delayed intersection event:",W.isIntersecting),v("intersection-changed",W.isIntersecting)},100);return}y&&clearTimeout(y),y=setTimeout(()=>{console.log("Emitting immediate intersection event:",W.isIntersecting),v("intersection-changed",W.isIntersecting)},50)})},z);const V=X.value;V&&w.observe(V);const U=document.querySelector(".container-main");U&&U.addEventListener("scroll",s,{passive:!0}),document.addEventListener("programmatic-scroll-start",i),document.addEventListener("programmatic-scroll-end",d)}function f(z){console.log("newValue:",z),b.page.title=z.target.value,v("view-changed")}const m={game_id:0,season_id:0,prematch:!1},T={gameId:90209,id:90209,seasonId:1909,regularSeasonId:1909,matchday_name:"Matchday 1",status:1,score:[1,3],game_status:1,dateTimeUTC:"2024-09-05T22:00:00Z",homeTeam:{logo:"https://golstatsimages.blob.core.windows.net/teams-80/2936.png",team_id:2936,provisional_logo:"https://golstatsimages.blob.core.windows.net/teams-provisional/2936.png",colloquial_name:"Guyana",acronym:"GUY",team_name:"Guyana"},awayTeam:{logo:"https://golstatsimages.blob.core.windows.net/teams-80/3279.png",team_id:3279,provisional_logo:"https://golstatsimages.blob.core.windows.net/teams-provisional/3279.png",colloquial_name:"Surinam",acronym:"SUR",team_name:"Surinam"},is_live:0,minutes:{home_goals_minutes:[],visiting_goals_minutes:[],home_yellow_cards_minutes:[],away_yellow_cards_minutes:[],home_red_cards_minutes:[],away_red_cards_minutes:[]}},C=new Map([[5,{component:Ib,componentName:"GSCVolumetricField",props:{isGamePreMatch:!b.isPostMatch,areTeamsVisible:!1,isTitleVisible:!1,isGhostEffect:b.isTemplateMode,isTemplateMode:b.isTemplateMode,preMatchType:1}}],[2,{component:Tw,componentName:"GscTopPlayer",props:{categoryView:[{id:0,name:"Category"}],gamed:b.game?b.game.id:T.gameId,game:b.game,season:b.game?(g=b==null?void 0:b.game)==null?void 0:g.season_id:T.seasonId,teamView:0,useDummyData:b.isTemplateMode}}],[8,{component:C3,componentName:"FieldPosesion",props:{widthSection:600,game:T,teamSelected:{teamId:0},areInactiveVisible:!0,showTitle:!1,isDefault:!0,key:!1}}],[6,{component:L4,componentName:"GSCLineupsReports",props:{selectedOption:b.isPostMatch?"Postmatch":"Prematch",game:m,gamehome:m,gameaway:m}}],[3,{component:A3,componentName:"GSCMatchSummary",props:{game:T,defaultShields:!0,desplegable:!1}}],[4,{component:h5,componentName:"GSCTimelineReports",props:{key:!0,isDefault:!0,gameId:T.gameId,homeTeam:T.homeTeam.team_id,awayTeam:T.awayTeam.team_id,token:b.token,goals:!0,yellowCards:!0,redCards:!0,substitutions:!0}}],[7,{component:v6,componentName:"GSCGoalData",props:{game:b.game,isHomeTeamForAnalysis:!0,canInteract:!1,canPlayVideos:!1,isPreMatch:!b.isPostMatch,analysisType:1}}],[9,{component:R4,componentName:"GSCFieldDataByZones",props:{game:b.game,isHomeTeamForAnalysis:!0,analysisType:"successfulPasses",canPlayVideos:!1,isPreMatch:!b.isPostMatch}}],[10,{component:A6,componentName:"GSCGameXg",props:{game:b.game,isHomeTeamForAnalysis:!0,isPostMatch:b.isPostMatch}}],[1,{component:m6,componentName:"GSCComparativeReports",props:{gameId:b.game?b.game.id:"",homeLogo:b.game?b.game.homeTeam.logo:"",awayLogo:b.game?b.game.awayTeam.logo:"",seasonId:b.game?(D=b==null?void 0:b.game)==null?void 0:D.season_id:0,typeGame:b.isPostMatch,type:"stoppedBall",default:b.isTemplateMode}}]]);function S(z){if(z)if(typeof z=="string"){let V=null;switch(z){case"GSCVolumetricField":V=Ib;break;case"GSCGoalData":V=v6;break;case"GscTopPlayer":V=Tw;break;case"FieldPosesion":V=C3;break;case"GSCLineupsReports":V=L4;break;case"GSCMatchSummary":V=A3;break;case"GSCTimelineReports":V=h5;break;case"GSCFieldDataByZones":V=R4;break;case"GSCGameXg":V=A6;break;case"GSCComparativeReports":V=m6;break;default:V=null}return V}else return z;return null}function L({pageId:z,view:V,filterAndWidgetContainer:U,applyMinimumSize:q=!1,dynamicFilters:W=[]}){if(b.page.id===z&&A){let Y=!1;V.id===3&&(Y=W[0]);const ne=`min_column${Y?"_2":""}`,J=`min_row${Y?"_2":""}`,re=`colspan${Y?"_2":""}`,ee=`rowspan${Y?"_2":""}`,Z={w:q?V[ne]:V[re],h:q?V[J]:V[ee]};if(A.willItFit(0,0,Z.w,Z.h,!0)){const te=A.addWidget(Z),ae=Number(te.getAttribute("gs-x")||0),oe=Number(te.getAttribute("gs-y")||0);A.removeWidget(te);const pe=C.get(V.id),fe=h.reactive({...JSON.parse(JSON.stringify(pe.props))||{},_isReactive:!0}),se=h.reactive({pageId:z,grid:A,page:b.page,view:{name:V.name,title:V.title,key:Date.now()-7*Math.random(),id:`w-${String(Date.now())}`,x:ae,y:oe,w:Z.w,h:Z.h,maxWidth:V.max_column,maxHeight:V.max_row,minWidth:V.min_column,minHeight:V.min_row,componentName:pe.componentName,componentProps:fe,pageId:z,coreView:V}});U.addView(se),xi.emit("add-page-view",se)}else xi.emit("add-page-and-view",{pageId:z,view:V,filterAndWidgetContainer:U})}}function R(z){if(A){const V=document.querySelector(`[gs-id="${z.id}"]`);V&&(A.removeWidget(V),v("delete-view",z))}v("view-changed")}function E(z){if(!z.filterAndViewsContainer&&z.coreView){const V=new ay(`FAWC-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,[z],z.coreView.id,z.dynamicFilters||[],b.isPostMatch,b.isTemplateMode,z.filtersJSON);z.filterAndViewsContainer=V}v("edit-view",z)}function N(){v("delete-page",b.page)}function M(){xi.emit("change-sort",b.page)}function k(z){if(x)return;console.log("force-component-update event received:",z);const V=b.page.items.find(U=>U.id===z.itemId||U.id===z.viewId);V?(console.log("Found item to update in force-component-update:",V.id),Object.assign(V.componentProps,z.componentProps),V._updateKey=Date.now(),console.log("Updated item in force-component-update:",V.componentProps)):console.log("Item not found in force-component-update for id:",z.itemId||z.viewId)}function I(z){if(x)return;console.log("component-props-updated event received:",z);const V=b.page.items.find(U=>U.id===z.viewId);V?(console.log("Found item to update in component-props-updated:",V.id),Object.assign(V.componentProps,z.componentProps),V._updateKey=Date.now(),console.log("Updated item in component-props-updated:",V.componentProps)):console.log("Item not found in component-props-updated for id:",z.viewId)}function _(z){if(x)return;console.log("dynamic-filters-changed event received:",z);const V=b.page.items.find(U=>U.id===z.viewId);V?(console.log("Found item to update in dynamic-filters-changed:",V.id),Object.assign(V.componentProps,z.componentProps||{}),V._updateKey=Date.now(),console.log("Updated item in dynamic-filters-changed:",V.componentProps)):console.log("Item not found in dynamic-filters-changed for id:",z.viewId)}const P=function(){xi.off("add-view",L),xi.off("force-component-update",k),xi.off("component-props-updated",I),xi.off("dynamic-filters-changed",_);const z=document.querySelector(".container-main");z&&z.removeEventListener("scroll",s),y&&clearTimeout(y),p&&clearTimeout(p)};return xi.on("add-view",L),xi.on("force-component-update",k),xi.on("component-props-updated",I),xi.on("dynamic-filters-changed",_),h.onMounted(async()=>{await h.nextTick(),A=Wi.init({column:12,row:12,maxRow:12,cellHeight:60,float:!0,resizable:{handles:"e, se, s, sw, w"}},`#grid-stack-${b.id}`),A.on("change",(z,V)=>{const U=V[0];if(U){const q=u.value.get(U.id);q&&(q.x=U.x,q.y=U.y,q.w=U.w,q.h=U.h,v("view-changed"))}}),c(),b.page.grid=A,b.page.offListeners=P}),h.onUnmounted(()=>{w&&w.disconnect(),P(),y&&clearTimeout(y),p&&clearTimeout(p),document.removeEventListener("programmatic-scroll-start",i),document.removeEventListener("programmatic-scroll-end",d)}),(z,V)=>(h.openBlock(),h.createElementBlock("div",{ref_key:"templatePage",ref:X,class:"template-page"},[h.createElementVNode("div",Dse,[e.value?(h.openBlock(),h.createBlock(L6,{key:0,"options-type":"page",onClick:V[0]||(V[0]=h.withModifiers(U=>e.value=!1,["self"])),onMouseleave:V[1]||(V[1]=U=>e.value=!1),onCloseTooltip:V[2]||(V[2]=U=>e.value=!1),onDeletePage:N,onChangeSort:M})):h.createCommentVNode("",!0),h.createElementVNode("div",Vse,[V[4]||(V[4]=h.createElementVNode("div",null,[h.createElementVNode("svg",{width:"19",height:"21",viewBox:"0 0 19 21",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[h.createElementVNode("path",{d:"M11.2986 12.9994C7.62909 14.8341 4.11744 16.0178 1.35547 16.4518L9.18763 20.0029C9.34545 20.0818 9.60192 20.0818 9.74002 20.0029L17.8878 16.3137C18.0457 16.2348 18.164 16.0572 18.164 15.8797V8.75781C16.2898 10.2177 13.9422 11.6776 11.2986 12.9994Z",fill:"white"}),h.createElementVNode("path",{d:"M4.7152 8.89735C4.7152 8.89735 10.9494 3.76802 16.8482 1.20335C15.0529 0.946887 11.3637 0.43395 9.3711 0.453678C4.41928 0.493135 1.06546 1.34145 1.06546 1.34145C0.90763 1.3809 0.769531 1.55846 0.769531 1.71629V8.12795C3.01857 6.56942 5.34651 5.56329 5.34651 5.56329C5.34651 5.56329 2.72264 7.06263 0.769531 8.81844V9.41028V14.1648C3.09748 13.9675 6.62886 12.7641 10.3575 10.7321C13.6719 8.91707 16.4733 6.84562 18.17 5.05035V2.40677C14.3032 3.37346 4.7152 8.89735 4.7152 8.89735Z",fill:"white"})])],-1)),V[5]||(V[5]=h.createElementVNode("div",{class:"separator"},null,-1)),h.createElementVNode("input",{value:r.page.title,type:"text",class:"page-title-input",onclick:"this.select()",onInput:f},null,40,Fse)]),h.createElementVNode("div",jse,[h.createElementVNode("div",Use,[h.createElementVNode("div",qse,[t.value.homeTeam.logo?(h.openBlock(),h.createElementBlock("div",Wse,[h.createElementVNode("img",{src:t.value.homeTeam.logo,alt:"Home Team Logo",width:"25",height:"25"},null,8,Gse)])):(h.openBlock(),h.createElementBlock("svg",Hse,[...V[6]||(V[6]=[h.createElementVNode("path",{opacity:"0.4",d:"M12.0153 0.261719C12.0153 0.261719 13.6664 1.94994 17.7355 2.06744C21.149 2.16638 22.3796 1.30063 22.3796 1.30063C22.3796 1.30063 25.4902 10.2488 20.3822 17.7005C17.6983 21.615 12.5533 24.1504 12.0091 24.2617C11.4711 24.1504 6.31984 21.615 3.636 17.7005C-1.4596 10.2488 1.65094 1.30063 1.65094 1.30063C1.65094 1.30063 2.88155 2.16638 6.2951 2.06744C10.3642 1.94994 12.0153 0.261719 12.0153 0.261719Z",fill:"#54728B"},null,-1)])])),h.createElementVNode("span",null,h.toDisplayString(t.value.homeTeam.name),1)]),V[8]||(V[8]=h.createElementVNode("div",{class:"template-page__header__details__teams__vs"}," VS ",-1)),h.createElementVNode("div",Jse,[h.createElementVNode("span",null,h.toDisplayString(t.value.awayTeam.name),1),t.value.awayTeam.logo?(h.openBlock(),h.createElementBlock("div",Kse,[h.createElementVNode("img",{src:t.value.awayTeam.logo,alt:"Away Team Logo",width:"25",height:"25"},null,8,Xse)])):(h.openBlock(),h.createElementBlock("svg",Zse,[...V[7]||(V[7]=[h.createElementVNode("path",{opacity:"0.4",d:"M12.0153 0.261719C12.0153 0.261719 13.6664 1.94994 17.7355 2.06744C21.149 2.16638 22.3796 1.30063 22.3796 1.30063C22.3796 1.30063 25.4902 10.2488 20.3822 17.7005C17.6983 21.615 12.5533 24.1504 12.0091 24.2617C11.4711 24.1504 6.31984 21.615 3.636 17.7005C-1.4596 10.2488 1.65094 1.30063 1.65094 1.30063C1.65094 1.30063 2.88155 2.16638 6.2951 2.06744C10.3642 1.94994 12.0153 0.261719 12.0153 0.261719Z",fill:"#54728B"},null,-1)])]))])]),r.isTemplateMode&&!r.isFilterVisible?(h.openBlock(),h.createElementBlock("div",{key:0,class:"template-page__header__details__options",onClick:V[3]||(V[3]=U=>e.value=!0)},[...V[9]||(V[9]=[h.createElementVNode("svg",{width:"17",height:"13",viewBox:"0 0 17 13",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[h.createElementVNode("path",{d:"M3.56953 6.28672C3.56953 7.19972 2.83253 7.93672 1.91953 7.93672C1.00653 7.93672 0.269531 7.19972 0.269531 6.28672C0.269531 5.37372 1.00653 4.63672 1.91953 4.63672C2.83253 4.63672 3.56953 5.37372 3.56953 6.28672ZM8.51953 4.63672C7.60653 4.63672 6.86953 5.37372 6.86953 6.28672C6.86953 7.19972 7.60653 7.93672 8.51953 7.93672C9.43253 7.93672 10.1695 7.19972 10.1695 6.28672C10.1695 5.37372 9.43253 4.63672 8.51953 4.63672ZM15.1195 4.63672C14.2065 4.63672 13.4695 5.37372 13.4695 6.28672C13.4695 7.19972 14.2065 7.93672 15.1195 7.93672C16.0325 7.93672 16.7695 7.19972 16.7695 6.28672C16.7695 5.37372 16.0325 4.63672 15.1195 4.63672Z",fill:"white"})],-1)])])):h.createCommentVNode("",!0)])]),h.createElementVNode("div",Yse,[h.createElementVNode("div",{id:`grid-stack-${r.id}`,class:"grid-stack"},[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(r.page.items,U=>{var q,W,Y;return h.openBlock(),h.createElementBlock("div",{class:"grid-stack-item",key:U.key,"gs-id":U.id,"gs-x":U.x,"gs-y":U.y,"gs-w":U.w,"gs-h":U.h,"gs-max-w":U.maxWidth,"gs-max-h":U.maxHeight,"gs-min-w":U.minWidth,"gs-min-h":U.minHeight,"gs-no-resize":!r.isTemplateMode,"gs-no-move":!b.isTemplateMode,"gs-auto-position":U.x===0&&U.y===0},[h.createElementVNode("div",{class:h.normalizeClass(["grid-stack-item-content",{"is-selected":U.isSelected}])},[h.createVNode(Mse,{title:U.coreView&&U.coreView.id===9&&U.w<4&&U.titleShort||U.title,"is-template-mode":r.isTemplateMode,game:r.game,lastGames:r.lastGames,"is-home-team":(q=U.componentProps)!=null&&q.preMatchType?((W=U.componentProps)==null?void 0:W.preMatchType)===1:U.isHomeTeam,"is-filter-visible":r.isFilterVisible,"view-id":((Y=U==null?void 0:U.coreView)==null?void 0:Y.id)||0,onEdit:ne=>E(U),onDelete:ne=>R(U)},{default:h.withCtx(()=>[(h.openBlock(),h.createBlock(h.resolveDynamicComponent(S(U.componentName)),h.mergeProps({ref_for:!0},U.componentProps,{key:`${U.id}-${U._updateKey||0}`}),null,16))]),_:2},1032,["title","is-template-mode","game","lastGames","is-home-team","is-filter-visible","view-id","onEdit","onDelete"])],2)],8,$se)}),128))],8,Qse)])],512))}}),tle=dd(ele,[["__scopeId","data-v-c6c9b088"]]),rle={PO1:"CFI",PO2:"CFV",PO3:"SFI",PO4:"SFV",PO5:"FI",PO6:"FV"},nle={key:0,class:"cover__main-logo cover__main-logo__home"},ile={key:0,class:"team-logo"},ale=["src"],ole={key:1,width:"575",height:"675",viewBox:"0 0 160 161",fill:"none",xmlns:"http://www.w3.org/2000/svg"},sle=["fill"],lle={key:1,class:"cover__main-logo cover__main-logo__away"},cle={key:0,class:"team-logo"},ule=["src"],dle={key:1,width:"575",height:"575",viewBox:"0 0 161 161",fill:"none",xmlns:"http://www.w3.org/2000/svg"},ple=["fill"],hle={class:"cover__title-subtitle"},fle={class:"cover__title-subtitle__title"},mle={class:"cover__title-subtitle__subtitle"},gle={key:2,class:"cover-type-one"},yle={class:"team-info-one"},vle={class:"team-data"},xle={key:0,class:"team-logo"},ble=["src"],_le={key:1,width:"160",height:"161",viewBox:"0 0 160 161",fill:"none",xmlns:"http://www.w3.org/2000/svg"},wle=["fill","opacity"],Tle={class:"team-name"},kle={key:0,class:"team-events"},Sle={class:"score-one"},Cle={key:0},Ele={class:"team-info-one"},Mle={class:"team-data"},Ale={key:0,class:"team-logo"},Lle=["src"],Rle={key:1,width:"161",height:"161",viewBox:"0 0 161 161",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Nle=["fill","opacity"],Ile={class:"team-name"},Ple={key:0,class:"team-events"},Ole={key:3,class:"cover-type-two"},zle={class:"team-data"},Ble={class:"team-info"},Dle={key:0,class:"team-logo"},Vle=["src"],Fle={key:1,width:"160",height:"161",viewBox:"0 0 160 161",fill:"none",xmlns:"http://www.w3.org/2000/svg"},jle=["fill","opacity"],Ule={key:2,class:"team-score-two"},qle={key:0,class:"team-goals"},Wle={class:"team-data"},Gle={class:"team-info"},Hle={key:0,class:"team-score-two"},Jle={key:1,class:"team-logo"},Kle=["src"],Xle={key:2,width:"161",height:"161",viewBox:"0 0 161 161",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Zle=["fill","opacity"],Yle={key:0,class:"team-goals"},Qle={__name:"CoverPage",props:{game:{type:Object,default:()=>null},coverId:{type:Number,default:1},isPostMatch:{type:Boolean,default:!0}},emits:["intersection-changed"],setup(r,{emit:a}){const g=r,D=a,X=h.ref(null),A=h.computed(()=>[1,2].includes(g.coverId)),b=h.computed(()=>[1,3].includes(g.coverId)),e=h.computed(()=>g.coverId===1?{homeTeam:"#1558CC",awayTeam:"#0046BF",opacity:1}:g.coverId===3?{homeTeam:"#000A1A",awayTeam:"#000A1A",opacity:.4}:{homeTeam:"#576883",awayTeam:"#576883",opacity:.4}),v=h.computed(()=>g.game&&g.game.score?g.game.score:["0","0"]),u=h.computed(()=>{var L,R,E,N,M,k,I,_;if(g.game&&g.game.homeTeam&&g.game.awayTeam){const P={homeTeam:{name:((L=g.game.homeTeam)==null?void 0:L.acronym)||"LOC",logo:((R=g.game.homeTeam)==null?void 0:R.logo)||null},awayTeam:{name:((E=g.game.awayTeam)==null?void 0:E.acronym)||"VIS",logo:((N=g.game.awayTeam)==null?void 0:N.logo)||null}};return A.value?(P.homeTeam.goalsMinutes=n(g.game.minutes.home_goals_minutes),P.homeTeam.totalYellowCards=((M=g.game.minutes.home_yellow_cards_minutes)==null?void 0:M.length)||0,P.homeTeam.totalRedCards=((k=g.game.minutes.home_red_cards_minutes)==null?void 0:k.length)||0,P.awayTeam.goalsMinutes=n(g.game.minutes.visiting_goals_minutes),P.awayTeam.totalYellowCards=((I=g.game.minutes.away_yellow_cards_minutes)==null?void 0:I.length)||0,P.awayTeam.totalRedCards=((_=g.game.minutes.away_red_cards_minutes)==null?void 0:_.length)||0):(P.homeTeam.goalsEvents=p(g.game.report_minutes.home_goals_minutes),P.awayTeam.goalsEvents=p(g.game.report_minutes.visiting_goals_minutes)),P}return{homeTeam:{name:"LOC",logo:null,goalsMinutes:"00'",totalYellowCards:0,totalRedCards:0,goalsEvents:[{playerName:"Nombre",goalTime:"00'"}]},awayTeam:{name:"VIS",logo:null,goalsMinutes:"00'",totalYellowCards:0,totalRedCards:0,goalsEvents:[{playerName:"Nombre",goalTime:"00'"}]}}}),t=h.computed(()=>({"--background-image":b.value?"url(https://golstatsimages.blob.core.windows.net/report-maker/background-postmatch-template-01@2x.jpg)":"url(https://golstatsimages.blob.core.windows.net/report-maker/background-postmatch-template-02@2x.jpg)","--grid-template-columns-type-one":g.isPostMatch?"1fr min-content 1fr":"320px min-content 320px","--width-type-one":g.isPostMatch?"100%":"fit-content","--grid-template-columns-type-two":g.isPostMatch?"1fr min-content 1fr":"320px min-content 320px","--width-type-two":g.isPostMatch?"100%":"fit-content"})),w=h.computed(()=>g.isPostMatch?"Postmatch":"Prematch"),y=["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],x=h.computed(()=>{if(g.game){let L=rle[g.game.matchday_abbreviation];L||(L=g.game.matchday_abbreviation.replace("M","J"));const[R,E,N]=g.game.date.split("-");return`${L} - ${N} ${y[Number(E)-1]}, ${R}`}return"Jornada - Día 00 Mes"});function p(L){return!L||!Array.isArray(L)||L.length===0?"":(console.log("%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"),console.log("goalsDetails",L),L.map(R=>{const E=R.split(", ");let N=E[0].replace("'","");N=N.replace("+",""),N=N.replace("’",""),console.log("playerGoalsArray",E);const M=N.split(" "),{strings:k,numbers:I}=M.reduce((z,V)=>(isNaN(Number(V))?z.strings.push(V):z.numbers.push(V),z),{strings:[],numbers:[]}),_=k.join(" "),P=I.length===1?`${I[0]}'`:`${I[0]}' ${I.slice(1).join(" + ")}'`;return{playerName:_,goalTime:E.length===1?P:`${P}, ${E.reduce((z,V,U)=>U===0?z:`${z}${V}${U<E.length-1?", ":""}`,"")}`}}))}function n(L){return!L||!Array.isArray(L)||L.length===0?"":L.reduce((R,E,N)=>{const M=E.split(" ");let k="";return M.length===3?k=M[2]:M.length===5&&(k=`${M[2]} ${M[3]} ${M[4]}`),k&&(R+=`${k}${N<L.length-1?", ":""}`),R},"")}let i=null,d=null,s=!1,c=null,f=!1;const m=()=>{f=!0},T=()=>{f=!1};function C(){if(f){console.log("Cover: Ignoring programmatic scroll");return}s=!0,c&&clearTimeout(c),c=setTimeout(()=>{s=!1},150)}function S(){const L={root:null,rootMargin:"0px",threshold:.7};i=new IntersectionObserver(N=>{N.forEach(M=>{if(console.log("Cover: Intersection observer triggered:",M.isIntersecting,"isScrolling:",s),s){console.log("Cover: Scroll in progress, delaying intersection event"),d&&clearTimeout(d),d=setTimeout(()=>{console.log("Cover: Emitting delayed intersection event:",M.isIntersecting),D("intersection-changed",M.isIntersecting)},100);return}d&&clearTimeout(d),d=setTimeout(()=>{console.log("Cover: Emitting immediate intersection event:",M.isIntersecting),D("intersection-changed",M.isIntersecting)},50)})},L);const R=X.value;R&&i.observe(R);const E=document.querySelector(".container-main");E&&E.addEventListener("scroll",C,{passive:!0}),document.addEventListener("programmatic-scroll-start",m),document.addEventListener("programmatic-scroll-end",T)}return h.onMounted(()=>{S()}),h.onUnmounted(()=>{i&&i.disconnect();const L=document.querySelector(".container-main");L&&L.removeEventListener("scroll",C),document.removeEventListener("programmatic-scroll-start",m),document.removeEventListener("programmatic-scroll-end",T),d&&clearTimeout(d),c&&clearTimeout(c)}),(L,R)=>(h.openBlock(),h.createElementBlock("div",{ref_key:"coverPage",ref:X,class:"cover",style:h.normalizeStyle(t.value)},[A.value?(h.openBlock(),h.createElementBlock("div",nle,[u.value.homeTeam.logo?(h.openBlock(),h.createElementBlock("div",ile,[h.createElementVNode("img",{src:u.value.homeTeam.logo||"/default-logo.png",alt:"Team 1 Logo"},null,8,ale)])):(h.openBlock(),h.createElementBlock("svg",ole,[h.createElementVNode("path",{d:"M80.0068 0.953125C80.0068 0.953125 91.0143 12.208 118.141 12.9913C140.898 13.6509 149.102 7.87917 149.102 7.87917C149.102 7.87917 169.839 67.5339 135.786 117.212C117.894 143.308 83.5935 160.211 79.9656 160.953C76.3789 160.211 42.0372 143.308 24.1449 117.212C-9.8257 67.5339 10.9112 7.87917 10.9112 7.87917C10.9112 7.87917 19.1153 13.6509 41.8723 12.9913C68.9993 12.208 80.0068 0.953125 80.0068 0.953125Z",fill:e.value.homeTeam},null,8,sle)]))])):h.createCommentVNode("",!0),A.value?(h.openBlock(),h.createElementBlock("div",lle,[u.value.awayTeam.logo?(h.openBlock(),h.createElementBlock("div",cle,[h.createElementVNode("img",{src:u.value.awayTeam.logo||"/default-logo.png",alt:"Team 2 Logo"},null,8,ule)])):(h.openBlock(),h.createElementBlock("svg",dle,[h.createElementVNode("path",{d:"M80.8504 0.953125C80.8504 0.953125 92.9822 3.39499 119.261 10.1779C144.106 16.5733 152.827 19.1314 152.827 19.1314C152.827 19.1314 156.936 44.2089 145.657 90.5655C136.548 127.969 106.742 152.038 80.8504 160.953C54.9977 152.038 25.1527 128.007 16.0442 90.5655C4.8039 44.2477 8.91243 19.1314 8.91243 19.1314C8.91243 19.1314 17.6334 16.5733 42.4783 10.1779C68.7574 3.39499 80.8504 0.953125 80.8504 0.953125Z",fill:e.value.awayTeam},null,8,ple)]))])):h.createCommentVNode("",!0),h.createElementVNode("div",hle,[h.createElementVNode("div",fle,[R[0]||(R[0]=h.createElementVNode("div",null,"Análisis",-1)),h.createElementVNode("div",null,h.toDisplayString(w.value),1)]),h.createElementVNode("div",mle,h.toDisplayString(x.value),1)]),A.value?(h.openBlock(),h.createElementBlock("div",gle,[h.createElementVNode("div",yle,[h.createElementVNode("div",vle,[u.value.homeTeam.logo?(h.openBlock(),h.createElementBlock("div",xle,[h.createElementVNode("img",{src:u.value.homeTeam.logo||"/default-logo.png",alt:"Team 1 Logo"},null,8,ble)])):(h.openBlock(),h.createElementBlock("svg",_le,[h.createElementVNode("path",{d:"M80.0068 0.953125C80.0068 0.953125 91.0143 12.208 118.141 12.9913C140.898 13.6509 149.102 7.87917 149.102 7.87917C149.102 7.87917 169.839 67.5339 135.786 117.212C117.894 143.308 83.5935 160.211 79.9656 160.953C76.3789 160.211 42.0372 143.308 24.1449 117.212C-9.8257 67.5339 10.9112 7.87917 10.9112 7.87917C10.9112 7.87917 19.1153 13.6509 41.8723 12.9913C68.9993 12.208 80.0068 0.953125 80.0068 0.953125Z",fill:e.value.homeTeam,opacity:e.value.opacity},null,8,wle)])),h.createElementVNode("div",Tle,h.toDisplayString(u.value.homeTeam.name),1)]),r.isPostMatch?(h.openBlock(),h.createElementBlock("div",kle,[R[1]||(R[1]=h.createStaticVNode('<svg class="ball" width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-0364d256><path fill-rule="evenodd" clip-rule="evenodd" d="M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path fill-rule="evenodd" clip-rule="evenodd" d="M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M12.7277 3.39453L10.0276 4.54375L7.32812 3.39453" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M4.65662 5.34766L4.91603 8.27341L2.98828 10.4871" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M4.01562 13.6523L6.87533 14.3093L8.38436 16.8279" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M11.7031 16.8213L13.2109 14.3015L16.0697 13.6445" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M17.1051 10.4865L15.1758 8.27156L15.4349 5.34766" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M10.0456 4.54688V6.92693" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M13.2109 9.32248L15.1681 8.27344" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M11.9961 12.9609L13.2064 14.3086" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M8.08198 12.9609L6.87109 14.3099" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M4.91797 8.27344L6.87609 9.22818" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path></svg>',1)),h.createElementVNode("div",null,h.toDisplayString(u.value.homeTeam.goalsMinutes),1),R[2]||(R[2]=h.createElementVNode("div",{class:"separator"},null,-1)),R[3]||(R[3]=h.createElementVNode("svg",{class:"card",width:"10",height:"14",viewBox:"0 0 10 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[h.createElementVNode("rect",{x:"0.367188",y:"0.09375",width:"9.14286",height:"13.7143",rx:"2.28571",fill:"#F7C330"})],-1)),h.createElementVNode("div",null,h.toDisplayString(u.value.homeTeam.totalYellowCards),1),R[4]||(R[4]=h.createElementVNode("svg",{class:"card",width:"10",height:"14",viewBox:"0 0 10 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[h.createElementVNode("rect",{x:"0.109375",y:"0.09375",width:"9.14286",height:"13.7143",rx:"1.82857",fill:"#FF0000"})],-1)),h.createElementVNode("div",null,h.toDisplayString(u.value.homeTeam.totalRedCards),1)])):h.createCommentVNode("",!0)]),h.createElementVNode("div",Sle,[r.isPostMatch?(h.openBlock(),h.createElementBlock("div",Cle,h.toDisplayString(v.value[0])+" : "+h.toDisplayString(v.value[1]),1)):h.createCommentVNode("",!0)]),h.createElementVNode("div",Ele,[h.createElementVNode("div",Mle,[u.value.awayTeam.logo?(h.openBlock(),h.createElementBlock("div",Ale,[h.createElementVNode("img",{src:u.value.awayTeam.logo||"/default-logo.png",alt:"Team 2 Logo"},null,8,Lle)])):(h.openBlock(),h.createElementBlock("svg",Rle,[h.createElementVNode("path",{d:"M80.8504 0.953125C80.8504 0.953125 92.9822 3.39499 119.261 10.1779C144.106 16.5733 152.827 19.1314 152.827 19.1314C152.827 19.1314 156.936 44.2089 145.657 90.5655C136.548 127.969 106.742 152.038 80.8504 160.953C54.9977 152.038 25.1527 128.007 16.0442 90.5655C4.8039 44.2477 8.91243 19.1314 8.91243 19.1314C8.91243 19.1314 17.6334 16.5733 42.4783 10.1779C68.7574 3.39499 80.8504 0.953125 80.8504 0.953125Z",fill:e.value.awayTeam,opacity:e.value.opacity},null,8,Nle)])),h.createElementVNode("div",Ile,h.toDisplayString(u.value.awayTeam.name),1)]),r.isPostMatch?(h.openBlock(),h.createElementBlock("div",Ple,[h.createElementVNode("div",null,h.toDisplayString(u.value.awayTeam.totalYellowCards),1),R[5]||(R[5]=h.createElementVNode("svg",{width:"10",height:"14",viewBox:"0 0 10 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[h.createElementVNode("rect",{x:"0.367188",y:"0.09375",width:"9.14286",height:"13.7143",rx:"2.28571",fill:"#F7C330"})],-1)),h.createElementVNode("div",null,h.toDisplayString(u.value.awayTeam.totalRedCards),1),R[6]||(R[6]=h.createElementVNode("svg",{width:"10",height:"14",viewBox:"0 0 10 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[h.createElementVNode("rect",{x:"0.109375",y:"0.09375",width:"9.14286",height:"13.7143",rx:"1.82857",fill:"#FF0000"})],-1)),R[7]||(R[7]=h.createElementVNode("div",{class:"separator"},null,-1)),h.createElementVNode("div",null,h.toDisplayString(u.value.awayTeam.goalsMinutes),1),R[8]||(R[8]=h.createStaticVNode('<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-0364d256><path fill-rule="evenodd" clip-rule="evenodd" d="M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path fill-rule="evenodd" clip-rule="evenodd" d="M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M12.7277 3.39453L10.0276 4.54375L7.32812 3.39453" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M4.65662 5.34766L4.91603 8.27341L2.98828 10.4871" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M4.01562 13.6523L6.87533 14.3093L8.38436 16.8279" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M11.7031 16.8213L13.2109 14.3015L16.0697 13.6445" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M17.1051 10.4865L15.1758 8.27156L15.4349 5.34766" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M10.0456 4.54688V6.92693" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M13.2109 9.32248L15.1681 8.27344" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M11.9961 12.9609L13.2064 14.3086" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M8.08198 12.9609L6.87109 14.3099" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M4.91797 8.27344L6.87609 9.22818" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path></svg>',1))])):h.createCommentVNode("",!0)])])):(h.openBlock(),h.createElementBlock("div",Ole,[h.createElementVNode("div",zle,[h.createElementVNode("div",Ble,[u.value.homeTeam.logo?(h.openBlock(),h.createElementBlock("div",Dle,[h.createElementVNode("img",{src:u.value.homeTeam.logo||"/default-logo.png",alt:"Team 1 Logo"},null,8,Vle)])):(h.openBlock(),h.createElementBlock("svg",Fle,[h.createElementVNode("path",{d:"M80.0068 0.953125C80.0068 0.953125 91.0143 12.208 118.141 12.9913C140.898 13.6509 149.102 7.87917 149.102 7.87917C149.102 7.87917 169.839 67.5339 135.786 117.212C117.894 143.308 83.5935 160.211 79.9656 160.953C76.3789 160.211 42.0372 143.308 24.1449 117.212C-9.8257 67.5339 10.9112 7.87917 10.9112 7.87917C10.9112 7.87917 19.1153 13.6509 41.8723 12.9913C68.9993 12.208 80.0068 0.953125 80.0068 0.953125Z",fill:e.value.homeTeam,opacity:e.value.opacity},null,8,jle)])),r.isPostMatch?(h.openBlock(),h.createElementBlock("div",Ule,h.toDisplayString(v.value[0]),1)):h.createCommentVNode("",!0)]),r.isPostMatch?(h.openBlock(),h.createElementBlock("div",qle,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(u.value.homeTeam.goalsEvents,(E,N)=>(h.openBlock(),h.createElementBlock("div",{key:`goal-${N}`,class:"goal"},[h.createElementVNode("div",null,h.toDisplayString(E.playerName),1),R[9]||(R[9]=h.createElementVNode("div",{class:"bullet"},null,-1)),h.createElementVNode("div",null,h.toDisplayString(E.goalTime),1),R[10]||(R[10]=h.createStaticVNode('<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-0364d256><path fill-rule="evenodd" clip-rule="evenodd" d="M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path fill-rule="evenodd" clip-rule="evenodd" d="M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M12.7277 3.39453L10.0276 4.54375L7.32812 3.39453" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M4.65662 5.34766L4.91603 8.27341L2.98828 10.4871" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M4.01562 13.6523L6.87533 14.3093L8.38436 16.8279" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M11.7031 16.8213L13.2109 14.3015L16.0697 13.6445" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M17.1051 10.4865L15.1758 8.27156L15.4349 5.34766" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M10.0456 4.54688V6.92693" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M13.2109 9.32248L15.1681 8.27344" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M11.9961 12.9609L13.2064 14.3086" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M8.08198 12.9609L6.87109 14.3099" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M4.91797 8.27344L6.87609 9.22818" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path></svg>',1))]))),128))])):h.createCommentVNode("",!0)]),R[13]||(R[13]=h.createElementVNode("div",{class:"separator"},null,-1)),h.createElementVNode("div",Wle,[h.createElementVNode("div",Gle,[r.isPostMatch?(h.openBlock(),h.createElementBlock("div",Hle,h.toDisplayString(v.value[1]),1)):h.createCommentVNode("",!0),u.value.awayTeam.logo?(h.openBlock(),h.createElementBlock("div",Jle,[h.createElementVNode("img",{src:u.value.awayTeam.logo||"/default-logo.png",alt:"Team 2 Logo"},null,8,Kle)])):(h.openBlock(),h.createElementBlock("svg",Xle,[h.createElementVNode("path",{d:"M80.8504 0.953125C80.8504 0.953125 92.9822 3.39499 119.261 10.1779C144.106 16.5733 152.827 19.1314 152.827 19.1314C152.827 19.1314 156.936 44.2089 145.657 90.5655C136.548 127.969 106.742 152.038 80.8504 160.953C54.9977 152.038 25.1527 128.007 16.0442 90.5655C4.8039 44.2477 8.91243 19.1314 8.91243 19.1314C8.91243 19.1314 17.6334 16.5733 42.4783 10.1779C68.7574 3.39499 80.8504 0.953125 80.8504 0.953125Z",fill:e.value.awayTeam,opacity:e.value.opacity},null,8,Zle)]))]),r.isPostMatch?(h.openBlock(),h.createElementBlock("div",Yle,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(u.value.awayTeam.goalsEvents,(E,N)=>(h.openBlock(),h.createElementBlock("div",{key:`goal-a-${N}`,class:"goal"},[R[11]||(R[11]=h.createStaticVNode('<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-0364d256><path fill-rule="evenodd" clip-rule="evenodd" d="M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path fill-rule="evenodd" clip-rule="evenodd" d="M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M12.7277 3.39453L10.0276 4.54375L7.32812 3.39453" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M4.65662 5.34766L4.91603 8.27341L2.98828 10.4871" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M4.01562 13.6523L6.87533 14.3093L8.38436 16.8279" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M11.7031 16.8213L13.2109 14.3015L16.0697 13.6445" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M17.1051 10.4865L15.1758 8.27156L15.4349 5.34766" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M10.0456 4.54688V6.92693" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M13.2109 9.32248L15.1681 8.27344" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M11.9961 12.9609L13.2064 14.3086" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M8.08198 12.9609L6.87109 14.3099" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path><path d="M4.91797 8.27344L6.87609 9.22818" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-0364d256></path></svg>',1)),h.createElementVNode("div",null,h.toDisplayString(E.goalTime),1),R[12]||(R[12]=h.createElementVNode("div",{class:"bullet"},null,-1)),h.createElementVNode("div",null,h.toDisplayString(E.playerName),1)]))),128))])):h.createCommentVNode("",!0)])]))],4))}},$le=dd(Qle,[["__scopeId","data-v-0364d256"]]),ece={class:"floating-bar"},tce={class:"tab active"},rce={class:"select-display"},nce={class:"select-icon"},ice=["src"],ace={key:1,src:"https://golstatsimages.blob.core.windows.net/images-library/vector2.png",alt:"icono",class:"option-img-default"},oce={key:0,class:"select-placeholder select-label"},sce={key:1,class:"select-label"},lce={key:0,class:"dropdown-menu field-menu"},cce=["onClick"],uce={class:"option-icon"},dce=["src","data-hover-src"],pce={class:"option-content"},hce={class:"option-title"},fce={key:0,class:"option-description"},mce={class:"select-display"},gce={class:"select-icon"},yce=["src"],vce=["src"],xce={class:"select-label"},bce={key:0,class:"dropdown-menu type-menu type-menu-grid"},_ce={class:"option-grid"},wce=["onClick"],Tce={class:"option-grid-title"},kce={class:"option-grid-icon"},Sce=["src"],Cce={key:1,class:"filter-separator"},Ece=["onClick"],Mce={class:"select-display"},Ace={key:0,class:"badge-categorias"},Lce={key:0,class:"dropdown-menu type-menu multi-select-menu"},Rce={class:"multi-select-scroll-area"},Nce={class:"select-all-checkbox"},Ice=["checked","indeterminate","onChange"],Pce={class:"option-checkbox"},Oce=["checked","onChange"],zce=["onClick"],Bce={class:"option-title"},Dce={class:"multi-select-footer"},Vce={key:1,class:"custom-radio-group filter-inline"},Fce={class:"radio-label"},jce={class:"radio-options"},Uce=["name","value","onUpdate:modelValue","disabled","onChange"],qce={key:2,class:"check-group filter-inline"},Wce=["onUpdate:modelValue","checked","onChange"],Gce=["data-filter-type","onClick"],Hce={class:"select-display"},Jce={key:0,class:"dropdown-menu type-menu simple-select-menu"},Kce={class:"simple-select-scroll-area"},Xce=["onMouseenter","onClick"],Zce={class:"option-content"},Yce={class:"option-title"},Qce={key:0,class:"option-checkmark"},$ce={key:4,class:"filter-separator"},eue=Object.assign({name:"FloatingFiltersBar"},{__name:"filters",props:{token:{type:String,required:!0},view:{type:Object,default:()=>null},isPostMatch:{type:Boolean,default:!1},filters_edition_mode:{type:Array,default:()=>null}},emits:["filters-changed","close"],setup(r,{expose:a,emit:g}){const D=r,X=g,A=h.ref([]);let b=null,e=null,v=null;const u=h.ref(!1),t=h.ref(!1),w=h.ref(!1),y=h.ref(!1),x=h.ref(!1),p=h.ref(!1),n=h.computed(()=>A.value),i=h.ref(null),d=h.computed(()=>n.value[i.value]||null),s=h.computed(()=>{var ye;const ge=((ye=d.value)==null?void 0:ye.views)||[];return N(ge)}),c=h.ref(null),f=h.computed(()=>s.value.find(ye=>ye.id===c.value)||null),m=h.ref([]),T=h.computed(()=>{var ye,ge;return u.value?((ye=f.value)==null?void 0:ye.filters_edition_mode)||[]:((ge=f.value)==null?void 0:ge.filters)||[]});h.watch(u,ye=>{ye||(t.value=!1)}),h.watch(f,ye=>{var ge,ze;if(!ye){m.value=[];return}const Ie=ye.id===6&&D.isPostMatch;if(!Array.isArray(T.value)&&!Ie){m.value=[];return}if(y.value)return;Ie?m.value=[]:m.value=T.value.map((Ge,Ke)=>{var ke,Be,Fe,He,rt,nt,pt,vt,ft,Nt,Ft,Dt,at,Ze,ct,gt,Rt,Ct;if(Ge.type==="select"){if(u.value&&v&&v.dynamicFilters){const tt=v.dynamicFilters[Ke];if(tt){if(tt.selectedOptions&&Array.isArray(tt.selectedOptions)){const st=tt.selectedOptions.map(Je=>Je.value);return console.log(`Using saved select values for filter ${Ke}:`,st),st}else if(tt.selectedValue&&Array.isArray(tt.selectedValue))if(tt.selectedValue.length>0&&tt.selectedValue[0]&&typeof tt.selectedValue[0]=="object"){const st=We(tt.selectedValue);return console.log(`Using saved Timeline values for filter ${Ke}:`,st),st}else return console.log(`Using saved selectedValue for filter ${Ke}:`,tt.selectedValue),tt.selectedValue}}if(ye.id===4&&Ge.options&&Array.isArray(Ge.options)){const tt=Ge.options.map(st=>st.value);return console.log(`Timeline detected - preselecting all options for filter ${Ke}:`,tt),console.log("Timeline - filter options:",Ge.options),console.log("Timeline - filter type:",Ge.type),tt}return[]}else if(Ge.type==="radio-button"){if(u.value&&v&&v.dynamicFilters){const tt=v.dynamicFilters[Ke];if(tt&&tt.selectedOption)return console.log(`Using saved radio-button value for filter ${Ke}:`,tt.selectedOption.value),tt.selectedOption.value}if(ye.id===7&&u.value&&e!=null&&e.view){if(console.log(`GSCGoalData - checking for stored values in initialization for filter ${Ke}:`,e.view),console.log("GSCGoalData - filter index:",Ke,"filter type:",Ge.type,"filter label:",Ge.label),Ke===0&&(ke=e.view.componentProps)!=null&&ke.analysisType){const tt=e.view.componentProps.analysisType,st=tt==="offensive"?1:2;return console.log(`GSCGoalData - setting radio-button filter ${Ke} to analysis value:`,st,"analysisType:",tt),console.log("GSCGoalData - filter options:",Ge.options),st}if(Ke===1&&((Be=e.view.filterMultiple)==null?void 0:Be.isHomeTeam)!==void 0){const tt=e.view.filterMultiple.isHomeTeam,st=tt?1:2;return console.log(`GSCGoalData - setting radio-button filter ${Ke} to team value:`,st,"isHomeTeam:",tt),console.log("GSCGoalData - filter options:",Ge.options),st}console.log(`GSCGoalData - filter index ${Ke} - no stored value found or not applicable`)}else console.log(`GSCGoalData - conditions not met: newVal.id=${ye.id}, isEditMode=${u.value}, hasView=${!!(e!=null&&e.view)}`);return((He=(Fe=Ge.options)==null?void 0:Fe[0])==null?void 0:He.value)??null}else if(Ge.type==="select-simple"){if(u.value&&v&&v.dynamicFilters){const tt=v.dynamicFilters[Ke];if(tt&&tt.selectedValue!==void 0){console.log(`Using saved select-simple value for filter ${Ke}:`,tt.selectedValue),console.log("Saved selectedValue type:",typeof tt.selectedValue),console.log("Saved selectedValue is array:",Array.isArray(tt.selectedValue));let st;return ye.id===2&&(nt=(rt=e==null?void 0:e.view)==null?void 0:rt.filterMultiple)!=null&&nt.categoryId?(st=e.view.filterMultiple.categoryId,console.log("GSCtops - using filterMultiple.categoryId in initialization:",st)):ye.id===1&&(vt=(pt=e==null?void 0:e.view)==null?void 0:pt.filterMultiple)!=null&&vt.category?(st=e.view.filterMultiple.category,console.log("GSCComparativeReports - using filterMultiple.category in initialization:",st)):ye.id===6&&(Nt=(ft=e==null?void 0:e.view)==null?void 0:ft.filterMultiple)!=null&&Nt.gameNumber?(st=e.view.filterMultiple.gameNumber,console.log("GSCLineupsReports - using filterMultiple.gameNumber in initialization:",st)):st=Array.isArray(tt.selectedValue)?tt.selectedValue[0]:tt.selectedValue,console.log(`Returning select-simple value for filter ${Ke}:`,st),st}}if(ye.id===2&&u.value&&e!=null&&e.view){if(b&&e.view.id){const tt=b.getComponentDynamicFilters(e.view.id);if(tt&&tt[Ke]!==void 0)return console.log(`GSCtops - using component specific filter for index ${Ke}:`,tt[Ke]),tt[Ke]}if(e.view.filterMultiple){if(console.log("111 ************************************************************",e.view.filterMultiple),Ge.type==="select-simple"&&e.view.filterMultiple.categoryId){const tt=e.view.filterMultiple.categoryId,st=(Ge.options||[]).find(Je=>Je.value==tt);return console.log("GSCtops - matching option in initialization:",st),tt}if(Ge.type==="radio-button"&&e.view.filterMultiple.teamType!==void 0){const tt=e.view.filterMultiple.teamType;return(Ge.options||[]).find(st=>st.value==tt)?(console.log("GSCtops - returning teamType:",tt),tt):(console.log("GSCtops - no matching option found for teamType:",tt),console.log("GSCtops - returning teamType anyway for consistency:",tt),tt)}else console.log("GSCtops - radio-button condition not met:",{isRadioButton:Ge.type==="radio-button",hasTeamType:e.view.filterMultiple.teamType!==void 0,teamType:e.view.filterMultiple.teamType})}}if(ye.id===1&&u.value&&(Ft=e==null?void 0:e.view)!=null&&Ft.filterMultiple&&(console.log(`GSCComparativeReports - checking filterMultiple in initialization for filter ${Ke}:`,e.view.filterMultiple),e.view.filterMultiple.category)){const tt=e.view.filterMultiple.category,st=(Ge.options||[]).find(Je=>Je.value==tt);return console.log("GSCComparativeReports - matching option in initialization:",st),tt}if(ye.id===9&&u.value&&(Dt=e==null?void 0:e.view)!=null&&Dt.filterMultiple&&(console.log(`GSCFieldDataByZones - checking filterMultiple in initialization for filter ${Ke}:`,e.view.filterMultiple),Ge.type==="select-simple"&&e.view.filterMultiple.categoryIds)){const tt=Array.isArray(e.view.filterMultiple.categoryIds)?e.view.filterMultiple.categoryIds:[e.view.filterMultiple.categoryIds];console.log(`GSCFieldDataByZones - setting select-simple filter ${Ke} to categoryIds:`,tt),console.log("GSCFieldDataByZones - categoryIds type in initialization:",typeof tt),console.log("GSCFieldDataByZones - filter options in initialization:",Ge.options);const st=(Ge.options||[]).filter(Je=>Array.isArray(Je.value)?Me(Je.value,tt):tt.includes(Je.value));if(st.length>0){const Je=st[0];return console.log("GSCFieldDataByZones - found matching option in initialization:",Je),Je.value}else return console.log("GSCFieldDataByZones - no matching options found, using categoryIds directly:",tt),tt}if(ye.id===6&&u.value&&(at=e==null?void 0:e.view)!=null&&at.filterMultiple&&(console.log(`GSCLineupsReports - checking filterMultiple in initialization for filter ${Ke}:`,e.view.filterMultiple),e.view.filterMultiple.gameNumber)){const tt=e.view.filterMultiple.gameNumber;console.log(`GSCLineupsReports - setting select-simple filter ${Ke} to gameNumber:`,tt),console.log("GSCLineupsReports - gameNumber type in initialization:",typeof tt),console.log("GSCLineupsReports - filter options in initialization:",Ge.options);const st=(Ge.options||[]).find(Je=>Je.value==tt);return console.log("GSCLineupsReports - matching option in initialization:",st),tt}if(ye.id===5&&u.value&&(Ze=e==null?void 0:e.view)!=null&&Ze.filterMultiple&&(console.log(`GSCVolumetricField - checking filterMultiple in initialization for filter ${Ke}:`,e.view.filterMultiple),console.log("GSCVolumetricField - filter details:",{type:Ge.type,label:Ge.label,options:Ge.options}),e.view.filterMultiple.isHomeTeam!==void 0)){const tt=e.view.filterMultiple.isHomeTeam;console.log(`GSCVolumetricField - setting radio-button filter ${Ke} to isHomeTeam:`,tt),console.log("GSCVolumetricField - isHomeTeam type in initialization:",typeof tt),console.log("GSCVolumetricField - filter options in initialization:",Ge.options);let st;typeof tt=="boolean"?(st=tt?1:2,console.log("GSCVolumetricField - isHomeTeam is boolean in initialization, converting:",tt,"-> teamValue:",st)):typeof tt=="number"?(st=tt===1?1:2,console.log("GSCVolumetricField - isHomeTeam is number in initialization, using directly:",tt,"-> teamValue:",st)):(st=1,console.log("GSCVolumetricField - isHomeTeam is unknown type in initialization, using default:",st));const Je=(Ge.options||[]).find(lt=>lt.value==st);if(console.log("GSCVolumetricField - matching option in initialization:",Je),Ge.type==="radio-button"&&(Ge.label==="Equipo"||Ge.label==="Team"||Ge.label==="Equipo seleccionado"))return console.log("GSCVolumetricField - applying team filter value:",st),st;console.log("GSCVolumetricField - filter is not a team filter, skipping:",Ge.label)}if(ye.id===9&&u.value&&(ct=e==null?void 0:e.view)!=null&&ct.filterMultiple&&(console.log(`GSCFieldDataByZones - checking filterMultiple in initialization for filter ${Ke}:`,e.view.filterMultiple),Ge.type==="radio-button"&&e.view.filterMultiple.isHomeTeam!==void 0)){const tt=e.view.filterMultiple.isHomeTeam,st=tt?1:2;console.log(`GSCFieldDataByZones - setting radio-button filter ${Ke} to team value:`,st,"isHomeTeam:",tt),console.log("GSCFieldDataByZones - filter options:",Ge.options);const Je=((gt=Ge.options)==null?void 0:gt.map(lt=>lt.value))||[];return Je.includes(st)?(console.log("GSCFieldDataByZones - using valid team value from filterMultiple:",st),st):(console.log("GSCFieldDataByZones - team value not in valid options, using default:",Je[0]),Je[0]||1)}return((Ct=(Rt=Ge.options)==null?void 0:Rt[0])==null?void 0:Ct.value)??null}else if(Ge.type==="check"){if(u.value&&v&&v.dynamicFilters){const tt=v.dynamicFilters[Ke];if(tt&&tt.isChecked!==void 0)return console.log(`Using saved checkbox value for filter ${Ke}:`,tt.isChecked),tt.isChecked}if(ye.id===8)return!0;if(ye.id===3){if(u.value&&v&&v.dynamicFilters){const tt=v.dynamicFilters[Ke];if(tt&&tt.isChecked!==void 0)return console.log(`GSCMatchSummary - Using saved checkbox value for filter ${Ke}:`,tt.isChecked),tt.isChecked}return!1}return!1}return null});const Ve=((ge=ye.name)==null?void 0:ge.toLowerCase().includes("tops players"))||((ze=ye.title)==null?void 0:ze.toLowerCase().includes("tops players"));!Ve&&(!u.value||Ie)&&h.nextTick(()=>{var Ge,Ke,ke;console.log("Timeline - about to emit change:",{esTopsPlayers:Ve,isEditMode:u.value,selectedSecond:(Ge=f.value)==null?void 0:Ge.id}),ye.id===4&&u.value&&(Ke=e==null?void 0:e.view)!=null&&Ke.id&&(console.log("Timeline - saving specific filters for component:",e.view.id),b&&b.setDynamicFilters(m.value,e.view.id)),ye.id===3&&u.value&&(ke=e==null?void 0:e.view)!=null&&ke.id&&(console.log("GSCMatchSummary - saving specific filters for component:",e.view.id),b&&b.setDynamicFilters(m.value,e.view.id)),pe()})},{immediate:!0}),h.watch(()=>b,ye=>{ye&&ye.dynamicFilters&&(console.log("FilterAndViewsContainer changed, updating dynamicFilters:",ye.dynamicFilters),Array.isArray(ye.dynamicFilters)&&(y.value=!0,m.value=[...ye.dynamicFilters],h.nextTick(()=>{y.value=!1})))},{deep:!0}),h.watch(()=>b==null?void 0:b.dynamicFilters,ye=>{if(ye&&Array.isArray(ye)){if(console.log("Container dynamicFilters changed, updating:",ye),x.value){console.log("Skipping container update due to user update in progress");return}y.value=!0,m.value=[...ye],h.nextTick(()=>{y.value=!1})}},{deep:!0}),h.watch(()=>f.value,ye=>{if(u.value&&v&&ye&&ye.filters){if(y.value)return;if(p.value){console.log("Skipping force updates in selectedSecond watcher - already in force update");return}if(ye.id===3){if(console.log("GSCMatchSummary detected in edit mode, loading saved filters"),x.value||p.value){console.log("GSCMatchSummary - Skipping due to update in progress");return}const ge=v.dynamicFilters.find(ze=>ze.filterType==="check");ge&&ge.isChecked!==void 0&&(console.log("GSCMatchSummary - Found saved checkbox value:",ge.isChecked),m.value&&m.value.length>0&&(x.value=!0,m.value[0]=ge.isChecked,console.log("GSCMatchSummary - Updated dynamicFilters:",m.value),h.nextTick(()=>{m.value=[...m.value],console.log("GSCMatchSummary - Forced UI update"),x.value=!1})))}setTimeout(()=>{(!m.value||m.value.length===0)&&(Le(),Re(),je()),ye.id===4&&Pe()},100)}},{deep:!0}),h.watch(()=>{var ye;return(ye=f.value)==null?void 0:ye.id},ye=>{if(u.value&&v&&ye===4){if(console.log("Timeline detected, preselecting filters"),y.value)return;if(p.value){console.log("Skipping force updates in Timeline watcher - already in force update");return}setTimeout(()=>{Pe()},200)}}),h.watch(()=>m.value,ye=>{if(u.value&&v&&ye&&ye.length>0){if(console.log("(((((((((((((((((((((((((((((((((((((((((((((())))))))))))))))))))))))))))))))))))))))))))))",v),console.log("Dynamic filters initialized, forcing update"),y.value||x.value)return;if(p.value){console.log("Skipping force updates - already in force update");return}setTimeout(()=>{var ge;ve()&&(Le(),Re(),je(),((ge=f.value)==null?void 0:ge.id)===4&&Pe())},50)}},{deep:!0});function C(ye,ge){var ze,Ie,Ve,Ge,Ke;const ke=m.value[ye];if(((ze=f.value)==null?void 0:ze.id)===4&&ye===0&&console.log("Timeline filter check - optionValue:",ge,"selectedValues:",ke),((Ie=f.value)==null?void 0:Ie.id)===6&&ye===0&&console.log("GSCLineupsReports filter check - optionValue:",ge,"selectedValues:",ke,"type:",typeof ke),Array.isArray(ke)){if(((Ve=f.value)==null?void 0:Ve.id)===4&&ye===0){const Be=ke.some(Fe=>ge.category_id&&ge.event_type_id?Fe.category_id===ge.category_id&&Fe.event_type_id===ge.event_type_id:ge.event_type_id?Fe.event_type_id===ge.event_type_id:ge.category_id?Fe.category_id===ge.category_id:!1);return((Ge=f.value)==null?void 0:Ge.id)===4&&ye===0&&console.log("Timeline comparison (IDs) - optionValue:",ge,"selectedValues:",ke,"isSelected:",Be),Be}return ke.includes(ge)}else if(ke!=null){if(((Ke=f.value)==null?void 0:Ke.id)===6&&ye===0){const Be=ke===ge;return console.log("GSCLineupsReports comparison - optionValue:",ge,"selectedValues:",ke,"isSelected:",Be),Be}return ke===ge}return!1}function S(ye,ge){var ze,Ie;const Ve=(Ie=(ze=f.value)==null?void 0:ze.filters)==null?void 0:Ie[ye];if((Ve==null?void 0:Ve.type)==="select-simple"){console.log("toggleMultiSelectOption called for select-simple filter, using selectSimpleOption instead"),ae(ye,ge);return}Array.isArray(m.value[ye])||(m.value[ye]=[]);const Ge=m.value[ye],Ke=Ge.indexOf(ge);Ke>-1?Ge.splice(Ke,1):Ge.push(ge),u.value&&Ne(),pe()}function L(ye){var ge,ze;const Ie=m.value[ye],Ve=(ze=(ge=f.value)==null?void 0:ge.filters)==null?void 0:ze[ye];return(Ve==null?void 0:Ve.type)==="select-simple"||!Ve||!Ve.options||!Array.isArray(Ie)?!1:Ie.length===Ve.options.length}function R(ye){var ge,ze;const Ie=m.value[ye],Ve=(ze=(ge=f.value)==null?void 0:ge.filters)==null?void 0:ze[ye];return(Ve==null?void 0:Ve.type)==="select-simple"||!Ve||!Ve.options||!Array.isArray(Ie)?!1:Ie.length>0&&Ie.length<Ve.options.length}function E(){var ye;return console.log("props.isPostMatch",D.isPostMatch),!(((ye=f.value)==null?void 0:ye.id)===6&&D.isPostMatch)}function N(ye){return!ye||!Array.isArray(ye)?ye:ye.filter(ge=>{const ze=(ge.name||ge.title||"").toLowerCase();return D.isPostMatch?D.isPostMatch?!["fortalezas","tabla general"].some(Ie=>ze.includes(Ie)):!0:!["resumen general","timeline","datos relevantes"].some(Ie=>ze.includes(Ie))})}function M(){var ye,ge;const ze=((ge=(ye=d.value)==null?void 0:ye.name)==null?void 0:ge.toLowerCase())||"";return ze.includes("cancha")||ze.includes("volumétrica")||ze.includes("volumetric")}function k(ye,ge){if(!u.value||!M())return!1;const ze=String(ye||"").toLowerCase(),Ie=String(ge||"").toLowerCase();return ze.includes("ambos")||Ie.includes("ambos")}function I(ye){var ge,ze;const Ie=(ze=(ge=f.value)==null?void 0:ge.filters)==null?void 0:ze[ye];if(!Ie||!Ie.options)return;const Ve=Ie.options.map(Ge=>Ge.value);Array.isArray(m.value[ye])||(m.value[ye]=[]),L(ye)?m.value[ye]=[]:m.value[ye]=[...Ve],V.value=ye,pe()}const _=h.ref("ambos"),P=h.ref(!1),z=h.ref(!1),V=h.ref(null),U=h.ref(null);function q(ye,ge=!1){const ze="https://golstatsimages.blob.core.windows.net/images-library/",Ie="https://golstatsimages.blob.core.windows.net/reports-images/",Ve={cancha:"icn_cancha",grafico:"icn_grafico",gráfico:"icn_grafico",chart:"icn_grafico",volumetrica:"icn_cancha",volumétrica:"icn_cancha",volumetric:"icn_cancha",tabla:"icn_tabla",tablas:"icn_tabla",Tablas:"icn_tabla"},Ge=Object.keys(Ve).find(Ke=>ye==null?void 0:ye.toLowerCase().includes(Ke.toLowerCase()));if(Ge){const Ke=Ve[Ge],ke=ge?"":"-def";return Ge.toLowerCase().includes("tabla")?`${Ie}${Ke}${ke}@2x.png`:`${ze}${Ke}${ke}@2x.png`}return`${ze}icn_default${ge?"":"-def"}.png`}function W(){return d.value?d.value.name:"Tipo de vista"}function Y(){return f.value?f.value.name||f.value.title:"Visualización"}function ne(){u.value||(P.value=!P.value,P.value&&(z.value=!1,h.nextTick(()=>{Se()})))}function J(){u.value||d.value&&(z.value=!z.value,z.value&&(P.value=!1))}function re(ye){u.value||(i.value=ye,P.value=!1,c.value=null,pe())}function ee(ye){var ge,ze;u.value||(c.value=ye.id,z.value=!1,(ge=ye.name)!=null&&ge.toLowerCase().includes("tops players")||(ze=ye.title)==null||ze.toLowerCase().includes("tops players"))}function Z(ye){var ge;V.value=V.value===ye?null:ye,((ge=f.value)==null?void 0:ge.id)===4&&u.value&&ye===0&&(console.log("Timeline dropdown opened, forcing checkbox update"),setTimeout(()=>{m.value=[...m.value]},50))}function te(ye){U.value=U.value===ye?null:ye}function ae(ye,ge){var ze,Ie,Ve,Ge,Ke,ke,Be;if(console.log("selectSimpleOption called:",{idx:ye,optionValue:ge,isEditMode:u.value}),((ze=f.value)==null?void 0:ze.id)===2){console.log("GSCtops - selectSimpleOption for GSCtops");const Fe=T.value.findIndex(He=>He.type==="select-simple"&&He.label==="Tipo de análisis");ye===Fe?(m.value[0]=ge,console.log("GSCtops - updated dynamicFilters[0] (category) to:",ge)):(m.value[ye]=ge,console.log("GSCtops - updated dynamicFilters["+ye+"] to:",ge))}else if(((Ie=f.value)==null?void 0:Ie.id)===1)console.log("GSCComparativeReports - selectSimpleOption for GSCComparativeReports"),m.value[0]=ge,console.log("GSCComparativeReports - updated dynamicFilters[0] (analysis type) to:",ge);else if(((Ve=f.value)==null?void 0:Ve.id)===6)console.log("GSCLineupsReports - selectSimpleOption for GSCLineupsReports"),m.value[0]=ge,console.log("GSCLineupsReports - updated dynamicFilters[0] (game number) to:",ge);else if(((Ge=f.value)==null?void 0:Ge.id)===9)if(console.log("GSCFieldDataByZones - selectSimpleOption for GSCFieldDataByZones"),ye===0){Array.isArray(ge)?(m.value[ye]=ge,console.log("GSCFieldDataByZones - updated dynamicFilters[0] (categories) to:",ge)):(m.value[ye]=[ge],console.log("GSCFieldDataByZones - converted to array and updated dynamicFilters[0] (categories) to:",[ge]));const Fe=((Ke=T.value[ye])==null?void 0:Ke.options)||[];console.log("GSCFieldDataByZones - filterOptions for comparison:",Fe);const He=Array.isArray(ge)?ge:[ge],rt=Fe.find(nt=>Array.isArray(nt.value)?Me(nt.value,He):He.includes(nt.value));console.log("GSCFieldDataByZones - matching option found:",rt),rt?(console.log("GSCFieldDataByZones - using matching option value:",rt.value),m.value[ye]=rt.value,console.log("GSCFieldDataByZones - updated dynamicFilters["+ye+"] to matching option value:",rt.value)):(console.log("GSCFieldDataByZones - no matching option found, using selectedValue directly"),m.value[ye]=He)}else m.value[ye]=ge,console.log("GSCFieldDataByZones - updated dynamicFilters["+ye+"] to:",ge);else m.value[ye]=ge;U.value=null,console.log("dynamicFilters after selectSimpleOption:",m.value),((ke=f.value)==null?void 0:ke.id)===6&&(console.log("GSCLineupsReports - selectSimpleOption called"),console.log("GSCLineupsReports - isEditMode:",u.value),console.log("GSCLineupsReports - viewToEdit:",e),console.log("GSCLineupsReports - dynamicFilters:",m.value)),u.value&&(console.log("calling updateContainerOnUserChange"),console.log("isEditMode.value:",u.value),console.log("viewToEdit:",e),console.log("filterAndViewsContainer:",b),Ne(),((Be=f.value)==null?void 0:Be.id)===9&&(console.log("GSCFieldDataByZones - forcing component refresh after category change"),h.nextTick(()=>{var Fe,He,rt,nt,pt,vt,ft,Nt;xi.emit("force-component-update",{itemId:(Fe=e==null?void 0:e.view)==null?void 0:Fe.id,componentProps:(He=e==null?void 0:e.view)==null?void 0:He.componentProps,filterMultiple:(rt=e==null?void 0:e.view)==null?void 0:rt.filterMultiple}),console.log("GSCFieldDataByZones - emitted force-component-update event"),xi.emit("dynamic-filters-changed",{containerViewId:(nt=f.value)==null?void 0:nt.id,viewId:(pt=e==null?void 0:e.view)==null?void 0:pt.id,dynamicFilters:m.value}),console.log("GSCFieldDataByZones - emitted dynamic-filters-changed event"),xi.emit("component-props-updated",{viewId:(vt=e==null?void 0:e.view)==null?void 0:vt.id,componentProps:(ft=e==null?void 0:e.view)==null?void 0:ft.componentProps,dynamicFilters:m.value}),console.log("GSCFieldDataByZones - emitted component-props-updated event"),(Nt=e==null?void 0:e.view)!=null&&Nt.componentProps&&(e.view.componentProps={...e.view.componentProps},console.log("GSCFieldDataByZones - forced componentProps reactivity")),e!=null&&e.view&&(e.view._updateKey,e.view._updateKey=Date.now(),console.log("GSCFieldDataByZones - updated _updateKey:",e.view._updateKey))}))),console.log("calling emitChange"),pe()}function oe(ye){ye.target.closest(".custom-select")||(P.value=!1,z.value=!1,U.value=null)}function pe(){var ye,ge,ze,Ie,Ve,Ge,Ke,ke,Be,Fe,He,rt,nt,pt,vt,ft,Nt,Ft,Dt,at,Ze,ct,gt,Rt,Ct,tt,st,Je,lt,Tt,yt,It,Lt,Qe;if(console.log("emitChange called"),console.log("isEditMode.value:",u.value),console.log("viewToEdit:",e),console.log("dynamicFilters.value:",m.value),y.value){console.log("Skipping emitChange due to container update in progress");return}((ye=f.value)==null?void 0:ye.id)===8&&(console.log("FieldPosesion detected - dynamicFilters:",m.value),console.log("Current filters:",T.value)),((ge=f.value)==null?void 0:ge.id)===4&&(console.log("Timeline detected - dynamicFilters:",m.value),console.log("Current filters:",T.value),console.log("Timeline - will emit change:",!y.value)),((ze=f.value)==null?void 0:ze.id)===2&&(console.log("GSCtops detected - dynamicFilters:",m.value),console.log("Current filters:",T.value),console.log("GSCtops - will emit change:",!y.value)),((Ie=f.value)==null?void 0:Ie.id)===6&&(console.log("GSCLineupsReports detected - dynamicFilters:",m.value),console.log("Current filters:",T.value),console.log("GSCLineupsReports - will emit change:",!y.value),console.log("GSCLineupsReports - isEditMode:",u.value),console.log("GSCLineupsReports - viewToEdit:",e)),((Ve=f.value)==null?void 0:Ve.id)===9&&(console.log("GSCFieldDataByZones detected - dynamicFilters:",m.value),console.log("Current filters:",T.value),console.log("GSCFieldDataByZones - will emit change:",!y.value),console.log("GSCFieldDataByZones - isEditMode:",u.value),console.log("GSCFieldDataByZones - viewToEdit:",e));let et=[],wt=[];f.value&&Array.isArray(T.value)&&T.value.forEach((Ht,Wt)=>{if(Ht.type==="select"&&Ht.label==="Tipo de análisis"&&Ht.id===2){const Gt=m.value[Wt]||[];Array.isArray(Gt)&&Gt.length>0&&(et=Gt.map(rr=>{var nr;const Sr=(nr=Ht.options)==null?void 0:nr.find(Ar=>Ar.value===rr);return{value:rr,label:(Sr==null?void 0:Sr.label)||rr}}))}});const zt=((Ke=(Ge=f.value)==null?void 0:Ge.name)==null?void 0:Ke.toLowerCase().includes("tops players"))||((Be=(ke=f.value)==null?void 0:ke.title)==null?void 0:Be.toLowerCase().includes("tops players")),Ot=((Fe=f.value)==null?void 0:Fe.id)===4,St=f.value&&Array.isArray(f.value.filters)?f.value.filters.some(Ht=>Ht.type==="select"&&Ht.label==="Tipo de análisis"&&Ht.id===2):!1;if(zt&&St&&et.length===0||St&&et.length===0&&!Ot)return;if(Ot&&m.value&&m.value.length>0){const Ht=m.value[0];Array.isArray(Ht)&&Ht.length>0&&console.log("Timeline - emitting change with events:",Ht)}wt=((He=T.value)==null?void 0:He.map((Ht,Wt)=>{var Gt,rr,nr,Sr,Ar;const wr=m.value[Wt];((Gt=f.value)==null?void 0:Gt.id)===8&&console.log(`FieldPosesion filter ${Wt}:`,{type:Ht.type,label:Ht.label,selectedValue:wr,selectedValueType:typeof wr,isRadioButton:Ht.type==="radio-button"});let ar=Ht.id||`filter_${Wt}`;return((rr=f.value)==null?void 0:rr.id)===3&&u.value&&(nr=e==null?void 0:e.view)!=null&&nr.id&&(ar=`filter_${Wt}_component_${e.view.id}`,console.log(`GSCMatchSummary - Generated unique filterId: ${ar} for component ${e.view.id}`)),{filterId:ar,filterType:Ht.type,filterLabel:Ht.label,filterIcon:Ht.icon||null,selectedValue:wr,selectedOptions:Ht.type==="select"&&Array.isArray(wr)&&wr.length>0?wr.map(vr=>{var Wr;const xr=(Wr=Ht.options)==null?void 0:Wr.find(fr=>fr.value===vr);return{value:vr,label:(xr==null?void 0:xr.label)||vr,icon:(xr==null?void 0:xr.icon)||null}}):null,selectedOption:Ht.type==="radio-button"&&wr!=null?{value:wr,label:((Ar=(Sr=Ht.options)==null?void 0:Sr.find(vr=>vr.value===wr))==null?void 0:Ar.label)||wr}:null,isChecked:Ht.type==="check"?wr:null}}))||[];const Jt={mainSelector:{id:((rt=d.value)==null?void 0:rt.id)||null,name:((nt=d.value)==null?void 0:nt.name)||null,url:((pt=d.value)==null?void 0:pt.url)||null},viewSelector:{id:((vt=f.value)==null?void 0:vt.id)||null,name:((ft=f.value)==null?void 0:ft.name)||((Nt=f.value)==null?void 0:Nt.title)||null,url:((Ft=f.value)==null?void 0:Ft.url)||null},team:_.value,dynamicFilters:wt,categoriasSeleccionadas:et,timestamp:new Date().toISOString(),summary:{mainSelected:!!d.value,viewSelected:!!f.value,totalDynamicFilters:((Dt=T.value)==null?void 0:Dt.length)||0,activeFilters:((at=T.value)==null?void 0:at.filter((Ht,Wt)=>{const Gt=m.value[Wt];return Array.isArray(Gt)?Gt.length>0:Gt!=null&&Gt!==!1}).length)||0}};e&&(console.log("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"),console.log("viewToEdit.view.filterAndViewsContainer",e.view.filterAndViewsContainer),console.log("viewToEdit.view.filterAndViewsContainer.childViews.length",e.view.filterAndViewsContainer.childViews.length));const qt={main:d.value,view:f.value,team:_.value,dynamicFilters:m.value,filtersJSON:Jt,filterAndViewsContainer:b,viewToEdit:e};if(console.log("GSCtops - emitting filters-changed with data:",qt),X("filters-changed",qt),u.value&&e){if(v=Jt,console.log("Updated editFiltersJSON:",v),((Ze=f.value)==null?void 0:Ze.id)===8&&(console.log("FieldPosesion - editFiltersJSON updated:",v),console.log("FieldPosesion - dynamicFilters in JSON:",v.dynamicFilters)),((ct=f.value)==null?void 0:ct.id)===2){console.log("GSCtops - editFiltersJSON updated:",v),console.log("GSCtops - dynamicFilters in JSON:",v.dynamicFilters),console.log("GSCtops - viewToEdit.filterMultiple:",(gt=e.view)==null?void 0:gt.filterMultiple);const Ht=v.dynamicFilters.findIndex(Wt=>Wt.filterType==="select-simple"&&Wt.filterLabel==="Tipo de análisis");Ht!==-1&&(Ct=(Rt=e.view)==null?void 0:Rt.filterMultiple)!=null&&Ct.categoryId&&(v.dynamicFilters[Ht].selectedValue=e.view.filterMultiple.categoryId,console.log("GSCtops - updated editFiltersJSON with filterMultiple.categoryId:",e.view.filterMultiple.categoryId))}if(((tt=f.value)==null?void 0:tt.id)===1){console.log("GSCComparativeReports - editFiltersJSON updated:",v),console.log("GSCComparativeReports - dynamicFilters in JSON:",v.dynamicFilters),console.log("GSCComparativeReports - viewToEdit.filterMultiple:",(st=e.view)==null?void 0:st.filterMultiple);const Ht=v.dynamicFilters.findIndex(Wt=>Wt.filterType==="select-simple"&&Wt.filterLabel==="Tipo de análisis");Ht!==-1&&(lt=(Je=e.view)==null?void 0:Je.filterMultiple)!=null&&lt.category&&(v.dynamicFilters[Ht].selectedValue=e.view.filterMultiple.category,console.log("GSCComparativeReports - updated editFiltersJSON with filterMultiple.category:",e.view.filterMultiple.category))}}if(((Tt=f.value)==null?void 0:Tt.id)===6&&u.value&&(yt=e==null?void 0:e.view)!=null&&yt.filterMultiple&&(console.log("GSCLineupsReports - viewToEdit.filterMultiple:",(It=e.view)==null?void 0:It.filterMultiple),e.view.filterMultiple.gameNumber&&v)){const Ht=v.dynamicFilters.findIndex(Wt=>Wt.filterType==="select-simple"&&Wt.filterLabel==="Número de juego");Ht!==-1&&(Qe=(Lt=e.view)==null?void 0:Lt.filterMultiple)!=null&&Qe.gameNumber&&(v.dynamicFilters[Ht].selectedValue=e.view.filterMultiple.gameNumber,console.log("GSCLineupsReports - updated editFiltersJSON with filterMultiple.gameNumber:",e.view.filterMultiple.gameNumber))}b&&!u.value?(b.setDynamicFilters(m.value),console.log("Updated container with new dynamicFilters:",m.value)):b&&u.value&&console.log("In edit mode, not updating container automatically")}function fe(){e=null,v=null,b=null,i.value=null,c.value=null,_.value="ambos",m.value=[],P.value=!1,z.value=!1,V.value=null,U.value=null,u.value=!1,t.value=!1,w.value=!1}function se(ye){if(ye&&ye.dynamicFilters){if(console.log("Updating filters from container:",ye.dynamicFilters),x.value){console.log("Skipping container update due to user update in progress");return}Array.isArray(ye.dynamicFilters)&&ye.dynamicFilters.length>0&&(y.value=!0,m.value=[...ye.dynamicFilters],h.nextTick(()=>{y.value=!1}))}}function ue(ye){if(console.log("preselectFiltersFromJSON called with:",ye),u.value=!0,ye.mainSelector&&ye.mainSelector.id){const ge=A.value.findIndex(ze=>ze.id===ye.mainSelector.id);ge!==-1&&(i.value=ge,console.log("Selected main index:",ge))}ye.viewSelector&&ye.viewSelector.id&&d.value&&d.value.views.findIndex(ge=>ge.id===ye.viewSelector.id)!==-1&&(c.value=ye.viewSelector.id,console.log("Selected second id:",ye.viewSelector.id)),ye.dynamicFilters&&Array.isArray(ye.dynamicFilters)&&(console.log("Processing dynamic filters:",ye.dynamicFilters),h.nextTick(()=>{setTimeout(()=>{var ge,ze,Ie,Ve,Ge,Ke,ke,Be,Fe,He,rt,nt,pt,vt,ft,Nt,Ft,Dt,at,Ze,ct,gt,Rt,Ct,tt,st,Je,lt,Tt,yt,It;if(console.log("Processing filters after delay"),console.log("selectedSecond.value:",f.value),f.value&&T.value){if(console.log("Filters available:",T.value),y.value){console.log("Skipping preselect due to container update in progress");return}if(x.value=!0,console.log("&666&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&",ye.dynamicFilters),ye.dynamicFilters.forEach((Lt,Qe)=>{var et,wt,zt,Ot,St,Jt,qt,Ht,Wt,Gt,rr,nr,Sr,Ar;if(Qe<T.value.length){const wr=T.value[Qe];if(((et=f.value)==null?void 0:et.id)===3&&u.value&&console.log(`GSCMatchSummary - Processing filter ${Qe} for component ${((wt=e==null?void 0:e.view)==null?void 0:wt.id)||"unknown"}`),wr.type==="check"){const ar=Lt.isChecked;console.log(`Setting check filter ${Qe} to:`,ar),typeof ar=="boolean"?(m.value[Qe]=ar,console.log(`Successfully set check filter ${Qe} to:`,ar)):console.log(`Invalid isChecked value for filter ${Qe}:`,ar)}else if(wr.type==="select"&&Lt.selectedOptions){const ar=Lt.selectedOptions.map(vr=>vr.value);console.log(`Setting select filter ${Qe} to:`,ar),m.value[Qe]=ar,console.log(`Successfully set select filter ${Qe} to:`,ar)}else if(wr.type==="select"&&Lt.selectedValue&&Array.isArray(Lt.selectedValue))if(Lt.selectedValue.length>0&&Lt.selectedValue[0]&&typeof Lt.selectedValue[0]=="object"){const ar=We(Lt.selectedValue);console.log(`Setting Timeline select filter ${Qe} to:`,ar),m.value[Qe]=ar,console.log(`Successfully set Timeline select filter ${Qe} to:`,ar)}else console.log(`Setting select filter ${Qe} to:`,Lt.selectedValue),m.value[Qe]=Lt.selectedValue,console.log(`Successfully set select filter ${Qe} to:`,Lt.selectedValue);else if(wr.type==="radio-button"&&Lt.selectedOption)console.log(`Setting radio filter ${Qe} to:`,Lt.selectedOption.value),m.value[Qe]=Lt.selectedOption.value;else if(wr.type==="select-simple"&&Lt.selectedValue!==void 0){console.log(`Setting select-simple filter ${Qe} to:`,Lt.selectedValue),console.log("select-simple filterData.selectedValue type:",typeof Lt.selectedValue),console.log("select-simple filterData.selectedValue is array:",Array.isArray(Lt.selectedValue));let ar;((zt=f.value)==null?void 0:zt.id)===2&&(St=(Ot=e==null?void 0:e.view)==null?void 0:Ot.filterMultiple)!=null&&St.categoryId?(ar=e.view.filterMultiple.categoryId,console.log("GSCtops - using filterMultiple.categoryId instead of selectedValue:",ar)):((Jt=f.value)==null?void 0:Jt.id)===1&&(Ht=(qt=e==null?void 0:e.view)==null?void 0:qt.filterMultiple)!=null&&Ht.category?(ar=e.view.filterMultiple.category,console.log("GSCComparativeReports - using filterMultiple.category instead of selectedValue:",ar)):((Wt=f.value)==null?void 0:Wt.id)===6&&(rr=(Gt=e==null?void 0:e.view)==null?void 0:Gt.filterMultiple)!=null&&rr.gameNumber?(ar=e.view.filterMultiple.gameNumber,console.log("GSCLineupsReports - using filterMultiple.gameNumber instead of selectedValue:",ar)):((nr=f.value)==null?void 0:nr.id)===9&&(Ar=(Sr=e==null?void 0:e.view)==null?void 0:Sr.filterMultiple)!=null&&Ar.categoryIds?(ar=e.view.filterMultiple.categoryIds,console.log("GSCFieldDataByZones - using filterMultiple.categoryIds instead of selectedValue:",ar)):ar=Array.isArray(Lt.selectedValue)?Lt.selectedValue[0]:Lt.selectedValue,m.value[Qe]=ar,console.log(`Successfully set select-simple filter ${Qe} to:`,ar)}}else console.log(`Filter index ${Qe} out of range`)}),console.log("Final dynamicFilters.value:",m.value),((ge=f.value)==null?void 0:ge.id)===3&&u.value&&console.log("GSCMatchSummary - Final dynamicFilters after processing:",m.value),((ze=f.value)==null?void 0:ze.id)===2&&u.value&&(Ie=e==null?void 0:e.view)!=null&&Ie.filterMultiple){if(console.log("GSCtops - checking filterMultiple after preselecting filters:",e.view.filterMultiple),console.log("GSCtops - currentFilters:",T.value),console.log("GSCtops - dynamicFilters before:",m.value),e.view.filterMultiple.categoryId){console.log("GSCtops - found categoryId in filterMultiple:",e.view.filterMultiple.categoryId);const Lt=T.value.findIndex(Qe=>Qe.type==="select-simple"&&Qe.label==="Tipo de análisis");if(console.log("GSCtops - categoryFilterIndex:",Lt),console.log("GSCtops - all filters:",T.value.map((Qe,et)=>({index:et,type:Qe.type,label:Qe.label}))),Lt!==-1){console.log("GSCtops - found category filter at index:",Lt);const Qe=e.view.filterMultiple.categoryId;if(console.log("GSCtops - setting category filter directly from filterMultiple.categoryId:",Qe),m.value[0]=Qe,e.view.componentProps&&Qe){let wt=`Category ${Qe}`,zt=null;try{zt=Vd(Qe),zt&&(wt=zt.name,console.log("GSCtops - found category info from getCategoryById in preselectFiltersFromJSON:",zt))}catch{console.log("GSCtops - getCategoryById failed in preselectFiltersFromJSON, using filter options");const Ot=T.value.findIndex(St=>St.type==="select-simple"&&St.label==="Tipo de análisis");if(Ot!==-1){const St=(((Ve=T.value[Ot])==null?void 0:Ve.options)||[]).find(Jt=>Jt.value==Qe);St&&(wt=St.label,console.log("GSCtops - found category name from options in preselectFiltersFromJSON:",wt))}}e.view.componentProps.categoryView=[{id:Qe,name:wt}],console.log("GSCtops - updated componentProps.categoryView in preselectFiltersFromJSON:",e.view.componentProps.categoryView)}console.log("GSCtops - automatically set category filter to:",Qe),console.log("GSCtops - categoryId type:",typeof Qe),console.log("GSCtops - updated dynamicFilters:",m.value),console.log("GSCtops - filter options:",(Ge=T.value[Lt])==null?void 0:Ge.options);const et=(((Ke=T.value[Lt])==null?void 0:Ke.options)||[]).find(wt=>wt.value==Qe);console.log("GSCtops - matching option:",et),h.nextTick(()=>{m.value=[...m.value],console.log("GSCtops - forced reactivity update")})}else console.log("GSCtops - category filter not found!")}if(e.view.filterMultiple.teamType!==void 0){console.log("GSCtops - found teamType in filterMultiple:",e.view.filterMultiple.teamType),console.log("MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM ------------------------------------> ",T.value);const Lt=T.value.findIndex(Qe=>Qe.type==="radio-button");if(console.log("GSCtops - teamFilterIndex:",Lt),console.log("GSCtops - all filters:",T.value.map((Qe,et)=>({index:et,type:Qe.type,label:Qe.label}))),Lt!==-1){console.log("GSCtops - found team filter at index:",Lt);const Qe=e.view.filterMultiple.teamType;console.log("GSCtops - setting team filter directly from filterMultiple.teamType:",Qe),m.value[Lt]=Qe,console.log("GSCtops - automatically set team filter to:",Qe),console.log("GSCtops - teamType type:",typeof Qe),console.log("GSCtops - updated dynamicFilters:",m.value),console.log("GSCtops - filter options:",(ke=T.value[Lt])==null?void 0:ke.options);const et=(((Be=T.value[Lt])==null?void 0:Be.options)||[]).find(wt=>wt.value==Qe);console.log("GSCtops - matching option for team:",et),h.nextTick(()=>{m.value=[...m.value],console.log("GSCtops - forced reactivity update for team filter")})}else console.log("GSCtops - team filter not found!")}}if(((Fe=f.value)==null?void 0:Fe.id)===9&&u.value&&(He=e==null?void 0:e.view)!=null&&He.filterMultiple){if(console.log("55555 GSCFieldDataByZones - checking filterMultiple after preselecting filters:",e.view.filterMultiple),console.log("55555 GSCFieldDataByZones - currentFilters:",T.value),console.log(" 55555GSCFieldDataByZones - dynamicFilters before:",m.value),e.view.filterMultiple.categoryIds){console.log("55555 GSCFieldDataByZones - found categoryIds in filterMultiple:",e.view.filterMultiple.categoryIds);const Lt=T.value.findIndex(Qe=>Qe.type==="select-simple");if(console.log("55555 GSCFieldDataByZones - analysisTypeFilterIndex:",Lt),console.log("55555 GSCFieldDataByZones - all filters:",T.value.map((Qe,et)=>({index:et,type:Qe.type,label:Qe.label}))),Lt!==-1){console.log("55555 GSCFieldDataByZones - found analysis type filter at index:",Lt);const Qe=Array.isArray(e.view.filterMultiple.categoryIds)?e.view.filterMultiple.categoryIds:[e.view.filterMultiple.categoryIds];console.log("55555 GSCFieldDataByZones - setting category filter directly from filterMultiple.categoryIds:",Qe),m.value[0]=Qe,console.log("55555 GSCFieldDataByZones - automatically set category filter to:",Qe),console.log("55555 GSCFieldDataByZones - categoryIds type:",typeof Qe),console.log("55555 GSCFieldDataByZones - categoryIds is array:",Array.isArray(Qe)),console.log("55555 GSCFieldDataByZones - updated dynamicFilters:",m.value),console.log("55555 GSCFieldDataByZones - filter options:",(rt=T.value[Lt])==null?void 0:rt.options);const et=((nt=T.value[Lt])==null?void 0:nt.options)||[];console.log("55555 filterOptions :",et);const wt=et.filter(St=>Array.isArray(St.value)?Me(St.value,Qe):Qe.includes(St.value));if(console.log("55555 GSCFieldDataByZones - matching options:",wt),wt.length>0){const St=wt[0];console.log("55555 GSCFieldDataByZones - found matching option:",St);const Jt=St.value;console.log("55555 GSCFieldDataByZones - using option value:",Jt),m.value[Lt]=Jt,console.log("55555 GSCFieldDataByZones - set dynamicFilters["+Lt+"] to option value:",Jt)}else console.log("55555 GSCFieldDataByZones - no matching options found, using categoryIds directly"),m.value[Lt]=Qe;const zt=m.value[Lt],Ot=Me(zt,Qe);console.log("55555 GSCFieldDataByZones - arrays match:",Ot),console.log("55555 GSCFieldDataByZones - current filter value:",zt,"categoryIds:",Qe),h.nextTick(()=>{m.value=[...m.value],console.log("55555 GSCFieldDataByZones - forced reactivity update")})}else console.log("55555 GSCFieldDataByZones - analysis type filter not found!")}if(e.view.filterMultiple.isHomeTeam!==void 0){console.log("444444444 GSCFieldDataByZones - found isHomeTeam in filterMultiple:",e.view.filterMultiple.isHomeTeam);const Lt=T.value.findIndex(Qe=>Qe.type==="radio-button");if(console.log("444444444 GSCFieldDataByZones - teamFilterIndex:",Lt),console.log("444444444 GSCFieldDataByZones - all filters:",T.value.map((Qe,et)=>({index:et,type:Qe.type,label:Qe.label}))),Lt!==-1){console.log("444444444 GSCFieldDataByZones - found team filter at index:",Lt);const Qe=e.view.filterMultiple.isHomeTeam;console.log("444444444 GSCFieldDataByZones - isHomeTeam type:",typeof Qe,"value:",Qe);let et;typeof Qe=="boolean"?(et=Qe?1:2,console.log("444444444 GSCFieldDataByZones - converted boolean isHomeTeam to teamValue:",Qe,"->",et)):typeof Qe=="number"?(et=Qe===1?1:2,console.log("444444444 GSCFieldDataByZones - converted numeric isHomeTeam to teamValue:",Qe,"->",et)):(et=1,console.log("444444444 GSCFieldDataByZones - using default teamValue:",et)),console.log("444444444 GSCFieldDataByZones - setting team filter directly from filterMultiple.isHomeTeam:",Qe,"-> teamValue:",et),m.value[Lt]=et,console.log("444444444 GSCFieldDataByZones - automatically set team filter to:",et),console.log("444444444 GSCFieldDataByZones - teamValue type:",typeof et),console.log("444444444 GSCFieldDataByZones - updated dynamicFilters:",m.value),console.log(" 444444444 GSCFieldDataByZones - filter options:",(pt=T.value[Lt])==null?void 0:pt.options);const wt=(((vt=T.value[Lt])==null?void 0:vt.options)||[]).find(zt=>zt.value==et);console.log("444444444 GSCFieldDataByZones - matching option for team:",wt),h.nextTick(()=>{console.log("4444444 **************************************** dynamicFilters *************",m.value),m.value=[...m.value],console.log(" 444444444GSCFieldDataByZones - forced reactivity update for team filter")})}else console.log(" 444444444GSCFieldDataByZones - team filter not found!")}}if(((ft=f.value)==null?void 0:ft.id)===1&&u.value&&(Nt=e==null?void 0:e.view)!=null&&Nt.filterMultiple&&(console.log("GSCComparativeReports - checking filterMultiple after preselecting filters:",e.view.filterMultiple),console.log("GSCComparativeReports - currentFilters:",T.value),console.log("GSCComparativeReports - dynamicFilters before:",m.value),e.view.filterMultiple.category)){console.log("GSCComparativeReports - found category in filterMultiple:",e.view.filterMultiple.category);const Lt=T.value.findIndex(Qe=>Qe.type==="select-simple"&&Qe.label==="Tipo de análisis");if(console.log("GSCComparativeReports - analysisTypeFilterIndex:",Lt),console.log("GSCComparativeReports - all filters:",T.value.map((Qe,et)=>({index:et,type:Qe.type,label:Qe.label}))),Lt!==-1){console.log("GSCComparativeReports - found analysis type filter at index:",Lt);const Qe=e.view.filterMultiple.category;console.log("GSCComparativeReports - setting analysis type filter directly from filterMultiple.category:",Qe),m.value[0]=Qe,e.view.componentProps&&Qe&&(e.view.componentProps.type=Qe,console.log("GSCComparativeReports - updated componentProps.type:",e.view.componentProps.type)),console.log("GSCComparativeReports - automatically set analysis type filter to:",Qe),console.log("GSCComparativeReports - category type:",typeof Qe),console.log("GSCComparativeReports - updated dynamicFilters:",m.value),console.log("GSCComparativeReports - filter options:",(Ft=T.value[Lt])==null?void 0:Ft.options);const et=(((Dt=T.value[Lt])==null?void 0:Dt.options)||[]).find(wt=>wt.value==Qe);console.log("GSCComparativeReports - matching option:",et),h.nextTick(()=>{m.value=[...m.value],console.log("GSCComparativeReports - forced reactivity update")})}else console.log("GSCComparativeReports - analysis type filter not found!")}if(((at=f.value)==null?void 0:at.id)===6&&u.value&&(Ze=e==null?void 0:e.view)!=null&&Ze.filterMultiple&&(console.log("GSCLineupsReports - checking filterMultiple after preselecting filters:",e.view.filterMultiple),console.log("GSCLineupsReports - currentFilters:",T.value),console.log("GSCLineupsReports - dynamicFilters before:",m.value),e.view.filterMultiple.gameNumber)){console.log("GSCLineupsReports - found gameNumber in filterMultiple:",e.view.filterMultiple.gameNumber);const Lt=T.value.findIndex(Qe=>Qe.type==="select-simple"&&Qe.label==="Número de juego");if(console.log("GSCLineupsReports - gameNumberFilterIndex:",Lt),console.log("GSCLineupsReports - all filters:",T.value.map((Qe,et)=>({index:et,type:Qe.type,label:Qe.label}))),Lt!==-1){console.log("GSCLineupsReports - found game number filter at index:",Lt);const Qe=e.view.filterMultiple.gameNumber;console.log("GSCLineupsReports - setting game number filter directly from filterMultiple.gameNumber:",Qe),m.value[0]=Qe,e.view.componentProps&&Qe&&(e.view.componentProps.gameNumber=Qe,console.log("GSCLineupsReports - updated componentProps.gameNumber:",e.view.componentProps.gameNumber)),console.log("GSCLineupsReports - automatically set game number filter to:",Qe),console.log("GSCLineupsReports - gameNumber type:",typeof Qe),console.log("GSCLineupsReports - updated dynamicFilters:",m.value),console.log("GSCLineupsReports - filter options:",(ct=T.value[Lt])==null?void 0:ct.options);const et=(((gt=T.value[Lt])==null?void 0:gt.options)||[]).find(wt=>wt.value==Qe);console.log("GSCLineupsReports - matching option:",et),h.nextTick(()=>{m.value=[...m.value],console.log("GSCLineupsReports - forced reactivity update")})}else console.log("GSCLineupsReports - game number filter not found!")}if(((Rt=f.value)==null?void 0:Rt.id)===7&&u.value&&e!=null&&e.view){if(console.log("GSCGoalData - checking stored values after preselecting filters:",e.view),console.log("GSCGoalData - currentFilters:",T.value),console.log("GSCGoalData - dynamicFilters before:",m.value),(Ct=e.view.componentProps)!=null&&Ct.analysisType&&T.value.length>0&&((tt=T.value[0])==null?void 0:tt.type)==="radio-button"){const Lt=e.view.componentProps.analysisType,Qe=Lt==="offensive"?1:2;console.log("GSCGoalData - setting analysis type filter from componentProps.analysisType:",Qe,"analysisType:",Lt),m.value[0]=Qe}if(((st=e.view.filterMultiple)==null?void 0:st.isHomeTeam)!==void 0){console.log("GSCGoalData - found isHomeTeam in filterMultiple:",e.view.filterMultiple.isHomeTeam),console.log('GSCGoalData - searching for radio-button filter with label "Equipo"'),console.log("GSCGoalData - all filters details:",T.value.map((Qe,et)=>({index:et,type:Qe.type,label:Qe.label,options:Qe.options})));const Lt=T.value.findIndex(Qe=>Qe.type==="radio-button"&&Qe.label==="Equipo");if(console.log("GSCGoalData - teamFilterIndex:",Lt),console.log("GSCGoalData - all filters:",T.value.map((Qe,et)=>({index:et,type:Qe.type,label:Qe.label}))),Lt!==-1){console.log("GSCGoalData - found team filter at index:",Lt);const Qe=e.view.filterMultiple.isHomeTeam,et=Qe?1:2;console.log("GSCGoalData - setting team filter directly from filterMultiple.isHomeTeam:",et,"isHomeTeam:",Qe),m.value[1]=et}else if(console.log("GSCGoalData - team filter not found by label, trying by index"),T.value.length>1&&((Je=T.value[1])==null?void 0:Je.type)==="radio-button"){console.log("GSCGoalData - found radio-button filter at index 1 by fallback");const Qe=e.view.filterMultiple.isHomeTeam,et=Qe?1:2;console.log("GSCGoalData - setting team filter by fallback:",et,"isHomeTeam:",Qe),m.value[1]=et,e.view.componentProps&&(e.view.componentProps.isHomeTeamForAnalysis=Qe,console.log("GSCGoalData - updated componentProps.isHomeTeamForAnalysis:",e.view.componentProps.isHomeTeamForAnalysis)),console.log("GSCGoalData - automatically set team filter to:",et),console.log("GSCGoalData - teamValue type:",typeof et),console.log("GSCGoalData - updated dynamicFilters:",m.value),console.log("GSCGoalData - filter options:",(lt=T.value[1])==null?void 0:lt.options);const wt=(((Tt=T.value[1])==null?void 0:Tt.options)||[]).find(zt=>zt.value==et);console.log("GSCGoalData - matching option:",wt),h.nextTick(()=>{m.value=[...m.value],console.log("GSCGoalData - forced reactivity update")})}else console.log("GSCGoalData - no radio-button filter found at index 1 either");if(Lt!==-1&&e.view.componentProps){const Qe=e.view.filterMultiple.isHomeTeam,et=Qe?1:2;e.view.componentProps.isHomeTeamForAnalysis=Qe,console.log("GSCGoalData - updated componentProps.isHomeTeamForAnalysis:",e.view.componentProps.isHomeTeamForAnalysis),console.log("GSCGoalData - automatically set team filter to:",et),console.log("GSCGoalData - teamValue type:",typeof et),console.log("GSCGoalData - updated dynamicFilters:",m.value),console.log("GSCGoalData - filter options:",(yt=T.value[Lt])==null?void 0:yt.options);const wt=(((It=T.value[Lt])==null?void 0:It.options)||[]).find(zt=>zt.value==et);console.log("GSCGoalData - matching option:",wt),h.nextTick(()=>{m.value=[...m.value],console.log("GSCGoalData - forced reactivity update")})}}else console.log("GSCGoalData - isHomeTeam is undefined in filterMultiple")}h.nextTick(()=>{x.value=!1})}},100)}))}function de(){var ye,ge,ze,Ie,Ve,Ge,Ke,ke,Be,Fe;return{mainSelector:{id:((ye=d.value)==null?void 0:ye.id)||null,name:((ge=d.value)==null?void 0:ge.name)||null,url:((ze=d.value)==null?void 0:ze.url)||null},viewSelector:{id:((Ie=f.value)==null?void 0:Ie.id)||null,name:((Ve=f.value)==null?void 0:Ve.name)||((Ge=f.value)==null?void 0:Ge.title)||null,url:((Ke=f.value)==null?void 0:Ke.url)||null},team:_.value,dynamicFilters:((ke=T.value)==null?void 0:ke.map((He,rt)=>{var nt,pt;const vt=m.value[rt];return{filterId:He.id||`filter_${rt}`,filterType:He.type,filterLabel:He.label,filterIcon:He.icon||null,selectedValue:vt,selectedOptions:He.type==="select"&&Array.isArray(vt)&&vt.length>0?vt.map(ft=>{var Nt;const Ft=(Nt=He.options)==null?void 0:Nt.find(Dt=>Dt.value===ft);return{value:ft,label:(Ft==null?void 0:Ft.label)||ft,icon:(Ft==null?void 0:Ft.icon)||null}}):null,selectedOption:He.type==="radio-button"&&vt?{value:vt,label:((pt=(nt=He.options)==null?void 0:nt.find(ft=>ft.value===vt))==null?void 0:pt.label)||vt}:null,isChecked:He.type==="check"?vt:null}}))||[],timestamp:new Date().toISOString(),summary:{mainSelected:!!d.value,viewSelected:!!f.value,totalDynamicFilters:((Be=T.value)==null?void 0:Be.length)||0,activeFilters:((Fe=T.value)==null?void 0:Fe.filter((He,rt)=>{const nt=m.value[rt];return Array.isArray(nt)?nt.length>0:nt!=null&&nt!==!1}).length)||0}}}a({getCurrentFiltersJSON:de});function me(){fe(),X("close")}function _e(){t.value=!1,me()}function be(){w.value&&(xi.emit("filters-cancelled",b),w.value=!1),t.value=!1,me()}h.onMounted(async()=>{document.addEventListener("click",oe),h.nextTick(()=>{Se()});try{const ye=await(await fetch("https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/views",{headers:{Authorization:`${D.token}`}})).json();A.value=ye.data||[]}catch(ye){console.error("Error al obtener datos:",ye)}});function Se(){document.querySelectorAll(".field-menu .option-card").forEach(ye=>{const ge=ye.querySelector(".option-img");if(!ge||!ge.dataset.hoverSrc)return;const ze=ge.src,Ie=ge.dataset.hoverSrc;ye.addEventListener("mouseenter",()=>{ge.src=Ie}),ye.addEventListener("mouseleave",()=>{ge.src=ze})})}h.onUnmounted(()=>{document.removeEventListener("click",oe)}),xi.on("set-filter-and-views-container",ye=>{b=ye,ye&&se(ye)}),xi.on("view-added",()=>{console.log("View ************************************************************* add"),t.value=!0,w.value=!0}),xi.on("component-added-to-container",ye=>{console.log("Component added to container, updating filters, container:",ye),!u.value||b&&ye.id===b.id?se(ye):console.log("Skipping container update - edit mode or different container")}),xi.on("edit-view",ye=>{var ge,ze,Ie,Ve,Ge,Ke,ke,Be,Fe,He,rt,nt,pt,vt,ft,Nt;console.log("edit-view received:",ye),e=ye,b=((ge=ye.view)==null?void 0:ge.filterAndViewsContainer)||null,v=null;const Ft=[(Ie=(ze=ye.view)==null?void 0:ze.coreView)==null?void 0:Ie.filtersJSON,(Ve=ye.view)==null?void 0:Ve.filtersJSON,(Ge=ye.coreView)==null?void 0:Ge.filtersJSON,ye.filtersJSON,(ke=(Ke=ye.view)==null?void 0:Ke.componentProps)==null?void 0:ke.filtersJSON];for(const Dt of Ft)if(Dt){v=Dt,console.log("Found editFiltersJSON in:",Dt);break}if(b&&(b.viewId===4||b.viewId===8||b.viewId===3||b.viewId===1||b.viewId===2)&&(Be=ye.view)!=null&&Be.id){const Dt=b.getComponentDynamicFilters(ye.view.id);if(Dt){let at="Unknown";b.viewId===4?at="Timeline":b.viewId===8?at="FieldPosesion":b.viewId===3?at="GSCMatchSummary":b.viewId===1?at="GSCComparativeReports":b.viewId===2&&(at="GscTopPlayer"),console.log(`${at} - found component specific filters:`,Dt),v&&(v={...v,dynamicFilters:Dt.map((Ze,ct)=>Array.isArray(Ze)?{selectedValue:Ze,selectedOptions:Ze.map(gt=>({value:gt,label:gt}))}:typeof Ze=="boolean"?{isChecked:Ze}:at==="GSCComparativeReports"&&ct===0?{selectedValue:Ze,selectedOptions:[{value:Ze,label:Ze}]}:at==="GscTopPlayer"&&ct===0?{selectedValue:Ze,selectedOptions:[{value:Ze,label:Ze}]}:at==="GscTopPlayer"&&ct===1?{selectedOption:{value:Ze,label:Ze}}:{selectedOption:{value:Ze,label:Ze}})},console.log(`${at} - updated editFiltersJSON with component specific filters:`,v))}}if(b&&b.viewId===2&&(Fe=ye.view)!=null&&Fe.filterMultiple){if(console.log("2222************************************************************",e.view.filterMultiple),console.log("GSCtops detected - checking filterMultiple:",ye.view.filterMultiple),ye.view.filterMultiple.categoryId&&v){console.log("GSCtops - found categoryId in filterMultiple:",ye.view.filterMultiple.categoryId);const Dt=v.dynamicFilters.findIndex(at=>at.filterType==="select-simple"&&at.filterLabel==="Tipo de análisis");Dt!==-1&&(console.log("GSCtops - found category filter at index:",Dt),v.dynamicFilters[Dt]={...v.dynamicFilters[Dt],selectedValue:ye.view.filterMultiple.categoryId,selectedOptions:[{value:ye.view.filterMultiple.categoryId,label:`Category ${ye.view.filterMultiple.categoryId}`}]},console.log("GSCtops - updated filter with single value:",ye.view.filterMultiple.categoryId),console.log("GSCtops - updated filter structure:",v.dynamicFilters[Dt]),console.log("GSCtops - updated category filter with filterMultiple.categoryId:",ye.view.filterMultiple.categoryId))}if(ye.view.filterMultiple.teamType!==void 0&&v){console.log("GSCtops - found teamType in filterMultiple:",ye.view.filterMultiple.teamType);const Dt=v.dynamicFilters.findIndex(at=>at.filterType==="radio-button");if(Dt!==-1){console.log("GSCtops - found team filter at index:",Dt);const at=ye.view.filterMultiple.teamType,Ze=at===1?"Mi equipo":at===2?"Rival":at===3?"Ambos":"Equipo";v.dynamicFilters[Dt]={...v.dynamicFilters[Dt],selectedOption:{value:at,label:Ze}},console.log("GSCtops - updated team filter with teamType:",at,"label:",Ze),console.log("GSCtops - updated team filter structure:",v.dynamicFilters[Dt]),console.log("GSCtops - updated team filter with filterMultiple.teamType:",ye.view.filterMultiple.teamType)}}}if(b&&b.viewId===1&&(He=ye.view)!=null&&He.filterMultiple&&(console.log("GSCComparativeReports detected - checking filterMultiple:",ye.view.filterMultiple),ye.view.filterMultiple.category&&v)){console.log("GSCComparativeReports - found category in filterMultiple:",ye.view.filterMultiple.category);const Dt=v.dynamicFilters.findIndex(at=>at.filterType==="select-simple"&&at.filterLabel==="Tipo de análisis");Dt!==-1&&(console.log("GSCComparativeReports - found analysis type filter at index:",Dt),v.dynamicFilters[Dt]={...v.dynamicFilters[Dt],selectedValue:ye.view.filterMultiple.category,selectedOptions:[{value:ye.view.filterMultiple.category,label:ye.view.filterMultiple.category}]},console.log("GSCComparativeReports - updated filter with single value:",ye.view.filterMultiple.category),console.log("GSCComparativeReports - updated filter structure:",v.dynamicFilters[Dt]),console.log("GSCComparativeReports - updated analysis type filter with filterMultiple.category:",ye.view.filterMultiple.category))}if(b&&b.viewId===9&&(rt=ye.view)!=null&&rt.filterMultiple){if(console.log("GSCFieldDataByZones detected - checking filterMultiple:",ye.view.filterMultiple),ye.view.filterMultiple.categoryIds&&v){console.log("GSCFieldDataByZones - found categoryIds in filterMultiple:",ye.view.filterMultiple.categoryIds);const Dt=v.dynamicFilters.findIndex(at=>at.filterType==="select"&&at.filterLabel==="Tipo de análisis");if(Dt!==-1){console.log("GSCFieldDataByZones - found analysis type filter at index:",Dt);const at=Array.isArray(ye.view.filterMultiple.categoryIds)?ye.view.filterMultiple.categoryIds:[ye.view.filterMultiple.categoryIds];console.log("GSCFieldDataByZones - processing categoryIds array:",at),v.dynamicFilters[Dt]={...v.dynamicFilters[Dt],selectedValue:at,selectedOptions:at.map(Rt=>({value:Rt,label:`Category ${Rt}`}))},console.log("GSCFieldDataByZones - updated filter with categoryIds:",at),console.log("GSCFieldDataByZones - updated filter structure:",v.dynamicFilters[Dt]);const Ze=ye.view.filterMultiple.categoryIds,ct=Me(Ze,at);console.log("GSCFieldDataByZones - category arrays match with original:",ct),console.log("GSCFieldDataByZones - original categoryIds:",Ze,"processed categoryIds:",at);const gt=(((nt=T.value[Dt])==null?void 0:nt.options)||[]).filter(Rt=>Array.isArray(Rt.value)?Me(Rt.value,at):at.includes(Rt.value));if(console.log("GSCFieldDataByZones - matching options in editFiltersJSON:",gt),gt.length>0){const Rt=gt[0];console.log("GSCFieldDataByZones - found matching option in editFiltersJSON:",Rt),v.dynamicFilters[Dt]={...v.dynamicFilters[Dt],selectedValue:Rt.value,selectedOptions:[Rt]},console.log("GSCFieldDataByZones - updated editFiltersJSON with matching option value:",Rt.value)}console.log("GSCFieldDataByZones - updated analysis type filter with filterMultiple.categoryIds:",at)}}if(ye.view.filterMultiple.isHomeTeam!==void 0&&v){console.log("GSCFieldDataByZones - found isHomeTeam in filterMultiple:",ye.view.filterMultiple.isHomeTeam),console.log("GSCFieldDataByZones - isHomeTeam type:",typeof ye.view.filterMultiple.isHomeTeam);const Dt=v.dynamicFilters.findIndex(at=>at.filterType==="radio-button");if(Dt!==-1){console.log("GSCFieldDataByZones - found team filter at index:",Dt);const at=ye.view.filterMultiple.isHomeTeam;let Ze,ct;typeof at=="boolean"?(Ze=at?1:2,ct=at?"Mi equipo":"Rival",console.log("GSCFieldDataByZones - converted boolean isHomeTeam to teamValue:",at,"->",Ze,"label:",ct)):typeof at=="number"?(Ze=at===1?1:2,ct=at===1?"Mi equipo":"Rival",console.log("GSCFieldDataByZones - converted numeric isHomeTeam to teamValue:",at,"->",Ze,"label:",ct)):(Ze=1,ct="Mi equipo",console.log("GSCFieldDataByZones - using default teamValue:",Ze,"label:",ct)),v.dynamicFilters[Dt]={...v.dynamicFilters[Dt],selectedOption:{value:Ze,label:ct}},console.log("GSCFieldDataByZones - updated team filter with isHomeTeam:",at,"teamValue:",Ze,"teamLabel:",ct),console.log("GSCFieldDataByZones - updated team filter structure:",v.dynamicFilters[Dt]),console.log("GSCFieldDataByZones - updated team filter with filterMultiple.isHomeTeam:",ye.view.filterMultiple.isHomeTeam)}}}if(b&&b.viewId===6&&(pt=ye.view)!=null&&pt.filterMultiple&&(console.log("GSCLineupsReports detected - checking filterMultiple:",ye.view.filterMultiple),ye.view.filterMultiple.gameNumber&&v)){console.log("GSCLineupsReports - found gameNumber in filterMultiple:",ye.view.filterMultiple.gameNumber);const Dt=v.dynamicFilters.findIndex(at=>at.filterType==="select-simple"&&at.filterLabel==="Número de juego");Dt!==-1&&(console.log("GSCLineupsReports - found game number filter at index:",Dt),v.dynamicFilters[Dt]={...v.dynamicFilters[Dt],selectedValue:ye.view.filterMultiple.gameNumber,selectedOptions:[{value:ye.view.filterMultiple.gameNumber,label:`Juego ${ye.view.filterMultiple.gameNumber}`}]},console.log("GSCLineupsReports - updated filter with single value:",ye.view.filterMultiple.gameNumber),console.log("GSCLineupsReports - updated filter structure:",v.dynamicFilters[Dt]),console.log("GSCLineupsReports - updated game number filter with filterMultiple.gameNumber:",ye.view.filterMultiple.gameNumber))}if(b&&b.viewId===7&&ye.view&&v){if(console.log("GSCGoalData detected - checking stored values:",ye.view),(vt=ye.view.componentProps)!=null&&vt.analysisType){console.log("GSCGoalData - found analysisType in componentProps:",ye.view.componentProps.analysisType);const Dt=v.dynamicFilters.findIndex((at,Ze)=>at.filterType==="radio-button"&&Ze===0);if(Dt!==-1){console.log("GSCGoalData - found analysis type filter at index:",Dt);const at=ye.view.componentProps.analysisType,Ze=at==="offensive"?1:2,ct=at==="offensive"?"A favor":"En contra";v.dynamicFilters[Dt]={...v.dynamicFilters[Dt],selectedOption:{value:Ze,label:ct}},console.log("GSCGoalData - updated analysis filter with value:",Ze,"analysisType:",at),console.log("GSCGoalData - updated analysis filter structure:",v.dynamicFilters[Dt])}}if(((ft=ye.view.filterMultiple)==null?void 0:ft.isHomeTeam)!==void 0){console.log("GSCGoalData - found isHomeTeam in filterMultiple:",ye.view.filterMultiple.isHomeTeam);const Dt=v.dynamicFilters.findIndex(at=>at.filterType==="radio-button"&&at.filterLabel==="Equipo");if(Dt!==-1){console.log("GSCGoalData - found team filter at index:",Dt);const at=ye.view.filterMultiple.isHomeTeam,Ze=at?1:2,ct=at?"Equipo propio":"Equipo rival";v.dynamicFilters[Dt]={...v.dynamicFilters[Dt],selectedOption:{value:Ze,label:ct}},console.log("GSCGoalData - updated filter with team value:",Ze,"isHomeTeam:",at),console.log("GSCGoalData - updated filter structure:",v.dynamicFilters[Dt]),console.log("GSCGoalData - updated team filter with filterMultiple.isHomeTeam:",at)}}}if(b&&b.viewId===5&&(Nt=ye.view)!=null&&Nt.filterMultiple&&(console.log("GSCVolumetricField detected - checking filterMultiple:",ye.view.filterMultiple),ye.view.filterMultiple.isHomeTeam!==void 0&&v)){console.log("GSCVolumetricField - found isHomeTeam in filterMultiple:",ye.view.filterMultiple.isHomeTeam),console.log("GSCVolumetricField - editFiltersJSON.dynamicFilters:",v.dynamicFilters),console.log("GSCVolumetricField - searching for team filter in editFiltersJSON");const Dt=v.dynamicFilters.findIndex(at=>at.filterType==="radio-button"&&at.filterLabel==="Equipo");if(console.log("GSCVolumetricField - teamFilterIndex:",Dt),console.log("GSCVolumetricField - all filters in editFiltersJSON:",v.dynamicFilters.map((at,Ze)=>({index:Ze,filterType:at.filterType,filterLabel:at.filterLabel}))),Dt!==-1){console.log("GSCVolumetricField - found team filter at index:",Dt);const at=ye.view.filterMultiple.isHomeTeam;console.log("GSCVolumetricField - isHomeTeam type in editFiltersJSON:",typeof at,"value:",at);let Ze,ct;typeof at=="boolean"?(Ze=at?1:2,ct=at?"Equipo propio":"Equipo rival",console.log("GSCVolumetricField - isHomeTeam is boolean in editFiltersJSON, converting:",at,"-> teamValue:",Ze,"teamLabel:",ct)):typeof at=="number"?(Ze=at===1?1:2,ct=at===1?"Equipo propio":"Equipo rival",console.log("GSCVolumetricField - isHomeTeam is number in editFiltersJSON, using directly:",at,"-> teamValue:",Ze,"teamLabel:",ct)):(Ze=1,ct="Equipo propio",console.log("GSCVolumetricField - isHomeTeam is unknown type in editFiltersJSON, using default:",Ze,"teamLabel:",ct)),v.dynamicFilters[Dt]={...v.dynamicFilters[Dt],selectedOption:{value:Ze,label:ct}},console.log("GSCVolumetricField - updated filter with team value:",Ze,"isHomeTeam:",at),console.log("GSCVolumetricField - updated filter structure:",v.dynamicFilters[Dt]),console.log("GSCVolumetricField - updated team filter with filterMultiple.isHomeTeam:",at)}else{console.log("GSCVolumetricField - team filter not found in editFiltersJSON, trying fallback");const at=v.dynamicFilters.findIndex(Ze=>Ze.filterType==="radio-button");if(at!==-1){console.log("GSCVolumetricField - found radio-button filter at index:",at);const Ze=ye.view.filterMultiple.isHomeTeam;console.log("GSCVolumetricField - isHomeTeam type in editFiltersJSON fallback:",typeof Ze,"value:",Ze);let ct,gt;typeof Ze=="boolean"?(ct=Ze?1:2,gt=Ze?"Equipo propio":"Equipo rival",console.log("GSCVolumetricField - isHomeTeam is boolean in editFiltersJSON fallback, converting:",Ze,"-> teamValue:",ct,"teamLabel:",gt)):typeof Ze=="number"?(ct=Ze===1?1:2,gt=Ze===1?"Equipo propio":"Equipo rival",console.log("GSCVolumetricField - isHomeTeam is number in editFiltersJSON fallback, using directly:",Ze,"-> teamValue:",ct,"teamLabel:",gt)):(ct=1,gt="Equipo propio",console.log("GSCVolumetricField - isHomeTeam is unknown type in editFiltersJSON fallback, using default:",ct,"teamLabel:",gt)),v.dynamicFilters[at]={...v.dynamicFilters[at],selectedOption:{value:ct,label:gt}},console.log("GSCVolumetricField - updated filter with team value (fallback):",ct,"isHomeTeam:",Ze),console.log("GSCVolumetricField - updated filter structure (fallback):",v.dynamicFilters[at])}else console.log("GSCVolumetricField - no radio-button filters found in editFiltersJSON at all!")}}console.log("Final editFiltersJSON:",v),v?ue(v):console.log("No editFiltersJSON found, cannot preselect filters"),t.value=!0});function Ae(){V.value=null}function Te(ye,ge){var ze;((ze=f.value)==null?void 0:ze.id)===2&&console.log("GSCtops - debugSelectSimple:",{idx:ye,optionValue:ge,optionValueType:typeof ge,dynamicFiltersValue:m.value[ye],dynamicFiltersValueType:typeof m.value[ye],isEqual:m.value[ye]===ge,isEqualLoose:m.value[ye]==ge})}function Me(ye,ge){if(!Array.isArray(ye)||!Array.isArray(ge)||ye.length!==ge.length)return!1;const ze=[...ye].sort((Ve,Ge)=>Ve-Ge),Ie=[...ge].sort((Ve,Ge)=>Ve-Ge);return JSON.stringify(ze)===JSON.stringify(Ie)}function Le(){var ye;if(u.value&&v&&v.dynamicFilters){if(console.log("Forcing checkbox and select filter update from editFiltersJSON"),((ye=f.value)==null?void 0:ye.id)===8&&(console.log("FieldPosesion - forceCheckboxUpdate called"),console.log("FieldPosesion - viewToEdit:",e),console.log("FieldPosesion - editFiltersJSON:",v)),p.value){console.log("Skipping forceCheckboxUpdate - already in force update");return}if(y.value)return;p.value=!0,x.value=!0,v.dynamicFilters.forEach((ge,ze)=>{var Ie,Ve,Ge;if(ge&&(Ie=T.value)!=null&&Ie[ze]){const Ke=T.value[ze];if(Ke.type==="check"&&ge.isChecked!==void 0)console.log(`Forcing checkbox ${ze} to:`,ge.isChecked),m.value[ze]=ge.isChecked,((Ve=f.value)==null?void 0:Ve.id)===8&&console.log("FieldPosesion - Checkbox filter updated:",{index:ze,value:ge.isChecked,componentId:(Ge=e==null?void 0:e.view)==null?void 0:Ge.id});else if(Ke.type==="select"&&ge.selectedOptions){const ke=ge.selectedOptions.map(Be=>Be.value);console.log(`Forcing select filter ${ze} to:`,ke),m.value[ze]=ke}else Ke.type==="select"&&ge.selectedValue&&Array.isArray(ge.selectedValue)&&(console.log(`Forcing select filter ${ze} to:`,ge.selectedValue),m.value[ze]=ge.selectedValue)}}),h.nextTick(()=>{x.value=!1,p.value=!1})}}function Pe(){var ye;if(u.value&&v&&v.dynamicFilters&&((ye=f.value)==null?void 0:ye.id)===4){if(console.log("Preselecting Timeline filters specifically"),p.value){console.log("Skipping preselectTimelineFilters - already in force update");return}if(y.value)return;p.value=!0,x.value=!0,v.dynamicFilters.forEach((ge,ze)=>{var Ie,Ve;if(ge&&((Ve=(Ie=T.value)==null?void 0:Ie[ze])==null?void 0:Ve.type)==="select"){if(ge.selectedOptions){const Ge=ge.selectedOptions.map(Ke=>Ke.value);console.log(`Preselecting Timeline select filter ${ze} to:`,Ge),m.value[ze]=Ge}else if(ge.selectedValue&&Array.isArray(ge.selectedValue))if(ge.selectedValue.length>0&&ge.selectedValue[0]&&typeof ge.selectedValue[0]=="object"){const Ge=We(ge.selectedValue);console.log(`Preselecting Timeline select filter ${ze} to:`,Ge),m.value[ze]=Ge}else console.log(`Preselecting Timeline select filter ${ze} to:`,ge.selectedValue),m.value[ze]=ge.selectedValue}}),setTimeout(()=>{console.log("Forcing UI update after preselecting Timeline filters"),m.value=[...m.value]},200),h.nextTick(()=>{x.value=!1,p.value=!1})}}function We(ye){return!Array.isArray(ye)||ye.length===0?[]:ye.map(ge=>{if(ge&&typeof ge=="object"){if(ge.event_type_id&&ge.category_id)return`${ge.category_id}-${ge.event_type_id}`;if(ge.event_type_id)return ge.event_type_id.toString();if(ge.category_id)return ge.category_id.toString()}return ge})}function Re(){var ye,ge,ze,Ie,Ve,Ge,Ke,ke,Be,Fe,He,rt,nt,pt;if(u.value&&v&&v.dynamicFilters&&T.value){if(console.log("Force updating select filters immediately"),p.value){console.log("Skipping forceSelectFilterUpdate - already in force update");return}if(y.value)return;if(p.value=!0,x.value=!0,v.dynamicFilters.forEach((vt,ft)=>{var Nt,Ft,Dt,at,Ze,ct,gt,Rt,Ct,tt,st;if(vt&&((Nt=T.value[ft])==null?void 0:Nt.type)==="select"){if(vt.selectedOptions){const Je=vt.selectedOptions.map(lt=>lt.value);console.log(`Force setting select filter ${ft} to:`,Je),m.value[ft]=Je}else if(vt.selectedValue&&Array.isArray(vt.selectedValue))if(vt.selectedValue.length>0&&vt.selectedValue[0]&&typeof vt.selectedValue[0]=="object"){const Je=We(vt.selectedValue);console.log(`Force setting Timeline select filter ${ft} to:`,Je),m.value[ft]=Je}else console.log(`Force setting select filter ${ft} to:`,vt.selectedValue),m.value[ft]=vt.selectedValue}else if(vt&&((Ft=T.value[ft])==null?void 0:Ft.type)==="select-simple"&&vt.selectedValue!==void 0){console.log(`Force setting select-simple filter ${ft} to:`,vt.selectedValue),console.log("forceSelectFilterUpdate - selectedValue type:",typeof vt.selectedValue),console.log("forceSelectFilterUpdate - selectedValue is array:",Array.isArray(vt.selectedValue));let Je;((Dt=f.value)==null?void 0:Dt.id)===2&&(Ze=(at=e==null?void 0:e.view)==null?void 0:at.filterMultiple)!=null&&Ze.categoryId?(Je=e.view.filterMultiple.categoryId,console.log("GSCtops - using filterMultiple.categoryId in forceSelectFilterUpdate:",Je)):((ct=f.value)==null?void 0:ct.id)===1&&(Rt=(gt=e==null?void 0:e.view)==null?void 0:gt.filterMultiple)!=null&&Rt.category?(Je=e.view.filterMultiple.category,console.log("GSCComparativeReports - using filterMultiple.category in forceSelectFilterUpdate:",Je)):((Ct=f.value)==null?void 0:Ct.id)===6&&(st=(tt=e==null?void 0:e.view)==null?void 0:tt.filterMultiple)!=null&&st.gameNumber?(Je=e.view.filterMultiple.gameNumber,console.log("GSCLineupsReports - using filterMultiple.gameNumber in forceSelectFilterUpdate:",Je)):Je=Array.isArray(vt.selectedValue)?vt.selectedValue[0]:vt.selectedValue,m.value[ft]=Je,console.log(`Force setting select-simple filter ${ft} to:`,Je)}}),((ye=f.value)==null?void 0:ye.id)===4&&setTimeout(()=>{console.log("Forcing UI update for Timeline filters"),m.value=[...m.value]},100),((ge=f.value)==null?void 0:ge.id)===2&&(ze=e==null?void 0:e.view)!=null&&ze.filterMultiple){if(console.log("GSCtops - checking filterMultiple in forceSelectFilterUpdate:",e.view.filterMultiple),console.log("GSCtops - currentFilters in forceSelectFilterUpdate:",T.value),e.view.filterMultiple.categoryId){console.log("GSCtops - found categoryId in filterMultiple:",e.view.filterMultiple.categoryId);const vt=T.value.findIndex(ft=>ft.type==="select-simple"&&ft.label==="Tipo de análisis");if(console.log("GSCtops - categoryFilterIndex in forceSelectFilterUpdate:",vt),console.log("GSCtops - all filters in forceSelectFilterUpdate:",T.value.map((ft,Nt)=>({index:Nt,type:ft.type,label:ft.label}))),vt!==-1){console.log("GSCtops - found category filter at index:",vt);const ft=e.view.filterMultiple.categoryId;if(console.log("GSCtops - setting category filter directly from filterMultiple.categoryId in forceSelectFilterUpdate:",ft),m.value[0]=ft,e.view.componentProps&&ft){let Ft=`Category ${ft}`,Dt=null;try{Dt=Vd(ft),Dt&&(Ft=Dt.name,console.log("GSCtops - found category info from getCategoryById in forceSelectFilterUpdate:",Dt))}catch{console.log("GSCtops - getCategoryById failed in forceSelectFilterUpdate, using filter options");const at=T.value.findIndex(Ze=>Ze.type==="select-simple"&&Ze.label==="Tipo de análisis");if(at!==-1){const Ze=(((Ie=T.value[at])==null?void 0:Ie.options)||[]).find(ct=>ct.value==ft);Ze&&(Ft=Ze.label,console.log("GSCtops - found category name from options in forceSelectFilterUpdate:",Ft))}}e.view.componentProps.categoryView=[{id:ft,name:Ft}],console.log("GSCtops - updated componentProps.categoryView in forceSelectFilterUpdate:",e.view.componentProps.categoryView)}console.log("GSCtops - automatically set category filter to:",ft),console.log("GSCtops - categoryId type:",typeof ft),console.log("GSCtops - updated dynamicFilters:",m.value),console.log("GSCtops - filter options:",(Ve=T.value[vt])==null?void 0:Ve.options);const Nt=(((Ge=T.value[vt])==null?void 0:Ge.options)||[]).find(Ft=>Ft.value==ft);console.log("GSCtops - matching option:",Nt),h.nextTick(()=>{m.value=[...m.value],console.log("GSCtops - forced reactivity update in forceSelectFilterUpdate")})}else console.log("GSCtops - category filter not found in forceSelectFilterUpdate!")}if(e.view.filterMultiple.teamType!==void 0){console.log("GSCtops - found teamType in filterMultiple in forceSelectFilterUpdate:",e.view.filterMultiple.teamType);const vt=T.value.findIndex(ft=>ft.type==="radio-button");if(console.log("GSCtops - teamFilterIndex in forceSelectFilterUpdate:",vt),console.log("GSCtops - all filters in forceSelectFilterUpdate:",T.value.map((ft,Nt)=>({index:Nt,type:ft.type,label:ft.label}))),vt!==-1){console.log("GSCtops - found team filter at index in forceSelectFilterUpdate:",vt);const ft=e.view.filterMultiple.teamType;console.log("GSCtops - setting team filter directly from filterMultiple.teamType in forceSelectFilterUpdate:",ft),m.value[vt]=ft,console.log("GSCtops - automatically set team filter to in forceSelectFilterUpdate:",ft),console.log("GSCtops - teamType type in forceSelectFilterUpdate:",typeof ft),console.log("GSCtops - updated dynamicFilters in forceSelectFilterUpdate:",m.value),console.log("GSCtops - filter options in forceSelectFilterUpdate:",(Ke=T.value[vt])==null?void 0:Ke.options);const Nt=(((ke=T.value[vt])==null?void 0:ke.options)||[]).find(Ft=>Ft.value==ft);console.log("GSCtops - matching option for team in forceSelectFilterUpdate:",Nt),h.nextTick(()=>{m.value=[...m.value],console.log("GSCtops - forced reactivity update for team filter in forceSelectFilterUpdate")})}else console.log("GSCtops - team filter not found in forceSelectFilterUpdate!")}}if(((Be=f.value)==null?void 0:Be.id)===1&&(Fe=e==null?void 0:e.view)!=null&&Fe.filterMultiple&&(console.log("GSCComparativeReports - checking filterMultiple in forceSelectFilterUpdate:",e.view.filterMultiple),console.log("GSCComparativeReports - currentFilters in forceSelectFilterUpdate:",T.value),e.view.filterMultiple.category)){console.log("GSCComparativeReports - found category in filterMultiple:",e.view.filterMultiple.category);const vt=T.value.findIndex(ft=>ft.type==="select-simple"&&ft.label==="Tipo de análisis");if(console.log("GSCComparativeReports - analysisTypeFilterIndex in forceSelectFilterUpdate:",vt),console.log("GSCComparativeReports - all filters in forceSelectFilterUpdate:",T.value.map((ft,Nt)=>({index:Nt,type:ft.type,label:ft.label}))),vt!==-1){console.log("GSCComparativeReports - found analysis type filter at index:",vt);const ft=e.view.filterMultiple.category;console.log("GSCComparativeReports - setting analysis type filter directly from filterMultiple.category in forceSelectFilterUpdate:",ft),m.value[0]=ft,e.view.componentProps&&ft&&(e.view.componentProps.type=ft,console.log("GSCComparativeReports - updated componentProps.type in forceSelectFilterUpdate:",e.view.componentProps.type)),h.nextTick(()=>{m.value=[...m.value],console.log("GSCComparativeReports - forced reactivity update in forceSelectFilterUpdate")})}else console.log("GSCComparativeReports - analysis type filter not found in forceSelectFilterUpdate!")}if(((He=f.value)==null?void 0:He.id)===6&&(rt=e==null?void 0:e.view)!=null&&rt.filterMultiple&&(console.log("GSCLineupsReports - checking filterMultiple in forceSelectFilterUpdate:",e.view.filterMultiple),console.log("GSCLineupsReports - currentFilters in forceSelectFilterUpdate:",T.value),e.view.filterMultiple.gameNumber)){console.log("GSCLineupsReports - found gameNumber in filterMultiple:",e.view.filterMultiple.gameNumber);const vt=T.value.findIndex(ft=>ft.type==="select-simple"&&ft.label==="Número de juego");if(console.log("GSCLineupsReports - gameNumberFilterIndex in forceSelectFilterUpdate:",vt),console.log("GSCLineupsReports - all filters in forceSelectFilterUpdate:",T.value.map((ft,Nt)=>({index:Nt,type:ft.type,label:ft.label}))),vt!==-1){console.log("GSCLineupsReports - found game number filter at index:",vt);const ft=e.view.filterMultiple.gameNumber;console.log("GSCLineupsReports - setting game number filter directly from filterMultiple.gameNumber in forceSelectFilterUpdate:",ft),m.value[0]=ft,e.view.componentProps&&ft&&(e.view.componentProps.gameNumber=ft,console.log("GSCLineupsReports - updated componentProps.gameNumber in forceSelectFilterUpdate:",e.view.componentProps.gameNumber)),h.nextTick(()=>{m.value=[...m.value],console.log("GSCLineupsReports - forced reactivity update in forceSelectFilterUpdate")})}else console.log("GSCLineupsReports - game number filter not found in forceSelectFilterUpdate!")}if(((nt=f.value)==null?void 0:nt.id)===5&&(pt=e==null?void 0:e.view)!=null&&pt.filterMultiple&&(console.log("GSCVolumetricField - checking filterMultiple in forceSelectFilterUpdate:",e.view.filterMultiple),console.log("GSCVolumetricField - currentFilters in forceSelectFilterUpdate:",T.value),e.view.filterMultiple.isHomeTeam!==void 0)){console.log("GSCVolumetricField - found isHomeTeam in filterMultiple:",e.view.filterMultiple.isHomeTeam),console.log('GSCVolumetricField - searching for team filter with label "Equipo"'),console.log("GSCVolumetricField - all filters details:",T.value.map((ft,Nt)=>({index:Nt,type:ft.type,label:ft.label,options:ft.options})));const vt=T.value.findIndex(ft=>ft.type==="radio-button"&&ft.label==="Equipo");if(console.log("GSCVolumetricField - teamFilterIndex in forceSelectFilterUpdate:",vt),console.log("GSCVolumetricField - all filters in forceSelectFilterUpdate:",T.value.map((ft,Nt)=>({index:Nt,type:ft.type,label:ft.label}))),vt!==-1){console.log("GSCVolumetricField - found team filter at index:",vt);const ft=e.view.filterMultiple.isHomeTeam;console.log("GSCVolumetricField - isHomeTeam type:",typeof ft,"value:",ft);let Nt;typeof ft=="boolean"?(Nt=ft?1:2,console.log("GSCVolumetricField - isHomeTeam is boolean, converting:",ft,"-> teamValue:",Nt)):typeof ft=="number"?(Nt=ft===1?1:2,console.log("GSCVolumetricField - isHomeTeam is number, using directly:",ft,"-> teamValue:",Nt)):(Nt=1,console.log("GSCVolumetricField - isHomeTeam is unknown type, using default:",Nt)),console.log("GSCVolumetricField - setting team filter directly from filterMultiple.isHomeTeam in forceSelectFilterUpdate:",Nt),m.value[0]=Nt,e.view.componentProps&&ft!==void 0&&(e.view.componentProps.isHomeTeamForAnalysis=ft===1,console.log("GSCVolumetricField - updated componentProps.isHomeTeamForAnalysis in forceSelectFilterUpdate:",e.view.componentProps.isHomeTeamForAnalysis)),h.nextTick(()=>{m.value=[...m.value],console.log("GSCVolumetricField - forced reactivity update in forceSelectFilterUpdate")})}else{console.log("GSCVolumetricField - team filter not found in forceSelectFilterUpdate!"),console.log("GSCVolumetricField - trying fallback: looking for any radio-button filter");const ft=T.value.findIndex(Nt=>Nt.type==="radio-button");if(ft!==-1){console.log("GSCVolumetricField - found radio-button filter at index:",ft);const Nt=e.view.filterMultiple.isHomeTeam;console.log("GSCVolumetricField - isHomeTeam type in fallback:",typeof Nt,"value:",Nt);let Ft;typeof Nt=="boolean"?(Ft=Nt?1:2,console.log("GSCVolumetricField - isHomeTeam is boolean in fallback, converting:",Nt,"-> teamValue:",Ft)):typeof Nt=="number"?(Ft=Nt===1?1:2,console.log("GSCVolumetricField - isHomeTeam is number in fallback, using directly:",Nt,"-> teamValue:",Ft)):(Ft=1,console.log("GSCVolumetricField - isHomeTeam is unknown type in fallback, using default:",Ft)),console.log("GSCVolumetricField - setting radio-button filter by fallback:",Ft),m.value[ft]=Ft,e.view.componentProps&&Nt!==void 0&&(e.view.componentProps.preMatchType=Nt,console.log("GSCVolumetricField - updated componentProps.preMatchType in fallback:",e.view.componentProps.preMatchType)),h.nextTick(()=>{m.value=[...m.value],console.log("GSCVolumetricField - forced reactivity update in fallback")})}else console.log("GSCVolumetricField - no radio-button filters found at all!")}}h.nextTick(()=>{x.value=!1,p.value=!1})}}function je(){if(console.log("FUNCION: forceRadioFilterUpdate"),p.value){console.log("Skipping forceRadioFilterUpdate - already in force update");return}if(u.value&&v&&v.dynamicFilters&&T.value){if(console.log("1"),y.value)return;p.value=!0,x.value=!0,v.dynamicFilters.forEach((ye,ge)=>{var ze,Ie;if(ye&&((ze=T.value[ge])==null?void 0:ze.type)==="radio-button"&&(console.log("2"),ye.selectedOption&&ye.selectedOption.value!==void 0)){console.log("3"),console.log("filterData: ----------------->",ye),console.log("editFiltersJSON: ",v),console.log(`Force setting radio filter ${ge} to:`,ye.selectedOption.value);const Ve=ye.selectedOption.value;m.value[ge]=Ve,console.log(`Radio filter ${ge} set to:`,Ve,"Type:",typeof Ve),((Ie=f.value)==null?void 0:Ie.id)===8&&(console.log("FieldPosesion - Radio filter updated to:",ye.selectedOption.value),console.log("FieldPosesion - Current dynamicFilters after update:",m.value))}}),h.nextTick(()=>{x.value=!1,p.value=!1})}}function Ne(){var ye,ge,ze,Ie,Ve,Ge,Ke,ke,Be,Fe,He,rt,nt,pt,vt,ft,Nt,Ft,Dt,at,Ze,ct,gt,Rt,Ct,tt,st,Je,lt,Tt,yt,It,Lt,Qe,et,wt,zt,Ot,St,Jt,qt,Ht,Wt,Gt,rr,nr,Sr,Ar,wr,ar,vr,Wr;if(console.log("updateContainerOnUserChange function called"),console.log("filterAndViewsContainer:",b),console.log("isEditMode.value:",u.value),console.log("viewToEdit:",e),b&&u.value&&e){if(console.log("User made changes, updating container for specific component"),console.log("Current dynamicFilters:",m.value),console.log("Component ID:",(ye=e.view)==null?void 0:ye.id),console.log("Selected component ID:",(ge=f.value)==null?void 0:ge.id),y.value){console.log("Skipping container update due to container update in progress");return}if(x.value=!0,((ze=f.value)==null?void 0:ze.id)===4)b.setDynamicFilters(m.value,(Ie=e.view)==null?void 0:Ie.id),b.updateDynamicFilters(m.value,(Ve=e.view)==null?void 0:Ve.id),console.log("Timeline - updated specific filters for component:",(Ge=e.view)==null?void 0:Ge.id);else if(((Ke=f.value)==null?void 0:Ke.id)===8)b.setDynamicFilters(m.value,(ke=e.view)==null?void 0:ke.id),b.updateDynamicFilters(m.value,(Be=e.view)==null?void 0:Be.id),console.log("FieldPosesion - updated specific filters for component:",(Fe=e.view)==null?void 0:Fe.id);else if(((He=f.value)==null?void 0:He.id)===3)b.setDynamicFilters(m.value,(rt=e.view)==null?void 0:rt.id),b.updateDynamicFilters(m.value,(nt=e.view)==null?void 0:nt.id),console.log("GSCMatchSummary - updated specific filters for component:",(pt=e.view)==null?void 0:pt.id);else if(((vt=f.value)==null?void 0:vt.id)===2){console.log("GSCtops - updateContainerOnUserChange - starting GSCtops logic"),console.log("GSCtops - current dynamicFilters:",m.value),console.log("GSCtops - currentFilters:",T.value),b.setDynamicFilters(m.value,(ft=e.view)==null?void 0:ft.id),b.updateDynamicFilters(m.value,(Nt=e.view)==null?void 0:Nt.id);const xr=m.value[0];if(console.log("GSCtops - newCategoryId from dynamicFilters[0]:",xr),xr!==void 0){e.view.filterMultiple||(e.view.filterMultiple={},console.log("GSCtops - created new filterMultiple object"));const Er=e.view.filterMultiple.categoryId;if(e.view.filterMultiple.categoryId=xr,console.log("GSCtops - updated filterMultiple.categoryId from",Er,"to:",xr),console.log("GSCtops - updated component filterMultiple:",e.view.filterMultiple),e.view.componentProps){let dr=`Category ${xr}`,kr=null;try{kr=Vd(xr),kr&&(dr=kr.name,console.log("GSCtops - found category info from getCategoryById:",kr))}catch{console.log("GSCtops - getCategoryById failed, using filter options");const Hr=T.value.findIndex(zr=>zr.type==="select-simple"&&zr.label==="Tipo de análisis");if(Hr!==-1){const zr=(((Ft=T.value[Hr])==null?void 0:Ft.options)||[]).find(tn=>tn.value==xr);zr&&(dr=zr.label,console.log("GSCtops - found category name from options:",dr))}}e.view.componentProps.categoryView=[{id:xr,name:dr}],console.log("GSCtops - updated componentProps.categoryView:",e.view.componentProps.categoryView),xi.emit("force-component-update",{itemId:e.view.id,componentProps:e.view.componentProps,filterMultiple:e.view.filterMultiple}),console.log("GSCtops - emitted force-component-update event")}}else console.log("GSCtops - newCategoryId is undefined!");const fr=m.value[1];if(console.log("GSCtops - newTeamType from dynamicFilters[1]:",fr),fr!==void 0){e.view.filterMultiple||(e.view.filterMultiple={},console.log("GSCtops - created new filterMultiple object for teamType"));const Er=e.view.filterMultiple.teamType;e.view.filterMultiple.teamType=fr,console.log("GSCtops - updated filterMultiple.teamType from",Er,"to:",fr),console.log("GSCtops - updated component filterMultiple:",e.view.filterMultiple),e.view.componentProps&&e.view.componentProps.game&&(fr===1?e.view.componentProps.teamView=e.view.componentProps.game.homeTeam.team_id:fr===2?e.view.componentProps.teamView=e.view.componentProps.game.awayTeam.team_id:e.view.componentProps.teamView=0,console.log("GSCtops - updated componentProps.teamView:",e.view.componentProps.teamView)),xi.emit("force-component-update",{itemId:e.view.id,componentProps:e.view.componentProps,filterMultiple:e.view.filterMultiple}),console.log("GSCtops - emitted force-component-update event for teamType")}else console.log("GSCtops - newTeamType is undefined!");console.log("GSCtops - updated specific filters for component:",(Dt=e.view)==null?void 0:Dt.id)}else if(((at=f.value)==null?void 0:at.id)===1){console.log("GSCComparativeReports - updateContainerOnUserChange - starting GSCComparativeReports logic"),console.log("GSCComparativeReports - current dynamicFilters:",m.value),console.log("GSCComparativeReports - currentFilters:",T.value),b.setDynamicFilters(m.value,(Ze=e.view)==null?void 0:Ze.id),b.updateDynamicFilters(m.value,(ct=e.view)==null?void 0:ct.id);const xr=m.value[0];if(console.log("GSCComparativeReports - newCategory from dynamicFilters[0]:",xr),xr!==void 0){e.view.filterMultiple||(e.view.filterMultiple={},console.log("GSCComparativeReports - created new filterMultiple object"));const fr=e.view.filterMultiple.category;e.view.filterMultiple.category=xr,console.log("GSCComparativeReports - updated filterMultiple.category from",fr,"to:",xr),console.log("GSCComparativeReports - updated component filterMultiple:",e.view.filterMultiple),e.view.componentProps&&(e.view.componentProps.type=xr,console.log("GSCComparativeReports - updated componentProps.type:",e.view.componentProps.type)),xi.emit("force-component-update",{itemId:e.view.id,componentProps:e.view.componentProps,filterMultiple:e.view.filterMultiple}),console.log("GSCComparativeReports - emitted force-component-update event")}else console.log("GSCComparativeReports - newCategory is undefined!");console.log("GSCComparativeReports - updated specific filters for component:",(gt=e.view)==null?void 0:gt.id)}else if(((Rt=f.value)==null?void 0:Rt.id)===6){console.log("GSCLineupsReports - updateContainerOnUserChange - starting GSCLineupsReports logic"),console.log("GSCLineupsReports - current dynamicFilters:",m.value),console.log("GSCLineupsReports - currentFilters:",T.value),console.log("GSCLineupsReports - viewToEdit:",e),console.log("GSCLineupsReports - filterAndViewsContainer:",b),b.setDynamicFilters(m.value,(Ct=e.view)==null?void 0:Ct.id),b.updateDynamicFilters(m.value,(tt=e.view)==null?void 0:tt.id);const xr=m.value[0];if(console.log("GSCLineupsReports - newGameNumber from dynamicFilters[0]:",xr),xr!==void 0){e.view.filterMultiple||(e.view.filterMultiple={},console.log("GSCLineupsReports - created new filterMultiple object"));const fr=e.view.filterMultiple.gameNumber;e.view.filterMultiple.gameNumber=xr,console.log("GSCLineupsReports - updated filterMultiple.gameNumber from",fr,"to:",xr),console.log("GSCLineupsReports - updated component filterMultiple:",e.view.filterMultiple),e.view.componentProps&&(e.view.componentProps.gameNumber=xr,console.log("GSCLineupsReports - updated componentProps.gameNumber:",e.view.componentProps.gameNumber),e.view._updateKey,e.view._updateKey=Date.now(),console.log("GSCLineupsReports - updated _updateKey:",e.view._updateKey)),xi.emit("force-component-update",{itemId:e.view.id,componentProps:e.view.componentProps,filterMultiple:e.view.filterMultiple}),console.log("GSCLineupsReports - emitted force-component-update event"),xi.emit("dynamic-filters-changed",{containerViewId:(st=f.value)==null?void 0:st.id,viewId:e.view.id,dynamicFilters:m.value}),console.log("GSCLineupsReports - emitted dynamic-filters-changed event"),xi.emit("component-props-updated",{viewId:e.view.id,componentProps:e.view.componentProps,dynamicFilters:m.value}),console.log("GSCLineupsReports - emitted component-props-updated event"),h.nextTick(()=>{console.log("GSCLineupsReports - forcing reactivity update"),e.view.componentProps&&(e.view.componentProps={...e.view.componentProps})})}else console.log("GSCLineupsReports - newGameNumber is undefined!");console.log("GSCLineupsReports - updated specific filters for component:",(Je=e.view)==null?void 0:Je.id)}else if(((lt=f.value)==null?void 0:lt.id)===7){console.log("GSCGoalData - updateContainerOnUserChange - starting GSCGoalData logic"),console.log("GSCGoalData - current dynamicFilters:",m.value),console.log("GSCGoalData - currentFilters:",T.value),console.log("GSCGoalData - viewToEdit:",e),console.log("GSCGoalData - filterAndViewsContainer:",b),b.setDynamicFilters(m.value,(Tt=e.view)==null?void 0:Tt.id),b.updateDynamicFilters(m.value,(yt=e.view)==null?void 0:yt.id);const xr=m.value[0],fr=m.value[1];if(console.log("GSCGoalData - newAnalysisValue from dynamicFilters[0]:",xr),console.log("GSCGoalData - newTeamValue from dynamicFilters[1]:",fr),xr!==void 0&&e.view.componentProps){const Er=xr===1?"offensive":"defensive";e.view.componentProps.analysisType=Er,console.log("GSCGoalData - updated componentProps.analysisType to:",Er)}if(fr!==void 0){e.view.filterMultiple||(e.view.filterMultiple={},console.log("GSCGoalData - created new filterMultiple object"));const Er=e.view.filterMultiple.isHomeTeam,dr=fr===1;e.view.filterMultiple.isHomeTeam=dr,console.log("GSCGoalData - updated filterMultiple.isHomeTeam from",Er,"to:",dr),console.log("GSCGoalData - updated component filterMultiple:",e.view.filterMultiple),e.view.componentProps&&(e.view.componentProps.isHomeTeamForAnalysis=dr,console.log("GSCGoalData - updated componentProps.isHomeTeamForAnalysis:",e.view.componentProps.isHomeTeamForAnalysis),e.view._updateKey,e.view._updateKey=Date.now(),console.log("GSCGoalData - updated _updateKey:",e.view._updateKey)),xi.emit("force-component-update",{itemId:e.view.id,componentProps:e.view.componentProps,filterMultiple:e.view.filterMultiple}),console.log("GSCGoalData - emitted force-component-update event"),xi.emit("dynamic-filters-changed",{containerViewId:(It=f.value)==null?void 0:It.id,viewId:e.view.id,dynamicFilters:m.value}),console.log("GSCGoalData - emitted dynamic-filters-changed event"),xi.emit("component-props-updated",{viewId:e.view.id,componentProps:e.view.componentProps,dynamicFilters:m.value}),console.log("GSCGoalData - emitted component-props-updated event"),h.nextTick(()=>{console.log("GSCGoalData - forcing reactivity update"),e.view.componentProps&&(e.view.componentProps={...e.view.componentProps})})}else console.log("GSCGoalData - newTeamValue is undefined!");console.log("GSCGoalData - updated specific filters for component:",(Lt=e.view)==null?void 0:Lt.id)}else if(((Qe=f.value)==null?void 0:Qe.id)===5){console.log("GSCVolumetricField - updateContainerOnUserChange - starting GSCVolumetricField logic"),console.log("GSCVolumetricField - current dynamicFilters:",m.value),console.log("GSCVolumetricField - currentFilters:",T.value),console.log("GSCVolumetricField - viewToEdit:",e),console.log("GSCVolumetricField - filterAndViewsContainer:",b),b.setDynamicFilters(m.value,(et=e.view)==null?void 0:et.id),b.updateDynamicFilters(m.value,(wt=e.view)==null?void 0:wt.id);const xr=m.value[0];if(console.log("GSCVolumetricField - newTeamValue from dynamicFilters[0]:",xr),xr!==void 0){e.view.filterMultiple||(e.view.filterMultiple={},console.log("GSCVolumetricField - created new filterMultiple object"));const fr=e.view.filterMultiple.isHomeTeam,Er=xr===1?1:2;e.view.filterMultiple.isHomeTeam=Er,console.log("GSCVolumetricField - updated filterMultiple.isHomeTeam from",fr,"to:",Er),console.log("GSCVolumetricField - updated component filterMultiple:",e.view.filterMultiple),e.view.componentProps&&(e.view.componentProps.isHomeTeamForAnalysis=Er===1,console.log("GSCVolumetricField - updated componentProps.isHomeTeamForAnalysis:",e.view.componentProps.isHomeTeamForAnalysis),e.view._updateKey,e.view._updateKey=Date.now(),console.log("GSCVolumetricField - updated _updateKey:",e.view._updateKey)),xi.emit("force-component-update",{itemId:e.view.id,componentProps:e.view.componentProps,filterMultiple:e.view.filterMultiple}),console.log("GSCVolumetricField - emitted force-component-update event"),xi.emit("dynamic-filters-changed",{containerViewId:(zt=f.value)==null?void 0:zt.id,viewId:e.view.id,dynamicFilters:m.value}),console.log("GSCVolumetricField - emitted dynamic-filters-changed event"),xi.emit("component-props-updated",{viewId:e.view.id,componentProps:e.view.componentProps,dynamicFilters:m.value}),console.log("GSCVolumetricField - emitted component-props-updated event"),h.nextTick(()=>{console.log("GSCVolumetricField - forcing reactivity update"),e.view.componentProps&&(e.view.componentProps={...e.view.componentProps})})}else console.log("GSCVolumetricField - newPreMatchType is undefined!");console.log("GSCVolumetricField - updated specific filters for component:",(Ot=e.view)==null?void 0:Ot.id)}else if(((St=f.value)==null?void 0:St.id)===9){console.log("GSCFieldDataByZones - updateContainerOnUserChange - starting GSCFieldDataByZones logic"),console.log("GSCFieldDataByZones - current dynamicFilters:",m.value),console.log("GSCFieldDataByZones - currentFilters:",T.value),console.log("GSCFieldDataByZones - viewToEdit:",e),console.log("GSCFieldDataByZones - filterAndViewsContainer:",b);const xr=m.value[1];console.log("GSCFieldDataByZones - current radio button value:",xr),b.setDynamicFilters(m.value,(Jt=e.view)==null?void 0:Jt.id),b.updateDynamicFilters(m.value,(qt=e.view)==null?void 0:qt.id),xi.emit("activate-save-button"),console.log("GSCFieldDataByZones - emitted activate-save-button event"),e.view.filterMultiple||(e.view.filterMultiple={},console.log("GSCFieldDataByZones - created new filterMultiple object"));const fr=m.value[0];if(console.log("GSCFieldDataByZones - newCategoryIds from dynamicFilters[0]:",fr),fr!==void 0){const dr=Array.isArray(fr)?fr:[fr];console.log("GSCFieldDataByZones - processing categoryIdsArray:",dr);const kr=e.view.filterMultiple.categoryIds;e.view.filterMultiple.categoryIds=dr,console.log("GSCFieldDataByZones - updated filterMultiple.categoryIds from",kr,"to:",dr);const Hr=(((Ht=T.value[0])==null?void 0:Ht.options)||[]).filter(zr=>Array.isArray(zr.value)?Me(zr.value,dr):dr.includes(zr.value));if(console.log("GSCFieldDataByZones - matching options for categories:",Hr),Hr.length>0){const zr=Hr[0];console.log("GSCFieldDataByZones - found matching option for categories:",zr);const tn=zr.value;if(console.log("GSCFieldDataByZones - using matching option value for categories:",tn),e.view.filterMultiple.categoryIds=Array.isArray(tn)?tn:[tn],console.log("GSCFieldDataByZones - updated filterMultiple.categoryIds with matching option value:",e.view.filterMultiple.categoryIds),e.view.componentProps){const Ur=Array.isArray(tn)?tn.join("-"):tn,en=Fd.get((Wt=f.value)==null?void 0:Wt.id);if(en&&en.analysisTypes){const nn=en.analysisTypes.get(Ur);nn&&(e.view.componentProps.analysisType=nn.analysisType,e.view.title=nn.title,console.log("GSCFieldDataByZones - updated componentProps.analysisType:",nn.analysisType),console.log("GSCFieldDataByZones - updated title:",nn.title))}}}}else console.log("GSCFieldDataByZones - newCategoryIds is undefined!");const Er=xr!==void 0?xr:m.value[1];if(console.log("GSCFieldDataByZones - newTeamValue (using current radio value):",Er),console.log("GSCFieldDataByZones - currentRadioValue:",xr),console.log("GSCFieldDataByZones - dynamicFilters[1]:",m.value[1]),Er!==void 0){const dr=e.view.filterMultiple.isHomeTeam;let kr;Er===1?(kr=!0,console.log("GSCFieldDataByZones - converted teamValue 1 to isHomeTeam true (Mi equipo)")):Er===2?(kr=!1,console.log("GSCFieldDataByZones - converted teamValue 2 to isHomeTeam false (Rival)")):(kr=!0,console.log("GSCFieldDataByZones - using default isHomeTeam true for unknown teamValue:",Er)),e.view.filterMultiple.isHomeTeam=kr,console.log("GSCFieldDataByZones - updated filterMultiple.isHomeTeam from",dr,"to:",kr),console.log("GSCFieldDataByZones - updated component filterMultiple:",e.view.filterMultiple),m.value[1]!==Er&&(m.value[1]=Er,console.log("GSCFieldDataByZones - synchronized dynamicFilters[1] with newTeamValue:",Er)),e.view.componentProps&&(e.view.componentProps.isHomeTeamForAnalysis=kr,console.log("GSCFieldDataByZones - updated componentProps.isHomeTeamForAnalysis:",e.view.componentProps.isHomeTeamForAnalysis))}else console.log("GSCFieldDataByZones - newTeamValue is undefined!");e.view._updateKey,e.view._updateKey=Date.now(),console.log("GSCFieldDataByZones - updated _updateKey:",e.view._updateKey),xi.emit("force-component-update",{itemId:e.view.id,componentProps:e.view.componentProps,filterMultiple:e.view.filterMultiple}),console.log("GSCFieldDataByZones - emitted force-component-update event"),xi.emit("dynamic-filters-changed",{containerViewId:(Gt=f.value)==null?void 0:Gt.id,viewId:e.view.id,dynamicFilters:m.value}),console.log("GSCFieldDataByZones - emitted dynamic-filters-changed event"),xi.emit("component-props-updated",{viewId:e.view.id,componentProps:e.view.componentProps,dynamicFilters:m.value}),console.log("GSCFieldDataByZones - emitted component-props-updated event"),h.nextTick(()=>{console.log("GSCFieldDataByZones - forcing reactivity update"),e.view.componentProps&&(e.view.componentProps={...e.view.componentProps})}),console.log("GSCFieldDataByZones - updated specific filters for component:",(rr=e.view)==null?void 0:rr.id),v&&v.dynamicFilters&&(v.dynamicFilters=m.value.map((dr,kr)=>{var Hr,zr;console.log("99999999 ==================================================, ",T.value[kr]),console.log("99999999 currentRadioValue",xr);const tn=T.value[kr];if(console.log("99999999 filter.options",tn.options),!tn)return{selectedValue:dr};let Ur=dr;return console.log("99999999 finalValue",tn.options),kr===1&&tn.type==="radio-button"&&xr!==void 0&&(Ur=xr,console.log("GSCFieldDataByZones - using current radio value in editFiltersJSON:",Ur)),console.log("99999999 finalValue 55555555",tn.options),{filterId:tn.id||`filter_${kr}`,filterType:tn.type,filterLabel:tn.label,selectedValue:Ur,selectedOptions:tn.type==="select"&&Array.isArray(Ur)&&Ur.length>0?Ur.map(en=>{var nn;const Cn=(nn=tn.options)==null?void 0:nn.find(Zn=>Zn.value===en);return{value:en,label:(Cn==null?void 0:Cn.label)||en}}):null,selectedOption:tn.type==="radio-button"&&Ur!=null?{value:Ur,label:((zr=(Hr=tn.options)==null?void 0:Hr.find(en=>en.value===Ur))==null?void 0:zr.label)||Ur}:null,isChecked:tn.type==="check"?Ur:null}}),console.log("GSCFieldDataByZones - updated editFiltersJSON with current radio value:",v.dynamicFilters))}else b.setDynamicFilters(m.value),b.updateDynamicFilters(m.value);((nr=f.value)==null?void 0:nr.id)===8&&console.log("FieldPosesion - Container updated with dynamicFilters:",m.value),((Sr=f.value)==null?void 0:Sr.id)===3&&console.log("GSCMatchSummary - Container updated with dynamicFilters:",m.value),((Ar=f.value)==null?void 0:Ar.id)===2&&console.log("GSCtops - Container updated with dynamicFilters:",m.value),((wr=f.value)==null?void 0:wr.id)===1&&console.log("GSCComparativeReports - Container updated with dynamicFilters:",m.value),((ar=f.value)==null?void 0:ar.id)===6&&console.log("GSCLineupsReports - Container updated with dynamicFilters:",m.value),((vr=f.value)==null?void 0:vr.id)===5&&console.log("GSCVolumetricField - Container updated with dynamicFilters:",m.value),((Wr=f.value)==null?void 0:Wr.id)===9&&console.log("GSCFieldDataByZones - Container updated with dynamicFilters:",m.value),h.nextTick(()=>{x.value=!1,console.log("updateContainerOnUserChange completed")})}else console.log("updateContainerOnUserChange - conditions not met"),console.log("filterAndViewsContainer exists:",!!b),console.log("isEditMode.value:",u.value),console.log("viewToEdit exists:",!!e)}function ve(){var ye,ge,ze;if(!v||!v.dynamicFilters||!T.value)return!1;for(let Ie=0;Ie<v.dynamicFilters.length;Ie++){const Ve=v.dynamicFilters[Ie],Ge=T.value[Ie],Ke=m.value[Ie];if(!(!Ve||!Ge)){if(Ge.type==="check"){if(Ve.isChecked!==Ke)return console.log(`Check filter ${Ie} needs update: saved=${Ve.isChecked}, current=${Ke}`),!0}else if(Ge.type==="radio-button"){if(((ye=Ve.selectedOption)==null?void 0:ye.value)!==Ke)return console.log(`Radio filter ${Ie} needs update: saved=${(ge=Ve.selectedOption)==null?void 0:ge.value}, current=${Ke}`),!0}else if(Ge.type==="select"){const ke=((ze=Ve.selectedOptions)==null?void 0:ze.map(Fe=>Fe.value))||Ve.selectedValue||[],Be=Array.isArray(Ke)?Ke:[];if(JSON.stringify(ke)!==JSON.stringify(Be))return console.log(`Select filter ${Ie} needs update: saved=${JSON.stringify(ke)}, current=${JSON.stringify(Be)}`),!0}}}return console.log("No force update needed - values already match"),!1}return(ye,ge)=>(h.openBlock(),h.createElementBlock("div",ece,[h.createElementVNode("button",tce,h.toDisplayString(u.value?"Editando visualización":"Nueva visualización"),1),h.createElementVNode("div",{class:h.normalizeClass(["custom-select main-select",{disabled:u.value}]),onClick:ne},[h.createElementVNode("div",rce,[h.createElementVNode("span",nce,[d.value?(h.openBlock(),h.createElementBlock("img",{key:0,src:q(d.value.name,!1),alt:"icono",class:"option-img"},null,8,ice)):(h.openBlock(),h.createElementBlock("img",ace))]),d.value?(h.openBlock(),h.createElementBlock("span",sce,h.toDisplayString(W()),1)):(h.openBlock(),h.createElementBlock("span",oce,"Tipo de vista")),h.createElementVNode("span",{class:h.normalizeClass(["arrow",{open:P.value}])},[...ge[4]||(ge[4]=[h.createElementVNode("svg",{width:"16",height:"14",viewBox:"0 0 16 14",fill:"none"},[h.createElementVNode("path",{d:"M3 5L8 10L13 5",stroke:"#AAB4BE","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],2)]),P.value?(h.openBlock(),h.createElementBlock("div",lce,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(n.value,(ze,Ie)=>(h.openBlock(),h.createElementBlock("div",{key:ze.id,class:h.normalizeClass(["option-card",{active:i.value===Ie}]),onClick:h.withModifiers(Ve=>re(Ie),["stop"])},[h.createElementVNode("div",uce,[h.createElementVNode("img",{src:q(ze.name,!1),"data-hover-src":q(ze.name,!0),alt:"icono",class:"option-img-34"},null,8,dce)]),h.createElementVNode("div",pce,[h.createElementVNode("div",hce,h.toDisplayString(ze.name),1),ze.description?(h.openBlock(),h.createElementBlock("div",fce,h.toDisplayString(ze.description),1)):h.createCommentVNode("",!0)])],10,cce))),128))])):h.createCommentVNode("",!0)],2),d.value?(h.openBlock(),h.createElementBlock("div",{key:0,class:h.normalizeClass(["custom-select second-select",{disabled:u.value}]),onClick:J},[h.createElementVNode("div",mce,[h.createElementVNode("span",gce,[f.value?(h.openBlock(),h.createElementBlock("img",{key:0,src:f.value.url,alt:"icono",class:"option-img-graph2"},null,8,yce)):d.value?(h.openBlock(),h.createElementBlock("img",{key:1,src:q(d.value.name,!1),alt:"icono",class:"option-img"},null,8,vce)):h.createCommentVNode("",!0)]),h.createElementVNode("span",xce,h.toDisplayString(Y()),1),h.createElementVNode("span",{class:h.normalizeClass(["arrow",{open:z.value}])},[...ge[5]||(ge[5]=[h.createElementVNode("svg",{width:"16",height:"14",viewBox:"0 0 16 14",fill:"none"},[h.createElementVNode("path",{d:"M3 5L8 10L13 5",stroke:"#AAB4BE","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],2)]),z.value&&d.value?(h.openBlock(),h.createElementBlock("div",bce,[h.createElementVNode("div",_ce,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(s.value,ze=>(h.openBlock(),h.createElementBlock("div",{key:ze.id,class:h.normalizeClass(["option-card-grid",{active:c.value===ze.id}]),onClick:h.withModifiers(Ie=>ee(ze),["stop"])},[h.createElementVNode("div",Tce,h.toDisplayString(ze.name||ze.title),1),h.createElementVNode("div",kce,[h.createElementVNode("img",{src:ze.url,alt:"icono",class:"option-img-grid"},null,8,Sce)])],10,wce))),128))])])):h.createCommentVNode("",!0)],2)):h.createCommentVNode("",!0),f.value?(h.openBlock(),h.createElementBlock("div",Cce)):h.createCommentVNode("",!0),f.value&&T.value&&E()?(h.openBlock(),h.createElementBlock("div",{key:2,class:h.normalizeClass(["dynamic-filters",{"dynamic-filters-wide":T.value.length>=2}])},[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(T.value,(ze,Ie)=>(h.openBlock(),h.createElementBlock(h.Fragment,{key:Ie},[ze.type==="select"?(h.openBlock(),h.createElementBlock("div",{key:0,class:"custom-select dynamic-select filter-inline",onClick:h.withModifiers(Ve=>Z(Ie),["stop"])},[h.createElementVNode("div",Mce,[ge[7]||(ge[7]=h.createElementVNode("span",{class:"select-icon select-analisis-icon"},[h.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/report-maker/iconocategorias.png",alt:"icono categorías",style:{width:"18px",height:"18px","object-fit":"contain"}})],-1)),ge[8]||(ge[8]=h.createElementVNode("span",{class:"select-label"}," Tipo de análisis ",-1)),Array.isArray(m.value[Ie])&&m.value[Ie].length>0?(h.openBlock(),h.createElementBlock("span",Ace,h.toDisplayString(m.value[Ie].length),1)):h.createCommentVNode("",!0),h.createElementVNode("span",{class:h.normalizeClass(["arrow",{open:V.value===Ie}])},[...ge[6]||(ge[6]=[h.createElementVNode("svg",{width:"16",height:"14",viewBox:"0 0 16 14",fill:"none"},[h.createElementVNode("path",{d:"M3 5L8 10L13 5",stroke:"#AAB4BE","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],2)]),V.value===Ie?(h.openBlock(),h.createElementBlock("div",Lce,[h.createElementVNode("div",Rce,[h.createElementVNode("div",{class:"multi-select-header",onClick:ge[1]||(ge[1]=h.withModifiers(()=>{},["stop"]))},[h.createElementVNode("label",Nce,[h.createElementVNode("input",{type:"checkbox",checked:L(Ie),indeterminate:R(Ie),onChange:h.withModifiers(Ve=>I(Ie),["stop"]),onClick:ge[0]||(ge[0]=h.withModifiers(()=>{},["stop"]))},null,40,Ice),ge[9]||(ge[9]=h.createElementVNode("span",{class:"select-all-label"},"Agregar todas",-1))])]),(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(ze.options,Ve=>(h.openBlock(),h.createElementBlock("div",{key:Ve.value,class:h.normalizeClass(["option-card multi-select-option",{active:C(Ie,Ve.value)}]),onClick:ge[2]||(ge[2]=h.withModifiers(()=>{},["stop"]))},[h.createElementVNode("div",Pce,[h.createElementVNode("input",{type:"checkbox",checked:C(Ie,Ve.value),onChange:h.withModifiers(Ge=>S(Ie,Ve.value),["stop"])},null,40,Oce)]),h.createElementVNode("div",{class:"option-content",onClick:Ge=>S(Ie,Ve.value)},[h.createElementVNode("div",Bce,h.toDisplayString(Ve.label),1)],8,zce)],2))),128))]),h.createElementVNode("div",Dce,[h.createElementVNode("button",{class:"btn-listo",onClick:ge[3]||(ge[3]=h.withModifiers(Ve=>Ae(),["stop"]))},"Listo")])])):h.createCommentVNode("",!0)],8,Ece)):ze.type==="radio-button"?(h.openBlock(),h.createElementBlock("div",Vce,[h.createElementVNode("div",Fce,h.toDisplayString(ze.label),1),h.createElementVNode("div",jce,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(ze.options,Ve=>(h.openBlock(),h.createElementBlock("label",{key:Ve.value,class:h.normalizeClass(["radio-option-card",{active:m.value[Ie]===Ve.value}])},[h.withDirectives(h.createElementVNode("input",{type:"radio",name:"dynamic-radio-"+Ie,value:Ve.value,"onUpdate:modelValue":Ge=>m.value[Ie]=Ge,disabled:k(Ve.value,Ve.label),onChange:()=>{var Ge,Ke,ke;if(console.log("Radio button changed for GSCFieldDataByZones:",m.value[Ie]),((Ge=f.value.value)==null?void 0:Ge.id)===9&&u.value.value&&(ke=(Ke=h.unref(e))==null?void 0:Ke.view)!=null&&ke.filterMultiple){const Be=m.value[Ie]===1;h.unref(e).view.filterMultiple.isHomeTeam=Be,console.log("GSCFieldDataByZones - preserved radio-button value in filterMultiple:",Be)}u.value.value&&Ne(),pe()}},null,40,Uce),[[h.vModelRadio,m.value[Ie]]]),h.createElementVNode("span",null,h.toDisplayString(Ve.label),1)],2))),128))])])):ze.type==="check"?(h.openBlock(),h.createElementBlock("div",qce,[h.createElementVNode("label",null,[h.withDirectives(h.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":Ve=>m.value[Ie]=Ve,checked:m.value[Ie],onChange:()=>{console.log(`Checkbox ${Ie} changed to:`,m.value[Ie]),u.value.value&&Ne(),pe()}},null,40,Wce),[[h.vModelCheckbox,m.value[Ie]]]),h.createTextVNode(" "+h.toDisplayString(ze.label),1)])])):ze.type==="select-simple"?(h.openBlock(),h.createElementBlock("div",{key:3,class:"custom-select dynamic-select filter-inline","data-filter-type":ze.type,onClick:h.withModifiers(Ve=>te(Ie),["stop"])},[h.createElementVNode("div",Hce,[ge[11]||(ge[11]=h.createElementVNode("span",{class:"select-icon select-analisis-icon"},[h.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/report-maker/iconocategorias.png",alt:"icono categorías",style:{width:"18px",height:"18px","object-fit":"contain"}})],-1)),ge[12]||(ge[12]=h.createElementVNode("span",{class:"select-label"}," Tipo de análisis ",-1)),h.createElementVNode("span",{class:h.normalizeClass(["arrow",{open:U.value===Ie}])},[...ge[10]||(ge[10]=[h.createElementVNode("svg",{width:"16",height:"14",viewBox:"0 0 16 14",fill:"none"},[h.createElementVNode("path",{d:"M3 5L8 10L13 5",stroke:"#AAB4BE","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],2)]),U.value===Ie?(h.openBlock(),h.createElementBlock("div",Jce,[h.createElementVNode("div",Kce,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(ze.options,Ve=>(h.openBlock(),h.createElementBlock("div",{key:Ve.value,class:h.normalizeClass(["option-card simple-select-option",{active:m.value[Ie]===Ve.value}]),onMouseenter:Ge=>Te(Ie,Ve.value),onClick:h.withModifiers(Ge=>ae(Ie,Ve.value),["stop"])},[h.createElementVNode("div",Zce,[h.createElementVNode("div",Yce,h.toDisplayString(Ve.label),1)]),m.value[Ie]===Ve.value?(h.openBlock(),h.createElementBlock("div",Qce,[...ge[13]||(ge[13]=[h.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},[h.createElementVNode("path",{d:"M13.5 4.5L6 12L2.5 8.5",stroke:"#cbee6b","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])])):h.createCommentVNode("",!0)],42,Xce))),128))])])):h.createCommentVNode("",!0)],8,Gce)):h.createCommentVNode("",!0),Ie===1&&T.value.length>2?(h.openBlock(),h.createElementBlock("div",$ce)):h.createCommentVNode("",!0)],64))),128))],2)):h.createCommentVNode("",!0),u.value?h.createCommentVNode("",!0):(h.openBlock(),h.createElementBlock("button",{key:3,class:"cancel-btn",onClick:be},"Cancelar")),t.value?(h.openBlock(),h.createElementBlock("button",{key:4,class:"ok-btn",onClick:_e},"OK")):h.createCommentVNode("",!0)]))}}),tue=dd(eue,[["__scopeId","data-v-b7992a81"]]),rue={key:0,class:"modal-simple"},nue={class:"modal-simple__content"},iue={class:"modal-simple__content__header"},aue={class:"modal-simple__content__body"},oue={class:"modal-simple__content__footer"},sue={__name:"ModalSimple",props:{modelValue:{type:Boolean,default:!1}},setup(r){return(a,g)=>(h.openBlock(),h.createBlock(h.Teleport,{to:"body"},[r.modelValue?(h.openBlock(),h.createElementBlock("div",rue,[h.createElementVNode("div",nue,[h.createElementVNode("div",iue,[h.renderSlot(a.$slots,"header",{},void 0,!0)]),h.createElementVNode("div",aue,[h.renderSlot(a.$slots,"body",{},void 0,!0)]),h.createElementVNode("div",oue,[h.renderSlot(a.$slots,"footer",{},void 0,!0)])])])):h.createCommentVNode("",!0)]))}},lue=dd(sue,[["__scopeId","data-v-1cc4f590"]]),cue={class:"footer"},uue={__name:"ModalCautionClose",props:{value:{type:Boolean,default:!1}},emits:["update:modelValue","action"],setup(r,{emit:a}){const g=a;function D(A){g("update:modelValue",A)}function X(A){g("action",A),g("update:modelValue",!1)}return(A,b)=>(h.openBlock(),h.createBlock(lue,{"modle-value":r.value,"onUpdate:modelValue":D},{header:h.withCtx(()=>[...b[2]||(b[2]=[h.createElementVNode("div",{class:"header"},"Descartar template",-1)])]),body:h.withCtx(()=>[...b[3]||(b[3]=[h.createElementVNode("div",{class:"body"},"¿Estás seguro que deseas abandonar el proceso?",-1)])]),footer:h.withCtx(()=>[h.createElementVNode("div",cue,[h.createElementVNode("div",{role:"button",class:"btn btn-cancel",onClick:b[0]||(b[0]=e=>X(!1))}," Seguir editando "),h.createElementVNode("div",{role:"button",class:"btn btn-confirm",onClick:b[1]||(b[1]=e=>X(!0))}," Descartar ")])]),_:1},8,["modle-value"]))}},due=dd(uue,[["__scopeId","data-v-ed9b5088"]]),pue={key:0,class:"modal-simple"},hue={__name:"ModalChangesSaved",props:{modelValue:{type:Boolean,default:!1}},setup(r){return(a,g)=>(h.openBlock(),h.createBlock(h.Teleport,{to:"body"},[h.createVNode(h.Transition,null,{default:h.withCtx(()=>[r.modelValue?(h.openBlock(),h.createElementBlock("div",pue,[...g[0]||(g[0]=[h.createElementVNode("div",{class:"modal-simple__content"},[h.createElementVNode("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[h.createElementVNode("path",{d:"M29.3346 14.7823V16.0089C29.333 18.8842 28.402 21.6818 26.6804 23.9847C24.9589 26.2876 22.539 27.9722 19.7818 28.7875C17.0245 29.6027 14.0776 29.5048 11.3806 28.5084C8.68354 27.512 6.38084 25.6704 4.81592 23.2584C3.25099 20.8463 2.50769 17.993 2.69687 15.124C2.88605 12.255 3.99758 9.52404 5.86568 7.33836C7.73377 5.15269 10.2583 3.62944 13.0629 2.9958C15.8674 2.36215 18.8017 2.65205 21.428 3.82227",stroke:"#CDEF71","stroke-width":"2.66667","stroke-linecap":"round","stroke-linejoin":"round"}),h.createElementVNode("path",{d:"M29.3333 5.33203L16 18.6787L12 14.6787",stroke:"#CDEF71","stroke-width":"2.66667","stroke-linecap":"round","stroke-linejoin":"round"})]),h.createElementVNode("div",{class:"modal-simple__content__text"}," Los cambios se han guardado correctamente ")],-1)])])):h.createCommentVNode("",!0)]),_:1})]))}},fue=dd(hue,[["__scopeId","data-v-2bc30783"]]),mue={class:"template-maker__header"},gue={key:0,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},yue={class:"template-maker__content"},vue={class:"template-maker__content__main"},xue={id:"containerMain",class:"container-main"},bue={class:"template-maker__content__main__cover-selector"},_ue=["id"],wue={class:"page-indicator"},Tue={class:"page-indicator__index"},kue=["onClick"],Sue=["onClick"],Cue={key:0,class:"template-maker__content__main__footer"},Eue={class:"template-maker__content__main__footer__paginator"},Mue={class:"template-maker__content__main__footer__paginator__nav"},Aue={class:"template-maker__content__main__footer__paginator__numbers"},Lue=["onClick"],Rue={__name:"GSC-TemplateReportMaker",props:{token:{type:String,default:""},userTeamId:{type:Number,default:0}},emits:["close"],setup(r,{expose:a,emit:g}){const D=new Map,X=h.ref([{title:"Page 1",id:String(Date.now()),items:[{name:"Volumetrica",id:`w-${String(Date.now())}`,x:0,y:0,w:4,h:6,maxWidth:4,maxHeight:4,noResize:!1,noMove:!1,componentProps:{}},{name:"Volumetrica",id:String(Date.now()),x:4,y:0,w:4,h:4,maxWidth:4,maxHeight:4,noResize:!1,noMove:!1,componentProps:{}}]}]),A=h.ref(null),b=h.ref(0),e=h.ref(!1),v=h.ref(null),u=h.ref(null),t=h.ref(!0),w=h.ref(!1),y=h.ref(!1),x=h.ref(0),p=h.ref(!1),n=h.ref(null),i=h.ref(new Map),d=h.ref(null),s=h.ref(null),c=h.ref(!1),f=h.ref(!1),m=h.ref(!1),T=h.computed(()=>({"--overflow-y-template-maker":w.value?"scroll":"hidden","--height-container-main":w.value?"fit-content":"calc(100vh - 64px)","--margin-bottom-container-main":(w.value,"0")})),C=h.computed(()=>b.value+1);h.watch(()=>e.value,Te=>{const Me=document.getElementById("app");Te?(b.value=0,document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden",Me&&(Me.style.overflow="hidden")):(document.body.style.overflow="",document.documentElement.style.overflow="",Me&&(Me.style.overflow=""))});function S(Te){return Te<10?`0${Te}`:Te}async function L({templateId:Te,userId:Me}){try{return(await(await fetch(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${Me}/templates/${Te}`,{method:"GET",headers:{Authorization:Z.token}})).json()).data}catch(Le){console.error("Error fetching template by ID:",Le)}}async function R({reportId:Te,userId:Me}){try{return(await(await fetch(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${Me}/reports/${Te}`,{method:"GET",headers:{Authorization:Z.token}})).json()).data}catch(Le){console.error("Error fetching report by ID:",Le)}}let E=0;function N(Te){A.value=Te,E>0&&(c.value=!0),E++}function M(Te){Te&&oe(null,!0)}let k=null;function I(Te,Me){let Le=Te.getBoundingClientRect(),Pe={height:Te.clientHeight,width:Te.clientWidth},We=Me.getBoundingClientRect();if(!(We.top>=Le.top&&We.bottom<=Le.top+Pe.height)){const Re=We.top-Le.top,je=We.bottom-Le.bottom;Math.abs(Re)<Math.abs(je)?Te.scrollTop+=Re:Te.scrollTop+=je}}function _(Te,Me){let Le=Te.getBoundingClientRect();const Pe=Me.getBoundingClientRect().top-Le.top;Te.scrollTop+=Pe}function P(Te,Me=!1){const Le={title:`Page ${X.value.length+1}`,id:`p-${Date.now()}`,items:[]};if(me(),Te!==void 0&&Te>=-1?X.value.splice(Te+1,0,Le):X.value.push(Le),h.nextTick(()=>{const Pe=X.value.findIndex(Re=>Re.id===Le.id),We=document.getElementById(`page-${Pe+1}`);k||(k=document.getElementById("containerMain")),We&&k?I(k,We):console.error("Page element or container main element not found")}),Me)return Le;c.value=!0}function z(Te){if(console.log("onClickPage",Te),Te<0||Te>X.value.length){console.log("Invalid page index:",Te,"Valid range: 0 to",X.value.length);return}b.value=Te;const Me=document.getElementById(`page-${Te}`);if(console.log("pageElement found:",Me),k||(k=document.getElementById("containerMain")),console.log("containerMainEl found:",k),Me&&k){const Le=new CustomEvent("programmatic-scroll-start");document.dispatchEvent(Le),_(k,Me),setTimeout(()=>{const Pe=new CustomEvent("programmatic-scroll-end");document.dispatchEvent(Pe)},300)}else console.error("Page element or container main element not found")}function V(Te){d.value=Te,p.value=!0}function U(Te,Me){const Le=Me+1;Te&&b.value!==Le&&(b.value=Le)}function q(Te){p.value=!0,xi.emit("edit-view",{view:Te})}async function W({templateReportId:Te,userId:Me,isTemplateMode:Le}){try{return Le?L({templateId:Te,userId:Me}):R({reportId:Te,userId:Me})}catch(Pe){throw new Error("Error fetching template or report by ID: "+Pe.message)}}function Y(){E=0,p.value=!1,b.value=0,d.value=null,s.value=null,i.value.clear(),k=null}async function ne(Te){if(console.log("show, initialConfig",Te),Y(),t.value=Te.isTemplateMode,console.log("****************************************** isTemplateMode.value",t.value),w.value=!!Te.isPDFMode,Te.isPDFMode?v.value=await R({reportId:Te.reportId,userId:Te.userId}):(v.value=Te.template,v.value=await W({templateReportId:Te.template.id,userId:Te.template.user_id,isTemplateMode:Te.isTemplateMode})),!v.value)return;v.value&&v.value.game&&(v.value.game=ae(v.value.game)),console.log("templateToEdit.value",v.value),u.value=JSON.parse(JSON.stringify(v.value)),y.value=v.value.template_type===2;const Me=v.value.pages.find(Le=>Le.is_front_page);x.value=Me?Me.type:1,e.value=!0,X.value=v.value.pages.reduce((Le,Pe,We)=>{if(!Pe.is_front_page){Pe.name||(Pe.name="");const Re={originalPage:JSON.parse(JSON.stringify(Pe)),title:Pe.name,id:`p-${Date.now()-We*9}`,items:[],components:Pe.components};Pe.components&&Pe.components.length>0&&(Re.items=Pe.components.map((je,Ne)=>{const ve=new ay(`FAWC-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,[],je.coreView.id,je.dynamicFilters,y.value,t.value,je.filtersJSON||null,Z.token),ye={originalComponent:JSON.parse(JSON.stringify(je)),title:je.title,game:v.value.game,idAux:je.id,id:`w-${Date.now()-Ne*7}`,x:je.column,y:je.row,w:je.colspan,h:je.rowspan,maxWidth:je.max_column,maxHeight:je.max_row,minWidth:je.min_column,minHeight:je.min_row,noResize:!t.value,noMove:!t.value,coreView:je.coreView||null,isTemplateMode:t.value,componentName:je.componentName,componentProps:ee({currentProps:je.componentProps,coreView:je.coreView,isTemplateMode:t.value,templateToEdit:v.value,game:v.value.game||null})||{},filterMultiple:je.filterMultiple,isHomeTeam:re({game:v.value.game,isTemplateMode:t.value,currentIsHomeTeam:je.isHomeTeam||je.componentProps.isHomeTeamForAnalysis}),filtersJSON:je.filtersJSON||null,dynamicFilters:je.dynamicFilters||[],filterAndViewsContainer:ve},ge=h.reactive({view:ye});return ve.addView(ge,!0),i.value.set(ve.getId(),ve),ye})),Le.push(Re)}return Le},[]),console.log("pages.value",X.value),console.log("isvisible.value",e.value)}function J({game:Te,isTemplateMode:Me}){const Le=Te&&Te.homeTeam&&Te.awayTeam&&(Te.homeTeam.team_id===Z.userTeamId||Te.awayTeam.team_id===Z.userTeamId);return{isUserTeamHome:Le&&Te.homeTeam.team_id===Z.userTeamId,requiresUserTeamAdjustment:Le&&!Me}}function re({game:Te,isTemplateMode:Me,currentIsHomeTeam:Le}){const{isUserTeamHome:Pe,requiresUserTeamAdjustment:We}=J({game:Te,isTemplateMode:Me});return We?Le?Pe:!Pe:Le}function ee({currentProps:Te,coreView:Me,templateToEdit:Le,isTemplateMode:Pe,game:We}){var Re,je,Ne,ve;if(!Te||!Me)return Te||{};const{isUserTeamHome:ye,requiresUserTeamAdjustment:ge}=J({game:We,isTemplateMode:Pe}),ze={...Te};if(Me.id===5&&(ze.isGhostEffect=Pe,ge)){const Ie=ze.preMatchType===1;ze.preMatchType=Ie?ye?1:2:ye?2:1}if(Me.id===7&&ge){const Ie=ze.isHomeTeamForAnalysis;ze.isHomeTeamForAnalysis=Ie?ye:!ye}if(Me.id===9&&ge){const Ie=ze.isHomeTeamForAnalysis;ze.isHomeTeamForAnalysis=Ie?ye:!ye}if(Me.id===10&&ge){const Ie=ze.isHomeTeamForAnalysis;ze.isHomeTeamForAnalysis=Ie?ye:!ye}if(Me.id===1&&(ze.gameId=We?We.id:"",ze.homeLogo=We?We.homeTeam.logo:"",ze.awayLogo=We?We.awayTeam.logo:"",ze.seasonId=We?We.season_id:0,ze.default=Pe),Me.id===6&&(console.log("---------------> templateToEdit.last_games: ",Le.last_games),console.log("currentProps: ",Te),console.log("coreView: ",Me),console.log("game: ",We),console.log("templateToEdit: ",Le),console.log("------------------------------------------------------------"),console.log("************************************************************"),ze.game=We||"",ze.lastGames=Le.last_games,ze.selectedOption=Le.template_type===2?"Postmatch":"Prematch"),Me.id===3&&(ze.defaultShields=Pe),Me.id===2){let Ie=!0,Ve=0,Ge=0;We&&(Ie=Le.main_team==We.home_team||Le.main_team==We.visiting_team,Ve=Ie?Le.main_team==(We==null?void 0:We.home_team)?We==null?void 0:We.home_team:We==null?void 0:We.visiting_team:We==null?void 0:We.home_team,Ge=Ie?Le.main_team==(We==null?void 0:We.home_team)?We==null?void 0:We.visiting_team:We==null?void 0:We.home_team:We==null?void 0:We.visiting_team),ze.gamed=We?We.id:"",ze.game=We||"",ze.season=We?We.season_id:0,ze.teamView=((je=(Re=Me==null?void 0:Me.filtersJSON)==null?void 0:Re.dynamicFilters[1])==null?void 0:je.selectedValue)==3?0:((ve=(Ne=Me==null?void 0:Me.filtersJSON)==null?void 0:Ne.dynamicFilters[1])==null?void 0:ve.selectedValue)==1?Ve:Ge,ze.useDummyData=Pe}return Me.id===8&&(ze.teamSelected=We?{teamId:We.home_team}:1,ze.isDefault=Pe),Me.id===4&&(ze.gameId=We?We.id:"",ze.isDefault=Pe,ze.homeTeam=We?We==null?void 0:We.home_team:"",ze.awayTeam=We?We==null?void 0:We.visiting_team:""),We&&(ze.game=We),ze}const Z=r,te=g;h.watch(()=>Z.token,(Te,Me)=>{console.log("Token changed:",{newToken:Te,oldToken:Me})},{immediate:!0}),a({show:ne}),xi.on("add-page-view",Te=>{console.log("88888888888888888888888888888888888888888888888888888888888888888"),console.log("viewConfig",Te),D.set(Te.view.id,Te.view);const Me=X.value.find(Le=>Le.id===Te.pageId);Me&&(Me.items||(Me.items=[]),Me.items.push(Te.view),h.nextTick(()=>{const Le=document.querySelector(`[gs-id="${Te.view.id}"]`);Te.grid.makeWidget(Le)}))}),xi.on("add-page-and-view",Te=>{const Me=X.value.findIndex(Le=>Le.id===Te.pageId);if(Me>-1){const Le=P(Me,!0);setTimeout(()=>{xi.emit("add-view",{pageId:Le.id,view:Te.view,filterAndWidgetContainer:Te.filterAndWidgetContainer}),s.value&&(Le.stepBackPage=s.value),s.value=Le},500)}else console.error("Page not found for adding view:",Te.pageId)}),xi.on("empty-page",Te=>{p.value&&d.value&&d.value.id===Te.id||(_e(Te),s.value&&s.value.id===Te.id&&(s.value.stepBackPage?s.value=s.value.stepBackPage:s.value=null))}),xi.on("filters-cancelled",Te=>{Te&&Te.removeAllChildViews()}),xi.on("activate-save-button",()=>{console.log("GSC-TemplateReportMaker - activate-save-button event received"),c.value=!0,console.log("GSC-TemplateReportMaker - isSaveActive set to true")});function ae(Te){return{...Te,gameId:Te.game_id,id:Te.game_id,seasonId:Te.season_id,status:Te.game_status,homeTeam:{logo:`https://golstatsimages.blob.core.windows.net/teams-150/${Te.home_team}.png`,team_id:Te.home_team,provisional_logo:`https://golstatsimages.blob.core.windows.net/teams-provisional/${Te.home_team}.png`,colloquial_name:Te.home_team_name,acronym:Te.home_team_acronym,team_name:Te.home_team_name},awayTeam:{logo:`https://golstatsimages.blob.core.windows.net/teams-150/${Te.visiting_team}.png`,team_id:Te.visiting_team,provisional_logo:`https://golstatsimages.blob.core.windows.net/teams-provisional/${Te.visiting_team}.png`,colloquial_name:Te.visiting_team_name,acronym:Te.visiting_team_acronym,team_name:Te.visiting_team_name}}}function oe(Te,Me=!1){Me||!t.value?(e.value=!1,Y(),te("close")):c.value?f.value=!0:(e.value=!1,Y(),te("close"))}function pe(){n.value=null,p.value=!1}function fe({page:Te,view:Me,applyMinimumSize:Le=!1}){const Pe=Te.grid;if(!Te||!Me||!Pe)return null;const We=Le?{w:Me.min_column,h:Me.min_row}:{w:Me.colspan,h:Me.rowspan},Re=Pe.willItFit(0,0,We.w,We.h,!0);return Re?{willFit:Re,applyMinimumSize:Le}:Le?null:fe({page:Te,view:Me,applyMinimumSize:!0})}const se=new Set([9]);function ue(Te){var Me,Le,Pe,We,Re,je,Ne;if(console.log("onFiltersChanged",Te),Te.dynamicFilters&&Te.dynamicFilters.length>0&&Te.viewToEdit&&Te.viewToEdit.view){const ve=Te.viewToEdit.view.id;X.value.forEach(ye=>{ye.items.forEach(ge=>{ge.id===ve&&ge.coreView&&ge.coreView.id===3&&(ge.componentProps.desplegable=Te.dynamicFilters[0]||!1,ge.componentProps.key=Te.dynamicFilters[0]||!1,h.nextTick(()=>{xi.emit("force-component-update",{itemId:ge.id,componentProps:ge.componentProps})}))})})}if(Te.viewToEdit){if(!Te.viewToEdit.view.filterAndViewsContainer){const ve=new ay(`FAWC-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,[Te.viewToEdit.view],((Me=Te.viewToEdit.view.coreView)==null?void 0:Me.id)||Te.viewToEdit.view.id,Te.dynamicFilters||[],y.value,t.value,Te.filtersJSON,Z.token);Te.viewToEdit.view.filterAndViewsContainer=ve}Te.viewToEdit.view.filterAndViewsContainer.updateView({view:Te.viewToEdit,dynamicFilters:Te.dynamicFilters||[],filtersJSON:Te.filtersJSON||null}),c.value=!0}else if(Te.view){Te.view.id&&Te.filterAndViewsContainer&&Te.view.id!==Te.filterAndViewsContainer.viewId&&(Te.filterAndViewsContainer.removeAllChildViews(),Te.filterAndViewsContainer.setViewId(Te.view.id),Te.filterAndViewsContainer.setFiltersJSON(Te.filtersJSON||null)),Te.view.id&&se.has(Te.view.id)&&Te.dynamicFilters[0]&&Te.dynamicFilters[0].length===0&&Te.filterAndViewsContainer&&(Te.filterAndViewsContainer.updateDynamicFilters(Te.dynamicFilters,(Pe=(Le=Te.viewToEdit)==null?void 0:Le.view)==null?void 0:Pe.id),c.value=!0);const ve=s.value||d.value,ye=fe({page:ve,view:Te.view,applyMinimumSize:!1});Te.view.filtersJSON=Te.filtersJSON||null;const ge=Te.filterAndViewsContainer,ze=X.value.findIndex(Ie=>Ie.id===ve.id);if(ge){const Ie=Te.filterAndViewsContainer.getRequiresAddView(Te.dynamicFilters);console.log("111111111111111111111111111111111"),console.log("requiersAddView",Ie),Ie?(ge.setDynamicFilters(Te.dynamicFilters),(ye||ze===X.value.length-1)&&(xi.emit("add-view",{pageId:ve.id,view:Te.view,filterAndWidgetContainer:ge,avoidWillFit:!1,applyMinimumSize:ye?ye.applyMinimumSize:!1,dynamicFilters:Te.dynamicFilters}),Te.filterAndViewsContainer.updateDynamicFilters(Te.dynamicFilters,(Re=(We=Te.viewToEdit)==null?void 0:We.view)==null?void 0:Re.id),c.value=!0,setTimeout(()=>{Te.filterAndViewsContainer.getRequiresAddView(Te.dynamicFilters)?(console.log("GSCtops - still requires add view, calling recursively"),ue(Te)):console.log("GSCtops - no more views needed, stopping recursion")},1e3))):(Te.filterAndViewsContainer.updateDynamicFilters(Te.dynamicFilters,(Ne=(je=Te.viewToEdit)==null?void 0:je.view)==null?void 0:Ne.id),c.value=!0)}else if(ye||ze===X.value.length-1){const Ie=new ay(`FAWC-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,[],Te.view.id,Te.dynamicFilters,y.value,t.value,Te.filtersJSON,Z.token);xi.emit("set-filter-and-views-container",Ie),i.value.set(Ie.getId(),Ie),Te.dynamicFilters&&Array.isArray(Te.dynamicFilters[0])?(Te.filterAndViewsContainer=Ie,ue(Te)):xi.emit("add-view",{pageId:ve.id,view:Te.view,filterAndWidgetContainer:Ie,avoidWillFit:!1,applyMinimumSize:ye?ye.applyMinimumSize:!1,dynamicFilters:Te.dynamicFilters}),c.value=!0}}}async function de(){if(c.value)try{const Te=[{is_front_page:!0,template_type:A.value.isPostMatch?2:1,type:A.value.id},...X.value.map(Le=>({columns:Le.originalPage?Le.originalPage.columns:12,rows:Le.originalPage?Le.originalPage.rows:12,gap:Le.originalPage?Le.originalPage.gap:10,name:Le.title,width:Le.originalPage?Le.originalPage.width:968,height:Le.originalPage?Le.originalPage.height:702,components:Le.items.map(Pe=>({min_column:Pe.minWidth,min_row:Pe.minHeight,max_column:Pe.maxWidth,max_row:Pe.maxHeight,column:Pe.x,row:Pe.y,colspan:Pe.w,rowspan:Pe.h,name:Pe.name,title:Pe.title,dynamicFilters:Pe.filterAndViewsContainer.getComponentDynamicFilters(Pe.id)||Pe.filterAndViewsContainer.getDynamicFilters()||[],coreView:Pe.coreView||null,componentName:Pe.componentName,componentProps:Pe.componentProps||{},isHomeTeam:Pe.isHomeTeam||Pe.componentProps.isHomeTeamForAnalysis,filterMultiple:Pe.filterMultiple}))}))];console.log("pagesAux",Te);const Me=await fetch(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${v.value.user_id}/templates/${v.value.id}/pages`,{method:"PATCH",headers:{Authorization:Z.token},body:JSON.stringify({pages:Te})});m.value=!0,await Me.json(),c.value=!1,setTimeout(()=>{m.value=!1},2e3)}catch(Te){console.error("Error saving template:",Te)}}function me(){X.value.forEach(Te=>{Te.offListeners&&Te.offListeners()})}function _e(Te){const Me=X.value.findIndex(Le=>Le.id===Te.id);Me>-1&&(me(),X.value=X.value.filter(Le=>Le.id!==Te.id),b.value>=Me&&(b.value=Math.max(0,b.value-1)),c.value=!0)}function be(){c.value=!0}function Se(Te){const Me=X.value.find(Le=>Le.items.some(Pe=>Pe.id===Te.id));if(Me){const Le=Me.items.findIndex(Pe=>Pe.id===Te.id);Le!==-1&&(Me.items.splice(Le,1),c.value=!0)}}function Ae(Te){console.log("onChangeSort",Te)}return(Te,Me)=>(h.openBlock(),h.createElementBlock(h.Fragment,null,[h.createVNode(due,{modelValue:f.value,"onUpdate:modelValue":Me[0]||(Me[0]=Le=>f.value=Le),onAction:M},null,8,["modelValue"]),h.createVNode(fue,{"model-value":m.value},null,8,["model-value"]),(h.openBlock(),h.createBlock(h.Teleport,{to:"body"},[e.value&&v.value?(h.openBlock(),h.createElementBlock("div",{key:0,class:"template-maker",style:h.normalizeStyle(T.value)},[h.withDirectives(h.createVNode(tue,{token:r.token,view:n.value,"is-post-match":y.value,onClose:pe,onFiltersChanged:ue},null,8,["token","view","is-post-match"]),[[h.vShow,t.value&&p.value]]),h.createElementVNode("div",mue,[h.createTextVNode(h.toDisplayString(v.value?v.value.name:"Nuevo template")+" ",1),h.createElementVNode("div",{class:"template-maker__header__close",onClick:oe},[w.value?h.createCommentVNode("",!0):(h.openBlock(),h.createElementBlock("svg",gue,[...Me[6]||(Me[6]=[h.createElementVNode("path",{d:"M1.33398 1.33398L14.6673 14.6673",stroke:"#FFFFFF","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),h.createElementVNode("path",{d:"M14.666 1.33398L1.33268 14.6673",stroke:"#FFFFFF","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])]))])]),h.createElementVNode("div",yue,[Me[13]||(Me[13]=h.createElementVNode("div",{class:"template-maker__content__sidebar"},null,-1)),h.createElementVNode("div",vue,[h.createElementVNode("div",xue,[h.createElementVNode("div",bue,[h.withDirectives(h.createVNode(QT,{"is-post-match":y.value,"initial-cover-id":x.value,onSelectCover:N},null,8,["is-post-match","initial-cover-id"]),[[h.vShow,t.value]])]),(h.openBlock(),h.createElementBlock("div",{class:"template-maker__content__main__pages",key:X.value.length},[A.value?(h.openBlock(),h.createBlock($le,{key:0,id:"page-0",game:v.value.game||null,"cover-id":A.value.id,"is-post-match":A.value.isPostMatch,onIntersectionChanged:Me[1]||(Me[1]=Le=>U(Le,-1))},null,8,["game","cover-id","is-post-match"])):h.createCommentVNode("",!0),t.value?(h.openBlock(),h.createElementBlock("div",{key:1,class:"new-items-buttons",style:h.normalizeStyle({"margin-bottom":X.value.length===0?"30px":"0"})},[p.value?h.createCommentVNode("",!0):(h.openBlock(),h.createElementBlock("div",{key:0,class:"new-items-buttons__add-page new-item-button",onClick:Me[2]||(Me[2]=Le=>P(-1))},[...Me[7]||(Me[7]=[h.createElementVNode("div",null,"+ Nueva página",-1),h.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[h.createElementVNode("path",{d:"M8.66797 1.33203H4.0013C3.64768 1.33203 3.30854 1.47251 3.05849 1.72256C2.80844 1.9726 2.66797 2.31174 2.66797 2.66536V13.332C2.66797 13.6857 2.80844 14.0248 3.05849 14.2748C3.30854 14.5249 3.64768 14.6654 4.0013 14.6654H12.0013C12.3549 14.6654 12.6941 14.5249 12.9441 14.2748C13.1942 14.0248 13.3346 13.6857 13.3346 13.332V5.9987L8.66797 1.33203Z",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"}),h.createElementVNode("path",{d:"M8.66797 1.33203V5.9987H13.3346",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])]))],4)):h.createCommentVNode("",!0),(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(X.value,(Le,Pe)=>(h.openBlock(),h.createElementBlock("div",{key:Pe,id:`page-${Pe+1}`,class:"template-maker__content__main__pages__page"},[h.createElementVNode("div",wue,[h.createElementVNode("div",Tue,"Pag "+h.toDisplayString(S(Pe+2)),1)]),A.value?(h.openBlock(),h.createBlock(tle,{key:0,page:Le,"is-template-mode":t.value,"is-post-match":A.value.isPostMatch,game:v.value.game||null,lastGames:v.value.lastGames||[],"is-filter-visible":p.value,onEditView:q,onIntersectionChanged:We=>U(We,Pe),onChangeSort:Ae,onDeletePage:_e,onViewChanged:be,onDeleteView:Se},null,8,["page","is-template-mode","is-post-match","game","lastGames","is-filter-visible","onIntersectionChanged"])):h.createCommentVNode("",!0),t.value&&!p.value?(h.openBlock(),h.createElementBlock("div",{key:1,class:"new-items-buttons",style:h.normalizeStyle({"margin-bottom":Pe+1===X.value.length?"30px":"0","margin-top":"10px"})},[h.createElementVNode("div",{class:"new-items-buttons__add-page new-item-button",onClick:We=>P(Pe)},[...Me[8]||(Me[8]=[h.createElementVNode("div",null,"+ Nueva página",-1),h.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[h.createElementVNode("path",{d:"M8.66797 1.33203H4.0013C3.64768 1.33203 3.30854 1.47251 3.05849 1.72256C2.80844 1.9726 2.66797 2.31174 2.66797 2.66536V13.332C2.66797 13.6857 2.80844 14.0248 3.05849 14.2748C3.30854 14.5249 3.64768 14.6654 4.0013 14.6654H12.0013C12.3549 14.6654 12.6941 14.5249 12.9441 14.2748C13.1942 14.0248 13.3346 13.6857 13.3346 13.332V5.9987L8.66797 1.33203Z",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"}),h.createElementVNode("path",{d:"M8.66797 1.33203V5.9987H13.3346",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],8,kue),h.createElementVNode("div",{class:"new-items-buttons__add-item new-item-button",onClick:We=>V(Le)},[...Me[9]||(Me[9]=[h.createElementVNode("div",null,"+ Agregar gráfico",-1),h.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[h.createElementVNode("path",{d:"M12 13.3346V6.66797",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"}),h.createElementVNode("path",{d:"M8 13.3346V2.66797",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"}),h.createElementVNode("path",{d:"M4 13.332V9.33203",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],8,Sue)],4)):h.createCommentVNode("",!0)],8,_ue))),128))]))]),w.value?h.createCommentVNode("",!0):(h.openBlock(),h.createElementBlock("div",Cue,[h.createElementVNode("div",Eue,[h.createElementVNode("div",Mue,[h.createElementVNode("div",null,"Páginas "+h.toDisplayString(C.value),1),h.createElementVNode("div",{class:h.normalizeClass(["template-maker__content__main__footer__paginator__nav__arrow",{disabled:b.value<=0}]),onClick:Me[3]||(Me[3]=Le=>b.value>0&&z(b.value-1))},[...Me[10]||(Me[10]=[h.createElementVNode("svg",{width:"6",height:"10",viewBox:"0 0 6 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[h.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.22444 5L5.29079 8.57741C5.56974 8.90285 5.56974 9.43049 5.29079 9.75592C5.01184 10.0814 4.55958 10.0814 4.28064 9.75592L0.709209 5.58926C0.430263 5.26382 0.430263 4.73618 0.709209 4.41074L4.28064 0.244078C4.55958 -0.0813593 5.01184 -0.0813592 5.29079 0.244078C5.56974 0.569515 5.56974 1.09715 5.29079 1.42259L2.22444 5Z",fill:"#92929D"})],-1)])],2),h.createElementVNode("div",{class:h.normalizeClass(["template-maker__content__main__footer__paginator__nav__arrow",{disabled:b.value>=X.value.length}]),onClick:Me[4]||(Me[4]=Le=>b.value<X.value.length&&z(b.value+1))},[...Me[11]||(Me[11]=[h.createElementVNode("svg",{width:"6",height:"10",viewBox:"0 0 6 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[h.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.77556 5L0.70921 8.57741C0.430264 8.90285 0.430264 9.43049 0.70921 9.75592C0.988156 10.0814 1.44042 10.0814 1.71936 9.75592L5.29079 5.58926C5.56974 5.26382 5.56974 4.73618 5.29079 4.41074L1.71936 0.244078C1.44042 -0.0813593 0.988155 -0.0813592 0.709209 0.244078C0.430264 0.569515 0.430264 1.09715 0.70921 1.42259L3.77556 5Z",fill:"#92929D"})],-1)])],2)]),h.createElementVNode("div",Aue,[h.createElementVNode("div",{role:"button",class:h.normalizeClass({active:b.value===0}),onClick:Me[5]||(Me[5]=Le=>z(0))},h.toDisplayString(S(1)),3),(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(X.value,(Le,Pe)=>(h.openBlock(),h.createElementBlock("div",{role:"button",key:Pe,class:h.normalizeClass({active:Pe+1===b.value}),onClick:We=>z(Pe+1)},h.toDisplayString(S(Pe+2)),11,Lue))),128))])]),t.value?(h.openBlock(),h.createElementBlock("div",{key:0,role:"button",class:h.normalizeClass(["template-maker__content__main__footer__save save-button",{disabled:!c.value}]),onClick:de},[...Me[12]||(Me[12]=[h.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[h.createElementVNode("path",{d:"M12.6667 14H3.33333C2.97971 14 2.64057 13.8595 2.39052 13.6095C2.14048 13.3594 2 13.0203 2 12.6667V3.33333C2 2.97971 2.14048 2.64057 2.39052 2.39052C2.64057 2.14048 2.97971 2 3.33333 2H10.6667L14 5.33333V12.6667C14 13.0203 13.8595 13.3594 13.6095 13.6095C13.3594 13.8595 13.0203 14 12.6667 14Z",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"}),h.createElementVNode("path",{d:"M11.3346 14.0013V8.66797H4.66797V14.0013",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"}),h.createElementVNode("path",{d:"M4.66797 2V5.33333H10.0013",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"})],-1),h.createElementVNode("div",null,"Guardar",-1)])],2)):h.createCommentVNode("",!0)]))])])],4)):h.createCommentVNode("",!0)]))],64))}},Nue=dd(Rue,[["__scopeId","data-v-f1f7492c"]]);function z6(r,a){return function(){return r.apply(a,arguments)}}const{toString:Iue}=Object.prototype,{getPrototypeOf:H2}=Object,{iterator:oy,toStringTag:B6}=Symbol,sy=(r=>a=>{const g=Iue.call(a);return r[g]||(r[g]=g.slice(8,-1).toLowerCase())})(Object.create(null)),ed=r=>(r=r.toLowerCase(),a=>sy(a)===r),ly=r=>a=>typeof a===r,{isArray:Uh}=Array,im=ly("undefined");function am(r){return r!==null&&!im(r)&&r.constructor!==null&&!im(r.constructor)&&fu(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}const D6=ed("ArrayBuffer");function Pue(r){let a;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?a=ArrayBuffer.isView(r):a=r&&r.buffer&&D6(r.buffer),a}const Oue=ly("string"),fu=ly("function"),V6=ly("number"),om=r=>r!==null&&typeof r=="object",zue=r=>r===!0||r===!1,cy=r=>{if(sy(r)!=="object")return!1;const a=H2(r);return(a===null||a===Object.prototype||Object.getPrototypeOf(a)===null)&&!(B6 in r)&&!(oy in r)},Bue=r=>{if(!om(r)||am(r))return!1;try{return Object.keys(r).length===0&&Object.getPrototypeOf(r)===Object.prototype}catch{return!1}},Due=ed("Date"),Vue=ed("File"),Fue=ed("Blob"),jue=ed("FileList"),Uue=r=>om(r)&&fu(r.pipe),que=r=>{let a;return r&&(typeof FormData=="function"&&r instanceof FormData||fu(r.append)&&((a=sy(r))==="formdata"||a==="object"&&fu(r.toString)&&r.toString()==="[object FormData]"))},Wue=ed("URLSearchParams"),[Gue,Hue,Jue,Kue]=["ReadableStream","Request","Response","Headers"].map(ed),Xue=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function sm(r,a,{allOwnKeys:g=!1}={}){if(r===null||typeof r>"u")return;let D,X;if(typeof r!="object"&&(r=[r]),Uh(r))for(D=0,X=r.length;D<X;D++)a.call(null,r[D],D,r);else{if(am(r))return;const A=g?Object.getOwnPropertyNames(r):Object.keys(r),b=A.length;let e;for(D=0;D<b;D++)e=A[D],a.call(null,r[e],e,r)}}function F6(r,a){if(am(r))return null;a=a.toLowerCase();const g=Object.keys(r);let D=g.length,X;for(;D-- >0;)if(X=g[D],a===X.toLowerCase())return X;return null}const Yp=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,j6=r=>!im(r)&&r!==Yp;function J2(){const{caseless:r}=j6(this)&&this||{},a={},g=(D,X)=>{const A=r&&F6(a,X)||X;cy(a[A])&&cy(D)?a[A]=J2(a[A],D):cy(D)?a[A]=J2({},D):Uh(D)?a[A]=D.slice():a[A]=D};for(let D=0,X=arguments.length;D<X;D++)arguments[D]&&sm(arguments[D],g);return a}const Zue=(r,a,g,{allOwnKeys:D}={})=>(sm(a,(X,A)=>{g&&fu(X)?r[A]=z6(X,g):r[A]=X},{allOwnKeys:D}),r),Yue=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),Que=(r,a,g,D)=>{r.prototype=Object.create(a.prototype,D),r.prototype.constructor=r,Object.defineProperty(r,"super",{value:a.prototype}),g&&Object.assign(r.prototype,g)},$ue=(r,a,g,D)=>{let X,A,b;const e={};if(a=a||{},r==null)return a;do{for(X=Object.getOwnPropertyNames(r),A=X.length;A-- >0;)b=X[A],(!D||D(b,r,a))&&!e[b]&&(a[b]=r[b],e[b]=!0);r=g!==!1&&H2(r)}while(r&&(!g||g(r,a))&&r!==Object.prototype);return a},ede=(r,a,g)=>{r=String(r),(g===void 0||g>r.length)&&(g=r.length),g-=a.length;const D=r.indexOf(a,g);return D!==-1&&D===g},tde=r=>{if(!r)return null;if(Uh(r))return r;let a=r.length;if(!V6(a))return null;const g=new Array(a);for(;a-- >0;)g[a]=r[a];return g},rde=(r=>a=>r&&a instanceof r)(typeof Uint8Array<"u"&&H2(Uint8Array)),nde=(r,a)=>{const D=(r&&r[oy]).call(r);let X;for(;(X=D.next())&&!X.done;){const A=X.value;a.call(r,A[0],A[1])}},ide=(r,a)=>{let g;const D=[];for(;(g=r.exec(a))!==null;)D.push(g);return D},ade=ed("HTMLFormElement"),ode=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(g,D,X){return D.toUpperCase()+X}),U6=(({hasOwnProperty:r})=>(a,g)=>r.call(a,g))(Object.prototype),sde=ed("RegExp"),q6=(r,a)=>{const g=Object.getOwnPropertyDescriptors(r),D={};sm(g,(X,A)=>{let b;(b=a(X,A,r))!==!1&&(D[A]=b||X)}),Object.defineProperties(r,D)},lde=r=>{q6(r,(a,g)=>{if(fu(r)&&["arguments","caller","callee"].indexOf(g)!==-1)return!1;const D=r[g];if(fu(D)){if(a.enumerable=!1,"writable"in a){a.writable=!1;return}a.set||(a.set=()=>{throw Error("Can not rewrite read-only method '"+g+"'")})}})},cde=(r,a)=>{const g={},D=X=>{X.forEach(A=>{g[A]=!0})};return Uh(r)?D(r):D(String(r).split(a)),g},ude=()=>{},dde=(r,a)=>r!=null&&Number.isFinite(r=+r)?r:a;function pde(r){return!!(r&&fu(r.append)&&r[B6]==="FormData"&&r[oy])}const hde=r=>{const a=new Array(10),g=(D,X)=>{if(om(D)){if(a.indexOf(D)>=0)return;if(am(D))return D;if(!("toJSON"in D)){a[X]=D;const A=Uh(D)?[]:{};return sm(D,(b,e)=>{const v=g(b,X+1);!im(v)&&(A[e]=v)}),a[X]=void 0,A}}return D};return g(r,0)},fde=ed("AsyncFunction"),mde=r=>r&&(om(r)||fu(r))&&fu(r.then)&&fu(r.catch),W6=((r,a)=>r?setImmediate:a?((g,D)=>(Yp.addEventListener("message",({source:X,data:A})=>{X===Yp&&A===g&&D.length&&D.shift()()},!1),X=>{D.push(X),Yp.postMessage(g,"*")}))(`axios@${Math.random()}`,[]):g=>setTimeout(g))(typeof setImmediate=="function",fu(Yp.postMessage)),gde=typeof queueMicrotask<"u"?queueMicrotask.bind(Yp):typeof process<"u"&&process.nextTick||W6,Hn={isArray:Uh,isArrayBuffer:D6,isBuffer:am,isFormData:que,isArrayBufferView:Pue,isString:Oue,isNumber:V6,isBoolean:zue,isObject:om,isPlainObject:cy,isEmptyObject:Bue,isReadableStream:Gue,isRequest:Hue,isResponse:Jue,isHeaders:Kue,isUndefined:im,isDate:Due,isFile:Vue,isBlob:Fue,isRegExp:sde,isFunction:fu,isStream:Uue,isURLSearchParams:Wue,isTypedArray:rde,isFileList:jue,forEach:sm,merge:J2,extend:Zue,trim:Xue,stripBOM:Yue,inherits:Que,toFlatObject:$ue,kindOf:sy,kindOfTest:ed,endsWith:ede,toArray:tde,forEachEntry:nde,matchAll:ide,isHTMLForm:ade,hasOwnProperty:U6,hasOwnProp:U6,reduceDescriptors:q6,freezeMethods:lde,toObjectSet:cde,toCamelCase:ode,noop:ude,toFiniteNumber:dde,findKey:F6,global:Yp,isContextDefined:j6,isSpecCompliantForm:pde,toJSONObject:hde,isAsyncFn:fde,isThenable:mde,setImmediate:W6,asap:gde,isIterable:r=>r!=null&&fu(r[oy])};function va(r,a,g,D,X){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=r,this.name="AxiosError",a&&(this.code=a),g&&(this.config=g),D&&(this.request=D),X&&(this.response=X,this.status=X.status?X.status:null)}Hn.inherits(va,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Hn.toJSONObject(this.config),code:this.code,status:this.status}}});const G6=va.prototype,H6={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(r=>{H6[r]={value:r}}),Object.defineProperties(va,H6),Object.defineProperty(G6,"isAxiosError",{value:!0}),va.from=(r,a,g,D,X,A)=>{const b=Object.create(G6);return Hn.toFlatObject(r,b,function(v){return v!==Error.prototype},e=>e!=="isAxiosError"),va.call(b,r.message,a,g,D,X),b.cause=r,b.name=r.name,A&&Object.assign(b,A),b};const yde=null;function K2(r){return Hn.isPlainObject(r)||Hn.isArray(r)}function J6(r){return Hn.endsWith(r,"[]")?r.slice(0,-2):r}function K6(r,a,g){return r?r.concat(a).map(function(X,A){return X=J6(X),!g&&A?"["+X+"]":X}).join(g?".":""):a}function vde(r){return Hn.isArray(r)&&!r.some(K2)}const xde=Hn.toFlatObject(Hn,{},null,function(a){return/^is[A-Z]/.test(a)});function uy(r,a,g){if(!Hn.isObject(r))throw new TypeError("target must be an object");a=a||new FormData,g=Hn.toFlatObject(g,{metaTokens:!0,dots:!1,indexes:!1},!1,function(n,i){return!Hn.isUndefined(i[n])});const D=g.metaTokens,X=g.visitor||t,A=g.dots,b=g.indexes,v=(g.Blob||typeof Blob<"u"&&Blob)&&Hn.isSpecCompliantForm(a);if(!Hn.isFunction(X))throw new TypeError("visitor must be a function");function u(p){if(p===null)return"";if(Hn.isDate(p))return p.toISOString();if(Hn.isBoolean(p))return p.toString();if(!v&&Hn.isBlob(p))throw new va("Blob is not supported. Use a Buffer instead.");return Hn.isArrayBuffer(p)||Hn.isTypedArray(p)?v&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function t(p,n,i){let d=p;if(p&&!i&&typeof p=="object"){if(Hn.endsWith(n,"{}"))n=D?n:n.slice(0,-2),p=JSON.stringify(p);else if(Hn.isArray(p)&&vde(p)||(Hn.isFileList(p)||Hn.endsWith(n,"[]"))&&(d=Hn.toArray(p)))return n=J6(n),d.forEach(function(c,f){!(Hn.isUndefined(c)||c===null)&&a.append(b===!0?K6([n],f,A):b===null?n:n+"[]",u(c))}),!1}return K2(p)?!0:(a.append(K6(i,n,A),u(p)),!1)}const w=[],y=Object.assign(xde,{defaultVisitor:t,convertValue:u,isVisitable:K2});function x(p,n){if(!Hn.isUndefined(p)){if(w.indexOf(p)!==-1)throw Error("Circular reference detected in "+n.join("."));w.push(p),Hn.forEach(p,function(d,s){(!(Hn.isUndefined(d)||d===null)&&X.call(a,d,Hn.isString(s)?s.trim():s,n,y))===!0&&x(d,n?n.concat(s):[s])}),w.pop()}}if(!Hn.isObject(r))throw new TypeError("data must be an object");return x(r),a}function X6(r){const a={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,function(D){return a[D]})}function X2(r,a){this._pairs=[],r&&uy(r,this,a)}const Z6=X2.prototype;Z6.append=function(a,g){this._pairs.push([a,g])},Z6.toString=function(a){const g=a?function(D){return a.call(this,D,X6)}:X6;return this._pairs.map(function(X){return g(X[0])+"="+g(X[1])},"").join("&")};function bde(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Y6(r,a,g){if(!a)return r;const D=g&&g.encode||bde;Hn.isFunction(g)&&(g={serialize:g});const X=g&&g.serialize;let A;if(X?A=X(a,g):A=Hn.isURLSearchParams(a)?a.toString():new X2(a,g).toString(D),A){const b=r.indexOf("#");b!==-1&&(r=r.slice(0,b)),r+=(r.indexOf("?")===-1?"?":"&")+A}return r}class Q6{constructor(){this.handlers=[]}use(a,g,D){return this.handlers.push({fulfilled:a,rejected:g,synchronous:D?D.synchronous:!1,runWhen:D?D.runWhen:null}),this.handlers.length-1}eject(a){this.handlers[a]&&(this.handlers[a]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(a){Hn.forEach(this.handlers,function(D){D!==null&&a(D)})}}const $6={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},_de={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:X2,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Z2=typeof window<"u"&&typeof document<"u",Y2=typeof navigator=="object"&&navigator||void 0,wde=Z2&&(!Y2||["ReactNative","NativeScript","NS"].indexOf(Y2.product)<0),Tde=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",kde=Z2&&window.location.href||"http://localhost",Rc={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Z2,hasStandardBrowserEnv:wde,hasStandardBrowserWebWorkerEnv:Tde,navigator:Y2,origin:kde},Symbol.toStringTag,{value:"Module"})),..._de};function Sde(r,a){return uy(r,new Rc.classes.URLSearchParams,{visitor:function(g,D,X,A){return Rc.isNode&&Hn.isBuffer(g)?(this.append(D,g.toString("base64")),!1):A.defaultVisitor.apply(this,arguments)},...a})}function Cde(r){return Hn.matchAll(/\w+|\[(\w*)]/g,r).map(a=>a[0]==="[]"?"":a[1]||a[0])}function Ede(r){const a={},g=Object.keys(r);let D;const X=g.length;let A;for(D=0;D<X;D++)A=g[D],a[A]=r[A];return a}function eT(r){function a(g,D,X,A){let b=g[A++];if(b==="__proto__")return!0;const e=Number.isFinite(+b),v=A>=g.length;return b=!b&&Hn.isArray(X)?X.length:b,v?(Hn.hasOwnProp(X,b)?X[b]=[X[b],D]:X[b]=D,!e):((!X[b]||!Hn.isObject(X[b]))&&(X[b]=[]),a(g,D,X[b],A)&&Hn.isArray(X[b])&&(X[b]=Ede(X[b])),!e)}if(Hn.isFormData(r)&&Hn.isFunction(r.entries)){const g={};return Hn.forEachEntry(r,(D,X)=>{a(Cde(D),X,g,0)}),g}return null}function Mde(r,a,g){if(Hn.isString(r))try{return(a||JSON.parse)(r),Hn.trim(r)}catch(D){if(D.name!=="SyntaxError")throw D}return(g||JSON.stringify)(r)}const lm={transitional:$6,adapter:["xhr","http","fetch"],transformRequest:[function(a,g){const D=g.getContentType()||"",X=D.indexOf("application/json")>-1,A=Hn.isObject(a);if(A&&Hn.isHTMLForm(a)&&(a=new FormData(a)),Hn.isFormData(a))return X?JSON.stringify(eT(a)):a;if(Hn.isArrayBuffer(a)||Hn.isBuffer(a)||Hn.isStream(a)||Hn.isFile(a)||Hn.isBlob(a)||Hn.isReadableStream(a))return a;if(Hn.isArrayBufferView(a))return a.buffer;if(Hn.isURLSearchParams(a))return g.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),a.toString();let e;if(A){if(D.indexOf("application/x-www-form-urlencoded")>-1)return Sde(a,this.formSerializer).toString();if((e=Hn.isFileList(a))||D.indexOf("multipart/form-data")>-1){const v=this.env&&this.env.FormData;return uy(e?{"files[]":a}:a,v&&new v,this.formSerializer)}}return A||X?(g.setContentType("application/json",!1),Mde(a)):a}],transformResponse:[function(a){const g=this.transitional||lm.transitional,D=g&&g.forcedJSONParsing,X=this.responseType==="json";if(Hn.isResponse(a)||Hn.isReadableStream(a))return a;if(a&&Hn.isString(a)&&(D&&!this.responseType||X)){const b=!(g&&g.silentJSONParsing)&&X;try{return JSON.parse(a)}catch(e){if(b)throw e.name==="SyntaxError"?va.from(e,va.ERR_BAD_RESPONSE,this,null,this.response):e}}return a}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Rc.classes.FormData,Blob:Rc.classes.Blob},validateStatus:function(a){return a>=200&&a<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Hn.forEach(["delete","get","head","post","put","patch"],r=>{lm.headers[r]={}});const Ade=Hn.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Lde=r=>{const a={};let g,D,X;return r&&r.split(`
4082
4082
  `).forEach(function(b){X=b.indexOf(":"),g=b.substring(0,X).trim().toLowerCase(),D=b.substring(X+1).trim(),!(!g||a[g]&&Ade[g])&&(g==="set-cookie"?a[g]?a[g].push(D):a[g]=[D]:a[g]=a[g]?a[g]+", "+D:D)}),a},tT=Symbol("internals");function cm(r){return r&&String(r).trim().toLowerCase()}function dy(r){return r===!1||r==null?r:Hn.isArray(r)?r.map(dy):String(r)}function Rde(r){const a=Object.create(null),g=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let D;for(;D=g.exec(r);)a[D[1]]=D[2];return a}const Nde=r=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim());function Q2(r,a,g,D,X){if(Hn.isFunction(D))return D.call(this,a,g);if(X&&(a=g),!!Hn.isString(a)){if(Hn.isString(D))return a.indexOf(D)!==-1;if(Hn.isRegExp(D))return D.test(a)}}function Ide(r){return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(a,g,D)=>g.toUpperCase()+D)}function Pde(r,a){const g=Hn.toCamelCase(" "+a);["get","set","has"].forEach(D=>{Object.defineProperty(r,D+g,{value:function(X,A,b){return this[D].call(this,a,X,A,b)},configurable:!0})})}let mu=class{constructor(a){a&&this.set(a)}set(a,g,D){const X=this;function A(e,v,u){const t=cm(v);if(!t)throw new Error("header name must be a non-empty string");const w=Hn.findKey(X,t);(!w||X[w]===void 0||u===!0||u===void 0&&X[w]!==!1)&&(X[w||v]=dy(e))}const b=(e,v)=>Hn.forEach(e,(u,t)=>A(u,t,v));if(Hn.isPlainObject(a)||a instanceof this.constructor)b(a,g);else if(Hn.isString(a)&&(a=a.trim())&&!Nde(a))b(Lde(a),g);else if(Hn.isObject(a)&&Hn.isIterable(a)){let e={},v,u;for(const t of a){if(!Hn.isArray(t))throw TypeError("Object iterator must return a key-value pair");e[u=t[0]]=(v=e[u])?Hn.isArray(v)?[...v,t[1]]:[v,t[1]]:t[1]}b(e,g)}else a!=null&&A(g,a,D);return this}get(a,g){if(a=cm(a),a){const D=Hn.findKey(this,a);if(D){const X=this[D];if(!g)return X;if(g===!0)return Rde(X);if(Hn.isFunction(g))return g.call(this,X,D);if(Hn.isRegExp(g))return g.exec(X);throw new TypeError("parser must be boolean|regexp|function")}}}has(a,g){if(a=cm(a),a){const D=Hn.findKey(this,a);return!!(D&&this[D]!==void 0&&(!g||Q2(this,this[D],D,g)))}return!1}delete(a,g){const D=this;let X=!1;function A(b){if(b=cm(b),b){const e=Hn.findKey(D,b);e&&(!g||Q2(D,D[e],e,g))&&(delete D[e],X=!0)}}return Hn.isArray(a)?a.forEach(A):A(a),X}clear(a){const g=Object.keys(this);let D=g.length,X=!1;for(;D--;){const A=g[D];(!a||Q2(this,this[A],A,a,!0))&&(delete this[A],X=!0)}return X}normalize(a){const g=this,D={};return Hn.forEach(this,(X,A)=>{const b=Hn.findKey(D,A);if(b){g[b]=dy(X),delete g[A];return}const e=a?Ide(A):String(A).trim();e!==A&&delete g[A],g[e]=dy(X),D[e]=!0}),this}concat(...a){return this.constructor.concat(this,...a)}toJSON(a){const g=Object.create(null);return Hn.forEach(this,(D,X)=>{D!=null&&D!==!1&&(g[X]=a&&Hn.isArray(D)?D.join(", "):D)}),g}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([a,g])=>a+": "+g).join(`
4083
4083
  `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(a){return a instanceof this?a:new this(a)}static concat(a,...g){const D=new this(a);return g.forEach(X=>D.set(X)),D}static accessor(a){const D=(this[tT]=this[tT]={accessors:{}}).accessors,X=this.prototype;function A(b){const e=cm(b);D[e]||(Pde(X,b),D[e]=!0)}return Hn.isArray(a)?a.forEach(A):A(a),this}};mu.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Hn.reduceDescriptors(mu.prototype,({value:r},a)=>{let g=a[0].toUpperCase()+a.slice(1);return{get:()=>r,set(D){this[g]=D}}}),Hn.freezeMethods(mu);function $2(r,a){const g=this||lm,D=a||g,X=mu.from(D.headers);let A=D.data;return Hn.forEach(r,function(e){A=e.call(g,A,X.normalize(),a?a.status:void 0)}),X.normalize(),A}function rT(r){return!!(r&&r.__CANCEL__)}function qh(r,a,g){va.call(this,r??"canceled",va.ERR_CANCELED,a,g),this.name="CanceledError"}Hn.inherits(qh,va,{__CANCEL__:!0});function nT(r,a,g){const D=g.config.validateStatus;!g.status||!D||D(g.status)?r(g):a(new va("Request failed with status code "+g.status,[va.ERR_BAD_REQUEST,va.ERR_BAD_RESPONSE][Math.floor(g.status/100)-4],g.config,g.request,g))}function Ode(r){const a=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return a&&a[1]||""}function zde(r,a){r=r||10;const g=new Array(r),D=new Array(r);let X=0,A=0,b;return a=a!==void 0?a:1e3,function(v){const u=Date.now(),t=D[A];b||(b=u),g[X]=v,D[X]=u;let w=A,y=0;for(;w!==X;)y+=g[w++],w=w%r;if(X=(X+1)%r,X===A&&(A=(A+1)%r),u-b<a)return;const x=t&&u-t;return x?Math.round(y*1e3/x):void 0}}function Bde(r,a){let g=0,D=1e3/a,X,A;const b=(u,t=Date.now())=>{g=t,X=null,A&&(clearTimeout(A),A=null),r(...u)};return[(...u)=>{const t=Date.now(),w=t-g;w>=D?b(u,t):(X=u,A||(A=setTimeout(()=>{A=null,b(X)},D-w)))},()=>X&&b(X)]}const py=(r,a,g=3)=>{let D=0;const X=zde(50,250);return Bde(A=>{const b=A.loaded,e=A.lengthComputable?A.total:void 0,v=b-D,u=X(v),t=b<=e;D=b;const w={loaded:b,total:e,progress:e?b/e:void 0,bytes:v,rate:u||void 0,estimated:u&&e&&t?(e-b)/u:void 0,event:A,lengthComputable:e!=null,[a?"download":"upload"]:!0};r(w)},g)},iT=(r,a)=>{const g=r!=null;return[D=>a[0]({lengthComputable:g,total:r,loaded:D}),a[1]]},aT=r=>(...a)=>Hn.asap(()=>r(...a)),Dde=Rc.hasStandardBrowserEnv?((r,a)=>g=>(g=new URL(g,Rc.origin),r.protocol===g.protocol&&r.host===g.host&&(a||r.port===g.port)))(new URL(Rc.origin),Rc.navigator&&/(msie|trident)/i.test(Rc.navigator.userAgent)):()=>!0,Vde=Rc.hasStandardBrowserEnv?{write(r,a,g,D,X,A){const b=[r+"="+encodeURIComponent(a)];Hn.isNumber(g)&&b.push("expires="+new Date(g).toGMTString()),Hn.isString(D)&&b.push("path="+D),Hn.isString(X)&&b.push("domain="+X),A===!0&&b.push("secure"),document.cookie=b.join("; ")},read(r){const a=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return a?decodeURIComponent(a[3]):null},remove(r){this.write(r,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Fde(r){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}function jde(r,a){return a?r.replace(/\/?\/$/,"")+"/"+a.replace(/^\/+/,""):r}function oT(r,a,g){let D=!Fde(a);return r&&(D||g==!1)?jde(r,a):a}const sT=r=>r instanceof mu?{...r}:r;function Qp(r,a){a=a||{};const g={};function D(u,t,w,y){return Hn.isPlainObject(u)&&Hn.isPlainObject(t)?Hn.merge.call({caseless:y},u,t):Hn.isPlainObject(t)?Hn.merge({},t):Hn.isArray(t)?t.slice():t}function X(u,t,w,y){if(Hn.isUndefined(t)){if(!Hn.isUndefined(u))return D(void 0,u,w,y)}else return D(u,t,w,y)}function A(u,t){if(!Hn.isUndefined(t))return D(void 0,t)}function b(u,t){if(Hn.isUndefined(t)){if(!Hn.isUndefined(u))return D(void 0,u)}else return D(void 0,t)}function e(u,t,w){if(w in a)return D(u,t);if(w in r)return D(void 0,u)}const v={url:A,method:A,data:A,baseURL:b,transformRequest:b,transformResponse:b,paramsSerializer:b,timeout:b,timeoutMessage:b,withCredentials:b,withXSRFToken:b,adapter:b,responseType:b,xsrfCookieName:b,xsrfHeaderName:b,onUploadProgress:b,onDownloadProgress:b,decompress:b,maxContentLength:b,maxBodyLength:b,beforeRedirect:b,transport:b,httpAgent:b,httpsAgent:b,cancelToken:b,socketPath:b,responseEncoding:b,validateStatus:e,headers:(u,t,w)=>X(sT(u),sT(t),w,!0)};return Hn.forEach(Object.keys({...r,...a}),function(t){const w=v[t]||X,y=w(r[t],a[t],t);Hn.isUndefined(y)&&w!==e||(g[t]=y)}),g}const lT=r=>{const a=Qp({},r);let{data:g,withXSRFToken:D,xsrfHeaderName:X,xsrfCookieName:A,headers:b,auth:e}=a;a.headers=b=mu.from(b),a.url=Y6(oT(a.baseURL,a.url,a.allowAbsoluteUrls),r.params,r.paramsSerializer),e&&b.set("Authorization","Basic "+btoa((e.username||"")+":"+(e.password?unescape(encodeURIComponent(e.password)):"")));let v;if(Hn.isFormData(g)){if(Rc.hasStandardBrowserEnv||Rc.hasStandardBrowserWebWorkerEnv)b.setContentType(void 0);else if((v=b.getContentType())!==!1){const[u,...t]=v?v.split(";").map(w=>w.trim()).filter(Boolean):[];b.setContentType([u||"multipart/form-data",...t].join("; "))}}if(Rc.hasStandardBrowserEnv&&(D&&Hn.isFunction(D)&&(D=D(a)),D||D!==!1&&Dde(a.url))){const u=X&&A&&Vde.read(A);u&&b.set(X,u)}return a},Ude=typeof XMLHttpRequest<"u"&&function(r){return new Promise(function(g,D){const X=lT(r);let A=X.data;const b=mu.from(X.headers).normalize();let{responseType:e,onUploadProgress:v,onDownloadProgress:u}=X,t,w,y,x,p;function n(){x&&x(),p&&p(),X.cancelToken&&X.cancelToken.unsubscribe(t),X.signal&&X.signal.removeEventListener("abort",t)}let i=new XMLHttpRequest;i.open(X.method.toUpperCase(),X.url,!0),i.timeout=X.timeout;function d(){if(!i)return;const c=mu.from("getAllResponseHeaders"in i&&i.getAllResponseHeaders()),m={data:!e||e==="text"||e==="json"?i.responseText:i.response,status:i.status,statusText:i.statusText,headers:c,config:r,request:i};nT(function(C){g(C),n()},function(C){D(C),n()},m),i=null}"onloadend"in i?i.onloadend=d:i.onreadystatechange=function(){!i||i.readyState!==4||i.status===0&&!(i.responseURL&&i.responseURL.indexOf("file:")===0)||setTimeout(d)},i.onabort=function(){i&&(D(new va("Request aborted",va.ECONNABORTED,r,i)),i=null)},i.onerror=function(){D(new va("Network Error",va.ERR_NETWORK,r,i)),i=null},i.ontimeout=function(){let f=X.timeout?"timeout of "+X.timeout+"ms exceeded":"timeout exceeded";const m=X.transitional||$6;X.timeoutErrorMessage&&(f=X.timeoutErrorMessage),D(new va(f,m.clarifyTimeoutError?va.ETIMEDOUT:va.ECONNABORTED,r,i)),i=null},A===void 0&&b.setContentType(null),"setRequestHeader"in i&&Hn.forEach(b.toJSON(),function(f,m){i.setRequestHeader(m,f)}),Hn.isUndefined(X.withCredentials)||(i.withCredentials=!!X.withCredentials),e&&e!=="json"&&(i.responseType=X.responseType),u&&([y,p]=py(u,!0),i.addEventListener("progress",y)),v&&i.upload&&([w,x]=py(v),i.upload.addEventListener("progress",w),i.upload.addEventListener("loadend",x)),(X.cancelToken||X.signal)&&(t=c=>{i&&(D(!c||c.type?new qh(null,r,i):c),i.abort(),i=null)},X.cancelToken&&X.cancelToken.subscribe(t),X.signal&&(X.signal.aborted?t():X.signal.addEventListener("abort",t)));const s=Ode(X.url);if(s&&Rc.protocols.indexOf(s)===-1){D(new va("Unsupported protocol "+s+":",va.ERR_BAD_REQUEST,r));return}i.send(A||null)})},qde=(r,a)=>{const{length:g}=r=r?r.filter(Boolean):[];if(a||g){let D=new AbortController,X;const A=function(u){if(!X){X=!0,e();const t=u instanceof Error?u:this.reason;D.abort(t instanceof va?t:new qh(t instanceof Error?t.message:t))}};let b=a&&setTimeout(()=>{b=null,A(new va(`timeout ${a} of ms exceeded`,va.ETIMEDOUT))},a);const e=()=>{r&&(b&&clearTimeout(b),b=null,r.forEach(u=>{u.unsubscribe?u.unsubscribe(A):u.removeEventListener("abort",A)}),r=null)};r.forEach(u=>u.addEventListener("abort",A));const{signal:v}=D;return v.unsubscribe=()=>Hn.asap(e),v}},Wde=function*(r,a){let g=r.byteLength;if(g<a){yield r;return}let D=0,X;for(;D<g;)X=D+a,yield r.slice(D,X),D=X},Gde=async function*(r,a){for await(const g of Hde(r))yield*Wde(g,a)},Hde=async function*(r){if(r[Symbol.asyncIterator]){yield*r;return}const a=r.getReader();try{for(;;){const{done:g,value:D}=await a.read();if(g)break;yield D}}finally{await a.cancel()}},cT=(r,a,g,D)=>{const X=Gde(r,a);let A=0,b,e=v=>{b||(b=!0,D&&D(v))};return new ReadableStream({async pull(v){try{const{done:u,value:t}=await X.next();if(u){e(),v.close();return}let w=t.byteLength;if(g){let y=A+=w;g(y)}v.enqueue(new Uint8Array(t))}catch(u){throw e(u),u}},cancel(v){return e(v),X.return()}},{highWaterMark:2})},hy=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",uT=hy&&typeof ReadableStream=="function",Jde=hy&&(typeof TextEncoder=="function"?(r=>a=>r.encode(a))(new TextEncoder):async r=>new Uint8Array(await new Response(r).arrayBuffer())),dT=(r,...a)=>{try{return!!r(...a)}catch{return!1}},Kde=uT&&dT(()=>{let r=!1;const a=new Request(Rc.origin,{body:new ReadableStream,method:"POST",get duplex(){return r=!0,"half"}}).headers.has("Content-Type");return r&&!a}),pT=64*1024,ex=uT&&dT(()=>Hn.isReadableStream(new Response("").body)),fy={stream:ex&&(r=>r.body)};hy&&(r=>{["text","arrayBuffer","blob","formData","stream"].forEach(a=>{!fy[a]&&(fy[a]=Hn.isFunction(r[a])?g=>g[a]():(g,D)=>{throw new va(`Response type '${a}' is not supported`,va.ERR_NOT_SUPPORT,D)})})})(new Response);const Xde=async r=>{if(r==null)return 0;if(Hn.isBlob(r))return r.size;if(Hn.isSpecCompliantForm(r))return(await new Request(Rc.origin,{method:"POST",body:r}).arrayBuffer()).byteLength;if(Hn.isArrayBufferView(r)||Hn.isArrayBuffer(r))return r.byteLength;if(Hn.isURLSearchParams(r)&&(r=r+""),Hn.isString(r))return(await Jde(r)).byteLength},Zde=async(r,a)=>{const g=Hn.toFiniteNumber(r.getContentLength());return g??Xde(a)},tx={http:yde,xhr:Ude,fetch:hy&&(async r=>{let{url:a,method:g,data:D,signal:X,cancelToken:A,timeout:b,onDownloadProgress:e,onUploadProgress:v,responseType:u,headers:t,withCredentials:w="same-origin",fetchOptions:y}=lT(r);u=u?(u+"").toLowerCase():"text";let x=qde([X,A&&A.toAbortSignal()],b),p;const n=x&&x.unsubscribe&&(()=>{x.unsubscribe()});let i;try{if(v&&Kde&&g!=="get"&&g!=="head"&&(i=await Zde(t,D))!==0){let m=new Request(a,{method:"POST",body:D,duplex:"half"}),T;if(Hn.isFormData(D)&&(T=m.headers.get("content-type"))&&t.setContentType(T),m.body){const[C,S]=iT(i,py(aT(v)));D=cT(m.body,pT,C,S)}}Hn.isString(w)||(w=w?"include":"omit");const d="credentials"in Request.prototype;p=new Request(a,{...y,signal:x,method:g.toUpperCase(),headers:t.normalize().toJSON(),body:D,duplex:"half",credentials:d?w:void 0});let s=await fetch(p,y);const c=ex&&(u==="stream"||u==="response");if(ex&&(e||c&&n)){const m={};["status","statusText","headers"].forEach(L=>{m[L]=s[L]});const T=Hn.toFiniteNumber(s.headers.get("content-length")),[C,S]=e&&iT(T,py(aT(e),!0))||[];s=new Response(cT(s.body,pT,C,()=>{S&&S(),n&&n()}),m)}u=u||"text";let f=await fy[Hn.findKey(fy,u)||"text"](s,r);return!c&&n&&n(),await new Promise((m,T)=>{nT(m,T,{data:f,headers:mu.from(s.headers),status:s.status,statusText:s.statusText,config:r,request:p})})}catch(d){throw n&&n(),d&&d.name==="TypeError"&&/Load failed|fetch/i.test(d.message)?Object.assign(new va("Network Error",va.ERR_NETWORK,r,p),{cause:d.cause||d}):va.from(d,d&&d.code,r,p)}})};Hn.forEach(tx,(r,a)=>{if(r){try{Object.defineProperty(r,"name",{value:a})}catch{}Object.defineProperty(r,"adapterName",{value:a})}});const hT=r=>`- ${r}`,Yde=r=>Hn.isFunction(r)||r===null||r===!1,fT={getAdapter:r=>{r=Hn.isArray(r)?r:[r];const{length:a}=r;let g,D;const X={};for(let A=0;A<a;A++){g=r[A];let b;if(D=g,!Yde(g)&&(D=tx[(b=String(g)).toLowerCase()],D===void 0))throw new va(`Unknown adapter '${b}'`);if(D)break;X[b||"#"+A]=D}if(!D){const A=Object.entries(X).map(([e,v])=>`adapter ${e} `+(v===!1?"is not supported by the environment":"is not available in the build"));let b=a?A.length>1?`since :
4084
4084
  `+A.map(hT).join(`