@golstats/gsc-game-data 1.1.24 → 1.1.26

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.
@@ -4129,11 +4129,11 @@ uniform ${Fe} ${Ge} u_${rt};
4129
4129
  #endif
4130
4130
  `}),staticAttributes:D,staticUniforms:oe}}class Dr{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(u,f,D,V,J,oe,fe,xe,Ee){this.context=u;let Fe=this.boundPaintVertexBuffers.length!==V.length;for(let Ge=0;!Fe&&Ge<V.length;Ge++)this.boundPaintVertexBuffers[Ge]!==V[Ge]&&(Fe=!0);!this.vao||this.boundProgram!==f||this.boundLayoutVertexBuffer!==D||Fe||this.boundIndexBuffer!==J||this.boundVertexOffset!==oe||this.boundDynamicVertexBuffer!==fe||this.boundDynamicVertexBuffer2!==xe||this.boundDynamicVertexBuffer3!==Ee?this.freshBind(f,D,V,J,oe,fe,xe,Ee):(u.bindVertexArray.set(this.vao),fe&&fe.bind(),J&&J.dynamicDraw&&J.bind(),xe&&xe.bind(),Ee&&Ee.bind())}freshBind(u,f,D,V,J,oe,fe,xe){const Ee=u.numAttributes,Fe=this.context,Ge=Fe.gl;this.vao&&this.destroy(),this.vao=Fe.createVertexArray(),Fe.bindVertexArray.set(this.vao),this.boundProgram=u,this.boundLayoutVertexBuffer=f,this.boundPaintVertexBuffers=D,this.boundIndexBuffer=V,this.boundVertexOffset=J,this.boundDynamicVertexBuffer=oe,this.boundDynamicVertexBuffer2=fe,this.boundDynamicVertexBuffer3=xe,f.enableAttributes(Ge,u);for(const rt of D)rt.enableAttributes(Ge,u);oe&&oe.enableAttributes(Ge,u),fe&&fe.enableAttributes(Ge,u),xe&&xe.enableAttributes(Ge,u),f.bind(),f.setVertexAttribPointers(Ge,u,J);for(const rt of D)rt.bind(),rt.setVertexAttribPointers(Ge,u,J);oe&&(oe.bind(),oe.setVertexAttribPointers(Ge,u,J)),V&&V.bind(),fe&&(fe.bind(),fe.setVertexAttribPointers(Ge,u,J)),xe&&(xe.bind(),xe.setVertexAttribPointers(Ge,u,J)),Fe.currentNumAttributes=Ee}destroy(){this.vao&&(this.context.deleteVertexArray(this.vao),this.vao=null)}}const va=(R,u,f,D,V)=>({u_matrix:R,u_texture:0,u_ele_delta:u,u_fog_matrix:f,u_fog_color:D?D.properties.get("fog-color"):r.aN.white,u_fog_ground_blend:D?D.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:D?D.calculateFogBlendOpacity(V):0,u_horizon_color:D?D.properties.get("horizon-color"):r.aN.white,u_horizon_fog_blend:D?D.properties.get("horizon-fog-blend"):1});function wa(R){const u=[];for(let f=0;f<R.length;f++){if(R[f]===null)continue;const D=R[f].split(" ");u.push(D.pop())}return u}class tr{constructor(u,f,D,V,J,oe){const fe=u.gl;this.program=fe.createProgram();const xe=wa(f.staticAttributes),Ee=D?D.getBinderAttributes():[],Fe=xe.concat(Ee),Ge=br.prelude.staticUniforms?wa(br.prelude.staticUniforms):[],rt=f.staticUniforms?wa(f.staticUniforms):[],ct=D?D.getBinderUniforms():[],pt=Ge.concat(rt).concat(ct),xt=[];for(const Yt of pt)xt.indexOf(Yt)<0&&xt.push(Yt);const Mt=D?D.defines():[];J&&Mt.push("#define OVERDRAW_INSPECTOR;"),oe&&Mt.push("#define TERRAIN3D;");const Tt=Mt.concat(br.prelude.fragmentSource,f.fragmentSource).join(`
4131
4131
  `),jt=Mt.concat(br.prelude.vertexSource,f.vertexSource).join(`
4132
- `),Et=fe.createShader(fe.FRAGMENT_SHADER);if(fe.isContextLost())return void(this.failedToCreate=!0);if(fe.shaderSource(Et,Tt),fe.compileShader(Et),!fe.getShaderParameter(Et,fe.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${fe.getShaderInfoLog(Et)}`);fe.attachShader(this.program,Et);const Jt=fe.createShader(fe.VERTEX_SHADER);if(fe.isContextLost())return void(this.failedToCreate=!0);if(fe.shaderSource(Jt,jt),fe.compileShader(Jt),!fe.getShaderParameter(Jt,fe.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${fe.getShaderInfoLog(Jt)}`);fe.attachShader(this.program,Jt),this.attributes={};const Kt={};this.numAttributes=Fe.length;for(let Yt=0;Yt<this.numAttributes;Yt++)Fe[Yt]&&(fe.bindAttribLocation(this.program,Yt,Fe[Yt]),this.attributes[Fe[Yt]]=Yt);if(fe.linkProgram(this.program),!fe.getProgramParameter(this.program,fe.LINK_STATUS))throw new Error(`Program failed to link: ${fe.getProgramInfoLog(this.program)}`);fe.deleteShader(Jt),fe.deleteShader(Et);for(let Yt=0;Yt<xt.length;Yt++){const da=xt[Yt];if(da&&!Kt[da]){const _a=fe.getUniformLocation(this.program,da);_a&&(Kt[da]=_a)}}this.fixedUniforms=V(u,Kt),this.terrainUniforms=((Yt,da)=>({u_depth:new r.aI(Yt,da.u_depth),u_terrain:new r.aI(Yt,da.u_terrain),u_terrain_dim:new r.aJ(Yt,da.u_terrain_dim),u_terrain_matrix:new r.aK(Yt,da.u_terrain_matrix),u_terrain_unpack:new r.aL(Yt,da.u_terrain_unpack),u_terrain_exaggeration:new r.aJ(Yt,da.u_terrain_exaggeration)}))(u,Kt),this.binderUniforms=D?D.getUniforms(u,Kt):[]}draw(u,f,D,V,J,oe,fe,xe,Ee,Fe,Ge,rt,ct,pt,xt,Mt,Tt,jt){const Et=u.gl;if(this.failedToCreate)return;if(u.program.set(this.program),u.setDepthMode(D),u.setStencilMode(V),u.setColorMode(J),u.setCullFace(oe),xe){u.activeTexture.set(Et.TEXTURE2),Et.bindTexture(Et.TEXTURE_2D,xe.depthTexture),u.activeTexture.set(Et.TEXTURE3),Et.bindTexture(Et.TEXTURE_2D,xe.texture);for(const Kt in this.terrainUniforms)this.terrainUniforms[Kt].set(xe[Kt])}for(const Kt in this.fixedUniforms)this.fixedUniforms[Kt].set(fe[Kt]);xt&&xt.setUniforms(u,this.binderUniforms,ct,{zoom:pt});let Jt=0;switch(f){case Et.LINES:Jt=2;break;case Et.TRIANGLES:Jt=3;break;case Et.LINE_STRIP:Jt=1}for(const Kt of rt.get()){const Yt=Kt.vaos||(Kt.vaos={});(Yt[Ee]||(Yt[Ee]=new Dr)).bind(u,this,Fe,xt?xt.getPaintVertexBuffers():[],Ge,Kt.vertexOffset,Mt,Tt,jt),Et.drawElements(f,Kt.primitiveLength*Jt,Et.UNSIGNED_SHORT,Kt.primitiveOffset*Jt*2)}}}function Va(R,u,f){const D=1/St(f,1,u.transform.tileZoom),V=Math.pow(2,f.tileID.overscaledZ),J=f.tileSize*Math.pow(2,u.transform.tileZoom)/V,oe=J*(f.tileID.canonical.x+f.tileID.wrap*V),fe=J*f.tileID.canonical.y;return{u_image:0,u_texsize:f.imageAtlasTexture.size,u_scale:[D,R.fromScale,R.toScale],u_fade:R.t,u_pixel_coord_upper:[oe>>16,fe>>16],u_pixel_coord_lower:[65535&oe,65535&fe]}}const ar=(R,u,f,D)=>{const V=u.style.light,J=V.properties.get("position"),oe=[J.x,J.y,J.z],fe=function(){var Ee=new r.A(9);return r.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}();V.properties.get("anchor")==="viewport"&&function(Ee,Fe){var Ge=Math.sin(Fe),rt=Math.cos(Fe);Ee[0]=rt,Ee[1]=Ge,Ee[2]=0,Ee[3]=-Ge,Ee[4]=rt,Ee[5]=0,Ee[6]=0,Ee[7]=0,Ee[8]=1}(fe,-u.transform.angle),function(Ee,Fe,Ge){var rt=Fe[0],ct=Fe[1],pt=Fe[2];Ee[0]=rt*Ge[0]+ct*Ge[3]+pt*Ge[6],Ee[1]=rt*Ge[1]+ct*Ge[4]+pt*Ge[7],Ee[2]=rt*Ge[2]+ct*Ge[5]+pt*Ge[8]}(oe,oe,fe);const xe=V.properties.get("color");return{u_matrix:R,u_lightpos:oe,u_lightintensity:V.properties.get("intensity"),u_lightcolor:[xe.r,xe.g,xe.b],u_vertical_gradient:+f,u_opacity:D}},vr=(R,u,f,D,V,J,oe)=>r.e(ar(R,u,f,D),Va(J,u,oe),{u_height_factor:-Math.pow(2,V.overscaledZ)/oe.tileSize/8}),mr=R=>({u_matrix:R}),Br=(R,u,f,D)=>r.e(mr(R),Va(f,u,D)),Ur=(R,u)=>({u_matrix:R,u_world:u}),ma=(R,u,f,D,V)=>r.e(Br(R,u,f,D),{u_world:V}),Ua=(R,u,f,D)=>{const V=R.transform;let J,oe;if(D.paint.get("circle-pitch-alignment")==="map"){const fe=St(f,1,V.zoom);J=!0,oe=[fe,fe]}else J=!1,oe=V.pixelsToGLUnits;return{u_camera_to_center_distance:V.cameraToCenterDistance,u_scale_with_map:+(D.paint.get("circle-pitch-scale")==="map"),u_matrix:R.translatePosMatrix(u.posMatrix,f,D.paint.get("circle-translate"),D.paint.get("circle-translate-anchor")),u_pitch_with_map:+J,u_device_pixel_ratio:R.pixelRatio,u_extrude_scale:oe}},ta=(R,u)=>({u_matrix:u,u_pixel_extrude_scale:[1/R.width,1/R.height]}),ca=(R,u,f)=>({u_matrix:R,u_inv_matrix:u,u_camera_to_center_distance:f.cameraToCenterDistance,u_viewport_size:[f.width,f.height]}),fa=(R,u,f=1)=>({u_matrix:R,u_color:u,u_overlay:0,u_overlay_scale:f}),Oa=R=>({u_matrix:R}),za=(R,u,f,D)=>({u_matrix:R,u_extrude_scale:St(u,1,f),u_intensity:D}),qa=(R,u,f,D)=>{const V=r.H();r.aQ(V,0,R.width,R.height,0,0,1);const J=R.context.gl;return{u_matrix:V,u_world:[J.drawingBufferWidth,J.drawingBufferHeight],u_image:f,u_color_ramp:D,u_opacity:u.paint.get("heatmap-opacity")}},Ra=(R,u,f,D)=>{const V=f.paint.get("hillshade-shadow-color"),J=f.paint.get("hillshade-highlight-color"),oe=f.paint.get("hillshade-accent-color");let fe=f.paint.get("hillshade-illumination-direction")*(Math.PI/180);f.paint.get("hillshade-illumination-anchor")==="viewport"&&(fe-=R.transform.angle);const xe=!R.options.moving;return{u_matrix:D?D.posMatrix:R.transform.calculatePosMatrix(u.tileID.toUnwrapped(),xe),u_image:0,u_latrange:la(0,u.tileID),u_light:[f.paint.get("hillshade-exaggeration"),fe],u_shadow:V,u_highlight:J,u_accent:oe}},Ia=(R,u)=>{const f=u.stride,D=r.H();return r.aQ(D,0,r.X,-r.X,0,0,1),r.J(D,D,[0,-r.X,0]),{u_matrix:D,u_image:1,u_dimension:[f,f],u_zoom:R.overscaledZ,u_unpack:u.getUnpackVector()}};function la(R,u){const f=Math.pow(2,u.canonical.z),D=u.canonical.y;return[new r.Z(0,D/f).toLngLat().lat,new r.Z(0,(D+1)/f).toLngLat().lat]}const oa=(R,u,f,D)=>{const V=R.transform;return{u_matrix:cr(R,u,f,D),u_ratio:1/St(u,1,V.zoom),u_device_pixel_ratio:R.pixelRatio,u_units_to_pixels:[1/V.pixelsToGLUnits[0],1/V.pixelsToGLUnits[1]]}},Sa=(R,u,f,D,V)=>r.e(oa(R,u,f,V),{u_image:0,u_image_height:D}),Ja=(R,u,f,D,V)=>{const J=R.transform,oe=sr(u,J);return{u_matrix:cr(R,u,f,V),u_texsize:u.imageAtlasTexture.size,u_ratio:1/St(u,1,J.zoom),u_device_pixel_ratio:R.pixelRatio,u_image:0,u_scale:[oe,D.fromScale,D.toScale],u_fade:D.t,u_units_to_pixels:[1/J.pixelsToGLUnits[0],1/J.pixelsToGLUnits[1]]}},lr=(R,u,f,D,V,J)=>{const oe=R.transform,fe=R.lineAtlas,xe=sr(u,oe),Ee=f.layout.get("line-cap")==="round",Fe=fe.getDash(D.from,Ee),Ge=fe.getDash(D.to,Ee),rt=Fe.width*V.fromScale,ct=Ge.width*V.toScale;return r.e(oa(R,u,f,J),{u_patternscale_a:[xe/rt,-Fe.height/2],u_patternscale_b:[xe/ct,-Ge.height/2],u_sdfgamma:fe.width/(256*Math.min(rt,ct)*R.pixelRatio)/2,u_image:0,u_tex_y_a:Fe.y,u_tex_y_b:Ge.y,u_mix:V.t})};function sr(R,u){return 1/St(R,1,u.tileZoom)}function cr(R,u,f,D){return R.translatePosMatrix(D?D.posMatrix:u.tileID.posMatrix,u,f.paint.get("line-translate"),f.paint.get("line-translate-anchor"))}const Ar=(R,u,f,D,V)=>{return{u_matrix:R,u_tl_parent:u,u_scale_parent:f,u_buffer_scale:1,u_fade_t:D.mix,u_opacity:D.opacity*V.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:V.paint.get("raster-brightness-min"),u_brightness_high:V.paint.get("raster-brightness-max"),u_saturation_factor:(oe=V.paint.get("raster-saturation"),oe>0?1-1/(1.001-oe):-oe),u_contrast_factor:(J=V.paint.get("raster-contrast"),J>0?1/(1-J):1+J),u_spin_weights:wr(V.paint.get("raster-hue-rotate"))};var J,oe};function wr(R){R*=Math.PI/180;const u=Math.sin(R),f=Math.cos(R);return[(2*f+1)/3,(-Math.sqrt(3)*u-f+1)/3,(Math.sqrt(3)*u-f+1)/3]}const Pr=(R,u,f,D,V,J,oe,fe,xe,Ee,Fe,Ge,rt,ct)=>{const pt=oe.transform;return{u_is_size_zoom_constant:+(R==="constant"||R==="source"),u_is_size_feature_constant:+(R==="constant"||R==="camera"),u_size_t:u?u.uSizeT:0,u_size:u?u.uSize:0,u_camera_to_center_distance:pt.cameraToCenterDistance,u_pitch:pt.pitch/360*2*Math.PI,u_rotate_symbol:+f,u_aspect_ratio:pt.width/pt.height,u_fade_change:oe.options.fadeDuration?oe.symbolFadeChange:1,u_matrix:fe,u_label_plane_matrix:xe,u_coord_matrix:Ee,u_is_text:+Ge,u_pitch_with_map:+D,u_is_along_line:V,u_is_variable_anchor:J,u_texsize:rt,u_texture:0,u_translation:Fe,u_pitched_scale:ct}},_r=(R,u,f,D,V,J,oe,fe,xe,Ee,Fe,Ge,rt,ct,pt)=>{const xt=oe.transform;return r.e(Pr(R,u,f,D,V,J,oe,fe,xe,Ee,Fe,Ge,rt,pt),{u_gamma_scale:D?Math.cos(xt._pitch)*xt.cameraToCenterDistance:1,u_device_pixel_ratio:oe.pixelRatio,u_is_halo:+ct})},Cr=(R,u,f,D,V,J,oe,fe,xe,Ee,Fe,Ge,rt,ct)=>r.e(_r(R,u,f,D,V,J,oe,fe,xe,Ee,Fe,!0,Ge,!0,ct),{u_texsize_icon:rt,u_texture_icon:1}),Or=(R,u,f)=>({u_matrix:R,u_opacity:u,u_color:f}),Kr=(R,u,f,D,V,J)=>r.e(function(oe,fe,xe,Ee){const Fe=xe.imageManager.getPattern(oe.from.toString()),Ge=xe.imageManager.getPattern(oe.to.toString()),{width:rt,height:ct}=xe.imageManager.getPixelSize(),pt=Math.pow(2,Ee.tileID.overscaledZ),xt=Ee.tileSize*Math.pow(2,xe.transform.tileZoom)/pt,Mt=xt*(Ee.tileID.canonical.x+Ee.tileID.wrap*pt),Tt=xt*Ee.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:Fe.tl,u_pattern_br_a:Fe.br,u_pattern_tl_b:Ge.tl,u_pattern_br_b:Ge.br,u_texsize:[rt,ct],u_mix:fe.t,u_pattern_size_a:Fe.displaySize,u_pattern_size_b:Ge.displaySize,u_scale_a:fe.fromScale,u_scale_b:fe.toScale,u_tile_units_to_pixels:1/St(Ee,1,xe.transform.tileZoom),u_pixel_coord_upper:[Mt>>16,Tt>>16],u_pixel_coord_lower:[65535&Mt,65535&Tt]}}(D,J,f,V),{u_matrix:R,u_opacity:u}),jr={fillExtrusion:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_lightpos:new r.aO(R,u.u_lightpos),u_lightintensity:new r.aJ(R,u.u_lightintensity),u_lightcolor:new r.aO(R,u.u_lightcolor),u_vertical_gradient:new r.aJ(R,u.u_vertical_gradient),u_opacity:new r.aJ(R,u.u_opacity)}),fillExtrusionPattern:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_lightpos:new r.aO(R,u.u_lightpos),u_lightintensity:new r.aJ(R,u.u_lightintensity),u_lightcolor:new r.aO(R,u.u_lightcolor),u_vertical_gradient:new r.aJ(R,u.u_vertical_gradient),u_height_factor:new r.aJ(R,u.u_height_factor),u_image:new r.aI(R,u.u_image),u_texsize:new r.aP(R,u.u_texsize),u_pixel_coord_upper:new r.aP(R,u.u_pixel_coord_upper),u_pixel_coord_lower:new r.aP(R,u.u_pixel_coord_lower),u_scale:new r.aO(R,u.u_scale),u_fade:new r.aJ(R,u.u_fade),u_opacity:new r.aJ(R,u.u_opacity)}),fill:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix)}),fillPattern:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_image:new r.aI(R,u.u_image),u_texsize:new r.aP(R,u.u_texsize),u_pixel_coord_upper:new r.aP(R,u.u_pixel_coord_upper),u_pixel_coord_lower:new r.aP(R,u.u_pixel_coord_lower),u_scale:new r.aO(R,u.u_scale),u_fade:new r.aJ(R,u.u_fade)}),fillOutline:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_world:new r.aP(R,u.u_world)}),fillOutlinePattern:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_world:new r.aP(R,u.u_world),u_image:new r.aI(R,u.u_image),u_texsize:new r.aP(R,u.u_texsize),u_pixel_coord_upper:new r.aP(R,u.u_pixel_coord_upper),u_pixel_coord_lower:new r.aP(R,u.u_pixel_coord_lower),u_scale:new r.aO(R,u.u_scale),u_fade:new r.aJ(R,u.u_fade)}),circle:(R,u)=>({u_camera_to_center_distance:new r.aJ(R,u.u_camera_to_center_distance),u_scale_with_map:new r.aI(R,u.u_scale_with_map),u_pitch_with_map:new r.aI(R,u.u_pitch_with_map),u_extrude_scale:new r.aP(R,u.u_extrude_scale),u_device_pixel_ratio:new r.aJ(R,u.u_device_pixel_ratio),u_matrix:new r.aK(R,u.u_matrix)}),collisionBox:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_pixel_extrude_scale:new r.aP(R,u.u_pixel_extrude_scale)}),collisionCircle:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_inv_matrix:new r.aK(R,u.u_inv_matrix),u_camera_to_center_distance:new r.aJ(R,u.u_camera_to_center_distance),u_viewport_size:new r.aP(R,u.u_viewport_size)}),debug:(R,u)=>({u_color:new r.aM(R,u.u_color),u_matrix:new r.aK(R,u.u_matrix),u_overlay:new r.aI(R,u.u_overlay),u_overlay_scale:new r.aJ(R,u.u_overlay_scale)}),clippingMask:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix)}),heatmap:(R,u)=>({u_extrude_scale:new r.aJ(R,u.u_extrude_scale),u_intensity:new r.aJ(R,u.u_intensity),u_matrix:new r.aK(R,u.u_matrix)}),heatmapTexture:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_world:new r.aP(R,u.u_world),u_image:new r.aI(R,u.u_image),u_color_ramp:new r.aI(R,u.u_color_ramp),u_opacity:new r.aJ(R,u.u_opacity)}),hillshade:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_image:new r.aI(R,u.u_image),u_latrange:new r.aP(R,u.u_latrange),u_light:new r.aP(R,u.u_light),u_shadow:new r.aM(R,u.u_shadow),u_highlight:new r.aM(R,u.u_highlight),u_accent:new r.aM(R,u.u_accent)}),hillshadePrepare:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_image:new r.aI(R,u.u_image),u_dimension:new r.aP(R,u.u_dimension),u_zoom:new r.aJ(R,u.u_zoom),u_unpack:new r.aL(R,u.u_unpack)}),line:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_ratio:new r.aJ(R,u.u_ratio),u_device_pixel_ratio:new r.aJ(R,u.u_device_pixel_ratio),u_units_to_pixels:new r.aP(R,u.u_units_to_pixels)}),lineGradient:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_ratio:new r.aJ(R,u.u_ratio),u_device_pixel_ratio:new r.aJ(R,u.u_device_pixel_ratio),u_units_to_pixels:new r.aP(R,u.u_units_to_pixels),u_image:new r.aI(R,u.u_image),u_image_height:new r.aJ(R,u.u_image_height)}),linePattern:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_texsize:new r.aP(R,u.u_texsize),u_ratio:new r.aJ(R,u.u_ratio),u_device_pixel_ratio:new r.aJ(R,u.u_device_pixel_ratio),u_image:new r.aI(R,u.u_image),u_units_to_pixels:new r.aP(R,u.u_units_to_pixels),u_scale:new r.aO(R,u.u_scale),u_fade:new r.aJ(R,u.u_fade)}),lineSDF:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_ratio:new r.aJ(R,u.u_ratio),u_device_pixel_ratio:new r.aJ(R,u.u_device_pixel_ratio),u_units_to_pixels:new r.aP(R,u.u_units_to_pixels),u_patternscale_a:new r.aP(R,u.u_patternscale_a),u_patternscale_b:new r.aP(R,u.u_patternscale_b),u_sdfgamma:new r.aJ(R,u.u_sdfgamma),u_image:new r.aI(R,u.u_image),u_tex_y_a:new r.aJ(R,u.u_tex_y_a),u_tex_y_b:new r.aJ(R,u.u_tex_y_b),u_mix:new r.aJ(R,u.u_mix)}),raster:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_tl_parent:new r.aP(R,u.u_tl_parent),u_scale_parent:new r.aJ(R,u.u_scale_parent),u_buffer_scale:new r.aJ(R,u.u_buffer_scale),u_fade_t:new r.aJ(R,u.u_fade_t),u_opacity:new r.aJ(R,u.u_opacity),u_image0:new r.aI(R,u.u_image0),u_image1:new r.aI(R,u.u_image1),u_brightness_low:new r.aJ(R,u.u_brightness_low),u_brightness_high:new r.aJ(R,u.u_brightness_high),u_saturation_factor:new r.aJ(R,u.u_saturation_factor),u_contrast_factor:new r.aJ(R,u.u_contrast_factor),u_spin_weights:new r.aO(R,u.u_spin_weights)}),symbolIcon:(R,u)=>({u_is_size_zoom_constant:new r.aI(R,u.u_is_size_zoom_constant),u_is_size_feature_constant:new r.aI(R,u.u_is_size_feature_constant),u_size_t:new r.aJ(R,u.u_size_t),u_size:new r.aJ(R,u.u_size),u_camera_to_center_distance:new r.aJ(R,u.u_camera_to_center_distance),u_pitch:new r.aJ(R,u.u_pitch),u_rotate_symbol:new r.aI(R,u.u_rotate_symbol),u_aspect_ratio:new r.aJ(R,u.u_aspect_ratio),u_fade_change:new r.aJ(R,u.u_fade_change),u_matrix:new r.aK(R,u.u_matrix),u_label_plane_matrix:new r.aK(R,u.u_label_plane_matrix),u_coord_matrix:new r.aK(R,u.u_coord_matrix),u_is_text:new r.aI(R,u.u_is_text),u_pitch_with_map:new r.aI(R,u.u_pitch_with_map),u_is_along_line:new r.aI(R,u.u_is_along_line),u_is_variable_anchor:new r.aI(R,u.u_is_variable_anchor),u_texsize:new r.aP(R,u.u_texsize),u_texture:new r.aI(R,u.u_texture),u_translation:new r.aP(R,u.u_translation),u_pitched_scale:new r.aJ(R,u.u_pitched_scale)}),symbolSDF:(R,u)=>({u_is_size_zoom_constant:new r.aI(R,u.u_is_size_zoom_constant),u_is_size_feature_constant:new r.aI(R,u.u_is_size_feature_constant),u_size_t:new r.aJ(R,u.u_size_t),u_size:new r.aJ(R,u.u_size),u_camera_to_center_distance:new r.aJ(R,u.u_camera_to_center_distance),u_pitch:new r.aJ(R,u.u_pitch),u_rotate_symbol:new r.aI(R,u.u_rotate_symbol),u_aspect_ratio:new r.aJ(R,u.u_aspect_ratio),u_fade_change:new r.aJ(R,u.u_fade_change),u_matrix:new r.aK(R,u.u_matrix),u_label_plane_matrix:new r.aK(R,u.u_label_plane_matrix),u_coord_matrix:new r.aK(R,u.u_coord_matrix),u_is_text:new r.aI(R,u.u_is_text),u_pitch_with_map:new r.aI(R,u.u_pitch_with_map),u_is_along_line:new r.aI(R,u.u_is_along_line),u_is_variable_anchor:new r.aI(R,u.u_is_variable_anchor),u_texsize:new r.aP(R,u.u_texsize),u_texture:new r.aI(R,u.u_texture),u_gamma_scale:new r.aJ(R,u.u_gamma_scale),u_device_pixel_ratio:new r.aJ(R,u.u_device_pixel_ratio),u_is_halo:new r.aI(R,u.u_is_halo),u_translation:new r.aP(R,u.u_translation),u_pitched_scale:new r.aJ(R,u.u_pitched_scale)}),symbolTextAndIcon:(R,u)=>({u_is_size_zoom_constant:new r.aI(R,u.u_is_size_zoom_constant),u_is_size_feature_constant:new r.aI(R,u.u_is_size_feature_constant),u_size_t:new r.aJ(R,u.u_size_t),u_size:new r.aJ(R,u.u_size),u_camera_to_center_distance:new r.aJ(R,u.u_camera_to_center_distance),u_pitch:new r.aJ(R,u.u_pitch),u_rotate_symbol:new r.aI(R,u.u_rotate_symbol),u_aspect_ratio:new r.aJ(R,u.u_aspect_ratio),u_fade_change:new r.aJ(R,u.u_fade_change),u_matrix:new r.aK(R,u.u_matrix),u_label_plane_matrix:new r.aK(R,u.u_label_plane_matrix),u_coord_matrix:new r.aK(R,u.u_coord_matrix),u_is_text:new r.aI(R,u.u_is_text),u_pitch_with_map:new r.aI(R,u.u_pitch_with_map),u_is_along_line:new r.aI(R,u.u_is_along_line),u_is_variable_anchor:new r.aI(R,u.u_is_variable_anchor),u_texsize:new r.aP(R,u.u_texsize),u_texsize_icon:new r.aP(R,u.u_texsize_icon),u_texture:new r.aI(R,u.u_texture),u_texture_icon:new r.aI(R,u.u_texture_icon),u_gamma_scale:new r.aJ(R,u.u_gamma_scale),u_device_pixel_ratio:new r.aJ(R,u.u_device_pixel_ratio),u_is_halo:new r.aI(R,u.u_is_halo),u_translation:new r.aP(R,u.u_translation),u_pitched_scale:new r.aJ(R,u.u_pitched_scale)}),background:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_opacity:new r.aJ(R,u.u_opacity),u_color:new r.aM(R,u.u_color)}),backgroundPattern:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_opacity:new r.aJ(R,u.u_opacity),u_image:new r.aI(R,u.u_image),u_pattern_tl_a:new r.aP(R,u.u_pattern_tl_a),u_pattern_br_a:new r.aP(R,u.u_pattern_br_a),u_pattern_tl_b:new r.aP(R,u.u_pattern_tl_b),u_pattern_br_b:new r.aP(R,u.u_pattern_br_b),u_texsize:new r.aP(R,u.u_texsize),u_mix:new r.aJ(R,u.u_mix),u_pattern_size_a:new r.aP(R,u.u_pattern_size_a),u_pattern_size_b:new r.aP(R,u.u_pattern_size_b),u_scale_a:new r.aJ(R,u.u_scale_a),u_scale_b:new r.aJ(R,u.u_scale_b),u_pixel_coord_upper:new r.aP(R,u.u_pixel_coord_upper),u_pixel_coord_lower:new r.aP(R,u.u_pixel_coord_lower),u_tile_units_to_pixels:new r.aJ(R,u.u_tile_units_to_pixels)}),terrain:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_texture:new r.aI(R,u.u_texture),u_ele_delta:new r.aJ(R,u.u_ele_delta),u_fog_matrix:new r.aK(R,u.u_fog_matrix),u_fog_color:new r.aM(R,u.u_fog_color),u_fog_ground_blend:new r.aJ(R,u.u_fog_ground_blend),u_fog_ground_blend_opacity:new r.aJ(R,u.u_fog_ground_blend_opacity),u_horizon_color:new r.aM(R,u.u_horizon_color),u_horizon_fog_blend:new r.aJ(R,u.u_horizon_fog_blend)}),terrainDepth:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_ele_delta:new r.aJ(R,u.u_ele_delta)}),terrainCoords:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_texture:new r.aI(R,u.u_texture),u_terrain_coords_id:new r.aJ(R,u.u_terrain_coords_id),u_ele_delta:new r.aJ(R,u.u_ele_delta)}),sky:(R,u)=>({u_sky_color:new r.aM(R,u.u_sky_color),u_horizon_color:new r.aM(R,u.u_horizon_color),u_horizon:new r.aJ(R,u.u_horizon),u_sky_horizon_blend:new r.aJ(R,u.u_sky_horizon_blend)})};class zr{constructor(u,f,D){this.context=u;const V=u.gl;this.buffer=V.createBuffer(),this.dynamicDraw=!!D,this.context.unbindVAO(),u.bindElementBuffer.set(this.buffer),V.bufferData(V.ELEMENT_ARRAY_BUFFER,f.arrayBuffer,this.dynamicDraw?V.DYNAMIC_DRAW:V.STATIC_DRAW),this.dynamicDraw||delete f.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(u){const f=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),f.bufferSubData(f.ELEMENT_ARRAY_BUFFER,0,u.arrayBuffer)}destroy(){const u=this.context.gl;this.buffer&&(u.deleteBuffer(this.buffer),delete this.buffer)}}const Hr={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class bn{constructor(u,f,D,V){this.length=f.length,this.attributes=D,this.itemSize=f.bytesPerElement,this.dynamicDraw=V,this.context=u;const J=u.gl;this.buffer=J.createBuffer(),u.bindVertexBuffer.set(this.buffer),J.bufferData(J.ARRAY_BUFFER,f.arrayBuffer,this.dynamicDraw?J.DYNAMIC_DRAW:J.STATIC_DRAW),this.dynamicDraw||delete f.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(u){if(u.length!==this.length)throw new Error(`Length of new data is ${u.length}, which doesn't match current length of ${this.length}`);const f=this.context.gl;this.bind(),f.bufferSubData(f.ARRAY_BUFFER,0,u.arrayBuffer)}enableAttributes(u,f){for(let D=0;D<this.attributes.length;D++){const V=this.attributes[D],J=f.attributes[V.name];J!==void 0&&u.enableVertexAttribArray(J)}}setVertexAttribPointers(u,f,D){for(let V=0;V<this.attributes.length;V++){const J=this.attributes[V],oe=f.attributes[J.name];oe!==void 0&&u.vertexAttribPointer(oe,J.components,u[Hr[J.type]],!1,this.itemSize,J.offset+this.itemSize*(D||0))}}destroy(){const u=this.context.gl;this.buffer&&(u.deleteBuffer(this.buffer),delete this.buffer)}}const Bn=new WeakMap;function mi(R){var u;if(Bn.has(R))return Bn.get(R);{const f=(u=R.getParameter(R.VERSION))===null||u===void 0?void 0:u.startsWith("WebGL 2.0");return Bn.set(R,f),f}}class En{constructor(u){this.gl=u.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(u){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class fo extends En{getDefault(){return r.aN.transparent}set(u){const f=this.current;(u.r!==f.r||u.g!==f.g||u.b!==f.b||u.a!==f.a||this.dirty)&&(this.gl.clearColor(u.r,u.g,u.b,u.a),this.current=u,this.dirty=!1)}}class ki extends En{getDefault(){return 1}set(u){(u!==this.current||this.dirty)&&(this.gl.clearDepth(u),this.current=u,this.dirty=!1)}}class Hi extends En{getDefault(){return 0}set(u){(u!==this.current||this.dirty)&&(this.gl.clearStencil(u),this.current=u,this.dirty=!1)}}class qo extends En{getDefault(){return[!0,!0,!0,!0]}set(u){const f=this.current;(u[0]!==f[0]||u[1]!==f[1]||u[2]!==f[2]||u[3]!==f[3]||this.dirty)&&(this.gl.colorMask(u[0],u[1],u[2],u[3]),this.current=u,this.dirty=!1)}}class ri extends En{getDefault(){return!0}set(u){(u!==this.current||this.dirty)&&(this.gl.depthMask(u),this.current=u,this.dirty=!1)}}class si extends En{getDefault(){return 255}set(u){(u!==this.current||this.dirty)&&(this.gl.stencilMask(u),this.current=u,this.dirty=!1)}}class os extends En{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(u){const f=this.current;(u.func!==f.func||u.ref!==f.ref||u.mask!==f.mask||this.dirty)&&(this.gl.stencilFunc(u.func,u.ref,u.mask),this.current=u,this.dirty=!1)}}class xo extends En{getDefault(){const u=this.gl;return[u.KEEP,u.KEEP,u.KEEP]}set(u){const f=this.current;(u[0]!==f[0]||u[1]!==f[1]||u[2]!==f[2]||this.dirty)&&(this.gl.stencilOp(u[0],u[1],u[2]),this.current=u,this.dirty=!1)}}class Yo extends En{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const f=this.gl;u?f.enable(f.STENCIL_TEST):f.disable(f.STENCIL_TEST),this.current=u,this.dirty=!1}}class ms extends En{getDefault(){return[0,1]}set(u){const f=this.current;(u[0]!==f[0]||u[1]!==f[1]||this.dirty)&&(this.gl.depthRange(u[0],u[1]),this.current=u,this.dirty=!1)}}class Fo extends En{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const f=this.gl;u?f.enable(f.DEPTH_TEST):f.disable(f.DEPTH_TEST),this.current=u,this.dirty=!1}}class Tl extends En{getDefault(){return this.gl.LESS}set(u){(u!==this.current||this.dirty)&&(this.gl.depthFunc(u),this.current=u,this.dirty=!1)}}class Al extends En{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const f=this.gl;u?f.enable(f.BLEND):f.disable(f.BLEND),this.current=u,this.dirty=!1}}class El extends En{getDefault(){const u=this.gl;return[u.ONE,u.ZERO]}set(u){const f=this.current;(u[0]!==f[0]||u[1]!==f[1]||this.dirty)&&(this.gl.blendFunc(u[0],u[1]),this.current=u,this.dirty=!1)}}class Jo extends En{getDefault(){return r.aN.transparent}set(u){const f=this.current;(u.r!==f.r||u.g!==f.g||u.b!==f.b||u.a!==f.a||this.dirty)&&(this.gl.blendColor(u.r,u.g,u.b,u.a),this.current=u,this.dirty=!1)}}class al extends En{getDefault(){return this.gl.FUNC_ADD}set(u){(u!==this.current||this.dirty)&&(this.gl.blendEquation(u),this.current=u,this.dirty=!1)}}class Ss extends En{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const f=this.gl;u?f.enable(f.CULL_FACE):f.disable(f.CULL_FACE),this.current=u,this.dirty=!1}}class Si extends En{getDefault(){return this.gl.BACK}set(u){(u!==this.current||this.dirty)&&(this.gl.cullFace(u),this.current=u,this.dirty=!1)}}class $i extends En{getDefault(){return this.gl.CCW}set(u){(u!==this.current||this.dirty)&&(this.gl.frontFace(u),this.current=u,this.dirty=!1)}}class Ml extends En{getDefault(){return null}set(u){(u!==this.current||this.dirty)&&(this.gl.useProgram(u),this.current=u,this.dirty=!1)}}class rl extends En{getDefault(){return this.gl.TEXTURE0}set(u){(u!==this.current||this.dirty)&&(this.gl.activeTexture(u),this.current=u,this.dirty=!1)}}class Us extends En{getDefault(){const u=this.gl;return[0,0,u.drawingBufferWidth,u.drawingBufferHeight]}set(u){const f=this.current;(u[0]!==f[0]||u[1]!==f[1]||u[2]!==f[2]||u[3]!==f[3]||this.dirty)&&(this.gl.viewport(u[0],u[1],u[2],u[3]),this.current=u,this.dirty=!1)}}class Il extends En{getDefault(){return null}set(u){if(u===this.current&&!this.dirty)return;const f=this.gl;f.bindFramebuffer(f.FRAMEBUFFER,u),this.current=u,this.dirty=!1}}class Gs extends En{getDefault(){return null}set(u){if(u===this.current&&!this.dirty)return;const f=this.gl;f.bindRenderbuffer(f.RENDERBUFFER,u),this.current=u,this.dirty=!1}}class Pl extends En{getDefault(){return null}set(u){if(u===this.current&&!this.dirty)return;const f=this.gl;f.bindTexture(f.TEXTURE_2D,u),this.current=u,this.dirty=!1}}class Ll extends En{getDefault(){return null}set(u){if(u===this.current&&!this.dirty)return;const f=this.gl;f.bindBuffer(f.ARRAY_BUFFER,u),this.current=u,this.dirty=!1}}class nl extends En{getDefault(){return null}set(u){const f=this.gl;f.bindBuffer(f.ELEMENT_ARRAY_BUFFER,u),this.current=u,this.dirty=!1}}class Po extends En{getDefault(){return null}set(u){var f;if(u===this.current&&!this.dirty)return;const D=this.gl;mi(D)?D.bindVertexArray(u):(f=D.getExtension("OES_vertex_array_object"))===null||f===void 0||f.bindVertexArrayOES(u),this.current=u,this.dirty=!1}}class Hc extends En{getDefault(){return 4}set(u){if(u===this.current&&!this.dirty)return;const f=this.gl;f.pixelStorei(f.UNPACK_ALIGNMENT,u),this.current=u,this.dirty=!1}}class Lc extends En{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const f=this.gl;f.pixelStorei(f.UNPACK_PREMULTIPLY_ALPHA_WEBGL,u),this.current=u,this.dirty=!1}}class ql extends En{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const f=this.gl;f.pixelStorei(f.UNPACK_FLIP_Y_WEBGL,u),this.current=u,this.dirty=!1}}class Zc extends En{constructor(u,f){super(u),this.context=u,this.parent=f}getDefault(){return null}}class eu extends Zc{setDirty(){this.dirty=!0}set(u){if(u===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const f=this.gl;f.framebufferTexture2D(f.FRAMEBUFFER,f.COLOR_ATTACHMENT0,f.TEXTURE_2D,u,0),this.current=u,this.dirty=!1}}class Cs extends Zc{set(u){if(u===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const f=this.gl;f.framebufferRenderbuffer(f.FRAMEBUFFER,f.DEPTH_ATTACHMENT,f.RENDERBUFFER,u),this.current=u,this.dirty=!1}}class tu extends Zc{set(u){if(u===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const f=this.gl;f.framebufferRenderbuffer(f.FRAMEBUFFER,f.DEPTH_STENCIL_ATTACHMENT,f.RENDERBUFFER,u),this.current=u,this.dirty=!1}}class Bu{constructor(u,f,D,V,J){this.context=u,this.width=f,this.height=D;const oe=u.gl,fe=this.framebuffer=oe.createFramebuffer();if(this.colorAttachment=new eu(u,fe),V)this.depthAttachment=J?new tu(u,fe):new Cs(u,fe);else if(J)throw new Error("Stencil cannot be set without depth");if(oe.checkFramebufferStatus(oe.FRAMEBUFFER)!==oe.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer is not complete")}destroy(){const u=this.context.gl,f=this.colorAttachment.get();if(f&&u.deleteTexture(f),this.depthAttachment){const D=this.depthAttachment.get();D&&u.deleteRenderbuffer(D)}u.deleteFramebuffer(this.framebuffer)}}class Qi{constructor(u,f,D){this.blendFunction=u,this.blendColor=f,this.mask=D}}Qi.Replace=[1,0],Qi.disabled=new Qi(Qi.Replace,r.aN.transparent,[!1,!1,!1,!1]),Qi.unblended=new Qi(Qi.Replace,r.aN.transparent,[!0,!0,!0,!0]),Qi.alphaBlended=new Qi([1,771],r.aN.transparent,[!0,!0,!0,!0]);class _c{constructor(u){var f,D;if(this.gl=u,this.clearColor=new fo(this),this.clearDepth=new ki(this),this.clearStencil=new Hi(this),this.colorMask=new qo(this),this.depthMask=new ri(this),this.stencilMask=new si(this),this.stencilFunc=new os(this),this.stencilOp=new xo(this),this.stencilTest=new Yo(this),this.depthRange=new ms(this),this.depthTest=new Fo(this),this.depthFunc=new Tl(this),this.blend=new Al(this),this.blendFunc=new El(this),this.blendColor=new Jo(this),this.blendEquation=new al(this),this.cullFace=new Ss(this),this.cullFaceSide=new Si(this),this.frontFace=new $i(this),this.program=new Ml(this),this.activeTexture=new rl(this),this.viewport=new Us(this),this.bindFramebuffer=new Il(this),this.bindRenderbuffer=new Gs(this),this.bindTexture=new Pl(this),this.bindVertexBuffer=new Ll(this),this.bindElementBuffer=new nl(this),this.bindVertexArray=new Po(this),this.pixelStoreUnpack=new Hc(this),this.pixelStoreUnpackPremultiplyAlpha=new Lc(this),this.pixelStoreUnpackFlipY=new ql(this),this.extTextureFilterAnisotropic=u.getExtension("EXT_texture_filter_anisotropic")||u.getExtension("MOZ_EXT_texture_filter_anisotropic")||u.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=u.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=u.getParameter(u.MAX_TEXTURE_SIZE),mi(u)){this.HALF_FLOAT=u.HALF_FLOAT;const V=u.getExtension("EXT_color_buffer_half_float");this.RGBA16F=(f=u.RGBA16F)!==null&&f!==void 0?f:V==null?void 0:V.RGBA16F_EXT,this.RGB16F=(D=u.RGB16F)!==null&&D!==void 0?D:V==null?void 0:V.RGB16F_EXT,u.getExtension("EXT_color_buffer_float")}else{u.getExtension("EXT_color_buffer_half_float"),u.getExtension("OES_texture_half_float_linear");const V=u.getExtension("OES_texture_half_float");this.HALF_FLOAT=V==null?void 0:V.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(u,f){return new zr(this,u,f)}createVertexBuffer(u,f,D){return new bn(this,u,f,D)}createRenderbuffer(u,f,D){const V=this.gl,J=V.createRenderbuffer();return this.bindRenderbuffer.set(J),V.renderbufferStorage(V.RENDERBUFFER,u,f,D),this.bindRenderbuffer.set(null),J}createFramebuffer(u,f,D,V){return new Bu(this,u,f,D,V)}clear({color:u,depth:f,stencil:D}){const V=this.gl;let J=0;u&&(J|=V.COLOR_BUFFER_BIT,this.clearColor.set(u),this.colorMask.set([!0,!0,!0,!0])),f!==void 0&&(J|=V.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(f),this.depthMask.set(!0)),D!==void 0&&(J|=V.STENCIL_BUFFER_BIT,this.clearStencil.set(D),this.stencilMask.set(255)),V.clear(J)}setCullFace(u){u.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(u.mode),this.frontFace.set(u.frontFace))}setDepthMode(u){u.func!==this.gl.ALWAYS||u.mask?(this.depthTest.set(!0),this.depthFunc.set(u.func),this.depthMask.set(u.mask),this.depthRange.set(u.range)):this.depthTest.set(!1)}setStencilMode(u){u.test.func!==this.gl.ALWAYS||u.mask?(this.stencilTest.set(!0),this.stencilMask.set(u.mask),this.stencilOp.set([u.fail,u.depthFail,u.pass]),this.stencilFunc.set({func:u.test.func,ref:u.ref,mask:u.test.mask})):this.stencilTest.set(!1)}setColorMode(u){r.aF(u.blendFunction,Qi.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(u.blendFunction),this.blendColor.set(u.blendColor)),this.colorMask.set(u.mask)}createVertexArray(){var u;return mi(this.gl)?this.gl.createVertexArray():(u=this.gl.getExtension("OES_vertex_array_object"))===null||u===void 0?void 0:u.createVertexArrayOES()}deleteVertexArray(u){var f;return mi(this.gl)?this.gl.deleteVertexArray(u):(f=this.gl.getExtension("OES_vertex_array_object"))===null||f===void 0?void 0:f.deleteVertexArrayOES(u)}unbindVAO(){this.bindVertexArray.set(null)}}class qn{constructor(u,f,D){this.func=u,this.mask=f,this.range=D}}qn.ReadOnly=!1,qn.ReadWrite=!0,qn.disabled=new qn(519,qn.ReadOnly,[0,1]);const Jl=7680;class _i{constructor(u,f,D,V,J,oe){this.test=u,this.ref=f,this.mask=D,this.fail=V,this.depthFail=J,this.pass=oe}}_i.disabled=new _i({func:519,mask:0},0,0,Jl,Jl,Jl);class xi{constructor(u,f,D){this.enable=u,this.mode=f,this.frontFace=D}}let Ts;function ss(R,u,f,D,V){const J=R.context,oe=J.gl,fe=R.useProgram("collisionBox"),xe=[];let Ee=0,Fe=0;for(let Mt=0;Mt<D.length;Mt++){const Tt=D[Mt],jt=u.getTile(Tt).getBucket(f);if(!jt)continue;const Et=V?jt.textCollisionBox:jt.iconCollisionBox,Jt=jt.collisionCircleArray;if(Jt.length>0){const Kt=r.H();r.aR(Kt,jt.placementInvProjMatrix,R.transform.glCoordMatrix),r.aR(Kt,Kt,jt.placementViewportMatrix),xe.push({circleArray:Jt,circleOffset:Fe,transform:Tt.posMatrix,invTransform:Kt,coord:Tt}),Ee+=Jt.length/4,Fe=Ee}Et&&fe.draw(J,oe.LINES,qn.disabled,_i.disabled,R.colorModeForRenderPass(),xi.disabled,ta(R.transform,Tt.posMatrix),R.style.map.terrain&&R.style.map.terrain.getTerrainData(Tt),f.id,Et.layoutVertexBuffer,Et.indexBuffer,Et.segments,null,R.transform.zoom,null,null,Et.collisionVertexBuffer)}if(!V||!xe.length)return;const Ge=R.useProgram("collisionCircle"),rt=new r.aS;rt.resize(4*Ee),rt._trim();let ct=0;for(const Mt of xe)for(let Tt=0;Tt<Mt.circleArray.length/4;Tt++){const jt=4*Tt,Et=Mt.circleArray[jt+0],Jt=Mt.circleArray[jt+1],Kt=Mt.circleArray[jt+2],Yt=Mt.circleArray[jt+3];rt.emplace(ct++,Et,Jt,Kt,Yt,0),rt.emplace(ct++,Et,Jt,Kt,Yt,1),rt.emplace(ct++,Et,Jt,Kt,Yt,2),rt.emplace(ct++,Et,Jt,Kt,Yt,3)}(!Ts||Ts.length<2*Ee)&&(Ts=function(Mt){const Tt=2*Mt,jt=new r.aU;jt.resize(Tt),jt._trim();for(let Et=0;Et<Tt;Et++){const Jt=6*Et;jt.uint16[Jt+0]=4*Et+0,jt.uint16[Jt+1]=4*Et+1,jt.uint16[Jt+2]=4*Et+2,jt.uint16[Jt+3]=4*Et+2,jt.uint16[Jt+4]=4*Et+3,jt.uint16[Jt+5]=4*Et+0}return jt}(Ee));const pt=J.createIndexBuffer(Ts,!0),xt=J.createVertexBuffer(rt,r.aT.members,!0);for(const Mt of xe){const Tt=ca(Mt.transform,Mt.invTransform,R.transform);Ge.draw(J,oe.TRIANGLES,qn.disabled,_i.disabled,R.colorModeForRenderPass(),xi.disabled,Tt,R.style.map.terrain&&R.style.map.terrain.getTerrainData(Mt.coord),f.id,xt,pt,r.a0.simpleSegment(0,2*Mt.circleOffset,Mt.circleArray.length,Mt.circleArray.length/2),null,R.transform.zoom,null,null,null)}xt.destroy(),pt.destroy()}xi.disabled=new xi(!1,1029,2305),xi.backCCW=new xi(!0,1029,2305);const xc=r.ao(new Float32Array(16));function Bl(R,u,f,D,V){if(R.renderPass!=="translucent")return;const J=_i.disabled,oe=R.colorModeForRenderPass();(f._unevaluatedLayout.hasValue("text-variable-anchor")||f._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(fe,xe,Ee,Fe,Ge,rt,ct,pt,xt){const Mt=xe.transform,Tt=Pa(),jt=Ge==="map",Et=rt==="map";for(const Jt of fe){const Kt=Fe.getTile(Jt),Yt=Kt.getBucket(Ee);if(!Yt||!Yt.text||!Yt.text.segments.get().length)continue;const da=Yt.textSizeData,_a=r.ah(da,Mt.zoom),Da=St(Kt,1,xe.transform.zoom),Na=It(Jt.posMatrix,Et,jt,xe.transform,Da),Ga=Ee.layout.get("icon-text-fit")!=="none"&&Yt.hasIconData();if(_a){const $a=Math.pow(2,Mt.zoom-Kt.tileID.overscaledZ),gr=xe.style.map.terrain?(xr,nr)=>xe.style.map.terrain.getElevation(Jt,xr,nr):null,Qa=Tt.translatePosition(Mt,Kt,ct,pt);wo(Yt,jt,Et,xt,Mt,Na,Jt.posMatrix,$a,_a,Ga,Tt,Qa,Jt.toUnwrapped(),gr)}}}(D,R,f,u,f.layout.get("text-rotation-alignment"),f.layout.get("text-pitch-alignment"),f.paint.get("text-translate"),f.paint.get("text-translate-anchor"),V),f.paint.get("icon-opacity").constantOr(1)!==0&&sc(R,u,f,D,!1,f.paint.get("icon-translate"),f.paint.get("icon-translate-anchor"),f.layout.get("icon-rotation-alignment"),f.layout.get("icon-pitch-alignment"),f.layout.get("icon-keep-upright"),J,oe),f.paint.get("text-opacity").constantOr(1)!==0&&sc(R,u,f,D,!0,f.paint.get("text-translate"),f.paint.get("text-translate-anchor"),f.layout.get("text-rotation-alignment"),f.layout.get("text-pitch-alignment"),f.layout.get("text-keep-upright"),J,oe),u.map.showCollisionBoxes&&(ss(R,u,f,D,!0),ss(R,u,f,D,!1))}function ls(R,u,f,D,V,J){const{horizontalAlign:oe,verticalAlign:fe}=r.av(R),xe=-(oe-.5)*u,Ee=-(fe-.5)*f;return new r.P((xe/V+D[0])*J,(Ee/V+D[1])*J)}function gs(R,u,f,D,V,J){const oe=u.tileAnchorPoint.add(new r.P(u.translation[0],u.translation[1]));if(u.pitchWithMap){let fe=D.mult(J);return f||(fe=fe.rotate(-V)),Gt(oe.add(fe),u.labelPlaneMatrix,u.getElevation).point}if(f){const fe=Ye(u.tileAnchorPoint.x+1,u.tileAnchorPoint.y,u).point.sub(R),xe=Math.atan(fe.y/fe.x)+(fe.x<0?Math.PI:0);return R.add(D.rotate(xe))}return R.add(D)}function wo(R,u,f,D,V,J,oe,fe,xe,Ee,Fe,Ge,rt,ct){const pt=R.text.placedSymbolArray,xt=R.text.dynamicLayoutVertexArray,Mt=R.icon.dynamicLayoutVertexArray,Tt={};xt.clear();for(let jt=0;jt<pt.length;jt++){const Et=pt.get(jt),Jt=R.allowVerticalPlacement&&!Et.placedOrientation,Kt=Et.hidden||!Et.crossTileID||Jt?null:D[Et.crossTileID];if(Kt){const Yt=new r.P(Et.anchorX,Et.anchorY),da={getElevation:ct,width:V.width,height:V.height,labelPlaneMatrix:J,lineVertexArray:null,pitchWithMap:f,projection:Fe,projectionCache:null,tileAnchorPoint:Yt,translation:Ge,unwrappedTileID:rt},_a=f?Gt(Yt,oe,ct):Ye(Yt.x,Yt.y,da),Da=ot(V.cameraToCenterDistance,_a.signedDistanceFromCamera);let Na=r.aj(R.textSizeData,xe,Et)*Da/r.aq;f&&(Na*=R.tilePixelRatio/fe);const{width:Ga,height:$a,anchor:gr,textOffset:Qa,textBoxScale:xr}=Kt,nr=ls(gr,Ga,$a,Qa,xr,Na),Sr=Fe.getPitchedTextCorrection(V,Yt.add(new r.P(Ge[0],Ge[1])),rt),pr=gs(_a.point,da,u,nr,V.angle,Sr),Mr=R.allowVerticalPlacement&&Et.placedOrientation===r.ai.vertical?Math.PI/2:0;for(let Wr=0;Wr<Et.numGlyphs;Wr++)r.ak(xt,pr,Mr);Ee&&Et.associatedIconIndex>=0&&(Tt[Et.associatedIconIndex]={shiftedAnchor:pr,angle:Mr})}else Vt(Et.numGlyphs,xt)}if(Ee){Mt.clear();const jt=R.icon.placedSymbolArray;for(let Et=0;Et<jt.length;Et++){const Jt=jt.get(Et);if(Jt.hidden)Vt(Jt.numGlyphs,Mt);else{const Kt=Tt[Et];if(Kt)for(let Yt=0;Yt<Jt.numGlyphs;Yt++)r.ak(Mt,Kt.shiftedAnchor,Kt.angle);else Vt(Jt.numGlyphs,Mt)}}R.icon.dynamicLayoutVertexBuffer.updateData(Mt)}R.text.dynamicLayoutVertexBuffer.updateData(xt)}function ei(R,u,f){return f.iconsInText&&u?"symbolTextAndIcon":R?"symbolSDF":"symbolIcon"}function sc(R,u,f,D,V,J,oe,fe,xe,Ee,Fe,Ge){const rt=R.context,ct=rt.gl,pt=R.transform,xt=Pa(),Mt=fe==="map",Tt=xe==="map",jt=fe!=="viewport"&&f.layout.get("symbol-placement")!=="point",Et=Mt&&!Tt&&!jt,Jt=!Tt&&jt,Kt=!f.layout.get("symbol-sort-key").isConstant();let Yt=!1;const da=R.depthModeForSublayer(0,qn.ReadOnly),_a=f._unevaluatedLayout.hasValue("text-variable-anchor")||f._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Da=[],Na=xt.getCircleRadiusCorrection(pt);for(const Ga of D){const $a=u.getTile(Ga),gr=$a.getBucket(f);if(!gr)continue;const Qa=V?gr.text:gr.icon;if(!Qa||!Qa.segments.get().length||!Qa.hasVisibleVertices)continue;const xr=Qa.programConfigurations.get(f.id),nr=V||gr.sdfIcons,Sr=V?gr.textSizeData:gr.iconSizeData,pr=Tt||pt.pitch!==0,Mr=R.useProgram(ei(nr,V,gr),xr),Wr=r.ah(Sr,pt.zoom),Er=R.style.map.terrain&&R.style.map.terrain.getTerrainData(Ga);let Gr,rn,Dn,Sn,Gn=[0,0],jn=null;if(V){if(rn=$a.glyphAtlasTexture,Dn=ct.LINEAR,Gr=$a.glyphAtlasTexture.size,gr.iconsInText){Gn=$a.imageAtlasTexture.size,jn=$a.imageAtlasTexture;const Nn=Sr.kind==="composite"||Sr.kind==="camera";Sn=pr||R.options.rotating||R.options.zooming||Nn?ct.LINEAR:ct.NEAREST}}else{const Nn=f.layout.get("icon-size").constantOr(0)!==1||gr.iconsNeedLinear;rn=$a.imageAtlasTexture,Dn=nr||R.options.rotating||R.options.zooming||Nn||pr?ct.LINEAR:ct.NEAREST,Gr=$a.imageAtlasTexture.size}const Jn=St($a,1,R.transform.zoom),oi=Jt?Ga.posMatrix:xc,Vi=It(oi,Tt,Mt,R.transform,Jn),zi=Ot(oi,Tt,Mt,R.transform,Jn),ro=Ot(Ga.posMatrix,Tt,Mt,R.transform,Jn),ci=xt.translatePosition(R.transform,$a,J,oe),$n=_a&&gr.hasTextData(),Ai=f.layout.get("icon-text-fit")!=="none"&&$n&&gr.hasIconData();if(jt){const Nn=R.style.map.terrain?(Xi,bs)=>R.style.map.terrain.getElevation(Ga,Xi,bs):null,To=f.layout.get("text-rotation-alignment")==="map";dt(gr,Ga.posMatrix,R,V,Vi,ro,Tt,Ee,To,xt,Ga.toUnwrapped(),pt.width,pt.height,ci,Nn)}const pi=Ga.posMatrix,ai=V&&_a||Ai,ui=jt||ai?xc:Vi,bi=zi,Kn=nr&&f.paint.get(V?"text-halo-width":"icon-halo-width").constantOr(1)!==0;let Ns;Ns=nr?gr.iconsInText?Cr(Sr.kind,Wr,Et,Tt,jt,ai,R,pi,ui,bi,ci,Gr,Gn,Na):_r(Sr.kind,Wr,Et,Tt,jt,ai,R,pi,ui,bi,ci,V,Gr,!0,Na):Pr(Sr.kind,Wr,Et,Tt,jt,ai,R,pi,ui,bi,ci,V,Gr,Na);const Zi={program:Mr,buffers:Qa,uniformValues:Ns,atlasTexture:rn,atlasTextureIcon:jn,atlasInterpolation:Dn,atlasInterpolationIcon:Sn,isSDF:nr,hasHalo:Kn};if(Kt&&gr.canOverlap){Yt=!0;const Nn=Qa.segments.get();for(const To of Nn)Da.push({segments:new r.a0([To]),sortKey:To.sortKey,state:Zi,terrainData:Er})}else Da.push({segments:Qa.segments,sortKey:0,state:Zi,terrainData:Er})}Yt&&Da.sort((Ga,$a)=>Ga.sortKey-$a.sortKey);for(const Ga of Da){const $a=Ga.state;if(rt.activeTexture.set(ct.TEXTURE0),$a.atlasTexture.bind($a.atlasInterpolation,ct.CLAMP_TO_EDGE),$a.atlasTextureIcon&&(rt.activeTexture.set(ct.TEXTURE1),$a.atlasTextureIcon&&$a.atlasTextureIcon.bind($a.atlasInterpolationIcon,ct.CLAMP_TO_EDGE)),$a.isSDF){const gr=$a.uniformValues;$a.hasHalo&&(gr.u_is_halo=1,au($a.buffers,Ga.segments,f,R,$a.program,da,Fe,Ge,gr,Ga.terrainData)),gr.u_is_halo=0}au($a.buffers,Ga.segments,f,R,$a.program,da,Fe,Ge,$a.uniformValues,Ga.terrainData)}}function au(R,u,f,D,V,J,oe,fe,xe,Ee){const Fe=D.context,Ge=Fe.gl;V.draw(Fe,Ge.TRIANGLES,J,oe,fe,xi.disabled,xe,Ee,f.id,R.layoutVertexBuffer,R.indexBuffer,u,f.paint,D.transform.zoom,R.programConfigurations.get(f.id),R.dynamicLayoutVertexBuffer,R.opacityVertexBuffer)}function zl(R,u,f,D){if(f.paint.get("heatmap-opacity")!==0)if(R.renderPass==="offscreen"){const V=R.context,J=V.gl,oe=_i.disabled,fe=new Qi([J.ONE,J.ONE],r.aN.transparent,[!0,!0,!0,!0]);(function(xe,Ee,Fe){const Ge=xe.gl;xe.activeTexture.set(Ge.TEXTURE1),xe.viewport.set([0,0,Ee.width/4,Ee.height/4]);let rt=Fe.heatmapFbo;if(rt)Ge.bindTexture(Ge.TEXTURE_2D,rt.colorAttachment.get()),xe.bindFramebuffer.set(rt.framebuffer);else{const ct=Ge.createTexture();Ge.bindTexture(Ge.TEXTURE_2D,ct),Ge.texParameteri(Ge.TEXTURE_2D,Ge.TEXTURE_WRAP_S,Ge.CLAMP_TO_EDGE),Ge.texParameteri(Ge.TEXTURE_2D,Ge.TEXTURE_WRAP_T,Ge.CLAMP_TO_EDGE),Ge.texParameteri(Ge.TEXTURE_2D,Ge.TEXTURE_MIN_FILTER,Ge.LINEAR),Ge.texParameteri(Ge.TEXTURE_2D,Ge.TEXTURE_MAG_FILTER,Ge.LINEAR),rt=Fe.heatmapFbo=xe.createFramebuffer(Ee.width/4,Ee.height/4,!1,!1),function(pt,xt,Mt,Tt){var jt,Et;const Jt=pt.gl,Kt=(jt=pt.HALF_FLOAT)!==null&&jt!==void 0?jt:Jt.UNSIGNED_BYTE,Yt=(Et=pt.RGBA16F)!==null&&Et!==void 0?Et:Jt.RGBA;Jt.texImage2D(Jt.TEXTURE_2D,0,Yt,xt.width/4,xt.height/4,0,Jt.RGBA,Kt,null),Tt.colorAttachment.set(Mt)}(xe,Ee,ct,rt)}})(V,R,f),V.clear({color:r.aN.transparent});for(let xe=0;xe<D.length;xe++){const Ee=D[xe];if(u.hasRenderableParent(Ee))continue;const Fe=u.getTile(Ee),Ge=Fe.getBucket(f);if(!Ge)continue;const rt=Ge.programConfigurations.get(f.id),ct=R.useProgram("heatmap",rt),{zoom:pt}=R.transform;ct.draw(V,J.TRIANGLES,qn.disabled,oe,fe,xi.disabled,za(Ee.posMatrix,Fe,pt,f.paint.get("heatmap-intensity")),null,f.id,Ge.layoutVertexBuffer,Ge.indexBuffer,Ge.segments,f.paint,R.transform.zoom,rt)}V.viewport.set([0,0,R.width,R.height])}else R.renderPass==="translucent"&&(R.context.setColorMode(R.colorModeForRenderPass()),function(V,J){const oe=V.context,fe=oe.gl,xe=J.heatmapFbo;if(!xe)return;oe.activeTexture.set(fe.TEXTURE0),fe.bindTexture(fe.TEXTURE_2D,xe.colorAttachment.get()),oe.activeTexture.set(fe.TEXTURE1);let Ee=J.colorRampTexture;Ee||(Ee=J.colorRampTexture=new z(oe,J.colorRamp,fe.RGBA)),Ee.bind(fe.LINEAR,fe.CLAMP_TO_EDGE),V.useProgram("heatmapTexture").draw(oe,fe.TRIANGLES,qn.disabled,_i.disabled,V.colorModeForRenderPass(),xi.disabled,qa(V,J,0,1),null,J.id,V.viewportBuffer,V.quadTriangleIndexBuffer,V.viewportSegments,J.paint,V.transform.zoom)}(R,f))}function Ol(R,u,f,D,V){if(!f||!D||!D.imageAtlas)return;const J=D.imageAtlas.patternPositions;let oe=J[f.to.toString()],fe=J[f.from.toString()];if(!oe&&fe&&(oe=fe),!fe&&oe&&(fe=oe),!oe||!fe){const xe=V.getPaintProperty(u);oe=J[xe],fe=J[xe]}oe&&fe&&R.setConstantPatternPositions(oe,fe)}function Bc(R,u,f,D,V,J,oe){const fe=R.context.gl,xe="fill-pattern",Ee=f.paint.get(xe),Fe=Ee&&Ee.constantOr(1),Ge=f.getCrossfadeParameters();let rt,ct,pt,xt,Mt;oe?(ct=Fe&&!f.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",rt=fe.LINES):(ct=Fe?"fillPattern":"fill",rt=fe.TRIANGLES);const Tt=Ee.constantOr(null);for(const jt of D){const Et=u.getTile(jt);if(Fe&&!Et.patternsLoaded())continue;const Jt=Et.getBucket(f);if(!Jt)continue;const Kt=Jt.programConfigurations.get(f.id),Yt=R.useProgram(ct,Kt),da=R.style.map.terrain&&R.style.map.terrain.getTerrainData(jt);Fe&&(R.context.activeTexture.set(fe.TEXTURE0),Et.imageAtlasTexture.bind(fe.LINEAR,fe.CLAMP_TO_EDGE),Kt.updatePaintBuffers(Ge)),Ol(Kt,xe,Tt,Et,f);const _a=da?jt:null,Da=_a?_a.posMatrix:jt.posMatrix,Na=R.translatePosMatrix(Da,Et,f.paint.get("fill-translate"),f.paint.get("fill-translate-anchor"));if(oe){xt=Jt.indexBuffer2,Mt=Jt.segments2;const Ga=[fe.drawingBufferWidth,fe.drawingBufferHeight];pt=ct==="fillOutlinePattern"&&Fe?ma(Na,R,Ge,Et,Ga):Ur(Na,Ga)}else xt=Jt.indexBuffer,Mt=Jt.segments,pt=Fe?Br(Na,R,Ge,Et):mr(Na);Yt.draw(R.context,rt,V,R.stencilModeForClipping(jt),J,xi.disabled,pt,da,f.id,Jt.layoutVertexBuffer,xt,Mt,f.paint,R.transform.zoom,Kt)}}function wc(R,u,f,D,V,J,oe){const fe=R.context,xe=fe.gl,Ee="fill-extrusion-pattern",Fe=f.paint.get(Ee),Ge=Fe.constantOr(1),rt=f.getCrossfadeParameters(),ct=f.paint.get("fill-extrusion-opacity"),pt=Fe.constantOr(null);for(const xt of D){const Mt=u.getTile(xt),Tt=Mt.getBucket(f);if(!Tt)continue;const jt=R.style.map.terrain&&R.style.map.terrain.getTerrainData(xt),Et=Tt.programConfigurations.get(f.id),Jt=R.useProgram(Ge?"fillExtrusionPattern":"fillExtrusion",Et);Ge&&(R.context.activeTexture.set(xe.TEXTURE0),Mt.imageAtlasTexture.bind(xe.LINEAR,xe.CLAMP_TO_EDGE),Et.updatePaintBuffers(rt)),Ol(Et,Ee,pt,Mt,f);const Kt=R.translatePosMatrix(xt.posMatrix,Mt,f.paint.get("fill-extrusion-translate"),f.paint.get("fill-extrusion-translate-anchor")),Yt=f.paint.get("fill-extrusion-vertical-gradient"),da=Ge?vr(Kt,R,Yt,ct,xt,rt,Mt):ar(Kt,R,Yt,ct);Jt.draw(fe,fe.gl.TRIANGLES,V,J,oe,xi.backCCW,da,jt,f.id,Tt.layoutVertexBuffer,Tt.indexBuffer,Tt.segments,f.paint,R.transform.zoom,Et,R.style.map.terrain&&Tt.centroidVertexBuffer)}}function kc(R,u,f,D,V,J,oe){const fe=R.context,xe=fe.gl,Ee=f.fbo;if(!Ee)return;const Fe=R.useProgram("hillshade"),Ge=R.style.map.terrain&&R.style.map.terrain.getTerrainData(u);fe.activeTexture.set(xe.TEXTURE0),xe.bindTexture(xe.TEXTURE_2D,Ee.colorAttachment.get());const rt=Ge?u:null;Fe.draw(fe,xe.TRIANGLES,V,J,oe,xi.disabled,Ra(R,f,D,rt),Ge,D.id,R.rasterBoundsBuffer,R.quadTriangleIndexBuffer,R.rasterBoundsSegments)}function gu(R,u,f,D,V,J){const oe=R.context,fe=oe.gl,xe=u.dem;if(xe&&xe.data){const Ee=xe.dim,Fe=xe.stride,Ge=xe.getPixels();if(oe.activeTexture.set(fe.TEXTURE1),oe.pixelStoreUnpackPremultiplyAlpha.set(!1),u.demTexture=u.demTexture||R.getTileTexture(Fe),u.demTexture){const ct=u.demTexture;ct.update(Ge,{premultiply:!1}),ct.bind(fe.NEAREST,fe.CLAMP_TO_EDGE)}else u.demTexture=new z(oe,Ge,fe.RGBA,{premultiply:!1}),u.demTexture.bind(fe.NEAREST,fe.CLAMP_TO_EDGE);oe.activeTexture.set(fe.TEXTURE0);let rt=u.fbo;if(!rt){const ct=new z(oe,{width:Ee,height:Ee,data:null},fe.RGBA);ct.bind(fe.LINEAR,fe.CLAMP_TO_EDGE),rt=u.fbo=oe.createFramebuffer(Ee,Ee,!0,!1),rt.colorAttachment.set(ct.texture)}oe.bindFramebuffer.set(rt.framebuffer),oe.viewport.set([0,0,Ee,Ee]),R.useProgram("hillshadePrepare").draw(oe,fe.TRIANGLES,D,V,J,xi.disabled,Ia(u.tileID,xe),null,f.id,R.rasterBoundsBuffer,R.quadTriangleIndexBuffer,R.rasterBoundsSegments),u.needsHillshadePrepare=!1}}function As(R,u,f,D,V,J){const oe=D.paint.get("raster-fade-duration");if(!J&&oe>0){const fe=h.now(),xe=(fe-R.timeAdded)/oe,Ee=u?(fe-u.timeAdded)/oe:-1,Fe=f.getSource(),Ge=V.coveringZoomLevel({tileSize:Fe.tileSize,roundZoom:Fe.roundZoom}),rt=!u||Math.abs(u.tileID.overscaledZ-Ge)>Math.abs(R.tileID.overscaledZ-Ge),ct=rt&&R.refreshedUponExpiration?1:r.ad(rt?xe:1-Ee,0,1);return R.refreshedUponExpiration&&xe>=1&&(R.refreshedUponExpiration=!1),u?{opacity:1,mix:1-ct}:{opacity:ct,mix:0}}return{opacity:1,mix:0}}const Hs=new r.aN(1,0,0,1),Dl=new r.aN(0,1,0,1),Es=new r.aN(0,0,1,1),ti=new r.aN(1,0,1,1),Wc=new r.aN(0,1,1,1);function qc(R){const u=R.transform.padding;zc(R,R.transform.height-(u.top||0),3,Hs),zc(R,u.bottom||0,3,Dl),Lo(R,u.left||0,3,Es),Lo(R,R.transform.width-(u.right||0),3,ti);const f=R.transform.centerPoint;(function(D,V,J,oe){Sc(D,V-1,J-10,2,20,oe),Sc(D,V-10,J-1,20,2,oe)})(R,f.x,R.transform.height-f.y,Wc)}function zc(R,u,f,D){Sc(R,0,u+f/2,R.transform.width,f,D)}function Lo(R,u,f,D){Sc(R,u-f/2,0,f,R.transform.height,D)}function Sc(R,u,f,D,V,J){const oe=R.context,fe=oe.gl;fe.enable(fe.SCISSOR_TEST),fe.scissor(u*R.pixelRatio,f*R.pixelRatio,D*R.pixelRatio,V*R.pixelRatio),oe.clear({color:J}),fe.disable(fe.SCISSOR_TEST)}function Su(R,u,f){const D=R.context,V=D.gl,J=f.posMatrix,oe=R.useProgram("debug"),fe=qn.disabled,xe=_i.disabled,Ee=R.colorModeForRenderPass(),Fe="$debug",Ge=R.style.map.terrain&&R.style.map.terrain.getTerrainData(f);D.activeTexture.set(V.TEXTURE0);const rt=u.getTileByID(f.key).latestRawTileData,ct=rt&&rt.byteLength||0,pt=Math.floor(ct/1024),xt=u.getTile(f).tileSize,Mt=512/Math.min(xt,512)*(f.overscaledZ/R.transform.zoom)*.5;let Tt=f.canonical.toString();f.overscaledZ!==f.canonical.z&&(Tt+=` => ${f.overscaledZ}`),function(jt,Et){jt.initDebugOverlayCanvas();const Jt=jt.debugOverlayCanvas,Kt=jt.context.gl,Yt=jt.debugOverlayCanvas.getContext("2d");Yt.clearRect(0,0,Jt.width,Jt.height),Yt.shadowColor="white",Yt.shadowBlur=2,Yt.lineWidth=1.5,Yt.strokeStyle="white",Yt.textBaseline="top",Yt.font="bold 36px Open Sans, sans-serif",Yt.fillText(Et,5,5),Yt.strokeText(Et,5,5),jt.debugOverlayTexture.update(Jt),jt.debugOverlayTexture.bind(Kt.LINEAR,Kt.CLAMP_TO_EDGE)}(R,`${Tt} ${pt}kB`),oe.draw(D,V.TRIANGLES,fe,xe,Qi.alphaBlended,xi.disabled,fa(J,r.aN.transparent,Mt),null,Fe,R.debugBuffer,R.quadTriangleIndexBuffer,R.debugSegments),oe.draw(D,V.LINE_STRIP,fe,xe,Ee,xi.disabled,fa(J,r.aN.red),Ge,Fe,R.debugBuffer,R.tileBorderIndexBuffer,R.debugSegments)}function lc(R,u,f){const D=R.context,V=D.gl,J=R.colorModeForRenderPass(),oe=new qn(V.LEQUAL,qn.ReadWrite,R.depthRangeFor3D),fe=R.useProgram("terrain"),xe=u.getTerrainMesh();D.bindFramebuffer.set(null),D.viewport.set([0,0,R.width,R.height]);for(const Ee of f){const Fe=R.renderToTexture.getTexture(Ee),Ge=u.getTerrainData(Ee.tileID);D.activeTexture.set(V.TEXTURE0),V.bindTexture(V.TEXTURE_2D,Fe.texture);const rt=R.transform.calculatePosMatrix(Ee.tileID.toUnwrapped()),ct=u.getMeshFrameDelta(R.transform.zoom),pt=R.transform.calculateFogMatrix(Ee.tileID.toUnwrapped()),xt=va(rt,ct,pt,R.style.sky,R.transform.pitch);fe.draw(D,V.TRIANGLES,oe,_i.disabled,J,xi.backCCW,xt,Ge,"terrain",xe.vertexBuffer,xe.indexBuffer,xe.segments)}}class cc{constructor(u,f,D){this.vertexBuffer=u,this.indexBuffer=f,this.segments=D}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}class uc{constructor(u,f){this.context=new _c(u),this.transform=f,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:r.ao(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=We.maxUnderzooming+We.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new er}resize(u,f,D){if(this.width=Math.floor(u*D),this.height=Math.floor(f*D),this.pixelRatio=D,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const V of this.style._order)this.style._layers[V].resize()}setup(){const u=this.context,f=new r.aX;f.emplaceBack(0,0),f.emplaceBack(r.X,0),f.emplaceBack(0,r.X),f.emplaceBack(r.X,r.X),this.tileExtentBuffer=u.createVertexBuffer(f,yr.members),this.tileExtentSegments=r.a0.simpleSegment(0,0,4,2);const D=new r.aX;D.emplaceBack(0,0),D.emplaceBack(r.X,0),D.emplaceBack(0,r.X),D.emplaceBack(r.X,r.X),this.debugBuffer=u.createVertexBuffer(D,yr.members),this.debugSegments=r.a0.simpleSegment(0,0,4,5);const V=new r.$;V.emplaceBack(0,0,0,0),V.emplaceBack(r.X,0,r.X,0),V.emplaceBack(0,r.X,0,r.X),V.emplaceBack(r.X,r.X,r.X,r.X),this.rasterBoundsBuffer=u.createVertexBuffer(V,Ve.members),this.rasterBoundsSegments=r.a0.simpleSegment(0,0,4,2);const J=new r.aX;J.emplaceBack(0,0),J.emplaceBack(1,0),J.emplaceBack(0,1),J.emplaceBack(1,1),this.viewportBuffer=u.createVertexBuffer(J,yr.members),this.viewportSegments=r.a0.simpleSegment(0,0,4,2);const oe=new r.aZ;oe.emplaceBack(0),oe.emplaceBack(1),oe.emplaceBack(3),oe.emplaceBack(2),oe.emplaceBack(0),this.tileBorderIndexBuffer=u.createIndexBuffer(oe);const fe=new r.aY;fe.emplaceBack(0,1,2),fe.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=u.createIndexBuffer(fe);const xe=this.context.gl;this.stencilClearMode=new _i({func:xe.ALWAYS,mask:0},0,255,xe.ZERO,xe.ZERO,xe.ZERO)}clearStencil(){const u=this.context,f=u.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const D=r.H();r.aQ(D,0,this.width,this.height,0,0,1),r.K(D,D,[f.drawingBufferWidth,f.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(u,f.TRIANGLES,qn.disabled,this.stencilClearMode,Qi.disabled,xi.disabled,Oa(D),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(u,f){if(this.currentStencilSource===u.source||!u.isTileClipped()||!f||!f.length)return;this.currentStencilSource=u.source;const D=this.context,V=D.gl;this.nextStencilID+f.length>256&&this.clearStencil(),D.setColorMode(Qi.disabled),D.setDepthMode(qn.disabled);const J=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(const oe of f){const fe=this._tileClippingMaskIDs[oe.key]=this.nextStencilID++,xe=this.style.map.terrain&&this.style.map.terrain.getTerrainData(oe);J.draw(D,V.TRIANGLES,qn.disabled,new _i({func:V.ALWAYS,mask:0},fe,255,V.KEEP,V.KEEP,V.REPLACE),Qi.disabled,xi.disabled,Oa(oe.posMatrix),xe,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const u=this.nextStencilID++,f=this.context.gl;return new _i({func:f.NOTEQUAL,mask:255},u,255,f.KEEP,f.KEEP,f.REPLACE)}stencilModeForClipping(u){const f=this.context.gl;return new _i({func:f.EQUAL,mask:255},this._tileClippingMaskIDs[u.key],0,f.KEEP,f.KEEP,f.REPLACE)}stencilConfigForOverlap(u){const f=this.context.gl,D=u.sort((oe,fe)=>fe.overscaledZ-oe.overscaledZ),V=D[D.length-1].overscaledZ,J=D[0].overscaledZ-V+1;if(J>1){this.currentStencilSource=void 0,this.nextStencilID+J>256&&this.clearStencil();const oe={};for(let fe=0;fe<J;fe++)oe[fe+V]=new _i({func:f.GEQUAL,mask:255},fe+this.nextStencilID,255,f.KEEP,f.KEEP,f.REPLACE);return this.nextStencilID+=J,[oe,D]}return[{[V]:_i.disabled},D]}colorModeForRenderPass(){const u=this.context.gl;return this._showOverdrawInspector?new Qi([u.CONSTANT_COLOR,u.ONE],new r.aN(.125,.125,.125,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?Qi.unblended:Qi.alphaBlended}depthModeForSublayer(u,f,D){if(!this.opaquePassEnabledForLayer())return qn.disabled;const V=1-((1+this.currentLayer)*this.numSublayers+u)*this.depthEpsilon;return new qn(D||this.context.gl.LEQUAL,f,[V,V])}opaquePassEnabledForLayer(){return this.currentLayer<this.opaquePassCutoff}render(u,f){var D;this.style=u,this.options=f,this.lineAtlas=u.lineAtlas,this.imageManager=u.imageManager,this.glyphManager=u.glyphManager,this.symbolFadeChange=u.placement.symbolFadeChange(h.now()),this.imageManager.beginFrame();const V=this.style._order,J=this.style.sourceCaches,oe={},fe={},xe={};for(const Ee in J){const Fe=J[Ee];Fe.used&&Fe.prepare(this.context),oe[Ee]=Fe.getVisibleCoordinates(),fe[Ee]=oe[Ee].slice().reverse(),xe[Ee]=Fe.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let Ee=0;Ee<V.length;Ee++){const Fe=V[Ee];if(this.style._layers[Fe].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 V){const Fe=this.style._layers[Ee];if(!Fe.hasOffscreenPass()||Fe.isHidden(this.transform.zoom))continue;const Ge=fe[Fe.source];(Fe.type==="custom"||Ge.length)&&this.renderLayer(this,J[Fe.source],Fe,Ge)}if(this.context.bindFramebuffer.set(null),this.context.clear({color:f.showOverdrawInspector?r.aN.black:r.aN.transparent,depth:1}),this.clearStencil(),!((D=this.style.stylesheet)===null||D===void 0)&&D.sky&&function(Ee,Fe){const Ge=Ee.context,rt=Ge.gl,ct=((jt,Et,Jt)=>({u_sky_color:jt.properties.get("sky-color"),u_horizon_color:jt.properties.get("horizon-color"),u_horizon:(Et.height/2+Et.getHorizon())*Jt,u_sky_horizon_blend:jt.properties.get("sky-horizon-blend")*Et.height/2*Jt}))(Fe,Ee.style.map.transform,Ee.pixelRatio),pt=new qn(rt.LEQUAL,qn.ReadWrite,[0,1]),xt=_i.disabled,Mt=Ee.colorModeForRenderPass(),Tt=Ee.useProgram("sky");if(!Fe.mesh){const jt=new r.aX;jt.emplaceBack(-1,-1),jt.emplaceBack(1,-1),jt.emplaceBack(1,1),jt.emplaceBack(-1,1);const Et=new r.aY;Et.emplaceBack(0,1,2),Et.emplaceBack(0,2,3),Fe.mesh=new cc(Ge.createVertexBuffer(jt,yr.members),Ge.createIndexBuffer(Et),r.a0.simpleSegment(0,0,jt.length,Et.length))}Tt.draw(Ge,rt.TRIANGLES,pt,xt,Mt,xi.disabled,ct,void 0,"sky",Fe.mesh.vertexBuffer,Fe.mesh.indexBuffer,Fe.mesh.segments)}(this,this.style.sky),this._showOverdrawInspector=f.showOverdrawInspector,this.depthRangeFor3D=[0,1-(u._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=V.length-1;this.currentLayer>=0;this.currentLayer--){const Ee=this.style._layers[V[this.currentLayer]],Fe=J[Ee.source],Ge=oe[Ee.source];this._renderTileClippingMasks(Ee,Ge),this.renderLayer(this,Fe,Ee,Ge)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<V.length;this.currentLayer++){const Ee=this.style._layers[V[this.currentLayer]],Fe=J[Ee.source];if(this.renderToTexture&&this.renderToTexture.renderLayer(Ee))continue;const Ge=(Ee.type==="symbol"?xe:fe)[Ee.source];this._renderTileClippingMasks(Ee,oe[Ee.source]),this.renderLayer(this,Fe,Ee,Ge)}if(this.options.showTileBoundaries){const Ee=function(Fe,Ge){let rt=null;const ct=Object.values(Fe._layers).flatMap(Tt=>Tt.source&&!Tt.isHidden(Ge)?[Fe.sourceCaches[Tt.source]]:[]),pt=ct.filter(Tt=>Tt.getSource().type==="vector"),xt=ct.filter(Tt=>Tt.getSource().type!=="vector"),Mt=Tt=>{(!rt||rt.getSource().maxzoom<Tt.getSource().maxzoom)&&(rt=Tt)};return pt.forEach(Tt=>Mt(Tt)),rt||xt.forEach(Tt=>Mt(Tt)),rt}(this.style,this.transform.zoom);Ee&&function(Fe,Ge,rt){for(let ct=0;ct<rt.length;ct++)Su(Fe,Ge,rt[ct])}(this,Ee,Ee.getVisibleCoordinates())}this.options.showPadding&&qc(this),this.context.setDefault()}maybeDrawDepthAndCoords(u){if(!this.style||!this.style.map||!this.style.map.terrain)return;const f=this.terrainFacilitator.matrix,D=this.transform.modelViewProjectionMatrix;let V=this.terrainFacilitator.dirty;V||(V=u?!r.a_(f,D):!r.a$(f,D)),V||(V=this.style.map.terrain.sourceCache.tilesAfterTime(this.terrainFacilitator.renderTime).length>0),V&&(r.b0(f,D),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(J,oe){const fe=J.context,xe=fe.gl,Ee=Qi.unblended,Fe=new qn(xe.LEQUAL,qn.ReadWrite,[0,1]),Ge=oe.getTerrainMesh(),rt=oe.sourceCache.getRenderableTiles(),ct=J.useProgram("terrainDepth");fe.bindFramebuffer.set(oe.getFramebuffer("depth").framebuffer),fe.viewport.set([0,0,J.width/devicePixelRatio,J.height/devicePixelRatio]),fe.clear({color:r.aN.transparent,depth:1});for(const pt of rt){const xt=oe.getTerrainData(pt.tileID),Mt={u_matrix:J.transform.calculatePosMatrix(pt.tileID.toUnwrapped()),u_ele_delta:oe.getMeshFrameDelta(J.transform.zoom)};ct.draw(fe,xe.TRIANGLES,Fe,_i.disabled,Ee,xi.backCCW,Mt,xt,"terrain",Ge.vertexBuffer,Ge.indexBuffer,Ge.segments)}fe.bindFramebuffer.set(null),fe.viewport.set([0,0,J.width,J.height])}(this,this.style.map.terrain),function(J,oe){const fe=J.context,xe=fe.gl,Ee=Qi.unblended,Fe=new qn(xe.LEQUAL,qn.ReadWrite,[0,1]),Ge=oe.getTerrainMesh(),rt=oe.getCoordsTexture(),ct=oe.sourceCache.getRenderableTiles(),pt=J.useProgram("terrainCoords");fe.bindFramebuffer.set(oe.getFramebuffer("coords").framebuffer),fe.viewport.set([0,0,J.width/devicePixelRatio,J.height/devicePixelRatio]),fe.clear({color:r.aN.transparent,depth:1}),oe.coordsIndex=[];for(const xt of ct){const Mt=oe.getTerrainData(xt.tileID);fe.activeTexture.set(xe.TEXTURE0),xe.bindTexture(xe.TEXTURE_2D,rt.texture);const Tt={u_matrix:J.transform.calculatePosMatrix(xt.tileID.toUnwrapped()),u_terrain_coords_id:(255-oe.coordsIndex.length)/255,u_texture:0,u_ele_delta:oe.getMeshFrameDelta(J.transform.zoom)};pt.draw(fe,xe.TRIANGLES,Fe,_i.disabled,Ee,xi.backCCW,Tt,Mt,"terrain",Ge.vertexBuffer,Ge.indexBuffer,Ge.segments),oe.coordsIndex.push(xt.tileID.key)}fe.bindFramebuffer.set(null),fe.viewport.set([0,0,J.width,J.height])}(this,this.style.map.terrain))}renderLayer(u,f,D,V){if(!D.isHidden(this.transform.zoom)&&(D.type==="background"||D.type==="custom"||(V||[]).length))switch(this.id=D.id,D.type){case"symbol":Bl(u,f,D,V,this.style.placement.variableOffsets);break;case"circle":(function(J,oe,fe,xe){if(J.renderPass!=="translucent")return;const Ee=fe.paint.get("circle-opacity"),Fe=fe.paint.get("circle-stroke-width"),Ge=fe.paint.get("circle-stroke-opacity"),rt=!fe.layout.get("circle-sort-key").isConstant();if(Ee.constantOr(1)===0&&(Fe.constantOr(1)===0||Ge.constantOr(1)===0))return;const ct=J.context,pt=ct.gl,xt=J.depthModeForSublayer(0,qn.ReadOnly),Mt=_i.disabled,Tt=J.colorModeForRenderPass(),jt=[];for(let Et=0;Et<xe.length;Et++){const Jt=xe[Et],Kt=oe.getTile(Jt),Yt=Kt.getBucket(fe);if(!Yt)continue;const da=Yt.programConfigurations.get(fe.id),_a=J.useProgram("circle",da),Da=Yt.layoutVertexBuffer,Na=Yt.indexBuffer,Ga=J.style.map.terrain&&J.style.map.terrain.getTerrainData(Jt),$a={programConfiguration:da,program:_a,layoutVertexBuffer:Da,indexBuffer:Na,uniformValues:Ua(J,Jt,Kt,fe),terrainData:Ga};if(rt){const gr=Yt.segments.get();for(const Qa of gr)jt.push({segments:new r.a0([Qa]),sortKey:Qa.sortKey,state:$a})}else jt.push({segments:Yt.segments,sortKey:0,state:$a})}rt&&jt.sort((Et,Jt)=>Et.sortKey-Jt.sortKey);for(const Et of jt){const{programConfiguration:Jt,program:Kt,layoutVertexBuffer:Yt,indexBuffer:da,uniformValues:_a,terrainData:Da}=Et.state,Na=Et.segments;Kt.draw(ct,pt.TRIANGLES,xt,Mt,Tt,xi.disabled,_a,Da,fe.id,Yt,da,Na,fe.paint,J.transform.zoom,Jt)}})(u,f,D,V);break;case"heatmap":zl(u,f,D,V);break;case"line":(function(J,oe,fe,xe){if(J.renderPass!=="translucent")return;const Ee=fe.paint.get("line-opacity"),Fe=fe.paint.get("line-width");if(Ee.constantOr(1)===0||Fe.constantOr(1)===0)return;const Ge=J.depthModeForSublayer(0,qn.ReadOnly),rt=J.colorModeForRenderPass(),ct=fe.paint.get("line-dasharray"),pt=fe.paint.get("line-pattern"),xt=pt.constantOr(1),Mt=fe.paint.get("line-gradient"),Tt=fe.getCrossfadeParameters(),jt=xt?"linePattern":ct?"lineSDF":Mt?"lineGradient":"line",Et=J.context,Jt=Et.gl;let Kt=!0;for(const Yt of xe){const da=oe.getTile(Yt);if(xt&&!da.patternsLoaded())continue;const _a=da.getBucket(fe);if(!_a)continue;const Da=_a.programConfigurations.get(fe.id),Na=J.context.program.get(),Ga=J.useProgram(jt,Da),$a=Kt||Ga.program!==Na,gr=J.style.map.terrain&&J.style.map.terrain.getTerrainData(Yt),Qa=pt.constantOr(null);if(Qa&&da.imageAtlas){const Sr=da.imageAtlas,pr=Sr.patternPositions[Qa.to.toString()],Mr=Sr.patternPositions[Qa.from.toString()];pr&&Mr&&Da.setConstantPatternPositions(pr,Mr)}const xr=gr?Yt:null,nr=xt?Ja(J,da,fe,Tt,xr):ct?lr(J,da,fe,ct,Tt,xr):Mt?Sa(J,da,fe,_a.lineClipsArray.length,xr):oa(J,da,fe,xr);if(xt)Et.activeTexture.set(Jt.TEXTURE0),da.imageAtlasTexture.bind(Jt.LINEAR,Jt.CLAMP_TO_EDGE),Da.updatePaintBuffers(Tt);else if(ct&&($a||J.lineAtlas.dirty))Et.activeTexture.set(Jt.TEXTURE0),J.lineAtlas.bind(Et);else if(Mt){const Sr=_a.gradients[fe.id];let pr=Sr.texture;if(fe.gradientVersion!==Sr.version){let Mr=256;if(fe.stepInterpolant){const Wr=oe.getSource().maxzoom,Er=Yt.canonical.z===Wr?Math.ceil(1<<J.transform.maxZoom-Yt.canonical.z):1,Gr=_a.maxLineLength/r.X*1024*Er;Mr=r.ad(r.aV(Gr),256,Et.maxTextureSize)}Sr.gradient=r.aW({expression:fe.gradientExpression(),evaluationKey:"lineProgress",resolution:Mr,image:Sr.gradient||void 0,clips:_a.lineClipsArray}),Sr.texture?Sr.texture.update(Sr.gradient):Sr.texture=new z(Et,Sr.gradient,Jt.RGBA),Sr.version=fe.gradientVersion,pr=Sr.texture}Et.activeTexture.set(Jt.TEXTURE0),pr.bind(fe.stepInterpolant?Jt.NEAREST:Jt.LINEAR,Jt.CLAMP_TO_EDGE)}Ga.draw(Et,Jt.TRIANGLES,Ge,J.stencilModeForClipping(Yt),rt,xi.disabled,nr,gr,fe.id,_a.layoutVertexBuffer,_a.indexBuffer,_a.segments,fe.paint,J.transform.zoom,Da,_a.layoutVertexBuffer2),Kt=!1}})(u,f,D,V);break;case"fill":(function(J,oe,fe,xe){const Ee=fe.paint.get("fill-color"),Fe=fe.paint.get("fill-opacity");if(Fe.constantOr(1)===0)return;const Ge=J.colorModeForRenderPass(),rt=fe.paint.get("fill-pattern"),ct=J.opaquePassEnabledForLayer()&&!rt.constantOr(1)&&Ee.constantOr(r.aN.transparent).a===1&&Fe.constantOr(0)===1?"opaque":"translucent";if(J.renderPass===ct){const pt=J.depthModeForSublayer(1,J.renderPass==="opaque"?qn.ReadWrite:qn.ReadOnly);Bc(J,oe,fe,xe,pt,Ge,!1)}if(J.renderPass==="translucent"&&fe.paint.get("fill-antialias")){const pt=J.depthModeForSublayer(fe.getPaintProperty("fill-outline-color")?2:0,qn.ReadOnly);Bc(J,oe,fe,xe,pt,Ge,!0)}})(u,f,D,V);break;case"fill-extrusion":(function(J,oe,fe,xe){const Ee=fe.paint.get("fill-extrusion-opacity");if(Ee!==0&&J.renderPass==="translucent"){const Fe=new qn(J.context.gl.LEQUAL,qn.ReadWrite,J.depthRangeFor3D);if(Ee!==1||fe.paint.get("fill-extrusion-pattern").constantOr(1))wc(J,oe,fe,xe,Fe,_i.disabled,Qi.disabled),wc(J,oe,fe,xe,Fe,J.stencilModeFor3D(),J.colorModeForRenderPass());else{const Ge=J.colorModeForRenderPass();wc(J,oe,fe,xe,Fe,_i.disabled,Ge)}}})(u,f,D,V);break;case"hillshade":(function(J,oe,fe,xe){if(J.renderPass!=="offscreen"&&J.renderPass!=="translucent")return;const Ee=J.context,Fe=J.depthModeForSublayer(0,qn.ReadOnly),Ge=J.colorModeForRenderPass(),[rt,ct]=J.renderPass==="translucent"?J.stencilConfigForOverlap(xe):[{},xe];for(const pt of ct){const xt=oe.getTile(pt);xt.needsHillshadePrepare!==void 0&&xt.needsHillshadePrepare&&J.renderPass==="offscreen"?gu(J,xt,fe,Fe,_i.disabled,Ge):J.renderPass==="translucent"&&kc(J,pt,xt,fe,Fe,rt[pt.overscaledZ],Ge)}Ee.viewport.set([0,0,J.width,J.height])})(u,f,D,V);break;case"raster":(function(J,oe,fe,xe){if(J.renderPass!=="translucent"||fe.paint.get("raster-opacity")===0||!xe.length)return;const Ee=J.context,Fe=Ee.gl,Ge=oe.getSource(),rt=J.useProgram("raster"),ct=J.colorModeForRenderPass(),[pt,xt]=Ge instanceof Ie?[{},xe]:J.stencilConfigForOverlap(xe),Mt=xt[xt.length-1].overscaledZ,Tt=!J.options.moving;for(const jt of xt){const Et=J.depthModeForSublayer(jt.overscaledZ-Mt,fe.paint.get("raster-opacity")===1?qn.ReadWrite:qn.ReadOnly,Fe.LESS),Jt=oe.getTile(jt);Jt.registerFadeDuration(fe.paint.get("raster-fade-duration"));const Kt=oe.findLoadedParent(jt,0),Yt=oe.findLoadedSibling(jt),da=As(Jt,Kt||Yt||null,oe,fe,J.transform,J.style.map.terrain);let _a,Da;const Na=fe.paint.get("raster-resampling")==="nearest"?Fe.NEAREST:Fe.LINEAR;Ee.activeTexture.set(Fe.TEXTURE0),Jt.texture.bind(Na,Fe.CLAMP_TO_EDGE,Fe.LINEAR_MIPMAP_NEAREST),Ee.activeTexture.set(Fe.TEXTURE1),Kt?(Kt.texture.bind(Na,Fe.CLAMP_TO_EDGE,Fe.LINEAR_MIPMAP_NEAREST),_a=Math.pow(2,Kt.tileID.overscaledZ-Jt.tileID.overscaledZ),Da=[Jt.tileID.canonical.x*_a%1,Jt.tileID.canonical.y*_a%1]):Jt.texture.bind(Na,Fe.CLAMP_TO_EDGE,Fe.LINEAR_MIPMAP_NEAREST),Jt.texture.useMipmap&&Ee.extTextureFilterAnisotropic&&J.transform.pitch>20&&Fe.texParameterf(Fe.TEXTURE_2D,Ee.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,Ee.extTextureFilterAnisotropicMax);const Ga=J.style.map.terrain&&J.style.map.terrain.getTerrainData(jt),$a=Ga?jt:null,gr=$a?$a.posMatrix:J.transform.calculatePosMatrix(jt.toUnwrapped(),Tt),Qa=Ar(gr,Da||[0,0],_a||1,da,fe);Ge instanceof Ie?rt.draw(Ee,Fe.TRIANGLES,Et,_i.disabled,ct,xi.disabled,Qa,Ga,fe.id,Ge.boundsBuffer,J.quadTriangleIndexBuffer,Ge.boundsSegments):rt.draw(Ee,Fe.TRIANGLES,Et,pt[jt.overscaledZ],ct,xi.disabled,Qa,Ga,fe.id,J.rasterBoundsBuffer,J.quadTriangleIndexBuffer,J.rasterBoundsSegments)}})(u,f,D,V);break;case"background":(function(J,oe,fe,xe){const Ee=fe.paint.get("background-color"),Fe=fe.paint.get("background-opacity");if(Fe===0)return;const Ge=J.context,rt=Ge.gl,ct=J.transform,pt=ct.tileSize,xt=fe.paint.get("background-pattern");if(J.isPatternMissing(xt))return;const Mt=!xt&&Ee.a===1&&Fe===1&&J.opaquePassEnabledForLayer()?"opaque":"translucent";if(J.renderPass!==Mt)return;const Tt=_i.disabled,jt=J.depthModeForSublayer(0,Mt==="opaque"?qn.ReadWrite:qn.ReadOnly),Et=J.colorModeForRenderPass(),Jt=J.useProgram(xt?"backgroundPattern":"background"),Kt=xe||ct.coveringTiles({tileSize:pt,terrain:J.style.map.terrain});xt&&(Ge.activeTexture.set(rt.TEXTURE0),J.imageManager.bind(J.context));const Yt=fe.getCrossfadeParameters();for(const da of Kt){const _a=xe?da.posMatrix:J.transform.calculatePosMatrix(da.toUnwrapped()),Da=xt?Kr(_a,Fe,J,xt,{tileID:da,tileSize:pt},Yt):Or(_a,Fe,Ee),Na=J.style.map.terrain&&J.style.map.terrain.getTerrainData(da);Jt.draw(Ge,rt.TRIANGLES,jt,Tt,Et,xi.disabled,Da,Na,fe.id,J.tileExtentBuffer,J.quadTriangleIndexBuffer,J.tileExtentSegments)}})(u,0,D,V);break;case"custom":(function(J,oe,fe){const xe=J.context,Ee=fe.implementation;if(J.renderPass==="offscreen"){const Fe=Ee.prerender;Fe&&(J.setCustomLayerDefaults(),xe.setColorMode(J.colorModeForRenderPass()),Fe.call(Ee,xe.gl,J.transform.customLayerMatrix()),xe.setDirty(),J.setBaseState())}else if(J.renderPass==="translucent"){J.setCustomLayerDefaults(),xe.setColorMode(J.colorModeForRenderPass()),xe.setStencilMode(_i.disabled);const Fe=Ee.renderingMode==="3d"?new qn(J.context.gl.LEQUAL,qn.ReadWrite,J.depthRangeFor3D):J.depthModeForSublayer(0,qn.ReadOnly);xe.setDepthMode(Fe),Ee.render(xe.gl,J.transform.customLayerMatrix(),{farZ:J.transform.farZ,nearZ:J.transform.nearZ,fov:J.transform._fov,modelViewProjectionMatrix:J.transform.modelViewProjectionMatrix,projectionMatrix:J.transform.projectionMatrix}),xe.setDirty(),J.setBaseState(),xe.bindFramebuffer.set(null)}})(u,0,D)}}translatePosMatrix(u,f,D,V,J){if(!D[0]&&!D[1])return u;const oe=J?V==="map"?this.transform.angle:0:V==="viewport"?-this.transform.angle:0;if(oe){const Ee=Math.sin(oe),Fe=Math.cos(oe);D=[D[0]*Fe-D[1]*Ee,D[0]*Ee+D[1]*Fe]}const fe=[J?D[0]:St(f,D[0],this.transform.zoom),J?D[1]:St(f,D[1],this.transform.zoom),0],xe=new Float32Array(16);return r.J(xe,u,fe),xe}saveTileTexture(u){const f=this._tileTextures[u.size[0]];f?f.push(u):this._tileTextures[u.size[0]]=[u]}getTileTexture(u){const f=this._tileTextures[u];return f&&f.length>0?f.pop():null}isPatternMissing(u){if(!u)return!1;if(!u.from||!u.to)return!0;const f=this.imageManager.getPattern(u.from.toString()),D=this.imageManager.getPattern(u.to.toString());return!f||!D}useProgram(u,f){this.cache=this.cache||{};const D=u+(f?f.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[D]||(this.cache[D]=new tr(this.context,br[u],f,jr[u],this._showOverdrawInspector,this.style.map.terrain)),this.cache[D]}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 u=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(u.FUNC_ADD)}initDebugOverlayCanvas(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;const u=this.context.gl;this.debugOverlayTexture=new z(this.context,this.debugOverlayCanvas,u.RGBA)}}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){const{drawingBufferWidth:u,drawingBufferHeight:f}=this.context.gl;return this.width!==u||this.height!==f}}class Zs{constructor(u,f){this.points=u,this.planes=f}static fromInvProjectionMatrix(u,f,D){const V=Math.pow(2,D),J=[[-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(fe=>{const xe=1/(fe=r.ag([],fe,u))[3]/f*V;return r.b1(fe,fe,[xe,xe,1/fe[3],xe])}),oe=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(fe=>{const xe=function(rt,ct){var pt=ct[0],xt=ct[1],Mt=ct[2],Tt=pt*pt+xt*xt+Mt*Mt;return Tt>0&&(Tt=1/Math.sqrt(Tt)),rt[0]=ct[0]*Tt,rt[1]=ct[1]*Tt,rt[2]=ct[2]*Tt,rt}([],function(rt,ct,pt){var xt=ct[0],Mt=ct[1],Tt=ct[2],jt=pt[0],Et=pt[1],Jt=pt[2];return rt[0]=Mt*Jt-Tt*Et,rt[1]=Tt*jt-xt*Jt,rt[2]=xt*Et-Mt*jt,rt}([],L([],J[fe[0]],J[fe[1]]),L([],J[fe[2]],J[fe[1]]))),Ee=(Fe=xe,Ge=J[fe[1]],-(Fe[0]*Ge[0]+Fe[1]*Ge[1]+Fe[2]*Ge[2]));var Fe,Ge;return xe.concat(Ee)});return new Zs(J,oe)}}class Ms{constructor(u,f){this.min=u,this.max=f,this.center=function(D,V,J){return D[0]=V[0]*J,D[1]=V[1]*J,D[2]=V[2]*J,D}([],function(D,V,J){return D[0]=V[0]+J[0],D[1]=V[1]+J[1],D[2]=V[2]+J[2],D}([],this.min,this.max),.5)}quadrant(u){const f=[u%2==0,u<2],D=A(this.min),V=A(this.max);for(let J=0;J<f.length;J++)D[J]=f[J]?this.min[J]:this.center[J],V[J]=f[J]?this.center[J]:this.max[J];return V[2]=this.max[2],new Ms(D,V)}distanceX(u){return Math.max(Math.min(this.max[0],u[0]),this.min[0])-u[0]}distanceY(u){return Math.max(Math.min(this.max[1],u[1]),this.min[1])-u[1]}intersects(u){const f=[[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 D=!0;for(let V=0;V<u.planes.length;V++){const J=u.planes[V];let oe=0;for(let fe=0;fe<f.length;fe++)r.b2(J,f[fe])>=0&&oe++;if(oe===0)return 0;oe!==f.length&&(D=!1)}if(D)return 2;for(let V=0;V<3;V++){let J=Number.MAX_VALUE,oe=-Number.MAX_VALUE;for(let fe=0;fe<u.points.length;fe++){const xe=u.points[fe][V]-this.min[V];J=Math.min(J,xe),oe=Math.max(oe,xe)}if(oe<0||J>this.max[V]-this.min[V])return 0}return 1}}class Nl{constructor(u=0,f=0,D=0,V=0){if(isNaN(u)||u<0||isNaN(f)||f<0||isNaN(D)||D<0||isNaN(V)||V<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=u,this.bottom=f,this.left=D,this.right=V}interpolate(u,f,D){return f.top!=null&&u.top!=null&&(this.top=r.z.number(u.top,f.top,D)),f.bottom!=null&&u.bottom!=null&&(this.bottom=r.z.number(u.bottom,f.bottom,D)),f.left!=null&&u.left!=null&&(this.left=r.z.number(u.left,f.left,D)),f.right!=null&&u.right!=null&&(this.right=r.z.number(u.right,f.right,D)),this}getCenter(u,f){const D=r.ad((this.left+u-this.right)/2,0,u),V=r.ad((this.top+f-this.bottom)/2,0,f);return new r.P(D,V)}equals(u){return this.top===u.top&&this.bottom===u.bottom&&this.left===u.left&&this.right===u.right}clone(){return new Nl(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}const Cc=85.051129;class di{constructor(u,f,D,V,J){this.tileSize=512,this._renderWorldCopies=J===void 0||!!J,this._minZoom=u||0,this._maxZoom=f||22,this._minPitch=D??0,this._maxPitch=V??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new r.N(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new Nl,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={},this.minElevationForCurrentTile=0}clone(){const u=new di(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return u.apply(this),u}apply(u){this.tileSize=u.tileSize,this.latRange=u.latRange,this.width=u.width,this.height=u.height,this._center=u._center,this._elevation=u._elevation,this.minElevationForCurrentTile=u.minElevationForCurrentTile,this.zoom=u.zoom,this.angle=u.angle,this._fov=u._fov,this._pitch=u._pitch,this._unmodified=u._unmodified,this._edgeInsets=u._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(u){this._minZoom!==u&&(this._minZoom=u,this.zoom=Math.max(this.zoom,u))}get maxZoom(){return this._maxZoom}set maxZoom(u){this._maxZoom!==u&&(this._maxZoom=u,this.zoom=Math.min(this.zoom,u))}get minPitch(){return this._minPitch}set minPitch(u){this._minPitch!==u&&(this._minPitch=u,this.pitch=Math.max(this.pitch,u))}get maxPitch(){return this._maxPitch}set maxPitch(u){this._maxPitch!==u&&(this._maxPitch=u,this.pitch=Math.min(this.pitch,u))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(u){u===void 0?u=!0:u===null&&(u=!1),this._renderWorldCopies=u}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new r.P(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(u){const f=-r.b3(u,-180,180)*Math.PI/180;this.angle!==f&&(this._unmodified=!1,this.angle=f,this._calcMatrices(),this.rotationMatrix=function(){var D=new r.A(4);return r.A!=Float32Array&&(D[1]=0,D[2]=0),D[0]=1,D[3]=1,D}(),function(D,V,J){var oe=V[0],fe=V[1],xe=V[2],Ee=V[3],Fe=Math.sin(J),Ge=Math.cos(J);D[0]=oe*Ge+xe*Fe,D[1]=fe*Ge+Ee*Fe,D[2]=oe*-Fe+xe*Ge,D[3]=fe*-Fe+Ee*Ge}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(u){const f=r.ad(u,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==f&&(this._unmodified=!1,this._pitch=f,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(u){u=Math.max(.01,Math.min(60,u)),this._fov!==u&&(this._unmodified=!1,this._fov=u/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(u){const f=Math.min(Math.max(u,this.minZoom),this.maxZoom);this._zoom!==f&&(this._unmodified=!1,this._zoom=f,this.tileZoom=Math.max(0,Math.floor(f)),this.scale=this.zoomScale(f),this._constrain(),this._calcMatrices())}get center(){return this._center}set center(u){u.lat===this._center.lat&&u.lng===this._center.lng||(this._unmodified=!1,this._center=u,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(u){u!==this._elevation&&(this._elevation=u,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(u){this._edgeInsets.equals(u)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,u,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(u){return this._edgeInsets.equals(u)}interpolatePadding(u,f,D){this._unmodified=!1,this._edgeInsets.interpolate(u,f,D),this._constrain(),this._calcMatrices()}coveringZoomLevel(u){const f=(u.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/u.tileSize));return Math.max(0,f)}getVisibleUnwrappedCoordinates(u){const f=[new r.b4(0,u)];if(this._renderWorldCopies){const D=this.pointCoordinate(new r.P(0,0)),V=this.pointCoordinate(new r.P(this.width,0)),J=this.pointCoordinate(new r.P(this.width,this.height)),oe=this.pointCoordinate(new r.P(0,this.height)),fe=Math.floor(Math.min(D.x,V.x,J.x,oe.x)),xe=Math.floor(Math.max(D.x,V.x,J.x,oe.x)),Ee=1;for(let Fe=fe-Ee;Fe<=xe+Ee;Fe++)Fe!==0&&f.push(new r.b4(Fe,u))}return f}coveringTiles(u){var f,D;let V=this.coveringZoomLevel(u);const J=V;if(u.minzoom!==void 0&&V<u.minzoom)return[];u.maxzoom!==void 0&&V>u.maxzoom&&(V=u.maxzoom);const oe=this.pointCoordinate(this.getCameraPoint()),fe=r.Z.fromLngLat(this.center),xe=Math.pow(2,V),Ee=[xe*oe.x,xe*oe.y,0],Fe=[xe*fe.x,xe*fe.y,0],Ge=Zs.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,V);let rt=u.minzoom||0;!u.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(rt=V);const ct=u.terrain?2/Math.min(this.tileSize,u.tileSize)*this.tileSize:3,pt=Et=>({aabb:new Ms([Et*xe,0,0],[(Et+1)*xe,xe,0]),zoom:0,x:0,y:0,wrap:Et,fullyVisible:!1}),xt=[],Mt=[],Tt=V,jt=u.reparseOverscaled?J:V;if(this._renderWorldCopies)for(let Et=1;Et<=3;Et++)xt.push(pt(-Et)),xt.push(pt(Et));for(xt.push(pt(0));xt.length>0;){const Et=xt.pop(),Jt=Et.x,Kt=Et.y;let Yt=Et.fullyVisible;if(!Yt){const $a=Et.aabb.intersects(Ge);if($a===0)continue;Yt=$a===2}const da=u.terrain?Ee:Fe,_a=Et.aabb.distanceX(da),Da=Et.aabb.distanceY(da),Na=Math.max(Math.abs(_a),Math.abs(Da)),Ga=ct+(1<<Tt-Et.zoom)-2;if(Et.zoom===Tt||Na>Ga&&Et.zoom>=rt){const $a=Tt-Et.zoom,gr=Ee[0]-.5-(Jt<<$a),Qa=Ee[1]-.5-(Kt<<$a);Mt.push({tileID:new r.S(Et.zoom===Tt?jt:Et.zoom,Et.wrap,Et.zoom,Jt,Kt),distanceSq:T([Fe[0]-.5-Jt,Fe[1]-.5-Kt]),tileDistanceToCamera:Math.sqrt(gr*gr+Qa*Qa)})}else for(let $a=0;$a<4;$a++){const gr=(Jt<<1)+$a%2,Qa=(Kt<<1)+($a>>1),xr=Et.zoom+1;let nr=Et.aabb.quadrant($a);if(u.terrain){const Sr=new r.S(xr,Et.wrap,xr,gr,Qa),pr=u.terrain.getMinMaxElevation(Sr),Mr=(f=pr.minElevation)!==null&&f!==void 0?f:this.elevation,Wr=(D=pr.maxElevation)!==null&&D!==void 0?D:this.elevation;nr=new Ms([nr.min[0],nr.min[1],Mr],[nr.max[0],nr.max[1],Wr])}xt.push({aabb:nr,zoom:xr,x:gr,y:Qa,wrap:Et.wrap,fullyVisible:Yt})}}return Mt.sort((Et,Jt)=>Et.distanceSq-Jt.distanceSq).map(Et=>Et.tileID)}resize(u,f){this.width=u,this.height=f,this.pixelsToGLUnits=[2/u,-2/f],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(u){return Math.pow(2,u)}scaleZoom(u){return Math.log(u)/Math.LN2}project(u){const f=r.ad(u.lat,-85.051129,Cc);return new r.P(r.O(u.lng)*this.worldSize,r.Q(f)*this.worldSize)}unproject(u){return new r.Z(u.x/this.worldSize,u.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(u){const f=this.elevation,D=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,V=this.pointLocation(this.centerPoint,u),J=u.getElevationForLngLatZoom(V,this.tileZoom);if(!(this.elevation-J))return;const oe=D+f-J,fe=Math.cos(this._pitch)*this.cameraToCenterDistance/oe/r.b5(1,V.lat)/this.tileSize,xe=this.scaleZoom(fe);this._elevation=J,this._center=V,this.zoom=xe}setLocationAtPoint(u,f){const D=this.pointCoordinate(f),V=this.pointCoordinate(this.centerPoint),J=this.locationCoordinate(u),oe=new r.Z(J.x-(D.x-V.x),J.y-(D.y-V.y));this.center=this.coordinateLocation(oe),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(u,f){return f?this.coordinatePoint(this.locationCoordinate(u),f.getElevationForLngLatZoom(u,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(u))}pointLocation(u,f){return this.coordinateLocation(this.pointCoordinate(u,f))}locationCoordinate(u){return r.Z.fromLngLat(u)}coordinateLocation(u){return u&&u.toLngLat()}pointCoordinate(u,f){if(f){const pt=f.pointCoordinate(u);if(pt!=null)return pt}const D=[u.x,u.y,0,1],V=[u.x,u.y,1,1];r.ag(D,D,this.pixelMatrixInverse),r.ag(V,V,this.pixelMatrixInverse);const J=D[3],oe=V[3],fe=D[0]/J,xe=V[0]/oe,Ee=D[1]/J,Fe=V[1]/oe,Ge=D[2]/J,rt=V[2]/oe,ct=Ge===rt?0:(0-Ge)/(rt-Ge);return new r.Z(r.z.number(fe,xe,ct)/this.worldSize,r.z.number(Ee,Fe,ct)/this.worldSize)}coordinatePoint(u,f=0,D=this.pixelMatrix){const V=[u.x*this.worldSize,u.y*this.worldSize,f,1];return r.ag(V,V,D),new r.P(V[0]/V[3],V[1]/V[3])}getBounds(){const u=Math.max(0,this.height/2-this.getHorizon());return new Ce().extend(this.pointLocation(new r.P(0,u))).extend(this.pointLocation(new r.P(this.width,u))).extend(this.pointLocation(new r.P(this.width,this.height))).extend(this.pointLocation(new r.P(0,this.height)))}getMaxBounds(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new Ce([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(u){u?(this.lngRange=[u.getWest(),u.getEast()],this.latRange=[u.getSouth(),u.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-85.051129,Cc])}calculateTileMatrix(u){const f=u.canonical,D=this.worldSize/this.zoomScale(f.z),V=f.x+Math.pow(2,f.z)*u.wrap,J=r.ao(new Float64Array(16));return r.J(J,J,[V*D,f.y*D,0]),r.K(J,J,[D/r.X,D/r.X,1]),J}calculatePosMatrix(u,f=!1){const D=u.key,V=f?this._alignedPosMatrixCache:this._posMatrixCache;if(V[D])return V[D];const J=this.calculateTileMatrix(u);return r.L(J,f?this.alignedModelViewProjectionMatrix:this.modelViewProjectionMatrix,J),V[D]=new Float32Array(J),V[D]}calculateFogMatrix(u){const f=u.key,D=this._fogMatrixCache;if(D[f])return D[f];const V=this.calculateTileMatrix(u);return r.L(V,this.fogMatrix,V),D[f]=new Float32Array(V),D[f]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(u,f){f=r.ad(+f,this.minZoom,this.maxZoom);const D={center:new r.N(u.lng,u.lat),zoom:f};let V=this.lngRange;if(!this._renderWorldCopies&&V===null){const Et=179.9999999999;V=[-Et,Et]}const J=this.tileSize*this.zoomScale(D.zoom);let oe=0,fe=J,xe=0,Ee=J,Fe=0,Ge=0;const{x:rt,y:ct}=this.size;if(this.latRange){const Et=this.latRange;oe=r.Q(Et[1])*J,fe=r.Q(Et[0])*J,fe-oe<ct&&(Fe=ct/(fe-oe))}V&&(xe=r.b3(r.O(V[0])*J,0,J),Ee=r.b3(r.O(V[1])*J,0,J),Ee<xe&&(Ee+=J),Ee-xe<rt&&(Ge=rt/(Ee-xe)));const{x:pt,y:xt}=this.project.call({worldSize:J},u);let Mt,Tt;const jt=Math.max(Ge||0,Fe||0);if(jt){const Et=new r.P(Ge?(Ee+xe)/2:pt,Fe?(fe+oe)/2:xt);return D.center=this.unproject.call({worldSize:J},Et).wrap(),D.zoom+=this.scaleZoom(jt),D}if(this.latRange){const Et=ct/2;xt-Et<oe&&(Tt=oe+Et),xt+Et>fe&&(Tt=fe-Et)}if(V){const Et=(xe+Ee)/2;let Jt=pt;this._renderWorldCopies&&(Jt=r.b3(pt,Et-J/2,Et+J/2));const Kt=rt/2;Jt-Kt<xe&&(Mt=xe+Kt),Jt+Kt>Ee&&(Mt=Ee-Kt)}if(Mt!==void 0||Tt!==void 0){const Et=new r.P(Mt??pt,Tt??xt);D.center=this.unproject.call({worldSize:J},Et).wrap()}return D}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;const u=this._unmodified,{center:f,zoom:D}=this.getConstrained(this.center,this.zoom);this.center=f,this.zoom=D,this._unmodified=u,this._constraining=!1}_calcMatrices(){if(!this.height)return;const u=this._fov/2,f=this.centerOffset,D=this.point.x,V=this.point.y;this.cameraToCenterDistance=.5/Math.tan(u)*this.height,this._pixelPerMeter=r.b5(1,this.center.lat)*this.worldSize;let J=r.ao(new Float64Array(16));r.K(J,J,[this.width/2,-this.height/2,1]),r.J(J,J,[1,-1,0]),this.labelPlaneMatrix=J,J=r.ao(new Float64Array(16)),r.K(J,J,[1,-1,1]),r.J(J,J,[-1,-1,0]),r.K(J,J,[2/this.width,2/this.height,1]),this.glCoordMatrix=J;const oe=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),fe=Math.min(this.elevation,this.minElevationForCurrentTile),xe=oe-fe*this._pixelPerMeter/Math.cos(this._pitch),Ee=fe<0?xe:oe,Fe=Math.PI/2+this._pitch,Ge=this._fov*(.5+f.y/this.height),rt=Math.sin(Ge)*Ee/Math.sin(r.ad(Math.PI-Fe-Ge,.01,Math.PI-.01)),ct=this.getHorizon(),pt=2*Math.atan(ct/this.cameraToCenterDistance)*(.5+f.y/(2*ct)),xt=Math.sin(pt)*Ee/Math.sin(r.ad(Math.PI-Fe-pt,.01,Math.PI-.01)),Mt=Math.min(rt,xt);this.farZ=1.01*(Math.cos(Math.PI/2-this._pitch)*Mt+Ee),this.nearZ=this.height/50,J=new Float64Array(16),r.b6(J,this._fov,this.width/this.height,this.nearZ,this.farZ),J[8]=2*-f.x/this.width,J[9]=2*f.y/this.height,this.projectionMatrix=r.af(J),r.K(J,J,[1,-1,1]),r.J(J,J,[0,0,-this.cameraToCenterDistance]),r.b7(J,J,this._pitch),r.ae(J,J,this.angle),r.J(J,J,[-D,-V,0]),this.mercatorMatrix=r.K([],J,[this.worldSize,this.worldSize,this.worldSize]),r.K(J,J,[1,1,this._pixelPerMeter]),this.pixelMatrix=r.L(new Float64Array(16),this.labelPlaneMatrix,J),r.J(J,J,[0,0,-this.elevation]),this.modelViewProjectionMatrix=J,this.invModelViewProjectionMatrix=r.at([],J),this.fogMatrix=new Float64Array(16),r.b6(this.fogMatrix,this._fov,this.width/this.height,oe,this.farZ),this.fogMatrix[8]=2*-f.x/this.width,this.fogMatrix[9]=2*f.y/this.height,r.K(this.fogMatrix,this.fogMatrix,[1,-1,1]),r.J(this.fogMatrix,this.fogMatrix,[0,0,-this.cameraToCenterDistance]),r.b7(this.fogMatrix,this.fogMatrix,this._pitch),r.ae(this.fogMatrix,this.fogMatrix,this.angle),r.J(this.fogMatrix,this.fogMatrix,[-D,-V,0]),r.K(this.fogMatrix,this.fogMatrix,[1,1,this._pixelPerMeter]),r.J(this.fogMatrix,this.fogMatrix,[0,0,-this.elevation]),this.pixelMatrix3D=r.L(new Float64Array(16),this.labelPlaneMatrix,J);const Tt=this.width%2/2,jt=this.height%2/2,Et=Math.cos(this.angle),Jt=Math.sin(this.angle),Kt=D-Math.round(D)+Et*Tt+Jt*jt,Yt=V-Math.round(V)+Et*jt+Jt*Tt,da=new Float64Array(J);if(r.J(da,da,[Kt>.5?Kt-1:Kt,Yt>.5?Yt-1:Yt,0]),this.alignedModelViewProjectionMatrix=da,J=r.at(new Float64Array(16),this.pixelMatrix),!J)throw new Error("failed to invert matrix");this.pixelMatrixInverse=J,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;const u=this.pointCoordinate(new r.P(0,0)),f=[u.x*this.worldSize,u.y*this.worldSize,0,1];return r.ag(f,f,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){const u=this._pitch,f=Math.tan(u)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new r.P(0,f))}getCameraQueryGeometry(u){const f=this.getCameraPoint();if(u.length===1)return[u[0],f];{let D=f.x,V=f.y,J=f.x,oe=f.y;for(const fe of u)D=Math.min(D,fe.x),V=Math.min(V,fe.y),J=Math.max(J,fe.x),oe=Math.max(oe,fe.y);return[new r.P(D,V),new r.P(J,V),new r.P(J,oe),new r.P(D,oe),new r.P(D,V)]}}lngLatToCameraDepth(u,f){const D=this.locationCoordinate(u),V=[D.x*this.worldSize,D.y*this.worldSize,f,1];return r.ag(V,V,this.modelViewProjectionMatrix),V[2]/V[3]}}function Ws(R,u){let f,D=!1,V=null,J=null;const oe=()=>{V=null,D&&(R.apply(J,f),V=setTimeout(oe,u),D=!1)};return(...fe)=>(D=!0,J=this,f=fe,V||oe(),V)}class eo{constructor(u){this._getCurrentHash=()=>{const f=window.location.hash.replace("#","");if(this._hashName){let D;return f.split("&").map(V=>V.split("=")).forEach(V=>{V[0]===this._hashName&&(D=V)}),(D&&D[1]||"").split("/")}return f.split("/")},this._onHashChange=()=>{const f=this._getCurrentHash();if(f.length>=3&&!f.some(D=>isNaN(D))){const D=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(f[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+f[2],+f[1]],zoom:+f[0],bearing:D,pitch:+(f[4]||0)}),!0}return!1},this._updateHashUnthrottled=()=>{const f=window.location.href.replace(/(#.+)?$/,this.getHashString());window.history.replaceState(window.history.state,null,f)},this._removeHash=()=>{const f=this._getCurrentHash();if(f.length===0)return;const D=f.join("/");let V=D;V.split("&").length>0&&(V=V.split("&")[0]),this._hashName&&(V=`${this._hashName}=${D}`);let J=window.location.hash.replace(V,"");J.startsWith("#&")?J=J.slice(0,1)+J.slice(2):J==="#"&&(J="");let oe=window.location.href.replace(/(#.+)?$/,J);oe=oe.replace("&&","&"),window.history.replaceState(window.history.state,null,oe)},this._updateHash=Ws(this._updateHashUnthrottled,300),this._hashName=u&&encodeURIComponent(u)}addTo(u){return this._map=u,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(u){const f=this._map.getCenter(),D=Math.round(100*this._map.getZoom())/100,V=Math.ceil((D*Math.LN2+Math.log(512/360/.5))/Math.LN10),J=Math.pow(10,V),oe=Math.round(f.lng*J)/J,fe=Math.round(f.lat*J)/J,xe=this._map.getBearing(),Ee=this._map.getPitch();let Fe="";if(Fe+=u?`/${oe}/${fe}/${D}`:`${D}/${fe}/${oe}`,(xe||Ee)&&(Fe+="/"+Math.round(10*xe)/10),Ee&&(Fe+=`/${Math.round(Ee)}`),this._hashName){const Ge=this._hashName;let rt=!1;const ct=window.location.hash.slice(1).split("&").map(pt=>{const xt=pt.split("=")[0];return xt===Ge?(rt=!0,`${xt}=${Fe}`):pt}).filter(pt=>pt);return rt||ct.push(`${Ge}=${Fe}`),`#${ct.join("&")}`}return`#${Fe}`}}const Xo={linearity:.3,easing:r.b8(0,0,.3,1)},li=r.e({deceleration:2500,maxSpeed:1400},Xo),hi=r.e({deceleration:20,maxSpeed:1400},Xo),Is=r.e({deceleration:1e3,maxSpeed:360},Xo),Tc=r.e({deceleration:1e3,maxSpeed:90},Xo);class dc{constructor(u){this._map=u,this.clear()}clear(){this._inertiaBuffer=[]}record(u){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:h.now(),settings:u})}_drainInertiaBuffer(){const u=this._inertiaBuffer,f=h.now();for(;u.length>0&&f-u[0].time>160;)u.shift()}_onMoveEnd(u){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const f={zoom:0,bearing:0,pitch:0,pan:new r.P(0,0),pinchAround:void 0,around:void 0};for(const{settings:J}of this._inertiaBuffer)f.zoom+=J.zoomDelta||0,f.bearing+=J.bearingDelta||0,f.pitch+=J.pitchDelta||0,J.panDelta&&f.pan._add(J.panDelta),J.around&&(f.around=J.around),J.pinchAround&&(f.pinchAround=J.pinchAround);const D=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,V={};if(f.pan.mag()){const J=Xl(f.pan.mag(),D,r.e({},li,u||{}));V.offset=f.pan.mult(J.amount/f.pan.mag()),V.center=this._map.transform.center,Yl(V,J)}if(f.zoom){const J=Xl(f.zoom,D,hi);V.zoom=this._map.transform.zoom+J.amount,Yl(V,J)}if(f.bearing){const J=Xl(f.bearing,D,Is);V.bearing=this._map.transform.bearing+r.ad(J.amount,-179,179),Yl(V,J)}if(f.pitch){const J=Xl(f.pitch,D,Tc);V.pitch=this._map.transform.pitch+J.amount,Yl(V,J)}if(V.zoom||V.bearing){const J=f.pinchAround===void 0?f.around:f.pinchAround;V.around=J?this._map.unproject(J):this._map.getCenter()}return this.clear(),r.e(V,{noMoveStart:!0})}}function Yl(R,u){(!R.duration||R.duration<u.duration)&&(R.duration=u.duration,R.easing=u.easing)}function Xl(R,u,f){const{maxSpeed:D,linearity:V,deceleration:J}=f,oe=r.ad(R*V/(u/1e3),-D,D),fe=Math.abs(oe)/(J*V);return{easing:f.easing,duration:1e3*fe,amount:oe*(fe/2)}}class Bo extends r.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(u,f,D,V={}){const J=n.mousePos(f.getCanvas(),D),oe=f.unproject(J);super(u,r.e({point:J,lngLat:oe,originalEvent:D},V)),this._defaultPrevented=!1,this.target=f}}class ko extends r.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(u,f,D){const V=u==="touchend"?D.changedTouches:D.touches,J=n.touchPos(f.getCanvasContainer(),V),oe=J.map(xe=>f.unproject(xe)),fe=J.reduce((xe,Ee,Fe,Ge)=>xe.add(Ee.div(Ge.length)),new r.P(0,0));super(u,{points:J,point:fe,lngLats:oe,lngLat:f.unproject(fe),originalEvent:D}),this._defaultPrevented=!1}}class il extends r.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(u,f,D){super(u,{originalEvent:D}),this._defaultPrevented=!1}}class hc{constructor(u,f){this._map=u,this._clickTolerance=f.clickTolerance}reset(){delete this._mousedownPos}wheel(u){return this._firePreventable(new il(u.type,this._map,u))}mousedown(u,f){return this._mousedownPos=f,this._firePreventable(new Bo(u.type,this._map,u))}mouseup(u){this._map.fire(new Bo(u.type,this._map,u))}click(u,f){this._mousedownPos&&this._mousedownPos.dist(f)>=this._clickTolerance||this._map.fire(new Bo(u.type,this._map,u))}dblclick(u){return this._firePreventable(new Bo(u.type,this._map,u))}mouseover(u){this._map.fire(new Bo(u.type,this._map,u))}mouseout(u){this._map.fire(new Bo(u.type,this._map,u))}touchstart(u){return this._firePreventable(new ko(u.type,this._map,u))}touchmove(u){this._map.fire(new ko(u.type,this._map,u))}touchend(u){this._map.fire(new ko(u.type,this._map,u))}touchcancel(u){this._map.fire(new ko(u.type,this._map,u))}_firePreventable(u){if(this._map.fire(u),u.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Ro{constructor(u){this._map=u}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(u){this._map.fire(new Bo(u.type,this._map,u))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Bo("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(u){this._delayContextMenu?this._contextMenuEvent=u:this._ignoreContextMenu||this._map.fire(new Bo(u.type,this._map,u)),this._map.listens("contextmenu")&&u.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Ci{constructor(u){this._map=u}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(u){return this.transform.pointLocation(r.P.convert(u),this._map.terrain)}}class So{constructor(u,f){this._map=u,this._tr=new Ci(u),this._el=u.getCanvasContainer(),this._container=u.getContainer(),this._clickTolerance=f.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(u,f){this.isEnabled()&&u.shiftKey&&u.button===0&&(n.disableDrag(),this._startPos=this._lastPos=f,this._active=!0)}mousemoveWindow(u,f){if(!this._active)return;const D=f;if(this._lastPos.equals(D)||!this._box&&D.dist(this._startPos)<this._clickTolerance)return;const V=this._startPos;this._lastPos=D,this._box||(this._box=n.create("div","maplibregl-boxzoom",this._container),this._container.classList.add("maplibregl-crosshair"),this._fireEvent("boxzoomstart",u));const J=Math.min(V.x,D.x),oe=Math.max(V.x,D.x),fe=Math.min(V.y,D.y),xe=Math.max(V.y,D.y);n.setTransform(this._box,`translate(${J}px,${fe}px)`),this._box.style.width=oe-J+"px",this._box.style.height=xe-fe+"px"}mouseupWindow(u,f){if(!this._active||u.button!==0)return;const D=this._startPos,V=f;if(this.reset(),n.suppressClick(),D.x!==V.x||D.y!==V.y)return this._map.fire(new r.k("boxzoomend",{originalEvent:u})),{cameraAnimation:J=>J.fitScreenCoordinates(D,V,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",u)}keydown(u){this._active&&u.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",u))}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(u,f){return this._map.fire(new r.k(u,{originalEvent:f}))}}function gi(R,u){if(R.length!==u.length)throw new Error(`The number of touches and points are not equal - touches ${R.length}, points ${u.length}`);const f={};for(let D=0;D<R.length;D++)f[R[D].identifier]=u[D];return f}class to{constructor(u){this.reset(),this.numTouches=u.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(u,f,D){(this.centroid||D.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=u.timeStamp),D.length===this.numTouches&&(this.centroid=function(V){const J=new r.P(0,0);for(const oe of V)J._add(oe);return J.div(V.length)}(f),this.touches=gi(D,f)))}touchmove(u,f,D){if(this.aborted||!this.centroid)return;const V=gi(D,f);for(const J in this.touches){const oe=this.touches[J],fe=V[J];(!fe||fe.dist(oe)>30)&&(this.aborted=!0)}}touchend(u,f,D){if((!this.centroid||u.timeStamp-this.startTime>500)&&(this.aborted=!0),D.length===0){const V=!this.aborted&&this.centroid;if(this.reset(),V)return V}}}class yi{constructor(u){this.singleTap=new to(u),this.numTaps=u.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(u,f,D){this.singleTap.touchstart(u,f,D)}touchmove(u,f,D){this.singleTap.touchmove(u,f,D)}touchend(u,f,D){const V=this.singleTap.touchend(u,f,D);if(V){const J=u.timeStamp-this.lastTime<500,oe=!this.lastTap||this.lastTap.dist(V)<30;if(J&&oe||this.reset(),this.count++,this.lastTime=u.timeStamp,this.lastTap=V,this.count===this.numTaps)return this.reset(),V}}}class mo{constructor(u){this._tr=new Ci(u),this._zoomIn=new yi({numTouches:1,numTaps:2}),this._zoomOut=new yi({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(u,f,D){this._zoomIn.touchstart(u,f,D),this._zoomOut.touchstart(u,f,D)}touchmove(u,f,D){this._zoomIn.touchmove(u,f,D),this._zoomOut.touchmove(u,f,D)}touchend(u,f,D){const V=this._zoomIn.touchend(u,f,D),J=this._zoomOut.touchend(u,f,D),oe=this._tr;return V?(this._active=!0,u.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:fe=>fe.easeTo({duration:300,zoom:oe.zoom+1,around:oe.unproject(V)},{originalEvent:u})}):J?(this._active=!0,u.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:fe=>fe.easeTo({duration:300,zoom:oe.zoom-1,around:oe.unproject(J)},{originalEvent:u})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Co{constructor(u){this._enabled=!!u.enable,this._moveStateManager=u.moveStateManager,this._clickTolerance=u.clickTolerance||1,this._moveFunction=u.move,this._activateOnStart=!!u.activateOnStart,u.assignEvents(this),this.reset()}reset(u){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(u)}_move(...u){const f=this._moveFunction(...u);if(f.bearingDelta||f.pitchDelta||f.around||f.panDelta)return this._active=!0,f}dragStart(u,f){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(u)&&(this._moveStateManager.startMove(u),this._lastPoint=f.length?f[0]:f,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(u,f){if(!this.isEnabled())return;const D=this._lastPoint;if(!D)return;if(u.preventDefault(),!this._moveStateManager.isValidMoveEvent(u))return void this.reset(u);const V=f.length?f[0]:f;return!this._moved&&V.dist(D)<this._clickTolerance?void 0:(this._moved=!0,this._lastPoint=V,this._move(D,V))}dragEnd(u){this.isEnabled()&&this._lastPoint&&this._moveStateManager.isValidEndEvent(u)&&(this._moved&&n.suppressClick(),this.reset(u))}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}getClickTolerance(){return this._clickTolerance}}const ol={0:1,2:2};class cs{constructor(u){this._correctEvent=u.checkCorrectEvent}startMove(u){const f=n.mouseButton(u);this._eventButton=f}endMove(u){delete this._eventButton}isValidStartEvent(u){return this._correctEvent(u)}isValidMoveEvent(u){return!function(f,D){const V=ol[D];return f.buttons===void 0||(f.buttons&V)!==V}(u,this._eventButton)}isValidEndEvent(u){return n.mouseButton(u)===this._eventButton}}class Fl{constructor(){this._firstTouch=void 0}_isOneFingerTouch(u){return u.targetTouches.length===1}_isSameTouchEvent(u){return u.targetTouches[0].identifier===this._firstTouch}startMove(u){const f=u.targetTouches[0].identifier;this._firstTouch=f}endMove(u){delete this._firstTouch}isValidStartEvent(u){return this._isOneFingerTouch(u)}isValidMoveEvent(u){return this._isOneFingerTouch(u)&&this._isSameTouchEvent(u)}isValidEndEvent(u){return this._isOneFingerTouch(u)&&this._isSameTouchEvent(u)}}const zo=R=>{R.mousedown=R.dragStart,R.mousemoveWindow=R.dragMove,R.mouseup=R.dragEnd,R.contextmenu=u=>{u.preventDefault()}},$l=({enable:R,clickTolerance:u,bearingDegreesPerPixelMoved:f=.8})=>{const D=new cs({checkCorrectEvent:V=>n.mouseButton(V)===0&&V.ctrlKey||n.mouseButton(V)===2});return new Co({clickTolerance:u,move:(V,J)=>({bearingDelta:(J.x-V.x)*f}),moveStateManager:D,enable:R,assignEvents:zo})},sl=({enable:R,clickTolerance:u,pitchDegreesPerPixelMoved:f=-.5})=>{const D=new cs({checkCorrectEvent:V=>n.mouseButton(V)===0&&V.ctrlKey||n.mouseButton(V)===2});return new Co({clickTolerance:u,move:(V,J)=>({pitchDelta:(J.y-V.y)*f}),moveStateManager:D,enable:R,assignEvents:zo})};class Ps{constructor(u,f){this._clickTolerance=u.clickTolerance||1,this._map=f,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new r.P(0,0)}_shouldBePrevented(u){return u<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(u,f,D){return this._calculateTransform(u,f,D)}touchmove(u,f,D){if(this._active){if(!this._shouldBePrevented(D.length))return u.preventDefault(),this._calculateTransform(u,f,D);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",u)}}touchend(u,f,D){this._calculateTransform(u,f,D),this._active&&this._shouldBePrevented(D.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(u,f,D){D.length>0&&(this._active=!0);const V=gi(D,f),J=new r.P(0,0),oe=new r.P(0,0);let fe=0;for(const Ee in V){const Fe=V[Ee],Ge=this._touches[Ee];Ge&&(J._add(Fe),oe._add(Fe.sub(Ge)),fe++,V[Ee]=Fe)}if(this._touches=V,this._shouldBePrevented(fe)||!oe.mag())return;const xe=oe.div(fe);return this._sum._add(xe),this._sum.mag()<this._clickTolerance?void 0:{around:J.div(fe),panDelta:xe}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class go{constructor(){this.reset()}reset(){this._active=!1,delete this._firstTwoTouches}touchstart(u,f,D){this._firstTwoTouches||D.length<2||(this._firstTwoTouches=[D[0].identifier,D[1].identifier],this._start([f[0],f[1]]))}touchmove(u,f,D){if(!this._firstTwoTouches)return;u.preventDefault();const[V,J]=this._firstTwoTouches,oe=vi(D,f,V),fe=vi(D,f,J);if(!oe||!fe)return;const xe=this._aroundCenter?null:oe.add(fe).div(2);return this._move([oe,fe],xe,u)}touchend(u,f,D){if(!this._firstTwoTouches)return;const[V,J]=this._firstTwoTouches,oe=vi(D,f,V),fe=vi(D,f,J);oe&&fe||(this._active&&n.suppressClick(),this.reset())}touchcancel(){this.reset()}enable(u){this._enabled=!0,this._aroundCenter=!!u&&u.around==="center"}disable(){this._enabled=!1,this.reset()}isEnabled(){return!!this._enabled}isActive(){return!!this._active}}function vi(R,u,f){for(let D=0;D<R.length;D++)if(R[D].identifier===f)return u[D]}function Ls(R,u){return Math.log(R/u)/Math.LN2}class gn extends go{reset(){super.reset(),delete this._distance,delete this._startDistance}_start(u){this._startDistance=this._distance=u[0].dist(u[1])}_move(u,f){const D=this._distance;if(this._distance=u[0].dist(u[1]),this._active||!(Math.abs(Ls(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:Ls(this._distance,D),pinchAround:f}}}function Ac(R,u){return 180*R.angleWith(u)/Math.PI}class Jc extends go{reset(){super.reset(),delete this._minDiameter,delete this._startVector,delete this._vector}_start(u){this._startVector=this._vector=u[0].sub(u[1]),this._minDiameter=u[0].dist(u[1])}_move(u,f,D){const V=this._vector;if(this._vector=u[0].sub(u[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:Ac(this._vector,V),pinchAround:f}}_isBelowThreshold(u){this._minDiameter=Math.min(this._minDiameter,u.mag());const f=25/(Math.PI*this._minDiameter)*360,D=Ac(u,this._startVector);return Math.abs(D)<f}}function ll(R){return Math.abs(R.y)>Math.abs(R.x)}class Rl extends go{constructor(u){super(),this._currentTouchCount=0,this._map=u}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(u,f,D){super.touchstart(u,f,D),this._currentTouchCount=D.length}_start(u){this._lastPoints=u,ll(u[0].sub(u[1]))&&(this._valid=!1)}_move(u,f,D){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;const V=u[0].sub(this._lastPoints[0]),J=u[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(V,J,D.timeStamp),this._valid?(this._lastPoints=u,this._active=!0,{pitchDelta:(V.y+J.y)/2*-.5}):void 0}gestureBeginsVertically(u,f,D){if(this._valid!==void 0)return this._valid;const V=u.mag()>=2,J=f.mag()>=2;if(!V&&!J)return;if(!V||!J)return this._firstMove===void 0&&(this._firstMove=D),D-this._firstMove<100&&void 0;const oe=u.y>0==f.y>0;return ll(u)&&ll(f)&&oe}}const Cl={panStep:100,bearingStep:15,pitchStep:10};class pc{constructor(u){this._tr=new Ci(u);const f=Cl;this._panStep=f.panStep,this._bearingStep=f.bearingStep,this._pitchStep=f.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(u){if(u.altKey||u.ctrlKey||u.metaKey)return;let f=0,D=0,V=0,J=0,oe=0;switch(u.keyCode){case 61:case 107:case 171:case 187:f=1;break;case 189:case 109:case 173:f=-1;break;case 37:u.shiftKey?D=-1:(u.preventDefault(),J=-1);break;case 39:u.shiftKey?D=1:(u.preventDefault(),J=1);break;case 38:u.shiftKey?V=1:(u.preventDefault(),oe=-1);break;case 40:u.shiftKey?V=-1:(u.preventDefault(),oe=1);break;default:return}return this._rotationDisabled&&(D=0,V=0),{cameraAnimation:fe=>{const xe=this._tr;fe.easeTo({duration:300,easeId:"keyboardHandler",easing:Zr,zoom:f?Math.round(xe.zoom)+f*(u.shiftKey?2:1):xe.zoom,bearing:xe.bearing+D*this._bearingStep,pitch:xe.pitch+V*this._pitchStep,offset:[-J*this._panStep,-oe*this._panStep],center:xe.center},{originalEvent:u})}}}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 Zr(R){return R*(2-R)}const us=4.000244140625;class cl{constructor(u,f){this._onTimeout=D=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(D)},this._map=u,this._tr=new Ci(u),this._triggerRenderFrame=f,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(u){this._defaultZoomRate=u}setWheelZoomRate(u){this._wheelZoomRate=u}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(u){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!u&&u.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(u){return!!this._map.cooperativeGestures.isEnabled()&&!(u.ctrlKey||this._map.cooperativeGestures.isBypassed(u))}wheel(u){if(!this.isEnabled())return;if(this._shouldBePrevented(u))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",u);let f=u.deltaMode===WheelEvent.DOM_DELTA_LINE?40*u.deltaY:u.deltaY;const D=h.now(),V=D-(this._lastWheelEventTime||0);this._lastWheelEventTime=D,f!==0&&f%us==0?this._type="wheel":f!==0&&Math.abs(f)<4?this._type="trackpad":V>400?(this._type=null,this._lastValue=f,this._timeout=setTimeout(this._onTimeout,40,u)):this._type||(this._type=Math.abs(V*f)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,f+=this._lastValue)),u.shiftKey&&f&&(f/=4),this._type&&(this._lastWheelEvent=u,this._delta-=f,this._active||this._start(u)),u.preventDefault()}_start(u){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 f=n.mousePos(this._map.getCanvas(),u),D=this._tr;f.y>D.transform.height/2-D.transform.getHorizon()?this._around=r.N.convert(this._aroundCenter?D.center:D.unproject(f)):this._around=r.N.convert(D.center),this._aroundPoint=D.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;const u=this._tr.transform;if(this._delta!==0){const xe=this._type==="wheel"&&Math.abs(this._delta)>us?this._wheelZoomRate:this._defaultZoomRate;let Ee=2/(1+Math.exp(-Math.abs(this._delta*xe)));this._delta<0&&Ee!==0&&(Ee=1/Ee);const Fe=typeof this._targetZoom=="number"?u.zoomScale(this._targetZoom):u.scale;this._targetZoom=Math.min(u.maxZoom,Math.max(u.minZoom,u.scaleZoom(Fe*Ee))),this._type==="wheel"&&(this._startZoom=u.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const f=typeof this._targetZoom=="number"?this._targetZoom:u.zoom,D=this._startZoom,V=this._easing;let J,oe=!1;const fe=h.now()-this._lastWheelEventTime;if(this._type==="wheel"&&D&&V&&fe){const xe=Math.min(fe/200,1),Ee=V(xe);J=r.z.number(D,f,Ee),xe<1?this._frameId||(this._frameId=!0):oe=!0}else J=f,oe=!0;return this._active=!0,oe&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!oe,zoomDelta:J-u.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(u){let f=r.b9;if(this._prevEase){const D=this._prevEase,V=(h.now()-D.start)/D.duration,J=D.easing(V+.01)-D.easing(V),oe=.27/Math.sqrt(J*J+1e-4)*.01,fe=Math.sqrt(.0729-oe*oe);f=r.b8(oe,fe,.25,1)}return this._prevEase={start:h.now(),duration:u,easing:f},f}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class Ti{constructor(u,f){this._clickZoom=u,this._tapZoom=f}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 $o{constructor(u){this._tr=new Ci(u),this.reset()}reset(){this._active=!1}dblclick(u,f){return u.preventDefault(),{cameraAnimation:D=>{D.easeTo({duration:300,zoom:this._tr.zoom+(u.shiftKey?-1:1),around:this._tr.unproject(f)},{originalEvent:u})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class ul{constructor(){this._tap=new yi({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(u,f,D){if(!this._swipePoint)if(this._tapTime){const V=f[0],J=u.timeStamp-this._tapTime<500,oe=this._tapPoint.dist(V)<30;J&&oe?D.length>0&&(this._swipePoint=V,this._swipeTouch=D[0].identifier):this.reset()}else this._tap.touchstart(u,f,D)}touchmove(u,f,D){if(this._tapTime){if(this._swipePoint){if(D[0].identifier!==this._swipeTouch)return;const V=f[0],J=V.y-this._swipePoint.y;return this._swipePoint=V,u.preventDefault(),this._active=!0,{zoomDelta:J/128}}}else this._tap.touchmove(u,f,D)}touchend(u,f,D){if(this._tapTime)this._swipePoint&&D.length===0&&this.reset();else{const V=this._tap.touchend(u,f,D);V&&(this._tapTime=u.timeStamp,this._tapPoint=V)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Bs{constructor(u,f,D){this._el=u,this._mousePan=f,this._touchPan=D}enable(u){this._inertiaOptions=u||{},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 Vo{constructor(u,f,D){this._pitchWithRotate=u.pitchWithRotate,this._mouseRotate=f,this._mousePitch=D}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 dl{constructor(u,f,D,V){this._el=u,this._touchZoom=f,this._touchRotate=D,this._tapDragZoom=V,this._rotationDisabled=!1,this._enabled=!0}enable(u){this._touchZoom.enable(u),this._rotationDisabled||this._touchRotate.enable(u),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 ys{constructor(u,f){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=u,this._options=f,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;const u=this._map.getCanvasContainer();u.classList.add("maplibregl-cooperative-gestures"),this._container=n.create("div","maplibregl-cooperative-gesture-screen",u);let f=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(f=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));const D=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),V=document.createElement("div");V.className="maplibregl-desktop-message",V.textContent=f,this._container.appendChild(V);const J=document.createElement("div");J.className="maplibregl-mobile-message",J.textContent=D,this._container.appendChild(J),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(u){return u[this._bypassKey]}notifyGestureBlocked(u,f){this._enabled&&(this._map.fire(new r.k("cooperativegestureprevented",{gestureType:u,originalEvent:f})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}const Ko=R=>R.zoom||R.drag||R.pitch||R.rotate;class zs extends r.k{}function hn(R){return R.panDelta&&R.panDelta.mag()||R.zoomDelta||R.bearingDelta||R.pitchDelta}class ni{constructor(u,f){this.handleWindowEvent=V=>{this.handleEvent(V,`${V.type}Window`)},this.handleEvent=(V,J)=>{if(V.type==="blur")return void this.stop(!0);this._updatingCamera=!0;const oe=V.type==="renderFrame"?void 0:V,fe={needsRenderFrame:!1},xe={},Ee={},Fe=V.touches,Ge=Fe?this._getMapTouches(Fe):void 0,rt=Ge?n.touchPos(this._map.getCanvas(),Ge):n.mousePos(this._map.getCanvas(),V);for(const{handlerName:xt,handler:Mt,allowed:Tt}of this._handlers){if(!Mt.isEnabled())continue;let jt;this._blockedByActive(Ee,Tt,xt)?Mt.reset():Mt[J||V.type]&&(jt=Mt[J||V.type](V,rt,Ge),this.mergeHandlerResult(fe,xe,jt,xt,oe),jt&&jt.needsRenderFrame&&this._triggerRenderFrame()),(jt||Mt.isActive())&&(Ee[xt]=Mt)}const ct={};for(const xt in this._previousActiveHandlers)Ee[xt]||(ct[xt]=oe);this._previousActiveHandlers=Ee,(Object.keys(ct).length||hn(fe))&&(this._changes.push([fe,xe,ct]),this._triggerRenderFrame()),(Object.keys(Ee).length||hn(fe))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:pt}=fe;pt&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],pt(this._map))},this._map=u,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new dc(u),this._bearingSnap=f.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(f);const D=this._el;this._listeners=[[D,"touchstart",{passive:!0}],[D,"touchmove",{passive:!1}],[D,"touchend",void 0],[D,"touchcancel",void 0],[D,"mousedown",void 0],[D,"mousemove",void 0],[D,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[D,"mouseover",void 0],[D,"mouseout",void 0],[D,"dblclick",void 0],[D,"click",void 0],[D,"keydown",{capture:!1}],[D,"keyup",void 0],[D,"wheel",{passive:!1}],[D,"contextmenu",void 0],[window,"blur",void 0]];for(const[V,J,oe]of this._listeners)n.addEventListener(V,J,V===document?this.handleWindowEvent:this.handleEvent,oe)}destroy(){for(const[u,f,D]of this._listeners)n.removeEventListener(u,f,u===document?this.handleWindowEvent:this.handleEvent,D)}_addDefaultHandlers(u){const f=this._map,D=f.getCanvasContainer();this._add("mapEvent",new hc(f,u));const V=f.boxZoom=new So(f,u);this._add("boxZoom",V),u.interactive&&u.boxZoom&&V.enable();const J=f.cooperativeGestures=new ys(f,u.cooperativeGestures);this._add("cooperativeGestures",J),u.cooperativeGestures&&J.enable();const oe=new mo(f),fe=new $o(f);f.doubleClickZoom=new Ti(fe,oe),this._add("tapZoom",oe),this._add("clickZoom",fe),u.interactive&&u.doubleClickZoom&&f.doubleClickZoom.enable();const xe=new ul;this._add("tapDragZoom",xe);const Ee=f.touchPitch=new Rl(f);this._add("touchPitch",Ee),u.interactive&&u.touchPitch&&f.touchPitch.enable(u.touchPitch);const Fe=$l(u),Ge=sl(u);f.dragRotate=new Vo(u,Fe,Ge),this._add("mouseRotate",Fe,["mousePitch"]),this._add("mousePitch",Ge,["mouseRotate"]),u.interactive&&u.dragRotate&&f.dragRotate.enable();const rt=(({enable:jt,clickTolerance:Et})=>{const Jt=new cs({checkCorrectEvent:Kt=>n.mouseButton(Kt)===0&&!Kt.ctrlKey});return new Co({clickTolerance:Et,move:(Kt,Yt)=>({around:Yt,panDelta:Yt.sub(Kt)}),activateOnStart:!0,moveStateManager:Jt,enable:jt,assignEvents:zo})})(u),ct=new Ps(u,f);f.dragPan=new Bs(D,rt,ct),this._add("mousePan",rt),this._add("touchPan",ct,["touchZoom","touchRotate"]),u.interactive&&u.dragPan&&f.dragPan.enable(u.dragPan);const pt=new Jc,xt=new gn;f.touchZoomRotate=new dl(D,xt,pt,xe),this._add("touchRotate",pt,["touchPan","touchZoom"]),this._add("touchZoom",xt,["touchPan","touchRotate"]),u.interactive&&u.touchZoomRotate&&f.touchZoomRotate.enable(u.touchZoomRotate);const Mt=f.scrollZoom=new cl(f,()=>this._triggerRenderFrame());this._add("scrollZoom",Mt,["mousePan"]),u.interactive&&u.scrollZoom&&f.scrollZoom.enable(u.scrollZoom);const Tt=f.keyboard=new pc(f);this._add("keyboard",Tt),u.interactive&&u.keyboard&&f.keyboard.enable(),this._add("blockableMapEvent",new Ro(f))}_add(u,f,D){this._handlers.push({handlerName:u,handler:f,allowed:D}),this._handlersById[u]=f}stop(u){if(!this._updatingCamera){for(const{handler:f}of this._handlers)f.reset();this._inertia.clear(),this._fireEvents({},{},u),this._changes=[]}}isActive(){for(const{handler:u}of this._handlers)if(u.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!Ko(this._eventsInProgress)||this.isZooming()}_blockedByActive(u,f,D){for(const V in u)if(V!==D&&(!f||f.indexOf(V)<0))return!0;return!1}_getMapTouches(u){const f=[];for(const D of u){const V=D.target;this._el.contains(V)&&f.push(D)}return f}mergeHandlerResult(u,f,D,V,J){if(!D)return;r.e(u,D);const oe={handlerName:V,originalEvent:D.originalEvent||J};D.zoomDelta!==void 0&&(f.zoom=oe),D.panDelta!==void 0&&(f.drag=oe),D.pitchDelta!==void 0&&(f.pitch=oe),D.bearingDelta!==void 0&&(f.rotate=oe)}_applyChanges(){const u={},f={},D={};for(const[V,J,oe]of this._changes)V.panDelta&&(u.panDelta=(u.panDelta||new r.P(0,0))._add(V.panDelta)),V.zoomDelta&&(u.zoomDelta=(u.zoomDelta||0)+V.zoomDelta),V.bearingDelta&&(u.bearingDelta=(u.bearingDelta||0)+V.bearingDelta),V.pitchDelta&&(u.pitchDelta=(u.pitchDelta||0)+V.pitchDelta),V.around!==void 0&&(u.around=V.around),V.pinchAround!==void 0&&(u.pinchAround=V.pinchAround),V.noInertia&&(u.noInertia=V.noInertia),r.e(f,J),r.e(D,oe);this._updateMapTransform(u,f,D),this._changes=[]}_updateMapTransform(u,f,D){const V=this._map,J=V._getTransformForUpdate(),oe=V.terrain;if(!(hn(u)||oe&&this._terrainMovement))return this._fireEvents(f,D,!0);let{panDelta:fe,zoomDelta:xe,bearingDelta:Ee,pitchDelta:Fe,around:Ge,pinchAround:rt}=u;rt!==void 0&&(Ge=rt),V._stop(!0),Ge=Ge||V.transform.centerPoint;const ct=J.pointLocation(fe?Ge.sub(fe):Ge);Ee&&(J.bearing+=Ee),Fe&&(J.pitch+=Fe),xe&&(J.zoom+=xe),oe?this._terrainMovement||!f.drag&&!f.zoom?f.drag&&this._terrainMovement?J.center=J.pointLocation(J.centerPoint.sub(fe)):J.setLocationAtPoint(ct,Ge):(this._terrainMovement=!0,this._map._elevationFreeze=!0,J.setLocationAtPoint(ct,Ge)):J.setLocationAtPoint(ct,Ge),V._applyUpdatedTransform(J),this._map._update(),u.noInertia||this._inertia.record(u),this._fireEvents(f,D,!0)}_fireEvents(u,f,D){const V=Ko(this._eventsInProgress),J=Ko(u),oe={};for(const Ge in u){const{originalEvent:rt}=u[Ge];this._eventsInProgress[Ge]||(oe[`${Ge}start`]=rt),this._eventsInProgress[Ge]=u[Ge]}!V&&J&&this._fireEvent("movestart",J.originalEvent);for(const Ge in oe)this._fireEvent(Ge,oe[Ge]);J&&this._fireEvent("move",J.originalEvent);for(const Ge in u){const{originalEvent:rt}=u[Ge];this._fireEvent(Ge,rt)}const fe={};let xe;for(const Ge in this._eventsInProgress){const{handlerName:rt,originalEvent:ct}=this._eventsInProgress[Ge];this._handlersById[rt].isActive()||(delete this._eventsInProgress[Ge],xe=f[rt]||ct,fe[`${Ge}end`]=xe)}for(const Ge in fe)this._fireEvent(Ge,fe[Ge]);const Ee=Ko(this._eventsInProgress),Fe=(V||J)&&!Ee;if(Fe&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;const Ge=this._map._getTransformForUpdate();Ge.recalculateZoom(this._map.terrain),this._map._applyUpdatedTransform(Ge)}if(D&&Fe){this._updatingCamera=!0;const Ge=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),rt=ct=>ct!==0&&-this._bearingSnap<ct&&ct<this._bearingSnap;!Ge||!Ge.essential&&h.prefersReducedMotion?(this._map.fire(new r.k("moveend",{originalEvent:xe})),rt(this._map.getBearing())&&this._map.resetNorth()):(rt(Ge.bearing||this._map.getBearing())&&(Ge.bearing=0),Ge.freezeElevation=!0,this._map.easeTo(Ge,{originalEvent:xe})),this._updatingCamera=!1}}_fireEvent(u,f){this._map.fire(new r.k(u,f?{originalEvent:f}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add(u=>{delete this._frameId,this.handleEvent(new zs("renderFrame",{timeStamp:u})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class ao extends r.E{constructor(u,f){super(),this._renderFrameCallback=()=>{const D=Math.min((h.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(D)),D<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=u,this._bearingSnap=f.bearingSnap,this.on("moveend",()=>{delete this._requestedCameraState})}getCenter(){return new r.N(this.transform.center.lng,this.transform.center.lat)}setCenter(u,f){return this.jumpTo({center:u},f)}panBy(u,f,D){return u=r.P.convert(u).mult(-1),this.panTo(this.transform.center,r.e({offset:u},f),D)}panTo(u,f,D){return this.easeTo(r.e({center:u},f),D)}getZoom(){return this.transform.zoom}setZoom(u,f){return this.jumpTo({zoom:u},f),this}zoomTo(u,f,D){return this.easeTo(r.e({zoom:u},f),D)}zoomIn(u,f){return this.zoomTo(this.getZoom()+1,u,f),this}zoomOut(u,f){return this.zoomTo(this.getZoom()-1,u,f),this}getBearing(){return this.transform.bearing}setBearing(u,f){return this.jumpTo({bearing:u},f),this}getPadding(){return this.transform.padding}setPadding(u,f){return this.jumpTo({padding:u},f),this}rotateTo(u,f,D){return this.easeTo(r.e({bearing:u},f),D)}resetNorth(u,f){return this.rotateTo(0,r.e({duration:1e3},u),f),this}resetNorthPitch(u,f){return this.easeTo(r.e({bearing:0,pitch:0,duration:1e3},u),f),this}snapToNorth(u,f){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(u,f):this}getPitch(){return this.transform.pitch}setPitch(u,f){return this.jumpTo({pitch:u},f),this}cameraForBounds(u,f){u=Ce.convert(u);const D=f&&f.bearing||0;return this._cameraForBoxAndBearing(u.getNorthWest(),u.getSouthEast(),D,f)}_cameraForBoxAndBearing(u,f,D,V){const J={top:0,bottom:0,right:0,left:0};if(typeof(V=r.e({padding:J,offset:[0,0],maxZoom:this.transform.maxZoom},V)).padding=="number"){const gr=V.padding;V.padding={top:gr,bottom:gr,right:gr,left:gr}}V.padding=r.e(J,V.padding);const oe=this.transform,fe=oe.padding,xe=new Ce(u,f),Ee=oe.project(xe.getNorthWest()),Fe=oe.project(xe.getNorthEast()),Ge=oe.project(xe.getSouthEast()),rt=oe.project(xe.getSouthWest()),ct=r.ba(-D),pt=Ee.rotate(ct),xt=Fe.rotate(ct),Mt=Ge.rotate(ct),Tt=rt.rotate(ct),jt=new r.P(Math.max(pt.x,xt.x,Tt.x,Mt.x),Math.max(pt.y,xt.y,Tt.y,Mt.y)),Et=new r.P(Math.min(pt.x,xt.x,Tt.x,Mt.x),Math.min(pt.y,xt.y,Tt.y,Mt.y)),Jt=jt.sub(Et),Kt=(oe.width-(fe.left+fe.right+V.padding.left+V.padding.right))/Jt.x,Yt=(oe.height-(fe.top+fe.bottom+V.padding.top+V.padding.bottom))/Jt.y;if(Yt<0||Kt<0)return void r.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.");const da=Math.min(oe.scaleZoom(oe.scale*Math.min(Kt,Yt)),V.maxZoom),_a=r.P.convert(V.offset),Da=(V.padding.left-V.padding.right)/2,Na=(V.padding.top-V.padding.bottom)/2,Ga=new r.P(Da,Na).rotate(r.ba(D)),$a=_a.add(Ga).mult(oe.scale/oe.zoomScale(da));return{center:oe.unproject(Ee.add(Ge).div(2).sub($a)),zoom:da,bearing:D}}fitBounds(u,f,D){return this._fitInternal(this.cameraForBounds(u,f),f,D)}fitScreenCoordinates(u,f,D,V,J){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(r.P.convert(u)),this.transform.pointLocation(r.P.convert(f)),D,V),V,J)}_fitInternal(u,f,D){return u?(delete(f=r.e(u,f)).padding,f.linear?this.easeTo(f,D):this.flyTo(f,D)):this}jumpTo(u,f){this.stop();const D=this._getTransformForUpdate();let V=!1,J=!1,oe=!1;return"zoom"in u&&D.zoom!==+u.zoom&&(V=!0,D.zoom=+u.zoom),u.center!==void 0&&(D.center=r.N.convert(u.center)),"bearing"in u&&D.bearing!==+u.bearing&&(J=!0,D.bearing=+u.bearing),"pitch"in u&&D.pitch!==+u.pitch&&(oe=!0,D.pitch=+u.pitch),u.padding==null||D.isPaddingEqual(u.padding)||(D.padding=u.padding),this._applyUpdatedTransform(D),this.fire(new r.k("movestart",f)).fire(new r.k("move",f)),V&&this.fire(new r.k("zoomstart",f)).fire(new r.k("zoom",f)).fire(new r.k("zoomend",f)),J&&this.fire(new r.k("rotatestart",f)).fire(new r.k("rotate",f)).fire(new r.k("rotateend",f)),oe&&this.fire(new r.k("pitchstart",f)).fire(new r.k("pitch",f)).fire(new r.k("pitchend",f)),this.fire(new r.k("moveend",f))}calculateCameraOptionsFromTo(u,f,D,V=0){const J=r.Z.fromLngLat(u,f),oe=r.Z.fromLngLat(D,V),fe=oe.x-J.x,xe=oe.y-J.y,Ee=oe.z-J.z,Fe=Math.hypot(fe,xe,Ee);if(Fe===0)throw new Error("Can't calculate camera options with same From and To");const Ge=Math.hypot(fe,xe),rt=this.transform.scaleZoom(this.transform.cameraToCenterDistance/Fe/this.transform.tileSize),ct=180*Math.atan2(fe,-xe)/Math.PI;let pt=180*Math.acos(Ge/Fe)/Math.PI;return pt=Ee<0?90-pt:90+pt,{center:oe.toLngLat(),zoom:rt,pitch:pt,bearing:ct}}easeTo(u,f){var D;this._stop(!1,u.easeId),((u=r.e({offset:[0,0],duration:500,easing:r.b9},u)).animate===!1||!u.essential&&h.prefersReducedMotion)&&(u.duration=0);const V=this._getTransformForUpdate(),J=V.zoom,oe=V.bearing,fe=V.pitch,xe=V.padding,Ee="bearing"in u?this._normalizeBearing(u.bearing,oe):oe,Fe="pitch"in u?+u.pitch:fe,Ge="padding"in u?u.padding:V.padding,rt=r.P.convert(u.offset);let ct=V.centerPoint.add(rt);const pt=V.pointLocation(ct),{center:xt,zoom:Mt}=V.getConstrained(r.N.convert(u.center||pt),(D=u.zoom)!==null&&D!==void 0?D:J);this._normalizeCenter(xt,V);const Tt=V.project(pt),jt=V.project(xt).sub(Tt),Et=V.zoomScale(Mt-J);let Jt,Kt;u.around&&(Jt=r.N.convert(u.around),Kt=V.locationPoint(Jt));const Yt={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||Mt!==J,this._rotating=this._rotating||oe!==Ee,this._pitching=this._pitching||Fe!==fe,this._padding=!V.isPaddingEqual(Ge),this._easeId=u.easeId,this._prepareEase(f,u.noMoveStart,Yt),this.terrain&&this._prepareElevation(xt),this._ease(da=>{if(this._zooming&&(V.zoom=r.z.number(J,Mt,da)),this._rotating&&(V.bearing=r.z.number(oe,Ee,da)),this._pitching&&(V.pitch=r.z.number(fe,Fe,da)),this._padding&&(V.interpolatePadding(xe,Ge,da),ct=V.centerPoint.add(rt)),this.terrain&&!u.freezeElevation&&this._updateElevation(da),Jt)V.setLocationAtPoint(Jt,Kt);else{const _a=V.zoomScale(V.zoom-J),Da=Mt>J?Math.min(2,Et):Math.max(.5,Et),Na=Math.pow(Da,1-da),Ga=V.unproject(Tt.add(jt.mult(da*Na)).mult(_a));V.setLocationAtPoint(V.renderWorldCopies?Ga.wrap():Ga,ct)}this._applyUpdatedTransform(V),this._fireMoveEvents(f)},da=>{this.terrain&&u.freezeElevation&&this._finalizeElevation(),this._afterEase(f,da)},u),this}_prepareEase(u,f,D={}){this._moving=!0,f||D.moving||this.fire(new r.k("movestart",u)),this._zooming&&!D.zooming&&this.fire(new r.k("zoomstart",u)),this._rotating&&!D.rotating&&this.fire(new r.k("rotatestart",u)),this._pitching&&!D.pitching&&this.fire(new r.k("pitchstart",u))}_prepareElevation(u){this._elevationCenter=u,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(u,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(u){this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);const f=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(u<1&&f!==this._elevationTarget){const D=this._elevationTarget-this._elevationStart,V=(f-(D*u+this._elevationStart))/(1-u);this._elevationStart+=u*(D-V),this._elevationTarget=f}this.transform.elevation=r.z.number(this._elevationStart,this._elevationTarget,u)}_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(u){const f=u.getCameraPosition(),D=this.terrain.getElevationForLngLatZoom(f.lngLat,u.zoom);if(f.altitude<D){const V=this.calculateCameraOptionsFromTo(f.lngLat,D,u.center,u.elevation);return{pitch:V.pitch,zoom:V.zoom}}return{}}_applyUpdatedTransform(u){const f=[];if(this.terrain&&f.push(V=>this._elevateCameraIfInsideTerrain(V)),this.transformCameraUpdate&&f.push(V=>this.transformCameraUpdate(V)),!f.length)return;const D=u.clone();for(const V of f){const J=D.clone(),{center:oe,zoom:fe,pitch:xe,bearing:Ee,elevation:Fe}=V(J);oe&&(J.center=oe),fe!==void 0&&(J.zoom=fe),xe!==void 0&&(J.pitch=xe),Ee!==void 0&&(J.bearing=Ee),Fe!==void 0&&(J.elevation=Fe),D.apply(J)}this.transform.apply(D)}_fireMoveEvents(u){this.fire(new r.k("move",u)),this._zooming&&this.fire(new r.k("zoom",u)),this._rotating&&this.fire(new r.k("rotate",u)),this._pitching&&this.fire(new r.k("pitch",u))}_afterEase(u,f){if(this._easeId&&f&&this._easeId===f)return;delete this._easeId;const D=this._zooming,V=this._rotating,J=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,D&&this.fire(new r.k("zoomend",u)),V&&this.fire(new r.k("rotateend",u)),J&&this.fire(new r.k("pitchend",u)),this.fire(new r.k("moveend",u))}flyTo(u,f){var D;if(!u.essential&&h.prefersReducedMotion){const nr=r.M(u,["center","zoom","bearing","pitch","around"]);return this.jumpTo(nr,f)}this.stop(),u=r.e({offset:[0,0],speed:1.2,curve:1.42,easing:r.b9},u);const V=this._getTransformForUpdate(),J=V.zoom,oe=V.bearing,fe=V.pitch,xe=V.padding,Ee="bearing"in u?this._normalizeBearing(u.bearing,oe):oe,Fe="pitch"in u?+u.pitch:fe,Ge="padding"in u?u.padding:V.padding,rt=r.P.convert(u.offset);let ct=V.centerPoint.add(rt);const pt=V.pointLocation(ct),{center:xt,zoom:Mt}=V.getConstrained(r.N.convert(u.center||pt),(D=u.zoom)!==null&&D!==void 0?D:J);this._normalizeCenter(xt,V);const Tt=V.zoomScale(Mt-J),jt=V.project(pt),Et=V.project(xt).sub(jt);let Jt=u.curve;const Kt=Math.max(V.width,V.height),Yt=Kt/Tt,da=Et.mag();if("minZoom"in u){const nr=r.ad(Math.min(u.minZoom,J,Mt),V.minZoom,V.maxZoom),Sr=Kt/V.zoomScale(nr-J);Jt=Math.sqrt(Sr/da*2)}const _a=Jt*Jt;function Da(nr){const Sr=(Yt*Yt-Kt*Kt+(nr?-1:1)*_a*_a*da*da)/(2*(nr?Yt:Kt)*_a*da);return Math.log(Math.sqrt(Sr*Sr+1)-Sr)}function Na(nr){return(Math.exp(nr)-Math.exp(-nr))/2}function Ga(nr){return(Math.exp(nr)+Math.exp(-nr))/2}const $a=Da(!1);let gr=function(nr){return Ga($a)/Ga($a+Jt*nr)},Qa=function(nr){return Kt*((Ga($a)*(Na(Sr=$a+Jt*nr)/Ga(Sr))-Na($a))/_a)/da;var Sr},xr=(Da(!0)-$a)/Jt;if(Math.abs(da)<1e-6||!isFinite(xr)){if(Math.abs(Kt-Yt)<1e-6)return this.easeTo(u,f);const nr=Yt<Kt?-1:1;xr=Math.abs(Math.log(Yt/Kt))/Jt,Qa=()=>0,gr=Sr=>Math.exp(nr*Jt*Sr)}if("duration"in u)u.duration=+u.duration;else{const nr="screenSpeed"in u?+u.screenSpeed/Jt:+u.speed;u.duration=1e3*xr/nr}return u.maxDuration&&u.duration>u.maxDuration&&(u.duration=0),this._zooming=!0,this._rotating=oe!==Ee,this._pitching=Fe!==fe,this._padding=!V.isPaddingEqual(Ge),this._prepareEase(f,!1),this.terrain&&this._prepareElevation(xt),this._ease(nr=>{const Sr=nr*xr,pr=1/gr(Sr);V.zoom=nr===1?Mt:J+V.scaleZoom(pr),this._rotating&&(V.bearing=r.z.number(oe,Ee,nr)),this._pitching&&(V.pitch=r.z.number(fe,Fe,nr)),this._padding&&(V.interpolatePadding(xe,Ge,nr),ct=V.centerPoint.add(rt)),this.terrain&&!u.freezeElevation&&this._updateElevation(nr);const Mr=nr===1?xt:V.unproject(jt.add(Et.mult(Qa(Sr))).mult(pr));V.setLocationAtPoint(V.renderWorldCopies?Mr.wrap():Mr,ct),this._applyUpdatedTransform(V),this._fireMoveEvents(f)},()=>{this.terrain&&u.freezeElevation&&this._finalizeElevation(),this._afterEase(f)},u),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(u,f){var D;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const V=this._onEaseEnd;delete this._onEaseEnd,V.call(this,f)}return u||(D=this.handlers)===null||D===void 0||D.stop(!1),this}_ease(u,f,D){D.animate===!1||D.duration===0?(u(1),f()):(this._easeStart=h.now(),this._easeOptions=D,this._onEaseFrame=u,this._onEaseEnd=f,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(u,f){u=r.b3(u,-180,180);const D=Math.abs(u-f);return Math.abs(u-360-f)<D&&(u-=360),Math.abs(u+360-f)<D&&(u+=360),u}_normalizeCenter(u,f){if(!f.renderWorldCopies||f.lngRange)return;const D=u.lng-f.center.lng;u.lng+=D>180?-360:D<-180?360:0}queryTerrainElevation(u){return this.terrain?this.terrain.getElevationForLngLatZoom(r.N.convert(u),this.transform.tileZoom)-this.transform.elevation:null}}const jo={compact:!0,customAttribution:'<a href="https://maplibre.org/" target="_blank">MapLibre</a>'};class ds{constructor(u=jo){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=f=>{!f||f.sourceDataType!=="metadata"&&f.sourceDataType!=="visibility"&&f.dataType!=="style"&&f.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=u}getDefaultPosition(){return"bottom-right"}onAdd(u){return this._map=u,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(u,f){const D=this._map._getUIString(`AttributionControl.${f}`);u.title=D,u.setAttribute("aria-label",D)}_updateAttributions(){if(!this._map.style)return;let u=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?u=u.concat(this.options.customAttribution.map(V=>typeof V!="string"?"":V)):typeof this.options.customAttribution=="string"&&u.push(this.options.customAttribution)),this._map.style.stylesheet){const V=this._map.style.stylesheet;this.styleOwner=V.owner,this.styleId=V.id}const f=this._map.style.sourceCaches;for(const V in f){const J=f[V];if(J.used||J.usedForTerrain){const oe=J.getSource();oe.attribution&&u.indexOf(oe.attribution)<0&&u.push(oe.attribution)}}u=u.filter(V=>String(V).trim()),u.sort((V,J)=>V.length-J.length),u=u.filter((V,J)=>{for(let oe=J+1;oe<u.length;oe++)if(u[oe].indexOf(V)>=0)return!1;return!0});const D=u.join(" | ");D!==this._attribHTML&&(this._attribHTML=D,u.length?(this._innerContainer.innerHTML=D,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class yo{constructor(u={}){this._updateCompact=()=>{const f=this._container.children;if(f.length){const D=f[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&D.classList.add("maplibregl-compact"):D.classList.remove("maplibregl-compact")}},this.options=u}getDefaultPosition(){return"bottom-left"}onAdd(u){this._map=u,this._compact=this.options&&this.options.compact,this._container=n.create("div","maplibregl-ctrl");const f=n.create("a","maplibregl-ctrl-logo");return f.target="_blank",f.rel="noopener nofollow",f.href="https://maplibre.org/",f.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),f.setAttribute("rel","noopener nofollow"),this._container.appendChild(f),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 Ec{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(u){const f=++this._id;return this._queue.push({callback:u,id:f,cancelled:!1}),f}remove(u){const f=this._currentlyRunning,D=f?this._queue.concat(f):this._queue;for(const V of D)if(V.id===u)return void(V.cancelled=!0)}run(u=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const f=this._currentlyRunning=this._queue;this._queue=[];for(const D of f)if(!D.cancelled&&(D.callback(u),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var tn=r.Y([{name:"a_pos3d",type:"Int16",components:3}]);class Uo extends r.E{constructor(u){super(),this.sourceCache=u,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,u.usedForTerrain=!0,u.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(u,f){this.sourceCache.update(u,f),this._renderableTilesKeys=[];const D={};for(const V of u.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:f}))D[V.key]=!0,this._renderableTilesKeys.push(V.key),this._tiles[V.key]||(V.posMatrix=new Float64Array(16),r.aQ(V.posMatrix,0,r.X,0,r.X,0,1),this._tiles[V.key]=new _e(V,this.tileSize));for(const V in this._tiles)D[V]||delete this._tiles[V]}freeRtt(u){for(const f in this._tiles){const D=this._tiles[f];(!u||D.tileID.equals(u)||D.tileID.isChildOf(u)||u.isChildOf(D.tileID))&&(D.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(u=>this.getTileByID(u))}getTileByID(u){return this._tiles[u]}getTerrainCoords(u){const f={};for(const D of this._renderableTilesKeys){const V=this._tiles[D].tileID;if(V.canonical.equals(u.canonical)){const J=u.clone();J.posMatrix=new Float64Array(16),r.aQ(J.posMatrix,0,r.X,0,r.X,0,1),f[D]=J}else if(V.canonical.isChildOf(u.canonical)){const J=u.clone();J.posMatrix=new Float64Array(16);const oe=V.canonical.z-u.canonical.z,fe=V.canonical.x-(V.canonical.x>>oe<<oe),xe=V.canonical.y-(V.canonical.y>>oe<<oe),Ee=r.X>>oe;r.aQ(J.posMatrix,0,Ee,0,Ee,0,1),r.J(J.posMatrix,J.posMatrix,[-fe*Ee,-xe*Ee,0]),f[D]=J}else if(u.canonical.isChildOf(V.canonical)){const J=u.clone();J.posMatrix=new Float64Array(16);const oe=u.canonical.z-V.canonical.z,fe=u.canonical.x-(u.canonical.x>>oe<<oe),xe=u.canonical.y-(u.canonical.y>>oe<<oe),Ee=r.X>>oe;r.aQ(J.posMatrix,0,r.X,0,r.X,0,1),r.J(J.posMatrix,J.posMatrix,[fe*Ee,xe*Ee,0]),r.K(J.posMatrix,J.posMatrix,[1/2**oe,1/2**oe,0]),f[D]=J}}return f}getSourceTile(u,f){const D=this.sourceCache._source;let V=u.overscaledZ-this.deltaZoom;if(V>D.maxzoom&&(V=D.maxzoom),V<D.minzoom)return null;this._sourceTileCache[u.key]||(this._sourceTileCache[u.key]=u.scaledTo(V).key);let J=this.sourceCache.getTileByID(this._sourceTileCache[u.key]);if((!J||!J.dem)&&f)for(;V>=D.minzoom&&(!J||!J.dem);)J=this.sourceCache.getTileByID(u.scaledTo(V--).key);return J}tilesAfterTime(u=Date.now()){return Object.values(this._tiles).filter(f=>f.timeAdded>=u)}}class ii{constructor(u,f,D){this.painter=u,this.sourceCache=new Uo(f),this.options=D,this.exaggeration=typeof D.exaggeration=="number"?D.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(u,f,D,V=r.X){var J;if(!(f>=0&&f<V&&D>=0&&D<V))return 0;const oe=this.getTerrainData(u),fe=(J=oe.tile)===null||J===void 0?void 0:J.dem;if(!fe)return 0;const xe=function(pt,xt,Mt){var Tt=xt[0],jt=xt[1];return pt[0]=Mt[0]*Tt+Mt[4]*jt+Mt[12],pt[1]=Mt[1]*Tt+Mt[5]*jt+Mt[13],pt}([],[f/V*r.X,D/V*r.X],oe.u_terrain_matrix),Ee=[xe[0]*fe.dim,xe[1]*fe.dim],Fe=Math.floor(Ee[0]),Ge=Math.floor(Ee[1]),rt=Ee[0]-Fe,ct=Ee[1]-Ge;return fe.get(Fe,Ge)*(1-rt)*(1-ct)+fe.get(Fe+1,Ge)*rt*(1-ct)+fe.get(Fe,Ge+1)*(1-rt)*ct+fe.get(Fe+1,Ge+1)*rt*ct}getElevationForLngLatZoom(u,f){const{tileID:D,mercatorX:V,mercatorY:J}=this._getOverscaledTileIDFromLngLatZoom(u,f);return this.getElevation(D,V%r.X,J%r.X,r.X)}getElevation(u,f,D,V=r.X){return this.getDEMElevation(u,f,D,V)*this.exaggeration}getTerrainData(u){if(!this._emptyDemTexture){const V=this.painter.context,J=new r.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new z(V,J,V.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new z(V,new r.R({width:1,height:1}),V.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(V.gl.NEAREST,V.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=r.ao([])}const f=this.sourceCache.getSourceTile(u,!0);if(f&&f.dem&&(!f.demTexture||f.needsTerrainPrepare)){const V=this.painter.context;f.demTexture=this.painter.getTileTexture(f.dem.stride),f.demTexture?f.demTexture.update(f.dem.getPixels(),{premultiply:!1}):f.demTexture=new z(V,f.dem.getPixels(),V.gl.RGBA,{premultiply:!1}),f.demTexture.bind(V.gl.NEAREST,V.gl.CLAMP_TO_EDGE),f.needsTerrainPrepare=!1}const D=f&&f+f.tileID.key+u.key;if(D&&!this._demMatrixCache[D]){const V=this.sourceCache.sourceCache._source.maxzoom;let J=u.canonical.z-f.tileID.canonical.z;u.overscaledZ>u.canonical.z&&(u.canonical.z>=V?J=u.canonical.z-V:r.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const oe=u.canonical.x-(u.canonical.x>>J<<J),fe=u.canonical.y-(u.canonical.y>>J<<J),xe=r.bb(new Float64Array(16),[1/(r.X<<J),1/(r.X<<J),0]);r.J(xe,xe,[oe*r.X,fe*r.X,0]),this._demMatrixCache[u.key]={matrix:xe,coord:u}}return{u_depth:2,u_terrain:3,u_terrain_dim:f&&f.dem&&f.dem.dim||1,u_terrain_matrix:D?this._demMatrixCache[u.key].matrix:this._emptyDemMatrix,u_terrain_unpack:f&&f.dem&&f.dem.getUnpackVector()||this._emptyDemUnpack,u_terrain_exaggeration:this.exaggeration,texture:(f&&f.demTexture||this._emptyDemTexture).texture,depthTexture:(this._fboDepthTexture||this._emptyDepthTexture).texture,tile:f}}getFramebuffer(u){const f=this.painter,D=f.width/devicePixelRatio,V=f.height/devicePixelRatio;return!this._fbo||this._fbo.width===D&&this._fbo.height===V||(this._fbo.destroy(),this._fboCoordsTexture.destroy(),this._fboDepthTexture.destroy(),delete this._fbo,delete this._fboDepthTexture,delete this._fboCoordsTexture),this._fboCoordsTexture||(this._fboCoordsTexture=new z(f.context,{width:D,height:V,data:null},f.context.gl.RGBA,{premultiply:!1}),this._fboCoordsTexture.bind(f.context.gl.NEAREST,f.context.gl.CLAMP_TO_EDGE)),this._fboDepthTexture||(this._fboDepthTexture=new z(f.context,{width:D,height:V,data:null},f.context.gl.RGBA,{premultiply:!1}),this._fboDepthTexture.bind(f.context.gl.NEAREST,f.context.gl.CLAMP_TO_EDGE)),this._fbo||(this._fbo=f.context.createFramebuffer(D,V,!0,!1),this._fbo.depthAttachment.set(f.context.createRenderbuffer(f.context.gl.DEPTH_COMPONENT16,D,V))),this._fbo.colorAttachment.set(u==="coords"?this._fboCoordsTexture.texture:this._fboDepthTexture.texture),this._fbo}getCoordsTexture(){const u=this.painter.context;if(this._coordsTexture)return this._coordsTexture;const f=new Uint8Array(this._coordsTextureSize*this._coordsTextureSize*4);for(let J=0,oe=0;J<this._coordsTextureSize;J++)for(let fe=0;fe<this._coordsTextureSize;fe++,oe+=4)f[oe+0]=255&fe,f[oe+1]=255&J,f[oe+2]=fe>>8<<4|J>>8,f[oe+3]=0;const D=new r.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(f.buffer)),V=new z(u,D,u.gl.RGBA,{premultiply:!1});return V.bind(u.gl.NEAREST,u.gl.CLAMP_TO_EDGE),this._coordsTexture=V,V}pointCoordinate(u){this.painter.maybeDrawDepthAndCoords(!0);const f=new Uint8Array(4),D=this.painter.context,V=D.gl,J=Math.round(u.x*this.painter.pixelRatio/devicePixelRatio),oe=Math.round(u.y*this.painter.pixelRatio/devicePixelRatio),fe=Math.round(this.painter.height/devicePixelRatio);D.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),V.readPixels(J,fe-oe-1,1,1,V.RGBA,V.UNSIGNED_BYTE,f),D.bindFramebuffer.set(null);const xe=f[0]+(f[2]>>4<<8),Ee=f[1]+((15&f[2])<<8),Fe=this.coordsIndex[255-f[3]],Ge=Fe&&this.sourceCache.getTileByID(Fe);if(!Ge)return null;const rt=this._coordsTextureSize,ct=(1<<Ge.tileID.canonical.z)*rt;return new r.Z((Ge.tileID.canonical.x*rt+xe)/ct+Ge.tileID.wrap,(Ge.tileID.canonical.y*rt+Ee)/ct,this.getElevation(Ge.tileID,xe,Ee,rt))}depthAtPoint(u){const f=new Uint8Array(4),D=this.painter.context,V=D.gl;return D.bindFramebuffer.set(this.getFramebuffer("depth").framebuffer),V.readPixels(u.x,this.painter.height/devicePixelRatio-u.y-1,1,1,V.RGBA,V.UNSIGNED_BYTE,f),D.bindFramebuffer.set(null),(f[0]/16777216+f[1]/65536+f[2]/256+f[3])/256}getTerrainMesh(){if(this._mesh)return this._mesh;const u=this.painter.context,f=new r.bc,D=new r.aY,V=this.meshSize,J=r.X/V,oe=V*V;for(let Ge=0;Ge<=V;Ge++)for(let rt=0;rt<=V;rt++)f.emplaceBack(rt*J,Ge*J,0);for(let Ge=0;Ge<oe;Ge+=V+1)for(let rt=0;rt<V;rt++)D.emplaceBack(rt+Ge,V+rt+Ge+1,V+rt+Ge+2),D.emplaceBack(rt+Ge,V+rt+Ge+2,rt+Ge+1);const fe=f.length,xe=fe+2*(V+1);for(const Ge of[0,1])for(let rt=0;rt<=V;rt++)for(const ct of[0,1])f.emplaceBack(rt*J,Ge*r.X,ct);for(let Ge=0;Ge<2*V;Ge+=2)D.emplaceBack(xe+Ge,xe+Ge+1,xe+Ge+3),D.emplaceBack(xe+Ge,xe+Ge+3,xe+Ge+2),D.emplaceBack(fe+Ge,fe+Ge+3,fe+Ge+1),D.emplaceBack(fe+Ge,fe+Ge+2,fe+Ge+3);const Ee=f.length,Fe=Ee+2*(V+1);for(const Ge of[0,1])for(let rt=0;rt<=V;rt++)for(const ct of[0,1])f.emplaceBack(Ge*r.X,rt*J,ct);for(let Ge=0;Ge<2*V;Ge+=2)D.emplaceBack(Ee+Ge,Ee+Ge+1,Ee+Ge+3),D.emplaceBack(Ee+Ge,Ee+Ge+3,Ee+Ge+2),D.emplaceBack(Fe+Ge,Fe+Ge+3,Fe+Ge+1),D.emplaceBack(Fe+Ge,Fe+Ge+2,Fe+Ge+3);return this._mesh=new cc(u.createVertexBuffer(f,tn.members),u.createIndexBuffer(D),r.a0.simpleSegment(0,0,f.length,D.length)),this._mesh}getMeshFrameDelta(u){return 2*Math.PI*r.bd/Math.pow(2,u)/5}getMinTileElevationForLngLatZoom(u,f){var D;const{tileID:V}=this._getOverscaledTileIDFromLngLatZoom(u,f);return(D=this.getMinMaxElevation(V).minElevation)!==null&&D!==void 0?D:0}getMinMaxElevation(u){const f=this.getTerrainData(u).tile,D={minElevation:null,maxElevation:null};return f&&f.dem&&(D.minElevation=f.dem.min*this.exaggeration,D.maxElevation=f.dem.max*this.exaggeration),D}_getOverscaledTileIDFromLngLatZoom(u,f){const D=r.Z.fromLngLat(u.wrap()),V=(1<<f)*r.X,J=D.x*V,oe=D.y*V,fe=Math.floor(J/r.X),xe=Math.floor(oe/r.X);return{tileID:new r.S(f,0,f,fe,xe),mercatorX:J,mercatorY:oe}}}class Vl{constructor(u,f,D){this._context=u,this._size=f,this._tileSize=D,this._objects=[],this._recentlyUsed=[],this._stamp=0}destruct(){for(const u of this._objects)u.texture.destroy(),u.fbo.destroy()}_createObject(u){const f=this._context.createFramebuffer(this._tileSize,this._tileSize,!0,!0),D=new z(this._context,{width:this._tileSize,height:this._tileSize,data:null},this._context.gl.RGBA);return D.bind(this._context.gl.LINEAR,this._context.gl.CLAMP_TO_EDGE),f.depthAttachment.set(this._context.createRenderbuffer(this._context.gl.DEPTH_STENCIL,this._tileSize,this._tileSize)),f.colorAttachment.set(D.texture),{id:u,fbo:f,texture:D,stamp:-1,inUse:!1}}getObjectForId(u){return this._objects[u]}useObject(u){u.inUse=!0,this._recentlyUsed=this._recentlyUsed.filter(f=>u.id!==f),this._recentlyUsed.push(u.id)}stampObject(u){u.stamp=++this._stamp}getOrCreateFreeObject(){for(const f of this._recentlyUsed)if(!this._objects[f].inUse)return this._objects[f];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");const u=this._createObject(this._objects.length);return this._objects.push(u),u}freeObject(u){u.inUse=!1}freeAllObjects(){for(const u of this._objects)this.freeObject(u)}isFull(){return!(this._objects.length<this._size)&&this._objects.some(u=>!u.inUse)===!1}}const vs={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class qs{constructor(u,f){this.painter=u,this.terrain=f,this.pool=new Vl(u.context,30,f.sourceCache.tileSize*f.qualityFactor)}destruct(){this.pool.destruct()}getTexture(u){return this.pool.getObjectForId(u.rtt[this._stacks.length-1].id).texture}prepareForRender(u,f){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=u._order.filter(D=>!u._layers[D].isHidden(f)),this._coordsDescendingInv={};for(const D in u.sourceCaches){this._coordsDescendingInv[D]={};const V=u.sourceCaches[D].getVisibleCoordinates();for(const J of V){const oe=this.terrain.sourceCache.getTerrainCoords(J);for(const fe in oe)this._coordsDescendingInv[D][fe]||(this._coordsDescendingInv[D][fe]=[]),this._coordsDescendingInv[D][fe].push(oe[fe])}}this._coordsDescendingInvStr={};for(const D of u._order){const V=u._layers[D],J=V.source;if(vs[V.type]&&!this._coordsDescendingInvStr[J]){this._coordsDescendingInvStr[J]={};for(const oe in this._coordsDescendingInv[J])this._coordsDescendingInvStr[J][oe]=this._coordsDescendingInv[J][oe].map(fe=>fe.key).sort().join()}}for(const D of this._renderableTiles)for(const V in this._coordsDescendingInvStr){const J=this._coordsDescendingInvStr[V][D.tileID.key];J&&J!==D.rttCoords[V]&&(D.rtt=[])}}renderLayer(u){if(u.isHidden(this.painter.transform.zoom))return!1;const f=u.type,D=this.painter,V=this._renderableLayerIds[this._renderableLayerIds.length-1]===u.id;if(vs[f]&&(this._prevType&&vs[this._prevType]||this._stacks.push([]),this._prevType=f,this._stacks[this._stacks.length-1].push(u.id),!V))return!0;if(vs[this._prevType]||vs[f]&&V){this._prevType=f;const J=this._stacks.length-1,oe=this._stacks[J]||[];for(const fe of this._renderableTiles){if(this.pool.isFull()&&(lc(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(fe),fe.rtt[J]){const Ee=this.pool.getObjectForId(fe.rtt[J].id);if(Ee.stamp===fe.rtt[J].stamp){this.pool.useObject(Ee);continue}}const xe=this.pool.getOrCreateFreeObject();this.pool.useObject(xe),this.pool.stampObject(xe),fe.rtt[J]={id:xe.id,stamp:xe.stamp},D.context.bindFramebuffer.set(xe.fbo.framebuffer),D.context.clear({color:r.aN.transparent,stencil:0}),D.currentStencilSource=void 0;for(let Ee=0;Ee<oe.length;Ee++){const Fe=D.style._layers[oe[Ee]],Ge=Fe.source?this._coordsDescendingInv[Fe.source][fe.tileID.key]:[fe.tileID];D.context.viewport.set([0,0,xe.fbo.width,xe.fbo.height]),D._renderTileClippingMasks(Fe,Ge),D.renderLayer(D,D.style.sourceCaches[Fe.source],Fe,Ge),Fe.source&&(fe.rttCoords[Fe.source]=this._coordsDescendingInvStr[Fe.source][fe.tileID.key])}}return lc(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects(),vs[f]}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"},Mc=_,hl={hash:!1,interactive:!0,bearingSnap:7,attributionControl:jo,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:r.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},Ei=R=>{R.touchstart=R.dragStart,R.touchmoveWindow=R.dragMove,R.touchend=R.dragEnd},Os={showCompass:!0,showZoom:!0,visualizePitch:!1};class qr{constructor(u,f,D=!1){this.mousedown=oe=>{this.startMouse(r.e({},oe,{ctrlKey:!0,preventDefault:()=>oe.preventDefault()}),n.mousePos(this.element,oe)),n.addEventListener(window,"mousemove",this.mousemove),n.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=oe=>{this.moveMouse(oe,n.mousePos(this.element,oe))},this.mouseup=oe=>{this.mouseRotate.dragEnd(oe),this.mousePitch&&this.mousePitch.dragEnd(oe),this.offTemp()},this.touchstart=oe=>{oe.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=n.touchPos(this.element,oe.targetTouches)[0],this.startTouch(oe,this._startPos),n.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),n.addEventListener(window,"touchend",this.touchend))},this.touchmove=oe=>{oe.targetTouches.length!==1?this.reset():(this._lastPos=n.touchPos(this.element,oe.targetTouches)[0],this.moveTouch(oe,this._lastPos))},this.touchend=oe=>{oe.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 V=u.dragRotate._mouseRotate.getClickTolerance(),J=u.dragRotate._mousePitch.getClickTolerance();this.element=f,this.mouseRotate=$l({clickTolerance:V,enable:!0}),this.touchRotate=(({enable:oe,clickTolerance:fe,bearingDegreesPerPixelMoved:xe=.8})=>{const Ee=new Fl;return new Co({clickTolerance:fe,move:(Fe,Ge)=>({bearingDelta:(Ge.x-Fe.x)*xe}),moveStateManager:Ee,enable:oe,assignEvents:Ei})})({clickTolerance:V,enable:!0}),this.map=u,D&&(this.mousePitch=sl({clickTolerance:J,enable:!0}),this.touchPitch=(({enable:oe,clickTolerance:fe,pitchDegreesPerPixelMoved:xe=-.5})=>{const Ee=new Fl;return new Co({clickTolerance:fe,move:(Fe,Ge)=>({pitchDelta:(Ge.y-Fe.y)*xe}),moveStateManager:Ee,enable:oe,assignEvents:Ei})})({clickTolerance:J,enable:!0})),n.addEventListener(f,"mousedown",this.mousedown),n.addEventListener(f,"touchstart",this.touchstart,{passive:!1}),n.addEventListener(f,"touchcancel",this.reset)}startMouse(u,f){this.mouseRotate.dragStart(u,f),this.mousePitch&&this.mousePitch.dragStart(u,f),n.disableDrag()}startTouch(u,f){this.touchRotate.dragStart(u,f),this.touchPitch&&this.touchPitch.dragStart(u,f),n.disableDrag()}moveMouse(u,f){const D=this.map,{bearingDelta:V}=this.mouseRotate.dragMove(u,f)||{};if(V&&D.setBearing(D.getBearing()+V),this.mousePitch){const{pitchDelta:J}=this.mousePitch.dragMove(u,f)||{};J&&D.setPitch(D.getPitch()+J)}}moveTouch(u,f){const D=this.map,{bearingDelta:V}=this.touchRotate.dragMove(u,f)||{};if(V&&D.setBearing(D.getBearing()+V),this.touchPitch){const{pitchDelta:J}=this.touchPitch.dragMove(u,f)||{};J&&D.setPitch(D.getPitch()+J)}}off(){const u=this.element;n.removeEventListener(u,"mousedown",this.mousedown),n.removeEventListener(u,"touchstart",this.touchstart,{passive:!1}),n.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),n.removeEventListener(window,"touchend",this.touchend),n.removeEventListener(u,"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 kn;function Qo(R,u,f){const D=new r.N(R.lng,R.lat);if(R=new r.N(R.lng,R.lat),u){const V=new r.N(R.lng-360,R.lat),J=new r.N(R.lng+360,R.lat),oe=f.locationPoint(R).distSqr(u);f.locationPoint(V).distSqr(u)<oe?R=V:f.locationPoint(J).distSqr(u)<oe&&(R=J)}for(;Math.abs(R.lng-f.center.lng)>180;){const V=f.locationPoint(R);if(V.x>=0&&V.y>=0&&V.x<=f.width&&V.y<=f.height)break;R.lng>f.center.lng?R.lng-=360:R.lng+=360}return R.lng!==D.lng&&f.locationPoint(R).y>f.height/2-f.getHorizon()?R:D}const Ds={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 pl(R,u,f){const D=R.classList;for(const V in Ds)D.remove(`maplibregl-${f}-anchor-${V}`);D.add(`maplibregl-${f}-anchor-${u}`)}class Oi extends r.E{constructor(u){if(super(),this._onKeyPress=f=>{const D=f.code,V=f.charCode||f.keyCode;D!=="Space"&&D!=="Enter"&&V!==32&&V!==13||this.togglePopup()},this._onMapClick=f=>{const D=f.originalEvent.target,V=this._element;this._popup&&(D===V||V.contains(D))&&this.togglePopup()},this._update=f=>{var D;if(!this._map)return;const V=this._map.loaded()&&!this._map.isMoving();((f==null?void 0:f.type)==="terrain"||(f==null?void 0:f.type)==="render"&&!V)&&this._map.once("render",this._update),this._map.transform.renderWorldCopies?this._lngLat=Qo(this._lngLat,this._flatPos,this._map.transform):this._lngLat=(D=this._lngLat)===null||D===void 0?void 0:D.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 J="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?J=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(J=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let oe="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?oe="rotateX(0deg)":this._pitchAlignment==="map"&&(oe=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||f&&f.type!=="moveend"||(this._pos=this._pos.round()),n.setTransform(this._element,`${Ds[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${oe} ${J}`),h.frameAsync(new AbortController).then(()=>{this._updateOpacity(f&&f.type==="moveend")}).catch(()=>{})},this._onMove=f=>{if(!this._isDragging){const D=this._clickTolerance||this._map._clickTolerance;this._isDragging=f.point.dist(this._pointerdownPos)>=D}this._isDragging&&(this._pos=f.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 r.k("dragstart"))),this.fire(new r.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 r.k("dragend")),this._state="inactive"},this._addDragHandler=f=>{this._element.contains(f.originalEvent.target)&&(f.preventDefault(),this._positionDelta=f.point.sub(this._pos).add(this._offset),this._pointerdownPos=f.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=u&&u.anchor||"center",this._color=u&&u.color||"#3FB1CE",this._scale=u&&u.scale||1,this._draggable=u&&u.draggable||!1,this._clickTolerance=u&&u.clickTolerance||0,this._subpixelPositioning=u&&u.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=u&&u.rotation||0,this._rotationAlignment=u&&u.rotationAlignment||"auto",this._pitchAlignment=u&&u.pitchAlignment&&u.pitchAlignment!=="auto"?u.pitchAlignment:this._rotationAlignment,this.setOpacity(),this.setOpacity(u==null?void 0:u.opacity,u==null?void 0:u.opacityWhenCovered),u&&u.element)this._element=u.element,this._offset=r.P.convert(u&&u.offset||[0,0]);else{this._defaultMarker=!0,this._element=n.create("div");const f=n.createNS("http://www.w3.org/2000/svg","svg"),D=41,V=27;f.setAttributeNS(null,"display","block"),f.setAttributeNS(null,"height",`${D}px`),f.setAttributeNS(null,"width",`${V}px`),f.setAttributeNS(null,"viewBox",`0 0 ${V} ${D}`);const J=n.createNS("http://www.w3.org/2000/svg","g");J.setAttributeNS(null,"stroke","none"),J.setAttributeNS(null,"stroke-width","1"),J.setAttributeNS(null,"fill","none"),J.setAttributeNS(null,"fill-rule","evenodd");const oe=n.createNS("http://www.w3.org/2000/svg","g");oe.setAttributeNS(null,"fill-rule","nonzero");const fe=n.createNS("http://www.w3.org/2000/svg","g");fe.setAttributeNS(null,"transform","translate(3.0, 29.0)"),fe.setAttributeNS(null,"fill","#000000");const xe=[{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 Tt of xe){const jt=n.createNS("http://www.w3.org/2000/svg","ellipse");jt.setAttributeNS(null,"opacity","0.04"),jt.setAttributeNS(null,"cx","10.5"),jt.setAttributeNS(null,"cy","5.80029008"),jt.setAttributeNS(null,"rx",Tt.rx),jt.setAttributeNS(null,"ry",Tt.ry),fe.appendChild(jt)}const Ee=n.createNS("http://www.w3.org/2000/svg","g");Ee.setAttributeNS(null,"fill",this._color);const Fe=n.createNS("http://www.w3.org/2000/svg","path");Fe.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(Fe);const Ge=n.createNS("http://www.w3.org/2000/svg","g");Ge.setAttributeNS(null,"opacity","0.25"),Ge.setAttributeNS(null,"fill","#000000");const rt=n.createNS("http://www.w3.org/2000/svg","path");rt.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"),Ge.appendChild(rt);const ct=n.createNS("http://www.w3.org/2000/svg","g");ct.setAttributeNS(null,"transform","translate(6.0, 7.0)"),ct.setAttributeNS(null,"fill","#FFFFFF");const pt=n.createNS("http://www.w3.org/2000/svg","g");pt.setAttributeNS(null,"transform","translate(8.0, 8.0)");const xt=n.createNS("http://www.w3.org/2000/svg","circle");xt.setAttributeNS(null,"fill","#000000"),xt.setAttributeNS(null,"opacity","0.25"),xt.setAttributeNS(null,"cx","5.5"),xt.setAttributeNS(null,"cy","5.5"),xt.setAttributeNS(null,"r","5.4999962");const Mt=n.createNS("http://www.w3.org/2000/svg","circle");Mt.setAttributeNS(null,"fill","#FFFFFF"),Mt.setAttributeNS(null,"cx","5.5"),Mt.setAttributeNS(null,"cy","5.5"),Mt.setAttributeNS(null,"r","5.4999962"),pt.appendChild(xt),pt.appendChild(Mt),oe.appendChild(fe),oe.appendChild(Ee),oe.appendChild(Ge),oe.appendChild(ct),oe.appendChild(pt),f.appendChild(oe),f.setAttributeNS(null,"height",D*this._scale+"px"),f.setAttributeNS(null,"width",V*this._scale+"px"),this._element.appendChild(f),this._offset=r.P.convert(u&&u.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",f=>{f.preventDefault()}),this._element.addEventListener("mousedown",f=>{f.preventDefault()}),pl(this._element,this._anchor,"marker"),u&&u.className)for(const f of u.className.split(" "))this._element.classList.add(f);this._popup=null}addTo(u){return this.remove(),this._map=u,this._element.setAttribute("aria-label",u._getUIString("Marker.Title")),u.getCanvasContainer().appendChild(this._element),u.on("move",this._update),u.on("moveend",this._update),u.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(u){return this._lngLat=r.N.convert(u),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(u){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),u){if(!("offset"in u.options)){const V=Math.abs(13.5)/Math.SQRT2;u.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[V,-1*(24.6+V)],"bottom-right":[-V,-1*(24.6+V)],left:[13.5,-24.6],right:[-13.5,-24.6]}:this._offset}this._popup=u,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(u){return this._subpixelPositioning=u,this}getPopup(){return this._popup}togglePopup(){const u=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:u?(u.isOpen()?u.remove():(u.setLngLat(this._lngLat),u.addTo(this._map)),this):this}_updateOpacity(u=!1){var f,D;if(!(!((f=this._map)===null||f===void 0)&&f.terrain))return void(this._element.style.opacity!==this._opacity&&(this._element.style.opacity=this._opacity));if(u)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}const V=this._map,J=V.terrain.depthAtPoint(this._pos),oe=V.terrain.getElevationForLngLatZoom(this._lngLat,V.transform.tileZoom);if(V.transform.lngLatToCameraDepth(this._lngLat,oe)-J<.006)return void(this._element.style.opacity=this._opacity);const fe=-this._offset.y/V.transform._pixelPerMeter,xe=Math.sin(V.getPitch()*Math.PI/180)*fe,Ee=V.terrain.depthAtPoint(new r.P(this._pos.x,this._pos.y-this._offset.y)),Fe=V.transform.lngLatToCameraDepth(this._lngLat,oe+xe)-Ee>.006;!((D=this._popup)===null||D===void 0)&&D.isOpen()&&Fe&&this._popup.remove(),this._element.style.opacity=Fe?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(u){return this._offset=r.P.convert(u),this._update(),this}addClassName(u){this._element.classList.add(u)}removeClassName(u){this._element.classList.remove(u)}toggleClassName(u){return this._element.classList.toggle(u)}setDraggable(u){return this._draggable=!!u,this._map&&(u?(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(u){return this._rotation=u||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(u){return this._rotationAlignment=u||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(u){return this._pitchAlignment=u&&u!=="auto"?u:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(u,f){return u===void 0&&f===void 0&&(this._opacity="1",this._opacityWhenCovered="0.2"),u!==void 0&&(this._opacity=u),f!==void 0&&(this._opacityWhenCovered=f),this._map&&this._updateOpacity(!0),this}}const jl={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let Xn=0,Kl=!1;class fn extends r.E{constructor(u){super(),this._onSuccess=f=>{if(this._map){if(this._isOutOfMapMaxBounds(f))return this._setErrorState(),this.fire(new r.k("outofmaxbounds",f)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=f,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(f),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(f),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new r.k("geolocate",f)),this._finish()}},this._updateCamera=f=>{const D=new r.N(f.coords.longitude,f.coords.latitude),V=f.coords.accuracy,J=this._map.getBearing(),oe=r.e({bearing:J},this.options.fitBoundsOptions),fe=Ce.fromLngLat(D,V);this._map.fitBounds(fe,oe,{geolocateSource:!0})},this._updateMarker=f=>{if(f){const D=new r.N(f.coords.longitude,f.coords.latitude);this._accuracyCircleMarker.setLngLat(D).addTo(this._map),this._userLocationDotMarker.setLngLat(D).addTo(this._map),this._accuracy=f.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=f=>{if(this._map){if(this.options.trackUserLocation)if(f.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 D=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=D,this._geolocateButton.setAttribute("aria-label",D),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(f.code===3&&Kl)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new r.k("error",f)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",f=>f.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=f=>{if(this._map){if(f===!1){r.w("Geolocation support is not available so the GeolocateControl will be disabled.");const D=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=D,this._geolocateButton.setAttribute("aria-label",D)}else{const D=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=D,this._geolocateButton.setAttribute("aria-label",D)}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 Oi({element:this._dotElement}),this._circleElement=n.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Oi({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",D=>{const V=D.originalEvent&&D.originalEvent.type==="resize";D.geolocateSource||this._watchState!=="ACTIVE_LOCK"||V||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new r.k("trackuserlocationend")),this.fire(new r.k("userlocationlostfocus")))})}},this.options=r.e({},jl,u)}onAdd(u){return this._map=u,this._container=n.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return r._(this,arguments,void 0,function*(f=!1){if(kn!==void 0&&!f)return kn;if(window.navigator.permissions===void 0)return kn=!!window.navigator.geolocation,kn;try{kn=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{kn=!!window.navigator.geolocation}return kn})}().then(f=>this._finishSetupUI(f)),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,Xn=0,Kl=!1}_isOutOfMapMaxBounds(u){const f=this._map.getMaxBounds(),D=u.coords;return f&&(D.longitude<f.getWest()||D.longitude>f.getEast()||D.latitude<f.getSouth()||D.latitude>f.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 u=this._map.getBounds(),f=u.getSouthEast(),D=u.getNorthEast(),V=f.distanceTo(D),J=this._map._container.clientHeight,oe=Math.ceil(this._accuracy/(V/J)*2);this._circleElement.style.width=`${oe}px`,this._circleElement.style.height=`${oe}px`}trigger(){if(!this._setup)return r.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 r.k("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Xn--,Kl=!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 r.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 r.k("trackuserlocationstart")),this.fire(new r.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 u;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Xn++,Xn>1?(u={maximumAge:6e5,timeout:0},Kl=!0):(u=this.options.positionOptions,Kl=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,u)}}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 an={maxWidth:100,unit:"metric"};function wi(R,u,f){const D=f&&f.maxWidth||100,V=R._container.clientHeight/2,J=R.unproject([0,V]),oe=R.unproject([D,V]),fe=J.distanceTo(oe);if(f&&f.unit==="imperial"){const xe=3.2808*fe;xe>5280?vo(u,D,xe/5280,R._getUIString("ScaleControl.Miles")):vo(u,D,xe,R._getUIString("ScaleControl.Feet"))}else f&&f.unit==="nautical"?vo(u,D,fe/1852,R._getUIString("ScaleControl.NauticalMiles")):fe>=1e3?vo(u,D,fe/1e3,R._getUIString("ScaleControl.Kilometers")):vo(u,D,fe,R._getUIString("ScaleControl.Meters"))}function vo(R,u,f,D){const V=function(oe){const fe=Math.pow(10,`${Math.floor(oe)}`.length-1);let xe=oe/fe;return xe=xe>=10?10:xe>=5?5:xe>=3?3:xe>=2?2:xe>=1?1:function(Ee){const Fe=Math.pow(10,Math.ceil(-Math.log(Ee)/Math.LN10));return Math.round(Ee*Fe)/Fe}(xe),fe*xe}(f),J=V/f;R.style.width=u*J+"px",R.innerHTML=`${V}&nbsp;${D}`}class Ul extends r.E{constructor(u={}){super(),this._onFullscreenChange=()=>{var f;let D=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((f=D==null?void 0:D.shadowRoot)===null||f===void 0)&&f.fullscreenElement;)D=D.shadowRoot.fullscreenElement;D===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,u&&u.container&&(u.container instanceof HTMLElement?this._container=u.container:r.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(u){return this._map=u,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 u=this._fullscreenButton=n.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);n.create("span","maplibregl-ctrl-icon",u).setAttribute("aria-hidden","true"),u.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){const u=this._getTitle();this._fullscreenButton.setAttribute("aria-label",u),this._fullscreenButton.title=u}_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 r.k("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new r.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 es={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},vt=["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 r.E{constructor(u){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 r.k("close"))),this),this._onMouseUp=f=>{this._update(f.point)},this._onMouseMove=f=>{this._update(f.point)},this._onDrag=f=>{this._update(f.point)},this._update=f=>{var D;const V=this._lngLat||this._trackPointer;if(!this._map||!V||!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=Qo(this._lngLat,this._flatPos,this._map.transform):this._lngLat=(D=this._lngLat)===null||D===void 0?void 0:D.wrap(),this._trackPointer&&!f)return;const J=this._flatPos=this._pos=this._trackPointer&&f?f:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&f?f:this._map.transform.locationPoint(this._lngLat));let oe=this.options.anchor;const fe=zt(this.options.offset);if(!oe){const Ee=this._container.offsetWidth,Fe=this._container.offsetHeight;let Ge;Ge=J.y+fe.bottom.y<Fe?["top"]:J.y>this._map.transform.height-Fe?["bottom"]:[],J.x<Ee/2?Ge.push("left"):J.x>this._map.transform.width-Ee/2&&Ge.push("right"),oe=Ge.length===0?"bottom":Ge.join("-")}let xe=J.add(fe[oe]);this.options.subpixelPositioning||(xe=xe.round()),n.setTransform(this._container,`${Ds[oe]} translate(${xe.x}px,${xe.y}px)`),pl(this._container,oe,"popup")},this._onClose=()=>{this.remove()},this.options=r.e(Object.create(es),u)}addTo(u){return this._map&&this.remove(),this._map=u,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 r.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(u){return this._lngLat=r.N.convert(u),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(u){return this.setDOMContent(document.createTextNode(u))}setHTML(u){const f=document.createDocumentFragment(),D=document.createElement("body");let V;for(D.innerHTML=u;V=D.firstChild,V;)f.appendChild(V);return this.setDOMContent(f)}getMaxWidth(){var u;return(u=this._container)===null||u===void 0?void 0:u.style.maxWidth}setMaxWidth(u){return this.options.maxWidth=u,this._update(),this}setDOMContent(u){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(u),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(u){return this._container&&this._container.classList.add(u),this}removeClassName(u){return this._container&&this._container.classList.remove(u),this}setOffset(u){return this.options.offset=u,this._update(),this}toggleClassName(u){if(this._container)return this._container.classList.toggle(u)}setSubpixelPositioning(u){this.options.subpixelPositioning=u}_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 u=this._container.querySelector(vt);u&&u.focus()}}function zt(R){if(R){if(typeof R=="number"){const u=Math.round(Math.abs(R)/Math.SQRT2);return{center:new r.P(0,0),top:new r.P(0,R),"top-left":new r.P(u,u),"top-right":new r.P(-u,u),bottom:new r.P(0,-R),"bottom-left":new r.P(u,-u),"bottom-right":new r.P(-u,-u),left:new r.P(R,0),right:new r.P(-R,0)}}if(R instanceof r.P||Array.isArray(R)){const u=r.P.convert(R);return{center:u,top:u,"top-left":u,"top-right":u,bottom:u,"bottom-left":u,"bottom-right":u,left:u,right:u}}return{center:r.P.convert(R.center||[0,0]),top:r.P.convert(R.top||[0,0]),"top-left":r.P.convert(R["top-left"]||[0,0]),"top-right":r.P.convert(R["top-right"]||[0,0]),bottom:r.P.convert(R.bottom||[0,0]),"bottom-left":r.P.convert(R["bottom-left"]||[0,0]),"bottom-right":r.P.convert(R["bottom-right"]||[0,0]),left:r.P.convert(R.left||[0,0]),right:r.P.convert(R.right||[0,0])}}return zt(new r.P(0,0))}const ae=_;p.AJAXError=r.bg,p.Evented=r.E,p.LngLat=r.N,p.MercatorCoordinate=r.Z,p.Point=r.P,p.addProtocol=r.bh,p.config=r.a,p.removeProtocol=r.bi,p.AttributionControl=ds,p.BoxZoomHandler=So,p.CanvasSource=Ae,p.CooperativeGesturesHandler=ys,p.DoubleClickZoomHandler=Ti,p.DragPanHandler=Bs,p.DragRotateHandler=Vo,p.EdgeInsets=Nl,p.FullscreenControl=Ul,p.GeoJSONSource=Pe,p.GeolocateControl=fn,p.Hash=eo,p.ImageSource=Ie,p.KeyboardHandler=pc,p.LngLatBounds=Ce,p.LogoControl=yo,p.Map=class extends ao{constructor(R){r.be.mark(r.bf.create);const u=Object.assign(Object.assign({},hl),R);if(u.minZoom!=null&&u.maxZoom!=null&&u.minZoom>u.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(u.minPitch!=null&&u.maxPitch!=null&&u.minPitch>u.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(u.minPitch!=null&&u.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(u.maxPitch!=null&&u.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new di(u.minZoom,u.maxZoom,u.minPitch,u.maxPitch,u.renderWorldCopies),{bearingSnap:u.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new Ec,this._controls=[],this._mapId=r.a4(),this._contextLost=D=>{D.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new r.k("webglcontextlost",{originalEvent:D}))},this._contextRestored=D=>{this._setupPainter(),this.resize(),this._update(),this.fire(new r.k("webglcontextrestored",{originalEvent:D}))},this._onMapScroll=D=>{if(D.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=u.interactive,this._maxTileCacheSize=u.maxTileCacheSize,this._maxTileCacheZoomLevels=u.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=u.failIfMajorPerformanceCaveat===!0,this._preserveDrawingBuffer=u.preserveDrawingBuffer===!0,this._antialias=u.antialias===!0,this._trackResize=u.trackResize===!0,this._bearingSnap=u.bearingSnap,this._refreshExpiredTiles=u.refreshExpiredTiles===!0,this._fadeDuration=u.fadeDuration,this._crossSourceCollisions=u.crossSourceCollisions===!0,this._collectResourceTiming=u.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},Oc),u.locale),this._clickTolerance=u.clickTolerance,this._overridePixelRatio=u.pixelRatio,this._maxCanvasSize=u.maxCanvasSize,this.transformCameraUpdate=u.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=u.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=C.addThrottleControl(()=>this.isMoving()),this._requestManager=new E(u.transformRequest),typeof u.container=="string"){if(this._container=document.getElementById(u.container),!this._container)throw new Error(`Container '${u.container}' not found.`)}else{if(!(u.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=u.container}if(u.maxBounds&&this.setMaxBounds(u.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 D=!1;const V=Ws(J=>{this._trackResize&&!this._removed&&this.resize(J)._update()},50);this._resizeObserver=new ResizeObserver(J=>{D?V(J):D=!0}),this._resizeObserver.observe(this._container)}this.handlers=new ni(this,u);const f=typeof u.hash=="string"&&u.hash||void 0;this._hash=u.hash&&new eo(f).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:u.center,zoom:u.zoom,bearing:u.bearing,pitch:u.pitch}),u.bounds&&(this.resize(),this.fitBounds(u.bounds,r.e({},u.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=u.localIdeographFontFamily,this._validateStyle=u.validateStyle,u.style&&this.setStyle(u.style,{localIdeographFontFamily:u.localIdeographFontFamily}),u.attributionControl&&this.addControl(new ds(typeof u.attributionControl=="boolean"?void 0:u.attributionControl)),u.maplibreLogo&&this.addControl(new yo,u.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",D=>{this._update(D.dataType==="style"),this.fire(new r.k(`${D.dataType}data`,D))}),this.on("dataloading",D=>{this.fire(new r.k(`${D.dataType}dataloading`,D))}),this.on("dataabort",D=>{this.fire(new r.k("sourcedataabort",D))})}_getMapId(){return this._mapId}addControl(R,u){if(u===void 0&&(u=R.getDefaultPosition?R.getDefaultPosition():"top-right"),!R||!R.onAdd)return this.fire(new r.j(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const f=R.onAdd(this);this._controls.push(R);const D=this._controlPositions[u];return u.indexOf("bottom")!==-1?D.insertBefore(f,D.firstChild):D.appendChild(f),this}removeControl(R){if(!R||!R.onRemove)return this.fire(new r.j(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const u=this._controls.indexOf(R);return u>-1&&this._controls.splice(u,1),R.onRemove(this),this}hasControl(R){return this._controls.indexOf(R)>-1}calculateCameraOptionsFromTo(R,u,f,D){return D==null&&this.terrain&&(D=this.terrain.getElevationForLngLatZoom(f,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(R,u,f,D)}resize(R){var u;const f=this._containerDimensions(),D=f[0],V=f[1],J=this._getClampedPixelRatio(D,V);if(this._resizeCanvas(D,V,J),this.painter.resize(D,V,J),this.painter.overLimit()){const fe=this.painter.context.gl;this._maxCanvasSize=[fe.drawingBufferWidth,fe.drawingBufferHeight];const xe=this._getClampedPixelRatio(D,V);this._resizeCanvas(D,V,xe),this.painter.resize(D,V,xe)}this.transform.resize(D,V),(u=this._requestedCameraState)===null||u===void 0||u.resize(D,V);const oe=!this._moving;return oe&&(this.stop(),this.fire(new r.k("movestart",R)).fire(new r.k("move",R))),this.fire(new r.k("resize",R)),oe&&this.fire(new r.k("moveend",R)),this}_getClampedPixelRatio(R,u){const{0:f,1:D}=this._maxCanvasSize,V=this.getPixelRatio(),J=R*V,oe=u*V,fe=J>f?f/J:1,xe=oe>D?D/oe:1;return Math.min(fe,xe)*V}getPixelRatio(){var R;return(R=this._overridePixelRatio)!==null&&R!==void 0?R:devicePixelRatio}setPixelRatio(R){this._overridePixelRatio=R,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(R){return this.transform.setMaxBounds(Ce.convert(R)),this._update()}setMinZoom(R){if((R=R??-2)>=-2&&R<=this.transform.maxZoom)return this.transform.minZoom=R,this._update(),this.getZoom()<R&&this.setZoom(R),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(R){if((R=R??22)>=this.transform.minZoom)return this.transform.maxZoom=R,this._update(),this.getZoom()>R&&this.setZoom(R),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(R){if((R=R??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(R>=0&&R<=this.transform.maxPitch)return this.transform.minPitch=R,this._update(),this.getPitch()<R&&this.setPitch(R),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(R){if((R=R??60)>85)throw new Error("maxPitch must be less than or equal to 85");if(R>=this.transform.minPitch)return this.transform.maxPitch=R,this._update(),this.getPitch()>R&&this.setPitch(R),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(R){return this.transform.renderWorldCopies=R,this._update()}project(R){return this.transform.locationPoint(r.N.convert(R),this.style&&this.terrain)}unproject(R){return this.transform.pointLocation(r.P.convert(R),this.terrain)}isMoving(){var R;return this._moving||((R=this.handlers)===null||R===void 0?void 0:R.isMoving())}isZooming(){var R;return this._zooming||((R=this.handlers)===null||R===void 0?void 0:R.isZooming())}isRotating(){var R;return this._rotating||((R=this.handlers)===null||R===void 0?void 0:R.isRotating())}_createDelegatedListener(R,u,f){if(R==="mouseenter"||R==="mouseover"){let D=!1;return{layer:u,listener:f,delegates:{mousemove:J=>{const oe=this.getLayer(u)?this.queryRenderedFeatures(J.point,{layers:[u]}):[];oe.length?D||(D=!0,f.call(this,new Bo(R,this,J.originalEvent,{features:oe}))):D=!1},mouseout:()=>{D=!1}}}}if(R==="mouseleave"||R==="mouseout"){let D=!1;return{layer:u,listener:f,delegates:{mousemove:oe=>{(this.getLayer(u)?this.queryRenderedFeatures(oe.point,{layers:[u]}):[]).length?D=!0:D&&(D=!1,f.call(this,new Bo(R,this,oe.originalEvent)))},mouseout:oe=>{D&&(D=!1,f.call(this,new Bo(R,this,oe.originalEvent)))}}}}{const D=V=>{const J=this.getLayer(u)?this.queryRenderedFeatures(V.point,{layers:[u]}):[];J.length&&(V.features=J,f.call(this,V),delete V.features)};return{layer:u,listener:f,delegates:{[R]:D}}}}on(R,u,f){if(f===void 0)return super.on(R,u);const D=this._createDelegatedListener(R,u,f);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[R]=this._delegatedListeners[R]||[],this._delegatedListeners[R].push(D);for(const V in D.delegates)this.on(V,D.delegates[V]);return this}once(R,u,f){if(f===void 0)return super.once(R,u);const D=this._createDelegatedListener(R,u,f);for(const V in D.delegates)this.once(V,D.delegates[V]);return this}off(R,u,f){return f===void 0?super.off(R,u):(this._delegatedListeners&&this._delegatedListeners[R]&&(D=>{const V=D[R];for(let J=0;J<V.length;J++){const oe=V[J];if(oe.layer===u&&oe.listener===f){for(const fe in oe.delegates)this.off(fe,oe.delegates[fe]);return V.splice(J,1),this}}})(this._delegatedListeners),this)}queryRenderedFeatures(R,u){if(!this.style)return[];let f;const D=R instanceof r.P||Array.isArray(R),V=D?R:[[0,0],[this.transform.width,this.transform.height]];if(u=u||(D?{}:R)||{},V instanceof r.P||typeof V[0]=="number")f=[r.P.convert(V)];else{const J=r.P.convert(V[0]),oe=r.P.convert(V[1]);f=[J,new r.P(oe.x,J.y),oe,new r.P(J.x,oe.y),J]}return this.style.queryRenderedFeatures(f,u,this.transform)}querySourceFeatures(R,u){return this.style.querySourceFeatures(R,u)}setStyle(R,u){return(u=r.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},u)).diff!==!1&&u.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&R?(this._diffStyle(R,u),this):(this._localIdeographFontFamily=u.localIdeographFontFamily,this._updateStyle(R,u))}setTransformRequest(R){return this._requestManager.setTransformRequest(R),this}_getUIString(R){const u=this._locale[R];if(u==null)throw new Error(`Missing UI string '${R}'`);return u}_updateStyle(R,u){if(u.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(R,u));const f=this.style&&u.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!R)),R?(this.style=new Vr(this,u||{}),this.style.setEventedParent(this,{style:this.style}),typeof R=="string"?this.style.loadURL(R,u,f):this.style.loadJSON(R,u,f),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Vr(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(R,u){if(typeof R=="string"){const f=R,D=this._requestManager.transformRequest(f,"Style");r.h(D,new AbortController).then(V=>{this._updateDiff(V.data,u)}).catch(V=>{V&&this.fire(new r.j(V))})}else typeof R=="object"&&this._updateDiff(R,u)}_updateDiff(R,u){try{this.style.setState(R,u)&&this._update(!0)}catch(f){r.w(`Unable to perform style diff: ${f.message||f.error||f}. Rebuilding the style from scratch.`),this._updateStyle(R,u)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():r.w("There is no style added to the map.")}addSource(R,u){return this._lazyInitEmptyStyle(),this.style.addSource(R,u),this._update(!0)}isSourceLoaded(R){const u=this.style&&this.style.sourceCaches[R];if(u!==void 0)return u.loaded();this.fire(new r.j(new Error(`There is no source with ID '${R}'`)))}setTerrain(R){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),R){const u=this.style.sourceCaches[R.source];if(!u)throw new Error(`cannot load terrain, because there exists no source with ID: ${R.source}`);this.terrain===null&&u.reload();for(const f in this.style._layers){const D=this.style._layers[f];D.type==="hillshade"&&D.source===R.source&&r.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 ii(this.painter,u,R),this.painter.renderToTexture=new qs(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=f=>{f.dataType==="style"?this.terrain.sourceCache.freeRtt():f.dataType==="source"&&f.tile&&(f.sourceId!==R.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(f.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 r.k("terrain",{terrain:R})),this}getTerrain(){var R,u;return(u=(R=this.terrain)===null||R===void 0?void 0:R.options)!==null&&u!==void 0?u:null}areTilesLoaded(){const R=this.style&&this.style.sourceCaches;for(const u in R){const f=R[u]._tiles;for(const D in f){const V=f[D];if(V.state!=="loaded"&&V.state!=="errored")return!1}}return!0}removeSource(R){return this.style.removeSource(R),this._update(!0)}getSource(R){return this.style.getSource(R)}addImage(R,u,f={}){const{pixelRatio:D=1,sdf:V=!1,stretchX:J,stretchY:oe,content:fe,textFitWidth:xe,textFitHeight:Ee}=f;if(this._lazyInitEmptyStyle(),!(u instanceof HTMLImageElement||r.b(u))){if(u.width===void 0||u.height===void 0)return this.fire(new r.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:Fe,height:Ge,data:rt}=u,ct=u;return this.style.addImage(R,{data:new r.R({width:Fe,height:Ge},new Uint8Array(rt)),pixelRatio:D,stretchX:J,stretchY:oe,content:fe,textFitWidth:xe,textFitHeight:Ee,sdf:V,version:0,userImage:ct}),ct.onAdd&&ct.onAdd(this,R),this}}{const{width:Fe,height:Ge,data:rt}=h.getImageData(u);this.style.addImage(R,{data:new r.R({width:Fe,height:Ge},rt),pixelRatio:D,stretchX:J,stretchY:oe,content:fe,textFitWidth:xe,textFitHeight:Ee,sdf:V,version:0})}}updateImage(R,u){const f=this.style.getImage(R);if(!f)return this.fire(new r.j(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const D=u instanceof HTMLImageElement||r.b(u)?h.getImageData(u):u,{width:V,height:J,data:oe}=D;if(V===void 0||J===void 0)return this.fire(new r.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(V!==f.data.width||J!==f.data.height)return this.fire(new r.j(new Error("The width and height of the updated image must be that same as the previous version of the image")));const fe=!(u instanceof HTMLImageElement||r.b(u));return f.data.replace(oe,fe),this.style.updateImage(R,f),this}getImage(R){return this.style.getImage(R)}hasImage(R){return R?!!this.style.getImage(R):(this.fire(new r.j(new Error("Missing required image id"))),!1)}removeImage(R){this.style.removeImage(R)}loadImage(R){return C.getImage(this._requestManager.transformRequest(R,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(R,u){return this._lazyInitEmptyStyle(),this.style.addLayer(R,u),this._update(!0)}moveLayer(R,u){return this.style.moveLayer(R,u),this._update(!0)}removeLayer(R){return this.style.removeLayer(R),this._update(!0)}getLayer(R){return this.style.getLayer(R)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(R,u,f){return this.style.setLayerZoomRange(R,u,f),this._update(!0)}setFilter(R,u,f={}){return this.style.setFilter(R,u,f),this._update(!0)}getFilter(R){return this.style.getFilter(R)}setPaintProperty(R,u,f,D={}){return this.style.setPaintProperty(R,u,f,D),this._update(!0)}getPaintProperty(R,u){return this.style.getPaintProperty(R,u)}setLayoutProperty(R,u,f,D={}){return this.style.setLayoutProperty(R,u,f,D),this._update(!0)}getLayoutProperty(R,u){return this.style.getLayoutProperty(R,u)}setGlyphs(R,u={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(R,u),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(R,u,f={}){return this._lazyInitEmptyStyle(),this.style.addSprite(R,u,f,D=>{D||this._update(!0)}),this}removeSprite(R){return this._lazyInitEmptyStyle(),this.style.removeSprite(R),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(R,u={}){return this._lazyInitEmptyStyle(),this.style.setSprite(R,u,f=>{f||this._update(!0)}),this}setLight(R,u={}){return this._lazyInitEmptyStyle(),this.style.setLight(R,u),this._update(!0)}getLight(){return this.style.getLight()}setSky(R){return this._lazyInitEmptyStyle(),this.style.setSky(R),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(R,u){return this.style.setFeatureState(R,u),this._update()}removeFeatureState(R,u){return this.style.removeFeatureState(R,u),this._update()}getFeatureState(R){return this.style.getFeatureState(R)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let R=0,u=0;return this._container&&(R=this._container.clientWidth||400,u=this._container.clientHeight||300),[R,u]}_setupContainer(){const R=this._container;R.classList.add("maplibregl-map");const u=this._canvasContainer=n.create("div","maplibregl-canvas-container",R);this._interactive&&u.classList.add("maplibregl-interactive"),this._canvas=n.create("canvas","maplibregl-canvas",u),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 f=this._containerDimensions(),D=this._getClampedPixelRatio(f[0],f[1]);this._resizeCanvas(f[0],f[1],D);const V=this._controlContainer=n.create("div","maplibregl-control-container",R),J=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(oe=>{J[oe]=n.create("div",`maplibregl-ctrl-${oe} `,V)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(R,u,f){this._canvas.width=Math.floor(f*R),this._canvas.height=Math.floor(f*u),this._canvas.style.width=`${R}px`,this._canvas.style.height=`${u}px`}_setupPainter(){const R={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1};let u=null;this._canvas.addEventListener("webglcontextcreationerror",D=>{u={requestedAttributes:R},D&&(u.statusMessage=D.statusMessage,u.type=D.type)},{once:!0});const f=this._canvas.getContext("webgl2",R)||this._canvas.getContext("webgl",R);if(!f){const D="Failed to initialize WebGL";throw u?(u.message=D,new Error(JSON.stringify(u))):new Error(D)}this.painter=new uc(f,this.transform),i.testSupport(f)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(R){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||R,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(R){return this._update(),this._renderTaskQueue.add(R)}_cancelRenderFrame(R){this._renderTaskQueue.remove(R)}_render(R){const u=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(R),this._removed)return;let f=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const V=this.transform.zoom,J=h.now();this.style.zoomHistory.update(V,J);const oe=new r.a9(V,{now:J,fadeDuration:u,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),fe=oe.crossFadingFactor();fe===1&&fe===this._crossFadingFactor||(f=!0,this._crossFadingFactor=fe),this.style.update(oe)}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,u,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:u,showPadding:this.showPadding}),this.fire(new r.k("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,r.be.mark(r.bf.load),this.fire(new r.k("load"))),this.style&&(this.style.hasTransitions()||f)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();const D=this._sourcesDirty||this._styleDirty||this._placementDirty;return D||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new r.k("idle")),!this._loaded||this._fullyLoaded||D||(this._fullyLoaded=!0,r.be.mark(r.bf.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var R;this._hash&&this._hash.remove();for(const f of this._controls)f.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),C.removeThrottleControl(this._imageQueueHandle),(R=this._resizeObserver)===null||R===void 0||R.disconnect();const u=this.painter.context.gl.getExtension("WEBGL_lose_context");u!=null&&u.loseContext&&u.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"),r.be.clearMetrics(),this._removed=!0,this.fire(new r.k("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,h.frameAsync(this._frameRequest).then(R=>{r.be.frame(R),this._frameRequest=null,this._render(R)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(R){this._showTileBoundaries!==R&&(this._showTileBoundaries=R,this._update())}get showPadding(){return!!this._showPadding}set showPadding(R){this._showPadding!==R&&(this._showPadding=R,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(R){this._showCollisionBoxes!==R&&(this._showCollisionBoxes=R,R?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(R){this._showOverdrawInspector!==R&&(this._showOverdrawInspector=R,this._update())}get repaint(){return!!this._repaint}set repaint(R){this._repaint!==R&&(this._repaint=R,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(R){this._vertices=R,this._update()}get version(){return Mc}getCameraTargetElevation(){return this.transform.elevation}},p.MapMouseEvent=Bo,p.MapTouchEvent=ko,p.MapWheelEvent=il,p.Marker=Oi,p.NavigationControl=class{constructor(R){this._updateZoomButtons=()=>{const u=this._map.getZoom(),f=u===this._map.getMaxZoom(),D=u===this._map.getMinZoom();this._zoomInButton.disabled=f,this._zoomOutButton.disabled=D,this._zoomInButton.setAttribute("aria-disabled",f.toString()),this._zoomOutButton.setAttribute("aria-disabled",D.toString())},this._rotateCompassArrow=()=>{const u=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=u},this._setButtonTitle=(u,f)=>{const D=this._map._getUIString(`NavigationControl.${f}`);u.title=D,u.setAttribute("aria-label",D)},this.options=r.e({},Os,R),this._container=n.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",u=>u.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",u=>this._map.zoomIn({},{originalEvent:u})),n.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",u=>this._map.zoomOut({},{originalEvent:u})),n.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",u=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:u}):this._map.resetNorth({},{originalEvent:u})}),this._compassIcon=n.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(R){return this._map=R,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 qr(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(R,u){const f=n.create("button",R,this._container);return f.type="button",f.addEventListener("click",u),f}},p.Popup=kt,p.RasterDEMTileSource=He,p.RasterTileSource=ze,p.ScaleControl=class{constructor(R){this._onMove=()=>{wi(this._map,this._container,this.options)},this.setUnit=u=>{this.options.unit=u,wi(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},an),R)}getDefaultPosition(){return"bottom-left"}onAdd(R){return this._map=R,this._container=n.create("div","maplibregl-ctrl maplibregl-ctrl-scale",R.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}},p.ScrollZoomHandler=cl,p.Style=Vr,p.TerrainControl=class{constructor(R){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=R}onAdd(R){return this._map=R,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}},p.TwoFingersTouchPitchHandler=Rl,p.TwoFingersTouchRotateHandler=Jc,p.TwoFingersTouchZoomHandler=gn,p.TwoFingersTouchZoomRotateHandler=dl,p.VectorTileSource=Le,p.VideoSource=ge,p.addSourceType=(R,u)=>r._(void 0,void 0,void 0,function*(){if(je(R))throw new Error(`A source type called "${R}" already exists.`);((f,D)=>{ke[f]=D})(R,u)}),p.clearPrewarmedResources=function(){const R=pe;R&&(R.isPreloaded()&&R.numActive()===1?(R.release(ce),pe=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()"))},p.getMaxParallelImageRequests=function(){return r.a.MAX_PARALLEL_IMAGE_REQUESTS},p.getRTLTextPluginStatus=function(){return Ze().getRTLTextPluginStatus()},p.getVersion=function(){return ae},p.getWorkerCount=function(){return de.workerCount},p.getWorkerUrl=function(){return r.a.WORKER_URL},p.importScriptInWorkers=function(R){return me().broadcast("IS",R)},p.prewarm=function(){se().acquire(ce)},p.setMaxParallelImageRequests=function(R){r.a.MAX_PARALLEL_IMAGE_REQUESTS=R},p.setRTLTextPlugin=function(R,u){return Ze().setRTLTextPlugin(R,u)},p.setWorkerCount=function(R){de.workerCount=R},p.setWorkerUrl=function(R){r.a.WORKER_URL=R}}),y}()},88640:function(m,y,a){function v(we,Se,Ce){we.prototype=Se.prototype=Ce,Ce.constructor=we}function p(we,Se){var Ce=Object.create(we.prototype);for(var Me in Se)Ce[Me]=Se[Me];return Ce}function r(){}a.d(y,{GW:function(){return ve},Dj:function(){return de}});var _=.7,b=1/_,x="\\s*([+-]?\\d+)\\s*",h="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",n="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",i=/^#([0-9a-f]{3,8})$/,c=new RegExp("^rgb\\(".concat(x,",").concat(x,",").concat(x,"\\)$")),l=new RegExp("^rgb\\(".concat(n,",").concat(n,",").concat(n,"\\)$")),d=new RegExp("^rgba\\(".concat(x,",").concat(x,",").concat(x,",").concat(h,"\\)$")),g=new RegExp("^rgba\\(".concat(n,",").concat(n,",").concat(n,",").concat(h,"\\)$")),w=new RegExp("^hsl\\(".concat(h,",").concat(n,",").concat(n,"\\)$")),C=new RegExp("^hsla\\(".concat(h,",").concat(n,",").concat(n,",").concat(h,"\\)$")),E={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 A(){return this.rgb().formatHex()}function P(){return this.rgb().formatRgb()}function L(we){var Se,Ce;return we=(we+"").trim().toLowerCase(),(Se=i.exec(we))?(Ce=Se[1].length,Se=parseInt(Se[1],16),Ce===6?T(Se):Ce===3?new S(Se>>8&15|Se>>4&240,Se>>4&15|240&Se,(15&Se)<<4|15&Se,1):Ce===8?I(Se>>24&255,Se>>16&255,Se>>8&255,(255&Se)/255):Ce===4?I(Se>>12&15|Se>>8&240,Se>>8&15|Se>>4&240,Se>>4&15|240&Se,((15&Se)<<4|15&Se)/255):null):(Se=c.exec(we))?new S(Se[1],Se[2],Se[3],1):(Se=l.exec(we))?new S(255*Se[1]/100,255*Se[2]/100,255*Se[3]/100,1):(Se=d.exec(we))?I(Se[1],Se[2],Se[3],Se[4]):(Se=g.exec(we))?I(255*Se[1]/100,255*Se[2]/100,255*Se[3]/100,Se[4]):(Se=w.exec(we))?G(Se[1],Se[2]/100,Se[3]/100,1):(Se=C.exec(we))?G(Se[1],Se[2]/100,Se[3]/100,Se[4]):E.hasOwnProperty(we)?T(E[we]):we==="transparent"?new S(NaN,NaN,NaN,0):null}function T(we){return new S(we>>16&255,we>>8&255,255&we,1)}function I(we,Se,Ce,Me){return Me<=0&&(we=Se=Ce=NaN),new S(we,Se,Ce,Me)}function M(we,Se,Ce,Me){return arguments.length===1?((Le=we)instanceof r||(Le=L(Le)),Le?new S((Le=Le.rgb()).r,Le.g,Le.b,Le.opacity):new S):new S(we,Se,Ce,Me??1);var Le}function S(we,Se,Ce,Me){this.r=+we,this.g=+Se,this.b=+Ce,this.opacity=+Me}function z(){return"#".concat(j(this.r)).concat(j(this.g)).concat(j(this.b))}function k(){var we=O(this.opacity);return"".concat(we===1?"rgb(":"rgba(").concat(N(this.r),", ").concat(N(this.g),", ").concat(N(this.b)).concat(we===1?")":", ".concat(we,")"))}function O(we){return isNaN(we)?1:Math.max(0,Math.min(1,we))}function N(we){return Math.max(0,Math.min(255,Math.round(we)||0))}function j(we){return((we=N(we))<16?"0":"")+we.toString(16)}function G(we,Se,Ce,Me){return Me<=0?we=Se=Ce=NaN:Ce<=0||Ce>=1?we=Se=NaN:Se<=0&&(we=NaN),new Z(we,Se,Ce,Me)}function H(we){if(we instanceof Z)return new Z(we.h,we.s,we.l,we.opacity);if(we instanceof r||(we=L(we)),!we)return new Z;if(we instanceof Z)return we;var Se=(we=we.rgb()).r/255,Ce=we.g/255,Me=we.b/255,Le=Math.min(Se,Ce,Me),ze=Math.max(Se,Ce,Me),He=NaN,Pe=ze-Le,Ve=(ze+Le)/2;return Pe?(He=Se===ze?(Ce-Me)/Pe+6*(Ce<Me):Ce===ze?(Me-Se)/Pe+2:(Se-Ce)/Pe+4,Pe/=Ve<.5?ze+Le:2-ze-Le,He*=60):Pe=Ve>0&&Ve<1?0:He,new Z(He,Pe,Ve,we.opacity)}function Z(we,Se,Ce,Me){this.h=+we,this.s=+Se,this.l=+Ce,this.opacity=+Me}function $(we){return(we=(we||0)%360)<0?we+360:we}function ne(we){return Math.max(0,Math.min(1,we||0))}function q(we,Se,Ce){return 255*(we<60?Se+(Ce-Se)*we/60:we<180?Ce:we<240?Se+(Ce-Se)*(240-we)/60:Se)}v(r,L,{copy:function(we){return Object.assign(new this.constructor,this,we)},displayable:function(){return this.rgb().displayable()},hex:A,formatHex:A,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return H(this).formatHsl()},formatRgb:P,toString:P}),v(S,M,p(r,{brighter:function(we){return we=we==null?b:Math.pow(b,we),new S(this.r*we,this.g*we,this.b*we,this.opacity)},darker:function(we){return we=we==null?_:Math.pow(_,we),new S(this.r*we,this.g*we,this.b*we,this.opacity)},rgb:function(){return this},clamp:function(){return new S(N(this.r),N(this.g),N(this.b),O(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:z,formatHex:z,formatHex8:function(){return"#".concat(j(this.r)).concat(j(this.g)).concat(j(this.b)).concat(j(255*(isNaN(this.opacity)?1:this.opacity)))},formatRgb:k,toString:k})),v(Z,function(we,Se,Ce,Me){return arguments.length===1?H(we):new Z(we,Se,Ce,Me??1)},p(r,{brighter:function(we){return we=we==null?b:Math.pow(b,we),new Z(this.h,this.s,this.l*we,this.opacity)},darker:function(we){return we=we==null?_:Math.pow(_,we),new Z(this.h,this.s,this.l*we,this.opacity)},rgb:function(){var we=this.h%360+360*(this.h<0),Se=isNaN(we)||isNaN(this.s)?0:this.s,Ce=this.l,Me=Ce+(Ce<.5?Ce:1-Ce)*Se,Le=2*Ce-Me;return new S(q(we>=240?we-240:we+120,Le,Me),q(we,Le,Me),q(we<120?we+240:we-120,Le,Me),this.opacity)},clamp:function(){return new Z($(this.h),ne(this.s),ne(this.l),O(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 we=O(this.opacity);return"".concat(we===1?"hsl(":"hsla(").concat($(this.h),", ").concat(100*ne(this.s),"%, ").concat(100*ne(this.l),"%").concat(we===1?")":", ".concat(we,")"))}}));var K=function(we){return function(){return we}};function ee(we,Se){var Ce=Se-we;return Ce?function(Me,Le){return function(ze){return Me+ze*Le}}(we,Ce):K(isNaN(we)?Se:we)}var X=function we(Se){var Ce=function(Le){return(Le=+Le)==1?ee:function(ze,He){return He-ze?function(Pe,Ve,Ie){return Pe=Math.pow(Pe,Ie),Ve=Math.pow(Ve,Ie)-Pe,Ie=1/Ie,function(ge){return Math.pow(Pe+ge*Ve,Ie)}}(ze,He,Le):K(isNaN(ze)?He:ze)}}(Se);function Me(Le,ze){var He=Ce((Le=M(Le)).r,(ze=M(ze)).r),Pe=Ce(Le.g,ze.g),Ve=Ce(Le.b,ze.b),Ie=ee(Le.opacity,ze.opacity);return function(ge){return Le.r=He(ge),Le.g=Pe(ge),Le.b=Ve(ge),Le.opacity=Ie(ge),Le+""}}return Me.gamma=we,Me}(1);function Q(we,Se){var Ce,Me=Se?Se.length:0,Le=we?Math.min(Me,we.length):0,ze=new Array(Le),He=new Array(Me);for(Ce=0;Ce<Le;++Ce)ze[Ce]=ve(we[Ce],Se[Ce]);for(;Ce<Me;++Ce)He[Ce]=Se[Ce];return function(Pe){for(Ce=0;Ce<Le;++Ce)He[Ce]=ze[Ce](Pe);return He}}function ce(we,Se){var Ce=new Date;return we=+we,Se=+Se,function(Me){return Ce.setTime(we*(1-Me)+Se*Me),Ce}}function de(we,Se){return we=+we,Se=+Se,function(Ce){return we*(1-Ce)+Se*Ce}}function he(we){return he=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Se){return typeof Se}:function(Se){return Se&&typeof Symbol=="function"&&Se.constructor===Symbol&&Se!==Symbol.prototype?"symbol":typeof Se},he(we)}function pe(we,Se){var Ce,Me={},Le={};for(Ce in we!==null&&he(we)==="object"||(we={}),Se!==null&&he(Se)==="object"||(Se={}),Se)Ce in we?Me[Ce]=ve(we[Ce],Se[Ce]):Le[Ce]=Se[Ce];return function(ze){for(Ce in Me)Le[Ce]=Me[Ce](ze);return Le}}var re=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,se=new RegExp(re.source,"g");function ie(we,Se){var Ce,Me,Le,ze=re.lastIndex=se.lastIndex=0,He=-1,Pe=[],Ve=[];for(we+="",Se+="";(Ce=re.exec(we))&&(Me=se.exec(Se));)(Le=Me.index)>ze&&(Le=Se.slice(ze,Le),Pe[He]?Pe[He]+=Le:Pe[++He]=Le),(Ce=Ce[0])===(Me=Me[0])?Pe[He]?Pe[He]+=Me:Pe[++He]=Me:(Pe[++He]=null,Ve.push({i:He,x:de(Ce,Me)})),ze=se.lastIndex;return ze<Se.length&&(Le=Se.slice(ze),Pe[He]?Pe[He]+=Le:Pe[++He]=Le),Pe.length<2?Ve[0]?function(Ie){return function(ge){return Ie(ge)+""}}(Ve[0].x):function(Ie){return function(){return Ie}}(Se):(Se=Ve.length,function(Ie){for(var ge,Ae=0;Ae<Se;++Ae)Pe[(ge=Ve[Ae]).i]=ge.x(Ie);return Pe.join("")})}function me(we,Se){Se||(Se=[]);var Ce,Me=we?Math.min(Se.length,we.length):0,Le=Se.slice();return function(ze){for(Ce=0;Ce<Me;++Ce)Le[Ce]=we[Ce]*(1-ze)+Se[Ce]*ze;return Le}}function ye(we){return ye=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Se){return typeof Se}:function(Se){return Se&&typeof Symbol=="function"&&Se.constructor===Symbol&&Se!==Symbol.prototype?"symbol":typeof Se},ye(we)}function ve(we,Se){var Ce,Me,Le=ye(Se);return Se==null||Le==="boolean"?K(Se):(Le==="number"?de:Le==="string"?(Ce=L(Se))?(Se=Ce,X):ie:Se instanceof L?X:Se instanceof Date?ce:(Me=Se,!ArrayBuffer.isView(Me)||Me instanceof DataView?Array.isArray(Se)?Q:typeof Se.valueOf!="function"&&typeof Se.toString!="function"||isNaN(Se)?pe:de:me))(we,Se)}},23648:function(m){m.exports=JSON.parse('["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]')},2362:function(m){m.exports=JSON.parse('["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]')},87486:function(m){m.exports=JSON.parse('["normal","italic","oblique"]')},99803:function(m){m.exports=JSON.parse('["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]')},54324:function(m){m.exports=JSON.parse('["inherit","initial","unset"]')},94316:function(m){m.exports=JSON.parse('["caption","icon","menu","message-box","small-caption","status-bar"]')},37071:function(m){m.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(m){m.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"}}]}`)}},B={};function U(m){var y=B[m];if(y!==void 0)return y.exports;var a=B[m]={id:m,exports:{}};return s[m].call(a.exports,a,a.exports,U),a.exports}return U.m=s,U.n=function(m){var y=m&&m.__esModule?function(){return m.default}:function(){return m};return U.d(y,{a:y}),y},U.d=function(m,y){for(var a in y)U.o(y,a)&&!U.o(m,a)&&Object.defineProperty(m,a,{enumerable:!0,get:y[a]})},U.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),U.o=function(m,y){return Object.prototype.hasOwnProperty.call(m,y)},U.r=function(m){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(m,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(m,"__esModule",{value:!0})},U.b=document.baseURI||self.location.href,U.nc=void 0,U(20260)}()})})(HR);var lct=HR.exports;const ZR=C6(lct),Mqt="",Iqt="",cct={ref:"card",class:"card-volumetric-field"},WR=1,uct=800,qR=300,dct=-46,JR=100,YR=-14,hct=Ki({__name:"VolumetricField",props:{passesPlays:{type:Array,default:()=>[]},playIndexes:{type:Object,default:()=>{}},successfulPassesCategoryIds:{type:Array,default:()=>[2,20,308,310]}},setup(e){const o=[[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 s=null;const B=e,U=t.computed(()=>new Set(B.successfulPassesCategoryIds)),m=t.ref(null),y=t.ref(null),a=t.ref(0),v=t.ref(null);t.watch(()=>B.passesPlays,d=>{const g=d.reduce((w,C)=>(U.value.has(C[B.playIndexes.categoryId])&&w.push({x1:C[B.playIndexes.coordinate1X],y1:C[B.playIndexes.coordinate1Y],x2:C[B.playIndexes.coordinate2X],y2:C[B.playIndexes.coordinate2Y],x3:C[B.playIndexes.coordinate3X],y3:C[B.playIndexes.coordinate3Y]}),w),[]);l(g)}),t.watch(()=>a.value,(d,g)=>{v.value&&(n(d),y.value.style.height=`${i(d)}px`,v.value.style.top=`${c(i(d))}px`)});function p(){s=new ResizeObserver(d=>{for(const g of d)a.value=g.contentRect.width}),s.observe(m.value)}function r(d){return Array.from({length:d},()=>0)}function _(d,g){let w=.01351,C=.02439,E=0,A=0,P=[];const L=g.length,T=Math.floor(L/10);for(;E<74;)A=g.filter(I=>1-I.y3>=E*w&&1-I.y3<=(E+1)*w&&1-I.x3>=d*C&&1-I.x3<=(d+1)*C).map(I=>I.y3).length,P.push(parseFloat((A/T).toFixed(4))),E++;return P.reverse()}function b(d){let g=[r(74),r(74)],w=[],C=39;for(;C>0&&C<=39;)w=_(C,d),g.push(w),C--;return g.push(r(74),r(74)),g}function x(d,g,w){const C=[];let P=0,L=0;C.push(d[0]);for(let T=1;T<w-1;T++){const I=[];I.push(d[T][0]);for(let M=1;M<g-1;M++)P=d[T][M-1],L=d[T][M+1],I.push(P+.5*(d[T][M]+L-P));I.push(d[T][g-1]),C.push(I)}C.push(d[w-1]);for(let T=1;T<g-1;T++)for(let I=1;I<w-1;I++)P=C[I-1][T],L=C[I+1][T],C[I][T]=P+.5*(C[I][T]+L-P);return C}function h(d){let g=0,w=0;for(let C=0;C<d.length;C++){w=w+d[C].reduce(function(A,P){return A+P});const E=Math.max.apply(null,d[C]);E>g&&(g=E)}return g}function n(d){ZR.relayout(m.value,{width:d,height:i(d)})}function i(d){return Math.round(qR/uct*d,0)}function c(d){return YR+(d-JR)/(qR-JR)*(dct-YR)}function l(d){let g=b(d),w=g.length,C=g[0].length;g=x(x(g,C,w),C,w),C=g[0].length,w=g.length;const E=h(g),A=[{z:g,type:"surface",connectgaps:!0,opacity:.25,colorscale:o,autoscale:!1,showscale:!1}],P=[0,C],L=[0,w],T=[0,E*5],I={scene:{xaxis:{title:"",showgrid:!1,showline:!1,zeroline:!1,showticklabels:!1,showbackground:!1,backgroundcolor:"transparent",range:P},yaxis:{title:"",showgrid:!1,showline:!1,zeroline:!1,showticklabels:!1,showbackground:!1,backgroundcolor:"transparent",range:L},zaxis:{title:"",showgrid:!1,showline:!1,zeroline:!1,showticklabels:!1,showbackground:!1,backgroundcolor:"transparent",range:T},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:a.value,height:i(a.value),paper_bgcolor:"rgba(0,0,0,0)",margin:{l:0,r:0,b:0,t:0}};y.value&&(y.value.style.height=`${i(a.value)}px`);const M=[];for(let S=0;S<C;S++){const z=[],k=[],O=[];for(let N=0;N<w;N++)z.push(S),k.push(N),O.push(A[0].z[N][S]);M.push({x:z,y:k,z:O,type:"scatter3d",mode:"lines",line:{cmin:-.1,cmax:E,width:WR,color:O,colorscale:o,shape:"spline",smoothing:.6,dash:"dotline"}})}for(let S=0;S<w;S++){const z=[],k=[],O=[];for(let N=0;N<C;N++)z.push(N),k.push(S),O.push(A[0].z[S][N]);M.push({x:z,y:k,z:O,type:"scatter3d",mode:"lines",line:{cmin:-.1,cmax:E,width:WR,color:O,colorscale:o,shape:"spline",smoothing:.6,dash:"dotline"}})}ZR.newPlot("surface-plot",A.concat(M),I,{displayModeBar:!1},{responsive:!0}),v.value=document.getElementsByClassName("plot-container")[0],v.value&&(v.value.style.top=`${c(i(a.value))}px`)}return t.onMounted(()=>{m.value&&(m.value.style.pointerEvents="none"),p()}),(d,g)=>(t.openBlock(),t.createElementBlock("div",cct,[t.createElementVNode("div",{ref_key:"volumetricField",ref:y,class:"card-volumetric-field__volumetric-field"},[t.createElementVNode("div",{ref_key:"surfacePlot",ref:m,id:"surface-plot"},null,512)],512)],512))}},[["__scopeId","data-v-6a070f92"]]),Lqt="",pct=Ki({__name:"AttackDirection",props:{team:{type:Object,required:!0}},setup(e){const o=e,s=t.computed(()=>({"--flex-direction-info":o.team.isHomeTeam?"flex":"row-reverse","--justify-content-info":o.team.isHomeTeam?"flex-start":"flex-end","--arrow-color":o.team.isHomeTeam?"#336dff":"#7ed321"}));return(B,U)=>(t.openBlock(),t.createElementBlock("div",{class:"attack-direction",style:t.normalizeStyle(s.value)},[U[0]||(U[0]=t.createElementVNode("div",{class:"attack-direction__line"},null,-1)),t.createElementVNode("div",{class:t.normalizeClass(`attack-direction__triangle-${e.team.isHomeTeam?"right":"left"}`)},null,2),U[1]||(U[1]=t.createElementVNode("div",{class:"attack-direction__text"},"Ataca",-1))],4))}},[["__scopeId","data-v-dd911c44"]]),fct=["playId","gameId","teamId","playerId","momentOfPlay","categoryId","categoryType","matchLapse","section","matchResult","playingAs","total","coordinate1X","coordinate1Y","coordinate2X","coordinate2Y","coordinate3X","coordinate3Y","xGi","xGf","distance","fieldArea"];let DS=null;function mct(){return DS||(DS=Yy(fct)),DS}const zqt="",gct={class:"volumetric-section-container"},yct={key:0,class:"volumetric-section-container__switch"},vct={class:"volumetric-section-container__attack-direction"},bct={class:"volumetric-section-container__field"},_ct=Ki({__name:"VolumetricSectionContainer",props:{game:{type:Object,default:()=>({})},seasonSelected:{type:Object,default:()=>({})},token:{type:String,default:""},isGamePreMatch:{type:Boolean,default:!1},teamSelectedPreMatch:{type:Object,default:()=>({})},volumetricFieldIntervalMinutes:{type:Number,default:2}},setup(e){const o=mct(),s=t.ref(new Set([2,20,308,310])),B=t.ref(new Set([3,21,309])),U=t.ref(new Set([...s.value,...B.value]));let m=null;const y=e,a=fp();let v=null;function p(){if(!v){const C=a.getters.getProviderId;v=Qne(C).then(E=>{var L,T;const A=((L=E==null?void 0:E.successfulPasses)==null?void 0:L.categoriesIds)??[],P=((T=E==null?void 0:E.unsuccessfulPasses)==null?void 0:T.categoriesIds)??[];s.value=new Set(A),B.value=new Set(P),U.value=new Set([...A,...P])})}return v}const r=t.ref(0),_=t.ref(new Map),b=t.ref({teamId:0}),x=t.computed(()=>[{teamId:y.game.homeTeam.team_id,text:y.game.homeTeam.colloquial_name,img:y.game.homeTeam.logo,isHomeTeam:!0},{teamId:y.game.awayTeam.team_id,text:y.game.awayTeam.colloquial_name,img:y.game.awayTeam.logo,isHomeTeam:!1}]),h=t.computed(()=>_.value.get(y.isGamePreMatch?y.teamSelectedPreMatch.teamId:b.value.teamId)||[]);t.watch(()=>x.value,()=>{r.value=0,b.value=x.value[r.value]},{immediate:!0}),t.watch(()=>y.game.gameId,C=>{C&&(w(),i(y.game.is_live&&y.game.game_status===4))},{immediate:!0});function n(){m=setInterval(()=>{i()},1e3*60*y.volumetricFieldIntervalMinutes)}async function i(C=!1){try{await p();const E=await l();_.value.set(y.game.homeTeam.team_id,E.homeTeam),_.value.set(y.game.awayTeam.team_id,E.awayTeam),C&&n()}catch(E){throw new Error(E)}}function c(C){return y.game.game_status===4&&!y.game.is_live?C[o.gameId]!==y.game.gameId:C[o.gameId]===y.game.gameId}async function l(C=0){var E,A,P,L;try{let T={homeTeam:[],awayTeam:[]};const I=a.getters.getProviderId,M=a.getters.getIsDevApis;if(y.game.is_live||y.game.game_status===0){const S=await pu.get(uu(`https://2uj7ojhmt5.execute-api.us-west-2.amazonaws.com/prod/V2/statisticsLive/${y.game.gameId}`,I,M)),z=S.data?S.data.data||[]:[],k=new Set;z.forEach(O=>{k.add(O[o.categoryId]),O[o.teamId]===y.game.homeTeam.team_id&&U.value.has(O[o.categoryId])&&c(O)?(d(O),T.homeTeam.push(O)):O[o.teamId]===y.game.awayTeam.team_id&&U.value.has(O[o.categoryId])&&c(O)&&(O[o.coordinate1Y]=1-O[o.coordinate1Y],O[o.coordinate2Y]=1-O[o.coordinate2Y],O[o.coordinate3Y]=1-O[o.coordinate3Y],O[o.coordinate1X]=1-O[o.coordinate1X],O[o.coordinate2X]=1-O[o.coordinate2X],O[o.coordinate3X]=1-O[o.coordinate3X],d(O),T.awayTeam.push(O))})}else{const[S,z]=await Promise.all([pu.get(qy(`https://golstats-microservices.s3-us-west-2.amazonaws.com/statsTeamBySeason-${C||y.game.seasonId}-${y.game.homeTeam.team_id}.json`,I),{headers:{Authorization:""}}),pu.get(qy(`https://golstats-microservices.s3-us-west-2.amazonaws.com/statsTeamBySeason-${C||y.game.seasonId}-${y.game.awayTeam.team_id}.json`,I),{headers:{Authorization:""}})]),k=((A=(E=S.data)==null?void 0:E.data)==null?void 0:A.posession)||[],O=((L=(P=z.data)==null?void 0:P.data)==null?void 0:L.posession)||[];if(!k.length&&!O.length&&!C)return l(y.game.regularSeasonId);T={homeTeam:k.filter(N=>N[o.teamId]===y.game.homeTeam.team_id&&U.value.has(N[o.categoryId])&&c(N)),awayTeam:O.filter(N=>N[o.teamId]===y.game.awayTeam.team_id&&U.value.has(N[o.categoryId])&&c(N)?(N[o.coordinate1Y]=1-N[o.coordinate1Y],N[o.coordinate2Y]=1-N[o.coordinate2Y],N[o.coordinate3Y]=1-N[o.coordinate3Y],N[o.coordinate1X]=1-N[o.coordinate1X],N[o.coordinate2X]=1-N[o.coordinate2X],N[o.coordinate3X]=1-N[o.coordinate3X],!0):!1)}}return T}catch(T){throw new Error(T)}}function d(C){const E=C[o.coordinate1X],A=C[o.coordinate2X],P=C[o.coordinate3X];return C[o.coordinate1X]=C[o.coordinate1Y],C[o.coordinate2X]=C[o.coordinate2Y],C[o.coordinate3X]=C[o.coordinate3Y],C[o.coordinate1Y]=E,C[o.coordinate2Y]=A,C[o.coordinate3Y]=P,C}function g(C){r.value=C.index,b.value=C.button}function w(){m&&clearInterval(m)}return t.onUnmounted(()=>{w()}),(C,E)=>(t.openBlock(),t.createElementBlock("div",gct,[E[0]||(E[0]=t.createElementVNode("div",{class:"volumetric-section-container__title"},"Volumétrica",-1)),e.isGamePreMatch?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",yct,[t.createVNode(j5,{"selected-button-index":r.value,buttons:x.value,width:"320px","border-radius":"16px",onChange:g},null,8,["selected-button-index","buttons"])])),t.createElementVNode("div",vct,[t.createVNode(pct,{team:e.isGamePreMatch?e.teamSelectedPreMatch:b.value},null,8,["team"])]),t.createElementVNode("div",bct,[t.createVNode(hct,{"passes-plays":h.value,"play-indexes":t.unref(o),"successful-passes-category-ids":[...s.value]},null,8,["passes-plays","play-indexes","successful-passes-category-ids"])])]))}},[["__scopeId","data-v-5904f4a9"]]),Dqt="";let XR=null;const xct={components:{GSCHighlights:kHe,ToggleButtons:j5,VolumetricSectionContainer:_ct,DataProminentGame:OHe,HighlightsProminentGameLive:OZe,HighlightsProminentGame:kZe,GSCRadioToggle:dF,FieldPosesion:oZe,EventsLine:kWe,ChalkboardSectionContainer:sct},props:{timeLiveProminentData:{type:Number,default:6e4},timeLiveHighlightsProminentAndVideo:{type:Number,default:6e4},timeLivePossesion:{type:Number,default:6e4},game:{type:Object,default:()=>({})},token:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"},seasonSelected:{type:Object,default:()=>({})},isWidget:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},tournamentSelected:{type:Object,default:()=>({})},canPlayVideos:{type:Boolean,default:!1},is_captured:{type:Number,default:1},videoPrivilegesPlayingAs:{type:Set,default:()=>new Set([1,2])},playVideosPrivileges:{type:Object,default:null},volumetricFieldIntervalMinutes:{type:Number,default:2},chalkboardIntervalMinutes:{type:Number,default:2},gameEventsIntervalMinutes:{type:Number,default:1}},data(){return{isDataProminentGameLoading:!0,areHighlightsLoading:!0,widthSection:0,showleyendliveData:!1,showgoalsliveData:!1,showsummaryliveData:!1,viewVolumtrica:!0,teamButtonSelectedIndex:0,switchTypeViewFiled:"Porcentajes",teamSelected:{teamId:0},isFirstDataLoaded:!1}},computed:{toggleButtons(){return[{teamId:this.game.homeTeam.team_id,text:this.game.homeTeam.colloquial_name,img:this.game.homeTeam.logo,isHomeTeam:!0},{teamId:this.game.awayTeam.team_id,text:this.game.awayTeam.colloquial_name,img:this.game.awayTeam.logo,isHomeTeam:!1}]},isGamePreMatch(){return this.game&&this.game.game_status===4&&!this.game.is_live}},watch:{widthSection(){this.viewVolumtrica=this.widthSection>=760},toggleButtons:{handler(){this.teamButtonSelectedIndex=0,this.teamSelected=this.toggleButtons[0]},deep:!0,immediate:!0},"seasonSelected.incomplete_season":{handler(){this.seasonSelected.incomplete_season==1&&this.game.game_status==4&&this.onDataProminentGameLoading(!1)},immediate:!0},"game.game_status":{handler(){this.seasonSelected.incomplete_season==1&&this.game.game_status==4&&this.onDataProminentGameLoading(!1)},immediate:!0}},methods:{onDataProminentGameLoading(e){this.isFirstDataLoaded||(this.isDataProminentGameLoading=e,this.areHighlightsLoading=!0,e||setTimeout(()=>{this.areHighlightsLoading=!1,this.isFirstDataLoaded=!0},500))},intervalidhighlive(e){this.$emit("intervalidhighlive",e)},intervalidpossesion(e){this.$emit("intervalidpossesion",e)},onChangeToggle(e){this.teamButtonSelectedIndex=e.index,this.teamSelected=e.button},setUpResizeObserver(){if(window.ResizeObserver)XR=new ResizeObserver(()=>{this.widthSection=this.$refs.prominent.clientWidth}),XR.observe(this.$refs.prominent);else throw new Error("Resize observer not supported!")},async ChangeRadio(e){typeof e=="string"&&(this.switchTypeViewFiled=e)},openmedia(e){this.$emit("openmedia",e)},onClickSection(){Vd.emit("mouse-click-time-event",0)},onClickPlayEvent(e){const o={seasonId:this.game.is_live===1||this.game.game_status===0?this.game.seasonId:this.seasonSelected.id,isFeaturedPlayers:!1,mainSectionType:1,playListType:1,playerIds:[],categoryIds:[e.categoryId],matchResult:[1,2,3],currentPlayIndex:0,playsIds:[e.playId]};this.$emit("openmedia",o)},showleyendlive(e){this.showleyendliveData=e},showgoalslive(e){this.showgoalsliveData=e},showsummarylive(e){this.showsummaryliveData=e},onOpenMediaPlayer(e){this.canPlayVideos&&this.$emit("open-media-player",e)},getContainerClass(){return this.widthSection>830?"highlights-container-desktop":"highlights-container-mobile"}},async mounted(){setTimeout(()=>{this.setUpResizeObserver()},1e3)}},wct={key:0,class:"container-prominent-data"},kct={class:"container-prominent-section"},Sct={key:0,class:"highlights-containers"},Cct={class:"highlights-content"},Tct={key:1,class:"highlights-containers"},Act={key:0,class:"container-leyend-prematch"},Ect={key:1,class:"container-leyend-prematch-movil"},Mct={key:2,class:"container-leyend-prematch-movil"},Ict={class:"container-switch-toggle"},Pct={class:"container-prominent-section__chalkboard"};function Lct(e,o,s,B,U,m){const y=t.resolveComponent("DataProminentGame"),a=t.resolveComponent("HighlightsProminentGameLive"),v=t.resolveComponent("HighlightsProminentGame"),p=t.resolveComponent("GSCHighlights"),r=t.resolveComponent("EventsLine"),_=t.resolveComponent("ToggleButtons"),b=t.resolveComponent("GSCRadioToggle"),x=t.resolveComponent("FieldPosesion"),h=t.resolveComponent("VolumetricSectionContainer"),n=t.resolveComponent("ChalkboardSectionContainer");return t.openBlock(),t.createElementBlock("div",{class:"container-prominent",ref:"prominent",onClick:o[0]||(o[0]=(...i)=>m.onClickSection&&m.onClickSection(...i))},[s.seasonSelected.incomplete_season==1&&s.game.game_status==4&&s.game.is_live===0?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",wct,[t.createVNode(y,{"is-widget":s.isWidget,"team-widget":s.teamWidget,"time-live-prominent-data":s.timeLiveProminentData,game:s.game,"can-play-videos":s.canPlayVideos,onOpenmedia:m.openmedia,onLoading:m.onDataProminentGameLoading},null,8,["is-widget","team-widget","time-live-prominent-data","game","can-play-videos","onOpenmedia","onLoading"])])),t.createElementVNode("div",kct,[s.game.is_live===1||s.game.game_status===0||s.game.game_status===1?(t.openBlock(),t.createElementBlock("div",Sct,[t.createElementVNode("div",{class:t.normalizeClass(m.getContainerClass())},[U.showleyendliveData?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(U.widthSection>830?"highlights-header":"highlights-header-mobile")},[Object.keys(s.game).length>0&&Object.keys(s.tournamentSelected).length>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(U.widthSection>830?"semifinal-tag":"semifinal-tag-mobile")},t.toDisplayString(s.tournamentSelected.id!=41?s.game.matchday_name.replace("Matchday","Jornada").replace("de Final","").replace("Playoffs 1","Cuartos de Final Ida").replace("Playoffs 2","Cuartos de Final Vuelta").replace("Playoffs 3","Semifinal Ida").replace("Playoffs 4","Semifinal Vuelta").replace("Playoffs 5","Final Ida").replace("Playoffs 6","Final Vuelta"):s.game.matchday_name=="Matchday 10"?"Final":s.game.matchday_name.replace("Matchday 1","16vos Ida").replace("Matchday 2","16vos Vuelta").replace("Matchday 3","8vos Ida").replace("Matchday 4","8vos Vuelta").replace("Matchday 5","4tos Ida").replace("Matchday 6","4tos Vuelta").replace("Matchday 7","Semifinal Ida").replace("Matchday 8","Semifinal Vuelta").replace("Matchday 9","Final").replace("Matchday 10","Final")),3)):t.createCommentVNode("",!0),t.createElementVNode("h2",{class:t.normalizeClass(U.widthSection>830?"highlights-title":"highlights-title-mobile")}," HIGHLIGHTS DEL PARTIDO ",2)],2)):t.createCommentVNode("",!0),t.createElementVNode("div",Cct,[t.createElementVNode("div",{class:"highlight-card",style:t.normalizeStyle(U.showgoalsliveData?U.widthSection>830?"width: 49%;":"width: 100%;":"")},[(s.game.is_live===1||s.game.game_status===0)&&s.canPlayVideos?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[s.game.is_live===1||s.game.game_status===0?(t.openBlock(),t.createBlock(a,{key:0,"time-live-highlights-prominent-and-video":s.timeLiveHighlightsProminentAndVideo,"can-play-videos":s.canPlayVideos,game:s.game,"title-card":"GOLES",onShowgoalslive:m.showgoalslive,onShowsummarylive:m.showsummarylive,onShowleyendlive:m.showleyendlive,onIntervalidhighlive:m.intervalidhighlive,onOpenmedia:m.openmedia},null,8,["time-live-highlights-prominent-and-video","can-play-videos","game","onShowgoalslive","onShowsummarylive","onShowleyendlive","onIntervalidhighlive","onOpenmedia"])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[s.game.status===1&&s.canPlayVideos?(t.openBlock(),t.createBlock(v,{key:0,onShowsummarylive:m.showsummarylive,onShowleyendlive:m.showleyendlive,onShowgoalslive:m.showgoalslive,onIntervalidhighlive:m.intervalidhighlive,"title-card":"GOLES","can-play-videos":s.canPlayVideos,game:s.game,onOpenmedia:m.openmedia},null,8,["onShowsummarylive","onShowleyendlive","onShowgoalslive","onIntervalidhighlive","can-play-videos","game","onOpenmedia"])):t.createCommentVNode("",!0)],64))],4),t.createElementVNode("div",{class:"highlight-card",style:t.normalizeStyle(U.showsummaryliveData?U.widthSection>830?"width: 49%;":"width: 100%;":"")},[(s.game.is_live===1||s.game.game_status===0)&&s.canPlayVideos?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[s.game.is_live===1||s.game.game_status===0?(t.openBlock(),t.createBlock(a,{key:0,"time-live-highlights-prominent-and-video":s.timeLiveHighlightsProminentAndVideo,"can-play-videos":s.canPlayVideos,game:s.game,onShowleyendlive:m.showleyendlive,onShowgoalslive:m.showgoalslive,onShowsummarylive:m.showsummarylive,onIntervalidhighlive:m.intervalidhighlive,onOpenmedia:m.openmedia},null,8,["time-live-highlights-prominent-and-video","can-play-videos","game","onShowleyendlive","onShowgoalslive","onShowsummarylive","onIntervalidhighlive","onOpenmedia"])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[s.game.status===1&&s.canPlayVideos?(t.openBlock(),t.createBlock(v,{key:0,onShowsummarylive:m.showsummarylive,onShowleyendlive:m.showleyendlive,onShowgoalslive:m.showgoalslive,onIntervalidhighlive:m.intervalidhighlive,"can-play-videos":s.canPlayVideos,game:s.game,onOpenmedia:m.openmedia},null,8,["onShowsummarylive","onShowleyendlive","onShowgoalslive","onIntervalidhighlive","can-play-videos","game","onOpenmedia"])):t.createCommentVNode("",!0)],64))],4)])],2)])):(t.openBlock(),t.createElementBlock("div",Tct,[!U.isDataProminentGameLoading&&(s.game.is_live===1||s.game.game_status===0)&&s.canPlayVideos?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[s.game.status===1&&s.canPlayVideos?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[s.canPlayVideos?(t.openBlock(),t.createBlock(p,{key:0,data:{game:s.game.gameId,season:s.game.seasonId,type:"historic"},"can-play-videos":s.canPlayVideos,"video-privileges-playing-as":s.videoPrivilegesPlayingAs,"privileges-team-id":s.playVideosPrivileges?s.playVideosPrivileges.seasonAndPrivileges.teamId:0,"provider-id":e.$store.getters.getProviderId,"is-dev-apis":e.$store.getters.getIsDevApis,onOpenmedia:m.openmedia},null,8,["data","can-play-videos","video-privileges-playing-as","privileges-team-id","provider-id","is-dev-apis","onOpenmedia"])):t.createCommentVNode("",!0)],64))],64))])),m.isGamePreMatch?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(U.widthSection>920?"container-prominent-section__events-line":"container-prominent-section__events-line-mobile")},[U.areHighlightsLoading?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(r,{key:0,token:s.token,game:s.game,widthScreen:U.widthSection,"can-play-videos":s.canPlayVideos,"game-events-interval-minutes":s.gameEventsIntervalMinutes,onPlayVideo:m.onClickPlayEvent},null,8,["token","game","widthScreen","can-play-videos","game-events-interval-minutes","onPlayVideo"]))],2)),U.areHighlightsLoading?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(U.widthSection>760?"fields-section-container":"fields-section-container-movil")},[o[4]||(o[4]=t.createElementVNode("div",{class:"fields-section-title"},"Posesión",-1)),s.game.game_status===4&&s.game.is_live!=1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[U.widthSection>590?(t.openBlock(),t.createElementBlock("div",Act,o[1]||(o[1]=[t.createElementVNode("span",{class:"leyend-bold"},"IMPORTANTE:",-1),t.createTextVNode("  Con base en las estadisticas de los partidos ya jugados en el torneo. ")]))):t.createCommentVNode("",!0),U.widthSection>340&&U.widthSection<=590?(t.openBlock(),t.createElementBlock("div",Ect,o[2]||(o[2]=[t.createElementVNode("span",{class:"leyend-bold"},"IMPORTANTE:",-1),t.createTextVNode("  "),t.createElementVNode("br",null,null,-1),t.createTextVNode("Con base en las estadisticas de los partidos ya "),t.createElementVNode("br",null,null,-1),t.createTextVNode(" jugados en el torneo. ")]))):t.createCommentVNode("",!0),U.widthSection<=340?(t.openBlock(),t.createElementBlock("div",Mct,o[3]||(o[3]=[t.createElementVNode("span",{class:"leyend-bold"},"IMPORTANTE:",-1),t.createTextVNode("  "),t.createElementVNode("br",null,null,-1),t.createTextVNode("Con base en las estadisticas de los "),t.createElementVNode("br",null,null,-1),t.createTextVNode("partidos ya jugados en el torneo. ")]))):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(U.widthSection>420?"container-switch-prematch-teams":"container-switch-prematch-teams-movil")},[t.createVNode(_,{"selected-button-index":U.teamButtonSelectedIndex,buttons:m.toggleButtons,width:"320px","border-radius":"16px",onChange:m.onChangeToggle},null,8,["selected-button-index","buttons","onChange"])],2)],64)):t.createCommentVNode("",!0),t.withDirectives(t.createElementVNode("div",Ict,[t.createVNode(b,{height:"20px",width:"41px","background-color":"none","width-circle":"15px","height-circle":"15px","circle-color-switch":"#CBEE6B","font-color":"#ffffff","value-default":"Porcentajes",textOptionLeft:"Porcentajes",textOptionRight:"Volumétrico",onChange:m.ChangeRadio},null,8,["onChange"])],512),[[t.vShow,U.widthSection<=760]]),t.createElementVNode("div",{class:t.normalizeClass(U.widthSection>760?"fields-container":"fields-container-movil")},[t.withDirectives(t.createElementVNode("div",{class:t.normalizeClass(U.widthSection>760?"field-possesion-container":"field-possesion-container-movil")},[t.createVNode(x,{"width-Section":U.widthSection,game:s.game,"time-live-possesion":s.timeLivePossesion,onIntervalidpossesion:m.intervalidpossesion,"team-selected":U.teamSelected.teamId===0?m.toggleButtons[0]:U.teamSelected},null,8,["width-Section","game","time-live-possesion","onIntervalidpossesion","team-selected"])],2),[[t.vShow,U.switchTypeViewFiled==="Porcentajes"||U.widthSection>760]]),t.withDirectives(t.createElementVNode("div",{class:t.normalizeClass(U.widthSection>760?"field-volumetrica-container":"field-volumetrica-container-movil")},[t.createVNode(h,{game:s.game,"season-selected":s.seasonSelected,token:s.token,"is-game-pre-match":m.isGamePreMatch,"team-selected-pre-match":U.teamSelected,"volumetric-field-interval-minutes":s.volumetricFieldIntervalMinutes},null,8,["game","season-selected","token","is-game-pre-match","team-selected-pre-match","volumetric-field-interval-minutes"])],2),[[t.vShow,U.viewVolumtrica&&U.widthSection>760||U.switchTypeViewFiled==="Volumétrico"]])],2),t.createCommentVNode("",!0)],2)),t.createElementVNode("div",Pct,[o[5]||(o[5]=t.createElementVNode("div",{class:"fields-section-title"},"Pizarra",-1)),U.areHighlightsLoading?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(n,{key:0,"is-female":s.tournamentSelected.is_female===1,game:s.game,"season-selected":s.seasonSelected,"tournament-selected":s.tournamentSelected,token:s.token,"width-section":U.widthSection,"can-play-videos":s.canPlayVideos,"is-game-pre-match":m.isGamePreMatch,"play-videos-privileges":s.playVideosPrivileges,"volumetric-field-interval-minutes":s.volumetricFieldIntervalMinutes,"chalkboard-interval-minutes":s.chalkboardIntervalMinutes,"game-events-interval-minutes":s.gameEventsIntervalMinutes,onOpenMediaPlayer:m.onOpenMediaPlayer},null,8,["is-female","game","season-selected","tournament-selected","token","width-section","can-play-videos","is-game-pre-match","play-videos-privileges","volumetric-field-interval-minutes","chalkboard-interval-minutes","game-events-interval-minutes","onOpenMediaPlayer"]))])])],512)}const Bct=Ki(xct,[["render",Lct],["__scopeId","data-v-641ff310"]]),Nqt="",zct={class:"datagame-container"},Oct=Ki({__name:"GSCProminentMain",props:{timeLiveProminentData:{type:Number,default:6e4},timeLiveHighlightsProminentAndVideo:{type:Number,default:6e4},timeLivePossesion:{type:Number,default:6e4},game:{type:Object,default:()=>({})},seasonSelected:{type:Object,default:()=>({})},tournamentSelected:{type:Object,default:()=>({})},isWidget:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},canPlayVideos:{type:Boolean,default:!1},is_captured:{type:Number,default:1},videoPrivilegesPlayingAs:{type:Set,default:()=>new Set([1,2])},playVideosPrivileges:{type:Object,default:null},volumetricFieldIntervalMinutes:{type:Number,default:2},chalkboardIntervalMinutes:{type:Number,default:2},gameEventsIntervalMinutes:{type:Number,default:1}},emits:["click-play-event","openmedia","intervalidpossesion","intervalidhighlive"],setup(e,{emit:o}){const s=o;function B(a){s("intervalidhighlive",a)}function U(a){s("intervalidpossesion",a)}function m(a){s("openmedia",a)}function y(a){s("openmedia",a)}return(a,v)=>(t.openBlock(),t.createElementBlock("div",zct,[t.createVNode(Bct,{game:e.game,is_captured:e.is_captured,"is-widget":e.isWidget,"team-widget":e.teamWidget,"time-live-prominent-data":e.timeLiveProminentData,"time-live-highlights-prominent-and-video":e.timeLiveHighlightsProminentAndVideo,"time-live-possesion":e.timeLivePossesion,"season-selected":e.seasonSelected,"tournament-selected":e.tournamentSelected,"can-play-videos":e.canPlayVideos,"video-privileges-playing-as":e.videoPrivilegesPlayingAs,"play-videos-privileges":e.playVideosPrivileges,"volumetric-field-interval-minutes":e.volumetricFieldIntervalMinutes,"chalkboard-interval-minutes":e.chalkboardIntervalMinutes,"game-events-interval-minutes":e.gameEventsIntervalMinutes,onIntervalidpossesion:U,onIntervalidhighlive:B,onOpenmedia:m,onOpenMediaPlayer:y},null,8,["game","is_captured","is-widget","team-widget","time-live-prominent-data","time-live-highlights-prominent-and-video","time-live-possesion","season-selected","tournament-selected","can-play-videos","video-privileges-playing-as","play-videos-privileges","volumetric-field-interval-minutes","chalkboard-interval-minutes","game-events-interval-minutes"])]))}},[["__scopeId","data-v-9010e64a"]]),Dct={class:"datagame-container"},Nct={__name:"GSCDatosGSMainAvanced",props:{isWidget:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},game:{type:Object,default:()=>({gameId:79623,seasonId:1772,status:1,dateTimeUTC:"2023-10-01T22:20:00Z",homeTeam:{logo:"https://golstatsimages.blob.core.windows.net/teams-80/18.png",team_id:10,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/1.png",team_id:1,provisional_logo:"https://golstatsimages.blob.core.windows.net/teams-provisional/1.png",colloquial_name:"Chivas",acronym:"CHI",team_name:"Guadalajara"}})},tournamentSelected:{type:Object,default:()=>({})},playVideosPrivileges:{type:Object,default:null}},emits:["openmedia","intervalidgs"],setup(e,{emit:o}){const s=fp(),B=t.ref(0),U=e;t.watch(()=>U.game,v=>{B.value=v.gameId},{deep:!0,immediate:!0});const m=o;function y(v){m("openmedia",v)}function a(v){m("intervalidgs",v)}return(v,p)=>(t.openBlock(),t.createElementBlock("div",Dct,[e.game.is_live===1||e.game.game_status===0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[Object.keys(e.game).length>0?(t.openBlock(),t.createBlock(t.unref(fb),{key:B.value,type:3,"is-widget":e.isWidget,"team-widget":e.teamWidget,data:{season:e.game.seasonId,game:e.game.gameId,game_status:e.game.game_status,home_team_id:e.game.homeTeam.team_id,away_team_id:e.game.awayTeam.team_id,team_view:2},"tournament-selected":e.tournamentSelected,onIntervalidgs:a,"play-videos-privileges":e.playVideosPrivileges,"provider-id":t.unref(s).getters.getProviderId,"is-dev-apis":t.unref(s).getters.getIsDevApis,onOpenmedia:y},null,8,["is-widget","team-widget","data","tournament-selected","play-videos-privileges","provider-id","is-dev-apis"])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[e.game.game_status==4?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[Object.keys(e.game).length>0?(t.openBlock(),t.createBlock(t.unref(fb),{key:B.value,type:0,"is-widget":e.isWidget,"team-widget":e.teamWidget,data:{season:e.game.seasonId,game:e.game.gameId,game_status:e.game.game_status,home_team_id:e.game.homeTeam.team_id,away_team_id:e.game.awayTeam.team_id,team_view:1},"tournament-selected":e.tournamentSelected,"play-videos-privileges":e.playVideosPrivileges,"provider-id":t.unref(s).getters.getProviderId,"is-dev-apis":t.unref(s).getters.getIsDevApis,onOpenmedia:y},null,8,["is-widget","team-widget","data","tournament-selected","play-videos-privileges","provider-id","is-dev-apis"])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[Object.keys(e.game).length>0?(t.openBlock(),t.createBlock(t.unref(fb),{key:B.value,type:1,"is-widget":e.isWidget,"team-widget":e.teamWidget,data:{season:e.game.seasonId,game:e.game.gameId,game_status:e.game.game_status,home_team_id:e.game.homeTeam.team_id,away_team_id:e.game.awayTeam.team_id,team_view:2},"tournament-selected":e.tournamentSelected,"play-videos-privileges":e.playVideosPrivileges,"provider-id":t.unref(s).getters.getProviderId,"is-dev-apis":t.unref(s).getters.getIsDevApis,onOpenmedia:y},null,8,["is-widget","team-widget","data","tournament-selected","play-videos-privileges","provider-id","is-dev-apis"])):t.createCommentVNode("",!0)],64))],64))]))}},Fct={computed:{sizeTabsFontMP(){const e=this.elementSize.width;return e<=380?"12px":e<=768?"14px":"16px"},sizeTabsFontMS(){const e=this.elementSize.width;return e<=600?"12px":e<=768?"13px":"14px"},sizeTabsMS(){const e=this.elementSize.width;return e<=480?"145px":e<=600?"153px":e<=620?"163px":e<=640?"170px":e<=660?"175px":e<=680?"180px":e<=700?"185px":e<=720?"195px":"200px"},sizeTabsMP(){const e=this.elementSize.width;return e<=319?"68px":e<=330?"73px":e<=340?"78px":e<=350?"82px":e<=360||e<=370?"90px":e<=390?"95px":e<=410?"105px":e<=430?"110px":e<=450?"117px":e<=470?"122px":e<=500?"130px":e<=530?"138px":e<=560?"155px":e<=590?"163px":e<=620?"175px":e<=650?"180px":e<=680?"195px":e<=730?"210px":e<=768?"100px":"110px"},comextleyemdmultipleleaguesClass(){return this.elementSize.width<=380?this.$style.comtextleyemdmultipleleagues380:this.$style.comtextleyemdmultipleleagues},comdropdownParentClass(){return this.elementSize.width<=730?this.$style.comdropdownParent730:this.$style.comdropdownParent},comdescubreVideosClass(){const e=this.elementSize.width;return e<=960?this.$style.comdescubreVideos960:e<=1232?this.$style.comdescubreVideos1232:this.$style.comdescubreVideos},comquitarFiltrosClass(){const e=this.elementSize.width;return e<=380?this.$style.comquitarFiltros380:e<=480?this.$style.comquitarFiltros480:e<=730?this.$style.comquitarFiltros730:this.$style.comquitarFiltros},commejoresJugadoresClass(){const e=this.elementSize.width;return e<=480?this.$style.commejoresJugadores480:e<=730?this.$style.commejoresJugadores730:this.$style.commejoresJugadores},menuSectionClass(){return this.elementSize.width<=960?this.$style.commenuSection960:this.$style.commenuSection},topFiltersClass(){const e=this.elementSize.width;return e<=420?this.$style.comtopFilters420:e<=460?this.$style.comtopFilters460:e<=1232?this.$style.comtopFilters1232:this.$style.comtopFilters},toniKroosWrapperClass(){const e=this.elementSize.width;return e<=319?this.$style.comtoniKroosWrapper320:e<=420?this.$style.comtoniKroosWrapper420:e<=916?this.$style.comtoniKroosWrapper760:e<=975?this.$style.comtoniKroosWrapper975:e<=1079?this.$style.comtoniKroosWrapper1080:this.$style.comtoniKroosWrapper},containerTablesClass(){const e=this.elementSize.width;return e<=319?this.$style.comcontainerTables320:e<=916?this.$style.comcontainerTables760:e<=1079?this.$style.comcontainerTables960:this.$style.comcontainerTables},containerTheBestClass(){const e=this.elementSize.width;return e<=319?this.$style.comcontainerTheBest320:e<=960?this.$style.comcontainerTheBest960:e<=1232?this.$style.comcontainerTheBest1232:this.$style.comcontainerTheBest},menuSectionHeaderClass(){const e=this.elementSize.width;return e<=730?this.$style.commenuSectionHeader730:e<=960?this.$style.commenuSectionHeader960:e<=1232?this.$style.commenuSectionHeader1232:this.$style.commenuSectionHeader},losMejoresClass(){const e=this.elementSize.width;return e<=380?this.$style.comlosMejores380:e<=530?this.$style.comlosMejores530:e<=730?this.$style.comlosMejores730:this.$style.comlosMejores},dropdownClass(){return this.elementSize.width<=730?this.$style.comdropdown730:this.$style.comdropdown},dropdown1Class(){return this.elementSize.width<=730?this.$style.comdropdown1730:this.$style.comdropdown1},menuSectionParentHeaderClass(){const e=this.elementSize.width;return e<=430?this.$style.commenuSectionParentHeader430:e<=730?this.$style.commenuSectionParentHeader730:e<=960?this.$style.commenuSectionParentHeader960:e<=1232?this.$style.commenuSectionParentHeader1232:this.$style.commenuSectionParentHeader},templateLosMejoresClass(){const e=this.elementSize.width;return e<=319?this.$style.comtemplateLosMejores1320:e<=350?this.$style.comtemplateLosMejores1350:e<=420?this.$style.comtemplateLosMejores1420:e<=540?this.$style.comtemplateLosMejores1540:e<=960?this.$style.comtemplateLosMejores1960:e<=1232?this.$style.comtemplateLosMejores11232:this.$style.comtemplateLosMejores1},containerMenuClass(){return this.elementSize.width<=760?this.$style.comcontainerMenu760:this.$style.comcontainerMenu},titleSectionClass(){return this.elementSize.width<=540?this.$style.comtitleSection540:this.$style.comtitleSection},containerSectionClass(){const e=this.elementSize.width;return e<=319?this.$style.comcontainerSection320:e<=350?this.$style.comcontainerSection350:e<=960?this.$style.comcontainerSection960:e<=1232?this.$style.comcontainerSection1232:this.$style.comcontainerSection},filtersContainerClass(){const e=this.elementSize.width;return e<=420?this.$style.comfiltersContainer420:e<=760?this.$style.comfiltersContainer760:e<=1232?this.$style.comfiltersContainer1232:this.$style.comfiltersContainer},topFiltersParentClass(){const e=this.elementSize.width;return e<=420?this.$style.comtopFiltersParent420:e<=460?this.$style.comtopFiltersParent460:e<=1232?this.$style.comtopFiltersParent1232:this.$style.comtopFiltersParent}}};function jb(e){const o=t.ref({width:0,height:0});function s(){const B=e.value.getBoundingClientRect();o.value.width=B.width,o.value.height=B.height}return t.onMounted(()=>{s(),window.addEventListener("resize",s)}),t.onUnmounted(()=>{window.removeEventListener("resize",s)}),{elementSize:o}}const Rct={containerLeftTitles:"_containerLeftTitles_10kz4_60",containerLeftTitles420:"_containerLeftTitles420_10kz4_68",containerLeftTitles620:"_containerLeftTitles620_10kz4_76",containerLeftTitlesTeam:"_containerLeftTitlesTeam_10kz4_85",containerLeftTitlesTeam1180:"_containerLeftTitlesTeam1180_10kz4_93",containerLeftTitlesTeam1090:"_containerLeftTitlesTeam1090_10kz4_101",containerLeftTitlesTeam960:"_containerLeftTitlesTeam960_10kz4_109",containerLeftTitlesTeam860:"_containerLeftTitlesTeam860_10kz4_117",containerLeftTitlesTeam768:"_containerLeftTitlesTeam768_10kz4_125",containerLeftTitlesTeam680:"_containerLeftTitlesTeam680_10kz4_133",containerLeftTitlesTeam620:"_containerLeftTitlesTeam620_10kz4_141",containerLeftTitlesTeam420:"_containerLeftTitlesTeam420_10kz4_149",headTitlesAvanced:"_headTitlesAvanced_10kz4_158",headTitlesAvanced960:"_headTitlesAvanced960_10kz4_173",headTitlesAvanced420:"_headTitlesAvanced420_10kz4_188",headTitlesAvanced540:"_headTitlesAvanced540_10kz4_208",headTitlesAvanced460:"_headTitlesAvanced460_10kz4_223",headTitlesAvanced620:"_headTitlesAvanced620_10kz4_238",position:"_position_10kz4_253",position420:"_position420_10kz4_262",player:"_player_10kz4_265",player420:"_player420_10kz4_276",containerRightTypeAvanced1:"_containerRightTypeAvanced1_10kz4_280",containerRightTitlesAdvanced:"_containerRightTitlesAdvanced_10kz4_287",containerRightTitlesAdvanced960:"_containerRightTitlesAdvanced960_10kz4_296",block02Titles:"_block02Titles_10kz4_305",block02Titles620:"_block02Titles620_10kz4_313",mon1Scouting:"_mon1Scouting_10kz4_317",mon1Scouting960:"_mon1Scouting960_10kz4_327",mon1:"_mon1_10kz4_317",mon1420:"_mon1420_10kz4_345",mon1620:"_mon1620_10kz4_355",icnIcon:"_icnIcon_10kz4_365",icnIcon960:"_icnIcon960_10kz4_370",icnIcon420:"_icnIcon420_10kz4_376",teamTitle:"_teamTitle_10kz4_380",positionTitle:"_positionTitle_10kz4_390",ageTitle:"_ageTitle_10kz4_398",partidos:"_partidos_10kz4_406",playedGamesTitle:"_playedGamesTitle_10kz4_410",playedMinutesTitle:"_playedMinutesTitle_10kz4_420",block01Titles:"_block01Titles_10kz4_429",mon:"_mon_10kz4_317",containesOptionsTitles:"_containesOptionsTitles_10kz4_445",templateTablaProductividadType1:"_templateTablaProductividadType1_10kz4_452",templateTablaProductividadType1400:"_templateTablaProductividadType1400_10kz4_464",headTitlesType1:"_headTitlesType1_10kz4_478",headTitlesType1420:"_headTitlesType1420_10kz4_491",headTitlesType1400:"_headTitlesType1400_10kz4_507",headTitlesType1540:"_headTitlesType1540_10kz4_523",headTitlesType1460:"_headTitlesType1460_10kz4_537",headTitlesType1680:"_headTitlesType1680_10kz4_551",headTitlesType1350:"_headTitlesType1350_10kz4_564",positionType1:"_positionType1_10kz4_579",positionType1400:"_positionType1400_10kz4_588",teamType1:"_teamType1_10kz4_598",teamType1400:"_teamType1400_10kz4_607",frecuenciaType1:"_frecuenciaType1_10kz4_617",frecuenciaType1540:"_frecuenciaType1540_10kz4_625",containerLeftTitlesType1:"_containerLeftTitlesType1_10kz4_634",frecuenciaWrapperType1:"_frecuenciaWrapperType1_10kz4_642",frecuenciaWrapperType1680:"_frecuenciaWrapperType1680_10kz4_651",promedioPartidoType1:"_promedioPartidoType1_10kz4_659",promedioEstePartidoType1:"_promedioEstePartidoType1_10kz4_663",promedioEstePartidoType1960:"_promedioEstePartidoType1960_10kz4_671",promedioEstePartidoWrapperType1:"_promedioEstePartidoWrapperType1_10kz4_675",promedioEstePartidoWrapperType11200:"_promedioEstePartidoWrapperType11200_10kz4_683",promedioEstePartidoWrapperType11090:"_promedioEstePartidoWrapperType11090_10kz4_692",promedioEstePartidoWrapperType11086:"_promedioEstePartidoWrapperType11086_10kz4_702",promedioPartidosType1:"_promedioPartidosType1_10kz4_711",promedioPartidosWrapperType1:"_promedioPartidosWrapperType1_10kz4_718",promedioPartidosWrapperType1960:"_promedioPartidosWrapperType1960_10kz4_726",promedioPartidosWrapperType11086:"_promedioPartidosWrapperType11086_10kz4_729",partidosJugadosType1:"_partidosJugadosType1_10kz4_732",partidosJugadosType1960:"_partidosJugadosType1960_10kz4_738",partidosJugadosWrapperType1:"_partidosJugadosWrapperType1_10kz4_745",partidosJugadosWrapperType11200:"_partidosJugadosWrapperType11200_10kz4_753",partidosJugadosWrapperType11180:"_partidosJugadosWrapperType11180_10kz4_761",partidosJugadosWrapperType11170:"_partidosJugadosWrapperType11170_10kz4_769",partidosJugadosWrapperType11140:"_partidosJugadosWrapperType11140_10kz4_777",partidosJugadosWrapperType11086:"_partidosJugadosWrapperType11086_10kz4_785",partidosJugadosWrapperType1960:"_partidosJugadosWrapperType1960_10kz4_793",partidosJugadosWrapperType1880:"_partidosJugadosWrapperType1880_10kz4_801",partidosJugadosWrapperType1860:"_partidosJugadosWrapperType1860_10kz4_809",partidosJugadosWrapperType1830:"_partidosJugadosWrapperType1830_10kz4_817",partidosJugadosWrapperType1790:"_partidosJugadosWrapperType1790_10kz4_825",partidosJugadosWrapperType1930:"_partidosJugadosWrapperType1930_10kz4_833",partidosJugadosWrapperType1770:"_partidosJugadosWrapperType1770_10kz4_841",block01TitlesType1:"_block01TitlesType1_10kz4_844",monType1:"_monType1_10kz4_852",monType1960:"_monType1960_10kz4_861",monType1680:"_monType1680_10kz4_871",videosType1:"_videosType1_10kz4_874",videosType1680:"_videosType1680_10kz4_884",videosType1600:"_videosType1600_10kz4_893",videosType1540:"_videosType1540_10kz4_902",videosType1420:"_videosType1420_10kz4_911",videosType1400:"_videosType1400_10kz4_920",containesOptionsTitlesType1:"_containesOptionsTitlesType1_10kz4_932",containesOptionsTitlesType1768:"_containesOptionsTitlesType1768_10kz4_940",containesOptionsTitlesType1730:"_containesOptionsTitlesType1730_10kz4_947",containesOptionsTitlesType1690:"_containesOptionsTitlesType1690_10kz4_954",icnIconType1:"_icnIconType1_10kz4_961",icnIconType1420:"_icnIconType1420_10kz4_967",icnIconType1400:"_icnIconType1400_10kz4_974",block02TitlesType1:"_block02TitlesType1_10kz4_978",block02TitlesType1680:"_block02TitlesType1680_10kz4_985",block02TitlesType1350:"_block02TitlesType1350_10kz4_992",containerRightTitlesType1:"_containerRightTitlesType1_10kz4_999",containerRightTitlesType1420:"_containerRightTitlesType1420_10kz4_1008"},NS={components:{},computed:{icnIconType1Class(){const e=this.elementSize.width;return e<=400?this.$style.icnIconType1400:e<=420?this.$style.icnIconType1420:this.$style.icnIconType1},videosType1Class(){const e=this.elementSize.width;return e<=400?this.$style.videosType1400:e<=420?this.$style.videosType1420:e<=540?this.$style.videosType1540:e<=600?this.$style.videosType1600:e<=680?this.$style.videosType1680:this.$style.videosType1},monType1Class(){const e=this.elementSize.width;return e<=680?this.$style.monType1680:e<=960?this.$style.monType1960:this.$style.monType1},block02TitlesType1Class(){const e=this.elementSize.width;return e<=350?this.$style.block02TitlesType1350:e<=680?this.$style.block02TitlesType1680:this.$style.block02TitlesType1},containesOptionsTitlesType1Class(){const e=this.elementSize.width;return e<=400?this.$style.containesOptionsTitlesType1400:e<=690?this.$style.containesOptionsTitlesType1690:e<=730?this.$style.containesOptionsTitlesType1730:e<=768?this.$style.containesOptionsTitlesType1768:this.$style.containesOptionsTitlesType1},partidosJugadosWrapperType1Class(){const e=this.elementSize.width;return e<=770?this.$style.promedioPartidosWrapperType1770:e<=790?this.$style.partidosJugadosWrapperType1790:e<=830?this.$style.partidosJugadosWrapperType1830:e<=860?this.$style.partidosJugadosWrapperType1860:e<=880?this.$style.partidosJugadosWrapperType1880:e<=930?this.$style.partidosJugadosWrapperType1930:e<=960?this.$style.partidosJugadosWrapperType1960:e<=1086?this.$style.partidosJugadosWrapperType11086:e<=1140?this.$style.partidosJugadosWrapperType11140:e<=1170?this.$style.partidosJugadosWrapperType11170:e<=1180?this.$style.partidosJugadosWrapperType11180:e<=1200?this.$style.partidosJugadosWrapperType11200:this.$style.partidosJugadosWrapperType1},promedioPartidosWrapperType1Class(){const e=this.elementSize.width;return e<=960?this.$style.promedioPartidosWrapperType1960:e<=1086?this.$style.promedioPartidosWrapperType11086:this.$style.promedioPartidosWrapperType1},partidosJugadosType1Class(){return this.elementSize.width<=960?this.$style.partidosJugadosType1960:this.$style.partidosJugadosType1},templateTablaProductividadType1Class(){return this.elementSize.width<=400?this.$style.templateTablaProductividadType1400:this.$style.templateTablaProductividadType1},promedioEstePartidoType1Class(){return this.elementSize.width<=960?this.$style.promedioEstePartidoType1960:this.$style.promedioEstePartidoType1},headTitlesType1Class(){const e=this.elementSize.width;return e<=350?this.$style.headTitlesType1350:e<=400?this.$style.headTitlesType1400:e<=420?this.$style.headTitlesType1420:e<=460?this.$style.headTitlesType1460:e<=540?this.$style.headTitlesType1540:e<=680?this.$style.headTitlesType1680:this.$style.headTitlesType1},headTitlesClassAvanced(){const e=this.elementSize.width;return e<=420?this.$style.headTitlesAvanced420:e<=460?this.$style.headTitlesAvanced460:e<=540?this.$style.headTitlesAvanced540:e<=620?this.$style.headTitlesAvanced620:e<=960?this.$style.headTitlesAvanced960:this.$style.headTitlesAvanced},containerLeftTitlesClass(){const e=this.elementSize.width;return e<=420?this.$style.containerLeftTitles420:e<=620?this.$style.containerLeftTitles620:this.$style.containerLeftTitles},containerLeftTitlesClassTeam(){const e=this.elementSize.width;return e<=420?this.$style.containerLeftTitlesTeam420:e<=620?this.$style.containerLeftTitlesTeam620:e<=680?this.$style.containerLeftTitlesTeam680:e<=768?this.$style.containerLeftTitlesTeam768:e<=860?this.$style.containerLeftTitlesTeam860:e<=960?this.$style.containerLeftTitlesTeam960:e<=1090?this.$style.containerLeftTitlesTeam1090:e<=1180?this.$style.containerLeftTitlesTeam1180:this.$style.containerLeftTitlesTeam},icnIconClass(){const e=this.elementSize.width;return e<=420?this.$style.icnIcon420:e<=960?this.$style.icnIcon960:this.$style.icnIcon},mon1Class(){const e=this.elementSize.width;return e<=420?this.$style.mon1420:e<=620?this.$style.mon1620:this.$style.mon1},mon1ScoutingClass(){const e=this.elementSize.width;return e<=420?this.$style.mon1420:e<=960?this.$style.mon1Scouting960:this.$style.mon1Scouting},promedioEstePartidoWrapperType1Class(){const e=this.elementSize.width;return e<=1086?this.$style.promedioEstePartidoWrapperType11086:e<=1090?this.$style.promedioEstePartidoWrapperType11090:e<=1200?this.$style.promedioEstePartidoWrapperType11200:this.$style.promedioEstePartidoWrapperType1},frecuenciaWrapperType1Class(){return this.elementSize.width<=680?this.$style.frecuenciaWrapperType1680:this.$style.frecuenciaWrapperType1},frecuenciaType1Class(){return this.elementSize.width<=540?this.$style.frecuenciaType1540:this.$style.frecuenciaType1},positionType1Class(){return this.elementSize.width<=400?this.$style.positionType1400:this.$style.positionType1},containerRightType1ClassAvanced(){return this.elementSize.width<=420?this.$style.containerRightTypeAvanced1420:this.$style.containerRightTypeAvanced1},containerRightTitlesType1Class(){return this.elementSize.width<=420?this.$style.containerRightTitlesType1420:this.$style.containerRightTitlesType1},teamType1Class(){return this.elementSize.width<=400?this.$style.teamType1400:this.$style.teamType1},playerClass(){return this.elementSize.width<=420?this.$style.player420:this.$style.player},positionClass(){return this.elementSize.width<=420?this.$style.position420:this.$style.position},containerRightTitlesClassAdvanced(){return this.elementSize.width<=960?this.$style.containerRightTitlesAdvanced960:this.$style.containerRightTitlesAdvanced},block02TitlesClass(){return this.elementSize.width<=620?this.$style.block02Titles960:this.$style.block02Titles}},setup(){const e=t.ref("myDivRef"),{elementSize:o}=jb(e);return{myDivRef:e,elementSize:o}},props:{type:{type:Number,default:0},background:{type:String,default:"#172531"},height:{type:String,default:"71px"},heightTeam:{type:String,default:"65px"},fontColor:{type:String,default:"#FFFFFF"},fontSize:{type:String,default:"12px"},fontFamily:{type:String,default:"Poppins-Regular"}},watch:{},data:()=>({}),async created(){},methods:{}},$R=()=>{t.useCssVars(e=>({"833b0df6":e.background,"1c64387e":e.height,"42ac62f2":e.fontSize,"149ddcc6":e.fontColor,"766a7f2c":e.fontFamily,"669f7ffb":e.heightTeam}))},KR=NS.setup;NS.setup=KR?(e,o)=>($R(),KR(e,o)):$R;const Vct={ref:"myDivRef"};function jct(e,o,s,B,U,m){return t.openBlock(),t.createElementBlock("div",Vct,[s.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(m.headTitlesClassAvanced),id:"container-titles"},[t.createElementVNode("div",{class:t.normalizeClass(m.containerLeftTitlesClass),id:"container-left-titles"},[t.createElementVNode("div",{class:t.normalizeClass(m.positionClass)},"Pos.",2),t.createElementVNode("div",{class:t.normalizeClass(m.playerClass)},"Jugador",2)],2),t.createElementVNode("div",{class:t.normalizeClass(m.containerRightTitlesClassAdvanced),id:"container-right-titles"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.block01Titles)},[B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.teamTitle)},"Equipo",2)):t.createCommentVNode("",!0),B.elementSize.width>730?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.positionTitle)},"Posición",2)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(e.$style.ageTitle)},"edad",2)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(e.$style.ageTitle)},"País",2)):t.createCommentVNode("",!0),B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:4,class:t.normalizeClass(e.$style.playedGamesTitle)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Partidos",2),t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Jugados",2)],2)):t.createCommentVNode("",!0),B.elementSize.width>635?(t.openBlock(),t.createElementBlock("div",{key:5,class:t.normalizeClass(e.$style.playedMinutesTitle)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Minutos",2),t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Jugados",2)],2)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(m.block02TitlesClass)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containesOptionsTitles)},[B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.mon)},"Total",2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(m.mon1Class)},"Videos",2)],2)],2)],2)],2)):t.createCommentVNode("",!0),s.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(m.templateTablaProductividadType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(m.headTitlesType1Class),id:"container-titles"},[t.createElementVNode("div",{class:t.normalizeClass(m.containerLeftTitlesClassTeam),id:"container-left-titles"},[t.createElementVNode("div",{class:t.normalizeClass(m.positionType1Class)},"Pos.",2),t.createElementVNode("div",{class:t.normalizeClass(m.teamType1Class)},"Equipo",2)],2),t.createElementVNode("div",{class:t.normalizeClass(m.containerRightType1ClassAvanced)},[t.createElementVNode("div",{class:t.normalizeClass(m.frecuenciaWrapperType1Class)},[B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(m.frecuenciaType1Class)},"Frecuencia",2)):t.createCommentVNode("",!0)],2),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(m.promedioEstePartidoWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(m.promedioEstePartidoType1Class)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.promedioPartidoType1)},"Promedio partido",2),t.createElementVNode("p",{class:t.normalizeClass(e.$style.promedioPartidoType1)},"este Torneo",2)],2)],2)):t.createCommentVNode("",!0),B.elementSize.width>1086?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(m.promedioPartidosWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.promedioPartidosType1)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.promedioPartidoType1)},o[0]||(o[0]=[t.createTextVNode("Promedio partido"),t.createElementVNode("br",null,null,-1),t.createTextVNode("Torneo anterior")]),2)],2)],2)):t.createCommentVNode("",!0),B.elementSize.width>770?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(m.partidosJugadosWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.partidosJugadosType1)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.promedioPartidoType1)},o[1]||(o[1]=[t.createTextVNode("Partidos "),t.createElementVNode("br",null,null,-1),t.createTextVNode("Jugados")]),2)],2)],2)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(m.containesOptionsTitlesType1Class)},[B.elementSize.width>680?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(m.monType1Class)},"total",2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(m.videosType1Class)},"Videos",2)],2)],2)],2)):t.createCommentVNode("",!0),s.type==2?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(m.headTitlesClassAvanced),id:"container-titles"},[t.createElementVNode("div",{class:t.normalizeClass(m.containerLeftTitlesClass),id:"container-left-titles"},[t.createElementVNode("div",{class:t.normalizeClass(m.positionClass)},"Pos.",2),t.createElementVNode("div",{class:t.normalizeClass(m.playerClass)},"Jugador",2)],2),t.createElementVNode("div",{class:t.normalizeClass(m.containerRightTitlesClassAdvanced),id:"container-right-titles"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.block01Titles)},[B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.teamTitle)},"Equipo",2)):t.createCommentVNode("",!0),B.elementSize.width>730?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.positionTitle)},"Posición",2)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(e.$style.ageTitle)},"edad",2)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(e.$style.ageTitle)},"País",2)):t.createCommentVNode("",!0),B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:4,class:t.normalizeClass(e.$style.playedGamesTitle)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Partidos",2),t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Jugados",2)],2)):t.createCommentVNode("",!0),B.elementSize.width>635?(t.openBlock(),t.createElementBlock("div",{key:5,class:t.normalizeClass(e.$style.playedMinutesTitle)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Minutos",2),t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Jugados",2)],2)):t.createCommentVNode("",!0),B.elementSize.width>635?(t.openBlock(),t.createElementBlock("div",{key:6,class:t.normalizeClass(e.$style.playedMinutesTitle)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Liga",2)],2)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(m.block02TitlesClass)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containesOptionsTitles)},[t.createElementVNode("div",{class:t.normalizeClass(m.mon1ScoutingClass)},"Videos",2)],2)],2)],2)],2)):t.createCommentVNode("",!0)],512)}const QR=Ki(NS,[["render",jct],["__cssModules",{$style:Rct}]]),UYt="",FS={props:{type:{type:Number,default:0},value:{type:Boolean,default:!1},textValue:String,icon:{type:String,default:"https://golstatsimages.blob.core.windows.net/images-library/arrow-btn.png"},iconPosition:{type:String,default:"left"},iconSize:String,mini:{type:Boolean,default:!1},fontColor:{type:String,default:"#FFFFFF"},textDecoration:String,fontSize:{type:String,default:"16px"},fontSizeStat:{type:String,default:"16px"},fontStyle:String,fontFamily:{type:String,default:"Poppins-Regular"},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},buttonMaxWidth:{type:String,default:"auto"},borderRadius:{type:String,default:"0px"},borderType:{type:String,default:"solid"},borderWidth:{type:Number,default:0},borderWidthBtn:{type:String,default:"2px"},borderColor:String,backgroundColor:{type:String,default:"none"},activeBackgroundColor:{type:String,default:"#000000"},activeBorderWidth:{type:Number,default:2},activeBorderType:{type:String,default:"solid"},activeBorderColor:{type:String,default:"#cbee6b"},activeColorText:{type:String,default:"#FFFFFF"},cursorType:{type:String,default:"default"},typeOnOff:{type:Boolean,default:!1},textCategory:String,textStat:String,marginLeftStat:{type:String,default:"15%"}},watch:{value:{deep:!0,immediate:!0,handler(e){this.status=e}}},data(){return{status:!1}},computed:{customStyle(){return{height:this.height,width:this.width,maxWidth:this.buttonMaxWidth,backgroundColor:this.backgroundColor,borderRadius:this.borderRadius,border:`${this.borderType} ${this.borderWidth}px ${this.borderColor}`,color:this.fontColor,textDecoration:this.textDecoration,cursor:this.cursorType,fontSize:this.fontSize,fontStyle:this.fontStyle,fontFamily:`${this.fontFamily} !important`}},customActive(){return{backgroundColor:this.activeBackgroundColor,color:this.activeColorText,border:`${this.activeBorderType} ${this.activeBorderWidth}px ${this.activeBorderColor}`}}},methods:{btnClick(e){this.$emit("click",e),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},eV=()=>{t.useCssVars(e=>({"3ae4172d":e.height,f5b071f0:e.borderWidthBtn,f8d8d6e8:e.borderType,"242a575e":e.borderColor,"2f813538":e.borderRadius,"9fb26200":e.width,"374850e2":e.backgroundColor,"1c058eb6":e.cursorType,"5cacbd76":e.fontSize,"38efeedc":e.fontStyle,"6464a0ce":e.fontFamily,"26623acf":e.marginLeftStat,d6a6e62c:e.fontSizeStat}))},tV=FS.setup;FS.setup=tV?(e,o)=>(eV(),tV(e,o)):eV;const Uct=["src"],Gct={key:1,class:"text"},Hct=["src"],Zct={class:"stats"},Wct={class:"numstats"},qct={class:"leyend"};function Jct(e,o,s,B,U,m){return t.openBlock(),t.createElementBlock("div",null,[s.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["button",U.status&&s.typeOnOff&&"button-active"]),style:t.normalizeStyle([m.customStyle,U.status&&s.typeOnOff&&m.customActive]),onClick:o[0]||(o[0]=(...y)=>m.btnClick&&m.btnClick(...y))},[s.icon&&s.iconPosition.toLowerCase()==="left"?(t.openBlock(),t.createElementBlock("img",{key:0,class:t.normalizeClass(s.mini?"icon-txt":"icon"),style:t.normalizeStyle({width:s.iconSize}),src:s.icon},null,14,Uct)):t.createCommentVNode("",!0),s.textValue?(t.openBlock(),t.createElementBlock("div",Gct,t.toDisplayString(s.textValue),1)):t.createCommentVNode("",!0),s.icon&&s.iconPosition.toLowerCase()==="right"?(t.openBlock(),t.createElementBlock("img",{key:2,class:"icon",style:t.normalizeStyle({width:s.iconSize}),src:s.icon},null,12,Hct)):t.createCommentVNode("",!0)],6)):t.createCommentVNode("",!0),s.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:"button-target",onClick:o[1]||(o[1]=(...y)=>m.btnClick&&m.btnClick(...y))},[t.createElementVNode("div",Zct,[o[2]||(o[2]=t.createElementVNode("img",{class:"iconstats",src:"https://golstatsimages.blob.core.windows.net/todoelfut/playdes.png"},null,-1)),t.createElementVNode("div",Wct,t.toDisplayString(s.textStat),1)]),t.createElementVNode("div",qct,t.toDisplayString(s.textCategory),1)])):t.createCommentVNode("",!0)])}const aV=Ki(FS,[["render",Jct],["__scopeId","data-v-cbde52b5"]]),Yct={rotate:"_rotate_z2pk6_3",positionContainer:"_positionContainer_z2pk6_50",positionContainer620:"_positionContainer620_z2pk6_57",rowwPlayerGames:"_rowwPlayerGames_z2pk6_64",rowwPlayer960Games:"_rowwPlayer960Games_z2pk6_80",rowwPlayer420Games:"_rowwPlayer420Games_z2pk6_95",rowwPlayer460Games:"_rowwPlayer460Games_z2pk6_111",containerLeftGames:"_containerLeftGames_z2pk6_128",containerLeft420Games:"_containerLeft420Games_z2pk6_136",containerLeft620Games:"_containerLeft620Games_z2pk6_144",iconFavoritesType1:"_iconFavoritesType1_z2pk6_151",iconFavoritesType1320:"_iconFavoritesType1320_z2pk6_159",iconFavorites:"_iconFavorites_z2pk6_151",iconFavorites420:"_iconFavorites420_z2pk6_175",playerContainerGames:"_playerContainerGames_z2pk6_183",playerContainer420Games:"_playerContainer420Games_z2pk6_195",playerContainer460Games:"_playerContainer460Games_z2pk6_207",playerContainerType1Games:"_playerContainerType1Games_z2pk6_219",playerContainerType1320Games:"_playerContainerType1320Games_z2pk6_229",playerContainerType1460Games:"_playerContainerType1460Games_z2pk6_239",imgPlayerIcon:"_imgPlayerIcon_z2pk6_249",imgPlayerIcon460:"_imgPlayerIcon460_z2pk6_259",imgPlayerIcon420:"_imgPlayerIcon420_z2pk6_269",manchesterUnitedGames:"_manchesterUnitedGames_z2pk6_279",manchesterUnited360Games:"_manchesterUnited360Games_z2pk6_290",manchesterUnited420Games:"_manchesterUnited420Games_z2pk6_301",manchesterUnited460Games:"_manchesterUnited460Games_z2pk6_312",containerRightGames:"_containerRightGames_z2pk6_323",containerRight960Games:"_containerRight960Games_z2pk6_332",containerRight420Games:"_containerRight420Games_z2pk6_342",numberOfVideos:"_numberOfVideos_z2pk6_353",numberOfVideos620:"_numberOfVideos620_z2pk6_359",block02Games:"_block02Games_z2pk6_365",block02960Games:"_block02960Games_z2pk6_375",block02620Games:"_block02620Games_z2pk6_384",block02420Games:"_block02420Games_z2pk6_391",verVideos:"_verVideos_z2pk6_399",verVideos620:"_verVideos620_z2pk6_405",numberPosition:"_numberPosition_z2pk6_408",shapeIcon:"_shapeIcon_z2pk6_414",chivasIcon:"_chivasIcon_z2pk6_419",imgTeamIcon:"_imgTeamIcon_z2pk6_430",teamName:"_teamName_z2pk6_435",nameTeamGames:"_nameTeamGames_z2pk6_441",dfC:"_dfC_z2pk6_450",position:"_position_z2pk6_50",age:"_age_z2pk6_460",manchesterUnitedIcon:"_manchesterUnitedIcon_z2pk6_468",country:"_country_z2pk6_475",playedGames:"_playedGames_z2pk6_482",playedMinutes:"_playedMinutes_z2pk6_489",block01:"_block01_z2pk6_496",leagueName:"_leagueName_z2pk6_503",roleCharacterIcon:"_roleCharacterIcon_z2pk6_509",btnVideosGames:"_btnVideosGames_z2pk6_517",containerBtnVideosGames:"_containerBtnVideosGames_z2pk6_532",containerBtnVideos620Games:"_containerBtnVideos620Games_z2pk6_542",containesOptions:"_containesOptions_z2pk6_551",arrowExpandIcon:"_arrowExpandIcon_z2pk6_558",rowTeam:"_rowTeam_z2pk6_567",rowTeam420:"_rowTeam420_z2pk6_585",rowTeam320:"_rowTeam320_z2pk6_603",rowTeam460:"_rowTeam460_z2pk6_622",rowTeam350:"_rowTeam350_z2pk6_641",containerLeftType1:"_containerLeftType1_z2pk6_659",containerLeftType1680:"_containerLeftType1680_z2pk6_665",containerLeftType1320:"_containerLeftType1320_z2pk6_672",containerLeftType1350:"_containerLeftType1350_z2pk6_680",positionContainertype1:"_positionContainertype1_z2pk6_687",positionContainertype1380:"_positionContainertype1380_z2pk6_695",positionContainertype1680:"_positionContainertype1680_z2pk6_703",positionContainertype1420:"_positionContainertype1420_z2pk6_711",manchesterUnitedType1:"_manchesterUnitedType1_z2pk6_719",manchesterUnitedType1460:"_manchesterUnitedType1460_z2pk6_725",manchesterUnitedType1320:"_manchesterUnitedType1320_z2pk6_732",containerRightType1Games:"_containerRightType1Games_z2pk6_739",containerRightType1420Games:"_containerRightType1420Games_z2pk6_750",containerRightType1320Games:"_containerRightType1320Games_z2pk6_761",teamNameWrapperType1:"_teamNameWrapperType1_z2pk6_772",teamNameWrapperType1960:"_teamNameWrapperType1960_z2pk6_779",teamNameWrapperType11086:"_teamNameWrapperType11086_z2pk6_786",ageWrapperType1:"_ageWrapperType1_z2pk6_793",ageWrapperType1680:"_ageWrapperType1680_z2pk6_800",ageWrapperType11086:"_ageWrapperType11086_z2pk6_808",ageType1:"_ageType1_z2pk6_816",ageType1960:"_ageType1960_z2pk6_824",playedGamesWrapperType1:"_playedGamesWrapperType1_z2pk6_827",playedGamesWrapperType1680:"_playedGamesWrapperType1680_z2pk6_834",playedGamesWrapperType1960:"_playedGamesWrapperType1960_z2pk6_837",playedGamesType1:"_playedGamesType1_z2pk6_840",playedGamesType1540:"_playedGamesType1540_z2pk6_847",playedGamesType1960:"_playedGamesType1960_z2pk6_851",playedGamesType11086:"_playedGamesType11086_z2pk6_854",playedMinutesWrapperType1:"_playedMinutesWrapperType1_z2pk6_857",playedMinutesWrapperType11086:"_playedMinutesWrapperType11086_z2pk6_864",playedMinutesType1:"_playedMinutesType1_z2pk6_871",playedMinutesType1680:"_playedMinutesType1680_z2pk6_878",block02Type1Games:"_block02Type1Games_z2pk6_881",block02Type1680Games:"_block02Type1680Games_z2pk6_889",block02Type1320Games:"_block02Type1320Games_z2pk6_897",block02Type1350Games:"_block02Type1350Games_z2pk6_906",leagueNameWrapperType1:"_leagueNameWrapperType1_z2pk6_914",leagueNameWrapperType1680:"_leagueNameWrapperType1680_z2pk6_922",leagueNameWrapperType1960:"_leagueNameWrapperType1960_z2pk6_925",leagueNameType1:"_leagueNameType1_z2pk6_933",leagueNameType1960:"_leagueNameType1960_z2pk6_943",numberOfVideosType1:"_numberOfVideosType1_z2pk6_953",numberOfVideosType1680:"_numberOfVideosType1680_z2pk6_960",numberOfVideosType11232:"_numberOfVideosType11232_z2pk6_967",vectorIconType1:"_vectorIconType1_z2pk6_974",block01TitlesType1:"_block01TitlesType1_z2pk6_991",numberPositionType1:"_numberPositionType1_z2pk6_998",shapeIconType1:"_shapeIconType1_z2pk6_1004",tijuanaIconType1:"_tijuanaIconType1_z2pk6_1010",tijuanaWrapperType1:"_tijuanaWrapperType1_z2pk6_1016",tijuanaWrapperType1NoBg:"_tijuanaWrapperType1NoBg_z2pk6_1027",teamNameType1:"_teamNameType1_z2pk6_1035",roleCharacterIconType1:"_roleCharacterIconType1_z2pk6_1042",verVideosType1:"_verVideosType1_z2pk6_1049",btnVideosType1Games:"_btnVideosType1Games_z2pk6_1055",containerBtnVideosType1Games:"_containerBtnVideosType1Games_z2pk6_1070",containesOptionsType1Games:"_containesOptionsType1Games_z2pk6_1081",arrowExpandIconType1:"_arrowExpandIconType1_z2pk6_1089",templateTablaProductividadType1:"_templateTablaProductividadType1_z2pk6_1095",verVideosType11232:"_verVideosType11232_z2pk6_1107",templateTablaProductividadType1320:"_templateTablaProductividadType1320_z2pk6_1111",verVideosType1680:"_verVideosType1680_z2pk6_1115"},RS={components:{GSCButton:aV},computed:{manchesterUnitedType1Class(){const e=this.elementSize.width;return e<=320?this.$style.manchesterUnitedType1320:e<=460?this.$style.manchesterUnitedType1460:this.$style.manchesterUnitedType1},containerRightType1Class(){const e=this.elementSize.width;return e<=320?this.$style.containerRightType1320Games:e<=420?this.$style.containerRightType1420Games:this.$style.containerRightType1Games},teamNameWrapperType1Class(){const e=this.elementSize.width;return e<=960?this.$style.teamNameWrapperType1960:e<=1086?this.$style.teamNameWrapperType11086:this.$style.teamNameWrapperType1},ageWrapperType1Class(){const e=this.elementSize.width;return e<=680?this.$style.ageWrapperType1680:e<=1086?this.$style.ageWrapperType11086:this.$style.ageWrapperType1},ageType1Class(){return this.elementSize.width<=960?this.$style.ageType1960:this.$style.ageType1},playedGamesWrapperType1Class(){const e=this.elementSize.width;return e<=680?this.$style.playedGamesWrapperType1680:e<=960?this.$style.playedGamesWrapperType1960:this.$style.playedGamesWrapperType1},playedGamesType1Class(){const e=this.elementSize.width;return e<=540?this.$style.playedGamesType1540:e<=960?this.$style.playedGamesType1960:e<=1086?this.$style.playedGamesType11086:this.$style.playedGamesType1},playedMinutesWrapperType1Class(){return this.elementSize.width<=1086?this.$style.playedMinutesWrapperType11086:this.$style.playedMinutesWrapperType1},playedMinutesType1Class(){return this.elementSize.width<=680?this.$style.playedMinutesType1680:this.$style.playedMinutesType1},block02Type1Class(){const e=this.elementSize.width;return e<=320?this.$style.block02Type1320Games:e<=350?this.$style.block02Type1350Games:e<=680?this.$style.block02Type1680Games:this.$style.block02Type1Games},leagueNameWrapperType1Class(){const e=this.elementSize.width;return e<=680?this.$style.leagueNameWrapperType1680:e<=960?this.$style.leagueNameWrapperType1960:this.$style.leagueNameWrapperType1},leagueNameType1Class(){return this.elementSize.width<=960?this.$style.leagueNameType1960:this.$style.leagueNameType1},numberOfVideosType1Class(){const e=this.elementSize.width;return e<=680?this.$style.numberOfVideosType1680:e<=1232?this.$style.numberOfVideosType11232:this.$style.numberOfVideosType1},containerLeftType1Class(){const e=this.elementSize.width;return e<=320?this.$style.containerLeftType1320:e<=350?this.$style.containerLeftType1350:e<=680?this.$style.containerLeftType1680:this.$style.containerLeftType1},positionContainertype1Class(){const e=this.elementSize.width;return e<=380?this.$style.positionContainertype1380:e<=420?this.$style.positionContainertype1420:e<=680?this.$style.positionContainertype1680:this.$style.positionContainertype1},rowTeamClass(){const e=this.elementSize.width;return e<=320?this.$style.rowTeam320:e<=350?this.$style.rowTeam350:e<=420?this.$style.rowTeam420:e<=460?this.$style.rowTeam460:this.$style.rowTeam},containerBtnVideosClass(){return this.$style.containerBtnVideosGames},numberOfVideosClass(){return this.elementSize.width<=620?this.$style.numberOfVideos620:this.$style.numberOfVideos},block02Class(){const e=this.elementSize.width;return e<=420?this.$style.block02420Games:e<=620?this.$style.block02620Games:e<=960?this.$style.block02960Games:this.$style.block02Games},imgPlayerIconClass(){const e=this.elementSize.width;return e<=420?this.$style.imgPlayerIcon420:e<=460?this.$style.imgPlayerIcon460:this.$style.imgPlayerIcon},manchesterUnitedClass(){const e=this.elementSize.width;return e<=360?this.$style.manchesterUnited360Games:e<=420?this.$style.manchesterUnited420Games:e<=460?this.$style.manchesterUnited460Games:this.$style.manchesterUnitedGames},containerRightClass(){const e=this.elementSize.width;return e<=420?this.$style.containerRight420Games:e<=960?this.$style.containerRight960Games:this.$style.containerRightGames},playerContainerType1Class(){const e=this.elementSize.width;return e<=320?this.$style.playerContainerType1320Games:e<=460?this.$style.playerContainerType1460Games:this.$style.playerContainerType1Games},playerContainerClass(){const e=this.elementSize.width;return e<=420?this.$style.playerContainer420Games:e<=460?this.$style.playerContainer460Games:this.$style.playerContainerGames},iconFavoritesClass(){return this.elementSize.width<=420?this.$style.iconFavorites420:this.$style.iconFavorites},iconFavoritesType1Class(){return this.elementSize.width<=320?this.$style.iconFavoritesType1320:this.$style.iconFavoritesType1},containerLeftClass(){const e=this.elementSize.width;return e<=420?this.$style.containerLeft420Games:e<=620?this.$style.containerLeft620Games:this.$style.containerLeftGames},positionContainerClass(){return this.elementSize.width<=620?this.$style.positionContainer620:this.$style.positionContainer},rowwPlayerClass(){const e=this.elementSize.width;return e<=420?this.$style.rowwPlayer420Games:e<=460?this.$style.rowwPlayer460Games:e<=960?this.$style.rowwPlayer960Games:this.$style.rowwPlayerGames}},setup(){const e=t.ref("myDivRef2"),{elementSize:o}=jb(e);return{myDivRef2:e,elementSize:o}},props:{typeData:{type:Number,default:1},canPlayVideos:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},type:{type:Number,default:0},typeView:{type:Number,default:0},isExpanded:{type:Boolean,default:!1},background:{type:String,default:"#172531"},height:{type:String,default:"35px"},fontColor:{type:String,default:"#F4F4F4"},fontSize:{type:String,default:"12px"},fontFamily:{type:String,default:"Poppins-Regular"},data:{type:Object,default:()=>{}},game:{type:Object,default:()=>{}},colorArrow:{type:String,default:"#D9D9D9"},buttonTextValue:{type:String,default:"Ver videos"},iconVideos:{type:String,default:"https://golstatsimages.blob.core.windows.net/images-library/arrow-btn.png"},iconSize:{type:String,default:"13px"},iconSizeMini:{type:String,default:"13px"},iconPosition:{type:String,default:"left"},buttonWidth:{type:String,default:"93px"},buttonWidthMini:{type:String,default:"24px"},buttonHeightMini:{type:String,default:"24px"},buttonHeight:{type:String,default:"30px"},buttonRadius:{type:String,default:"30px"},buttonBorderWidth:{type:Number,default:1},buttonBackground:{type:String,default:"#ffffff1a"},buttonfontFamily:{type:String,default:"Poppins-Regular"},buttonBorderColor:{type:String,default:"#55636e"},buttonFontSize:{type:String,default:"10px"}},data:()=>({expand:!1}),methods:{clickExpand(e){this.$emit("expand",{expand:!this.isExpanded,id:e})},emitEventMedia(e){this.$emit("mediadata",e)}}},rV=()=>{t.useCssVars(e=>({d0a618bc:e.height,ba5dfbae:e.background,aa9f5eaa:e.fontSize,ab0a580e:e.fontColor,ad8d6ce4:e.fontFamily}))},nV=RS.setup;RS.setup=nV?(e,o)=>(rV(),nV(e,o)):rV;const Xct={ref:"myDivRef2",style:{"border-left":"rgba(13,29,41,0.7) 1px solid","border-right":"rgba(13,29,41,0.7) 1px solid"}},$ct=["src"],Kct=["src"],Qct=["src"],eut=["src"],tut=["fill"],aut=["fill"],rut=["src"],nut=["src"],iut=["fill"],out=["fill"],sut=["src"],lut=["src"],cut=["src"],uut=["src"],dut=["fill"],hut=["fill"];function put(e,o,s,B,U,m){const y=t.resolveComponent("GSCButton");return t.openBlock(),t.createElementBlock("div",Xct,[s.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(m.rowwPlayerClass),id:"container-row-player"},[t.createElementVNode("div",{class:t.normalizeClass(m.containerLeftClass),id:"container-left"},[t.createElementVNode("div",{class:t.normalizeClass(m.positionContainerClass)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.numberPosition)},t.toDisplayString(s.data.position),3)],2),t.createElementVNode("div",{class:t.normalizeClass(m.playerContainerClass)},[t.createElementVNode("img",{class:t.normalizeClass(m.imgPlayerIconClass),src:s.data.player_photo},null,10,$ct),t.createElementVNode("div",{class:t.normalizeClass(m.manchesterUnitedClass)},[B.elementSize.width<=420?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(s.data.player_short),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(s.data.player_name),1)],64))],2),B.elementSize.width<=420?(t.openBlock(),t.createElementBlock("img",{key:0,class:t.normalizeClass(e.$style.chivasIcon),alt:"",src:s.data.team_logo},null,10,Kct)):t.createCommentVNode("",!0)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(m.containerRightClass),id:"container-right"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.block01)},[B.elementSize.width>420?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.nameTeamGames)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.imgTeamIcon),alt:"",src:s.data.team_logo},null,10,Qct),B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.teamName)},t.toDisplayString(s.data.team_abrev),3)):t.createCommentVNode("",!0)],2)):t.createCommentVNode("",!0),B.elementSize.width>730?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.position)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.dfC)},t.toDisplayString(s.data.player_position),3)],2)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(e.$style.age)},t.toDisplayString(s.data.player_age),3)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(e.$style.country)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.manchesterUnitedIcon),alt:"",src:s.data.player_country_flag},null,10,eut)],2)):t.createCommentVNode("",!0),B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:4,class:t.normalizeClass(e.$style.playedGames)},t.toDisplayString(s.data.player_games),3)):t.createCommentVNode("",!0),B.elementSize.width>635?(t.openBlock(),t.createElementBlock("div",{key:5,class:t.normalizeClass(e.$style.playedMinutes)},t.toDisplayString(s.data.player_min),3)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(m.block02Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containesOptions)},[B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.leagueName)},t.toDisplayString(s.data.total),3)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(m.containerBtnVideosClass)},[s.canPlayVideos||s.game.awayTeam.team_id==s.teamWidget&&s.typeData!=1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[B.elementSize.width>635?(t.openBlock(),t.createBlock(y,{key:0,icon:s.iconVideos,"icon-size":s.iconSize,"icon-position":s.iconPosition,width:s.buttonWidth,height:s.buttonHeight,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"text-value":s.buttonTextValue,"font-size":s.buttonFontSize,onClick:o[0]||(o[0]=a=>m.emitEventMedia(s.data))},null,8,["icon","icon-size","icon-position","width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size"])):(t.openBlock(),t.createBlock(y,{key:1,mini:!0,icon:s.iconVideos,"icon-size":s.iconSizeMini,"icon-position":s.iconPosition,width:s.buttonWidthMini,height:s.buttonHeightMini,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"font-size":s.buttonFontSize,onClick:o[1]||(o[1]=a=>m.emitEventMedia(s.data))},null,8,["icon","icon-size","icon-position","width","height","border-radius","border-width","background-color","font-family","border-color","font-size"]))],64)):t.createCommentVNode("",!0),B.elementSize.width<=635?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(m.numberOfVideosClass)},t.toDisplayString(s.data.total),3)):t.createCommentVNode("",!0)],2)],2),(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass([e.$style.arrowExpandIcon,s.isExpanded?e.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:s.colorArrow,xmlns:"http://www.w3.org/2000/svg",onClick:o[2]||(o[2]=a=>m.clickExpand(s.data.id))},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 4.93631L10.2929 1.23496C10.6834 0.898244 11.3166 0.898244 11.7071 1.23496C12.0976 1.57167 12.0976 2.11759 11.7071 2.4543L6.70711 6.76532C6.31658 7.10203 5.68342 7.10203 5.29289 6.76532L0.292893 2.4543C-0.0976311 2.11759 -0.0976311 1.57167 0.292893 1.23496C0.683418 0.898244 1.31658 0.898244 1.70711 1.23496L6 4.93631Z",fill:s.colorArrow},null,8,aut)],10,tut))],2)],2)],2)):t.createCommentVNode("",!0),s.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(m.rowTeamClass),style:t.normalizeStyle(B.elementSize.width>540?"border-bottom: 1px solid rgba(255, 255, 255, 0.1)":""),id:"container-row-player"},[t.createElementVNode("div",{class:t.normalizeClass(m.containerLeftType1Class),id:"container-left"},[t.createElementVNode("div",{class:t.normalizeClass(m.positionContainertype1Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.numberPositionType1)},t.toDisplayString(s.data.position),3),t.createElementVNode("div",{class:t.normalizeClass(m.iconFavoritesType1Class)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.shapeIconType1),alt:"",src:s.data.team_logo},null,10,rut)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(m.playerContainerType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(s.typeView==0?e.$style.tijuanaWrapperType1:e.$style.tijuanaWrapperType1NoBg)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.tijuanaIconType1),alt:"",src:s.data.team_logo},null,10,nut)],2),t.createElementVNode("div",{class:t.normalizeClass(m.manchesterUnitedType1Class)},t.toDisplayString(s.data.team_abrev),3)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(m.containerRightType1Class),id:"container-right"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.block01TitlesType1)},[B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(m.teamNameWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.teamNameType1)},[t.createTextVNode(" C/"+t.toDisplayString(s.data.frequency)+" ",1),s.data.category!=2?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("min")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("segs")],64))],2)],2)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(m.ageWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(m.ageType1Class)},t.toDisplayString(s.data.promthistournament),3)],2)):t.createCommentVNode("",!0),B.elementSize.width>1086?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(m.playedGamesWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(m.playedGamesType1Class)},t.toDisplayString(s.data.promlasttournament),3)],2)):t.createCommentVNode("",!0),B.elementSize.width>770?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(m.playedMinutesWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(m.playedMinutesType1Class)},t.toDisplayString(s.data.team_games),3)],2)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(m.block02Type1Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containesOptionsType1Games)},[t.createElementVNode("div",{class:t.normalizeClass(m.leagueNameWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(m.leagueNameType1Class)},t.toDisplayString(s.data.total),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerBtnVideosType1Games)},[B.elementSize.width>679&&s.canPlayVideos?(t.openBlock(),t.createBlock(y,{key:0,icon:s.iconVideos,"icon-size":s.iconSize,"icon-position":s.iconPosition,width:s.buttonWidth,height:s.buttonHeight,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"text-value":s.buttonTextValue,"font-size":s.buttonFontSize,onClick:o[3]||(o[3]=a=>m.emitEventMedia(s.data))},null,8,["icon","icon-size","icon-position","width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size"])):(t.openBlock(),t.createBlock(y,{key:1,mini:!0,icon:s.iconVideos,"icon-size":s.iconSizeMini,"icon-position":s.iconPosition,width:s.buttonWidthMini,height:s.buttonHeightMini,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"font-size":s.buttonFontSize,onClick:o[4]||(o[4]=a=>m.emitEventMedia(s.data))},null,8,["icon","icon-size","icon-position","width","height","border-radius","border-width","background-color","font-family","border-color","font-size"])),t.createElementVNode("div",{class:t.normalizeClass(m.numberOfVideosType1Class)},t.toDisplayString(s.data.total),3)],2)],2),(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass([e.$style.arrowExpandIcon,s.isExpanded?e.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:s.colorArrow,xmlns:"http://www.w3.org/2000/svg",onClick:o[5]||(o[5]=a=>m.clickExpand(s.data.id))},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 4.93631L10.2929 1.23496C10.6834 0.898244 11.3166 0.898244 11.7071 1.23496C12.0976 1.57167 12.0976 2.11759 11.7071 2.4543L6.70711 6.76532C6.31658 7.10203 5.68342 7.10203 5.29289 6.76532L0.292893 2.4543C-0.0976311 2.11759 -0.0976311 1.57167 0.292893 1.23496C0.683418 0.898244 1.31658 0.898244 1.70711 1.23496L6 4.93631Z",fill:s.colorArrow},null,8,out)],10,iut))],2)],2)],6)):t.createCommentVNode("",!0),s.type==2?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(m.rowwPlayerClass),id:"container-row-player"},[t.createElementVNode("div",{class:t.normalizeClass(m.containerLeftClass),id:"container-left"},[t.createElementVNode("div",{class:t.normalizeClass(m.positionContainerClass)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.numberPosition)},t.toDisplayString(s.data.position),3)],2),t.createElementVNode("div",{class:t.normalizeClass(m.playerContainerClass)},[t.createElementVNode("img",{class:t.normalizeClass(m.imgPlayerIconClass),src:s.data.player_photo},null,10,sut),t.createElementVNode("div",{class:t.normalizeClass(m.manchesterUnitedClass)},t.toDisplayString(s.data.player_name),3),B.elementSize.width<=420?(t.openBlock(),t.createElementBlock("img",{key:0,class:t.normalizeClass(e.$style.chivasIcon),alt:"",src:s.data.team_logo},null,10,lut)):t.createCommentVNode("",!0)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(m.containerRightClass),id:"container-right"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.block01)},[B.elementSize.width>420?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.nameTeamGames)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.imgTeamIcon),alt:"",src:s.data.team_logo},null,10,cut),B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.teamName)},t.toDisplayString(s.data.team_abrev),3)):t.createCommentVNode("",!0)],2)):t.createCommentVNode("",!0),B.elementSize.width>730?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.position)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.dfC)},t.toDisplayString(s.data.player_position),3)],2)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(e.$style.age)},t.toDisplayString(s.data.player_age),3)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(e.$style.country)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.manchesterUnitedIcon),alt:"",src:s.data.player_country_flag},null,10,uut)],2)):t.createCommentVNode("",!0),B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:4,class:t.normalizeClass(e.$style.playedGames)},t.toDisplayString(s.data.player_games),3)):t.createCommentVNode("",!0),B.elementSize.width>635?(t.openBlock(),t.createElementBlock("div",{key:5,class:t.normalizeClass(e.$style.playedMinutes)},t.toDisplayString(s.data.player_min),3)):t.createCommentVNode("",!0),B.elementSize.width>635?(t.openBlock(),t.createElementBlock("div",{key:6,class:t.normalizeClass(e.$style.playedMinutes)},t.toDisplayString(s.data.league_name),3)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(m.block02Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containesOptions)},[t.createElementVNode("div",{class:t.normalizeClass(m.containerBtnVideosClass)},[s.canPlayVideos?(t.openBlock(),t.createBlock(y,{key:0,icon:s.iconVideos,"icon-size":s.iconSize,"icon-position":s.iconPosition,width:B.elementSize.width<=680?"83px":s.buttonWidth,height:s.buttonHeight,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"text-value":s.buttonTextValue,"font-size":s.buttonFontSize,onClick:o[6]||(o[6]=a=>m.emitEventMedia(s.data)),style:t.normalizeStyle(B.elementSize.width<=680?B.elementSize.width<=420?"margin-right: 35px;":"margin-right: 0px;":"")},null,8,["icon","icon-size","icon-position","width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size","style"])):t.createCommentVNode("",!0)],2)],2),(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass([e.$style.arrowExpandIcon,s.isExpanded?e.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:s.colorArrow,xmlns:"http://www.w3.org/2000/svg",onClick:o[7]||(o[7]=a=>m.clickExpand(s.data.id))},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 4.93631L10.2929 1.23496C10.6834 0.898244 11.3166 0.898244 11.7071 1.23496C12.0976 1.57167 12.0976 2.11759 11.7071 2.4543L6.70711 6.76532C6.31658 7.10203 5.68342 7.10203 5.29289 6.76532L0.292893 2.4543C-0.0976311 2.11759 -0.0976311 1.57167 0.292893 1.23496C0.683418 0.898244 1.31658 0.898244 1.70711 1.23496L6 4.93631Z",fill:s.colorArrow},null,8,hut)],10,dut))],2)],2)],2)):t.createCommentVNode("",!0)],512)}const iV=Ki(RS,[["render",put],["__cssModules",{$style:Yct}]]),fut=(e,o)=>{const s=e.__vccOpts||e;for(const[B,U]of o)s[B]=U;return s},VS={props:{type:{type:Number,default:0},value:{type:Boolean,default:!1},textValue:String,icon:String,iconPosition:{type:String,default:"left"},iconSize:String,fontColor:{type:String,default:"#FFFFFF"},textDecoration:String,fontSize:{type:String,default:"16px"},fontSizeStat:{type:String,default:"16px"},fontStyle:String,fontFamily:{type:String,default:"Poppins-Regular"},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},borderRadius:{type:String,default:"0px"},borderType:{type:String,default:"solid"},borderWidth:{type:Number,default:0},borderWidthBtn:{type:String,default:"2px"},borderColor:String,backgroundColor:{type:String,default:"none"},activeBackgroundColor:{type:String,default:"#000000"},activeBorderWidth:{type:Number,default:2},activeBorderType:{type:String,default:"solid"},activeBorderColor:{type:String,default:"#cbee6b"},activeColorText:{type:String,default:"#FFFFFF"},cursorType:{type:String,default:"default"},typeOnOff:{type:Boolean,default:!1},textCategory:String,textStat:String,marginLeftStat:{type:String,default:"15%"}},watch:{value:{deep:!0,immediate:!0,handler(e){this.status=e}}},data(){return{status:!1}},computed:{customStyle(){return{height:this.height,width:this.width,backgroundColor:this.backgroundColor,borderRadius:this.borderRadius,border:`${this.borderType} ${this.borderWidth}px ${this.borderColor}`,color:this.fontColor,textDecoration:this.textDecoration,cursor:this.cursorType,fontSize:this.fontSize,fontStyle:this.fontStyle,fontFamily:`${this.fontFamily} !important`}},customActive(){return{backgroundColor:this.activeBackgroundColor,color:this.activeColorText,border:`${this.activeBorderType} ${this.activeBorderWidth}px ${this.activeBorderColor}`}}},methods:{btnClick(e){this.$emit("click",e),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},oV=()=>{t.useCssVars(e=>({"9d01acb4":e.height,"14e95081":e.borderWidthBtn,"38fec285":e.borderType,34353510:e.borderColor,"20d20dc6":e.borderRadius,17130967:e.width,"4ccb7d36":e.backgroundColor,"5d1e86a2":e.cursorType,ce65d4a2:e.fontSize,fe4ac47a:e.fontStyle,f98e44dc:e.fontFamily,"93b87770":e.marginLeftStat,c7f7beba:e.fontSizeStat}))},sV=VS.setup;VS.setup=sV?(e,o)=>(oV(),sV(e,o)):oV;const mut=e=>(t.pushScopeId("data-v-f3ee6b2b"),e=e(),t.popScopeId(),e),gut=["src"],yut={key:1,class:"text"},vut=["src"],but={class:"stats"},_ut=mut(()=>t.createElementVNode("img",{class:"iconstats",src:"https://golstatsimages.blob.core.windows.net/todoelfut/playdes.png"},null,-1)),xut={class:"numstats"},wut={class:"leyend"};function kut(e,o,s,B,U,m){return t.openBlock(),t.createElementBlock("div",null,[s.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["button",U.status&&s.typeOnOff&&"button-active"]),style:t.normalizeStyle([m.customStyle,U.status&&s.typeOnOff&&m.customActive]),onClick:o[0]||(o[0]=(...y)=>m.btnClick&&m.btnClick(...y))},[s.icon&&s.iconPosition.toLowerCase()==="left"?(t.openBlock(),t.createElementBlock("img",{key:0,class:"icon",style:t.normalizeStyle({width:s.iconSize}),src:s.icon},null,12,gut)):t.createCommentVNode("",!0),s.textValue?(t.openBlock(),t.createElementBlock("div",yut,t.toDisplayString(s.textValue),1)):t.createCommentVNode("",!0),s.icon&&s.iconPosition.toLowerCase()==="right"?(t.openBlock(),t.createElementBlock("img",{key:2,class:"icon",style:t.normalizeStyle({width:s.iconSize}),src:s.icon},null,12,vut)):t.createCommentVNode("",!0)],6)):t.createCommentVNode("",!0),s.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:"button-target",onClick:o[1]||(o[1]=(...y)=>m.btnClick&&m.btnClick(...y))},[t.createElementVNode("div",but,[_ut,t.createElementVNode("div",xut,t.toDisplayString(s.textStat),1)]),t.createElementVNode("div",wut,t.toDisplayString(s.textCategory),1)])):t.createCommentVNode("",!0)])}const Sut=fut(VS,[["render",kut],["__scopeId","data-v-f3ee6b2b"]]),Cut=(e,o)=>{const s=e.__vccOpts||e;for(const[B,U]of o)s[B]=U;return s},jS={components:{GSCButton:Sut},props:{hiddenButtonAll:{type:Boolean,default:!1},teamId:{type:Number,default:0},height:{type:String,default:"71px"},backgroundColor:{type:String,default:"#0d1d29"},containBorderType:{type:String,default:"solid"},containBorderWidth:{type:Number,default:0},containBorderColor:{type:String,default:""},componentontainBorderRadius:{type:String,default:"0px"},teamBorderType:{type:String,default:"solid"},teamBorderWidth:{type:Number,default:1},teamBorderColor:{type:String,default:"#566068"},teamBorderRadius:{type:String,default:"43px"},teamHeight:{type:String,default:"43px"},teamWidth:{type:String,default:"43px"},data:{type:Array,default:()=>[]}},data(){return{teamselect:this.teamId,scrollBar:!1}},watch:{teamId:{handler:function(e){this.teamselect=e},immediate:!0}},computed:{centerTextCustom(){return this.hiddenButtonAll&&!this.scrollBar?"center":"left"},marginCustom(){return this.hiddenButtonAll?"0px":"12px"},customStyleContain(){return{height:this.height,backgroundColor:this.backgroundColor,borderRadius:this.containBorderRadius,border:`${this.containBorderType} ${this.containBorderWidth}px ${this.containBorderColor}`}},customStyleTeam(){return{height:this.teamHeight,width:this.teamWidth,backgroundColor:this.backgroundColor,borderRadius:this.borderRadius,border:`${this.teamBorderType} ${this.teamBorderWidth}px ${this.teamBorderColor}`}}},methods:{checkIfElementHasScroll(){const e=this.$refs.container.querySelector("#panelteams");e.scrollWidth>e.clientWidth?this.scrollBar=!0:this.scrollBar=!1},btnTeamClick(e){this.$emit("clickTeam",e),this.teamselect=e},click(){this.$emit("clickAll",0),this.teamselect=0}},mounted(){this.checkIfElementHasScroll(),window.addEventListener("resize",this.checkIfElementHasScroll)},beforeUnmount(){window.removeEventListener("resize",this.checkIfElementHasScroll)}},lV=()=>{t.useCssVars(e=>({dd2e645c:e.centerTextCustom,"57c1e244":e.marginCustom}))},cV=jS.setup;jS.setup=cV?(e,o)=>(lV(),cV(e,o)):lV;const Tut={id:"panelteams",class:"gsc-filterperteam__panel-teams",ref:"panel"},Aut={class:"gsc-filterperteam__panel-teams__cont-teams"},Eut=["onClick"],Mut=["src","alt","title"];function Iut(e,o,s,B,U,m){const y=t.resolveComponent("GSCButton");return t.openBlock(),t.createElementBlock("div",{class:"gsc-filterperteam",ref:"container",style:t.normalizeStyle(m.customStyleContain)},[t.createElementVNode("div",Tut,[t.createElementVNode("div",Aut,[s.hiddenButtonAll?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,style:t.normalizeStyle(m.customStyleTeam),class:t.normalizeClass(["gsc-filterperteam__panel-teams__cont-teams__button-all",this.teamselect!==0?"--disabled":""])},[t.createVNode(y,{"text-value":"Todos",width:"76px",height:"28px","font-family":"Poppins-Light","font-size":"13px","border-color":"#cbee6b","border-type":"solid","border-width":"1","background-color":"#2A3641","border-radius":"64px",onClick:m.click},null,8,["onClick"])],6)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.data,(a,v)=>(t.openBlock(),t.createElementBlock("div",{key:v,style:t.normalizeStyle(m.customStyleTeam),class:t.normalizeClass([a.id==U.teamselect?"colorselect":"","gsc-filterperteam__panel-teams__cont-teams__btn-team hover-team"]),onClick:p=>m.btnTeamClick(a.id)},[t.createElementVNode("img",{src:a.logo,alt:a.name,title:a.name},null,8,Mut)],14,Eut))),128))])],512)],4)}const Put=Cut(jS,[["render",Iut],["__scopeId","data-v-b39cba3b"]]),Lut={tablePositionGames:"_tablePositionGames_16xzc_46",tablePositionWrapperGames:"_tablePositionWrapperGames_16xzc_62",imgHenrryIcon:"_imgHenrryIcon_16xzc_71",americaIcon:"_americaIcon_16xzc_79",playerPhotoGames:"_playerPhotoGames_16xzc_91",toniKroosGames:"_toniKroosGames_16xzc_100",shapeIcon:"_shapeIcon_16xzc_111",menuiconsTeams:"_menuiconsTeams_16xzc_117",component31:"_component31_16xzc_126",playerNameGames:"_playerNameGames_16xzc_137",icnPlayIcon:"_icnPlayIcon_16xzc_145",goles:"_goles_16xzc_153",americaIcon1:"_americaIcon1_16xzc_160",teamsAmerica:"_teamsAmerica_16xzc_174",containerData:"_containerData_16xzc_180",shapeIcon1:"_shapeIcon1_16xzc_188",icnExpand1:"_icnExpand1_16xzc_194",icnExpand:"_icnExpand_16xzc_194",playerDataGames:"_playerDataGames_16xzc_214",playerInfoGames:"_playerInfoGames_16xzc_225",headerTopGame:"_headerTopGame_16xzc_240",playerRow:"_playerRow_16xzc_254",groupsLeague:"_groupsLeague_16xzc_265",text:"_text_16xzc_274",btnViewFullList:"_btnViewFullList_16xzc_282",headerTopsGames:"_headerTopsGames_16xzc_299",btnVideosOptions:"_btnVideosOptions_16xzc_371",position:"_position_16xzc_548",positionWrapper:"_positionWrapper_16xzc_560",imgNecaxaIcon:"_imgNecaxaIcon_16xzc_568",teamLogo:"_teamLogo_16xzc_574",teamPhoto:"_teamPhoto_16xzc_582",name:"_name_16xzc_590",icnPlayIconType1:"_icnPlayIconType1_16xzc_598",verVideosType1:"_verVideosType1_16xzc_605",btnVideosOptionsType1:"_btnVideosOptionsType1_16xzc_611",btnVideosOptions1Games:"_btnVideosOptions1Games_16xzc_623",leftContainer:"_leftContainer_16xzc_635",shapeIconType1:"_shapeIconType1_16xzc_644",icnExpandType1:"_icnExpandType1_16xzc_649",arrowExpand:"_arrowExpand_16xzc_659",containerInfoGames:"_containerInfoGames_16xzc_667",headerTopTeam:"_headerTopTeam_16xzc_679",containerHeader:"_containerHeader_16xzc_693",goles1:"_goles1_16xzc_702",golesType1:"_golesType1_16xzc_705",golesWrapper:"_golesWrapper_16xzc_710",btnViewAll:"_btnViewAll_16xzc_719",headerTopsTeams:"_headerTopsTeams_16xzc_736",arrowExpandIcon:"_arrowExpandIcon_16xzc_853",rotate:"_rotate_16xzc_858"},US={components:{GSCButton:aV},props:{typeData:{type:Number,default:1},teamWidget:{type:Number,default:0},game:{type:Object,default:()=>{}},type:{type:Number,default:0},isExpanded:{type:Boolean,default:!1},canPlayVideos:{type:Boolean,default:!1},categoryName:{type:String,default:""},categoryId:{type:String,default:""},data:{type:Object,default:()=>{}},backgroundColor:{type:String,default:"#0d1d29"},backgroundColorHeader:{type:String,default:"#183143"},fontColorName:{type:String,default:"#F4F4F4"},fontSizeName:{type:String,default:"14px"},fontFamilyName:{type:String,default:"Poppins-Regular"},fontColorTopNum:{type:String,default:"#FFFFFF"},fontSizeTopNum:{type:String,default:"96px"},fontFamilyTopNum:{type:String,default:"Oswald-Bold"},fontColorCategory:{type:String,default:"#FFFFFF"},fontSizeCategory:{type:String,default:"12px"},fontFamilyCategory:{type:String,default:"Poppins-Regular"},opacityColorTopNum:{type:Number,default:.09},borderColorCategory:{type:String,default:"#cbee6b"},iconVideos:{type:String,default:"https://golstatsimages.blob.core.windows.net/images-library/arrow-btn.png"},iconSize:{type:String,default:"18px"},iconPosition:{type:String,default:"left"},colorArrow:{type:String,default:"#D9D9D9"},buttonWidth:{type:String,default:"fit-content"},buttonMaxWidth:{type:String,default:"180px"},buttonHeight:{type:String,default:"24px"},buttonRadius:{type:String,default:"30px"},buttonBorderWidth:{type:Number,default:1},buttonBackground:{type:String,default:"#ffffff1a"},buttonfontFamily:{type:String,default:"Poppins-Regular"},buttonBorderColor:{type:String,default:"#cbee6b"},buttonFontSize:{type:String,default:"12px"}},data:()=>({expand:!1}),methods:{viewProfile(e){this.$emit("play",e)},clickMore(e){this.$emit("more",e)},clickExpand(e){this.$emit("expand",{expand:!this.isExpanded,id:e})},clickFav(e){this.$emit("fav",e)},clickEventMedia(e){this.$emit("mediadata",e)}}},uV=()=>{t.useCssVars(e=>({"55f05f36":e.fontSizeTopNum,"19a29b59":e.fontFamilyTopNum,"6900d460":e.fontColorTopNum,c8fa9844:e.opacityColorTopNum,d4b5f3ac:e.fontColorName,"02add9f3":e.fontFamilyName,"5f361de0":e.fontSizeName,"53c60bed":e.backgroundColorHeader,"78ef2866":e.fontFamilyCategory,"4e492dfa":e.fontSizeCategory,"2777611d":e.fontColorCategory,"337e29a0":e.borderColorCategory}))},dV=US.setup;US.setup=dV?(e,o)=>(uV(),dV(e,o)):uV;const But=["src"],zut=["src"],Out=["src"],Dut=["src"],Nut=["fill"],Fut=["fill"],Rut=["src"],Vut=["fill"],jut=["fill"];function Uut(e,o,s,B,U,m){const y=t.resolveComponent("GSCButton");return t.openBlock(),t.createElementBlock("div",null,[s.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.headerTopsGames)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.playerRow),id:"player-row"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.headerTopGame)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.playerPhotoGames),id:"container-player-photp"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.tablePositionWrapperGames)},[t.createElementVNode("b",{class:t.normalizeClass(e.$style.tablePositionGames)},t.toDisplayString(s.data.top),3)],2),t.createElementVNode("img",{class:t.normalizeClass(e.$style.imgHenrryIcon),alt:"",src:s.data.photo},null,10,But),t.createElementVNode("img",{class:t.normalizeClass(e.$style.americaIcon),alt:"",src:s.data.logo},null,10,zut)],2),t.createElementVNode("main",{class:t.normalizeClass(e.$style.playerInfoGames),id:"container-player-info"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.playerNameGames)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.toniKroosGames)},t.toDisplayString(s.data.name),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.playerDataGames)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerData)},[s.canPlayVideos||s.game.awayTeam.team_id==s.teamWidget&&s.typeData!=1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createVNode(y,{"icon-size":s.iconSize,"icon-position":s.iconPosition,width:s.buttonWidth,"button-max-width":s.buttonMaxWidth,height:s.buttonHeight,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"text-value":s.data.total+" "+s.categoryName.toLowerCase(),"font-size":s.buttonFontSize,onClick:o[0]||(o[0]=a=>m.clickEventMedia(s.data))},null,8,["icon-size","icon-position","width","button-max-width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size"]),t.createElementVNode("div",{class:t.normalizeClass(e.$style.teamsAmerica)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.americaIcon1),alt:"",src:s.data.logo},null,10,Out)],2)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createVNode(y,{icon:"","icon-size":s.iconSize,"icon-position":s.iconPosition,width:s.buttonWidth,"button-max-width":s.buttonMaxWidth,height:s.buttonHeight,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"text-value":s.data.total+" "+s.categoryName.toLowerCase(),"font-size":s.buttonFontSize},null,8,["icon-size","icon-position","width","button-max-width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size"]),t.createElementVNode("div",{class:t.normalizeClass(e.$style.teamsAmerica)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.americaIcon1),alt:"",src:s.data.logo},null,10,Dut)],2)],64))],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.icnExpand),onClick:o[1]||(o[1]=a=>m.clickExpand(s.data.player_id))},[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass([e.$style.arrowExpandIcon,s.isExpanded?e.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:s.colorArrow,xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 4.93631L10.2929 1.23496C10.6834 0.898244 11.3166 0.898244 11.7071 1.23496C12.0976 1.57167 12.0976 2.11759 11.7071 2.4543L6.70711 6.76532C6.31658 7.10203 5.68342 7.10203 5.29289 6.76532L0.292893 2.4543C-0.0976311 2.11759 -0.0976311 1.57167 0.292893 1.23496C0.683418 0.898244 1.31658 0.898244 1.70711 1.23496L6 4.93631Z",fill:s.colorArrow},null,8,Fut)],10,Nut))],2)],2)],2)],2)],2)],2)):t.createCommentVNode("",!0),s.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.headerTopsTeams)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerHeader),id:"header-container"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.headerTopTeam)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.teamPhoto),id:"container-team"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.positionWrapper)},[t.createElementVNode("b",{class:t.normalizeClass(e.$style.position)},t.toDisplayString(s.data.top),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.teamLogo)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.imgNecaxaIcon),alt:"",src:s.data.logo},null,10,Rut)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerInfoGames)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.leftContainer)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.name)},t.toDisplayString(s.data.name_team),3),t.createVNode(y,{"icon-size":s.iconSize,"icon-position":s.iconPosition,width:s.buttonWidth,"button-max-width":s.buttonMaxWidth,height:s.buttonHeight,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"text-value":s.data.total+" "+s.categoryName.toLowerCase(),"font-size":s.buttonFontSize,onClick:o[2]||(o[2]=a=>m.clickEventMedia(s.data))},null,8,["icon-size","icon-position","width","button-max-width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size"]),t.createElementVNode("div",{class:t.normalizeClass(e.$style.btnVideosOptions1Games)},[t.createVNode(y,{"icon-size":s.iconSize,"icon-position":s.iconPosition,width:s.buttonWidth,"button-max-width":s.buttonMaxWidth,height:s.buttonHeight,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"text-value":s.data.total+" "+s.categoryName.toLowerCase(),"font-size":s.buttonFontSize,onClick:o[3]||(o[3]=a=>m.clickEventMedia(s.data))},null,8,["icon-size","icon-position","width","button-max-width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size"]),t.createElementVNode("div",{class:t.normalizeClass(e.$style.verVideosType1)},t.toDisplayString(s.data.total),3)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.arrowExpand),onClick:o[4]||(o[4]=a=>m.clickExpand(s.data.player_id))},[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass([e.$style.arrowExpandIcon,s.isExpanded?e.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:s.colorArrow,xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 4.93631L10.2929 1.23496C10.6834 0.898244 11.3166 0.898244 11.7071 1.23496C12.0976 1.57167 12.0976 2.11759 11.7071 2.4543L6.70711 6.76532C6.31658 7.10203 5.68342 7.10203 5.29289 6.76532L0.292893 2.4543C-0.0976311 2.11759 -0.0976311 1.57167 0.292893 1.23496C0.683418 0.898244 1.31658 0.898244 1.70711 1.23496L6 4.93631Z",fill:s.colorArrow},null,8,jut)],10,Vut))],2)],2)],2)],2)],2)):t.createCommentVNode("",!0)])}const Gut=Ki(US,[["render",Uut],["__cssModules",{$style:Lut}]]),Hut=(e,o)=>{const s=e.__vccOpts||e;for(const[B,U]of o)s[B]=U;return s},GS={props:{type:{type:Number,default:0},value:{type:Boolean,default:!1},textValue:String,icon:String,iconPosition:{type:String,default:"left"},iconSize:String,fontColor:{type:String,default:"#FFFFFF"},textDecoration:String,fontSize:{type:String,default:"16px"},fontSizeStat:{type:String,default:"16px"},fontStyle:String,fontFamily:{type:String,default:"Poppins-Regular"},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},borderRadius:{type:String,default:"0px"},borderType:{type:String,default:"solid"},borderWidth:{type:Number,default:0},borderWidthBtn:{type:String,default:"2px"},borderColor:String,backgroundColor:{type:String,default:"none"},activeBackgroundColor:{type:String,default:"#000000"},activeBorderWidth:{type:Number,default:2},activeBorderType:{type:String,default:"solid"},activeBorderColor:{type:String,default:"#cbee6b"},activeColorText:{type:String,default:"#FFFFFF"},cursorType:{type:String,default:"default"},typeOnOff:{type:Boolean,default:!1},textCategory:String,textStat:String,marginLeftStat:{type:String,default:"15%"}},watch:{value:{deep:!0,immediate:!0,handler(e){this.status=e}}},data(){return{status:!1}},computed:{customStyle(){return{height:this.height,width:this.width,backgroundColor:this.backgroundColor,borderRadius:this.borderRadius,border:`${this.borderType} ${this.borderWidth}px ${this.borderColor}`,color:this.fontColor,textDecoration:this.textDecoration,cursor:this.cursorType,fontSize:this.fontSize,fontStyle:this.fontStyle,fontFamily:`${this.fontFamily} !important`}},customActive(){return{backgroundColor:this.activeBackgroundColor,color:this.activeColorText,border:`${this.activeBorderType} ${this.activeBorderWidth}px ${this.activeBorderColor}`}}},methods:{btnClick(e){this.$emit("click",e),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},hV=()=>{t.useCssVars(e=>({"9d01acb4":e.height,"14e95081":e.borderWidthBtn,"38fec285":e.borderType,34353510:e.borderColor,"20d20dc6":e.borderRadius,17130967:e.width,"4ccb7d36":e.backgroundColor,"5d1e86a2":e.cursorType,ce65d4a2:e.fontSize,fe4ac47a:e.fontStyle,f98e44dc:e.fontFamily,"93b87770":e.marginLeftStat,c7f7beba:e.fontSizeStat}))},pV=GS.setup;GS.setup=pV?(e,o)=>(hV(),pV(e,o)):hV;const Zut=e=>(t.pushScopeId("data-v-f3ee6b2b"),e=e(),t.popScopeId(),e),Wut=["src"],qut={key:1,class:"text"},Jut=["src"],Yut={class:"stats"},Xut=Zut(()=>t.createElementVNode("img",{class:"iconstats",src:"https://golstatsimages.blob.core.windows.net/todoelfut/playdes.png"},null,-1)),$ut={class:"numstats"},Kut={class:"leyend"};function Qut(e,o,s,B,U,m){return t.openBlock(),t.createElementBlock("div",null,[s.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["button",U.status&&s.typeOnOff&&"button-active"]),style:t.normalizeStyle([m.customStyle,U.status&&s.typeOnOff&&m.customActive]),onClick:o[0]||(o[0]=(...y)=>m.btnClick&&m.btnClick(...y))},[s.icon&&s.iconPosition.toLowerCase()==="left"?(t.openBlock(),t.createElementBlock("img",{key:0,class:"icon",style:t.normalizeStyle({width:s.iconSize}),src:s.icon},null,12,Wut)):t.createCommentVNode("",!0),s.textValue?(t.openBlock(),t.createElementBlock("div",qut,t.toDisplayString(s.textValue),1)):t.createCommentVNode("",!0),s.icon&&s.iconPosition.toLowerCase()==="right"?(t.openBlock(),t.createElementBlock("img",{key:2,class:"icon",style:t.normalizeStyle({width:s.iconSize}),src:s.icon},null,12,Jut)):t.createCommentVNode("",!0)],6)):t.createCommentVNode("",!0),s.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:"button-target",onClick:o[1]||(o[1]=(...y)=>m.btnClick&&m.btnClick(...y))},[t.createElementVNode("div",Yut,[Xut,t.createElementVNode("div",$ut,t.toDisplayString(s.textStat),1)]),t.createElementVNode("div",Kut,t.toDisplayString(s.textCategory),1)])):t.createCommentVNode("",!0)])}const edt=Hut(GS,[["render",Qut],["__scopeId","data-v-f3ee6b2b"]]),sQt="",lQt="",tdt={equipoGames:"_equipoGames_19uzf_38",atlasSeleccinGames:"_atlasSeleccinGames_19uzf_43",equipoAtlasSeleccinMexiGames:"_equipoAtlasSeleccinMexiGames_19uzf_47",aosGames:"_aosGames_19uzf_51",span12:"_span12_19uzf_55",nacionalidadMex:"_nacionalidadMex_19uzf_58",manchesterUnited:"_manchesterUnited_19uzf_61",manchesterUnited12:"_manchesterUnited12_19uzf_68",containerInfoGames:"_containerInfoGames_19uzf_78",verPerfil12:"_verPerfil12_19uzf_87",btnProfile:"_btnProfile_19uzf_96",containerButton:"_containerButton_19uzf_112",dataContainer:"_dataContainer_19uzf_119",expandedInfoPlayerGames:"_expandedInfoPlayerGames_19uzf_129",containerDataBg:"_containerDataBg_19uzf_219",containerDataSm:"_containerDataSm_19uzf_230",span:"_span_19uzf_55",manchesterUnited14:"_manchesterUnited14_19uzf_241",filter:"_filter_19uzf_246",verPerfil:"_verPerfil_19uzf_87",manchesterUnited8:"_manchesterUnited8_19uzf_267",manchesterUnitedParent1:"_manchesterUnitedParent1_19uzf_273",manchesterUnited1:"_manchesterUnited1_19uzf_68",manchesterUnitedParent:"_manchesterUnitedParent_19uzf_273",frameDiv:"_frameDiv_19uzf_295",infoExpanded:"_infoExpanded_19uzf_303",countryFlag:"_countryFlag_19uzf_456"},HS={components:{GSCButton:edt},props:{isLive:{type:Boolean,default:!1},background:{type:String,default:"#172531"},type:{type:Number,default:1},viewButton:{type:Boolean,default:!0},viewTeam:{type:Boolean,default:!0},viewAge:{type:Boolean,default:!0},viewNationality:{type:Boolean,default:!0},viewPosition:{type:Boolean,default:!0},viewGames:{type:Boolean,default:!0},viewMin:{type:Boolean,default:!0},viewGoals:{type:Boolean,default:!0},viewEffectiveness:{type:Boolean,default:!0},height:{type:String,default:"134px"},fontColor:{type:String,default:"#ffffffb3"},fontColorValue:{type:String,default:"#ffffff"},fontFamily:{type:String,default:"Poppins-Regular"},fontSize:{type:String,default:"10px"},additionalClass:{type:String,default:""},data:{type:Object,default:()=>{}}},setup(){const e=t.ref("myDivRef"),{elementSize:o}=jb(e);return{myDivRef:e,elementSize:o}},data(){return{}},computed:{},methods:{viewProfile(e){this.$emit("viewprofile",e)}}},fV=()=>{t.useCssVars(e=>({b76aa8fe:e.fontFamily,dce830b4:e.fontColor,"060add2a":e.fontColorValue,"3e87935e":e.fontSize,c43b37c8:e.background}))},mV=HS.setup;HS.setup=mV?(e,o)=>(fV(),mV(e,o)):fV;const adt={ref:"myDivRef"},rdt=["src"];function ndt(e,o,s,B,U,m){const y=t.resolveComponent("GSCButton");return t.openBlock(),t.createElementBlock("div",adt,[s.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.expandedInfoPlayerGames)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.dataContainer),id:"data-container"},[t.createElementVNode("div",{class:t.normalizeClass([e.$style.containerInfoGames,s.additionalClass]),id:"container-info"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited)},[s.viewTeam?(t.openBlock(),t.createElementBlock("p",{key:0,class:t.normalizeClass(e.$style.equipoAtlasSeleccinMexiGames)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.equipoGames)},"Equipo: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.atlasSeleccinGames)},t.toDisplayString(s.data.teams),3)],2)):t.createCommentVNode("",!0),s.viewAge?(t.openBlock(),t.createElementBlock("p",{key:1,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.equipoGames)},"Edad: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(s.data.age)+" años",3),t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)}," ("+t.toDisplayString(s.data.dataofbirth)+")",3)],2)):t.createCommentVNode("",!0),s.viewNationality?(t.openBlock(),t.createElementBlock("p",{key:2,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)},"Nacionalidad: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},[t.createTextVNode(t.toDisplayString(s.data.nationality.substring(0,3).toUpperCase())+" ",1),t.createElementVNode("div",{class:t.normalizeClass(e.$style.countryFlag)},[t.createElementVNode("img",{src:s.data.countryFlag},null,8,rdt)],2)],2)],2)):t.createCommentVNode("",!0),s.viewPosition?(t.openBlock(),t.createElementBlock("p",{key:3,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)},"Posición: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(s.data.position),3)],2)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited12)},[s.viewGames&&!s.isLive?(t.openBlock(),t.createElementBlock("p",{key:0,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)},"partidos Jugados: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(s.data.games),3)],2)):t.createCommentVNode("",!0),s.viewMin&&!s.isLive?(t.openBlock(),t.createElementBlock("p",{key:1,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)},"Minutos Jugados: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(s.data.min),3)],2)):t.createCommentVNode("",!0),s.viewGoals?(t.openBlock(),t.createElementBlock("p",{key:2,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)},t.toDisplayString(s.data.category)+": ",3),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(s.data.goals),3)],2)):t.createCommentVNode("",!0),s.viewEffectiveness?(t.openBlock(),t.createElementBlock("p",{key:3,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)},"Efectividad de pases: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(s.data.effectiveness.toFixed(0))+"%",3)],2)):t.createCommentVNode("",!0)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerButton),id:"btn-container"},[s.viewButton?(t.openBlock(),t.createBlock(y,{key:0,style:t.normalizeStyle(s.additionalClass!=""&&B.elementSize.width>540?"margin-right: 50px":""),width:"88px",height:"30px","border-radius":"30px","border-width":1,"background-color":"#ffffff1a","font-family":"Poppins-Semibold","border-color":"#cbee6b","text-value":"Ver perfil","font-size":"10px",onClick:o[0]||(o[0]=a=>m.viewProfile(s.data.id))},null,8,["style"])):t.createCommentVNode("",!0)],2)],2)],2)):t.createCommentVNode("",!0),s.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.infoExpanded)},[t.createElementVNode("div",{class:t.normalizeClass([e.$style.containerDataBg,s.additionalClass])},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnitedParent)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[o[2]||(o[2]=t.createElementVNode("span",null,"Posición en la tabla: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.position),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[o[3]||(o[3]=t.createElementVNode("span",null,"Goles anotados: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.goals),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[o[4]||(o[4]=t.createElementVNode("span",null,"Goles recibidos: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.goals_received),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[o[5]||(o[5]=t.createElementVNode("span",null,"Partidos jugados:",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.games_played),3)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnitedParent)},[s.viewEffectiveness?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.manchesterUnited1)},[o[6]||(o[6]=t.createElementVNode("span",null,"Efectividad de pases: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.effectiveness.toFixed(0))+"%",3)],2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[o[7]||(o[7]=t.createElementVNode("span",null,"xG: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.xg),3)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnitedParent)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[t.createElementVNode("span",null,t.toDisplayString(s.data.category)+": ",1),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.total),3)],2),s.viewEffectiveness?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.manchesterUnited8)},[o[8]||(o[8]=t.createElementVNode("span",null,"Efectividad de pases: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.effectiveness)+"%",3)],2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited8)},[o[9]||(o[9]=t.createElementVNode("span",null,"xG: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.xg),3)],2)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerDataSm)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.frameDiv)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[o[10]||(o[10]=t.createElementVNode("span",null,"Posición en la tabla: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.position),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[o[11]||(o[11]=t.createElementVNode("span",null,"Goles anotados: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.goals),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[o[12]||(o[12]=t.createElementVNode("span",null,"Goles recibidos: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.goals_received),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[o[13]||(o[13]=t.createElementVNode("span",null,"Partidos jugados: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.games_played),3)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnitedParent1)},[s.viewEffectiveness?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.manchesterUnited14)},[o[14]||(o[14]=t.createElementVNode("span",null,"Efectividad de pases: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.effectiveness.toFixed(0))+"%",3)],2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[o[15]||(o[15]=t.createElementVNode("span",null,"xG: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.xg),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[t.createElementVNode("span",null,t.toDisplayString(s.data.category)+": ",1),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.total),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited8)},[t.createElementVNode("span",null,t.toDisplayString(s.data.category)+": ",1),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.total),3)],2)],2)],2),s.viewButton?(t.openBlock(),t.createBlock(y,{key:0,style:t.normalizeStyle(s.additionalClass!=""&&B.elementSize.width>540?"margin-right: 42px":""),width:"88px",height:"30px","border-radius":"30px","border-width":1,"background-color":"#ffffff1a","font-family":"Poppins-Semibold","border-color":"#cbee6b","text-value":"Ver perfil","font-size":"10px",onClick:o[1]||(o[1]=a=>m.viewProfile(s.data.id))},null,8,["style"])):t.createCommentVNode("",!0)],2)):t.createCommentVNode("",!0)],512)}const gV=Ki(HS,[["render",ndt],["__cssModules",{$style:tdt}],["__scopeId","data-v-0bb9c2ff"]]);/**
4132
+ `),Et=fe.createShader(fe.FRAGMENT_SHADER);if(fe.isContextLost())return void(this.failedToCreate=!0);if(fe.shaderSource(Et,Tt),fe.compileShader(Et),!fe.getShaderParameter(Et,fe.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${fe.getShaderInfoLog(Et)}`);fe.attachShader(this.program,Et);const Jt=fe.createShader(fe.VERTEX_SHADER);if(fe.isContextLost())return void(this.failedToCreate=!0);if(fe.shaderSource(Jt,jt),fe.compileShader(Jt),!fe.getShaderParameter(Jt,fe.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${fe.getShaderInfoLog(Jt)}`);fe.attachShader(this.program,Jt),this.attributes={};const Kt={};this.numAttributes=Fe.length;for(let Yt=0;Yt<this.numAttributes;Yt++)Fe[Yt]&&(fe.bindAttribLocation(this.program,Yt,Fe[Yt]),this.attributes[Fe[Yt]]=Yt);if(fe.linkProgram(this.program),!fe.getProgramParameter(this.program,fe.LINK_STATUS))throw new Error(`Program failed to link: ${fe.getProgramInfoLog(this.program)}`);fe.deleteShader(Jt),fe.deleteShader(Et);for(let Yt=0;Yt<xt.length;Yt++){const da=xt[Yt];if(da&&!Kt[da]){const _a=fe.getUniformLocation(this.program,da);_a&&(Kt[da]=_a)}}this.fixedUniforms=V(u,Kt),this.terrainUniforms=((Yt,da)=>({u_depth:new r.aI(Yt,da.u_depth),u_terrain:new r.aI(Yt,da.u_terrain),u_terrain_dim:new r.aJ(Yt,da.u_terrain_dim),u_terrain_matrix:new r.aK(Yt,da.u_terrain_matrix),u_terrain_unpack:new r.aL(Yt,da.u_terrain_unpack),u_terrain_exaggeration:new r.aJ(Yt,da.u_terrain_exaggeration)}))(u,Kt),this.binderUniforms=D?D.getUniforms(u,Kt):[]}draw(u,f,D,V,J,oe,fe,xe,Ee,Fe,Ge,rt,ct,pt,xt,Mt,Tt,jt){const Et=u.gl;if(this.failedToCreate)return;if(u.program.set(this.program),u.setDepthMode(D),u.setStencilMode(V),u.setColorMode(J),u.setCullFace(oe),xe){u.activeTexture.set(Et.TEXTURE2),Et.bindTexture(Et.TEXTURE_2D,xe.depthTexture),u.activeTexture.set(Et.TEXTURE3),Et.bindTexture(Et.TEXTURE_2D,xe.texture);for(const Kt in this.terrainUniforms)this.terrainUniforms[Kt].set(xe[Kt])}for(const Kt in this.fixedUniforms)this.fixedUniforms[Kt].set(fe[Kt]);xt&&xt.setUniforms(u,this.binderUniforms,ct,{zoom:pt});let Jt=0;switch(f){case Et.LINES:Jt=2;break;case Et.TRIANGLES:Jt=3;break;case Et.LINE_STRIP:Jt=1}for(const Kt of rt.get()){const Yt=Kt.vaos||(Kt.vaos={});(Yt[Ee]||(Yt[Ee]=new Dr)).bind(u,this,Fe,xt?xt.getPaintVertexBuffers():[],Ge,Kt.vertexOffset,Mt,Tt,jt),Et.drawElements(f,Kt.primitiveLength*Jt,Et.UNSIGNED_SHORT,Kt.primitiveOffset*Jt*2)}}}function Va(R,u,f){const D=1/St(f,1,u.transform.tileZoom),V=Math.pow(2,f.tileID.overscaledZ),J=f.tileSize*Math.pow(2,u.transform.tileZoom)/V,oe=J*(f.tileID.canonical.x+f.tileID.wrap*V),fe=J*f.tileID.canonical.y;return{u_image:0,u_texsize:f.imageAtlasTexture.size,u_scale:[D,R.fromScale,R.toScale],u_fade:R.t,u_pixel_coord_upper:[oe>>16,fe>>16],u_pixel_coord_lower:[65535&oe,65535&fe]}}const ar=(R,u,f,D)=>{const V=u.style.light,J=V.properties.get("position"),oe=[J.x,J.y,J.z],fe=function(){var Ee=new r.A(9);return r.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}();V.properties.get("anchor")==="viewport"&&function(Ee,Fe){var Ge=Math.sin(Fe),rt=Math.cos(Fe);Ee[0]=rt,Ee[1]=Ge,Ee[2]=0,Ee[3]=-Ge,Ee[4]=rt,Ee[5]=0,Ee[6]=0,Ee[7]=0,Ee[8]=1}(fe,-u.transform.angle),function(Ee,Fe,Ge){var rt=Fe[0],ct=Fe[1],pt=Fe[2];Ee[0]=rt*Ge[0]+ct*Ge[3]+pt*Ge[6],Ee[1]=rt*Ge[1]+ct*Ge[4]+pt*Ge[7],Ee[2]=rt*Ge[2]+ct*Ge[5]+pt*Ge[8]}(oe,oe,fe);const xe=V.properties.get("color");return{u_matrix:R,u_lightpos:oe,u_lightintensity:V.properties.get("intensity"),u_lightcolor:[xe.r,xe.g,xe.b],u_vertical_gradient:+f,u_opacity:D}},vr=(R,u,f,D,V,J,oe)=>r.e(ar(R,u,f,D),Va(J,u,oe),{u_height_factor:-Math.pow(2,V.overscaledZ)/oe.tileSize/8}),mr=R=>({u_matrix:R}),Br=(R,u,f,D)=>r.e(mr(R),Va(f,u,D)),Ur=(R,u)=>({u_matrix:R,u_world:u}),ma=(R,u,f,D,V)=>r.e(Br(R,u,f,D),{u_world:V}),Ua=(R,u,f,D)=>{const V=R.transform;let J,oe;if(D.paint.get("circle-pitch-alignment")==="map"){const fe=St(f,1,V.zoom);J=!0,oe=[fe,fe]}else J=!1,oe=V.pixelsToGLUnits;return{u_camera_to_center_distance:V.cameraToCenterDistance,u_scale_with_map:+(D.paint.get("circle-pitch-scale")==="map"),u_matrix:R.translatePosMatrix(u.posMatrix,f,D.paint.get("circle-translate"),D.paint.get("circle-translate-anchor")),u_pitch_with_map:+J,u_device_pixel_ratio:R.pixelRatio,u_extrude_scale:oe}},ta=(R,u)=>({u_matrix:u,u_pixel_extrude_scale:[1/R.width,1/R.height]}),ca=(R,u,f)=>({u_matrix:R,u_inv_matrix:u,u_camera_to_center_distance:f.cameraToCenterDistance,u_viewport_size:[f.width,f.height]}),fa=(R,u,f=1)=>({u_matrix:R,u_color:u,u_overlay:0,u_overlay_scale:f}),Oa=R=>({u_matrix:R}),za=(R,u,f,D)=>({u_matrix:R,u_extrude_scale:St(u,1,f),u_intensity:D}),qa=(R,u,f,D)=>{const V=r.H();r.aQ(V,0,R.width,R.height,0,0,1);const J=R.context.gl;return{u_matrix:V,u_world:[J.drawingBufferWidth,J.drawingBufferHeight],u_image:f,u_color_ramp:D,u_opacity:u.paint.get("heatmap-opacity")}},Ra=(R,u,f,D)=>{const V=f.paint.get("hillshade-shadow-color"),J=f.paint.get("hillshade-highlight-color"),oe=f.paint.get("hillshade-accent-color");let fe=f.paint.get("hillshade-illumination-direction")*(Math.PI/180);f.paint.get("hillshade-illumination-anchor")==="viewport"&&(fe-=R.transform.angle);const xe=!R.options.moving;return{u_matrix:D?D.posMatrix:R.transform.calculatePosMatrix(u.tileID.toUnwrapped(),xe),u_image:0,u_latrange:la(0,u.tileID),u_light:[f.paint.get("hillshade-exaggeration"),fe],u_shadow:V,u_highlight:J,u_accent:oe}},Ia=(R,u)=>{const f=u.stride,D=r.H();return r.aQ(D,0,r.X,-r.X,0,0,1),r.J(D,D,[0,-r.X,0]),{u_matrix:D,u_image:1,u_dimension:[f,f],u_zoom:R.overscaledZ,u_unpack:u.getUnpackVector()}};function la(R,u){const f=Math.pow(2,u.canonical.z),D=u.canonical.y;return[new r.Z(0,D/f).toLngLat().lat,new r.Z(0,(D+1)/f).toLngLat().lat]}const oa=(R,u,f,D)=>{const V=R.transform;return{u_matrix:cr(R,u,f,D),u_ratio:1/St(u,1,V.zoom),u_device_pixel_ratio:R.pixelRatio,u_units_to_pixels:[1/V.pixelsToGLUnits[0],1/V.pixelsToGLUnits[1]]}},Sa=(R,u,f,D,V)=>r.e(oa(R,u,f,V),{u_image:0,u_image_height:D}),Ja=(R,u,f,D,V)=>{const J=R.transform,oe=sr(u,J);return{u_matrix:cr(R,u,f,V),u_texsize:u.imageAtlasTexture.size,u_ratio:1/St(u,1,J.zoom),u_device_pixel_ratio:R.pixelRatio,u_image:0,u_scale:[oe,D.fromScale,D.toScale],u_fade:D.t,u_units_to_pixels:[1/J.pixelsToGLUnits[0],1/J.pixelsToGLUnits[1]]}},lr=(R,u,f,D,V,J)=>{const oe=R.transform,fe=R.lineAtlas,xe=sr(u,oe),Ee=f.layout.get("line-cap")==="round",Fe=fe.getDash(D.from,Ee),Ge=fe.getDash(D.to,Ee),rt=Fe.width*V.fromScale,ct=Ge.width*V.toScale;return r.e(oa(R,u,f,J),{u_patternscale_a:[xe/rt,-Fe.height/2],u_patternscale_b:[xe/ct,-Ge.height/2],u_sdfgamma:fe.width/(256*Math.min(rt,ct)*R.pixelRatio)/2,u_image:0,u_tex_y_a:Fe.y,u_tex_y_b:Ge.y,u_mix:V.t})};function sr(R,u){return 1/St(R,1,u.tileZoom)}function cr(R,u,f,D){return R.translatePosMatrix(D?D.posMatrix:u.tileID.posMatrix,u,f.paint.get("line-translate"),f.paint.get("line-translate-anchor"))}const Ar=(R,u,f,D,V)=>{return{u_matrix:R,u_tl_parent:u,u_scale_parent:f,u_buffer_scale:1,u_fade_t:D.mix,u_opacity:D.opacity*V.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:V.paint.get("raster-brightness-min"),u_brightness_high:V.paint.get("raster-brightness-max"),u_saturation_factor:(oe=V.paint.get("raster-saturation"),oe>0?1-1/(1.001-oe):-oe),u_contrast_factor:(J=V.paint.get("raster-contrast"),J>0?1/(1-J):1+J),u_spin_weights:wr(V.paint.get("raster-hue-rotate"))};var J,oe};function wr(R){R*=Math.PI/180;const u=Math.sin(R),f=Math.cos(R);return[(2*f+1)/3,(-Math.sqrt(3)*u-f+1)/3,(Math.sqrt(3)*u-f+1)/3]}const Pr=(R,u,f,D,V,J,oe,fe,xe,Ee,Fe,Ge,rt,ct)=>{const pt=oe.transform;return{u_is_size_zoom_constant:+(R==="constant"||R==="source"),u_is_size_feature_constant:+(R==="constant"||R==="camera"),u_size_t:u?u.uSizeT:0,u_size:u?u.uSize:0,u_camera_to_center_distance:pt.cameraToCenterDistance,u_pitch:pt.pitch/360*2*Math.PI,u_rotate_symbol:+f,u_aspect_ratio:pt.width/pt.height,u_fade_change:oe.options.fadeDuration?oe.symbolFadeChange:1,u_matrix:fe,u_label_plane_matrix:xe,u_coord_matrix:Ee,u_is_text:+Ge,u_pitch_with_map:+D,u_is_along_line:V,u_is_variable_anchor:J,u_texsize:rt,u_texture:0,u_translation:Fe,u_pitched_scale:ct}},_r=(R,u,f,D,V,J,oe,fe,xe,Ee,Fe,Ge,rt,ct,pt)=>{const xt=oe.transform;return r.e(Pr(R,u,f,D,V,J,oe,fe,xe,Ee,Fe,Ge,rt,pt),{u_gamma_scale:D?Math.cos(xt._pitch)*xt.cameraToCenterDistance:1,u_device_pixel_ratio:oe.pixelRatio,u_is_halo:+ct})},Cr=(R,u,f,D,V,J,oe,fe,xe,Ee,Fe,Ge,rt,ct)=>r.e(_r(R,u,f,D,V,J,oe,fe,xe,Ee,Fe,!0,Ge,!0,ct),{u_texsize_icon:rt,u_texture_icon:1}),Or=(R,u,f)=>({u_matrix:R,u_opacity:u,u_color:f}),Kr=(R,u,f,D,V,J)=>r.e(function(oe,fe,xe,Ee){const Fe=xe.imageManager.getPattern(oe.from.toString()),Ge=xe.imageManager.getPattern(oe.to.toString()),{width:rt,height:ct}=xe.imageManager.getPixelSize(),pt=Math.pow(2,Ee.tileID.overscaledZ),xt=Ee.tileSize*Math.pow(2,xe.transform.tileZoom)/pt,Mt=xt*(Ee.tileID.canonical.x+Ee.tileID.wrap*pt),Tt=xt*Ee.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:Fe.tl,u_pattern_br_a:Fe.br,u_pattern_tl_b:Ge.tl,u_pattern_br_b:Ge.br,u_texsize:[rt,ct],u_mix:fe.t,u_pattern_size_a:Fe.displaySize,u_pattern_size_b:Ge.displaySize,u_scale_a:fe.fromScale,u_scale_b:fe.toScale,u_tile_units_to_pixels:1/St(Ee,1,xe.transform.tileZoom),u_pixel_coord_upper:[Mt>>16,Tt>>16],u_pixel_coord_lower:[65535&Mt,65535&Tt]}}(D,J,f,V),{u_matrix:R,u_opacity:u}),jr={fillExtrusion:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_lightpos:new r.aO(R,u.u_lightpos),u_lightintensity:new r.aJ(R,u.u_lightintensity),u_lightcolor:new r.aO(R,u.u_lightcolor),u_vertical_gradient:new r.aJ(R,u.u_vertical_gradient),u_opacity:new r.aJ(R,u.u_opacity)}),fillExtrusionPattern:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_lightpos:new r.aO(R,u.u_lightpos),u_lightintensity:new r.aJ(R,u.u_lightintensity),u_lightcolor:new r.aO(R,u.u_lightcolor),u_vertical_gradient:new r.aJ(R,u.u_vertical_gradient),u_height_factor:new r.aJ(R,u.u_height_factor),u_image:new r.aI(R,u.u_image),u_texsize:new r.aP(R,u.u_texsize),u_pixel_coord_upper:new r.aP(R,u.u_pixel_coord_upper),u_pixel_coord_lower:new r.aP(R,u.u_pixel_coord_lower),u_scale:new r.aO(R,u.u_scale),u_fade:new r.aJ(R,u.u_fade),u_opacity:new r.aJ(R,u.u_opacity)}),fill:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix)}),fillPattern:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_image:new r.aI(R,u.u_image),u_texsize:new r.aP(R,u.u_texsize),u_pixel_coord_upper:new r.aP(R,u.u_pixel_coord_upper),u_pixel_coord_lower:new r.aP(R,u.u_pixel_coord_lower),u_scale:new r.aO(R,u.u_scale),u_fade:new r.aJ(R,u.u_fade)}),fillOutline:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_world:new r.aP(R,u.u_world)}),fillOutlinePattern:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_world:new r.aP(R,u.u_world),u_image:new r.aI(R,u.u_image),u_texsize:new r.aP(R,u.u_texsize),u_pixel_coord_upper:new r.aP(R,u.u_pixel_coord_upper),u_pixel_coord_lower:new r.aP(R,u.u_pixel_coord_lower),u_scale:new r.aO(R,u.u_scale),u_fade:new r.aJ(R,u.u_fade)}),circle:(R,u)=>({u_camera_to_center_distance:new r.aJ(R,u.u_camera_to_center_distance),u_scale_with_map:new r.aI(R,u.u_scale_with_map),u_pitch_with_map:new r.aI(R,u.u_pitch_with_map),u_extrude_scale:new r.aP(R,u.u_extrude_scale),u_device_pixel_ratio:new r.aJ(R,u.u_device_pixel_ratio),u_matrix:new r.aK(R,u.u_matrix)}),collisionBox:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_pixel_extrude_scale:new r.aP(R,u.u_pixel_extrude_scale)}),collisionCircle:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_inv_matrix:new r.aK(R,u.u_inv_matrix),u_camera_to_center_distance:new r.aJ(R,u.u_camera_to_center_distance),u_viewport_size:new r.aP(R,u.u_viewport_size)}),debug:(R,u)=>({u_color:new r.aM(R,u.u_color),u_matrix:new r.aK(R,u.u_matrix),u_overlay:new r.aI(R,u.u_overlay),u_overlay_scale:new r.aJ(R,u.u_overlay_scale)}),clippingMask:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix)}),heatmap:(R,u)=>({u_extrude_scale:new r.aJ(R,u.u_extrude_scale),u_intensity:new r.aJ(R,u.u_intensity),u_matrix:new r.aK(R,u.u_matrix)}),heatmapTexture:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_world:new r.aP(R,u.u_world),u_image:new r.aI(R,u.u_image),u_color_ramp:new r.aI(R,u.u_color_ramp),u_opacity:new r.aJ(R,u.u_opacity)}),hillshade:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_image:new r.aI(R,u.u_image),u_latrange:new r.aP(R,u.u_latrange),u_light:new r.aP(R,u.u_light),u_shadow:new r.aM(R,u.u_shadow),u_highlight:new r.aM(R,u.u_highlight),u_accent:new r.aM(R,u.u_accent)}),hillshadePrepare:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_image:new r.aI(R,u.u_image),u_dimension:new r.aP(R,u.u_dimension),u_zoom:new r.aJ(R,u.u_zoom),u_unpack:new r.aL(R,u.u_unpack)}),line:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_ratio:new r.aJ(R,u.u_ratio),u_device_pixel_ratio:new r.aJ(R,u.u_device_pixel_ratio),u_units_to_pixels:new r.aP(R,u.u_units_to_pixels)}),lineGradient:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_ratio:new r.aJ(R,u.u_ratio),u_device_pixel_ratio:new r.aJ(R,u.u_device_pixel_ratio),u_units_to_pixels:new r.aP(R,u.u_units_to_pixels),u_image:new r.aI(R,u.u_image),u_image_height:new r.aJ(R,u.u_image_height)}),linePattern:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_texsize:new r.aP(R,u.u_texsize),u_ratio:new r.aJ(R,u.u_ratio),u_device_pixel_ratio:new r.aJ(R,u.u_device_pixel_ratio),u_image:new r.aI(R,u.u_image),u_units_to_pixels:new r.aP(R,u.u_units_to_pixels),u_scale:new r.aO(R,u.u_scale),u_fade:new r.aJ(R,u.u_fade)}),lineSDF:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_ratio:new r.aJ(R,u.u_ratio),u_device_pixel_ratio:new r.aJ(R,u.u_device_pixel_ratio),u_units_to_pixels:new r.aP(R,u.u_units_to_pixels),u_patternscale_a:new r.aP(R,u.u_patternscale_a),u_patternscale_b:new r.aP(R,u.u_patternscale_b),u_sdfgamma:new r.aJ(R,u.u_sdfgamma),u_image:new r.aI(R,u.u_image),u_tex_y_a:new r.aJ(R,u.u_tex_y_a),u_tex_y_b:new r.aJ(R,u.u_tex_y_b),u_mix:new r.aJ(R,u.u_mix)}),raster:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_tl_parent:new r.aP(R,u.u_tl_parent),u_scale_parent:new r.aJ(R,u.u_scale_parent),u_buffer_scale:new r.aJ(R,u.u_buffer_scale),u_fade_t:new r.aJ(R,u.u_fade_t),u_opacity:new r.aJ(R,u.u_opacity),u_image0:new r.aI(R,u.u_image0),u_image1:new r.aI(R,u.u_image1),u_brightness_low:new r.aJ(R,u.u_brightness_low),u_brightness_high:new r.aJ(R,u.u_brightness_high),u_saturation_factor:new r.aJ(R,u.u_saturation_factor),u_contrast_factor:new r.aJ(R,u.u_contrast_factor),u_spin_weights:new r.aO(R,u.u_spin_weights)}),symbolIcon:(R,u)=>({u_is_size_zoom_constant:new r.aI(R,u.u_is_size_zoom_constant),u_is_size_feature_constant:new r.aI(R,u.u_is_size_feature_constant),u_size_t:new r.aJ(R,u.u_size_t),u_size:new r.aJ(R,u.u_size),u_camera_to_center_distance:new r.aJ(R,u.u_camera_to_center_distance),u_pitch:new r.aJ(R,u.u_pitch),u_rotate_symbol:new r.aI(R,u.u_rotate_symbol),u_aspect_ratio:new r.aJ(R,u.u_aspect_ratio),u_fade_change:new r.aJ(R,u.u_fade_change),u_matrix:new r.aK(R,u.u_matrix),u_label_plane_matrix:new r.aK(R,u.u_label_plane_matrix),u_coord_matrix:new r.aK(R,u.u_coord_matrix),u_is_text:new r.aI(R,u.u_is_text),u_pitch_with_map:new r.aI(R,u.u_pitch_with_map),u_is_along_line:new r.aI(R,u.u_is_along_line),u_is_variable_anchor:new r.aI(R,u.u_is_variable_anchor),u_texsize:new r.aP(R,u.u_texsize),u_texture:new r.aI(R,u.u_texture),u_translation:new r.aP(R,u.u_translation),u_pitched_scale:new r.aJ(R,u.u_pitched_scale)}),symbolSDF:(R,u)=>({u_is_size_zoom_constant:new r.aI(R,u.u_is_size_zoom_constant),u_is_size_feature_constant:new r.aI(R,u.u_is_size_feature_constant),u_size_t:new r.aJ(R,u.u_size_t),u_size:new r.aJ(R,u.u_size),u_camera_to_center_distance:new r.aJ(R,u.u_camera_to_center_distance),u_pitch:new r.aJ(R,u.u_pitch),u_rotate_symbol:new r.aI(R,u.u_rotate_symbol),u_aspect_ratio:new r.aJ(R,u.u_aspect_ratio),u_fade_change:new r.aJ(R,u.u_fade_change),u_matrix:new r.aK(R,u.u_matrix),u_label_plane_matrix:new r.aK(R,u.u_label_plane_matrix),u_coord_matrix:new r.aK(R,u.u_coord_matrix),u_is_text:new r.aI(R,u.u_is_text),u_pitch_with_map:new r.aI(R,u.u_pitch_with_map),u_is_along_line:new r.aI(R,u.u_is_along_line),u_is_variable_anchor:new r.aI(R,u.u_is_variable_anchor),u_texsize:new r.aP(R,u.u_texsize),u_texture:new r.aI(R,u.u_texture),u_gamma_scale:new r.aJ(R,u.u_gamma_scale),u_device_pixel_ratio:new r.aJ(R,u.u_device_pixel_ratio),u_is_halo:new r.aI(R,u.u_is_halo),u_translation:new r.aP(R,u.u_translation),u_pitched_scale:new r.aJ(R,u.u_pitched_scale)}),symbolTextAndIcon:(R,u)=>({u_is_size_zoom_constant:new r.aI(R,u.u_is_size_zoom_constant),u_is_size_feature_constant:new r.aI(R,u.u_is_size_feature_constant),u_size_t:new r.aJ(R,u.u_size_t),u_size:new r.aJ(R,u.u_size),u_camera_to_center_distance:new r.aJ(R,u.u_camera_to_center_distance),u_pitch:new r.aJ(R,u.u_pitch),u_rotate_symbol:new r.aI(R,u.u_rotate_symbol),u_aspect_ratio:new r.aJ(R,u.u_aspect_ratio),u_fade_change:new r.aJ(R,u.u_fade_change),u_matrix:new r.aK(R,u.u_matrix),u_label_plane_matrix:new r.aK(R,u.u_label_plane_matrix),u_coord_matrix:new r.aK(R,u.u_coord_matrix),u_is_text:new r.aI(R,u.u_is_text),u_pitch_with_map:new r.aI(R,u.u_pitch_with_map),u_is_along_line:new r.aI(R,u.u_is_along_line),u_is_variable_anchor:new r.aI(R,u.u_is_variable_anchor),u_texsize:new r.aP(R,u.u_texsize),u_texsize_icon:new r.aP(R,u.u_texsize_icon),u_texture:new r.aI(R,u.u_texture),u_texture_icon:new r.aI(R,u.u_texture_icon),u_gamma_scale:new r.aJ(R,u.u_gamma_scale),u_device_pixel_ratio:new r.aJ(R,u.u_device_pixel_ratio),u_is_halo:new r.aI(R,u.u_is_halo),u_translation:new r.aP(R,u.u_translation),u_pitched_scale:new r.aJ(R,u.u_pitched_scale)}),background:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_opacity:new r.aJ(R,u.u_opacity),u_color:new r.aM(R,u.u_color)}),backgroundPattern:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_opacity:new r.aJ(R,u.u_opacity),u_image:new r.aI(R,u.u_image),u_pattern_tl_a:new r.aP(R,u.u_pattern_tl_a),u_pattern_br_a:new r.aP(R,u.u_pattern_br_a),u_pattern_tl_b:new r.aP(R,u.u_pattern_tl_b),u_pattern_br_b:new r.aP(R,u.u_pattern_br_b),u_texsize:new r.aP(R,u.u_texsize),u_mix:new r.aJ(R,u.u_mix),u_pattern_size_a:new r.aP(R,u.u_pattern_size_a),u_pattern_size_b:new r.aP(R,u.u_pattern_size_b),u_scale_a:new r.aJ(R,u.u_scale_a),u_scale_b:new r.aJ(R,u.u_scale_b),u_pixel_coord_upper:new r.aP(R,u.u_pixel_coord_upper),u_pixel_coord_lower:new r.aP(R,u.u_pixel_coord_lower),u_tile_units_to_pixels:new r.aJ(R,u.u_tile_units_to_pixels)}),terrain:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_texture:new r.aI(R,u.u_texture),u_ele_delta:new r.aJ(R,u.u_ele_delta),u_fog_matrix:new r.aK(R,u.u_fog_matrix),u_fog_color:new r.aM(R,u.u_fog_color),u_fog_ground_blend:new r.aJ(R,u.u_fog_ground_blend),u_fog_ground_blend_opacity:new r.aJ(R,u.u_fog_ground_blend_opacity),u_horizon_color:new r.aM(R,u.u_horizon_color),u_horizon_fog_blend:new r.aJ(R,u.u_horizon_fog_blend)}),terrainDepth:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_ele_delta:new r.aJ(R,u.u_ele_delta)}),terrainCoords:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_texture:new r.aI(R,u.u_texture),u_terrain_coords_id:new r.aJ(R,u.u_terrain_coords_id),u_ele_delta:new r.aJ(R,u.u_ele_delta)}),sky:(R,u)=>({u_sky_color:new r.aM(R,u.u_sky_color),u_horizon_color:new r.aM(R,u.u_horizon_color),u_horizon:new r.aJ(R,u.u_horizon),u_sky_horizon_blend:new r.aJ(R,u.u_sky_horizon_blend)})};class zr{constructor(u,f,D){this.context=u;const V=u.gl;this.buffer=V.createBuffer(),this.dynamicDraw=!!D,this.context.unbindVAO(),u.bindElementBuffer.set(this.buffer),V.bufferData(V.ELEMENT_ARRAY_BUFFER,f.arrayBuffer,this.dynamicDraw?V.DYNAMIC_DRAW:V.STATIC_DRAW),this.dynamicDraw||delete f.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(u){const f=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),f.bufferSubData(f.ELEMENT_ARRAY_BUFFER,0,u.arrayBuffer)}destroy(){const u=this.context.gl;this.buffer&&(u.deleteBuffer(this.buffer),delete this.buffer)}}const Hr={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class bn{constructor(u,f,D,V){this.length=f.length,this.attributes=D,this.itemSize=f.bytesPerElement,this.dynamicDraw=V,this.context=u;const J=u.gl;this.buffer=J.createBuffer(),u.bindVertexBuffer.set(this.buffer),J.bufferData(J.ARRAY_BUFFER,f.arrayBuffer,this.dynamicDraw?J.DYNAMIC_DRAW:J.STATIC_DRAW),this.dynamicDraw||delete f.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(u){if(u.length!==this.length)throw new Error(`Length of new data is ${u.length}, which doesn't match current length of ${this.length}`);const f=this.context.gl;this.bind(),f.bufferSubData(f.ARRAY_BUFFER,0,u.arrayBuffer)}enableAttributes(u,f){for(let D=0;D<this.attributes.length;D++){const V=this.attributes[D],J=f.attributes[V.name];J!==void 0&&u.enableVertexAttribArray(J)}}setVertexAttribPointers(u,f,D){for(let V=0;V<this.attributes.length;V++){const J=this.attributes[V],oe=f.attributes[J.name];oe!==void 0&&u.vertexAttribPointer(oe,J.components,u[Hr[J.type]],!1,this.itemSize,J.offset+this.itemSize*(D||0))}}destroy(){const u=this.context.gl;this.buffer&&(u.deleteBuffer(this.buffer),delete this.buffer)}}const Bn=new WeakMap;function mi(R){var u;if(Bn.has(R))return Bn.get(R);{const f=(u=R.getParameter(R.VERSION))===null||u===void 0?void 0:u.startsWith("WebGL 2.0");return Bn.set(R,f),f}}class En{constructor(u){this.gl=u.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(u){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class fo extends En{getDefault(){return r.aN.transparent}set(u){const f=this.current;(u.r!==f.r||u.g!==f.g||u.b!==f.b||u.a!==f.a||this.dirty)&&(this.gl.clearColor(u.r,u.g,u.b,u.a),this.current=u,this.dirty=!1)}}class ki extends En{getDefault(){return 1}set(u){(u!==this.current||this.dirty)&&(this.gl.clearDepth(u),this.current=u,this.dirty=!1)}}class Hi extends En{getDefault(){return 0}set(u){(u!==this.current||this.dirty)&&(this.gl.clearStencil(u),this.current=u,this.dirty=!1)}}class qo extends En{getDefault(){return[!0,!0,!0,!0]}set(u){const f=this.current;(u[0]!==f[0]||u[1]!==f[1]||u[2]!==f[2]||u[3]!==f[3]||this.dirty)&&(this.gl.colorMask(u[0],u[1],u[2],u[3]),this.current=u,this.dirty=!1)}}class ri extends En{getDefault(){return!0}set(u){(u!==this.current||this.dirty)&&(this.gl.depthMask(u),this.current=u,this.dirty=!1)}}class si extends En{getDefault(){return 255}set(u){(u!==this.current||this.dirty)&&(this.gl.stencilMask(u),this.current=u,this.dirty=!1)}}class os extends En{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(u){const f=this.current;(u.func!==f.func||u.ref!==f.ref||u.mask!==f.mask||this.dirty)&&(this.gl.stencilFunc(u.func,u.ref,u.mask),this.current=u,this.dirty=!1)}}class xo extends En{getDefault(){const u=this.gl;return[u.KEEP,u.KEEP,u.KEEP]}set(u){const f=this.current;(u[0]!==f[0]||u[1]!==f[1]||u[2]!==f[2]||this.dirty)&&(this.gl.stencilOp(u[0],u[1],u[2]),this.current=u,this.dirty=!1)}}class Yo extends En{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const f=this.gl;u?f.enable(f.STENCIL_TEST):f.disable(f.STENCIL_TEST),this.current=u,this.dirty=!1}}class ms extends En{getDefault(){return[0,1]}set(u){const f=this.current;(u[0]!==f[0]||u[1]!==f[1]||this.dirty)&&(this.gl.depthRange(u[0],u[1]),this.current=u,this.dirty=!1)}}class Fo extends En{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const f=this.gl;u?f.enable(f.DEPTH_TEST):f.disable(f.DEPTH_TEST),this.current=u,this.dirty=!1}}class Tl extends En{getDefault(){return this.gl.LESS}set(u){(u!==this.current||this.dirty)&&(this.gl.depthFunc(u),this.current=u,this.dirty=!1)}}class Al extends En{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const f=this.gl;u?f.enable(f.BLEND):f.disable(f.BLEND),this.current=u,this.dirty=!1}}class El extends En{getDefault(){const u=this.gl;return[u.ONE,u.ZERO]}set(u){const f=this.current;(u[0]!==f[0]||u[1]!==f[1]||this.dirty)&&(this.gl.blendFunc(u[0],u[1]),this.current=u,this.dirty=!1)}}class Jo extends En{getDefault(){return r.aN.transparent}set(u){const f=this.current;(u.r!==f.r||u.g!==f.g||u.b!==f.b||u.a!==f.a||this.dirty)&&(this.gl.blendColor(u.r,u.g,u.b,u.a),this.current=u,this.dirty=!1)}}class al extends En{getDefault(){return this.gl.FUNC_ADD}set(u){(u!==this.current||this.dirty)&&(this.gl.blendEquation(u),this.current=u,this.dirty=!1)}}class Ss extends En{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const f=this.gl;u?f.enable(f.CULL_FACE):f.disable(f.CULL_FACE),this.current=u,this.dirty=!1}}class Si extends En{getDefault(){return this.gl.BACK}set(u){(u!==this.current||this.dirty)&&(this.gl.cullFace(u),this.current=u,this.dirty=!1)}}class $i extends En{getDefault(){return this.gl.CCW}set(u){(u!==this.current||this.dirty)&&(this.gl.frontFace(u),this.current=u,this.dirty=!1)}}class Ml extends En{getDefault(){return null}set(u){(u!==this.current||this.dirty)&&(this.gl.useProgram(u),this.current=u,this.dirty=!1)}}class rl extends En{getDefault(){return this.gl.TEXTURE0}set(u){(u!==this.current||this.dirty)&&(this.gl.activeTexture(u),this.current=u,this.dirty=!1)}}class Us extends En{getDefault(){const u=this.gl;return[0,0,u.drawingBufferWidth,u.drawingBufferHeight]}set(u){const f=this.current;(u[0]!==f[0]||u[1]!==f[1]||u[2]!==f[2]||u[3]!==f[3]||this.dirty)&&(this.gl.viewport(u[0],u[1],u[2],u[3]),this.current=u,this.dirty=!1)}}class Il extends En{getDefault(){return null}set(u){if(u===this.current&&!this.dirty)return;const f=this.gl;f.bindFramebuffer(f.FRAMEBUFFER,u),this.current=u,this.dirty=!1}}class Gs extends En{getDefault(){return null}set(u){if(u===this.current&&!this.dirty)return;const f=this.gl;f.bindRenderbuffer(f.RENDERBUFFER,u),this.current=u,this.dirty=!1}}class Pl extends En{getDefault(){return null}set(u){if(u===this.current&&!this.dirty)return;const f=this.gl;f.bindTexture(f.TEXTURE_2D,u),this.current=u,this.dirty=!1}}class Ll extends En{getDefault(){return null}set(u){if(u===this.current&&!this.dirty)return;const f=this.gl;f.bindBuffer(f.ARRAY_BUFFER,u),this.current=u,this.dirty=!1}}class nl extends En{getDefault(){return null}set(u){const f=this.gl;f.bindBuffer(f.ELEMENT_ARRAY_BUFFER,u),this.current=u,this.dirty=!1}}class Po extends En{getDefault(){return null}set(u){var f;if(u===this.current&&!this.dirty)return;const D=this.gl;mi(D)?D.bindVertexArray(u):(f=D.getExtension("OES_vertex_array_object"))===null||f===void 0||f.bindVertexArrayOES(u),this.current=u,this.dirty=!1}}class Hc extends En{getDefault(){return 4}set(u){if(u===this.current&&!this.dirty)return;const f=this.gl;f.pixelStorei(f.UNPACK_ALIGNMENT,u),this.current=u,this.dirty=!1}}class Lc extends En{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const f=this.gl;f.pixelStorei(f.UNPACK_PREMULTIPLY_ALPHA_WEBGL,u),this.current=u,this.dirty=!1}}class ql extends En{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const f=this.gl;f.pixelStorei(f.UNPACK_FLIP_Y_WEBGL,u),this.current=u,this.dirty=!1}}class Zc extends En{constructor(u,f){super(u),this.context=u,this.parent=f}getDefault(){return null}}class eu extends Zc{setDirty(){this.dirty=!0}set(u){if(u===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const f=this.gl;f.framebufferTexture2D(f.FRAMEBUFFER,f.COLOR_ATTACHMENT0,f.TEXTURE_2D,u,0),this.current=u,this.dirty=!1}}class Cs extends Zc{set(u){if(u===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const f=this.gl;f.framebufferRenderbuffer(f.FRAMEBUFFER,f.DEPTH_ATTACHMENT,f.RENDERBUFFER,u),this.current=u,this.dirty=!1}}class tu extends Zc{set(u){if(u===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const f=this.gl;f.framebufferRenderbuffer(f.FRAMEBUFFER,f.DEPTH_STENCIL_ATTACHMENT,f.RENDERBUFFER,u),this.current=u,this.dirty=!1}}class Bu{constructor(u,f,D,V,J){this.context=u,this.width=f,this.height=D;const oe=u.gl,fe=this.framebuffer=oe.createFramebuffer();if(this.colorAttachment=new eu(u,fe),V)this.depthAttachment=J?new tu(u,fe):new Cs(u,fe);else if(J)throw new Error("Stencil cannot be set without depth");if(oe.checkFramebufferStatus(oe.FRAMEBUFFER)!==oe.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer is not complete")}destroy(){const u=this.context.gl,f=this.colorAttachment.get();if(f&&u.deleteTexture(f),this.depthAttachment){const D=this.depthAttachment.get();D&&u.deleteRenderbuffer(D)}u.deleteFramebuffer(this.framebuffer)}}class Qi{constructor(u,f,D){this.blendFunction=u,this.blendColor=f,this.mask=D}}Qi.Replace=[1,0],Qi.disabled=new Qi(Qi.Replace,r.aN.transparent,[!1,!1,!1,!1]),Qi.unblended=new Qi(Qi.Replace,r.aN.transparent,[!0,!0,!0,!0]),Qi.alphaBlended=new Qi([1,771],r.aN.transparent,[!0,!0,!0,!0]);class _c{constructor(u){var f,D;if(this.gl=u,this.clearColor=new fo(this),this.clearDepth=new ki(this),this.clearStencil=new Hi(this),this.colorMask=new qo(this),this.depthMask=new ri(this),this.stencilMask=new si(this),this.stencilFunc=new os(this),this.stencilOp=new xo(this),this.stencilTest=new Yo(this),this.depthRange=new ms(this),this.depthTest=new Fo(this),this.depthFunc=new Tl(this),this.blend=new Al(this),this.blendFunc=new El(this),this.blendColor=new Jo(this),this.blendEquation=new al(this),this.cullFace=new Ss(this),this.cullFaceSide=new Si(this),this.frontFace=new $i(this),this.program=new Ml(this),this.activeTexture=new rl(this),this.viewport=new Us(this),this.bindFramebuffer=new Il(this),this.bindRenderbuffer=new Gs(this),this.bindTexture=new Pl(this),this.bindVertexBuffer=new Ll(this),this.bindElementBuffer=new nl(this),this.bindVertexArray=new Po(this),this.pixelStoreUnpack=new Hc(this),this.pixelStoreUnpackPremultiplyAlpha=new Lc(this),this.pixelStoreUnpackFlipY=new ql(this),this.extTextureFilterAnisotropic=u.getExtension("EXT_texture_filter_anisotropic")||u.getExtension("MOZ_EXT_texture_filter_anisotropic")||u.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=u.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=u.getParameter(u.MAX_TEXTURE_SIZE),mi(u)){this.HALF_FLOAT=u.HALF_FLOAT;const V=u.getExtension("EXT_color_buffer_half_float");this.RGBA16F=(f=u.RGBA16F)!==null&&f!==void 0?f:V==null?void 0:V.RGBA16F_EXT,this.RGB16F=(D=u.RGB16F)!==null&&D!==void 0?D:V==null?void 0:V.RGB16F_EXT,u.getExtension("EXT_color_buffer_float")}else{u.getExtension("EXT_color_buffer_half_float"),u.getExtension("OES_texture_half_float_linear");const V=u.getExtension("OES_texture_half_float");this.HALF_FLOAT=V==null?void 0:V.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(u,f){return new zr(this,u,f)}createVertexBuffer(u,f,D){return new bn(this,u,f,D)}createRenderbuffer(u,f,D){const V=this.gl,J=V.createRenderbuffer();return this.bindRenderbuffer.set(J),V.renderbufferStorage(V.RENDERBUFFER,u,f,D),this.bindRenderbuffer.set(null),J}createFramebuffer(u,f,D,V){return new Bu(this,u,f,D,V)}clear({color:u,depth:f,stencil:D}){const V=this.gl;let J=0;u&&(J|=V.COLOR_BUFFER_BIT,this.clearColor.set(u),this.colorMask.set([!0,!0,!0,!0])),f!==void 0&&(J|=V.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(f),this.depthMask.set(!0)),D!==void 0&&(J|=V.STENCIL_BUFFER_BIT,this.clearStencil.set(D),this.stencilMask.set(255)),V.clear(J)}setCullFace(u){u.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(u.mode),this.frontFace.set(u.frontFace))}setDepthMode(u){u.func!==this.gl.ALWAYS||u.mask?(this.depthTest.set(!0),this.depthFunc.set(u.func),this.depthMask.set(u.mask),this.depthRange.set(u.range)):this.depthTest.set(!1)}setStencilMode(u){u.test.func!==this.gl.ALWAYS||u.mask?(this.stencilTest.set(!0),this.stencilMask.set(u.mask),this.stencilOp.set([u.fail,u.depthFail,u.pass]),this.stencilFunc.set({func:u.test.func,ref:u.ref,mask:u.test.mask})):this.stencilTest.set(!1)}setColorMode(u){r.aF(u.blendFunction,Qi.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(u.blendFunction),this.blendColor.set(u.blendColor)),this.colorMask.set(u.mask)}createVertexArray(){var u;return mi(this.gl)?this.gl.createVertexArray():(u=this.gl.getExtension("OES_vertex_array_object"))===null||u===void 0?void 0:u.createVertexArrayOES()}deleteVertexArray(u){var f;return mi(this.gl)?this.gl.deleteVertexArray(u):(f=this.gl.getExtension("OES_vertex_array_object"))===null||f===void 0?void 0:f.deleteVertexArrayOES(u)}unbindVAO(){this.bindVertexArray.set(null)}}class qn{constructor(u,f,D){this.func=u,this.mask=f,this.range=D}}qn.ReadOnly=!1,qn.ReadWrite=!0,qn.disabled=new qn(519,qn.ReadOnly,[0,1]);const Jl=7680;class _i{constructor(u,f,D,V,J,oe){this.test=u,this.ref=f,this.mask=D,this.fail=V,this.depthFail=J,this.pass=oe}}_i.disabled=new _i({func:519,mask:0},0,0,Jl,Jl,Jl);class xi{constructor(u,f,D){this.enable=u,this.mode=f,this.frontFace=D}}let Ts;function ss(R,u,f,D,V){const J=R.context,oe=J.gl,fe=R.useProgram("collisionBox"),xe=[];let Ee=0,Fe=0;for(let Mt=0;Mt<D.length;Mt++){const Tt=D[Mt],jt=u.getTile(Tt).getBucket(f);if(!jt)continue;const Et=V?jt.textCollisionBox:jt.iconCollisionBox,Jt=jt.collisionCircleArray;if(Jt.length>0){const Kt=r.H();r.aR(Kt,jt.placementInvProjMatrix,R.transform.glCoordMatrix),r.aR(Kt,Kt,jt.placementViewportMatrix),xe.push({circleArray:Jt,circleOffset:Fe,transform:Tt.posMatrix,invTransform:Kt,coord:Tt}),Ee+=Jt.length/4,Fe=Ee}Et&&fe.draw(J,oe.LINES,qn.disabled,_i.disabled,R.colorModeForRenderPass(),xi.disabled,ta(R.transform,Tt.posMatrix),R.style.map.terrain&&R.style.map.terrain.getTerrainData(Tt),f.id,Et.layoutVertexBuffer,Et.indexBuffer,Et.segments,null,R.transform.zoom,null,null,Et.collisionVertexBuffer)}if(!V||!xe.length)return;const Ge=R.useProgram("collisionCircle"),rt=new r.aS;rt.resize(4*Ee),rt._trim();let ct=0;for(const Mt of xe)for(let Tt=0;Tt<Mt.circleArray.length/4;Tt++){const jt=4*Tt,Et=Mt.circleArray[jt+0],Jt=Mt.circleArray[jt+1],Kt=Mt.circleArray[jt+2],Yt=Mt.circleArray[jt+3];rt.emplace(ct++,Et,Jt,Kt,Yt,0),rt.emplace(ct++,Et,Jt,Kt,Yt,1),rt.emplace(ct++,Et,Jt,Kt,Yt,2),rt.emplace(ct++,Et,Jt,Kt,Yt,3)}(!Ts||Ts.length<2*Ee)&&(Ts=function(Mt){const Tt=2*Mt,jt=new r.aU;jt.resize(Tt),jt._trim();for(let Et=0;Et<Tt;Et++){const Jt=6*Et;jt.uint16[Jt+0]=4*Et+0,jt.uint16[Jt+1]=4*Et+1,jt.uint16[Jt+2]=4*Et+2,jt.uint16[Jt+3]=4*Et+2,jt.uint16[Jt+4]=4*Et+3,jt.uint16[Jt+5]=4*Et+0}return jt}(Ee));const pt=J.createIndexBuffer(Ts,!0),xt=J.createVertexBuffer(rt,r.aT.members,!0);for(const Mt of xe){const Tt=ca(Mt.transform,Mt.invTransform,R.transform);Ge.draw(J,oe.TRIANGLES,qn.disabled,_i.disabled,R.colorModeForRenderPass(),xi.disabled,Tt,R.style.map.terrain&&R.style.map.terrain.getTerrainData(Mt.coord),f.id,xt,pt,r.a0.simpleSegment(0,2*Mt.circleOffset,Mt.circleArray.length,Mt.circleArray.length/2),null,R.transform.zoom,null,null,null)}xt.destroy(),pt.destroy()}xi.disabled=new xi(!1,1029,2305),xi.backCCW=new xi(!0,1029,2305);const xc=r.ao(new Float32Array(16));function Bl(R,u,f,D,V){if(R.renderPass!=="translucent")return;const J=_i.disabled,oe=R.colorModeForRenderPass();(f._unevaluatedLayout.hasValue("text-variable-anchor")||f._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(fe,xe,Ee,Fe,Ge,rt,ct,pt,xt){const Mt=xe.transform,Tt=Pa(),jt=Ge==="map",Et=rt==="map";for(const Jt of fe){const Kt=Fe.getTile(Jt),Yt=Kt.getBucket(Ee);if(!Yt||!Yt.text||!Yt.text.segments.get().length)continue;const da=Yt.textSizeData,_a=r.ah(da,Mt.zoom),Da=St(Kt,1,xe.transform.zoom),Na=It(Jt.posMatrix,Et,jt,xe.transform,Da),Ga=Ee.layout.get("icon-text-fit")!=="none"&&Yt.hasIconData();if(_a){const $a=Math.pow(2,Mt.zoom-Kt.tileID.overscaledZ),gr=xe.style.map.terrain?(xr,nr)=>xe.style.map.terrain.getElevation(Jt,xr,nr):null,Qa=Tt.translatePosition(Mt,Kt,ct,pt);wo(Yt,jt,Et,xt,Mt,Na,Jt.posMatrix,$a,_a,Ga,Tt,Qa,Jt.toUnwrapped(),gr)}}}(D,R,f,u,f.layout.get("text-rotation-alignment"),f.layout.get("text-pitch-alignment"),f.paint.get("text-translate"),f.paint.get("text-translate-anchor"),V),f.paint.get("icon-opacity").constantOr(1)!==0&&sc(R,u,f,D,!1,f.paint.get("icon-translate"),f.paint.get("icon-translate-anchor"),f.layout.get("icon-rotation-alignment"),f.layout.get("icon-pitch-alignment"),f.layout.get("icon-keep-upright"),J,oe),f.paint.get("text-opacity").constantOr(1)!==0&&sc(R,u,f,D,!0,f.paint.get("text-translate"),f.paint.get("text-translate-anchor"),f.layout.get("text-rotation-alignment"),f.layout.get("text-pitch-alignment"),f.layout.get("text-keep-upright"),J,oe),u.map.showCollisionBoxes&&(ss(R,u,f,D,!0),ss(R,u,f,D,!1))}function ls(R,u,f,D,V,J){const{horizontalAlign:oe,verticalAlign:fe}=r.av(R),xe=-(oe-.5)*u,Ee=-(fe-.5)*f;return new r.P((xe/V+D[0])*J,(Ee/V+D[1])*J)}function gs(R,u,f,D,V,J){const oe=u.tileAnchorPoint.add(new r.P(u.translation[0],u.translation[1]));if(u.pitchWithMap){let fe=D.mult(J);return f||(fe=fe.rotate(-V)),Gt(oe.add(fe),u.labelPlaneMatrix,u.getElevation).point}if(f){const fe=Ye(u.tileAnchorPoint.x+1,u.tileAnchorPoint.y,u).point.sub(R),xe=Math.atan(fe.y/fe.x)+(fe.x<0?Math.PI:0);return R.add(D.rotate(xe))}return R.add(D)}function wo(R,u,f,D,V,J,oe,fe,xe,Ee,Fe,Ge,rt,ct){const pt=R.text.placedSymbolArray,xt=R.text.dynamicLayoutVertexArray,Mt=R.icon.dynamicLayoutVertexArray,Tt={};xt.clear();for(let jt=0;jt<pt.length;jt++){const Et=pt.get(jt),Jt=R.allowVerticalPlacement&&!Et.placedOrientation,Kt=Et.hidden||!Et.crossTileID||Jt?null:D[Et.crossTileID];if(Kt){const Yt=new r.P(Et.anchorX,Et.anchorY),da={getElevation:ct,width:V.width,height:V.height,labelPlaneMatrix:J,lineVertexArray:null,pitchWithMap:f,projection:Fe,projectionCache:null,tileAnchorPoint:Yt,translation:Ge,unwrappedTileID:rt},_a=f?Gt(Yt,oe,ct):Ye(Yt.x,Yt.y,da),Da=ot(V.cameraToCenterDistance,_a.signedDistanceFromCamera);let Na=r.aj(R.textSizeData,xe,Et)*Da/r.aq;f&&(Na*=R.tilePixelRatio/fe);const{width:Ga,height:$a,anchor:gr,textOffset:Qa,textBoxScale:xr}=Kt,nr=ls(gr,Ga,$a,Qa,xr,Na),Sr=Fe.getPitchedTextCorrection(V,Yt.add(new r.P(Ge[0],Ge[1])),rt),pr=gs(_a.point,da,u,nr,V.angle,Sr),Mr=R.allowVerticalPlacement&&Et.placedOrientation===r.ai.vertical?Math.PI/2:0;for(let Wr=0;Wr<Et.numGlyphs;Wr++)r.ak(xt,pr,Mr);Ee&&Et.associatedIconIndex>=0&&(Tt[Et.associatedIconIndex]={shiftedAnchor:pr,angle:Mr})}else Vt(Et.numGlyphs,xt)}if(Ee){Mt.clear();const jt=R.icon.placedSymbolArray;for(let Et=0;Et<jt.length;Et++){const Jt=jt.get(Et);if(Jt.hidden)Vt(Jt.numGlyphs,Mt);else{const Kt=Tt[Et];if(Kt)for(let Yt=0;Yt<Jt.numGlyphs;Yt++)r.ak(Mt,Kt.shiftedAnchor,Kt.angle);else Vt(Jt.numGlyphs,Mt)}}R.icon.dynamicLayoutVertexBuffer.updateData(Mt)}R.text.dynamicLayoutVertexBuffer.updateData(xt)}function ei(R,u,f){return f.iconsInText&&u?"symbolTextAndIcon":R?"symbolSDF":"symbolIcon"}function sc(R,u,f,D,V,J,oe,fe,xe,Ee,Fe,Ge){const rt=R.context,ct=rt.gl,pt=R.transform,xt=Pa(),Mt=fe==="map",Tt=xe==="map",jt=fe!=="viewport"&&f.layout.get("symbol-placement")!=="point",Et=Mt&&!Tt&&!jt,Jt=!Tt&&jt,Kt=!f.layout.get("symbol-sort-key").isConstant();let Yt=!1;const da=R.depthModeForSublayer(0,qn.ReadOnly),_a=f._unevaluatedLayout.hasValue("text-variable-anchor")||f._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Da=[],Na=xt.getCircleRadiusCorrection(pt);for(const Ga of D){const $a=u.getTile(Ga),gr=$a.getBucket(f);if(!gr)continue;const Qa=V?gr.text:gr.icon;if(!Qa||!Qa.segments.get().length||!Qa.hasVisibleVertices)continue;const xr=Qa.programConfigurations.get(f.id),nr=V||gr.sdfIcons,Sr=V?gr.textSizeData:gr.iconSizeData,pr=Tt||pt.pitch!==0,Mr=R.useProgram(ei(nr,V,gr),xr),Wr=r.ah(Sr,pt.zoom),Er=R.style.map.terrain&&R.style.map.terrain.getTerrainData(Ga);let Gr,rn,Dn,Sn,Gn=[0,0],jn=null;if(V){if(rn=$a.glyphAtlasTexture,Dn=ct.LINEAR,Gr=$a.glyphAtlasTexture.size,gr.iconsInText){Gn=$a.imageAtlasTexture.size,jn=$a.imageAtlasTexture;const Nn=Sr.kind==="composite"||Sr.kind==="camera";Sn=pr||R.options.rotating||R.options.zooming||Nn?ct.LINEAR:ct.NEAREST}}else{const Nn=f.layout.get("icon-size").constantOr(0)!==1||gr.iconsNeedLinear;rn=$a.imageAtlasTexture,Dn=nr||R.options.rotating||R.options.zooming||Nn||pr?ct.LINEAR:ct.NEAREST,Gr=$a.imageAtlasTexture.size}const Jn=St($a,1,R.transform.zoom),oi=Jt?Ga.posMatrix:xc,Vi=It(oi,Tt,Mt,R.transform,Jn),zi=Ot(oi,Tt,Mt,R.transform,Jn),ro=Ot(Ga.posMatrix,Tt,Mt,R.transform,Jn),ci=xt.translatePosition(R.transform,$a,J,oe),$n=_a&&gr.hasTextData(),Ai=f.layout.get("icon-text-fit")!=="none"&&$n&&gr.hasIconData();if(jt){const Nn=R.style.map.terrain?(Xi,bs)=>R.style.map.terrain.getElevation(Ga,Xi,bs):null,To=f.layout.get("text-rotation-alignment")==="map";dt(gr,Ga.posMatrix,R,V,Vi,ro,Tt,Ee,To,xt,Ga.toUnwrapped(),pt.width,pt.height,ci,Nn)}const pi=Ga.posMatrix,ai=V&&_a||Ai,ui=jt||ai?xc:Vi,bi=zi,Kn=nr&&f.paint.get(V?"text-halo-width":"icon-halo-width").constantOr(1)!==0;let Ns;Ns=nr?gr.iconsInText?Cr(Sr.kind,Wr,Et,Tt,jt,ai,R,pi,ui,bi,ci,Gr,Gn,Na):_r(Sr.kind,Wr,Et,Tt,jt,ai,R,pi,ui,bi,ci,V,Gr,!0,Na):Pr(Sr.kind,Wr,Et,Tt,jt,ai,R,pi,ui,bi,ci,V,Gr,Na);const Zi={program:Mr,buffers:Qa,uniformValues:Ns,atlasTexture:rn,atlasTextureIcon:jn,atlasInterpolation:Dn,atlasInterpolationIcon:Sn,isSDF:nr,hasHalo:Kn};if(Kt&&gr.canOverlap){Yt=!0;const Nn=Qa.segments.get();for(const To of Nn)Da.push({segments:new r.a0([To]),sortKey:To.sortKey,state:Zi,terrainData:Er})}else Da.push({segments:Qa.segments,sortKey:0,state:Zi,terrainData:Er})}Yt&&Da.sort((Ga,$a)=>Ga.sortKey-$a.sortKey);for(const Ga of Da){const $a=Ga.state;if(rt.activeTexture.set(ct.TEXTURE0),$a.atlasTexture.bind($a.atlasInterpolation,ct.CLAMP_TO_EDGE),$a.atlasTextureIcon&&(rt.activeTexture.set(ct.TEXTURE1),$a.atlasTextureIcon&&$a.atlasTextureIcon.bind($a.atlasInterpolationIcon,ct.CLAMP_TO_EDGE)),$a.isSDF){const gr=$a.uniformValues;$a.hasHalo&&(gr.u_is_halo=1,au($a.buffers,Ga.segments,f,R,$a.program,da,Fe,Ge,gr,Ga.terrainData)),gr.u_is_halo=0}au($a.buffers,Ga.segments,f,R,$a.program,da,Fe,Ge,$a.uniformValues,Ga.terrainData)}}function au(R,u,f,D,V,J,oe,fe,xe,Ee){const Fe=D.context,Ge=Fe.gl;V.draw(Fe,Ge.TRIANGLES,J,oe,fe,xi.disabled,xe,Ee,f.id,R.layoutVertexBuffer,R.indexBuffer,u,f.paint,D.transform.zoom,R.programConfigurations.get(f.id),R.dynamicLayoutVertexBuffer,R.opacityVertexBuffer)}function zl(R,u,f,D){if(f.paint.get("heatmap-opacity")!==0)if(R.renderPass==="offscreen"){const V=R.context,J=V.gl,oe=_i.disabled,fe=new Qi([J.ONE,J.ONE],r.aN.transparent,[!0,!0,!0,!0]);(function(xe,Ee,Fe){const Ge=xe.gl;xe.activeTexture.set(Ge.TEXTURE1),xe.viewport.set([0,0,Ee.width/4,Ee.height/4]);let rt=Fe.heatmapFbo;if(rt)Ge.bindTexture(Ge.TEXTURE_2D,rt.colorAttachment.get()),xe.bindFramebuffer.set(rt.framebuffer);else{const ct=Ge.createTexture();Ge.bindTexture(Ge.TEXTURE_2D,ct),Ge.texParameteri(Ge.TEXTURE_2D,Ge.TEXTURE_WRAP_S,Ge.CLAMP_TO_EDGE),Ge.texParameteri(Ge.TEXTURE_2D,Ge.TEXTURE_WRAP_T,Ge.CLAMP_TO_EDGE),Ge.texParameteri(Ge.TEXTURE_2D,Ge.TEXTURE_MIN_FILTER,Ge.LINEAR),Ge.texParameteri(Ge.TEXTURE_2D,Ge.TEXTURE_MAG_FILTER,Ge.LINEAR),rt=Fe.heatmapFbo=xe.createFramebuffer(Ee.width/4,Ee.height/4,!1,!1),function(pt,xt,Mt,Tt){var jt,Et;const Jt=pt.gl,Kt=(jt=pt.HALF_FLOAT)!==null&&jt!==void 0?jt:Jt.UNSIGNED_BYTE,Yt=(Et=pt.RGBA16F)!==null&&Et!==void 0?Et:Jt.RGBA;Jt.texImage2D(Jt.TEXTURE_2D,0,Yt,xt.width/4,xt.height/4,0,Jt.RGBA,Kt,null),Tt.colorAttachment.set(Mt)}(xe,Ee,ct,rt)}})(V,R,f),V.clear({color:r.aN.transparent});for(let xe=0;xe<D.length;xe++){const Ee=D[xe];if(u.hasRenderableParent(Ee))continue;const Fe=u.getTile(Ee),Ge=Fe.getBucket(f);if(!Ge)continue;const rt=Ge.programConfigurations.get(f.id),ct=R.useProgram("heatmap",rt),{zoom:pt}=R.transform;ct.draw(V,J.TRIANGLES,qn.disabled,oe,fe,xi.disabled,za(Ee.posMatrix,Fe,pt,f.paint.get("heatmap-intensity")),null,f.id,Ge.layoutVertexBuffer,Ge.indexBuffer,Ge.segments,f.paint,R.transform.zoom,rt)}V.viewport.set([0,0,R.width,R.height])}else R.renderPass==="translucent"&&(R.context.setColorMode(R.colorModeForRenderPass()),function(V,J){const oe=V.context,fe=oe.gl,xe=J.heatmapFbo;if(!xe)return;oe.activeTexture.set(fe.TEXTURE0),fe.bindTexture(fe.TEXTURE_2D,xe.colorAttachment.get()),oe.activeTexture.set(fe.TEXTURE1);let Ee=J.colorRampTexture;Ee||(Ee=J.colorRampTexture=new z(oe,J.colorRamp,fe.RGBA)),Ee.bind(fe.LINEAR,fe.CLAMP_TO_EDGE),V.useProgram("heatmapTexture").draw(oe,fe.TRIANGLES,qn.disabled,_i.disabled,V.colorModeForRenderPass(),xi.disabled,qa(V,J,0,1),null,J.id,V.viewportBuffer,V.quadTriangleIndexBuffer,V.viewportSegments,J.paint,V.transform.zoom)}(R,f))}function Ol(R,u,f,D,V){if(!f||!D||!D.imageAtlas)return;const J=D.imageAtlas.patternPositions;let oe=J[f.to.toString()],fe=J[f.from.toString()];if(!oe&&fe&&(oe=fe),!fe&&oe&&(fe=oe),!oe||!fe){const xe=V.getPaintProperty(u);oe=J[xe],fe=J[xe]}oe&&fe&&R.setConstantPatternPositions(oe,fe)}function Bc(R,u,f,D,V,J,oe){const fe=R.context.gl,xe="fill-pattern",Ee=f.paint.get(xe),Fe=Ee&&Ee.constantOr(1),Ge=f.getCrossfadeParameters();let rt,ct,pt,xt,Mt;oe?(ct=Fe&&!f.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",rt=fe.LINES):(ct=Fe?"fillPattern":"fill",rt=fe.TRIANGLES);const Tt=Ee.constantOr(null);for(const jt of D){const Et=u.getTile(jt);if(Fe&&!Et.patternsLoaded())continue;const Jt=Et.getBucket(f);if(!Jt)continue;const Kt=Jt.programConfigurations.get(f.id),Yt=R.useProgram(ct,Kt),da=R.style.map.terrain&&R.style.map.terrain.getTerrainData(jt);Fe&&(R.context.activeTexture.set(fe.TEXTURE0),Et.imageAtlasTexture.bind(fe.LINEAR,fe.CLAMP_TO_EDGE),Kt.updatePaintBuffers(Ge)),Ol(Kt,xe,Tt,Et,f);const _a=da?jt:null,Da=_a?_a.posMatrix:jt.posMatrix,Na=R.translatePosMatrix(Da,Et,f.paint.get("fill-translate"),f.paint.get("fill-translate-anchor"));if(oe){xt=Jt.indexBuffer2,Mt=Jt.segments2;const Ga=[fe.drawingBufferWidth,fe.drawingBufferHeight];pt=ct==="fillOutlinePattern"&&Fe?ma(Na,R,Ge,Et,Ga):Ur(Na,Ga)}else xt=Jt.indexBuffer,Mt=Jt.segments,pt=Fe?Br(Na,R,Ge,Et):mr(Na);Yt.draw(R.context,rt,V,R.stencilModeForClipping(jt),J,xi.disabled,pt,da,f.id,Jt.layoutVertexBuffer,xt,Mt,f.paint,R.transform.zoom,Kt)}}function wc(R,u,f,D,V,J,oe){const fe=R.context,xe=fe.gl,Ee="fill-extrusion-pattern",Fe=f.paint.get(Ee),Ge=Fe.constantOr(1),rt=f.getCrossfadeParameters(),ct=f.paint.get("fill-extrusion-opacity"),pt=Fe.constantOr(null);for(const xt of D){const Mt=u.getTile(xt),Tt=Mt.getBucket(f);if(!Tt)continue;const jt=R.style.map.terrain&&R.style.map.terrain.getTerrainData(xt),Et=Tt.programConfigurations.get(f.id),Jt=R.useProgram(Ge?"fillExtrusionPattern":"fillExtrusion",Et);Ge&&(R.context.activeTexture.set(xe.TEXTURE0),Mt.imageAtlasTexture.bind(xe.LINEAR,xe.CLAMP_TO_EDGE),Et.updatePaintBuffers(rt)),Ol(Et,Ee,pt,Mt,f);const Kt=R.translatePosMatrix(xt.posMatrix,Mt,f.paint.get("fill-extrusion-translate"),f.paint.get("fill-extrusion-translate-anchor")),Yt=f.paint.get("fill-extrusion-vertical-gradient"),da=Ge?vr(Kt,R,Yt,ct,xt,rt,Mt):ar(Kt,R,Yt,ct);Jt.draw(fe,fe.gl.TRIANGLES,V,J,oe,xi.backCCW,da,jt,f.id,Tt.layoutVertexBuffer,Tt.indexBuffer,Tt.segments,f.paint,R.transform.zoom,Et,R.style.map.terrain&&Tt.centroidVertexBuffer)}}function kc(R,u,f,D,V,J,oe){const fe=R.context,xe=fe.gl,Ee=f.fbo;if(!Ee)return;const Fe=R.useProgram("hillshade"),Ge=R.style.map.terrain&&R.style.map.terrain.getTerrainData(u);fe.activeTexture.set(xe.TEXTURE0),xe.bindTexture(xe.TEXTURE_2D,Ee.colorAttachment.get());const rt=Ge?u:null;Fe.draw(fe,xe.TRIANGLES,V,J,oe,xi.disabled,Ra(R,f,D,rt),Ge,D.id,R.rasterBoundsBuffer,R.quadTriangleIndexBuffer,R.rasterBoundsSegments)}function gu(R,u,f,D,V,J){const oe=R.context,fe=oe.gl,xe=u.dem;if(xe&&xe.data){const Ee=xe.dim,Fe=xe.stride,Ge=xe.getPixels();if(oe.activeTexture.set(fe.TEXTURE1),oe.pixelStoreUnpackPremultiplyAlpha.set(!1),u.demTexture=u.demTexture||R.getTileTexture(Fe),u.demTexture){const ct=u.demTexture;ct.update(Ge,{premultiply:!1}),ct.bind(fe.NEAREST,fe.CLAMP_TO_EDGE)}else u.demTexture=new z(oe,Ge,fe.RGBA,{premultiply:!1}),u.demTexture.bind(fe.NEAREST,fe.CLAMP_TO_EDGE);oe.activeTexture.set(fe.TEXTURE0);let rt=u.fbo;if(!rt){const ct=new z(oe,{width:Ee,height:Ee,data:null},fe.RGBA);ct.bind(fe.LINEAR,fe.CLAMP_TO_EDGE),rt=u.fbo=oe.createFramebuffer(Ee,Ee,!0,!1),rt.colorAttachment.set(ct.texture)}oe.bindFramebuffer.set(rt.framebuffer),oe.viewport.set([0,0,Ee,Ee]),R.useProgram("hillshadePrepare").draw(oe,fe.TRIANGLES,D,V,J,xi.disabled,Ia(u.tileID,xe),null,f.id,R.rasterBoundsBuffer,R.quadTriangleIndexBuffer,R.rasterBoundsSegments),u.needsHillshadePrepare=!1}}function As(R,u,f,D,V,J){const oe=D.paint.get("raster-fade-duration");if(!J&&oe>0){const fe=h.now(),xe=(fe-R.timeAdded)/oe,Ee=u?(fe-u.timeAdded)/oe:-1,Fe=f.getSource(),Ge=V.coveringZoomLevel({tileSize:Fe.tileSize,roundZoom:Fe.roundZoom}),rt=!u||Math.abs(u.tileID.overscaledZ-Ge)>Math.abs(R.tileID.overscaledZ-Ge),ct=rt&&R.refreshedUponExpiration?1:r.ad(rt?xe:1-Ee,0,1);return R.refreshedUponExpiration&&xe>=1&&(R.refreshedUponExpiration=!1),u?{opacity:1,mix:1-ct}:{opacity:ct,mix:0}}return{opacity:1,mix:0}}const Hs=new r.aN(1,0,0,1),Dl=new r.aN(0,1,0,1),Es=new r.aN(0,0,1,1),ti=new r.aN(1,0,1,1),Wc=new r.aN(0,1,1,1);function qc(R){const u=R.transform.padding;zc(R,R.transform.height-(u.top||0),3,Hs),zc(R,u.bottom||0,3,Dl),Lo(R,u.left||0,3,Es),Lo(R,R.transform.width-(u.right||0),3,ti);const f=R.transform.centerPoint;(function(D,V,J,oe){Sc(D,V-1,J-10,2,20,oe),Sc(D,V-10,J-1,20,2,oe)})(R,f.x,R.transform.height-f.y,Wc)}function zc(R,u,f,D){Sc(R,0,u+f/2,R.transform.width,f,D)}function Lo(R,u,f,D){Sc(R,u-f/2,0,f,R.transform.height,D)}function Sc(R,u,f,D,V,J){const oe=R.context,fe=oe.gl;fe.enable(fe.SCISSOR_TEST),fe.scissor(u*R.pixelRatio,f*R.pixelRatio,D*R.pixelRatio,V*R.pixelRatio),oe.clear({color:J}),fe.disable(fe.SCISSOR_TEST)}function Su(R,u,f){const D=R.context,V=D.gl,J=f.posMatrix,oe=R.useProgram("debug"),fe=qn.disabled,xe=_i.disabled,Ee=R.colorModeForRenderPass(),Fe="$debug",Ge=R.style.map.terrain&&R.style.map.terrain.getTerrainData(f);D.activeTexture.set(V.TEXTURE0);const rt=u.getTileByID(f.key).latestRawTileData,ct=rt&&rt.byteLength||0,pt=Math.floor(ct/1024),xt=u.getTile(f).tileSize,Mt=512/Math.min(xt,512)*(f.overscaledZ/R.transform.zoom)*.5;let Tt=f.canonical.toString();f.overscaledZ!==f.canonical.z&&(Tt+=` => ${f.overscaledZ}`),function(jt,Et){jt.initDebugOverlayCanvas();const Jt=jt.debugOverlayCanvas,Kt=jt.context.gl,Yt=jt.debugOverlayCanvas.getContext("2d");Yt.clearRect(0,0,Jt.width,Jt.height),Yt.shadowColor="white",Yt.shadowBlur=2,Yt.lineWidth=1.5,Yt.strokeStyle="white",Yt.textBaseline="top",Yt.font="bold 36px Open Sans, sans-serif",Yt.fillText(Et,5,5),Yt.strokeText(Et,5,5),jt.debugOverlayTexture.update(Jt),jt.debugOverlayTexture.bind(Kt.LINEAR,Kt.CLAMP_TO_EDGE)}(R,`${Tt} ${pt}kB`),oe.draw(D,V.TRIANGLES,fe,xe,Qi.alphaBlended,xi.disabled,fa(J,r.aN.transparent,Mt),null,Fe,R.debugBuffer,R.quadTriangleIndexBuffer,R.debugSegments),oe.draw(D,V.LINE_STRIP,fe,xe,Ee,xi.disabled,fa(J,r.aN.red),Ge,Fe,R.debugBuffer,R.tileBorderIndexBuffer,R.debugSegments)}function lc(R,u,f){const D=R.context,V=D.gl,J=R.colorModeForRenderPass(),oe=new qn(V.LEQUAL,qn.ReadWrite,R.depthRangeFor3D),fe=R.useProgram("terrain"),xe=u.getTerrainMesh();D.bindFramebuffer.set(null),D.viewport.set([0,0,R.width,R.height]);for(const Ee of f){const Fe=R.renderToTexture.getTexture(Ee),Ge=u.getTerrainData(Ee.tileID);D.activeTexture.set(V.TEXTURE0),V.bindTexture(V.TEXTURE_2D,Fe.texture);const rt=R.transform.calculatePosMatrix(Ee.tileID.toUnwrapped()),ct=u.getMeshFrameDelta(R.transform.zoom),pt=R.transform.calculateFogMatrix(Ee.tileID.toUnwrapped()),xt=va(rt,ct,pt,R.style.sky,R.transform.pitch);fe.draw(D,V.TRIANGLES,oe,_i.disabled,J,xi.backCCW,xt,Ge,"terrain",xe.vertexBuffer,xe.indexBuffer,xe.segments)}}class cc{constructor(u,f,D){this.vertexBuffer=u,this.indexBuffer=f,this.segments=D}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}class uc{constructor(u,f){this.context=new _c(u),this.transform=f,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:r.ao(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=We.maxUnderzooming+We.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new er}resize(u,f,D){if(this.width=Math.floor(u*D),this.height=Math.floor(f*D),this.pixelRatio=D,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const V of this.style._order)this.style._layers[V].resize()}setup(){const u=this.context,f=new r.aX;f.emplaceBack(0,0),f.emplaceBack(r.X,0),f.emplaceBack(0,r.X),f.emplaceBack(r.X,r.X),this.tileExtentBuffer=u.createVertexBuffer(f,yr.members),this.tileExtentSegments=r.a0.simpleSegment(0,0,4,2);const D=new r.aX;D.emplaceBack(0,0),D.emplaceBack(r.X,0),D.emplaceBack(0,r.X),D.emplaceBack(r.X,r.X),this.debugBuffer=u.createVertexBuffer(D,yr.members),this.debugSegments=r.a0.simpleSegment(0,0,4,5);const V=new r.$;V.emplaceBack(0,0,0,0),V.emplaceBack(r.X,0,r.X,0),V.emplaceBack(0,r.X,0,r.X),V.emplaceBack(r.X,r.X,r.X,r.X),this.rasterBoundsBuffer=u.createVertexBuffer(V,Ve.members),this.rasterBoundsSegments=r.a0.simpleSegment(0,0,4,2);const J=new r.aX;J.emplaceBack(0,0),J.emplaceBack(1,0),J.emplaceBack(0,1),J.emplaceBack(1,1),this.viewportBuffer=u.createVertexBuffer(J,yr.members),this.viewportSegments=r.a0.simpleSegment(0,0,4,2);const oe=new r.aZ;oe.emplaceBack(0),oe.emplaceBack(1),oe.emplaceBack(3),oe.emplaceBack(2),oe.emplaceBack(0),this.tileBorderIndexBuffer=u.createIndexBuffer(oe);const fe=new r.aY;fe.emplaceBack(0,1,2),fe.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=u.createIndexBuffer(fe);const xe=this.context.gl;this.stencilClearMode=new _i({func:xe.ALWAYS,mask:0},0,255,xe.ZERO,xe.ZERO,xe.ZERO)}clearStencil(){const u=this.context,f=u.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const D=r.H();r.aQ(D,0,this.width,this.height,0,0,1),r.K(D,D,[f.drawingBufferWidth,f.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(u,f.TRIANGLES,qn.disabled,this.stencilClearMode,Qi.disabled,xi.disabled,Oa(D),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(u,f){if(this.currentStencilSource===u.source||!u.isTileClipped()||!f||!f.length)return;this.currentStencilSource=u.source;const D=this.context,V=D.gl;this.nextStencilID+f.length>256&&this.clearStencil(),D.setColorMode(Qi.disabled),D.setDepthMode(qn.disabled);const J=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(const oe of f){const fe=this._tileClippingMaskIDs[oe.key]=this.nextStencilID++,xe=this.style.map.terrain&&this.style.map.terrain.getTerrainData(oe);J.draw(D,V.TRIANGLES,qn.disabled,new _i({func:V.ALWAYS,mask:0},fe,255,V.KEEP,V.KEEP,V.REPLACE),Qi.disabled,xi.disabled,Oa(oe.posMatrix),xe,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const u=this.nextStencilID++,f=this.context.gl;return new _i({func:f.NOTEQUAL,mask:255},u,255,f.KEEP,f.KEEP,f.REPLACE)}stencilModeForClipping(u){const f=this.context.gl;return new _i({func:f.EQUAL,mask:255},this._tileClippingMaskIDs[u.key],0,f.KEEP,f.KEEP,f.REPLACE)}stencilConfigForOverlap(u){const f=this.context.gl,D=u.sort((oe,fe)=>fe.overscaledZ-oe.overscaledZ),V=D[D.length-1].overscaledZ,J=D[0].overscaledZ-V+1;if(J>1){this.currentStencilSource=void 0,this.nextStencilID+J>256&&this.clearStencil();const oe={};for(let fe=0;fe<J;fe++)oe[fe+V]=new _i({func:f.GEQUAL,mask:255},fe+this.nextStencilID,255,f.KEEP,f.KEEP,f.REPLACE);return this.nextStencilID+=J,[oe,D]}return[{[V]:_i.disabled},D]}colorModeForRenderPass(){const u=this.context.gl;return this._showOverdrawInspector?new Qi([u.CONSTANT_COLOR,u.ONE],new r.aN(.125,.125,.125,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?Qi.unblended:Qi.alphaBlended}depthModeForSublayer(u,f,D){if(!this.opaquePassEnabledForLayer())return qn.disabled;const V=1-((1+this.currentLayer)*this.numSublayers+u)*this.depthEpsilon;return new qn(D||this.context.gl.LEQUAL,f,[V,V])}opaquePassEnabledForLayer(){return this.currentLayer<this.opaquePassCutoff}render(u,f){var D;this.style=u,this.options=f,this.lineAtlas=u.lineAtlas,this.imageManager=u.imageManager,this.glyphManager=u.glyphManager,this.symbolFadeChange=u.placement.symbolFadeChange(h.now()),this.imageManager.beginFrame();const V=this.style._order,J=this.style.sourceCaches,oe={},fe={},xe={};for(const Ee in J){const Fe=J[Ee];Fe.used&&Fe.prepare(this.context),oe[Ee]=Fe.getVisibleCoordinates(),fe[Ee]=oe[Ee].slice().reverse(),xe[Ee]=Fe.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let Ee=0;Ee<V.length;Ee++){const Fe=V[Ee];if(this.style._layers[Fe].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 V){const Fe=this.style._layers[Ee];if(!Fe.hasOffscreenPass()||Fe.isHidden(this.transform.zoom))continue;const Ge=fe[Fe.source];(Fe.type==="custom"||Ge.length)&&this.renderLayer(this,J[Fe.source],Fe,Ge)}if(this.context.bindFramebuffer.set(null),this.context.clear({color:f.showOverdrawInspector?r.aN.black:r.aN.transparent,depth:1}),this.clearStencil(),!((D=this.style.stylesheet)===null||D===void 0)&&D.sky&&function(Ee,Fe){const Ge=Ee.context,rt=Ge.gl,ct=((jt,Et,Jt)=>({u_sky_color:jt.properties.get("sky-color"),u_horizon_color:jt.properties.get("horizon-color"),u_horizon:(Et.height/2+Et.getHorizon())*Jt,u_sky_horizon_blend:jt.properties.get("sky-horizon-blend")*Et.height/2*Jt}))(Fe,Ee.style.map.transform,Ee.pixelRatio),pt=new qn(rt.LEQUAL,qn.ReadWrite,[0,1]),xt=_i.disabled,Mt=Ee.colorModeForRenderPass(),Tt=Ee.useProgram("sky");if(!Fe.mesh){const jt=new r.aX;jt.emplaceBack(-1,-1),jt.emplaceBack(1,-1),jt.emplaceBack(1,1),jt.emplaceBack(-1,1);const Et=new r.aY;Et.emplaceBack(0,1,2),Et.emplaceBack(0,2,3),Fe.mesh=new cc(Ge.createVertexBuffer(jt,yr.members),Ge.createIndexBuffer(Et),r.a0.simpleSegment(0,0,jt.length,Et.length))}Tt.draw(Ge,rt.TRIANGLES,pt,xt,Mt,xi.disabled,ct,void 0,"sky",Fe.mesh.vertexBuffer,Fe.mesh.indexBuffer,Fe.mesh.segments)}(this,this.style.sky),this._showOverdrawInspector=f.showOverdrawInspector,this.depthRangeFor3D=[0,1-(u._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=V.length-1;this.currentLayer>=0;this.currentLayer--){const Ee=this.style._layers[V[this.currentLayer]],Fe=J[Ee.source],Ge=oe[Ee.source];this._renderTileClippingMasks(Ee,Ge),this.renderLayer(this,Fe,Ee,Ge)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<V.length;this.currentLayer++){const Ee=this.style._layers[V[this.currentLayer]],Fe=J[Ee.source];if(this.renderToTexture&&this.renderToTexture.renderLayer(Ee))continue;const Ge=(Ee.type==="symbol"?xe:fe)[Ee.source];this._renderTileClippingMasks(Ee,oe[Ee.source]),this.renderLayer(this,Fe,Ee,Ge)}if(this.options.showTileBoundaries){const Ee=function(Fe,Ge){let rt=null;const ct=Object.values(Fe._layers).flatMap(Tt=>Tt.source&&!Tt.isHidden(Ge)?[Fe.sourceCaches[Tt.source]]:[]),pt=ct.filter(Tt=>Tt.getSource().type==="vector"),xt=ct.filter(Tt=>Tt.getSource().type!=="vector"),Mt=Tt=>{(!rt||rt.getSource().maxzoom<Tt.getSource().maxzoom)&&(rt=Tt)};return pt.forEach(Tt=>Mt(Tt)),rt||xt.forEach(Tt=>Mt(Tt)),rt}(this.style,this.transform.zoom);Ee&&function(Fe,Ge,rt){for(let ct=0;ct<rt.length;ct++)Su(Fe,Ge,rt[ct])}(this,Ee,Ee.getVisibleCoordinates())}this.options.showPadding&&qc(this),this.context.setDefault()}maybeDrawDepthAndCoords(u){if(!this.style||!this.style.map||!this.style.map.terrain)return;const f=this.terrainFacilitator.matrix,D=this.transform.modelViewProjectionMatrix;let V=this.terrainFacilitator.dirty;V||(V=u?!r.a_(f,D):!r.a$(f,D)),V||(V=this.style.map.terrain.sourceCache.tilesAfterTime(this.terrainFacilitator.renderTime).length>0),V&&(r.b0(f,D),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(J,oe){const fe=J.context,xe=fe.gl,Ee=Qi.unblended,Fe=new qn(xe.LEQUAL,qn.ReadWrite,[0,1]),Ge=oe.getTerrainMesh(),rt=oe.sourceCache.getRenderableTiles(),ct=J.useProgram("terrainDepth");fe.bindFramebuffer.set(oe.getFramebuffer("depth").framebuffer),fe.viewport.set([0,0,J.width/devicePixelRatio,J.height/devicePixelRatio]),fe.clear({color:r.aN.transparent,depth:1});for(const pt of rt){const xt=oe.getTerrainData(pt.tileID),Mt={u_matrix:J.transform.calculatePosMatrix(pt.tileID.toUnwrapped()),u_ele_delta:oe.getMeshFrameDelta(J.transform.zoom)};ct.draw(fe,xe.TRIANGLES,Fe,_i.disabled,Ee,xi.backCCW,Mt,xt,"terrain",Ge.vertexBuffer,Ge.indexBuffer,Ge.segments)}fe.bindFramebuffer.set(null),fe.viewport.set([0,0,J.width,J.height])}(this,this.style.map.terrain),function(J,oe){const fe=J.context,xe=fe.gl,Ee=Qi.unblended,Fe=new qn(xe.LEQUAL,qn.ReadWrite,[0,1]),Ge=oe.getTerrainMesh(),rt=oe.getCoordsTexture(),ct=oe.sourceCache.getRenderableTiles(),pt=J.useProgram("terrainCoords");fe.bindFramebuffer.set(oe.getFramebuffer("coords").framebuffer),fe.viewport.set([0,0,J.width/devicePixelRatio,J.height/devicePixelRatio]),fe.clear({color:r.aN.transparent,depth:1}),oe.coordsIndex=[];for(const xt of ct){const Mt=oe.getTerrainData(xt.tileID);fe.activeTexture.set(xe.TEXTURE0),xe.bindTexture(xe.TEXTURE_2D,rt.texture);const Tt={u_matrix:J.transform.calculatePosMatrix(xt.tileID.toUnwrapped()),u_terrain_coords_id:(255-oe.coordsIndex.length)/255,u_texture:0,u_ele_delta:oe.getMeshFrameDelta(J.transform.zoom)};pt.draw(fe,xe.TRIANGLES,Fe,_i.disabled,Ee,xi.backCCW,Tt,Mt,"terrain",Ge.vertexBuffer,Ge.indexBuffer,Ge.segments),oe.coordsIndex.push(xt.tileID.key)}fe.bindFramebuffer.set(null),fe.viewport.set([0,0,J.width,J.height])}(this,this.style.map.terrain))}renderLayer(u,f,D,V){if(!D.isHidden(this.transform.zoom)&&(D.type==="background"||D.type==="custom"||(V||[]).length))switch(this.id=D.id,D.type){case"symbol":Bl(u,f,D,V,this.style.placement.variableOffsets);break;case"circle":(function(J,oe,fe,xe){if(J.renderPass!=="translucent")return;const Ee=fe.paint.get("circle-opacity"),Fe=fe.paint.get("circle-stroke-width"),Ge=fe.paint.get("circle-stroke-opacity"),rt=!fe.layout.get("circle-sort-key").isConstant();if(Ee.constantOr(1)===0&&(Fe.constantOr(1)===0||Ge.constantOr(1)===0))return;const ct=J.context,pt=ct.gl,xt=J.depthModeForSublayer(0,qn.ReadOnly),Mt=_i.disabled,Tt=J.colorModeForRenderPass(),jt=[];for(let Et=0;Et<xe.length;Et++){const Jt=xe[Et],Kt=oe.getTile(Jt),Yt=Kt.getBucket(fe);if(!Yt)continue;const da=Yt.programConfigurations.get(fe.id),_a=J.useProgram("circle",da),Da=Yt.layoutVertexBuffer,Na=Yt.indexBuffer,Ga=J.style.map.terrain&&J.style.map.terrain.getTerrainData(Jt),$a={programConfiguration:da,program:_a,layoutVertexBuffer:Da,indexBuffer:Na,uniformValues:Ua(J,Jt,Kt,fe),terrainData:Ga};if(rt){const gr=Yt.segments.get();for(const Qa of gr)jt.push({segments:new r.a0([Qa]),sortKey:Qa.sortKey,state:$a})}else jt.push({segments:Yt.segments,sortKey:0,state:$a})}rt&&jt.sort((Et,Jt)=>Et.sortKey-Jt.sortKey);for(const Et of jt){const{programConfiguration:Jt,program:Kt,layoutVertexBuffer:Yt,indexBuffer:da,uniformValues:_a,terrainData:Da}=Et.state,Na=Et.segments;Kt.draw(ct,pt.TRIANGLES,xt,Mt,Tt,xi.disabled,_a,Da,fe.id,Yt,da,Na,fe.paint,J.transform.zoom,Jt)}})(u,f,D,V);break;case"heatmap":zl(u,f,D,V);break;case"line":(function(J,oe,fe,xe){if(J.renderPass!=="translucent")return;const Ee=fe.paint.get("line-opacity"),Fe=fe.paint.get("line-width");if(Ee.constantOr(1)===0||Fe.constantOr(1)===0)return;const Ge=J.depthModeForSublayer(0,qn.ReadOnly),rt=J.colorModeForRenderPass(),ct=fe.paint.get("line-dasharray"),pt=fe.paint.get("line-pattern"),xt=pt.constantOr(1),Mt=fe.paint.get("line-gradient"),Tt=fe.getCrossfadeParameters(),jt=xt?"linePattern":ct?"lineSDF":Mt?"lineGradient":"line",Et=J.context,Jt=Et.gl;let Kt=!0;for(const Yt of xe){const da=oe.getTile(Yt);if(xt&&!da.patternsLoaded())continue;const _a=da.getBucket(fe);if(!_a)continue;const Da=_a.programConfigurations.get(fe.id),Na=J.context.program.get(),Ga=J.useProgram(jt,Da),$a=Kt||Ga.program!==Na,gr=J.style.map.terrain&&J.style.map.terrain.getTerrainData(Yt),Qa=pt.constantOr(null);if(Qa&&da.imageAtlas){const Sr=da.imageAtlas,pr=Sr.patternPositions[Qa.to.toString()],Mr=Sr.patternPositions[Qa.from.toString()];pr&&Mr&&Da.setConstantPatternPositions(pr,Mr)}const xr=gr?Yt:null,nr=xt?Ja(J,da,fe,Tt,xr):ct?lr(J,da,fe,ct,Tt,xr):Mt?Sa(J,da,fe,_a.lineClipsArray.length,xr):oa(J,da,fe,xr);if(xt)Et.activeTexture.set(Jt.TEXTURE0),da.imageAtlasTexture.bind(Jt.LINEAR,Jt.CLAMP_TO_EDGE),Da.updatePaintBuffers(Tt);else if(ct&&($a||J.lineAtlas.dirty))Et.activeTexture.set(Jt.TEXTURE0),J.lineAtlas.bind(Et);else if(Mt){const Sr=_a.gradients[fe.id];let pr=Sr.texture;if(fe.gradientVersion!==Sr.version){let Mr=256;if(fe.stepInterpolant){const Wr=oe.getSource().maxzoom,Er=Yt.canonical.z===Wr?Math.ceil(1<<J.transform.maxZoom-Yt.canonical.z):1,Gr=_a.maxLineLength/r.X*1024*Er;Mr=r.ad(r.aV(Gr),256,Et.maxTextureSize)}Sr.gradient=r.aW({expression:fe.gradientExpression(),evaluationKey:"lineProgress",resolution:Mr,image:Sr.gradient||void 0,clips:_a.lineClipsArray}),Sr.texture?Sr.texture.update(Sr.gradient):Sr.texture=new z(Et,Sr.gradient,Jt.RGBA),Sr.version=fe.gradientVersion,pr=Sr.texture}Et.activeTexture.set(Jt.TEXTURE0),pr.bind(fe.stepInterpolant?Jt.NEAREST:Jt.LINEAR,Jt.CLAMP_TO_EDGE)}Ga.draw(Et,Jt.TRIANGLES,Ge,J.stencilModeForClipping(Yt),rt,xi.disabled,nr,gr,fe.id,_a.layoutVertexBuffer,_a.indexBuffer,_a.segments,fe.paint,J.transform.zoom,Da,_a.layoutVertexBuffer2),Kt=!1}})(u,f,D,V);break;case"fill":(function(J,oe,fe,xe){const Ee=fe.paint.get("fill-color"),Fe=fe.paint.get("fill-opacity");if(Fe.constantOr(1)===0)return;const Ge=J.colorModeForRenderPass(),rt=fe.paint.get("fill-pattern"),ct=J.opaquePassEnabledForLayer()&&!rt.constantOr(1)&&Ee.constantOr(r.aN.transparent).a===1&&Fe.constantOr(0)===1?"opaque":"translucent";if(J.renderPass===ct){const pt=J.depthModeForSublayer(1,J.renderPass==="opaque"?qn.ReadWrite:qn.ReadOnly);Bc(J,oe,fe,xe,pt,Ge,!1)}if(J.renderPass==="translucent"&&fe.paint.get("fill-antialias")){const pt=J.depthModeForSublayer(fe.getPaintProperty("fill-outline-color")?2:0,qn.ReadOnly);Bc(J,oe,fe,xe,pt,Ge,!0)}})(u,f,D,V);break;case"fill-extrusion":(function(J,oe,fe,xe){const Ee=fe.paint.get("fill-extrusion-opacity");if(Ee!==0&&J.renderPass==="translucent"){const Fe=new qn(J.context.gl.LEQUAL,qn.ReadWrite,J.depthRangeFor3D);if(Ee!==1||fe.paint.get("fill-extrusion-pattern").constantOr(1))wc(J,oe,fe,xe,Fe,_i.disabled,Qi.disabled),wc(J,oe,fe,xe,Fe,J.stencilModeFor3D(),J.colorModeForRenderPass());else{const Ge=J.colorModeForRenderPass();wc(J,oe,fe,xe,Fe,_i.disabled,Ge)}}})(u,f,D,V);break;case"hillshade":(function(J,oe,fe,xe){if(J.renderPass!=="offscreen"&&J.renderPass!=="translucent")return;const Ee=J.context,Fe=J.depthModeForSublayer(0,qn.ReadOnly),Ge=J.colorModeForRenderPass(),[rt,ct]=J.renderPass==="translucent"?J.stencilConfigForOverlap(xe):[{},xe];for(const pt of ct){const xt=oe.getTile(pt);xt.needsHillshadePrepare!==void 0&&xt.needsHillshadePrepare&&J.renderPass==="offscreen"?gu(J,xt,fe,Fe,_i.disabled,Ge):J.renderPass==="translucent"&&kc(J,pt,xt,fe,Fe,rt[pt.overscaledZ],Ge)}Ee.viewport.set([0,0,J.width,J.height])})(u,f,D,V);break;case"raster":(function(J,oe,fe,xe){if(J.renderPass!=="translucent"||fe.paint.get("raster-opacity")===0||!xe.length)return;const Ee=J.context,Fe=Ee.gl,Ge=oe.getSource(),rt=J.useProgram("raster"),ct=J.colorModeForRenderPass(),[pt,xt]=Ge instanceof Ie?[{},xe]:J.stencilConfigForOverlap(xe),Mt=xt[xt.length-1].overscaledZ,Tt=!J.options.moving;for(const jt of xt){const Et=J.depthModeForSublayer(jt.overscaledZ-Mt,fe.paint.get("raster-opacity")===1?qn.ReadWrite:qn.ReadOnly,Fe.LESS),Jt=oe.getTile(jt);Jt.registerFadeDuration(fe.paint.get("raster-fade-duration"));const Kt=oe.findLoadedParent(jt,0),Yt=oe.findLoadedSibling(jt),da=As(Jt,Kt||Yt||null,oe,fe,J.transform,J.style.map.terrain);let _a,Da;const Na=fe.paint.get("raster-resampling")==="nearest"?Fe.NEAREST:Fe.LINEAR;Ee.activeTexture.set(Fe.TEXTURE0),Jt.texture.bind(Na,Fe.CLAMP_TO_EDGE,Fe.LINEAR_MIPMAP_NEAREST),Ee.activeTexture.set(Fe.TEXTURE1),Kt?(Kt.texture.bind(Na,Fe.CLAMP_TO_EDGE,Fe.LINEAR_MIPMAP_NEAREST),_a=Math.pow(2,Kt.tileID.overscaledZ-Jt.tileID.overscaledZ),Da=[Jt.tileID.canonical.x*_a%1,Jt.tileID.canonical.y*_a%1]):Jt.texture.bind(Na,Fe.CLAMP_TO_EDGE,Fe.LINEAR_MIPMAP_NEAREST),Jt.texture.useMipmap&&Ee.extTextureFilterAnisotropic&&J.transform.pitch>20&&Fe.texParameterf(Fe.TEXTURE_2D,Ee.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,Ee.extTextureFilterAnisotropicMax);const Ga=J.style.map.terrain&&J.style.map.terrain.getTerrainData(jt),$a=Ga?jt:null,gr=$a?$a.posMatrix:J.transform.calculatePosMatrix(jt.toUnwrapped(),Tt),Qa=Ar(gr,Da||[0,0],_a||1,da,fe);Ge instanceof Ie?rt.draw(Ee,Fe.TRIANGLES,Et,_i.disabled,ct,xi.disabled,Qa,Ga,fe.id,Ge.boundsBuffer,J.quadTriangleIndexBuffer,Ge.boundsSegments):rt.draw(Ee,Fe.TRIANGLES,Et,pt[jt.overscaledZ],ct,xi.disabled,Qa,Ga,fe.id,J.rasterBoundsBuffer,J.quadTriangleIndexBuffer,J.rasterBoundsSegments)}})(u,f,D,V);break;case"background":(function(J,oe,fe,xe){const Ee=fe.paint.get("background-color"),Fe=fe.paint.get("background-opacity");if(Fe===0)return;const Ge=J.context,rt=Ge.gl,ct=J.transform,pt=ct.tileSize,xt=fe.paint.get("background-pattern");if(J.isPatternMissing(xt))return;const Mt=!xt&&Ee.a===1&&Fe===1&&J.opaquePassEnabledForLayer()?"opaque":"translucent";if(J.renderPass!==Mt)return;const Tt=_i.disabled,jt=J.depthModeForSublayer(0,Mt==="opaque"?qn.ReadWrite:qn.ReadOnly),Et=J.colorModeForRenderPass(),Jt=J.useProgram(xt?"backgroundPattern":"background"),Kt=xe||ct.coveringTiles({tileSize:pt,terrain:J.style.map.terrain});xt&&(Ge.activeTexture.set(rt.TEXTURE0),J.imageManager.bind(J.context));const Yt=fe.getCrossfadeParameters();for(const da of Kt){const _a=xe?da.posMatrix:J.transform.calculatePosMatrix(da.toUnwrapped()),Da=xt?Kr(_a,Fe,J,xt,{tileID:da,tileSize:pt},Yt):Or(_a,Fe,Ee),Na=J.style.map.terrain&&J.style.map.terrain.getTerrainData(da);Jt.draw(Ge,rt.TRIANGLES,jt,Tt,Et,xi.disabled,Da,Na,fe.id,J.tileExtentBuffer,J.quadTriangleIndexBuffer,J.tileExtentSegments)}})(u,0,D,V);break;case"custom":(function(J,oe,fe){const xe=J.context,Ee=fe.implementation;if(J.renderPass==="offscreen"){const Fe=Ee.prerender;Fe&&(J.setCustomLayerDefaults(),xe.setColorMode(J.colorModeForRenderPass()),Fe.call(Ee,xe.gl,J.transform.customLayerMatrix()),xe.setDirty(),J.setBaseState())}else if(J.renderPass==="translucent"){J.setCustomLayerDefaults(),xe.setColorMode(J.colorModeForRenderPass()),xe.setStencilMode(_i.disabled);const Fe=Ee.renderingMode==="3d"?new qn(J.context.gl.LEQUAL,qn.ReadWrite,J.depthRangeFor3D):J.depthModeForSublayer(0,qn.ReadOnly);xe.setDepthMode(Fe),Ee.render(xe.gl,J.transform.customLayerMatrix(),{farZ:J.transform.farZ,nearZ:J.transform.nearZ,fov:J.transform._fov,modelViewProjectionMatrix:J.transform.modelViewProjectionMatrix,projectionMatrix:J.transform.projectionMatrix}),xe.setDirty(),J.setBaseState(),xe.bindFramebuffer.set(null)}})(u,0,D)}}translatePosMatrix(u,f,D,V,J){if(!D[0]&&!D[1])return u;const oe=J?V==="map"?this.transform.angle:0:V==="viewport"?-this.transform.angle:0;if(oe){const Ee=Math.sin(oe),Fe=Math.cos(oe);D=[D[0]*Fe-D[1]*Ee,D[0]*Ee+D[1]*Fe]}const fe=[J?D[0]:St(f,D[0],this.transform.zoom),J?D[1]:St(f,D[1],this.transform.zoom),0],xe=new Float32Array(16);return r.J(xe,u,fe),xe}saveTileTexture(u){const f=this._tileTextures[u.size[0]];f?f.push(u):this._tileTextures[u.size[0]]=[u]}getTileTexture(u){const f=this._tileTextures[u];return f&&f.length>0?f.pop():null}isPatternMissing(u){if(!u)return!1;if(!u.from||!u.to)return!0;const f=this.imageManager.getPattern(u.from.toString()),D=this.imageManager.getPattern(u.to.toString());return!f||!D}useProgram(u,f){this.cache=this.cache||{};const D=u+(f?f.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[D]||(this.cache[D]=new tr(this.context,br[u],f,jr[u],this._showOverdrawInspector,this.style.map.terrain)),this.cache[D]}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 u=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(u.FUNC_ADD)}initDebugOverlayCanvas(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;const u=this.context.gl;this.debugOverlayTexture=new z(this.context,this.debugOverlayCanvas,u.RGBA)}}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){const{drawingBufferWidth:u,drawingBufferHeight:f}=this.context.gl;return this.width!==u||this.height!==f}}class Zs{constructor(u,f){this.points=u,this.planes=f}static fromInvProjectionMatrix(u,f,D){const V=Math.pow(2,D),J=[[-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(fe=>{const xe=1/(fe=r.ag([],fe,u))[3]/f*V;return r.b1(fe,fe,[xe,xe,1/fe[3],xe])}),oe=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(fe=>{const xe=function(rt,ct){var pt=ct[0],xt=ct[1],Mt=ct[2],Tt=pt*pt+xt*xt+Mt*Mt;return Tt>0&&(Tt=1/Math.sqrt(Tt)),rt[0]=ct[0]*Tt,rt[1]=ct[1]*Tt,rt[2]=ct[2]*Tt,rt}([],function(rt,ct,pt){var xt=ct[0],Mt=ct[1],Tt=ct[2],jt=pt[0],Et=pt[1],Jt=pt[2];return rt[0]=Mt*Jt-Tt*Et,rt[1]=Tt*jt-xt*Jt,rt[2]=xt*Et-Mt*jt,rt}([],L([],J[fe[0]],J[fe[1]]),L([],J[fe[2]],J[fe[1]]))),Ee=(Fe=xe,Ge=J[fe[1]],-(Fe[0]*Ge[0]+Fe[1]*Ge[1]+Fe[2]*Ge[2]));var Fe,Ge;return xe.concat(Ee)});return new Zs(J,oe)}}class Ms{constructor(u,f){this.min=u,this.max=f,this.center=function(D,V,J){return D[0]=V[0]*J,D[1]=V[1]*J,D[2]=V[2]*J,D}([],function(D,V,J){return D[0]=V[0]+J[0],D[1]=V[1]+J[1],D[2]=V[2]+J[2],D}([],this.min,this.max),.5)}quadrant(u){const f=[u%2==0,u<2],D=A(this.min),V=A(this.max);for(let J=0;J<f.length;J++)D[J]=f[J]?this.min[J]:this.center[J],V[J]=f[J]?this.center[J]:this.max[J];return V[2]=this.max[2],new Ms(D,V)}distanceX(u){return Math.max(Math.min(this.max[0],u[0]),this.min[0])-u[0]}distanceY(u){return Math.max(Math.min(this.max[1],u[1]),this.min[1])-u[1]}intersects(u){const f=[[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 D=!0;for(let V=0;V<u.planes.length;V++){const J=u.planes[V];let oe=0;for(let fe=0;fe<f.length;fe++)r.b2(J,f[fe])>=0&&oe++;if(oe===0)return 0;oe!==f.length&&(D=!1)}if(D)return 2;for(let V=0;V<3;V++){let J=Number.MAX_VALUE,oe=-Number.MAX_VALUE;for(let fe=0;fe<u.points.length;fe++){const xe=u.points[fe][V]-this.min[V];J=Math.min(J,xe),oe=Math.max(oe,xe)}if(oe<0||J>this.max[V]-this.min[V])return 0}return 1}}class Nl{constructor(u=0,f=0,D=0,V=0){if(isNaN(u)||u<0||isNaN(f)||f<0||isNaN(D)||D<0||isNaN(V)||V<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=u,this.bottom=f,this.left=D,this.right=V}interpolate(u,f,D){return f.top!=null&&u.top!=null&&(this.top=r.z.number(u.top,f.top,D)),f.bottom!=null&&u.bottom!=null&&(this.bottom=r.z.number(u.bottom,f.bottom,D)),f.left!=null&&u.left!=null&&(this.left=r.z.number(u.left,f.left,D)),f.right!=null&&u.right!=null&&(this.right=r.z.number(u.right,f.right,D)),this}getCenter(u,f){const D=r.ad((this.left+u-this.right)/2,0,u),V=r.ad((this.top+f-this.bottom)/2,0,f);return new r.P(D,V)}equals(u){return this.top===u.top&&this.bottom===u.bottom&&this.left===u.left&&this.right===u.right}clone(){return new Nl(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}const Cc=85.051129;class di{constructor(u,f,D,V,J){this.tileSize=512,this._renderWorldCopies=J===void 0||!!J,this._minZoom=u||0,this._maxZoom=f||22,this._minPitch=D??0,this._maxPitch=V??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new r.N(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new Nl,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={},this.minElevationForCurrentTile=0}clone(){const u=new di(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return u.apply(this),u}apply(u){this.tileSize=u.tileSize,this.latRange=u.latRange,this.width=u.width,this.height=u.height,this._center=u._center,this._elevation=u._elevation,this.minElevationForCurrentTile=u.minElevationForCurrentTile,this.zoom=u.zoom,this.angle=u.angle,this._fov=u._fov,this._pitch=u._pitch,this._unmodified=u._unmodified,this._edgeInsets=u._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(u){this._minZoom!==u&&(this._minZoom=u,this.zoom=Math.max(this.zoom,u))}get maxZoom(){return this._maxZoom}set maxZoom(u){this._maxZoom!==u&&(this._maxZoom=u,this.zoom=Math.min(this.zoom,u))}get minPitch(){return this._minPitch}set minPitch(u){this._minPitch!==u&&(this._minPitch=u,this.pitch=Math.max(this.pitch,u))}get maxPitch(){return this._maxPitch}set maxPitch(u){this._maxPitch!==u&&(this._maxPitch=u,this.pitch=Math.min(this.pitch,u))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(u){u===void 0?u=!0:u===null&&(u=!1),this._renderWorldCopies=u}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new r.P(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(u){const f=-r.b3(u,-180,180)*Math.PI/180;this.angle!==f&&(this._unmodified=!1,this.angle=f,this._calcMatrices(),this.rotationMatrix=function(){var D=new r.A(4);return r.A!=Float32Array&&(D[1]=0,D[2]=0),D[0]=1,D[3]=1,D}(),function(D,V,J){var oe=V[0],fe=V[1],xe=V[2],Ee=V[3],Fe=Math.sin(J),Ge=Math.cos(J);D[0]=oe*Ge+xe*Fe,D[1]=fe*Ge+Ee*Fe,D[2]=oe*-Fe+xe*Ge,D[3]=fe*-Fe+Ee*Ge}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(u){const f=r.ad(u,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==f&&(this._unmodified=!1,this._pitch=f,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(u){u=Math.max(.01,Math.min(60,u)),this._fov!==u&&(this._unmodified=!1,this._fov=u/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(u){const f=Math.min(Math.max(u,this.minZoom),this.maxZoom);this._zoom!==f&&(this._unmodified=!1,this._zoom=f,this.tileZoom=Math.max(0,Math.floor(f)),this.scale=this.zoomScale(f),this._constrain(),this._calcMatrices())}get center(){return this._center}set center(u){u.lat===this._center.lat&&u.lng===this._center.lng||(this._unmodified=!1,this._center=u,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(u){u!==this._elevation&&(this._elevation=u,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(u){this._edgeInsets.equals(u)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,u,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(u){return this._edgeInsets.equals(u)}interpolatePadding(u,f,D){this._unmodified=!1,this._edgeInsets.interpolate(u,f,D),this._constrain(),this._calcMatrices()}coveringZoomLevel(u){const f=(u.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/u.tileSize));return Math.max(0,f)}getVisibleUnwrappedCoordinates(u){const f=[new r.b4(0,u)];if(this._renderWorldCopies){const D=this.pointCoordinate(new r.P(0,0)),V=this.pointCoordinate(new r.P(this.width,0)),J=this.pointCoordinate(new r.P(this.width,this.height)),oe=this.pointCoordinate(new r.P(0,this.height)),fe=Math.floor(Math.min(D.x,V.x,J.x,oe.x)),xe=Math.floor(Math.max(D.x,V.x,J.x,oe.x)),Ee=1;for(let Fe=fe-Ee;Fe<=xe+Ee;Fe++)Fe!==0&&f.push(new r.b4(Fe,u))}return f}coveringTiles(u){var f,D;let V=this.coveringZoomLevel(u);const J=V;if(u.minzoom!==void 0&&V<u.minzoom)return[];u.maxzoom!==void 0&&V>u.maxzoom&&(V=u.maxzoom);const oe=this.pointCoordinate(this.getCameraPoint()),fe=r.Z.fromLngLat(this.center),xe=Math.pow(2,V),Ee=[xe*oe.x,xe*oe.y,0],Fe=[xe*fe.x,xe*fe.y,0],Ge=Zs.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,V);let rt=u.minzoom||0;!u.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(rt=V);const ct=u.terrain?2/Math.min(this.tileSize,u.tileSize)*this.tileSize:3,pt=Et=>({aabb:new Ms([Et*xe,0,0],[(Et+1)*xe,xe,0]),zoom:0,x:0,y:0,wrap:Et,fullyVisible:!1}),xt=[],Mt=[],Tt=V,jt=u.reparseOverscaled?J:V;if(this._renderWorldCopies)for(let Et=1;Et<=3;Et++)xt.push(pt(-Et)),xt.push(pt(Et));for(xt.push(pt(0));xt.length>0;){const Et=xt.pop(),Jt=Et.x,Kt=Et.y;let Yt=Et.fullyVisible;if(!Yt){const $a=Et.aabb.intersects(Ge);if($a===0)continue;Yt=$a===2}const da=u.terrain?Ee:Fe,_a=Et.aabb.distanceX(da),Da=Et.aabb.distanceY(da),Na=Math.max(Math.abs(_a),Math.abs(Da)),Ga=ct+(1<<Tt-Et.zoom)-2;if(Et.zoom===Tt||Na>Ga&&Et.zoom>=rt){const $a=Tt-Et.zoom,gr=Ee[0]-.5-(Jt<<$a),Qa=Ee[1]-.5-(Kt<<$a);Mt.push({tileID:new r.S(Et.zoom===Tt?jt:Et.zoom,Et.wrap,Et.zoom,Jt,Kt),distanceSq:T([Fe[0]-.5-Jt,Fe[1]-.5-Kt]),tileDistanceToCamera:Math.sqrt(gr*gr+Qa*Qa)})}else for(let $a=0;$a<4;$a++){const gr=(Jt<<1)+$a%2,Qa=(Kt<<1)+($a>>1),xr=Et.zoom+1;let nr=Et.aabb.quadrant($a);if(u.terrain){const Sr=new r.S(xr,Et.wrap,xr,gr,Qa),pr=u.terrain.getMinMaxElevation(Sr),Mr=(f=pr.minElevation)!==null&&f!==void 0?f:this.elevation,Wr=(D=pr.maxElevation)!==null&&D!==void 0?D:this.elevation;nr=new Ms([nr.min[0],nr.min[1],Mr],[nr.max[0],nr.max[1],Wr])}xt.push({aabb:nr,zoom:xr,x:gr,y:Qa,wrap:Et.wrap,fullyVisible:Yt})}}return Mt.sort((Et,Jt)=>Et.distanceSq-Jt.distanceSq).map(Et=>Et.tileID)}resize(u,f){this.width=u,this.height=f,this.pixelsToGLUnits=[2/u,-2/f],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(u){return Math.pow(2,u)}scaleZoom(u){return Math.log(u)/Math.LN2}project(u){const f=r.ad(u.lat,-85.051129,Cc);return new r.P(r.O(u.lng)*this.worldSize,r.Q(f)*this.worldSize)}unproject(u){return new r.Z(u.x/this.worldSize,u.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(u){const f=this.elevation,D=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,V=this.pointLocation(this.centerPoint,u),J=u.getElevationForLngLatZoom(V,this.tileZoom);if(!(this.elevation-J))return;const oe=D+f-J,fe=Math.cos(this._pitch)*this.cameraToCenterDistance/oe/r.b5(1,V.lat)/this.tileSize,xe=this.scaleZoom(fe);this._elevation=J,this._center=V,this.zoom=xe}setLocationAtPoint(u,f){const D=this.pointCoordinate(f),V=this.pointCoordinate(this.centerPoint),J=this.locationCoordinate(u),oe=new r.Z(J.x-(D.x-V.x),J.y-(D.y-V.y));this.center=this.coordinateLocation(oe),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(u,f){return f?this.coordinatePoint(this.locationCoordinate(u),f.getElevationForLngLatZoom(u,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(u))}pointLocation(u,f){return this.coordinateLocation(this.pointCoordinate(u,f))}locationCoordinate(u){return r.Z.fromLngLat(u)}coordinateLocation(u){return u&&u.toLngLat()}pointCoordinate(u,f){if(f){const pt=f.pointCoordinate(u);if(pt!=null)return pt}const D=[u.x,u.y,0,1],V=[u.x,u.y,1,1];r.ag(D,D,this.pixelMatrixInverse),r.ag(V,V,this.pixelMatrixInverse);const J=D[3],oe=V[3],fe=D[0]/J,xe=V[0]/oe,Ee=D[1]/J,Fe=V[1]/oe,Ge=D[2]/J,rt=V[2]/oe,ct=Ge===rt?0:(0-Ge)/(rt-Ge);return new r.Z(r.z.number(fe,xe,ct)/this.worldSize,r.z.number(Ee,Fe,ct)/this.worldSize)}coordinatePoint(u,f=0,D=this.pixelMatrix){const V=[u.x*this.worldSize,u.y*this.worldSize,f,1];return r.ag(V,V,D),new r.P(V[0]/V[3],V[1]/V[3])}getBounds(){const u=Math.max(0,this.height/2-this.getHorizon());return new Ce().extend(this.pointLocation(new r.P(0,u))).extend(this.pointLocation(new r.P(this.width,u))).extend(this.pointLocation(new r.P(this.width,this.height))).extend(this.pointLocation(new r.P(0,this.height)))}getMaxBounds(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new Ce([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(u){u?(this.lngRange=[u.getWest(),u.getEast()],this.latRange=[u.getSouth(),u.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-85.051129,Cc])}calculateTileMatrix(u){const f=u.canonical,D=this.worldSize/this.zoomScale(f.z),V=f.x+Math.pow(2,f.z)*u.wrap,J=r.ao(new Float64Array(16));return r.J(J,J,[V*D,f.y*D,0]),r.K(J,J,[D/r.X,D/r.X,1]),J}calculatePosMatrix(u,f=!1){const D=u.key,V=f?this._alignedPosMatrixCache:this._posMatrixCache;if(V[D])return V[D];const J=this.calculateTileMatrix(u);return r.L(J,f?this.alignedModelViewProjectionMatrix:this.modelViewProjectionMatrix,J),V[D]=new Float32Array(J),V[D]}calculateFogMatrix(u){const f=u.key,D=this._fogMatrixCache;if(D[f])return D[f];const V=this.calculateTileMatrix(u);return r.L(V,this.fogMatrix,V),D[f]=new Float32Array(V),D[f]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(u,f){f=r.ad(+f,this.minZoom,this.maxZoom);const D={center:new r.N(u.lng,u.lat),zoom:f};let V=this.lngRange;if(!this._renderWorldCopies&&V===null){const Et=179.9999999999;V=[-Et,Et]}const J=this.tileSize*this.zoomScale(D.zoom);let oe=0,fe=J,xe=0,Ee=J,Fe=0,Ge=0;const{x:rt,y:ct}=this.size;if(this.latRange){const Et=this.latRange;oe=r.Q(Et[1])*J,fe=r.Q(Et[0])*J,fe-oe<ct&&(Fe=ct/(fe-oe))}V&&(xe=r.b3(r.O(V[0])*J,0,J),Ee=r.b3(r.O(V[1])*J,0,J),Ee<xe&&(Ee+=J),Ee-xe<rt&&(Ge=rt/(Ee-xe)));const{x:pt,y:xt}=this.project.call({worldSize:J},u);let Mt,Tt;const jt=Math.max(Ge||0,Fe||0);if(jt){const Et=new r.P(Ge?(Ee+xe)/2:pt,Fe?(fe+oe)/2:xt);return D.center=this.unproject.call({worldSize:J},Et).wrap(),D.zoom+=this.scaleZoom(jt),D}if(this.latRange){const Et=ct/2;xt-Et<oe&&(Tt=oe+Et),xt+Et>fe&&(Tt=fe-Et)}if(V){const Et=(xe+Ee)/2;let Jt=pt;this._renderWorldCopies&&(Jt=r.b3(pt,Et-J/2,Et+J/2));const Kt=rt/2;Jt-Kt<xe&&(Mt=xe+Kt),Jt+Kt>Ee&&(Mt=Ee-Kt)}if(Mt!==void 0||Tt!==void 0){const Et=new r.P(Mt??pt,Tt??xt);D.center=this.unproject.call({worldSize:J},Et).wrap()}return D}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;const u=this._unmodified,{center:f,zoom:D}=this.getConstrained(this.center,this.zoom);this.center=f,this.zoom=D,this._unmodified=u,this._constraining=!1}_calcMatrices(){if(!this.height)return;const u=this._fov/2,f=this.centerOffset,D=this.point.x,V=this.point.y;this.cameraToCenterDistance=.5/Math.tan(u)*this.height,this._pixelPerMeter=r.b5(1,this.center.lat)*this.worldSize;let J=r.ao(new Float64Array(16));r.K(J,J,[this.width/2,-this.height/2,1]),r.J(J,J,[1,-1,0]),this.labelPlaneMatrix=J,J=r.ao(new Float64Array(16)),r.K(J,J,[1,-1,1]),r.J(J,J,[-1,-1,0]),r.K(J,J,[2/this.width,2/this.height,1]),this.glCoordMatrix=J;const oe=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),fe=Math.min(this.elevation,this.minElevationForCurrentTile),xe=oe-fe*this._pixelPerMeter/Math.cos(this._pitch),Ee=fe<0?xe:oe,Fe=Math.PI/2+this._pitch,Ge=this._fov*(.5+f.y/this.height),rt=Math.sin(Ge)*Ee/Math.sin(r.ad(Math.PI-Fe-Ge,.01,Math.PI-.01)),ct=this.getHorizon(),pt=2*Math.atan(ct/this.cameraToCenterDistance)*(.5+f.y/(2*ct)),xt=Math.sin(pt)*Ee/Math.sin(r.ad(Math.PI-Fe-pt,.01,Math.PI-.01)),Mt=Math.min(rt,xt);this.farZ=1.01*(Math.cos(Math.PI/2-this._pitch)*Mt+Ee),this.nearZ=this.height/50,J=new Float64Array(16),r.b6(J,this._fov,this.width/this.height,this.nearZ,this.farZ),J[8]=2*-f.x/this.width,J[9]=2*f.y/this.height,this.projectionMatrix=r.af(J),r.K(J,J,[1,-1,1]),r.J(J,J,[0,0,-this.cameraToCenterDistance]),r.b7(J,J,this._pitch),r.ae(J,J,this.angle),r.J(J,J,[-D,-V,0]),this.mercatorMatrix=r.K([],J,[this.worldSize,this.worldSize,this.worldSize]),r.K(J,J,[1,1,this._pixelPerMeter]),this.pixelMatrix=r.L(new Float64Array(16),this.labelPlaneMatrix,J),r.J(J,J,[0,0,-this.elevation]),this.modelViewProjectionMatrix=J,this.invModelViewProjectionMatrix=r.at([],J),this.fogMatrix=new Float64Array(16),r.b6(this.fogMatrix,this._fov,this.width/this.height,oe,this.farZ),this.fogMatrix[8]=2*-f.x/this.width,this.fogMatrix[9]=2*f.y/this.height,r.K(this.fogMatrix,this.fogMatrix,[1,-1,1]),r.J(this.fogMatrix,this.fogMatrix,[0,0,-this.cameraToCenterDistance]),r.b7(this.fogMatrix,this.fogMatrix,this._pitch),r.ae(this.fogMatrix,this.fogMatrix,this.angle),r.J(this.fogMatrix,this.fogMatrix,[-D,-V,0]),r.K(this.fogMatrix,this.fogMatrix,[1,1,this._pixelPerMeter]),r.J(this.fogMatrix,this.fogMatrix,[0,0,-this.elevation]),this.pixelMatrix3D=r.L(new Float64Array(16),this.labelPlaneMatrix,J);const Tt=this.width%2/2,jt=this.height%2/2,Et=Math.cos(this.angle),Jt=Math.sin(this.angle),Kt=D-Math.round(D)+Et*Tt+Jt*jt,Yt=V-Math.round(V)+Et*jt+Jt*Tt,da=new Float64Array(J);if(r.J(da,da,[Kt>.5?Kt-1:Kt,Yt>.5?Yt-1:Yt,0]),this.alignedModelViewProjectionMatrix=da,J=r.at(new Float64Array(16),this.pixelMatrix),!J)throw new Error("failed to invert matrix");this.pixelMatrixInverse=J,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;const u=this.pointCoordinate(new r.P(0,0)),f=[u.x*this.worldSize,u.y*this.worldSize,0,1];return r.ag(f,f,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){const u=this._pitch,f=Math.tan(u)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new r.P(0,f))}getCameraQueryGeometry(u){const f=this.getCameraPoint();if(u.length===1)return[u[0],f];{let D=f.x,V=f.y,J=f.x,oe=f.y;for(const fe of u)D=Math.min(D,fe.x),V=Math.min(V,fe.y),J=Math.max(J,fe.x),oe=Math.max(oe,fe.y);return[new r.P(D,V),new r.P(J,V),new r.P(J,oe),new r.P(D,oe),new r.P(D,V)]}}lngLatToCameraDepth(u,f){const D=this.locationCoordinate(u),V=[D.x*this.worldSize,D.y*this.worldSize,f,1];return r.ag(V,V,this.modelViewProjectionMatrix),V[2]/V[3]}}function Ws(R,u){let f,D=!1,V=null,J=null;const oe=()=>{V=null,D&&(R.apply(J,f),V=setTimeout(oe,u),D=!1)};return(...fe)=>(D=!0,J=this,f=fe,V||oe(),V)}class eo{constructor(u){this._getCurrentHash=()=>{const f=window.location.hash.replace("#","");if(this._hashName){let D;return f.split("&").map(V=>V.split("=")).forEach(V=>{V[0]===this._hashName&&(D=V)}),(D&&D[1]||"").split("/")}return f.split("/")},this._onHashChange=()=>{const f=this._getCurrentHash();if(f.length>=3&&!f.some(D=>isNaN(D))){const D=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(f[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+f[2],+f[1]],zoom:+f[0],bearing:D,pitch:+(f[4]||0)}),!0}return!1},this._updateHashUnthrottled=()=>{const f=window.location.href.replace(/(#.+)?$/,this.getHashString());window.history.replaceState(window.history.state,null,f)},this._removeHash=()=>{const f=this._getCurrentHash();if(f.length===0)return;const D=f.join("/");let V=D;V.split("&").length>0&&(V=V.split("&")[0]),this._hashName&&(V=`${this._hashName}=${D}`);let J=window.location.hash.replace(V,"");J.startsWith("#&")?J=J.slice(0,1)+J.slice(2):J==="#"&&(J="");let oe=window.location.href.replace(/(#.+)?$/,J);oe=oe.replace("&&","&"),window.history.replaceState(window.history.state,null,oe)},this._updateHash=Ws(this._updateHashUnthrottled,300),this._hashName=u&&encodeURIComponent(u)}addTo(u){return this._map=u,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(u){const f=this._map.getCenter(),D=Math.round(100*this._map.getZoom())/100,V=Math.ceil((D*Math.LN2+Math.log(512/360/.5))/Math.LN10),J=Math.pow(10,V),oe=Math.round(f.lng*J)/J,fe=Math.round(f.lat*J)/J,xe=this._map.getBearing(),Ee=this._map.getPitch();let Fe="";if(Fe+=u?`/${oe}/${fe}/${D}`:`${D}/${fe}/${oe}`,(xe||Ee)&&(Fe+="/"+Math.round(10*xe)/10),Ee&&(Fe+=`/${Math.round(Ee)}`),this._hashName){const Ge=this._hashName;let rt=!1;const ct=window.location.hash.slice(1).split("&").map(pt=>{const xt=pt.split("=")[0];return xt===Ge?(rt=!0,`${xt}=${Fe}`):pt}).filter(pt=>pt);return rt||ct.push(`${Ge}=${Fe}`),`#${ct.join("&")}`}return`#${Fe}`}}const Xo={linearity:.3,easing:r.b8(0,0,.3,1)},li=r.e({deceleration:2500,maxSpeed:1400},Xo),hi=r.e({deceleration:20,maxSpeed:1400},Xo),Is=r.e({deceleration:1e3,maxSpeed:360},Xo),Tc=r.e({deceleration:1e3,maxSpeed:90},Xo);class dc{constructor(u){this._map=u,this.clear()}clear(){this._inertiaBuffer=[]}record(u){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:h.now(),settings:u})}_drainInertiaBuffer(){const u=this._inertiaBuffer,f=h.now();for(;u.length>0&&f-u[0].time>160;)u.shift()}_onMoveEnd(u){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const f={zoom:0,bearing:0,pitch:0,pan:new r.P(0,0),pinchAround:void 0,around:void 0};for(const{settings:J}of this._inertiaBuffer)f.zoom+=J.zoomDelta||0,f.bearing+=J.bearingDelta||0,f.pitch+=J.pitchDelta||0,J.panDelta&&f.pan._add(J.panDelta),J.around&&(f.around=J.around),J.pinchAround&&(f.pinchAround=J.pinchAround);const D=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,V={};if(f.pan.mag()){const J=Xl(f.pan.mag(),D,r.e({},li,u||{}));V.offset=f.pan.mult(J.amount/f.pan.mag()),V.center=this._map.transform.center,Yl(V,J)}if(f.zoom){const J=Xl(f.zoom,D,hi);V.zoom=this._map.transform.zoom+J.amount,Yl(V,J)}if(f.bearing){const J=Xl(f.bearing,D,Is);V.bearing=this._map.transform.bearing+r.ad(J.amount,-179,179),Yl(V,J)}if(f.pitch){const J=Xl(f.pitch,D,Tc);V.pitch=this._map.transform.pitch+J.amount,Yl(V,J)}if(V.zoom||V.bearing){const J=f.pinchAround===void 0?f.around:f.pinchAround;V.around=J?this._map.unproject(J):this._map.getCenter()}return this.clear(),r.e(V,{noMoveStart:!0})}}function Yl(R,u){(!R.duration||R.duration<u.duration)&&(R.duration=u.duration,R.easing=u.easing)}function Xl(R,u,f){const{maxSpeed:D,linearity:V,deceleration:J}=f,oe=r.ad(R*V/(u/1e3),-D,D),fe=Math.abs(oe)/(J*V);return{easing:f.easing,duration:1e3*fe,amount:oe*(fe/2)}}class Bo extends r.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(u,f,D,V={}){const J=n.mousePos(f.getCanvas(),D),oe=f.unproject(J);super(u,r.e({point:J,lngLat:oe,originalEvent:D},V)),this._defaultPrevented=!1,this.target=f}}class ko extends r.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(u,f,D){const V=u==="touchend"?D.changedTouches:D.touches,J=n.touchPos(f.getCanvasContainer(),V),oe=J.map(xe=>f.unproject(xe)),fe=J.reduce((xe,Ee,Fe,Ge)=>xe.add(Ee.div(Ge.length)),new r.P(0,0));super(u,{points:J,point:fe,lngLats:oe,lngLat:f.unproject(fe),originalEvent:D}),this._defaultPrevented=!1}}class il extends r.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(u,f,D){super(u,{originalEvent:D}),this._defaultPrevented=!1}}class hc{constructor(u,f){this._map=u,this._clickTolerance=f.clickTolerance}reset(){delete this._mousedownPos}wheel(u){return this._firePreventable(new il(u.type,this._map,u))}mousedown(u,f){return this._mousedownPos=f,this._firePreventable(new Bo(u.type,this._map,u))}mouseup(u){this._map.fire(new Bo(u.type,this._map,u))}click(u,f){this._mousedownPos&&this._mousedownPos.dist(f)>=this._clickTolerance||this._map.fire(new Bo(u.type,this._map,u))}dblclick(u){return this._firePreventable(new Bo(u.type,this._map,u))}mouseover(u){this._map.fire(new Bo(u.type,this._map,u))}mouseout(u){this._map.fire(new Bo(u.type,this._map,u))}touchstart(u){return this._firePreventable(new ko(u.type,this._map,u))}touchmove(u){this._map.fire(new ko(u.type,this._map,u))}touchend(u){this._map.fire(new ko(u.type,this._map,u))}touchcancel(u){this._map.fire(new ko(u.type,this._map,u))}_firePreventable(u){if(this._map.fire(u),u.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Ro{constructor(u){this._map=u}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(u){this._map.fire(new Bo(u.type,this._map,u))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Bo("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(u){this._delayContextMenu?this._contextMenuEvent=u:this._ignoreContextMenu||this._map.fire(new Bo(u.type,this._map,u)),this._map.listens("contextmenu")&&u.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Ci{constructor(u){this._map=u}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(u){return this.transform.pointLocation(r.P.convert(u),this._map.terrain)}}class So{constructor(u,f){this._map=u,this._tr=new Ci(u),this._el=u.getCanvasContainer(),this._container=u.getContainer(),this._clickTolerance=f.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(u,f){this.isEnabled()&&u.shiftKey&&u.button===0&&(n.disableDrag(),this._startPos=this._lastPos=f,this._active=!0)}mousemoveWindow(u,f){if(!this._active)return;const D=f;if(this._lastPos.equals(D)||!this._box&&D.dist(this._startPos)<this._clickTolerance)return;const V=this._startPos;this._lastPos=D,this._box||(this._box=n.create("div","maplibregl-boxzoom",this._container),this._container.classList.add("maplibregl-crosshair"),this._fireEvent("boxzoomstart",u));const J=Math.min(V.x,D.x),oe=Math.max(V.x,D.x),fe=Math.min(V.y,D.y),xe=Math.max(V.y,D.y);n.setTransform(this._box,`translate(${J}px,${fe}px)`),this._box.style.width=oe-J+"px",this._box.style.height=xe-fe+"px"}mouseupWindow(u,f){if(!this._active||u.button!==0)return;const D=this._startPos,V=f;if(this.reset(),n.suppressClick(),D.x!==V.x||D.y!==V.y)return this._map.fire(new r.k("boxzoomend",{originalEvent:u})),{cameraAnimation:J=>J.fitScreenCoordinates(D,V,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",u)}keydown(u){this._active&&u.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",u))}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(u,f){return this._map.fire(new r.k(u,{originalEvent:f}))}}function gi(R,u){if(R.length!==u.length)throw new Error(`The number of touches and points are not equal - touches ${R.length}, points ${u.length}`);const f={};for(let D=0;D<R.length;D++)f[R[D].identifier]=u[D];return f}class to{constructor(u){this.reset(),this.numTouches=u.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(u,f,D){(this.centroid||D.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=u.timeStamp),D.length===this.numTouches&&(this.centroid=function(V){const J=new r.P(0,0);for(const oe of V)J._add(oe);return J.div(V.length)}(f),this.touches=gi(D,f)))}touchmove(u,f,D){if(this.aborted||!this.centroid)return;const V=gi(D,f);for(const J in this.touches){const oe=this.touches[J],fe=V[J];(!fe||fe.dist(oe)>30)&&(this.aborted=!0)}}touchend(u,f,D){if((!this.centroid||u.timeStamp-this.startTime>500)&&(this.aborted=!0),D.length===0){const V=!this.aborted&&this.centroid;if(this.reset(),V)return V}}}class yi{constructor(u){this.singleTap=new to(u),this.numTaps=u.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(u,f,D){this.singleTap.touchstart(u,f,D)}touchmove(u,f,D){this.singleTap.touchmove(u,f,D)}touchend(u,f,D){const V=this.singleTap.touchend(u,f,D);if(V){const J=u.timeStamp-this.lastTime<500,oe=!this.lastTap||this.lastTap.dist(V)<30;if(J&&oe||this.reset(),this.count++,this.lastTime=u.timeStamp,this.lastTap=V,this.count===this.numTaps)return this.reset(),V}}}class mo{constructor(u){this._tr=new Ci(u),this._zoomIn=new yi({numTouches:1,numTaps:2}),this._zoomOut=new yi({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(u,f,D){this._zoomIn.touchstart(u,f,D),this._zoomOut.touchstart(u,f,D)}touchmove(u,f,D){this._zoomIn.touchmove(u,f,D),this._zoomOut.touchmove(u,f,D)}touchend(u,f,D){const V=this._zoomIn.touchend(u,f,D),J=this._zoomOut.touchend(u,f,D),oe=this._tr;return V?(this._active=!0,u.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:fe=>fe.easeTo({duration:300,zoom:oe.zoom+1,around:oe.unproject(V)},{originalEvent:u})}):J?(this._active=!0,u.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:fe=>fe.easeTo({duration:300,zoom:oe.zoom-1,around:oe.unproject(J)},{originalEvent:u})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Co{constructor(u){this._enabled=!!u.enable,this._moveStateManager=u.moveStateManager,this._clickTolerance=u.clickTolerance||1,this._moveFunction=u.move,this._activateOnStart=!!u.activateOnStart,u.assignEvents(this),this.reset()}reset(u){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(u)}_move(...u){const f=this._moveFunction(...u);if(f.bearingDelta||f.pitchDelta||f.around||f.panDelta)return this._active=!0,f}dragStart(u,f){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(u)&&(this._moveStateManager.startMove(u),this._lastPoint=f.length?f[0]:f,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(u,f){if(!this.isEnabled())return;const D=this._lastPoint;if(!D)return;if(u.preventDefault(),!this._moveStateManager.isValidMoveEvent(u))return void this.reset(u);const V=f.length?f[0]:f;return!this._moved&&V.dist(D)<this._clickTolerance?void 0:(this._moved=!0,this._lastPoint=V,this._move(D,V))}dragEnd(u){this.isEnabled()&&this._lastPoint&&this._moveStateManager.isValidEndEvent(u)&&(this._moved&&n.suppressClick(),this.reset(u))}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}getClickTolerance(){return this._clickTolerance}}const ol={0:1,2:2};class cs{constructor(u){this._correctEvent=u.checkCorrectEvent}startMove(u){const f=n.mouseButton(u);this._eventButton=f}endMove(u){delete this._eventButton}isValidStartEvent(u){return this._correctEvent(u)}isValidMoveEvent(u){return!function(f,D){const V=ol[D];return f.buttons===void 0||(f.buttons&V)!==V}(u,this._eventButton)}isValidEndEvent(u){return n.mouseButton(u)===this._eventButton}}class Fl{constructor(){this._firstTouch=void 0}_isOneFingerTouch(u){return u.targetTouches.length===1}_isSameTouchEvent(u){return u.targetTouches[0].identifier===this._firstTouch}startMove(u){const f=u.targetTouches[0].identifier;this._firstTouch=f}endMove(u){delete this._firstTouch}isValidStartEvent(u){return this._isOneFingerTouch(u)}isValidMoveEvent(u){return this._isOneFingerTouch(u)&&this._isSameTouchEvent(u)}isValidEndEvent(u){return this._isOneFingerTouch(u)&&this._isSameTouchEvent(u)}}const zo=R=>{R.mousedown=R.dragStart,R.mousemoveWindow=R.dragMove,R.mouseup=R.dragEnd,R.contextmenu=u=>{u.preventDefault()}},$l=({enable:R,clickTolerance:u,bearingDegreesPerPixelMoved:f=.8})=>{const D=new cs({checkCorrectEvent:V=>n.mouseButton(V)===0&&V.ctrlKey||n.mouseButton(V)===2});return new Co({clickTolerance:u,move:(V,J)=>({bearingDelta:(J.x-V.x)*f}),moveStateManager:D,enable:R,assignEvents:zo})},sl=({enable:R,clickTolerance:u,pitchDegreesPerPixelMoved:f=-.5})=>{const D=new cs({checkCorrectEvent:V=>n.mouseButton(V)===0&&V.ctrlKey||n.mouseButton(V)===2});return new Co({clickTolerance:u,move:(V,J)=>({pitchDelta:(J.y-V.y)*f}),moveStateManager:D,enable:R,assignEvents:zo})};class Ps{constructor(u,f){this._clickTolerance=u.clickTolerance||1,this._map=f,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new r.P(0,0)}_shouldBePrevented(u){return u<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(u,f,D){return this._calculateTransform(u,f,D)}touchmove(u,f,D){if(this._active){if(!this._shouldBePrevented(D.length))return u.preventDefault(),this._calculateTransform(u,f,D);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",u)}}touchend(u,f,D){this._calculateTransform(u,f,D),this._active&&this._shouldBePrevented(D.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(u,f,D){D.length>0&&(this._active=!0);const V=gi(D,f),J=new r.P(0,0),oe=new r.P(0,0);let fe=0;for(const Ee in V){const Fe=V[Ee],Ge=this._touches[Ee];Ge&&(J._add(Fe),oe._add(Fe.sub(Ge)),fe++,V[Ee]=Fe)}if(this._touches=V,this._shouldBePrevented(fe)||!oe.mag())return;const xe=oe.div(fe);return this._sum._add(xe),this._sum.mag()<this._clickTolerance?void 0:{around:J.div(fe),panDelta:xe}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class go{constructor(){this.reset()}reset(){this._active=!1,delete this._firstTwoTouches}touchstart(u,f,D){this._firstTwoTouches||D.length<2||(this._firstTwoTouches=[D[0].identifier,D[1].identifier],this._start([f[0],f[1]]))}touchmove(u,f,D){if(!this._firstTwoTouches)return;u.preventDefault();const[V,J]=this._firstTwoTouches,oe=vi(D,f,V),fe=vi(D,f,J);if(!oe||!fe)return;const xe=this._aroundCenter?null:oe.add(fe).div(2);return this._move([oe,fe],xe,u)}touchend(u,f,D){if(!this._firstTwoTouches)return;const[V,J]=this._firstTwoTouches,oe=vi(D,f,V),fe=vi(D,f,J);oe&&fe||(this._active&&n.suppressClick(),this.reset())}touchcancel(){this.reset()}enable(u){this._enabled=!0,this._aroundCenter=!!u&&u.around==="center"}disable(){this._enabled=!1,this.reset()}isEnabled(){return!!this._enabled}isActive(){return!!this._active}}function vi(R,u,f){for(let D=0;D<R.length;D++)if(R[D].identifier===f)return u[D]}function Ls(R,u){return Math.log(R/u)/Math.LN2}class gn extends go{reset(){super.reset(),delete this._distance,delete this._startDistance}_start(u){this._startDistance=this._distance=u[0].dist(u[1])}_move(u,f){const D=this._distance;if(this._distance=u[0].dist(u[1]),this._active||!(Math.abs(Ls(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:Ls(this._distance,D),pinchAround:f}}}function Ac(R,u){return 180*R.angleWith(u)/Math.PI}class Jc extends go{reset(){super.reset(),delete this._minDiameter,delete this._startVector,delete this._vector}_start(u){this._startVector=this._vector=u[0].sub(u[1]),this._minDiameter=u[0].dist(u[1])}_move(u,f,D){const V=this._vector;if(this._vector=u[0].sub(u[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:Ac(this._vector,V),pinchAround:f}}_isBelowThreshold(u){this._minDiameter=Math.min(this._minDiameter,u.mag());const f=25/(Math.PI*this._minDiameter)*360,D=Ac(u,this._startVector);return Math.abs(D)<f}}function ll(R){return Math.abs(R.y)>Math.abs(R.x)}class Rl extends go{constructor(u){super(),this._currentTouchCount=0,this._map=u}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(u,f,D){super.touchstart(u,f,D),this._currentTouchCount=D.length}_start(u){this._lastPoints=u,ll(u[0].sub(u[1]))&&(this._valid=!1)}_move(u,f,D){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;const V=u[0].sub(this._lastPoints[0]),J=u[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(V,J,D.timeStamp),this._valid?(this._lastPoints=u,this._active=!0,{pitchDelta:(V.y+J.y)/2*-.5}):void 0}gestureBeginsVertically(u,f,D){if(this._valid!==void 0)return this._valid;const V=u.mag()>=2,J=f.mag()>=2;if(!V&&!J)return;if(!V||!J)return this._firstMove===void 0&&(this._firstMove=D),D-this._firstMove<100&&void 0;const oe=u.y>0==f.y>0;return ll(u)&&ll(f)&&oe}}const Cl={panStep:100,bearingStep:15,pitchStep:10};class pc{constructor(u){this._tr=new Ci(u);const f=Cl;this._panStep=f.panStep,this._bearingStep=f.bearingStep,this._pitchStep=f.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(u){if(u.altKey||u.ctrlKey||u.metaKey)return;let f=0,D=0,V=0,J=0,oe=0;switch(u.keyCode){case 61:case 107:case 171:case 187:f=1;break;case 189:case 109:case 173:f=-1;break;case 37:u.shiftKey?D=-1:(u.preventDefault(),J=-1);break;case 39:u.shiftKey?D=1:(u.preventDefault(),J=1);break;case 38:u.shiftKey?V=1:(u.preventDefault(),oe=-1);break;case 40:u.shiftKey?V=-1:(u.preventDefault(),oe=1);break;default:return}return this._rotationDisabled&&(D=0,V=0),{cameraAnimation:fe=>{const xe=this._tr;fe.easeTo({duration:300,easeId:"keyboardHandler",easing:Zr,zoom:f?Math.round(xe.zoom)+f*(u.shiftKey?2:1):xe.zoom,bearing:xe.bearing+D*this._bearingStep,pitch:xe.pitch+V*this._pitchStep,offset:[-J*this._panStep,-oe*this._panStep],center:xe.center},{originalEvent:u})}}}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 Zr(R){return R*(2-R)}const us=4.000244140625;class cl{constructor(u,f){this._onTimeout=D=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(D)},this._map=u,this._tr=new Ci(u),this._triggerRenderFrame=f,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(u){this._defaultZoomRate=u}setWheelZoomRate(u){this._wheelZoomRate=u}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(u){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!u&&u.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(u){return!!this._map.cooperativeGestures.isEnabled()&&!(u.ctrlKey||this._map.cooperativeGestures.isBypassed(u))}wheel(u){if(!this.isEnabled())return;if(this._shouldBePrevented(u))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",u);let f=u.deltaMode===WheelEvent.DOM_DELTA_LINE?40*u.deltaY:u.deltaY;const D=h.now(),V=D-(this._lastWheelEventTime||0);this._lastWheelEventTime=D,f!==0&&f%us==0?this._type="wheel":f!==0&&Math.abs(f)<4?this._type="trackpad":V>400?(this._type=null,this._lastValue=f,this._timeout=setTimeout(this._onTimeout,40,u)):this._type||(this._type=Math.abs(V*f)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,f+=this._lastValue)),u.shiftKey&&f&&(f/=4),this._type&&(this._lastWheelEvent=u,this._delta-=f,this._active||this._start(u)),u.preventDefault()}_start(u){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 f=n.mousePos(this._map.getCanvas(),u),D=this._tr;f.y>D.transform.height/2-D.transform.getHorizon()?this._around=r.N.convert(this._aroundCenter?D.center:D.unproject(f)):this._around=r.N.convert(D.center),this._aroundPoint=D.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;const u=this._tr.transform;if(this._delta!==0){const xe=this._type==="wheel"&&Math.abs(this._delta)>us?this._wheelZoomRate:this._defaultZoomRate;let Ee=2/(1+Math.exp(-Math.abs(this._delta*xe)));this._delta<0&&Ee!==0&&(Ee=1/Ee);const Fe=typeof this._targetZoom=="number"?u.zoomScale(this._targetZoom):u.scale;this._targetZoom=Math.min(u.maxZoom,Math.max(u.minZoom,u.scaleZoom(Fe*Ee))),this._type==="wheel"&&(this._startZoom=u.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const f=typeof this._targetZoom=="number"?this._targetZoom:u.zoom,D=this._startZoom,V=this._easing;let J,oe=!1;const fe=h.now()-this._lastWheelEventTime;if(this._type==="wheel"&&D&&V&&fe){const xe=Math.min(fe/200,1),Ee=V(xe);J=r.z.number(D,f,Ee),xe<1?this._frameId||(this._frameId=!0):oe=!0}else J=f,oe=!0;return this._active=!0,oe&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!oe,zoomDelta:J-u.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(u){let f=r.b9;if(this._prevEase){const D=this._prevEase,V=(h.now()-D.start)/D.duration,J=D.easing(V+.01)-D.easing(V),oe=.27/Math.sqrt(J*J+1e-4)*.01,fe=Math.sqrt(.0729-oe*oe);f=r.b8(oe,fe,.25,1)}return this._prevEase={start:h.now(),duration:u,easing:f},f}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class Ti{constructor(u,f){this._clickZoom=u,this._tapZoom=f}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 $o{constructor(u){this._tr=new Ci(u),this.reset()}reset(){this._active=!1}dblclick(u,f){return u.preventDefault(),{cameraAnimation:D=>{D.easeTo({duration:300,zoom:this._tr.zoom+(u.shiftKey?-1:1),around:this._tr.unproject(f)},{originalEvent:u})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class ul{constructor(){this._tap=new yi({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(u,f,D){if(!this._swipePoint)if(this._tapTime){const V=f[0],J=u.timeStamp-this._tapTime<500,oe=this._tapPoint.dist(V)<30;J&&oe?D.length>0&&(this._swipePoint=V,this._swipeTouch=D[0].identifier):this.reset()}else this._tap.touchstart(u,f,D)}touchmove(u,f,D){if(this._tapTime){if(this._swipePoint){if(D[0].identifier!==this._swipeTouch)return;const V=f[0],J=V.y-this._swipePoint.y;return this._swipePoint=V,u.preventDefault(),this._active=!0,{zoomDelta:J/128}}}else this._tap.touchmove(u,f,D)}touchend(u,f,D){if(this._tapTime)this._swipePoint&&D.length===0&&this.reset();else{const V=this._tap.touchend(u,f,D);V&&(this._tapTime=u.timeStamp,this._tapPoint=V)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Bs{constructor(u,f,D){this._el=u,this._mousePan=f,this._touchPan=D}enable(u){this._inertiaOptions=u||{},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 Vo{constructor(u,f,D){this._pitchWithRotate=u.pitchWithRotate,this._mouseRotate=f,this._mousePitch=D}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 dl{constructor(u,f,D,V){this._el=u,this._touchZoom=f,this._touchRotate=D,this._tapDragZoom=V,this._rotationDisabled=!1,this._enabled=!0}enable(u){this._touchZoom.enable(u),this._rotationDisabled||this._touchRotate.enable(u),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 ys{constructor(u,f){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=u,this._options=f,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;const u=this._map.getCanvasContainer();u.classList.add("maplibregl-cooperative-gestures"),this._container=n.create("div","maplibregl-cooperative-gesture-screen",u);let f=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(f=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));const D=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),V=document.createElement("div");V.className="maplibregl-desktop-message",V.textContent=f,this._container.appendChild(V);const J=document.createElement("div");J.className="maplibregl-mobile-message",J.textContent=D,this._container.appendChild(J),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(u){return u[this._bypassKey]}notifyGestureBlocked(u,f){this._enabled&&(this._map.fire(new r.k("cooperativegestureprevented",{gestureType:u,originalEvent:f})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}const Ko=R=>R.zoom||R.drag||R.pitch||R.rotate;class zs extends r.k{}function hn(R){return R.panDelta&&R.panDelta.mag()||R.zoomDelta||R.bearingDelta||R.pitchDelta}class ni{constructor(u,f){this.handleWindowEvent=V=>{this.handleEvent(V,`${V.type}Window`)},this.handleEvent=(V,J)=>{if(V.type==="blur")return void this.stop(!0);this._updatingCamera=!0;const oe=V.type==="renderFrame"?void 0:V,fe={needsRenderFrame:!1},xe={},Ee={},Fe=V.touches,Ge=Fe?this._getMapTouches(Fe):void 0,rt=Ge?n.touchPos(this._map.getCanvas(),Ge):n.mousePos(this._map.getCanvas(),V);for(const{handlerName:xt,handler:Mt,allowed:Tt}of this._handlers){if(!Mt.isEnabled())continue;let jt;this._blockedByActive(Ee,Tt,xt)?Mt.reset():Mt[J||V.type]&&(jt=Mt[J||V.type](V,rt,Ge),this.mergeHandlerResult(fe,xe,jt,xt,oe),jt&&jt.needsRenderFrame&&this._triggerRenderFrame()),(jt||Mt.isActive())&&(Ee[xt]=Mt)}const ct={};for(const xt in this._previousActiveHandlers)Ee[xt]||(ct[xt]=oe);this._previousActiveHandlers=Ee,(Object.keys(ct).length||hn(fe))&&(this._changes.push([fe,xe,ct]),this._triggerRenderFrame()),(Object.keys(Ee).length||hn(fe))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:pt}=fe;pt&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],pt(this._map))},this._map=u,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new dc(u),this._bearingSnap=f.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(f);const D=this._el;this._listeners=[[D,"touchstart",{passive:!0}],[D,"touchmove",{passive:!1}],[D,"touchend",void 0],[D,"touchcancel",void 0],[D,"mousedown",void 0],[D,"mousemove",void 0],[D,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[D,"mouseover",void 0],[D,"mouseout",void 0],[D,"dblclick",void 0],[D,"click",void 0],[D,"keydown",{capture:!1}],[D,"keyup",void 0],[D,"wheel",{passive:!1}],[D,"contextmenu",void 0],[window,"blur",void 0]];for(const[V,J,oe]of this._listeners)n.addEventListener(V,J,V===document?this.handleWindowEvent:this.handleEvent,oe)}destroy(){for(const[u,f,D]of this._listeners)n.removeEventListener(u,f,u===document?this.handleWindowEvent:this.handleEvent,D)}_addDefaultHandlers(u){const f=this._map,D=f.getCanvasContainer();this._add("mapEvent",new hc(f,u));const V=f.boxZoom=new So(f,u);this._add("boxZoom",V),u.interactive&&u.boxZoom&&V.enable();const J=f.cooperativeGestures=new ys(f,u.cooperativeGestures);this._add("cooperativeGestures",J),u.cooperativeGestures&&J.enable();const oe=new mo(f),fe=new $o(f);f.doubleClickZoom=new Ti(fe,oe),this._add("tapZoom",oe),this._add("clickZoom",fe),u.interactive&&u.doubleClickZoom&&f.doubleClickZoom.enable();const xe=new ul;this._add("tapDragZoom",xe);const Ee=f.touchPitch=new Rl(f);this._add("touchPitch",Ee),u.interactive&&u.touchPitch&&f.touchPitch.enable(u.touchPitch);const Fe=$l(u),Ge=sl(u);f.dragRotate=new Vo(u,Fe,Ge),this._add("mouseRotate",Fe,["mousePitch"]),this._add("mousePitch",Ge,["mouseRotate"]),u.interactive&&u.dragRotate&&f.dragRotate.enable();const rt=(({enable:jt,clickTolerance:Et})=>{const Jt=new cs({checkCorrectEvent:Kt=>n.mouseButton(Kt)===0&&!Kt.ctrlKey});return new Co({clickTolerance:Et,move:(Kt,Yt)=>({around:Yt,panDelta:Yt.sub(Kt)}),activateOnStart:!0,moveStateManager:Jt,enable:jt,assignEvents:zo})})(u),ct=new Ps(u,f);f.dragPan=new Bs(D,rt,ct),this._add("mousePan",rt),this._add("touchPan",ct,["touchZoom","touchRotate"]),u.interactive&&u.dragPan&&f.dragPan.enable(u.dragPan);const pt=new Jc,xt=new gn;f.touchZoomRotate=new dl(D,xt,pt,xe),this._add("touchRotate",pt,["touchPan","touchZoom"]),this._add("touchZoom",xt,["touchPan","touchRotate"]),u.interactive&&u.touchZoomRotate&&f.touchZoomRotate.enable(u.touchZoomRotate);const Mt=f.scrollZoom=new cl(f,()=>this._triggerRenderFrame());this._add("scrollZoom",Mt,["mousePan"]),u.interactive&&u.scrollZoom&&f.scrollZoom.enable(u.scrollZoom);const Tt=f.keyboard=new pc(f);this._add("keyboard",Tt),u.interactive&&u.keyboard&&f.keyboard.enable(),this._add("blockableMapEvent",new Ro(f))}_add(u,f,D){this._handlers.push({handlerName:u,handler:f,allowed:D}),this._handlersById[u]=f}stop(u){if(!this._updatingCamera){for(const{handler:f}of this._handlers)f.reset();this._inertia.clear(),this._fireEvents({},{},u),this._changes=[]}}isActive(){for(const{handler:u}of this._handlers)if(u.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!Ko(this._eventsInProgress)||this.isZooming()}_blockedByActive(u,f,D){for(const V in u)if(V!==D&&(!f||f.indexOf(V)<0))return!0;return!1}_getMapTouches(u){const f=[];for(const D of u){const V=D.target;this._el.contains(V)&&f.push(D)}return f}mergeHandlerResult(u,f,D,V,J){if(!D)return;r.e(u,D);const oe={handlerName:V,originalEvent:D.originalEvent||J};D.zoomDelta!==void 0&&(f.zoom=oe),D.panDelta!==void 0&&(f.drag=oe),D.pitchDelta!==void 0&&(f.pitch=oe),D.bearingDelta!==void 0&&(f.rotate=oe)}_applyChanges(){const u={},f={},D={};for(const[V,J,oe]of this._changes)V.panDelta&&(u.panDelta=(u.panDelta||new r.P(0,0))._add(V.panDelta)),V.zoomDelta&&(u.zoomDelta=(u.zoomDelta||0)+V.zoomDelta),V.bearingDelta&&(u.bearingDelta=(u.bearingDelta||0)+V.bearingDelta),V.pitchDelta&&(u.pitchDelta=(u.pitchDelta||0)+V.pitchDelta),V.around!==void 0&&(u.around=V.around),V.pinchAround!==void 0&&(u.pinchAround=V.pinchAround),V.noInertia&&(u.noInertia=V.noInertia),r.e(f,J),r.e(D,oe);this._updateMapTransform(u,f,D),this._changes=[]}_updateMapTransform(u,f,D){const V=this._map,J=V._getTransformForUpdate(),oe=V.terrain;if(!(hn(u)||oe&&this._terrainMovement))return this._fireEvents(f,D,!0);let{panDelta:fe,zoomDelta:xe,bearingDelta:Ee,pitchDelta:Fe,around:Ge,pinchAround:rt}=u;rt!==void 0&&(Ge=rt),V._stop(!0),Ge=Ge||V.transform.centerPoint;const ct=J.pointLocation(fe?Ge.sub(fe):Ge);Ee&&(J.bearing+=Ee),Fe&&(J.pitch+=Fe),xe&&(J.zoom+=xe),oe?this._terrainMovement||!f.drag&&!f.zoom?f.drag&&this._terrainMovement?J.center=J.pointLocation(J.centerPoint.sub(fe)):J.setLocationAtPoint(ct,Ge):(this._terrainMovement=!0,this._map._elevationFreeze=!0,J.setLocationAtPoint(ct,Ge)):J.setLocationAtPoint(ct,Ge),V._applyUpdatedTransform(J),this._map._update(),u.noInertia||this._inertia.record(u),this._fireEvents(f,D,!0)}_fireEvents(u,f,D){const V=Ko(this._eventsInProgress),J=Ko(u),oe={};for(const Ge in u){const{originalEvent:rt}=u[Ge];this._eventsInProgress[Ge]||(oe[`${Ge}start`]=rt),this._eventsInProgress[Ge]=u[Ge]}!V&&J&&this._fireEvent("movestart",J.originalEvent);for(const Ge in oe)this._fireEvent(Ge,oe[Ge]);J&&this._fireEvent("move",J.originalEvent);for(const Ge in u){const{originalEvent:rt}=u[Ge];this._fireEvent(Ge,rt)}const fe={};let xe;for(const Ge in this._eventsInProgress){const{handlerName:rt,originalEvent:ct}=this._eventsInProgress[Ge];this._handlersById[rt].isActive()||(delete this._eventsInProgress[Ge],xe=f[rt]||ct,fe[`${Ge}end`]=xe)}for(const Ge in fe)this._fireEvent(Ge,fe[Ge]);const Ee=Ko(this._eventsInProgress),Fe=(V||J)&&!Ee;if(Fe&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;const Ge=this._map._getTransformForUpdate();Ge.recalculateZoom(this._map.terrain),this._map._applyUpdatedTransform(Ge)}if(D&&Fe){this._updatingCamera=!0;const Ge=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),rt=ct=>ct!==0&&-this._bearingSnap<ct&&ct<this._bearingSnap;!Ge||!Ge.essential&&h.prefersReducedMotion?(this._map.fire(new r.k("moveend",{originalEvent:xe})),rt(this._map.getBearing())&&this._map.resetNorth()):(rt(Ge.bearing||this._map.getBearing())&&(Ge.bearing=0),Ge.freezeElevation=!0,this._map.easeTo(Ge,{originalEvent:xe})),this._updatingCamera=!1}}_fireEvent(u,f){this._map.fire(new r.k(u,f?{originalEvent:f}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add(u=>{delete this._frameId,this.handleEvent(new zs("renderFrame",{timeStamp:u})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class ao extends r.E{constructor(u,f){super(),this._renderFrameCallback=()=>{const D=Math.min((h.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(D)),D<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=u,this._bearingSnap=f.bearingSnap,this.on("moveend",()=>{delete this._requestedCameraState})}getCenter(){return new r.N(this.transform.center.lng,this.transform.center.lat)}setCenter(u,f){return this.jumpTo({center:u},f)}panBy(u,f,D){return u=r.P.convert(u).mult(-1),this.panTo(this.transform.center,r.e({offset:u},f),D)}panTo(u,f,D){return this.easeTo(r.e({center:u},f),D)}getZoom(){return this.transform.zoom}setZoom(u,f){return this.jumpTo({zoom:u},f),this}zoomTo(u,f,D){return this.easeTo(r.e({zoom:u},f),D)}zoomIn(u,f){return this.zoomTo(this.getZoom()+1,u,f),this}zoomOut(u,f){return this.zoomTo(this.getZoom()-1,u,f),this}getBearing(){return this.transform.bearing}setBearing(u,f){return this.jumpTo({bearing:u},f),this}getPadding(){return this.transform.padding}setPadding(u,f){return this.jumpTo({padding:u},f),this}rotateTo(u,f,D){return this.easeTo(r.e({bearing:u},f),D)}resetNorth(u,f){return this.rotateTo(0,r.e({duration:1e3},u),f),this}resetNorthPitch(u,f){return this.easeTo(r.e({bearing:0,pitch:0,duration:1e3},u),f),this}snapToNorth(u,f){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(u,f):this}getPitch(){return this.transform.pitch}setPitch(u,f){return this.jumpTo({pitch:u},f),this}cameraForBounds(u,f){u=Ce.convert(u);const D=f&&f.bearing||0;return this._cameraForBoxAndBearing(u.getNorthWest(),u.getSouthEast(),D,f)}_cameraForBoxAndBearing(u,f,D,V){const J={top:0,bottom:0,right:0,left:0};if(typeof(V=r.e({padding:J,offset:[0,0],maxZoom:this.transform.maxZoom},V)).padding=="number"){const gr=V.padding;V.padding={top:gr,bottom:gr,right:gr,left:gr}}V.padding=r.e(J,V.padding);const oe=this.transform,fe=oe.padding,xe=new Ce(u,f),Ee=oe.project(xe.getNorthWest()),Fe=oe.project(xe.getNorthEast()),Ge=oe.project(xe.getSouthEast()),rt=oe.project(xe.getSouthWest()),ct=r.ba(-D),pt=Ee.rotate(ct),xt=Fe.rotate(ct),Mt=Ge.rotate(ct),Tt=rt.rotate(ct),jt=new r.P(Math.max(pt.x,xt.x,Tt.x,Mt.x),Math.max(pt.y,xt.y,Tt.y,Mt.y)),Et=new r.P(Math.min(pt.x,xt.x,Tt.x,Mt.x),Math.min(pt.y,xt.y,Tt.y,Mt.y)),Jt=jt.sub(Et),Kt=(oe.width-(fe.left+fe.right+V.padding.left+V.padding.right))/Jt.x,Yt=(oe.height-(fe.top+fe.bottom+V.padding.top+V.padding.bottom))/Jt.y;if(Yt<0||Kt<0)return void r.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.");const da=Math.min(oe.scaleZoom(oe.scale*Math.min(Kt,Yt)),V.maxZoom),_a=r.P.convert(V.offset),Da=(V.padding.left-V.padding.right)/2,Na=(V.padding.top-V.padding.bottom)/2,Ga=new r.P(Da,Na).rotate(r.ba(D)),$a=_a.add(Ga).mult(oe.scale/oe.zoomScale(da));return{center:oe.unproject(Ee.add(Ge).div(2).sub($a)),zoom:da,bearing:D}}fitBounds(u,f,D){return this._fitInternal(this.cameraForBounds(u,f),f,D)}fitScreenCoordinates(u,f,D,V,J){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(r.P.convert(u)),this.transform.pointLocation(r.P.convert(f)),D,V),V,J)}_fitInternal(u,f,D){return u?(delete(f=r.e(u,f)).padding,f.linear?this.easeTo(f,D):this.flyTo(f,D)):this}jumpTo(u,f){this.stop();const D=this._getTransformForUpdate();let V=!1,J=!1,oe=!1;return"zoom"in u&&D.zoom!==+u.zoom&&(V=!0,D.zoom=+u.zoom),u.center!==void 0&&(D.center=r.N.convert(u.center)),"bearing"in u&&D.bearing!==+u.bearing&&(J=!0,D.bearing=+u.bearing),"pitch"in u&&D.pitch!==+u.pitch&&(oe=!0,D.pitch=+u.pitch),u.padding==null||D.isPaddingEqual(u.padding)||(D.padding=u.padding),this._applyUpdatedTransform(D),this.fire(new r.k("movestart",f)).fire(new r.k("move",f)),V&&this.fire(new r.k("zoomstart",f)).fire(new r.k("zoom",f)).fire(new r.k("zoomend",f)),J&&this.fire(new r.k("rotatestart",f)).fire(new r.k("rotate",f)).fire(new r.k("rotateend",f)),oe&&this.fire(new r.k("pitchstart",f)).fire(new r.k("pitch",f)).fire(new r.k("pitchend",f)),this.fire(new r.k("moveend",f))}calculateCameraOptionsFromTo(u,f,D,V=0){const J=r.Z.fromLngLat(u,f),oe=r.Z.fromLngLat(D,V),fe=oe.x-J.x,xe=oe.y-J.y,Ee=oe.z-J.z,Fe=Math.hypot(fe,xe,Ee);if(Fe===0)throw new Error("Can't calculate camera options with same From and To");const Ge=Math.hypot(fe,xe),rt=this.transform.scaleZoom(this.transform.cameraToCenterDistance/Fe/this.transform.tileSize),ct=180*Math.atan2(fe,-xe)/Math.PI;let pt=180*Math.acos(Ge/Fe)/Math.PI;return pt=Ee<0?90-pt:90+pt,{center:oe.toLngLat(),zoom:rt,pitch:pt,bearing:ct}}easeTo(u,f){var D;this._stop(!1,u.easeId),((u=r.e({offset:[0,0],duration:500,easing:r.b9},u)).animate===!1||!u.essential&&h.prefersReducedMotion)&&(u.duration=0);const V=this._getTransformForUpdate(),J=V.zoom,oe=V.bearing,fe=V.pitch,xe=V.padding,Ee="bearing"in u?this._normalizeBearing(u.bearing,oe):oe,Fe="pitch"in u?+u.pitch:fe,Ge="padding"in u?u.padding:V.padding,rt=r.P.convert(u.offset);let ct=V.centerPoint.add(rt);const pt=V.pointLocation(ct),{center:xt,zoom:Mt}=V.getConstrained(r.N.convert(u.center||pt),(D=u.zoom)!==null&&D!==void 0?D:J);this._normalizeCenter(xt,V);const Tt=V.project(pt),jt=V.project(xt).sub(Tt),Et=V.zoomScale(Mt-J);let Jt,Kt;u.around&&(Jt=r.N.convert(u.around),Kt=V.locationPoint(Jt));const Yt={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||Mt!==J,this._rotating=this._rotating||oe!==Ee,this._pitching=this._pitching||Fe!==fe,this._padding=!V.isPaddingEqual(Ge),this._easeId=u.easeId,this._prepareEase(f,u.noMoveStart,Yt),this.terrain&&this._prepareElevation(xt),this._ease(da=>{if(this._zooming&&(V.zoom=r.z.number(J,Mt,da)),this._rotating&&(V.bearing=r.z.number(oe,Ee,da)),this._pitching&&(V.pitch=r.z.number(fe,Fe,da)),this._padding&&(V.interpolatePadding(xe,Ge,da),ct=V.centerPoint.add(rt)),this.terrain&&!u.freezeElevation&&this._updateElevation(da),Jt)V.setLocationAtPoint(Jt,Kt);else{const _a=V.zoomScale(V.zoom-J),Da=Mt>J?Math.min(2,Et):Math.max(.5,Et),Na=Math.pow(Da,1-da),Ga=V.unproject(Tt.add(jt.mult(da*Na)).mult(_a));V.setLocationAtPoint(V.renderWorldCopies?Ga.wrap():Ga,ct)}this._applyUpdatedTransform(V),this._fireMoveEvents(f)},da=>{this.terrain&&u.freezeElevation&&this._finalizeElevation(),this._afterEase(f,da)},u),this}_prepareEase(u,f,D={}){this._moving=!0,f||D.moving||this.fire(new r.k("movestart",u)),this._zooming&&!D.zooming&&this.fire(new r.k("zoomstart",u)),this._rotating&&!D.rotating&&this.fire(new r.k("rotatestart",u)),this._pitching&&!D.pitching&&this.fire(new r.k("pitchstart",u))}_prepareElevation(u){this._elevationCenter=u,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(u,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(u){this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);const f=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(u<1&&f!==this._elevationTarget){const D=this._elevationTarget-this._elevationStart,V=(f-(D*u+this._elevationStart))/(1-u);this._elevationStart+=u*(D-V),this._elevationTarget=f}this.transform.elevation=r.z.number(this._elevationStart,this._elevationTarget,u)}_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(u){const f=u.getCameraPosition(),D=this.terrain.getElevationForLngLatZoom(f.lngLat,u.zoom);if(f.altitude<D){const V=this.calculateCameraOptionsFromTo(f.lngLat,D,u.center,u.elevation);return{pitch:V.pitch,zoom:V.zoom}}return{}}_applyUpdatedTransform(u){const f=[];if(this.terrain&&f.push(V=>this._elevateCameraIfInsideTerrain(V)),this.transformCameraUpdate&&f.push(V=>this.transformCameraUpdate(V)),!f.length)return;const D=u.clone();for(const V of f){const J=D.clone(),{center:oe,zoom:fe,pitch:xe,bearing:Ee,elevation:Fe}=V(J);oe&&(J.center=oe),fe!==void 0&&(J.zoom=fe),xe!==void 0&&(J.pitch=xe),Ee!==void 0&&(J.bearing=Ee),Fe!==void 0&&(J.elevation=Fe),D.apply(J)}this.transform.apply(D)}_fireMoveEvents(u){this.fire(new r.k("move",u)),this._zooming&&this.fire(new r.k("zoom",u)),this._rotating&&this.fire(new r.k("rotate",u)),this._pitching&&this.fire(new r.k("pitch",u))}_afterEase(u,f){if(this._easeId&&f&&this._easeId===f)return;delete this._easeId;const D=this._zooming,V=this._rotating,J=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,D&&this.fire(new r.k("zoomend",u)),V&&this.fire(new r.k("rotateend",u)),J&&this.fire(new r.k("pitchend",u)),this.fire(new r.k("moveend",u))}flyTo(u,f){var D;if(!u.essential&&h.prefersReducedMotion){const nr=r.M(u,["center","zoom","bearing","pitch","around"]);return this.jumpTo(nr,f)}this.stop(),u=r.e({offset:[0,0],speed:1.2,curve:1.42,easing:r.b9},u);const V=this._getTransformForUpdate(),J=V.zoom,oe=V.bearing,fe=V.pitch,xe=V.padding,Ee="bearing"in u?this._normalizeBearing(u.bearing,oe):oe,Fe="pitch"in u?+u.pitch:fe,Ge="padding"in u?u.padding:V.padding,rt=r.P.convert(u.offset);let ct=V.centerPoint.add(rt);const pt=V.pointLocation(ct),{center:xt,zoom:Mt}=V.getConstrained(r.N.convert(u.center||pt),(D=u.zoom)!==null&&D!==void 0?D:J);this._normalizeCenter(xt,V);const Tt=V.zoomScale(Mt-J),jt=V.project(pt),Et=V.project(xt).sub(jt);let Jt=u.curve;const Kt=Math.max(V.width,V.height),Yt=Kt/Tt,da=Et.mag();if("minZoom"in u){const nr=r.ad(Math.min(u.minZoom,J,Mt),V.minZoom,V.maxZoom),Sr=Kt/V.zoomScale(nr-J);Jt=Math.sqrt(Sr/da*2)}const _a=Jt*Jt;function Da(nr){const Sr=(Yt*Yt-Kt*Kt+(nr?-1:1)*_a*_a*da*da)/(2*(nr?Yt:Kt)*_a*da);return Math.log(Math.sqrt(Sr*Sr+1)-Sr)}function Na(nr){return(Math.exp(nr)-Math.exp(-nr))/2}function Ga(nr){return(Math.exp(nr)+Math.exp(-nr))/2}const $a=Da(!1);let gr=function(nr){return Ga($a)/Ga($a+Jt*nr)},Qa=function(nr){return Kt*((Ga($a)*(Na(Sr=$a+Jt*nr)/Ga(Sr))-Na($a))/_a)/da;var Sr},xr=(Da(!0)-$a)/Jt;if(Math.abs(da)<1e-6||!isFinite(xr)){if(Math.abs(Kt-Yt)<1e-6)return this.easeTo(u,f);const nr=Yt<Kt?-1:1;xr=Math.abs(Math.log(Yt/Kt))/Jt,Qa=()=>0,gr=Sr=>Math.exp(nr*Jt*Sr)}if("duration"in u)u.duration=+u.duration;else{const nr="screenSpeed"in u?+u.screenSpeed/Jt:+u.speed;u.duration=1e3*xr/nr}return u.maxDuration&&u.duration>u.maxDuration&&(u.duration=0),this._zooming=!0,this._rotating=oe!==Ee,this._pitching=Fe!==fe,this._padding=!V.isPaddingEqual(Ge),this._prepareEase(f,!1),this.terrain&&this._prepareElevation(xt),this._ease(nr=>{const Sr=nr*xr,pr=1/gr(Sr);V.zoom=nr===1?Mt:J+V.scaleZoom(pr),this._rotating&&(V.bearing=r.z.number(oe,Ee,nr)),this._pitching&&(V.pitch=r.z.number(fe,Fe,nr)),this._padding&&(V.interpolatePadding(xe,Ge,nr),ct=V.centerPoint.add(rt)),this.terrain&&!u.freezeElevation&&this._updateElevation(nr);const Mr=nr===1?xt:V.unproject(jt.add(Et.mult(Qa(Sr))).mult(pr));V.setLocationAtPoint(V.renderWorldCopies?Mr.wrap():Mr,ct),this._applyUpdatedTransform(V),this._fireMoveEvents(f)},()=>{this.terrain&&u.freezeElevation&&this._finalizeElevation(),this._afterEase(f)},u),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(u,f){var D;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const V=this._onEaseEnd;delete this._onEaseEnd,V.call(this,f)}return u||(D=this.handlers)===null||D===void 0||D.stop(!1),this}_ease(u,f,D){D.animate===!1||D.duration===0?(u(1),f()):(this._easeStart=h.now(),this._easeOptions=D,this._onEaseFrame=u,this._onEaseEnd=f,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(u,f){u=r.b3(u,-180,180);const D=Math.abs(u-f);return Math.abs(u-360-f)<D&&(u-=360),Math.abs(u+360-f)<D&&(u+=360),u}_normalizeCenter(u,f){if(!f.renderWorldCopies||f.lngRange)return;const D=u.lng-f.center.lng;u.lng+=D>180?-360:D<-180?360:0}queryTerrainElevation(u){return this.terrain?this.terrain.getElevationForLngLatZoom(r.N.convert(u),this.transform.tileZoom)-this.transform.elevation:null}}const jo={compact:!0,customAttribution:'<a href="https://maplibre.org/" target="_blank">MapLibre</a>'};class ds{constructor(u=jo){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=f=>{!f||f.sourceDataType!=="metadata"&&f.sourceDataType!=="visibility"&&f.dataType!=="style"&&f.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=u}getDefaultPosition(){return"bottom-right"}onAdd(u){return this._map=u,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(u,f){const D=this._map._getUIString(`AttributionControl.${f}`);u.title=D,u.setAttribute("aria-label",D)}_updateAttributions(){if(!this._map.style)return;let u=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?u=u.concat(this.options.customAttribution.map(V=>typeof V!="string"?"":V)):typeof this.options.customAttribution=="string"&&u.push(this.options.customAttribution)),this._map.style.stylesheet){const V=this._map.style.stylesheet;this.styleOwner=V.owner,this.styleId=V.id}const f=this._map.style.sourceCaches;for(const V in f){const J=f[V];if(J.used||J.usedForTerrain){const oe=J.getSource();oe.attribution&&u.indexOf(oe.attribution)<0&&u.push(oe.attribution)}}u=u.filter(V=>String(V).trim()),u.sort((V,J)=>V.length-J.length),u=u.filter((V,J)=>{for(let oe=J+1;oe<u.length;oe++)if(u[oe].indexOf(V)>=0)return!1;return!0});const D=u.join(" | ");D!==this._attribHTML&&(this._attribHTML=D,u.length?(this._innerContainer.innerHTML=D,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class yo{constructor(u={}){this._updateCompact=()=>{const f=this._container.children;if(f.length){const D=f[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&D.classList.add("maplibregl-compact"):D.classList.remove("maplibregl-compact")}},this.options=u}getDefaultPosition(){return"bottom-left"}onAdd(u){this._map=u,this._compact=this.options&&this.options.compact,this._container=n.create("div","maplibregl-ctrl");const f=n.create("a","maplibregl-ctrl-logo");return f.target="_blank",f.rel="noopener nofollow",f.href="https://maplibre.org/",f.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),f.setAttribute("rel","noopener nofollow"),this._container.appendChild(f),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 Ec{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(u){const f=++this._id;return this._queue.push({callback:u,id:f,cancelled:!1}),f}remove(u){const f=this._currentlyRunning,D=f?this._queue.concat(f):this._queue;for(const V of D)if(V.id===u)return void(V.cancelled=!0)}run(u=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const f=this._currentlyRunning=this._queue;this._queue=[];for(const D of f)if(!D.cancelled&&(D.callback(u),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var tn=r.Y([{name:"a_pos3d",type:"Int16",components:3}]);class Uo extends r.E{constructor(u){super(),this.sourceCache=u,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,u.usedForTerrain=!0,u.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(u,f){this.sourceCache.update(u,f),this._renderableTilesKeys=[];const D={};for(const V of u.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:f}))D[V.key]=!0,this._renderableTilesKeys.push(V.key),this._tiles[V.key]||(V.posMatrix=new Float64Array(16),r.aQ(V.posMatrix,0,r.X,0,r.X,0,1),this._tiles[V.key]=new _e(V,this.tileSize));for(const V in this._tiles)D[V]||delete this._tiles[V]}freeRtt(u){for(const f in this._tiles){const D=this._tiles[f];(!u||D.tileID.equals(u)||D.tileID.isChildOf(u)||u.isChildOf(D.tileID))&&(D.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(u=>this.getTileByID(u))}getTileByID(u){return this._tiles[u]}getTerrainCoords(u){const f={};for(const D of this._renderableTilesKeys){const V=this._tiles[D].tileID;if(V.canonical.equals(u.canonical)){const J=u.clone();J.posMatrix=new Float64Array(16),r.aQ(J.posMatrix,0,r.X,0,r.X,0,1),f[D]=J}else if(V.canonical.isChildOf(u.canonical)){const J=u.clone();J.posMatrix=new Float64Array(16);const oe=V.canonical.z-u.canonical.z,fe=V.canonical.x-(V.canonical.x>>oe<<oe),xe=V.canonical.y-(V.canonical.y>>oe<<oe),Ee=r.X>>oe;r.aQ(J.posMatrix,0,Ee,0,Ee,0,1),r.J(J.posMatrix,J.posMatrix,[-fe*Ee,-xe*Ee,0]),f[D]=J}else if(u.canonical.isChildOf(V.canonical)){const J=u.clone();J.posMatrix=new Float64Array(16);const oe=u.canonical.z-V.canonical.z,fe=u.canonical.x-(u.canonical.x>>oe<<oe),xe=u.canonical.y-(u.canonical.y>>oe<<oe),Ee=r.X>>oe;r.aQ(J.posMatrix,0,r.X,0,r.X,0,1),r.J(J.posMatrix,J.posMatrix,[fe*Ee,xe*Ee,0]),r.K(J.posMatrix,J.posMatrix,[1/2**oe,1/2**oe,0]),f[D]=J}}return f}getSourceTile(u,f){const D=this.sourceCache._source;let V=u.overscaledZ-this.deltaZoom;if(V>D.maxzoom&&(V=D.maxzoom),V<D.minzoom)return null;this._sourceTileCache[u.key]||(this._sourceTileCache[u.key]=u.scaledTo(V).key);let J=this.sourceCache.getTileByID(this._sourceTileCache[u.key]);if((!J||!J.dem)&&f)for(;V>=D.minzoom&&(!J||!J.dem);)J=this.sourceCache.getTileByID(u.scaledTo(V--).key);return J}tilesAfterTime(u=Date.now()){return Object.values(this._tiles).filter(f=>f.timeAdded>=u)}}class ii{constructor(u,f,D){this.painter=u,this.sourceCache=new Uo(f),this.options=D,this.exaggeration=typeof D.exaggeration=="number"?D.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(u,f,D,V=r.X){var J;if(!(f>=0&&f<V&&D>=0&&D<V))return 0;const oe=this.getTerrainData(u),fe=(J=oe.tile)===null||J===void 0?void 0:J.dem;if(!fe)return 0;const xe=function(pt,xt,Mt){var Tt=xt[0],jt=xt[1];return pt[0]=Mt[0]*Tt+Mt[4]*jt+Mt[12],pt[1]=Mt[1]*Tt+Mt[5]*jt+Mt[13],pt}([],[f/V*r.X,D/V*r.X],oe.u_terrain_matrix),Ee=[xe[0]*fe.dim,xe[1]*fe.dim],Fe=Math.floor(Ee[0]),Ge=Math.floor(Ee[1]),rt=Ee[0]-Fe,ct=Ee[1]-Ge;return fe.get(Fe,Ge)*(1-rt)*(1-ct)+fe.get(Fe+1,Ge)*rt*(1-ct)+fe.get(Fe,Ge+1)*(1-rt)*ct+fe.get(Fe+1,Ge+1)*rt*ct}getElevationForLngLatZoom(u,f){const{tileID:D,mercatorX:V,mercatorY:J}=this._getOverscaledTileIDFromLngLatZoom(u,f);return this.getElevation(D,V%r.X,J%r.X,r.X)}getElevation(u,f,D,V=r.X){return this.getDEMElevation(u,f,D,V)*this.exaggeration}getTerrainData(u){if(!this._emptyDemTexture){const V=this.painter.context,J=new r.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new z(V,J,V.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new z(V,new r.R({width:1,height:1}),V.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(V.gl.NEAREST,V.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=r.ao([])}const f=this.sourceCache.getSourceTile(u,!0);if(f&&f.dem&&(!f.demTexture||f.needsTerrainPrepare)){const V=this.painter.context;f.demTexture=this.painter.getTileTexture(f.dem.stride),f.demTexture?f.demTexture.update(f.dem.getPixels(),{premultiply:!1}):f.demTexture=new z(V,f.dem.getPixels(),V.gl.RGBA,{premultiply:!1}),f.demTexture.bind(V.gl.NEAREST,V.gl.CLAMP_TO_EDGE),f.needsTerrainPrepare=!1}const D=f&&f+f.tileID.key+u.key;if(D&&!this._demMatrixCache[D]){const V=this.sourceCache.sourceCache._source.maxzoom;let J=u.canonical.z-f.tileID.canonical.z;u.overscaledZ>u.canonical.z&&(u.canonical.z>=V?J=u.canonical.z-V:r.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const oe=u.canonical.x-(u.canonical.x>>J<<J),fe=u.canonical.y-(u.canonical.y>>J<<J),xe=r.bb(new Float64Array(16),[1/(r.X<<J),1/(r.X<<J),0]);r.J(xe,xe,[oe*r.X,fe*r.X,0]),this._demMatrixCache[u.key]={matrix:xe,coord:u}}return{u_depth:2,u_terrain:3,u_terrain_dim:f&&f.dem&&f.dem.dim||1,u_terrain_matrix:D?this._demMatrixCache[u.key].matrix:this._emptyDemMatrix,u_terrain_unpack:f&&f.dem&&f.dem.getUnpackVector()||this._emptyDemUnpack,u_terrain_exaggeration:this.exaggeration,texture:(f&&f.demTexture||this._emptyDemTexture).texture,depthTexture:(this._fboDepthTexture||this._emptyDepthTexture).texture,tile:f}}getFramebuffer(u){const f=this.painter,D=f.width/devicePixelRatio,V=f.height/devicePixelRatio;return!this._fbo||this._fbo.width===D&&this._fbo.height===V||(this._fbo.destroy(),this._fboCoordsTexture.destroy(),this._fboDepthTexture.destroy(),delete this._fbo,delete this._fboDepthTexture,delete this._fboCoordsTexture),this._fboCoordsTexture||(this._fboCoordsTexture=new z(f.context,{width:D,height:V,data:null},f.context.gl.RGBA,{premultiply:!1}),this._fboCoordsTexture.bind(f.context.gl.NEAREST,f.context.gl.CLAMP_TO_EDGE)),this._fboDepthTexture||(this._fboDepthTexture=new z(f.context,{width:D,height:V,data:null},f.context.gl.RGBA,{premultiply:!1}),this._fboDepthTexture.bind(f.context.gl.NEAREST,f.context.gl.CLAMP_TO_EDGE)),this._fbo||(this._fbo=f.context.createFramebuffer(D,V,!0,!1),this._fbo.depthAttachment.set(f.context.createRenderbuffer(f.context.gl.DEPTH_COMPONENT16,D,V))),this._fbo.colorAttachment.set(u==="coords"?this._fboCoordsTexture.texture:this._fboDepthTexture.texture),this._fbo}getCoordsTexture(){const u=this.painter.context;if(this._coordsTexture)return this._coordsTexture;const f=new Uint8Array(this._coordsTextureSize*this._coordsTextureSize*4);for(let J=0,oe=0;J<this._coordsTextureSize;J++)for(let fe=0;fe<this._coordsTextureSize;fe++,oe+=4)f[oe+0]=255&fe,f[oe+1]=255&J,f[oe+2]=fe>>8<<4|J>>8,f[oe+3]=0;const D=new r.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(f.buffer)),V=new z(u,D,u.gl.RGBA,{premultiply:!1});return V.bind(u.gl.NEAREST,u.gl.CLAMP_TO_EDGE),this._coordsTexture=V,V}pointCoordinate(u){this.painter.maybeDrawDepthAndCoords(!0);const f=new Uint8Array(4),D=this.painter.context,V=D.gl,J=Math.round(u.x*this.painter.pixelRatio/devicePixelRatio),oe=Math.round(u.y*this.painter.pixelRatio/devicePixelRatio),fe=Math.round(this.painter.height/devicePixelRatio);D.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),V.readPixels(J,fe-oe-1,1,1,V.RGBA,V.UNSIGNED_BYTE,f),D.bindFramebuffer.set(null);const xe=f[0]+(f[2]>>4<<8),Ee=f[1]+((15&f[2])<<8),Fe=this.coordsIndex[255-f[3]],Ge=Fe&&this.sourceCache.getTileByID(Fe);if(!Ge)return null;const rt=this._coordsTextureSize,ct=(1<<Ge.tileID.canonical.z)*rt;return new r.Z((Ge.tileID.canonical.x*rt+xe)/ct+Ge.tileID.wrap,(Ge.tileID.canonical.y*rt+Ee)/ct,this.getElevation(Ge.tileID,xe,Ee,rt))}depthAtPoint(u){const f=new Uint8Array(4),D=this.painter.context,V=D.gl;return D.bindFramebuffer.set(this.getFramebuffer("depth").framebuffer),V.readPixels(u.x,this.painter.height/devicePixelRatio-u.y-1,1,1,V.RGBA,V.UNSIGNED_BYTE,f),D.bindFramebuffer.set(null),(f[0]/16777216+f[1]/65536+f[2]/256+f[3])/256}getTerrainMesh(){if(this._mesh)return this._mesh;const u=this.painter.context,f=new r.bc,D=new r.aY,V=this.meshSize,J=r.X/V,oe=V*V;for(let Ge=0;Ge<=V;Ge++)for(let rt=0;rt<=V;rt++)f.emplaceBack(rt*J,Ge*J,0);for(let Ge=0;Ge<oe;Ge+=V+1)for(let rt=0;rt<V;rt++)D.emplaceBack(rt+Ge,V+rt+Ge+1,V+rt+Ge+2),D.emplaceBack(rt+Ge,V+rt+Ge+2,rt+Ge+1);const fe=f.length,xe=fe+2*(V+1);for(const Ge of[0,1])for(let rt=0;rt<=V;rt++)for(const ct of[0,1])f.emplaceBack(rt*J,Ge*r.X,ct);for(let Ge=0;Ge<2*V;Ge+=2)D.emplaceBack(xe+Ge,xe+Ge+1,xe+Ge+3),D.emplaceBack(xe+Ge,xe+Ge+3,xe+Ge+2),D.emplaceBack(fe+Ge,fe+Ge+3,fe+Ge+1),D.emplaceBack(fe+Ge,fe+Ge+2,fe+Ge+3);const Ee=f.length,Fe=Ee+2*(V+1);for(const Ge of[0,1])for(let rt=0;rt<=V;rt++)for(const ct of[0,1])f.emplaceBack(Ge*r.X,rt*J,ct);for(let Ge=0;Ge<2*V;Ge+=2)D.emplaceBack(Ee+Ge,Ee+Ge+1,Ee+Ge+3),D.emplaceBack(Ee+Ge,Ee+Ge+3,Ee+Ge+2),D.emplaceBack(Fe+Ge,Fe+Ge+3,Fe+Ge+1),D.emplaceBack(Fe+Ge,Fe+Ge+2,Fe+Ge+3);return this._mesh=new cc(u.createVertexBuffer(f,tn.members),u.createIndexBuffer(D),r.a0.simpleSegment(0,0,f.length,D.length)),this._mesh}getMeshFrameDelta(u){return 2*Math.PI*r.bd/Math.pow(2,u)/5}getMinTileElevationForLngLatZoom(u,f){var D;const{tileID:V}=this._getOverscaledTileIDFromLngLatZoom(u,f);return(D=this.getMinMaxElevation(V).minElevation)!==null&&D!==void 0?D:0}getMinMaxElevation(u){const f=this.getTerrainData(u).tile,D={minElevation:null,maxElevation:null};return f&&f.dem&&(D.minElevation=f.dem.min*this.exaggeration,D.maxElevation=f.dem.max*this.exaggeration),D}_getOverscaledTileIDFromLngLatZoom(u,f){const D=r.Z.fromLngLat(u.wrap()),V=(1<<f)*r.X,J=D.x*V,oe=D.y*V,fe=Math.floor(J/r.X),xe=Math.floor(oe/r.X);return{tileID:new r.S(f,0,f,fe,xe),mercatorX:J,mercatorY:oe}}}class Vl{constructor(u,f,D){this._context=u,this._size=f,this._tileSize=D,this._objects=[],this._recentlyUsed=[],this._stamp=0}destruct(){for(const u of this._objects)u.texture.destroy(),u.fbo.destroy()}_createObject(u){const f=this._context.createFramebuffer(this._tileSize,this._tileSize,!0,!0),D=new z(this._context,{width:this._tileSize,height:this._tileSize,data:null},this._context.gl.RGBA);return D.bind(this._context.gl.LINEAR,this._context.gl.CLAMP_TO_EDGE),f.depthAttachment.set(this._context.createRenderbuffer(this._context.gl.DEPTH_STENCIL,this._tileSize,this._tileSize)),f.colorAttachment.set(D.texture),{id:u,fbo:f,texture:D,stamp:-1,inUse:!1}}getObjectForId(u){return this._objects[u]}useObject(u){u.inUse=!0,this._recentlyUsed=this._recentlyUsed.filter(f=>u.id!==f),this._recentlyUsed.push(u.id)}stampObject(u){u.stamp=++this._stamp}getOrCreateFreeObject(){for(const f of this._recentlyUsed)if(!this._objects[f].inUse)return this._objects[f];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");const u=this._createObject(this._objects.length);return this._objects.push(u),u}freeObject(u){u.inUse=!1}freeAllObjects(){for(const u of this._objects)this.freeObject(u)}isFull(){return!(this._objects.length<this._size)&&this._objects.some(u=>!u.inUse)===!1}}const vs={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class qs{constructor(u,f){this.painter=u,this.terrain=f,this.pool=new Vl(u.context,30,f.sourceCache.tileSize*f.qualityFactor)}destruct(){this.pool.destruct()}getTexture(u){return this.pool.getObjectForId(u.rtt[this._stacks.length-1].id).texture}prepareForRender(u,f){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=u._order.filter(D=>!u._layers[D].isHidden(f)),this._coordsDescendingInv={};for(const D in u.sourceCaches){this._coordsDescendingInv[D]={};const V=u.sourceCaches[D].getVisibleCoordinates();for(const J of V){const oe=this.terrain.sourceCache.getTerrainCoords(J);for(const fe in oe)this._coordsDescendingInv[D][fe]||(this._coordsDescendingInv[D][fe]=[]),this._coordsDescendingInv[D][fe].push(oe[fe])}}this._coordsDescendingInvStr={};for(const D of u._order){const V=u._layers[D],J=V.source;if(vs[V.type]&&!this._coordsDescendingInvStr[J]){this._coordsDescendingInvStr[J]={};for(const oe in this._coordsDescendingInv[J])this._coordsDescendingInvStr[J][oe]=this._coordsDescendingInv[J][oe].map(fe=>fe.key).sort().join()}}for(const D of this._renderableTiles)for(const V in this._coordsDescendingInvStr){const J=this._coordsDescendingInvStr[V][D.tileID.key];J&&J!==D.rttCoords[V]&&(D.rtt=[])}}renderLayer(u){if(u.isHidden(this.painter.transform.zoom))return!1;const f=u.type,D=this.painter,V=this._renderableLayerIds[this._renderableLayerIds.length-1]===u.id;if(vs[f]&&(this._prevType&&vs[this._prevType]||this._stacks.push([]),this._prevType=f,this._stacks[this._stacks.length-1].push(u.id),!V))return!0;if(vs[this._prevType]||vs[f]&&V){this._prevType=f;const J=this._stacks.length-1,oe=this._stacks[J]||[];for(const fe of this._renderableTiles){if(this.pool.isFull()&&(lc(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(fe),fe.rtt[J]){const Ee=this.pool.getObjectForId(fe.rtt[J].id);if(Ee.stamp===fe.rtt[J].stamp){this.pool.useObject(Ee);continue}}const xe=this.pool.getOrCreateFreeObject();this.pool.useObject(xe),this.pool.stampObject(xe),fe.rtt[J]={id:xe.id,stamp:xe.stamp},D.context.bindFramebuffer.set(xe.fbo.framebuffer),D.context.clear({color:r.aN.transparent,stencil:0}),D.currentStencilSource=void 0;for(let Ee=0;Ee<oe.length;Ee++){const Fe=D.style._layers[oe[Ee]],Ge=Fe.source?this._coordsDescendingInv[Fe.source][fe.tileID.key]:[fe.tileID];D.context.viewport.set([0,0,xe.fbo.width,xe.fbo.height]),D._renderTileClippingMasks(Fe,Ge),D.renderLayer(D,D.style.sourceCaches[Fe.source],Fe,Ge),Fe.source&&(fe.rttCoords[Fe.source]=this._coordsDescendingInvStr[Fe.source][fe.tileID.key])}}return lc(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects(),vs[f]}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"},Mc=_,hl={hash:!1,interactive:!0,bearingSnap:7,attributionControl:jo,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:r.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},Ei=R=>{R.touchstart=R.dragStart,R.touchmoveWindow=R.dragMove,R.touchend=R.dragEnd},Os={showCompass:!0,showZoom:!0,visualizePitch:!1};class qr{constructor(u,f,D=!1){this.mousedown=oe=>{this.startMouse(r.e({},oe,{ctrlKey:!0,preventDefault:()=>oe.preventDefault()}),n.mousePos(this.element,oe)),n.addEventListener(window,"mousemove",this.mousemove),n.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=oe=>{this.moveMouse(oe,n.mousePos(this.element,oe))},this.mouseup=oe=>{this.mouseRotate.dragEnd(oe),this.mousePitch&&this.mousePitch.dragEnd(oe),this.offTemp()},this.touchstart=oe=>{oe.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=n.touchPos(this.element,oe.targetTouches)[0],this.startTouch(oe,this._startPos),n.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),n.addEventListener(window,"touchend",this.touchend))},this.touchmove=oe=>{oe.targetTouches.length!==1?this.reset():(this._lastPos=n.touchPos(this.element,oe.targetTouches)[0],this.moveTouch(oe,this._lastPos))},this.touchend=oe=>{oe.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 V=u.dragRotate._mouseRotate.getClickTolerance(),J=u.dragRotate._mousePitch.getClickTolerance();this.element=f,this.mouseRotate=$l({clickTolerance:V,enable:!0}),this.touchRotate=(({enable:oe,clickTolerance:fe,bearingDegreesPerPixelMoved:xe=.8})=>{const Ee=new Fl;return new Co({clickTolerance:fe,move:(Fe,Ge)=>({bearingDelta:(Ge.x-Fe.x)*xe}),moveStateManager:Ee,enable:oe,assignEvents:Ei})})({clickTolerance:V,enable:!0}),this.map=u,D&&(this.mousePitch=sl({clickTolerance:J,enable:!0}),this.touchPitch=(({enable:oe,clickTolerance:fe,pitchDegreesPerPixelMoved:xe=-.5})=>{const Ee=new Fl;return new Co({clickTolerance:fe,move:(Fe,Ge)=>({pitchDelta:(Ge.y-Fe.y)*xe}),moveStateManager:Ee,enable:oe,assignEvents:Ei})})({clickTolerance:J,enable:!0})),n.addEventListener(f,"mousedown",this.mousedown),n.addEventListener(f,"touchstart",this.touchstart,{passive:!1}),n.addEventListener(f,"touchcancel",this.reset)}startMouse(u,f){this.mouseRotate.dragStart(u,f),this.mousePitch&&this.mousePitch.dragStart(u,f),n.disableDrag()}startTouch(u,f){this.touchRotate.dragStart(u,f),this.touchPitch&&this.touchPitch.dragStart(u,f),n.disableDrag()}moveMouse(u,f){const D=this.map,{bearingDelta:V}=this.mouseRotate.dragMove(u,f)||{};if(V&&D.setBearing(D.getBearing()+V),this.mousePitch){const{pitchDelta:J}=this.mousePitch.dragMove(u,f)||{};J&&D.setPitch(D.getPitch()+J)}}moveTouch(u,f){const D=this.map,{bearingDelta:V}=this.touchRotate.dragMove(u,f)||{};if(V&&D.setBearing(D.getBearing()+V),this.touchPitch){const{pitchDelta:J}=this.touchPitch.dragMove(u,f)||{};J&&D.setPitch(D.getPitch()+J)}}off(){const u=this.element;n.removeEventListener(u,"mousedown",this.mousedown),n.removeEventListener(u,"touchstart",this.touchstart,{passive:!1}),n.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),n.removeEventListener(window,"touchend",this.touchend),n.removeEventListener(u,"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 kn;function Qo(R,u,f){const D=new r.N(R.lng,R.lat);if(R=new r.N(R.lng,R.lat),u){const V=new r.N(R.lng-360,R.lat),J=new r.N(R.lng+360,R.lat),oe=f.locationPoint(R).distSqr(u);f.locationPoint(V).distSqr(u)<oe?R=V:f.locationPoint(J).distSqr(u)<oe&&(R=J)}for(;Math.abs(R.lng-f.center.lng)>180;){const V=f.locationPoint(R);if(V.x>=0&&V.y>=0&&V.x<=f.width&&V.y<=f.height)break;R.lng>f.center.lng?R.lng-=360:R.lng+=360}return R.lng!==D.lng&&f.locationPoint(R).y>f.height/2-f.getHorizon()?R:D}const Ds={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 pl(R,u,f){const D=R.classList;for(const V in Ds)D.remove(`maplibregl-${f}-anchor-${V}`);D.add(`maplibregl-${f}-anchor-${u}`)}class Oi extends r.E{constructor(u){if(super(),this._onKeyPress=f=>{const D=f.code,V=f.charCode||f.keyCode;D!=="Space"&&D!=="Enter"&&V!==32&&V!==13||this.togglePopup()},this._onMapClick=f=>{const D=f.originalEvent.target,V=this._element;this._popup&&(D===V||V.contains(D))&&this.togglePopup()},this._update=f=>{var D;if(!this._map)return;const V=this._map.loaded()&&!this._map.isMoving();((f==null?void 0:f.type)==="terrain"||(f==null?void 0:f.type)==="render"&&!V)&&this._map.once("render",this._update),this._map.transform.renderWorldCopies?this._lngLat=Qo(this._lngLat,this._flatPos,this._map.transform):this._lngLat=(D=this._lngLat)===null||D===void 0?void 0:D.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 J="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?J=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(J=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let oe="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?oe="rotateX(0deg)":this._pitchAlignment==="map"&&(oe=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||f&&f.type!=="moveend"||(this._pos=this._pos.round()),n.setTransform(this._element,`${Ds[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${oe} ${J}`),h.frameAsync(new AbortController).then(()=>{this._updateOpacity(f&&f.type==="moveend")}).catch(()=>{})},this._onMove=f=>{if(!this._isDragging){const D=this._clickTolerance||this._map._clickTolerance;this._isDragging=f.point.dist(this._pointerdownPos)>=D}this._isDragging&&(this._pos=f.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 r.k("dragstart"))),this.fire(new r.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 r.k("dragend")),this._state="inactive"},this._addDragHandler=f=>{this._element.contains(f.originalEvent.target)&&(f.preventDefault(),this._positionDelta=f.point.sub(this._pos).add(this._offset),this._pointerdownPos=f.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=u&&u.anchor||"center",this._color=u&&u.color||"#3FB1CE",this._scale=u&&u.scale||1,this._draggable=u&&u.draggable||!1,this._clickTolerance=u&&u.clickTolerance||0,this._subpixelPositioning=u&&u.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=u&&u.rotation||0,this._rotationAlignment=u&&u.rotationAlignment||"auto",this._pitchAlignment=u&&u.pitchAlignment&&u.pitchAlignment!=="auto"?u.pitchAlignment:this._rotationAlignment,this.setOpacity(),this.setOpacity(u==null?void 0:u.opacity,u==null?void 0:u.opacityWhenCovered),u&&u.element)this._element=u.element,this._offset=r.P.convert(u&&u.offset||[0,0]);else{this._defaultMarker=!0,this._element=n.create("div");const f=n.createNS("http://www.w3.org/2000/svg","svg"),D=41,V=27;f.setAttributeNS(null,"display","block"),f.setAttributeNS(null,"height",`${D}px`),f.setAttributeNS(null,"width",`${V}px`),f.setAttributeNS(null,"viewBox",`0 0 ${V} ${D}`);const J=n.createNS("http://www.w3.org/2000/svg","g");J.setAttributeNS(null,"stroke","none"),J.setAttributeNS(null,"stroke-width","1"),J.setAttributeNS(null,"fill","none"),J.setAttributeNS(null,"fill-rule","evenodd");const oe=n.createNS("http://www.w3.org/2000/svg","g");oe.setAttributeNS(null,"fill-rule","nonzero");const fe=n.createNS("http://www.w3.org/2000/svg","g");fe.setAttributeNS(null,"transform","translate(3.0, 29.0)"),fe.setAttributeNS(null,"fill","#000000");const xe=[{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 Tt of xe){const jt=n.createNS("http://www.w3.org/2000/svg","ellipse");jt.setAttributeNS(null,"opacity","0.04"),jt.setAttributeNS(null,"cx","10.5"),jt.setAttributeNS(null,"cy","5.80029008"),jt.setAttributeNS(null,"rx",Tt.rx),jt.setAttributeNS(null,"ry",Tt.ry),fe.appendChild(jt)}const Ee=n.createNS("http://www.w3.org/2000/svg","g");Ee.setAttributeNS(null,"fill",this._color);const Fe=n.createNS("http://www.w3.org/2000/svg","path");Fe.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(Fe);const Ge=n.createNS("http://www.w3.org/2000/svg","g");Ge.setAttributeNS(null,"opacity","0.25"),Ge.setAttributeNS(null,"fill","#000000");const rt=n.createNS("http://www.w3.org/2000/svg","path");rt.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"),Ge.appendChild(rt);const ct=n.createNS("http://www.w3.org/2000/svg","g");ct.setAttributeNS(null,"transform","translate(6.0, 7.0)"),ct.setAttributeNS(null,"fill","#FFFFFF");const pt=n.createNS("http://www.w3.org/2000/svg","g");pt.setAttributeNS(null,"transform","translate(8.0, 8.0)");const xt=n.createNS("http://www.w3.org/2000/svg","circle");xt.setAttributeNS(null,"fill","#000000"),xt.setAttributeNS(null,"opacity","0.25"),xt.setAttributeNS(null,"cx","5.5"),xt.setAttributeNS(null,"cy","5.5"),xt.setAttributeNS(null,"r","5.4999962");const Mt=n.createNS("http://www.w3.org/2000/svg","circle");Mt.setAttributeNS(null,"fill","#FFFFFF"),Mt.setAttributeNS(null,"cx","5.5"),Mt.setAttributeNS(null,"cy","5.5"),Mt.setAttributeNS(null,"r","5.4999962"),pt.appendChild(xt),pt.appendChild(Mt),oe.appendChild(fe),oe.appendChild(Ee),oe.appendChild(Ge),oe.appendChild(ct),oe.appendChild(pt),f.appendChild(oe),f.setAttributeNS(null,"height",D*this._scale+"px"),f.setAttributeNS(null,"width",V*this._scale+"px"),this._element.appendChild(f),this._offset=r.P.convert(u&&u.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",f=>{f.preventDefault()}),this._element.addEventListener("mousedown",f=>{f.preventDefault()}),pl(this._element,this._anchor,"marker"),u&&u.className)for(const f of u.className.split(" "))this._element.classList.add(f);this._popup=null}addTo(u){return this.remove(),this._map=u,this._element.setAttribute("aria-label",u._getUIString("Marker.Title")),u.getCanvasContainer().appendChild(this._element),u.on("move",this._update),u.on("moveend",this._update),u.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(u){return this._lngLat=r.N.convert(u),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(u){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),u){if(!("offset"in u.options)){const V=Math.abs(13.5)/Math.SQRT2;u.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[V,-1*(24.6+V)],"bottom-right":[-V,-1*(24.6+V)],left:[13.5,-24.6],right:[-13.5,-24.6]}:this._offset}this._popup=u,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(u){return this._subpixelPositioning=u,this}getPopup(){return this._popup}togglePopup(){const u=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:u?(u.isOpen()?u.remove():(u.setLngLat(this._lngLat),u.addTo(this._map)),this):this}_updateOpacity(u=!1){var f,D;if(!(!((f=this._map)===null||f===void 0)&&f.terrain))return void(this._element.style.opacity!==this._opacity&&(this._element.style.opacity=this._opacity));if(u)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}const V=this._map,J=V.terrain.depthAtPoint(this._pos),oe=V.terrain.getElevationForLngLatZoom(this._lngLat,V.transform.tileZoom);if(V.transform.lngLatToCameraDepth(this._lngLat,oe)-J<.006)return void(this._element.style.opacity=this._opacity);const fe=-this._offset.y/V.transform._pixelPerMeter,xe=Math.sin(V.getPitch()*Math.PI/180)*fe,Ee=V.terrain.depthAtPoint(new r.P(this._pos.x,this._pos.y-this._offset.y)),Fe=V.transform.lngLatToCameraDepth(this._lngLat,oe+xe)-Ee>.006;!((D=this._popup)===null||D===void 0)&&D.isOpen()&&Fe&&this._popup.remove(),this._element.style.opacity=Fe?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(u){return this._offset=r.P.convert(u),this._update(),this}addClassName(u){this._element.classList.add(u)}removeClassName(u){this._element.classList.remove(u)}toggleClassName(u){return this._element.classList.toggle(u)}setDraggable(u){return this._draggable=!!u,this._map&&(u?(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(u){return this._rotation=u||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(u){return this._rotationAlignment=u||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(u){return this._pitchAlignment=u&&u!=="auto"?u:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(u,f){return u===void 0&&f===void 0&&(this._opacity="1",this._opacityWhenCovered="0.2"),u!==void 0&&(this._opacity=u),f!==void 0&&(this._opacityWhenCovered=f),this._map&&this._updateOpacity(!0),this}}const jl={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let Xn=0,Kl=!1;class fn extends r.E{constructor(u){super(),this._onSuccess=f=>{if(this._map){if(this._isOutOfMapMaxBounds(f))return this._setErrorState(),this.fire(new r.k("outofmaxbounds",f)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=f,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(f),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(f),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new r.k("geolocate",f)),this._finish()}},this._updateCamera=f=>{const D=new r.N(f.coords.longitude,f.coords.latitude),V=f.coords.accuracy,J=this._map.getBearing(),oe=r.e({bearing:J},this.options.fitBoundsOptions),fe=Ce.fromLngLat(D,V);this._map.fitBounds(fe,oe,{geolocateSource:!0})},this._updateMarker=f=>{if(f){const D=new r.N(f.coords.longitude,f.coords.latitude);this._accuracyCircleMarker.setLngLat(D).addTo(this._map),this._userLocationDotMarker.setLngLat(D).addTo(this._map),this._accuracy=f.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=f=>{if(this._map){if(this.options.trackUserLocation)if(f.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 D=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=D,this._geolocateButton.setAttribute("aria-label",D),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(f.code===3&&Kl)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new r.k("error",f)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",f=>f.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=f=>{if(this._map){if(f===!1){r.w("Geolocation support is not available so the GeolocateControl will be disabled.");const D=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=D,this._geolocateButton.setAttribute("aria-label",D)}else{const D=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=D,this._geolocateButton.setAttribute("aria-label",D)}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 Oi({element:this._dotElement}),this._circleElement=n.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Oi({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",D=>{const V=D.originalEvent&&D.originalEvent.type==="resize";D.geolocateSource||this._watchState!=="ACTIVE_LOCK"||V||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new r.k("trackuserlocationend")),this.fire(new r.k("userlocationlostfocus")))})}},this.options=r.e({},jl,u)}onAdd(u){return this._map=u,this._container=n.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return r._(this,arguments,void 0,function*(f=!1){if(kn!==void 0&&!f)return kn;if(window.navigator.permissions===void 0)return kn=!!window.navigator.geolocation,kn;try{kn=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{kn=!!window.navigator.geolocation}return kn})}().then(f=>this._finishSetupUI(f)),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,Xn=0,Kl=!1}_isOutOfMapMaxBounds(u){const f=this._map.getMaxBounds(),D=u.coords;return f&&(D.longitude<f.getWest()||D.longitude>f.getEast()||D.latitude<f.getSouth()||D.latitude>f.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 u=this._map.getBounds(),f=u.getSouthEast(),D=u.getNorthEast(),V=f.distanceTo(D),J=this._map._container.clientHeight,oe=Math.ceil(this._accuracy/(V/J)*2);this._circleElement.style.width=`${oe}px`,this._circleElement.style.height=`${oe}px`}trigger(){if(!this._setup)return r.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 r.k("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Xn--,Kl=!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 r.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 r.k("trackuserlocationstart")),this.fire(new r.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 u;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Xn++,Xn>1?(u={maximumAge:6e5,timeout:0},Kl=!0):(u=this.options.positionOptions,Kl=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,u)}}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 an={maxWidth:100,unit:"metric"};function wi(R,u,f){const D=f&&f.maxWidth||100,V=R._container.clientHeight/2,J=R.unproject([0,V]),oe=R.unproject([D,V]),fe=J.distanceTo(oe);if(f&&f.unit==="imperial"){const xe=3.2808*fe;xe>5280?vo(u,D,xe/5280,R._getUIString("ScaleControl.Miles")):vo(u,D,xe,R._getUIString("ScaleControl.Feet"))}else f&&f.unit==="nautical"?vo(u,D,fe/1852,R._getUIString("ScaleControl.NauticalMiles")):fe>=1e3?vo(u,D,fe/1e3,R._getUIString("ScaleControl.Kilometers")):vo(u,D,fe,R._getUIString("ScaleControl.Meters"))}function vo(R,u,f,D){const V=function(oe){const fe=Math.pow(10,`${Math.floor(oe)}`.length-1);let xe=oe/fe;return xe=xe>=10?10:xe>=5?5:xe>=3?3:xe>=2?2:xe>=1?1:function(Ee){const Fe=Math.pow(10,Math.ceil(-Math.log(Ee)/Math.LN10));return Math.round(Ee*Fe)/Fe}(xe),fe*xe}(f),J=V/f;R.style.width=u*J+"px",R.innerHTML=`${V}&nbsp;${D}`}class Ul extends r.E{constructor(u={}){super(),this._onFullscreenChange=()=>{var f;let D=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((f=D==null?void 0:D.shadowRoot)===null||f===void 0)&&f.fullscreenElement;)D=D.shadowRoot.fullscreenElement;D===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,u&&u.container&&(u.container instanceof HTMLElement?this._container=u.container:r.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(u){return this._map=u,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 u=this._fullscreenButton=n.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);n.create("span","maplibregl-ctrl-icon",u).setAttribute("aria-hidden","true"),u.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){const u=this._getTitle();this._fullscreenButton.setAttribute("aria-label",u),this._fullscreenButton.title=u}_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 r.k("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new r.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 es={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},vt=["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 r.E{constructor(u){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 r.k("close"))),this),this._onMouseUp=f=>{this._update(f.point)},this._onMouseMove=f=>{this._update(f.point)},this._onDrag=f=>{this._update(f.point)},this._update=f=>{var D;const V=this._lngLat||this._trackPointer;if(!this._map||!V||!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=Qo(this._lngLat,this._flatPos,this._map.transform):this._lngLat=(D=this._lngLat)===null||D===void 0?void 0:D.wrap(),this._trackPointer&&!f)return;const J=this._flatPos=this._pos=this._trackPointer&&f?f:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&f?f:this._map.transform.locationPoint(this._lngLat));let oe=this.options.anchor;const fe=zt(this.options.offset);if(!oe){const Ee=this._container.offsetWidth,Fe=this._container.offsetHeight;let Ge;Ge=J.y+fe.bottom.y<Fe?["top"]:J.y>this._map.transform.height-Fe?["bottom"]:[],J.x<Ee/2?Ge.push("left"):J.x>this._map.transform.width-Ee/2&&Ge.push("right"),oe=Ge.length===0?"bottom":Ge.join("-")}let xe=J.add(fe[oe]);this.options.subpixelPositioning||(xe=xe.round()),n.setTransform(this._container,`${Ds[oe]} translate(${xe.x}px,${xe.y}px)`),pl(this._container,oe,"popup")},this._onClose=()=>{this.remove()},this.options=r.e(Object.create(es),u)}addTo(u){return this._map&&this.remove(),this._map=u,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 r.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(u){return this._lngLat=r.N.convert(u),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(u){return this.setDOMContent(document.createTextNode(u))}setHTML(u){const f=document.createDocumentFragment(),D=document.createElement("body");let V;for(D.innerHTML=u;V=D.firstChild,V;)f.appendChild(V);return this.setDOMContent(f)}getMaxWidth(){var u;return(u=this._container)===null||u===void 0?void 0:u.style.maxWidth}setMaxWidth(u){return this.options.maxWidth=u,this._update(),this}setDOMContent(u){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(u),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(u){return this._container&&this._container.classList.add(u),this}removeClassName(u){return this._container&&this._container.classList.remove(u),this}setOffset(u){return this.options.offset=u,this._update(),this}toggleClassName(u){if(this._container)return this._container.classList.toggle(u)}setSubpixelPositioning(u){this.options.subpixelPositioning=u}_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 u=this._container.querySelector(vt);u&&u.focus()}}function zt(R){if(R){if(typeof R=="number"){const u=Math.round(Math.abs(R)/Math.SQRT2);return{center:new r.P(0,0),top:new r.P(0,R),"top-left":new r.P(u,u),"top-right":new r.P(-u,u),bottom:new r.P(0,-R),"bottom-left":new r.P(u,-u),"bottom-right":new r.P(-u,-u),left:new r.P(R,0),right:new r.P(-R,0)}}if(R instanceof r.P||Array.isArray(R)){const u=r.P.convert(R);return{center:u,top:u,"top-left":u,"top-right":u,bottom:u,"bottom-left":u,"bottom-right":u,left:u,right:u}}return{center:r.P.convert(R.center||[0,0]),top:r.P.convert(R.top||[0,0]),"top-left":r.P.convert(R["top-left"]||[0,0]),"top-right":r.P.convert(R["top-right"]||[0,0]),bottom:r.P.convert(R.bottom||[0,0]),"bottom-left":r.P.convert(R["bottom-left"]||[0,0]),"bottom-right":r.P.convert(R["bottom-right"]||[0,0]),left:r.P.convert(R.left||[0,0]),right:r.P.convert(R.right||[0,0])}}return zt(new r.P(0,0))}const ae=_;p.AJAXError=r.bg,p.Evented=r.E,p.LngLat=r.N,p.MercatorCoordinate=r.Z,p.Point=r.P,p.addProtocol=r.bh,p.config=r.a,p.removeProtocol=r.bi,p.AttributionControl=ds,p.BoxZoomHandler=So,p.CanvasSource=Ae,p.CooperativeGesturesHandler=ys,p.DoubleClickZoomHandler=Ti,p.DragPanHandler=Bs,p.DragRotateHandler=Vo,p.EdgeInsets=Nl,p.FullscreenControl=Ul,p.GeoJSONSource=Pe,p.GeolocateControl=fn,p.Hash=eo,p.ImageSource=Ie,p.KeyboardHandler=pc,p.LngLatBounds=Ce,p.LogoControl=yo,p.Map=class extends ao{constructor(R){r.be.mark(r.bf.create);const u=Object.assign(Object.assign({},hl),R);if(u.minZoom!=null&&u.maxZoom!=null&&u.minZoom>u.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(u.minPitch!=null&&u.maxPitch!=null&&u.minPitch>u.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(u.minPitch!=null&&u.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(u.maxPitch!=null&&u.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new di(u.minZoom,u.maxZoom,u.minPitch,u.maxPitch,u.renderWorldCopies),{bearingSnap:u.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new Ec,this._controls=[],this._mapId=r.a4(),this._contextLost=D=>{D.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new r.k("webglcontextlost",{originalEvent:D}))},this._contextRestored=D=>{this._setupPainter(),this.resize(),this._update(),this.fire(new r.k("webglcontextrestored",{originalEvent:D}))},this._onMapScroll=D=>{if(D.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=u.interactive,this._maxTileCacheSize=u.maxTileCacheSize,this._maxTileCacheZoomLevels=u.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=u.failIfMajorPerformanceCaveat===!0,this._preserveDrawingBuffer=u.preserveDrawingBuffer===!0,this._antialias=u.antialias===!0,this._trackResize=u.trackResize===!0,this._bearingSnap=u.bearingSnap,this._refreshExpiredTiles=u.refreshExpiredTiles===!0,this._fadeDuration=u.fadeDuration,this._crossSourceCollisions=u.crossSourceCollisions===!0,this._collectResourceTiming=u.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},Oc),u.locale),this._clickTolerance=u.clickTolerance,this._overridePixelRatio=u.pixelRatio,this._maxCanvasSize=u.maxCanvasSize,this.transformCameraUpdate=u.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=u.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=C.addThrottleControl(()=>this.isMoving()),this._requestManager=new E(u.transformRequest),typeof u.container=="string"){if(this._container=document.getElementById(u.container),!this._container)throw new Error(`Container '${u.container}' not found.`)}else{if(!(u.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=u.container}if(u.maxBounds&&this.setMaxBounds(u.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 D=!1;const V=Ws(J=>{this._trackResize&&!this._removed&&this.resize(J)._update()},50);this._resizeObserver=new ResizeObserver(J=>{D?V(J):D=!0}),this._resizeObserver.observe(this._container)}this.handlers=new ni(this,u);const f=typeof u.hash=="string"&&u.hash||void 0;this._hash=u.hash&&new eo(f).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:u.center,zoom:u.zoom,bearing:u.bearing,pitch:u.pitch}),u.bounds&&(this.resize(),this.fitBounds(u.bounds,r.e({},u.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=u.localIdeographFontFamily,this._validateStyle=u.validateStyle,u.style&&this.setStyle(u.style,{localIdeographFontFamily:u.localIdeographFontFamily}),u.attributionControl&&this.addControl(new ds(typeof u.attributionControl=="boolean"?void 0:u.attributionControl)),u.maplibreLogo&&this.addControl(new yo,u.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",D=>{this._update(D.dataType==="style"),this.fire(new r.k(`${D.dataType}data`,D))}),this.on("dataloading",D=>{this.fire(new r.k(`${D.dataType}dataloading`,D))}),this.on("dataabort",D=>{this.fire(new r.k("sourcedataabort",D))})}_getMapId(){return this._mapId}addControl(R,u){if(u===void 0&&(u=R.getDefaultPosition?R.getDefaultPosition():"top-right"),!R||!R.onAdd)return this.fire(new r.j(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const f=R.onAdd(this);this._controls.push(R);const D=this._controlPositions[u];return u.indexOf("bottom")!==-1?D.insertBefore(f,D.firstChild):D.appendChild(f),this}removeControl(R){if(!R||!R.onRemove)return this.fire(new r.j(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const u=this._controls.indexOf(R);return u>-1&&this._controls.splice(u,1),R.onRemove(this),this}hasControl(R){return this._controls.indexOf(R)>-1}calculateCameraOptionsFromTo(R,u,f,D){return D==null&&this.terrain&&(D=this.terrain.getElevationForLngLatZoom(f,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(R,u,f,D)}resize(R){var u;const f=this._containerDimensions(),D=f[0],V=f[1],J=this._getClampedPixelRatio(D,V);if(this._resizeCanvas(D,V,J),this.painter.resize(D,V,J),this.painter.overLimit()){const fe=this.painter.context.gl;this._maxCanvasSize=[fe.drawingBufferWidth,fe.drawingBufferHeight];const xe=this._getClampedPixelRatio(D,V);this._resizeCanvas(D,V,xe),this.painter.resize(D,V,xe)}this.transform.resize(D,V),(u=this._requestedCameraState)===null||u===void 0||u.resize(D,V);const oe=!this._moving;return oe&&(this.stop(),this.fire(new r.k("movestart",R)).fire(new r.k("move",R))),this.fire(new r.k("resize",R)),oe&&this.fire(new r.k("moveend",R)),this}_getClampedPixelRatio(R,u){const{0:f,1:D}=this._maxCanvasSize,V=this.getPixelRatio(),J=R*V,oe=u*V,fe=J>f?f/J:1,xe=oe>D?D/oe:1;return Math.min(fe,xe)*V}getPixelRatio(){var R;return(R=this._overridePixelRatio)!==null&&R!==void 0?R:devicePixelRatio}setPixelRatio(R){this._overridePixelRatio=R,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(R){return this.transform.setMaxBounds(Ce.convert(R)),this._update()}setMinZoom(R){if((R=R??-2)>=-2&&R<=this.transform.maxZoom)return this.transform.minZoom=R,this._update(),this.getZoom()<R&&this.setZoom(R),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(R){if((R=R??22)>=this.transform.minZoom)return this.transform.maxZoom=R,this._update(),this.getZoom()>R&&this.setZoom(R),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(R){if((R=R??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(R>=0&&R<=this.transform.maxPitch)return this.transform.minPitch=R,this._update(),this.getPitch()<R&&this.setPitch(R),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(R){if((R=R??60)>85)throw new Error("maxPitch must be less than or equal to 85");if(R>=this.transform.minPitch)return this.transform.maxPitch=R,this._update(),this.getPitch()>R&&this.setPitch(R),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(R){return this.transform.renderWorldCopies=R,this._update()}project(R){return this.transform.locationPoint(r.N.convert(R),this.style&&this.terrain)}unproject(R){return this.transform.pointLocation(r.P.convert(R),this.terrain)}isMoving(){var R;return this._moving||((R=this.handlers)===null||R===void 0?void 0:R.isMoving())}isZooming(){var R;return this._zooming||((R=this.handlers)===null||R===void 0?void 0:R.isZooming())}isRotating(){var R;return this._rotating||((R=this.handlers)===null||R===void 0?void 0:R.isRotating())}_createDelegatedListener(R,u,f){if(R==="mouseenter"||R==="mouseover"){let D=!1;return{layer:u,listener:f,delegates:{mousemove:J=>{const oe=this.getLayer(u)?this.queryRenderedFeatures(J.point,{layers:[u]}):[];oe.length?D||(D=!0,f.call(this,new Bo(R,this,J.originalEvent,{features:oe}))):D=!1},mouseout:()=>{D=!1}}}}if(R==="mouseleave"||R==="mouseout"){let D=!1;return{layer:u,listener:f,delegates:{mousemove:oe=>{(this.getLayer(u)?this.queryRenderedFeatures(oe.point,{layers:[u]}):[]).length?D=!0:D&&(D=!1,f.call(this,new Bo(R,this,oe.originalEvent)))},mouseout:oe=>{D&&(D=!1,f.call(this,new Bo(R,this,oe.originalEvent)))}}}}{const D=V=>{const J=this.getLayer(u)?this.queryRenderedFeatures(V.point,{layers:[u]}):[];J.length&&(V.features=J,f.call(this,V),delete V.features)};return{layer:u,listener:f,delegates:{[R]:D}}}}on(R,u,f){if(f===void 0)return super.on(R,u);const D=this._createDelegatedListener(R,u,f);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[R]=this._delegatedListeners[R]||[],this._delegatedListeners[R].push(D);for(const V in D.delegates)this.on(V,D.delegates[V]);return this}once(R,u,f){if(f===void 0)return super.once(R,u);const D=this._createDelegatedListener(R,u,f);for(const V in D.delegates)this.once(V,D.delegates[V]);return this}off(R,u,f){return f===void 0?super.off(R,u):(this._delegatedListeners&&this._delegatedListeners[R]&&(D=>{const V=D[R];for(let J=0;J<V.length;J++){const oe=V[J];if(oe.layer===u&&oe.listener===f){for(const fe in oe.delegates)this.off(fe,oe.delegates[fe]);return V.splice(J,1),this}}})(this._delegatedListeners),this)}queryRenderedFeatures(R,u){if(!this.style)return[];let f;const D=R instanceof r.P||Array.isArray(R),V=D?R:[[0,0],[this.transform.width,this.transform.height]];if(u=u||(D?{}:R)||{},V instanceof r.P||typeof V[0]=="number")f=[r.P.convert(V)];else{const J=r.P.convert(V[0]),oe=r.P.convert(V[1]);f=[J,new r.P(oe.x,J.y),oe,new r.P(J.x,oe.y),J]}return this.style.queryRenderedFeatures(f,u,this.transform)}querySourceFeatures(R,u){return this.style.querySourceFeatures(R,u)}setStyle(R,u){return(u=r.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},u)).diff!==!1&&u.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&R?(this._diffStyle(R,u),this):(this._localIdeographFontFamily=u.localIdeographFontFamily,this._updateStyle(R,u))}setTransformRequest(R){return this._requestManager.setTransformRequest(R),this}_getUIString(R){const u=this._locale[R];if(u==null)throw new Error(`Missing UI string '${R}'`);return u}_updateStyle(R,u){if(u.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(R,u));const f=this.style&&u.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!R)),R?(this.style=new Vr(this,u||{}),this.style.setEventedParent(this,{style:this.style}),typeof R=="string"?this.style.loadURL(R,u,f):this.style.loadJSON(R,u,f),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Vr(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(R,u){if(typeof R=="string"){const f=R,D=this._requestManager.transformRequest(f,"Style");r.h(D,new AbortController).then(V=>{this._updateDiff(V.data,u)}).catch(V=>{V&&this.fire(new r.j(V))})}else typeof R=="object"&&this._updateDiff(R,u)}_updateDiff(R,u){try{this.style.setState(R,u)&&this._update(!0)}catch(f){r.w(`Unable to perform style diff: ${f.message||f.error||f}. Rebuilding the style from scratch.`),this._updateStyle(R,u)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():r.w("There is no style added to the map.")}addSource(R,u){return this._lazyInitEmptyStyle(),this.style.addSource(R,u),this._update(!0)}isSourceLoaded(R){const u=this.style&&this.style.sourceCaches[R];if(u!==void 0)return u.loaded();this.fire(new r.j(new Error(`There is no source with ID '${R}'`)))}setTerrain(R){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),R){const u=this.style.sourceCaches[R.source];if(!u)throw new Error(`cannot load terrain, because there exists no source with ID: ${R.source}`);this.terrain===null&&u.reload();for(const f in this.style._layers){const D=this.style._layers[f];D.type==="hillshade"&&D.source===R.source&&r.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 ii(this.painter,u,R),this.painter.renderToTexture=new qs(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=f=>{f.dataType==="style"?this.terrain.sourceCache.freeRtt():f.dataType==="source"&&f.tile&&(f.sourceId!==R.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(f.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 r.k("terrain",{terrain:R})),this}getTerrain(){var R,u;return(u=(R=this.terrain)===null||R===void 0?void 0:R.options)!==null&&u!==void 0?u:null}areTilesLoaded(){const R=this.style&&this.style.sourceCaches;for(const u in R){const f=R[u]._tiles;for(const D in f){const V=f[D];if(V.state!=="loaded"&&V.state!=="errored")return!1}}return!0}removeSource(R){return this.style.removeSource(R),this._update(!0)}getSource(R){return this.style.getSource(R)}addImage(R,u,f={}){const{pixelRatio:D=1,sdf:V=!1,stretchX:J,stretchY:oe,content:fe,textFitWidth:xe,textFitHeight:Ee}=f;if(this._lazyInitEmptyStyle(),!(u instanceof HTMLImageElement||r.b(u))){if(u.width===void 0||u.height===void 0)return this.fire(new r.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:Fe,height:Ge,data:rt}=u,ct=u;return this.style.addImage(R,{data:new r.R({width:Fe,height:Ge},new Uint8Array(rt)),pixelRatio:D,stretchX:J,stretchY:oe,content:fe,textFitWidth:xe,textFitHeight:Ee,sdf:V,version:0,userImage:ct}),ct.onAdd&&ct.onAdd(this,R),this}}{const{width:Fe,height:Ge,data:rt}=h.getImageData(u);this.style.addImage(R,{data:new r.R({width:Fe,height:Ge},rt),pixelRatio:D,stretchX:J,stretchY:oe,content:fe,textFitWidth:xe,textFitHeight:Ee,sdf:V,version:0})}}updateImage(R,u){const f=this.style.getImage(R);if(!f)return this.fire(new r.j(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const D=u instanceof HTMLImageElement||r.b(u)?h.getImageData(u):u,{width:V,height:J,data:oe}=D;if(V===void 0||J===void 0)return this.fire(new r.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(V!==f.data.width||J!==f.data.height)return this.fire(new r.j(new Error("The width and height of the updated image must be that same as the previous version of the image")));const fe=!(u instanceof HTMLImageElement||r.b(u));return f.data.replace(oe,fe),this.style.updateImage(R,f),this}getImage(R){return this.style.getImage(R)}hasImage(R){return R?!!this.style.getImage(R):(this.fire(new r.j(new Error("Missing required image id"))),!1)}removeImage(R){this.style.removeImage(R)}loadImage(R){return C.getImage(this._requestManager.transformRequest(R,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(R,u){return this._lazyInitEmptyStyle(),this.style.addLayer(R,u),this._update(!0)}moveLayer(R,u){return this.style.moveLayer(R,u),this._update(!0)}removeLayer(R){return this.style.removeLayer(R),this._update(!0)}getLayer(R){return this.style.getLayer(R)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(R,u,f){return this.style.setLayerZoomRange(R,u,f),this._update(!0)}setFilter(R,u,f={}){return this.style.setFilter(R,u,f),this._update(!0)}getFilter(R){return this.style.getFilter(R)}setPaintProperty(R,u,f,D={}){return this.style.setPaintProperty(R,u,f,D),this._update(!0)}getPaintProperty(R,u){return this.style.getPaintProperty(R,u)}setLayoutProperty(R,u,f,D={}){return this.style.setLayoutProperty(R,u,f,D),this._update(!0)}getLayoutProperty(R,u){return this.style.getLayoutProperty(R,u)}setGlyphs(R,u={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(R,u),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(R,u,f={}){return this._lazyInitEmptyStyle(),this.style.addSprite(R,u,f,D=>{D||this._update(!0)}),this}removeSprite(R){return this._lazyInitEmptyStyle(),this.style.removeSprite(R),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(R,u={}){return this._lazyInitEmptyStyle(),this.style.setSprite(R,u,f=>{f||this._update(!0)}),this}setLight(R,u={}){return this._lazyInitEmptyStyle(),this.style.setLight(R,u),this._update(!0)}getLight(){return this.style.getLight()}setSky(R){return this._lazyInitEmptyStyle(),this.style.setSky(R),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(R,u){return this.style.setFeatureState(R,u),this._update()}removeFeatureState(R,u){return this.style.removeFeatureState(R,u),this._update()}getFeatureState(R){return this.style.getFeatureState(R)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let R=0,u=0;return this._container&&(R=this._container.clientWidth||400,u=this._container.clientHeight||300),[R,u]}_setupContainer(){const R=this._container;R.classList.add("maplibregl-map");const u=this._canvasContainer=n.create("div","maplibregl-canvas-container",R);this._interactive&&u.classList.add("maplibregl-interactive"),this._canvas=n.create("canvas","maplibregl-canvas",u),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 f=this._containerDimensions(),D=this._getClampedPixelRatio(f[0],f[1]);this._resizeCanvas(f[0],f[1],D);const V=this._controlContainer=n.create("div","maplibregl-control-container",R),J=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(oe=>{J[oe]=n.create("div",`maplibregl-ctrl-${oe} `,V)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(R,u,f){this._canvas.width=Math.floor(f*R),this._canvas.height=Math.floor(f*u),this._canvas.style.width=`${R}px`,this._canvas.style.height=`${u}px`}_setupPainter(){const R={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1};let u=null;this._canvas.addEventListener("webglcontextcreationerror",D=>{u={requestedAttributes:R},D&&(u.statusMessage=D.statusMessage,u.type=D.type)},{once:!0});const f=this._canvas.getContext("webgl2",R)||this._canvas.getContext("webgl",R);if(!f){const D="Failed to initialize WebGL";throw u?(u.message=D,new Error(JSON.stringify(u))):new Error(D)}this.painter=new uc(f,this.transform),i.testSupport(f)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(R){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||R,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(R){return this._update(),this._renderTaskQueue.add(R)}_cancelRenderFrame(R){this._renderTaskQueue.remove(R)}_render(R){const u=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(R),this._removed)return;let f=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const V=this.transform.zoom,J=h.now();this.style.zoomHistory.update(V,J);const oe=new r.a9(V,{now:J,fadeDuration:u,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),fe=oe.crossFadingFactor();fe===1&&fe===this._crossFadingFactor||(f=!0,this._crossFadingFactor=fe),this.style.update(oe)}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,u,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:u,showPadding:this.showPadding}),this.fire(new r.k("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,r.be.mark(r.bf.load),this.fire(new r.k("load"))),this.style&&(this.style.hasTransitions()||f)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();const D=this._sourcesDirty||this._styleDirty||this._placementDirty;return D||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new r.k("idle")),!this._loaded||this._fullyLoaded||D||(this._fullyLoaded=!0,r.be.mark(r.bf.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var R;this._hash&&this._hash.remove();for(const f of this._controls)f.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),C.removeThrottleControl(this._imageQueueHandle),(R=this._resizeObserver)===null||R===void 0||R.disconnect();const u=this.painter.context.gl.getExtension("WEBGL_lose_context");u!=null&&u.loseContext&&u.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"),r.be.clearMetrics(),this._removed=!0,this.fire(new r.k("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,h.frameAsync(this._frameRequest).then(R=>{r.be.frame(R),this._frameRequest=null,this._render(R)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(R){this._showTileBoundaries!==R&&(this._showTileBoundaries=R,this._update())}get showPadding(){return!!this._showPadding}set showPadding(R){this._showPadding!==R&&(this._showPadding=R,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(R){this._showCollisionBoxes!==R&&(this._showCollisionBoxes=R,R?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(R){this._showOverdrawInspector!==R&&(this._showOverdrawInspector=R,this._update())}get repaint(){return!!this._repaint}set repaint(R){this._repaint!==R&&(this._repaint=R,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(R){this._vertices=R,this._update()}get version(){return Mc}getCameraTargetElevation(){return this.transform.elevation}},p.MapMouseEvent=Bo,p.MapTouchEvent=ko,p.MapWheelEvent=il,p.Marker=Oi,p.NavigationControl=class{constructor(R){this._updateZoomButtons=()=>{const u=this._map.getZoom(),f=u===this._map.getMaxZoom(),D=u===this._map.getMinZoom();this._zoomInButton.disabled=f,this._zoomOutButton.disabled=D,this._zoomInButton.setAttribute("aria-disabled",f.toString()),this._zoomOutButton.setAttribute("aria-disabled",D.toString())},this._rotateCompassArrow=()=>{const u=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=u},this._setButtonTitle=(u,f)=>{const D=this._map._getUIString(`NavigationControl.${f}`);u.title=D,u.setAttribute("aria-label",D)},this.options=r.e({},Os,R),this._container=n.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",u=>u.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",u=>this._map.zoomIn({},{originalEvent:u})),n.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",u=>this._map.zoomOut({},{originalEvent:u})),n.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",u=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:u}):this._map.resetNorth({},{originalEvent:u})}),this._compassIcon=n.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(R){return this._map=R,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 qr(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(R,u){const f=n.create("button",R,this._container);return f.type="button",f.addEventListener("click",u),f}},p.Popup=kt,p.RasterDEMTileSource=He,p.RasterTileSource=ze,p.ScaleControl=class{constructor(R){this._onMove=()=>{wi(this._map,this._container,this.options)},this.setUnit=u=>{this.options.unit=u,wi(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},an),R)}getDefaultPosition(){return"bottom-left"}onAdd(R){return this._map=R,this._container=n.create("div","maplibregl-ctrl maplibregl-ctrl-scale",R.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}},p.ScrollZoomHandler=cl,p.Style=Vr,p.TerrainControl=class{constructor(R){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=R}onAdd(R){return this._map=R,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}},p.TwoFingersTouchPitchHandler=Rl,p.TwoFingersTouchRotateHandler=Jc,p.TwoFingersTouchZoomHandler=gn,p.TwoFingersTouchZoomRotateHandler=dl,p.VectorTileSource=Le,p.VideoSource=ge,p.addSourceType=(R,u)=>r._(void 0,void 0,void 0,function*(){if(je(R))throw new Error(`A source type called "${R}" already exists.`);((f,D)=>{ke[f]=D})(R,u)}),p.clearPrewarmedResources=function(){const R=pe;R&&(R.isPreloaded()&&R.numActive()===1?(R.release(ce),pe=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()"))},p.getMaxParallelImageRequests=function(){return r.a.MAX_PARALLEL_IMAGE_REQUESTS},p.getRTLTextPluginStatus=function(){return Ze().getRTLTextPluginStatus()},p.getVersion=function(){return ae},p.getWorkerCount=function(){return de.workerCount},p.getWorkerUrl=function(){return r.a.WORKER_URL},p.importScriptInWorkers=function(R){return me().broadcast("IS",R)},p.prewarm=function(){se().acquire(ce)},p.setMaxParallelImageRequests=function(R){r.a.MAX_PARALLEL_IMAGE_REQUESTS=R},p.setRTLTextPlugin=function(R,u){return Ze().setRTLTextPlugin(R,u)},p.setWorkerCount=function(R){de.workerCount=R},p.setWorkerUrl=function(R){r.a.WORKER_URL=R}}),y}()},88640:function(m,y,a){function v(we,Se,Ce){we.prototype=Se.prototype=Ce,Ce.constructor=we}function p(we,Se){var Ce=Object.create(we.prototype);for(var Me in Se)Ce[Me]=Se[Me];return Ce}function r(){}a.d(y,{GW:function(){return ve},Dj:function(){return de}});var _=.7,b=1/_,x="\\s*([+-]?\\d+)\\s*",h="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",n="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",i=/^#([0-9a-f]{3,8})$/,c=new RegExp("^rgb\\(".concat(x,",").concat(x,",").concat(x,"\\)$")),l=new RegExp("^rgb\\(".concat(n,",").concat(n,",").concat(n,"\\)$")),d=new RegExp("^rgba\\(".concat(x,",").concat(x,",").concat(x,",").concat(h,"\\)$")),g=new RegExp("^rgba\\(".concat(n,",").concat(n,",").concat(n,",").concat(h,"\\)$")),w=new RegExp("^hsl\\(".concat(h,",").concat(n,",").concat(n,"\\)$")),C=new RegExp("^hsla\\(".concat(h,",").concat(n,",").concat(n,",").concat(h,"\\)$")),E={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 A(){return this.rgb().formatHex()}function P(){return this.rgb().formatRgb()}function L(we){var Se,Ce;return we=(we+"").trim().toLowerCase(),(Se=i.exec(we))?(Ce=Se[1].length,Se=parseInt(Se[1],16),Ce===6?T(Se):Ce===3?new S(Se>>8&15|Se>>4&240,Se>>4&15|240&Se,(15&Se)<<4|15&Se,1):Ce===8?I(Se>>24&255,Se>>16&255,Se>>8&255,(255&Se)/255):Ce===4?I(Se>>12&15|Se>>8&240,Se>>8&15|Se>>4&240,Se>>4&15|240&Se,((15&Se)<<4|15&Se)/255):null):(Se=c.exec(we))?new S(Se[1],Se[2],Se[3],1):(Se=l.exec(we))?new S(255*Se[1]/100,255*Se[2]/100,255*Se[3]/100,1):(Se=d.exec(we))?I(Se[1],Se[2],Se[3],Se[4]):(Se=g.exec(we))?I(255*Se[1]/100,255*Se[2]/100,255*Se[3]/100,Se[4]):(Se=w.exec(we))?G(Se[1],Se[2]/100,Se[3]/100,1):(Se=C.exec(we))?G(Se[1],Se[2]/100,Se[3]/100,Se[4]):E.hasOwnProperty(we)?T(E[we]):we==="transparent"?new S(NaN,NaN,NaN,0):null}function T(we){return new S(we>>16&255,we>>8&255,255&we,1)}function I(we,Se,Ce,Me){return Me<=0&&(we=Se=Ce=NaN),new S(we,Se,Ce,Me)}function M(we,Se,Ce,Me){return arguments.length===1?((Le=we)instanceof r||(Le=L(Le)),Le?new S((Le=Le.rgb()).r,Le.g,Le.b,Le.opacity):new S):new S(we,Se,Ce,Me??1);var Le}function S(we,Se,Ce,Me){this.r=+we,this.g=+Se,this.b=+Ce,this.opacity=+Me}function z(){return"#".concat(j(this.r)).concat(j(this.g)).concat(j(this.b))}function k(){var we=O(this.opacity);return"".concat(we===1?"rgb(":"rgba(").concat(N(this.r),", ").concat(N(this.g),", ").concat(N(this.b)).concat(we===1?")":", ".concat(we,")"))}function O(we){return isNaN(we)?1:Math.max(0,Math.min(1,we))}function N(we){return Math.max(0,Math.min(255,Math.round(we)||0))}function j(we){return((we=N(we))<16?"0":"")+we.toString(16)}function G(we,Se,Ce,Me){return Me<=0?we=Se=Ce=NaN:Ce<=0||Ce>=1?we=Se=NaN:Se<=0&&(we=NaN),new Z(we,Se,Ce,Me)}function H(we){if(we instanceof Z)return new Z(we.h,we.s,we.l,we.opacity);if(we instanceof r||(we=L(we)),!we)return new Z;if(we instanceof Z)return we;var Se=(we=we.rgb()).r/255,Ce=we.g/255,Me=we.b/255,Le=Math.min(Se,Ce,Me),ze=Math.max(Se,Ce,Me),He=NaN,Pe=ze-Le,Ve=(ze+Le)/2;return Pe?(He=Se===ze?(Ce-Me)/Pe+6*(Ce<Me):Ce===ze?(Me-Se)/Pe+2:(Se-Ce)/Pe+4,Pe/=Ve<.5?ze+Le:2-ze-Le,He*=60):Pe=Ve>0&&Ve<1?0:He,new Z(He,Pe,Ve,we.opacity)}function Z(we,Se,Ce,Me){this.h=+we,this.s=+Se,this.l=+Ce,this.opacity=+Me}function $(we){return(we=(we||0)%360)<0?we+360:we}function ne(we){return Math.max(0,Math.min(1,we||0))}function q(we,Se,Ce){return 255*(we<60?Se+(Ce-Se)*we/60:we<180?Ce:we<240?Se+(Ce-Se)*(240-we)/60:Se)}v(r,L,{copy:function(we){return Object.assign(new this.constructor,this,we)},displayable:function(){return this.rgb().displayable()},hex:A,formatHex:A,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return H(this).formatHsl()},formatRgb:P,toString:P}),v(S,M,p(r,{brighter:function(we){return we=we==null?b:Math.pow(b,we),new S(this.r*we,this.g*we,this.b*we,this.opacity)},darker:function(we){return we=we==null?_:Math.pow(_,we),new S(this.r*we,this.g*we,this.b*we,this.opacity)},rgb:function(){return this},clamp:function(){return new S(N(this.r),N(this.g),N(this.b),O(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:z,formatHex:z,formatHex8:function(){return"#".concat(j(this.r)).concat(j(this.g)).concat(j(this.b)).concat(j(255*(isNaN(this.opacity)?1:this.opacity)))},formatRgb:k,toString:k})),v(Z,function(we,Se,Ce,Me){return arguments.length===1?H(we):new Z(we,Se,Ce,Me??1)},p(r,{brighter:function(we){return we=we==null?b:Math.pow(b,we),new Z(this.h,this.s,this.l*we,this.opacity)},darker:function(we){return we=we==null?_:Math.pow(_,we),new Z(this.h,this.s,this.l*we,this.opacity)},rgb:function(){var we=this.h%360+360*(this.h<0),Se=isNaN(we)||isNaN(this.s)?0:this.s,Ce=this.l,Me=Ce+(Ce<.5?Ce:1-Ce)*Se,Le=2*Ce-Me;return new S(q(we>=240?we-240:we+120,Le,Me),q(we,Le,Me),q(we<120?we+240:we-120,Le,Me),this.opacity)},clamp:function(){return new Z($(this.h),ne(this.s),ne(this.l),O(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 we=O(this.opacity);return"".concat(we===1?"hsl(":"hsla(").concat($(this.h),", ").concat(100*ne(this.s),"%, ").concat(100*ne(this.l),"%").concat(we===1?")":", ".concat(we,")"))}}));var K=function(we){return function(){return we}};function ee(we,Se){var Ce=Se-we;return Ce?function(Me,Le){return function(ze){return Me+ze*Le}}(we,Ce):K(isNaN(we)?Se:we)}var X=function we(Se){var Ce=function(Le){return(Le=+Le)==1?ee:function(ze,He){return He-ze?function(Pe,Ve,Ie){return Pe=Math.pow(Pe,Ie),Ve=Math.pow(Ve,Ie)-Pe,Ie=1/Ie,function(ge){return Math.pow(Pe+ge*Ve,Ie)}}(ze,He,Le):K(isNaN(ze)?He:ze)}}(Se);function Me(Le,ze){var He=Ce((Le=M(Le)).r,(ze=M(ze)).r),Pe=Ce(Le.g,ze.g),Ve=Ce(Le.b,ze.b),Ie=ee(Le.opacity,ze.opacity);return function(ge){return Le.r=He(ge),Le.g=Pe(ge),Le.b=Ve(ge),Le.opacity=Ie(ge),Le+""}}return Me.gamma=we,Me}(1);function Q(we,Se){var Ce,Me=Se?Se.length:0,Le=we?Math.min(Me,we.length):0,ze=new Array(Le),He=new Array(Me);for(Ce=0;Ce<Le;++Ce)ze[Ce]=ve(we[Ce],Se[Ce]);for(;Ce<Me;++Ce)He[Ce]=Se[Ce];return function(Pe){for(Ce=0;Ce<Le;++Ce)He[Ce]=ze[Ce](Pe);return He}}function ce(we,Se){var Ce=new Date;return we=+we,Se=+Se,function(Me){return Ce.setTime(we*(1-Me)+Se*Me),Ce}}function de(we,Se){return we=+we,Se=+Se,function(Ce){return we*(1-Ce)+Se*Ce}}function he(we){return he=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Se){return typeof Se}:function(Se){return Se&&typeof Symbol=="function"&&Se.constructor===Symbol&&Se!==Symbol.prototype?"symbol":typeof Se},he(we)}function pe(we,Se){var Ce,Me={},Le={};for(Ce in we!==null&&he(we)==="object"||(we={}),Se!==null&&he(Se)==="object"||(Se={}),Se)Ce in we?Me[Ce]=ve(we[Ce],Se[Ce]):Le[Ce]=Se[Ce];return function(ze){for(Ce in Me)Le[Ce]=Me[Ce](ze);return Le}}var re=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,se=new RegExp(re.source,"g");function ie(we,Se){var Ce,Me,Le,ze=re.lastIndex=se.lastIndex=0,He=-1,Pe=[],Ve=[];for(we+="",Se+="";(Ce=re.exec(we))&&(Me=se.exec(Se));)(Le=Me.index)>ze&&(Le=Se.slice(ze,Le),Pe[He]?Pe[He]+=Le:Pe[++He]=Le),(Ce=Ce[0])===(Me=Me[0])?Pe[He]?Pe[He]+=Me:Pe[++He]=Me:(Pe[++He]=null,Ve.push({i:He,x:de(Ce,Me)})),ze=se.lastIndex;return ze<Se.length&&(Le=Se.slice(ze),Pe[He]?Pe[He]+=Le:Pe[++He]=Le),Pe.length<2?Ve[0]?function(Ie){return function(ge){return Ie(ge)+""}}(Ve[0].x):function(Ie){return function(){return Ie}}(Se):(Se=Ve.length,function(Ie){for(var ge,Ae=0;Ae<Se;++Ae)Pe[(ge=Ve[Ae]).i]=ge.x(Ie);return Pe.join("")})}function me(we,Se){Se||(Se=[]);var Ce,Me=we?Math.min(Se.length,we.length):0,Le=Se.slice();return function(ze){for(Ce=0;Ce<Me;++Ce)Le[Ce]=we[Ce]*(1-ze)+Se[Ce]*ze;return Le}}function ye(we){return ye=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Se){return typeof Se}:function(Se){return Se&&typeof Symbol=="function"&&Se.constructor===Symbol&&Se!==Symbol.prototype?"symbol":typeof Se},ye(we)}function ve(we,Se){var Ce,Me,Le=ye(Se);return Se==null||Le==="boolean"?K(Se):(Le==="number"?de:Le==="string"?(Ce=L(Se))?(Se=Ce,X):ie:Se instanceof L?X:Se instanceof Date?ce:(Me=Se,!ArrayBuffer.isView(Me)||Me instanceof DataView?Array.isArray(Se)?Q:typeof Se.valueOf!="function"&&typeof Se.toString!="function"||isNaN(Se)?pe:de:me))(we,Se)}},23648:function(m){m.exports=JSON.parse('["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]')},2362:function(m){m.exports=JSON.parse('["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]')},87486:function(m){m.exports=JSON.parse('["normal","italic","oblique"]')},99803:function(m){m.exports=JSON.parse('["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]')},54324:function(m){m.exports=JSON.parse('["inherit","initial","unset"]')},94316:function(m){m.exports=JSON.parse('["caption","icon","menu","message-box","small-caption","status-bar"]')},37071:function(m){m.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(m){m.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"}}]}`)}},B={};function U(m){var y=B[m];if(y!==void 0)return y.exports;var a=B[m]={id:m,exports:{}};return s[m].call(a.exports,a,a.exports,U),a.exports}return U.m=s,U.n=function(m){var y=m&&m.__esModule?function(){return m.default}:function(){return m};return U.d(y,{a:y}),y},U.d=function(m,y){for(var a in y)U.o(y,a)&&!U.o(m,a)&&Object.defineProperty(m,a,{enumerable:!0,get:y[a]})},U.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),U.o=function(m,y){return Object.prototype.hasOwnProperty.call(m,y)},U.r=function(m){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(m,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(m,"__esModule",{value:!0})},U.b=document.baseURI||self.location.href,U.nc=void 0,U(20260)}()})})(HR);var lct=HR.exports;const ZR=C6(lct),Mqt="",Iqt="",cct={ref:"card",class:"card-volumetric-field"},WR=1,uct=800,qR=300,dct=-46,JR=100,YR=-14,hct=Ki({__name:"VolumetricField",props:{passesPlays:{type:Array,default:()=>[]},playIndexes:{type:Object,default:()=>{}},successfulPassesCategoryIds:{type:Array,default:()=>[2,20,308,310]}},setup(e){const o=[[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 s=null;const B=e,U=t.computed(()=>new Set(B.successfulPassesCategoryIds)),m=t.ref(null),y=t.ref(null),a=t.ref(0),v=t.ref(null);t.watch(()=>B.passesPlays,d=>{const g=d.reduce((w,C)=>(U.value.has(C[B.playIndexes.categoryId])&&w.push({x1:C[B.playIndexes.coordinate1X],y1:C[B.playIndexes.coordinate1Y],x2:C[B.playIndexes.coordinate2X],y2:C[B.playIndexes.coordinate2Y],x3:C[B.playIndexes.coordinate3X],y3:C[B.playIndexes.coordinate3Y]}),w),[]);l(g)}),t.watch(()=>a.value,(d,g)=>{v.value&&(n(d),y.value.style.height=`${i(d)}px`,v.value.style.top=`${c(i(d))}px`)});function p(){s=new ResizeObserver(d=>{for(const g of d)a.value=g.contentRect.width}),s.observe(m.value)}function r(d){return Array.from({length:d},()=>0)}function _(d,g){let w=.01351,C=.02439,E=0,A=0,P=[];const L=g.length,T=Math.floor(L/10);for(;E<74;)A=g.filter(I=>1-I.y3>=E*w&&1-I.y3<=(E+1)*w&&1-I.x3>=d*C&&1-I.x3<=(d+1)*C).map(I=>I.y3).length,P.push(parseFloat((A/T).toFixed(4))),E++;return P.reverse()}function b(d){let g=[r(74),r(74)],w=[],C=39;for(;C>0&&C<=39;)w=_(C,d),g.push(w),C--;return g.push(r(74),r(74)),g}function x(d,g,w){const C=[];let P=0,L=0;C.push(d[0]);for(let T=1;T<w-1;T++){const I=[];I.push(d[T][0]);for(let M=1;M<g-1;M++)P=d[T][M-1],L=d[T][M+1],I.push(P+.5*(d[T][M]+L-P));I.push(d[T][g-1]),C.push(I)}C.push(d[w-1]);for(let T=1;T<g-1;T++)for(let I=1;I<w-1;I++)P=C[I-1][T],L=C[I+1][T],C[I][T]=P+.5*(C[I][T]+L-P);return C}function h(d){let g=0,w=0;for(let C=0;C<d.length;C++){w=w+d[C].reduce(function(A,P){return A+P});const E=Math.max.apply(null,d[C]);E>g&&(g=E)}return g}function n(d){ZR.relayout(m.value,{width:d,height:i(d)})}function i(d){return Math.round(qR/uct*d,0)}function c(d){return YR+(d-JR)/(qR-JR)*(dct-YR)}function l(d){let g=b(d),w=g.length,C=g[0].length;g=x(x(g,C,w),C,w),C=g[0].length,w=g.length;const E=h(g),A=[{z:g,type:"surface",connectgaps:!0,opacity:.25,colorscale:o,autoscale:!1,showscale:!1}],P=[0,C],L=[0,w],T=[0,E*5],I={scene:{xaxis:{title:"",showgrid:!1,showline:!1,zeroline:!1,showticklabels:!1,showbackground:!1,backgroundcolor:"transparent",range:P},yaxis:{title:"",showgrid:!1,showline:!1,zeroline:!1,showticklabels:!1,showbackground:!1,backgroundcolor:"transparent",range:L},zaxis:{title:"",showgrid:!1,showline:!1,zeroline:!1,showticklabels:!1,showbackground:!1,backgroundcolor:"transparent",range:T},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:a.value,height:i(a.value),paper_bgcolor:"rgba(0,0,0,0)",margin:{l:0,r:0,b:0,t:0}};y.value&&(y.value.style.height=`${i(a.value)}px`);const M=[];for(let S=0;S<C;S++){const z=[],k=[],O=[];for(let N=0;N<w;N++)z.push(S),k.push(N),O.push(A[0].z[N][S]);M.push({x:z,y:k,z:O,type:"scatter3d",mode:"lines",line:{cmin:-.1,cmax:E,width:WR,color:O,colorscale:o,shape:"spline",smoothing:.6,dash:"dotline"}})}for(let S=0;S<w;S++){const z=[],k=[],O=[];for(let N=0;N<C;N++)z.push(N),k.push(S),O.push(A[0].z[S][N]);M.push({x:z,y:k,z:O,type:"scatter3d",mode:"lines",line:{cmin:-.1,cmax:E,width:WR,color:O,colorscale:o,shape:"spline",smoothing:.6,dash:"dotline"}})}ZR.newPlot("surface-plot",A.concat(M),I,{displayModeBar:!1},{responsive:!0}),v.value=document.getElementsByClassName("plot-container")[0],v.value&&(v.value.style.top=`${c(i(a.value))}px`)}return t.onMounted(()=>{m.value&&(m.value.style.pointerEvents="none"),p()}),(d,g)=>(t.openBlock(),t.createElementBlock("div",cct,[t.createElementVNode("div",{ref_key:"volumetricField",ref:y,class:"card-volumetric-field__volumetric-field"},[t.createElementVNode("div",{ref_key:"surfacePlot",ref:m,id:"surface-plot"},null,512)],512)],512))}},[["__scopeId","data-v-6a070f92"]]),Lqt="",pct=Ki({__name:"AttackDirection",props:{team:{type:Object,required:!0}},setup(e){const o=e,s=t.computed(()=>({"--flex-direction-info":o.team.isHomeTeam?"flex":"row-reverse","--justify-content-info":o.team.isHomeTeam?"flex-start":"flex-end","--arrow-color":o.team.isHomeTeam?"#336dff":"#7ed321"}));return(B,U)=>(t.openBlock(),t.createElementBlock("div",{class:"attack-direction",style:t.normalizeStyle(s.value)},[U[0]||(U[0]=t.createElementVNode("div",{class:"attack-direction__line"},null,-1)),t.createElementVNode("div",{class:t.normalizeClass(`attack-direction__triangle-${e.team.isHomeTeam?"right":"left"}`)},null,2),U[1]||(U[1]=t.createElementVNode("div",{class:"attack-direction__text"},"Ataca",-1))],4))}},[["__scopeId","data-v-dd911c44"]]),fct=["playId","gameId","teamId","playerId","momentOfPlay","categoryId","categoryType","matchLapse","section","matchResult","playingAs","total","coordinate1X","coordinate1Y","coordinate2X","coordinate2Y","coordinate3X","coordinate3Y","xGi","xGf","distance","fieldArea"];let DS=null;function mct(){return DS||(DS=Yy(fct)),DS}const zqt="",gct={class:"volumetric-section-container"},yct={key:0,class:"volumetric-section-container__switch"},vct={class:"volumetric-section-container__attack-direction"},bct={class:"volumetric-section-container__field"},_ct=Ki({__name:"VolumetricSectionContainer",props:{game:{type:Object,default:()=>({})},seasonSelected:{type:Object,default:()=>({})},token:{type:String,default:""},isGamePreMatch:{type:Boolean,default:!1},teamSelectedPreMatch:{type:Object,default:()=>({})},volumetricFieldIntervalMinutes:{type:Number,default:2}},setup(e){const o=mct(),s=t.ref(new Set([2,20,308,310])),B=t.ref(new Set([3,21,309])),U=t.ref(new Set([...s.value,...B.value]));let m=null;const y=e,a=fp();let v=null;function p(){if(!v){const C=a.getters.getProviderId;v=Qne(C).then(E=>{var L,T;const A=((L=E==null?void 0:E.successfulPasses)==null?void 0:L.categoriesIds)??[],P=((T=E==null?void 0:E.unsuccessfulPasses)==null?void 0:T.categoriesIds)??[];s.value=new Set(A),B.value=new Set(P),U.value=new Set([...A,...P])})}return v}const r=t.ref(0),_=t.ref(new Map),b=t.ref({teamId:0}),x=t.computed(()=>[{teamId:y.game.homeTeam.team_id,text:y.game.homeTeam.colloquial_name,img:y.game.homeTeam.logo,isHomeTeam:!0},{teamId:y.game.awayTeam.team_id,text:y.game.awayTeam.colloquial_name,img:y.game.awayTeam.logo,isHomeTeam:!1}]),h=t.computed(()=>_.value.get(y.isGamePreMatch?y.teamSelectedPreMatch.teamId:b.value.teamId)||[]);t.watch(()=>x.value,()=>{r.value=0,b.value=x.value[r.value]},{immediate:!0}),t.watch(()=>y.game.gameId,C=>{C&&(w(),i(y.game.is_live&&y.game.game_status===4))},{immediate:!0});function n(){m=setInterval(()=>{i()},1e3*60*y.volumetricFieldIntervalMinutes)}async function i(C=!1){try{await p();const E=await l();_.value.set(y.game.homeTeam.team_id,E.homeTeam),_.value.set(y.game.awayTeam.team_id,E.awayTeam),C&&n()}catch(E){throw new Error(E)}}function c(C){return y.game.game_status===4&&!y.game.is_live?C[o.gameId]!==y.game.gameId:C[o.gameId]===y.game.gameId}async function l(C=0){var E,A,P,L;try{let T={homeTeam:[],awayTeam:[]};const I=a.getters.getProviderId,M=a.getters.getIsDevApis;if(y.game.is_live||y.game.game_status===0){const S=await pu.get(uu(`https://2uj7ojhmt5.execute-api.us-west-2.amazonaws.com/prod/V2/statisticsLive/${y.game.gameId}`,I,M)),z=S.data?S.data.data||[]:[],k=new Set;z.forEach(O=>{k.add(O[o.categoryId]),O[o.teamId]===y.game.homeTeam.team_id&&U.value.has(O[o.categoryId])&&c(O)?(d(O),T.homeTeam.push(O)):O[o.teamId]===y.game.awayTeam.team_id&&U.value.has(O[o.categoryId])&&c(O)&&(O[o.coordinate1Y]=1-O[o.coordinate1Y],O[o.coordinate2Y]=1-O[o.coordinate2Y],O[o.coordinate3Y]=1-O[o.coordinate3Y],O[o.coordinate1X]=1-O[o.coordinate1X],O[o.coordinate2X]=1-O[o.coordinate2X],O[o.coordinate3X]=1-O[o.coordinate3X],d(O),T.awayTeam.push(O))})}else{const[S,z]=await Promise.all([pu.get(qy(`https://golstats-microservices.s3-us-west-2.amazonaws.com/statsTeamBySeason-${C||y.game.seasonId}-${y.game.homeTeam.team_id}.json`,I),{headers:{Authorization:""}}),pu.get(qy(`https://golstats-microservices.s3-us-west-2.amazonaws.com/statsTeamBySeason-${C||y.game.seasonId}-${y.game.awayTeam.team_id}.json`,I),{headers:{Authorization:""}})]),k=((A=(E=S.data)==null?void 0:E.data)==null?void 0:A.posession)||[],O=((L=(P=z.data)==null?void 0:P.data)==null?void 0:L.posession)||[];if(!k.length&&!O.length&&!C)return l(y.game.regularSeasonId);T={homeTeam:k.filter(N=>N[o.teamId]===y.game.homeTeam.team_id&&U.value.has(N[o.categoryId])&&c(N)),awayTeam:O.filter(N=>N[o.teamId]===y.game.awayTeam.team_id&&U.value.has(N[o.categoryId])&&c(N)?(N[o.coordinate1Y]=1-N[o.coordinate1Y],N[o.coordinate2Y]=1-N[o.coordinate2Y],N[o.coordinate3Y]=1-N[o.coordinate3Y],N[o.coordinate1X]=1-N[o.coordinate1X],N[o.coordinate2X]=1-N[o.coordinate2X],N[o.coordinate3X]=1-N[o.coordinate3X],!0):!1)}}return T}catch(T){throw new Error(T)}}function d(C){const E=C[o.coordinate1X],A=C[o.coordinate2X],P=C[o.coordinate3X];return C[o.coordinate1X]=C[o.coordinate1Y],C[o.coordinate2X]=C[o.coordinate2Y],C[o.coordinate3X]=C[o.coordinate3Y],C[o.coordinate1Y]=E,C[o.coordinate2Y]=A,C[o.coordinate3Y]=P,C}function g(C){r.value=C.index,b.value=C.button}function w(){m&&clearInterval(m)}return t.onUnmounted(()=>{w()}),(C,E)=>(t.openBlock(),t.createElementBlock("div",gct,[E[0]||(E[0]=t.createElementVNode("div",{class:"volumetric-section-container__title"},"Volumétrica",-1)),e.isGamePreMatch?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",yct,[t.createVNode(j5,{"selected-button-index":r.value,buttons:x.value,width:"320px","border-radius":"16px",onChange:g},null,8,["selected-button-index","buttons"])])),t.createElementVNode("div",vct,[t.createVNode(pct,{team:e.isGamePreMatch?e.teamSelectedPreMatch:b.value},null,8,["team"])]),t.createElementVNode("div",bct,[t.createVNode(hct,{"passes-plays":h.value,"play-indexes":t.unref(o),"successful-passes-category-ids":[...s.value]},null,8,["passes-plays","play-indexes","successful-passes-category-ids"])])]))}},[["__scopeId","data-v-5904f4a9"]]),Dqt="";let XR=null;const xct={components:{GSCHighlights:kHe,ToggleButtons:j5,VolumetricSectionContainer:_ct,DataProminentGame:OHe,HighlightsProminentGameLive:OZe,HighlightsProminentGame:kZe,GSCRadioToggle:dF,FieldPosesion:oZe,EventsLine:kWe,ChalkboardSectionContainer:sct},props:{timeLiveProminentData:{type:Number,default:6e4},timeLiveHighlightsProminentAndVideo:{type:Number,default:6e4},timeLivePossesion:{type:Number,default:6e4},game:{type:Object,default:()=>({})},token:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"},seasonSelected:{type:Object,default:()=>({})},isWidget:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},tournamentSelected:{type:Object,default:()=>({})},canPlayVideos:{type:Boolean,default:!1},is_captured:{type:Number,default:1},videoPrivilegesPlayingAs:{type:Set,default:()=>new Set([1,2])},playVideosPrivileges:{type:Object,default:null},volumetricFieldIntervalMinutes:{type:Number,default:2},chalkboardIntervalMinutes:{type:Number,default:2},gameEventsIntervalMinutes:{type:Number,default:1}},data(){return{isDataProminentGameLoading:!0,areHighlightsLoading:!0,widthSection:0,showleyendliveData:!1,showgoalsliveData:!1,showsummaryliveData:!1,viewVolumtrica:!0,teamButtonSelectedIndex:0,switchTypeViewFiled:"Porcentajes",teamSelected:{teamId:0},isFirstDataLoaded:!1}},computed:{toggleButtons(){return[{teamId:this.game.homeTeam.team_id,text:this.game.homeTeam.colloquial_name,img:this.game.homeTeam.logo,isHomeTeam:!0},{teamId:this.game.awayTeam.team_id,text:this.game.awayTeam.colloquial_name,img:this.game.awayTeam.logo,isHomeTeam:!1}]},isGamePreMatch(){return this.game&&this.game.game_status===4&&!this.game.is_live}},watch:{widthSection(){this.viewVolumtrica=this.widthSection>=760},toggleButtons:{handler(){this.teamButtonSelectedIndex=0,this.teamSelected=this.toggleButtons[0]},deep:!0,immediate:!0},"seasonSelected.incomplete_season":{handler(){this.seasonSelected.incomplete_season==1&&this.game.game_status==4&&this.onDataProminentGameLoading(!1)},immediate:!0},"game.game_status":{handler(){this.seasonSelected.incomplete_season==1&&this.game.game_status==4&&this.onDataProminentGameLoading(!1)},immediate:!0}},methods:{onDataProminentGameLoading(e){this.isFirstDataLoaded||(this.isDataProminentGameLoading=e,this.areHighlightsLoading=!0,e||setTimeout(()=>{this.areHighlightsLoading=!1,this.isFirstDataLoaded=!0},500))},intervalidhighlive(e){this.$emit("intervalidhighlive",e)},intervalidpossesion(e){this.$emit("intervalidpossesion",e)},onChangeToggle(e){this.teamButtonSelectedIndex=e.index,this.teamSelected=e.button},setUpResizeObserver(){if(window.ResizeObserver)XR=new ResizeObserver(()=>{this.widthSection=this.$refs.prominent.clientWidth}),XR.observe(this.$refs.prominent);else throw new Error("Resize observer not supported!")},async ChangeRadio(e){typeof e=="string"&&(this.switchTypeViewFiled=e)},openmedia(e){this.$emit("openmedia",e)},onClickSection(){Vd.emit("mouse-click-time-event",0)},onClickPlayEvent(e){const o={seasonId:this.game.is_live===1||this.game.game_status===0?this.game.seasonId:this.seasonSelected.id,isFeaturedPlayers:!1,mainSectionType:1,playListType:1,playerIds:[],categoryIds:[e.categoryId],matchResult:[1,2,3],currentPlayIndex:0,playsIds:[e.playId]};this.$emit("openmedia",o)},showleyendlive(e){this.showleyendliveData=e},showgoalslive(e){this.showgoalsliveData=e},showsummarylive(e){this.showsummaryliveData=e},onOpenMediaPlayer(e){this.canPlayVideos&&this.$emit("open-media-player",e)},getContainerClass(){return this.widthSection>830?"highlights-container-desktop":"highlights-container-mobile"}},async mounted(){setTimeout(()=>{this.setUpResizeObserver()},1e3)}},wct={key:0,class:"container-prominent-data"},kct={class:"container-prominent-section"},Sct={key:0,class:"highlights-containers"},Cct={class:"highlights-content"},Tct={key:1,class:"highlights-containers"},Act={key:0,class:"container-leyend-prematch"},Ect={key:1,class:"container-leyend-prematch-movil"},Mct={key:2,class:"container-leyend-prematch-movil"},Ict={class:"container-switch-toggle"},Pct={class:"container-prominent-section__chalkboard"};function Lct(e,o,s,B,U,m){const y=t.resolveComponent("DataProminentGame"),a=t.resolveComponent("HighlightsProminentGameLive"),v=t.resolveComponent("HighlightsProminentGame"),p=t.resolveComponent("GSCHighlights"),r=t.resolveComponent("EventsLine"),_=t.resolveComponent("ToggleButtons"),b=t.resolveComponent("GSCRadioToggle"),x=t.resolveComponent("FieldPosesion"),h=t.resolveComponent("VolumetricSectionContainer"),n=t.resolveComponent("ChalkboardSectionContainer");return t.openBlock(),t.createElementBlock("div",{class:"container-prominent",ref:"prominent",onClick:o[0]||(o[0]=(...i)=>m.onClickSection&&m.onClickSection(...i))},[s.seasonSelected.incomplete_season==1&&s.game.game_status==4&&s.game.is_live===0?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",wct,[t.createVNode(y,{"is-widget":s.isWidget,"team-widget":s.teamWidget,"time-live-prominent-data":s.timeLiveProminentData,game:s.game,"can-play-videos":s.canPlayVideos,onOpenmedia:m.openmedia,onLoading:m.onDataProminentGameLoading},null,8,["is-widget","team-widget","time-live-prominent-data","game","can-play-videos","onOpenmedia","onLoading"])])),t.createElementVNode("div",kct,[s.game.is_live===1||s.game.game_status===0||s.game.game_status===1?(t.openBlock(),t.createElementBlock("div",Sct,[t.createElementVNode("div",{class:t.normalizeClass(m.getContainerClass())},[U.showleyendliveData?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(U.widthSection>830?"highlights-header":"highlights-header-mobile")},[Object.keys(s.game).length>0&&Object.keys(s.tournamentSelected).length>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(U.widthSection>830?"semifinal-tag":"semifinal-tag-mobile")},t.toDisplayString(s.tournamentSelected.id!=41?s.game.matchday_name.replace("Matchday","Jornada").replace("de Final","").replace("Playoffs 1","Cuartos de Final Ida").replace("Playoffs 2","Cuartos de Final Vuelta").replace("Playoffs 3","Semifinal Ida").replace("Playoffs 4","Semifinal Vuelta").replace("Playoffs 5","Final Ida").replace("Playoffs 6","Final Vuelta"):s.game.matchday_name=="Matchday 10"?"Final":s.game.matchday_name.replace("Matchday 1","16vos Ida").replace("Matchday 2","16vos Vuelta").replace("Matchday 3","8vos Ida").replace("Matchday 4","8vos Vuelta").replace("Matchday 5","4tos Ida").replace("Matchday 6","4tos Vuelta").replace("Matchday 7","Semifinal Ida").replace("Matchday 8","Semifinal Vuelta").replace("Matchday 9","Final").replace("Matchday 10","Final")),3)):t.createCommentVNode("",!0),t.createElementVNode("h2",{class:t.normalizeClass(U.widthSection>830?"highlights-title":"highlights-title-mobile")}," HIGHLIGHTS DEL PARTIDO ",2)],2)):t.createCommentVNode("",!0),t.createElementVNode("div",Cct,[t.createElementVNode("div",{class:"highlight-card",style:t.normalizeStyle(U.showgoalsliveData?U.widthSection>830?"width: 49%;":"width: 100%;":"")},[(s.game.is_live===1||s.game.game_status===0)&&s.canPlayVideos?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[s.game.is_live===1||s.game.game_status===0?(t.openBlock(),t.createBlock(a,{key:0,"time-live-highlights-prominent-and-video":s.timeLiveHighlightsProminentAndVideo,"can-play-videos":s.canPlayVideos,game:s.game,"title-card":"GOLES",onShowgoalslive:m.showgoalslive,onShowsummarylive:m.showsummarylive,onShowleyendlive:m.showleyendlive,onIntervalidhighlive:m.intervalidhighlive,onOpenmedia:m.openmedia},null,8,["time-live-highlights-prominent-and-video","can-play-videos","game","onShowgoalslive","onShowsummarylive","onShowleyendlive","onIntervalidhighlive","onOpenmedia"])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[s.game.status===1&&s.canPlayVideos?(t.openBlock(),t.createBlock(v,{key:0,onShowsummarylive:m.showsummarylive,onShowleyendlive:m.showleyendlive,onShowgoalslive:m.showgoalslive,onIntervalidhighlive:m.intervalidhighlive,"title-card":"GOLES","can-play-videos":s.canPlayVideos,game:s.game,onOpenmedia:m.openmedia},null,8,["onShowsummarylive","onShowleyendlive","onShowgoalslive","onIntervalidhighlive","can-play-videos","game","onOpenmedia"])):t.createCommentVNode("",!0)],64))],4),t.createElementVNode("div",{class:"highlight-card",style:t.normalizeStyle(U.showsummaryliveData?U.widthSection>830?"width: 49%;":"width: 100%;":"")},[(s.game.is_live===1||s.game.game_status===0)&&s.canPlayVideos?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[s.game.is_live===1||s.game.game_status===0?(t.openBlock(),t.createBlock(a,{key:0,"time-live-highlights-prominent-and-video":s.timeLiveHighlightsProminentAndVideo,"can-play-videos":s.canPlayVideos,game:s.game,onShowleyendlive:m.showleyendlive,onShowgoalslive:m.showgoalslive,onShowsummarylive:m.showsummarylive,onIntervalidhighlive:m.intervalidhighlive,onOpenmedia:m.openmedia},null,8,["time-live-highlights-prominent-and-video","can-play-videos","game","onShowleyendlive","onShowgoalslive","onShowsummarylive","onIntervalidhighlive","onOpenmedia"])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[s.game.status===1&&s.canPlayVideos?(t.openBlock(),t.createBlock(v,{key:0,onShowsummarylive:m.showsummarylive,onShowleyendlive:m.showleyendlive,onShowgoalslive:m.showgoalslive,onIntervalidhighlive:m.intervalidhighlive,"can-play-videos":s.canPlayVideos,game:s.game,onOpenmedia:m.openmedia},null,8,["onShowsummarylive","onShowleyendlive","onShowgoalslive","onIntervalidhighlive","can-play-videos","game","onOpenmedia"])):t.createCommentVNode("",!0)],64))],4)])],2)])):(t.openBlock(),t.createElementBlock("div",Tct,[!U.isDataProminentGameLoading&&(s.game.is_live===1||s.game.game_status===0)&&s.canPlayVideos?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[s.game.status===1&&s.canPlayVideos?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[s.canPlayVideos?(t.openBlock(),t.createBlock(p,{key:0,data:{game:s.game.gameId,season:s.game.seasonId,type:"historic"},"can-play-videos":s.canPlayVideos,"video-privileges-playing-as":s.videoPrivilegesPlayingAs,"privileges-team-id":s.playVideosPrivileges?s.playVideosPrivileges.seasonAndPrivileges.teamId:0,provider:e.$store.getters.getProviderId,"is-dev-apis":e.$store.getters.getIsDevApis,onOpenmedia:m.openmedia},null,8,["data","can-play-videos","video-privileges-playing-as","privileges-team-id","provider","is-dev-apis","onOpenmedia"])):t.createCommentVNode("",!0)],64))],64))])),m.isGamePreMatch?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(U.widthSection>920?"container-prominent-section__events-line":"container-prominent-section__events-line-mobile")},[U.areHighlightsLoading?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(r,{key:0,token:s.token,game:s.game,widthScreen:U.widthSection,"can-play-videos":s.canPlayVideos,"game-events-interval-minutes":s.gameEventsIntervalMinutes,onPlayVideo:m.onClickPlayEvent},null,8,["token","game","widthScreen","can-play-videos","game-events-interval-minutes","onPlayVideo"]))],2)),U.areHighlightsLoading?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(U.widthSection>760?"fields-section-container":"fields-section-container-movil")},[o[4]||(o[4]=t.createElementVNode("div",{class:"fields-section-title"},"Posesión",-1)),s.game.game_status===4&&s.game.is_live!=1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[U.widthSection>590?(t.openBlock(),t.createElementBlock("div",Act,o[1]||(o[1]=[t.createElementVNode("span",{class:"leyend-bold"},"IMPORTANTE:",-1),t.createTextVNode("  Con base en las estadisticas de los partidos ya jugados en el torneo. ")]))):t.createCommentVNode("",!0),U.widthSection>340&&U.widthSection<=590?(t.openBlock(),t.createElementBlock("div",Ect,o[2]||(o[2]=[t.createElementVNode("span",{class:"leyend-bold"},"IMPORTANTE:",-1),t.createTextVNode("  "),t.createElementVNode("br",null,null,-1),t.createTextVNode("Con base en las estadisticas de los partidos ya "),t.createElementVNode("br",null,null,-1),t.createTextVNode(" jugados en el torneo. ")]))):t.createCommentVNode("",!0),U.widthSection<=340?(t.openBlock(),t.createElementBlock("div",Mct,o[3]||(o[3]=[t.createElementVNode("span",{class:"leyend-bold"},"IMPORTANTE:",-1),t.createTextVNode("  "),t.createElementVNode("br",null,null,-1),t.createTextVNode("Con base en las estadisticas de los "),t.createElementVNode("br",null,null,-1),t.createTextVNode("partidos ya jugados en el torneo. ")]))):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(U.widthSection>420?"container-switch-prematch-teams":"container-switch-prematch-teams-movil")},[t.createVNode(_,{"selected-button-index":U.teamButtonSelectedIndex,buttons:m.toggleButtons,width:"320px","border-radius":"16px",onChange:m.onChangeToggle},null,8,["selected-button-index","buttons","onChange"])],2)],64)):t.createCommentVNode("",!0),t.withDirectives(t.createElementVNode("div",Ict,[t.createVNode(b,{height:"20px",width:"41px","background-color":"none","width-circle":"15px","height-circle":"15px","circle-color-switch":"#CBEE6B","font-color":"#ffffff","value-default":"Porcentajes",textOptionLeft:"Porcentajes",textOptionRight:"Volumétrico",onChange:m.ChangeRadio},null,8,["onChange"])],512),[[t.vShow,U.widthSection<=760]]),t.createElementVNode("div",{class:t.normalizeClass(U.widthSection>760?"fields-container":"fields-container-movil")},[t.withDirectives(t.createElementVNode("div",{class:t.normalizeClass(U.widthSection>760?"field-possesion-container":"field-possesion-container-movil")},[t.createVNode(x,{"width-Section":U.widthSection,game:s.game,"time-live-possesion":s.timeLivePossesion,onIntervalidpossesion:m.intervalidpossesion,"team-selected":U.teamSelected.teamId===0?m.toggleButtons[0]:U.teamSelected},null,8,["width-Section","game","time-live-possesion","onIntervalidpossesion","team-selected"])],2),[[t.vShow,U.switchTypeViewFiled==="Porcentajes"||U.widthSection>760]]),t.withDirectives(t.createElementVNode("div",{class:t.normalizeClass(U.widthSection>760?"field-volumetrica-container":"field-volumetrica-container-movil")},[t.createVNode(h,{game:s.game,"season-selected":s.seasonSelected,token:s.token,"is-game-pre-match":m.isGamePreMatch,"team-selected-pre-match":U.teamSelected,"volumetric-field-interval-minutes":s.volumetricFieldIntervalMinutes},null,8,["game","season-selected","token","is-game-pre-match","team-selected-pre-match","volumetric-field-interval-minutes"])],2),[[t.vShow,U.viewVolumtrica&&U.widthSection>760||U.switchTypeViewFiled==="Volumétrico"]])],2),t.createCommentVNode("",!0)],2)),t.createElementVNode("div",Pct,[o[5]||(o[5]=t.createElementVNode("div",{class:"fields-section-title"},"Pizarra",-1)),U.areHighlightsLoading?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(n,{key:0,"is-female":s.tournamentSelected.is_female===1,game:s.game,"season-selected":s.seasonSelected,"tournament-selected":s.tournamentSelected,token:s.token,"width-section":U.widthSection,"can-play-videos":s.canPlayVideos,"is-game-pre-match":m.isGamePreMatch,"play-videos-privileges":s.playVideosPrivileges,"volumetric-field-interval-minutes":s.volumetricFieldIntervalMinutes,"chalkboard-interval-minutes":s.chalkboardIntervalMinutes,"game-events-interval-minutes":s.gameEventsIntervalMinutes,onOpenMediaPlayer:m.onOpenMediaPlayer},null,8,["is-female","game","season-selected","tournament-selected","token","width-section","can-play-videos","is-game-pre-match","play-videos-privileges","volumetric-field-interval-minutes","chalkboard-interval-minutes","game-events-interval-minutes","onOpenMediaPlayer"]))])])],512)}const Bct=Ki(xct,[["render",Lct],["__scopeId","data-v-0e1f5a6f"]]),Nqt="",zct={class:"datagame-container"},Oct=Ki({__name:"GSCProminentMain",props:{timeLiveProminentData:{type:Number,default:6e4},timeLiveHighlightsProminentAndVideo:{type:Number,default:6e4},timeLivePossesion:{type:Number,default:6e4},game:{type:Object,default:()=>({})},seasonSelected:{type:Object,default:()=>({})},tournamentSelected:{type:Object,default:()=>({})},isWidget:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},canPlayVideos:{type:Boolean,default:!1},is_captured:{type:Number,default:1},videoPrivilegesPlayingAs:{type:Set,default:()=>new Set([1,2])},playVideosPrivileges:{type:Object,default:null},volumetricFieldIntervalMinutes:{type:Number,default:2},chalkboardIntervalMinutes:{type:Number,default:2},gameEventsIntervalMinutes:{type:Number,default:1}},emits:["click-play-event","openmedia","intervalidpossesion","intervalidhighlive"],setup(e,{emit:o}){const s=o;function B(a){s("intervalidhighlive",a)}function U(a){s("intervalidpossesion",a)}function m(a){s("openmedia",a)}function y(a){s("openmedia",a)}return(a,v)=>(t.openBlock(),t.createElementBlock("div",zct,[t.createVNode(Bct,{game:e.game,is_captured:e.is_captured,"is-widget":e.isWidget,"team-widget":e.teamWidget,"time-live-prominent-data":e.timeLiveProminentData,"time-live-highlights-prominent-and-video":e.timeLiveHighlightsProminentAndVideo,"time-live-possesion":e.timeLivePossesion,"season-selected":e.seasonSelected,"tournament-selected":e.tournamentSelected,"can-play-videos":e.canPlayVideos,"video-privileges-playing-as":e.videoPrivilegesPlayingAs,"play-videos-privileges":e.playVideosPrivileges,"volumetric-field-interval-minutes":e.volumetricFieldIntervalMinutes,"chalkboard-interval-minutes":e.chalkboardIntervalMinutes,"game-events-interval-minutes":e.gameEventsIntervalMinutes,onIntervalidpossesion:U,onIntervalidhighlive:B,onOpenmedia:m,onOpenMediaPlayer:y},null,8,["game","is_captured","is-widget","team-widget","time-live-prominent-data","time-live-highlights-prominent-and-video","time-live-possesion","season-selected","tournament-selected","can-play-videos","video-privileges-playing-as","play-videos-privileges","volumetric-field-interval-minutes","chalkboard-interval-minutes","game-events-interval-minutes"])]))}},[["__scopeId","data-v-9010e64a"]]),Dct={class:"datagame-container"},Nct={__name:"GSCDatosGSMainAvanced",props:{isWidget:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},game:{type:Object,default:()=>({gameId:79623,seasonId:1772,status:1,dateTimeUTC:"2023-10-01T22:20:00Z",homeTeam:{logo:"https://golstatsimages.blob.core.windows.net/teams-80/18.png",team_id:10,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/1.png",team_id:1,provisional_logo:"https://golstatsimages.blob.core.windows.net/teams-provisional/1.png",colloquial_name:"Chivas",acronym:"CHI",team_name:"Guadalajara"}})},tournamentSelected:{type:Object,default:()=>({})},playVideosPrivileges:{type:Object,default:null}},emits:["openmedia","intervalidgs"],setup(e,{emit:o}){const s=fp(),B=t.ref(0),U=e;t.watch(()=>U.game,v=>{B.value=v.gameId},{deep:!0,immediate:!0});const m=o;function y(v){m("openmedia",v)}function a(v){m("intervalidgs",v)}return(v,p)=>(t.openBlock(),t.createElementBlock("div",Dct,[e.game.is_live===1||e.game.game_status===0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[Object.keys(e.game).length>0?(t.openBlock(),t.createBlock(t.unref(fb),{key:B.value,type:3,"is-widget":e.isWidget,"team-widget":e.teamWidget,data:{season:e.game.seasonId,game:e.game.gameId,game_status:e.game.game_status,home_team_id:e.game.homeTeam.team_id,away_team_id:e.game.awayTeam.team_id,team_view:2},"tournament-selected":e.tournamentSelected,onIntervalidgs:a,"play-videos-privileges":e.playVideosPrivileges,"provider-id":t.unref(s).getters.getProviderId,"is-dev-apis":t.unref(s).getters.getIsDevApis,onOpenmedia:y},null,8,["is-widget","team-widget","data","tournament-selected","play-videos-privileges","provider-id","is-dev-apis"])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[e.game.game_status==4?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[Object.keys(e.game).length>0?(t.openBlock(),t.createBlock(t.unref(fb),{key:B.value,type:0,"is-widget":e.isWidget,"team-widget":e.teamWidget,data:{season:e.game.seasonId,game:e.game.gameId,game_status:e.game.game_status,home_team_id:e.game.homeTeam.team_id,away_team_id:e.game.awayTeam.team_id,team_view:1},"tournament-selected":e.tournamentSelected,"play-videos-privileges":e.playVideosPrivileges,"provider-id":t.unref(s).getters.getProviderId,"is-dev-apis":t.unref(s).getters.getIsDevApis,onOpenmedia:y},null,8,["is-widget","team-widget","data","tournament-selected","play-videos-privileges","provider-id","is-dev-apis"])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[Object.keys(e.game).length>0?(t.openBlock(),t.createBlock(t.unref(fb),{key:B.value,type:1,"is-widget":e.isWidget,"team-widget":e.teamWidget,data:{season:e.game.seasonId,game:e.game.gameId,game_status:e.game.game_status,home_team_id:e.game.homeTeam.team_id,away_team_id:e.game.awayTeam.team_id,team_view:2},"tournament-selected":e.tournamentSelected,"play-videos-privileges":e.playVideosPrivileges,"provider-id":t.unref(s).getters.getProviderId,"is-dev-apis":t.unref(s).getters.getIsDevApis,onOpenmedia:y},null,8,["is-widget","team-widget","data","tournament-selected","play-videos-privileges","provider-id","is-dev-apis"])):t.createCommentVNode("",!0)],64))],64))]))}},Fct={computed:{sizeTabsFontMP(){const e=this.elementSize.width;return e<=380?"12px":e<=768?"14px":"16px"},sizeTabsFontMS(){const e=this.elementSize.width;return e<=600?"12px":e<=768?"13px":"14px"},sizeTabsMS(){const e=this.elementSize.width;return e<=480?"145px":e<=600?"153px":e<=620?"163px":e<=640?"170px":e<=660?"175px":e<=680?"180px":e<=700?"185px":e<=720?"195px":"200px"},sizeTabsMP(){const e=this.elementSize.width;return e<=319?"68px":e<=330?"73px":e<=340?"78px":e<=350?"82px":e<=360||e<=370?"90px":e<=390?"95px":e<=410?"105px":e<=430?"110px":e<=450?"117px":e<=470?"122px":e<=500?"130px":e<=530?"138px":e<=560?"155px":e<=590?"163px":e<=620?"175px":e<=650?"180px":e<=680?"195px":e<=730?"210px":e<=768?"100px":"110px"},comextleyemdmultipleleaguesClass(){return this.elementSize.width<=380?this.$style.comtextleyemdmultipleleagues380:this.$style.comtextleyemdmultipleleagues},comdropdownParentClass(){return this.elementSize.width<=730?this.$style.comdropdownParent730:this.$style.comdropdownParent},comdescubreVideosClass(){const e=this.elementSize.width;return e<=960?this.$style.comdescubreVideos960:e<=1232?this.$style.comdescubreVideos1232:this.$style.comdescubreVideos},comquitarFiltrosClass(){const e=this.elementSize.width;return e<=380?this.$style.comquitarFiltros380:e<=480?this.$style.comquitarFiltros480:e<=730?this.$style.comquitarFiltros730:this.$style.comquitarFiltros},commejoresJugadoresClass(){const e=this.elementSize.width;return e<=480?this.$style.commejoresJugadores480:e<=730?this.$style.commejoresJugadores730:this.$style.commejoresJugadores},menuSectionClass(){return this.elementSize.width<=960?this.$style.commenuSection960:this.$style.commenuSection},topFiltersClass(){const e=this.elementSize.width;return e<=420?this.$style.comtopFilters420:e<=460?this.$style.comtopFilters460:e<=1232?this.$style.comtopFilters1232:this.$style.comtopFilters},toniKroosWrapperClass(){const e=this.elementSize.width;return e<=319?this.$style.comtoniKroosWrapper320:e<=420?this.$style.comtoniKroosWrapper420:e<=916?this.$style.comtoniKroosWrapper760:e<=975?this.$style.comtoniKroosWrapper975:e<=1079?this.$style.comtoniKroosWrapper1080:this.$style.comtoniKroosWrapper},containerTablesClass(){const e=this.elementSize.width;return e<=319?this.$style.comcontainerTables320:e<=916?this.$style.comcontainerTables760:e<=1079?this.$style.comcontainerTables960:this.$style.comcontainerTables},containerTheBestClass(){const e=this.elementSize.width;return e<=319?this.$style.comcontainerTheBest320:e<=960?this.$style.comcontainerTheBest960:e<=1232?this.$style.comcontainerTheBest1232:this.$style.comcontainerTheBest},menuSectionHeaderClass(){const e=this.elementSize.width;return e<=730?this.$style.commenuSectionHeader730:e<=960?this.$style.commenuSectionHeader960:e<=1232?this.$style.commenuSectionHeader1232:this.$style.commenuSectionHeader},losMejoresClass(){const e=this.elementSize.width;return e<=380?this.$style.comlosMejores380:e<=530?this.$style.comlosMejores530:e<=730?this.$style.comlosMejores730:this.$style.comlosMejores},dropdownClass(){return this.elementSize.width<=730?this.$style.comdropdown730:this.$style.comdropdown},dropdown1Class(){return this.elementSize.width<=730?this.$style.comdropdown1730:this.$style.comdropdown1},menuSectionParentHeaderClass(){const e=this.elementSize.width;return e<=430?this.$style.commenuSectionParentHeader430:e<=730?this.$style.commenuSectionParentHeader730:e<=960?this.$style.commenuSectionParentHeader960:e<=1232?this.$style.commenuSectionParentHeader1232:this.$style.commenuSectionParentHeader},templateLosMejoresClass(){const e=this.elementSize.width;return e<=319?this.$style.comtemplateLosMejores1320:e<=350?this.$style.comtemplateLosMejores1350:e<=420?this.$style.comtemplateLosMejores1420:e<=540?this.$style.comtemplateLosMejores1540:e<=960?this.$style.comtemplateLosMejores1960:e<=1232?this.$style.comtemplateLosMejores11232:this.$style.comtemplateLosMejores1},containerMenuClass(){return this.elementSize.width<=760?this.$style.comcontainerMenu760:this.$style.comcontainerMenu},titleSectionClass(){return this.elementSize.width<=540?this.$style.comtitleSection540:this.$style.comtitleSection},containerSectionClass(){const e=this.elementSize.width;return e<=319?this.$style.comcontainerSection320:e<=350?this.$style.comcontainerSection350:e<=960?this.$style.comcontainerSection960:e<=1232?this.$style.comcontainerSection1232:this.$style.comcontainerSection},filtersContainerClass(){const e=this.elementSize.width;return e<=420?this.$style.comfiltersContainer420:e<=760?this.$style.comfiltersContainer760:e<=1232?this.$style.comfiltersContainer1232:this.$style.comfiltersContainer},topFiltersParentClass(){const e=this.elementSize.width;return e<=420?this.$style.comtopFiltersParent420:e<=460?this.$style.comtopFiltersParent460:e<=1232?this.$style.comtopFiltersParent1232:this.$style.comtopFiltersParent}}};function jb(e){const o=t.ref({width:0,height:0});function s(){const B=e.value.getBoundingClientRect();o.value.width=B.width,o.value.height=B.height}return t.onMounted(()=>{s(),window.addEventListener("resize",s)}),t.onUnmounted(()=>{window.removeEventListener("resize",s)}),{elementSize:o}}const Rct={containerLeftTitles:"_containerLeftTitles_10kz4_60",containerLeftTitles420:"_containerLeftTitles420_10kz4_68",containerLeftTitles620:"_containerLeftTitles620_10kz4_76",containerLeftTitlesTeam:"_containerLeftTitlesTeam_10kz4_85",containerLeftTitlesTeam1180:"_containerLeftTitlesTeam1180_10kz4_93",containerLeftTitlesTeam1090:"_containerLeftTitlesTeam1090_10kz4_101",containerLeftTitlesTeam960:"_containerLeftTitlesTeam960_10kz4_109",containerLeftTitlesTeam860:"_containerLeftTitlesTeam860_10kz4_117",containerLeftTitlesTeam768:"_containerLeftTitlesTeam768_10kz4_125",containerLeftTitlesTeam680:"_containerLeftTitlesTeam680_10kz4_133",containerLeftTitlesTeam620:"_containerLeftTitlesTeam620_10kz4_141",containerLeftTitlesTeam420:"_containerLeftTitlesTeam420_10kz4_149",headTitlesAvanced:"_headTitlesAvanced_10kz4_158",headTitlesAvanced960:"_headTitlesAvanced960_10kz4_173",headTitlesAvanced420:"_headTitlesAvanced420_10kz4_188",headTitlesAvanced540:"_headTitlesAvanced540_10kz4_208",headTitlesAvanced460:"_headTitlesAvanced460_10kz4_223",headTitlesAvanced620:"_headTitlesAvanced620_10kz4_238",position:"_position_10kz4_253",position420:"_position420_10kz4_262",player:"_player_10kz4_265",player420:"_player420_10kz4_276",containerRightTypeAvanced1:"_containerRightTypeAvanced1_10kz4_280",containerRightTitlesAdvanced:"_containerRightTitlesAdvanced_10kz4_287",containerRightTitlesAdvanced960:"_containerRightTitlesAdvanced960_10kz4_296",block02Titles:"_block02Titles_10kz4_305",block02Titles620:"_block02Titles620_10kz4_313",mon1Scouting:"_mon1Scouting_10kz4_317",mon1Scouting960:"_mon1Scouting960_10kz4_327",mon1:"_mon1_10kz4_317",mon1420:"_mon1420_10kz4_345",mon1620:"_mon1620_10kz4_355",icnIcon:"_icnIcon_10kz4_365",icnIcon960:"_icnIcon960_10kz4_370",icnIcon420:"_icnIcon420_10kz4_376",teamTitle:"_teamTitle_10kz4_380",positionTitle:"_positionTitle_10kz4_390",ageTitle:"_ageTitle_10kz4_398",partidos:"_partidos_10kz4_406",playedGamesTitle:"_playedGamesTitle_10kz4_410",playedMinutesTitle:"_playedMinutesTitle_10kz4_420",block01Titles:"_block01Titles_10kz4_429",mon:"_mon_10kz4_317",containesOptionsTitles:"_containesOptionsTitles_10kz4_445",templateTablaProductividadType1:"_templateTablaProductividadType1_10kz4_452",templateTablaProductividadType1400:"_templateTablaProductividadType1400_10kz4_464",headTitlesType1:"_headTitlesType1_10kz4_478",headTitlesType1420:"_headTitlesType1420_10kz4_491",headTitlesType1400:"_headTitlesType1400_10kz4_507",headTitlesType1540:"_headTitlesType1540_10kz4_523",headTitlesType1460:"_headTitlesType1460_10kz4_537",headTitlesType1680:"_headTitlesType1680_10kz4_551",headTitlesType1350:"_headTitlesType1350_10kz4_564",positionType1:"_positionType1_10kz4_579",positionType1400:"_positionType1400_10kz4_588",teamType1:"_teamType1_10kz4_598",teamType1400:"_teamType1400_10kz4_607",frecuenciaType1:"_frecuenciaType1_10kz4_617",frecuenciaType1540:"_frecuenciaType1540_10kz4_625",containerLeftTitlesType1:"_containerLeftTitlesType1_10kz4_634",frecuenciaWrapperType1:"_frecuenciaWrapperType1_10kz4_642",frecuenciaWrapperType1680:"_frecuenciaWrapperType1680_10kz4_651",promedioPartidoType1:"_promedioPartidoType1_10kz4_659",promedioEstePartidoType1:"_promedioEstePartidoType1_10kz4_663",promedioEstePartidoType1960:"_promedioEstePartidoType1960_10kz4_671",promedioEstePartidoWrapperType1:"_promedioEstePartidoWrapperType1_10kz4_675",promedioEstePartidoWrapperType11200:"_promedioEstePartidoWrapperType11200_10kz4_683",promedioEstePartidoWrapperType11090:"_promedioEstePartidoWrapperType11090_10kz4_692",promedioEstePartidoWrapperType11086:"_promedioEstePartidoWrapperType11086_10kz4_702",promedioPartidosType1:"_promedioPartidosType1_10kz4_711",promedioPartidosWrapperType1:"_promedioPartidosWrapperType1_10kz4_718",promedioPartidosWrapperType1960:"_promedioPartidosWrapperType1960_10kz4_726",promedioPartidosWrapperType11086:"_promedioPartidosWrapperType11086_10kz4_729",partidosJugadosType1:"_partidosJugadosType1_10kz4_732",partidosJugadosType1960:"_partidosJugadosType1960_10kz4_738",partidosJugadosWrapperType1:"_partidosJugadosWrapperType1_10kz4_745",partidosJugadosWrapperType11200:"_partidosJugadosWrapperType11200_10kz4_753",partidosJugadosWrapperType11180:"_partidosJugadosWrapperType11180_10kz4_761",partidosJugadosWrapperType11170:"_partidosJugadosWrapperType11170_10kz4_769",partidosJugadosWrapperType11140:"_partidosJugadosWrapperType11140_10kz4_777",partidosJugadosWrapperType11086:"_partidosJugadosWrapperType11086_10kz4_785",partidosJugadosWrapperType1960:"_partidosJugadosWrapperType1960_10kz4_793",partidosJugadosWrapperType1880:"_partidosJugadosWrapperType1880_10kz4_801",partidosJugadosWrapperType1860:"_partidosJugadosWrapperType1860_10kz4_809",partidosJugadosWrapperType1830:"_partidosJugadosWrapperType1830_10kz4_817",partidosJugadosWrapperType1790:"_partidosJugadosWrapperType1790_10kz4_825",partidosJugadosWrapperType1930:"_partidosJugadosWrapperType1930_10kz4_833",partidosJugadosWrapperType1770:"_partidosJugadosWrapperType1770_10kz4_841",block01TitlesType1:"_block01TitlesType1_10kz4_844",monType1:"_monType1_10kz4_852",monType1960:"_monType1960_10kz4_861",monType1680:"_monType1680_10kz4_871",videosType1:"_videosType1_10kz4_874",videosType1680:"_videosType1680_10kz4_884",videosType1600:"_videosType1600_10kz4_893",videosType1540:"_videosType1540_10kz4_902",videosType1420:"_videosType1420_10kz4_911",videosType1400:"_videosType1400_10kz4_920",containesOptionsTitlesType1:"_containesOptionsTitlesType1_10kz4_932",containesOptionsTitlesType1768:"_containesOptionsTitlesType1768_10kz4_940",containesOptionsTitlesType1730:"_containesOptionsTitlesType1730_10kz4_947",containesOptionsTitlesType1690:"_containesOptionsTitlesType1690_10kz4_954",icnIconType1:"_icnIconType1_10kz4_961",icnIconType1420:"_icnIconType1420_10kz4_967",icnIconType1400:"_icnIconType1400_10kz4_974",block02TitlesType1:"_block02TitlesType1_10kz4_978",block02TitlesType1680:"_block02TitlesType1680_10kz4_985",block02TitlesType1350:"_block02TitlesType1350_10kz4_992",containerRightTitlesType1:"_containerRightTitlesType1_10kz4_999",containerRightTitlesType1420:"_containerRightTitlesType1420_10kz4_1008"},NS={components:{},computed:{icnIconType1Class(){const e=this.elementSize.width;return e<=400?this.$style.icnIconType1400:e<=420?this.$style.icnIconType1420:this.$style.icnIconType1},videosType1Class(){const e=this.elementSize.width;return e<=400?this.$style.videosType1400:e<=420?this.$style.videosType1420:e<=540?this.$style.videosType1540:e<=600?this.$style.videosType1600:e<=680?this.$style.videosType1680:this.$style.videosType1},monType1Class(){const e=this.elementSize.width;return e<=680?this.$style.monType1680:e<=960?this.$style.monType1960:this.$style.monType1},block02TitlesType1Class(){const e=this.elementSize.width;return e<=350?this.$style.block02TitlesType1350:e<=680?this.$style.block02TitlesType1680:this.$style.block02TitlesType1},containesOptionsTitlesType1Class(){const e=this.elementSize.width;return e<=400?this.$style.containesOptionsTitlesType1400:e<=690?this.$style.containesOptionsTitlesType1690:e<=730?this.$style.containesOptionsTitlesType1730:e<=768?this.$style.containesOptionsTitlesType1768:this.$style.containesOptionsTitlesType1},partidosJugadosWrapperType1Class(){const e=this.elementSize.width;return e<=770?this.$style.promedioPartidosWrapperType1770:e<=790?this.$style.partidosJugadosWrapperType1790:e<=830?this.$style.partidosJugadosWrapperType1830:e<=860?this.$style.partidosJugadosWrapperType1860:e<=880?this.$style.partidosJugadosWrapperType1880:e<=930?this.$style.partidosJugadosWrapperType1930:e<=960?this.$style.partidosJugadosWrapperType1960:e<=1086?this.$style.partidosJugadosWrapperType11086:e<=1140?this.$style.partidosJugadosWrapperType11140:e<=1170?this.$style.partidosJugadosWrapperType11170:e<=1180?this.$style.partidosJugadosWrapperType11180:e<=1200?this.$style.partidosJugadosWrapperType11200:this.$style.partidosJugadosWrapperType1},promedioPartidosWrapperType1Class(){const e=this.elementSize.width;return e<=960?this.$style.promedioPartidosWrapperType1960:e<=1086?this.$style.promedioPartidosWrapperType11086:this.$style.promedioPartidosWrapperType1},partidosJugadosType1Class(){return this.elementSize.width<=960?this.$style.partidosJugadosType1960:this.$style.partidosJugadosType1},templateTablaProductividadType1Class(){return this.elementSize.width<=400?this.$style.templateTablaProductividadType1400:this.$style.templateTablaProductividadType1},promedioEstePartidoType1Class(){return this.elementSize.width<=960?this.$style.promedioEstePartidoType1960:this.$style.promedioEstePartidoType1},headTitlesType1Class(){const e=this.elementSize.width;return e<=350?this.$style.headTitlesType1350:e<=400?this.$style.headTitlesType1400:e<=420?this.$style.headTitlesType1420:e<=460?this.$style.headTitlesType1460:e<=540?this.$style.headTitlesType1540:e<=680?this.$style.headTitlesType1680:this.$style.headTitlesType1},headTitlesClassAvanced(){const e=this.elementSize.width;return e<=420?this.$style.headTitlesAvanced420:e<=460?this.$style.headTitlesAvanced460:e<=540?this.$style.headTitlesAvanced540:e<=620?this.$style.headTitlesAvanced620:e<=960?this.$style.headTitlesAvanced960:this.$style.headTitlesAvanced},containerLeftTitlesClass(){const e=this.elementSize.width;return e<=420?this.$style.containerLeftTitles420:e<=620?this.$style.containerLeftTitles620:this.$style.containerLeftTitles},containerLeftTitlesClassTeam(){const e=this.elementSize.width;return e<=420?this.$style.containerLeftTitlesTeam420:e<=620?this.$style.containerLeftTitlesTeam620:e<=680?this.$style.containerLeftTitlesTeam680:e<=768?this.$style.containerLeftTitlesTeam768:e<=860?this.$style.containerLeftTitlesTeam860:e<=960?this.$style.containerLeftTitlesTeam960:e<=1090?this.$style.containerLeftTitlesTeam1090:e<=1180?this.$style.containerLeftTitlesTeam1180:this.$style.containerLeftTitlesTeam},icnIconClass(){const e=this.elementSize.width;return e<=420?this.$style.icnIcon420:e<=960?this.$style.icnIcon960:this.$style.icnIcon},mon1Class(){const e=this.elementSize.width;return e<=420?this.$style.mon1420:e<=620?this.$style.mon1620:this.$style.mon1},mon1ScoutingClass(){const e=this.elementSize.width;return e<=420?this.$style.mon1420:e<=960?this.$style.mon1Scouting960:this.$style.mon1Scouting},promedioEstePartidoWrapperType1Class(){const e=this.elementSize.width;return e<=1086?this.$style.promedioEstePartidoWrapperType11086:e<=1090?this.$style.promedioEstePartidoWrapperType11090:e<=1200?this.$style.promedioEstePartidoWrapperType11200:this.$style.promedioEstePartidoWrapperType1},frecuenciaWrapperType1Class(){return this.elementSize.width<=680?this.$style.frecuenciaWrapperType1680:this.$style.frecuenciaWrapperType1},frecuenciaType1Class(){return this.elementSize.width<=540?this.$style.frecuenciaType1540:this.$style.frecuenciaType1},positionType1Class(){return this.elementSize.width<=400?this.$style.positionType1400:this.$style.positionType1},containerRightType1ClassAvanced(){return this.elementSize.width<=420?this.$style.containerRightTypeAvanced1420:this.$style.containerRightTypeAvanced1},containerRightTitlesType1Class(){return this.elementSize.width<=420?this.$style.containerRightTitlesType1420:this.$style.containerRightTitlesType1},teamType1Class(){return this.elementSize.width<=400?this.$style.teamType1400:this.$style.teamType1},playerClass(){return this.elementSize.width<=420?this.$style.player420:this.$style.player},positionClass(){return this.elementSize.width<=420?this.$style.position420:this.$style.position},containerRightTitlesClassAdvanced(){return this.elementSize.width<=960?this.$style.containerRightTitlesAdvanced960:this.$style.containerRightTitlesAdvanced},block02TitlesClass(){return this.elementSize.width<=620?this.$style.block02Titles960:this.$style.block02Titles}},setup(){const e=t.ref("myDivRef"),{elementSize:o}=jb(e);return{myDivRef:e,elementSize:o}},props:{type:{type:Number,default:0},background:{type:String,default:"#172531"},height:{type:String,default:"71px"},heightTeam:{type:String,default:"65px"},fontColor:{type:String,default:"#FFFFFF"},fontSize:{type:String,default:"12px"},fontFamily:{type:String,default:"Poppins-Regular"}},watch:{},data:()=>({}),async created(){},methods:{}},$R=()=>{t.useCssVars(e=>({"833b0df6":e.background,"1c64387e":e.height,"42ac62f2":e.fontSize,"149ddcc6":e.fontColor,"766a7f2c":e.fontFamily,"669f7ffb":e.heightTeam}))},KR=NS.setup;NS.setup=KR?(e,o)=>($R(),KR(e,o)):$R;const Vct={ref:"myDivRef"};function jct(e,o,s,B,U,m){return t.openBlock(),t.createElementBlock("div",Vct,[s.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(m.headTitlesClassAvanced),id:"container-titles"},[t.createElementVNode("div",{class:t.normalizeClass(m.containerLeftTitlesClass),id:"container-left-titles"},[t.createElementVNode("div",{class:t.normalizeClass(m.positionClass)},"Pos.",2),t.createElementVNode("div",{class:t.normalizeClass(m.playerClass)},"Jugador",2)],2),t.createElementVNode("div",{class:t.normalizeClass(m.containerRightTitlesClassAdvanced),id:"container-right-titles"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.block01Titles)},[B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.teamTitle)},"Equipo",2)):t.createCommentVNode("",!0),B.elementSize.width>730?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.positionTitle)},"Posición",2)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(e.$style.ageTitle)},"edad",2)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(e.$style.ageTitle)},"País",2)):t.createCommentVNode("",!0),B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:4,class:t.normalizeClass(e.$style.playedGamesTitle)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Partidos",2),t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Jugados",2)],2)):t.createCommentVNode("",!0),B.elementSize.width>635?(t.openBlock(),t.createElementBlock("div",{key:5,class:t.normalizeClass(e.$style.playedMinutesTitle)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Minutos",2),t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Jugados",2)],2)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(m.block02TitlesClass)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containesOptionsTitles)},[B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.mon)},"Total",2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(m.mon1Class)},"Videos",2)],2)],2)],2)],2)):t.createCommentVNode("",!0),s.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(m.templateTablaProductividadType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(m.headTitlesType1Class),id:"container-titles"},[t.createElementVNode("div",{class:t.normalizeClass(m.containerLeftTitlesClassTeam),id:"container-left-titles"},[t.createElementVNode("div",{class:t.normalizeClass(m.positionType1Class)},"Pos.",2),t.createElementVNode("div",{class:t.normalizeClass(m.teamType1Class)},"Equipo",2)],2),t.createElementVNode("div",{class:t.normalizeClass(m.containerRightType1ClassAvanced)},[t.createElementVNode("div",{class:t.normalizeClass(m.frecuenciaWrapperType1Class)},[B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(m.frecuenciaType1Class)},"Frecuencia",2)):t.createCommentVNode("",!0)],2),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(m.promedioEstePartidoWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(m.promedioEstePartidoType1Class)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.promedioPartidoType1)},"Promedio partido",2),t.createElementVNode("p",{class:t.normalizeClass(e.$style.promedioPartidoType1)},"este Torneo",2)],2)],2)):t.createCommentVNode("",!0),B.elementSize.width>1086?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(m.promedioPartidosWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.promedioPartidosType1)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.promedioPartidoType1)},o[0]||(o[0]=[t.createTextVNode("Promedio partido"),t.createElementVNode("br",null,null,-1),t.createTextVNode("Torneo anterior")]),2)],2)],2)):t.createCommentVNode("",!0),B.elementSize.width>770?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(m.partidosJugadosWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.partidosJugadosType1)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.promedioPartidoType1)},o[1]||(o[1]=[t.createTextVNode("Partidos "),t.createElementVNode("br",null,null,-1),t.createTextVNode("Jugados")]),2)],2)],2)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(m.containesOptionsTitlesType1Class)},[B.elementSize.width>680?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(m.monType1Class)},"total",2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(m.videosType1Class)},"Videos",2)],2)],2)],2)):t.createCommentVNode("",!0),s.type==2?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(m.headTitlesClassAvanced),id:"container-titles"},[t.createElementVNode("div",{class:t.normalizeClass(m.containerLeftTitlesClass),id:"container-left-titles"},[t.createElementVNode("div",{class:t.normalizeClass(m.positionClass)},"Pos.",2),t.createElementVNode("div",{class:t.normalizeClass(m.playerClass)},"Jugador",2)],2),t.createElementVNode("div",{class:t.normalizeClass(m.containerRightTitlesClassAdvanced),id:"container-right-titles"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.block01Titles)},[B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.teamTitle)},"Equipo",2)):t.createCommentVNode("",!0),B.elementSize.width>730?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.positionTitle)},"Posición",2)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(e.$style.ageTitle)},"edad",2)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(e.$style.ageTitle)},"País",2)):t.createCommentVNode("",!0),B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:4,class:t.normalizeClass(e.$style.playedGamesTitle)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Partidos",2),t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Jugados",2)],2)):t.createCommentVNode("",!0),B.elementSize.width>635?(t.openBlock(),t.createElementBlock("div",{key:5,class:t.normalizeClass(e.$style.playedMinutesTitle)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Minutos",2),t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Jugados",2)],2)):t.createCommentVNode("",!0),B.elementSize.width>635?(t.openBlock(),t.createElementBlock("div",{key:6,class:t.normalizeClass(e.$style.playedMinutesTitle)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Liga",2)],2)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(m.block02TitlesClass)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containesOptionsTitles)},[t.createElementVNode("div",{class:t.normalizeClass(m.mon1ScoutingClass)},"Videos",2)],2)],2)],2)],2)):t.createCommentVNode("",!0)],512)}const QR=Ki(NS,[["render",jct],["__cssModules",{$style:Rct}]]),UYt="",FS={props:{type:{type:Number,default:0},value:{type:Boolean,default:!1},textValue:String,icon:{type:String,default:"https://golstatsimages.blob.core.windows.net/images-library/arrow-btn.png"},iconPosition:{type:String,default:"left"},iconSize:String,mini:{type:Boolean,default:!1},fontColor:{type:String,default:"#FFFFFF"},textDecoration:String,fontSize:{type:String,default:"16px"},fontSizeStat:{type:String,default:"16px"},fontStyle:String,fontFamily:{type:String,default:"Poppins-Regular"},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},buttonMaxWidth:{type:String,default:"auto"},borderRadius:{type:String,default:"0px"},borderType:{type:String,default:"solid"},borderWidth:{type:Number,default:0},borderWidthBtn:{type:String,default:"2px"},borderColor:String,backgroundColor:{type:String,default:"none"},activeBackgroundColor:{type:String,default:"#000000"},activeBorderWidth:{type:Number,default:2},activeBorderType:{type:String,default:"solid"},activeBorderColor:{type:String,default:"#cbee6b"},activeColorText:{type:String,default:"#FFFFFF"},cursorType:{type:String,default:"default"},typeOnOff:{type:Boolean,default:!1},textCategory:String,textStat:String,marginLeftStat:{type:String,default:"15%"}},watch:{value:{deep:!0,immediate:!0,handler(e){this.status=e}}},data(){return{status:!1}},computed:{customStyle(){return{height:this.height,width:this.width,maxWidth:this.buttonMaxWidth,backgroundColor:this.backgroundColor,borderRadius:this.borderRadius,border:`${this.borderType} ${this.borderWidth}px ${this.borderColor}`,color:this.fontColor,textDecoration:this.textDecoration,cursor:this.cursorType,fontSize:this.fontSize,fontStyle:this.fontStyle,fontFamily:`${this.fontFamily} !important`}},customActive(){return{backgroundColor:this.activeBackgroundColor,color:this.activeColorText,border:`${this.activeBorderType} ${this.activeBorderWidth}px ${this.activeBorderColor}`}}},methods:{btnClick(e){this.$emit("click",e),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},eV=()=>{t.useCssVars(e=>({"3ae4172d":e.height,f5b071f0:e.borderWidthBtn,f8d8d6e8:e.borderType,"242a575e":e.borderColor,"2f813538":e.borderRadius,"9fb26200":e.width,"374850e2":e.backgroundColor,"1c058eb6":e.cursorType,"5cacbd76":e.fontSize,"38efeedc":e.fontStyle,"6464a0ce":e.fontFamily,"26623acf":e.marginLeftStat,d6a6e62c:e.fontSizeStat}))},tV=FS.setup;FS.setup=tV?(e,o)=>(eV(),tV(e,o)):eV;const Uct=["src"],Gct={key:1,class:"text"},Hct=["src"],Zct={class:"stats"},Wct={class:"numstats"},qct={class:"leyend"};function Jct(e,o,s,B,U,m){return t.openBlock(),t.createElementBlock("div",null,[s.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["button",U.status&&s.typeOnOff&&"button-active"]),style:t.normalizeStyle([m.customStyle,U.status&&s.typeOnOff&&m.customActive]),onClick:o[0]||(o[0]=(...y)=>m.btnClick&&m.btnClick(...y))},[s.icon&&s.iconPosition.toLowerCase()==="left"?(t.openBlock(),t.createElementBlock("img",{key:0,class:t.normalizeClass(s.mini?"icon-txt":"icon"),style:t.normalizeStyle({width:s.iconSize}),src:s.icon},null,14,Uct)):t.createCommentVNode("",!0),s.textValue?(t.openBlock(),t.createElementBlock("div",Gct,t.toDisplayString(s.textValue),1)):t.createCommentVNode("",!0),s.icon&&s.iconPosition.toLowerCase()==="right"?(t.openBlock(),t.createElementBlock("img",{key:2,class:"icon",style:t.normalizeStyle({width:s.iconSize}),src:s.icon},null,12,Hct)):t.createCommentVNode("",!0)],6)):t.createCommentVNode("",!0),s.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:"button-target",onClick:o[1]||(o[1]=(...y)=>m.btnClick&&m.btnClick(...y))},[t.createElementVNode("div",Zct,[o[2]||(o[2]=t.createElementVNode("img",{class:"iconstats",src:"https://golstatsimages.blob.core.windows.net/todoelfut/playdes.png"},null,-1)),t.createElementVNode("div",Wct,t.toDisplayString(s.textStat),1)]),t.createElementVNode("div",qct,t.toDisplayString(s.textCategory),1)])):t.createCommentVNode("",!0)])}const aV=Ki(FS,[["render",Jct],["__scopeId","data-v-cbde52b5"]]),Yct={rotate:"_rotate_z2pk6_3",positionContainer:"_positionContainer_z2pk6_50",positionContainer620:"_positionContainer620_z2pk6_57",rowwPlayerGames:"_rowwPlayerGames_z2pk6_64",rowwPlayer960Games:"_rowwPlayer960Games_z2pk6_80",rowwPlayer420Games:"_rowwPlayer420Games_z2pk6_95",rowwPlayer460Games:"_rowwPlayer460Games_z2pk6_111",containerLeftGames:"_containerLeftGames_z2pk6_128",containerLeft420Games:"_containerLeft420Games_z2pk6_136",containerLeft620Games:"_containerLeft620Games_z2pk6_144",iconFavoritesType1:"_iconFavoritesType1_z2pk6_151",iconFavoritesType1320:"_iconFavoritesType1320_z2pk6_159",iconFavorites:"_iconFavorites_z2pk6_151",iconFavorites420:"_iconFavorites420_z2pk6_175",playerContainerGames:"_playerContainerGames_z2pk6_183",playerContainer420Games:"_playerContainer420Games_z2pk6_195",playerContainer460Games:"_playerContainer460Games_z2pk6_207",playerContainerType1Games:"_playerContainerType1Games_z2pk6_219",playerContainerType1320Games:"_playerContainerType1320Games_z2pk6_229",playerContainerType1460Games:"_playerContainerType1460Games_z2pk6_239",imgPlayerIcon:"_imgPlayerIcon_z2pk6_249",imgPlayerIcon460:"_imgPlayerIcon460_z2pk6_259",imgPlayerIcon420:"_imgPlayerIcon420_z2pk6_269",manchesterUnitedGames:"_manchesterUnitedGames_z2pk6_279",manchesterUnited360Games:"_manchesterUnited360Games_z2pk6_290",manchesterUnited420Games:"_manchesterUnited420Games_z2pk6_301",manchesterUnited460Games:"_manchesterUnited460Games_z2pk6_312",containerRightGames:"_containerRightGames_z2pk6_323",containerRight960Games:"_containerRight960Games_z2pk6_332",containerRight420Games:"_containerRight420Games_z2pk6_342",numberOfVideos:"_numberOfVideos_z2pk6_353",numberOfVideos620:"_numberOfVideos620_z2pk6_359",block02Games:"_block02Games_z2pk6_365",block02960Games:"_block02960Games_z2pk6_375",block02620Games:"_block02620Games_z2pk6_384",block02420Games:"_block02420Games_z2pk6_391",verVideos:"_verVideos_z2pk6_399",verVideos620:"_verVideos620_z2pk6_405",numberPosition:"_numberPosition_z2pk6_408",shapeIcon:"_shapeIcon_z2pk6_414",chivasIcon:"_chivasIcon_z2pk6_419",imgTeamIcon:"_imgTeamIcon_z2pk6_430",teamName:"_teamName_z2pk6_435",nameTeamGames:"_nameTeamGames_z2pk6_441",dfC:"_dfC_z2pk6_450",position:"_position_z2pk6_50",age:"_age_z2pk6_460",manchesterUnitedIcon:"_manchesterUnitedIcon_z2pk6_468",country:"_country_z2pk6_475",playedGames:"_playedGames_z2pk6_482",playedMinutes:"_playedMinutes_z2pk6_489",block01:"_block01_z2pk6_496",leagueName:"_leagueName_z2pk6_503",roleCharacterIcon:"_roleCharacterIcon_z2pk6_509",btnVideosGames:"_btnVideosGames_z2pk6_517",containerBtnVideosGames:"_containerBtnVideosGames_z2pk6_532",containerBtnVideos620Games:"_containerBtnVideos620Games_z2pk6_542",containesOptions:"_containesOptions_z2pk6_551",arrowExpandIcon:"_arrowExpandIcon_z2pk6_558",rowTeam:"_rowTeam_z2pk6_567",rowTeam420:"_rowTeam420_z2pk6_585",rowTeam320:"_rowTeam320_z2pk6_603",rowTeam460:"_rowTeam460_z2pk6_622",rowTeam350:"_rowTeam350_z2pk6_641",containerLeftType1:"_containerLeftType1_z2pk6_659",containerLeftType1680:"_containerLeftType1680_z2pk6_665",containerLeftType1320:"_containerLeftType1320_z2pk6_672",containerLeftType1350:"_containerLeftType1350_z2pk6_680",positionContainertype1:"_positionContainertype1_z2pk6_687",positionContainertype1380:"_positionContainertype1380_z2pk6_695",positionContainertype1680:"_positionContainertype1680_z2pk6_703",positionContainertype1420:"_positionContainertype1420_z2pk6_711",manchesterUnitedType1:"_manchesterUnitedType1_z2pk6_719",manchesterUnitedType1460:"_manchesterUnitedType1460_z2pk6_725",manchesterUnitedType1320:"_manchesterUnitedType1320_z2pk6_732",containerRightType1Games:"_containerRightType1Games_z2pk6_739",containerRightType1420Games:"_containerRightType1420Games_z2pk6_750",containerRightType1320Games:"_containerRightType1320Games_z2pk6_761",teamNameWrapperType1:"_teamNameWrapperType1_z2pk6_772",teamNameWrapperType1960:"_teamNameWrapperType1960_z2pk6_779",teamNameWrapperType11086:"_teamNameWrapperType11086_z2pk6_786",ageWrapperType1:"_ageWrapperType1_z2pk6_793",ageWrapperType1680:"_ageWrapperType1680_z2pk6_800",ageWrapperType11086:"_ageWrapperType11086_z2pk6_808",ageType1:"_ageType1_z2pk6_816",ageType1960:"_ageType1960_z2pk6_824",playedGamesWrapperType1:"_playedGamesWrapperType1_z2pk6_827",playedGamesWrapperType1680:"_playedGamesWrapperType1680_z2pk6_834",playedGamesWrapperType1960:"_playedGamesWrapperType1960_z2pk6_837",playedGamesType1:"_playedGamesType1_z2pk6_840",playedGamesType1540:"_playedGamesType1540_z2pk6_847",playedGamesType1960:"_playedGamesType1960_z2pk6_851",playedGamesType11086:"_playedGamesType11086_z2pk6_854",playedMinutesWrapperType1:"_playedMinutesWrapperType1_z2pk6_857",playedMinutesWrapperType11086:"_playedMinutesWrapperType11086_z2pk6_864",playedMinutesType1:"_playedMinutesType1_z2pk6_871",playedMinutesType1680:"_playedMinutesType1680_z2pk6_878",block02Type1Games:"_block02Type1Games_z2pk6_881",block02Type1680Games:"_block02Type1680Games_z2pk6_889",block02Type1320Games:"_block02Type1320Games_z2pk6_897",block02Type1350Games:"_block02Type1350Games_z2pk6_906",leagueNameWrapperType1:"_leagueNameWrapperType1_z2pk6_914",leagueNameWrapperType1680:"_leagueNameWrapperType1680_z2pk6_922",leagueNameWrapperType1960:"_leagueNameWrapperType1960_z2pk6_925",leagueNameType1:"_leagueNameType1_z2pk6_933",leagueNameType1960:"_leagueNameType1960_z2pk6_943",numberOfVideosType1:"_numberOfVideosType1_z2pk6_953",numberOfVideosType1680:"_numberOfVideosType1680_z2pk6_960",numberOfVideosType11232:"_numberOfVideosType11232_z2pk6_967",vectorIconType1:"_vectorIconType1_z2pk6_974",block01TitlesType1:"_block01TitlesType1_z2pk6_991",numberPositionType1:"_numberPositionType1_z2pk6_998",shapeIconType1:"_shapeIconType1_z2pk6_1004",tijuanaIconType1:"_tijuanaIconType1_z2pk6_1010",tijuanaWrapperType1:"_tijuanaWrapperType1_z2pk6_1016",tijuanaWrapperType1NoBg:"_tijuanaWrapperType1NoBg_z2pk6_1027",teamNameType1:"_teamNameType1_z2pk6_1035",roleCharacterIconType1:"_roleCharacterIconType1_z2pk6_1042",verVideosType1:"_verVideosType1_z2pk6_1049",btnVideosType1Games:"_btnVideosType1Games_z2pk6_1055",containerBtnVideosType1Games:"_containerBtnVideosType1Games_z2pk6_1070",containesOptionsType1Games:"_containesOptionsType1Games_z2pk6_1081",arrowExpandIconType1:"_arrowExpandIconType1_z2pk6_1089",templateTablaProductividadType1:"_templateTablaProductividadType1_z2pk6_1095",verVideosType11232:"_verVideosType11232_z2pk6_1107",templateTablaProductividadType1320:"_templateTablaProductividadType1320_z2pk6_1111",verVideosType1680:"_verVideosType1680_z2pk6_1115"},RS={components:{GSCButton:aV},computed:{manchesterUnitedType1Class(){const e=this.elementSize.width;return e<=320?this.$style.manchesterUnitedType1320:e<=460?this.$style.manchesterUnitedType1460:this.$style.manchesterUnitedType1},containerRightType1Class(){const e=this.elementSize.width;return e<=320?this.$style.containerRightType1320Games:e<=420?this.$style.containerRightType1420Games:this.$style.containerRightType1Games},teamNameWrapperType1Class(){const e=this.elementSize.width;return e<=960?this.$style.teamNameWrapperType1960:e<=1086?this.$style.teamNameWrapperType11086:this.$style.teamNameWrapperType1},ageWrapperType1Class(){const e=this.elementSize.width;return e<=680?this.$style.ageWrapperType1680:e<=1086?this.$style.ageWrapperType11086:this.$style.ageWrapperType1},ageType1Class(){return this.elementSize.width<=960?this.$style.ageType1960:this.$style.ageType1},playedGamesWrapperType1Class(){const e=this.elementSize.width;return e<=680?this.$style.playedGamesWrapperType1680:e<=960?this.$style.playedGamesWrapperType1960:this.$style.playedGamesWrapperType1},playedGamesType1Class(){const e=this.elementSize.width;return e<=540?this.$style.playedGamesType1540:e<=960?this.$style.playedGamesType1960:e<=1086?this.$style.playedGamesType11086:this.$style.playedGamesType1},playedMinutesWrapperType1Class(){return this.elementSize.width<=1086?this.$style.playedMinutesWrapperType11086:this.$style.playedMinutesWrapperType1},playedMinutesType1Class(){return this.elementSize.width<=680?this.$style.playedMinutesType1680:this.$style.playedMinutesType1},block02Type1Class(){const e=this.elementSize.width;return e<=320?this.$style.block02Type1320Games:e<=350?this.$style.block02Type1350Games:e<=680?this.$style.block02Type1680Games:this.$style.block02Type1Games},leagueNameWrapperType1Class(){const e=this.elementSize.width;return e<=680?this.$style.leagueNameWrapperType1680:e<=960?this.$style.leagueNameWrapperType1960:this.$style.leagueNameWrapperType1},leagueNameType1Class(){return this.elementSize.width<=960?this.$style.leagueNameType1960:this.$style.leagueNameType1},numberOfVideosType1Class(){const e=this.elementSize.width;return e<=680?this.$style.numberOfVideosType1680:e<=1232?this.$style.numberOfVideosType11232:this.$style.numberOfVideosType1},containerLeftType1Class(){const e=this.elementSize.width;return e<=320?this.$style.containerLeftType1320:e<=350?this.$style.containerLeftType1350:e<=680?this.$style.containerLeftType1680:this.$style.containerLeftType1},positionContainertype1Class(){const e=this.elementSize.width;return e<=380?this.$style.positionContainertype1380:e<=420?this.$style.positionContainertype1420:e<=680?this.$style.positionContainertype1680:this.$style.positionContainertype1},rowTeamClass(){const e=this.elementSize.width;return e<=320?this.$style.rowTeam320:e<=350?this.$style.rowTeam350:e<=420?this.$style.rowTeam420:e<=460?this.$style.rowTeam460:this.$style.rowTeam},containerBtnVideosClass(){return this.$style.containerBtnVideosGames},numberOfVideosClass(){return this.elementSize.width<=620?this.$style.numberOfVideos620:this.$style.numberOfVideos},block02Class(){const e=this.elementSize.width;return e<=420?this.$style.block02420Games:e<=620?this.$style.block02620Games:e<=960?this.$style.block02960Games:this.$style.block02Games},imgPlayerIconClass(){const e=this.elementSize.width;return e<=420?this.$style.imgPlayerIcon420:e<=460?this.$style.imgPlayerIcon460:this.$style.imgPlayerIcon},manchesterUnitedClass(){const e=this.elementSize.width;return e<=360?this.$style.manchesterUnited360Games:e<=420?this.$style.manchesterUnited420Games:e<=460?this.$style.manchesterUnited460Games:this.$style.manchesterUnitedGames},containerRightClass(){const e=this.elementSize.width;return e<=420?this.$style.containerRight420Games:e<=960?this.$style.containerRight960Games:this.$style.containerRightGames},playerContainerType1Class(){const e=this.elementSize.width;return e<=320?this.$style.playerContainerType1320Games:e<=460?this.$style.playerContainerType1460Games:this.$style.playerContainerType1Games},playerContainerClass(){const e=this.elementSize.width;return e<=420?this.$style.playerContainer420Games:e<=460?this.$style.playerContainer460Games:this.$style.playerContainerGames},iconFavoritesClass(){return this.elementSize.width<=420?this.$style.iconFavorites420:this.$style.iconFavorites},iconFavoritesType1Class(){return this.elementSize.width<=320?this.$style.iconFavoritesType1320:this.$style.iconFavoritesType1},containerLeftClass(){const e=this.elementSize.width;return e<=420?this.$style.containerLeft420Games:e<=620?this.$style.containerLeft620Games:this.$style.containerLeftGames},positionContainerClass(){return this.elementSize.width<=620?this.$style.positionContainer620:this.$style.positionContainer},rowwPlayerClass(){const e=this.elementSize.width;return e<=420?this.$style.rowwPlayer420Games:e<=460?this.$style.rowwPlayer460Games:e<=960?this.$style.rowwPlayer960Games:this.$style.rowwPlayerGames}},setup(){const e=t.ref("myDivRef2"),{elementSize:o}=jb(e);return{myDivRef2:e,elementSize:o}},props:{typeData:{type:Number,default:1},canPlayVideos:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},type:{type:Number,default:0},typeView:{type:Number,default:0},isExpanded:{type:Boolean,default:!1},background:{type:String,default:"#172531"},height:{type:String,default:"35px"},fontColor:{type:String,default:"#F4F4F4"},fontSize:{type:String,default:"12px"},fontFamily:{type:String,default:"Poppins-Regular"},data:{type:Object,default:()=>{}},game:{type:Object,default:()=>{}},colorArrow:{type:String,default:"#D9D9D9"},buttonTextValue:{type:String,default:"Ver videos"},iconVideos:{type:String,default:"https://golstatsimages.blob.core.windows.net/images-library/arrow-btn.png"},iconSize:{type:String,default:"13px"},iconSizeMini:{type:String,default:"13px"},iconPosition:{type:String,default:"left"},buttonWidth:{type:String,default:"93px"},buttonWidthMini:{type:String,default:"24px"},buttonHeightMini:{type:String,default:"24px"},buttonHeight:{type:String,default:"30px"},buttonRadius:{type:String,default:"30px"},buttonBorderWidth:{type:Number,default:1},buttonBackground:{type:String,default:"#ffffff1a"},buttonfontFamily:{type:String,default:"Poppins-Regular"},buttonBorderColor:{type:String,default:"#55636e"},buttonFontSize:{type:String,default:"10px"}},data:()=>({expand:!1}),methods:{clickExpand(e){this.$emit("expand",{expand:!this.isExpanded,id:e})},emitEventMedia(e){this.$emit("mediadata",e)}}},rV=()=>{t.useCssVars(e=>({d0a618bc:e.height,ba5dfbae:e.background,aa9f5eaa:e.fontSize,ab0a580e:e.fontColor,ad8d6ce4:e.fontFamily}))},nV=RS.setup;RS.setup=nV?(e,o)=>(rV(),nV(e,o)):rV;const Xct={ref:"myDivRef2",style:{"border-left":"rgba(13,29,41,0.7) 1px solid","border-right":"rgba(13,29,41,0.7) 1px solid"}},$ct=["src"],Kct=["src"],Qct=["src"],eut=["src"],tut=["fill"],aut=["fill"],rut=["src"],nut=["src"],iut=["fill"],out=["fill"],sut=["src"],lut=["src"],cut=["src"],uut=["src"],dut=["fill"],hut=["fill"];function put(e,o,s,B,U,m){const y=t.resolveComponent("GSCButton");return t.openBlock(),t.createElementBlock("div",Xct,[s.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(m.rowwPlayerClass),id:"container-row-player"},[t.createElementVNode("div",{class:t.normalizeClass(m.containerLeftClass),id:"container-left"},[t.createElementVNode("div",{class:t.normalizeClass(m.positionContainerClass)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.numberPosition)},t.toDisplayString(s.data.position),3)],2),t.createElementVNode("div",{class:t.normalizeClass(m.playerContainerClass)},[t.createElementVNode("img",{class:t.normalizeClass(m.imgPlayerIconClass),src:s.data.player_photo},null,10,$ct),t.createElementVNode("div",{class:t.normalizeClass(m.manchesterUnitedClass)},[B.elementSize.width<=420?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(s.data.player_short),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(s.data.player_name),1)],64))],2),B.elementSize.width<=420?(t.openBlock(),t.createElementBlock("img",{key:0,class:t.normalizeClass(e.$style.chivasIcon),alt:"",src:s.data.team_logo},null,10,Kct)):t.createCommentVNode("",!0)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(m.containerRightClass),id:"container-right"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.block01)},[B.elementSize.width>420?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.nameTeamGames)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.imgTeamIcon),alt:"",src:s.data.team_logo},null,10,Qct),B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.teamName)},t.toDisplayString(s.data.team_abrev),3)):t.createCommentVNode("",!0)],2)):t.createCommentVNode("",!0),B.elementSize.width>730?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.position)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.dfC)},t.toDisplayString(s.data.player_position),3)],2)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(e.$style.age)},t.toDisplayString(s.data.player_age),3)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(e.$style.country)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.manchesterUnitedIcon),alt:"",src:s.data.player_country_flag},null,10,eut)],2)):t.createCommentVNode("",!0),B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:4,class:t.normalizeClass(e.$style.playedGames)},t.toDisplayString(s.data.player_games),3)):t.createCommentVNode("",!0),B.elementSize.width>635?(t.openBlock(),t.createElementBlock("div",{key:5,class:t.normalizeClass(e.$style.playedMinutes)},t.toDisplayString(s.data.player_min),3)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(m.block02Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containesOptions)},[B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.leagueName)},t.toDisplayString(s.data.total),3)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(m.containerBtnVideosClass)},[s.canPlayVideos||s.game.awayTeam.team_id==s.teamWidget&&s.typeData!=1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[B.elementSize.width>635?(t.openBlock(),t.createBlock(y,{key:0,icon:s.iconVideos,"icon-size":s.iconSize,"icon-position":s.iconPosition,width:s.buttonWidth,height:s.buttonHeight,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"text-value":s.buttonTextValue,"font-size":s.buttonFontSize,onClick:o[0]||(o[0]=a=>m.emitEventMedia(s.data))},null,8,["icon","icon-size","icon-position","width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size"])):(t.openBlock(),t.createBlock(y,{key:1,mini:!0,icon:s.iconVideos,"icon-size":s.iconSizeMini,"icon-position":s.iconPosition,width:s.buttonWidthMini,height:s.buttonHeightMini,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"font-size":s.buttonFontSize,onClick:o[1]||(o[1]=a=>m.emitEventMedia(s.data))},null,8,["icon","icon-size","icon-position","width","height","border-radius","border-width","background-color","font-family","border-color","font-size"]))],64)):t.createCommentVNode("",!0),B.elementSize.width<=635?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(m.numberOfVideosClass)},t.toDisplayString(s.data.total),3)):t.createCommentVNode("",!0)],2)],2),(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass([e.$style.arrowExpandIcon,s.isExpanded?e.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:s.colorArrow,xmlns:"http://www.w3.org/2000/svg",onClick:o[2]||(o[2]=a=>m.clickExpand(s.data.id))},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 4.93631L10.2929 1.23496C10.6834 0.898244 11.3166 0.898244 11.7071 1.23496C12.0976 1.57167 12.0976 2.11759 11.7071 2.4543L6.70711 6.76532C6.31658 7.10203 5.68342 7.10203 5.29289 6.76532L0.292893 2.4543C-0.0976311 2.11759 -0.0976311 1.57167 0.292893 1.23496C0.683418 0.898244 1.31658 0.898244 1.70711 1.23496L6 4.93631Z",fill:s.colorArrow},null,8,aut)],10,tut))],2)],2)],2)):t.createCommentVNode("",!0),s.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(m.rowTeamClass),style:t.normalizeStyle(B.elementSize.width>540?"border-bottom: 1px solid rgba(255, 255, 255, 0.1)":""),id:"container-row-player"},[t.createElementVNode("div",{class:t.normalizeClass(m.containerLeftType1Class),id:"container-left"},[t.createElementVNode("div",{class:t.normalizeClass(m.positionContainertype1Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.numberPositionType1)},t.toDisplayString(s.data.position),3),t.createElementVNode("div",{class:t.normalizeClass(m.iconFavoritesType1Class)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.shapeIconType1),alt:"",src:s.data.team_logo},null,10,rut)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(m.playerContainerType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(s.typeView==0?e.$style.tijuanaWrapperType1:e.$style.tijuanaWrapperType1NoBg)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.tijuanaIconType1),alt:"",src:s.data.team_logo},null,10,nut)],2),t.createElementVNode("div",{class:t.normalizeClass(m.manchesterUnitedType1Class)},t.toDisplayString(s.data.team_abrev),3)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(m.containerRightType1Class),id:"container-right"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.block01TitlesType1)},[B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(m.teamNameWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.teamNameType1)},[t.createTextVNode(" C/"+t.toDisplayString(s.data.frequency)+" ",1),s.data.category!=2?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("min")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("segs")],64))],2)],2)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(m.ageWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(m.ageType1Class)},t.toDisplayString(s.data.promthistournament),3)],2)):t.createCommentVNode("",!0),B.elementSize.width>1086?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(m.playedGamesWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(m.playedGamesType1Class)},t.toDisplayString(s.data.promlasttournament),3)],2)):t.createCommentVNode("",!0),B.elementSize.width>770?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(m.playedMinutesWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(m.playedMinutesType1Class)},t.toDisplayString(s.data.team_games),3)],2)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(m.block02Type1Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containesOptionsType1Games)},[t.createElementVNode("div",{class:t.normalizeClass(m.leagueNameWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(m.leagueNameType1Class)},t.toDisplayString(s.data.total),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerBtnVideosType1Games)},[B.elementSize.width>679&&s.canPlayVideos?(t.openBlock(),t.createBlock(y,{key:0,icon:s.iconVideos,"icon-size":s.iconSize,"icon-position":s.iconPosition,width:s.buttonWidth,height:s.buttonHeight,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"text-value":s.buttonTextValue,"font-size":s.buttonFontSize,onClick:o[3]||(o[3]=a=>m.emitEventMedia(s.data))},null,8,["icon","icon-size","icon-position","width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size"])):(t.openBlock(),t.createBlock(y,{key:1,mini:!0,icon:s.iconVideos,"icon-size":s.iconSizeMini,"icon-position":s.iconPosition,width:s.buttonWidthMini,height:s.buttonHeightMini,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"font-size":s.buttonFontSize,onClick:o[4]||(o[4]=a=>m.emitEventMedia(s.data))},null,8,["icon","icon-size","icon-position","width","height","border-radius","border-width","background-color","font-family","border-color","font-size"])),t.createElementVNode("div",{class:t.normalizeClass(m.numberOfVideosType1Class)},t.toDisplayString(s.data.total),3)],2)],2),(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass([e.$style.arrowExpandIcon,s.isExpanded?e.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:s.colorArrow,xmlns:"http://www.w3.org/2000/svg",onClick:o[5]||(o[5]=a=>m.clickExpand(s.data.id))},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 4.93631L10.2929 1.23496C10.6834 0.898244 11.3166 0.898244 11.7071 1.23496C12.0976 1.57167 12.0976 2.11759 11.7071 2.4543L6.70711 6.76532C6.31658 7.10203 5.68342 7.10203 5.29289 6.76532L0.292893 2.4543C-0.0976311 2.11759 -0.0976311 1.57167 0.292893 1.23496C0.683418 0.898244 1.31658 0.898244 1.70711 1.23496L6 4.93631Z",fill:s.colorArrow},null,8,out)],10,iut))],2)],2)],6)):t.createCommentVNode("",!0),s.type==2?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(m.rowwPlayerClass),id:"container-row-player"},[t.createElementVNode("div",{class:t.normalizeClass(m.containerLeftClass),id:"container-left"},[t.createElementVNode("div",{class:t.normalizeClass(m.positionContainerClass)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.numberPosition)},t.toDisplayString(s.data.position),3)],2),t.createElementVNode("div",{class:t.normalizeClass(m.playerContainerClass)},[t.createElementVNode("img",{class:t.normalizeClass(m.imgPlayerIconClass),src:s.data.player_photo},null,10,sut),t.createElementVNode("div",{class:t.normalizeClass(m.manchesterUnitedClass)},t.toDisplayString(s.data.player_name),3),B.elementSize.width<=420?(t.openBlock(),t.createElementBlock("img",{key:0,class:t.normalizeClass(e.$style.chivasIcon),alt:"",src:s.data.team_logo},null,10,lut)):t.createCommentVNode("",!0)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(m.containerRightClass),id:"container-right"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.block01)},[B.elementSize.width>420?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.nameTeamGames)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.imgTeamIcon),alt:"",src:s.data.team_logo},null,10,cut),B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.teamName)},t.toDisplayString(s.data.team_abrev),3)):t.createCommentVNode("",!0)],2)):t.createCommentVNode("",!0),B.elementSize.width>730?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.position)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.dfC)},t.toDisplayString(s.data.player_position),3)],2)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(e.$style.age)},t.toDisplayString(s.data.player_age),3)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(e.$style.country)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.manchesterUnitedIcon),alt:"",src:s.data.player_country_flag},null,10,uut)],2)):t.createCommentVNode("",!0),B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:4,class:t.normalizeClass(e.$style.playedGames)},t.toDisplayString(s.data.player_games),3)):t.createCommentVNode("",!0),B.elementSize.width>635?(t.openBlock(),t.createElementBlock("div",{key:5,class:t.normalizeClass(e.$style.playedMinutes)},t.toDisplayString(s.data.player_min),3)):t.createCommentVNode("",!0),B.elementSize.width>635?(t.openBlock(),t.createElementBlock("div",{key:6,class:t.normalizeClass(e.$style.playedMinutes)},t.toDisplayString(s.data.league_name),3)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(m.block02Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containesOptions)},[t.createElementVNode("div",{class:t.normalizeClass(m.containerBtnVideosClass)},[s.canPlayVideos?(t.openBlock(),t.createBlock(y,{key:0,icon:s.iconVideos,"icon-size":s.iconSize,"icon-position":s.iconPosition,width:B.elementSize.width<=680?"83px":s.buttonWidth,height:s.buttonHeight,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"text-value":s.buttonTextValue,"font-size":s.buttonFontSize,onClick:o[6]||(o[6]=a=>m.emitEventMedia(s.data)),style:t.normalizeStyle(B.elementSize.width<=680?B.elementSize.width<=420?"margin-right: 35px;":"margin-right: 0px;":"")},null,8,["icon","icon-size","icon-position","width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size","style"])):t.createCommentVNode("",!0)],2)],2),(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass([e.$style.arrowExpandIcon,s.isExpanded?e.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:s.colorArrow,xmlns:"http://www.w3.org/2000/svg",onClick:o[7]||(o[7]=a=>m.clickExpand(s.data.id))},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 4.93631L10.2929 1.23496C10.6834 0.898244 11.3166 0.898244 11.7071 1.23496C12.0976 1.57167 12.0976 2.11759 11.7071 2.4543L6.70711 6.76532C6.31658 7.10203 5.68342 7.10203 5.29289 6.76532L0.292893 2.4543C-0.0976311 2.11759 -0.0976311 1.57167 0.292893 1.23496C0.683418 0.898244 1.31658 0.898244 1.70711 1.23496L6 4.93631Z",fill:s.colorArrow},null,8,hut)],10,dut))],2)],2)],2)):t.createCommentVNode("",!0)],512)}const iV=Ki(RS,[["render",put],["__cssModules",{$style:Yct}]]),fut=(e,o)=>{const s=e.__vccOpts||e;for(const[B,U]of o)s[B]=U;return s},VS={props:{type:{type:Number,default:0},value:{type:Boolean,default:!1},textValue:String,icon:String,iconPosition:{type:String,default:"left"},iconSize:String,fontColor:{type:String,default:"#FFFFFF"},textDecoration:String,fontSize:{type:String,default:"16px"},fontSizeStat:{type:String,default:"16px"},fontStyle:String,fontFamily:{type:String,default:"Poppins-Regular"},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},borderRadius:{type:String,default:"0px"},borderType:{type:String,default:"solid"},borderWidth:{type:Number,default:0},borderWidthBtn:{type:String,default:"2px"},borderColor:String,backgroundColor:{type:String,default:"none"},activeBackgroundColor:{type:String,default:"#000000"},activeBorderWidth:{type:Number,default:2},activeBorderType:{type:String,default:"solid"},activeBorderColor:{type:String,default:"#cbee6b"},activeColorText:{type:String,default:"#FFFFFF"},cursorType:{type:String,default:"default"},typeOnOff:{type:Boolean,default:!1},textCategory:String,textStat:String,marginLeftStat:{type:String,default:"15%"}},watch:{value:{deep:!0,immediate:!0,handler(e){this.status=e}}},data(){return{status:!1}},computed:{customStyle(){return{height:this.height,width:this.width,backgroundColor:this.backgroundColor,borderRadius:this.borderRadius,border:`${this.borderType} ${this.borderWidth}px ${this.borderColor}`,color:this.fontColor,textDecoration:this.textDecoration,cursor:this.cursorType,fontSize:this.fontSize,fontStyle:this.fontStyle,fontFamily:`${this.fontFamily} !important`}},customActive(){return{backgroundColor:this.activeBackgroundColor,color:this.activeColorText,border:`${this.activeBorderType} ${this.activeBorderWidth}px ${this.activeBorderColor}`}}},methods:{btnClick(e){this.$emit("click",e),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},oV=()=>{t.useCssVars(e=>({"9d01acb4":e.height,"14e95081":e.borderWidthBtn,"38fec285":e.borderType,34353510:e.borderColor,"20d20dc6":e.borderRadius,17130967:e.width,"4ccb7d36":e.backgroundColor,"5d1e86a2":e.cursorType,ce65d4a2:e.fontSize,fe4ac47a:e.fontStyle,f98e44dc:e.fontFamily,"93b87770":e.marginLeftStat,c7f7beba:e.fontSizeStat}))},sV=VS.setup;VS.setup=sV?(e,o)=>(oV(),sV(e,o)):oV;const mut=e=>(t.pushScopeId("data-v-f3ee6b2b"),e=e(),t.popScopeId(),e),gut=["src"],yut={key:1,class:"text"},vut=["src"],but={class:"stats"},_ut=mut(()=>t.createElementVNode("img",{class:"iconstats",src:"https://golstatsimages.blob.core.windows.net/todoelfut/playdes.png"},null,-1)),xut={class:"numstats"},wut={class:"leyend"};function kut(e,o,s,B,U,m){return t.openBlock(),t.createElementBlock("div",null,[s.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["button",U.status&&s.typeOnOff&&"button-active"]),style:t.normalizeStyle([m.customStyle,U.status&&s.typeOnOff&&m.customActive]),onClick:o[0]||(o[0]=(...y)=>m.btnClick&&m.btnClick(...y))},[s.icon&&s.iconPosition.toLowerCase()==="left"?(t.openBlock(),t.createElementBlock("img",{key:0,class:"icon",style:t.normalizeStyle({width:s.iconSize}),src:s.icon},null,12,gut)):t.createCommentVNode("",!0),s.textValue?(t.openBlock(),t.createElementBlock("div",yut,t.toDisplayString(s.textValue),1)):t.createCommentVNode("",!0),s.icon&&s.iconPosition.toLowerCase()==="right"?(t.openBlock(),t.createElementBlock("img",{key:2,class:"icon",style:t.normalizeStyle({width:s.iconSize}),src:s.icon},null,12,vut)):t.createCommentVNode("",!0)],6)):t.createCommentVNode("",!0),s.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:"button-target",onClick:o[1]||(o[1]=(...y)=>m.btnClick&&m.btnClick(...y))},[t.createElementVNode("div",but,[_ut,t.createElementVNode("div",xut,t.toDisplayString(s.textStat),1)]),t.createElementVNode("div",wut,t.toDisplayString(s.textCategory),1)])):t.createCommentVNode("",!0)])}const Sut=fut(VS,[["render",kut],["__scopeId","data-v-f3ee6b2b"]]),Cut=(e,o)=>{const s=e.__vccOpts||e;for(const[B,U]of o)s[B]=U;return s},jS={components:{GSCButton:Sut},props:{hiddenButtonAll:{type:Boolean,default:!1},teamId:{type:Number,default:0},height:{type:String,default:"71px"},backgroundColor:{type:String,default:"#0d1d29"},containBorderType:{type:String,default:"solid"},containBorderWidth:{type:Number,default:0},containBorderColor:{type:String,default:""},componentontainBorderRadius:{type:String,default:"0px"},teamBorderType:{type:String,default:"solid"},teamBorderWidth:{type:Number,default:1},teamBorderColor:{type:String,default:"#566068"},teamBorderRadius:{type:String,default:"43px"},teamHeight:{type:String,default:"43px"},teamWidth:{type:String,default:"43px"},data:{type:Array,default:()=>[]}},data(){return{teamselect:this.teamId,scrollBar:!1}},watch:{teamId:{handler:function(e){this.teamselect=e},immediate:!0}},computed:{centerTextCustom(){return this.hiddenButtonAll&&!this.scrollBar?"center":"left"},marginCustom(){return this.hiddenButtonAll?"0px":"12px"},customStyleContain(){return{height:this.height,backgroundColor:this.backgroundColor,borderRadius:this.containBorderRadius,border:`${this.containBorderType} ${this.containBorderWidth}px ${this.containBorderColor}`}},customStyleTeam(){return{height:this.teamHeight,width:this.teamWidth,backgroundColor:this.backgroundColor,borderRadius:this.borderRadius,border:`${this.teamBorderType} ${this.teamBorderWidth}px ${this.teamBorderColor}`}}},methods:{checkIfElementHasScroll(){const e=this.$refs.container.querySelector("#panelteams");e.scrollWidth>e.clientWidth?this.scrollBar=!0:this.scrollBar=!1},btnTeamClick(e){this.$emit("clickTeam",e),this.teamselect=e},click(){this.$emit("clickAll",0),this.teamselect=0}},mounted(){this.checkIfElementHasScroll(),window.addEventListener("resize",this.checkIfElementHasScroll)},beforeUnmount(){window.removeEventListener("resize",this.checkIfElementHasScroll)}},lV=()=>{t.useCssVars(e=>({dd2e645c:e.centerTextCustom,"57c1e244":e.marginCustom}))},cV=jS.setup;jS.setup=cV?(e,o)=>(lV(),cV(e,o)):lV;const Tut={id:"panelteams",class:"gsc-filterperteam__panel-teams",ref:"panel"},Aut={class:"gsc-filterperteam__panel-teams__cont-teams"},Eut=["onClick"],Mut=["src","alt","title"];function Iut(e,o,s,B,U,m){const y=t.resolveComponent("GSCButton");return t.openBlock(),t.createElementBlock("div",{class:"gsc-filterperteam",ref:"container",style:t.normalizeStyle(m.customStyleContain)},[t.createElementVNode("div",Tut,[t.createElementVNode("div",Aut,[s.hiddenButtonAll?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,style:t.normalizeStyle(m.customStyleTeam),class:t.normalizeClass(["gsc-filterperteam__panel-teams__cont-teams__button-all",this.teamselect!==0?"--disabled":""])},[t.createVNode(y,{"text-value":"Todos",width:"76px",height:"28px","font-family":"Poppins-Light","font-size":"13px","border-color":"#cbee6b","border-type":"solid","border-width":"1","background-color":"#2A3641","border-radius":"64px",onClick:m.click},null,8,["onClick"])],6)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.data,(a,v)=>(t.openBlock(),t.createElementBlock("div",{key:v,style:t.normalizeStyle(m.customStyleTeam),class:t.normalizeClass([a.id==U.teamselect?"colorselect":"","gsc-filterperteam__panel-teams__cont-teams__btn-team hover-team"]),onClick:p=>m.btnTeamClick(a.id)},[t.createElementVNode("img",{src:a.logo,alt:a.name,title:a.name},null,8,Mut)],14,Eut))),128))])],512)],4)}const Put=Cut(jS,[["render",Iut],["__scopeId","data-v-b39cba3b"]]),Lut={tablePositionGames:"_tablePositionGames_16xzc_46",tablePositionWrapperGames:"_tablePositionWrapperGames_16xzc_62",imgHenrryIcon:"_imgHenrryIcon_16xzc_71",americaIcon:"_americaIcon_16xzc_79",playerPhotoGames:"_playerPhotoGames_16xzc_91",toniKroosGames:"_toniKroosGames_16xzc_100",shapeIcon:"_shapeIcon_16xzc_111",menuiconsTeams:"_menuiconsTeams_16xzc_117",component31:"_component31_16xzc_126",playerNameGames:"_playerNameGames_16xzc_137",icnPlayIcon:"_icnPlayIcon_16xzc_145",goles:"_goles_16xzc_153",americaIcon1:"_americaIcon1_16xzc_160",teamsAmerica:"_teamsAmerica_16xzc_174",containerData:"_containerData_16xzc_180",shapeIcon1:"_shapeIcon1_16xzc_188",icnExpand1:"_icnExpand1_16xzc_194",icnExpand:"_icnExpand_16xzc_194",playerDataGames:"_playerDataGames_16xzc_214",playerInfoGames:"_playerInfoGames_16xzc_225",headerTopGame:"_headerTopGame_16xzc_240",playerRow:"_playerRow_16xzc_254",groupsLeague:"_groupsLeague_16xzc_265",text:"_text_16xzc_274",btnViewFullList:"_btnViewFullList_16xzc_282",headerTopsGames:"_headerTopsGames_16xzc_299",btnVideosOptions:"_btnVideosOptions_16xzc_371",position:"_position_16xzc_548",positionWrapper:"_positionWrapper_16xzc_560",imgNecaxaIcon:"_imgNecaxaIcon_16xzc_568",teamLogo:"_teamLogo_16xzc_574",teamPhoto:"_teamPhoto_16xzc_582",name:"_name_16xzc_590",icnPlayIconType1:"_icnPlayIconType1_16xzc_598",verVideosType1:"_verVideosType1_16xzc_605",btnVideosOptionsType1:"_btnVideosOptionsType1_16xzc_611",btnVideosOptions1Games:"_btnVideosOptions1Games_16xzc_623",leftContainer:"_leftContainer_16xzc_635",shapeIconType1:"_shapeIconType1_16xzc_644",icnExpandType1:"_icnExpandType1_16xzc_649",arrowExpand:"_arrowExpand_16xzc_659",containerInfoGames:"_containerInfoGames_16xzc_667",headerTopTeam:"_headerTopTeam_16xzc_679",containerHeader:"_containerHeader_16xzc_693",goles1:"_goles1_16xzc_702",golesType1:"_golesType1_16xzc_705",golesWrapper:"_golesWrapper_16xzc_710",btnViewAll:"_btnViewAll_16xzc_719",headerTopsTeams:"_headerTopsTeams_16xzc_736",arrowExpandIcon:"_arrowExpandIcon_16xzc_853",rotate:"_rotate_16xzc_858"},US={components:{GSCButton:aV},props:{typeData:{type:Number,default:1},teamWidget:{type:Number,default:0},game:{type:Object,default:()=>{}},type:{type:Number,default:0},isExpanded:{type:Boolean,default:!1},canPlayVideos:{type:Boolean,default:!1},categoryName:{type:String,default:""},categoryId:{type:String,default:""},data:{type:Object,default:()=>{}},backgroundColor:{type:String,default:"#0d1d29"},backgroundColorHeader:{type:String,default:"#183143"},fontColorName:{type:String,default:"#F4F4F4"},fontSizeName:{type:String,default:"14px"},fontFamilyName:{type:String,default:"Poppins-Regular"},fontColorTopNum:{type:String,default:"#FFFFFF"},fontSizeTopNum:{type:String,default:"96px"},fontFamilyTopNum:{type:String,default:"Oswald-Bold"},fontColorCategory:{type:String,default:"#FFFFFF"},fontSizeCategory:{type:String,default:"12px"},fontFamilyCategory:{type:String,default:"Poppins-Regular"},opacityColorTopNum:{type:Number,default:.09},borderColorCategory:{type:String,default:"#cbee6b"},iconVideos:{type:String,default:"https://golstatsimages.blob.core.windows.net/images-library/arrow-btn.png"},iconSize:{type:String,default:"18px"},iconPosition:{type:String,default:"left"},colorArrow:{type:String,default:"#D9D9D9"},buttonWidth:{type:String,default:"fit-content"},buttonMaxWidth:{type:String,default:"180px"},buttonHeight:{type:String,default:"24px"},buttonRadius:{type:String,default:"30px"},buttonBorderWidth:{type:Number,default:1},buttonBackground:{type:String,default:"#ffffff1a"},buttonfontFamily:{type:String,default:"Poppins-Regular"},buttonBorderColor:{type:String,default:"#cbee6b"},buttonFontSize:{type:String,default:"12px"}},data:()=>({expand:!1}),methods:{viewProfile(e){this.$emit("play",e)},clickMore(e){this.$emit("more",e)},clickExpand(e){this.$emit("expand",{expand:!this.isExpanded,id:e})},clickFav(e){this.$emit("fav",e)},clickEventMedia(e){this.$emit("mediadata",e)}}},uV=()=>{t.useCssVars(e=>({"55f05f36":e.fontSizeTopNum,"19a29b59":e.fontFamilyTopNum,"6900d460":e.fontColorTopNum,c8fa9844:e.opacityColorTopNum,d4b5f3ac:e.fontColorName,"02add9f3":e.fontFamilyName,"5f361de0":e.fontSizeName,"53c60bed":e.backgroundColorHeader,"78ef2866":e.fontFamilyCategory,"4e492dfa":e.fontSizeCategory,"2777611d":e.fontColorCategory,"337e29a0":e.borderColorCategory}))},dV=US.setup;US.setup=dV?(e,o)=>(uV(),dV(e,o)):uV;const But=["src"],zut=["src"],Out=["src"],Dut=["src"],Nut=["fill"],Fut=["fill"],Rut=["src"],Vut=["fill"],jut=["fill"];function Uut(e,o,s,B,U,m){const y=t.resolveComponent("GSCButton");return t.openBlock(),t.createElementBlock("div",null,[s.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.headerTopsGames)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.playerRow),id:"player-row"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.headerTopGame)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.playerPhotoGames),id:"container-player-photp"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.tablePositionWrapperGames)},[t.createElementVNode("b",{class:t.normalizeClass(e.$style.tablePositionGames)},t.toDisplayString(s.data.top),3)],2),t.createElementVNode("img",{class:t.normalizeClass(e.$style.imgHenrryIcon),alt:"",src:s.data.photo},null,10,But),t.createElementVNode("img",{class:t.normalizeClass(e.$style.americaIcon),alt:"",src:s.data.logo},null,10,zut)],2),t.createElementVNode("main",{class:t.normalizeClass(e.$style.playerInfoGames),id:"container-player-info"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.playerNameGames)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.toniKroosGames)},t.toDisplayString(s.data.name),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.playerDataGames)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerData)},[s.canPlayVideos||s.game.awayTeam.team_id==s.teamWidget&&s.typeData!=1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createVNode(y,{"icon-size":s.iconSize,"icon-position":s.iconPosition,width:s.buttonWidth,"button-max-width":s.buttonMaxWidth,height:s.buttonHeight,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"text-value":s.data.total+" "+s.categoryName.toLowerCase(),"font-size":s.buttonFontSize,onClick:o[0]||(o[0]=a=>m.clickEventMedia(s.data))},null,8,["icon-size","icon-position","width","button-max-width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size"]),t.createElementVNode("div",{class:t.normalizeClass(e.$style.teamsAmerica)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.americaIcon1),alt:"",src:s.data.logo},null,10,Out)],2)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createVNode(y,{icon:"","icon-size":s.iconSize,"icon-position":s.iconPosition,width:s.buttonWidth,"button-max-width":s.buttonMaxWidth,height:s.buttonHeight,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"text-value":s.data.total+" "+s.categoryName.toLowerCase(),"font-size":s.buttonFontSize},null,8,["icon-size","icon-position","width","button-max-width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size"]),t.createElementVNode("div",{class:t.normalizeClass(e.$style.teamsAmerica)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.americaIcon1),alt:"",src:s.data.logo},null,10,Dut)],2)],64))],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.icnExpand),onClick:o[1]||(o[1]=a=>m.clickExpand(s.data.player_id))},[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass([e.$style.arrowExpandIcon,s.isExpanded?e.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:s.colorArrow,xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 4.93631L10.2929 1.23496C10.6834 0.898244 11.3166 0.898244 11.7071 1.23496C12.0976 1.57167 12.0976 2.11759 11.7071 2.4543L6.70711 6.76532C6.31658 7.10203 5.68342 7.10203 5.29289 6.76532L0.292893 2.4543C-0.0976311 2.11759 -0.0976311 1.57167 0.292893 1.23496C0.683418 0.898244 1.31658 0.898244 1.70711 1.23496L6 4.93631Z",fill:s.colorArrow},null,8,Fut)],10,Nut))],2)],2)],2)],2)],2)],2)):t.createCommentVNode("",!0),s.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.headerTopsTeams)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerHeader),id:"header-container"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.headerTopTeam)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.teamPhoto),id:"container-team"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.positionWrapper)},[t.createElementVNode("b",{class:t.normalizeClass(e.$style.position)},t.toDisplayString(s.data.top),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.teamLogo)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.imgNecaxaIcon),alt:"",src:s.data.logo},null,10,Rut)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerInfoGames)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.leftContainer)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.name)},t.toDisplayString(s.data.name_team),3),t.createVNode(y,{"icon-size":s.iconSize,"icon-position":s.iconPosition,width:s.buttonWidth,"button-max-width":s.buttonMaxWidth,height:s.buttonHeight,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"text-value":s.data.total+" "+s.categoryName.toLowerCase(),"font-size":s.buttonFontSize,onClick:o[2]||(o[2]=a=>m.clickEventMedia(s.data))},null,8,["icon-size","icon-position","width","button-max-width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size"]),t.createElementVNode("div",{class:t.normalizeClass(e.$style.btnVideosOptions1Games)},[t.createVNode(y,{"icon-size":s.iconSize,"icon-position":s.iconPosition,width:s.buttonWidth,"button-max-width":s.buttonMaxWidth,height:s.buttonHeight,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"text-value":s.data.total+" "+s.categoryName.toLowerCase(),"font-size":s.buttonFontSize,onClick:o[3]||(o[3]=a=>m.clickEventMedia(s.data))},null,8,["icon-size","icon-position","width","button-max-width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size"]),t.createElementVNode("div",{class:t.normalizeClass(e.$style.verVideosType1)},t.toDisplayString(s.data.total),3)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.arrowExpand),onClick:o[4]||(o[4]=a=>m.clickExpand(s.data.player_id))},[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass([e.$style.arrowExpandIcon,s.isExpanded?e.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:s.colorArrow,xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 4.93631L10.2929 1.23496C10.6834 0.898244 11.3166 0.898244 11.7071 1.23496C12.0976 1.57167 12.0976 2.11759 11.7071 2.4543L6.70711 6.76532C6.31658 7.10203 5.68342 7.10203 5.29289 6.76532L0.292893 2.4543C-0.0976311 2.11759 -0.0976311 1.57167 0.292893 1.23496C0.683418 0.898244 1.31658 0.898244 1.70711 1.23496L6 4.93631Z",fill:s.colorArrow},null,8,jut)],10,Vut))],2)],2)],2)],2)],2)):t.createCommentVNode("",!0)])}const Gut=Ki(US,[["render",Uut],["__cssModules",{$style:Lut}]]),Hut=(e,o)=>{const s=e.__vccOpts||e;for(const[B,U]of o)s[B]=U;return s},GS={props:{type:{type:Number,default:0},value:{type:Boolean,default:!1},textValue:String,icon:String,iconPosition:{type:String,default:"left"},iconSize:String,fontColor:{type:String,default:"#FFFFFF"},textDecoration:String,fontSize:{type:String,default:"16px"},fontSizeStat:{type:String,default:"16px"},fontStyle:String,fontFamily:{type:String,default:"Poppins-Regular"},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},borderRadius:{type:String,default:"0px"},borderType:{type:String,default:"solid"},borderWidth:{type:Number,default:0},borderWidthBtn:{type:String,default:"2px"},borderColor:String,backgroundColor:{type:String,default:"none"},activeBackgroundColor:{type:String,default:"#000000"},activeBorderWidth:{type:Number,default:2},activeBorderType:{type:String,default:"solid"},activeBorderColor:{type:String,default:"#cbee6b"},activeColorText:{type:String,default:"#FFFFFF"},cursorType:{type:String,default:"default"},typeOnOff:{type:Boolean,default:!1},textCategory:String,textStat:String,marginLeftStat:{type:String,default:"15%"}},watch:{value:{deep:!0,immediate:!0,handler(e){this.status=e}}},data(){return{status:!1}},computed:{customStyle(){return{height:this.height,width:this.width,backgroundColor:this.backgroundColor,borderRadius:this.borderRadius,border:`${this.borderType} ${this.borderWidth}px ${this.borderColor}`,color:this.fontColor,textDecoration:this.textDecoration,cursor:this.cursorType,fontSize:this.fontSize,fontStyle:this.fontStyle,fontFamily:`${this.fontFamily} !important`}},customActive(){return{backgroundColor:this.activeBackgroundColor,color:this.activeColorText,border:`${this.activeBorderType} ${this.activeBorderWidth}px ${this.activeBorderColor}`}}},methods:{btnClick(e){this.$emit("click",e),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},hV=()=>{t.useCssVars(e=>({"9d01acb4":e.height,"14e95081":e.borderWidthBtn,"38fec285":e.borderType,34353510:e.borderColor,"20d20dc6":e.borderRadius,17130967:e.width,"4ccb7d36":e.backgroundColor,"5d1e86a2":e.cursorType,ce65d4a2:e.fontSize,fe4ac47a:e.fontStyle,f98e44dc:e.fontFamily,"93b87770":e.marginLeftStat,c7f7beba:e.fontSizeStat}))},pV=GS.setup;GS.setup=pV?(e,o)=>(hV(),pV(e,o)):hV;const Zut=e=>(t.pushScopeId("data-v-f3ee6b2b"),e=e(),t.popScopeId(),e),Wut=["src"],qut={key:1,class:"text"},Jut=["src"],Yut={class:"stats"},Xut=Zut(()=>t.createElementVNode("img",{class:"iconstats",src:"https://golstatsimages.blob.core.windows.net/todoelfut/playdes.png"},null,-1)),$ut={class:"numstats"},Kut={class:"leyend"};function Qut(e,o,s,B,U,m){return t.openBlock(),t.createElementBlock("div",null,[s.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["button",U.status&&s.typeOnOff&&"button-active"]),style:t.normalizeStyle([m.customStyle,U.status&&s.typeOnOff&&m.customActive]),onClick:o[0]||(o[0]=(...y)=>m.btnClick&&m.btnClick(...y))},[s.icon&&s.iconPosition.toLowerCase()==="left"?(t.openBlock(),t.createElementBlock("img",{key:0,class:"icon",style:t.normalizeStyle({width:s.iconSize}),src:s.icon},null,12,Wut)):t.createCommentVNode("",!0),s.textValue?(t.openBlock(),t.createElementBlock("div",qut,t.toDisplayString(s.textValue),1)):t.createCommentVNode("",!0),s.icon&&s.iconPosition.toLowerCase()==="right"?(t.openBlock(),t.createElementBlock("img",{key:2,class:"icon",style:t.normalizeStyle({width:s.iconSize}),src:s.icon},null,12,Jut)):t.createCommentVNode("",!0)],6)):t.createCommentVNode("",!0),s.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:"button-target",onClick:o[1]||(o[1]=(...y)=>m.btnClick&&m.btnClick(...y))},[t.createElementVNode("div",Yut,[Xut,t.createElementVNode("div",$ut,t.toDisplayString(s.textStat),1)]),t.createElementVNode("div",Kut,t.toDisplayString(s.textCategory),1)])):t.createCommentVNode("",!0)])}const edt=Hut(GS,[["render",Qut],["__scopeId","data-v-f3ee6b2b"]]),sQt="",lQt="",tdt={equipoGames:"_equipoGames_19uzf_38",atlasSeleccinGames:"_atlasSeleccinGames_19uzf_43",equipoAtlasSeleccinMexiGames:"_equipoAtlasSeleccinMexiGames_19uzf_47",aosGames:"_aosGames_19uzf_51",span12:"_span12_19uzf_55",nacionalidadMex:"_nacionalidadMex_19uzf_58",manchesterUnited:"_manchesterUnited_19uzf_61",manchesterUnited12:"_manchesterUnited12_19uzf_68",containerInfoGames:"_containerInfoGames_19uzf_78",verPerfil12:"_verPerfil12_19uzf_87",btnProfile:"_btnProfile_19uzf_96",containerButton:"_containerButton_19uzf_112",dataContainer:"_dataContainer_19uzf_119",expandedInfoPlayerGames:"_expandedInfoPlayerGames_19uzf_129",containerDataBg:"_containerDataBg_19uzf_219",containerDataSm:"_containerDataSm_19uzf_230",span:"_span_19uzf_55",manchesterUnited14:"_manchesterUnited14_19uzf_241",filter:"_filter_19uzf_246",verPerfil:"_verPerfil_19uzf_87",manchesterUnited8:"_manchesterUnited8_19uzf_267",manchesterUnitedParent1:"_manchesterUnitedParent1_19uzf_273",manchesterUnited1:"_manchesterUnited1_19uzf_68",manchesterUnitedParent:"_manchesterUnitedParent_19uzf_273",frameDiv:"_frameDiv_19uzf_295",infoExpanded:"_infoExpanded_19uzf_303",countryFlag:"_countryFlag_19uzf_456"},HS={components:{GSCButton:edt},props:{isLive:{type:Boolean,default:!1},background:{type:String,default:"#172531"},type:{type:Number,default:1},viewButton:{type:Boolean,default:!0},viewTeam:{type:Boolean,default:!0},viewAge:{type:Boolean,default:!0},viewNationality:{type:Boolean,default:!0},viewPosition:{type:Boolean,default:!0},viewGames:{type:Boolean,default:!0},viewMin:{type:Boolean,default:!0},viewGoals:{type:Boolean,default:!0},viewEffectiveness:{type:Boolean,default:!0},height:{type:String,default:"134px"},fontColor:{type:String,default:"#ffffffb3"},fontColorValue:{type:String,default:"#ffffff"},fontFamily:{type:String,default:"Poppins-Regular"},fontSize:{type:String,default:"10px"},additionalClass:{type:String,default:""},data:{type:Object,default:()=>{}}},setup(){const e=t.ref("myDivRef"),{elementSize:o}=jb(e);return{myDivRef:e,elementSize:o}},data(){return{}},computed:{},methods:{viewProfile(e){this.$emit("viewprofile",e)}}},fV=()=>{t.useCssVars(e=>({b76aa8fe:e.fontFamily,dce830b4:e.fontColor,"060add2a":e.fontColorValue,"3e87935e":e.fontSize,c43b37c8:e.background}))},mV=HS.setup;HS.setup=mV?(e,o)=>(fV(),mV(e,o)):fV;const adt={ref:"myDivRef"},rdt=["src"];function ndt(e,o,s,B,U,m){const y=t.resolveComponent("GSCButton");return t.openBlock(),t.createElementBlock("div",adt,[s.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.expandedInfoPlayerGames)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.dataContainer),id:"data-container"},[t.createElementVNode("div",{class:t.normalizeClass([e.$style.containerInfoGames,s.additionalClass]),id:"container-info"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited)},[s.viewTeam?(t.openBlock(),t.createElementBlock("p",{key:0,class:t.normalizeClass(e.$style.equipoAtlasSeleccinMexiGames)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.equipoGames)},"Equipo: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.atlasSeleccinGames)},t.toDisplayString(s.data.teams),3)],2)):t.createCommentVNode("",!0),s.viewAge?(t.openBlock(),t.createElementBlock("p",{key:1,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.equipoGames)},"Edad: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(s.data.age)+" años",3),t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)}," ("+t.toDisplayString(s.data.dataofbirth)+")",3)],2)):t.createCommentVNode("",!0),s.viewNationality?(t.openBlock(),t.createElementBlock("p",{key:2,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)},"Nacionalidad: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},[t.createTextVNode(t.toDisplayString(s.data.nationality.substring(0,3).toUpperCase())+" ",1),t.createElementVNode("div",{class:t.normalizeClass(e.$style.countryFlag)},[t.createElementVNode("img",{src:s.data.countryFlag},null,8,rdt)],2)],2)],2)):t.createCommentVNode("",!0),s.viewPosition?(t.openBlock(),t.createElementBlock("p",{key:3,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)},"Posición: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(s.data.position),3)],2)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited12)},[s.viewGames&&!s.isLive?(t.openBlock(),t.createElementBlock("p",{key:0,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)},"partidos Jugados: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(s.data.games),3)],2)):t.createCommentVNode("",!0),s.viewMin&&!s.isLive?(t.openBlock(),t.createElementBlock("p",{key:1,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)},"Minutos Jugados: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(s.data.min),3)],2)):t.createCommentVNode("",!0),s.viewGoals?(t.openBlock(),t.createElementBlock("p",{key:2,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)},t.toDisplayString(s.data.category)+": ",3),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(s.data.goals),3)],2)):t.createCommentVNode("",!0),s.viewEffectiveness?(t.openBlock(),t.createElementBlock("p",{key:3,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)},"Efectividad de pases: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(s.data.effectiveness.toFixed(0))+"%",3)],2)):t.createCommentVNode("",!0)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerButton),id:"btn-container"},[s.viewButton?(t.openBlock(),t.createBlock(y,{key:0,style:t.normalizeStyle(s.additionalClass!=""&&B.elementSize.width>540?"margin-right: 50px":""),width:"88px",height:"30px","border-radius":"30px","border-width":1,"background-color":"#ffffff1a","font-family":"Poppins-Semibold","border-color":"#cbee6b","text-value":"Ver perfil","font-size":"10px",onClick:o[0]||(o[0]=a=>m.viewProfile(s.data.id))},null,8,["style"])):t.createCommentVNode("",!0)],2)],2)],2)):t.createCommentVNode("",!0),s.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.infoExpanded)},[t.createElementVNode("div",{class:t.normalizeClass([e.$style.containerDataBg,s.additionalClass])},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnitedParent)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[o[2]||(o[2]=t.createElementVNode("span",null,"Posición en la tabla: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.position),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[o[3]||(o[3]=t.createElementVNode("span",null,"Goles anotados: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.goals),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[o[4]||(o[4]=t.createElementVNode("span",null,"Goles recibidos: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.goals_received),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[o[5]||(o[5]=t.createElementVNode("span",null,"Partidos jugados:",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.games_played),3)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnitedParent)},[s.viewEffectiveness?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.manchesterUnited1)},[o[6]||(o[6]=t.createElementVNode("span",null,"Efectividad de pases: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.effectiveness.toFixed(0))+"%",3)],2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[o[7]||(o[7]=t.createElementVNode("span",null,"xG: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.xg),3)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnitedParent)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[t.createElementVNode("span",null,t.toDisplayString(s.data.category)+": ",1),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.total),3)],2),s.viewEffectiveness?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.manchesterUnited8)},[o[8]||(o[8]=t.createElementVNode("span",null,"Efectividad de pases: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.effectiveness)+"%",3)],2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited8)},[o[9]||(o[9]=t.createElementVNode("span",null,"xG: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.xg),3)],2)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerDataSm)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.frameDiv)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[o[10]||(o[10]=t.createElementVNode("span",null,"Posición en la tabla: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.position),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[o[11]||(o[11]=t.createElementVNode("span",null,"Goles anotados: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.goals),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[o[12]||(o[12]=t.createElementVNode("span",null,"Goles recibidos: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.goals_received),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[o[13]||(o[13]=t.createElementVNode("span",null,"Partidos jugados: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.games_played),3)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnitedParent1)},[s.viewEffectiveness?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.manchesterUnited14)},[o[14]||(o[14]=t.createElementVNode("span",null,"Efectividad de pases: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.effectiveness.toFixed(0))+"%",3)],2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[o[15]||(o[15]=t.createElementVNode("span",null,"xG: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.xg),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[t.createElementVNode("span",null,t.toDisplayString(s.data.category)+": ",1),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.total),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited8)},[t.createElementVNode("span",null,t.toDisplayString(s.data.category)+": ",1),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.total),3)],2)],2)],2),s.viewButton?(t.openBlock(),t.createBlock(y,{key:0,style:t.normalizeStyle(s.additionalClass!=""&&B.elementSize.width>540?"margin-right: 42px":""),width:"88px",height:"30px","border-radius":"30px","border-width":1,"background-color":"#ffffff1a","font-family":"Poppins-Semibold","border-color":"#cbee6b","text-value":"Ver perfil","font-size":"10px",onClick:o[1]||(o[1]=a=>m.viewProfile(s.data.id))},null,8,["style"])):t.createCommentVNode("",!0)],2)):t.createCommentVNode("",!0)],512)}const gV=Ki(HS,[["render",ndt],["__cssModules",{$style:tdt}],["__scopeId","data-v-0bb9c2ff"]]);/**
4133
4133
  * Vue 3 Carousel 0.3.1
4134
4134
  * (c) 2023
4135
4135
  * @license MIT
4136
- */const Xd={itemsToShow:1,itemsToScroll:1,modelValue:0,transition:300,autoplay:0,snapAlign:"center",wrapAround:!1,throttle:16,pauseAutoplayOnHover:!1,mouseDrag:!0,touchDrag:!0,dir:"ltr",breakpoints:void 0,i18n:{ariaNextSlide:"Navigate to next slide",ariaPreviousSlide:"Navigate to previous slide",ariaNavigateToSlide:"Navigate to slide {slideNumber}",ariaGallery:"Gallery",itemXofY:"Item {currentSlide} of {slidesCount}",iconArrowUp:"Arrow pointing upwards",iconArrowDown:"Arrow pointing downwards",iconArrowRight:"Arrow pointing to the right",iconArrowLeft:"Arrow pointing to the left"}},yV={itemsToShow:{default:Xd.itemsToShow,type:Number},itemsToScroll:{default:Xd.itemsToScroll,type:Number},wrapAround:{default:Xd.wrapAround,type:Boolean},throttle:{default:Xd.throttle,type:Number},snapAlign:{default:Xd.snapAlign,validator(e){return["start","end","center","center-even","center-odd"].includes(e)}},transition:{default:Xd.transition,type:Number},breakpoints:{default:Xd.breakpoints,type:Object},autoplay:{default:Xd.autoplay,type:Number},pauseAutoplayOnHover:{default:Xd.pauseAutoplayOnHover,type:Boolean},modelValue:{default:void 0,type:Number},mouseDrag:{default:Xd.mouseDrag,type:Boolean},touchDrag:{default:Xd.touchDrag,type:Boolean},dir:{default:Xd.dir,validator(e){return["rtl","ltr"].includes(e)}},i18n:{default:Xd.i18n,type:Object},settings:{default(){return{}},type:Object}};function idt({config:e,slidesCount:o}){const{snapAlign:s,wrapAround:B,itemsToShow:U=1}=e;if(B)return Math.max(o-1,0);let m;switch(s){case"start":m=o-U;break;case"end":m=o-1;break;case"center":case"center-odd":m=o-Math.ceil((U-.5)/2);break;case"center-even":m=o-Math.ceil(U/2);break;default:m=0;break}return Math.max(m,0)}function odt({config:e,slidesCount:o}){const{wrapAround:s,snapAlign:B,itemsToShow:U=1}=e;let m=0;if(s||U>o)return m;switch(B){case"start":m=0;break;case"end":m=U-1;break;case"center":case"center-odd":m=Math.floor((U-1)/2);break;case"center-even":m=Math.floor((U-2)/2);break;default:m=0;break}return m}function ZS({val:e,max:o,min:s}){return o<s?e:Math.min(Math.max(e,s),o)}function sdt({config:e,currentSlide:o,slidesCount:s}){const{snapAlign:B,wrapAround:U,itemsToShow:m=1}=e;let y=o;switch(B){case"center":case"center-odd":y-=(m-1)/2;break;case"center-even":y-=(m-2)/2;break;case"end":y-=m-1;break}return U?y:ZS({val:y,max:s-m,min:0})}function vV(e){return e?e.reduce((o,s)=>{var B;return s.type===t.Fragment?[...o,...vV(s.children)]:((B=s.type)===null||B===void 0?void 0:B.name)==="CarouselSlide"?[...o,s]:o},[]):[]}function WS({val:e,max:o,min:s=0}){return e>o?WS({val:e-(o+1),max:o,min:s}):e<s?WS({val:e+(o+1),max:o,min:s}):e}function ldt(e,o){let s;return o?function(...B){const U=this;s||(e.apply(U,B),s=!0,setTimeout(()=>s=!1,o))}:e}function cdt(e,o){let s;return function(...B){s&&clearTimeout(s),s=setTimeout(()=>{e(...B),s=null},o)}}function udt(e="",o={}){return Object.entries(o).reduce((s,[B,U])=>s.replace(`{${B}}`,String(U)),e)}var ddt=t.defineComponent({name:"ARIA",setup(){const e=t.inject("config",t.reactive(Object.assign({},Xd))),o=t.inject("currentSlide",t.ref(0)),s=t.inject("slidesCount",t.ref(0));return()=>t.h("div",{class:["carousel__liveregion","carousel__sr-only"],"aria-live":"polite","aria-atomic":"true"},udt(e.i18n.itemXofY,{currentSlide:o.value+1,slidesCount:s.value}))}}),hdt=t.defineComponent({name:"Carousel",props:yV,setup(e,{slots:o,emit:s,expose:B}){var U;const m=t.ref(null),y=t.ref([]),a=t.ref(0),v=t.ref(0),p=t.reactive(Object.assign({},Xd));let r=Object.assign({},Xd),_;const b=t.ref((U=e.modelValue)!==null&&U!==void 0?U:0),x=t.ref(0),h=t.ref(0),n=t.ref(0),i=t.ref(0);let c,l;t.provide("config",p),t.provide("slidesCount",v),t.provide("currentSlide",b),t.provide("maxSlide",n),t.provide("minSlide",i),t.provide("slideWidth",a);function d(){_=Object.assign({},e.breakpoints),r=Object.assign(Object.assign(Object.assign({},r),e),{i18n:Object.assign(Object.assign({},r.i18n),e.i18n),breakpoints:void 0}),w(r)}function g(){if(!_||!Object.keys(_).length)return;const re=Object.keys(_).map(ie=>Number(ie)).sort((ie,me)=>+me-+ie);let se=Object.assign({},r);re.some(ie=>{const me=window.matchMedia(`(min-width: ${ie}px)`).matches;return me&&(se=Object.assign(Object.assign({},se),_[ie])),me}),w(se)}function w(re){Object.entries(re).forEach(([se,ie])=>p[se]=ie)}const C=cdt(()=>{g(),E()},16);function E(){if(!m.value)return;const re=m.value.getBoundingClientRect();a.value=re.width/p.itemsToShow}function A(){v.value<=0||(h.value=Math.ceil((v.value-1)/2),n.value=idt({config:p,slidesCount:v.value}),i.value=odt({config:p,slidesCount:v.value}),p.wrapAround||(b.value=ZS({val:b.value,max:n.value,min:i.value})))}t.onMounted(()=>{t.nextTick(()=>E()),setTimeout(()=>E(),1e3),g(),G(),window.addEventListener("resize",C,{passive:!0}),s("init")}),t.onUnmounted(()=>{l&&clearTimeout(l),c&&clearInterval(c),window.removeEventListener("resize",C,{passive:!0})});let P=!1;const L={x:0,y:0},T={x:0,y:0},I=t.reactive({x:0,y:0}),M=t.ref(!1),S=t.ref(!1),z=()=>{M.value=!0},k=()=>{M.value=!1};function O(re){["INPUT","TEXTAREA","SELECT"].includes(re.target.tagName)||(P=re.type==="touchstart",P||re.preventDefault(),!(!P&&re.button!==0||Z.value)&&(L.x=P?re.touches[0].clientX:re.clientX,L.y=P?re.touches[0].clientY:re.clientY,document.addEventListener(P?"touchmove":"mousemove",N,!0),document.addEventListener(P?"touchend":"mouseup",j,!0)))}const N=ldt(re=>{S.value=!0,T.x=P?re.touches[0].clientX:re.clientX,T.y=P?re.touches[0].clientY:re.clientY;const se=T.x-L.x,ie=T.y-L.y;I.y=ie,I.x=se},p.throttle);function j(){const re=p.dir==="rtl"?-1:1,se=Math.sign(I.x)*.4,ie=Math.round(I.x/a.value+se)*re;if(ie&&!P){const me=ye=>{ye.stopPropagation(),window.removeEventListener("click",me,!0)};window.addEventListener("click",me,!0)}$(b.value-ie),I.x=0,I.y=0,S.value=!1,document.removeEventListener(P?"touchmove":"mousemove",N,!0),document.removeEventListener(P?"touchend":"mouseup",j,!0)}function G(){!p.autoplay||p.autoplay<=0||(c=setInterval(()=>{p.pauseAutoplayOnHover&&M.value||ne()},p.autoplay))}function H(){c&&(clearInterval(c),c=null),G()}const Z=t.ref(!1);function $(re){const se=p.wrapAround?re:ZS({val:re,max:n.value,min:i.value});b.value===se||Z.value||(s("slide-start",{slidingToIndex:re,currentSlideIndex:b.value,prevSlideIndex:x.value,slidesCount:v.value}),Z.value=!0,x.value=b.value,b.value=se,l=setTimeout(()=>{if(p.wrapAround){const ie=WS({val:se,max:n.value,min:0});ie!==b.value&&(b.value=ie,s("loop",{currentSlideIndex:b.value,slidingToIndex:re}))}s("update:modelValue",b.value),s("slide-end",{currentSlideIndex:b.value,prevSlideIndex:x.value,slidesCount:v.value}),Z.value=!1,H()},p.transition))}function ne(){$(b.value+p.itemsToScroll)}function q(){$(b.value-p.itemsToScroll)}const K={slideTo:$,next:ne,prev:q};t.provide("nav",K),t.provide("isSliding",Z);const ee=t.computed(()=>sdt({config:p,currentSlide:b.value,slidesCount:v.value}));t.provide("slidesToScroll",ee);const X=t.computed(()=>{const re=p.dir==="rtl"?-1:1,se=ee.value*a.value*re;return{transform:`translateX(${I.x-se}px)`,transition:`${Z.value?p.transition:0}ms`,margin:p.wrapAround?`0 -${v.value*a.value}px`:"",width:"100%"}});function Q(){d(),g(),A(),E(),H()}Object.keys(yV).forEach(re=>{["modelValue"].includes(re)||t.watch(()=>e[re],Q)}),t.watch(()=>e.modelValue,re=>{re!==b.value&&$(Number(re))}),t.watch(v,A),s("before-init"),d();const ce={config:p,slidesCount:v,slideWidth:a,next:ne,prev:q,slideTo:$,currentSlide:b,maxSlide:n,minSlide:i,middleSlide:h};B({updateBreakpointsConfigs:g,updateSlidesData:A,updateSlideWidth:E,initDefaultConfigs:d,restartCarousel:Q,slideTo:$,next:ne,prev:q,nav:K,data:ce});const de=o.default||o.slides,he=o.addons,pe=t.reactive(ce);return()=>{const re=vV(de==null?void 0:de(pe)),se=(he==null?void 0:he(pe))||[];re.forEach((ve,we)=>ve.props.index=we);let ie=re;if(p.wrapAround){const ve=re.map((Se,Ce)=>t.cloneVNode(Se,{index:-re.length+Ce,isClone:!0,key:`clone-before-${Ce}`})),we=re.map((Se,Ce)=>t.cloneVNode(Se,{index:re.length+Ce,isClone:!0,key:`clone-after-${Ce}`}));ie=[...ve,...re,...we]}y.value=re,v.value=Math.max(re.length,1);const me=t.h("ol",{class:"carousel__track",style:X.value,onMousedownCapture:p.mouseDrag?O:null,onTouchstartPassiveCapture:p.touchDrag?O:null},ie),ye=t.h("div",{class:"carousel__viewport"},me);return t.h("section",{ref:m,class:{carousel:!0,"is-sliding":Z.value,"is-dragging":S.value,"is-hover":M.value,"carousel--rtl":p.dir==="rtl"},dir:p.dir,"aria-label":p.i18n.ariaGallery,tabindex:"0",onMouseenter:z,onMouseleave:k},[ye,se,t.h(ddt)])}}}),bV;(function(e){e.arrowUp="arrowUp",e.arrowDown="arrowDown",e.arrowRight="arrowRight",e.arrowLeft="arrowLeft"})(bV||(bV={}));var pdt=t.defineComponent({name:"CarouselSlide",props:{index:{type:Number,default:1},isClone:{type:Boolean,default:!1}},setup(e,{slots:o}){const s=t.inject("config",t.reactive(Object.assign({},Xd))),B=t.inject("currentSlide",t.ref(0)),U=t.inject("slidesToScroll",t.ref(0)),m=t.inject("isSliding",t.ref(!1)),y=()=>e.index===B.value,a=()=>e.index===B.value-1,v=()=>e.index===B.value+1,p=()=>{const r=Math.floor(U.value),_=Math.ceil(U.value+s.itemsToShow-1);return e.index>=r&&e.index<=_};return()=>{var r;return t.h("li",{style:{width:`${100/s.itemsToShow}%`},class:{carousel__slide:!0,"carousel__slide--clone":e.isClone,"carousel__slide--visible":p(),"carousel__slide--active":y(),"carousel__slide--prev":a(),"carousel__slide--next":v(),"carousel__slide--sliding":m.value},"aria-hidden":!p()},(r=o.default)===null||r===void 0?void 0:r.call(o))}}});const fdt=(e,o)=>{const s=e.__vccOpts||e;for(const[B,U]of o)s[B]=U;return s},mdt=e=>(t.pushScopeId("data-v-54620d25"),e=e(),t.popScopeId(),e),gdt={class:"gsc-carousel"},ydt={key:0},vdt=mdt(()=>t.createElementVNode("div",null,"no hay",-1)),bdt=[vdt],_dt={class:"gsc-carousel__2d__slides"},xdt={width:"9",height:"18",viewBox:"0 0 9 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},wdt=["fill"],kdt={width:"9",height:"18",viewBox:"0 0 9 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Sdt=["fill"],Cdt={class:"gsc-carousel__2d__navigation"},Tdt={width:"8",height:"15",viewBox:"0 0 8 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Adt=["stroke"],Edt={key:1,class:"gsc-carousel__2d__navigation__pagination"},Mdt=["onClick"],Idt={width:"7",height:"15",viewBox:"0 0 7 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Pdt=["stroke"],Ldt={__name:"GSC-Carousel",props:{currentItemIndex:{type:Number,default:0},items:{type:Array,default:()=>[]},is3d:{type:Boolean,default:!1},isPaginationVisible:{type:Boolean,default:!1},areNavigationArrowsVisible:{type:Boolean,default:!0},defaultItemByIndex:{type:Number,default:0},defaultItemByProp:{type:Object,default:null,validator:e=>["propName","value"].every(o=>o in e)},navigationHeight:{type:Number,default:4},navigationBorderRadius:{type:Number,default:4},navigationColor:{type:String,default:"rgba(255, 255, 255, 0.4)"},navigationActiveColor:{type:String,default:"#cbee6b"},navigationActiveWidth:{type:Number,default:30},arrowsColor:{type:String,default:"#cbee6b"},arrowsMaxWidth:{type:String,default:"20px"},wrapAround:{type:Boolean,default:!1},itemsToShow:{type:Number,default:1},isMainSlidePriority:{type:Boolean,default:!1},areSlidesArrowsVisible:{type:Boolean,default:!1},slideLeftArrowBackgroundImage:{type:String,default:"linear-gradient(to right, rgba(13, 29, 41, 1), rgba(0, 0, 0, 0))"},slideRightArrowBackgroundImage:{type:String,default:"linear-gradient(to left, rgba(13, 29, 41, 1), rgba(0, 0, 0, 0))"},areSlidesArrowsRounded:{type:Boolean,default:!1},slidesArrowsLeftAndRight:{type:String,default:"20px"},secondarySlidesOpacity:{type:Number,default:.8},marginTop:{type:String,default:"0"}},emits:["input","update:currentItemIndex"],setup(e,{expose:o,emit:s}){const B=e;t.useCssVars(n=>({"2c72d674":e.slideLeftArrowBackgroundImage,"90a63f40":e.slidesArrowsLeftAndRight,"2627d097":e.slideRightArrowBackgroundImage,"1904d43f":e.marginTop,cfb58986:e.secondarySlidesOpacity}));const U=t.ref(null),m=t.ref({}),y=t.ref(0),a=t.ref(!1);t.watch(U,n=>{n&&a.value?(a.value=!1,v(B.items)):n&&n.slideTo&&n.slideTo(y.value)},{deep:!0}),t.watch(()=>B.currentItemIndex,n=>{y.value!==n&&b(n)}),t.watch(()=>B.defaultItemByIndex,n=>{y.value!==n&&b(n)}),t.watch(()=>B.items,n=>{U.value?v(n):a.value=!0},{immediate:!0});function v(n){n&&n.length&&U.value&&setTimeout(()=>{if(B.defaultItemByProp){const i=B.items.findIndex(c=>c[B.defaultItemByProp.propName]===B.defaultItemByProp.value);i!==-1?(y.value=i,m.value=n[i]):(y.value=0,m.value=n[0])}else y.value=B.defaultItemByIndex,m.value=n[B.defaultItemByIndex];U.value.slideTo&&U.value.slideTo(y.value),m.value&&y.value===0&&s("input",{selectedItem:m.value,selectedItemIndex:y.value})},500)}function p(){U.value&&U.value.next()}function r(){U.value&&U.value.prev()}function _(){U.value&&U.value.updateSlideWidth()}function b(n){U.value&&U.value.slideTo(n)}function x(n){U.value.slideTo(n)}function h(n){const i=n.slidingToIndex<0?B.items.length-1:n.slidingToIndex===B.items.length?0:n.slidingToIndex;y.value=i,m.value=B.items[i],s("update:currentItemIndex",i),s("input",{selectedItem:m.value,selectedItemIndex:y.value})}return o({prev:r,next:p,updateSlideWidth:_,slideTo:b}),(n,i)=>(t.openBlock(),t.createElementBlock("div",gdt,[B.is3d?(t.openBlock(),t.createElementBlock("div",ydt,bdt)):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["gsc-carousel__2d",{"main-slide-priority":e.isMainSlidePriority}])},[t.createElementVNode("div",_dt,[t.createVNode(t.unref(hdt),{ref_key:"carousel2d",ref:U,"items-to-show":e.itemsToShow,"wrap-around":e.wrapAround,onSlideStart:h},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.items,(c,l)=>(t.openBlock(),t.createBlock(t.unref(pdt),{key:l},{default:t.withCtx(()=>[t.renderSlot(n.$slots,"default",{item:c},void 0,!0)]),_:2},1024))),128))]),_:3},8,["items-to-show","wrap-around"])]),e.areSlidesArrowsVisible&&e.items.length>1?(t.openBlock(),t.createElementBlock("div",{key:0,class:"gsc-carousel__2d__arrow-left",style:t.normalizeStyle("max-width:"+e.arrowsMaxWidth+"!important"),onClick:i[0]||(i[0]=c=>U.value.prev())},[t.createElementVNode("div",{class:t.normalizeClass(["gsc-carousel__2d__slide-button",{rounded:e.areSlidesArrowsRounded}])},[(t.openBlock(),t.createElementBlock("svg",xdt,[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.10399 9L8.62342 15.4393C9.12552 16.0251 9.12552 16.9749 8.62342 17.5607C8.12132 18.1464 7.30725 18.1464 6.80514 17.5607L0.376575 10.0607C-0.125528 9.47487 -0.125528 8.52512 0.376575 7.93934L6.80515 0.439339C7.30725 -0.146447 8.12132 -0.146447 8.62342 0.43934C9.12553 1.02513 9.12553 1.97487 8.62342 2.56066L3.10399 9Z",fill:e.arrowsColor},null,8,wdt)]))],2)],4)):t.createCommentVNode("",!0),e.areSlidesArrowsVisible&&e.items.length>1?(t.openBlock(),t.createElementBlock("div",{key:1,class:"gsc-carousel__2d__arrow-right",style:t.normalizeStyle("max-width:"+e.arrowsMaxWidth+"!important"),onClick:i[1]||(i[1]=c=>p())},[t.createElementVNode("div",{class:t.normalizeClass(["gsc-carousel__2d__slide-button",{rounded:e.areSlidesArrowsRounded}])},[(t.openBlock(),t.createElementBlock("svg",kdt,[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.89601 9L0.376575 2.56066C-0.125528 1.97487 -0.125528 1.02513 0.376575 0.439339C0.878675 -0.146447 1.69275 -0.146447 2.19486 0.43934L8.62343 7.93934C9.12553 8.52513 9.12553 9.47487 8.62343 10.0607L2.19486 17.5607C1.69275 18.1464 0.878675 18.1464 0.376575 17.5607C-0.125528 16.9749 -0.125528 16.0251 0.376575 15.4393L5.89601 9Z",fill:e.arrowsColor},null,8,Sdt)]))],2)],4)):t.createCommentVNode("",!0),t.createElementVNode("div",Cdt,[e.areNavigationArrowsVisible?(t.openBlock(),t.createElementBlock("div",{key:0,class:"gsc-carousel__2d__navigation__arrow-left",onClick:i[2]||(i[2]=c=>r())},[(t.openBlock(),t.createElementBlock("svg",Tdt,[t.createElementVNode("path",{d:"M6.72998 13.894L1.46621 8.63028C0.84457 8.00863 0.84457 6.9914 1.46621 6.36976L6.72998 1.10599",stroke:B.arrowsColor},null,8,Adt)]))])):t.createCommentVNode("",!0),e.isPaginationVisible?(t.openBlock(),t.createElementBlock("div",Edt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.items,(c,l)=>(t.openBlock(),t.createElementBlock("div",{key:`i-${l}`,class:"gsc-carousel__2d__navigation__pagination__item",style:t.normalizeStyle({height:`${B.navigationHeight}px`,width:`${y.value===l?B.navigationActiveWidth:B.navigationActiveWidth/2}px`,borderRadius:`${B.navigationBorderRadius}px`,backgroundColor:`${y.value===l?B.navigationActiveColor:B.navigationColor}`,transition:"all 0.1s ease-in-out"}),onClick:d=>x(l)},null,12,Mdt))),128))])):t.createCommentVNode("",!0),e.areNavigationArrowsVisible?(t.openBlock(),t.createElementBlock("div",{key:2,class:"gsc-carousel__2d__navigation__arrow-right",onClick:i[3]||(i[3]=c=>U.value.next())},[(t.openBlock(),t.createElementBlock("svg",Idt,[t.createElementVNode("path",{d:"M0.72998 1.10599L5.99375 6.36975C6.61539 6.9914 6.61539 8.00863 5.99375 8.63027L0.72998 13.894",stroke:B.arrowsColor},null,8,Pdt)]))])):t.createCommentVNode("",!0)])],2))]))}},Bdt=fdt(Ldt,[["__scopeId","data-v-54620d25"]]),NQt="",_V={3:"Albanesa",4:"Argelina",6:"Andorrano",7:"Angoleña",8:"Anguillan",9:"Antiguan",10:"Argentina",11:"Armenia",12:"Arubeño",13:"Austríaca",14:"Austríaca",15:"Azerbaiyano",16:"Bahamas",17:"Bareini",18:"Bangladesí",19:"Barbadense",20:"Bielorrusa",21:"Belga",22:"Beliceña",23:"Beninesa",24:"Bermudeña",25:"Butanés",26:"Boliviana",27:"Bosnia",28:"Botsuano",29:"Brasileña",30:"Islas Vírgenes Británicas",31:"Bruneano",32:"Búlgara",33:"Burundés",34:"Burmesa",35:"Burundés",36:"Camboyana",37:"Camerunés",38:"Canadiense",39:"Caboverdiano",40:"Caimanés",41:"Centroafricana",42:"Chadiano",43:"Chilena",44:"China",45:"Isla de Navidad",46:"Cocos Island",47:"Colombiana",48:"Comorense",49:"Congoleña",50:"Cookiano",51:"Costarricense",52:"Marfileña",53:"Croata",54:"Cubana",55:"Chipriota",56:"Checa",57:"Danesa",58:"Djibouti",60:"Dominicana",61:"Timorense",62:"Ecuatoriana",63:"Egipcia",64:"Salvadoreña",65:"Inglesa",66:"Ecuatoguineano",67:"Eritreo",68:"Estoniana",69:"Etíope",70:"Islas Malvinas",71:"Feroés",72:"Fiyiano",73:"Finlandesa",74:"Francesa",75:"Guayana Francesa",76:"Francopolinecio",77:"Gabonesa",78:"Gambiana",79:"Georgiano",80:"Alemana",81:"Ghanesa",82:"Gibraltareño",221:"Británico",84:"Griega",85:"Groenlandés",86:"Granadino",87:"Guadeloupeño",89:"Guatemalteca",90:"Guineana",91:"Guyanés",92:"Haitiana",93:"Hondureña",94:"Hongkongese",95:"Húngaro",96:"Islandesa",97:"Indio",98:"Indonesia",99:"Iraní",100:"Iraquí",101:"Irlandesa",102:"Manés",103:"Israelí",104:"Italiana",105:"Jamaiquina",106:"Japonesa",107:"Jordana",108:"Kazaja",109:"Keniana",110:"Kiribatiano",111:"Coreana",112:"Surcoreana",113:"Kosovan",114:"Kuwaití",115:"Kirguisa",116:"Laosiano",117:"Letona",118:"Libanesa",119:"Basotho",120:"Liberiana",121:"Libia",122:"Liechtenstein",123:"Lituano",124:"Luxemburguesa",125:"Macaneso",126:"Macedonia",127:"Malgache",128:"Malaya",129:"Malaya",130:"Maldivo",131:"Mali",132:"Maltesa",133:"Marshallese",134:"Martiniqueña",135:"Mauritania",136:"Mauriciano",137:"Mahoran",138:"Mexicana",139:"Micronesio",140:"Moldava",141:"Monacan",142:"Mongol",143:"Montenegrina",144:"Montserratiano",145:"Marroqui",146:"Mozambiqueña",147:"Namibio",148:"Nauruan",149:"Nepalí",150:"Holandesa",151:"Neocaledonio",152:"Neozelandesa",153:"Nicaragüense",154:"Niueño",155:"Nigerina",156:"Nigeriana",157:"Noruega",158:"Normariano",159:"Omaní",160:"Palestina",161:"Palestina",162:"Palauan",163:"Panameña",164:"Papú",165:"Paraguaya",166:"Peruana",167:"Filipina",168:"Pitcairnés",169:"Polaca",170:"Portuguesa",171:"Puertorriqueña",172:"Catari",173:"Reunionés",174:"Rumana",175:"Rusa",176:"Ruandés",177:"Santa Elena",178:"Sancristobaleña",179:"Santa Lucía",180:"Miquelonnais",181:"Sanvicentina",182:"Samoano",183:"Sanmariense",184:"Santotomense",185:"Saudí",186:"Escocesa",187:"Senegalense",188:"Serbia",189:"Seychellense",190:"Sierraleonesa",191:"Singapurense",192:"Eslovena",193:"Eslovena",194:"Salomonense",195:"Somalí",196:"Sudafricana",197:"Surosetio",198:"Española",199:"Esrilanques",200:"Sudanés",201:"Surinamés",202:"Swazi",203:"Sueca",204:"Suiza",205:"Sirio",206:"Taiwanesa",207:"Tayiko",208:"Tanzano",209:"Tailandesa",210:"Togo",211:"Tongano",212:"Trinitaria",213:"Tunecina",214:"Turca",215:"Turkmena",216:"none",217:"Tuvaluano",218:"Ugandesa",219:"Ucraniana",220:"Emiratí",222:"Americana",223:"Uruguaya",224:"Uzbeka",225:"Vanuatuense",226:"Venezolana",227:"Vietnamita",228:"Islas Vírgenes",229:"Galesa",230:"Walisiano",231:"Saharaui",232:"Yemení",233:"Zambiana",234:"Zimbabuense",236:"Curazaleña",237:"San Martín",239:"Debutante"},FQt="",qS={components:{GSCCarousel:Bdt,GSCLeaders:Gut,GSCRowTable:iV,GSCTableHeader:QR,GSCExpandedInfo:gV},props:{isTeam:{type:Boolean,default:!1},typeTable:{type:Number,default:0},typeData:{type:Number,default:1},gameId:{type:Number,default:0},filtersProp:{type:[Object,String],default:()=>{}},game:{type:Object,default:()=>({})},isWidget:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},canPlayVideos:{type:Boolean,default:!1},filterTeam:{type:Number,default:0},timeLiveComparativeAvanced:{type:Number,default:6e4},category:{type:Number,default:1},categoryName:{type:String,default:"Goles"},seasonSelected:{type:Object,default:()=>({})},season:{type:Number,default:1772},type:{type:Number,default:0},borderRadius:{type:String,default:"8px"},borderWidth:{type:[String,Number],default:"2px"},borderColor:{type:String,default:"#cfcfcf"},backgroundOdd:{type:String,default:"#172531"},backgroundEven:{type:String,default:"#0d1d29"},numRows:{type:Number,default:5}},setup(){const e=t.ref("myDivRef"),{elementSize:o}=jb(e);return{myDivRef:e,elementSize:o}},watch:{category:{async handler(){this.playersInfo={},this.teamInfo={},this.isloading=!0,this.formatFilterStats=[],await this.getCategoryStats(this.season)}},game:{immediate:!0,deep:!0,async handler(e){e&&(this.playersInfo={},this.teamInfo={},this.isloading=!0,this.formatFilterStats=[],await this.getCategoryStats(this.season),this.game.is_live&&(this.createIntervalTops(),this.$emit("intervalidtops",this.intervalIdtops)))}},typeData:{immediate:!0,async handler(e){await this.getCategoryStats(this.season),e===1&&this.game.is_live?(this.createIntervalTops(),this.$emit("intervalidtops",this.intervalIdtops)):clearInterval(this.intervalIdtops)}},filtersProp:{immediate:!1,deep:!0,async handler(e,o){e&&(JSON.stringify(e)!==JSON.stringify(o)||this.sonConjuntosDistintos(e.setNationalitiesIds,o.setNationalitiesIds))&&(this.isloading=!0,this.filterEmitAux=e,[1,23,3,4,5,7,6,9,8,11,10,12,13,15,14,17,16,22].includes(this.category)?this.filterEmitAux.typeZone=1:this.filterEmitAux.typeZone=2,this.formatFilterStats=await this.filterRecords(this.filterEmitAux))}}},computed:{topData(){if(this.changeStateLoading(!0),Object.entries(this.statsData).length>0&&this.formatFilterStats.length>0){var e={},o={},s=[],B=[],U=[];return this.formatFilterStats.map(m=>{e[m.team_id]?e[m.team_id].total=e[m.team_id].total+m.total:(e[m.team_id]={},e[m.team_id].total=m.total,e[m.team_id].id=this.teamInfo[m.team_id].id,e[m.team_id].name=this.teamInfo[m.team_id].name.replace(" Femenil",""),e[m.team_id].img=Af("https://golstatsimages.blob.core.windows.net/teams-80/"+m.team_id+".png",this.$store.getters.getProviderId),e[m.team_id].effectiveness=this.teamInfo[m.team_id].effectiveness,e[m.team_id].frecuency=this.teamInfo[m.team_id].frecuency,e[m.team_id].game_avg=this.teamInfo[m.team_id].game_avg,e[m.team_id].game_avg_last_season=this.teamInfo[m.team_id].game_avg_last_season,e[m.team_id].games_played_lastseason=this.teamInfo[m.team_id].games_played_lastseason,e[m.team_id].games_played=this.teamInfo[m.team_id].games_played,e[m.team_id].positiontable=this.teamInfo[m.team_id].positiontable,e[m.team_id].goals=this.teamInfo[m.team_id].goals,e[m.team_id].goalsrecived=this.teamInfo[m.team_id].goalsrecived,e[m.team_id].xg=this.teamInfo[m.team_id].xg),o[m.player_id]?m.player_id!=0&&m.player_id!=62117&&(o[m.player_id].total=o[m.player_id].total+m.total):m.player_id!=0&&m.player_id!=62117&&(o[m.player_id]={},o[m.player_id].total=m.total,m.player_id&&this.playersInfo[m.player_id]?(o[m.player_id].name=this.playersInfo[m.player_id].name,o[m.player_id].name_short=this.getnameshort(this.playersInfo[m.player_id].name),o[m.player_id].img=this.playersInfo[m.player_id].img,o[m.player_id].id=this.playersInfo[m.player_id].id,o[m.player_id].age=this.playersInfo[m.player_id].age,o[m.player_id].team=this.playersInfo[m.player_id].team,o[m.player_id].teamname=this.playersInfo[m.player_id].teamname,o[m.player_id].teamid=this.playersInfo[m.player_id].teamid,o[m.player_id].position=this.playersInfo[m.player_id].position,o[m.player_id].positionId=this.playersInfo[m.player_id].positionId,o[m.player_id].positionfull=this.playersInfo[m.player_id].positionfull,o[m.player_id].country=this.playersInfo[m.player_id].country,o[m.player_id].effectiveness=this.playersInfo[m.player_id].effectiveness,o[m.player_id].minutes=this.playersInfo[m.player_id].minutes_played,o[m.player_id].games=this.playersInfo[m.player_id].games_played,o[m.player_id].date=this.playersInfo[m.player_id].date,o[m.player_id].nationality=this.playersInfo[m.player_id].nationality,o[m.player_id].player_country_flag=this.playersInfo[m.player_id].player_country_flag,o[m.player_id].categoryName=this.categoryName):(o[m.player_id].id=m.player_id,o[m.player_id].name=m.player_id,o[m.player_id].img="SIN IMAGEN",o[m.player_id].age="",o[m.player_id].teamname="",o[m.player_id].team="",o[m.player_id].teamid=0,o[m.player_id].position="",o[m.player_id].positionId=0,o[m.player_id].positionfull="",o[m.player_id].country="",o[m.player_id].effectiveness="",o[m.player_id].minutes="",o[m.player_id].games="",o[m.player_id].date="00-00-0000",o[m.player_id].nationality="",o[m.player_id].player_country_flag="",o[m.player_id].categoryName=""))}),s.push(...Object.values(e)),B.push(...Object.values(o)),s=this.sortAndSlice(Object.values(e),60),B=B.sort(this.compareObjectsMinutes).slice(0,60),B=B.map((m,y)=>(m.top=y<9?"0"+(y+1):""+(y+1),m)),s=s.map((m,y)=>(m.top=y<9?"0"+(y+1):""+(y+1),m)),this.filterTeam!==0&&!this.isTeam&&(U=B.filter(m=>m.teamid===this.filterTeam)),this.changeStateLoading(!1),this.isTeam?this.formatArrayPaginate(s):this.filterTeam!=0?this.formatArrayPaginate(U):this.formatArrayPaginate(B)}else return this.changeStateLoading(!1),[]}},data:()=>({url:"https://8grl16o77j.execute-api.us-west-2.amazonaws.com/prod/live/tops",videoCategoriesMap:{1:[12,55,"35_r","54_r"],2:[2,20],3:[485,486,487,488],4:[10,324],5:[27,323],6:[510],7:[537,540,544,547],8:[328],9:[231,238,280,287,294,406],10:[13,25],11:[98,101,104,105,109,112,115,116],12:[4],13:[88],14:[5],15:[34],16:[23],17:[11],18:[17,50],19:[18,49],20:[14,52],21:[15,53],22:[39],23:[31,32]},urlPrematch:"https://8grl16o77j.execute-api.us-west-2.amazonaws.com/prod/topsBySeasonAndCategory/",data_headers:["team_id","player_id","playing_as","match_result","section","total","origen","destino"],token:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE",mapPlayers:new Map,setNationalityIds:new Set,arrayAgeRange:[0,0],arePlaysEmpty:!1,teamInfo:{},formatFilterStats:[],formatStats:[],playersInfo:{},isloading:!0,statsData:{},updateSlider:0,intervalIdtops:null,filterEmitAux:{},filtersSelect:{playingAs:[],matchResult:[],sections:[],zone:[],typeZone:[]},filtersValues:{type:1,sections:[1,2,3,4,5,6],matchResult:[1,2,3],playingAs:[1,2],zone:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],typeZone:1,arrayAgeRange:[1,60],setNationalitiesIds:[],setPositionsIds:[1,2,3,4,5,6,7,8,9]},expand:!1,playerexpand:0,positions:[{name:"Portero",fullname:"POR"},{name:"Defensa central",fullname:"DFC"},{name:"Lateral por izquierda",fullname:"LI"},{name:"Lateral por derecha",fullname:"LD"},{name:"Volante por izquierda",fullname:"VI"},{name:"Volante por derecha",fullname:"VD"},{name:"Volante defensivo",fullname:"VDF"},{name:"Volante ofensivo",fullname:"VO"},{name:"Delantero",fullname:"DEL"},{name:"Desconocida",fullname:"Desc"}],categories:[{id:1,name:"Goles"}]}),async created(){await this.fetchVideoCategories()},methods:{getImageUrl:Af,changeStateLoading(e){this.isloading=e},compareObjectsMinutes(e,o){return e.total>o.total?-1:e.total<o.total?1:e.minutes<o.minutes?-1:e.minutes>o.minutes?1:0},sonConjuntosDistintos(e,o){const s=Array.from(e),B=Array.from(o);if(s.length!==B.length)return!0;for(let U=0;U<s.length;U++)if(!o.has(s[U]))return!0;return!1},getnameshort(e){if(!e)return"";var o=e.split(",");if(o[1]===void 0){var s=e.trim().split(/\s+/).filter(Boolean);return s.length>1?s[0].charAt(0)+". "+s[s.length-1]:e.trim()}var B=o[0].split(" "),U=o[1].trim().split(" "),m="";B.length==2||B.length==1?B[0].length<4?m=B[0]+" "+B[1]:m=B[0]:B.length==3?m=B[0]+" "+B[1]:B.length==4&&(m=B[1]+" "+B[2]+" "+B[3]);var y=U[U.length-1]!=""?U[U.length-1].charAt(0):U[U.length-2]?U[U.length-2].charAt(0):"";return m=m.replace(",",""),y+". "+m},changeCarrousel(){this.expand=!1,this.playerexpand=0},compareObjects(e,o){return e.total<o.total?-1:e.total>o.total?1:e.name<o.name?-1:e.name>o.name?1:0},sortAndSlice(e,o){return e.sort((s,B)=>(s.name<B.name?1:-1)&&(s.total<B.total?1:-1)).slice(0,o)},getCategoryName(e){let o="";for(let s=0;s<this.categories.length;s++)e==this.categories[s].id&&(o=this.categories[s].name);return o},translateTopCategories(e){return this.videoCategoriesMap[e]||[]},async fetchVideoCategories(){try{const e=this.$store.getters.getProviderId||1,{data:o}=await pu.get(`https://dtcf4s9tapfr0.cloudfront.net/${e}/tops/translate_top_categories.json`);o&&typeof o=="object"&&(this.videoCategoriesMap=o)}catch{}},getCoordinatePointPerCategory(e){return{1:2,2:3,3:1,4:2,5:1,6:2,7:2,8:1,9:1,10:2,11:2,12:1,13:1,14:1,15:1,16:1,17:1,18:3,19:3,20:3,21:3,22:1,23:1}[e]||0},emitEventMedia(e,o,s){let B=this.filtersValues.matchResult,U=this.filtersValues.playingAs,m=this.filtersValues.sections,y=this.filtersValues.zone,a=this.translateTopCategories(o);Object.keys(this.filterEmitAux).length>0&&(B=this.filterEmitAux.matchResult,U=this.filterEmitAux.playingAs,m=this.filterEmitAux.sections,y=this.filterEmitAux.zone);const v=1,p=2,r=3,_=this.isTeam?r:p,b=e.player_id;let x=[],h=this.isTeam?e.id:this.filterTeam;b?this.isTeam?h=b:(x=[b],a=a.filter(i=>!i.toString().includes("_r"))):this.isTeam?h=e.id:(x=[e.id],a=a.filter(i=>!i.toString().includes("_r")));const n={auxwidget:!!(this.canPlayVideos||this.game.awayTeam.team_id==this.teamWidget&&this.typeData!=1),seasonId:this.game.is_live==1?this.season:this.game.regularSeasonId,isFeaturedPlayers:!1,mainSectionType:v,playListType:_,gameIds:null,playerIds:x,goalkeeperIds:[],categoryIds:this.translateTopCategories(o),teamId:h||0,matchResult:B,categorySingleName:"",isRivalSubject:!1,avoidCategorySingleName:!1,currentPlayIndex:0,playData:null,lastClashedGameId:null,tournamentsLastClashes:null,advancedFilter:{playListTitle:s,playingAs:U,timeSections:m,fieldSections:y,coordinatePoint:this.getCoordinatePointPerCategory(o)}};this.$emit("setopenmedia",n)},emitEventMediaFullTable(e,o,s){let B=this.filtersValues.matchResult,U=this.filtersValues.playingAs,m=this.filtersValues.sections,y=this.filtersValues.zone,a=this.translateTopCategories(o);Object.keys(this.filterEmitAux).length>0&&(B=this.filterEmitAux.matchResult,U=this.filterEmitAux.playingAs,m=this.filterEmitAux.sections,y=this.filterEmitAux.zone);const v=1,p=2,r=3,_=this.isTeam?r:p;let b=[],x=this.isTeam?e.id:this.filterTeam;this.isTeam?x=e.id:(b=[e.id],a=a.filter(n=>!n.toString().includes("_r")));const h={seasonId:this.season,isFeaturedPlayers:!1,mainSectionType:v,playListType:_,gameIds:null,playerIds:b,goalkeeperIds:[],categoryIds:a,teamId:x||0,matchResult:B,categorySingleName:"",isRivalSubject:!1,avoidCategorySingleName:!1,currentPlayIndex:0,playData:null,lastClashedGameId:null,tournamentsLastClashes:null,advancedFilter:{playListTitle:s,playingAs:U,timeSections:m,fieldSections:y,coordinatePoint:this.getCoordinatePointPerCategory(o)}};this.$emit("setopenmedia",h)},replaceImgPlayer(e){return e.replace("https://golstatsimages.blob.core.windows.net/players-profile/","https://golstatsimages.blob.core.windows.net/players-profile-no-bg/")},abrevName(e){var o=e.split(","),s=o[0].split(" "),B=o[1].trim().split(" "),U="";s.length==2||s.length==1?s[0].length<4?U=s[0]+" "+s[1]:U=s[0]:s.length==3?U=s[0]+" "+s[1]:s.length==4&&(U=s[1]+" "+s[2]+" "+s[3]);var m=B[B.length-1]!=""?B[B.length-1].charAt(0):B[B.length-2]?B[B.length-2].charAt(0):"";U=U.replace(",","");var y=m+". "+U;return y},clickMore(e){this.$emit("more",{category:e,categoryName:this.categoryName})},morestats(){this.$emit("more",this.category)},viewprofile(e,o){this.$emit("clickprofile",{id:e,teamId:o,isTeam:this.isTeam})},clickexpand(e){this.expand=e.expand,this.playerexpand=e.id},async getCategoryStats(e){var o,s;this.mapPlayers=new Map;try{if(!e)return;let B=[],U={},m={},y=this.season;(s=(o=this.seasonSelected)==null?void 0:o.related_seasons)!=null&&s.some(_=>_.id===this.season)&&(y=this.seasonSelected.id),this.arePlaysEmpty=!1;const a=pu.create({headers:{Authorization:`${this.token}`}});this.isloading=!0;const v=this.$store.getters.getProviderId,p=this.$store.getters.getIsDevApis;let r={};if(this.typeData==1?this.isWidget&&this.teamWidget!=0?r=await a.get(uu(this.url+"/"+this.gameId+"/"+this.category,v,p)+"?t="+this.teamWidget):r=await a.get(uu(this.url+"/"+this.gameId+"/"+this.category,v,p)):this.game.game_status===1?this.isWidget&&this.teamWidget!=0?r=await a.get(uu(this.url+"/"+this.gameId+"/"+this.category,v,p)+"?acc=1&t="+this.teamWidget):r=await a.get(uu(this.url+"/"+this.gameId+"/"+this.category,v,p)+"?acc=1"):this.isWidget&&this.teamWidget!=0?r=await a.get(uu(this.urlPrematch+y+"/"+this.category,v,p)+"?t="+this.teamWidget):r=await a.get(uu(this.urlPrematch+y+"/"+this.category,v,p)+"?t="+this.game.homeTeam.team_id+"&t="+this.game.awayTeam.team_id),r&&r.data&&r.data.data&&r.data.data.length>0){B=r.data.data.map(b=>this.formatStatsData(b)),r.data.teams.forEach(b=>{U[b[0]]={},U[b[0]].id=b[0],U[b[0]].name=b[1],U[b[0]].abrv=b[2],U[b[0]].img=b[3],U[b[0]].effectiveness=b[4],U[b[0]].games_played=b[5],U[b[0]].games_played_lastseason=b[6],U[b[0]].positiontable=b[7],U[b[0]].goals=b[8],U[b[0]].goalsrecived=b[9],U[b[0]].xg=b[10],U[b[0]].frecuency=b[11],U[b[0]].game_avg=b[12],U[b[0]].game_avg_last_season=b[13]});const _=new Set;r.data.players.forEach(b=>{const x=this.getObjectPlayer(b);this.mapPlayers.set(x.numberId,x);const h=x.numberAge,n=x.teamName.length>0?x.teamName[0].acronym:"",i=x.teamName.length>0?U[x.teamName[0].team_id].name:"",c=x.teamName.length>0?x.teamName[0].team_id:"",l=this.positions[x.numberPositionId-1].fullname,d=this.positions[x.numberPositionId-1].name,g=x.countryId.length>0?x.countryId[0].nationality_id:"",w=x.effectiveness,C=x.min,E=x.games,A=x.date;x.arrayNationalities.forEach(P=>{_.add(P.numberId)}),m[b[0]]={id:b[0],name:b[1],img:b[2],age:h,team:n,teamname:i,teamid:c,position:l,positionfull:d,effectiveness:w,country:g,games_played:E,minutes_played:C,date:A,nationality:x.stringNationalityName,player_country_flag:x.player_country_flag,positionId:x.numberPositionId}}),this.setNationalityIds=_,this.arrayAgeRange=[r.data.min_age,r.data.max_age]}else this.arePlaysEmpty=!0;this.teamInfo=U,this.playersInfo=m,this.formatStats=B,this.formatFilterStats=this.filterRecords(this.filtersSelect),this.statsData=r}catch(B){return Promise.reject(B)}},filterRecords(e){return this.formatStats.length>0?this.formatStats.filter(o=>{const s=e.playingAs.includes(o.playing_as),B=e.matchResult.includes(o.match_result),U=e.sections.includes(o.section),m=e.typeZone===1&&e.zone.includes(o.origen)||e.typeZone===2&&e.zone.includes(o.destino);if(e.setPositionsIds&&e.setNationalitiesIds&&e.arrayAgeRange&&e.setYear&&!this.isTeam){const y=this.mapPlayers.get(o.player_id);if(!y)return!1;if(e.booleanAreNationalTeamsVisible){if(e.setAvailableNationalTeamsPlayersIds.size>0&&!e.setAvailableNationalTeamsPlayersIds.has(o.player_id))return!1}else{let a=!1;for(const v of y.arrayNationalitiesIds)if(e.setNationalitiesIds.has(v)){a=!0;break}if(!a)return!1}if(y.numberAge<e.arrayAgeRange[0]||y.numberAge>e.arrayAgeRange[1]||y.date<e.setYear||!e.setPositionsIds.includes(y.numberPositionId))return!1}return(e.playingAs.length===0||s)&&(e.matchResult.length===0||B)&&(e.sections.length===0||U)&&(e.zone.length===0||m)}):[]},updateSliderF(){this.updateSlider+=1},formatStatsData(e){const o={};return e[1]===0&&(e[2]===1||e[2]===2)&&(e[2]=3-e[2]),e[1]===0&&(e[3]===1||e[3]===2)&&(e[3]=3-e[3]),this.data_headers.forEach((s,B)=>{o[s]=e[B]}),o},getObjectPlayer(e){const o=[],s=e[7].map(U=>(o.push(U.nationality_id),{stringName:U.nationality,numberId:U.nationality_id})),B=e[9].split("-");return{numberId:e[0]!==void 0?e[0]:"",stringFullName:e[1]!==void 0?e[1]:"",stringImageUrl:e[2]!==void 0?e[2]:"",numberTeamId:e[3]!==void 0?e[3]:"",player_country_flag:"https://golstatsimages.blob.core.windows.net/flags/"+e[3]+".jpg",stringNationalityName:_V[e[3]],numberAge:e[5]!==void 0?e[5]:"",numberPositionId:e[6]!==void 0?e[6]:"",countryId:e[7]!==void 0?e[7]:"",teamName:e[10]!==void 0?e[10]:"",effectiveness:e[11]!==void 0?e[11]:"",min:e[13]!==void 0?e[13]:"",games:e[12]!==void 0?e[12]:"",date:B.length>0?Number(B[0]):0,arrayNationalities:s,category:this.categoryName,arrayNationalitiesIds:o}},formatArrayPaginate(e){const o=Math.ceil(e.length/this.numRows);return Array.from({length:o},(s,B)=>{const U=B*this.numRows,m=U+this.numRows;return e.slice(U,m)})},createIntervalTops(){this.intervalIdtops=setInterval(async()=>{await this.getCategoryStats(this.season)},this.timeLiveComparativeAvanced)},clearTopsInterval(){this.intervalIdtops&&(clearInterval(this.intervalIdtops),this.intervalIdtops=null)}},beforeUnmount(){this.clearTopsInterval()}},xV=()=>{t.useCssVars(e=>({"7945af00":e.borderRadius,"245d87d0":e.borderWidth,"268b8496":e.borderColor}))},wV=qS.setup;qS.setup=wV?(e,o)=>(xV(),wV(e,o)):xV;const zdt={ref:"myDivRef"},Odt={class:"btnViewFullList"},Ddt={class:"text"},Ndt={class:"groupsLeague"},Fdt={class:"row-table-carrousel"},Rdt={key:1,class:"container-no-search-result"},Vdt={key:0,class:"overlay-loading-top"};function jdt(e,o,s,B,U,m){const y=t.resolveComponent("GSCLeaders"),a=t.resolveComponent("GSCRowTable"),v=t.resolveComponent("GSCExpandedInfo"),p=t.resolveComponent("GSCCarousel"),r=t.resolveComponent("GSCTableHeader");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(s.type==0?"gsc-top":"gsc-top-full")},[t.createElementVNode("div",zdt,[t.createElementVNode("div",Odt,[t.createElementVNode("div",Ddt,[t.createElementVNode("div",Ndt,t.toDisplayString(s.categoryName),1)])]),s.type==0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[m.topData.length>0?(t.openBlock(),t.createBlock(p,{key:0,items:m.topData,"is-pagination-visible":!0,"are-navigation-arrows-visible":!0,onInput:m.changeCarrousel},{default:t.withCtx(({item:_})=>[t.createElementVNode("div",Fdt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(_,(b,x)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:x},[b.top==1?(t.openBlock(),t.createBlock(y,{key:0,onMediadata:o[0]||(o[0]=h=>m.emitEventMedia(h,s.category,s.categoryName)),type:s.typeTable,"type-data":s.typeData,game:s.game,"team-widget":s.teamWidget,"can-play-videos":s.canPlayVideos,"is-expanded":e.playerexpand==b.id&&e.expand,ref_for:!0,ref:"GSCLeaders",data:s.typeTable==0?{top:"01",photo:b.img,logo:m.getImageUrl("https://golstatsimages.blob.core.windows.net/teams-80/"+b.teamid+".png",e.$store.getters.getProviderId),name:b.name,player_short:b.name_short,player_id:b.id,categoryId:s.category,total:b.total}:{top:"01",logo:b.img,total:b.total,name_team:b.name,player_id:b.id},"category-name":s.categoryName,buttonMaxWidth:s.typeTable!=0?B.elementSize.width>360?"210px":"130px":B.elementSize.width>360?"180px":"110px",buttonFontSize:"12px",iconSize:"11px",onExpand:m.clickexpand,onMore:m.morestats},null,8,["type","type-data","game","team-widget","can-play-videos","is-expanded","data","category-name","buttonMaxWidth","onExpand","onMore"])):(t.openBlock(),t.createBlock(a,{key:1,"type-data":s.typeData,"team-widget":s.teamWidget,game:s.game,type:s.typeTable,"type-view":s.type,"is-expanded":e.playerexpand==b.id&&e.expand,onMediadata:o[1]||(o[1]=h=>m.emitEventMedia(h,s.category,s.categoryName)),data:s.typeTable==0?{position:b.top,player_name:b.name,player_short:b.name_short,player_photo:b.img,total:b.total,id:b.id,player_age:b.age,team_abrev:b.team,team_logo:m.getImageUrl("https://golstatsimages.blob.core.windows.net/teams-80/"+b.teamid+".png",e.$store.getters.getProviderId),player_position:b.position,player_country_flag:"https://golstatsimages.blob.core.windows.net/flags/"+b.country+".jpg",player_games:b.minutes,player_min:b.games,league_name:"          Liga MX          "}:{position:b.top,team_logo:b.img,team_abrev:b.name,frequency:b.frecuency,promthistournament:b.game_avg,promlasttournament:b.game_avg_last_season,teams_games:"-",category:s.category,total:b.total,id:b.id},height:"71px","can-play-videos":s.canPlayVideos,background:x%2===0?s.backgroundEven:s.backgroundOdd,onExpand:m.clickexpand},null,8,["type-data","team-widget","game","type","type-view","is-expanded","data","can-play-videos","background","onExpand"])),e.expand&&e.playerexpand==b.id?(t.openBlock(),t.createBlock(v,{key:2,type:s.typeTable,"is-live":s.game.is_live,"view-effectiveness":b.positionId!==1,data:s.typeTable==0?{teams:b.teamname,age:b.age,dataofbirth:b.date,nationality:b.nationality,countryFlag:b.player_country_flag,position:b.position,games:b.games,min:b.minutes,goals:b.total,effectiveness:b.effectiveness,category:s.categoryName,id:b.id}:{position:b.positiontable,goals:b.goals,goals_received:b.goalsrecived,games_played:b.games_played,category:s.categoryName,effectiveness:b.effectiveness,xg:b.xg,total:b.total,attendance:"-",id:b.id},onViewprofile:h=>m.viewprofile(h,b.teamid),background:x%2===0?s.backgroundEven:s.backgroundOdd},null,8,["type","is-live","view-effectiveness","data","onViewprofile","background"])):t.createCommentVNode("",!0)],64))),128))])]),_:1},8,["items","onInput"])):(t.openBlock(),t.createElementBlock("div",Rdt,[e.isloading?(t.openBlock(),t.createElementBlock("div",Vdt,o[3]||(o[3]=[t.createElementVNode("div",{class:"overlay-loading-top__spinner"},[t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/balon_liga.png",alt:""})],-1),t.createElementVNode("div",{class:"overlay-loading-top__text"},"Loading...",-1)]))):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[o[4]||(o[4]=t.createElementVNode("div",{class:"container-no-search-result-title"},"No existen resultados",-1)),o[5]||(o[5]=t.createElementVNode("div",{class:"container-no-search-result-subtitle"},[t.createTextVNode(" No existen resultados para este tipo de"),t.createElementVNode("br"),t.createTextVNode(" jugada, considerando el torneo y otros"),t.createElementVNode("br"),t.createTextVNode(" filtros que has seleccionado. ")],-1))],64))]))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createVNode(r,{background:"#183143",type:s.typeTable},null,8,["type"]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(m.topData,(_,b)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:b},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(_,(x,h)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:h},[t.createVNode(a,{"type-data":s.typeData,"team-widget":s.teamWidget,game:s.game,type:s.typeTable,"type-view":s.type,"can-play-videos":s.canPlayVideos,"is-expanded":e.playerexpand==x.id&&e.expand,onMediadata:o[2]||(o[2]=n=>m.emitEventMediaFullTable(n,s.category,s.categoryName)),data:s.typeTable==0?{position:x.top,player_name:x.name,player_short:x.name_short,player_photo:x.img,total:x.total,id:x.id,player_age:x.age,team_abrev:x.team,team_logo:m.getImageUrl("https://golstatsimages.blob.core.windows.net/teams-80/"+x.teamid+".png",e.$store.getters.getProviderId),player_position:x.position,player_country_flag:"https://golstatsimages.blob.core.windows.net/flags/"+x.country+".jpg",player_games:x.games,player_min:x.minutes,league_name:"          Liga MX          "}:{position:x.positiontable,team_logo:x.img,team_abrev:x.name,frequency:x.frecuency,promthistournament:x.game_avg,promlasttournament:x.game_avg_last_season,category:s.category,team_games:x.games_played,total:x.total,id:x.id},height:"71px",background:((b+1)*5+h)%2===0?s.backgroundOdd:s.backgroundEven,onExpand:m.clickexpand},null,8,["type-data","team-widget","game","type","type-view","can-play-videos","is-expanded","data","background","onExpand"]),e.expand&&e.playerexpand==x.id?(t.openBlock(),t.createBlock(v,{key:0,type:s.typeTable,"is-live":s.game.is_live,additionalClass:"fullTable","view-effectiveness":x.positionId!==1,data:s.typeTable==0?{teams:x.teamname,age:x.age,dataofbirth:x.date,nationality:x.nationality,countryFlag:x.player_country_flag,position:x.positionfull,positionfull:x.positionfull,games:x.games,min:x.minutes,goals:x.total,effectiveness:x.effectiveness,category:m.getCategoryName(s.category),id:x.id}:{position:x.positiontable,goals:x.goals,goals_received:x.goalsrecived,games_played:x.games_played,category:s.categoryName,effectiveness:x.effectiveness,xg:x.xg,total:x.total,category:m.getCategoryName(s.category),attendance:"-",id:x.id},onViewprofile:n=>m.viewprofile(n,x.teamid),background:h%2===0?s.backgroundEven:s.backgroundOdd},null,8,["type","is-live","view-effectiveness","data","onViewprofile","background"])):t.createCommentVNode("",!0)],64))),128))],64))),128))],64))],512)],2)}const Udt=Ki(qS,[["render",jdt],["__scopeId","data-v-ef09809c"]]),Gdt=(e,o)=>{const s=e.__vccOpts||e;for(const[B,U]of o)s[B]=U;return s},Hdt={props:{id:Number,textValue:String,icon:String,numFilter:Number,iconVisible:{type:Boolean,default:!0},activeClickLabel:{type:Boolean,default:!1},height:{type:String,default:"35px"},borderRadius:{type:String,default:"30px"},borderType:{type:String,default:"solid"},borderWidth:{type:Number,default:0},borderColor:String,backgroundColor:{type:String,default:"#23303B"},fontSize:{type:String,default:"13px"},fontColor:{type:String,default:"#FFFFFF"},fontFamily:{type:String,default:"Poppins-Regular"},iconSize:{type:String,default:"20px"}},computed:{customStyle(){return{height:this.height,backgroundColor:this.backgroundColor,borderRadius:this.borderRadius,border:`${this.borderType} ${this.borderWidth}px ${this.borderColor}`,color:this.fontColor,cursor:this.cursorType,fontSize:this.fontSize,fontFamily:`${this.fontFamily} !important`}},customIcon(){return{width:this.iconSize}}},methods:{btnLabel(){this.$emit("clickLabel",this.id)},btnClose(){this.$emit("clickClose",this.id)}}},Zdt=["src"],Wdt=["src"];function qdt(e,o,s,B,U,m){return t.openBlock(),t.createElementBlock("div",null,[s.activeClickLabel?(t.openBlock(),t.createElementBlock("div",{key:0,style:t.normalizeStyle(m.customStyle),class:"gsc-label",onClick:o[0]||(o[0]=(...y)=>m.btnLabel&&m.btnLabel(...y))},[t.createTextVNode(t.toDisplayString(s.numFilter)+" "+t.toDisplayString(s.textValue)+" ",1),s.iconVisible?(t.openBlock(),t.createElementBlock("img",{key:0,style:t.normalizeStyle(m.customIcon),class:"icon",src:s.icon},null,12,Zdt)):t.createCommentVNode("",!0)],4)):(t.openBlock(),t.createElementBlock("div",{key:1,class:"gsc-label",style:t.normalizeStyle(m.customStyle)},[t.createTextVNode(t.toDisplayString(s.numFilter)+" "+t.toDisplayString(s.textValue)+" ",1),s.iconVisible?(t.openBlock(),t.createElementBlock("img",{key:0,onClick:o[1]||(o[1]=(...y)=>m.btnClose&&m.btnClose(...y)),style:t.normalizeStyle(m.customIcon),class:"icon",src:s.icon},null,12,Wdt)):t.createCommentVNode("",!0)],4))])}const Jdt=Gdt(Hdt,[["render",qdt],["__scopeId","data-v-42ff544a"]]);function Ydt(e){const o=t.ref({width:0,height:0});function s(){const B=e.value.getBoundingClientRect();o.value.width=B.width,o.value.height=B.height}return t.onMounted(()=>{s(),window.addEventListener("resize",s)}),t.onUnmounted(()=>{window.removeEventListener("resize",s)}),{elementSize:o}}const Xdt=(e,o)=>{const s=e.__vccOpts||e;for(const[B,U]of o)s[B]=U;return s},JS={name:"ScrollableContainer",props:{backgroundColor:{type:String,default:"#0D1D29"},pxScroll:{type:Number,default:100},arrows:{type:Boolean,default:!0},arrowsHideOnNoScroll:{type:Boolean,default:!1},arrowsScrollHide:{type:Boolean,default:!1},arrowsColor:{type:String,default:"#CBEE6B"},arrowsHeight:{type:Number,default:15},arrowsWidth:{type:Number,default:15},arrowsPadding:{type:Number,default:5},arrowsMargin:{type:Number,default:10},arrowsRadius:{type:String,default:"0%"},arrowsBorder:{type:String,default:"none"},arrowsBackground:{type:String,default:"#0D1D29"},arrowsContainerBgL:{type:String,default:"#0D1D29"},arrowsContainerBgR:{type:String,default:"#0D1D29"},scrollColor:{type:String,default:"#c3e569"},arrowsPosition:{type:String,default:"relative"},height:{type:String,default:"100%"}},data(){return{showLeftArrow:!1,showRightArrow:!0,intervalid1:""}},mounted(){this.getScroll(),this.arrowsHideOnNoScroll&&window.addEventListener("resize",this.resizeSlider),this.arrowsHideOnNoScroll&&this.listenerLoad()},beforeUnmount(){this.arrowsHideOnNoScroll&&window.removeEventListener("resize",this.resizeSlider),this.arrowsHideOnNoScroll&&clearInterval(this.intervalid1)},computed:{getViewBox(){return`-2 0 ${this.arrowsWidth} ${this.arrowsHeight}`},hideShowLeftArrow(){let e="";return this.arrowsPosition=="absolute"?e="leftAbsolute":e="leftRelative",this.arrowsScrollHide?this.showLeftArrow?e+=" showArrowSlide":e+=" hideArrowSlide":e+=" showArrowSlide",e},hideShowRightArrow(){let e="";return this.arrowsPosition=="absolute"?e="rightAbsolute":e="rightRelative",this.arrowsScrollHide?this.showRightArrow?e+=" showArrowSlide":e+=" hideArrowSlide":e+=" showArrowSlide",e}},methods:{scrollLeft(){this.$refs.content.scrollLeft-=this.pxScroll},scrollRight(){this.$refs.content.scrollLeft+=this.pxScroll},getScroll(){let e=0;this.arrowsPosition=="relative"?e=this.$refs.content.scrollWidth-this.$el.clientWidth+this.arrowsMargin*2+this.arrowsWidth*4:e=this.$refs.content.scrollWidth-this.$el.clientWidth,this.$refs.content.scrollLeft==0?this.showLeftArrow=!1:this.showLeftArrow=!0,e>0&&(this.$refs.content.scrollLeft==e?this.showRightArrow=!1:this.showRightArrow=!0),this.arrowsHideOnNoScroll&&this.$refs.content.clientWidth===this.$refs.content.scrollWidth&&(this.showRightArrow=!1)},resizeSlider(){this.getScroll();let e;clearTimeout(e),e=setTimeout(this.getScroll,1e3)},listenerLoad(){this.intervalid1=setInterval((function(){var e=this.$el.clientWidth,o=this.$refs.content.scrollWidth;o>0&&e>0&&(o>e?(this.showRightArrow=!0,clearInterval(this.intervalid1)):clearInterval(this.intervalid1))}).bind(this),3e3)}}},kV=()=>{t.useCssVars(e=>({"42d3dba6":e.backgroundColor,"4de5d2cf":e.height,"67bafa7b":e.arrowsPosition,"61e1032e":e.arrowsPadding+"px","79a4ac00":e.arrowsBackground,"6b8355c6":e.arrowsHeight*2+"px","29a58368":e.arrowsWidth*2+"px","3622fa64":e.arrowsRadius,"1ba101fe":e.arrowsBorder,"0bafb5e6":e.arrowsMargin+"px","423a44b8":e.arrowsContainerBgL,"423a44be":e.arrowsContainerBgR,"10b117ee":e.scrollColor}))},SV=JS.setup;JS.setup=SV?(e,o)=>(kV(),SV(e,o)):kV;const $dt={ref:"gscScrollableContainer",class:"scrollable-container"},Kdt={class:"scrollable-arrows"},Qdt=["width","height","viewBox"],eht=["stroke"],tht={class:"scrollable-wrapper"},aht={class:"scrollable-arrows"},rht=["width","height","viewBox"],nht=["stroke"];function iht(e,o,s,B,U,m){return t.openBlock(),t.createElementBlock("div",$dt,[s.arrows?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["arrows-container",m.hideShowLeftArrow]),onClick:o[0]||(o[0]=(...y)=>m.scrollLeft&&m.scrollLeft(...y))},[t.createElementVNode("div",Kdt,[(t.openBlock(),t.createElementBlock("svg",{width:s.arrowsWidth,height:s.arrowsHeight,viewBox:m.getViewBox,fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M6.36523 13.788L1.10146 8.52429C0.479824 7.90265 0.479824 6.88541 1.10147 6.26377L6.36523 1",stroke:s.arrowsColor},null,8,eht)],8,Qdt))])],2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"scrollable-content scrollable-content-slider",ref:"content",onScroll:o[1]||(o[1]=(...y)=>m.getScroll&&m.getScroll(...y))},[t.createElementVNode("div",tht,[t.renderSlot(e.$slots,"default",{},void 0,!0)])],544),s.arrows?(t.openBlock(),t.createElementBlock("div",{key:1,id:"arrows-container-right",class:t.normalizeClass(["arrows-container",m.hideShowRightArrow]),onClick:o[2]||(o[2]=(...y)=>m.scrollRight&&m.scrollRight(...y))},[t.createElementVNode("div",aht,[(t.openBlock(),t.createElementBlock("svg",{width:s.arrowsWidth,height:s.arrowsHeight,viewBox:m.getViewBox,fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M0.634765 1.21195L5.89853 6.47571C6.52018 7.09735 6.52018 8.11459 5.89853 8.73623L0.634766 14",stroke:s.arrowsColor},null,8,nht)],8,rht))])],2)):t.createCommentVNode("",!0)],512)}const oht=Xdt(JS,[["render",iht],["__scopeId","data-v-b548a08d"]]),sht=(e,o)=>{const s=e.__vccOpts||e;for(const[B,U]of o)s[B]=U;return s},YS={components:{GSCSlider:oht},props:{arrow:{type:Boolean,required:!0},buttons:{type:Array,required:!0},width:{type:String,default:"300px"},height:{type:String,default:"80px"},fontSize:{type:String,default:"16px"},colorFont:{type:String,default:"#ffffff"},backgroundOptionActive:{type:String,default:"#0d1d29"},colorOptionActive:{type:String,default:"#cbee6b"},colorOptionDisable:{type:String,default:"gray"},backgroundOptionDisable:{type:String,default:"#0d1d29"},fontFamily:{type:String,default:"Poppins-Semibold"},borderWidth:{type:String,default:"3px"},borderRadius:{type:String,default:"0px"},selectedOption:{type:String,default:""},type:{type:Number,default:0},borderWidthContainer:{type:String,default:"1px"},background:{type:String,default:"#0d1d29"},borderColorContainer:{type:String,default:"#505355"},pxScroll:{type:Number,default:100},scrollColor:{type:String,default:"#c3e569"},arrowsPosition:{type:String,default:"relative"},arrowsScrollHide:{type:Boolean,default:!1},arrowsBackground:{type:String,default:"#0D1D29"},arrowsContainerBgL:{type:String,default:"#0D1D29"},arrowsContainerBgR:{type:String,default:"#0D1D29"},arrowsMargin:{type:Number,default:10},arrowsRadius:{type:String,default:"0%"},arrowsBorder:{type:String,default:"none"}},setup(){const e=t.ref("myDivRef"),{elementSize:o}=Ydt(e);return{myDivRef:e,elementSize:o}},methods:{clickEmitEvent(e){this.$emit("input",e)},customGrid(e){var o={};return e.width>768?o={fontSize:"16px"}:e.width>480?o={fontSize:"14px"}:o={fontSize:"12px"},o}}},CV=()=>{t.useCssVars(e=>({cff4a118:e.fontSize,"42aab7f6":e.borderWidth,d29bcbd2:e.fontFamily,df6c5a9c:e.background,"09b32862":e.borderRadius,"8c0d6daa":e.borderWidthContainer,e8a86fa4:e.borderColorContainer,"179494da":e.colorOptionActive,cea5647c:e.width}))},TV=YS.setup;YS.setup=TV?(e,o)=>(CV(),TV(e,o)):CV;const lht={ref:"myDivRef"},cht={key:0,class:"gs-switch-container"},uht=["onClick"],dht={key:1,class:"gs-switch-container-type"},hht=["onClick"],pht={key:2,class:"gs-switch-container-carousel"},fht=["onClick"];function mht(e,o,s,B,U,m){const y=t.resolveComponent("GSCSlider");return t.openBlock(),t.createElementBlock("div",lht,[s.type==0?(t.openBlock(),t.createElementBlock("div",cht,[t.createElementVNode("div",{class:"gs-switch-container__control",style:t.normalizeStyle([m.customGrid(B.elementSize)])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.buttons,(a,v)=>(t.openBlock(),t.createElementBlock("div",{class:"gs-switch-container__control__button-option",style:t.normalizeStyle([{height:s.height},s.selectedOption==a?{borderColor:s.colorOptionActive,color:s.colorFont+"!important",background:s.backgroundOptionActive}:{borderColor:s.colorOptionDisable,color:"grey !important"}]),key:v,onClick:p=>(s.selectedOption=a,m.clickEmitEvent(a))},t.toDisplayString(a),13,uht))),128))],4),t.renderSlot(e.$slots,s.selectedOption,{},void 0,!0)])):t.createCommentVNode("",!0),s.type==1?(t.openBlock(),t.createElementBlock("div",dht,[t.createElementVNode("div",{class:"gs-switch-container-type__control",style:t.normalizeStyle([m.customGrid(B.elementSize)])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.buttons,(a,v)=>(t.openBlock(),t.createElementBlock("div",{class:"gs-switch-container-type__control__button-option-type",style:t.normalizeStyle([{height:s.height},s.selectedOption==a?{borderColor:s.colorOptionActive,color:s.colorFont+"!important",background:s.backgroundOptionActive}:{borderColor:s.colorOptionDisable,borderWidth:"0px",borderWidth:"0px !important",color:"grey !important",background:s.backgroundOptionDisable}]),key:v,onClick:p=>(s.selectedOption=a,m.clickEmitEvent(a))},t.toDisplayString(a),13,hht))),128))],4)])):t.createCommentVNode("",!0),s.type==2?(t.openBlock(),t.createElementBlock("div",pht,[t.createVNode(y,{arrows:s.arrow,"background-color":s.background,"px-scroll":s.pxScroll,"scroll-color":s.scrollColor,"arrows-position":s.arrowsPosition,arrowsScrollHide:s.arrowsScrollHide,"arrows-background":s.arrowsBackground,"arrows-container-bg-l":s.arrowsContainerBgL,"arrows-container-bg-r":s.arrowsContainerBgR,"arrows-margin":s.arrowsMargin,"arrows-radius":s.arrowsRadius,"arrows-border":s.arrowsBorder},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.buttons,(a,v)=>(t.openBlock(),t.createElementBlock("div",{class:"button-option-multi",style:t.normalizeStyle([{height:s.height},s.selectedOption==a?{borderColor:s.colorOptionActive,color:s.colorFont+"!important",background:s.backgroundOptionActive}:{borderColor:s.colorOptionDisable,color:"grey !important"}]),key:v,onClick:p=>(s.selectedOption=a,m.clickEmitEvent(a))},t.toDisplayString(a),13,fht))),128))]),_:1},8,["arrows","background-color","px-scroll","scroll-color","arrows-position","arrowsScrollHide","arrows-background","arrows-container-bg-l","arrows-container-bg-r","arrows-margin","arrows-radius","arrows-border"])])):t.createCommentVNode("",!0)],512)}const XS=sht(YS,[["render",mht],["__scopeId","data-v-8a86dfaf"]]),RQt="",VQt="";function ght(){return{backgroundColor:"#2e3b46",borderColor:"rgba(255, 255, 255, 0.20)",infoBorderColor:"rgba(255, 255, 255, 0.20)",height:"40px",padding:"5px 12px",textFontFamily:"'Poppins-Regular'"}}const jQt="",yht={comfiltersContainer:"_comfiltersContainer_xl2as_1",comfiltersContainer1232:"_comfiltersContainer1232_xl2as_1",closeFiltersPc:"_closeFiltersPc_xl2as_1",comtextleyemdmultipleleagues:"_comtextleyemdmultipleleagues_xl2as_1",comtextleyemdmultipleleagues380:"_comtextleyemdmultipleleagues380_xl2as_1",comfiltersContainer760:"_comfiltersContainer760_xl2as_1",comfiltersContainer460:"_comfiltersContainer460_xl2as_1",comcontainerSection:"_comcontainerSection_xl2as_1",comcontainerSection1232:"_comcontainerSection1232_xl2as_1",comcontainerSection960:"_comcontainerSection960_xl2as_1",comcontainerSection320:"_comcontainerSection320_xl2as_1",comcontainerSection350:"_comcontainerSection350_xl2as_1",comtemplateLosMejores1:"_comtemplateLosMejores1_xl2as_1",comtemplateLosMejores11232:"_comtemplateLosMejores11232_xl2as_1",comtemplateLosMejores1960:"_comtemplateLosMejores1960_xl2as_1",comtemplateLosMejores1420:"_comtemplateLosMejores1420_xl2as_1",comtemplateLosMejores1320:"_comtemplateLosMejores1320_xl2as_1",comtemplateLosMejores1540:"_comtemplateLosMejores1540_xl2as_1",comtemplateLosMejores1350:"_comtemplateLosMejores1350_xl2as_1",comtopFiltersParent:"_comtopFiltersParent_xl2as_1",comtopFiltersParent1232:"_comtopFiltersParent1232_xl2as_1",comtopFiltersParent960:"_comtopFiltersParent960_xl2as_1",comtopFiltersParent460:"_comtopFiltersParent460_xl2as_1",comtopFiltersParent420:"_comtopFiltersParent420_xl2as_1",comcontainerTheBest:"_comcontainerTheBest_xl2as_1",comcontainerTheBest1232:"_comcontainerTheBest1232_xl2as_1",comcontainerTheBest960:"_comcontainerTheBest960_xl2as_1",comcontainerTheBest320:"_comcontainerTheBest320_xl2as_1",comtitleSection:"_comtitleSection_xl2as_1",comtitleSection540:"_comtitleSection540_xl2as_1",comcontainerTables:"_comcontainerTables_xl2as_1",comcontainerTables960:"_comcontainerTables960_xl2as_1",comcontainerTables760:"_comcontainerTables760_xl2as_1",comcontainerTables320:"_comcontainerTables320_xl2as_1",comtoniKroosWrapper:"_comtoniKroosWrapper_xl2as_1",comtoniKroosWrapper1080:"_comtoniKroosWrapper1080_xl2as_1",comtoniKroosWrapper975:"_comtoniKroosWrapper975_xl2as_1",comtoniKroosWrapper760:"_comtoniKroosWrapper760_xl2as_1",comtoniKroosWrapper420:"_comtoniKroosWrapper420_xl2as_1",comtoniKroosWrapper320:"_comtoniKroosWrapper320_xl2as_1",frameChild:"_frameChild_xl2as_1",filtros:"_filtros_xl2as_1",groupParent:"_groupParent_xl2as_1",shapeIcon:"_shapeIcon_xl2as_1",btnFilters:"_btnFilters_xl2as_1",btnFiltersPC:"_btnFiltersPC_xl2as_1",comquitarFiltros:"_comquitarFiltros_xl2as_1",comquitarFiltros730:"_comquitarFiltros730_xl2as_1",comquitarFiltros480:"_comquitarFiltros480_xl2as_1",comquitarFiltros380:"_comquitarFiltros380_xl2as_1",btnCloseFilters:"_btnCloseFilters_xl2as_1",commejoresJugadores:"_commejoresJugadores_xl2as_1",commejoresJugadores730:"_commejoresJugadores730_xl2as_1",commejoresJugadores480:"_commejoresJugadores480_xl2as_1",mejoresJugadoresSM:"_mejoresJugadoresSM_xl2as_1",toniKroos:"_toniKroos_xl2as_1",teamBar:"_teamBar_xl2as_1",commenuSection:"_commenuSection_xl2as_1",commenuSection960:"_commenuSection960_xl2as_1",comcontainerMenu:"_comcontainerMenu_xl2as_1",comcontainerMenu760:"_comcontainerMenu760_xl2as_1",containerFilters:"_containerFilters_xl2as_1",teamBarParent:"_teamBarParent_xl2as_1",comtopFilters:"_comtopFilters_xl2as_1",comtopFilters1232:"_comtopFilters1232_xl2as_1",comtopFilters420:"_comtopFilters420_xl2as_1",comtopFilters460:"_comtopFilters460_xl2as_1",comlosMejores:"_comlosMejores_xl2as_1",comlosMejores380:"_comlosMejores380_xl2as_1",comlosMejores530:"_comlosMejores530_xl2as_1",comlosMejores730:"_comlosMejores730_xl2as_1",commenuSectionHeader:"_commenuSectionHeader_xl2as_1",commenuSectionHeader1232:"_commenuSectionHeader1232_xl2as_1",commenuSectionHeader960:"_commenuSectionHeader960_xl2as_1",commenuSectionHeader730:"_commenuSectionHeader730_xl2as_1",comdropdown:"_comdropdown_xl2as_1",comdropdown730:"_comdropdown730_xl2as_1",comdropdown1:"_comdropdown1_xl2as_1",comdropdown1730:"_comdropdown1730_xl2as_1",comdropdownParent:"_comdropdownParent_xl2as_1",comdropdownParent730:"_comdropdownParent730_xl2as_1",commenuSectionParentHeader:"_commenuSectionParentHeader_xl2as_1",commenuSectionParentHeader1232:"_commenuSectionParentHeader1232_xl2as_1",commenuSectionParentHeader960:"_commenuSectionParentHeader960_xl2as_1",commenuSectionParentHeader730:"_commenuSectionParentHeader730_xl2as_1",commenuSectionParentHeader430:"_commenuSectionParentHeader430_xl2as_1",comdescubreVideos:"_comdescubreVideos_xl2as_1",comdescubreVideos1232:"_comdescubreVideos1232_xl2as_1",comdescubreVideos960:"_comdescubreVideos960_xl2as_1",allCategories:"_allCategories_xl2as_1",containerScountingBtncom:"_containerScountingBtncom_xl2as_3",btnDeleteAplicacom:"_btnDeleteAplicacom_xl2as_13",SearchBtnBarcom:"_SearchBtnBarcom_xl2as_33",btnLeyendTxtcom:"_btnLeyendTxtcom_xl2as_52",BtnSearchScountingcom:"_BtnSearchScountingcom_xl2as_61",containerPredefinedcom:"_containerPredefinedcom_xl2as_85",containerPredefinedScountingcom:"_containerPredefinedScountingcom_xl2as_92",titleContainerPredefinedcom:"_titleContainerPredefinedcom_xl2as_100",subtitleContainerPredefinedcom:"_subtitleContainerPredefinedcom_xl2as_111"},vht=t.ref(ght()),bht={components:{GSCTableHeader:QR,GscSwitchComponent:XS,GSCFilterperteam:Put,GSCFilters:OR,GSCExpandedInfo:gV,GSCLabel:Jdt,GSCSeasonSelect:MA,GSCTopCategory:Udt,GSCTournamentSelect:TA,GSCRowTable:iV},computed:{...Fct.computed,filterChangePredefined(){return this.filtersPredefinedF},filterChange(){const e={zone:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],playingAs:[1,2],sections:[1,2,3,4,5,6],matchResult:[1,2,3],arrayAgeRange:[1,60],typeZone:1,setNationalitiesIds:this.fVnationalities,setPositionsIds:[1,2,3,4,5,6,7,8,9],booleanAreNationalTeamsVisible:!1,setAvailableNationalTeamsPlayersIds:new Set},o=JSON.stringify(e);if(JSON.stringify(this.filters)!=o)return o},filterGolstats(){return this.FVfilterGolstats},filterButtonProps(){return{...vht.value}}},props:{timeLiveComparativeAvanced:{type:Number,default:6e4},currentSeasonId:{type:Number,default:0},typeData:{type:Number,default:1},canPlayVideos:{type:Boolean,default:!1},teamId:{type:Number,default:0},gameId:{type:Number,default:0},isWidget:{type:Boolean,default:!1},seasonSelected:{type:Object,default:()=>({})},teamWidget:{type:Number,default:0},game:{type:Object,default:()=>({})},teamselect:{type:Number,default:0},seasonActive:{type:Number,default:0},defaultSection:{type:String,default:"Jugadores"},backgroundOdd:{type:String,default:"#172531"},backgroundEven:{type:String,default:"#0d1d29"},tournamentsApiUrl:{type:String,default:""},isFemaleMode:{type:Boolean,default:!1},token:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"}},watch:{async seasonActive(){if(this.seasonActive!=0){this.teams=[];const e=await this.fetchTeams();for(let o=0;o<e.teams.length;o++)this.teams.push({id:e.teams[o].team_id,team:e.teams[o].colloquial_name,logo:e.teams[o].logo})}}},setup(){const e=t.ref("myDivRefTopsFull"),{elementSize:o}=jb(e);return{myDivRefTopsFull:e,elementSize:o}},data(){return{elegibilidadArray:[],updateFilterTeamsScouting:0,modifidFiltersFlag:!1,showfiltersPc:!1,positions:[{name:"Portero",fullname:"POR"},{name:"Defensa central",fullname:"DFC"},{name:"Lateral por izquierda",fullname:"LI"},{name:"Lateral por derecha",fullname:"LD"},{name:"Volante por izquierda",fullname:"VI"},{name:"Volante por derecha",fullname:"VD"},{name:"Volante defensivo",fullname:"VDF"},{name:"Volante ofensivo",fullname:"VO"},{name:"Delantero",fullname:"DEL"},{name:"Desconocida",fullname:"Desc"}],universeData:{minutesPlayed:0,percentMinutesPlayed:0,lastMonths:Array.from({length:24},(e,o)=>o+1),selectedMonth:12,statistics:{totals:!0,averagePerGame:!1,averagePerMinute:!1}},FVbooleanAreNationalTeamsVisible:!1,teamsscouting:[],productivityTranslationMap:null,filterScounting:{tournaments:[1],seasonId:0,categories:[{key:"goals",name:"Goles",ids:[12]},{key:"assists",name:"Asistencias",ids:[10]},{key:"goal_participations",name:"Participaciones en gol",ids:[27]},{key:"headers_rival_area",name:"Cabeceos en área rival",ids:[330,333,423,577,578,331,334,424]},{key:"shots_total",name:"Tiros a gol totales",ids:[91,95,92,93,96,97]}],range_age:[10,40],age_or_year:1,year:1989,nationalities:[3,4,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,221,84,85,86,87,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,222,223,224,225,226,227,228,229,230,231,232,233,234,236,237,239],elegibles:[],minutes_played:211,minutes_played_avg:40,last_months:12,type_stats:1,positions:[1,2,3,4,5,6,7,8,9,10],fouls:!1,yellow_cards:!1,red_cards:!1},expand:!1,playerexpand:0,arrayFiltersPlays:[],filtersPredefinedF:{},categoryPredefinedActive:!1,categoryPredefined:0,typeTable:0,keyUpdateFilter:0,loadingActive:!1,isTeam:!1,arrayPredefinedFilters:[],arrayCategoryFilter:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23],arrayCategoryFilterFull:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23],FVsetAvailableNationalTeamsPlayersIds:new Set,showOnlyCategories:!1,showFullCategory:0,categoryName:"",showFullTable:!1,expansionPanelModePropsTypePlays:{isExpansionPanel:!1,templateProps:{boxShadow:"0px 4px 4px rgba(0, 0, 0, 0)",width:"400px",maxWidth:"400px"},expansionPanelProps:{width:"400px",borderRadius:"8px"},fieldComponentProps:{widthContainer:"400px"}},expansionPanelModeProps:{isExpansionPanel:!1,templateProps:{boxShadow:"0px 4px 4px rgba(0, 0, 0, 0)"},expansionPanelProps:{width:"400px",borderRadius:"8px",fontFamily:"'Poppins-Regular'"},fieldComponentProps:{widthContainer:"100%",title:"Elige el área o zona de cancha",titleFontSize:"13px"}},expansionPanelModePropsMobil:{isExpansionPanel:!0,templateProps:{boxShadow:"0px 4px 4px rgba(0, 0, 0, 0)",padding:"20px 0"},expansionPanelProps:{width:"300px",borderRadius:"8px",height:"45px",fontColor:"rgba(255,255,255, 0.7)",textFontSize:"14px",textFontFamily:"'Poppins-Regular'",padding:"0px 10px"},fieldComponentProps:{widthContainer:"100%",title:"Elige el área o zona de cancha",titleFontSize:"12px",widthField:268,widthFieldGrid:"268px",heightField:180,heightFieldGrid:"180px",heightContainer:"280px"}},expansionPanelModePropsMobil270:{isExpansionPanel:!0,templateProps:{boxShadow:"0px 4px 4px rgba(0, 0, 0, 0)",padding:"20px 0"},expansionPanelProps:{width:"270px",borderRadius:"8px",height:"45px",fontColor:"rgba(255,255,255, 0.7)",textFontSize:"14px",textFontFamily:"'Poppins-Regular'",padding:"0px 10px"},fieldComponentProps:{widthContainer:"100%",title:"Elige el área o zona de cancha",titleFontSize:"12px",widthField:268,widthFieldGrid:"268px",heightField:180,heightFieldGrid:"180px",heightContainer:"280px"}},filters:{zone:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],playingAs:[1,2],sections:[1,2,3,4,5,6],matchResult:[1,2,3],arrayAgeRange:[1,60],typeZone:1,setNationalitiesIds:this.setNationalitiesIds,setPositionsIds:[1,2,3,4,5,6,7,8,9],booleanAreNationalTeamsVisible:!1,setAvailableNationalTeamsPlayersIds:new Set},detaildProductivityCategories:{offensive:{title:"Ofensivo",categories:[{key:"goals",name:"Goles",isSelected:!1,id:[12]},{key:"assists",name:"Asistencias",isSelected:!1,id:[10]},{key:"goal_participations",name:"Participaciones en gol",isSelected:!1,id:[27]},{key:"headers_rival_area",name:"Cabeceos en área rival",isSelected:!1,id:[330,333,423,577,578,331,334,424]},{key:"shots_total",name:"Tiros a gol totales",isSelected:!1,id:[91,95,92,93,96,97]},{key:"shots_on_target",name:"Tiros a gol con destino a portería",isSelected:!1,id:[91,95]},{key:"shots_outside_box",name:"Tiros a gol fuera del área",isSelected:!1,id:[94]},{key:"shots_outside_box_on_target",name:"Tiros a gol fuera del área con destino a portería",isSelected:!1,id:[95]},{key:"shots_inside_box",name:"Tiros a gol dentro del área",isSelected:!1,id:[90]},{key:"shots_inside_box_on_target",name:"Tiros a gol dentro del área con destino a portería",isSelected:!1,id:[91]},{key:"crosses_left",name:"Centros por izquierda",isSelected:!1,id:[13]},{key:"crosses_left_success",name:"Centros por izquierda acertados",isSelected:!1,id:[98,101,104,105]},{key:"crosses_right",name:"Centros por derecha",isSelected:!1,id:[25]},{key:"crosses_right_success",name:"Centros por derecha acertados",isSelected:!1,id:[109,112,115,116]},{key:"dribbles_success",name:"1vs1 exitosos ofensivos",isSelected:!1,id:[4]},{key:"dribbles_to_goal",name:"1vs1 que terminan en gol",isSelected:!1,id:[88]}]},defensive:{title:"Defensivo",categories:[{key:"balls_won_own_area",name:"Bálones ganados en área propia",isSelected:!1,id:[234,241,281,288,399,401,211,231,238,244,280,287,294]},{key:"headers_own_area",name:"Cabeceo en área propia",isSelected:!1,id:[211,231,238,244,280,287,294]},{key:"tackles_won",name:"1vs1 defensivos exitosos",isSelected:!1,id:[5]},{key:"clearances",name:"Rechaces",isSelected:!1,id:[34]}]},possession:{title:"Posesión",categories:[{key:"recoveries_total",name:"Bálones recuperados totales",isSelected:!1,id:[222,223,224,225]},{key:"recoveries_q1",name:"Bálones recuperados 1/4 de cancha",isSelected:!1,id:[222]},{key:"recoveries_q2",name:"Bálones recuperados 2/4 de cancha",isSelected:!1,id:[223]},{key:"recoveries_q3",name:"Bálones recuperados 3/4 de cancha",isSelected:!1,id:[224]},{key:"recoveries_q4",name:"Bálones recuperados 4/4 de cancha",isSelected:!1,id:[225]},{key:"passes_success",name:"Pases acertados",isSelected:!1,id:[213,214,215,216]},{key:"passes_success_q1",name:"Pases acertados en 1/4 de cancha",isSelected:!1,id:[213]},{key:"passes_success_q2",name:"Pases acertados en 2/4 de cancha",isSelected:!1,id:[214]},{key:"passes_success_q3",name:"Pases acertados en 3/4 de cancha",isSelected:!1,id:[215]},{key:"passes_success_q4",name:"Pases acertados en 4/4 de cancha",isSelected:!1,id:[216]}]},offensesConditions:{areYellowCardSelected:!1,areRedCardSelected:!1,areFoulsCommittedSelected:!1}},detailsObject:{playingAs:[{name:"Local",isSelected:!0},{name:"Visitante",isSelected:!0}],gameSections:[{text:"0-15",value:1,isSelected:!0},{text:"16-30",value:2,isSelected:!0},{text:"31-45",value:3,isSelected:!0},{text:"46-60",value:4,isSelected:!0},{text:"61-75",value:5,isSelected:!0},{text:"76-90",value:6,isSelected:!0}]},nameLeagueSelected:"",categoriesPlaysTypes:{offensive:{title:"Ofensivo",categories:[{name:"Goles",isSelected:!0,id:1},{name:"Tiros a gol",isSelected:!0,id:6},{name:"Tiros a gol con destino a portería",isSelected:!0,id:7},{name:"Asistencias",isSelected:!0,id:4},{name:"Centros",isSelected:!0,id:10},{name:"Centros acertados",isSelected:!0,id:11},{name:"Participaciones en gol",isSelected:!0,id:5},{name:"1vs1 exitosos ofensivos",isSelected:!0,id:12},{name:"1vs1 exitosos ofensivos que terminan en gol",isSelected:!0,id:13},{name:"Balones ganados en área rival",isSelected:!0,id:17},{name:"Cabeceos en área rival",isSelected:!0,id:8},{name:"Tiros de esquina",isSelected:!0,id:23}]},defensive:{title:"Defensivo",categories:[{name:"1vs1 defensivos exitosos",isSelected:!0,id:14},{name:"Cabeceo en área propia",isSelected:!0,id:9},{name:"Balones ganados en área propia",isSelected:!0,id:16},{name:"Rechaces",isSelected:!0,id:15},{name:"Atajadas",isSelected:!0,id:22}]},possession:{title:"Posesión",categories:[{name:"Pases acertados",isSelected:!0,id:2},{name:"Balones recuperados en disputa",isSelected:!0,id:3}]},offenses:{title:"Infracciones",categories:[{name:"Faltas cometidas",isSelected:!0,id:18},{name:"Faltas recibidas",isSelected:!0,id:19},{name:"Tarjetas amarillas",isSelected:!0,id:20},{name:"Tarjetas rojas",isSelected:!0,id:21}]},offensesConditions:{areYellowCardSelected:!1,areRedCardSelected:!1,areFoulsCommittedSelected:!1}},categoriesDefault:[{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}],seasonsFilterSelected:0,tournamentsToFilter:[{name:"Liga MX",logo:"https://golstatsimages.blob.core.windows.net/tournaments/liga_mx.png",isSelected:!0,id:1,show_logos:1,tournament_type:0,tournament_status:0,seasons:[{name:"Apertura 2023",related_seasons:[],id:1772,type:0},{name:"Clausura 2023",related_seasons:[{type:2,id:1745},{type:1,id:1746}],id:1694,type:0},{name:"Apertura 2022",related_seasons:[{type:2,id:1591},{type:1,id:1594}],id:1535,type:0},{name:"Grita Mexico C22",related_seasons:[{type:2,id:1520},{type:1,id:1525}],id:1476,type:0},{name:"Grita Mexico A21",related_seasons:[{type:2,id:1446},{type:1,id:1456}],id:1401,type:0},{name:"Guard1anes Clausura 2021",related_seasons:[{type:2,id:1382},{type:1,id:1383}],id:1325,type:0},{name:"Guard1anes 2020",related_seasons:[{type:2,id:1311},{type:1,id:1316}],id:1275,type:0},{name:"Clausura 2020",related_seasons:[],id:1239,type:0},{name:"Apertura 2019",related_seasons:[{type:1,id:1231}],id:1155,type:0},{name:"Clausura 2019",related_seasons:[{type:1,id:1135}],id:1093,type:0},{name:"Apertura 2018",related_seasons:[{type:1,id:1075}],id:1002,type:0}]},{name:"Liga MX Femenil",logo:"https://golstatsimages.blob.core.windows.net/tournaments/femenil_mx.png",isSelected:!0,id:1001,show_logos:1,tournament_type:0,tournament_status:0,seasons:[{name:"Apertura 2023",related_seasons:[],id:1777,type:0},{name:"Clausura 2023",related_seasons:[{type:1,id:1747}],id:1696,type:0},{name:"Apertura 2022",related_seasons:[{type:1,id:1655}],id:1539,type:0},{name:"Grita Mexico C22",related_seasons:[{type:1,id:1523}],id:1485,type:0},{name:"Grita Mexico A21",related_seasons:[{type:1,id:1458}],id:1402,type:0},{name:"Guard1anes Clausura 2021",related_seasons:[{type:1,id:1384}],id:1323,type:0},{name:"Guard1anes 2020",related_seasons:[{type:1,id:1318}],id:1283,type:0},{name:"Clausura 2020",related_seasons:[],id:1241,type:0},{name:"Apertura 2019",related_seasons:[{type:1,id:1227}],id:1157,type:0},{name:"Clausura 2019",related_seasons:[{type:1,id:1132}],id:1095,type:0},{name:"Apertura 2018",related_seasons:[{type:1,id:1072}],id:1004,type:0},{name:"Clausura 2018",related_seasons:[{type:1,id:1237}],id:1236,type:0}]},{name:"Liga Expansion MX",logo:"https://golstatsimages.blob.core.windows.net/tournaments/expansion_mx.png",isSelected:!0,id:1071,show_logos:1,tournament_type:0,tournament_status:0,seasons:[{name:"Apertura 2023",related_seasons:[],id:1776,type:0},{name:"Clausura 2023",related_seasons:[{type:2,id:1742},{type:1,id:1748}],id:1695,type:0},{name:"Apertura 2022",related_seasons:[{type:2,id:1598},{type:1,id:1618}],id:1544,type:0},{name:"Grita Mexico C22",related_seasons:[{type:2,id:1515},{type:1,id:1519}],id:1484,type:0},{name:"Grita Mexico A21",related_seasons:[{type:2,id:1454},{type:1,id:1463}],id:1408,type:0},{name:"Guard1anes Clausura 2021",related_seasons:[{type:2,id:1378},{type:1,id:1380}],id:1327,type:0},{name:"Guard1anes 2020",related_seasons:[{type:2,id:1315},{type:1,id:1317}],id:1287,type:0}]},{name:"Sub-23",logo:null,isSelected:!0,id:1143,show_logos:0,tournament_type:0,tournament_status:0,seasons:[{name:"Apertura 2023",related_seasons:[],id:1785,type:0}]},{name:"Sub-18",logo:null,isSelected:!0,id:1096,show_logos:0,tournament_type:0,tournament_status:0,seasons:[{name:"Apertura 2023",related_seasons:[],id:1782,type:0},{name:"Clausura 2023",related_seasons:[{type:1,id:1751}],id:1714,type:0},{name:"Apertura 2022",related_seasons:[{type:1,id:1593}],id:1543,type:0},{name:"Grita Mexico C22",related_seasons:[{type:1,id:1522}],id:1487,type:0}]},{name:"Sub-16",logo:null,isSelected:!0,id:1095,show_logos:0,tournament_type:0,tournament_status:0,seasons:[{name:"Apertura 2023",related_seasons:[],id:1783,type:0},{name:"Clausura 2023",related_seasons:[{type:1,id:1750}],id:1715,type:0},{name:"Apertura 2022",related_seasons:[{type:1,id:1652}],id:1541,type:0},{name:"Grita Mexico C22",related_seasons:[{type:1,id:1527}],id:1488,type:0}]}],isCup:!1,arrayPredefinedOrigin:[],indexPredefinedFiltersSelected:0,predefinedFiltersMatchLapse:[],predefinedFiltersPlayingAs:[],predefinedFiltersSections:[],updateTables:0,updateTablesfull:0,optionSelected:"Jugadores",optionSelectedSubmenu:"Todas las jugadas",tournamentsUrl:"https://17zyhpyc7c.execute-api.us-west-2.amazonaws.com/prod/tournaments",teamsUrl:"https://d2oco6mqmc.execute-api.us-west-2.amazonaws.com/prod/teamsBySeason/",urlFilter:"https://cqqxaonvm6.execute-api.us-east-2.amazonaws.com/prod/gs2/tops/filters?categories=",retries:3,teams:[],updateFilterGolstats:0,updateFilterPlaytypesGolstats:0,arrayTournaments:[],arraySeasons:{},seasonBytournament:[],updateFilterTeamsScouting:0,filtersTypes:Xr,token:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE",fVnationalities:new Set,fVzone:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],fVplayingAs:[1,2],fVsections:[1,2,3,4,5,6],fVmatchResult:[1,2,3],fVarrayAgeRange:[10,40],FVeligible:[],FVYear:1900,keyTournamentValue:0,fVtypeZone:2,fVsetPositionsIds:[1,2,3,4,5,6,7,8,9],currentIndex:-1,delay:800,teamselectrec:0,tournamentSelected:0,tournamentSelectedObj:{},FVfilterGolstats:[],updateFilterField:0,rowScoutingData:[],openMenuMobil:!1,selectedTournament:{seasons:[]},selectedSeasonObj:{}}},methods:{getnameshort(e){if(!e)return"";var o=e.split(",");if(o[1]===void 0){var s=e.trim().split(/\s+/).filter(Boolean);return s.length>1?s[0].charAt(0)+". "+s[s.length-1]:e.trim()}var B=o[0].split(" "),U=o[1].trim().split(" "),m="";B.length==2||B.length==1?B[0].length<4?m=B[0]+" "+B[1]:m=B[0]:B.length==3?m=B[0]+" "+B[1]:B.length==4&&(m=B[1]+" "+B[2]+" "+B[3]);var y=U[U.length-1]!=""?U[U.length-1].charAt(0):U[U.length-2]?U[U.length-2].charAt(0):"";return m=m.replace(",",""),y+". "+m},setUpTournamentsToFilter(){this.tournamentsToFilter.forEach(e=>{const o=e.id===this.selectedTournament.id;e.isSelected=o,e.isDefaultTournament=o})},async onClickDeleteFilter(){if(this.optionSelectedSubmenu=="Predeterminados")this.resetPredefinedTeamAll();else{this.rowScoutingData=[];for(let B=0;B<this.detaildProductivityCategories.offensive.categories.length;B++)this.detaildProductivityCategories.offensive.categories[B].isSelected=!1;for(let B=0;B<this.detaildProductivityCategories.defensive.categories.length;B++)this.detaildProductivityCategories.defensive.categories[B].isSelected=!1;for(let B=0;B<this.detaildProductivityCategories.possession.categories.length;B++)this.detaildProductivityCategories.possession.categories[B].isSelected=!1;for(let B=0;B<this.detaildProductivityCategories.offensesConditions.length;B++)this.detaildProductivityCategories.offensesConditions[B]=!1;this.setUpTournamentsToFilter();const o=this.$refs.personalDataFilter;o.clearFilters(ju.All),o.clearFilters(ju.AGE_RANGE),o.clearFilters(ju.YEAR),o.clearFilters(ju.NATIONALITY),o.clearFilters(ju.POSITION),this.universeData.minutesPlayed=0,this.universeData.percentMinutesPlayed=0,this.universeData.lastMonths=Array.from({length:24},(B,U)=>U+1),this.universeData.statistics.totals=!0,this.universeData.statistics.averagePerGame=!1,this.universeData.statistics.percentMinutesPlayed=!1;var e=this.arrayFiltersPlays.findIndex(B=>B.type==="onFiltersTournaments");this.arrayFiltersPlays.splice(e,1);const s=await this.fetchTeamsScouting(this.currentSeasonId);this.teamselect=0,this.teamsscouting=[];for(let B=0;B<s.teams.length;B++)this.teamsscouting.push({id:s.teams[B].team_id,team:s.teams[B].colloquial_name,logo:s.teams[B].logo});setTimeout(()=>{this.modifidFiltersFlag=!1},200)}},clickOpenFilters(){this.showfiltersPc=!0},clickCloseFilters(){this.showfiltersPc=!1},async selectedSeason(e){this.seasonActive!==e.id&&(this.seasonActive=e.id,this.resetPredefinedTeamAll(),this.$emit("change-season-id",e.id))},changeTournament(e){e.id!==this.selectedTournament.id&&(this.selectedTournament=e,this.tournamentSelectedObj={propName:"id",value:e.id},this.teamselect=0,this.resetPredefinedTeamAll(),this.setUpTournamentsToFilter())},changeTournamentMovil(e){this.tournamentSelectedObj={propName:"id",value:e.id},this.seasonBytournament=e.seasons,this.teamselect=0},selectedSeasonMovil(e){this.seasonActive=e.id},setRelevantCategoriesPlayer(e){return e===1?[39,40,52,53,54,55,323,324,608,774,802]:[10,12,14,15,27,35,61,217,257,466,519,607,702,730,98,101,109,112,121,122,127,128,135,136,141,142,161,170,179,211,232,235,239,242,282,284,289,291,296,485,486,487,488]},setOpenMedia(e){this.$emit("openmedia",e)},setMediaData(e){let U=[e.id],m=e.team_id;const y={seasonId:e.season_id,isFeaturedPlayers:!1,mainSectionType:1,playListType:2,gameIds:null,playerIds:U,goalkeeperIds:[],categoryIds:this.setRelevantCategoriesPlayer(e.position),teamId:m||0,matchResult:[1,2,3],categorySingleName:"",isRivalSubject:!1,avoidCategorySingleName:!1,currentPlayIndex:0,playData:null,lastClashedGameId:null,tournamentsLastClashes:null,advancedFilter:{playListTitle:"Jugadas Relevantes"}};this.$emit("openmedia",y)},clickprofile(e){e.isTeam?this.$emit("openProfileTeam",{teamId:e.id,seasonId:this.seasonActive}):this.$emit("openProfilePlayer",{playerId:e.id,teamId:e.teamId,seasonId:this.seasonActive})},viewprofile(e,o,s){this.$emit("openProfilePlayer",{playerId:e,teamId:s,seasonId:o||this.seasonActive})},openMenuFilters(){this.openMenuMobil=!this.openMenuMobil,this.showfiltersPc=!0},clickexpand(e){this.expand=e.expand,this.playerexpand=e.id},async loadTopsCategories(){try{const e=this.$store.getters.getProviderId,o=this.$store.getters.getIsDevApis,s=pu.create({headers:{Authorization:`${this.token}`}}),{data:B}=await s.get(uu(this.urlFilter,e,o));if(Array.isArray(B)&&B.length){const U=B.filter(m=>m&&m.id!=null&&m.category_name).map(m=>({id:m.id,name:m.category_name,isSelected:!1}));U.length&&(this.categoriesDefault=U,this.arrayCategoryFilter=U.map(m=>m.id),this.arrayCategoryFilterFull=U.map(m=>m.id))}}catch{}},async loadProductivityTranslation(){const e=this.$store.getters.getProviderId;if(!e||e===1)return;const o=await tie(e);o&&typeof o=="object"&&(this.productivityTranslationMap=o,this.applyProductivityTranslation(o))},applyProductivityTranslation(e){const o=["offensive","defensive","possession"];for(const s of o){const B=this.detaildProductivityCategories[s];B&&Array.isArray(B.categories)&&(B.categories=B.categories.filter(U=>Array.isArray(e[U.key])).map(U=>({...U,id:e[U.key]})))}this.filterScounting.categories=this.filterScounting.categories.filter(s=>Array.isArray(e[s.key])).map(s=>({...s,ids:e[s.key]}))},async getScoutingData(){this.arrayFiltersPlays=[],this.loadingActive=!0;const e=pu.create({headers:{Authorization:`${this.token}`}}),{data:o}=await e.post(uu("https://eh9nhj69z7.execute-api.us-west-2.amazonaws.com/prod/players/productivity",this.$store.getters.getProviderId,this.$store.getters.getIsDevApis),this.filterScounting,{headers:{"Content-Type":"application/json"}});if(this.filterScounting.tournaments.length>0){var s=this.arrayFiltersPlays.findIndex(U=>U.type==="onFiltersTournaments");s!==-1?this.arrayFiltersPlays[s].name=this.filterScounting.tournaments.length>1?"Ligas "+this.filterScounting.tournaments.length:this.nameLeagueSelected!=""?this.nameLeagueSelected:"Liga MX":this.arrayFiltersPlays.push({name:this.filterScounting.tournaments.length>1?"Ligas "+this.filterScounting.tournaments.length:this.nameLeagueSelected!=""?this.nameLeagueSelected:"Liga MX",type:"onFiltersTournaments"})}this.rowScoutingData=[];for(let U=0;U<o.length;U++){o[U];let y=o[U].dob.split("T")[0].split("-");var B={position:U+1,player_name:this.abrevName(o[U].name),player_photo:"https://golstatsimages.blob.core.windows.net/players-profile/"+o[U].player_id+".png",total:o[U].total.toFixed(0),id:o[U].player_id,player_age:this.calcularEdad(o[U].dob),team_abrev:o[U].teams[0].acronym,team_name:o[U].teams[0].team_name,team_logo:Af("https://golstatsimages.blob.core.windows.net/teams-80/"+o[U].teams[0].team_id+".png",this.$store.getters.getProviderId),player_position:o[U].position_id,player_country_flag:"https://golstatsimages.blob.core.windows.net/flags/"+o[U].nationality_id+".jpg",date:y[2]+"."+y[1]+"."+y[0].substring(2,4),team_id:o[U].team_id,nationality_name:_V[o[U].nationality_id],player_games:o[U].games_played,player_min:o[U].minutes_played,league_name:o[U].tournament_name,seasons:o[U].seasons,season_id:o[U].seasons[0]};this.rowScoutingData.push(B)}if(this.seasonsFilterSelected!=0){const U=await this.fetchTeamsScouting(this.seasonsFilterSelected);this.teamselect=0,this.teamselectrec=0,this.teamsscouting=[];for(let m=0;m<U.teams.length;m++)this.teamsscouting.push({id:U.teams[m].team_id,team:U.teams[m].colloquial_name,logo:U.teams[m].logo})}this.loadingActive=!1},abrevName(e){var o=e.split(","),s=o[0].split(" "),B=o[1].trim().split(" "),U="";s.length==2||s.length==1?s[0].length<4?U=s[0]+" "+s[1]:U=s[0]:s.length==3?U=s[0]+" "+s[1]:s.length==4&&(U=s[1]+" "+s[2]+" "+s[3]);var m=B[B.length-1]!=""?B[B.length-1].charAt(0):B[B.length-2]?B[B.length-2].charAt(0):"";U=U.replace(",","");var y=m+". "+U;return y},calcularEdad(e){var o=new Date(e),s=new Date,B=s-o,U=Math.floor(B/(1e3*60*60*24*365.25));return U},async onFiltersTournaments(e){this.modifidFiltersFlag=!0;var o=[];for(let s=0;s<e.length;s++)e[s].isSelected&&o.push(e[s].id);if(o.length==0&&(o=[1]),o.length==1)for(let s=0;s<e.length;s++)e[s].isSelected&&(this.nameLeagueSelected=e[s].name,this.seasonsFilterSelected=e[s].seasons[0].id);else this.seasonsFilterSelected=0,o.length>0&&(this.nameLeagueSelected=o.length+" Ligas");this.filterScounting.tournaments=o,this.filterScounting.seasonId=e[0].seasons[0].id},onFiltersPersonalData(e){if(this.modifidFiltersFlag=!0,e.hasOwnProperty("ageByRange")){const B=e.ageByRange.min==0?10:e.ageByRange.min,U=e.ageByRange.max==0?40:e.ageByRange.max;this.filterScounting.range_age=[B,U],this.filterScounting.age_or_year=1}else this.filterScounting.range_age=[];e.hasOwnProperty("year")?(this.filterScounting.year=e.year,this.filterScounting.age_or_year=0):this.filterScounting.year=0;var o=[];if(e.hasOwnProperty("nationalities")){for(let B=0;B<e.nationalities.length;B++)e.nationalities[B].isSelected&&o.push(e.nationalities[B].id);o.length==0&&(o=[3,4,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,221,84,85,86,87,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,222,223,224,225,226,227,228,229,230,231,232,233,234,236,237,239])}this.filterScounting.elegibles=[],e.hasOwnProperty("eligibility")&&(this.filterScounting.elegibles=[e.eligibility[0].id]);var s=[];for(let B=0;B<e.positions.length;B++)e.positions[B].isSelected&&s.push(e.positions[B].id);s.length==0&&(s=[1,2,3,4,5,6,7,8,9,10]),this.filterScounting.positions=s,this.filterScounting.nationalities=o},onFiltersUniverse(e){this.modifidFiltersFlag=!0,this.filterScounting.minutes_played=Number(e.minutesPlayed),this.filterScounting.last_months=Number(e.lastMonths),this.filterScounting.minutes_played_avg=Number(e.percentMinutesPlayed),this.filterScounting.type_stats=e.statistics.averagePerGame?3:e.statistics.averagePerMinute?2:1},onFiltersProductivity(e){this.modifidFiltersFlag=!0;var o=[];for(let s=0;s<e.productivityFilters.length;s++)o[e.productivityFilters[s].priority-1]={name:e.productivityFilters[s].name,ids:e.productivityFilters[s].id};o.length==0&&(o=[]),this.filterScounting.categories=o,this.filterScounting.fouls=e.offensesConditions.areFoulsCommittedSelected,this.filterScounting.yellow_cards=e.offensesConditions.areYellowCardsSelected,this.filterScounting.red_cards=e.offensesConditions.areRedCardsSelected},onFiltersGolStats(e){if(e.length>0){var o=this.arrayFiltersPlays.findIndex(B=>B.type==="onFiltersPredefined");o!==-1?this.arrayFiltersPlays[o].name=e[0].name:this.arrayFiltersPlays.push({name:e[0].name,type:"onFiltersPredefined"}),this.filtersPredefinedF=e[0].filters}else{var s=this.arrayFiltersPlays.findIndex(B=>B.type==="onFiltersPredefined");if(this.FVfilterGolstats.length>0&&s!==-1){this.filtersPredefinedF=this.filters;for(let U=0;U<this.FVfilterGolstats.length;U++)this.FVfilterGolstats[U].isSelected=!1;var s=this.arrayFiltersPlays.findIndex(U=>U.type==="onFiltersPredefined");s!==-1&&this.arrayFiltersPlays.splice(s,1),this.updateFilterGolstats+=1}}},shouldRender(e){return e<=this.currentIndex},renderNext(){this.currentIndex++,this.currentIndex<this.categoriesDefault.length&&setTimeout(()=>{this.$nextTick(()=>{this.renderNext()})},this.delay)},async onFiltersPlaysTypes(e){if(e.length>0){this.categoryPredefinedActive=!0,this.loadingActive=!0,this.categoryPredefined=e[0].id;var o=this.arrayFiltersPlays.findIndex(B=>B.type==="onFiltersPredefined");if(this.categoriesDefault.length>0&&o!==-1){this.FVfilterGolstats=[],this.filtersPredefinedF={},this.arrayFiltersPlays.splice(o,1);var s=this.arrayFiltersPlays.findIndex(B=>B.type==="onFiltersPredefined");if(s!==-1){for(let B=0;B<this.FVfilterGolstats.length;B++)this.FVfilterGolstats[B].isSelected=!1;s!==-1&&this.arrayFiltersPlays.splice(s,1),this.updateFilterGolstats+=1}}this.updateTables+=1,setTimeout(()=>{this.loadingActive=!1},1e3),await this.getPredefinedfilters(e[0]),this.FVfilterGolstats.length>0&&(this.onFiltersGolStats([this.FVfilterGolstats[0]]),this.FVfilterGolstats[0].isSelected=!0)}else{var o=this.arrayFiltersPlays.findIndex(U=>U.type==="onFiltersPredefinedCategory");if(this.categoriesDefault.length>0&&o!==-1){this.categoryPredefinedActive=!1,this.categoryPredefined=0,this.FVfilterGolstats=[],this.filtersPredefinedF=this.filters,this.arrayFiltersPlays.splice(o,1);for(let m=0;m<this.categoriesDefault.length;m++)this.categoriesDefault[m].isSelected=!1;this.updateFilterPlaytypesGolstats+=1;var s=this.arrayFiltersPlays.findIndex(m=>m.type==="onFiltersPredefined");if(this.FVfilterGolstats.length>0&&s!==-1){for(let m=0;m<this.FVfilterGolstats.length;m++)this.FVfilterGolstats[m].isSelected=!1;s!==-1&&this.arrayFiltersPlays.splice(s,1),this.updateFilterGolstats+=1}}}},deleteCategoryFilter(){this.categoryName="",this.showFullCategory=0,this.showFullTable=!1,delete this.filters.aux},onShowFullTable(e){this.categoryName=e.categoryName,this.showFullCategory=e.category,this.showFullTable=!0,this.loadingActive=!0,setTimeout(()=>{this.filters={zone:this.fVzone,playingAs:this.fVplayingAs,sections:this.fVsections,matchResult:this.fVmatchResult,arrayAgeRange:this.fVarrayAgeRange,typeZone:this.fVtypeZone,setNationalitiesIds:this.fVnationalities,setPositionsIds:this.fVsetPositionsIds,setYear:this.FVYear,aux:this.getRandomNumber(1,1e4),booleanAreNationalTeamsVisible:this.FVbooleanAreNationalTeamsVisible,setAvailableNationalTeamsPlayersIds:this.FVsetAvailableNationalTeamsPlayersIds},this.loadingActive=!1},1e3)},getRandomNumber(e,o){return Math.floor(Math.random()*(o-e+1))+e},applyFiltersBtn(e){},onFiltersPlays(e){if(this.arrayCategoryFilter=[],this.arrayCategoryFilterFull=[],e.playsCategories.length==0){for(let s=0;s<this.categoriesPlaysTypes.offensive.categories.length;s++)this.arrayCategoryFilter.push(this.categoriesPlaysTypes.offensive.categories[s].id),this.arrayCategoryFilterFull.push(this.categoriesPlaysTypes.offensive.categories[s]);for(let s=0;s<this.categoriesPlaysTypes.defensive.categories.length;s++)this.arrayCategoryFilter.push(this.categoriesPlaysTypes.defensive.categories[s].id),this.arrayCategoryFilterFull.push(this.categoriesPlaysTypes.offensive.categories[s]);for(let s=0;s<this.categoriesPlaysTypes.possession.categories.length;s++)this.arrayCategoryFilter.push(this.categoriesPlaysTypes.possession.categories[s].id),this.arrayCategoryFilterFull.push(this.categoriesPlaysTypes.offensive.categories[s]);for(let s=0;s<this.categoriesPlaysTypes.offenses.categories.length;s++)this.arrayCategoryFilter.push(this.categoriesPlaysTypes.offenses.categories[s].id),this.arrayCategoryFilterFull.push(this.categoriesPlaysTypes.offensive.categories[s])}else for(let s=0;s<e.playsCategories.length;s++)e.playsCategories[s].isSelected&&(this.arrayCategoryFilter.push(e.playsCategories[s].id),this.arrayCategoryFilterFull.push(e.playsCategories[s]));var o=this.arrayFiltersPlays.findIndex(s=>s.type==="onFiltersPlays");this.arrayCategoryFilter.length>0&&this.arrayCategoryFilter.length!=23?this.arrayCategoryFilter.length==1?o!=-1?this.arrayFiltersPlays[o].name=this.arrayCategoryFilterFull[0].name:this.arrayFiltersPlays.push({name:this.arrayCategoryFilterFull[0].name,type:"onFiltersPlays"}):o!=-1?this.arrayFiltersPlays[o].name=this.arrayCategoryFilterFull.length+" Tipos de jugadas":this.arrayFiltersPlays.push({name:this.arrayCategoryFilterFull.length+" Tipos de jugadas",type:"onFiltersPlays"}):o!==-1&&this.arrayFiltersPlays.splice(o,1)},async deleteLabelFilter(e){var o=this.arrayFiltersPlays.findIndex(B=>B.type===e);if(o!==-1){if(e=="onFiltersTournaments"){this.rowScoutingData=[];for(let U=0;U<this.detaildProductivityCategories.offensive.categories.length;U++)this.detaildProductivityCategories.offensive.categories[U].isSelected=!1;for(let U=0;U<this.detaildProductivityCategories.defensive.categories.length;U++)this.detaildProductivityCategories.defensive.categories[U].isSelected=!1;for(let U=0;U<this.detaildProductivityCategories.possession.categories.length;U++)this.detaildProductivityCategories.possession.categories[U].isSelected=!1;for(let U=0;U<this.detaildProductivityCategories.offensesConditions.length;U++)this.detaildProductivityCategories.offensesConditions[U]=!1;this.setUpTournamentsToFilter(),this.universeData.minutesPlayed=10,this.universeData.percentMinutesPlayed=0,this.universeData.lastMonths=Array.from({length:24},(U,m)=>m+1),this.universeData.statistics.totals=!0,this.universeData.statistics.averagePerGame=!1,this.universeData.statistics.percentMinutesPlayed=!0;const B=await this.fetchTeamsScouting(this.currentSeasonId);this.teamsscouting=[];for(let U=0;U<B.teams.length;U++)this.teamsscouting.push({id:B.teams[U].team_id,team:B.teams[U].colloquial_name,logo:B.teams[U].logo});this.keyTournamentValue+=1,setTimeout(()=>{this.modifidFiltersFlag=!1},200)}if(e=="onFiltersPlays"){for(let B=0;B<this.categoriesPlaysTypes.offensive.categories.length;B++)this.categoriesPlaysTypes.offensive.categories[B].isSelected=!0;for(let B=0;B<this.categoriesPlaysTypes.defensive.categories.length;B++)this.categoriesPlaysTypes.defensive.categories[B].isSelected=!0,this.arrayCategoryFilter.push(),this.arrayCategoryFilterFull.push(this.categoriesPlaysTypes.offensive.categories[B]);for(let B=0;B<this.categoriesPlaysTypes.possession.categories.length;B++)this.categoriesPlaysTypes.possession.categories[B].isSelected=!0;for(let B=0;B<this.categoriesPlaysTypes.offenses.categories.length;B++)this.categoriesPlaysTypes.offenses.categories[B].isSelected=!0}if(e=="onFiltersField"&&(this.fVzone=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],this.filters={zone:this.fVzone,playingAs:this.fVplayingAs,sections:this.fVsections,matchResult:this.fVmatchResult,arrayAgeRange:this.fVarrayAgeRange,typeZone:this.fVtypeZone,setNationalitiesIds:this.fVnationalities,setPositionsIds:this.fVsetPositionsIds,setYear:this.FVYear,booleanAreNationalTeamsVisible:this.FVbooleanAreNationalTeamsVisible,setAvailableNationalTeamsPlayersIds:this.FVsetAvailableNationalTeamsPlayersIds}),e=="onFiltersPredefined"){this.filtersPredefinedF=this.filters;for(let B=0;B<this.FVfilterGolstats.length;B++)this.FVfilterGolstats[B].isSelected=!1;this.updateFilterGolstats+=1,this.resetPredefinedTeamAll()}if(e=="onFiltersPredefinedCategory"){this.categoryPredefinedActive=!1,this.categoryPredefined=0,this.FVfilterGolstats=[],this.filtersPredefinedF=this.filters;var s=this.arrayFiltersPlays.findIndex(B=>B.type==="onFiltersPredefined");s!==-1&&this.arrayFiltersPlays.splice(s,1);for(let B=0;B<this.categoriesDefault.length;B++)this.categoriesDefault[B].isSelected=!1;this.updateFilterPlaytypesGolstats+=1}e=="onFiltersDetailsTime"&&(this.detailsObject.gameSections[0].isSelected=!0,this.detailsObject.gameSections[1].isSelected=!0,this.detailsObject.gameSections[2].isSelected=!0,this.detailsObject.gameSections[3].isSelected=!0,this.detailsObject.gameSections[4].isSelected=!0,this.detailsObject.gameSections[5].isSelected=!0,this.fVsections=[1,2,3,4,5,6],this.filters={zone:this.fVzone,playingAs:this.fVplayingAs,sections:this.fVsections,matchResult:this.fVmatchResult,arrayAgeRange:this.fVarrayAgeRange,typeZone:this.fVtypeZone,setNationalitiesIds:this.fVnationalities,setPositionsIds:this.fVsetPositionsIds,setYear:this.FVYear,booleanAreNationalTeamsVisible:this.FVbooleanAreNationalTeamsVisible,setAvailableNationalTeamsPlayersIds:this.FVsetAvailableNationalTeamsPlayersIds}),e=="onFiltersDetailsPlayingAs"&&(this.detailsObject.playingAs[0].isSelected=!0,this.detailsObject.playingAs[1].isSelected=!0,this.fVplayingAs=[1,2],this.filters={zone:this.fVzone,playingAs:this.fVplayingAs,sections:this.fVsections,matchResult:this.fVmatchResult,arrayAgeRange:this.fVarrayAgeRange,typeZone:this.fVtypeZone,setNationalitiesIds:this.fVnationalities,setPositionsIds:this.fVsetPositionsIds,setYear:this.FVYear,booleanAreNationalTeamsVisible:this.FVbooleanAreNationalTeamsVisible,setAvailableNationalTeamsPlayersIds:this.FVsetAvailableNationalTeamsPlayersIds}),e=="onFiltersNationality"&&(this.fVnationalities.add(138),this.fVnationalities.add(222),this.fVnationalities.add(163),this.fVnationalities.add(51),this.fVnationalities.add(226),this.fVnationalities.add(10),this.fVnationalities.add(223),this.fVnationalities.add(96),this.fVnationalities.add(171),this.fVnationalities.add(198),this.fVnationalities.add(105),this.fVnationalities.add(80),this.fVnationalities.add(29),this.fVnationalities.add(74),this.fVnationalities.add(216),this.fVnationalities.add(196),this.fVnationalities.add(64),this.fVnationalities.add(155),this.fVnationalities.add(156),this.fVnationalities.add(89),this.fVnationalities.add(106),this.fVnationalities.add(81),this.fVnationalities.add(233),this.fVnationalities.add(204),this.filters={zone:this.fVzone,playingAs:this.fVplayingAs,sections:this.fVsections,matchResult:this.fVmatchResult,arrayAgeRange:this.fVarrayAgeRange,typeZone:this.fVtypeZone,setNationalitiesIds:this.fVnationalities,setPositionsIds:this.fVsetPositionsIds,setYear:this.FVYear,booleanAreNationalTeamsVisible:this.FVbooleanAreNationalTeamsVisible,setAvailableNationalTeamsPlayersIds:this.FVsetAvailableNationalTeamsPlayersIds},this.$refs.personalDataFilterPlayers.clearFilters(ju.NATIONALITY)),e=="onFiltersPosition"&&(this.fVsetPositionsIds=[1,2,3,4,5,6,7,8,9],this.filters={zone:this.fVzone,playingAs:this.fVplayingAs,sections:this.fVsections,matchResult:this.fVmatchResult,arrayAgeRange:this.fVarrayAgeRange,typeZone:this.fVtypeZone,setNationalitiesIds:this.fVnationalities,setPositionsIds:this.fVsetPositionsIds,setYear:this.FVYear,booleanAreNationalTeamsVisible:this.FVbooleanAreNationalTeamsVisible,setAvailableNationalTeamsPlayersIds:this.FVsetAvailableNationalTeamsPlayersIds},this.$refs.personalDataFilterPlayers.clearFilters(ju.POSITION)),e=="onFiltersAge"&&(this.fVarrayAgeRange=[10,40],this.filters={zone:this.fVzone,playingAs:this.fVplayingAs,sections:this.fVsections,matchResult:this.fVmatchResult,arrayAgeRange:this.fVarrayAgeRange,typeZone:this.fVtypeZone,setNationalitiesIds:this.fVnationalities,setPositionsIds:this.fVsetPositionsIds,setYear:this.FVYear,booleanAreNationalTeamsVisible:this.FVbooleanAreNationalTeamsVisible,setAvailableNationalTeamsPlayersIds:this.FVsetAvailableNationalTeamsPlayersIds},this.$refs.personalDataFilterPlayers.clearFilters(ju.AGE_RANGE)),e=="onFiltersElegibility"&&this.$refs.personalDataFilterPlayers.clearFilters(ju.ELIGIBILITY),e=="onFiltersYear"&&(this.$refs.personalDataFilterPlayers.clearFilters(ju.YEAR),this.FVYear=1900,this.filters={zone:this.fVzone,playingAs:this.fVplayingAs,sections:this.fVsections,matchResult:this.fVmatchResult,arrayAgeRange:this.fVarrayAgeRange,typeZone:this.fVtypeZone,setNationalitiesIds:this.fVnationalities,setPositionsIds:this.fVsetPositionsIds,setYear:this.FVYear,booleanAreNationalTeamsVisible:this.FVbooleanAreNationalTeamsVisible,setAvailableNationalTeamsPlayersIds:this.FVsetAvailableNationalTeamsPlayersIds})}this.arrayFiltersPlays.splice(o,1)},onFiltersField(e){e.length==0?this.fVzone=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]:this.fVzone=e;var o=this.arrayFiltersPlays.findIndex(B=>B.type==="onFiltersField");o!=-1?this.arrayFiltersPlays[o].name=this.fVzone.length+" zonas del campo":this.arrayFiltersPlays.push({name:this.fVzone.length+" zonas del campo",type:"onFiltersField"}),[1,23,3,4,5,7,6,9,8,11,10,12,13,15,14,17,16,22].includes(this.category)?this.fVtypeZone=1:this.fVtypeZone=2,this.filters={zone:this.fVzone,playingAs:this.fVplayingAs,sections:this.fVsections,matchResult:this.fVmatchResult,arrayAgeRange:this.fVarrayAgeRange,typeZone:this.fVtypeZone,setNationalitiesIds:this.fVnationalities,setPositionsIds:this.fVsetPositionsIds,setYear:this.FVYear,booleanAreNationalTeamsVisible:this.FVbooleanAreNationalTeamsVisible,setAvailableNationalTeamsPlayersIds:this.FVsetAvailableNationalTeamsPlayersIds},e.length!=16?(this.fVzone.length==4&&this.fVzone.includes(1)&&this.fVzone.includes(2)&&this.fVzone.includes(3)&&this.fVzone.includes(4)&&(o!=-1?this.arrayFiltersPlays[o].name="1/4 de cancha":this.arrayFiltersPlays.push({name:"1/4 de cancha",type:"onFiltersField"})),this.fVzone.length==4&&this.fVzone.includes(5)&&this.fVzone.includes(6)&&this.fVzone.includes(7)&&this.fVzone.includes(8)&&(o!=-1?this.arrayFiltersPlays[o].name="2/4 de cancha":this.arrayFiltersPlays.push({name:"2/4 de cancha",type:"onFiltersField"})),this.fVzone.length==4&&this.fVzone.includes(9)&&this.fVzone.includes(10)&&this.fVzone.includes(11)&&this.fVzone.includes(12)&&(o!=-1?this.arrayFiltersPlays[o].name="3/4 de cancha":this.arrayFiltersPlays.push({name:"3/4 de cancha",type:"onFiltersField"})),this.fVzone.length==4&&this.fVzone.includes(13)&&this.fVzone.includes(14)&&this.fVzone.includes(15)&&this.fVzone.includes(16)&&(o!=-1?this.arrayFiltersPlays[o].name="4/4 de cancha":this.arrayFiltersPlays.push({name:"4/4 de cancha",type:"onFiltersField"})),this.fVzone.length==8&&this.fVzone.includes(1)&&this.fVzone.includes(2)&&this.fVzone.includes(3)&&this.fVzone.includes(4)&&this.fVzone.includes(5)&&this.fVzone.includes(6)&&this.fVzone.includes(7)&&this.fVzone.includes(8)&&(o!=-1?this.arrayFiltersPlays[o].name="cancha propia":this.arrayFiltersPlays.push({name:"cancha propia",type:"onFiltersField"})),this.fVzone.length==8&&this.fVzone.includes(9)&&this.fVzone.includes(10)&&this.fVzone.includes(11)&&this.fVzone.includes(12)&&this.fVzone.includes(13)&&this.fVzone.includes(14)&&this.fVzone.includes(15)&&this.fVzone.includes(16)&&(o!=-1?this.arrayFiltersPlays[o].name="cancha rival":this.arrayFiltersPlays.push({name:"cancha rival",type:"onFiltersField"}))):this.arrayFiltersPlays.splice(o,1)},addFilterPlayingAS(){var e=this.arrayFiltersPlays.findIndex(o=>o.type==="onFiltersDetailsPlayingAs");e!=-1?this.fVplayingAs.length==1?this.arrayFiltersPlays[e].name=this.fVplayingAs.includes(1)?"Local":"Visitante":this.arrayFiltersPlays.splice(e,1):this.fVplayingAs.length==1&&this.arrayFiltersPlays.push({name:this.fVplayingAs.includes(1)?"Local":"Visitante",type:"onFiltersDetailsPlayingAs"})},onFiltersDetails(e){var o=[];this.filters.setNationalitiesIds=this.setNationalitiesIds;var s=[];for(let m=0;m<e.playingAs.length;m++)if(e.playingAs[m].isSelected){const y=e.playingAs[m].name=="Local"?1:2;o.push(y)}for(let m=0;m<e.gameSections.length;m++)e.gameSections[m].isSelected&&s.push(e.gameSections[m].value);this.fVsections=s,this.fVplayingAs=o;var B=this.arrayFiltersPlays.findIndex(m=>m.type==="onFiltersDetailsTime"),U="los minutos del ";this.fVsections.length!=6&&this.fVsections.length>0?(this.fVsections.includes(1)&&(U+=", 0-15"),this.fVsections.includes(2)&&(U+=", 15-30"),this.fVsections.includes(3)&&(U+=", 30-45"),this.fVsections.includes(4)&&(U+=", 45-60"),this.fVsections.includes(5)&&(U+=", 60-75"),this.fVsections.includes(6)&&(U+=", 75-90"),B!=-1?this.arrayFiltersPlays[B].name=U:this.arrayFiltersPlays.push({name:U,type:"onFiltersDetailsTime"}),this.fVsections.length==3&&this.fVsections.includes(1)&&this.fVsections.includes(2)&&this.fVsections.includes(3)&&(B!=-1?this.arrayFiltersPlays[B].name="Primer tiempo":this.arrayFiltersPlays.push({name:"Primer tiempo",type:"onFiltersDetailsTime"})),this.fVsections.length==3&&this.fVsections.includes(4)&&this.fVsections.includes(5)&&this.fVsections.includes(6)&&(B!=-1?this.arrayFiltersPlays[B].name="Segundo tiempo":this.arrayFiltersPlays.push({name:"Segundo tiempo",type:"onFiltersDetailsTime"})),this.fVsections.length==1&&this.fVsections.includes(1)&&(B!=-1?this.arrayFiltersPlays[B].name="los primeros 15 minutos del partido":this.arrayFiltersPlays.push({name:"los primeros 15 minutos del partido",type:"onFiltersDetailsTime"})),this.fVsections.length==1&&this.fVsections.includes(3)&&(B!=-1?this.arrayFiltersPlays[B].name="los últimos 15 minutos del primer tiempo":this.arrayFiltersPlays.push({name:"los últimos 15 minutos del primer tiempo",type:"onFiltersDetailsTime"})),this.fVsections.length==1&&this.fVsections.includes(4)&&(B!=-1?this.arrayFiltersPlays[B].name="los primeros 15 minutos del segundo tiempo":this.arrayFiltersPlays.push({name:"los primeros 15 minutos del segundo tiempo",type:"onFiltersDetailsTime"})),this.fVsections.length==1&&this.fVsections.includes(6)&&(B!=-1?this.arrayFiltersPlays[B].name="los últimos 15 minutos del segundo tiempo":this.arrayFiltersPlays.push({name:"los últimos 15 minutos del segundo tiempo",type:"onFiltersDetailsTime"})),this.fVsections.length==2&&this.fVsections.includes(1)&&this.fVsections.includes(2)&&(B!=-1?this.arrayFiltersPlays[B].name="los primeros 30 minutos del partido":this.arrayFiltersPlays.push({name:"los primeros 30 minutos del partido",type:"onFiltersDetailsTime"})),this.fVsections.length==2&&this.fVsections.includes(5)&&this.fVsections.includes(6)&&(B!=-1?this.arrayFiltersPlays[B].name="los últimos 30 minutos del segundo tiempo":this.arrayFiltersPlays.push({name:"los últimos 30 minutos del segundo tiempo",type:"onFiltersDetailsTime"}))):B!=-1&&this.arrayFiltersPlays.splice(B,1),this.addFilterPlayingAS(),this.filters={zone:this.fVzone,playingAs:this.fVplayingAs,sections:this.fVsections,matchResult:this.fVmatchResult,arrayAgeRange:this.fVarrayAgeRange,typeZone:this.fVtypeZone,setNationalitiesIds:this.fVnationalities,setPositionsIds:this.fVsetPositionsIds,setYear:this.FVYear,booleanAreNationalTeamsVisible:this.FVbooleanAreNationalTeamsVisible,setAvailableNationalTeamsPlayersIds:this.FVsetAvailableNationalTeamsPlayersIds}},async resetScouting(){this.universeData.minutesPlayed=0,this.universeData.percentMinutesPlayed=0,this.universeData.lastMonths=Array.from({length:24},(B,U)=>U+1),this.universeData.statistics.totals=!0,this.universeData.statistics.averagePerGame=!1,this.universeData.statistics.percentMinutesPlayed=!1;const e=this.$refs.personalDataFilter;e.clearFilters(ju.All),e.clearFilters(ju.AGE_RANGE),e.clearFilters(ju.YEAR),e.clearFilters(ju.NATIONALITY),e.clearFilters(ju.POSITION),this.rowScoutingData=[];for(let B=0;B<this.detaildProductivityCategories.offensive.categories.length;B++)this.detaildProductivityCategories.offensive.categories[B].isSelected=!1;for(let B=0;B<this.detaildProductivityCategories.defensive.categories.length;B++)this.detaildProductivityCategories.defensive.categories[B].isSelected=!1;for(let B=0;B<this.detaildProductivityCategories.possession.categories.length;B++)this.detaildProductivityCategories.possession.categories[B].isSelected=!1;for(let B=0;B<this.detaildProductivityCategories.offensesConditions.length;B++)this.detaildProductivityCategories.offensesConditions[B]=!1;var o=this.arrayFiltersPlays.findIndex(B=>B.type==="onFiltersTournaments");this.arrayFiltersPlays.splice(o,1),this.setUpTournamentsToFilter();const s=await this.fetchTeamsScouting(this.currentSeasonId);this.teamselect=0,this.teamsscouting=[];for(let B=0;B<s.teams.length;B++)this.teamsscouting.push({id:s.teams[B].team_id,team:s.teams[B].colloquial_name,logo:s.teams[B].logo})},onFiltersData(e){var o=0,s=0;e.ageByRange&&(e.ageByRange.min==0?o=1:o=e.ageByRange.min,e.ageByRange.max==0?s=40:s=e.ageByRange.max,this.fVarrayAgeRange=[o,s]),e.year&&(this.FVYear=e.year),this.fVnationalities=new Set;let B="",U="";if(this.fVsetPositionsIds=[],e.hasOwnProperty("nationalities")){this.FVbooleanAreNationalTeamsVisible=!1,this.FVsetAvailableNationalTeamsPlayersIds=new Set;for(let b=0;b<e.nationalities.length;b++)e.nationalities[b].isSelected&&this.fVnationalities.add(e.nationalities[b].id)}if(this.FVeligible=[],e.hasOwnProperty("eligibility")){this.FVbooleanAreNationalTeamsVisible=!0;for(let b=0;b<this.elegibilidadArray.length;b++)this.FVsetAvailableNationalTeamsPlayersIds.add(this.elegibilidadArray[b])}for(let b=0;b<e.positions.length;b++)e.positions[b].isSelected&&this.fVsetPositionsIds.push(e.positions[b].id);if(e.hasOwnProperty("nationalities"))var m=e.nationalities.filter(b=>b.isSelected===!0);var y=e.positions.filter(b=>b.isSelected===!0);if(y.length==1&&(B=y[0].name),e.hasOwnProperty("nationalities")&&m.length==1&&(U=m[0].name),setTimeout(()=>{this.filters={zone:this.fVzone,playingAs:this.fVplayingAs,sections:this.fVsections,matchResult:this.fVmatchResult,arrayAgeRange:this.fVarrayAgeRange,typeZone:this.fVtypeZone,elegible:this.FVeligible,setNationalitiesIds:this.fVnationalities,setPositionsIds:this.fVsetPositionsIds,setYear:this.FVYear,booleanAreNationalTeamsVisible:this.FVbooleanAreNationalTeamsVisible,setAvailableNationalTeamsPlayersIds:this.FVsetAvailableNationalTeamsPlayersIds}},1e3),this.FVbooleanAreNationalTeamsVisible){var a=this.arrayFiltersPlays.findIndex(b=>b.type==="onFiltersElegibility");a!=-1?this.arrayFiltersPlays[a].name="Elegibles":this.arrayFiltersPlays.push({name:"Elegibles",type:"onFiltersElegibility"})}else{var a=this.arrayFiltersPlays.findIndex(x=>x.type==="onFiltersElegibility");this.arrayFiltersPlays.splice(a,1)}if(this.fVsetPositionsIds.length!=9&&this.fVsetPositionsIds.length>0){var v=this.arrayFiltersPlays.findIndex(b=>b.type==="onFiltersPosition");v!=-1?this.fVsetPositionsIds.length>0?this.arrayFiltersPlays[v].name=this.fVsetPositionsIds.length>1?this.fVsetPositionsIds.length+" Posiciones de juego":"Posicion de juego "+B:this.arrayFiltersPlays.splice(v,1):this.arrayFiltersPlays.push({name:this.fVsetPositionsIds.length>1?this.fVsetPositionsIds.length+" Posiciones de juego":"Posicion de juego "+B,type:"onFiltersPosition"})}if(this.FVYear!=0&&this.FVYear!=1900&&this.FVYear){var p=this.arrayFiltersPlays.findIndex(b=>b.type==="onFiltersYear");p!=-1?this.arrayFiltersPlays[p].name=this.FVYear:this.arrayFiltersPlays.push({name:this.FVYear,type:"onFiltersYear"})}if(this.fVarrayAgeRange[0]>=e.ageLimits.min&&this.fVarrayAgeRange[1]<=e.ageLimits.max)if(this.fVarrayAgeRange[0]>e.ageLimits.min||this.fVarrayAgeRange[1]<e.ageLimits.max){var r=this.arrayFiltersPlays.findIndex(b=>b.type==="onFiltersAge");r!=-1?this.fVarrayAgeRange.length>0?this.arrayFiltersPlays[r].name=this.fVarrayAgeRange[0]!=this.fVarrayAgeRange[1]?this.fVarrayAgeRange[0]+" - "+this.fVarrayAgeRange[1]+" años":this.fVarrayAgeRange[1]+" años":this.arrayFiltersPlays.splice(r,1):this.arrayFiltersPlays.push({name:this.fVarrayAgeRange[0]!=this.fVarrayAgeRange[1]?this.fVarrayAgeRange[0]+" - "+this.fVarrayAgeRange[1]+" años":this.fVarrayAgeRange[1]+" años",type:"onFiltersAge"})}else{var r=this.arrayFiltersPlays.findIndex(x=>x.type==="onFiltersAge");r!=-1&&this.arrayFiltersPlays.splice(r,1)}if(e.hasOwnProperty("nationalities")&&this.fVnationalities.size!=e.nationalities.length&&this.fVnationalities.size>0){var _=this.arrayFiltersPlays.findIndex(b=>b.type==="onFiltersNationality");_!=-1?this.fVnationalities.size>0?this.arrayFiltersPlays[_].name=this.fVnationalities.size>1?this.fVnationalities.size+" Nacionalidades":"Nacionalidad "+U:this.arrayFiltersPlays.splice(_,1):this.arrayFiltersPlays.push({name:this.fVnationalities.size>1?this.fVnationalities.size+" Nacionalidades":"Nacionalidad "+U,type:"onFiltersNationality"})}},clickAll(e){},clickAllAll(e){},clickTeam(e){},clickTeamScouting(e){},resetFilterTeamAndPlayers(){this.filters={zone:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],playingAs:[1,2],sections:[1,2,3,4,5,6],matchResult:[1,2,3],arrayAgeRange:[1,60],typeZone:1,setNationalitiesIds:this.setNationalitiesIds,setPositionsIds:[1,2,3,4,5,6,7,8,9],setYear:this.FVYear,booleanAreNationalTeamsVisible:!1,setAvailableNationalTeamsPlayersIds:new Set}},async changeTabsGeneral(e){if(this.resetPredefinedTeamAll(),this.showfiltersPc=!0,this.optionSelected=e,this.optionSelectedSubmenu="Todas las jugadas",this.filtersPredefinedF={},this.categoryPredefinedActive=!1,this.categoryPredefined=0,e=="Equipos"&&(this.typeTable=1,this.isTeam=!0,this.updateTables+=1,this.rowScoutingData=[],this.arrayFiltersPlays=[],this.teamselect=0,this.resetFilterTeamAndPlayers(),this.resetScouting()),e=="Jugadores"&&(this.typeTable=0,this.isTeam=!1,this.teamselect=0,this.updateTables+=1,this.rowScoutingData=[],this.resetFilterTeamAndPlayers(),this.resetScouting()),e=="Scouting"){this.rowScoutingData=[],this.teamselect=0,this.arrayFiltersPlays=[];const o=await this.fetchTeamsScouting(this.currentSeasonId);this.teamsscouting=[];for(let s=0;s<o.teams.length;s++)this.teamsscouting.push({id:o.teams[s].team_id,team:o.teams[s].colloquial_name,logo:o.teams[s].logo});setTimeout(()=>{this.modifidFiltersFlag=!1},200),this.resetFilterTeamAndPlayers()}},resetPredefinedTeamAll(){var e=this.arrayFiltersPlays.findIndex(s=>s.type==="onFiltersPredefined");if(this.categoriesDefault.length>0&&e!==-1){this.categoryPredefinedActive=!1,this.categoryPredefined=0,this.FVfilterGolstats=[],this.filtersPredefinedF={},this.arrayFiltersPlays.splice(e,1);for(let s=0;s<this.categoriesDefault.length;s++)this.categoriesDefault[s].isSelected=!1;this.updateFilterPlaytypesGolstats+=1;var o=this.arrayFiltersPlays.findIndex(s=>s.type==="onFiltersPredefined");if(o!==-1){for(let s=0;s<this.FVfilterGolstats.length;s++)this.FVfilterGolstats[s].isSelected=!1;o!==-1&&this.arrayFiltersPlays.splice(o,1),this.updateFilterGolstats+=1}}},changeTabsSubmenu(e){e!="Predeterminados"?this.resetPredefinedTeamAll():this.arrayFiltersPlays=[],this.optionSelectedSubmenu=e},async fetchTournaments(){const e=pu.create({headers:{Authorization:`${this.token}`}}),o=this.$store.getters.getProviderId,s=this.$store.getters.getIsDevApis,{data:B}=await e.get(uu(this.tournamentsUrl,o,s));return B},async fetchTeams(){const e=pu.create({headers:{Authorization:`${this.token}`}}),o=this.$store.getters.getProviderId,s=this.$store.getters.getIsDevApis,{data:B}=await e.get(uu(this.teamsUrl+this.seasonActive,o,s));return B},async fetchTeamsScouting(e){const o=pu.create({headers:{Authorization:`${this.token}`}}),s=this.$store.getters.getProviderId,B=this.$store.getters.getIsDevApis,{data:U}=await o.get(uu(this.teamsUrl+e,s,B));return U},async getPredefinedfilters(e){this.arrayPredefinedFilters=[],this.arrayPredefinedOrigin=[];var o="";e.id==1?o=this.urlFilter:o=this.urlFilter;const s=pu.create({headers:{Authorization:`${this.token}`}}),{data:B}=await s.get(uu(o+e.id,this.$store.getters.getProviderId,this.$store.getters.getIsDevApis));if(Object.keys(B[0].match_lapse_combinations).forEach(_=>{this.predefinedFiltersMatchLapse[_.toString()]=B[0].match_lapse_combinations[_]}),Object.keys(B[0].playing_as_combinations).forEach(_=>{this.predefinedFiltersPlayingAs[_.toString()]=B[0].playing_as_combinations[_]}),Object.keys(B[0].field_sections_combinations).forEach(_=>{this.predefinedFiltersSections[_.toString()]=B[0].field_sections_combinations[_]}),B[0]){for(let _=0;_<B[0].filter_records.length;_++){var U=B[0].description;if(B[0].filter_records[_].field_sections!==void 0){const x=B[0].filter_records[_].field_sections.toString();(this.predefinedFiltersSections[x]||this.predefinedFiltersSections[x]=="")&&(this.predefinedFiltersSections[x]==""?U=U.replace(" [en {field_sections}]",this.predefinedFiltersSections[x]):U=U.replace("{field_sections}",this.predefinedFiltersSections[x]))}if(B[0].filter_records[_].match_lapse!==void 0){const x=B[0].filter_records[_].match_lapse.toString();(this.predefinedFiltersMatchLapse[x]||this.predefinedFiltersMatchLapse[x]=="")&&(this.predefinedFiltersMatchLapse[x]==""?U=U.replace(" [durante {match_lapse}]",this.predefinedFiltersMatchLapse[x]):U=U.replace("{match_lapse}",this.predefinedFiltersMatchLapse[x]))}if(B[0].filter_records[_].playing_as!==void 0){const x=B[0].filter_records[_].playing_as.toString();(this.predefinedFiltersPlayingAs[x]||this.predefinedFiltersPlayingAs[x]=="")&&(this.predefinedFiltersPlayingAs[x]==""?U=U.replace(" [jugando como {playing_as}]",this.predefinedFiltersPlayingAs[x]):U=U.replace("{playing_as}",this.predefinedFiltersPlayingAs[x]))}B[0].filter_records[_].section_type!==void 0&&(this.optionSelected=="Jugadores"?U=U.replace("{section_type}","Jugadores"):U=U.replace("{section_type}","Equipos")),U=U.replace(/\[/g,""),U=U.replace(/\]/g,""),U=U.replace("{category_name}",B[0].category_name);const b=U.split(": ");var m=b[1];m.length>129&&this.windowWidth>1358&&(m=m.substring(0,129),m=m+"<span id='showIDtootip' class='dots' style='width: 100px; height: 20px; background: red; z-index: 6;'>...</span>"),(!this.isCup||B[0].filter_records[_].playing_as.length===2)&&this.arrayPredefinedFilters.push({id:_,category_name:e.name,id_category:B[0].id,title:b[0]+":",text:b[1],textOrigin:B[0].description,titledots:m,filtersPredefined:{matchResult:B[0].filter_records[_].match_result,playingAs:B[0].filter_records[_].playing_as,sections:B[0].filter_records[_].match_lapse,type:this.optionSelected=="Equipos"?2:1,typeZone:B[0].type_zone,zone:B[0].filter_records[_].field_sections,end_age:0,start_age:0,nationalities:[],elegible:[],positions:[]}})}var y=[];for(let _=0;_<this.arrayPredefinedFilters.length;_++){var a=0,v=new Set,p={},r=this.arrayPredefinedFilters[_].text.replace(/\*.*?\*/,"");if(r=r.replace(/\*/g,""),r=r.replace(/ +/g," "),this.arrayPredefinedFilters[_].filtersPredefined.elegible.length>0&&(a+=1),(this.arrayPredefinedFilters[_].filtersPredefined.end_age.length!=0||this.arrayPredefinedFilters[_].filtersPredefined.start_age.length!=0)&&(a+=1),this.arrayPredefinedFilters[_].filtersPredefined.end_age!=0&&this.arrayPredefinedFilters[_].filtersPredefined.start_age!=0?p.arrayAgeRange=[this.arrayPredefinedFilters[_].filtersPredefined.start_age,this.arrayPredefinedFilters[_].filtersPredefined.end_age]:this.arrayPredefinedFilters[_].filtersPredefined.end_age==0&&this.arrayPredefinedFilters[_].filtersPredefined.start_age==0?p.arrayAgeRange=[1,60]:this.arrayPredefinedFilters[_].filtersPredefined.start_age!=0&&this.arrayPredefinedFilters[_].filtersPredefined.end_age==0?p.arrayAgeRange=[this.arrayPredefinedFilters[_].filtersPredefined.start_age,60]:p.arrayAgeRange=[1,this.arrayPredefinedFilters[_].filtersPredefined.end_age],this.arrayPredefinedFilters[_].filtersPredefined.matchResult.length!=3&&(a+=1),p.matchResult=this.arrayPredefinedFilters[_].filtersPredefined.matchResult,this.arrayPredefinedFilters[_].filtersPredefined.nationalities.length>0&&(a+=1),this.arrayPredefinedFilters[_].filtersPredefined.nationalities.length!=0){for(let b=0;b<this.arrayPredefinedFilters[_].filtersPredefined.nationalities.length;b++)v.add(this.arrayPredefinedFilters[_].filtersPredefined.nationalities[b]);p.setNationalitiesIds=v}else v.add(138),v.add(222),v.add(163),v.add(51),v.add(226),v.add(10),v.add(223),v.add(96),v.add(171),v.add(198),v.add(105),v.add(80),v.add(29),v.add(74),v.add(216),v.add(196),v.add(64),v.add(155),v.add(156),v.add(89),v.add(106),v.add(81),v.add(233),v.add(204),p.setNationalitiesIds=v;this.arrayPredefinedFilters[_].filtersPredefined.playingAs.length!=2&&(a+=1),p.playingAs=this.arrayPredefinedFilters[_].filtersPredefined.playingAs,this.arrayPredefinedFilters[_].filtersPredefined.positions.length>0&&(a+=1),this.arrayPredefinedFilters[_].filtersPredefined.positions.length>0?p.setPositionsIds=this.arrayPredefinedFilters[_].filtersPredefined.positions:p.setPositionsIds=[1,2,3,4,5,6,7,8,9],this.arrayPredefinedFilters[_].filtersPredefined.sections.length!=6&&(a+=1),this.arrayPredefinedFilters[_].filtersPredefined.sections.length>0?p.sections=this.arrayPredefinedFilters[_].filtersPredefined.sections:p.sections=[1,2,3,4,5,6],this.arrayPredefinedFilters[_].filtersPredefined.zone.length!=16&&(a+=1),this.arrayPredefinedFilters[_].filtersPredefined.zone.length>0?p.zone=this.arrayPredefinedFilters[_].filtersPredefined.zone:p.zone=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],p.typeZone=this.arrayPredefinedFilters[_].filtersPredefined.typeZone,y.push({id:_+1,name:r,isSelected:!1,value:a,filters:p})}this.FVfilterGolstats=y,this.updateFilterGolstats+=1,this.arrayPredefinedOrigin=JSON.parse(JSON.stringify(this.arrayPredefinedFilters))}},getTextFilterPredefinedCustom(){this.setDinamicFilters(this.filterEmitAux);var e=this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].textOrigin;const o=this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.zone.sort((r,_)=>r-_).toString();this.predefinedFiltersSections[o]||this.predefinedFiltersSections[o]==""?this.predefinedFiltersSections[o]==""?e=e.replace(" [en {field_sections}]",this.predefinedFiltersSections[o]):e=e.replace("{field_sections}",this.predefinedFiltersSections[o]):e=e.replace("{field_sections}",this.predefinedFiltersSections.other);var s=!1;this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.nationalities.size>0?this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.nationalities.size==this.setNationalityIds.size?(e=e.replace("[{nationality}]",""),e=e.replace("[de las nacionalidades y posiciones seleccionadas]",""),e=e.replace("[de las nacionalidades seleccionadas]","")):this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.nationalities.size==1?(e=e.replace("[{nationality}]",this.$t(`gentilicios[${[...this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.nationalities][0]}]`)),e=e.replace("[de las nacionalidades y posiciones seleccionadas]",""),e=e.replace("[de las nacionalidades seleccionadas]","")):this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.positions.size>0&&this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.positions.size!=this.setPositionsIds.size?(s=!0,e=e.replace("[{nationality}]",""),e=e.replace("[de las nacionalidades seleccionadas]","")):(e=e.replace("[{nationality}]",""),e=e.replace("[de las nacionalidades y posiciones seleccionadas]","")):(e=e.replace("[{nationality}]",""),e=e.replace("[de las nacionalidades y posiciones seleccionadas]",""),e=e.replace("[de las nacionalidades seleccionadas]","")),this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.nationalities.size>0?(s||this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.positions.size==this.setPositionsIds.size)&&(e=e.replace("[de las posiciones seleccionadas]","")):e=e.replace("[de las posiciones seleccionadas]",""),this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.start_age!=0&&this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.end_age!=0?this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.start_age!=this.arrayAgeRange[0]&&this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.end_age!=this.arrayAgeRange[1]?this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.start_age==this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.end_age?(e=e.replace("[de {min_age} a {max_age} años]",""),e=e.replace("[de {min_age} años]","[de "+this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.start_age+" años]")):(e=e.replace("[de {min_age} años]",""),e=e.replace("[de {min_age} a {max_age} años]","[de "+this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.start_age+" a "+this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.end_age+" años]")):this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.start_age!=this.arrayAgeRange[0]||this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.end_age!=this.arrayAgeRange[1]?this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.start_age==this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.end_age?(e=e.replace("[de {min_age} a {max_age} años]",""),e=e.replace("[de {min_age} años]","[de "+this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.start_age+" años]")):(e=e.replace("[de {min_age} años]",""),e=e.replace("[de {min_age} a {max_age} años]","[de "+this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.start_age+" a "+this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.end_age+" años]")):(e=e.replace("[de {min_age} a {max_age} años]",""),e=e.replace("[de {min_age} años]","")):(e=e.replace("[de {min_age} años]",""),e=e.replace("[de {min_age} a {max_age} años]",""));const B=this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.sections.sort().toString();if(this.predefinedFiltersMatchLapse[B]||this.predefinedFiltersMatchLapse[B]=="")this.predefinedFiltersMatchLapse[B]==""?e=e.replace(" [durante {match_lapse}]",this.predefinedFiltersMatchLapse[B]):e=e.replace("{match_lapse}",this.predefinedFiltersMatchLapse[B]);else{e=e.replace("{match_lapse}"," "+this.predefinedFiltersMatchLapse.other);var U="";B.includes(1)&&(U=U+"0-15, "),B.includes(2)&&(U=U+"16-30, "),B.includes(3)&&(U=U+"31-45, "),B.includes(4)&&(U=U+"46-60, "),B.includes(5)&&(U=U+"61-75, "),B.includes(6)&&(U=U+"76-90, "),U=U.slice(0,-2),U=U.replace(/,([^,]*)$/," y $1"),e=e.replace("{match_lapse_selected}",U)}const m=this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.playingAs.sort().toString();(this.predefinedFiltersPlayingAs[m]||this.predefinedFiltersPlayingAs[m]=="")&&(this.predefinedFiltersPlayingAs[m]==""?e=e.replace(" [jugando como {playing_as}]",this.predefinedFiltersPlayingAs[m]):e=e.replace("{playing_as}",this.predefinedFiltersPlayingAs[m])),this.typeSelected==1?this.getUser.tournament==1001?this.category.id==22?e=e.replace("{section_type}","Porteras"):e=e.replace("{section_type}","Jugadoras"):this.category.id==22?e=e.replace("{section_type}","Porteros"):e=e.replace("{section_type}","Jugadores"):e=e.replace("{section_type}","Equipos"),e=e.replace(/\[/g,""),e=e.replace(/\]/g,""),e=e.replace("{category_name}",this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].category_name);const y=e.split(": ");let a=y[1].charAt(0).toUpperCase()+y[1].toLowerCase().slice(1),v=y[1].charAt(0).toUpperCase()+y[1].toLowerCase().slice(1);this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].text=a,this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].title=y[0]+":";const p=v.match(/\*/g);if(p&&p.length)if(p.length%2===0)for(let r=1;r<=p.length;r++)r%2===0||(v=v.replace("*",'<span style="color: #ffff03" >'));else v=v.replaceAll("*","");this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].titledots=v},intervalidtops(e){this.$emit("intervalidtops",e)}},mounted(){sessionStorage.getItem("sidpdfil")!==null&&sessionStorage.setItem("sidpdfil",0),this.renderNext(),this.teamId!==0&&this.optionSelected!=="Scouting"&&this.clickTeam(this.teamId),this.defaultSection!=="Jugadores"&&(this.defaultSection==="Scouting"&&this.selectedSeason(this.currentSeasonId),this.changeTabsGeneral(this.defaultSection))},async created(){try{await this.loadTopsCategories(),await this.loadProductivityTranslation();const e=pu.create({headers:{"Content-Type":"application/json"}});e.interceptors.request.use(s=>(delete s.headers.Authorization,s));const o=await e.get(qy("https://golstats-microservices.s3.us-west-2.amazonaws.com/eligibles/elegibles.json",this.$store.getters.getProviderId),{headers:{"Content-Type":"application/json"}});this.elegibilidadArray=o.data,this.fVnationalities.add(138),this.fVnationalities.add(222),this.fVnationalities.add(163),this.fVnationalities.add(51),this.fVnationalities.add(226),this.fVnationalities.add(10),this.fVnationalities.add(223),this.fVnationalities.add(96),this.fVnationalities.add(171),this.fVnationalities.add(198),this.fVnationalities.add(105),this.fVnationalities.add(80),this.fVnationalities.add(29),this.fVnationalities.add(74),this.fVnationalities.add(216),this.fVnationalities.add(196),this.fVnationalities.add(64),this.fVnationalities.add(155),this.fVnationalities.add(156),this.fVnationalities.add(89),this.fVnationalities.add(106),this.fVnationalities.add(81),this.fVnationalities.add(233),this.fVnationalities.add(204)}catch(e){throw new Error(e)}}},_ht={ref:"myDivRefTopsFull"},xht={key:0,class:"overlay-loading"},wht={key:0,class:"cont-leyemd-multipleleagues"},kht={key:0,style:{"margin-left":"10px"}},Sht={key:3,style:{width:"100%",height:"295px"}};function Cht(e,o,s,B,U,m){t.resolveComponent("GSCTournamentSelect"),t.resolveComponent("GSCSeasonSelect");const y=t.resolveComponent("GscSwitchComponent"),a=t.resolveComponent("GSCFilterperteam"),v=t.resolveComponent("GSCFilters"),p=t.resolveComponent("GSCLabel"),r=t.resolveComponent("GSCTopCategory"),_=t.resolveComponent("GSCTableHeader"),b=t.resolveComponent("GSCRowTable"),x=t.resolveComponent("GSCExpandedInfo");return t.openBlock(),t.createElementBlock("div",_ht,[U.loadingActive?(t.openBlock(),t.createElementBlock("div",xht,o[8]||(o[8]=[t.createElementVNode("div",{class:"overlay-loading__spinner"},[t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/balon_liga.png",alt:""})],-1),t.createElementVNode("div",{class:"overlay-loading__text"},"Loading...",-1)]))):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(e.templateLosMejoresClass)},[t.createElementVNode("section",{class:t.normalizeClass(e.containerSectionClass),id:"container-section"},[t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(e.comdescubreVideosClass)},[t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(e.menuSectionParentHeaderClass)},[t.createCommentVNode("",!0),t.createCommentVNode("",!0)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.topFiltersParentClass)},[t.createElementVNode("div",{class:t.normalizeClass(e.topFiltersClass),id:"top-filters"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.teamBarParent)},[U.optionSelected!="Scouting"&&U.optionSelected!="Equipos"?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.teamBar),id:"team-bar"},[t.createVNode(a,{data:U.teams,"team-id":s.teamId,"background-color":"#172531","contain-border-radius":"8px",onClickTeam:m.clickTeam,onClickAll:m.clickAll},null,8,["data","team-id","onClickTeam","onClickAll"])],2)):t.createCommentVNode("",!0),t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerFilters),id:"container-filters",style:t.normalizeStyle(U.showfiltersPc?"":B.elementSize.width>760?"display: none;":"")},[t.createElementVNode("div",{class:t.normalizeClass(e.menuSectionClass),id:"menu-section"},[B.elementSize.width>760&&U.optionSelected!="Scouting"?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.closeFiltersPc),onClick:o[1]||(o[1]=(...h)=>m.clickCloseFilters&&m.clickCloseFilters(...h))},o[9]||(o[9]=[t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/todoelfut/icn_close.png",style:{width:"10px"}},null,-1)]),2)):t.createCommentVNode("",!0),U.optionSelected!=="Scouting"?(t.openBlock(),t.createBlock(y,{key:1,type:2,buttons:["Todas las jugadas","Predeterminados"],"font-family":"Poppins-Regular","selected-option":U.optionSelectedSubmenu,"font-size":e.sizeTabsFontMS,width:e.sizeTabsMS,arrow:!1,borderWidth:"1px","background-option-active":"#172531",background:"#172531",height:"28px",onInput:m.changeTabsSubmenu},null,8,["selected-option","font-size","width","onInput"])):t.createCommentVNode("",!0)],2),t.createCommentVNode("",!0),t.withDirectives(t.createElementVNode("div",{class:t.normalizeClass(e.$style.btnCloseFilters),style:t.normalizeStyle(U.optionSelected==="Scouting"?"margin-top: 4%; margin-left: 1%":""),onClick:o[3]||(o[3]=(...h)=>m.openMenuFilters&&m.openMenuFilters(...h))},null,6),[[t.vShow,B.elementSize.width<760&&U.openMenuMobil]]),t.withDirectives(t.createElementVNode("div",{class:t.normalizeClass(e.containerMenuClass),id:"container-menu"},[U.optionSelectedSubmenu=="Todas las jugadas"&&U.optionSelected!="Scouting"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[B.elementSize.width>0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.withDirectives(t.createVNode(v,t.mergeProps({"button-filter-props":m.filterButtonProps},B.elementSize.width<420?U.expansionPanelModePropsMobil270:B.elementSize.width<760?U.expansionPanelModePropsMobil:U.expansionPanelModeProps,{"filter-type":U.filtersTypes.PLAYS,"show-badge-on-filter-full":!1,"onUpdate:filters":m.onFiltersPlays,filters:U.categoriesPlaysTypes,onApply:m.applyFiltersBtn,"provider-id":e.$store.getters.getProviderId,"is-dev-apis":e.$store.getters.getIsDevApis}),null,16,["button-filter-props","filter-type","onUpdate:filters","filters","onApply","provider-id","is-dev-apis"]),[[t.vShow,!U.showFullTable]]),(t.openBlock(),t.createBlock(v,t.mergeProps({"button-filter-props":m.filterButtonProps},B.elementSize.width<420?U.expansionPanelModePropsMobil270:B.elementSize.width<760?U.expansionPanelModePropsMobil:U.expansionPanelModeProps,{key:U.updateFilterField,"filter-type":U.filtersTypes.FIELD,"show-badge-on-filter-full":!1,"onUpdate:filters":m.onFiltersField,filters:U.fVzone,"provider-id":e.$store.getters.getProviderId,"is-dev-apis":e.$store.getters.getIsDevApis}),null,16,["button-filter-props","filter-type","onUpdate:filters","filters","provider-id","is-dev-apis"])),t.createVNode(v,t.mergeProps({"button-filter-props":m.filterButtonProps},B.elementSize.width<420?U.expansionPanelModePropsMobil270:B.elementSize.width<760?U.expansionPanelModePropsMobil:U.expansionPanelModeProps,{"filter-type":U.filtersTypes.DETAILS,"show-badge-on-filter-full":!1,"onUpdate:filters":m.onFiltersDetails,filters:U.detailsObject,"provider-id":e.$store.getters.getProviderId,"is-dev-apis":e.$store.getters.getIsDevApis}),null,16,["button-filter-props","filter-type","onUpdate:filters","filters","provider-id","is-dev-apis"]),U.optionSelected==="Jugadores"?(t.openBlock(),t.createBlock(v,t.mergeProps({key:0,ref:"personalDataFilterPlayers","button-filter-props":m.filterButtonProps},B.elementSize.width<420?U.expansionPanelModePropsMobil270:B.elementSize.width<760?U.expansionPanelModePropsMobil:U.expansionPanelModeProps,{"filter-type":U.filtersTypes.PERSONAL_DATA,"show-badge-on-filter-full":!1,season:{id:s.seasonActive,tournamentId:U.tournamentSelectedObj.value},token:U.token,"onUpdate:filters":m.onFiltersData,"provider-id":e.$store.getters.getProviderId,"is-dev-apis":e.$store.getters.getIsDevApis}),null,16,["button-filter-props","filter-type","season","token","onUpdate:filters","provider-id","is-dev-apis"])):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0),U.optionSelected=="Scouting"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[B.elementSize.width>0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[(t.openBlock(),t.createBlock(v,t.mergeProps({"button-filter-props":m.filterButtonProps},B.elementSize.width<420?U.expansionPanelModePropsMobil270:B.elementSize.width<760?U.expansionPanelModePropsMobil:U.expansionPanelModeProps,{"filter-type":U.filtersTypes.TOURNAMENTS,"show-badge-on-filter-full":!1,filters:U.tournamentsToFilter,key:U.keyTournamentValue,"onUpdate:filters":m.onFiltersTournaments,"provider-id":e.$store.getters.getProviderId,"is-dev-apis":e.$store.getters.getIsDevApis}),null,16,["button-filter-props","filter-type","filters","onUpdate:filters","provider-id","is-dev-apis"])),t.createVNode(v,t.mergeProps({"button-filter-props":m.filterButtonProps},B.elementSize.width<420?U.expansionPanelModePropsMobil270:B.elementSize.width<760?U.expansionPanelModePropsMobil:U.expansionPanelModeProps,{"filter-type":U.filtersTypes.PERSONAL_DATA,"show-badge-on-filter-full":!1,season:{id:U.filterScounting.seasonId,tournamentId:U.filterScounting.tournaments[0]},ref:"personalDataFilter","onUpdate:filters":m.onFiltersPersonalData,"provider-id":e.$store.getters.getProviderId,"is-dev-apis":e.$store.getters.getIsDevApis}),null,16,["button-filter-props","filter-type","season","onUpdate:filters","provider-id","is-dev-apis"]),t.createVNode(v,t.mergeProps({"button-filter-props":m.filterButtonProps},B.elementSize.width<420?U.expansionPanelModePropsMobil270:B.elementSize.width<760?U.expansionPanelModePropsMobil:U.expansionPanelModeProps,{"filter-type":U.filtersTypes.UNIVERSE,"show-badge-on-filter-full":!1,filters:U.universeData,"onUpdate:filters":m.onFiltersUniverse,"provider-id":e.$store.getters.getProviderId,"is-dev-apis":e.$store.getters.getIsDevApis}),null,16,["button-filter-props","filter-type","filters","onUpdate:filters","provider-id","is-dev-apis"]),t.createVNode(v,t.mergeProps({"button-filter-props":m.filterButtonProps},B.elementSize.width<420?U.expansionPanelModePropsMobil270:B.elementSize.width<760?U.expansionPanelModePropsMobil:U.expansionPanelModeProps,{"filter-type":U.filtersTypes.PRODUCTIVITY,"show-badge-on-filter-full":!1,"onUpdate:filters":m.onFiltersProductivity,filters:U.detaildProductivityCategories,"provider-id":e.$store.getters.getProviderId,"is-dev-apis":e.$store.getters.getIsDevApis}),null,16,["button-filter-props","filter-type","onUpdate:filters","filters","provider-id","is-dev-apis"])],64)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(e.$style.BtnSearchScountingcom),onClick:o[4]||(o[4]=(...h)=>m.getScoutingData&&m.getScoutingData(...h))},"Buscar",2)],64)):t.createCommentVNode("",!0),U.optionSelectedSubmenu=="Predeterminados"&&U.optionSelected!="Scouting"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[(t.openBlock(),t.createBlock(v,t.mergeProps({"button-filter-props":m.filterButtonProps,modalHeight:"300px"},B.elementSize.width<420?U.expansionPanelModePropsMobil270:B.elementSize.width<760?U.expansionPanelModePropsMobil:U.expansionPanelModePropsTypePlays,{"filter-type":U.filtersTypes.PLAYS_TYPES,"show-badge-on-filter-full":!1,key:U.updateFilterPlaytypesGolstats,"onUpdate:filters":m.onFiltersPlaysTypes,filters:U.categoriesDefault,"provider-id":e.$store.getters.getProviderId,"is-dev-apis":e.$store.getters.getIsDevApis}),null,16,["button-filter-props","filter-type","onUpdate:filters","filters","provider-id","is-dev-apis"])),(t.openBlock(),t.createBlock(v,t.mergeProps({"button-filter-props":m.filterButtonProps,modalHeight:"300px"},B.elementSize.width<420?U.expansionPanelModePropsMobil270:B.elementSize.width<760?U.expansionPanelModePropsMobil:U.expansionPanelModeProps,{"filter-type":U.filtersTypes.GOLSTATS,"show-badge-on-filter-full":!1,key:U.updateFilterGolstats,"onUpdate:filters":m.onFiltersGolStats,filters:m.filterGolstats,"provider-id":e.$store.getters.getProviderId,"is-dev-apis":e.$store.getters.getIsDevApis}),null,16,["button-filter-props","filter-type","onUpdate:filters","filters","provider-id","is-dev-apis"]))],64)):t.createCommentVNode("",!0)],2),[[t.vShow,B.elementSize.width>760||U.openMenuMobil]]),U.optionSelected=="Scouting"?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.teamBar),id:"team-bar"},[U.filterScounting.tournaments.length>1&&U.rowScoutingData.length>0?(t.openBlock(),t.createElementBlock("div",wht,[o[10]||(o[10]=t.createElementVNode("img",{class:"img-leyemd-multipleleagues",src:"http://golstatsimages.blob.core.windows.net/images-library/icn-multiples-ligas.png"},null,-1)),t.createElementVNode("div",{class:t.normalizeClass(e.comextleyemdmultipleleaguesClass)}," El filtro por equipos solo se pude utilizar cuando se tiene maximo 1 liga seleccionada ",2)])):(t.openBlock(),t.createBlock(a,{data:U.teamsscouting,"team-id":U.teamselectrec,"background-color":"#172531","contain-border-radius":"8px",key:U.updateFilterTeamsScouting,onClickTeam:m.clickTeamScouting,onClickAll:m.clickAllAll},null,8,["data","team-id","onClickTeam","onClickAll"]))],2)):t.createCommentVNode("",!0)],6)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.containerTheBestClass),id:"container-the-best"},[t.createElementVNode("div",{class:t.normalizeClass(e.titleSectionClass)},[U.optionSelectedSubmenu!="Predeterminados"?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.commejoresJugadoresClass)},[U.arrayFiltersPlays.length>0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[U.optionSelected!="Scouting"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("Mejores jugadores: ")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("Jugadores más productivos: ")],64))],64)):t.createCommentVNode("",!0)],2)):t.createCommentVNode("",!0),U.optionSelected!="Scouting"&&U.optionSelectedSubmenu!="Predeterminados"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[U.showFullTable?(t.openBlock(),t.createElementBlock("div",kht,[t.createVNode(p,{"text-value":"Categoría - "+U.categoryName+" ","font-size":"11px","font-color":"rgba(255, 255, 255, 0.7)",onClickClose:m.deleteCategoryFilter,icon:"https://golstatsimages.blob.core.windows.net/todoelfut/icn_close.png","icon-size":"6px",height:"20px"},null,8,["text-value","onClickClose"])])):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(U.arrayFiltersPlays,(h,n)=>(t.openBlock(),t.createElementBlock("div",{key:n,style:{"margin-left":"10px"}},[t.createVNode(p,{"text-value":h.name+" ","font-size":"11px","font-color":"rgba(255, 255, 255, 0.7)",onClickClose:m.deleteLabelFilter,id:h.type,icon:"https://golstatsimages.blob.core.windows.net/todoelfut/icn_close.png","icon-size":"6px",height:B.elementSize.width<768?"auto":"20px"},null,8,["text-value","onClickClose","id","height"])]))),128)),U.rowScoutingData.length!=0||U.optionSelectedSubmenu=="Predeterminados"&&U.arrayFiltersPlays.findIndex(h=>h.type==="onFiltersPredefined")!==-1?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(e.comquitarFiltrosClass),onClick:o[5]||(o[5]=(...h)=>m.onClickDeleteFilter&&m.onClickDeleteFilter(...h))}," Quitar filtros ",2)):t.createCommentVNode("",!0),t.createCommentVNode("",!0)],2),s.seasonActive!=0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.containerTablesClass),id:"container-tables",style:t.normalizeStyle(U.showFullTable?"gap: 0px!important;":"")},[U.optionSelected!=="Scouting"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[U.optionSelectedSubmenu=="Todas las jugadas"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(U.categoriesDefault,(h,n)=>(t.openBlock(),t.createElementBlock("div",{key:h.id,style:t.normalizeStyle(!U.showOnlyCategories&&U.arrayCategoryFilter.includes(h.id)?"":"display:none !important;")},[t.withDirectives(t.createElementVNode("div",{class:t.normalizeClass(e.toniKroosWrapperClass)},[(t.openBlock(),t.createBlock(r,{"is-widget":s.isWidget,"team-widget":s.teamWidget,"time-live-comparative-avanced":s.timeLiveComparativeAvanced,"is-team":U.isTeam,onMore:m.onShowFullTable,"border-width":0,onIntervalidtops:m.intervalidtops,"can-play-videos":s.canPlayVideos,"border-radius":"12px","game-id":s.gameId,game:s.game,typeData:s.typeData,"filters-prop":m.filterChange,category:h.id,"type-table":U.typeTable,categoryName:h.name,"season-selected":s.seasonSelected,season:s.seasonActive,"filter-team":s.teamselect,key:U.updateTables,onClickprofile:m.clickprofile,onSetopenmedia:m.setOpenMedia},null,8,["is-widget","team-widget","time-live-comparative-avanced","is-team","onMore","onIntervalidtops","can-play-videos","game-id","game","typeData","filters-prop","category","type-table","categoryName","season-selected","season","filter-team","onClickprofile","onSetopenmedia"]))],2),[[t.vShow,!U.showOnlyCategories&&U.arrayCategoryFilter.includes(h.id)&&!U.showFullTable]])],4))),128)),U.showFullTable?(t.openBlock(),t.createBlock(r,{"time-live-comparative-avanced":s.timeLiveComparativeAvanced,"is-team":U.isTeam,"is-widget":s.isWidget,"team-widget":s.teamWidget,"border-width":0,"border-radius":"12px","game-id":s.gameId,onIntervalidtops:m.intervalidtops,game:s.game,typeData:s.typeData,category:U.showFullCategory,type:1,"type-table":U.typeTable,categoryName:"","filters-prop":m.filterChange,"season-selected":s.seasonSelected,season:s.seasonActive,"filter-team":s.teamselect,key:U.updateTablesfull,onClickprofile:m.clickprofile,onSetopenmedia:m.setOpenMedia},null,8,["time-live-comparative-avanced","is-team","is-widget","team-widget","game-id","onIntervalidtops","game","typeData","category","type-table","filters-prop","season-selected","season","filter-team","onClickprofile","onSetopenmedia"])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[U.categoryPredefinedActive?(t.openBlock(),t.createBlock(r,{"is-widget":s.isWidget,"team-widget":s.teamWidget,"is-team":U.isTeam,"time-live-comparative-avanced":s.timeLiveComparativeAvanced,onIntervalidtops:m.intervalidtops,"border-width":0,"border-radius":"12px","can-play-videos":s.canPlayVideos,"game-id":s.gameId,game:s.game,typeData:s.typeData,category:U.categoryPredefined,type:1,"type-table":U.typeTable,categoryName:"","filters-prop":m.filterChangePredefined,"season-selected":s.seasonSelected,season:s.seasonActive,"filter-team":s.teamselect,key:U.updateTables,onClickprofile:m.clickprofile,onSetopenmedia:m.setOpenMedia},null,8,["is-widget","team-widget","is-team","time-live-comparative-avanced","onIntervalidtops","can-play-videos","game-id","game","typeData","category","type-table","filters-prop","season-selected","season","filter-team","onClickprofile","onSetopenmedia"])):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.containerPredefinedcom)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.titleContainerPredefinedcom)},[U.arrayFiltersPlays.length==0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("No has seleccionado ningún filtro")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("No existen resultados")],64))],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.subtitleContainerPredefinedcom)},[U.arrayFiltersPlays.length==0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("Para visualizar resultados selecciona un")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("No existen resultados con los filtros")],64))],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.subtitleContainerPredefinedcom)},[U.arrayFiltersPlays.length==0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[o[12]||(o[12]=t.createElementVNode("span",null,"Tipo de Jugada",-1)),o[13]||(o[13]=t.createTextVNode(" y un ")),o[14]||(o[14]=t.createElementVNode("span",null,"Filtro GolStats",-1)),o[15]||(o[15]=t.createTextVNode(" en la"))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("que has seleccionado.")],64))],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.subtitleContainerPredefinedcom)},[U.arrayFiltersPlays.length==0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("parte superior.")],64)):t.createCommentVNode("",!0)],2)],2))],64))],64)):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.containerPredefinedScountingcom),style:t.normalizeStyle(U.rowScoutingData.length>0?"height: auto;":"")},[U.loadingActive?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[U.rowScoutingData.length>0?(t.openBlock(),t.createBlock(_,{key:0,background:"#183143",type:2})):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(U.rowScoutingData,(h,n)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:n},[U.teamselectrec==0||U.teamselectrec==h.team_id?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createVNode(b,{type:2,"is-expanded":U.playerexpand==h.id&&U.expand,onMediadata:m.setMediaData,data:{position:h.position,player_name:h.player_name,player_photo:h.player_photo,total:h.total,id:h.id,player_age:h.player_age,team_abrev:h.team_abrev,team_logo:h.team_logo,player_position:U.positions[h.player_position-1].fullname,player_country_flag:h.player_country_flag,player_games:h.player_games,player_min:h.player_min,league_name:h.league_name,seasons:h.seasons,season_id:h.season_id},height:"71px",background:n%2===0?s.backgroundOdd:s.backgroundEven,onExpand:m.clickexpand},null,8,["is-expanded","onMediadata","data","background","onExpand"]),U.expand&&U.playerexpand==h.id?(t.openBlock(),t.createBlock(x,{key:0,type:0,"view-effectiveness":!1,viewGoals:!1,additionalClass:"fullTable",data:{teams:h.team_name,age:h.player_age,dataofbirth:h.date,nationality:h.nationality_name,countryFlag:h.player_country_flag,position:U.positions[h.player_position-1].name,games:h.player_games,min:h.player_min,goals:h.total,effectiveness:"-",category:"total",id:h.id},onViewprofile:i=>m.viewprofile(i,h.season_id,h.team_id),background:n%2===0?s.backgroundOdd:s.backgroundEven},null,8,["data","onViewprofile","background"])):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0)],64))),128))],64)),U.rowScoutingData.length==0&&!U.loadingActive?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.btnLeyendTxtcom)},' Haz click en "Buscar" para aplicar tus filtros ',2)):t.createCommentVNode("",!0),U.rowScoutingData.length==0&&!U.loadingActive?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(e.$style.containerScountingBtncom)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.btnDeleteAplicacom),onClick:o[6]||(o[6]=(...h)=>m.onClickDeleteFilter&&m.onClickDeleteFilter(...h))}," Eliminar filtros aplicados ",2),U.rowScoutingData.length==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.SearchBtnBarcom),onClick:o[7]||(o[7]=(...h)=>m.getScoutingData&&m.getScoutingData(...h))}," Buscar ",2)):t.createCommentVNode("",!0)],2)):t.createCommentVNode("",!0),U.loadingActive?(t.openBlock(),t.createElementBlock("div",Sht)):t.createCommentVNode("",!0)],6))],6)):t.createCommentVNode("",!0)],2)],2)],2)],2)],512)}const Tht=Ki(bht,[["render",Cht],["__cssModules",{$style:yht}]]),zta="";let AV=null;const Aht={components:{GSCDatosGSMain:Nct,GSCCheckbox:j1,GSCRadioToggle:dF,GSCTopFull:Tht},props:{isWidget:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},timeLiveComparativeBestPlayers:{type:Number,default:6e4},timeLiveComparativeAvanced:{type:Number,default:6e4},seasonSelected:{type:Object,default:()=>({})},tournamentSelected:{type:Object,default:()=>({})},game:{type:Object,default:()=>{}},playVideosPrivileges:{type:Object,default:null},canPlayVideos:{type:Boolean,default:!1},isFemaleMode:{type:Boolean,default:!1}},data(){return{updateHomeCheck:0,updateAwayCheck:0,activeSection:"destacados",widthSection:0,teamactive:0,update:0,homeTeamCheck:!0,awayTeamCheck:!0,typeViewData:1}},watch:{game:{deep:!0,immediate:!0,handler(e){e&&(e.game_status==1||e.is_live==1||e.game_status==0?this.typeViewData=1:this.typeViewData=0),this.update+=1}}},computed:{},methods:{preventChange(e){e.preventDefault(),this.homeTeamCheck=!0},intervalidgs(e){this.$emit("intervalidgs",e)},onOpenProfileTeam(e){this.$emit("openProfileTeam",e)},intervalidtops(e){this.$emit("intervalidtops",e)},onOpenProfilePlayer(e){this.$emit("onOpenProfile",e)},ChangeRadio(e){typeof e=="string"&&(e==="Este partido"?this.typeViewData=1:this.typeViewData=0)},onCheckInactiveHome(e){e?(this.homeTeamCheck=!0,this.awayTeamCheck?this.teamactive=0:this.teamactive=this.game.homeTeam.team_id):this.awayTeamCheck?(this.homeTeamCheck=!1,this.teamactive=this.game.awayTeam.team_id):(this.updateHomeCheck+=1,this.homeTeamCheck=!0,this.teamactive=this.game.homeTeam.team_id)},onCheckInactiveAway(e){e?(this.awayTeamCheck=!0,this.homeTeamCheck?this.teamactive=0:this.teamactive=this.game.awayTeam.team_id):this.homeTeamCheck?(this.awayTeamCheck=!1,this.teamactive=this.game.homeTeam.team_id):(this.updateAwayCheck+=1,this.teamactive=this.game.awayTeam.team_id,this.awayTeamCheck=!0)},setUpResizeObserver(){if(window.ResizeObserver)AV=new ResizeObserver(()=>{this.widthSection=this.$refs.comparative.clientWidth}),AV.observe(this.$refs.comparative);else throw new Error("Resize observer not supported!")},clickOptSection(e){this.activeSection=e},openmedia(e){this.typeViewData===1?(e.gameIdsToFilter=[this.game.gameId],this.$emit("openmedia",e)):(e.isLiveAccumulated=!0,this.$emit("openmedia",e))}},async mounted(){setTimeout(()=>{this.setUpResizeObserver()},1e3)}},Eht={class:"container-comparative",ref:"comparative"},Mht={class:"container-btn"},Iht={class:"items-container-btn"},Pht={class:"container-sections"},Lht={key:0,class:"container-teams-menu"},Bht={class:"container-team-menu-home"},zht=["src"],Oht={class:"container-team-menu-away"},Dht=["src"],Nht={key:1,class:"container-switch-menu"},Fht={class:"container-leyend"},Rht={class:"container-tops"};function Vht(e,o,s,B,U,m){const y=t.resolveComponent("GSCDatosGSMain"),a=t.resolveComponent("GSCCheckbox"),v=t.resolveComponent("GSCRadioToggle"),p=t.resolveComponent("GSCTopFull");return t.openBlock(),t.createElementBlock("div",Eht,[t.createElementVNode("div",Mht,[t.createElementVNode("div",Iht,[t.createElementVNode("div",{class:t.normalizeClass([U.widthSection>480?"btn-destacados":"btn-destacados-movil",U.activeSection=="destacados"?"active":""]),onClick:o[0]||(o[0]=r=>m.clickOptSection("destacados"))},[s.game.status==1||s.game.is_live==1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[s.tournamentSelected.is_female==1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("Jugadoras destacadas")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("Jugadores destacados")],64))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("General")],64))],2),t.createElementVNode("div",{class:t.normalizeClass([U.widthSection>480?"btn-avanced":"btn-avanced-movil",U.activeSection=="avanzado"?"active":""]),onClick:o[1]||(o[1]=r=>m.clickOptSection("avanzado"))}," Avanzado ",2)])]),t.createElementVNode("div",Pht,[U.activeSection=="destacados"?(t.openBlock(),t.createBlock(y,{key:0,"is-widget":s.isWidget,"team-widget":s.teamWidget,"tournament-selected":s.tournamentSelected,"time-live-comparative-best-players":s.timeLiveComparativeBestPlayers,game:s.game,"play-videos-privileges":s.playVideosPrivileges,onOpenmedia:m.openmedia,onIntervalidgs:m.intervalidgs},null,8,["is-widget","team-widget","tournament-selected","time-live-comparative-best-players","game","play-videos-privileges","onOpenmedia","onIntervalidgs"])):t.createCommentVNode("",!0),U.activeSection=="avanzado"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[s.isWidget?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Lht,[t.createElementVNode("div",Bht,[(t.openBlock(),t.createBlock(a,{fontFamily:"Poppins-Regular","onUpdate:modelValue":m.onCheckInactiveHome,"label-color":"#8c9399",width:"25",key:U.updateHomeCheck,"model-value":U.homeTeamCheck,height:"25",style:{"margin-top":"-4px"}},null,8,["onUpdate:modelValue","model-value"])),t.createElementVNode("img",{class:"img-teams-selector-home",width:"23",src:s.game.homeTeam.logo},null,8,zht),t.createElementVNode("div",{class:t.normalizeClass(U.widthSection>390?"label-team-home":"label-team-home-movil")},t.toDisplayString(s.game.homeTeam.colloquial_name),3)]),o[2]||(o[2]=t.createElementVNode("div",{class:"container-team-menu-separator"},null,-1)),t.createElementVNode("div",Oht,[t.createElementVNode("div",{class:t.normalizeClass(U.widthSection>390?"label-team-away":"label-team-away-movil")},t.toDisplayString(s.game.awayTeam.colloquial_name),3),t.createElementVNode("img",{class:"img-teams-selector-away",width:"23",src:s.game.awayTeam.logo},null,8,Dht),(t.openBlock(),t.createBlock(a,{fontFamily:"Poppins-Regular","onUpdate:modelValue":m.onCheckInactiveAway,"label-color":"#8c9399",width:"25",key:U.updateAwayCheck,"model-value":U.awayTeamCheck,height:"25",style:{"margin-top":"-4px"}},null,8,["onUpdate:modelValue","model-value"]))])])),s.game.is_live||s.game.status===1||s.game.status===0?(t.openBlock(),t.createElementBlock("div",Nht,[t.createVNode(v,{height:"20px",width:"41px","background-color":"none","width-circle":"15px","height-circle":"15px","circle-color-switch":"#CBEE6B","font-color":"#ffffff","value-default":U.typeViewData==1?"Este partido":"Acumulado",textOptionLeft:"Este partido",textOptionRight:"Acumulado",onChange:m.ChangeRadio},null,8,["value-default","onChange"])])):t.createCommentVNode("",!0),t.createElementVNode("div",Fht,[U.typeViewData==1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(" Jugadas destacadas durante este partido ")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[s.game.status==1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(" Jugadas destacadas durante el torneo ")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[s.tournamentSelected.is_female==1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("Jugadoras destacadas durante lo que va del torneo")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("Jugadores destacados durante lo que va del torneo")],64))],64))],64))]),t.createElementVNode("div",Rht,[t.createVNode(p,{"is-widget":s.isWidget,"team-widget":s.teamWidget,"time-live-comparative-avanced":s.timeLiveComparativeAvanced,"can-play-videos":s.canPlayVideos,onOpenmedia:m.openmedia,onOpenProfileTeam:m.onOpenProfileTeam,onIntervalidtops:m.intervalidtops,onOpenProfilePlayer:m.onOpenProfilePlayer,"type-data":U.typeViewData,"game-id":s.game.gameId,game:s.game,"current-season-id":s.game.seasonId,"team-id":U.teamactive,"season-active":s.game.seasonId,"season-selected":s.seasonSelected,teamselect:U.teamactive,"is-female-mode":s.isFemaleMode},null,8,["is-widget","team-widget","time-live-comparative-avanced","can-play-videos","onOpenmedia","onOpenProfileTeam","onIntervalidtops","onOpenProfilePlayer","type-data","game-id","game","current-season-id","team-id","season-active","season-selected","teamselect","is-female-mode"])])],64)):t.createCommentVNode("",!0)])],512)}const jht=Ki(Aht,[["render",Vht],["__scopeId","data-v-84eca2e0"]]);var Uht=Object.defineProperty,Ght=(e,o,s)=>o in e?Uht(e,o,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[o]=s,$S=(e,o,s)=>Ght(e,typeof o!="symbol"?o+"":o,s);function EV(e,o){return function(){return e.apply(o,arguments)}}const{toString:Hht}=Object.prototype,{getPrototypeOf:KS}=Object,{iterator:d4,toStringTag:MV}=Symbol,h4=(e=>o=>{const s=Hht.call(o);return e[s]||(e[s]=s.slice(8,-1).toLowerCase())})(Object.create(null)),Kf=e=>(e=e.toLowerCase(),o=>h4(o)===e),p4=e=>o=>typeof o===e,{isArray:Rv}=Array,Ub=p4("undefined");function Zht(e){return e!==null&&!Ub(e)&&e.constructor!==null&&!Ub(e.constructor)&&Cp(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const IV=Kf("ArrayBuffer");function Wht(e){let o;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?o=ArrayBuffer.isView(e):o=e&&e.buffer&&IV(e.buffer),o}const qht=p4("string"),Cp=p4("function"),PV=p4("number"),f4=e=>e!==null&&typeof e=="object",Jht=e=>e===!0||e===!1,m4=e=>{if(h4(e)!=="object")return!1;const o=KS(e);return(o===null||o===Object.prototype||Object.getPrototypeOf(o)===null)&&!(MV in e)&&!(d4 in e)},Yht=Kf("Date"),Xht=Kf("File"),$ht=Kf("Blob"),Kht=Kf("FileList"),Qht=e=>f4(e)&&Cp(e.pipe),ept=e=>{let o;return e&&(typeof FormData=="function"&&e instanceof FormData||Cp(e.append)&&((o=h4(e))==="formdata"||o==="object"&&Cp(e.toString)&&e.toString()==="[object FormData]"))},tpt=Kf("URLSearchParams"),[apt,rpt,npt,ipt]=["ReadableStream","Request","Response","Headers"].map(Kf),opt=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Gb(e,o,{allOwnKeys:s=!1}={}){if(e===null||typeof e>"u")return;let B,U;if(typeof e!="object"&&(e=[e]),Rv(e))for(B=0,U=e.length;B<U;B++)o.call(null,e[B],B,e);else{const m=s?Object.getOwnPropertyNames(e):Object.keys(e),y=m.length;let a;for(B=0;B<y;B++)a=m[B],o.call(null,e[a],a,e)}}function LV(e,o){o=o.toLowerCase();const s=Object.keys(e);let B=s.length,U;for(;B-- >0;)if(U=s[B],o===U.toLowerCase())return U;return null}const pg=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,BV=e=>!Ub(e)&&e!==pg;function QS(){const{caseless:e}=BV(this)&&this||{},o={},s=(B,U)=>{const m=e&&LV(o,U)||U;m4(o[m])&&m4(B)?o[m]=QS(o[m],B):m4(B)?o[m]=QS({},B):Rv(B)?o[m]=B.slice():o[m]=B};for(let B=0,U=arguments.length;B<U;B++)arguments[B]&&Gb(arguments[B],s);return o}const spt=(e,o,s,{allOwnKeys:B}={})=>(Gb(o,(U,m)=>{s&&Cp(U)?e[m]=EV(U,s):e[m]=U},{allOwnKeys:B}),e),lpt=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),cpt=(e,o,s,B)=>{e.prototype=Object.create(o.prototype,B),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:o.prototype}),s&&Object.assign(e.prototype,s)},upt=(e,o,s,B)=>{let U,m,y;const a={};if(o=o||{},e==null)return o;do{for(U=Object.getOwnPropertyNames(e),m=U.length;m-- >0;)y=U[m],(!B||B(y,e,o))&&!a[y]&&(o[y]=e[y],a[y]=!0);e=s!==!1&&KS(e)}while(e&&(!s||s(e,o))&&e!==Object.prototype);return o},dpt=(e,o,s)=>{e=String(e),(s===void 0||s>e.length)&&(s=e.length),s-=o.length;const B=e.indexOf(o,s);return B!==-1&&B===s},hpt=e=>{if(!e)return null;if(Rv(e))return e;let o=e.length;if(!PV(o))return null;const s=new Array(o);for(;o-- >0;)s[o]=e[o];return s},ppt=(e=>o=>e&&o instanceof e)(typeof Uint8Array<"u"&&KS(Uint8Array)),fpt=(e,o)=>{const s=(e&&e[d4]).call(e);let B;for(;(B=s.next())&&!B.done;){const U=B.value;o.call(e,U[0],U[1])}},mpt=(e,o)=>{let s;const B=[];for(;(s=e.exec(o))!==null;)B.push(s);return B},gpt=Kf("HTMLFormElement"),ypt=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(o,s,B){return s.toUpperCase()+B}),zV=(({hasOwnProperty:e})=>(o,s)=>e.call(o,s))(Object.prototype),vpt=Kf("RegExp"),OV=(e,o)=>{const s=Object.getOwnPropertyDescriptors(e),B={};Gb(s,(U,m)=>{let y;(y=o(U,m,e))!==!1&&(B[m]=y||U)}),Object.defineProperties(e,B)},bpt=e=>{OV(e,(o,s)=>{if(Cp(e)&&["arguments","caller","callee"].indexOf(s)!==-1)return!1;const B=e[s];if(Cp(B)){if(o.enumerable=!1,"writable"in o){o.writable=!1;return}o.set||(o.set=()=>{throw Error("Can not rewrite read-only method '"+s+"'")})}})},_pt=(e,o)=>{const s={},B=U=>{U.forEach(m=>{s[m]=!0})};return Rv(e)?B(e):B(String(e).split(o)),s},xpt=()=>{},wpt=(e,o)=>e!=null&&Number.isFinite(e=+e)?e:o;function kpt(e){return!!(e&&Cp(e.append)&&e[MV]==="FormData"&&e[d4])}const Spt=e=>{const o=new Array(10),s=(B,U)=>{if(f4(B)){if(o.indexOf(B)>=0)return;if(!("toJSON"in B)){o[U]=B;const m=Rv(B)?[]:{};return Gb(B,(y,a)=>{const v=s(y,U+1);!Ub(v)&&(m[a]=v)}),o[U]=void 0,m}}return B};return s(e,0)},Cpt=Kf("AsyncFunction"),Tpt=e=>e&&(f4(e)||Cp(e))&&Cp(e.then)&&Cp(e.catch),DV=((e,o)=>e?setImmediate:o?((s,B)=>(pg.addEventListener("message",({source:U,data:m})=>{U===pg&&m===s&&B.length&&B.shift()()},!1),U=>{B.push(U),pg.postMessage(s,"*")}))(`axios@${Math.random()}`,[]):s=>setTimeout(s))(typeof setImmediate=="function",Cp(pg.postMessage)),Apt=typeof queueMicrotask<"u"?queueMicrotask.bind(pg):typeof process<"u"&&process.nextTick||DV,Ept=e=>e!=null&&Cp(e[d4]),On={isArray:Rv,isArrayBuffer:IV,isBuffer:Zht,isFormData:ept,isArrayBufferView:Wht,isString:qht,isNumber:PV,isBoolean:Jht,isObject:f4,isPlainObject:m4,isReadableStream:apt,isRequest:rpt,isResponse:npt,isHeaders:ipt,isUndefined:Ub,isDate:Yht,isFile:Xht,isBlob:$ht,isRegExp:vpt,isFunction:Cp,isStream:Qht,isURLSearchParams:tpt,isTypedArray:ppt,isFileList:Kht,forEach:Gb,merge:QS,extend:spt,trim:opt,stripBOM:lpt,inherits:cpt,toFlatObject:upt,kindOf:h4,kindOfTest:Kf,endsWith:dpt,toArray:hpt,forEachEntry:fpt,matchAll:mpt,isHTMLForm:gpt,hasOwnProperty:zV,hasOwnProp:zV,reduceDescriptors:OV,freezeMethods:bpt,toObjectSet:_pt,toCamelCase:ypt,noop:xpt,toFiniteNumber:wpt,findKey:LV,global:pg,isContextDefined:BV,isSpecCompliantForm:kpt,toJSONObject:Spt,isAsyncFn:Cpt,isThenable:Tpt,setImmediate:DV,asap:Apt,isIterable:Ept};function kl(e,o,s,B,U){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",o&&(this.code=o),s&&(this.config=s),B&&(this.request=B),U&&(this.response=U,this.status=U.status?U.status:null)}On.inherits(kl,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:On.toJSONObject(this.config),code:this.code,status:this.status}}});const NV=kl.prototype,FV={};["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(e=>{FV[e]={value:e}}),Object.defineProperties(kl,FV),Object.defineProperty(NV,"isAxiosError",{value:!0}),kl.from=(e,o,s,B,U,m)=>{const y=Object.create(NV);return On.toFlatObject(e,y,function(a){return a!==Error.prototype},a=>a!=="isAxiosError"),kl.call(y,e.message,o,s,B,U),y.cause=e,y.name=e.name,m&&Object.assign(y,m),y};const Mpt=null;function eC(e){return On.isPlainObject(e)||On.isArray(e)}function RV(e){return On.endsWith(e,"[]")?e.slice(0,-2):e}function VV(e,o,s){return e?e.concat(o).map(function(B,U){return B=RV(B),!s&&U?"["+B+"]":B}).join(s?".":""):o}function Ipt(e){return On.isArray(e)&&!e.some(eC)}const Ppt=On.toFlatObject(On,{},null,function(e){return/^is[A-Z]/.test(e)});function g4(e,o,s){if(!On.isObject(e))throw new TypeError("target must be an object");o=o||new FormData,s=On.toFlatObject(s,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,h){return!On.isUndefined(h[x])});const B=s.metaTokens,U=s.visitor||p,m=s.dots,y=s.indexes,a=(s.Blob||typeof Blob<"u"&&Blob)&&On.isSpecCompliantForm(o);if(!On.isFunction(U))throw new TypeError("visitor must be a function");function v(x){if(x===null)return"";if(On.isDate(x))return x.toISOString();if(On.isBoolean(x))return x.toString();if(!a&&On.isBlob(x))throw new kl("Blob is not supported. Use a Buffer instead.");return On.isArrayBuffer(x)||On.isTypedArray(x)?a&&typeof Blob=="function"?new Blob([x]):Buffer.from(x):x}function p(x,h,n){let i=x;if(x&&!n&&typeof x=="object"){if(On.endsWith(h,"{}"))h=B?h:h.slice(0,-2),x=JSON.stringify(x);else if(On.isArray(x)&&Ipt(x)||(On.isFileList(x)||On.endsWith(h,"[]"))&&(i=On.toArray(x)))return h=RV(h),i.forEach(function(c,l){!(On.isUndefined(c)||c===null)&&o.append(y===!0?VV([h],l,m):y===null?h:h+"[]",v(c))}),!1}return eC(x)?!0:(o.append(VV(n,h,m),v(x)),!1)}const r=[],_=Object.assign(Ppt,{defaultVisitor:p,convertValue:v,isVisitable:eC});function b(x,h){if(!On.isUndefined(x)){if(r.indexOf(x)!==-1)throw Error("Circular reference detected in "+h.join("."));r.push(x),On.forEach(x,function(n,i){(!(On.isUndefined(n)||n===null)&&U.call(o,n,On.isString(i)?i.trim():i,h,_))===!0&&b(n,h?h.concat(i):[i])}),r.pop()}}if(!On.isObject(e))throw new TypeError("data must be an object");return b(e),o}function jV(e){const o={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(s){return o[s]})}function tC(e,o){this._pairs=[],e&&g4(e,this,o)}const UV=tC.prototype;UV.append=function(e,o){this._pairs.push([e,o])},UV.toString=function(e){const o=e?function(s){return e.call(this,s,jV)}:jV;return this._pairs.map(function(s){return o(s[0])+"="+o(s[1])},"").join("&")};function Lpt(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function GV(e,o,s){if(!o)return e;const B=s&&s.encode||Lpt;On.isFunction(s)&&(s={serialize:s});const U=s&&s.serialize;let m;if(U?m=U(o,s):m=On.isURLSearchParams(o)?o.toString():new tC(o,s).toString(B),m){const y=e.indexOf("#");y!==-1&&(e=e.slice(0,y)),e+=(e.indexOf("?")===-1?"?":"&")+m}return e}let HV=class{constructor(){this.handlers=[]}use(o,s,B){return this.handlers.push({fulfilled:o,rejected:s,synchronous:B?B.synchronous:!1,runWhen:B?B.runWhen:null}),this.handlers.length-1}eject(o){this.handlers[o]&&(this.handlers[o]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(o){On.forEach(this.handlers,function(s){s!==null&&o(s)})}};const ZV={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Bpt=typeof URLSearchParams<"u"?URLSearchParams:tC,zpt=typeof FormData<"u"?FormData:null,Opt=typeof Blob<"u"?Blob:null,Dpt={isBrowser:!0,classes:{URLSearchParams:Bpt,FormData:zpt,Blob:Opt},protocols:["http","https","file","blob","url","data"]},aC=typeof window<"u"&&typeof document<"u",rC=typeof navigator=="object"&&navigator||void 0,Npt=aC&&(!rC||["ReactNative","NativeScript","NS"].indexOf(rC.product)<0),Fpt=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Rpt=aC&&window.location.href||"http://localhost",Vpt=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:aC,hasStandardBrowserEnv:Npt,hasStandardBrowserWebWorkerEnv:Fpt,navigator:rC,origin:Rpt},Symbol.toStringTag,{value:"Module"})),Bh={...Vpt,...Dpt};function jpt(e,o){return g4(e,new Bh.classes.URLSearchParams,Object.assign({visitor:function(s,B,U,m){return Bh.isNode&&On.isBuffer(s)?(this.append(B,s.toString("base64")),!1):m.defaultVisitor.apply(this,arguments)}},o))}function Upt(e){return On.matchAll(/\w+|\[(\w*)]/g,e).map(o=>o[0]==="[]"?"":o[1]||o[0])}function Gpt(e){const o={},s=Object.keys(e);let B;const U=s.length;let m;for(B=0;B<U;B++)m=s[B],o[m]=e[m];return o}function WV(e){function o(s,B,U,m){let y=s[m++];if(y==="__proto__")return!0;const a=Number.isFinite(+y),v=m>=s.length;return y=!y&&On.isArray(U)?U.length:y,v?(On.hasOwnProp(U,y)?U[y]=[U[y],B]:U[y]=B,!a):((!U[y]||!On.isObject(U[y]))&&(U[y]=[]),o(s,B,U[y],m)&&On.isArray(U[y])&&(U[y]=Gpt(U[y])),!a)}if(On.isFormData(e)&&On.isFunction(e.entries)){const s={};return On.forEachEntry(e,(B,U)=>{o(Upt(B),U,s,0)}),s}return null}function Hpt(e,o,s){if(On.isString(e))try{return(o||JSON.parse)(e),On.trim(e)}catch(B){if(B.name!=="SyntaxError")throw B}return(s||JSON.stringify)(e)}const Hb={transitional:ZV,adapter:["xhr","http","fetch"],transformRequest:[function(e,o){const s=o.getContentType()||"",B=s.indexOf("application/json")>-1,U=On.isObject(e);if(U&&On.isHTMLForm(e)&&(e=new FormData(e)),On.isFormData(e))return B?JSON.stringify(WV(e)):e;if(On.isArrayBuffer(e)||On.isBuffer(e)||On.isStream(e)||On.isFile(e)||On.isBlob(e)||On.isReadableStream(e))return e;if(On.isArrayBufferView(e))return e.buffer;if(On.isURLSearchParams(e))return o.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let m;if(U){if(s.indexOf("application/x-www-form-urlencoded")>-1)return jpt(e,this.formSerializer).toString();if((m=On.isFileList(e))||s.indexOf("multipart/form-data")>-1){const y=this.env&&this.env.FormData;return g4(m?{"files[]":e}:e,y&&new y,this.formSerializer)}}return U||B?(o.setContentType("application/json",!1),Hpt(e)):e}],transformResponse:[function(e){const o=this.transitional||Hb.transitional,s=o&&o.forcedJSONParsing,B=this.responseType==="json";if(On.isResponse(e)||On.isReadableStream(e))return e;if(e&&On.isString(e)&&(s&&!this.responseType||B)){const U=!(o&&o.silentJSONParsing)&&B;try{return JSON.parse(e)}catch(m){if(U)throw m.name==="SyntaxError"?kl.from(m,kl.ERR_BAD_RESPONSE,this,null,this.response):m}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Bh.classes.FormData,Blob:Bh.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};On.forEach(["delete","get","head","post","put","patch"],e=>{Hb.headers[e]={}});const Zpt=On.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"]),Wpt=e=>{const o={};let s,B,U;return e&&e.split(`
4136
+ */const Xd={itemsToShow:1,itemsToScroll:1,modelValue:0,transition:300,autoplay:0,snapAlign:"center",wrapAround:!1,throttle:16,pauseAutoplayOnHover:!1,mouseDrag:!0,touchDrag:!0,dir:"ltr",breakpoints:void 0,i18n:{ariaNextSlide:"Navigate to next slide",ariaPreviousSlide:"Navigate to previous slide",ariaNavigateToSlide:"Navigate to slide {slideNumber}",ariaGallery:"Gallery",itemXofY:"Item {currentSlide} of {slidesCount}",iconArrowUp:"Arrow pointing upwards",iconArrowDown:"Arrow pointing downwards",iconArrowRight:"Arrow pointing to the right",iconArrowLeft:"Arrow pointing to the left"}},yV={itemsToShow:{default:Xd.itemsToShow,type:Number},itemsToScroll:{default:Xd.itemsToScroll,type:Number},wrapAround:{default:Xd.wrapAround,type:Boolean},throttle:{default:Xd.throttle,type:Number},snapAlign:{default:Xd.snapAlign,validator(e){return["start","end","center","center-even","center-odd"].includes(e)}},transition:{default:Xd.transition,type:Number},breakpoints:{default:Xd.breakpoints,type:Object},autoplay:{default:Xd.autoplay,type:Number},pauseAutoplayOnHover:{default:Xd.pauseAutoplayOnHover,type:Boolean},modelValue:{default:void 0,type:Number},mouseDrag:{default:Xd.mouseDrag,type:Boolean},touchDrag:{default:Xd.touchDrag,type:Boolean},dir:{default:Xd.dir,validator(e){return["rtl","ltr"].includes(e)}},i18n:{default:Xd.i18n,type:Object},settings:{default(){return{}},type:Object}};function idt({config:e,slidesCount:o}){const{snapAlign:s,wrapAround:B,itemsToShow:U=1}=e;if(B)return Math.max(o-1,0);let m;switch(s){case"start":m=o-U;break;case"end":m=o-1;break;case"center":case"center-odd":m=o-Math.ceil((U-.5)/2);break;case"center-even":m=o-Math.ceil(U/2);break;default:m=0;break}return Math.max(m,0)}function odt({config:e,slidesCount:o}){const{wrapAround:s,snapAlign:B,itemsToShow:U=1}=e;let m=0;if(s||U>o)return m;switch(B){case"start":m=0;break;case"end":m=U-1;break;case"center":case"center-odd":m=Math.floor((U-1)/2);break;case"center-even":m=Math.floor((U-2)/2);break;default:m=0;break}return m}function ZS({val:e,max:o,min:s}){return o<s?e:Math.min(Math.max(e,s),o)}function sdt({config:e,currentSlide:o,slidesCount:s}){const{snapAlign:B,wrapAround:U,itemsToShow:m=1}=e;let y=o;switch(B){case"center":case"center-odd":y-=(m-1)/2;break;case"center-even":y-=(m-2)/2;break;case"end":y-=m-1;break}return U?y:ZS({val:y,max:s-m,min:0})}function vV(e){return e?e.reduce((o,s)=>{var B;return s.type===t.Fragment?[...o,...vV(s.children)]:((B=s.type)===null||B===void 0?void 0:B.name)==="CarouselSlide"?[...o,s]:o},[]):[]}function WS({val:e,max:o,min:s=0}){return e>o?WS({val:e-(o+1),max:o,min:s}):e<s?WS({val:e+(o+1),max:o,min:s}):e}function ldt(e,o){let s;return o?function(...B){const U=this;s||(e.apply(U,B),s=!0,setTimeout(()=>s=!1,o))}:e}function cdt(e,o){let s;return function(...B){s&&clearTimeout(s),s=setTimeout(()=>{e(...B),s=null},o)}}function udt(e="",o={}){return Object.entries(o).reduce((s,[B,U])=>s.replace(`{${B}}`,String(U)),e)}var ddt=t.defineComponent({name:"ARIA",setup(){const e=t.inject("config",t.reactive(Object.assign({},Xd))),o=t.inject("currentSlide",t.ref(0)),s=t.inject("slidesCount",t.ref(0));return()=>t.h("div",{class:["carousel__liveregion","carousel__sr-only"],"aria-live":"polite","aria-atomic":"true"},udt(e.i18n.itemXofY,{currentSlide:o.value+1,slidesCount:s.value}))}}),hdt=t.defineComponent({name:"Carousel",props:yV,setup(e,{slots:o,emit:s,expose:B}){var U;const m=t.ref(null),y=t.ref([]),a=t.ref(0),v=t.ref(0),p=t.reactive(Object.assign({},Xd));let r=Object.assign({},Xd),_;const b=t.ref((U=e.modelValue)!==null&&U!==void 0?U:0),x=t.ref(0),h=t.ref(0),n=t.ref(0),i=t.ref(0);let c,l;t.provide("config",p),t.provide("slidesCount",v),t.provide("currentSlide",b),t.provide("maxSlide",n),t.provide("minSlide",i),t.provide("slideWidth",a);function d(){_=Object.assign({},e.breakpoints),r=Object.assign(Object.assign(Object.assign({},r),e),{i18n:Object.assign(Object.assign({},r.i18n),e.i18n),breakpoints:void 0}),w(r)}function g(){if(!_||!Object.keys(_).length)return;const re=Object.keys(_).map(ie=>Number(ie)).sort((ie,me)=>+me-+ie);let se=Object.assign({},r);re.some(ie=>{const me=window.matchMedia(`(min-width: ${ie}px)`).matches;return me&&(se=Object.assign(Object.assign({},se),_[ie])),me}),w(se)}function w(re){Object.entries(re).forEach(([se,ie])=>p[se]=ie)}const C=cdt(()=>{g(),E()},16);function E(){if(!m.value)return;const re=m.value.getBoundingClientRect();a.value=re.width/p.itemsToShow}function A(){v.value<=0||(h.value=Math.ceil((v.value-1)/2),n.value=idt({config:p,slidesCount:v.value}),i.value=odt({config:p,slidesCount:v.value}),p.wrapAround||(b.value=ZS({val:b.value,max:n.value,min:i.value})))}t.onMounted(()=>{t.nextTick(()=>E()),setTimeout(()=>E(),1e3),g(),G(),window.addEventListener("resize",C,{passive:!0}),s("init")}),t.onUnmounted(()=>{l&&clearTimeout(l),c&&clearInterval(c),window.removeEventListener("resize",C,{passive:!0})});let P=!1;const L={x:0,y:0},T={x:0,y:0},I=t.reactive({x:0,y:0}),M=t.ref(!1),S=t.ref(!1),z=()=>{M.value=!0},k=()=>{M.value=!1};function O(re){["INPUT","TEXTAREA","SELECT"].includes(re.target.tagName)||(P=re.type==="touchstart",P||re.preventDefault(),!(!P&&re.button!==0||Z.value)&&(L.x=P?re.touches[0].clientX:re.clientX,L.y=P?re.touches[0].clientY:re.clientY,document.addEventListener(P?"touchmove":"mousemove",N,!0),document.addEventListener(P?"touchend":"mouseup",j,!0)))}const N=ldt(re=>{S.value=!0,T.x=P?re.touches[0].clientX:re.clientX,T.y=P?re.touches[0].clientY:re.clientY;const se=T.x-L.x,ie=T.y-L.y;I.y=ie,I.x=se},p.throttle);function j(){const re=p.dir==="rtl"?-1:1,se=Math.sign(I.x)*.4,ie=Math.round(I.x/a.value+se)*re;if(ie&&!P){const me=ye=>{ye.stopPropagation(),window.removeEventListener("click",me,!0)};window.addEventListener("click",me,!0)}$(b.value-ie),I.x=0,I.y=0,S.value=!1,document.removeEventListener(P?"touchmove":"mousemove",N,!0),document.removeEventListener(P?"touchend":"mouseup",j,!0)}function G(){!p.autoplay||p.autoplay<=0||(c=setInterval(()=>{p.pauseAutoplayOnHover&&M.value||ne()},p.autoplay))}function H(){c&&(clearInterval(c),c=null),G()}const Z=t.ref(!1);function $(re){const se=p.wrapAround?re:ZS({val:re,max:n.value,min:i.value});b.value===se||Z.value||(s("slide-start",{slidingToIndex:re,currentSlideIndex:b.value,prevSlideIndex:x.value,slidesCount:v.value}),Z.value=!0,x.value=b.value,b.value=se,l=setTimeout(()=>{if(p.wrapAround){const ie=WS({val:se,max:n.value,min:0});ie!==b.value&&(b.value=ie,s("loop",{currentSlideIndex:b.value,slidingToIndex:re}))}s("update:modelValue",b.value),s("slide-end",{currentSlideIndex:b.value,prevSlideIndex:x.value,slidesCount:v.value}),Z.value=!1,H()},p.transition))}function ne(){$(b.value+p.itemsToScroll)}function q(){$(b.value-p.itemsToScroll)}const K={slideTo:$,next:ne,prev:q};t.provide("nav",K),t.provide("isSliding",Z);const ee=t.computed(()=>sdt({config:p,currentSlide:b.value,slidesCount:v.value}));t.provide("slidesToScroll",ee);const X=t.computed(()=>{const re=p.dir==="rtl"?-1:1,se=ee.value*a.value*re;return{transform:`translateX(${I.x-se}px)`,transition:`${Z.value?p.transition:0}ms`,margin:p.wrapAround?`0 -${v.value*a.value}px`:"",width:"100%"}});function Q(){d(),g(),A(),E(),H()}Object.keys(yV).forEach(re=>{["modelValue"].includes(re)||t.watch(()=>e[re],Q)}),t.watch(()=>e.modelValue,re=>{re!==b.value&&$(Number(re))}),t.watch(v,A),s("before-init"),d();const ce={config:p,slidesCount:v,slideWidth:a,next:ne,prev:q,slideTo:$,currentSlide:b,maxSlide:n,minSlide:i,middleSlide:h};B({updateBreakpointsConfigs:g,updateSlidesData:A,updateSlideWidth:E,initDefaultConfigs:d,restartCarousel:Q,slideTo:$,next:ne,prev:q,nav:K,data:ce});const de=o.default||o.slides,he=o.addons,pe=t.reactive(ce);return()=>{const re=vV(de==null?void 0:de(pe)),se=(he==null?void 0:he(pe))||[];re.forEach((ve,we)=>ve.props.index=we);let ie=re;if(p.wrapAround){const ve=re.map((Se,Ce)=>t.cloneVNode(Se,{index:-re.length+Ce,isClone:!0,key:`clone-before-${Ce}`})),we=re.map((Se,Ce)=>t.cloneVNode(Se,{index:re.length+Ce,isClone:!0,key:`clone-after-${Ce}`}));ie=[...ve,...re,...we]}y.value=re,v.value=Math.max(re.length,1);const me=t.h("ol",{class:"carousel__track",style:X.value,onMousedownCapture:p.mouseDrag?O:null,onTouchstartPassiveCapture:p.touchDrag?O:null},ie),ye=t.h("div",{class:"carousel__viewport"},me);return t.h("section",{ref:m,class:{carousel:!0,"is-sliding":Z.value,"is-dragging":S.value,"is-hover":M.value,"carousel--rtl":p.dir==="rtl"},dir:p.dir,"aria-label":p.i18n.ariaGallery,tabindex:"0",onMouseenter:z,onMouseleave:k},[ye,se,t.h(ddt)])}}}),bV;(function(e){e.arrowUp="arrowUp",e.arrowDown="arrowDown",e.arrowRight="arrowRight",e.arrowLeft="arrowLeft"})(bV||(bV={}));var pdt=t.defineComponent({name:"CarouselSlide",props:{index:{type:Number,default:1},isClone:{type:Boolean,default:!1}},setup(e,{slots:o}){const s=t.inject("config",t.reactive(Object.assign({},Xd))),B=t.inject("currentSlide",t.ref(0)),U=t.inject("slidesToScroll",t.ref(0)),m=t.inject("isSliding",t.ref(!1)),y=()=>e.index===B.value,a=()=>e.index===B.value-1,v=()=>e.index===B.value+1,p=()=>{const r=Math.floor(U.value),_=Math.ceil(U.value+s.itemsToShow-1);return e.index>=r&&e.index<=_};return()=>{var r;return t.h("li",{style:{width:`${100/s.itemsToShow}%`},class:{carousel__slide:!0,"carousel__slide--clone":e.isClone,"carousel__slide--visible":p(),"carousel__slide--active":y(),"carousel__slide--prev":a(),"carousel__slide--next":v(),"carousel__slide--sliding":m.value},"aria-hidden":!p()},(r=o.default)===null||r===void 0?void 0:r.call(o))}}});const fdt=(e,o)=>{const s=e.__vccOpts||e;for(const[B,U]of o)s[B]=U;return s},mdt=e=>(t.pushScopeId("data-v-54620d25"),e=e(),t.popScopeId(),e),gdt={class:"gsc-carousel"},ydt={key:0},vdt=mdt(()=>t.createElementVNode("div",null,"no hay",-1)),bdt=[vdt],_dt={class:"gsc-carousel__2d__slides"},xdt={width:"9",height:"18",viewBox:"0 0 9 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},wdt=["fill"],kdt={width:"9",height:"18",viewBox:"0 0 9 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Sdt=["fill"],Cdt={class:"gsc-carousel__2d__navigation"},Tdt={width:"8",height:"15",viewBox:"0 0 8 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Adt=["stroke"],Edt={key:1,class:"gsc-carousel__2d__navigation__pagination"},Mdt=["onClick"],Idt={width:"7",height:"15",viewBox:"0 0 7 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Pdt=["stroke"],Ldt={__name:"GSC-Carousel",props:{currentItemIndex:{type:Number,default:0},items:{type:Array,default:()=>[]},is3d:{type:Boolean,default:!1},isPaginationVisible:{type:Boolean,default:!1},areNavigationArrowsVisible:{type:Boolean,default:!0},defaultItemByIndex:{type:Number,default:0},defaultItemByProp:{type:Object,default:null,validator:e=>["propName","value"].every(o=>o in e)},navigationHeight:{type:Number,default:4},navigationBorderRadius:{type:Number,default:4},navigationColor:{type:String,default:"rgba(255, 255, 255, 0.4)"},navigationActiveColor:{type:String,default:"#cbee6b"},navigationActiveWidth:{type:Number,default:30},arrowsColor:{type:String,default:"#cbee6b"},arrowsMaxWidth:{type:String,default:"20px"},wrapAround:{type:Boolean,default:!1},itemsToShow:{type:Number,default:1},isMainSlidePriority:{type:Boolean,default:!1},areSlidesArrowsVisible:{type:Boolean,default:!1},slideLeftArrowBackgroundImage:{type:String,default:"linear-gradient(to right, rgba(13, 29, 41, 1), rgba(0, 0, 0, 0))"},slideRightArrowBackgroundImage:{type:String,default:"linear-gradient(to left, rgba(13, 29, 41, 1), rgba(0, 0, 0, 0))"},areSlidesArrowsRounded:{type:Boolean,default:!1},slidesArrowsLeftAndRight:{type:String,default:"20px"},secondarySlidesOpacity:{type:Number,default:.8},marginTop:{type:String,default:"0"}},emits:["input","update:currentItemIndex"],setup(e,{expose:o,emit:s}){const B=e;t.useCssVars(n=>({"2c72d674":e.slideLeftArrowBackgroundImage,"90a63f40":e.slidesArrowsLeftAndRight,"2627d097":e.slideRightArrowBackgroundImage,"1904d43f":e.marginTop,cfb58986:e.secondarySlidesOpacity}));const U=t.ref(null),m=t.ref({}),y=t.ref(0),a=t.ref(!1);t.watch(U,n=>{n&&a.value?(a.value=!1,v(B.items)):n&&n.slideTo&&n.slideTo(y.value)},{deep:!0}),t.watch(()=>B.currentItemIndex,n=>{y.value!==n&&b(n)}),t.watch(()=>B.defaultItemByIndex,n=>{y.value!==n&&b(n)}),t.watch(()=>B.items,n=>{U.value?v(n):a.value=!0},{immediate:!0});function v(n){n&&n.length&&U.value&&setTimeout(()=>{if(B.defaultItemByProp){const i=B.items.findIndex(c=>c[B.defaultItemByProp.propName]===B.defaultItemByProp.value);i!==-1?(y.value=i,m.value=n[i]):(y.value=0,m.value=n[0])}else y.value=B.defaultItemByIndex,m.value=n[B.defaultItemByIndex];U.value.slideTo&&U.value.slideTo(y.value),m.value&&y.value===0&&s("input",{selectedItem:m.value,selectedItemIndex:y.value})},500)}function p(){U.value&&U.value.next()}function r(){U.value&&U.value.prev()}function _(){U.value&&U.value.updateSlideWidth()}function b(n){U.value&&U.value.slideTo(n)}function x(n){U.value.slideTo(n)}function h(n){const i=n.slidingToIndex<0?B.items.length-1:n.slidingToIndex===B.items.length?0:n.slidingToIndex;y.value=i,m.value=B.items[i],s("update:currentItemIndex",i),s("input",{selectedItem:m.value,selectedItemIndex:y.value})}return o({prev:r,next:p,updateSlideWidth:_,slideTo:b}),(n,i)=>(t.openBlock(),t.createElementBlock("div",gdt,[B.is3d?(t.openBlock(),t.createElementBlock("div",ydt,bdt)):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["gsc-carousel__2d",{"main-slide-priority":e.isMainSlidePriority}])},[t.createElementVNode("div",_dt,[t.createVNode(t.unref(hdt),{ref_key:"carousel2d",ref:U,"items-to-show":e.itemsToShow,"wrap-around":e.wrapAround,onSlideStart:h},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.items,(c,l)=>(t.openBlock(),t.createBlock(t.unref(pdt),{key:l},{default:t.withCtx(()=>[t.renderSlot(n.$slots,"default",{item:c},void 0,!0)]),_:2},1024))),128))]),_:3},8,["items-to-show","wrap-around"])]),e.areSlidesArrowsVisible&&e.items.length>1?(t.openBlock(),t.createElementBlock("div",{key:0,class:"gsc-carousel__2d__arrow-left",style:t.normalizeStyle("max-width:"+e.arrowsMaxWidth+"!important"),onClick:i[0]||(i[0]=c=>U.value.prev())},[t.createElementVNode("div",{class:t.normalizeClass(["gsc-carousel__2d__slide-button",{rounded:e.areSlidesArrowsRounded}])},[(t.openBlock(),t.createElementBlock("svg",xdt,[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.10399 9L8.62342 15.4393C9.12552 16.0251 9.12552 16.9749 8.62342 17.5607C8.12132 18.1464 7.30725 18.1464 6.80514 17.5607L0.376575 10.0607C-0.125528 9.47487 -0.125528 8.52512 0.376575 7.93934L6.80515 0.439339C7.30725 -0.146447 8.12132 -0.146447 8.62342 0.43934C9.12553 1.02513 9.12553 1.97487 8.62342 2.56066L3.10399 9Z",fill:e.arrowsColor},null,8,wdt)]))],2)],4)):t.createCommentVNode("",!0),e.areSlidesArrowsVisible&&e.items.length>1?(t.openBlock(),t.createElementBlock("div",{key:1,class:"gsc-carousel__2d__arrow-right",style:t.normalizeStyle("max-width:"+e.arrowsMaxWidth+"!important"),onClick:i[1]||(i[1]=c=>p())},[t.createElementVNode("div",{class:t.normalizeClass(["gsc-carousel__2d__slide-button",{rounded:e.areSlidesArrowsRounded}])},[(t.openBlock(),t.createElementBlock("svg",kdt,[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.89601 9L0.376575 2.56066C-0.125528 1.97487 -0.125528 1.02513 0.376575 0.439339C0.878675 -0.146447 1.69275 -0.146447 2.19486 0.43934L8.62343 7.93934C9.12553 8.52513 9.12553 9.47487 8.62343 10.0607L2.19486 17.5607C1.69275 18.1464 0.878675 18.1464 0.376575 17.5607C-0.125528 16.9749 -0.125528 16.0251 0.376575 15.4393L5.89601 9Z",fill:e.arrowsColor},null,8,Sdt)]))],2)],4)):t.createCommentVNode("",!0),t.createElementVNode("div",Cdt,[e.areNavigationArrowsVisible?(t.openBlock(),t.createElementBlock("div",{key:0,class:"gsc-carousel__2d__navigation__arrow-left",onClick:i[2]||(i[2]=c=>r())},[(t.openBlock(),t.createElementBlock("svg",Tdt,[t.createElementVNode("path",{d:"M6.72998 13.894L1.46621 8.63028C0.84457 8.00863 0.84457 6.9914 1.46621 6.36976L6.72998 1.10599",stroke:B.arrowsColor},null,8,Adt)]))])):t.createCommentVNode("",!0),e.isPaginationVisible?(t.openBlock(),t.createElementBlock("div",Edt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.items,(c,l)=>(t.openBlock(),t.createElementBlock("div",{key:`i-${l}`,class:"gsc-carousel__2d__navigation__pagination__item",style:t.normalizeStyle({height:`${B.navigationHeight}px`,width:`${y.value===l?B.navigationActiveWidth:B.navigationActiveWidth/2}px`,borderRadius:`${B.navigationBorderRadius}px`,backgroundColor:`${y.value===l?B.navigationActiveColor:B.navigationColor}`,transition:"all 0.1s ease-in-out"}),onClick:d=>x(l)},null,12,Mdt))),128))])):t.createCommentVNode("",!0),e.areNavigationArrowsVisible?(t.openBlock(),t.createElementBlock("div",{key:2,class:"gsc-carousel__2d__navigation__arrow-right",onClick:i[3]||(i[3]=c=>U.value.next())},[(t.openBlock(),t.createElementBlock("svg",Idt,[t.createElementVNode("path",{d:"M0.72998 1.10599L5.99375 6.36975C6.61539 6.9914 6.61539 8.00863 5.99375 8.63027L0.72998 13.894",stroke:B.arrowsColor},null,8,Pdt)]))])):t.createCommentVNode("",!0)])],2))]))}},Bdt=fdt(Ldt,[["__scopeId","data-v-54620d25"]]),NQt="",_V={3:"Albanesa",4:"Argelina",6:"Andorrano",7:"Angoleña",8:"Anguillan",9:"Antiguan",10:"Argentina",11:"Armenia",12:"Arubeño",13:"Austríaca",14:"Austríaca",15:"Azerbaiyano",16:"Bahamas",17:"Bareini",18:"Bangladesí",19:"Barbadense",20:"Bielorrusa",21:"Belga",22:"Beliceña",23:"Beninesa",24:"Bermudeña",25:"Butanés",26:"Boliviana",27:"Bosnia",28:"Botsuano",29:"Brasileña",30:"Islas Vírgenes Británicas",31:"Bruneano",32:"Búlgara",33:"Burundés",34:"Burmesa",35:"Burundés",36:"Camboyana",37:"Camerunés",38:"Canadiense",39:"Caboverdiano",40:"Caimanés",41:"Centroafricana",42:"Chadiano",43:"Chilena",44:"China",45:"Isla de Navidad",46:"Cocos Island",47:"Colombiana",48:"Comorense",49:"Congoleña",50:"Cookiano",51:"Costarricense",52:"Marfileña",53:"Croata",54:"Cubana",55:"Chipriota",56:"Checa",57:"Danesa",58:"Djibouti",60:"Dominicana",61:"Timorense",62:"Ecuatoriana",63:"Egipcia",64:"Salvadoreña",65:"Inglesa",66:"Ecuatoguineano",67:"Eritreo",68:"Estoniana",69:"Etíope",70:"Islas Malvinas",71:"Feroés",72:"Fiyiano",73:"Finlandesa",74:"Francesa",75:"Guayana Francesa",76:"Francopolinecio",77:"Gabonesa",78:"Gambiana",79:"Georgiano",80:"Alemana",81:"Ghanesa",82:"Gibraltareño",221:"Británico",84:"Griega",85:"Groenlandés",86:"Granadino",87:"Guadeloupeño",89:"Guatemalteca",90:"Guineana",91:"Guyanés",92:"Haitiana",93:"Hondureña",94:"Hongkongese",95:"Húngaro",96:"Islandesa",97:"Indio",98:"Indonesia",99:"Iraní",100:"Iraquí",101:"Irlandesa",102:"Manés",103:"Israelí",104:"Italiana",105:"Jamaiquina",106:"Japonesa",107:"Jordana",108:"Kazaja",109:"Keniana",110:"Kiribatiano",111:"Coreana",112:"Surcoreana",113:"Kosovan",114:"Kuwaití",115:"Kirguisa",116:"Laosiano",117:"Letona",118:"Libanesa",119:"Basotho",120:"Liberiana",121:"Libia",122:"Liechtenstein",123:"Lituano",124:"Luxemburguesa",125:"Macaneso",126:"Macedonia",127:"Malgache",128:"Malaya",129:"Malaya",130:"Maldivo",131:"Mali",132:"Maltesa",133:"Marshallese",134:"Martiniqueña",135:"Mauritania",136:"Mauriciano",137:"Mahoran",138:"Mexicana",139:"Micronesio",140:"Moldava",141:"Monacan",142:"Mongol",143:"Montenegrina",144:"Montserratiano",145:"Marroqui",146:"Mozambiqueña",147:"Namibio",148:"Nauruan",149:"Nepalí",150:"Holandesa",151:"Neocaledonio",152:"Neozelandesa",153:"Nicaragüense",154:"Niueño",155:"Nigerina",156:"Nigeriana",157:"Noruega",158:"Normariano",159:"Omaní",160:"Palestina",161:"Palestina",162:"Palauan",163:"Panameña",164:"Papú",165:"Paraguaya",166:"Peruana",167:"Filipina",168:"Pitcairnés",169:"Polaca",170:"Portuguesa",171:"Puertorriqueña",172:"Catari",173:"Reunionés",174:"Rumana",175:"Rusa",176:"Ruandés",177:"Santa Elena",178:"Sancristobaleña",179:"Santa Lucía",180:"Miquelonnais",181:"Sanvicentina",182:"Samoano",183:"Sanmariense",184:"Santotomense",185:"Saudí",186:"Escocesa",187:"Senegalense",188:"Serbia",189:"Seychellense",190:"Sierraleonesa",191:"Singapurense",192:"Eslovena",193:"Eslovena",194:"Salomonense",195:"Somalí",196:"Sudafricana",197:"Surosetio",198:"Española",199:"Esrilanques",200:"Sudanés",201:"Surinamés",202:"Swazi",203:"Sueca",204:"Suiza",205:"Sirio",206:"Taiwanesa",207:"Tayiko",208:"Tanzano",209:"Tailandesa",210:"Togo",211:"Tongano",212:"Trinitaria",213:"Tunecina",214:"Turca",215:"Turkmena",216:"none",217:"Tuvaluano",218:"Ugandesa",219:"Ucraniana",220:"Emiratí",222:"Americana",223:"Uruguaya",224:"Uzbeka",225:"Vanuatuense",226:"Venezolana",227:"Vietnamita",228:"Islas Vírgenes",229:"Galesa",230:"Walisiano",231:"Saharaui",232:"Yemení",233:"Zambiana",234:"Zimbabuense",236:"Curazaleña",237:"San Martín",239:"Debutante"},FQt="",qS={components:{GSCCarousel:Bdt,GSCLeaders:Gut,GSCRowTable:iV,GSCTableHeader:QR,GSCExpandedInfo:gV},props:{isTeam:{type:Boolean,default:!1},typeTable:{type:Number,default:0},typeData:{type:Number,default:1},gameId:{type:Number,default:0},filtersProp:{type:[Object,String],default:()=>{}},game:{type:Object,default:()=>({})},isWidget:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},canPlayVideos:{type:Boolean,default:!1},filterTeam:{type:Number,default:0},timeLiveComparativeAvanced:{type:Number,default:6e4},category:{type:Number,default:1},categoryName:{type:String,default:"Goles"},seasonSelected:{type:Object,default:()=>({})},season:{type:Number,default:1772},type:{type:Number,default:0},borderRadius:{type:String,default:"8px"},borderWidth:{type:[String,Number],default:"2px"},borderColor:{type:String,default:"#cfcfcf"},backgroundOdd:{type:String,default:"#172531"},backgroundEven:{type:String,default:"#0d1d29"},numRows:{type:Number,default:5}},setup(){const e=t.ref("myDivRef"),{elementSize:o}=jb(e);return{myDivRef:e,elementSize:o}},watch:{category:{async handler(){this.playersInfo={},this.teamInfo={},this.isloading=!0,this.formatFilterStats=[],await this.getCategoryStats(this.season)}},game:{immediate:!0,deep:!0,async handler(e){e&&(this.playersInfo={},this.teamInfo={},this.isloading=!0,this.formatFilterStats=[],await this.getCategoryStats(this.season),this.game.is_live&&(this.createIntervalTops(),this.$emit("intervalidtops",this.intervalIdtops)))}},typeData:{immediate:!0,async handler(e){await this.getCategoryStats(this.season),e===1&&this.game.is_live?(this.createIntervalTops(),this.$emit("intervalidtops",this.intervalIdtops)):clearInterval(this.intervalIdtops)}},filtersProp:{immediate:!1,deep:!0,async handler(e,o){e&&(JSON.stringify(e)!==JSON.stringify(o)||this.sonConjuntosDistintos(e.setNationalitiesIds,o.setNationalitiesIds))&&(this.isloading=!0,this.filterEmitAux=e,[1,23,3,4,5,7,6,9,8,11,10,12,13,15,14,17,16,22].includes(this.category)?this.filterEmitAux.typeZone=1:this.filterEmitAux.typeZone=2,this.formatFilterStats=await this.filterRecords(this.filterEmitAux))}}},computed:{topData(){if(this.changeStateLoading(!0),Object.entries(this.statsData).length>0&&this.formatFilterStats.length>0){var e={},o={},s=[],B=[],U=[];return this.formatFilterStats.map(m=>{e[m.team_id]?e[m.team_id].total=e[m.team_id].total+m.total:(e[m.team_id]={},e[m.team_id].total=m.total,e[m.team_id].id=this.teamInfo[m.team_id].id,e[m.team_id].name=this.teamInfo[m.team_id].name.replace(" Femenil",""),e[m.team_id].img=Af("https://golstatsimages.blob.core.windows.net/teams-80/"+m.team_id+".png",this.$store.getters.getProviderId),e[m.team_id].effectiveness=this.teamInfo[m.team_id].effectiveness,e[m.team_id].frecuency=this.teamInfo[m.team_id].frecuency,e[m.team_id].game_avg=this.teamInfo[m.team_id].game_avg,e[m.team_id].game_avg_last_season=this.teamInfo[m.team_id].game_avg_last_season,e[m.team_id].games_played_lastseason=this.teamInfo[m.team_id].games_played_lastseason,e[m.team_id].games_played=this.teamInfo[m.team_id].games_played,e[m.team_id].positiontable=this.teamInfo[m.team_id].positiontable,e[m.team_id].goals=this.teamInfo[m.team_id].goals,e[m.team_id].goalsrecived=this.teamInfo[m.team_id].goalsrecived,e[m.team_id].xg=this.teamInfo[m.team_id].xg),o[m.player_id]?m.player_id!=0&&m.player_id!=62117&&(o[m.player_id].total=o[m.player_id].total+m.total):m.player_id!=0&&m.player_id!=62117&&(o[m.player_id]={},o[m.player_id].total=m.total,m.player_id&&this.playersInfo[m.player_id]?(o[m.player_id].name=this.playersInfo[m.player_id].name,o[m.player_id].name_short=this.getnameshort(this.playersInfo[m.player_id].name),o[m.player_id].img=this.playersInfo[m.player_id].img,o[m.player_id].id=this.playersInfo[m.player_id].id,o[m.player_id].age=this.playersInfo[m.player_id].age,o[m.player_id].team=this.playersInfo[m.player_id].team,o[m.player_id].teamname=this.playersInfo[m.player_id].teamname,o[m.player_id].teamid=this.playersInfo[m.player_id].teamid,o[m.player_id].position=this.playersInfo[m.player_id].position,o[m.player_id].positionId=this.playersInfo[m.player_id].positionId,o[m.player_id].positionfull=this.playersInfo[m.player_id].positionfull,o[m.player_id].country=this.playersInfo[m.player_id].country,o[m.player_id].effectiveness=this.playersInfo[m.player_id].effectiveness,o[m.player_id].minutes=this.playersInfo[m.player_id].minutes_played,o[m.player_id].games=this.playersInfo[m.player_id].games_played,o[m.player_id].date=this.playersInfo[m.player_id].date,o[m.player_id].nationality=this.playersInfo[m.player_id].nationality,o[m.player_id].player_country_flag=this.playersInfo[m.player_id].player_country_flag,o[m.player_id].categoryName=this.categoryName):(o[m.player_id].id=m.player_id,o[m.player_id].name=m.player_id,o[m.player_id].img="SIN IMAGEN",o[m.player_id].age="",o[m.player_id].teamname="",o[m.player_id].team="",o[m.player_id].teamid=0,o[m.player_id].position="",o[m.player_id].positionId=0,o[m.player_id].positionfull="",o[m.player_id].country="",o[m.player_id].effectiveness="",o[m.player_id].minutes="",o[m.player_id].games="",o[m.player_id].date="00-00-0000",o[m.player_id].nationality="",o[m.player_id].player_country_flag="",o[m.player_id].categoryName=""))}),s.push(...Object.values(e)),B.push(...Object.values(o)),s=this.sortAndSlice(Object.values(e),60),B=B.sort(this.compareObjectsMinutes).slice(0,60),B=B.map((m,y)=>(m.top=y<9?"0"+(y+1):""+(y+1),m)),s=s.map((m,y)=>(m.top=y<9?"0"+(y+1):""+(y+1),m)),this.filterTeam!==0&&!this.isTeam&&(U=B.filter(m=>m.teamid===this.filterTeam)),this.changeStateLoading(!1),this.isTeam?this.formatArrayPaginate(s):this.filterTeam!=0?this.formatArrayPaginate(U):this.formatArrayPaginate(B)}else return this.changeStateLoading(!1),[]}},data:()=>({url:"https://8grl16o77j.execute-api.us-west-2.amazonaws.com/prod/live/tops",videoCategoriesMap:{1:[12,55,"35_r","54_r"],2:[2,20],3:[485,486,487,488],4:[10,324],5:[27,323],6:[510],7:[537,540,544,547],8:[328],9:[231,238,280,287,294,406],10:[13,25],11:[98,101,104,105,109,112,115,116],12:[4],13:[88],14:[5],15:[34],16:[23],17:[11],18:[17,50],19:[18,49],20:[14,52],21:[15,53],22:[39],23:[31,32]},urlPrematch:"https://8grl16o77j.execute-api.us-west-2.amazonaws.com/prod/topsBySeasonAndCategory/",data_headers:["team_id","player_id","playing_as","match_result","section","total","origen","destino"],token:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE",mapPlayers:new Map,setNationalityIds:new Set,arrayAgeRange:[0,0],arePlaysEmpty:!1,teamInfo:{},formatFilterStats:[],formatStats:[],playersInfo:{},isloading:!0,statsData:{},updateSlider:0,intervalIdtops:null,filterEmitAux:{},filtersSelect:{playingAs:[],matchResult:[],sections:[],zone:[],typeZone:[]},filtersValues:{type:1,sections:[1,2,3,4,5,6],matchResult:[1,2,3],playingAs:[1,2],zone:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],typeZone:1,arrayAgeRange:[1,60],setNationalitiesIds:[],setPositionsIds:[1,2,3,4,5,6,7,8,9]},expand:!1,playerexpand:0,positions:[{name:"Portero",fullname:"POR"},{name:"Defensa central",fullname:"DFC"},{name:"Lateral por izquierda",fullname:"LI"},{name:"Lateral por derecha",fullname:"LD"},{name:"Volante por izquierda",fullname:"VI"},{name:"Volante por derecha",fullname:"VD"},{name:"Volante defensivo",fullname:"VDF"},{name:"Volante ofensivo",fullname:"VO"},{name:"Delantero",fullname:"DEL"},{name:"Desconocida",fullname:"Desc"}],categories:[{id:1,name:"Goles"}]}),async created(){await this.fetchVideoCategories()},methods:{getImageUrl:Af,changeStateLoading(e){this.isloading=e},compareObjectsMinutes(e,o){return e.total>o.total?-1:e.total<o.total?1:e.minutes<o.minutes?-1:e.minutes>o.minutes?1:0},sonConjuntosDistintos(e,o){const s=Array.from(e),B=Array.from(o);if(s.length!==B.length)return!0;for(let U=0;U<s.length;U++)if(!o.has(s[U]))return!0;return!1},getnameshort(e){if(!e)return"";var o=e.split(",");if(o[1]===void 0){var s=e.trim().split(/\s+/).filter(Boolean);return s.length>1?s[0].charAt(0)+". "+s[s.length-1]:e.trim()}var B=o[0].split(" "),U=o[1].trim().split(" "),m="";B.length==2||B.length==1?B[0].length<4?m=B[0]+" "+B[1]:m=B[0]:B.length==3?m=B[0]+" "+B[1]:B.length==4&&(m=B[1]+" "+B[2]+" "+B[3]);var y=U[U.length-1]!=""?U[U.length-1].charAt(0):U[U.length-2]?U[U.length-2].charAt(0):"";return m=m.replace(",",""),y+". "+m},changeCarrousel(){this.expand=!1,this.playerexpand=0},compareObjects(e,o){return e.total<o.total?-1:e.total>o.total?1:e.name<o.name?-1:e.name>o.name?1:0},sortAndSlice(e,o){return e.sort((s,B)=>(s.name<B.name?1:-1)&&(s.total<B.total?1:-1)).slice(0,o)},getCategoryName(e){let o="";for(let s=0;s<this.categories.length;s++)e==this.categories[s].id&&(o=this.categories[s].name);return o},translateTopCategories(e){return this.videoCategoriesMap[e]||[]},async fetchVideoCategories(){try{const e=this.$store.getters.getProviderId||1,{data:o}=await pu.get(`https://dtcf4s9tapfr0.cloudfront.net/${e}/tops/translate_top_categories.json`);o&&typeof o=="object"&&(this.videoCategoriesMap=o)}catch{}},getCoordinatePointPerCategory(e){return{1:2,2:3,3:1,4:2,5:1,6:2,7:2,8:1,9:1,10:2,11:2,12:1,13:1,14:1,15:1,16:1,17:1,18:3,19:3,20:3,21:3,22:1,23:1}[e]||0},emitEventMedia(e,o,s){let B=this.filtersValues.matchResult,U=this.filtersValues.playingAs,m=this.filtersValues.sections,y=this.filtersValues.zone,a=this.translateTopCategories(o);Object.keys(this.filterEmitAux).length>0&&(B=this.filterEmitAux.matchResult,U=this.filterEmitAux.playingAs,m=this.filterEmitAux.sections,y=this.filterEmitAux.zone);const v=1,p=2,r=3,_=this.isTeam?r:p,b=e.player_id;let x=[],h=this.isTeam?e.id:this.filterTeam;b?this.isTeam?h=b:(x=[b],a=a.filter(i=>!i.toString().includes("_r"))):this.isTeam?h=e.id:(x=[e.id],a=a.filter(i=>!i.toString().includes("_r")));const n={auxwidget:!!(this.canPlayVideos||this.game.awayTeam.team_id==this.teamWidget&&this.typeData!=1),seasonId:this.game.is_live==1?this.season:this.game.regularSeasonId,isFeaturedPlayers:!1,mainSectionType:v,playListType:_,gameIds:null,playerIds:x,goalkeeperIds:[],categoryIds:this.translateTopCategories(o),teamId:h||0,matchResult:B,categorySingleName:"",isRivalSubject:!1,avoidCategorySingleName:!1,currentPlayIndex:0,playData:null,lastClashedGameId:null,tournamentsLastClashes:null,advancedFilter:{playListTitle:s,playingAs:U,timeSections:m,fieldSections:y,coordinatePoint:this.getCoordinatePointPerCategory(o)}};this.$emit("setopenmedia",n)},emitEventMediaFullTable(e,o,s){let B=this.filtersValues.matchResult,U=this.filtersValues.playingAs,m=this.filtersValues.sections,y=this.filtersValues.zone,a=this.translateTopCategories(o);Object.keys(this.filterEmitAux).length>0&&(B=this.filterEmitAux.matchResult,U=this.filterEmitAux.playingAs,m=this.filterEmitAux.sections,y=this.filterEmitAux.zone);const v=1,p=2,r=3,_=this.isTeam?r:p;let b=[],x=this.isTeam?e.id:this.filterTeam;this.isTeam?x=e.id:(b=[e.id],a=a.filter(n=>!n.toString().includes("_r")));const h={seasonId:this.season,isFeaturedPlayers:!1,mainSectionType:v,playListType:_,gameIds:null,playerIds:b,goalkeeperIds:[],categoryIds:a,teamId:x||0,matchResult:B,categorySingleName:"",isRivalSubject:!1,avoidCategorySingleName:!1,currentPlayIndex:0,playData:null,lastClashedGameId:null,tournamentsLastClashes:null,advancedFilter:{playListTitle:s,playingAs:U,timeSections:m,fieldSections:y,coordinatePoint:this.getCoordinatePointPerCategory(o)}};this.$emit("setopenmedia",h)},replaceImgPlayer(e){return e.replace("https://golstatsimages.blob.core.windows.net/players-profile/","https://golstatsimages.blob.core.windows.net/players-profile-no-bg/")},abrevName(e){var o=e.split(","),s=o[0].split(" "),B=o[1].trim().split(" "),U="";s.length==2||s.length==1?s[0].length<4?U=s[0]+" "+s[1]:U=s[0]:s.length==3?U=s[0]+" "+s[1]:s.length==4&&(U=s[1]+" "+s[2]+" "+s[3]);var m=B[B.length-1]!=""?B[B.length-1].charAt(0):B[B.length-2]?B[B.length-2].charAt(0):"";U=U.replace(",","");var y=m+". "+U;return y},clickMore(e){this.$emit("more",{category:e,categoryName:this.categoryName})},morestats(){this.$emit("more",this.category)},viewprofile(e,o){this.$emit("clickprofile",{id:e,teamId:o,isTeam:this.isTeam})},clickexpand(e){this.expand=e.expand,this.playerexpand=e.id},async getCategoryStats(e){var o,s;this.mapPlayers=new Map;try{if(!e)return;let B=[],U={},m={},y=this.season;(s=(o=this.seasonSelected)==null?void 0:o.related_seasons)!=null&&s.some(_=>_.id===this.season)&&(y=this.seasonSelected.id),this.arePlaysEmpty=!1;const a=pu.create({headers:{Authorization:`${this.token}`}});this.isloading=!0;const v=this.$store.getters.getProviderId,p=this.$store.getters.getIsDevApis;let r={};if(this.typeData==1?this.isWidget&&this.teamWidget!=0?r=await a.get(uu(this.url+"/"+this.gameId+"/"+this.category,v,p)+"?t="+this.teamWidget):r=await a.get(uu(this.url+"/"+this.gameId+"/"+this.category,v,p)):this.game.game_status===1?this.isWidget&&this.teamWidget!=0?r=await a.get(uu(this.url+"/"+this.gameId+"/"+this.category,v,p)+"?acc=1&t="+this.teamWidget):r=await a.get(uu(this.url+"/"+this.gameId+"/"+this.category,v,p)+"?acc=1"):this.isWidget&&this.teamWidget!=0?r=await a.get(uu(this.urlPrematch+y+"/"+this.category,v,p)+"?t="+this.teamWidget):r=await a.get(uu(this.urlPrematch+y+"/"+this.category,v,p)+"?t="+this.game.homeTeam.team_id+"&t="+this.game.awayTeam.team_id),r&&r.data&&r.data.data&&r.data.data.length>0){B=r.data.data.map(b=>this.formatStatsData(b)),r.data.teams.forEach(b=>{U[b[0]]={},U[b[0]].id=b[0],U[b[0]].name=b[1],U[b[0]].abrv=b[2],U[b[0]].img=b[3],U[b[0]].effectiveness=b[4],U[b[0]].games_played=b[5],U[b[0]].games_played_lastseason=b[6],U[b[0]].positiontable=b[7],U[b[0]].goals=b[8],U[b[0]].goalsrecived=b[9],U[b[0]].xg=b[10],U[b[0]].frecuency=b[11],U[b[0]].game_avg=b[12],U[b[0]].game_avg_last_season=b[13]});const _=new Set;r.data.players.forEach(b=>{const x=this.getObjectPlayer(b);this.mapPlayers.set(x.numberId,x);const h=x.numberAge,n=x.teamName.length>0?x.teamName[0].acronym:"",i=x.teamName.length>0?U[x.teamName[0].team_id].name:"",c=x.teamName.length>0?x.teamName[0].team_id:"",l=this.positions[x.numberPositionId-1].fullname,d=this.positions[x.numberPositionId-1].name,g=x.countryId.length>0?x.countryId[0].nationality_id:"",w=x.effectiveness,C=x.min,E=x.games,A=x.date;x.arrayNationalities.forEach(P=>{_.add(P.numberId)}),m[b[0]]={id:b[0],name:b[1],img:b[2],age:h,team:n,teamname:i,teamid:c,position:l,positionfull:d,effectiveness:w,country:g,games_played:E,minutes_played:C,date:A,nationality:x.stringNationalityName,player_country_flag:x.player_country_flag,positionId:x.numberPositionId}}),this.setNationalityIds=_,this.arrayAgeRange=[r.data.min_age,r.data.max_age]}else this.arePlaysEmpty=!0;this.teamInfo=U,this.playersInfo=m,this.formatStats=B,this.formatFilterStats=this.filterRecords(this.filtersSelect),this.statsData=r}catch(B){return Promise.reject(B)}},filterRecords(e){return this.formatStats.length>0?this.formatStats.filter(o=>{const s=e.playingAs.includes(o.playing_as),B=e.matchResult.includes(o.match_result),U=e.sections.includes(o.section),m=e.typeZone===1&&e.zone.includes(o.origen)||e.typeZone===2&&e.zone.includes(o.destino);if(e.setPositionsIds&&e.setNationalitiesIds&&e.arrayAgeRange&&e.setYear&&!this.isTeam){const y=this.mapPlayers.get(o.player_id);if(!y)return!1;if(e.booleanAreNationalTeamsVisible){if(e.setAvailableNationalTeamsPlayersIds.size>0&&!e.setAvailableNationalTeamsPlayersIds.has(o.player_id))return!1}else{let a=!1;for(const v of y.arrayNationalitiesIds)if(e.setNationalitiesIds.has(v)){a=!0;break}if(!a)return!1}if(y.numberAge<e.arrayAgeRange[0]||y.numberAge>e.arrayAgeRange[1]||y.date<e.setYear||!e.setPositionsIds.includes(y.numberPositionId))return!1}return(e.playingAs.length===0||s)&&(e.matchResult.length===0||B)&&(e.sections.length===0||U)&&(e.zone.length===0||m)}):[]},updateSliderF(){this.updateSlider+=1},formatStatsData(e){const o={};return e[1]===0&&(e[2]===1||e[2]===2)&&(e[2]=3-e[2]),e[1]===0&&(e[3]===1||e[3]===2)&&(e[3]=3-e[3]),this.data_headers.forEach((s,B)=>{o[s]=e[B]}),o},getObjectPlayer(e){const o=[],s=e[7].map(U=>(o.push(U.nationality_id),{stringName:U.nationality,numberId:U.nationality_id})),B=e[9].split("-");return{numberId:e[0]!==void 0?e[0]:"",stringFullName:e[1]!==void 0?e[1]:"",stringImageUrl:e[2]!==void 0?e[2]:"",numberTeamId:e[3]!==void 0?e[3]:"",player_country_flag:"https://golstatsimages.blob.core.windows.net/flags/"+e[3]+".jpg",stringNationalityName:_V[e[3]],numberAge:e[5]!==void 0?e[5]:"",numberPositionId:e[6]!==void 0?e[6]:"",countryId:e[7]!==void 0?e[7]:"",teamName:e[10]!==void 0?e[10]:"",effectiveness:e[11]!==void 0?e[11]:"",min:e[13]!==void 0?e[13]:"",games:e[12]!==void 0?e[12]:"",date:B.length>0?Number(B[0]):0,arrayNationalities:s,category:this.categoryName,arrayNationalitiesIds:o}},formatArrayPaginate(e){const o=Math.ceil(e.length/this.numRows);return Array.from({length:o},(s,B)=>{const U=B*this.numRows,m=U+this.numRows;return e.slice(U,m)})},createIntervalTops(){this.intervalIdtops=setInterval(async()=>{await this.getCategoryStats(this.season)},this.timeLiveComparativeAvanced)},clearTopsInterval(){this.intervalIdtops&&(clearInterval(this.intervalIdtops),this.intervalIdtops=null)}},beforeUnmount(){this.clearTopsInterval()}},xV=()=>{t.useCssVars(e=>({"7945af00":e.borderRadius,"245d87d0":e.borderWidth,"268b8496":e.borderColor}))},wV=qS.setup;qS.setup=wV?(e,o)=>(xV(),wV(e,o)):xV;const zdt={ref:"myDivRef"},Odt={class:"btnViewFullList"},Ddt={class:"text"},Ndt={class:"groupsLeague"},Fdt={class:"row-table-carrousel"},Rdt={key:1,class:"container-no-search-result"},Vdt={key:0,class:"overlay-loading-top"};function jdt(e,o,s,B,U,m){const y=t.resolveComponent("GSCLeaders"),a=t.resolveComponent("GSCRowTable"),v=t.resolveComponent("GSCExpandedInfo"),p=t.resolveComponent("GSCCarousel"),r=t.resolveComponent("GSCTableHeader");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(s.type==0?"gsc-top":"gsc-top-full")},[t.createElementVNode("div",zdt,[t.createElementVNode("div",Odt,[t.createElementVNode("div",Ddt,[t.createElementVNode("div",Ndt,t.toDisplayString(s.categoryName),1)])]),s.type==0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[m.topData.length>0?(t.openBlock(),t.createBlock(p,{key:0,items:m.topData,"is-pagination-visible":!0,"are-navigation-arrows-visible":!0,onInput:m.changeCarrousel},{default:t.withCtx(({item:_})=>[t.createElementVNode("div",Fdt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(_,(b,x)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:x},[b.top==1?(t.openBlock(),t.createBlock(y,{key:0,onMediadata:o[0]||(o[0]=h=>m.emitEventMedia(h,s.category,s.categoryName)),type:s.typeTable,"type-data":s.typeData,game:s.game,"team-widget":s.teamWidget,"can-play-videos":s.canPlayVideos,"is-expanded":e.playerexpand==b.id&&e.expand,ref_for:!0,ref:"GSCLeaders",data:s.typeTable==0?{top:"01",photo:b.img,logo:m.getImageUrl("https://golstatsimages.blob.core.windows.net/teams-80/"+b.teamid+".png",e.$store.getters.getProviderId),name:b.name,player_short:b.name_short,player_id:b.id,categoryId:s.category,total:b.total}:{top:"01",logo:b.img,total:b.total,name_team:b.name,player_id:b.id},"category-name":s.categoryName,buttonMaxWidth:s.typeTable!=0?B.elementSize.width>360?"210px":"130px":B.elementSize.width>360?"180px":"110px",buttonFontSize:"12px",iconSize:"11px",onExpand:m.clickexpand,onMore:m.morestats},null,8,["type","type-data","game","team-widget","can-play-videos","is-expanded","data","category-name","buttonMaxWidth","onExpand","onMore"])):(t.openBlock(),t.createBlock(a,{key:1,"type-data":s.typeData,"team-widget":s.teamWidget,game:s.game,type:s.typeTable,"type-view":s.type,"is-expanded":e.playerexpand==b.id&&e.expand,onMediadata:o[1]||(o[1]=h=>m.emitEventMedia(h,s.category,s.categoryName)),data:s.typeTable==0?{position:b.top,player_name:b.name,player_short:b.name_short,player_photo:b.img,total:b.total,id:b.id,player_age:b.age,team_abrev:b.team,team_logo:m.getImageUrl("https://golstatsimages.blob.core.windows.net/teams-80/"+b.teamid+".png",e.$store.getters.getProviderId),player_position:b.position,player_country_flag:"https://golstatsimages.blob.core.windows.net/flags/"+b.country+".jpg",player_games:b.minutes,player_min:b.games,league_name:"          Liga MX          "}:{position:b.top,team_logo:b.img,team_abrev:b.name,frequency:b.frecuency,promthistournament:b.game_avg,promlasttournament:b.game_avg_last_season,teams_games:"-",category:s.category,total:b.total,id:b.id},height:"71px","can-play-videos":s.canPlayVideos,background:x%2===0?s.backgroundEven:s.backgroundOdd,onExpand:m.clickexpand},null,8,["type-data","team-widget","game","type","type-view","is-expanded","data","can-play-videos","background","onExpand"])),e.expand&&e.playerexpand==b.id?(t.openBlock(),t.createBlock(v,{key:2,type:s.typeTable,"is-live":s.game.is_live,"view-effectiveness":b.positionId!==1,data:s.typeTable==0?{teams:b.teamname,age:b.age,dataofbirth:b.date,nationality:b.nationality,countryFlag:b.player_country_flag,position:b.position,games:b.games,min:b.minutes,goals:b.total,effectiveness:b.effectiveness,category:s.categoryName,id:b.id}:{position:b.positiontable,goals:b.goals,goals_received:b.goalsrecived,games_played:b.games_played,category:s.categoryName,effectiveness:b.effectiveness,xg:b.xg,total:b.total,attendance:"-",id:b.id},onViewprofile:h=>m.viewprofile(h,b.teamid),background:x%2===0?s.backgroundEven:s.backgroundOdd},null,8,["type","is-live","view-effectiveness","data","onViewprofile","background"])):t.createCommentVNode("",!0)],64))),128))])]),_:1},8,["items","onInput"])):(t.openBlock(),t.createElementBlock("div",Rdt,[e.isloading?(t.openBlock(),t.createElementBlock("div",Vdt,o[3]||(o[3]=[t.createElementVNode("div",{class:"overlay-loading-top__spinner"},[t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/balon_liga.png",alt:""})],-1),t.createElementVNode("div",{class:"overlay-loading-top__text"},"Loading...",-1)]))):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[o[4]||(o[4]=t.createElementVNode("div",{class:"container-no-search-result-title"},"No existen resultados",-1)),o[5]||(o[5]=t.createElementVNode("div",{class:"container-no-search-result-subtitle"},[t.createTextVNode(" No existen resultados para este tipo de"),t.createElementVNode("br"),t.createTextVNode(" jugada, considerando el torneo y otros"),t.createElementVNode("br"),t.createTextVNode(" filtros que has seleccionado. ")],-1))],64))]))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createVNode(r,{background:"#183143",type:s.typeTable},null,8,["type"]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(m.topData,(_,b)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:b},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(_,(x,h)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:h},[t.createVNode(a,{"type-data":s.typeData,"team-widget":s.teamWidget,game:s.game,type:s.typeTable,"type-view":s.type,"can-play-videos":s.canPlayVideos,"is-expanded":e.playerexpand==x.id&&e.expand,onMediadata:o[2]||(o[2]=n=>m.emitEventMediaFullTable(n,s.category,s.categoryName)),data:s.typeTable==0?{position:x.top,player_name:x.name,player_short:x.name_short,player_photo:x.img,total:x.total,id:x.id,player_age:x.age,team_abrev:x.team,team_logo:m.getImageUrl("https://golstatsimages.blob.core.windows.net/teams-80/"+x.teamid+".png",e.$store.getters.getProviderId),player_position:x.position,player_country_flag:"https://golstatsimages.blob.core.windows.net/flags/"+x.country+".jpg",player_games:x.games,player_min:x.minutes,league_name:"          Liga MX          "}:{position:x.positiontable,team_logo:x.img,team_abrev:x.name,frequency:x.frecuency,promthistournament:x.game_avg,promlasttournament:x.game_avg_last_season,category:s.category,team_games:x.games_played,total:x.total,id:x.id},height:"71px",background:((b+1)*5+h)%2===0?s.backgroundOdd:s.backgroundEven,onExpand:m.clickexpand},null,8,["type-data","team-widget","game","type","type-view","can-play-videos","is-expanded","data","background","onExpand"]),e.expand&&e.playerexpand==x.id?(t.openBlock(),t.createBlock(v,{key:0,type:s.typeTable,"is-live":s.game.is_live,additionalClass:"fullTable","view-effectiveness":x.positionId!==1,data:s.typeTable==0?{teams:x.teamname,age:x.age,dataofbirth:x.date,nationality:x.nationality,countryFlag:x.player_country_flag,position:x.positionfull,positionfull:x.positionfull,games:x.games,min:x.minutes,goals:x.total,effectiveness:x.effectiveness,category:m.getCategoryName(s.category),id:x.id}:{position:x.positiontable,goals:x.goals,goals_received:x.goalsrecived,games_played:x.games_played,category:s.categoryName,effectiveness:x.effectiveness,xg:x.xg,total:x.total,category:m.getCategoryName(s.category),attendance:"-",id:x.id},onViewprofile:n=>m.viewprofile(n,x.teamid),background:h%2===0?s.backgroundEven:s.backgroundOdd},null,8,["type","is-live","view-effectiveness","data","onViewprofile","background"])):t.createCommentVNode("",!0)],64))),128))],64))),128))],64))],512)],2)}const Udt=Ki(qS,[["render",jdt],["__scopeId","data-v-ef09809c"]]),Gdt=(e,o)=>{const s=e.__vccOpts||e;for(const[B,U]of o)s[B]=U;return s},Hdt={props:{id:Number,textValue:String,icon:String,numFilter:Number,iconVisible:{type:Boolean,default:!0},activeClickLabel:{type:Boolean,default:!1},height:{type:String,default:"35px"},borderRadius:{type:String,default:"30px"},borderType:{type:String,default:"solid"},borderWidth:{type:Number,default:0},borderColor:String,backgroundColor:{type:String,default:"#23303B"},fontSize:{type:String,default:"13px"},fontColor:{type:String,default:"#FFFFFF"},fontFamily:{type:String,default:"Poppins-Regular"},iconSize:{type:String,default:"20px"}},computed:{customStyle(){return{height:this.height,backgroundColor:this.backgroundColor,borderRadius:this.borderRadius,border:`${this.borderType} ${this.borderWidth}px ${this.borderColor}`,color:this.fontColor,cursor:this.cursorType,fontSize:this.fontSize,fontFamily:`${this.fontFamily} !important`}},customIcon(){return{width:this.iconSize}}},methods:{btnLabel(){this.$emit("clickLabel",this.id)},btnClose(){this.$emit("clickClose",this.id)}}},Zdt=["src"],Wdt=["src"];function qdt(e,o,s,B,U,m){return t.openBlock(),t.createElementBlock("div",null,[s.activeClickLabel?(t.openBlock(),t.createElementBlock("div",{key:0,style:t.normalizeStyle(m.customStyle),class:"gsc-label",onClick:o[0]||(o[0]=(...y)=>m.btnLabel&&m.btnLabel(...y))},[t.createTextVNode(t.toDisplayString(s.numFilter)+" "+t.toDisplayString(s.textValue)+" ",1),s.iconVisible?(t.openBlock(),t.createElementBlock("img",{key:0,style:t.normalizeStyle(m.customIcon),class:"icon",src:s.icon},null,12,Zdt)):t.createCommentVNode("",!0)],4)):(t.openBlock(),t.createElementBlock("div",{key:1,class:"gsc-label",style:t.normalizeStyle(m.customStyle)},[t.createTextVNode(t.toDisplayString(s.numFilter)+" "+t.toDisplayString(s.textValue)+" ",1),s.iconVisible?(t.openBlock(),t.createElementBlock("img",{key:0,onClick:o[1]||(o[1]=(...y)=>m.btnClose&&m.btnClose(...y)),style:t.normalizeStyle(m.customIcon),class:"icon",src:s.icon},null,12,Wdt)):t.createCommentVNode("",!0)],4))])}const Jdt=Gdt(Hdt,[["render",qdt],["__scopeId","data-v-42ff544a"]]);function Ydt(e){const o=t.ref({width:0,height:0});function s(){const B=e.value.getBoundingClientRect();o.value.width=B.width,o.value.height=B.height}return t.onMounted(()=>{s(),window.addEventListener("resize",s)}),t.onUnmounted(()=>{window.removeEventListener("resize",s)}),{elementSize:o}}const Xdt=(e,o)=>{const s=e.__vccOpts||e;for(const[B,U]of o)s[B]=U;return s},JS={name:"ScrollableContainer",props:{backgroundColor:{type:String,default:"#0D1D29"},pxScroll:{type:Number,default:100},arrows:{type:Boolean,default:!0},arrowsHideOnNoScroll:{type:Boolean,default:!1},arrowsScrollHide:{type:Boolean,default:!1},arrowsColor:{type:String,default:"#CBEE6B"},arrowsHeight:{type:Number,default:15},arrowsWidth:{type:Number,default:15},arrowsPadding:{type:Number,default:5},arrowsMargin:{type:Number,default:10},arrowsRadius:{type:String,default:"0%"},arrowsBorder:{type:String,default:"none"},arrowsBackground:{type:String,default:"#0D1D29"},arrowsContainerBgL:{type:String,default:"#0D1D29"},arrowsContainerBgR:{type:String,default:"#0D1D29"},scrollColor:{type:String,default:"#c3e569"},arrowsPosition:{type:String,default:"relative"},height:{type:String,default:"100%"}},data(){return{showLeftArrow:!1,showRightArrow:!0,intervalid1:""}},mounted(){this.getScroll(),this.arrowsHideOnNoScroll&&window.addEventListener("resize",this.resizeSlider),this.arrowsHideOnNoScroll&&this.listenerLoad()},beforeUnmount(){this.arrowsHideOnNoScroll&&window.removeEventListener("resize",this.resizeSlider),this.arrowsHideOnNoScroll&&clearInterval(this.intervalid1)},computed:{getViewBox(){return`-2 0 ${this.arrowsWidth} ${this.arrowsHeight}`},hideShowLeftArrow(){let e="";return this.arrowsPosition=="absolute"?e="leftAbsolute":e="leftRelative",this.arrowsScrollHide?this.showLeftArrow?e+=" showArrowSlide":e+=" hideArrowSlide":e+=" showArrowSlide",e},hideShowRightArrow(){let e="";return this.arrowsPosition=="absolute"?e="rightAbsolute":e="rightRelative",this.arrowsScrollHide?this.showRightArrow?e+=" showArrowSlide":e+=" hideArrowSlide":e+=" showArrowSlide",e}},methods:{scrollLeft(){this.$refs.content.scrollLeft-=this.pxScroll},scrollRight(){this.$refs.content.scrollLeft+=this.pxScroll},getScroll(){let e=0;this.arrowsPosition=="relative"?e=this.$refs.content.scrollWidth-this.$el.clientWidth+this.arrowsMargin*2+this.arrowsWidth*4:e=this.$refs.content.scrollWidth-this.$el.clientWidth,this.$refs.content.scrollLeft==0?this.showLeftArrow=!1:this.showLeftArrow=!0,e>0&&(this.$refs.content.scrollLeft==e?this.showRightArrow=!1:this.showRightArrow=!0),this.arrowsHideOnNoScroll&&this.$refs.content.clientWidth===this.$refs.content.scrollWidth&&(this.showRightArrow=!1)},resizeSlider(){this.getScroll();let e;clearTimeout(e),e=setTimeout(this.getScroll,1e3)},listenerLoad(){this.intervalid1=setInterval((function(){var e=this.$el.clientWidth,o=this.$refs.content.scrollWidth;o>0&&e>0&&(o>e?(this.showRightArrow=!0,clearInterval(this.intervalid1)):clearInterval(this.intervalid1))}).bind(this),3e3)}}},kV=()=>{t.useCssVars(e=>({"42d3dba6":e.backgroundColor,"4de5d2cf":e.height,"67bafa7b":e.arrowsPosition,"61e1032e":e.arrowsPadding+"px","79a4ac00":e.arrowsBackground,"6b8355c6":e.arrowsHeight*2+"px","29a58368":e.arrowsWidth*2+"px","3622fa64":e.arrowsRadius,"1ba101fe":e.arrowsBorder,"0bafb5e6":e.arrowsMargin+"px","423a44b8":e.arrowsContainerBgL,"423a44be":e.arrowsContainerBgR,"10b117ee":e.scrollColor}))},SV=JS.setup;JS.setup=SV?(e,o)=>(kV(),SV(e,o)):kV;const $dt={ref:"gscScrollableContainer",class:"scrollable-container"},Kdt={class:"scrollable-arrows"},Qdt=["width","height","viewBox"],eht=["stroke"],tht={class:"scrollable-wrapper"},aht={class:"scrollable-arrows"},rht=["width","height","viewBox"],nht=["stroke"];function iht(e,o,s,B,U,m){return t.openBlock(),t.createElementBlock("div",$dt,[s.arrows?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["arrows-container",m.hideShowLeftArrow]),onClick:o[0]||(o[0]=(...y)=>m.scrollLeft&&m.scrollLeft(...y))},[t.createElementVNode("div",Kdt,[(t.openBlock(),t.createElementBlock("svg",{width:s.arrowsWidth,height:s.arrowsHeight,viewBox:m.getViewBox,fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M6.36523 13.788L1.10146 8.52429C0.479824 7.90265 0.479824 6.88541 1.10147 6.26377L6.36523 1",stroke:s.arrowsColor},null,8,eht)],8,Qdt))])],2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"scrollable-content scrollable-content-slider",ref:"content",onScroll:o[1]||(o[1]=(...y)=>m.getScroll&&m.getScroll(...y))},[t.createElementVNode("div",tht,[t.renderSlot(e.$slots,"default",{},void 0,!0)])],544),s.arrows?(t.openBlock(),t.createElementBlock("div",{key:1,id:"arrows-container-right",class:t.normalizeClass(["arrows-container",m.hideShowRightArrow]),onClick:o[2]||(o[2]=(...y)=>m.scrollRight&&m.scrollRight(...y))},[t.createElementVNode("div",aht,[(t.openBlock(),t.createElementBlock("svg",{width:s.arrowsWidth,height:s.arrowsHeight,viewBox:m.getViewBox,fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M0.634765 1.21195L5.89853 6.47571C6.52018 7.09735 6.52018 8.11459 5.89853 8.73623L0.634766 14",stroke:s.arrowsColor},null,8,nht)],8,rht))])],2)):t.createCommentVNode("",!0)],512)}const oht=Xdt(JS,[["render",iht],["__scopeId","data-v-b548a08d"]]),sht=(e,o)=>{const s=e.__vccOpts||e;for(const[B,U]of o)s[B]=U;return s},YS={components:{GSCSlider:oht},props:{arrow:{type:Boolean,required:!0},buttons:{type:Array,required:!0},width:{type:String,default:"300px"},height:{type:String,default:"80px"},fontSize:{type:String,default:"16px"},colorFont:{type:String,default:"#ffffff"},backgroundOptionActive:{type:String,default:"#0d1d29"},colorOptionActive:{type:String,default:"#cbee6b"},colorOptionDisable:{type:String,default:"gray"},backgroundOptionDisable:{type:String,default:"#0d1d29"},fontFamily:{type:String,default:"Poppins-Semibold"},borderWidth:{type:String,default:"3px"},borderRadius:{type:String,default:"0px"},selectedOption:{type:String,default:""},type:{type:Number,default:0},borderWidthContainer:{type:String,default:"1px"},background:{type:String,default:"#0d1d29"},borderColorContainer:{type:String,default:"#505355"},pxScroll:{type:Number,default:100},scrollColor:{type:String,default:"#c3e569"},arrowsPosition:{type:String,default:"relative"},arrowsScrollHide:{type:Boolean,default:!1},arrowsBackground:{type:String,default:"#0D1D29"},arrowsContainerBgL:{type:String,default:"#0D1D29"},arrowsContainerBgR:{type:String,default:"#0D1D29"},arrowsMargin:{type:Number,default:10},arrowsRadius:{type:String,default:"0%"},arrowsBorder:{type:String,default:"none"}},setup(){const e=t.ref("myDivRef"),{elementSize:o}=Ydt(e);return{myDivRef:e,elementSize:o}},methods:{clickEmitEvent(e){this.$emit("input",e)},customGrid(e){var o={};return e.width>768?o={fontSize:"16px"}:e.width>480?o={fontSize:"14px"}:o={fontSize:"12px"},o}}},CV=()=>{t.useCssVars(e=>({cff4a118:e.fontSize,"42aab7f6":e.borderWidth,d29bcbd2:e.fontFamily,df6c5a9c:e.background,"09b32862":e.borderRadius,"8c0d6daa":e.borderWidthContainer,e8a86fa4:e.borderColorContainer,"179494da":e.colorOptionActive,cea5647c:e.width}))},TV=YS.setup;YS.setup=TV?(e,o)=>(CV(),TV(e,o)):CV;const lht={ref:"myDivRef"},cht={key:0,class:"gs-switch-container"},uht=["onClick"],dht={key:1,class:"gs-switch-container-type"},hht=["onClick"],pht={key:2,class:"gs-switch-container-carousel"},fht=["onClick"];function mht(e,o,s,B,U,m){const y=t.resolveComponent("GSCSlider");return t.openBlock(),t.createElementBlock("div",lht,[s.type==0?(t.openBlock(),t.createElementBlock("div",cht,[t.createElementVNode("div",{class:"gs-switch-container__control",style:t.normalizeStyle([m.customGrid(B.elementSize)])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.buttons,(a,v)=>(t.openBlock(),t.createElementBlock("div",{class:"gs-switch-container__control__button-option",style:t.normalizeStyle([{height:s.height},s.selectedOption==a?{borderColor:s.colorOptionActive,color:s.colorFont+"!important",background:s.backgroundOptionActive}:{borderColor:s.colorOptionDisable,color:"grey !important"}]),key:v,onClick:p=>(s.selectedOption=a,m.clickEmitEvent(a))},t.toDisplayString(a),13,uht))),128))],4),t.renderSlot(e.$slots,s.selectedOption,{},void 0,!0)])):t.createCommentVNode("",!0),s.type==1?(t.openBlock(),t.createElementBlock("div",dht,[t.createElementVNode("div",{class:"gs-switch-container-type__control",style:t.normalizeStyle([m.customGrid(B.elementSize)])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.buttons,(a,v)=>(t.openBlock(),t.createElementBlock("div",{class:"gs-switch-container-type__control__button-option-type",style:t.normalizeStyle([{height:s.height},s.selectedOption==a?{borderColor:s.colorOptionActive,color:s.colorFont+"!important",background:s.backgroundOptionActive}:{borderColor:s.colorOptionDisable,borderWidth:"0px",borderWidth:"0px !important",color:"grey !important",background:s.backgroundOptionDisable}]),key:v,onClick:p=>(s.selectedOption=a,m.clickEmitEvent(a))},t.toDisplayString(a),13,hht))),128))],4)])):t.createCommentVNode("",!0),s.type==2?(t.openBlock(),t.createElementBlock("div",pht,[t.createVNode(y,{arrows:s.arrow,"background-color":s.background,"px-scroll":s.pxScroll,"scroll-color":s.scrollColor,"arrows-position":s.arrowsPosition,arrowsScrollHide:s.arrowsScrollHide,"arrows-background":s.arrowsBackground,"arrows-container-bg-l":s.arrowsContainerBgL,"arrows-container-bg-r":s.arrowsContainerBgR,"arrows-margin":s.arrowsMargin,"arrows-radius":s.arrowsRadius,"arrows-border":s.arrowsBorder},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.buttons,(a,v)=>(t.openBlock(),t.createElementBlock("div",{class:"button-option-multi",style:t.normalizeStyle([{height:s.height},s.selectedOption==a?{borderColor:s.colorOptionActive,color:s.colorFont+"!important",background:s.backgroundOptionActive}:{borderColor:s.colorOptionDisable,color:"grey !important"}]),key:v,onClick:p=>(s.selectedOption=a,m.clickEmitEvent(a))},t.toDisplayString(a),13,fht))),128))]),_:1},8,["arrows","background-color","px-scroll","scroll-color","arrows-position","arrowsScrollHide","arrows-background","arrows-container-bg-l","arrows-container-bg-r","arrows-margin","arrows-radius","arrows-border"])])):t.createCommentVNode("",!0)],512)}const XS=sht(YS,[["render",mht],["__scopeId","data-v-8a86dfaf"]]),RQt="",VQt="";function ght(){return{backgroundColor:"#2e3b46",borderColor:"rgba(255, 255, 255, 0.20)",infoBorderColor:"rgba(255, 255, 255, 0.20)",height:"40px",padding:"5px 12px",textFontFamily:"'Poppins-Regular'"}}const jQt="",yht={comfiltersContainer:"_comfiltersContainer_xl2as_1",comfiltersContainer1232:"_comfiltersContainer1232_xl2as_1",closeFiltersPc:"_closeFiltersPc_xl2as_1",comtextleyemdmultipleleagues:"_comtextleyemdmultipleleagues_xl2as_1",comtextleyemdmultipleleagues380:"_comtextleyemdmultipleleagues380_xl2as_1",comfiltersContainer760:"_comfiltersContainer760_xl2as_1",comfiltersContainer460:"_comfiltersContainer460_xl2as_1",comcontainerSection:"_comcontainerSection_xl2as_1",comcontainerSection1232:"_comcontainerSection1232_xl2as_1",comcontainerSection960:"_comcontainerSection960_xl2as_1",comcontainerSection320:"_comcontainerSection320_xl2as_1",comcontainerSection350:"_comcontainerSection350_xl2as_1",comtemplateLosMejores1:"_comtemplateLosMejores1_xl2as_1",comtemplateLosMejores11232:"_comtemplateLosMejores11232_xl2as_1",comtemplateLosMejores1960:"_comtemplateLosMejores1960_xl2as_1",comtemplateLosMejores1420:"_comtemplateLosMejores1420_xl2as_1",comtemplateLosMejores1320:"_comtemplateLosMejores1320_xl2as_1",comtemplateLosMejores1540:"_comtemplateLosMejores1540_xl2as_1",comtemplateLosMejores1350:"_comtemplateLosMejores1350_xl2as_1",comtopFiltersParent:"_comtopFiltersParent_xl2as_1",comtopFiltersParent1232:"_comtopFiltersParent1232_xl2as_1",comtopFiltersParent960:"_comtopFiltersParent960_xl2as_1",comtopFiltersParent460:"_comtopFiltersParent460_xl2as_1",comtopFiltersParent420:"_comtopFiltersParent420_xl2as_1",comcontainerTheBest:"_comcontainerTheBest_xl2as_1",comcontainerTheBest1232:"_comcontainerTheBest1232_xl2as_1",comcontainerTheBest960:"_comcontainerTheBest960_xl2as_1",comcontainerTheBest320:"_comcontainerTheBest320_xl2as_1",comtitleSection:"_comtitleSection_xl2as_1",comtitleSection540:"_comtitleSection540_xl2as_1",comcontainerTables:"_comcontainerTables_xl2as_1",comcontainerTables960:"_comcontainerTables960_xl2as_1",comcontainerTables760:"_comcontainerTables760_xl2as_1",comcontainerTables320:"_comcontainerTables320_xl2as_1",comtoniKroosWrapper:"_comtoniKroosWrapper_xl2as_1",comtoniKroosWrapper1080:"_comtoniKroosWrapper1080_xl2as_1",comtoniKroosWrapper975:"_comtoniKroosWrapper975_xl2as_1",comtoniKroosWrapper760:"_comtoniKroosWrapper760_xl2as_1",comtoniKroosWrapper420:"_comtoniKroosWrapper420_xl2as_1",comtoniKroosWrapper320:"_comtoniKroosWrapper320_xl2as_1",frameChild:"_frameChild_xl2as_1",filtros:"_filtros_xl2as_1",groupParent:"_groupParent_xl2as_1",shapeIcon:"_shapeIcon_xl2as_1",btnFilters:"_btnFilters_xl2as_1",btnFiltersPC:"_btnFiltersPC_xl2as_1",comquitarFiltros:"_comquitarFiltros_xl2as_1",comquitarFiltros730:"_comquitarFiltros730_xl2as_1",comquitarFiltros480:"_comquitarFiltros480_xl2as_1",comquitarFiltros380:"_comquitarFiltros380_xl2as_1",btnCloseFilters:"_btnCloseFilters_xl2as_1",commejoresJugadores:"_commejoresJugadores_xl2as_1",commejoresJugadores730:"_commejoresJugadores730_xl2as_1",commejoresJugadores480:"_commejoresJugadores480_xl2as_1",mejoresJugadoresSM:"_mejoresJugadoresSM_xl2as_1",toniKroos:"_toniKroos_xl2as_1",teamBar:"_teamBar_xl2as_1",commenuSection:"_commenuSection_xl2as_1",commenuSection960:"_commenuSection960_xl2as_1",comcontainerMenu:"_comcontainerMenu_xl2as_1",comcontainerMenu760:"_comcontainerMenu760_xl2as_1",containerFilters:"_containerFilters_xl2as_1",teamBarParent:"_teamBarParent_xl2as_1",comtopFilters:"_comtopFilters_xl2as_1",comtopFilters1232:"_comtopFilters1232_xl2as_1",comtopFilters420:"_comtopFilters420_xl2as_1",comtopFilters460:"_comtopFilters460_xl2as_1",comlosMejores:"_comlosMejores_xl2as_1",comlosMejores380:"_comlosMejores380_xl2as_1",comlosMejores530:"_comlosMejores530_xl2as_1",comlosMejores730:"_comlosMejores730_xl2as_1",commenuSectionHeader:"_commenuSectionHeader_xl2as_1",commenuSectionHeader1232:"_commenuSectionHeader1232_xl2as_1",commenuSectionHeader960:"_commenuSectionHeader960_xl2as_1",commenuSectionHeader730:"_commenuSectionHeader730_xl2as_1",comdropdown:"_comdropdown_xl2as_1",comdropdown730:"_comdropdown730_xl2as_1",comdropdown1:"_comdropdown1_xl2as_1",comdropdown1730:"_comdropdown1730_xl2as_1",comdropdownParent:"_comdropdownParent_xl2as_1",comdropdownParent730:"_comdropdownParent730_xl2as_1",commenuSectionParentHeader:"_commenuSectionParentHeader_xl2as_1",commenuSectionParentHeader1232:"_commenuSectionParentHeader1232_xl2as_1",commenuSectionParentHeader960:"_commenuSectionParentHeader960_xl2as_1",commenuSectionParentHeader730:"_commenuSectionParentHeader730_xl2as_1",commenuSectionParentHeader430:"_commenuSectionParentHeader430_xl2as_1",comdescubreVideos:"_comdescubreVideos_xl2as_1",comdescubreVideos1232:"_comdescubreVideos1232_xl2as_1",comdescubreVideos960:"_comdescubreVideos960_xl2as_1",allCategories:"_allCategories_xl2as_1",containerScountingBtncom:"_containerScountingBtncom_xl2as_3",btnDeleteAplicacom:"_btnDeleteAplicacom_xl2as_13",SearchBtnBarcom:"_SearchBtnBarcom_xl2as_33",btnLeyendTxtcom:"_btnLeyendTxtcom_xl2as_52",BtnSearchScountingcom:"_BtnSearchScountingcom_xl2as_61",containerPredefinedcom:"_containerPredefinedcom_xl2as_85",containerPredefinedScountingcom:"_containerPredefinedScountingcom_xl2as_92",titleContainerPredefinedcom:"_titleContainerPredefinedcom_xl2as_100",subtitleContainerPredefinedcom:"_subtitleContainerPredefinedcom_xl2as_111"},vht=t.ref(ght()),bht={components:{GSCTableHeader:QR,GscSwitchComponent:XS,GSCFilterperteam:Put,GSCFilters:OR,GSCExpandedInfo:gV,GSCLabel:Jdt,GSCSeasonSelect:MA,GSCTopCategory:Udt,GSCTournamentSelect:TA,GSCRowTable:iV},computed:{...Fct.computed,filterChangePredefined(){return this.filtersPredefinedF},filterChange(){const e={zone:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],playingAs:[1,2],sections:[1,2,3,4,5,6],matchResult:[1,2,3],arrayAgeRange:[1,60],typeZone:1,setNationalitiesIds:this.fVnationalities,setPositionsIds:[1,2,3,4,5,6,7,8,9],booleanAreNationalTeamsVisible:!1,setAvailableNationalTeamsPlayersIds:new Set},o=JSON.stringify(e);if(JSON.stringify(this.filters)!=o)return o},filterGolstats(){return this.FVfilterGolstats},filterButtonProps(){return{...vht.value}}},props:{timeLiveComparativeAvanced:{type:Number,default:6e4},currentSeasonId:{type:Number,default:0},typeData:{type:Number,default:1},canPlayVideos:{type:Boolean,default:!1},teamId:{type:Number,default:0},gameId:{type:Number,default:0},isWidget:{type:Boolean,default:!1},seasonSelected:{type:Object,default:()=>({})},teamWidget:{type:Number,default:0},game:{type:Object,default:()=>({})},teamselect:{type:Number,default:0},seasonActive:{type:Number,default:0},defaultSection:{type:String,default:"Jugadores"},backgroundOdd:{type:String,default:"#172531"},backgroundEven:{type:String,default:"#0d1d29"},tournamentsApiUrl:{type:String,default:""},tournamentSelectProps:{type:Object,default:null},isFemaleMode:{type:Boolean,default:!1},token:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"}},watch:{async seasonActive(){if(this.seasonActive!=0){this.teams=[];const e=await this.fetchTeams();for(let o=0;o<e.teams.length;o++)this.teams.push({id:e.teams[o].team_id,team:e.teams[o].colloquial_name,logo:e.teams[o].logo})}}},setup(){const e=t.ref("myDivRefTopsFull"),{elementSize:o}=jb(e);return{myDivRefTopsFull:e,elementSize:o}},data(){return{elegibilidadArray:[],updateFilterTeamsScouting:0,modifidFiltersFlag:!1,showfiltersPc:!1,positions:[{name:"Portero",fullname:"POR"},{name:"Defensa central",fullname:"DFC"},{name:"Lateral por izquierda",fullname:"LI"},{name:"Lateral por derecha",fullname:"LD"},{name:"Volante por izquierda",fullname:"VI"},{name:"Volante por derecha",fullname:"VD"},{name:"Volante defensivo",fullname:"VDF"},{name:"Volante ofensivo",fullname:"VO"},{name:"Delantero",fullname:"DEL"},{name:"Desconocida",fullname:"Desc"}],universeData:{minutesPlayed:0,percentMinutesPlayed:0,lastMonths:Array.from({length:24},(e,o)=>o+1),selectedMonth:12,statistics:{totals:!0,averagePerGame:!1,averagePerMinute:!1}},FVbooleanAreNationalTeamsVisible:!1,teamsscouting:[],productivityTranslationMap:null,filterScounting:{tournaments:[1],seasonId:0,categories:[{key:"goals",name:"Goles",ids:[12]},{key:"assists",name:"Asistencias",ids:[10]},{key:"goal_participations",name:"Participaciones en gol",ids:[27]},{key:"headers_rival_area",name:"Cabeceos en área rival",ids:[330,333,423,577,578,331,334,424]},{key:"shots_total",name:"Tiros a gol totales",ids:[91,95,92,93,96,97]}],range_age:[10,40],age_or_year:1,year:1989,nationalities:[3,4,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,221,84,85,86,87,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,222,223,224,225,226,227,228,229,230,231,232,233,234,236,237,239],elegibles:[],minutes_played:211,minutes_played_avg:40,last_months:12,type_stats:1,positions:[1,2,3,4,5,6,7,8,9,10],fouls:!1,yellow_cards:!1,red_cards:!1},expand:!1,playerexpand:0,arrayFiltersPlays:[],filtersPredefinedF:{},categoryPredefinedActive:!1,categoryPredefined:0,typeTable:0,keyUpdateFilter:0,loadingActive:!1,isTeam:!1,arrayPredefinedFilters:[],arrayCategoryFilter:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23],arrayCategoryFilterFull:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23],FVsetAvailableNationalTeamsPlayersIds:new Set,showOnlyCategories:!1,showFullCategory:0,categoryName:"",showFullTable:!1,expansionPanelModePropsTypePlays:{isExpansionPanel:!1,templateProps:{boxShadow:"0px 4px 4px rgba(0, 0, 0, 0)",width:"400px",maxWidth:"400px"},expansionPanelProps:{width:"400px",borderRadius:"8px"},fieldComponentProps:{widthContainer:"400px"}},expansionPanelModeProps:{isExpansionPanel:!1,templateProps:{boxShadow:"0px 4px 4px rgba(0, 0, 0, 0)"},expansionPanelProps:{width:"400px",borderRadius:"8px",fontFamily:"'Poppins-Regular'"},fieldComponentProps:{widthContainer:"100%",title:"Elige el área o zona de cancha",titleFontSize:"13px"}},expansionPanelModePropsMobil:{isExpansionPanel:!0,templateProps:{boxShadow:"0px 4px 4px rgba(0, 0, 0, 0)",padding:"20px 0"},expansionPanelProps:{width:"300px",borderRadius:"8px",height:"45px",fontColor:"rgba(255,255,255, 0.7)",textFontSize:"14px",textFontFamily:"'Poppins-Regular'",padding:"0px 10px"},fieldComponentProps:{widthContainer:"100%",title:"Elige el área o zona de cancha",titleFontSize:"12px",widthField:268,widthFieldGrid:"268px",heightField:180,heightFieldGrid:"180px",heightContainer:"280px"}},expansionPanelModePropsMobil270:{isExpansionPanel:!0,templateProps:{boxShadow:"0px 4px 4px rgba(0, 0, 0, 0)",padding:"20px 0"},expansionPanelProps:{width:"270px",borderRadius:"8px",height:"45px",fontColor:"rgba(255,255,255, 0.7)",textFontSize:"14px",textFontFamily:"'Poppins-Regular'",padding:"0px 10px"},fieldComponentProps:{widthContainer:"100%",title:"Elige el área o zona de cancha",titleFontSize:"12px",widthField:268,widthFieldGrid:"268px",heightField:180,heightFieldGrid:"180px",heightContainer:"280px"}},filters:{zone:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],playingAs:[1,2],sections:[1,2,3,4,5,6],matchResult:[1,2,3],arrayAgeRange:[1,60],typeZone:1,setNationalitiesIds:this.setNationalitiesIds,setPositionsIds:[1,2,3,4,5,6,7,8,9],booleanAreNationalTeamsVisible:!1,setAvailableNationalTeamsPlayersIds:new Set},detaildProductivityCategories:{offensive:{title:"Ofensivo",categories:[{key:"goals",name:"Goles",isSelected:!1,id:[12]},{key:"assists",name:"Asistencias",isSelected:!1,id:[10]},{key:"goal_participations",name:"Participaciones en gol",isSelected:!1,id:[27]},{key:"headers_rival_area",name:"Cabeceos en área rival",isSelected:!1,id:[330,333,423,577,578,331,334,424]},{key:"shots_total",name:"Tiros a gol totales",isSelected:!1,id:[91,95,92,93,96,97]},{key:"shots_on_target",name:"Tiros a gol con destino a portería",isSelected:!1,id:[91,95]},{key:"shots_outside_box",name:"Tiros a gol fuera del área",isSelected:!1,id:[94]},{key:"shots_outside_box_on_target",name:"Tiros a gol fuera del área con destino a portería",isSelected:!1,id:[95]},{key:"shots_inside_box",name:"Tiros a gol dentro del área",isSelected:!1,id:[90]},{key:"shots_inside_box_on_target",name:"Tiros a gol dentro del área con destino a portería",isSelected:!1,id:[91]},{key:"crosses_left",name:"Centros por izquierda",isSelected:!1,id:[13]},{key:"crosses_left_success",name:"Centros por izquierda acertados",isSelected:!1,id:[98,101,104,105]},{key:"crosses_right",name:"Centros por derecha",isSelected:!1,id:[25]},{key:"crosses_right_success",name:"Centros por derecha acertados",isSelected:!1,id:[109,112,115,116]},{key:"dribbles_success",name:"1vs1 exitosos ofensivos",isSelected:!1,id:[4]},{key:"dribbles_to_goal",name:"1vs1 que terminan en gol",isSelected:!1,id:[88]}]},defensive:{title:"Defensivo",categories:[{key:"balls_won_own_area",name:"Bálones ganados en área propia",isSelected:!1,id:[234,241,281,288,399,401,211,231,238,244,280,287,294]},{key:"headers_own_area",name:"Cabeceo en área propia",isSelected:!1,id:[211,231,238,244,280,287,294]},{key:"tackles_won",name:"1vs1 defensivos exitosos",isSelected:!1,id:[5]},{key:"clearances",name:"Rechaces",isSelected:!1,id:[34]}]},possession:{title:"Posesión",categories:[{key:"recoveries_total",name:"Bálones recuperados totales",isSelected:!1,id:[222,223,224,225]},{key:"recoveries_q1",name:"Bálones recuperados 1/4 de cancha",isSelected:!1,id:[222]},{key:"recoveries_q2",name:"Bálones recuperados 2/4 de cancha",isSelected:!1,id:[223]},{key:"recoveries_q3",name:"Bálones recuperados 3/4 de cancha",isSelected:!1,id:[224]},{key:"recoveries_q4",name:"Bálones recuperados 4/4 de cancha",isSelected:!1,id:[225]},{key:"passes_success",name:"Pases acertados",isSelected:!1,id:[213,214,215,216]},{key:"passes_success_q1",name:"Pases acertados en 1/4 de cancha",isSelected:!1,id:[213]},{key:"passes_success_q2",name:"Pases acertados en 2/4 de cancha",isSelected:!1,id:[214]},{key:"passes_success_q3",name:"Pases acertados en 3/4 de cancha",isSelected:!1,id:[215]},{key:"passes_success_q4",name:"Pases acertados en 4/4 de cancha",isSelected:!1,id:[216]}]},offensesConditions:{areYellowCardSelected:!1,areRedCardSelected:!1,areFoulsCommittedSelected:!1}},detailsObject:{playingAs:[{name:"Local",isSelected:!0},{name:"Visitante",isSelected:!0}],gameSections:[{text:"0-15",value:1,isSelected:!0},{text:"16-30",value:2,isSelected:!0},{text:"31-45",value:3,isSelected:!0},{text:"46-60",value:4,isSelected:!0},{text:"61-75",value:5,isSelected:!0},{text:"76-90",value:6,isSelected:!0}]},nameLeagueSelected:"",categoriesPlaysTypes:{offensive:{title:"Ofensivo",categories:[{name:"Goles",isSelected:!0,id:1},{name:"Tiros a gol",isSelected:!0,id:6},{name:"Tiros a gol con destino a portería",isSelected:!0,id:7},{name:"Asistencias",isSelected:!0,id:4},{name:"Centros",isSelected:!0,id:10},{name:"Centros acertados",isSelected:!0,id:11},{name:"Participaciones en gol",isSelected:!0,id:5},{name:"1vs1 exitosos ofensivos",isSelected:!0,id:12},{name:"1vs1 exitosos ofensivos que terminan en gol",isSelected:!0,id:13},{name:"Balones ganados en área rival",isSelected:!0,id:17},{name:"Cabeceos en área rival",isSelected:!0,id:8},{name:"Tiros de esquina",isSelected:!0,id:23}]},defensive:{title:"Defensivo",categories:[{name:"1vs1 defensivos exitosos",isSelected:!0,id:14},{name:"Cabeceo en área propia",isSelected:!0,id:9},{name:"Balones ganados en área propia",isSelected:!0,id:16},{name:"Rechaces",isSelected:!0,id:15},{name:"Atajadas",isSelected:!0,id:22}]},possession:{title:"Posesión",categories:[{name:"Pases acertados",isSelected:!0,id:2},{name:"Balones recuperados en disputa",isSelected:!0,id:3}]},offenses:{title:"Infracciones",categories:[{name:"Faltas cometidas",isSelected:!0,id:18},{name:"Faltas recibidas",isSelected:!0,id:19},{name:"Tarjetas amarillas",isSelected:!0,id:20},{name:"Tarjetas rojas",isSelected:!0,id:21}]},offensesConditions:{areYellowCardSelected:!1,areRedCardSelected:!1,areFoulsCommittedSelected:!1}},categoriesDefault:[{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}],seasonsFilterSelected:0,tournamentsToFilter:[{name:"Liga MX",logo:"https://golstatsimages.blob.core.windows.net/tournaments/liga_mx.png",isSelected:!0,id:1,show_logos:1,tournament_type:0,tournament_status:0,seasons:[{name:"Apertura 2023",related_seasons:[],id:1772,type:0},{name:"Clausura 2023",related_seasons:[{type:2,id:1745},{type:1,id:1746}],id:1694,type:0},{name:"Apertura 2022",related_seasons:[{type:2,id:1591},{type:1,id:1594}],id:1535,type:0},{name:"Grita Mexico C22",related_seasons:[{type:2,id:1520},{type:1,id:1525}],id:1476,type:0},{name:"Grita Mexico A21",related_seasons:[{type:2,id:1446},{type:1,id:1456}],id:1401,type:0},{name:"Guard1anes Clausura 2021",related_seasons:[{type:2,id:1382},{type:1,id:1383}],id:1325,type:0},{name:"Guard1anes 2020",related_seasons:[{type:2,id:1311},{type:1,id:1316}],id:1275,type:0},{name:"Clausura 2020",related_seasons:[],id:1239,type:0},{name:"Apertura 2019",related_seasons:[{type:1,id:1231}],id:1155,type:0},{name:"Clausura 2019",related_seasons:[{type:1,id:1135}],id:1093,type:0},{name:"Apertura 2018",related_seasons:[{type:1,id:1075}],id:1002,type:0}]},{name:"Liga MX Femenil",logo:"https://golstatsimages.blob.core.windows.net/tournaments/femenil_mx.png",isSelected:!0,id:1001,show_logos:1,tournament_type:0,tournament_status:0,seasons:[{name:"Apertura 2023",related_seasons:[],id:1777,type:0},{name:"Clausura 2023",related_seasons:[{type:1,id:1747}],id:1696,type:0},{name:"Apertura 2022",related_seasons:[{type:1,id:1655}],id:1539,type:0},{name:"Grita Mexico C22",related_seasons:[{type:1,id:1523}],id:1485,type:0},{name:"Grita Mexico A21",related_seasons:[{type:1,id:1458}],id:1402,type:0},{name:"Guard1anes Clausura 2021",related_seasons:[{type:1,id:1384}],id:1323,type:0},{name:"Guard1anes 2020",related_seasons:[{type:1,id:1318}],id:1283,type:0},{name:"Clausura 2020",related_seasons:[],id:1241,type:0},{name:"Apertura 2019",related_seasons:[{type:1,id:1227}],id:1157,type:0},{name:"Clausura 2019",related_seasons:[{type:1,id:1132}],id:1095,type:0},{name:"Apertura 2018",related_seasons:[{type:1,id:1072}],id:1004,type:0},{name:"Clausura 2018",related_seasons:[{type:1,id:1237}],id:1236,type:0}]},{name:"Liga Expansion MX",logo:"https://golstatsimages.blob.core.windows.net/tournaments/expansion_mx.png",isSelected:!0,id:1071,show_logos:1,tournament_type:0,tournament_status:0,seasons:[{name:"Apertura 2023",related_seasons:[],id:1776,type:0},{name:"Clausura 2023",related_seasons:[{type:2,id:1742},{type:1,id:1748}],id:1695,type:0},{name:"Apertura 2022",related_seasons:[{type:2,id:1598},{type:1,id:1618}],id:1544,type:0},{name:"Grita Mexico C22",related_seasons:[{type:2,id:1515},{type:1,id:1519}],id:1484,type:0},{name:"Grita Mexico A21",related_seasons:[{type:2,id:1454},{type:1,id:1463}],id:1408,type:0},{name:"Guard1anes Clausura 2021",related_seasons:[{type:2,id:1378},{type:1,id:1380}],id:1327,type:0},{name:"Guard1anes 2020",related_seasons:[{type:2,id:1315},{type:1,id:1317}],id:1287,type:0}]},{name:"Sub-23",logo:null,isSelected:!0,id:1143,show_logos:0,tournament_type:0,tournament_status:0,seasons:[{name:"Apertura 2023",related_seasons:[],id:1785,type:0}]},{name:"Sub-18",logo:null,isSelected:!0,id:1096,show_logos:0,tournament_type:0,tournament_status:0,seasons:[{name:"Apertura 2023",related_seasons:[],id:1782,type:0},{name:"Clausura 2023",related_seasons:[{type:1,id:1751}],id:1714,type:0},{name:"Apertura 2022",related_seasons:[{type:1,id:1593}],id:1543,type:0},{name:"Grita Mexico C22",related_seasons:[{type:1,id:1522}],id:1487,type:0}]},{name:"Sub-16",logo:null,isSelected:!0,id:1095,show_logos:0,tournament_type:0,tournament_status:0,seasons:[{name:"Apertura 2023",related_seasons:[],id:1783,type:0},{name:"Clausura 2023",related_seasons:[{type:1,id:1750}],id:1715,type:0},{name:"Apertura 2022",related_seasons:[{type:1,id:1652}],id:1541,type:0},{name:"Grita Mexico C22",related_seasons:[{type:1,id:1527}],id:1488,type:0}]}],isCup:!1,arrayPredefinedOrigin:[],indexPredefinedFiltersSelected:0,predefinedFiltersMatchLapse:[],predefinedFiltersPlayingAs:[],predefinedFiltersSections:[],updateTables:0,updateTablesfull:0,optionSelected:"Jugadores",optionSelectedSubmenu:"Todas las jugadas",tournamentsUrl:"https://17zyhpyc7c.execute-api.us-west-2.amazonaws.com/prod/tournaments",teamsUrl:"https://d2oco6mqmc.execute-api.us-west-2.amazonaws.com/prod/teamsBySeason/",urlFilter:"https://cqqxaonvm6.execute-api.us-east-2.amazonaws.com/prod/gs2/tops/filters?categories=",retries:3,teams:[],updateFilterGolstats:0,updateFilterPlaytypesGolstats:0,arrayTournaments:[],arraySeasons:{},seasonBytournament:[],updateFilterTeamsScouting:0,filtersTypes:Xr,token:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE",fVnationalities:new Set,fVzone:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],fVplayingAs:[1,2],fVsections:[1,2,3,4,5,6],fVmatchResult:[1,2,3],fVarrayAgeRange:[10,40],FVeligible:[],FVYear:1900,keyTournamentValue:0,fVtypeZone:2,fVsetPositionsIds:[1,2,3,4,5,6,7,8,9],currentIndex:-1,delay:800,teamselectrec:0,tournamentSelected:0,tournamentSelectedObj:{},FVfilterGolstats:[],updateFilterField:0,rowScoutingData:[],openMenuMobil:!1,selectedTournament:{seasons:[]},selectedSeasonObj:{}}},methods:{getnameshort(e){if(!e)return"";var o=e.split(",");if(o[1]===void 0){var s=e.trim().split(/\s+/).filter(Boolean);return s.length>1?s[0].charAt(0)+". "+s[s.length-1]:e.trim()}var B=o[0].split(" "),U=o[1].trim().split(" "),m="";B.length==2||B.length==1?B[0].length<4?m=B[0]+" "+B[1]:m=B[0]:B.length==3?m=B[0]+" "+B[1]:B.length==4&&(m=B[1]+" "+B[2]+" "+B[3]);var y=U[U.length-1]!=""?U[U.length-1].charAt(0):U[U.length-2]?U[U.length-2].charAt(0):"";return m=m.replace(",",""),y+". "+m},setUpTournamentsToFilter(){this.tournamentsToFilter.forEach(e=>{const o=e.id===this.selectedTournament.id;e.isSelected=o,e.isDefaultTournament=o})},async onClickDeleteFilter(){if(this.optionSelectedSubmenu=="Predeterminados")this.resetPredefinedTeamAll();else{this.rowScoutingData=[];for(let B=0;B<this.detaildProductivityCategories.offensive.categories.length;B++)this.detaildProductivityCategories.offensive.categories[B].isSelected=!1;for(let B=0;B<this.detaildProductivityCategories.defensive.categories.length;B++)this.detaildProductivityCategories.defensive.categories[B].isSelected=!1;for(let B=0;B<this.detaildProductivityCategories.possession.categories.length;B++)this.detaildProductivityCategories.possession.categories[B].isSelected=!1;for(let B=0;B<this.detaildProductivityCategories.offensesConditions.length;B++)this.detaildProductivityCategories.offensesConditions[B]=!1;this.setUpTournamentsToFilter();const o=this.$refs.personalDataFilter;o.clearFilters(ju.All),o.clearFilters(ju.AGE_RANGE),o.clearFilters(ju.YEAR),o.clearFilters(ju.NATIONALITY),o.clearFilters(ju.POSITION),this.universeData.minutesPlayed=0,this.universeData.percentMinutesPlayed=0,this.universeData.lastMonths=Array.from({length:24},(B,U)=>U+1),this.universeData.statistics.totals=!0,this.universeData.statistics.averagePerGame=!1,this.universeData.statistics.percentMinutesPlayed=!1;var e=this.arrayFiltersPlays.findIndex(B=>B.type==="onFiltersTournaments");this.arrayFiltersPlays.splice(e,1);const s=await this.fetchTeamsScouting(this.currentSeasonId);this.teamselect=0,this.teamsscouting=[];for(let B=0;B<s.teams.length;B++)this.teamsscouting.push({id:s.teams[B].team_id,team:s.teams[B].colloquial_name,logo:s.teams[B].logo});setTimeout(()=>{this.modifidFiltersFlag=!1},200)}},clickOpenFilters(){this.showfiltersPc=!0},clickCloseFilters(){this.showfiltersPc=!1},async selectedSeason(e){this.seasonActive!==e.id&&(this.seasonActive=e.id,this.resetPredefinedTeamAll(),this.$emit("change-season-id",e.id))},changeTournament(e){e.id!==this.selectedTournament.id&&(this.selectedTournament=e,this.tournamentSelectedObj={propName:"id",value:e.id},this.teamselect=0,this.resetPredefinedTeamAll(),this.setUpTournamentsToFilter())},changeTournamentMovil(e){this.tournamentSelectedObj={propName:"id",value:e.id},this.seasonBytournament=e.seasons,this.teamselect=0},selectedSeasonMovil(e){this.seasonActive=e.id},setRelevantCategoriesPlayer(e){return e===1?[39,40,52,53,54,55,323,324,608,774,802]:[10,12,14,15,27,35,61,217,257,466,519,607,702,730,98,101,109,112,121,122,127,128,135,136,141,142,161,170,179,211,232,235,239,242,282,284,289,291,296,485,486,487,488]},setOpenMedia(e){this.$emit("openmedia",e)},setMediaData(e){let U=[e.id],m=e.team_id;const y={seasonId:e.season_id,isFeaturedPlayers:!1,mainSectionType:1,playListType:2,gameIds:null,playerIds:U,goalkeeperIds:[],categoryIds:this.setRelevantCategoriesPlayer(e.position),teamId:m||0,matchResult:[1,2,3],categorySingleName:"",isRivalSubject:!1,avoidCategorySingleName:!1,currentPlayIndex:0,playData:null,lastClashedGameId:null,tournamentsLastClashes:null,advancedFilter:{playListTitle:"Jugadas Relevantes"}};this.$emit("openmedia",y)},clickprofile(e){e.isTeam?this.$emit("openProfileTeam",{teamId:e.id,seasonId:this.seasonActive}):this.$emit("openProfilePlayer",{playerId:e.id,teamId:e.teamId,seasonId:this.seasonActive})},viewprofile(e,o,s){this.$emit("openProfilePlayer",{playerId:e,teamId:s,seasonId:o||this.seasonActive})},openMenuFilters(){this.openMenuMobil=!this.openMenuMobil,this.showfiltersPc=!0},clickexpand(e){this.expand=e.expand,this.playerexpand=e.id},async loadTopsCategories(){try{const e=this.$store.getters.getProviderId,o=this.$store.getters.getIsDevApis,s=pu.create({headers:{Authorization:`${this.token}`}}),{data:B}=await s.get(uu(this.urlFilter,e,o));if(Array.isArray(B)&&B.length){const U=B.filter(m=>m&&m.id!=null&&m.category_name).map(m=>({id:m.id,name:m.category_name,isSelected:!1}));U.length&&(this.categoriesDefault=U,this.arrayCategoryFilter=U.map(m=>m.id),this.arrayCategoryFilterFull=U.map(m=>m.id))}}catch{}},async loadProductivityTranslation(){const e=this.$store.getters.getProviderId;if(!e||e===1)return;const o=await tie(e);o&&typeof o=="object"&&(this.productivityTranslationMap=o,this.applyProductivityTranslation(o))},applyProductivityTranslation(e){const o=["offensive","defensive","possession"];for(const s of o){const B=this.detaildProductivityCategories[s];B&&Array.isArray(B.categories)&&(B.categories=B.categories.filter(U=>Array.isArray(e[U.key])).map(U=>({...U,id:e[U.key]})))}this.filterScounting.categories=this.filterScounting.categories.filter(s=>Array.isArray(e[s.key])).map(s=>({...s,ids:e[s.key]}))},async getScoutingData(){this.arrayFiltersPlays=[],this.loadingActive=!0;const e=pu.create({headers:{Authorization:`${this.token}`}}),{data:o}=await e.post(uu("https://eh9nhj69z7.execute-api.us-west-2.amazonaws.com/prod/players/productivity",this.$store.getters.getProviderId,this.$store.getters.getIsDevApis),this.filterScounting,{headers:{"Content-Type":"application/json"}});if(this.filterScounting.tournaments.length>0){var s=this.arrayFiltersPlays.findIndex(U=>U.type==="onFiltersTournaments");s!==-1?this.arrayFiltersPlays[s].name=this.filterScounting.tournaments.length>1?"Ligas "+this.filterScounting.tournaments.length:this.nameLeagueSelected!=""?this.nameLeagueSelected:"Liga MX":this.arrayFiltersPlays.push({name:this.filterScounting.tournaments.length>1?"Ligas "+this.filterScounting.tournaments.length:this.nameLeagueSelected!=""?this.nameLeagueSelected:"Liga MX",type:"onFiltersTournaments"})}this.rowScoutingData=[];for(let U=0;U<o.length;U++){o[U];let y=o[U].dob.split("T")[0].split("-");var B={position:U+1,player_name:this.abrevName(o[U].name),player_photo:"https://golstatsimages.blob.core.windows.net/players-profile/"+o[U].player_id+".png",total:o[U].total.toFixed(0),id:o[U].player_id,player_age:this.calcularEdad(o[U].dob),team_abrev:o[U].teams[0].acronym,team_name:o[U].teams[0].team_name,team_logo:Af("https://golstatsimages.blob.core.windows.net/teams-80/"+o[U].teams[0].team_id+".png",this.$store.getters.getProviderId),player_position:o[U].position_id,player_country_flag:"https://golstatsimages.blob.core.windows.net/flags/"+o[U].nationality_id+".jpg",date:y[2]+"."+y[1]+"."+y[0].substring(2,4),team_id:o[U].team_id,nationality_name:_V[o[U].nationality_id],player_games:o[U].games_played,player_min:o[U].minutes_played,league_name:o[U].tournament_name,seasons:o[U].seasons,season_id:o[U].seasons[0]};this.rowScoutingData.push(B)}if(this.seasonsFilterSelected!=0){const U=await this.fetchTeamsScouting(this.seasonsFilterSelected);this.teamselect=0,this.teamselectrec=0,this.teamsscouting=[];for(let m=0;m<U.teams.length;m++)this.teamsscouting.push({id:U.teams[m].team_id,team:U.teams[m].colloquial_name,logo:U.teams[m].logo})}this.loadingActive=!1},abrevName(e){var o=e.split(","),s=o[0].split(" "),B=o[1].trim().split(" "),U="";s.length==2||s.length==1?s[0].length<4?U=s[0]+" "+s[1]:U=s[0]:s.length==3?U=s[0]+" "+s[1]:s.length==4&&(U=s[1]+" "+s[2]+" "+s[3]);var m=B[B.length-1]!=""?B[B.length-1].charAt(0):B[B.length-2]?B[B.length-2].charAt(0):"";U=U.replace(",","");var y=m+". "+U;return y},calcularEdad(e){var o=new Date(e),s=new Date,B=s-o,U=Math.floor(B/(1e3*60*60*24*365.25));return U},async onFiltersTournaments(e){this.modifidFiltersFlag=!0;var o=[];for(let s=0;s<e.length;s++)e[s].isSelected&&o.push(e[s].id);if(o.length==0&&(o=[1]),o.length==1)for(let s=0;s<e.length;s++)e[s].isSelected&&(this.nameLeagueSelected=e[s].name,this.seasonsFilterSelected=e[s].seasons[0].id);else this.seasonsFilterSelected=0,o.length>0&&(this.nameLeagueSelected=o.length+" Ligas");this.filterScounting.tournaments=o,this.filterScounting.seasonId=e[0].seasons[0].id},onFiltersPersonalData(e){if(this.modifidFiltersFlag=!0,e.hasOwnProperty("ageByRange")){const B=e.ageByRange.min==0?10:e.ageByRange.min,U=e.ageByRange.max==0?40:e.ageByRange.max;this.filterScounting.range_age=[B,U],this.filterScounting.age_or_year=1}else this.filterScounting.range_age=[];e.hasOwnProperty("year")?(this.filterScounting.year=e.year,this.filterScounting.age_or_year=0):this.filterScounting.year=0;var o=[];if(e.hasOwnProperty("nationalities")){for(let B=0;B<e.nationalities.length;B++)e.nationalities[B].isSelected&&o.push(e.nationalities[B].id);o.length==0&&(o=[3,4,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,221,84,85,86,87,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,222,223,224,225,226,227,228,229,230,231,232,233,234,236,237,239])}this.filterScounting.elegibles=[],e.hasOwnProperty("eligibility")&&(this.filterScounting.elegibles=[e.eligibility[0].id]);var s=[];for(let B=0;B<e.positions.length;B++)e.positions[B].isSelected&&s.push(e.positions[B].id);s.length==0&&(s=[1,2,3,4,5,6,7,8,9,10]),this.filterScounting.positions=s,this.filterScounting.nationalities=o},onFiltersUniverse(e){this.modifidFiltersFlag=!0,this.filterScounting.minutes_played=Number(e.minutesPlayed),this.filterScounting.last_months=Number(e.lastMonths),this.filterScounting.minutes_played_avg=Number(e.percentMinutesPlayed),this.filterScounting.type_stats=e.statistics.averagePerGame?3:e.statistics.averagePerMinute?2:1},onFiltersProductivity(e){this.modifidFiltersFlag=!0;var o=[];for(let s=0;s<e.productivityFilters.length;s++)o[e.productivityFilters[s].priority-1]={name:e.productivityFilters[s].name,ids:e.productivityFilters[s].id};o.length==0&&(o=[]),this.filterScounting.categories=o,this.filterScounting.fouls=e.offensesConditions.areFoulsCommittedSelected,this.filterScounting.yellow_cards=e.offensesConditions.areYellowCardsSelected,this.filterScounting.red_cards=e.offensesConditions.areRedCardsSelected},onFiltersGolStats(e){if(e.length>0){var o=this.arrayFiltersPlays.findIndex(B=>B.type==="onFiltersPredefined");o!==-1?this.arrayFiltersPlays[o].name=e[0].name:this.arrayFiltersPlays.push({name:e[0].name,type:"onFiltersPredefined"}),this.filtersPredefinedF=e[0].filters}else{var s=this.arrayFiltersPlays.findIndex(B=>B.type==="onFiltersPredefined");if(this.FVfilterGolstats.length>0&&s!==-1){this.filtersPredefinedF=this.filters;for(let U=0;U<this.FVfilterGolstats.length;U++)this.FVfilterGolstats[U].isSelected=!1;var s=this.arrayFiltersPlays.findIndex(U=>U.type==="onFiltersPredefined");s!==-1&&this.arrayFiltersPlays.splice(s,1),this.updateFilterGolstats+=1}}},shouldRender(e){return e<=this.currentIndex},renderNext(){this.currentIndex++,this.currentIndex<this.categoriesDefault.length&&setTimeout(()=>{this.$nextTick(()=>{this.renderNext()})},this.delay)},async onFiltersPlaysTypes(e){if(e.length>0){this.categoryPredefinedActive=!0,this.loadingActive=!0,this.categoryPredefined=e[0].id;var o=this.arrayFiltersPlays.findIndex(B=>B.type==="onFiltersPredefined");if(this.categoriesDefault.length>0&&o!==-1){this.FVfilterGolstats=[],this.filtersPredefinedF={},this.arrayFiltersPlays.splice(o,1);var s=this.arrayFiltersPlays.findIndex(B=>B.type==="onFiltersPredefined");if(s!==-1){for(let B=0;B<this.FVfilterGolstats.length;B++)this.FVfilterGolstats[B].isSelected=!1;s!==-1&&this.arrayFiltersPlays.splice(s,1),this.updateFilterGolstats+=1}}this.updateTables+=1,setTimeout(()=>{this.loadingActive=!1},1e3),await this.getPredefinedfilters(e[0]),this.FVfilterGolstats.length>0&&(this.onFiltersGolStats([this.FVfilterGolstats[0]]),this.FVfilterGolstats[0].isSelected=!0)}else{var o=this.arrayFiltersPlays.findIndex(U=>U.type==="onFiltersPredefinedCategory");if(this.categoriesDefault.length>0&&o!==-1){this.categoryPredefinedActive=!1,this.categoryPredefined=0,this.FVfilterGolstats=[],this.filtersPredefinedF=this.filters,this.arrayFiltersPlays.splice(o,1);for(let m=0;m<this.categoriesDefault.length;m++)this.categoriesDefault[m].isSelected=!1;this.updateFilterPlaytypesGolstats+=1;var s=this.arrayFiltersPlays.findIndex(m=>m.type==="onFiltersPredefined");if(this.FVfilterGolstats.length>0&&s!==-1){for(let m=0;m<this.FVfilterGolstats.length;m++)this.FVfilterGolstats[m].isSelected=!1;s!==-1&&this.arrayFiltersPlays.splice(s,1),this.updateFilterGolstats+=1}}}},deleteCategoryFilter(){this.categoryName="",this.showFullCategory=0,this.showFullTable=!1,delete this.filters.aux},onShowFullTable(e){this.categoryName=e.categoryName,this.showFullCategory=e.category,this.showFullTable=!0,this.loadingActive=!0,setTimeout(()=>{this.filters={zone:this.fVzone,playingAs:this.fVplayingAs,sections:this.fVsections,matchResult:this.fVmatchResult,arrayAgeRange:this.fVarrayAgeRange,typeZone:this.fVtypeZone,setNationalitiesIds:this.fVnationalities,setPositionsIds:this.fVsetPositionsIds,setYear:this.FVYear,aux:this.getRandomNumber(1,1e4),booleanAreNationalTeamsVisible:this.FVbooleanAreNationalTeamsVisible,setAvailableNationalTeamsPlayersIds:this.FVsetAvailableNationalTeamsPlayersIds},this.loadingActive=!1},1e3)},getRandomNumber(e,o){return Math.floor(Math.random()*(o-e+1))+e},applyFiltersBtn(e){},onFiltersPlays(e){if(this.arrayCategoryFilter=[],this.arrayCategoryFilterFull=[],e.playsCategories.length==0){for(let s=0;s<this.categoriesPlaysTypes.offensive.categories.length;s++)this.arrayCategoryFilter.push(this.categoriesPlaysTypes.offensive.categories[s].id),this.arrayCategoryFilterFull.push(this.categoriesPlaysTypes.offensive.categories[s]);for(let s=0;s<this.categoriesPlaysTypes.defensive.categories.length;s++)this.arrayCategoryFilter.push(this.categoriesPlaysTypes.defensive.categories[s].id),this.arrayCategoryFilterFull.push(this.categoriesPlaysTypes.offensive.categories[s]);for(let s=0;s<this.categoriesPlaysTypes.possession.categories.length;s++)this.arrayCategoryFilter.push(this.categoriesPlaysTypes.possession.categories[s].id),this.arrayCategoryFilterFull.push(this.categoriesPlaysTypes.offensive.categories[s]);for(let s=0;s<this.categoriesPlaysTypes.offenses.categories.length;s++)this.arrayCategoryFilter.push(this.categoriesPlaysTypes.offenses.categories[s].id),this.arrayCategoryFilterFull.push(this.categoriesPlaysTypes.offensive.categories[s])}else for(let s=0;s<e.playsCategories.length;s++)e.playsCategories[s].isSelected&&(this.arrayCategoryFilter.push(e.playsCategories[s].id),this.arrayCategoryFilterFull.push(e.playsCategories[s]));var o=this.arrayFiltersPlays.findIndex(s=>s.type==="onFiltersPlays");this.arrayCategoryFilter.length>0&&this.arrayCategoryFilter.length!=23?this.arrayCategoryFilter.length==1?o!=-1?this.arrayFiltersPlays[o].name=this.arrayCategoryFilterFull[0].name:this.arrayFiltersPlays.push({name:this.arrayCategoryFilterFull[0].name,type:"onFiltersPlays"}):o!=-1?this.arrayFiltersPlays[o].name=this.arrayCategoryFilterFull.length+" Tipos de jugadas":this.arrayFiltersPlays.push({name:this.arrayCategoryFilterFull.length+" Tipos de jugadas",type:"onFiltersPlays"}):o!==-1&&this.arrayFiltersPlays.splice(o,1)},async deleteLabelFilter(e){var o=this.arrayFiltersPlays.findIndex(B=>B.type===e);if(o!==-1){if(e=="onFiltersTournaments"){this.rowScoutingData=[];for(let U=0;U<this.detaildProductivityCategories.offensive.categories.length;U++)this.detaildProductivityCategories.offensive.categories[U].isSelected=!1;for(let U=0;U<this.detaildProductivityCategories.defensive.categories.length;U++)this.detaildProductivityCategories.defensive.categories[U].isSelected=!1;for(let U=0;U<this.detaildProductivityCategories.possession.categories.length;U++)this.detaildProductivityCategories.possession.categories[U].isSelected=!1;for(let U=0;U<this.detaildProductivityCategories.offensesConditions.length;U++)this.detaildProductivityCategories.offensesConditions[U]=!1;this.setUpTournamentsToFilter(),this.universeData.minutesPlayed=10,this.universeData.percentMinutesPlayed=0,this.universeData.lastMonths=Array.from({length:24},(U,m)=>m+1),this.universeData.statistics.totals=!0,this.universeData.statistics.averagePerGame=!1,this.universeData.statistics.percentMinutesPlayed=!0;const B=await this.fetchTeamsScouting(this.currentSeasonId);this.teamsscouting=[];for(let U=0;U<B.teams.length;U++)this.teamsscouting.push({id:B.teams[U].team_id,team:B.teams[U].colloquial_name,logo:B.teams[U].logo});this.keyTournamentValue+=1,setTimeout(()=>{this.modifidFiltersFlag=!1},200)}if(e=="onFiltersPlays"){for(let B=0;B<this.categoriesPlaysTypes.offensive.categories.length;B++)this.categoriesPlaysTypes.offensive.categories[B].isSelected=!0;for(let B=0;B<this.categoriesPlaysTypes.defensive.categories.length;B++)this.categoriesPlaysTypes.defensive.categories[B].isSelected=!0,this.arrayCategoryFilter.push(),this.arrayCategoryFilterFull.push(this.categoriesPlaysTypes.offensive.categories[B]);for(let B=0;B<this.categoriesPlaysTypes.possession.categories.length;B++)this.categoriesPlaysTypes.possession.categories[B].isSelected=!0;for(let B=0;B<this.categoriesPlaysTypes.offenses.categories.length;B++)this.categoriesPlaysTypes.offenses.categories[B].isSelected=!0}if(e=="onFiltersField"&&(this.fVzone=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],this.filters={zone:this.fVzone,playingAs:this.fVplayingAs,sections:this.fVsections,matchResult:this.fVmatchResult,arrayAgeRange:this.fVarrayAgeRange,typeZone:this.fVtypeZone,setNationalitiesIds:this.fVnationalities,setPositionsIds:this.fVsetPositionsIds,setYear:this.FVYear,booleanAreNationalTeamsVisible:this.FVbooleanAreNationalTeamsVisible,setAvailableNationalTeamsPlayersIds:this.FVsetAvailableNationalTeamsPlayersIds}),e=="onFiltersPredefined"){this.filtersPredefinedF=this.filters;for(let B=0;B<this.FVfilterGolstats.length;B++)this.FVfilterGolstats[B].isSelected=!1;this.updateFilterGolstats+=1,this.resetPredefinedTeamAll()}if(e=="onFiltersPredefinedCategory"){this.categoryPredefinedActive=!1,this.categoryPredefined=0,this.FVfilterGolstats=[],this.filtersPredefinedF=this.filters;var s=this.arrayFiltersPlays.findIndex(B=>B.type==="onFiltersPredefined");s!==-1&&this.arrayFiltersPlays.splice(s,1);for(let B=0;B<this.categoriesDefault.length;B++)this.categoriesDefault[B].isSelected=!1;this.updateFilterPlaytypesGolstats+=1}e=="onFiltersDetailsTime"&&(this.detailsObject.gameSections[0].isSelected=!0,this.detailsObject.gameSections[1].isSelected=!0,this.detailsObject.gameSections[2].isSelected=!0,this.detailsObject.gameSections[3].isSelected=!0,this.detailsObject.gameSections[4].isSelected=!0,this.detailsObject.gameSections[5].isSelected=!0,this.fVsections=[1,2,3,4,5,6],this.filters={zone:this.fVzone,playingAs:this.fVplayingAs,sections:this.fVsections,matchResult:this.fVmatchResult,arrayAgeRange:this.fVarrayAgeRange,typeZone:this.fVtypeZone,setNationalitiesIds:this.fVnationalities,setPositionsIds:this.fVsetPositionsIds,setYear:this.FVYear,booleanAreNationalTeamsVisible:this.FVbooleanAreNationalTeamsVisible,setAvailableNationalTeamsPlayersIds:this.FVsetAvailableNationalTeamsPlayersIds}),e=="onFiltersDetailsPlayingAs"&&(this.detailsObject.playingAs[0].isSelected=!0,this.detailsObject.playingAs[1].isSelected=!0,this.fVplayingAs=[1,2],this.filters={zone:this.fVzone,playingAs:this.fVplayingAs,sections:this.fVsections,matchResult:this.fVmatchResult,arrayAgeRange:this.fVarrayAgeRange,typeZone:this.fVtypeZone,setNationalitiesIds:this.fVnationalities,setPositionsIds:this.fVsetPositionsIds,setYear:this.FVYear,booleanAreNationalTeamsVisible:this.FVbooleanAreNationalTeamsVisible,setAvailableNationalTeamsPlayersIds:this.FVsetAvailableNationalTeamsPlayersIds}),e=="onFiltersNationality"&&(this.fVnationalities.add(138),this.fVnationalities.add(222),this.fVnationalities.add(163),this.fVnationalities.add(51),this.fVnationalities.add(226),this.fVnationalities.add(10),this.fVnationalities.add(223),this.fVnationalities.add(96),this.fVnationalities.add(171),this.fVnationalities.add(198),this.fVnationalities.add(105),this.fVnationalities.add(80),this.fVnationalities.add(29),this.fVnationalities.add(74),this.fVnationalities.add(216),this.fVnationalities.add(196),this.fVnationalities.add(64),this.fVnationalities.add(155),this.fVnationalities.add(156),this.fVnationalities.add(89),this.fVnationalities.add(106),this.fVnationalities.add(81),this.fVnationalities.add(233),this.fVnationalities.add(204),this.filters={zone:this.fVzone,playingAs:this.fVplayingAs,sections:this.fVsections,matchResult:this.fVmatchResult,arrayAgeRange:this.fVarrayAgeRange,typeZone:this.fVtypeZone,setNationalitiesIds:this.fVnationalities,setPositionsIds:this.fVsetPositionsIds,setYear:this.FVYear,booleanAreNationalTeamsVisible:this.FVbooleanAreNationalTeamsVisible,setAvailableNationalTeamsPlayersIds:this.FVsetAvailableNationalTeamsPlayersIds},this.$refs.personalDataFilterPlayers.clearFilters(ju.NATIONALITY)),e=="onFiltersPosition"&&(this.fVsetPositionsIds=[1,2,3,4,5,6,7,8,9],this.filters={zone:this.fVzone,playingAs:this.fVplayingAs,sections:this.fVsections,matchResult:this.fVmatchResult,arrayAgeRange:this.fVarrayAgeRange,typeZone:this.fVtypeZone,setNationalitiesIds:this.fVnationalities,setPositionsIds:this.fVsetPositionsIds,setYear:this.FVYear,booleanAreNationalTeamsVisible:this.FVbooleanAreNationalTeamsVisible,setAvailableNationalTeamsPlayersIds:this.FVsetAvailableNationalTeamsPlayersIds},this.$refs.personalDataFilterPlayers.clearFilters(ju.POSITION)),e=="onFiltersAge"&&(this.fVarrayAgeRange=[10,40],this.filters={zone:this.fVzone,playingAs:this.fVplayingAs,sections:this.fVsections,matchResult:this.fVmatchResult,arrayAgeRange:this.fVarrayAgeRange,typeZone:this.fVtypeZone,setNationalitiesIds:this.fVnationalities,setPositionsIds:this.fVsetPositionsIds,setYear:this.FVYear,booleanAreNationalTeamsVisible:this.FVbooleanAreNationalTeamsVisible,setAvailableNationalTeamsPlayersIds:this.FVsetAvailableNationalTeamsPlayersIds},this.$refs.personalDataFilterPlayers.clearFilters(ju.AGE_RANGE)),e=="onFiltersElegibility"&&this.$refs.personalDataFilterPlayers.clearFilters(ju.ELIGIBILITY),e=="onFiltersYear"&&(this.$refs.personalDataFilterPlayers.clearFilters(ju.YEAR),this.FVYear=1900,this.filters={zone:this.fVzone,playingAs:this.fVplayingAs,sections:this.fVsections,matchResult:this.fVmatchResult,arrayAgeRange:this.fVarrayAgeRange,typeZone:this.fVtypeZone,setNationalitiesIds:this.fVnationalities,setPositionsIds:this.fVsetPositionsIds,setYear:this.FVYear,booleanAreNationalTeamsVisible:this.FVbooleanAreNationalTeamsVisible,setAvailableNationalTeamsPlayersIds:this.FVsetAvailableNationalTeamsPlayersIds})}this.arrayFiltersPlays.splice(o,1)},onFiltersField(e){e.length==0?this.fVzone=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]:this.fVzone=e;var o=this.arrayFiltersPlays.findIndex(B=>B.type==="onFiltersField");o!=-1?this.arrayFiltersPlays[o].name=this.fVzone.length+" zonas del campo":this.arrayFiltersPlays.push({name:this.fVzone.length+" zonas del campo",type:"onFiltersField"}),[1,23,3,4,5,7,6,9,8,11,10,12,13,15,14,17,16,22].includes(this.category)?this.fVtypeZone=1:this.fVtypeZone=2,this.filters={zone:this.fVzone,playingAs:this.fVplayingAs,sections:this.fVsections,matchResult:this.fVmatchResult,arrayAgeRange:this.fVarrayAgeRange,typeZone:this.fVtypeZone,setNationalitiesIds:this.fVnationalities,setPositionsIds:this.fVsetPositionsIds,setYear:this.FVYear,booleanAreNationalTeamsVisible:this.FVbooleanAreNationalTeamsVisible,setAvailableNationalTeamsPlayersIds:this.FVsetAvailableNationalTeamsPlayersIds},e.length!=16?(this.fVzone.length==4&&this.fVzone.includes(1)&&this.fVzone.includes(2)&&this.fVzone.includes(3)&&this.fVzone.includes(4)&&(o!=-1?this.arrayFiltersPlays[o].name="1/4 de cancha":this.arrayFiltersPlays.push({name:"1/4 de cancha",type:"onFiltersField"})),this.fVzone.length==4&&this.fVzone.includes(5)&&this.fVzone.includes(6)&&this.fVzone.includes(7)&&this.fVzone.includes(8)&&(o!=-1?this.arrayFiltersPlays[o].name="2/4 de cancha":this.arrayFiltersPlays.push({name:"2/4 de cancha",type:"onFiltersField"})),this.fVzone.length==4&&this.fVzone.includes(9)&&this.fVzone.includes(10)&&this.fVzone.includes(11)&&this.fVzone.includes(12)&&(o!=-1?this.arrayFiltersPlays[o].name="3/4 de cancha":this.arrayFiltersPlays.push({name:"3/4 de cancha",type:"onFiltersField"})),this.fVzone.length==4&&this.fVzone.includes(13)&&this.fVzone.includes(14)&&this.fVzone.includes(15)&&this.fVzone.includes(16)&&(o!=-1?this.arrayFiltersPlays[o].name="4/4 de cancha":this.arrayFiltersPlays.push({name:"4/4 de cancha",type:"onFiltersField"})),this.fVzone.length==8&&this.fVzone.includes(1)&&this.fVzone.includes(2)&&this.fVzone.includes(3)&&this.fVzone.includes(4)&&this.fVzone.includes(5)&&this.fVzone.includes(6)&&this.fVzone.includes(7)&&this.fVzone.includes(8)&&(o!=-1?this.arrayFiltersPlays[o].name="cancha propia":this.arrayFiltersPlays.push({name:"cancha propia",type:"onFiltersField"})),this.fVzone.length==8&&this.fVzone.includes(9)&&this.fVzone.includes(10)&&this.fVzone.includes(11)&&this.fVzone.includes(12)&&this.fVzone.includes(13)&&this.fVzone.includes(14)&&this.fVzone.includes(15)&&this.fVzone.includes(16)&&(o!=-1?this.arrayFiltersPlays[o].name="cancha rival":this.arrayFiltersPlays.push({name:"cancha rival",type:"onFiltersField"}))):this.arrayFiltersPlays.splice(o,1)},addFilterPlayingAS(){var e=this.arrayFiltersPlays.findIndex(o=>o.type==="onFiltersDetailsPlayingAs");e!=-1?this.fVplayingAs.length==1?this.arrayFiltersPlays[e].name=this.fVplayingAs.includes(1)?"Local":"Visitante":this.arrayFiltersPlays.splice(e,1):this.fVplayingAs.length==1&&this.arrayFiltersPlays.push({name:this.fVplayingAs.includes(1)?"Local":"Visitante",type:"onFiltersDetailsPlayingAs"})},onFiltersDetails(e){var o=[];this.filters.setNationalitiesIds=this.setNationalitiesIds;var s=[];for(let m=0;m<e.playingAs.length;m++)if(e.playingAs[m].isSelected){const y=e.playingAs[m].name=="Local"?1:2;o.push(y)}for(let m=0;m<e.gameSections.length;m++)e.gameSections[m].isSelected&&s.push(e.gameSections[m].value);this.fVsections=s,this.fVplayingAs=o;var B=this.arrayFiltersPlays.findIndex(m=>m.type==="onFiltersDetailsTime"),U="los minutos del ";this.fVsections.length!=6&&this.fVsections.length>0?(this.fVsections.includes(1)&&(U+=", 0-15"),this.fVsections.includes(2)&&(U+=", 15-30"),this.fVsections.includes(3)&&(U+=", 30-45"),this.fVsections.includes(4)&&(U+=", 45-60"),this.fVsections.includes(5)&&(U+=", 60-75"),this.fVsections.includes(6)&&(U+=", 75-90"),B!=-1?this.arrayFiltersPlays[B].name=U:this.arrayFiltersPlays.push({name:U,type:"onFiltersDetailsTime"}),this.fVsections.length==3&&this.fVsections.includes(1)&&this.fVsections.includes(2)&&this.fVsections.includes(3)&&(B!=-1?this.arrayFiltersPlays[B].name="Primer tiempo":this.arrayFiltersPlays.push({name:"Primer tiempo",type:"onFiltersDetailsTime"})),this.fVsections.length==3&&this.fVsections.includes(4)&&this.fVsections.includes(5)&&this.fVsections.includes(6)&&(B!=-1?this.arrayFiltersPlays[B].name="Segundo tiempo":this.arrayFiltersPlays.push({name:"Segundo tiempo",type:"onFiltersDetailsTime"})),this.fVsections.length==1&&this.fVsections.includes(1)&&(B!=-1?this.arrayFiltersPlays[B].name="los primeros 15 minutos del partido":this.arrayFiltersPlays.push({name:"los primeros 15 minutos del partido",type:"onFiltersDetailsTime"})),this.fVsections.length==1&&this.fVsections.includes(3)&&(B!=-1?this.arrayFiltersPlays[B].name="los últimos 15 minutos del primer tiempo":this.arrayFiltersPlays.push({name:"los últimos 15 minutos del primer tiempo",type:"onFiltersDetailsTime"})),this.fVsections.length==1&&this.fVsections.includes(4)&&(B!=-1?this.arrayFiltersPlays[B].name="los primeros 15 minutos del segundo tiempo":this.arrayFiltersPlays.push({name:"los primeros 15 minutos del segundo tiempo",type:"onFiltersDetailsTime"})),this.fVsections.length==1&&this.fVsections.includes(6)&&(B!=-1?this.arrayFiltersPlays[B].name="los últimos 15 minutos del segundo tiempo":this.arrayFiltersPlays.push({name:"los últimos 15 minutos del segundo tiempo",type:"onFiltersDetailsTime"})),this.fVsections.length==2&&this.fVsections.includes(1)&&this.fVsections.includes(2)&&(B!=-1?this.arrayFiltersPlays[B].name="los primeros 30 minutos del partido":this.arrayFiltersPlays.push({name:"los primeros 30 minutos del partido",type:"onFiltersDetailsTime"})),this.fVsections.length==2&&this.fVsections.includes(5)&&this.fVsections.includes(6)&&(B!=-1?this.arrayFiltersPlays[B].name="los últimos 30 minutos del segundo tiempo":this.arrayFiltersPlays.push({name:"los últimos 30 minutos del segundo tiempo",type:"onFiltersDetailsTime"}))):B!=-1&&this.arrayFiltersPlays.splice(B,1),this.addFilterPlayingAS(),this.filters={zone:this.fVzone,playingAs:this.fVplayingAs,sections:this.fVsections,matchResult:this.fVmatchResult,arrayAgeRange:this.fVarrayAgeRange,typeZone:this.fVtypeZone,setNationalitiesIds:this.fVnationalities,setPositionsIds:this.fVsetPositionsIds,setYear:this.FVYear,booleanAreNationalTeamsVisible:this.FVbooleanAreNationalTeamsVisible,setAvailableNationalTeamsPlayersIds:this.FVsetAvailableNationalTeamsPlayersIds}},async resetScouting(){this.universeData.minutesPlayed=0,this.universeData.percentMinutesPlayed=0,this.universeData.lastMonths=Array.from({length:24},(B,U)=>U+1),this.universeData.statistics.totals=!0,this.universeData.statistics.averagePerGame=!1,this.universeData.statistics.percentMinutesPlayed=!1;const e=this.$refs.personalDataFilter;e.clearFilters(ju.All),e.clearFilters(ju.AGE_RANGE),e.clearFilters(ju.YEAR),e.clearFilters(ju.NATIONALITY),e.clearFilters(ju.POSITION),this.rowScoutingData=[];for(let B=0;B<this.detaildProductivityCategories.offensive.categories.length;B++)this.detaildProductivityCategories.offensive.categories[B].isSelected=!1;for(let B=0;B<this.detaildProductivityCategories.defensive.categories.length;B++)this.detaildProductivityCategories.defensive.categories[B].isSelected=!1;for(let B=0;B<this.detaildProductivityCategories.possession.categories.length;B++)this.detaildProductivityCategories.possession.categories[B].isSelected=!1;for(let B=0;B<this.detaildProductivityCategories.offensesConditions.length;B++)this.detaildProductivityCategories.offensesConditions[B]=!1;var o=this.arrayFiltersPlays.findIndex(B=>B.type==="onFiltersTournaments");this.arrayFiltersPlays.splice(o,1),this.setUpTournamentsToFilter();const s=await this.fetchTeamsScouting(this.currentSeasonId);this.teamselect=0,this.teamsscouting=[];for(let B=0;B<s.teams.length;B++)this.teamsscouting.push({id:s.teams[B].team_id,team:s.teams[B].colloquial_name,logo:s.teams[B].logo})},onFiltersData(e){var o=0,s=0;e.ageByRange&&(e.ageByRange.min==0?o=1:o=e.ageByRange.min,e.ageByRange.max==0?s=40:s=e.ageByRange.max,this.fVarrayAgeRange=[o,s]),e.year&&(this.FVYear=e.year),this.fVnationalities=new Set;let B="",U="";if(this.fVsetPositionsIds=[],e.hasOwnProperty("nationalities")){this.FVbooleanAreNationalTeamsVisible=!1,this.FVsetAvailableNationalTeamsPlayersIds=new Set;for(let b=0;b<e.nationalities.length;b++)e.nationalities[b].isSelected&&this.fVnationalities.add(e.nationalities[b].id)}if(this.FVeligible=[],e.hasOwnProperty("eligibility")){this.FVbooleanAreNationalTeamsVisible=!0;for(let b=0;b<this.elegibilidadArray.length;b++)this.FVsetAvailableNationalTeamsPlayersIds.add(this.elegibilidadArray[b])}for(let b=0;b<e.positions.length;b++)e.positions[b].isSelected&&this.fVsetPositionsIds.push(e.positions[b].id);if(e.hasOwnProperty("nationalities"))var m=e.nationalities.filter(b=>b.isSelected===!0);var y=e.positions.filter(b=>b.isSelected===!0);if(y.length==1&&(B=y[0].name),e.hasOwnProperty("nationalities")&&m.length==1&&(U=m[0].name),setTimeout(()=>{this.filters={zone:this.fVzone,playingAs:this.fVplayingAs,sections:this.fVsections,matchResult:this.fVmatchResult,arrayAgeRange:this.fVarrayAgeRange,typeZone:this.fVtypeZone,elegible:this.FVeligible,setNationalitiesIds:this.fVnationalities,setPositionsIds:this.fVsetPositionsIds,setYear:this.FVYear,booleanAreNationalTeamsVisible:this.FVbooleanAreNationalTeamsVisible,setAvailableNationalTeamsPlayersIds:this.FVsetAvailableNationalTeamsPlayersIds}},1e3),this.FVbooleanAreNationalTeamsVisible){var a=this.arrayFiltersPlays.findIndex(b=>b.type==="onFiltersElegibility");a!=-1?this.arrayFiltersPlays[a].name="Elegibles":this.arrayFiltersPlays.push({name:"Elegibles",type:"onFiltersElegibility"})}else{var a=this.arrayFiltersPlays.findIndex(x=>x.type==="onFiltersElegibility");this.arrayFiltersPlays.splice(a,1)}if(this.fVsetPositionsIds.length!=9&&this.fVsetPositionsIds.length>0){var v=this.arrayFiltersPlays.findIndex(b=>b.type==="onFiltersPosition");v!=-1?this.fVsetPositionsIds.length>0?this.arrayFiltersPlays[v].name=this.fVsetPositionsIds.length>1?this.fVsetPositionsIds.length+" Posiciones de juego":"Posicion de juego "+B:this.arrayFiltersPlays.splice(v,1):this.arrayFiltersPlays.push({name:this.fVsetPositionsIds.length>1?this.fVsetPositionsIds.length+" Posiciones de juego":"Posicion de juego "+B,type:"onFiltersPosition"})}if(this.FVYear!=0&&this.FVYear!=1900&&this.FVYear){var p=this.arrayFiltersPlays.findIndex(b=>b.type==="onFiltersYear");p!=-1?this.arrayFiltersPlays[p].name=this.FVYear:this.arrayFiltersPlays.push({name:this.FVYear,type:"onFiltersYear"})}if(this.fVarrayAgeRange[0]>=e.ageLimits.min&&this.fVarrayAgeRange[1]<=e.ageLimits.max)if(this.fVarrayAgeRange[0]>e.ageLimits.min||this.fVarrayAgeRange[1]<e.ageLimits.max){var r=this.arrayFiltersPlays.findIndex(b=>b.type==="onFiltersAge");r!=-1?this.fVarrayAgeRange.length>0?this.arrayFiltersPlays[r].name=this.fVarrayAgeRange[0]!=this.fVarrayAgeRange[1]?this.fVarrayAgeRange[0]+" - "+this.fVarrayAgeRange[1]+" años":this.fVarrayAgeRange[1]+" años":this.arrayFiltersPlays.splice(r,1):this.arrayFiltersPlays.push({name:this.fVarrayAgeRange[0]!=this.fVarrayAgeRange[1]?this.fVarrayAgeRange[0]+" - "+this.fVarrayAgeRange[1]+" años":this.fVarrayAgeRange[1]+" años",type:"onFiltersAge"})}else{var r=this.arrayFiltersPlays.findIndex(x=>x.type==="onFiltersAge");r!=-1&&this.arrayFiltersPlays.splice(r,1)}if(e.hasOwnProperty("nationalities")&&this.fVnationalities.size!=e.nationalities.length&&this.fVnationalities.size>0){var _=this.arrayFiltersPlays.findIndex(b=>b.type==="onFiltersNationality");_!=-1?this.fVnationalities.size>0?this.arrayFiltersPlays[_].name=this.fVnationalities.size>1?this.fVnationalities.size+" Nacionalidades":"Nacionalidad "+U:this.arrayFiltersPlays.splice(_,1):this.arrayFiltersPlays.push({name:this.fVnationalities.size>1?this.fVnationalities.size+" Nacionalidades":"Nacionalidad "+U,type:"onFiltersNationality"})}},clickAll(e){},clickAllAll(e){},clickTeam(e){},clickTeamScouting(e){},resetFilterTeamAndPlayers(){this.filters={zone:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],playingAs:[1,2],sections:[1,2,3,4,5,6],matchResult:[1,2,3],arrayAgeRange:[1,60],typeZone:1,setNationalitiesIds:this.setNationalitiesIds,setPositionsIds:[1,2,3,4,5,6,7,8,9],setYear:this.FVYear,booleanAreNationalTeamsVisible:!1,setAvailableNationalTeamsPlayersIds:new Set}},async changeTabsGeneral(e){if(this.resetPredefinedTeamAll(),this.showfiltersPc=!0,this.optionSelected=e,this.optionSelectedSubmenu="Todas las jugadas",this.filtersPredefinedF={},this.categoryPredefinedActive=!1,this.categoryPredefined=0,e=="Equipos"&&(this.typeTable=1,this.isTeam=!0,this.updateTables+=1,this.rowScoutingData=[],this.arrayFiltersPlays=[],this.teamselect=0,this.resetFilterTeamAndPlayers(),this.resetScouting()),e=="Jugadores"&&(this.typeTable=0,this.isTeam=!1,this.teamselect=0,this.updateTables+=1,this.rowScoutingData=[],this.resetFilterTeamAndPlayers(),this.resetScouting()),e=="Scouting"){this.rowScoutingData=[],this.teamselect=0,this.arrayFiltersPlays=[];const o=await this.fetchTeamsScouting(this.currentSeasonId);this.teamsscouting=[];for(let s=0;s<o.teams.length;s++)this.teamsscouting.push({id:o.teams[s].team_id,team:o.teams[s].colloquial_name,logo:o.teams[s].logo});setTimeout(()=>{this.modifidFiltersFlag=!1},200),this.resetFilterTeamAndPlayers()}},resetPredefinedTeamAll(){var e=this.arrayFiltersPlays.findIndex(s=>s.type==="onFiltersPredefined");if(this.categoriesDefault.length>0&&e!==-1){this.categoryPredefinedActive=!1,this.categoryPredefined=0,this.FVfilterGolstats=[],this.filtersPredefinedF={},this.arrayFiltersPlays.splice(e,1);for(let s=0;s<this.categoriesDefault.length;s++)this.categoriesDefault[s].isSelected=!1;this.updateFilterPlaytypesGolstats+=1;var o=this.arrayFiltersPlays.findIndex(s=>s.type==="onFiltersPredefined");if(o!==-1){for(let s=0;s<this.FVfilterGolstats.length;s++)this.FVfilterGolstats[s].isSelected=!1;o!==-1&&this.arrayFiltersPlays.splice(o,1),this.updateFilterGolstats+=1}}},changeTabsSubmenu(e){e!="Predeterminados"?this.resetPredefinedTeamAll():this.arrayFiltersPlays=[],this.optionSelectedSubmenu=e},async fetchTournaments(){const e=pu.create({headers:{Authorization:`${this.token}`}}),o=this.$store.getters.getProviderId,s=this.$store.getters.getIsDevApis,{data:B}=await e.get(uu(this.tournamentsUrl,o,s));return B},async fetchTeams(){const e=pu.create({headers:{Authorization:`${this.token}`}}),o=this.$store.getters.getProviderId,s=this.$store.getters.getIsDevApis,{data:B}=await e.get(uu(this.teamsUrl+this.seasonActive,o,s));return B},async fetchTeamsScouting(e){const o=pu.create({headers:{Authorization:`${this.token}`}}),s=this.$store.getters.getProviderId,B=this.$store.getters.getIsDevApis,{data:U}=await o.get(uu(this.teamsUrl+e,s,B));return U},async getPredefinedfilters(e){this.arrayPredefinedFilters=[],this.arrayPredefinedOrigin=[];var o="";e.id==1?o=this.urlFilter:o=this.urlFilter;const s=pu.create({headers:{Authorization:`${this.token}`}}),{data:B}=await s.get(uu(o+e.id,this.$store.getters.getProviderId,this.$store.getters.getIsDevApis));if(Object.keys(B[0].match_lapse_combinations).forEach(_=>{this.predefinedFiltersMatchLapse[_.toString()]=B[0].match_lapse_combinations[_]}),Object.keys(B[0].playing_as_combinations).forEach(_=>{this.predefinedFiltersPlayingAs[_.toString()]=B[0].playing_as_combinations[_]}),Object.keys(B[0].field_sections_combinations).forEach(_=>{this.predefinedFiltersSections[_.toString()]=B[0].field_sections_combinations[_]}),B[0]){for(let _=0;_<B[0].filter_records.length;_++){var U=B[0].description;if(B[0].filter_records[_].field_sections!==void 0){const x=B[0].filter_records[_].field_sections.toString();(this.predefinedFiltersSections[x]||this.predefinedFiltersSections[x]=="")&&(this.predefinedFiltersSections[x]==""?U=U.replace(" [en {field_sections}]",this.predefinedFiltersSections[x]):U=U.replace("{field_sections}",this.predefinedFiltersSections[x]))}if(B[0].filter_records[_].match_lapse!==void 0){const x=B[0].filter_records[_].match_lapse.toString();(this.predefinedFiltersMatchLapse[x]||this.predefinedFiltersMatchLapse[x]=="")&&(this.predefinedFiltersMatchLapse[x]==""?U=U.replace(" [durante {match_lapse}]",this.predefinedFiltersMatchLapse[x]):U=U.replace("{match_lapse}",this.predefinedFiltersMatchLapse[x]))}if(B[0].filter_records[_].playing_as!==void 0){const x=B[0].filter_records[_].playing_as.toString();(this.predefinedFiltersPlayingAs[x]||this.predefinedFiltersPlayingAs[x]=="")&&(this.predefinedFiltersPlayingAs[x]==""?U=U.replace(" [jugando como {playing_as}]",this.predefinedFiltersPlayingAs[x]):U=U.replace("{playing_as}",this.predefinedFiltersPlayingAs[x]))}B[0].filter_records[_].section_type!==void 0&&(this.optionSelected=="Jugadores"?U=U.replace("{section_type}","Jugadores"):U=U.replace("{section_type}","Equipos")),U=U.replace(/\[/g,""),U=U.replace(/\]/g,""),U=U.replace("{category_name}",B[0].category_name);const b=U.split(": ");var m=b[1];m.length>129&&this.windowWidth>1358&&(m=m.substring(0,129),m=m+"<span id='showIDtootip' class='dots' style='width: 100px; height: 20px; background: red; z-index: 6;'>...</span>"),(!this.isCup||B[0].filter_records[_].playing_as.length===2)&&this.arrayPredefinedFilters.push({id:_,category_name:e.name,id_category:B[0].id,title:b[0]+":",text:b[1],textOrigin:B[0].description,titledots:m,filtersPredefined:{matchResult:B[0].filter_records[_].match_result,playingAs:B[0].filter_records[_].playing_as,sections:B[0].filter_records[_].match_lapse,type:this.optionSelected=="Equipos"?2:1,typeZone:B[0].type_zone,zone:B[0].filter_records[_].field_sections,end_age:0,start_age:0,nationalities:[],elegible:[],positions:[]}})}var y=[];for(let _=0;_<this.arrayPredefinedFilters.length;_++){var a=0,v=new Set,p={},r=this.arrayPredefinedFilters[_].text.replace(/\*.*?\*/,"");if(r=r.replace(/\*/g,""),r=r.replace(/ +/g," "),this.arrayPredefinedFilters[_].filtersPredefined.elegible.length>0&&(a+=1),(this.arrayPredefinedFilters[_].filtersPredefined.end_age.length!=0||this.arrayPredefinedFilters[_].filtersPredefined.start_age.length!=0)&&(a+=1),this.arrayPredefinedFilters[_].filtersPredefined.end_age!=0&&this.arrayPredefinedFilters[_].filtersPredefined.start_age!=0?p.arrayAgeRange=[this.arrayPredefinedFilters[_].filtersPredefined.start_age,this.arrayPredefinedFilters[_].filtersPredefined.end_age]:this.arrayPredefinedFilters[_].filtersPredefined.end_age==0&&this.arrayPredefinedFilters[_].filtersPredefined.start_age==0?p.arrayAgeRange=[1,60]:this.arrayPredefinedFilters[_].filtersPredefined.start_age!=0&&this.arrayPredefinedFilters[_].filtersPredefined.end_age==0?p.arrayAgeRange=[this.arrayPredefinedFilters[_].filtersPredefined.start_age,60]:p.arrayAgeRange=[1,this.arrayPredefinedFilters[_].filtersPredefined.end_age],this.arrayPredefinedFilters[_].filtersPredefined.matchResult.length!=3&&(a+=1),p.matchResult=this.arrayPredefinedFilters[_].filtersPredefined.matchResult,this.arrayPredefinedFilters[_].filtersPredefined.nationalities.length>0&&(a+=1),this.arrayPredefinedFilters[_].filtersPredefined.nationalities.length!=0){for(let b=0;b<this.arrayPredefinedFilters[_].filtersPredefined.nationalities.length;b++)v.add(this.arrayPredefinedFilters[_].filtersPredefined.nationalities[b]);p.setNationalitiesIds=v}else v.add(138),v.add(222),v.add(163),v.add(51),v.add(226),v.add(10),v.add(223),v.add(96),v.add(171),v.add(198),v.add(105),v.add(80),v.add(29),v.add(74),v.add(216),v.add(196),v.add(64),v.add(155),v.add(156),v.add(89),v.add(106),v.add(81),v.add(233),v.add(204),p.setNationalitiesIds=v;this.arrayPredefinedFilters[_].filtersPredefined.playingAs.length!=2&&(a+=1),p.playingAs=this.arrayPredefinedFilters[_].filtersPredefined.playingAs,this.arrayPredefinedFilters[_].filtersPredefined.positions.length>0&&(a+=1),this.arrayPredefinedFilters[_].filtersPredefined.positions.length>0?p.setPositionsIds=this.arrayPredefinedFilters[_].filtersPredefined.positions:p.setPositionsIds=[1,2,3,4,5,6,7,8,9],this.arrayPredefinedFilters[_].filtersPredefined.sections.length!=6&&(a+=1),this.arrayPredefinedFilters[_].filtersPredefined.sections.length>0?p.sections=this.arrayPredefinedFilters[_].filtersPredefined.sections:p.sections=[1,2,3,4,5,6],this.arrayPredefinedFilters[_].filtersPredefined.zone.length!=16&&(a+=1),this.arrayPredefinedFilters[_].filtersPredefined.zone.length>0?p.zone=this.arrayPredefinedFilters[_].filtersPredefined.zone:p.zone=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],p.typeZone=this.arrayPredefinedFilters[_].filtersPredefined.typeZone,y.push({id:_+1,name:r,isSelected:!1,value:a,filters:p})}this.FVfilterGolstats=y,this.updateFilterGolstats+=1,this.arrayPredefinedOrigin=JSON.parse(JSON.stringify(this.arrayPredefinedFilters))}},getTextFilterPredefinedCustom(){this.setDinamicFilters(this.filterEmitAux);var e=this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].textOrigin;const o=this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.zone.sort((r,_)=>r-_).toString();this.predefinedFiltersSections[o]||this.predefinedFiltersSections[o]==""?this.predefinedFiltersSections[o]==""?e=e.replace(" [en {field_sections}]",this.predefinedFiltersSections[o]):e=e.replace("{field_sections}",this.predefinedFiltersSections[o]):e=e.replace("{field_sections}",this.predefinedFiltersSections.other);var s=!1;this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.nationalities.size>0?this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.nationalities.size==this.setNationalityIds.size?(e=e.replace("[{nationality}]",""),e=e.replace("[de las nacionalidades y posiciones seleccionadas]",""),e=e.replace("[de las nacionalidades seleccionadas]","")):this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.nationalities.size==1?(e=e.replace("[{nationality}]",this.$t(`gentilicios[${[...this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.nationalities][0]}]`)),e=e.replace("[de las nacionalidades y posiciones seleccionadas]",""),e=e.replace("[de las nacionalidades seleccionadas]","")):this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.positions.size>0&&this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.positions.size!=this.setPositionsIds.size?(s=!0,e=e.replace("[{nationality}]",""),e=e.replace("[de las nacionalidades seleccionadas]","")):(e=e.replace("[{nationality}]",""),e=e.replace("[de las nacionalidades y posiciones seleccionadas]","")):(e=e.replace("[{nationality}]",""),e=e.replace("[de las nacionalidades y posiciones seleccionadas]",""),e=e.replace("[de las nacionalidades seleccionadas]","")),this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.nationalities.size>0?(s||this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.positions.size==this.setPositionsIds.size)&&(e=e.replace("[de las posiciones seleccionadas]","")):e=e.replace("[de las posiciones seleccionadas]",""),this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.start_age!=0&&this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.end_age!=0?this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.start_age!=this.arrayAgeRange[0]&&this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.end_age!=this.arrayAgeRange[1]?this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.start_age==this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.end_age?(e=e.replace("[de {min_age} a {max_age} años]",""),e=e.replace("[de {min_age} años]","[de "+this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.start_age+" años]")):(e=e.replace("[de {min_age} años]",""),e=e.replace("[de {min_age} a {max_age} años]","[de "+this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.start_age+" a "+this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.end_age+" años]")):this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.start_age!=this.arrayAgeRange[0]||this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.end_age!=this.arrayAgeRange[1]?this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.start_age==this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.end_age?(e=e.replace("[de {min_age} a {max_age} años]",""),e=e.replace("[de {min_age} años]","[de "+this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.start_age+" años]")):(e=e.replace("[de {min_age} años]",""),e=e.replace("[de {min_age} a {max_age} años]","[de "+this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.start_age+" a "+this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.end_age+" años]")):(e=e.replace("[de {min_age} a {max_age} años]",""),e=e.replace("[de {min_age} años]","")):(e=e.replace("[de {min_age} años]",""),e=e.replace("[de {min_age} a {max_age} años]",""));const B=this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.sections.sort().toString();if(this.predefinedFiltersMatchLapse[B]||this.predefinedFiltersMatchLapse[B]=="")this.predefinedFiltersMatchLapse[B]==""?e=e.replace(" [durante {match_lapse}]",this.predefinedFiltersMatchLapse[B]):e=e.replace("{match_lapse}",this.predefinedFiltersMatchLapse[B]);else{e=e.replace("{match_lapse}"," "+this.predefinedFiltersMatchLapse.other);var U="";B.includes(1)&&(U=U+"0-15, "),B.includes(2)&&(U=U+"16-30, "),B.includes(3)&&(U=U+"31-45, "),B.includes(4)&&(U=U+"46-60, "),B.includes(5)&&(U=U+"61-75, "),B.includes(6)&&(U=U+"76-90, "),U=U.slice(0,-2),U=U.replace(/,([^,]*)$/," y $1"),e=e.replace("{match_lapse_selected}",U)}const m=this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.playingAs.sort().toString();(this.predefinedFiltersPlayingAs[m]||this.predefinedFiltersPlayingAs[m]=="")&&(this.predefinedFiltersPlayingAs[m]==""?e=e.replace(" [jugando como {playing_as}]",this.predefinedFiltersPlayingAs[m]):e=e.replace("{playing_as}",this.predefinedFiltersPlayingAs[m])),this.typeSelected==1?this.getUser.tournament==1001?this.category.id==22?e=e.replace("{section_type}","Porteras"):e=e.replace("{section_type}","Jugadoras"):this.category.id==22?e=e.replace("{section_type}","Porteros"):e=e.replace("{section_type}","Jugadores"):e=e.replace("{section_type}","Equipos"),e=e.replace(/\[/g,""),e=e.replace(/\]/g,""),e=e.replace("{category_name}",this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].category_name);const y=e.split(": ");let a=y[1].charAt(0).toUpperCase()+y[1].toLowerCase().slice(1),v=y[1].charAt(0).toUpperCase()+y[1].toLowerCase().slice(1);this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].text=a,this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].title=y[0]+":";const p=v.match(/\*/g);if(p&&p.length)if(p.length%2===0)for(let r=1;r<=p.length;r++)r%2===0||(v=v.replace("*",'<span style="color: #ffff03" >'));else v=v.replaceAll("*","");this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].titledots=v},intervalidtops(e){this.$emit("intervalidtops",e)}},mounted(){sessionStorage.getItem("sidpdfil")!==null&&sessionStorage.setItem("sidpdfil",0),this.renderNext(),this.teamId!==0&&this.optionSelected!=="Scouting"&&this.clickTeam(this.teamId),this.defaultSection!=="Jugadores"&&(this.defaultSection==="Scouting"&&this.selectedSeason(this.currentSeasonId),this.changeTabsGeneral(this.defaultSection))},async created(){try{await this.loadTopsCategories(),await this.loadProductivityTranslation();const e=pu.create({headers:{"Content-Type":"application/json"}});e.interceptors.request.use(s=>(delete s.headers.Authorization,s));const o=await e.get(qy("https://golstats-microservices.s3.us-west-2.amazonaws.com/eligibles/elegibles.json",this.$store.getters.getProviderId),{headers:{"Content-Type":"application/json"}});this.elegibilidadArray=o.data,this.fVnationalities.add(138),this.fVnationalities.add(222),this.fVnationalities.add(163),this.fVnationalities.add(51),this.fVnationalities.add(226),this.fVnationalities.add(10),this.fVnationalities.add(223),this.fVnationalities.add(96),this.fVnationalities.add(171),this.fVnationalities.add(198),this.fVnationalities.add(105),this.fVnationalities.add(80),this.fVnationalities.add(29),this.fVnationalities.add(74),this.fVnationalities.add(216),this.fVnationalities.add(196),this.fVnationalities.add(64),this.fVnationalities.add(155),this.fVnationalities.add(156),this.fVnationalities.add(89),this.fVnationalities.add(106),this.fVnationalities.add(81),this.fVnationalities.add(233),this.fVnationalities.add(204)}catch(e){throw new Error(e)}}},_ht={ref:"myDivRefTopsFull"},xht={key:0,class:"overlay-loading"},wht={key:0,class:"cont-leyemd-multipleleagues"},kht={key:0,style:{"margin-left":"10px"}},Sht={key:3,style:{width:"100%",height:"295px"}};function Cht(e,o,s,B,U,m){t.resolveComponent("GSCTournamentSelect"),t.resolveComponent("GSCSeasonSelect");const y=t.resolveComponent("GscSwitchComponent"),a=t.resolveComponent("GSCFilterperteam"),v=t.resolveComponent("GSCFilters"),p=t.resolveComponent("GSCLabel"),r=t.resolveComponent("GSCTopCategory"),_=t.resolveComponent("GSCTableHeader"),b=t.resolveComponent("GSCRowTable"),x=t.resolveComponent("GSCExpandedInfo");return t.openBlock(),t.createElementBlock("div",_ht,[U.loadingActive?(t.openBlock(),t.createElementBlock("div",xht,o[8]||(o[8]=[t.createElementVNode("div",{class:"overlay-loading__spinner"},[t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/balon_liga.png",alt:""})],-1),t.createElementVNode("div",{class:"overlay-loading__text"},"Loading...",-1)]))):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(e.templateLosMejoresClass)},[t.createElementVNode("section",{class:t.normalizeClass(e.containerSectionClass),id:"container-section"},[t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(e.comdescubreVideosClass)},[t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(e.menuSectionParentHeaderClass)},[t.createCommentVNode("",!0),t.createCommentVNode("",!0)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.topFiltersParentClass)},[t.createElementVNode("div",{class:t.normalizeClass(e.topFiltersClass),id:"top-filters"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.teamBarParent)},[U.optionSelected!="Scouting"&&U.optionSelected!="Equipos"?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.teamBar),id:"team-bar"},[t.createVNode(a,{data:U.teams,"team-id":s.teamId,"background-color":"#172531","contain-border-radius":"8px",onClickTeam:m.clickTeam,onClickAll:m.clickAll},null,8,["data","team-id","onClickTeam","onClickAll"])],2)):t.createCommentVNode("",!0),t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerFilters),id:"container-filters",style:t.normalizeStyle(U.showfiltersPc?"":B.elementSize.width>760?"display: none;":"")},[t.createElementVNode("div",{class:t.normalizeClass(e.menuSectionClass),id:"menu-section"},[B.elementSize.width>760&&U.optionSelected!="Scouting"?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.closeFiltersPc),onClick:o[1]||(o[1]=(...h)=>m.clickCloseFilters&&m.clickCloseFilters(...h))},o[9]||(o[9]=[t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/todoelfut/icn_close.png",style:{width:"10px"}},null,-1)]),2)):t.createCommentVNode("",!0),U.optionSelected!=="Scouting"?(t.openBlock(),t.createBlock(y,{key:1,type:2,buttons:["Todas las jugadas","Predeterminados"],"font-family":"Poppins-Regular","selected-option":U.optionSelectedSubmenu,"font-size":e.sizeTabsFontMS,width:e.sizeTabsMS,arrow:!1,borderWidth:"1px","background-option-active":"#172531",background:"#172531",height:"28px",onInput:m.changeTabsSubmenu},null,8,["selected-option","font-size","width","onInput"])):t.createCommentVNode("",!0)],2),t.createCommentVNode("",!0),t.withDirectives(t.createElementVNode("div",{class:t.normalizeClass(e.$style.btnCloseFilters),style:t.normalizeStyle(U.optionSelected==="Scouting"?"margin-top: 4%; margin-left: 1%":""),onClick:o[3]||(o[3]=(...h)=>m.openMenuFilters&&m.openMenuFilters(...h))},null,6),[[t.vShow,B.elementSize.width<760&&U.openMenuMobil]]),t.withDirectives(t.createElementVNode("div",{class:t.normalizeClass(e.containerMenuClass),id:"container-menu"},[U.optionSelectedSubmenu=="Todas las jugadas"&&U.optionSelected!="Scouting"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[B.elementSize.width>0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.withDirectives(t.createVNode(v,t.mergeProps({"button-filter-props":m.filterButtonProps},B.elementSize.width<420?U.expansionPanelModePropsMobil270:B.elementSize.width<760?U.expansionPanelModePropsMobil:U.expansionPanelModeProps,{"filter-type":U.filtersTypes.PLAYS,"show-badge-on-filter-full":!1,"onUpdate:filters":m.onFiltersPlays,filters:U.categoriesPlaysTypes,onApply:m.applyFiltersBtn,"provider-id":e.$store.getters.getProviderId,"is-dev-apis":e.$store.getters.getIsDevApis}),null,16,["button-filter-props","filter-type","onUpdate:filters","filters","onApply","provider-id","is-dev-apis"]),[[t.vShow,!U.showFullTable]]),(t.openBlock(),t.createBlock(v,t.mergeProps({"button-filter-props":m.filterButtonProps},B.elementSize.width<420?U.expansionPanelModePropsMobil270:B.elementSize.width<760?U.expansionPanelModePropsMobil:U.expansionPanelModeProps,{key:U.updateFilterField,"filter-type":U.filtersTypes.FIELD,"show-badge-on-filter-full":!1,"onUpdate:filters":m.onFiltersField,filters:U.fVzone,"provider-id":e.$store.getters.getProviderId,"is-dev-apis":e.$store.getters.getIsDevApis}),null,16,["button-filter-props","filter-type","onUpdate:filters","filters","provider-id","is-dev-apis"])),t.createVNode(v,t.mergeProps({"button-filter-props":m.filterButtonProps},B.elementSize.width<420?U.expansionPanelModePropsMobil270:B.elementSize.width<760?U.expansionPanelModePropsMobil:U.expansionPanelModeProps,{"filter-type":U.filtersTypes.DETAILS,"show-badge-on-filter-full":!1,"onUpdate:filters":m.onFiltersDetails,filters:U.detailsObject,"provider-id":e.$store.getters.getProviderId,"is-dev-apis":e.$store.getters.getIsDevApis}),null,16,["button-filter-props","filter-type","onUpdate:filters","filters","provider-id","is-dev-apis"]),U.optionSelected==="Jugadores"?(t.openBlock(),t.createBlock(v,t.mergeProps({key:0,ref:"personalDataFilterPlayers","button-filter-props":m.filterButtonProps},B.elementSize.width<420?U.expansionPanelModePropsMobil270:B.elementSize.width<760?U.expansionPanelModePropsMobil:U.expansionPanelModeProps,{"filter-type":U.filtersTypes.PERSONAL_DATA,"show-badge-on-filter-full":!1,season:{id:s.seasonActive,tournamentId:U.tournamentSelectedObj.value},token:U.token,"onUpdate:filters":m.onFiltersData,"provider-id":e.$store.getters.getProviderId,"is-dev-apis":e.$store.getters.getIsDevApis}),null,16,["button-filter-props","filter-type","season","token","onUpdate:filters","provider-id","is-dev-apis"])):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0),U.optionSelected=="Scouting"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[B.elementSize.width>0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[(t.openBlock(),t.createBlock(v,t.mergeProps({"button-filter-props":m.filterButtonProps},B.elementSize.width<420?U.expansionPanelModePropsMobil270:B.elementSize.width<760?U.expansionPanelModePropsMobil:U.expansionPanelModeProps,{"filter-type":U.filtersTypes.TOURNAMENTS,"show-badge-on-filter-full":!1,filters:U.tournamentsToFilter,key:U.keyTournamentValue,"onUpdate:filters":m.onFiltersTournaments,"provider-id":e.$store.getters.getProviderId,"is-dev-apis":e.$store.getters.getIsDevApis}),null,16,["button-filter-props","filter-type","filters","onUpdate:filters","provider-id","is-dev-apis"])),t.createVNode(v,t.mergeProps({"button-filter-props":m.filterButtonProps},B.elementSize.width<420?U.expansionPanelModePropsMobil270:B.elementSize.width<760?U.expansionPanelModePropsMobil:U.expansionPanelModeProps,{"filter-type":U.filtersTypes.PERSONAL_DATA,"show-badge-on-filter-full":!1,season:{id:U.filterScounting.seasonId,tournamentId:U.filterScounting.tournaments[0]},ref:"personalDataFilter","onUpdate:filters":m.onFiltersPersonalData,"provider-id":e.$store.getters.getProviderId,"is-dev-apis":e.$store.getters.getIsDevApis}),null,16,["button-filter-props","filter-type","season","onUpdate:filters","provider-id","is-dev-apis"]),t.createVNode(v,t.mergeProps({"button-filter-props":m.filterButtonProps},B.elementSize.width<420?U.expansionPanelModePropsMobil270:B.elementSize.width<760?U.expansionPanelModePropsMobil:U.expansionPanelModeProps,{"filter-type":U.filtersTypes.UNIVERSE,"show-badge-on-filter-full":!1,filters:U.universeData,"onUpdate:filters":m.onFiltersUniverse,"provider-id":e.$store.getters.getProviderId,"is-dev-apis":e.$store.getters.getIsDevApis}),null,16,["button-filter-props","filter-type","filters","onUpdate:filters","provider-id","is-dev-apis"]),t.createVNode(v,t.mergeProps({"button-filter-props":m.filterButtonProps},B.elementSize.width<420?U.expansionPanelModePropsMobil270:B.elementSize.width<760?U.expansionPanelModePropsMobil:U.expansionPanelModeProps,{"filter-type":U.filtersTypes.PRODUCTIVITY,"show-badge-on-filter-full":!1,"onUpdate:filters":m.onFiltersProductivity,filters:U.detaildProductivityCategories,"provider-id":e.$store.getters.getProviderId,"is-dev-apis":e.$store.getters.getIsDevApis}),null,16,["button-filter-props","filter-type","onUpdate:filters","filters","provider-id","is-dev-apis"])],64)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(e.$style.BtnSearchScountingcom),onClick:o[4]||(o[4]=(...h)=>m.getScoutingData&&m.getScoutingData(...h))},"Buscar",2)],64)):t.createCommentVNode("",!0),U.optionSelectedSubmenu=="Predeterminados"&&U.optionSelected!="Scouting"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[(t.openBlock(),t.createBlock(v,t.mergeProps({"button-filter-props":m.filterButtonProps,modalHeight:"300px"},B.elementSize.width<420?U.expansionPanelModePropsMobil270:B.elementSize.width<760?U.expansionPanelModePropsMobil:U.expansionPanelModePropsTypePlays,{"filter-type":U.filtersTypes.PLAYS_TYPES,"show-badge-on-filter-full":!1,key:U.updateFilterPlaytypesGolstats,"onUpdate:filters":m.onFiltersPlaysTypes,filters:U.categoriesDefault,"provider-id":e.$store.getters.getProviderId,"is-dev-apis":e.$store.getters.getIsDevApis}),null,16,["button-filter-props","filter-type","onUpdate:filters","filters","provider-id","is-dev-apis"])),(t.openBlock(),t.createBlock(v,t.mergeProps({"button-filter-props":m.filterButtonProps,modalHeight:"300px"},B.elementSize.width<420?U.expansionPanelModePropsMobil270:B.elementSize.width<760?U.expansionPanelModePropsMobil:U.expansionPanelModeProps,{"filter-type":U.filtersTypes.GOLSTATS,"show-badge-on-filter-full":!1,key:U.updateFilterGolstats,"onUpdate:filters":m.onFiltersGolStats,filters:m.filterGolstats,"provider-id":e.$store.getters.getProviderId,"is-dev-apis":e.$store.getters.getIsDevApis}),null,16,["button-filter-props","filter-type","onUpdate:filters","filters","provider-id","is-dev-apis"]))],64)):t.createCommentVNode("",!0)],2),[[t.vShow,B.elementSize.width>760||U.openMenuMobil]]),U.optionSelected=="Scouting"?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.teamBar),id:"team-bar"},[U.filterScounting.tournaments.length>1&&U.rowScoutingData.length>0?(t.openBlock(),t.createElementBlock("div",wht,[o[10]||(o[10]=t.createElementVNode("img",{class:"img-leyemd-multipleleagues",src:"http://golstatsimages.blob.core.windows.net/images-library/icn-multiples-ligas.png"},null,-1)),t.createElementVNode("div",{class:t.normalizeClass(e.comextleyemdmultipleleaguesClass)}," El filtro por equipos solo se pude utilizar cuando se tiene maximo 1 liga seleccionada ",2)])):(t.openBlock(),t.createBlock(a,{data:U.teamsscouting,"team-id":U.teamselectrec,"background-color":"#172531","contain-border-radius":"8px",key:U.updateFilterTeamsScouting,onClickTeam:m.clickTeamScouting,onClickAll:m.clickAllAll},null,8,["data","team-id","onClickTeam","onClickAll"]))],2)):t.createCommentVNode("",!0)],6)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.containerTheBestClass),id:"container-the-best"},[t.createElementVNode("div",{class:t.normalizeClass(e.titleSectionClass)},[U.optionSelectedSubmenu!="Predeterminados"?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.commejoresJugadoresClass)},[U.arrayFiltersPlays.length>0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[U.optionSelected!="Scouting"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("Mejores jugadores: ")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("Jugadores más productivos: ")],64))],64)):t.createCommentVNode("",!0)],2)):t.createCommentVNode("",!0),U.optionSelected!="Scouting"&&U.optionSelectedSubmenu!="Predeterminados"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[U.showFullTable?(t.openBlock(),t.createElementBlock("div",kht,[t.createVNode(p,{"text-value":"Categoría - "+U.categoryName+" ","font-size":"11px","font-color":"rgba(255, 255, 255, 0.7)",onClickClose:m.deleteCategoryFilter,icon:"https://golstatsimages.blob.core.windows.net/todoelfut/icn_close.png","icon-size":"6px",height:"20px"},null,8,["text-value","onClickClose"])])):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(U.arrayFiltersPlays,(h,n)=>(t.openBlock(),t.createElementBlock("div",{key:n,style:{"margin-left":"10px"}},[t.createVNode(p,{"text-value":h.name+" ","font-size":"11px","font-color":"rgba(255, 255, 255, 0.7)",onClickClose:m.deleteLabelFilter,id:h.type,icon:"https://golstatsimages.blob.core.windows.net/todoelfut/icn_close.png","icon-size":"6px",height:B.elementSize.width<768?"auto":"20px"},null,8,["text-value","onClickClose","id","height"])]))),128)),U.rowScoutingData.length!=0||U.optionSelectedSubmenu=="Predeterminados"&&U.arrayFiltersPlays.findIndex(h=>h.type==="onFiltersPredefined")!==-1?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(e.comquitarFiltrosClass),onClick:o[5]||(o[5]=(...h)=>m.onClickDeleteFilter&&m.onClickDeleteFilter(...h))}," Quitar filtros ",2)):t.createCommentVNode("",!0),t.createCommentVNode("",!0)],2),s.seasonActive!=0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.containerTablesClass),id:"container-tables",style:t.normalizeStyle(U.showFullTable?"gap: 0px!important;":"")},[U.optionSelected!=="Scouting"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[U.optionSelectedSubmenu=="Todas las jugadas"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(U.categoriesDefault,(h,n)=>(t.openBlock(),t.createElementBlock("div",{key:h.id,style:t.normalizeStyle(!U.showOnlyCategories&&U.arrayCategoryFilter.includes(h.id)?"":"display:none !important;")},[t.withDirectives(t.createElementVNode("div",{class:t.normalizeClass(e.toniKroosWrapperClass)},[(t.openBlock(),t.createBlock(r,{"is-widget":s.isWidget,"team-widget":s.teamWidget,"time-live-comparative-avanced":s.timeLiveComparativeAvanced,"is-team":U.isTeam,onMore:m.onShowFullTable,"border-width":0,onIntervalidtops:m.intervalidtops,"can-play-videos":s.canPlayVideos,"border-radius":"12px","game-id":s.gameId,game:s.game,typeData:s.typeData,"filters-prop":m.filterChange,category:h.id,"type-table":U.typeTable,categoryName:h.name,"season-selected":s.seasonSelected,season:s.seasonActive,"filter-team":s.teamselect,key:U.updateTables,onClickprofile:m.clickprofile,onSetopenmedia:m.setOpenMedia},null,8,["is-widget","team-widget","time-live-comparative-avanced","is-team","onMore","onIntervalidtops","can-play-videos","game-id","game","typeData","filters-prop","category","type-table","categoryName","season-selected","season","filter-team","onClickprofile","onSetopenmedia"]))],2),[[t.vShow,!U.showOnlyCategories&&U.arrayCategoryFilter.includes(h.id)&&!U.showFullTable]])],4))),128)),U.showFullTable?(t.openBlock(),t.createBlock(r,{"time-live-comparative-avanced":s.timeLiveComparativeAvanced,"is-team":U.isTeam,"is-widget":s.isWidget,"team-widget":s.teamWidget,"border-width":0,"border-radius":"12px","game-id":s.gameId,onIntervalidtops:m.intervalidtops,game:s.game,typeData:s.typeData,category:U.showFullCategory,type:1,"type-table":U.typeTable,categoryName:"","filters-prop":m.filterChange,"season-selected":s.seasonSelected,season:s.seasonActive,"filter-team":s.teamselect,key:U.updateTablesfull,onClickprofile:m.clickprofile,onSetopenmedia:m.setOpenMedia},null,8,["time-live-comparative-avanced","is-team","is-widget","team-widget","game-id","onIntervalidtops","game","typeData","category","type-table","filters-prop","season-selected","season","filter-team","onClickprofile","onSetopenmedia"])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[U.categoryPredefinedActive?(t.openBlock(),t.createBlock(r,{"is-widget":s.isWidget,"team-widget":s.teamWidget,"is-team":U.isTeam,"time-live-comparative-avanced":s.timeLiveComparativeAvanced,onIntervalidtops:m.intervalidtops,"border-width":0,"border-radius":"12px","can-play-videos":s.canPlayVideos,"game-id":s.gameId,game:s.game,typeData:s.typeData,category:U.categoryPredefined,type:1,"type-table":U.typeTable,categoryName:"","filters-prop":m.filterChangePredefined,"season-selected":s.seasonSelected,season:s.seasonActive,"filter-team":s.teamselect,key:U.updateTables,onClickprofile:m.clickprofile,onSetopenmedia:m.setOpenMedia},null,8,["is-widget","team-widget","is-team","time-live-comparative-avanced","onIntervalidtops","can-play-videos","game-id","game","typeData","category","type-table","filters-prop","season-selected","season","filter-team","onClickprofile","onSetopenmedia"])):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.containerPredefinedcom)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.titleContainerPredefinedcom)},[U.arrayFiltersPlays.length==0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("No has seleccionado ningún filtro")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("No existen resultados")],64))],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.subtitleContainerPredefinedcom)},[U.arrayFiltersPlays.length==0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("Para visualizar resultados selecciona un")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("No existen resultados con los filtros")],64))],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.subtitleContainerPredefinedcom)},[U.arrayFiltersPlays.length==0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[o[12]||(o[12]=t.createElementVNode("span",null,"Tipo de Jugada",-1)),o[13]||(o[13]=t.createTextVNode(" y un ")),o[14]||(o[14]=t.createElementVNode("span",null,"Filtro GolStats",-1)),o[15]||(o[15]=t.createTextVNode(" en la"))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("que has seleccionado.")],64))],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.subtitleContainerPredefinedcom)},[U.arrayFiltersPlays.length==0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("parte superior.")],64)):t.createCommentVNode("",!0)],2)],2))],64))],64)):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.containerPredefinedScountingcom),style:t.normalizeStyle(U.rowScoutingData.length>0?"height: auto;":"")},[U.loadingActive?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[U.rowScoutingData.length>0?(t.openBlock(),t.createBlock(_,{key:0,background:"#183143",type:2})):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(U.rowScoutingData,(h,n)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:n},[U.teamselectrec==0||U.teamselectrec==h.team_id?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createVNode(b,{type:2,"is-expanded":U.playerexpand==h.id&&U.expand,onMediadata:m.setMediaData,data:{position:h.position,player_name:h.player_name,player_photo:h.player_photo,total:h.total,id:h.id,player_age:h.player_age,team_abrev:h.team_abrev,team_logo:h.team_logo,player_position:U.positions[h.player_position-1].fullname,player_country_flag:h.player_country_flag,player_games:h.player_games,player_min:h.player_min,league_name:h.league_name,seasons:h.seasons,season_id:h.season_id},height:"71px",background:n%2===0?s.backgroundOdd:s.backgroundEven,onExpand:m.clickexpand},null,8,["is-expanded","onMediadata","data","background","onExpand"]),U.expand&&U.playerexpand==h.id?(t.openBlock(),t.createBlock(x,{key:0,type:0,"view-effectiveness":!1,viewGoals:!1,additionalClass:"fullTable",data:{teams:h.team_name,age:h.player_age,dataofbirth:h.date,nationality:h.nationality_name,countryFlag:h.player_country_flag,position:U.positions[h.player_position-1].name,games:h.player_games,min:h.player_min,goals:h.total,effectiveness:"-",category:"total",id:h.id},onViewprofile:i=>m.viewprofile(i,h.season_id,h.team_id),background:n%2===0?s.backgroundOdd:s.backgroundEven},null,8,["data","onViewprofile","background"])):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0)],64))),128))],64)),U.rowScoutingData.length==0&&!U.loadingActive?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.btnLeyendTxtcom)},' Haz click en "Buscar" para aplicar tus filtros ',2)):t.createCommentVNode("",!0),U.rowScoutingData.length==0&&!U.loadingActive?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(e.$style.containerScountingBtncom)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.btnDeleteAplicacom),onClick:o[6]||(o[6]=(...h)=>m.onClickDeleteFilter&&m.onClickDeleteFilter(...h))}," Eliminar filtros aplicados ",2),U.rowScoutingData.length==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.SearchBtnBarcom),onClick:o[7]||(o[7]=(...h)=>m.getScoutingData&&m.getScoutingData(...h))}," Buscar ",2)):t.createCommentVNode("",!0)],2)):t.createCommentVNode("",!0),U.loadingActive?(t.openBlock(),t.createElementBlock("div",Sht)):t.createCommentVNode("",!0)],6))],6)):t.createCommentVNode("",!0)],2)],2)],2)],2)],512)}const Tht=Ki(bht,[["render",Cht],["__cssModules",{$style:yht}]]),zta="";let AV=null;const Aht={components:{GSCDatosGSMain:Nct,GSCCheckbox:j1,GSCRadioToggle:dF,GSCTopFull:Tht},props:{isWidget:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},timeLiveComparativeBestPlayers:{type:Number,default:6e4},timeLiveComparativeAvanced:{type:Number,default:6e4},seasonSelected:{type:Object,default:()=>({})},tournamentSelected:{type:Object,default:()=>({})},tournamentSelectProps:{type:Object,default:null},game:{type:Object,default:()=>{}},playVideosPrivileges:{type:Object,default:null},canPlayVideos:{type:Boolean,default:!1},isFemaleMode:{type:Boolean,default:!1}},data(){return{updateHomeCheck:0,updateAwayCheck:0,activeSection:"destacados",widthSection:0,teamactive:0,update:0,homeTeamCheck:!0,awayTeamCheck:!0,typeViewData:1}},watch:{game:{deep:!0,immediate:!0,handler(e){e&&(e.game_status==1||e.is_live==1||e.game_status==0?this.typeViewData=1:this.typeViewData=0),this.update+=1}}},computed:{},methods:{preventChange(e){e.preventDefault(),this.homeTeamCheck=!0},intervalidgs(e){this.$emit("intervalidgs",e)},onOpenProfileTeam(e){this.$emit("openProfileTeam",e)},intervalidtops(e){this.$emit("intervalidtops",e)},onOpenProfilePlayer(e){this.$emit("onOpenProfile",e)},ChangeRadio(e){typeof e=="string"&&(e==="Este partido"?this.typeViewData=1:this.typeViewData=0)},onCheckInactiveHome(e){e?(this.homeTeamCheck=!0,this.awayTeamCheck?this.teamactive=0:this.teamactive=this.game.homeTeam.team_id):this.awayTeamCheck?(this.homeTeamCheck=!1,this.teamactive=this.game.awayTeam.team_id):(this.updateHomeCheck+=1,this.homeTeamCheck=!0,this.teamactive=this.game.homeTeam.team_id)},onCheckInactiveAway(e){e?(this.awayTeamCheck=!0,this.homeTeamCheck?this.teamactive=0:this.teamactive=this.game.awayTeam.team_id):this.homeTeamCheck?(this.awayTeamCheck=!1,this.teamactive=this.game.homeTeam.team_id):(this.updateAwayCheck+=1,this.teamactive=this.game.awayTeam.team_id,this.awayTeamCheck=!0)},setUpResizeObserver(){if(window.ResizeObserver)AV=new ResizeObserver(()=>{this.widthSection=this.$refs.comparative.clientWidth}),AV.observe(this.$refs.comparative);else throw new Error("Resize observer not supported!")},clickOptSection(e){this.activeSection=e},openmedia(e){this.typeViewData===1?(e.gameIdsToFilter=[this.game.gameId],this.$emit("openmedia",e)):(e.isLiveAccumulated=!0,this.$emit("openmedia",e))}},async mounted(){setTimeout(()=>{this.setUpResizeObserver()},1e3)}},Eht={class:"container-comparative",ref:"comparative"},Mht={class:"container-btn"},Iht={class:"items-container-btn"},Pht={class:"container-sections"},Lht={key:0,class:"container-teams-menu"},Bht={class:"container-team-menu-home"},zht=["src"],Oht={class:"container-team-menu-away"},Dht=["src"],Nht={key:1,class:"container-switch-menu"},Fht={class:"container-leyend"},Rht={class:"container-tops"};function Vht(e,o,s,B,U,m){const y=t.resolveComponent("GSCDatosGSMain"),a=t.resolveComponent("GSCCheckbox"),v=t.resolveComponent("GSCRadioToggle"),p=t.resolveComponent("GSCTopFull");return t.openBlock(),t.createElementBlock("div",Eht,[t.createElementVNode("div",Mht,[t.createElementVNode("div",Iht,[t.createElementVNode("div",{class:t.normalizeClass([U.widthSection>480?"btn-destacados":"btn-destacados-movil",U.activeSection=="destacados"?"active":""]),onClick:o[0]||(o[0]=r=>m.clickOptSection("destacados"))},[s.game.status==1||s.game.is_live==1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[s.tournamentSelected.is_female==1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("Jugadoras destacadas")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("Jugadores destacados")],64))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("General")],64))],2),t.createElementVNode("div",{class:t.normalizeClass([U.widthSection>480?"btn-avanced":"btn-avanced-movil",U.activeSection=="avanzado"?"active":""]),onClick:o[1]||(o[1]=r=>m.clickOptSection("avanzado"))}," Avanzado ",2)])]),t.createElementVNode("div",Pht,[U.activeSection=="destacados"?(t.openBlock(),t.createBlock(y,{key:0,"is-widget":s.isWidget,"team-widget":s.teamWidget,"tournament-selected":s.tournamentSelected,"time-live-comparative-best-players":s.timeLiveComparativeBestPlayers,game:s.game,"play-videos-privileges":s.playVideosPrivileges,onOpenmedia:m.openmedia,onIntervalidgs:m.intervalidgs},null,8,["is-widget","team-widget","tournament-selected","time-live-comparative-best-players","game","play-videos-privileges","onOpenmedia","onIntervalidgs"])):t.createCommentVNode("",!0),U.activeSection=="avanzado"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[s.isWidget?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Lht,[t.createElementVNode("div",Bht,[(t.openBlock(),t.createBlock(a,{fontFamily:"Poppins-Regular","onUpdate:modelValue":m.onCheckInactiveHome,"label-color":"#8c9399",width:"25",key:U.updateHomeCheck,"model-value":U.homeTeamCheck,height:"25",style:{"margin-top":"-4px"}},null,8,["onUpdate:modelValue","model-value"])),t.createElementVNode("img",{class:"img-teams-selector-home",width:"23",src:s.game.homeTeam.logo},null,8,zht),t.createElementVNode("div",{class:t.normalizeClass(U.widthSection>390?"label-team-home":"label-team-home-movil")},t.toDisplayString(s.game.homeTeam.colloquial_name),3)]),o[2]||(o[2]=t.createElementVNode("div",{class:"container-team-menu-separator"},null,-1)),t.createElementVNode("div",Oht,[t.createElementVNode("div",{class:t.normalizeClass(U.widthSection>390?"label-team-away":"label-team-away-movil")},t.toDisplayString(s.game.awayTeam.colloquial_name),3),t.createElementVNode("img",{class:"img-teams-selector-away",width:"23",src:s.game.awayTeam.logo},null,8,Dht),(t.openBlock(),t.createBlock(a,{fontFamily:"Poppins-Regular","onUpdate:modelValue":m.onCheckInactiveAway,"label-color":"#8c9399",width:"25",key:U.updateAwayCheck,"model-value":U.awayTeamCheck,height:"25",style:{"margin-top":"-4px"}},null,8,["onUpdate:modelValue","model-value"]))])])),s.game.is_live||s.game.status===1||s.game.status===0?(t.openBlock(),t.createElementBlock("div",Nht,[t.createVNode(v,{height:"20px",width:"41px","background-color":"none","width-circle":"15px","height-circle":"15px","circle-color-switch":"#CBEE6B","font-color":"#ffffff","value-default":U.typeViewData==1?"Este partido":"Acumulado",textOptionLeft:"Este partido",textOptionRight:"Acumulado",onChange:m.ChangeRadio},null,8,["value-default","onChange"])])):t.createCommentVNode("",!0),t.createElementVNode("div",Fht,[U.typeViewData==1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(" Jugadas destacadas durante este partido ")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[s.game.status==1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(" Jugadas destacadas durante el torneo ")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[s.tournamentSelected.is_female==1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("Jugadoras destacadas durante lo que va del torneo")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("Jugadores destacados durante lo que va del torneo")],64))],64))],64))]),t.createElementVNode("div",Rht,[t.createVNode(p,{"is-widget":s.isWidget,"team-widget":s.teamWidget,"tournament-select-props":s.tournamentSelectProps,"time-live-comparative-avanced":s.timeLiveComparativeAvanced,"can-play-videos":s.canPlayVideos,onOpenmedia:m.openmedia,onOpenProfileTeam:m.onOpenProfileTeam,onIntervalidtops:m.intervalidtops,onOpenProfilePlayer:m.onOpenProfilePlayer,"type-data":U.typeViewData,"game-id":s.game.gameId,game:s.game,"current-season-id":s.game.seasonId,"team-id":U.teamactive,"season-active":s.game.seasonId,"season-selected":s.seasonSelected,teamselect:U.teamactive,"is-female-mode":s.isFemaleMode},null,8,["is-widget","team-widget","tournament-select-props","time-live-comparative-avanced","can-play-videos","onOpenmedia","onOpenProfileTeam","onIntervalidtops","onOpenProfilePlayer","type-data","game-id","game","current-season-id","team-id","season-active","season-selected","teamselect","is-female-mode"])])],64)):t.createCommentVNode("",!0)])],512)}const jht=Ki(Aht,[["render",Vht],["__scopeId","data-v-e09a9fa2"]]);var Uht=Object.defineProperty,Ght=(e,o,s)=>o in e?Uht(e,o,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[o]=s,$S=(e,o,s)=>Ght(e,typeof o!="symbol"?o+"":o,s);function EV(e,o){return function(){return e.apply(o,arguments)}}const{toString:Hht}=Object.prototype,{getPrototypeOf:KS}=Object,{iterator:d4,toStringTag:MV}=Symbol,h4=(e=>o=>{const s=Hht.call(o);return e[s]||(e[s]=s.slice(8,-1).toLowerCase())})(Object.create(null)),Kf=e=>(e=e.toLowerCase(),o=>h4(o)===e),p4=e=>o=>typeof o===e,{isArray:Rv}=Array,Ub=p4("undefined");function Zht(e){return e!==null&&!Ub(e)&&e.constructor!==null&&!Ub(e.constructor)&&Cp(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const IV=Kf("ArrayBuffer");function Wht(e){let o;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?o=ArrayBuffer.isView(e):o=e&&e.buffer&&IV(e.buffer),o}const qht=p4("string"),Cp=p4("function"),PV=p4("number"),f4=e=>e!==null&&typeof e=="object",Jht=e=>e===!0||e===!1,m4=e=>{if(h4(e)!=="object")return!1;const o=KS(e);return(o===null||o===Object.prototype||Object.getPrototypeOf(o)===null)&&!(MV in e)&&!(d4 in e)},Yht=Kf("Date"),Xht=Kf("File"),$ht=Kf("Blob"),Kht=Kf("FileList"),Qht=e=>f4(e)&&Cp(e.pipe),ept=e=>{let o;return e&&(typeof FormData=="function"&&e instanceof FormData||Cp(e.append)&&((o=h4(e))==="formdata"||o==="object"&&Cp(e.toString)&&e.toString()==="[object FormData]"))},tpt=Kf("URLSearchParams"),[apt,rpt,npt,ipt]=["ReadableStream","Request","Response","Headers"].map(Kf),opt=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Gb(e,o,{allOwnKeys:s=!1}={}){if(e===null||typeof e>"u")return;let B,U;if(typeof e!="object"&&(e=[e]),Rv(e))for(B=0,U=e.length;B<U;B++)o.call(null,e[B],B,e);else{const m=s?Object.getOwnPropertyNames(e):Object.keys(e),y=m.length;let a;for(B=0;B<y;B++)a=m[B],o.call(null,e[a],a,e)}}function LV(e,o){o=o.toLowerCase();const s=Object.keys(e);let B=s.length,U;for(;B-- >0;)if(U=s[B],o===U.toLowerCase())return U;return null}const pg=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,BV=e=>!Ub(e)&&e!==pg;function QS(){const{caseless:e}=BV(this)&&this||{},o={},s=(B,U)=>{const m=e&&LV(o,U)||U;m4(o[m])&&m4(B)?o[m]=QS(o[m],B):m4(B)?o[m]=QS({},B):Rv(B)?o[m]=B.slice():o[m]=B};for(let B=0,U=arguments.length;B<U;B++)arguments[B]&&Gb(arguments[B],s);return o}const spt=(e,o,s,{allOwnKeys:B}={})=>(Gb(o,(U,m)=>{s&&Cp(U)?e[m]=EV(U,s):e[m]=U},{allOwnKeys:B}),e),lpt=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),cpt=(e,o,s,B)=>{e.prototype=Object.create(o.prototype,B),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:o.prototype}),s&&Object.assign(e.prototype,s)},upt=(e,o,s,B)=>{let U,m,y;const a={};if(o=o||{},e==null)return o;do{for(U=Object.getOwnPropertyNames(e),m=U.length;m-- >0;)y=U[m],(!B||B(y,e,o))&&!a[y]&&(o[y]=e[y],a[y]=!0);e=s!==!1&&KS(e)}while(e&&(!s||s(e,o))&&e!==Object.prototype);return o},dpt=(e,o,s)=>{e=String(e),(s===void 0||s>e.length)&&(s=e.length),s-=o.length;const B=e.indexOf(o,s);return B!==-1&&B===s},hpt=e=>{if(!e)return null;if(Rv(e))return e;let o=e.length;if(!PV(o))return null;const s=new Array(o);for(;o-- >0;)s[o]=e[o];return s},ppt=(e=>o=>e&&o instanceof e)(typeof Uint8Array<"u"&&KS(Uint8Array)),fpt=(e,o)=>{const s=(e&&e[d4]).call(e);let B;for(;(B=s.next())&&!B.done;){const U=B.value;o.call(e,U[0],U[1])}},mpt=(e,o)=>{let s;const B=[];for(;(s=e.exec(o))!==null;)B.push(s);return B},gpt=Kf("HTMLFormElement"),ypt=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(o,s,B){return s.toUpperCase()+B}),zV=(({hasOwnProperty:e})=>(o,s)=>e.call(o,s))(Object.prototype),vpt=Kf("RegExp"),OV=(e,o)=>{const s=Object.getOwnPropertyDescriptors(e),B={};Gb(s,(U,m)=>{let y;(y=o(U,m,e))!==!1&&(B[m]=y||U)}),Object.defineProperties(e,B)},bpt=e=>{OV(e,(o,s)=>{if(Cp(e)&&["arguments","caller","callee"].indexOf(s)!==-1)return!1;const B=e[s];if(Cp(B)){if(o.enumerable=!1,"writable"in o){o.writable=!1;return}o.set||(o.set=()=>{throw Error("Can not rewrite read-only method '"+s+"'")})}})},_pt=(e,o)=>{const s={},B=U=>{U.forEach(m=>{s[m]=!0})};return Rv(e)?B(e):B(String(e).split(o)),s},xpt=()=>{},wpt=(e,o)=>e!=null&&Number.isFinite(e=+e)?e:o;function kpt(e){return!!(e&&Cp(e.append)&&e[MV]==="FormData"&&e[d4])}const Spt=e=>{const o=new Array(10),s=(B,U)=>{if(f4(B)){if(o.indexOf(B)>=0)return;if(!("toJSON"in B)){o[U]=B;const m=Rv(B)?[]:{};return Gb(B,(y,a)=>{const v=s(y,U+1);!Ub(v)&&(m[a]=v)}),o[U]=void 0,m}}return B};return s(e,0)},Cpt=Kf("AsyncFunction"),Tpt=e=>e&&(f4(e)||Cp(e))&&Cp(e.then)&&Cp(e.catch),DV=((e,o)=>e?setImmediate:o?((s,B)=>(pg.addEventListener("message",({source:U,data:m})=>{U===pg&&m===s&&B.length&&B.shift()()},!1),U=>{B.push(U),pg.postMessage(s,"*")}))(`axios@${Math.random()}`,[]):s=>setTimeout(s))(typeof setImmediate=="function",Cp(pg.postMessage)),Apt=typeof queueMicrotask<"u"?queueMicrotask.bind(pg):typeof process<"u"&&process.nextTick||DV,Ept=e=>e!=null&&Cp(e[d4]),On={isArray:Rv,isArrayBuffer:IV,isBuffer:Zht,isFormData:ept,isArrayBufferView:Wht,isString:qht,isNumber:PV,isBoolean:Jht,isObject:f4,isPlainObject:m4,isReadableStream:apt,isRequest:rpt,isResponse:npt,isHeaders:ipt,isUndefined:Ub,isDate:Yht,isFile:Xht,isBlob:$ht,isRegExp:vpt,isFunction:Cp,isStream:Qht,isURLSearchParams:tpt,isTypedArray:ppt,isFileList:Kht,forEach:Gb,merge:QS,extend:spt,trim:opt,stripBOM:lpt,inherits:cpt,toFlatObject:upt,kindOf:h4,kindOfTest:Kf,endsWith:dpt,toArray:hpt,forEachEntry:fpt,matchAll:mpt,isHTMLForm:gpt,hasOwnProperty:zV,hasOwnProp:zV,reduceDescriptors:OV,freezeMethods:bpt,toObjectSet:_pt,toCamelCase:ypt,noop:xpt,toFiniteNumber:wpt,findKey:LV,global:pg,isContextDefined:BV,isSpecCompliantForm:kpt,toJSONObject:Spt,isAsyncFn:Cpt,isThenable:Tpt,setImmediate:DV,asap:Apt,isIterable:Ept};function kl(e,o,s,B,U){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",o&&(this.code=o),s&&(this.config=s),B&&(this.request=B),U&&(this.response=U,this.status=U.status?U.status:null)}On.inherits(kl,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:On.toJSONObject(this.config),code:this.code,status:this.status}}});const NV=kl.prototype,FV={};["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(e=>{FV[e]={value:e}}),Object.defineProperties(kl,FV),Object.defineProperty(NV,"isAxiosError",{value:!0}),kl.from=(e,o,s,B,U,m)=>{const y=Object.create(NV);return On.toFlatObject(e,y,function(a){return a!==Error.prototype},a=>a!=="isAxiosError"),kl.call(y,e.message,o,s,B,U),y.cause=e,y.name=e.name,m&&Object.assign(y,m),y};const Mpt=null;function eC(e){return On.isPlainObject(e)||On.isArray(e)}function RV(e){return On.endsWith(e,"[]")?e.slice(0,-2):e}function VV(e,o,s){return e?e.concat(o).map(function(B,U){return B=RV(B),!s&&U?"["+B+"]":B}).join(s?".":""):o}function Ipt(e){return On.isArray(e)&&!e.some(eC)}const Ppt=On.toFlatObject(On,{},null,function(e){return/^is[A-Z]/.test(e)});function g4(e,o,s){if(!On.isObject(e))throw new TypeError("target must be an object");o=o||new FormData,s=On.toFlatObject(s,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,h){return!On.isUndefined(h[x])});const B=s.metaTokens,U=s.visitor||p,m=s.dots,y=s.indexes,a=(s.Blob||typeof Blob<"u"&&Blob)&&On.isSpecCompliantForm(o);if(!On.isFunction(U))throw new TypeError("visitor must be a function");function v(x){if(x===null)return"";if(On.isDate(x))return x.toISOString();if(On.isBoolean(x))return x.toString();if(!a&&On.isBlob(x))throw new kl("Blob is not supported. Use a Buffer instead.");return On.isArrayBuffer(x)||On.isTypedArray(x)?a&&typeof Blob=="function"?new Blob([x]):Buffer.from(x):x}function p(x,h,n){let i=x;if(x&&!n&&typeof x=="object"){if(On.endsWith(h,"{}"))h=B?h:h.slice(0,-2),x=JSON.stringify(x);else if(On.isArray(x)&&Ipt(x)||(On.isFileList(x)||On.endsWith(h,"[]"))&&(i=On.toArray(x)))return h=RV(h),i.forEach(function(c,l){!(On.isUndefined(c)||c===null)&&o.append(y===!0?VV([h],l,m):y===null?h:h+"[]",v(c))}),!1}return eC(x)?!0:(o.append(VV(n,h,m),v(x)),!1)}const r=[],_=Object.assign(Ppt,{defaultVisitor:p,convertValue:v,isVisitable:eC});function b(x,h){if(!On.isUndefined(x)){if(r.indexOf(x)!==-1)throw Error("Circular reference detected in "+h.join("."));r.push(x),On.forEach(x,function(n,i){(!(On.isUndefined(n)||n===null)&&U.call(o,n,On.isString(i)?i.trim():i,h,_))===!0&&b(n,h?h.concat(i):[i])}),r.pop()}}if(!On.isObject(e))throw new TypeError("data must be an object");return b(e),o}function jV(e){const o={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(s){return o[s]})}function tC(e,o){this._pairs=[],e&&g4(e,this,o)}const UV=tC.prototype;UV.append=function(e,o){this._pairs.push([e,o])},UV.toString=function(e){const o=e?function(s){return e.call(this,s,jV)}:jV;return this._pairs.map(function(s){return o(s[0])+"="+o(s[1])},"").join("&")};function Lpt(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function GV(e,o,s){if(!o)return e;const B=s&&s.encode||Lpt;On.isFunction(s)&&(s={serialize:s});const U=s&&s.serialize;let m;if(U?m=U(o,s):m=On.isURLSearchParams(o)?o.toString():new tC(o,s).toString(B),m){const y=e.indexOf("#");y!==-1&&(e=e.slice(0,y)),e+=(e.indexOf("?")===-1?"?":"&")+m}return e}let HV=class{constructor(){this.handlers=[]}use(o,s,B){return this.handlers.push({fulfilled:o,rejected:s,synchronous:B?B.synchronous:!1,runWhen:B?B.runWhen:null}),this.handlers.length-1}eject(o){this.handlers[o]&&(this.handlers[o]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(o){On.forEach(this.handlers,function(s){s!==null&&o(s)})}};const ZV={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Bpt=typeof URLSearchParams<"u"?URLSearchParams:tC,zpt=typeof FormData<"u"?FormData:null,Opt=typeof Blob<"u"?Blob:null,Dpt={isBrowser:!0,classes:{URLSearchParams:Bpt,FormData:zpt,Blob:Opt},protocols:["http","https","file","blob","url","data"]},aC=typeof window<"u"&&typeof document<"u",rC=typeof navigator=="object"&&navigator||void 0,Npt=aC&&(!rC||["ReactNative","NativeScript","NS"].indexOf(rC.product)<0),Fpt=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Rpt=aC&&window.location.href||"http://localhost",Vpt=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:aC,hasStandardBrowserEnv:Npt,hasStandardBrowserWebWorkerEnv:Fpt,navigator:rC,origin:Rpt},Symbol.toStringTag,{value:"Module"})),Bh={...Vpt,...Dpt};function jpt(e,o){return g4(e,new Bh.classes.URLSearchParams,Object.assign({visitor:function(s,B,U,m){return Bh.isNode&&On.isBuffer(s)?(this.append(B,s.toString("base64")),!1):m.defaultVisitor.apply(this,arguments)}},o))}function Upt(e){return On.matchAll(/\w+|\[(\w*)]/g,e).map(o=>o[0]==="[]"?"":o[1]||o[0])}function Gpt(e){const o={},s=Object.keys(e);let B;const U=s.length;let m;for(B=0;B<U;B++)m=s[B],o[m]=e[m];return o}function WV(e){function o(s,B,U,m){let y=s[m++];if(y==="__proto__")return!0;const a=Number.isFinite(+y),v=m>=s.length;return y=!y&&On.isArray(U)?U.length:y,v?(On.hasOwnProp(U,y)?U[y]=[U[y],B]:U[y]=B,!a):((!U[y]||!On.isObject(U[y]))&&(U[y]=[]),o(s,B,U[y],m)&&On.isArray(U[y])&&(U[y]=Gpt(U[y])),!a)}if(On.isFormData(e)&&On.isFunction(e.entries)){const s={};return On.forEachEntry(e,(B,U)=>{o(Upt(B),U,s,0)}),s}return null}function Hpt(e,o,s){if(On.isString(e))try{return(o||JSON.parse)(e),On.trim(e)}catch(B){if(B.name!=="SyntaxError")throw B}return(s||JSON.stringify)(e)}const Hb={transitional:ZV,adapter:["xhr","http","fetch"],transformRequest:[function(e,o){const s=o.getContentType()||"",B=s.indexOf("application/json")>-1,U=On.isObject(e);if(U&&On.isHTMLForm(e)&&(e=new FormData(e)),On.isFormData(e))return B?JSON.stringify(WV(e)):e;if(On.isArrayBuffer(e)||On.isBuffer(e)||On.isStream(e)||On.isFile(e)||On.isBlob(e)||On.isReadableStream(e))return e;if(On.isArrayBufferView(e))return e.buffer;if(On.isURLSearchParams(e))return o.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let m;if(U){if(s.indexOf("application/x-www-form-urlencoded")>-1)return jpt(e,this.formSerializer).toString();if((m=On.isFileList(e))||s.indexOf("multipart/form-data")>-1){const y=this.env&&this.env.FormData;return g4(m?{"files[]":e}:e,y&&new y,this.formSerializer)}}return U||B?(o.setContentType("application/json",!1),Hpt(e)):e}],transformResponse:[function(e){const o=this.transitional||Hb.transitional,s=o&&o.forcedJSONParsing,B=this.responseType==="json";if(On.isResponse(e)||On.isReadableStream(e))return e;if(e&&On.isString(e)&&(s&&!this.responseType||B)){const U=!(o&&o.silentJSONParsing)&&B;try{return JSON.parse(e)}catch(m){if(U)throw m.name==="SyntaxError"?kl.from(m,kl.ERR_BAD_RESPONSE,this,null,this.response):m}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Bh.classes.FormData,Blob:Bh.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};On.forEach(["delete","get","head","post","put","patch"],e=>{Hb.headers[e]={}});const Zpt=On.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"]),Wpt=e=>{const o={};let s,B,U;return e&&e.split(`
4137
4137
  `).forEach(function(m){U=m.indexOf(":"),s=m.substring(0,U).trim().toLowerCase(),B=m.substring(U+1).trim(),!(!s||o[s]&&Zpt[s])&&(s==="set-cookie"?o[s]?o[s].push(B):o[s]=[B]:o[s]=o[s]?o[s]+", "+B:B)}),o},qV=Symbol("internals");function Zb(e){return e&&String(e).trim().toLowerCase()}function y4(e){return e===!1||e==null?e:On.isArray(e)?e.map(y4):String(e)}function qpt(e){const o=Object.create(null),s=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let B;for(;B=s.exec(e);)o[B[1]]=B[2];return o}const Jpt=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function nC(e,o,s,B,U){if(On.isFunction(B))return B.call(this,o,s);if(U&&(o=s),!!On.isString(o)){if(On.isString(B))return o.indexOf(B)!==-1;if(On.isRegExp(B))return B.test(o)}}function Ypt(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(o,s,B)=>s.toUpperCase()+B)}function Xpt(e,o){const s=On.toCamelCase(" "+o);["get","set","has"].forEach(B=>{Object.defineProperty(e,B+s,{value:function(U,m,y){return this[B].call(this,o,U,m,y)},configurable:!0})})}let Tp=class{constructor(o){o&&this.set(o)}set(o,s,B){const U=this;function m(a,v,p){const r=Zb(v);if(!r)throw new Error("header name must be a non-empty string");const _=On.findKey(U,r);(!_||U[_]===void 0||p===!0||p===void 0&&U[_]!==!1)&&(U[_||v]=y4(a))}const y=(a,v)=>On.forEach(a,(p,r)=>m(p,r,v));if(On.isPlainObject(o)||o instanceof this.constructor)y(o,s);else if(On.isString(o)&&(o=o.trim())&&!Jpt(o))y(Wpt(o),s);else if(On.isObject(o)&&On.isIterable(o)){let a={},v,p;for(const r of o){if(!On.isArray(r))throw TypeError("Object iterator must return a key-value pair");a[p=r[0]]=(v=a[p])?On.isArray(v)?[...v,r[1]]:[v,r[1]]:r[1]}y(a,s)}else o!=null&&m(s,o,B);return this}get(o,s){if(o=Zb(o),o){const B=On.findKey(this,o);if(B){const U=this[B];if(!s)return U;if(s===!0)return qpt(U);if(On.isFunction(s))return s.call(this,U,B);if(On.isRegExp(s))return s.exec(U);throw new TypeError("parser must be boolean|regexp|function")}}}has(o,s){if(o=Zb(o),o){const B=On.findKey(this,o);return!!(B&&this[B]!==void 0&&(!s||nC(this,this[B],B,s)))}return!1}delete(o,s){const B=this;let U=!1;function m(y){if(y=Zb(y),y){const a=On.findKey(B,y);a&&(!s||nC(B,B[a],a,s))&&(delete B[a],U=!0)}}return On.isArray(o)?o.forEach(m):m(o),U}clear(o){const s=Object.keys(this);let B=s.length,U=!1;for(;B--;){const m=s[B];(!o||nC(this,this[m],m,o,!0))&&(delete this[m],U=!0)}return U}normalize(o){const s=this,B={};return On.forEach(this,(U,m)=>{const y=On.findKey(B,m);if(y){s[y]=y4(U),delete s[m];return}const a=o?Ypt(m):String(m).trim();a!==m&&delete s[m],s[a]=y4(U),B[a]=!0}),this}concat(...o){return this.constructor.concat(this,...o)}toJSON(o){const s=Object.create(null);return On.forEach(this,(B,U)=>{B!=null&&B!==!1&&(s[U]=o&&On.isArray(B)?B.join(", "):B)}),s}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([o,s])=>o+": "+s).join(`
4138
4138
  `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(o){return o instanceof this?o:new this(o)}static concat(o,...s){const B=new this(o);return s.forEach(U=>B.set(U)),B}static accessor(o){const s=(this[qV]=this[qV]={accessors:{}}).accessors,B=this.prototype;function U(m){const y=Zb(m);s[y]||(Xpt(B,m),s[y]=!0)}return On.isArray(o)?o.forEach(U):U(o),this}};Tp.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),On.reduceDescriptors(Tp.prototype,({value:e},o)=>{let s=o[0].toUpperCase()+o.slice(1);return{get:()=>e,set(B){this[s]=B}}}),On.freezeMethods(Tp);function iC(e,o){const s=this||Hb,B=o||s,U=Tp.from(B.headers);let m=B.data;return On.forEach(e,function(y){m=y.call(s,m,U.normalize(),o?o.status:void 0)}),U.normalize(),m}function JV(e){return!!(e&&e.__CANCEL__)}function Vv(e,o,s){kl.call(this,e??"canceled",kl.ERR_CANCELED,o,s),this.name="CanceledError"}On.inherits(Vv,kl,{__CANCEL__:!0});function YV(e,o,s){const B=s.config.validateStatus;!s.status||!B||B(s.status)?e(s):o(new kl("Request failed with status code "+s.status,[kl.ERR_BAD_REQUEST,kl.ERR_BAD_RESPONSE][Math.floor(s.status/100)-4],s.config,s.request,s))}function $pt(e){const o=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return o&&o[1]||""}function Kpt(e,o){e=e||10;const s=new Array(e),B=new Array(e);let U=0,m=0,y;return o=o!==void 0?o:1e3,function(a){const v=Date.now(),p=B[m];y||(y=v),s[U]=a,B[U]=v;let r=m,_=0;for(;r!==U;)_+=s[r++],r=r%e;if(U=(U+1)%e,U===m&&(m=(m+1)%e),v-y<o)return;const b=p&&v-p;return b?Math.round(_*1e3/b):void 0}}function Qpt(e,o){let s=0,B=1e3/o,U,m;const y=(a,v=Date.now())=>{s=v,U=null,m&&(clearTimeout(m),m=null),e.apply(null,a)};return[(...a)=>{const v=Date.now(),p=v-s;p>=B?y(a,v):(U=a,m||(m=setTimeout(()=>{m=null,y(U)},B-p)))},()=>U&&y(U)]}const v4=(e,o,s=3)=>{let B=0;const U=Kpt(50,250);return Qpt(m=>{const y=m.loaded,a=m.lengthComputable?m.total:void 0,v=y-B,p=U(v),r=y<=a;B=y;const _={loaded:y,total:a,progress:a?y/a:void 0,bytes:v,rate:p||void 0,estimated:p&&a&&r?(a-y)/p:void 0,event:m,lengthComputable:a!=null,[o?"download":"upload"]:!0};e(_)},s)},XV=(e,o)=>{const s=e!=null;return[B=>o[0]({lengthComputable:s,total:e,loaded:B}),o[1]]},$V=e=>(...o)=>On.asap(()=>e(...o)),eft=Bh.hasStandardBrowserEnv?((e,o)=>s=>(s=new URL(s,Bh.origin),e.protocol===s.protocol&&e.host===s.host&&(o||e.port===s.port)))(new URL(Bh.origin),Bh.navigator&&/(msie|trident)/i.test(Bh.navigator.userAgent)):()=>!0,tft=Bh.hasStandardBrowserEnv?{write(e,o,s,B,U,m){const y=[e+"="+encodeURIComponent(o)];On.isNumber(s)&&y.push("expires="+new Date(s).toGMTString()),On.isString(B)&&y.push("path="+B),On.isString(U)&&y.push("domain="+U),m===!0&&y.push("secure"),document.cookie=y.join("; ")},read(e){const o=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return o?decodeURIComponent(o[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function aft(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function rft(e,o){return o?e.replace(/\/?\/$/,"")+"/"+o.replace(/^\/+/,""):e}function KV(e,o,s){let B=!aft(o);return e&&(B||s==!1)?rft(e,o):o}const QV=e=>e instanceof Tp?{...e}:e;function fg(e,o){o=o||{};const s={};function B(p,r,_,b){return On.isPlainObject(p)&&On.isPlainObject(r)?On.merge.call({caseless:b},p,r):On.isPlainObject(r)?On.merge({},r):On.isArray(r)?r.slice():r}function U(p,r,_,b){if(On.isUndefined(r)){if(!On.isUndefined(p))return B(void 0,p,_,b)}else return B(p,r,_,b)}function m(p,r){if(!On.isUndefined(r))return B(void 0,r)}function y(p,r){if(On.isUndefined(r)){if(!On.isUndefined(p))return B(void 0,p)}else return B(void 0,r)}function a(p,r,_){if(_ in o)return B(p,r);if(_ in e)return B(void 0,p)}const v={url:m,method:m,data:m,baseURL:y,transformRequest:y,transformResponse:y,paramsSerializer:y,timeout:y,timeoutMessage:y,withCredentials:y,withXSRFToken:y,adapter:y,responseType:y,xsrfCookieName:y,xsrfHeaderName:y,onUploadProgress:y,onDownloadProgress:y,decompress:y,maxContentLength:y,maxBodyLength:y,beforeRedirect:y,transport:y,httpAgent:y,httpsAgent:y,cancelToken:y,socketPath:y,responseEncoding:y,validateStatus:a,headers:(p,r,_)=>U(QV(p),QV(r),_,!0)};return On.forEach(Object.keys(Object.assign({},e,o)),function(p){const r=v[p]||U,_=r(e[p],o[p],p);On.isUndefined(_)&&r!==a||(s[p]=_)}),s}const ej=e=>{const o=fg({},e);let{data:s,withXSRFToken:B,xsrfHeaderName:U,xsrfCookieName:m,headers:y,auth:a}=o;o.headers=y=Tp.from(y),o.url=GV(KV(o.baseURL,o.url,o.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&y.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let v;if(On.isFormData(s)){if(Bh.hasStandardBrowserEnv||Bh.hasStandardBrowserWebWorkerEnv)y.setContentType(void 0);else if((v=y.getContentType())!==!1){const[p,...r]=v?v.split(";").map(_=>_.trim()).filter(Boolean):[];y.setContentType([p||"multipart/form-data",...r].join("; "))}}if(Bh.hasStandardBrowserEnv&&(B&&On.isFunction(B)&&(B=B(o)),B||B!==!1&&eft(o.url))){const p=U&&m&&tft.read(m);p&&y.set(U,p)}return o},nft=typeof XMLHttpRequest<"u",ift=nft&&function(e){return new Promise(function(o,s){const B=ej(e);let U=B.data;const m=Tp.from(B.headers).normalize();let{responseType:y,onUploadProgress:a,onDownloadProgress:v}=B,p,r,_,b,x;function h(){b&&b(),x&&x(),B.cancelToken&&B.cancelToken.unsubscribe(p),B.signal&&B.signal.removeEventListener("abort",p)}let n=new XMLHttpRequest;n.open(B.method.toUpperCase(),B.url,!0),n.timeout=B.timeout;function i(){if(!n)return;const l=Tp.from("getAllResponseHeaders"in n&&n.getAllResponseHeaders()),d={data:!y||y==="text"||y==="json"?n.responseText:n.response,status:n.status,statusText:n.statusText,headers:l,config:e,request:n};YV(function(g){o(g),h()},function(g){s(g),h()},d),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&&(s(new kl("Request aborted",kl.ECONNABORTED,e,n)),n=null)},n.onerror=function(){s(new kl("Network Error",kl.ERR_NETWORK,e,n)),n=null},n.ontimeout=function(){let l=B.timeout?"timeout of "+B.timeout+"ms exceeded":"timeout exceeded";const d=B.transitional||ZV;B.timeoutErrorMessage&&(l=B.timeoutErrorMessage),s(new kl(l,d.clarifyTimeoutError?kl.ETIMEDOUT:kl.ECONNABORTED,e,n)),n=null},U===void 0&&m.setContentType(null),"setRequestHeader"in n&&On.forEach(m.toJSON(),function(l,d){n.setRequestHeader(d,l)}),On.isUndefined(B.withCredentials)||(n.withCredentials=!!B.withCredentials),y&&y!=="json"&&(n.responseType=B.responseType),v&&([_,x]=v4(v,!0),n.addEventListener("progress",_)),a&&n.upload&&([r,b]=v4(a),n.upload.addEventListener("progress",r),n.upload.addEventListener("loadend",b)),(B.cancelToken||B.signal)&&(p=l=>{n&&(s(!l||l.type?new Vv(null,e,n):l),n.abort(),n=null)},B.cancelToken&&B.cancelToken.subscribe(p),B.signal&&(B.signal.aborted?p():B.signal.addEventListener("abort",p)));const c=$pt(B.url);if(c&&Bh.protocols.indexOf(c)===-1){s(new kl("Unsupported protocol "+c+":",kl.ERR_BAD_REQUEST,e));return}n.send(U||null)})},oft=(e,o)=>{const{length:s}=e=e?e.filter(Boolean):[];if(o||s){let B=new AbortController,U;const m=function(p){if(!U){U=!0,a();const r=p instanceof Error?p:this.reason;B.abort(r instanceof kl?r:new Vv(r instanceof Error?r.message:r))}};let y=o&&setTimeout(()=>{y=null,m(new kl(`timeout ${o} of ms exceeded`,kl.ETIMEDOUT))},o);const a=()=>{e&&(y&&clearTimeout(y),y=null,e.forEach(p=>{p.unsubscribe?p.unsubscribe(m):p.removeEventListener("abort",m)}),e=null)};e.forEach(p=>p.addEventListener("abort",m));const{signal:v}=B;return v.unsubscribe=()=>On.asap(a),v}},sft=function*(e,o){let s=e.byteLength;if(s<o){yield e;return}let B=0,U;for(;B<s;)U=B+o,yield e.slice(B,U),B=U},lft=async function*(e,o){for await(const s of cft(e))yield*sft(s,o)},cft=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const o=e.getReader();try{for(;;){const{done:s,value:B}=await o.read();if(s)break;yield B}}finally{await o.cancel()}},tj=(e,o,s,B)=>{const U=lft(e,o);let m=0,y,a=v=>{y||(y=!0,B&&B(v))};return new ReadableStream({async pull(v){try{const{done:p,value:r}=await U.next();if(p){a(),v.close();return}let _=r.byteLength;if(s){let b=m+=_;s(b)}v.enqueue(new Uint8Array(r))}catch(p){throw a(p),p}},cancel(v){return a(v),U.return()}},{highWaterMark:2})},b4=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",aj=b4&&typeof ReadableStream=="function",uft=b4&&(typeof TextEncoder=="function"?(e=>o=>e.encode(o))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),rj=(e,...o)=>{try{return!!e(...o)}catch{return!1}},dft=aj&&rj(()=>{let e=!1;const o=new Request(Bh.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!o}),nj=64*1024,oC=aj&&rj(()=>On.isReadableStream(new Response("").body)),_4={stream:oC&&(e=>e.body)};b4&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(o=>{!_4[o]&&(_4[o]=On.isFunction(e[o])?s=>s[o]():(s,B)=>{throw new kl(`Response type '${o}' is not supported`,kl.ERR_NOT_SUPPORT,B)})})})(new Response);const hft=async e=>{if(e==null)return 0;if(On.isBlob(e))return e.size;if(On.isSpecCompliantForm(e))return(await new Request(Bh.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(On.isArrayBufferView(e)||On.isArrayBuffer(e))return e.byteLength;if(On.isURLSearchParams(e)&&(e=e+""),On.isString(e))return(await uft(e)).byteLength},pft=async(e,o)=>On.toFiniteNumber(e.getContentLength())??hft(o),fft=b4&&(async e=>{let{url:o,method:s,data:B,signal:U,cancelToken:m,timeout:y,onDownloadProgress:a,onUploadProgress:v,responseType:p,headers:r,withCredentials:_="same-origin",fetchOptions:b}=ej(e);p=p?(p+"").toLowerCase():"text";let x=oft([U,m&&m.toAbortSignal()],y),h;const n=x&&x.unsubscribe&&(()=>{x.unsubscribe()});let i;try{if(v&&dft&&s!=="get"&&s!=="head"&&(i=await pft(r,B))!==0){let w=new Request(o,{method:"POST",body:B,duplex:"half"}),C;if(On.isFormData(B)&&(C=w.headers.get("content-type"))&&r.setContentType(C),w.body){const[E,A]=XV(i,v4($V(v)));B=tj(w.body,nj,E,A)}}On.isString(_)||(_=_?"include":"omit");const c="credentials"in Request.prototype;h=new Request(o,{...b,signal:x,method:s.toUpperCase(),headers:r.normalize().toJSON(),body:B,duplex:"half",credentials:c?_:void 0});let l=await fetch(h,b);const d=oC&&(p==="stream"||p==="response");if(oC&&(a||d&&n)){const w={};["status","statusText","headers"].forEach(P=>{w[P]=l[P]});const C=On.toFiniteNumber(l.headers.get("content-length")),[E,A]=a&&XV(C,v4($V(a),!0))||[];l=new Response(tj(l.body,nj,E,()=>{A&&A(),n&&n()}),w)}p=p||"text";let g=await _4[On.findKey(_4,p)||"text"](l,e);return!d&&n&&n(),await new Promise((w,C)=>{YV(w,C,{data:g,headers:Tp.from(l.headers),status:l.status,statusText:l.statusText,config:e,request:h})})}catch(c){throw n&&n(),c&&c.name==="TypeError"&&/Load failed|fetch/i.test(c.message)?Object.assign(new kl("Network Error",kl.ERR_NETWORK,e,h),{cause:c.cause||c}):kl.from(c,c&&c.code,e,h)}}),sC={http:Mpt,xhr:ift,fetch:fft};On.forEach(sC,(e,o)=>{if(e){try{Object.defineProperty(e,"name",{value:o})}catch{}Object.defineProperty(e,"adapterName",{value:o})}});const ij=e=>`- ${e}`,mft=e=>On.isFunction(e)||e===null||e===!1,oj={getAdapter:e=>{e=On.isArray(e)?e:[e];const{length:o}=e;let s,B;const U={};for(let m=0;m<o;m++){s=e[m];let y;if(B=s,!mft(s)&&(B=sC[(y=String(s)).toLowerCase()],B===void 0))throw new kl(`Unknown adapter '${y}'`);if(B)break;U[y||"#"+m]=B}if(!B){const m=Object.entries(U).map(([a,v])=>`adapter ${a} `+(v===!1?"is not supported by the environment":"is not available in the build"));let y=o?m.length>1?`since :
4139
4139
  `+m.map(ij).join(`
@@ -8201,4 +8201,4 @@ uniform ${Fe} ${Ge} u_${rt};
8201
8201
  * vuex v4.0.2
8202
8202
  * (c) 2021 Evan You
8203
8203
  * @license MIT
8204
- */var aW="store";function Ljt(e){return e===void 0&&(e=null),t.inject(e!==null?e:aW)}function Ng(e,o){Object.keys(e).forEach(function(s){return o(e[s],s)})}function rW(e){return e!==null&&typeof e=="object"}function Bjt(e){return e&&typeof e.then=="function"}function n0(e,o){if(!e)throw new Error("[vuex] "+o)}function zjt(e,o){return function(){return e(o)}}function nW(e,o,s){return o.indexOf(e)<0&&(s&&s.prepend?o.unshift(e):o.push(e)),function(){var B=o.indexOf(e);B>-1&&o.splice(B,1)}}function iW(e,o){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var s=e.state;Rw(e,s,[],e._modules.root,!0),eA(e,s,o)}function eA(e,o,s){var B=e._state;e.getters={},e._makeLocalGettersCache=Object.create(null);var U=e._wrappedGetters,m={};Ng(U,function(y,a){m[a]=zjt(y,e),Object.defineProperty(e.getters,a,{get:function(){return m[a]()},enumerable:!0})}),e._state=t.reactive({data:o}),e.strict&&Rjt(e),B&&s&&e._withCommit(function(){B.data=null})}function Rw(e,o,s,B,U){var m=!s.length,y=e._modules.getNamespace(s);if(B.namespaced&&(e._modulesNamespaceMap[y]&&process.env.NODE_ENV!=="production"&&console.error("[vuex] duplicate namespace "+y+" for the namespaced module "+s.join("/")),e._modulesNamespaceMap[y]=B),!m&&!U){var a=tA(o,s.slice(0,-1)),v=s[s.length-1];e._withCommit(function(){process.env.NODE_ENV!=="production"&&v in a&&console.warn('[vuex] state field "'+v+'" was overridden by a module with the same name at "'+s.join(".")+'"'),a[v]=B.state})}var p=B.context=Ojt(e,y,s);B.forEachMutation(function(r,_){var b=y+_;Djt(e,b,r,p)}),B.forEachAction(function(r,_){var b=r.root?_:y+_,x=r.handler||r;Njt(e,b,x,p)}),B.forEachGetter(function(r,_){var b=y+_;Fjt(e,b,r,p)}),B.forEachChild(function(r,_){Rw(e,o,s.concat(_),r,U)})}function Ojt(e,o,s){var B=o==="",U={dispatch:B?e.dispatch:function(m,y,a){var v=Vw(m,y,a),p=v.payload,r=v.options,_=v.type;if((!r||!r.root)&&(_=o+_,process.env.NODE_ENV!=="production"&&!e._actions[_])){console.error("[vuex] unknown local action type: "+v.type+", global type: "+_);return}return e.dispatch(_,p)},commit:B?e.commit:function(m,y,a){var v=Vw(m,y,a),p=v.payload,r=v.options,_=v.type;if((!r||!r.root)&&(_=o+_,process.env.NODE_ENV!=="production"&&!e._mutations[_])){console.error("[vuex] unknown local mutation type: "+v.type+", global type: "+_);return}e.commit(_,p,r)}};return Object.defineProperties(U,{getters:{get:B?function(){return e.getters}:function(){return oW(e,o)}},state:{get:function(){return tA(e.state,s)}}}),U}function oW(e,o){if(!e._makeLocalGettersCache[o]){var s={},B=o.length;Object.keys(e.getters).forEach(function(U){if(U.slice(0,B)===o){var m=U.slice(B);Object.defineProperty(s,m,{get:function(){return e.getters[U]},enumerable:!0})}}),e._makeLocalGettersCache[o]=s}return e._makeLocalGettersCache[o]}function Djt(e,o,s,B){var U=e._mutations[o]||(e._mutations[o]=[]);U.push(function(m){s.call(e,B.state,m)})}function Njt(e,o,s,B){var U=e._actions[o]||(e._actions[o]=[]);U.push(function(m){var y=s.call(e,{dispatch:B.dispatch,commit:B.commit,getters:B.getters,state:B.state,rootGetters:e.getters,rootState:e.state},m);return Bjt(y)||(y=Promise.resolve(y)),e._devtoolHook?y.catch(function(a){throw e._devtoolHook.emit("vuex:error",a),a}):y})}function Fjt(e,o,s,B){if(e._wrappedGetters[o]){process.env.NODE_ENV!=="production"&&console.error("[vuex] duplicate getter key: "+o);return}e._wrappedGetters[o]=function(U){return s(B.state,B.getters,U.state,U.getters)}}function Rjt(e){t.watch(function(){return e._state.data},function(){process.env.NODE_ENV!=="production"&&n0(e._committing,"do not mutate vuex store state outside mutation handlers.")},{deep:!0,flush:"sync"})}function tA(e,o){return o.reduce(function(s,B){return s[B]},e)}function Vw(e,o,s){return rW(e)&&e.type&&(s=o,o=e,e=e.type),process.env.NODE_ENV!=="production"&&n0(typeof e=="string","expects string as the type, but found "+typeof e+"."),{type:e,payload:o,options:s}}var Vjt="vuex bindings",sW="vuex:mutations",aA="vuex:actions",f2="vuex",jjt=0;function Ujt(e,o){Pjt({id:"org.vuejs.vuex",app:e,label:"Vuex",homepage:"https://next.vuex.vuejs.org/",logo:"https://vuejs.org/images/icons/favicon-96x96.png",packageName:"vuex",componentStateTypes:[Vjt]},function(s){s.addTimelineLayer({id:sW,label:"Vuex Mutations",color:lW}),s.addTimelineLayer({id:aA,label:"Vuex Actions",color:lW}),s.addInspector({id:f2,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),s.on.getInspectorTree(function(B){if(B.app===e&&B.inspectorId===f2)if(B.filter){var U=[];hW(U,o._modules.root,B.filter,""),B.rootNodes=U}else B.rootNodes=[dW(o._modules.root,"")]}),s.on.getInspectorState(function(B){if(B.app===e&&B.inspectorId===f2){var U=B.nodeId;oW(o,U),B.state=Zjt(qjt(o._modules,U),U==="root"?o.getters:o._makeLocalGettersCache,U)}}),s.on.editInspectorState(function(B){if(B.app===e&&B.inspectorId===f2){var U=B.nodeId,m=B.path;U!=="root"&&(m=U.split("/").filter(Boolean).concat(m)),o._withCommit(function(){B.set(o._state.data,m,B.state.value)})}}),o.subscribe(function(B,U){var m={};B.payload&&(m.payload=B.payload),m.state=U,s.notifyComponentUpdate(),s.sendInspectorTree(f2),s.sendInspectorState(f2),s.addTimelineEvent({layerId:sW,event:{time:Date.now(),title:B.type,data:m}})}),o.subscribeAction({before:function(B,U){var m={};B.payload&&(m.payload=B.payload),B._id=jjt++,B._time=Date.now(),m.state=U,s.addTimelineEvent({layerId:aA,event:{time:B._time,title:B.type,groupId:B._id,subtitle:"start",data:m}})},after:function(B,U){var m={},y=Date.now()-B._time;m.duration={_custom:{type:"duration",display:y+"ms",tooltip:"Action duration",value:y}},B.payload&&(m.payload=B.payload),m.state=U,s.addTimelineEvent({layerId:aA,event:{time:Date.now(),title:B.type,groupId:B._id,subtitle:"end",data:m}})}})})}var lW=8702998,Gjt=6710886,Hjt=16777215,cW={label:"namespaced",textColor:Hjt,backgroundColor:Gjt};function uW(e){return e&&e!=="root"?e.split("/").slice(-2,-1)[0]:"Root"}function dW(e,o){return{id:o||"root",label:uW(o),tags:e.namespaced?[cW]:[],children:Object.keys(e._children).map(function(s){return dW(e._children[s],o+s+"/")})}}function hW(e,o,s,B){B.includes(s)&&e.push({id:B||"root",label:B.endsWith("/")?B.slice(0,B.length-1):B||"Root",tags:o.namespaced?[cW]:[]}),Object.keys(o._children).forEach(function(U){hW(e,o._children[U],s,B+U+"/")})}function Zjt(e,o,s){o=s==="root"?o:o[s];var B=Object.keys(o),U={state:Object.keys(e.state).map(function(y){return{key:y,editable:!0,value:e.state[y]}})};if(B.length){var m=Wjt(o);U.getters=Object.keys(m).map(function(y){return{key:y.endsWith("/")?uW(y):y,editable:!1,value:rA(function(){return m[y]})}})}return U}function Wjt(e){var o={};return Object.keys(e).forEach(function(s){var B=s.split("/");if(B.length>1){var U=o,m=B.pop();B.forEach(function(y){U[y]||(U[y]={_custom:{value:{},display:y,tooltip:"Module",abstract:!0}}),U=U[y]._custom.value}),U[m]=rA(function(){return e[s]})}else o[s]=rA(function(){return e[s]})}),o}function qjt(e,o){var s=o.split("/").filter(function(B){return B});return s.reduce(function(B,U,m){var y=B[U];if(!y)throw new Error('Missing module "'+U+'" for path "'+o+'".');return m===s.length-1?y:y._children},o==="root"?e:e.root._children)}function rA(e){try{return e()}catch(o){return o}}var i0=function(e,o){this.runtime=o,this._children=Object.create(null),this._rawModule=e;var s=e.state;this.state=(typeof s=="function"?s():s)||{}},pW={namespaced:{configurable:!0}};pW.namespaced.get=function(){return!!this._rawModule.namespaced},i0.prototype.addChild=function(e,o){this._children[e]=o},i0.prototype.removeChild=function(e){delete this._children[e]},i0.prototype.getChild=function(e){return this._children[e]},i0.prototype.hasChild=function(e){return e in this._children},i0.prototype.update=function(e){this._rawModule.namespaced=e.namespaced,e.actions&&(this._rawModule.actions=e.actions),e.mutations&&(this._rawModule.mutations=e.mutations),e.getters&&(this._rawModule.getters=e.getters)},i0.prototype.forEachChild=function(e){Ng(this._children,e)},i0.prototype.forEachGetter=function(e){this._rawModule.getters&&Ng(this._rawModule.getters,e)},i0.prototype.forEachAction=function(e){this._rawModule.actions&&Ng(this._rawModule.actions,e)},i0.prototype.forEachMutation=function(e){this._rawModule.mutations&&Ng(this._rawModule.mutations,e)},Object.defineProperties(i0.prototype,pW);var Fg=function(e){this.register([],e,!1)};Fg.prototype.get=function(e){return e.reduce(function(o,s){return o.getChild(s)},this.root)},Fg.prototype.getNamespace=function(e){var o=this.root;return e.reduce(function(s,B){return o=o.getChild(B),s+(o.namespaced?B+"/":"")},"")},Fg.prototype.update=function(e){fW([],this.root,e)},Fg.prototype.register=function(e,o,s){var B=this;s===void 0&&(s=!0),process.env.NODE_ENV!=="production"&&yW(e,o);var U=new i0(o,s);if(e.length===0)this.root=U;else{var m=this.get(e.slice(0,-1));m.addChild(e[e.length-1],U)}o.modules&&Ng(o.modules,function(y,a){B.register(e.concat(a),y,s)})},Fg.prototype.unregister=function(e){var o=this.get(e.slice(0,-1)),s=e[e.length-1],B=o.getChild(s);if(!B){process.env.NODE_ENV!=="production"&&console.warn("[vuex] trying to unregister module '"+s+"', which is not registered");return}B.runtime&&o.removeChild(s)},Fg.prototype.isRegistered=function(e){var o=this.get(e.slice(0,-1)),s=e[e.length-1];return o?o.hasChild(s):!1};function fW(e,o,s){if(process.env.NODE_ENV!=="production"&&yW(e,s),o.update(s),s.modules)for(var B in s.modules){if(!o.getChild(B)){process.env.NODE_ENV!=="production"&&console.warn("[vuex] trying to add a new module '"+B+"' on hot reloading, manual reload is needed");return}fW(e.concat(B),o.getChild(B),s.modules[B])}}var mW={assert:function(e){return typeof e=="function"},expected:"function"},Jjt={assert:function(e){return typeof e=="function"||typeof e=="object"&&typeof e.handler=="function"},expected:'function or object with "handler" function'},gW={getters:mW,mutations:mW,actions:Jjt};function yW(e,o){Object.keys(gW).forEach(function(s){if(o[s]){var B=gW[s];Ng(o[s],function(U,m){n0(B.assert(U),Yjt(e,s,m,U,B.expected))})}})}function Yjt(e,o,s,B,U){var m=o+" should be "+U+' but "'+o+"."+s+'"';return e.length>0&&(m+=' in module "'+e.join(".")+'"'),m+=" is "+JSON.stringify(B)+".",m}var Jp=function e(o){var s=this;o===void 0&&(o={}),process.env.NODE_ENV!=="production"&&(n0(typeof Promise<"u","vuex requires a Promise polyfill in this browser."),n0(this instanceof e,"store must be called with the new operator."));var B=o.plugins;B===void 0&&(B=[]);var U=o.strict;U===void 0&&(U=!1);var m=o.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new Fg(o),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._devtools=m;var y=this,a=this,v=a.dispatch,p=a.commit;this.dispatch=function(_,b){return v.call(y,_,b)},this.commit=function(_,b,x){return p.call(y,_,b,x)},this.strict=U;var r=this._modules.root.state;Rw(this,r,[],this._modules.root),eA(this,r),B.forEach(function(_){return _(s)})},nA={state:{configurable:!0}};Jp.prototype.install=function(e,o){e.provide(o||aW,this),e.config.globalProperties.$store=this;var s=this._devtools!==void 0?this._devtools:process.env.NODE_ENV!=="production"||!1;s&&Ujt(e,this)},nA.state.get=function(){return this._state.data},nA.state.set=function(e){process.env.NODE_ENV!=="production"&&n0(!1,"use store.replaceState() to explicit replace store state.")},Jp.prototype.commit=function(e,o,s){var B=this,U=Vw(e,o,s),m=U.type,y=U.payload,a=U.options,v={type:m,payload:y},p=this._mutations[m];if(!p){process.env.NODE_ENV!=="production"&&console.error("[vuex] unknown mutation type: "+m);return}this._withCommit(function(){p.forEach(function(r){r(y)})}),this._subscribers.slice().forEach(function(r){return r(v,B.state)}),process.env.NODE_ENV!=="production"&&a&&a.silent&&console.warn("[vuex] mutation type: "+m+". Silent option has been removed. Use the filter functionality in the vue-devtools")},Jp.prototype.dispatch=function(e,o){var s=this,B=Vw(e,o),U=B.type,m=B.payload,y={type:U,payload:m},a=this._actions[U];if(!a){process.env.NODE_ENV!=="production"&&console.error("[vuex] unknown action type: "+U);return}try{this._actionSubscribers.slice().filter(function(p){return p.before}).forEach(function(p){return p.before(y,s.state)})}catch(p){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in before action subscribers: "),console.error(p))}var v=a.length>1?Promise.all(a.map(function(p){return p(m)})):a[0](m);return new Promise(function(p,r){v.then(function(_){try{s._actionSubscribers.filter(function(b){return b.after}).forEach(function(b){return b.after(y,s.state)})}catch(b){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in after action subscribers: "),console.error(b))}p(_)},function(_){try{s._actionSubscribers.filter(function(b){return b.error}).forEach(function(b){return b.error(y,s.state,_)})}catch(b){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in error action subscribers: "),console.error(b))}r(_)})})},Jp.prototype.subscribe=function(e,o){return nW(e,this._subscribers,o)},Jp.prototype.subscribeAction=function(e,o){var s=typeof e=="function"?{before:e}:e;return nW(s,this._actionSubscribers,o)},Jp.prototype.watch=function(e,o,s){var B=this;return process.env.NODE_ENV!=="production"&&n0(typeof e=="function","store.watch only accepts a function."),t.watch(function(){return e(B.state,B.getters)},o,Object.assign({},s))},Jp.prototype.replaceState=function(e){var o=this;this._withCommit(function(){o._state.data=e})},Jp.prototype.registerModule=function(e,o,s){s===void 0&&(s={}),typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&(n0(Array.isArray(e),"module path must be a string or an Array."),n0(e.length>0,"cannot register the root module by using registerModule.")),this._modules.register(e,o),Rw(this,this.state,e,this._modules.get(e),s.preserveState),eA(this,this.state)},Jp.prototype.unregisterModule=function(e){var o=this;typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&n0(Array.isArray(e),"module path must be a string or an Array."),this._modules.unregister(e),this._withCommit(function(){var s=tA(o.state,e.slice(0,-1));delete s[e[e.length-1]]}),iW(this)},Jp.prototype.hasModule=function(e){return typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&n0(Array.isArray(e),"module path must be a string or an Array."),this._modules.isRegistered(e)},Jp.prototype.hotUpdate=function(e){this._modules.update(e),iW(this,!0)},Jp.prototype._withCommit=function(e){var o=this._committing;this._committing=!0,e(),this._committing=o},Object.defineProperties(Jp.prototype,nA);var Xjt=Kjt(function(e,o){var s={};return process.env.NODE_ENV!=="production"&&!vW(o)&&console.error("[vuex] mapMutations: mapper parameter must be either an Array or an Object"),$jt(o).forEach(function(B){var U=B.key,m=B.val;s[U]=function(){for(var y=[],a=arguments.length;a--;)y[a]=arguments[a];var v=this.$store.commit;if(e){var p=Qjt(this.$store,"mapMutations",e);if(!p)return;v=p.context.commit}return typeof m=="function"?m.apply(this,[v].concat(y)):v.apply(this.$store,[m].concat(y))}}),s});function $jt(e){return vW(e)?Array.isArray(e)?e.map(function(o){return{key:o,val:o}}):Object.keys(e).map(function(o){return{key:o,val:e[o]}}):[]}function vW(e){return Array.isArray(e)||rW(e)}function Kjt(e){return function(o,s){return typeof o!="string"?(s=o,o=""):o.charAt(o.length-1)!=="/"&&(o+="/"),e(o,s)}}function Qjt(e,o,s){var B=e._modulesNamespaceMap[s];return process.env.NODE_ENV!=="production"&&!B&&console.error("[vuex] module namespace not found in "+o+"(): "+s),B}const eUt={name:"tooltip",props:{data:{type:Object,required:!0}},computed:{showTooltip(){return{visible:this.data.visible}}},methods:{tooltipClick:function(e){},closeClick:function(e){this.data.link="",this.data.visible=!1}}};function tUt(e,o,s,B,U,m){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["back-tooltip",m.showTooltip])},[t.createElementVNode("div",{class:t.normalizeClass(["box-tooltip",m.showTooltip]),onClick:o[1]||(o[1]=(...y)=>m.tooltipClick&&m.tooltipClick(...y))},[t.createElementVNode("span",{class:"box-tooltip-close",onClick:o[0]||(o[0]=(...y)=>m.closeClick&&m.closeClick(...y))},"×"),t.renderSlot(e.$slots,"default",{},void 0,!0)],2)],2)}const aUt=v_(eUt,[["render",tUt],["__scopeId","data-v-cc97d3a4"]]),rUt=/^https:\/\/[a-z0-9]+\.execute-api\.[a-z0-9-]+\.amazonaws\.com\/(prod|qa\d*)\//,nUt=/^https:\/\/golstats-microservices\.s3[.-]us-west-2\.amazonaws\.com\//,iUt="https://apis.golstats.com",oUt="https://dev-apis.golstats.com";function sUt(e,o,s=!1){if(!o||o===1)return e;const B=s?oUt:iUt,U=e.match(rUt);if(U){const y=e.replace(U[0],"");return`${B}/${o}/${y}`}const m=e.match(nUt);if(m){const y=e.replace(m[0],"");return`${B}/${o}/${y}`}return e}const lUt=1e3,bW=lUt*60,iA=bW*60,_W=iA*24,cUt={data(){return{timeLeft:"",currentTime:new Date().valueOf(),interval:null,gameDateTime:new Date,now:new Date}},computed:{isToday(){return`${this.now.getFullYear()}.${this.now.getMonth()}.${this.now.getDate()}`==`${this.gameDateTime.getFullYear()}.${this.gameDateTime.getMonth()}.${this.gameDateTime.getDate()}`},gameStart(){return this.gameDateTime.toTimeString().slice(0,5)}},methods:{checkTimeLeft(){const e=new Date(this.gameData.dateTimeUTC).valueOf();e>this.currentTime?(this.timeLeft=this.getTimeLeft(e),this.interval=setInterval(()=>{this.timeLeft=this.getTimeLeft(e)},6e4)):this.timeLeft="00:00 hrs"},getTimeLeft(e){let o=e.valueOf()-this.currentTime;const s=Math.floor(o/_W);o=o-s*_W;const B=Math.floor(o/iA);o=o-B*iA;const U=Math.floor(o/bW);return`${s?`${s} dias `:""}${B<10?`0${B}`:B}:${U<10?`0${U}`:U} hrs.`}},beforeDestroy(){this.interval&&clearInterval(this.interval)}};function uUt(e,o){return`${o==1?{}.TEAM_LOGOS_URL||"https://golstatsimages.blob.core.windows.net/teams-80/":"https://golstatsimages.blob.core.windows.net/teams-80/"+o+"/"}${e}.png`}function dUt(e,o){return`${o==1?{}.PROFILE_PHOTO_PLAYER||"https://golstatsimages.blob.core.windows.net/players-profile/":"https://golstatsimages.blob.core.windows.net/players-profile/"+o+"/"}${e}.png`}const oA={GOAL_IDS:["1-1","1-2","1-3","1-4","1-5","1-6","1-7","1-12","1-13","1-16","4-14"],YELLOW_CARD_IDS:["2-8"],RED_CARD_IDS:["2-9"]},hUt="/icn-play.svg",pUt="/icn-tiros-de-esquina.svg",fUt="/icn-tiro-a-porteria.svg",mUt="/icn-cambio.svg",gUt="/icn-falta.svg",yUt="/atajada.svg",vUt="/fuera-de-lugar.svg",sA="/gol.svg",bUt="/var.png",_Ut="/tiempo-agregado.svg",xUt="/jugada-peligrosa.svg",wUt="/penal-marcado.svg",kUt="/penal-fallado.svg",SUt="/inicia-el-partido.svg",CUt="/fin-del-partido.svg",TUt="/icn-tarjeta-amarilla.svg",AUt="/icn-tarjeta-roja.svg",EUt=[1,2,3,4,6],MUt={name:"TimeLineEvent",props:{gameEvent:{type:Object,required:!0},isMobile:{type:Boolean,default:!1},provider:{type:Number,default:0},width:{type:Number,default:352},timeLineWidth:{type:Number,default:0},canPlayVideos:{type:Boolean,default:!0}},data(){return{lastHeight:0,gameEventKey:0}},computed:{nameClasses(){const e=[],o=`${this.gameEvent.event_type_id}-${this.gameEvent.category_id}`;return oA.GOAL_IDS.includes(o)?(e.push("is-main-event"),e.push("goal")):oA.YELLOW_CARD_IDS.includes(o)?(e.push("is-main-event"),e.push("yellow-card")):oA.RED_CARD_IDS.includes(o)?(e.push("is-main-event"),e.push("red-card")):this.gameEvent.video_link!=="-"&&(e.push("is-main-event"),e.push("normal-video")),this.gameEvent.teamType===1?e.push("time-line-event--home-team"):e.push("time-line-event--away-team"),e},srcImgPlayers(){let e=null;return this.gameEvent.player_id&&this.gameEvent.player_id!=="-"&&(e=this.gameEvent.player_id.split("@"),e=e.map(o=>dUt(o,this.provider))),e},teamTypeClasses(){const e=`time-line-event--${this.gameEvent.teamType===1?"home":"away"}-team`;return[e,`${e}-desktop`]},teamTypeClasses2(){return[`time-line-event--info--${this.gameEvent.teamType===1?"home":"away"}-team`]},minuteClasses(){const e=[`time-line-event__minute--desktop-${this.gameEvent.teamType===1?"home":"away"}-team`];return e.push("time-line-event__minute--desktop"),e},playerName(){return this.gameEvent.category_id===28||EUt.includes(this.gameEvent.event_type_id)?"":this.gameEvent.player_name}},watch:{width(){this.emitHeight()},gameEvent:{deep:!0,handler(){this.gameEventKey++}}},methods:{...Xjt("general",["setVideoModalVisibility","setVideoSrc"]),thumbnailClick(e){e!=="-"&&this.$emit("thumbnail-click",e)},showVideoTimeline(e){this.setVideoSrc(e),this.setVideoModalVisibility(!0)},getIconClasses(){return["time-line-event__icon--desktop",`time-line-event__icon--desktop-${this.gameEvent.teamType===1?"home":"away"}-team`]},emitHeight(){setTimeout(()=>{this.$refs.timeLineEvent&&this.$refs.timeLineEvent.clientHeight&&this.$refs.timeLineEvent.clientHeight!==this.lastHeight&&(this.lastHeight=this.$refs.timeLineEvent.clientHeight,this.$emit("event-height",this.lastHeight))},500)}},mounted(){if(this.emitHeight(),this.gameEvent.event_type_id===3){const[e,o]=this.gameEvent.player_id.split("@");this.$emit("player-changed",{playerOut:Number(e),playerIn:Number(o),teamId:this.gameEvent.team_id})}}},IUt=e=>(t.pushScopeId("data-v-dff2f5b8"),e=e(),t.popScopeId(),e),PUt={class:"time-line-event__details"},LUt={width:"127",preload:"metadata",style:{"border-radius":"8px"}},BUt=["src"],zUt=IUt(()=>t.createElementVNode("div",{class:"time-line-event__details__video-thumbnail__gradient"},[t.createElementVNode("div",{class:"time-line-event__details__video-thumbnail__gradient__button-play"},[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none"},[t.createElementVNode("path",{d:"M6.6041 22.8554C6.42105 22.7512 6.26805 22.5956 6.1616 22.4053C6.05515 22.215 5.99927 21.9973 6.00001 21.7755V2.22137C6.00026 2.00039 6.0565 1.78362 6.16274 1.59409C6.26899 1.40456 6.42127 1.24936 6.6034 1.14499C6.78553 1.04062 6.9907 0.990981 7.1971 1.00135C7.4035 1.01171 7.60342 1.0817 7.77561 1.20386L21.4907 10.9821C21.6473 11.0935 21.7758 11.2446 21.8646 11.4219C21.9535 11.5992 22 11.7973 22 11.9985C22 12.1996 21.9535 12.3977 21.8646 12.575C21.7758 12.7523 21.6473 12.9034 21.4907 13.0148L7.77561 22.7954C7.60369 22.9178 7.40392 22.988 7.19761 22.9986C6.9913 23.0092 6.78617 22.9597 6.6041 22.8554ZM7.14347 21.7779L20.8585 11.9996L7.14347 21.7779Z",fill:"#CBEE6B"})])])],-1)),OUt={class:"time-line-event__details__info"},DUt={key:0,class:"time-line-event__details__info__header__players"},NUt={class:"time-line-event__details__info__header__players__div-img"},FUt=["src"],RUt={class:"time-line-event__details__info__body"},VUt={class:"time-line-event__details__info__body__comment"},jUt={class:"time-line-event__minute__container"},UUt={class:"time-line-event__minute__container__text"},GUt={class:"time-line-event__minute__container__icon-container"},HUt={class:"time-line-event__minute__container__icon-container__icon"},ZUt={key:0,src:pUt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},WUt={key:1,src:fUt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},qUt={key:2,src:mUt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},JUt={key:3,src:gUt,class:"time-line-event__minute__container__icon-container__icon__img",alt:"Event icon"},YUt={key:4,src:yUt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},XUt={key:5,src:vUt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},$Ut={key:6,src:sA,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},KUt={key:7,src:sA,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},QUt={key:8,src:sA,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},eGt={key:9,src:bUt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},tGt={key:10,src:_Ut,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},aGt={key:11,src:xUt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},rGt={key:12,src:wUt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},nGt={key:13,src:kUt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},iGt={key:14,src:SUt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},oGt={key:15,src:CUt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},sGt={key:16,src:TUt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},lGt={key:17,src:AUt,class:"time-line-event__minute__container__icon-container__icon__img",alt:"Event icon"},cGt={key:18,src:"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg id='Layer_2' data-name='Layer 2' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cdefs%3E%3Cstyle%3E .cls-1 %7B fill: %23fff; %7D .cls-2 %7B fill: %23172531; %7D %3C/style%3E%3C/defs%3E%3Cg id='Layer_1-2' data-name='Layer 1'%3E%3Cg%3E%3Cg id='Oval'%3E%3Ccircle class='cls-2' cx='24' cy='24' r='24'/%3E%3C/g%3E%3Cg id='Group-19'%3E%3Cg id='Path-16'%3E%3Cpath class='cls-1' d='M32.85,36.6H15.15c-.41,0-.75-.34-.75-.75s.34-.75,.75-.75h17.69c.41,0,.75,.34,.75,.75s-.34,.75-.75,.75Z'/%3E%3C/g%3E%3C/g%3E%3Cg id='Rectangle'%3E%3Cg id='path-1'%3E%3Cpath class='cls-1' d='M38.02,32.62H9.98V13.43h28.04v19.19Zm-26.54-1.5h25.04V14.93H11.48V31.12Z'/%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E",alt:"Event icon"};function uGt(e,o,s,B,U,m){return t.openBlock(),t.createElementBlock("div",{ref:"timeLineEvent",class:t.normalizeClass(["time-line-event",m.teamTypeClasses]),style:t.normalizeStyle({width:`${s.width}px`}),key:U.gameEventKey},[t.createElementVNode("div",PUt,[s.canPlayVideos&&s.gameEvent.video_link!=="-"&&s.timeLineWidth>700?(t.openBlock(),t.createElementBlock("div",{key:0,class:"time-line-event__details__video-thumbnail",onClick:o[0]||(o[0]=y=>m.thumbnailClick(s.gameEvent.video_link,s.gameEvent.event_type_name))},[t.createElementVNode("video",LUt,[t.createElementVNode("source",{src:s.gameEvent.video_link+"#t=0.1",type:"video/mp4"},null,8,BUt)]),zUt])):t.createCommentVNode("",!0),t.createElementVNode("div",OUt,[t.createElementVNode("div",{class:t.normalizeClass(["time-line-event__details__info__header",m.teamTypeClasses2])},[s.gameEvent.video_link=="-"?(t.openBlock(),t.createElementBlock("div",DUt,[m.srcImgPlayers?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(m.srcImgPlayers,(y,a)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["img-player",{"second-player":a===1}]),key:a},[t.createElementVNode("div",NUt,[t.createElementVNode("img",{src:y,alt:""},null,8,FUt)])],2))),128)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["time-line-event__details__info__header__event-name",m.nameClasses]),onClick:o[1]||(o[1]=y=>m.thumbnailClick(s.gameEvent.video_link,s.gameEvent.event_type_name))},[s.canPlayVideos&&s.gameEvent.video_link!=="-"?(t.openBlock(),t.createElementBlock("img",{key:0,src:hUt,class:t.normalizeClass(`time-line-event__details__info__header__event-play ${[1,2].includes(s.gameEvent.event_type_id)?`time-line-event__details__info__header__event-play__${s.gameEvent.event_type_name}`:s.gameEvent.video_link!=="-"?"time-line-event__details__info__header__event-play__normal-video":""}`)},null,2)):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(s.gameEvent.category_id?s.gameEvent.event_type_id===5?s.gameEvent.category_name:s.gameEvent.event_type_name==="Gol"?`${[13,16].includes(s.gameEvent.category_id)?"Autogol":"Gol"} de `+s.gameEvent.team_name:s.gameEvent.event_type_name:s.gameEvent.comments),1)],2)],2),t.createElementVNode("div",RUt,[t.createElementVNode("div",VUt,t.toDisplayString(this.gameEvent.category_id?`${this.gameEvent.comments}`:""),1)])])]),t.createElementVNode("div",{class:t.normalizeClass(["time-line-event__minute",m.minuteClasses])},[t.createElementVNode("div",jUt,[t.createElementVNode("div",UUt,t.toDisplayString(s.gameEvent.minute)+"'",1),t.createElementVNode("div",GUt,[t.createElementVNode("div",HUt,[s.gameEvent.category_id==18?(t.openBlock(),t.createElementBlock("img",ZUt)):s.gameEvent.category_id==20?(t.openBlock(),t.createElementBlock("img",WUt)):s.gameEvent.category_id==10?(t.openBlock(),t.createElementBlock("img",qUt)):s.gameEvent.category_id==21?(t.openBlock(),t.createElementBlock("img",JUt)):s.gameEvent.category_id==27?(t.openBlock(),t.createElementBlock("img",YUt)):s.gameEvent.category_id==17?(t.openBlock(),t.createElementBlock("img",XUt)):s.gameEvent.category_id==6&&s.gameEvent.event_type_id==1||s.gameEvent.category_id==5&&s.gameEvent.event_type_id==1||s.gameEvent.category_id==1&&s.gameEvent.event_type_id==1||s.gameEvent.category_id==2&&s.gameEvent.event_type_id==1||s.gameEvent.category_id==3&&s.gameEvent.event_type_id==1||s.gameEvent.category_id==7&&s.gameEvent.event_type_id==1||s.gameEvent.category_id==12&&s.gameEvent.event_type_id==1?(t.openBlock(),t.createElementBlock("img",$Ut)):s.gameEvent.category_id==4?(t.openBlock(),t.createElementBlock("img",KUt)):s.gameEvent.category_id==13||s.gameEvent.category_id==16?(t.openBlock(),t.createElementBlock("img",QUt)):s.gameEvent.category_id==30||s.gameEvent.category_id==31||s.gameEvent.category_id==32||s.gameEvent.category_id==33||s.gameEvent.category_id==34||s.gameEvent.category_id==35||s.gameEvent.category_id==36||s.gameEvent.category_id==37||s.gameEvent.category_id==38||s.gameEvent.category_id==39||s.gameEvent.category_id==40?(t.openBlock(),t.createElementBlock("img",eGt)):s.gameEvent.category_id==28?(t.openBlock(),t.createElementBlock("img",tGt)):s.gameEvent.category_id==26?(t.openBlock(),t.createElementBlock("img",aGt)):s.gameEvent.category_id==22?(t.openBlock(),t.createElementBlock("img",rGt)):s.gameEvent.category_id==15||s.gameEvent.category_id==23?(t.openBlock(),t.createElementBlock("img",nGt)):s.gameEvent.category_id==0&&s.gameEvent.game_status_id==16||s.gameEvent.category_id==0&&s.gameEvent.game_status_id==18||s.gameEvent.category_id==0&&s.gameEvent.game_status_id==20||s.gameEvent.category_id==0&&s.gameEvent.game_status_id==22?(t.openBlock(),t.createElementBlock("img",iGt)):s.gameEvent.category_id==0&&s.gameEvent.game_status_id==13||s.gameEvent.category_id==0&&s.gameEvent.game_status_id==17||s.gameEvent.category_id==0&&s.gameEvent.game_status_id==19||s.gameEvent.category_id==0&&s.gameEvent.game_status_id==21||s.gameEvent.category_id==0&&s.gameEvent.game_status_id==23?(t.openBlock(),t.createElementBlock("img",oGt)):s.gameEvent.category_id==8?(t.openBlock(),t.createElementBlock("img",sGt)):s.gameEvent.category_id==9?(t.openBlock(),t.createElementBlock("img",lGt)):(t.openBlock(),t.createElementBlock("img",cGt))])])])],2)],6)}const dGt=v_(MUt,[["render",uGt],["__scopeId","data-v-dff2f5b8"]]),hGt={"1-1":"gol","1-2":"gol","1-3":"gol","1-4":"gol","1-5":"gol","1-6":"gol","1-7":"gol","1-12":"gol","1-13":"gol","1-16":"gol","2-8":"amonestacion","2-9":"expulsion","3-10":"cambio_de_jugador","3-11":"cambio_de_jugador","4-14":"gol","4-15":"penal_fallado","5-17":"fuera_de_lugar","5-18":"tiro_de_esquina","5-20":"tiro_a_gol","5-21":"falta_cometida","5-22":"penal_marcado","5-23":"penal_fallado","5-24":"","5-25":"","5-26":"jugada_peligro_dentro_area","5-27":"atajada","5-28":"tiempo_agregado","5-29":"presion_para_anotar","7-30":"revision_var","7-31":"revision_var","7-32":"revision_var","7-33":"revision_var","7-34":"revision_var"},pGt={3:{name:"Inicia Primer Tiempo",weight:1,playTimer:1,abbreviation:"1T:"},4:{name:"Final Primer Tiempo",weight:2,playTimer:0,abbreviation:"1T:"},5:{name:"Inicia Segundo Tiempo",weight:3,playTimer:1,abbreviation:"2T:"},8:{name:"Final Segundo Tiempo",weight:4,playTimer:0,abbreviation:"2T:"},9:{name:"Inicia Primer Tiempo Extra",weight:5,playTimer:1,abbreviation:"1T extra:"},12:{name:"Final Primer Tiempo Extra",weight:6,playTimer:0,abbreviation:"1T extra:"},10:{name:"Inicia Segundo Tiempo Extra",weight:7,playTimer:1,abbreviation:"2T extra:"},13:{name:"Final Segundo Tiempo Extra",weight:8,playTimer:0,abbreviation:"2T extra:"},11:{name:"Inicia Tanda de Penales",weight:9,playTimer:1,abbreviation:"Penales:"},15:{name:"Final Tanda de Penales",weight:10,playTimer:0,abbreviation:"Penales:"},6:{name:"Marcador Final",weight:11,playTimer:0,abbreviation:"Final"}};let jw=null;const fGt={name:"TimeLine",components:{Tooltip:aUt,TimeLineEvent:dGt},mixins:[cUt],props:{gameData:{type:Object,required:!0},providerId:{type:Number,default:0},timeLinePeriod:{type:String,default:"all"},socket:{type:Object,default:()=>({})},canPlayVideos:{type:Boolean,default:!0}},data(){return{gameEvents:[],gameEventsByPeriod:{firstHalf:[],secondHalf:[]},dataVideo:{visible:!1,link:""},gameEventsQueue:[],gameEventsUrl:"https://al2nv2dmkc.execute-api.us-west-2.amazonaws.com/prod/mxm/",transitionName:"",subscriptionInfo:{gameId:0,isSubscribed:!1},areGameEventsFilled:!1,timeLineWidth:812,eventContainerWidth:0,channelName:"",timeLineStatus:"awaiting",timeLeft:"",lastMinute:0,timeLineStatuses:[],currentStatus:{abbreviation:""},timer:"00:00"}},computed:{isMobile(){return this.timeLineWidth<580},gameEventWidth(){return this.timeLineWidth/2-30},gameEventsToShow(){return this.timeLinePeriod==="all"?this.gameEvents:this.gameEventsByPeriod[this.timeLinePeriod]}},watch:{gameData:{deep:!0,immediate:!0,handler(e){e&&e.id&&(this.gameDateTime=new Date(this.gameData.dateTimeUTC),this.gameEventsQueue=[],this.timeLineStatuses=[],this.transitionName="",this.checkTimeLeft(),e.status!==1&&this.socket&&this.socket.connected?this.subscribeToMXMChannel():this.timeLineStatus="finished",this.fillGameEvents(e.id))}},"socket.connected":{immediate:!0,handler(e){e&&this.gameData.id&&this.gameData.status!==1&&this.subscribeToMXMChannel()}},gameEvents(e){e.length&&this.gameData.status!==1&&(this.timeLineStatus="live")}},methods:{async fillGameEvents(e){try{const o=await this.fetchGameEvents(e);o?(this.gameEvents=[...o],this.checkGameEventsQueue(),this.sortGameEvents(),setTimeout(()=>{this.transitionName="list"},500)):this.gameEvents=[],this.gameData.status===1?this.lastMinute=`${this.gameEvents[this.gameEvents.length-1].minute}'`:this.checkTimeLineStatus()}catch(o){throw new Error(o)}},getGameEventClassAndSetIcon(e,o){return e.icon=o===0?"inicio_del_partido":hGt[`${e.event_type_id}-${e.category_id}`],e.team_id===this.gameData.homeTeam.team_id||!e.team_id?(e.teamType=1,["home-team-event"]):(e.teamType=2,["away-team-event"])},getEventContainerClass(){return this.isMobile,["time-line-event__container--desktop"]},async fetchGameEvents(e){try{const o=this.$store.getters.getProviderId,s=this.$store.getters.getIsDevApis,B=sUt(`${this.gameEventsUrl}${e}`,o,s),{data:{plays:U}}=await eW.get(B);return U}catch(o){throw new Error(o)}},subscribeToMXMChannel(){this.channelName=`mxm.game.${this.gameData.id}`,this.socket.emit("subscribe",{channel:this.channelName}),this.isSubscribed=!0},checkGameEventsQueue(){this.gameEventsQueue.length&&this.gameEvents.push(...this.gameEventsQueue),this.areGameEventsFilled=!0},setUpResizeObserver(){if(window.ResizeObserver)jw=new ResizeObserver(()=>{this.timeLineWidth=this.$refs.timeLine.clientWidth}),jw.observe(this.$refs.timeLine);else throw new Error("Resize observer not supported!")},updateContainerHeight(e,o){const s=this.$refs[`gameEventDiv${o}`][0],B=this.$refs[`gameEventLine${o}`]?this.$refs[`gameEventLine${o}`][0]:null,U=e+12;s&&(s.style.height=`${U}px`),B&&(B.style.height=`${U}px`)},sortGameEvents(){this.gameEvents.sort((e,o)=>this.getMatchLapseMinutes(e.match_lapse)+Number(e.minute)-(this.getMatchLapseMinutes(o.match_lapse)+Number(o.minute))),this.gameEventsByPeriod={firstHalf:[],secondHalf:[]},this.gameEvents.forEach(e=>{this.gameEventsByPeriod[e.match_lapse===1?"firstHalf":"secondHalf"].push(e)})},getMatchLapseMinutes(e){let o=0;switch(e){case 1:o=0;break;case 2:o=45;break;case 3:o=90;break;case 4:o=105;break;case 5:o=120;break}return o},addGameEventFromChannel(e){this.areGameEventsFilled?(this.gameEvents.push(e),this.sortGameEvents()):this.gameEventsQueue.push(e)},deleteGameEventFromChannel(e){const o=this.gameEvents.findIndex(s=>s.play_id===e.play_id);o&&this.gameEvents.splice(o,1)},checkTimeLineStatus(){this.gameEvents.forEach(o=>{const s=pGt[o.game_status];s&&this.timeLineStatuses.push({...s,gameEvent:o})}),this.timeLineStatuses.sort((o,s)=>s.weight-o.weight);const e=this.timeLineStatuses[0];e&&(this.currentStatus=e,e.playTimer&&this.startTimer())},startTimer(){},getTeamLogoSrc(e="homeTeam"){const o=this.gameData[e].team_id;return uUt(o,this.$store.getters.getProviderId)},thumbnailClick(e){this.canPlayVideos&&(this.dataVideo.link=e,this.dataVideo.visible=!0)}},mounted(){this.$nextTick(()=>{this.setUpResizeObserver()})},beforeUnmount(){jw&&jw.unobserve(this.$refs.timeLine)},sockets:{new_mxm([e,o]){this.channelName===e&&this.addGameEventFromChannel(o)},update_mxm([e,o]){this.channelName===e&&(this.deleteGameEventFromChannel(o),this.addGameEventFromChannel(o))},delete_mxm([e,o]){this.channelName===e&&this.deleteGameEventFromChannel(o)}}},xW=e=>(t.pushScopeId("data-v-a81f7bcf"),e=e(),t.popScopeId(),e),mGt={ref:"timeLine",class:"time-line"},gGt={class:"time-line__header"},yGt={class:"time-line__header__dot"},vGt={class:"time-line__header__dot__home-team team-logo"},bGt=["src"],_Gt={class:"time-line__header__dot__away-team team-logo"},xGt=["src"],wGt={key:1,class:"start-line"},kGt=xW(()=>t.createElementVNode("div",null,null,-1)),SGt=xW(()=>t.createElementVNode("div",null,null,-1)),CGt=[kGt,SGt],TGt={key:1,class:"noEventText"},AGt={class:"tooltip-data"},EGt=["src"];function MGt(e,o,s,B,U,m){const y=t.resolveComponent("TimeLineEvent"),a=t.resolveComponent("Tooltip");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",mGt,[t.createElementVNode("div",gGt,[t.createElementVNode("div",yGt,[t.createElementVNode("div",vGt,[t.createElementVNode("img",{src:m.getTeamLogoSrc("homeTeam"),alt:""},null,8,bGt)]),t.createElementVNode("div",_Gt,[t.createElementVNode("img",{src:m.getTeamLogoSrc("awayTeam"),alt:""},null,8,xGt)])])]),(t.openBlock(),t.createElementBlock("div",{class:"time-line__game-events",key:`tlk-${U.gameEvents.length}`},[s.gameData.status!==4||s.gameData.is_live?(t.openBlock(),t.createBlock(t.TransitionGroup,{key:0,name:U.transitionName,tag:"div"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(m.gameEventsToShow,(v,p)=>(t.openBlock(),t.createElementBlock("div",{class:"time-line__game-events__grid",key:v.play_id},[t.createElementVNode("div",{ref_for:!0,ref:`gameEventDiv${p}`,class:t.normalizeClass(m.getGameEventClassAndSetIcon(v,p))},[t.createElementVNode("div",{class:t.normalizeClass(m.getEventContainerClass(v))},[t.createVNode(y,{"game-event":v,"is-mobile":m.isMobile,provider:e.$store.getters.getProviderId,"time-line-width":U.timeLineWidth,width:m.gameEventWidth,"can-play-videos":s.canPlayVideos,onEventHeight:r=>m.updateContainerHeight(r,p),onPlayerChanged:o[0]||(o[0]=r=>e.$emit("player-changed",r)),onThumbnailClick:m.thumbnailClick},null,8,["game-event","is-mobile","provider","time-line-width","width","can-play-videos","onEventHeight","onThumbnailClick"])],2),p>0?(t.openBlock(),t.createElementBlock("div",{key:0,ref_for:!0,ref:`gameEventLine${p}`,class:"line"},null,512)):t.createCommentVNode("",!0),s.gameData.status===1&&p===m.gameEventsToShow.length-1?(t.openBlock(),t.createElementBlock("div",wGt,CGt)):t.createCommentVNode("",!0)],2)]))),128))]),_:1},8,["name"])):(t.openBlock(),t.createElementBlock("div",TGt,"Aún no comienza el partido"))]))],512),t.createVNode(a,{data:U.dataVideo},{default:t.withCtx(()=>[t.createElementVNode("div",AGt,[t.createElementVNode("div",null,[t.createElementVNode("video",{class:"tooltip-video",controls:"",autoplay:"",src:U.dataVideo.link,format:"video/mp4"},null,8,EGt)])])]),_:1},8,["data"])],64)}const IGt=v_(fGt,[["render",MGt],["__scopeId","data-v-a81f7bcf"]]),PGt={class:"game-time-line__options"},LGt={class:"game-time-line__timeline"},BGt={__name:"GSC-GameTimeLine",props:{game:{type:Object,default:()=>({id:79601,seasonId:1772,status:1,dateTimeUTC:"2023-10-01T22:20:00Z",is_live:0,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/1.png",team_id:1,provisional_logo:"https://golstatsimages.blob.core.windows.net/teams-provisional/1.png",colloquial_name:"Chivas",acronym:"CHI",team_name:"Guadalajara"}})},socket:{type:Object,default:()=>({})},canPlayVideos:{type:Boolean,default:!0},providerId:{type:Number,default:0},isDevApis:{type:Boolean,default:!1}},setup(e){const o=e;eW.defaults.headers.common.Authorization="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE";const s=t.ref({width:"103px",height:"30px",borderRadius:"50px",borderColor:"#8a8a8a",borderWidth:"0.5px",backgroundColor:"rgba(255, 255, 255, 0.04)",fontSize:"14px",fontFamily:"Poppins-Regular, sans-serif",fontColor:"rgba(255, 255, 255, 0.5)",activeFontColor:"#FFFFFF",activeBorderColor:"#cbee6b"}),B=t.ref({width:"auto",height:"30px",padding:"0px 20px",borderRadius:"50px",borderColor:"#8a8a8a",borderWidth:"0.5px",backgroundColor:"rgba(255, 255, 255, 0.04)",fontSize:"14px",fontFamily:"Poppins-Regular, sans-serif",fontColor:"rgba(255, 255, 255, 0.5)",activeFontColor:"#FFFFFF",activeBorderColor:"#cbee6b"});let U=null;const m=Ljt();m.commit("setProviderId",o.providerId),m.commit("setIsDevApis",o.isDevApis);const y=t.ref(["Todo","1er tiempo","2do tiempo"]),a=t.ref("Todo"),v=t.ref({}),p=t.ref(null),r=t.ref(0),_=t.computed(()=>{let i="all";return a.value==="1er tiempo"||a.value==="1er"?i="firstHalf":(a.value==="2do tiempo"||a.value==="2do")&&(i="secondHalf"),i}),b=t.computed(()=>r.value<500);function x(i){a.value=i}function h(i){v.value=i}function n(){if(window.ResizeObserver)U=new ResizeObserver(()=>{r.value=p.value.clientWidth}),U.observe(p.value);else throw new Error("Resize observer not supported!")}return t.onMounted(()=>{n()}),t.onBeforeUnmount(()=>{U&&U.unobserve(p.value)}),(i,c)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"gameTimeLine",ref:p,class:"game-time-line"},[t.createElementVNode("div",PGt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(y.value,l=>(t.openBlock(),t.createElementBlock("div",{key:l,class:"game-time-line__options__option"},[t.createVNode(xRt,t.mergeProps(r.value<390?B.value:s.value,{text:l=="Todo"?l:r.value<390?l.substring(0,3):l,"is-active":a.value===l,onClick:d=>x(l)}),null,16,["text","is-active","onClick"])]))),128))]),t.createElementVNode("div",LGt,[t.createVNode(IGt,{"game-data":e.game,"time-line-period":_.value,"is-mobile":b.value,socket:e.socket,provider:e.providerId,"can-play-videos":e.canPlayVideos,onGameEventsByPeriodFilled:h},null,8,["game-data","time-line-period","is-mobile","socket","provider","can-play-videos"])])],512))}},zGt=v_(BGt,[["__scopeId","data-v-691198f5"]]),jta="",OGt={class:"game-data__header"},DGt={class:"game-data__header__tournament-season-dropdown"},NGt={class:"game-data__header__teams-carousel"},FGt={class:"game-data__body"},RGt={key:0,class:"no-stats-container"},VGt={key:1,class:"no-stats-container-mobile"},jGt={class:"game-data__body__menu"},UGt={class:"game-data__body__menu__contmenuswitch"};pu.defaults.headers.common.Authorization="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE";const GGt=t.defineComponent({name:"GSC-GameData",components:{StatisticsMain:Yue,GSCGameTimeLine:zGt,GscSwitchComponent:XS,GSCLineupsMain:y4e,GSCPositining:p_t,GSCDatosGSMain:qEe,GSCVideoGame:Aje,ModalEvents:mN,GSCTacticaFijaMain:bRt,GSCProminentMain:Oct,GSCComparative:jht}}),HGt=Ki(Object.assign(GGt,{props:{tournamentsApiUrl:{type:String,default:""},tournamentSelectProps:{type:Object,default:null},areFemaleTournamentsVisible:{type:Boolean,default:!0},currentSeasonId:{type:Number,default:0},isClubes:{type:Boolean,default:!1},defaultGameId:{type:Number,default:0,validator(e){return!Number.isNaN(e)&&e>=0}},sortCalendar:{type:Boolean,default:!0},isWidget:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},socket:{type:Object,default:()=>null},isSynchronization:{type:Boolean,default:!1},isTeamGamePerPage:{type:Boolean,default:!1},clientPrivilegesBySeasons:{type:Object,default:()=>null},areTournamentAndSeasonSelectsVisible:{type:Boolean,default:!0},disabledSectionsIds:{type:Array,default:()=>[]},tournamentsIdsToInclude:{type:Set,default:()=>new Set},volumetricFieldIntervalMinutes:{type:Number,default:2},chalkboardIntervalMinutes:{type:Number,default:2},gameEventsIntervalMinutes:{type:Number,default:1},isFemaleMode:{type:Boolean,default:!1},providerId:{type:Number,default:0},isDevApis:{type:Boolean,default:!1},token:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"}},emits:["openmedia","change-season-id","onOpenProfile","openProfileTeam","openProfilePlayer"],setup(e,{emit:o}){const s=fp();let B=null;Vd.on("socket-connected",()=>{s.commit("nextGeneral/updateIsSocketConnected",U.socket.connected)});const U=e,m=t.ref(B2(kx));t.watch(()=>U.providerId,async mt=>{s.commit("setProviderId",mt),s.commit("setIsDevApis",U.isDevApis),m.value=await rie(mt)},{immediate:!0}),t.provide("playOffAbbreviationsStructure",m);const y=t.ref("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"),a=t.ref({season:[]}),v=t.ref({}),p=t.ref(!1),r=t.ref({}),_=t.ref(1),b=t.ref(0),x=3e4,h=3e4,n=3e4,i=3e4,c=3e4,l=3e4,d=3e4,g=3e4,w=6e4,C=t.ref(null),E=t.ref(null),A=t.ref(null),P=t.ref([]),L=t.ref(null),T=t.ref(!0),I=t.ref(new Set([1,2])),M=t.ref({}),S=t.ref({minute:"",recent_lapse:0,score:{}}),z=t.ref(0),k=t.ref("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"),O=t.ref(U.isWidget?[{componentName:"GSCProminentMain",name:"Generales",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:U.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6}]:[{componentName:"GSCProminentMain",name:"Destacado",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:4},{componentName:"GSCComparative",name:U.isWidget?"Destacados":"Comparativa",id:3},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6},{componentName:"GSCTacticaFijaMain",name:"Táctica Fija",id:7}]),N=t.ref(U.isWidget?[{componentName:"GSCProminentMain",name:"Generales",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:U.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6}]:[{componentName:"GSCProminentMain",name:"Destacado",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:U.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6},{componentName:"GSCTacticaFijaMain",name:"Táctica Fija",id:7}]),j=t.ref(U.isWidget?[{componentName:"GSCProminentMain",name:"Generales",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:U.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6}]:[{componentName:"GSCProminentMain",name:"Destacado",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:U.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6},{componentName:"GSCTacticaFijaMain",name:"Táctica Fija",id:7}]);t.ref(U.isWidget?[{componentName:"GSCProminentMain",name:"Generales",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:U.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6}]:[{componentName:"GSCProminentMain",name:"Destacado",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:U.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6},{componentName:"GSCTacticaFijaMain",name:"Táctica Fija",id:7}]);const G=t.ref(0);let H=null;const Z=t.ref(null),$=t.ref(0),ne=t.ref(N.value[0]),q=t.ref([]);let K=t.ref("");const ee={seasonAndPrivileges:null,canPrivilegesTeamPlayVideos:!1,homeTeamDetails:{canPlayVideos:!1,team:{}},awayTeamDetails:{canPlayVideos:!1,team:{}}},X=t.computed(()=>{const mt=[];return v.value&&v.value.id&&(mt.push({id:v.value.id,name:v.value.name,type:v.value.type}),v.value.related_seasons&&v.value.related_seasons.forEach(bt=>{mt.push({id:bt.id,type:bt.type})})),mt}),Q=t.computed(()=>{if(U.clientPrivilegesBySeasons){const mt=U.clientPrivilegesBySeasons.seasonsAndPrivileges.get(v.value.id);if(mt)return mt.teamId}return 0});function ce(){p.value=!1}function de(mt){const bt=mt.split(",");return!(bt.length<2||bt[1].split(" ").length<2)}function he(mt){C.value=mt}function pe(mt){P.value.push(mt)}function re(mt){L.value=mt}function se(mt){A.value=mt}function ie(mt){E.value=mt}function me(mt){if(!de(mt))return"";const bt=ve(mt);return`${ye(mt)}. ${bt}`}function ye(mt){return mt.split(",")[1].split(" ")[1][0]}function ve(mt){const bt=mt.split(",")[0].split(" ");return bt[0].length<=3&&bt.length>1?`${bt[0]} ${bt[1]}`:bt[0]}async function we(mt){if(!(!mt||!mt.game_id))try{const bt=pu.create({headers:{Authorization:`${y.value}`}});M.value={};const It=await bt.get(uu("https://al2nv2dmkc.execute-api.us-west-2.amazonaws.com/prod/mxm/"+mt.game_id,U.providerId,U.isDevApis));if(M.value[mt.home_team.team_id]=[],M.value[mt.home_team.team_id].team={name:mt.home_team.acronym,logo:mt.home_team.logo},M.value[mt.home_team.team_id].goals=[],M.value[mt.home_team.team_id].red=[],M.value[mt.home_team.team_id].yellow=[],M.value[mt.visiting_team.team_id]=[],M.value[mt.visiting_team.team_id].team={name:mt.visiting_team.acronym,logo:mt.visiting_team.logo},M.value[mt.visiting_team.team_id].goals=[],M.value[mt.visiting_team.team_id].red=[],M.value[mt.visiting_team.team_id].yellow=[],It.data.minute!=null&&(S.value={minute:It.data.minute,recent_lapse:It.data.recent_lapse,score:It.data.score}),It.data.plays)for(let Ot=0;Ot<It.data.plays.length;Ot++)It.data.plays[Ot].category_name=="Roja"&&It.data.plays[Ot].status==1&&(mt.home_team.team_id==It.data.plays[Ot].team_id?(me(It.data.plays[Ot].player_name)in M.value[mt.home_team.team_id].red||(M.value[mt.home_team.team_id].red[me(It.data.plays[Ot].player_name)]={},M.value[mt.home_team.team_id].red[me(It.data.plays[Ot].player_name)].event=[],M.value[mt.home_team.team_id].red[me(It.data.plays[Ot].player_name)].name=me(It.data.plays[Ot].player_name)),M.value[mt.home_team.team_id].red[me(It.data.plays[Ot].player_name)].event.push(It.data.plays[Ot].minute)):(me(It.data.plays[Ot].player_name)in M.value[mt.visiting_team.team_id].red||(M.value[mt.visiting_team.team_id].red[me(It.data.plays[Ot].player_name)]={},M.value[mt.visiting_team.team_id].red[me(It.data.plays[Ot].player_name)].event=[],M.value[mt.visiting_team.team_id].red[me(It.data.plays[Ot].player_name)].name=me(It.data.plays[Ot].player_name)),M.value[mt.visiting_team.team_id].red[me(It.data.plays[Ot].player_name)].event.push(It.data.plays[Ot].minute))),It.data.plays[Ot].category_name=="Amarilla"&&It.data.plays[Ot].status==1&&(mt.home_team.team_id==It.data.plays[Ot].team_id?(me(It.data.plays[Ot].player_name)in M.value[mt.home_team.team_id].yellow||(M.value[mt.home_team.team_id].yellow[me(It.data.plays[Ot].player_name)]={},M.value[mt.home_team.team_id].yellow[me(It.data.plays[Ot].player_name)].event=[],M.value[mt.home_team.team_id].yellow[me(It.data.plays[Ot].player_name)].name=me(It.data.plays[Ot].player_name)),M.value[mt.home_team.team_id].yellow[me(It.data.plays[Ot].player_name)].event.push(It.data.plays[Ot].minute)):(me(It.data.plays[Ot].player_name)in M.value[mt.visiting_team.team_id].yellow||(M.value[mt.visiting_team.team_id].yellow[me(It.data.plays[Ot].player_name)]={},M.value[mt.visiting_team.team_id].yellow[me(It.data.plays[Ot].player_name)].event=[],M.value[mt.visiting_team.team_id].yellow[me(It.data.plays[Ot].player_name)].name=me(It.data.plays[Ot].player_name)),M.value[mt.visiting_team.team_id].yellow[me(It.data.plays[Ot].player_name)].event.push(It.data.plays[Ot].minute))),It.data.plays[Ot].event_type_name=="Gol"&&It.data.plays[Ot].status==1&&(mt.home_team.team_id==It.data.plays[Ot].team_id?It.data.plays[Ot].category_name=="Autogol"?(me(It.data.plays[Ot].player_name)in M.value[mt.visiting_team.team_id].goals||(M.value[mt.visiting_team.team_id].goals[me(It.data.plays[Ot].player_name)]={},M.value[mt.visiting_team.team_id].goals[me(It.data.plays[Ot].player_name)].event=[],M.value[mt.visiting_team.team_id].goals[me(It.data.plays[Ot].player_name)].name=me(It.data.plays[Ot].player_name)),M.value[mt.visiting_team.team_id].goals[me(It.data.plays[Ot].player_name)].event.push(It.data.plays[Ot].minute)):(me(It.data.plays[Ot].player_name)in M.value[mt.home_team.team_id].goals||(M.value[mt.home_team.team_id].goals[me(It.data.plays[Ot].player_name)]={},M.value[mt.home_team.team_id].goals[me(It.data.plays[Ot].player_name)].event=[],M.value[mt.home_team.team_id].goals[me(It.data.plays[Ot].player_name)].name=me(It.data.plays[Ot].player_name)),M.value[mt.home_team.team_id].goals[me(It.data.plays[Ot].player_name)].event.push(It.data.plays[Ot].minute)):It.data.plays[Ot].category_name=="Autogol"?(me(It.data.plays[Ot].player_name)in M.value[mt.home_team.team_id].goals||(M.value[mt.home_team.team_id].goals[me(It.data.plays[Ot].player_name)]={},M.value[mt.home_team.team_id].goals[me(It.data.plays[Ot].player_name)].event=[],M.value[mt.home_team.team_id].goals[me(It.data.plays[Ot].player_name)].name=me(It.data.plays[Ot].player_name)),M.value[mt.home_team.team_id].goals[me(It.data.plays[Ot].player_name)].event.push(It.data.plays[Ot].minute)):(me(It.data.plays[Ot].player_name)in M.value[mt.visiting_team.team_id].goals||(M.value[mt.visiting_team.team_id].goals[me(It.data.plays[Ot].player_name)]={},M.value[mt.visiting_team.team_id].goals[me(It.data.plays[Ot].player_name)].event=[],M.value[mt.visiting_team.team_id].goals[me(It.data.plays[Ot].player_name)].name=me(It.data.plays[Ot].player_name)),M.value[mt.visiting_team.team_id].goals[me(It.data.plays[Ot].player_name)].event.push(It.data.plays[Ot].minute)))}catch(bt){return Promise.reject(bt)}}function Se(mt){p.value=!0,mt.is_live!=1&&mt.game_status!=0&&(mt.game_status==4||Object.keys(mt.minutes).length>0)?(z.value=1,M.value={plays:mt.minutes,home_team:mt.home_team,visiting_team:mt.visiting_team}):(z.value=0,we(mt))}function Ce(){H=new ResizeObserver(mt=>{for(const bt of mt)$.value=bt.contentRect.width}),H.observe(Z.value)}const Me=t.computed(()=>{let mt={};return r.value&&r.value.game_id&&(mt={gameId:r.value.game_id,id:r.value.game_id,seasonId:r.value.season_id,regularSeasonId:r.value.regularSeasonId,matchday_name:r.value.matchday_name,status:r.value.game_status,score:r.value.score,game_status:r.value.game_status,dateTimeUTC:r.value.date_time_utc,homeTeam:r.value.home_team,awayTeam:r.value.visiting_team,is_live:r.value.is_live,minutes:r.value.minutes}),mt});t.watch(()=>r.value.game_id,He,{immediate:!0}),t.watch(()=>r.value.is_live,Pe,{immediate:!0}),t.watch(()=>s.state.nextGeneral.gameForAnalysis,()=>{s.commit("nextGeneral/updateIsSocketConnected",U.socket.connected)},{deep:!0,immediate:!0});function Le(mt){_.value=mt.is_captured,b.value=mt.is_female,T.value=mt.is_captured!==0,a.value.id!==mt.id&&(a.value=mt,s.commit("gameGlobal/setTournamentType",mt.tournament_type))}const ze=o;function He(mt,bt){s.commit("nextGeneral/updateShowLiveData",!0);const It=b.value?"Destacados":"Destacadas";N.value.forEach(Ot=>{Ot.name===It&&(Ot.name=b.value?"Destacadas":"Destacados")}),we({game_id:r.value.game_id,home_team:r.value.home_team,visiting_team:r.value.visiting_team}),Ie(),G.value+=1}function Pe(mt,bt){if(Ie(),s.state.nextGeneral.gameForAnalysis.is_live!==mt&&s.commit("nextGeneral/updateGameForAnalysis",{...s.state.nextGeneral.gameForAnalysis,is_live:r.value.is_live,game_status:r.value.game_status}),mt){const It=e8();It.disconnected?t8():It.connected&&r.value.game_id&&r8(`game.${r.value.game_id}.v2`),Ve(),B=setInterval(()=>{z.value=0,we({game_id:r.value.game_id,home_team:r.value.home_team,visiting_team:r.value.visiting_team})},6e4)}else Ve(),a8();mt!==bt&&(G.value+=1)}function Ve(){B&&clearInterval(B)}function Ie(){N.value=[],r.value.is_live||r.value.game_status===4?N.value=[...O.value]:N.value=[...j.value],U.isWidget||((v.value.is_tactic_available===0||r.value.is_live||r.value.game_status===0)&&N.value.pop(),r.value.has_tracking===1&&!(r.value.is_live||r.value.game_status===4)&&N.value.push({componentName:"GSCPositining",name:"Posicionamiento",id:8})),ne.value=N.value[0]}function ge(mt){mt.gameSeasonId=r.value.season_id,mt.gameRegularSeasonId=r.value.regularSeasonId,!(!mt.auxwidget&&Be.value&&!Be.value.canPrivilegesTeamPlayVideos)&&((r.value.is_live||r.value.game_status===0||r.value.game_status===1)&&(mt.gameIdsToFilter=[r.value.game_id]),mt.isLiveAccumulated&&(mt.gameIdsToFilter=null),(r.value.is_live||r.value.game_status===0)&&!mt.isLiveAccumulated&&(mt.liveGameConfig={gameId:r.value.game_id}),mt.fakeLiveConfig={gameId:r.value.game_id},ze("openmedia",mt))}function Ae(mt){ze("onOpenProfile",mt)}function ke(mt){ze("openProfileTeam",mt)}function je(mt){ze("openProfilePlayer",mt)}function De(mt){et(mt),mt=="Estadísticas"&&(K.value="Comparativa")}function Ne(){K.value=""}function qe(mt){v.value.id!==mt.id&&(v.value=mt,ze("change-season-id",mt.id))}const Ze=t.computed(()=>N.value.reduce((mt,bt)=>(U.disabledSectionsIds.includes(bt.id)||Be.value&&!Be.value.isVideoTabVisible&&bt.id===2||U.clientPrivilegesBySeasons&&bt.id===7||(T.value||bt.id!==5&&bt.id!==6)&&mt.push(bt.name),mt),[]));function _e(mt){if(r.value.is_live||r.value.game_status===1||r.value.game_status===0){const bt=mt.playingAs.has(r.value.playingAs);return U.clientPrivilegesBySeasons.canPlayVideos&&bt}else{const bt=Re.value.filter(It=>mt.playingAs.has(It.playingAs));return U.clientPrivilegesBySeasons.canPlayVideos&&bt.length>0}}const Be=t.computed(()=>{if(U.clientPrivilegesBySeasons){if(v.value&&r.value&&r.value.game_id){const mt=U.clientPrivilegesBySeasons.seasonsAndPrivileges.get(v.value.id);if(mt)if(We(mt.playingAs),(r.value.is_live||r.value.game_status===1||r.value.game_status===0)&&s.state.nextGeneral.showLiveData){const bt=mt.playingAs.has(r.value.playingAs);return{seasonAndPrivileges:mt,canPrivilegesTeamPlayVideos:U.clientPrivilegesBySeasons.canPlayVideos&&bt,isPrivilegesTeamOnly:!1,isPrivilegesTeamHome:r.value.home_team.team_id===mt.teamId,homeTeamDetails:{canPlayVideos:bt,team:r.value.home_team},awayTeamDetails:{canPlayVideos:bt,team:r.value.visiting_team},isVideoTabVisible:_e(mt)}}else{const bt=r.value.home_team.team_id===mt.teamId,It=Re.value.filter(Gt=>mt.playingAs.has(Gt.playingAs));return{seasonAndPrivileges:mt,canPrivilegesTeamPlayVideos:U.clientPrivilegesBySeasons.canPlayVideos&&It.length>0,isPrivilegesTeamOnly:!0,isPrivilegesTeamHome:bt,homeTeamDetails:{canPlayVideos:U.clientPrivilegesBySeasons.canPlayVideos&&bt&&It.length>0,team:r.value.home_team},awayTeamDetails:{canPlayVideos:U.clientPrivilegesBySeasons.canPlayVideos&&!bt&&It.length>0,team:r.value.visiting_team},isVideoTabVisible:_e(mt)}}We(new Set)}return ee}return null}),Re=t.computed(()=>{if(U.clientPrivilegesBySeasons){if(v.value){const mt=U.clientPrivilegesBySeasons.seasonsAndPrivileges.get(v.value.id);if(mt)return q.value.filter(bt=>bt.game_status===1&&mt.playingAs.has(bt.playingAs))}return[]}return[]});t.watch(Ze,()=>{Be.value&&!Be.value.canPrivilegesTeamPlayVideos&&(ne.value.id===2||ne.value.id===7||ne.value.id===8)&&et("Resumen")},{deep:!0,immediate:!0});function We(mt){I.value=mt}function et(mt){if(s.commit("nextGeneral/updateShowLiveData",!0),C.value!=null&&(clearInterval(C.value),C.value=null),E.value!=null&&(clearInterval(E.value),E.value=null),A.value!=null&&(clearInterval(A.value),A.value=null),L.value!=null&&(clearInterval(L.value),L.value=null),P.value.length>0){for(let bt of P.value)clearInterval(bt);P.value=[]}U.isWidget?ne.value=N.value.find(bt=>bt.name===mt)||N.value[1]:ne.value=N.value.find(bt=>bt.name===mt)||N.value[0]}t.onMounted(()=>{Ce(),t.nextTick(()=>{U.isSynchronization&&et("Táctica Fija")})}),t.onBeforeUnmount(()=>{if(H&&H.disconnect(),C.value!=null&&(clearInterval(C.value),C.value=null),E.value!=null&&(clearInterval(E.value),E.value=null),A.value!=null&&(clearInterval(A.value),A.value=null),L.value!=null&&(clearInterval(L.value),L.value=null),P.value.length>0){for(let mt of P.value)clearInterval(mt);P.value=[]}n8()});function tt(mt){if(mt.playingAs||(mt.playingAs=Q.value?mt.home_team.team_id===Q.value?1:2:0),C.value!=null&&(clearInterval(C.value),C.value=null),E.value!=null&&(clearInterval(E.value),E.value=null),A.value!=null&&(clearInterval(A.value),A.value=null),L.value!=null&&(clearInterval(L.value),L.value=null),P.value.length>0){for(let bt of P.value)clearInterval(bt);P.value=[]}r.value=mt,mt.is_live&&mt.game_status===4?t8():a8()}function ht(mt){q.value=mt.map(bt=>{const It={...bt};return Q.value&&(It.playingAs=It.home_team.team_id===Q.value?1:2),It})}return(mt,bt)=>(t.openBlock(),t.createElementBlock("div",{class:"game-data",ref_key:"gamedata",ref:Z},[t.createElementVNode("div",OGt,[t.withDirectives(t.createElementVNode("div",DGt,[t.createVNode(t.unref(TA),{"current-season-id":e.currentSeasonId,"tournaments-ids-to-include":e.tournamentsIdsToInclude,"api-url":e.tournamentSelectProps?void 0:e.tournamentsApiUrl,items:e.tournamentSelectProps?e.tournamentSelectProps.items:void 0,"default-item-by-prop":e.tournamentSelectProps?e.tournamentSelectProps.defaultItemByProp:void 0,"list-height":"370px","are-female-visible":e.areFemaleTournamentsVisible,"is-clubes-active":e.isClubes,"is-female-mode":e.isFemaleMode,token:e.token,onInput:Le,onChangeTournaments:Le},null,8,["current-season-id","tournaments-ids-to-include","api-url","items","default-item-by-prop","are-female-visible","is-clubes-active","is-female-mode","token"]),t.createVNode(t.unref(MA),{"current-season-id":e.currentSeasonId,"list-height":"370px",seasons:a.value.seasons,onInput:qe},null,8,["current-season-id","seasons"])],512),[[t.vShow,e.areTournamentAndSeasonSelectsVisible]]),t.createElementVNode("div",NGt,[t.createVNode(t.unref(Pee),{"plays-live":M.value,"info-live":S.value,token:k.value,is_captured:_.value,"await-for-seasons":"",seasons:X.value,"is-pagination-visible":!1,"are-games-carousel-type":"","default-game-id":e.defaultGameId,"sort-calendar":e.sortCalendar,"is-team-game-per-page":e.isTeamGamePerPage,"client-privileges-team-id":Q.value,"only-games-team-id":Q.value,"tournament-type":t.unref(s).state.gameGlobal.tournamentType,"provider-id":t.unref(s).getters.getProviderId,"is-dev-apis":t.unref(s).getters.getIsDevApis,onChangeGameCarousel:tt,onOpenModalEvent:Se,onChangeGamesByClientPrivileges:ht},null,8,["plays-live","info-live","token","is_captured","seasons","default-game-id","sort-calendar","is-team-game-per-page","client-privileges-team-id","only-games-team-id","tournament-type","provider-id","is-dev-apis"])])]),p.value?(t.openBlock(),t.createBlock(mN,{key:0,width:$.value,onCloseModalEventsLive:ce,plays:M.value,game:r.value,type:z.value},null,8,["width","plays","game","type"])):t.createCommentVNode("",!0),t.createElementVNode("div",FGt,[r.value&&"live_stats"in r.value&&r.value.live_stats==0&&r.value.game_status==0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[$.value>500?(t.openBlock(),t.createElementBlock("div",RGt,bt[0]||(bt[0]=[t.createElementVNode("div",{class:"no-stats-content"},[t.createElementVNode("h2",{class:"no-stats-title"}," Este partido se publicará en un plazo de hasta 72 horas después de finalizada la jornada. ")],-1)]))):(t.openBlock(),t.createElementBlock("div",VGt,bt[1]||(bt[1]=[t.createElementVNode("div",{class:"no-stats-content"},[t.createElementVNode("h2",{class:"no-stats-title"}," Este partido se publicará en un plazo de hasta 72 horas después de finalizada la jornada. ")],-1)])))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createElementVNode("div",jGt,[t.createElementVNode("div",UGt,[t.createVNode(t.unref(XS),{type:2,buttons:Ze.value,"font-family":"Poppins-Regular","font-size":"16px",width:$.value<400||$.value<700?"max-content":$.value<840||$.value<1050?"155px":"165px","selected-option":ne.value.name,borderWidth:"1px",arrow:!1,height:"30px",onInput:et},null,8,["buttons","width","selected-option"])])]),Me.value&&Me.value.gameId?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(ne.value.componentName),{key:G.value,game:Me.value,"is-widget":e.isWidget,"team-widget":e.teamWidget,onIntervalidpossesion:ie,onIntervalidhighlive:se,onIntervalidtops:pe,onIntervalidgs:re,subsection:t.unref(K),seasonSelected:v.value,tournamentSelected:a.value,showLineups:T.value,socket:e.socket,"time-live-prominent-data":x,"time-live-highlights-prominent-and-video":h,"time-live-possesion":n,"time-live-video-goals":i,"time-live-video-best-plays":c,"time-live-video-this-game":l,"time-live-video-specific-plays":d,"time-live-comparative-best-players":g,"time-live-comparative-avanced":w,is_captured:_.value,"is-tactic-visible":!!v.value.show_tactic,"is-synchronization":e.isSynchronization,"can-play-videos":Be.value?Be.value.canPrivilegesTeamPlayVideos:!0,"video-privileges-playing-as":I.value,"client-privileges-team-id":Q.value,"play-videos-privileges":Be.value,token:k.value,"game-events-interval-minutes":e.gameEventsIntervalMinutes,"volumetric-field-interval-minutes":e.volumetricFieldIntervalMinutes,"chalkboard-interval-minutes":e.chalkboardIntervalMinutes,"is-female-mode":e.isFemaleMode,"provider-id":t.unref(s).getters.getProviderId,"is-dev-apis":t.unref(s).getters.getIsDevApis,onResetSubsection:Ne,onOpenmedia:ge,onOnOpenProfile:Ae,onOpenProfileTeam:ke,onOpenProfilePlayer:je,onChangeToTab:De,onOpenMediaPlayer:ge,onIntervalid:he},null,40,["game","is-widget","team-widget","subsection","seasonSelected","tournamentSelected","showLineups","socket","is_captured","is-tactic-visible","is-synchronization","can-play-videos","video-privileges-playing-as","client-privileges-team-id","play-videos-privileges","token","game-events-interval-minutes","volumetric-field-interval-minutes","chalkboard-interval-minutes","is-female-mode","provider-id","is-dev-apis"])):t.createCommentVNode("",!0)],64))])],512))}}),[["__scopeId","data-v-2b1731fe"]]);async function wW({seasonId:e,providerId:o,isDevApis:s},B=!0){try{const U=`https://golstats-microservices.s3-us-west-2.amazonaws.com/statsLeagueBySeason-${e}.json`;return(await(await fetch(qy(U,o))).json()).data}catch(U){if(B)return wW({seasonId:e,providerId:o,isDevApis:s},!1);throw new Error(U)}}async function ZGt({seasonId:e,providerId:o,isDevApis:s}){try{return(await Uu({url:`https://iwxfzq6e2h.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsLeagueBySeason/${e}`,providerId:o,isDevApis:s})).data.data}catch(B){return Promise.reject(B)}}async function WGt({seasonId:e,providerId:o,isDevApis:s}){try{return(await Uu({url:`https://sqf4rkvoge.execute-api.us-west-2.amazonaws.com/prod/v3/statisticsGroupedBySeason/${e}`,providerId:o,isDevApis:s})).data.data}catch(B){return Promise.reject(B)}}function qGt(e,o,s,B,U,m,y=!1){const a=s.map(v=>v===1?2:v===2?1:3);return e.filter(v=>{const p=m&&v[U.teamId]?v[U.teamId]!==m:!1,r=o===1?2:1;return(y||B.includes(v[U.gameId]))&&(!o||(p?r:o)===v[U.playingAs])&&(s.includes(v[U.matchResult])&&v[U.teamId]===m||a.includes(v[U.matchResult])&&v[U.teamId]!==m)})}function kW(e,o,s,B,U){return o.length===2&&s.length===3&&B.length===6?e:e.filter(m=>o.includes(m[U.playingAs])&&s.includes(m[U.matchResult])&&B.includes(m[U.section]))}async function SW({seasonId:e,providerId:o,isDevApis:s}){try{const B=`https://8tvo5bp9ai.execute-api.us-west-2.amazonaws.com/prod/gamesBySeason/${e}`;return(await Uu({url:B,providerId:o,isDevApis:s})).data}catch(B){return Promise.reject(B)}}async function JGt({seasonId:e,gameId:o,providerId:s,isDevApis:B}){try{const U=`https://iwxfzq6e2h.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsLeagueBySeason/${e}/games/${o}`,{data:m}=await Uu({url:U,providerId:s,isDevApis:B});return m}catch(U){return Promise.reject(U)}}async function YGt({gameId:e,providerId:o,isDevApis:s}){try{const B=`https://2uj7ojhmt5.execute-api.us-west-2.amazonaws.com/prod/V2/statisticsLive/${e}`;return(await Uu({url:B,providerId:o,isDevApis:s})).data.data}catch(B){return Promise.reject(B)}}async function XGt({gameId:e,providerId:o,isDevApis:s}){try{const B=`https://55sbpmq0f5.execute-api.us-west-2.amazonaws.com/prod/specialMentions/${e}`;return(await Uu({url:B,providerId:o,isDevApis:s})).data.data||[]}catch(B){return Promise.reject(B)}}const $Gt=["categoryId","matchLapse","section","matchResult","playingAs","total"];let lA=null;function CW(){return lA||(lA=Yy($Gt)),lA}async function KGt(e){try{const o=`https://d2oco6mqmc.execute-api.us-west-2.amazonaws.com/prod/teamsBySeason/${e.seasonId}`;return(await Uu({url:o,providerId:e.providerId,isDevApis:e.isDevApis})).data}catch(o){return Promise.reject(o)}}async function TW({seasonId:e,teamId:o,providerId:s,isDevApis:B}){try{return await Uu({url:`https://a4dcb6avog.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsTeamBySeason/${e}/${o}`,providerId:s,isDevApis:B})}catch(U){return Promise.reject(U)}}async function QGt(e){try{const o=`https://yjeig444bb.execute-api.us-west-2.amazonaws.com/prod/teamsBySeason/${e.seasonId}`;return await Uu({url:o,providerId:e.providerId,isDevApis:e.isDevApis})}catch(o){return Promise.reject(o)}}async function eHt(e){try{return await Uu({url:`https://nckawv8v3b.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsByGame/${e.gameId}`,providerId:e.providerId,isDevApis:e.isDevApis})}catch(o){return Promise.reject(o)}}const tHt={leagueGeneral:{namespaced:!0,state:{seasonPlays:[],currentSeasonGames:[],currentSeasonTeams:[],selectedRound:1,booleanAreLiveGames:!1,booleanIsLiveGamesModalOpen:!1},getters:{seasonPlays:e=>e.seasonPlays,filteredPlaysStack(e,o,s,B){return qGt(e.seasonPlays,B["filterGeneral/getPlayingAs"],B["filterGeneral/getResults"],B["filterGeneral/getSelectedGamesIds"],CW(),B["teamsGeneral/team"].team_id,!0)},nextGamesSchedule(e){const o=e.currentSeasonGames.reduce((s,B)=>{const U={...B};return U.home_team=e.currentSeasonTeams.find(m=>m.team_id===B.home_team),U.visiting_team=e.currentSeasonTeams.find(m=>m.team_id===B.visiting_team),s[B.matchday_abbreviation]?s[B.matchday_abbreviation][B.game_status===3?"canceled":B.date]?s[B.matchday_abbreviation][B.game_status===3?"canceled":B.date].push(U):s[B.matchday_abbreviation][B.game_status===3?"canceled":B.date]=[U]:s[B.matchday_abbreviation]={[B.game_status===3?"canceled":B.date]:[U]},s},{});for(let[s,B]of Object.entries(o))o[s]=Object.entries(B).map(([U,m])=>({date:U,games:m})),o[s].sort((U,m)=>U.date<m.date?-1:U.date>m.date?1:0);return o},matchdaysDates(e,o){let s=[];if(o.nextGamesSchedule){let B=Object.keys(o.nextGamesSchedule);for(let U of B){let m=Number(U.replace("M","")),y=o.nextGamesSchedule[U].map(a=>({matchday:m,date:new Date(a.date)}));s=s.concat(y)}}return s},closestMatchDay(e,o){let s=new Date,B=0,U=-new Date(0,0,0).valueOf(),m=o.matchdaysDates,y=m.length;for(let a=0;a<m.length;a++)B=Math.abs(m[a].date-s),B<U&&(y=a,U=B);return m[y]?m[y].matchday:1}},mutations:{setBooleanIsLiveGamesModalOpen(e,o){e.booleanIsLiveGamesModalOpen=o},setBooleanAreLiveGames(e,o){e.booleanAreLiveGames=o},updateSeasonPlays(e,o){e.seasonPlays=o},updateCurrentSeasonTeams(e,o){e.currentSeasonTeams=o},updateCurrentSeasonGames(e,o){e.currentSeasonGames=o},updateSelectedRound(e,o){e.selectedRound=o}},actions:{async getSeasonPlays({commit:e,rootGetters:o},s=!1){try{const B=o.getProviderId,U=o.getIsDevApis,m=await wW({seasonId:o["filterGeneral/getSeasonId"],providerId:B,isDevApis:U});if(s)return m;e("updateSeasonPlays",m)}catch(B){return Promise.reject(B)}},async getCurrentSeasonGames({commit:e,rootGetters:o}){try{const s=o.getProviderId,B=o.getIsDevApis,U=await SW({seasonId:o["loginGeneral/seasonId"],providerId:s,isDevApis:B});e("updateCurrentSeasonGames",U)}catch(s){return Promise.reject(s)}},async getCurrentSeasonTeams({commit:e,rootGetters:o}){try{const s=o.getProviderId,B=o.getIsDevApis,U=await KGt({seasonId:o["loginGeneral/seasonId"],providerId:s,isDevApis:B});e("updateCurrentSeasonTeams",U.teams)}catch(s){return Promise.reject(s)}},async isDataFilled({state:e,dispatch:o,commit:s}){try{if(e.currentSeasonGames.length>0&&e.currentSeasonTeams.length>0)return s("setIsSectionLoading",!1,{root:!0}),!0;const B=[void 0,void 0];return e.currentSeasonGames.length===0&&(B[0]=o("getCurrentSeasonGames")),e.currentSeasonTeams.length===0&&(B[1]=o("getCurrentSeasonTeams")),await Promise.all(B),!1}catch(B){throw new Error(B)}}}}};async function aHt({filter:e,providerId:o,isDevApis:s}){try{const B=`https://n7ielynjxk.execute-api.us-east-2.amazonaws.com/qa/filters?filters=${e}`,{data:U}=await Uu({url:B,providerId:o,isDevApis:s});return U}catch(B){return Promise.reject(B)}}const rHt=["categoryId","teamId","matchResult","playingAs","matchLapse","section","total"];let cA=null;function nHt(){return cA||(cA=Yy(rHt)),cA}const uA=6;let AW=uA;function iHt(e){AW=Math.max(uA,Number(e)||uA)}class Uw{constructor(){_u(this,"maximumLiveSection",1);_u(this,"accomplished",{totalPostGame:0,avgPostGame:0,avgPreGame:0,totalLive:0,avgPostGameTrendLive:{accumulated:this.getZeroTotalsTrendSections(),sections:this.getZeroTotalsTrendSections()},totalsLiveTrendLive:{accumulated:this.getZeroTotalsTrendSections(),sections:this.getZeroTotalsTrendSections()},ranking:null,leader:{},arrayRankings:[]});_u(this,"received",{totalPostGame:0,avgPostGame:0,totalLive:0,avgPostGameTrendLive:{accumulated:this.getZeroTotalsTrendSections(),sections:this.getZeroTotalsTrendSections()},totalsLiveTrendLive:{accumulated:this.getZeroTotalsTrendSections(),sections:this.getZeroTotalsTrendSections()},ranking:null,leader:{}})}setMaximumLiveSection(o){o>this.maximumLiveSection&&(this.maximumLiveSection=o)}getZeroTotalsTrendSections(){return new Array(AW).fill(0)}resetTotals(){this.accomplished.totalPostGame=0,this.accomplished.avgPostGame=0,this.received.totalPostGame=0,this.received.avgPostGame=0,this.accomplished.avgPostGameTrendLive.sections=this.getZeroTotalsTrendSections(),this.accomplished.avgPostGameTrendLive.accumulated=this.getZeroTotalsTrendSections(),this.received.avgPostGameTrendLive.sections=this.getZeroTotalsTrendSections(),this.received.avgPostGameTrendLive.accumulated=this.getZeroTotalsTrendSections()}resetTotalsLive(){this.accomplished.totalLive=0,this.received.totalLive=0,this.accomplished.totalsLiveTrendLive.sections=this.getZeroTotalsTrendSections(),this.accomplished.totalsLiveTrendLive.accumulated=this.getZeroTotalsTrendSections(),this.received.totalsLiveTrendLive.sections=this.getZeroTotalsTrendSections(),this.received.totalsLiveTrendLive.accumulated=this.getZeroTotalsTrendSections()}increaseAccomplishedByOne(o,s,B){B&&(this.setMaximumLiveSection(o),this.accomplished.totalLive+=s,this.accomplished.totalsLiveTrendLive.sections[o-1]+=s,this.increaseTrendLiveAccumulatedByOne(this.accomplished.totalsLiveTrendLive,o,s)),this.accomplished.totalPostGame+=s,this.accomplished.avgPostGameTrendLive.sections[o-1]+=s,this.increaseTrendLiveAccumulatedByOne(this.accomplished.avgPostGameTrendLive,o,s)}increaseReceivedByOne(o,s,B){B&&(this.setMaximumLiveSection(o),this.received.totalLive+=s,this.received.totalsLiveTrendLive.sections[o-1]+=s,this.increaseTrendLiveAccumulatedByOne(this.received.totalsLiveTrendLive,o,s)),this.received.totalPostGame+=s,this.received.avgPostGameTrendLive.sections[o-1]+=s,this.increaseTrendLiveAccumulatedByOne(this.received.avgPostGameTrendLive,o,s)}increaseTrendLiveAccumulatedByOne(o,s,B){for(;o.accumulated.length<s;)o.accumulated.push(0);for(let U=s-1;U<o.accumulated.length;U++)o.accumulated[U]+=B}decreaseAccomplishedLiveByOne(o,s){this.accomplished.totalLive>0&&(this.accomplished.totalLive-=s),this.accomplished.totalsLiveTrendLive.sections[o-1]>0&&(this.accomplished.totalsLiveTrendLive.sections[o-1]-=s,this.decreaseTotalsLiveTrendLiveAccumulatedByOne(this.accomplished.totalsLiveTrendLive,o,s))}decreaseReceivedLiveByOne(o,s){this.received.totalLive>0&&(this.received.totalLive-=s),this.received.totalsLiveTrendLive.sections[o-1]>0&&(this.received.totalsLiveTrendLive.sections[o-1]-=s,this.decreaseTotalsLiveTrendLiveAccumulatedByOne(this.received.totalsLiveTrendLive,o,s))}decreaseTotalsLiveTrendLiveAccumulatedByOne(o,s,B){for(let U=o.accumulated.length-1;U>=s-1;U--)o.accumulated[U]-=B}calculateAvg(o){o&&(this.accomplished.avgPostGame=this.accomplished.totalPostGame/o,this.received.avgPostGame=this.received.totalPostGame/o,this.accomplished.avgPostGameTrendLive.sections=this.getAvgPostGameTrendLiveAvg(this.accomplished.avgPostGameTrendLive.sections,o),this.accomplished.avgPostGameTrendLive.accumulated=this.getAvgPostGameTrendLiveAvg(this.accomplished.avgPostGameTrendLive.accumulated,o),this.received.avgPostGameTrendLive.sections=this.getAvgPostGameTrendLiveAvg(this.received.avgPostGameTrendLive.sections,o),this.received.avgPostGameTrendLive.accumulated=this.getAvgPostGameTrendLiveAvg(this.received.avgPostGameTrendLive.accumulated,o))}getAvgPostGameTrendLiveAvg(o,s){return o.map(B=>B/s)}calculateRanking(o,s,B,U,m,y,a,v){let p=[];U===3&&o&&o.length&&(B.playingAs.length!==2||B.matchResult.length!==3)?p=Array.from(o.reduce((_,b)=>{const x=b[s.playingAs]===1,h=x?"1":"2",n=_.get(b[s.gameId]);if(n)n[h]?n[h].arrayPlays.push(b):n[h]={numberTeamId:b[s.teamId],arrayPlays:[b]};else{const i={numberMatchResult:b[s.matchResult]};x&&(i[1]={numberTeamId:b[s.teamId],arrayPlays:[b]}),_.set(b[s.gameId],i)}return _},new Map).values()).reduce((_,b)=>{const x=B.playingAs.length===2?"both":B.playingAs[0].toString();return(x==="both"&&(b[1].numberTeamId===B.teamId||b[2].numberTeamId===B.teamId)||x!=="both"&&b[x].numberTeamId===B.teamId)&&B.matchResult.includes(b.numberMatchResult)&&_.push(...b[1].arrayPlays,...b[2].arrayPlays),_},[]).filter(_=>B.sections.includes(_[s.section])):(p=o?[...o]:[],a&&o&&(p=o.filter(r=>B.playingAs.includes(r[s.playingAs])&&B.matchResult.includes(r[s.matchResult])&&B.sections.includes(r[s.section])))),this.setTeamRanking(p,U,s,B.teamId,y,"accomplished",v)}setTeamRanking(o,s,B,U,m,y,a){let v=null,p=null;s===3&&(v=new Map,p={},o.forEach(b=>{const x=v.get(b[B.gameId]);x?x[b[B.teamId.toString()]]?x[b[B.teamId.toString()]]+=b[B.total]:x[b[B.teamId.toString()]]=b[B.total]:v.set(b[B.gameId],{[b[B.teamId.toString()]]:b[B.total]})}),Array.from(v.values()).forEach(b=>{const[x,h]=Object.keys(b).map(i=>i),n=b[x]+b[h];this.addPassesAvgByTeam(p,x,n?b[x]/n:0),this.addPassesAvgByTeam(p,h,n?b[h]/n:0)}));const r=m.sort((b,x)=>b.team_id-x.team_id).map(b=>{if(s===3){const x=p[b.team_id.toString()];return{teamId:b.team_id,points:x?x.numberTotalPassesAvg/x.numberGamesCount:0,total:x?x.numberTotalPassesAvg:0}}else{const x=o.reduce((h,n)=>n[B.teamId]===b.team_id&&s===n[B.categoryId]?h+n[B.total]:h,0);return{teamId:b.team_id,points:b[`${a}FilterGames`]?x/b[`${a}FilterGames`]:0,total:x}}}).sort((b,x)=>x.points-b.points);this.accomplished.arrayRankings=r;const _=r.findIndex(b=>b.teamId===U);s===3&&(this.accomplished.avgPreGame=r[_].points),this[y].ranking=_+1,this[y].leader=r[0]}addPassesAvgByTeam(o,s,B){o[s]?(o[s].numberGamesCount+=1,o[s].numberTotalPassesAvg+=B):o[s]={numberGamesCount:1,numberTotalPassesAvg:B}}}class oHt{constructor(o,s,B,U,m,y,a,v,p,r,_=!0){_u(this,"id","");_u(this,"generalId",0);_u(this,"name","");_u(this,"names",{"0-0":"","1-1":"","0-1":"","1-0":""});_u(this,"mentions",{"0-0":"","1-1":"","0-1":"","1-0":""});_u(this,"accomplishedCategoryIds",[]);_u(this,"receivedCategoryIds",[]);_u(this,"generalCategoriesIds",{accomplished:0,received:0});_u(this,"specialMention","");_u(this,"homeTeam",new Uw);_u(this,"visitingTeam",new Uw);_u(this,"isLeagueDataCalculated",!1);_u(this,"leagueAccomplishedMax",0);_u(this,"leagueReceivedMax",0);_u(this,"leagueAccomplishedAvg",0);_u(this,"leagueReceivedAvg",0);_u(this,"leagueAccomplishedAccumulator",0);_u(this,"leagueReceivedAccumulator",0);_u(this,"homeTeamType","homeTeam");_u(this,"visitingTeamType","visitingTeam");_u(this,"betOnly",!1);_u(this,"isPercent",!1);this.id=`${B.accomplished}-${B.received}`,this.accomplishedCategoryIds=o||[],this.receivedCategoryIds=s||[],this.generalCategoriesIds=B||{accomplished:0,received:0},this.name=U,this.names["0-0"]=U||"",this.names["1-1"]=m||"",this.names["0-1"]=y||"",this.names["1-0"]=a||"",this.generalId=v||0,this.betOnly=p||!1,this.isPercent=r||!1,this.isVisible=_}addLeaguePlays(o,s,B){o.length===0||!B||this.isLeagueDataCalculated||(o.forEach(U=>{this.isAccomplishedLeaguePlay(U[s.categoryId])&&(this.leagueAccomplishedAccumulator+=U[s.total]),this.isReceivedLeaguePlay(U[s.categoryId])&&(this.leagueReceivedAccumulator+=U[s.total])}),this.leagueAccomplishedAvg=(this.leagueAccomplishedAccumulator/(2*B)).toFixed(2),this.leagueAccomplishedMax=Math.round(this.leagueAccomplishedAvg*1.5),this.leagueReceivedAvg=(this.leagueReceivedAccumulator/(2*B)).toFixed(2),this.leagueReceivedMax=Math.round(this.leagueReceivedAvg*1.5),this.isLeagueDataCalculated=!0)}addSpecialMention(o,s,B){let U="-";for(const[m,y]of Object.entries(this.generalCategoriesIds))o===y&&(U=`${m==="accomplished"?"0":"1"}${U}`),s===y&&(U=`${U}${m==="accomplished"?"0":"1"}`);U.length===3&&(this.mentions[U]=B)}resetMentions(){this.mentions={"0-0":"","1-1":"","0-1":"","1-0":""}}addTeamPlays(o,s,B,U,m){!B||!m||o!==this.homeTeamType&&o!==this.visitingTeamType||(B.forEach(y=>{this.isAccomplishedPlay(y[U.categoryId])?this[o].increaseAccomplishedByOne(y[U.section],y[U.total]):this.isReceivedPlay(y[U.categoryId])&&this[o].increaseReceivedByOne(y[U.section],y[U.total])}),this[o].calculateAvg(m))}addLivePlay(o,s,B,U,m=!1,y=!1){(o===this.homeTeamType||o===this.visitingTeamType)&&B[U.categoryId].includes(this.generalCategoriesIds.accomplished)&&this[o].increaseAccomplishedByOne(B[U.section],B[U.total],!0)}subtractLivePlay(o,s,B,U,m){(o===this.homeTeamType||o===this.visitingTeamType)&&(this.isAccomplishedPlay(B[U.categoryId])&&!m?this[o].decreaseAccomplishedLiveByOne(B[U.section],B[U.total]):this.isReceivedPlay(B[U.categoryId])&&m&&this[o].decreaseReceivedLiveByOne(B[U.section],B[U.total]))}isAccomplishedLeaguePlay(o){return!!(this.receivedCategoryIds[0]===40?this.receivedCategoryIds:this.accomplishedCategoryIds).find(B=>o===B||`${o}_r`===B)}isReceivedLeaguePlay(o){return!!this.receivedCategoryIds.find(s=>o===s)}isAccomplishedPlay(o){return this.generalCategoriesIds.accomplished===o}isReceivedPlay(o){return this.generalCategoriesIds.received===o}calcRankingLeague(o,s,B,U,m,y=!1){this[this.homeTeamType].calculateRanking(o,s,B,this.generalCategoriesIds.accomplished,this.generalCategoriesIds.received,m,y,this.homeTeamType),this[this.visitingTeamType].calculateRanking(o,s,U,this.generalCategoriesIds.accomplished,this.generalCategoriesIds.received,m,y,this.visitingTeamType)}resetData(){this.homeTeam=new Uw,this.visitingTeam=new Uw,this.isLeagueDataCalculated=!1,this.leagueAccomplishedMax=0,this.leagueReceivedMax=0,this.leagueAccomplishedAvg=0,this.leagueReceivedAvg=0,this.leagueAccomplishedAccumulator=0,this.leagueReceivedAccumulator=0}isInGeneralCategory(o){return this.generalCategoriesIds.accomplished===o||this.generalCategoriesIds.received===o}}function sHt(e){for(const o of Object.values(e))for(let s of Object.keys(o.subcategories)){const B=o.subcategories[s];o.subcategories[s]=new oHt(B.accomplishedCategoryIds,B.receivedCategoryIds,B.generalCategoriesIds,B.accomplishedName,B.receivedName,B.accomplishedReceivedName,B.receivedAccomplishedName,B.generalId,B.betOnly,B.isPercent,B.isVisible===void 0?!0:B.isVisible)}return e}const lHt=[{parentAnalysis:[1,2,3],value:0,text:"Realizado",block:1},{parentAnalysis:[1,2,3],value:1,text:"Recibido",block:1},{parentAnalysis:[1],value:0,text:"Posesión",block:2},{parentAnalysis:[1,2],value:0,text:"Origen de gol realizado",block:3},{parentAnalysis:[1,2],value:1,text:"Origen de gol recibido",block:3}],cHt=["teamId","categoryId","matchlapse","section","matchResult","playingAs","total","gameId"];let dA=null;function uHt(){return dA||(dA=Yy(cHt)),dA}const dHt=["playId","gameId","teamId","playerId","momentOfPlay","categoryId","categoryType","matchLapse","section","matchResult","playingAs","total","coordinate1X","coordinate1Y","coordinate2X","coordinate2Y","coordinate3X","coordinate3Y"];let hA=null;function hHt(){return hA||(hA=Yy(dHt)),hA}function Gw(e,o,s){return[s.get(e[o.categoryId])||[],e[o.teamId],e[o.matchResult],e[o.playingAs],e[o.matchLapse],e[o.section],e[o.total]]}function EW(e){return[[1,1,e.local.win],[1,2,e.local.lose],[1,3,e.local.draw],[2,1,e.visit.win],[2,2,e.visit.lose],[2,3,e.visit.draw]]}function pA(e,o,s){let B=[...o];return e[s.categoryId]===2&&(B[0]=14),e[s.categoryId]===20&&(B[0]=15),[14,15].includes(B[0])?B:null}function MW(e){const o=e.indexesTSP.section;let s=0;for(const B of[e.homeTeamPlays,e.visitingTeamPlays])if(Array.isArray(B))for(const U of B){const m=U[o];m>s&&(s=m)}iHt(s)}const pHt=e8(),fHt=[{name:"Liga MX",id:1},{name:"Liga MX Femenil",id:1001},{name:"Liga Expansión MX",id:1071}],mHt={nextGeneral:{namespaced:!0,state:{seasonId:0,pastSeasonId:0,usePastSeasonId:!1,isSocketConnected:!1,indexesLP:CW(),indexesTSP:nHt(),indexesLS:uHt(),indexesTLP:hHt(),nextGamesDataStructure:{},currentSeasonGames:[],currentSeasonTeams:[],gameForAnalysis:{},showPostMatch:!1,homeResultGame:null,awayResultGame:null,selectedAnalysis:{},selectedStatisticTypeBlock:1,gameId:null,game:{},games:[],homeTeamPlays:[],visitingTeamPlays:[],currentSeasonPlays:[],livePlays:new Map,totalSeasonFinishedGames:0,totalHomeTeamFinishedGames:0,totalVisitingTeamFinishedGames:0,homeGames:[],homeTeamInfo:{},awayTeamInfo:{},visitingGames:[],idAssetSelected:1,isLive:!1,menuOptionActive:"",showLiveData:!0,showAdvanceFilter:!1,homeTeamFilter:{teamId:0,statistics:0,playingAs:[],matchResult:[],sections:[],requiresPlaysFiltering:!0},visitingTeamFilter:{teamId:0,statistics:0,playingAs:[],matchResult:[],sections:[],requiresPlaysFiltering:!0},oldSeasonId:0,statistics:[],isRankingCalculating:!0,categoriesMap:new Map,defaultFilter:null,filterAux:null,betSubcategories:[],betDescription:{},regularSeasonName:"",betSubcategoriesObjects:[],currentTournamentName:"",toBackRouteName:"home"},getters:{betSubcategoriesIds(e){return e.betSubcategories.map(o=>o.id)},showPostMatchData:e=>e.showPostMatch,getHomeResultGame:e=>e.homeResultGame,getAwayResultGame:e=>e.awayResultGame,getSeasonId:e=>e.seasonId,getGameForAnalysis:e=>e.gameForAnalysis,isLive:e=>e.isLive,showLive:e=>e.gameForAnalysis.game_status===4&&e.gameForAnalysis.is_live,menuOptionActive:e=>e.menuOptionActive,showLiveData:e=>e.showLiveData,showAdvanceFilter:e=>e.showAdvanceFilter,idAssetSelected:e=>e.idAssetSelected,gameId:e=>e.gameId,game:e=>e.game,homeTeam(e){return e.homeTeamInfo},visitingTeam(e){return e.awayTeamInfo},rankingData(e){return e.statistics},homeTeamStatisticsType(e){return e.homeTeamFilter.statistics?"received":"accomplished"},visitingTeamStatisticsType(e){return e.visitingTeamFilter.statistics?"received":"accomplished"},subcategoryName(e){return`${e.homeTeamFilter.statistics}-${e.visitingTeamFilter.statistics}`},statisticsTypes(e){return lHt.filter(o=>o.parentAnalysis.includes(e.selectedAnalysis.id))},homeTeamFilteredPlays(e){if(e.homeTeamFilter.requiresPlaysFiltering)return kW(e.homeTeamPlays,e.homeTeamFilter.playingAs,e.homeTeamFilter.matchResult,e.homeTeamFilter.sections,e.indexesTSP)},visitingTeamFilteredPlays(e){if(e.visitingTeamFilter.requiresPlaysFiltering)return kW(e.visitingTeamPlays,e.visitingTeamFilter.playingAs,e.visitingTeamFilter.matchResult,e.visitingTeamFilter.sections,e.indexesTSP)},currentSeasonTeamsIds(e){return e.currentSeasonTeams.map(o=>o.team_id)},canFilledStructure(e){return e.homeTeamFilter.requiresPlaysFiltering||e.visitingTeamFilter.requiresPlaysFiltering},totalFilteredHomeGames(e){return e.homeGames.filter(o=>e.homeTeamFilter.playingAs.includes(o[0])).filter(o=>e.homeTeamFilter.matchResult.includes(o[1])).reduce((o,s)=>o+s[2],0)},totalFilteredVisitingGames(e){return e.visitingGames.filter(o=>e.visitingTeamFilter.playingAs.includes(o[0])).filter(o=>e.visitingTeamFilter.matchResult.includes(o[1])).reduce((o,s)=>o+s[2],0)},filledDataStructure(e,o){if(e.currentSeasonPlays)for(const s of Object.values(e.nextGamesDataStructure))for(const B of Object.values(s.subcategories))e.homeTeamFilter.requiresPlaysFiltering&&B.homeTeam.resetTotals(),e.visitingTeamFilter.requiresPlaysFiltering&&B.visitingTeam.resetTotals(),B.addLeaguePlays(e.currentSeasonPlays,e.indexesLP,e.totalSeasonFinishedGames),B.addTeamPlays(B.homeTeamType,e.gameForAnalysis.home_team,o.homeTeamFilteredPlays,e.indexesTSP,e.showPostMatch?1:o.totalFilteredHomeGames),B.addTeamPlays(B.visitingTeamType,e.gameForAnalysis.visiting_team,o.visitingTeamFilteredPlays,e.indexesTSP,e.showPostMatch?1:o.totalFilteredVisitingGames);return e.nextGamesDataStructure},arrayFilledDataSortedByPriority(e,o){return Object.values(o.filledDataStructure).sort((s,B)=>s.priority-B.priority)},statisticData(e,o){for(const s of Object.values(o.filledDataStructure))if(s.parentInfo.parentAnalysis.includes(e.selectedAnalysis.id)&&s.parentInfo.analysisTypeBlocks.includes(e.selectedStatisticTypeBlock))return s.subcategories;return{}},accomplished(e){return e.homeTeamFilter.statistics===0}},mutations:{updateNextGamesDataStructure(e,o){e.nextGamesDataStructure=o},updateGameForAnalysisByProps(e,o){for(const[s,B]of Object.entries(o))e.gameForAnalysis[s]=B},setCurrentTournamentName(e,o){e.currentTournamentName=o},setBetSubcategoriesObjects(e,o){e.betSubcategoriesObjects=o},setRegularSeasonName(e,o){e.regularSeasonName=o},setBetSubcategories(e,o){e.betSubcategories=o},setBetDescription(e,o){e.betDescription=o},setSeasonId(e,o){e.seasonId=Number(o)},setHome(e,o){e.homeTeamInfo=o},setAway(e,o){e.awayTeamInfo=o},setMenuOptionActive(e,o){e.menuOptionActive=o},setPastSeasonId(e,o){e.pastSeasonId=o},setUsePastSeasonId(e,o){e.usePastSeasonId=o,o&&(e.oldSeasonId=e.pastSeasonId)},updateShowPostMatchData(e,o){e.showPostMatch=o},setHomeResultGame(e,o){e.homeResultGame=o},setAwayResultGame(e,o){e.awayResultGame=o},updateIsSocketConnected(e,o){e.isSocketConnected=o,o&&e.gameForAnalysis.is_live&&e.gameForAnalysis.game_status===4&&e.gameForAnalysis.game_id&&r8(`game.${e.gameForAnalysis.game_id}.v2`)},updateCurrentSeasonTeams(e,o){e.currentSeasonTeams=o,e.currentSeasonTeams.forEach(s=>{s.playedGames=e.currentSeasonGames.reduce((B,U)=>{if(U.game_status===1&&(U.home_team===s.team_id||U.visiting_team===s.team_id)){const m=U.score[0]-U.score[1],y=U.home_team===s.team_id;B.push({playingAs:y?1:2,matchResult:m===0?3:y?m>0?1:2:m<0?1:2})}return B},[])})},updateCurrentSeasonGames(e,o){e.currentSeasonGames=o},updateGameId(e,o){e.gameId=o},updateGameForAnalysis(e,o){e.gameForAnalysis=o,e.isLive=!!o.is_live,e.homeTeamFilter.teamId=e.gameForAnalysis.home_team,e.visitingTeamFilter.teamId=e.gameForAnalysis.visiting_team,e.isSocketConnected&&o.is_live&&o.game_status===4&&o.game_id&&r8(`game.${o.game_id}.v2`)},updateSelectedAnalysis(e,o){e.selectedAnalysis=o},updateShowLiveData(e,o){e.showLiveData=o},toggleAdvanceFilter(e){e.showAdvanceFilter=!e.showAdvanceFilter},updateIdAssetSelected(e,o){e.idAssetSelected=o},updateStats(e,o){e.currentSeasonPlays=o},updateFilterAux(e){e.filterAux||(e.filterAux={homeTeamFilter:{...e.homeTeamFilter},visitingTeamFilter:{...e.visitingTeamFilter}})},updateFilters(e,{filters:o,needsFormat:s=!1}){if(s){if(!o||!o.local||!o.local.statistics||!o.visit||!o.visit.statistics)return;e.homeTeamFilter=kI(e.homeTeamFilter,o.local,e.gameForAnalysis.home_team),e.visitingTeamFilter=kI(e.visitingTeamFilter,o.visit,e.gameForAnalysis.visiting_team),e.selectedStatisticTypeBlock!==o.local.statistics.block&&(e.selectedStatisticTypeBlock=o.local.statistics.block)}else e.homeTeamFilter={...o.homeTeamFilter,statistics:0},e.visitingTeamFilter={...o.visitingTeamFilter,statistics:0}},updateFinishedGames(e,o){e.totalSeasonFinishedGames=o},updateHomeTeamPlays(e,o){e.homeTeamPlays=o,MW(e)},updateVisitingTeamPlays(e,o){e.visitingTeamPlays=o,MW(e)},addSpecialMentions(e,o){const s=Object.values(e.nextGamesDataStructure);s.forEach(B=>{for(const U of Object.values(B.subcategories))U.resetMentions()}),s.forEach(B=>{for(const U of o)for(const m of Object.values(B.subcategories))m.addSpecialMention(U[0],U[1],U[2])})},setDefaultFilter(e,o){e.defaultFilter={homeTeamFilter:{...o.homeTeamFilter,teamId:e.gameForAnalysis.home_team},visitingTeamFilter:{...o.awayTeamFilter,teamId:e.gameForAnalysis.visiting_team}}},addLiveGamePlay(e,o){if(!e.livePlays.has(o[e.indexesTLP.playId])){e.livePlays.set(o[e.indexesTLP.playId],o);const B=Gw(o,e.indexesTLP,e.categoriesMap);for(const U of Object.values(e.nextGamesDataStructure))for(const m of Object.values(U.subcategories))m.addLivePlay(e.gameForAnalysis.home_team===B[e.indexesTSP.teamId]?"homeTeam":"visitingTeam",B[e.indexesTSP.teamId],B,e.indexesTSP,e.isLive,!1)}},updateLiveGamePlay(e,o){const s=!!o[e.indexesTLP.length],B=e.livePlays.get(o[e.indexesTLP.playId]);if(qie(B,o))return;let U="";const m=e.gameForAnalysis.home_team===o[e.indexesTLP.teamId]?"homeTeam":"visitingTeam";B&&(U=e.gameForAnalysis.home_team===B[e.indexesTLP.teamId]?"homeTeam":"visitingTeam");const y=Gw(B,e.indexesTLP,e.categoriesMap),a=pA(B,y,e.indexesTLP),v=Gw(o,e.indexesTLP,e.categoriesMap),p=pA(o,v,e.indexesTLP);for(const r of Object.values(e.nextGamesDataStructure))for(const _ of Object.values(r.subcategories))B&&(_.subtractLivePlay(U,y[e.indexesTSP.teamId],y,e.indexesTSP,s),a&&_.subtractLivePlay(U,a[e.indexesTSP.teamId],a,e.indexesTSP,s)),_.addLivePlay(m,v[e.indexesTSP.teamId],v,e.indexesTSP,e.isLive,s),p&&_.addLivePlay(m,p[e.indexesTSP.teamId],p,e.indexesTSP,e.isLive,s);e.livePlays.set(o[e.indexesTLP.playId],o)},deleteLiveGamePlay(e,o){const s=!!o[e.indexesTLP.length],B=e.livePlays.get(o[e.indexesTLP.playId]);let U="";if(B){U=e.gameForAnalysis.home_team===B[e.indexesTLP.teamId]?"homeTeam":"visitingTeam",e.livePlays.delete(B[e.indexesTLP.playId]);const m=Gw(B,e.indexesTLP,e.categoriesMap),y=pA(o,m,e.indexesTLP);for(const a of Object.values(e.nextGamesDataStructure))for(const v of Object.values(a.subcategories))v.subtractLivePlay(U,m[e.indexesTSP.teamId],m,e.indexesTSP,s),y&&v.subtractLivePlay(U,y[e.indexesTSP.teamId],y,e.indexesTSP,s)}},clearLiveTotals(e){for(const o of Object.values(e.nextGamesDataStructure))for(const s of Object.values(o.subcategories))s.homeTeam.resetTotalsLive(),s.visitingTeam.resetTotalsLive()},updateSeasonStatistics(e,o){e.statistics=o},updateOldSeasonId(e,o){e.oldSeasonId=o},addRankingInSubcategories(e,{getters:o,isPremiumAccount:s}){if(!(e.homeTeamFilter.teamId&&e.visitingTeamFilter.teamId))return;e.isRankingCalculating=!1,e.currentSeasonTeams.forEach(m=>{m.homeTeamFilterGames=m.playedGames.filter(y=>e.homeTeamFilter.playingAs.includes(y.playingAs)&&e.homeTeamFilter.matchResult.includes(y.matchResult)).length,m.visitingTeamFilterGames=m.playedGames.filter(y=>e.visitingTeamFilter.playingAs.includes(y.playingAs)&&e.visitingTeamFilter.matchResult.includes(y.matchResult)).length});const B=[],U=new Map;for(const m of Object.values(e.nextGamesDataStructure))for(const y of Object.values(m.subcategories))B.push(y);o.rankingData.forEach(m=>{for(const y of B)if(y.isInGeneralCategory(m[e.indexesLS.categoryId])){U.has(y.id)?U.get(y.id).push(m):U.set(y.id,[m]);break}})},prepareCleanAllStatistics(e){e.homeTeamFilter.requiresPlaysFiltering=!0,e.visitingTeamFilter.requiresPlaysFiltering=!0},setHomeGames(e,o){e.homeGames=EW(o)},setVisitingGames(e,o){e.visitingGames=EW(o)},generateCategoriesMap(e){for(const o of Object.values(e.nextGamesDataStructure))for(const s of Object.values(o.subcategories))s.accomplishedCategoryIds.forEach(B=>{const U=e.categoriesMap.get(B);U?U.push(s.generalCategoriesIds.accomplished):e.categoriesMap.set(B,[s.generalCategoriesIds.accomplished])})},resetNextGamesDataStructure(e){for(const o of Object.values(e.nextGamesDataStructure))for(const s of Object.values(o.subcategories))s.resetData()}},actions:{async fillNextGameDataStructure({commit:e},{provider:o}){try{const s=await Kne(o),B=sHt(s);e("updateNextGamesDataStructure",B)}catch(s){return Promise.reject(s)}},turnOnOffDefaultFilters({state:e,commit:o},{command:s}){s==="on"?o("updateFilters",{filters:e.defaultFilter,needsFormat:!1}):o("updateFilters",{filters:e.filterAux,needsFormat:!1})},async setAndGetStatsPostMatch({commit:e,rootGetters:o},s){try{const a=o.getProviderId,v=o.getIsDevApis,p=await eHt({gameId:s.gameId,providerId:a,isDevApis:v});if(p){var B=[],U=[],m={season:0,total:0,visit:{total:0,draw:0,win:0,lose:0},played:0,local:{total:0,draw:0,win:0,lose:0}},y={season:0,total:0,visit:{total:0,draw:0,win:0,lose:0},played:0,local:{total:0,draw:0,win:0,lose:0}};if(Object.keys(p.data).length!==0){const r=_=>{const b=_.slice(),x=Number(b[0]);return Number.isNaN(x)||(b[0]=x),b};B=p.data.data.filter(_=>_[1]==s.homeTeam).map(r),U=p.data.data.filter(_=>_[1]==s.awayTeam).map(r),m=p.data.games,y=p.data.games}e("updateHomeTeamPlays",B),e("updateVisitingTeamPlays",U),e("setHomeGames",m),e("setVisitingGames",y)}else e("updateHomeTeamPlays",[]),e("updateVisitingTeamPlays",[])}catch(a){return Promise.reject(a)}},async fillStatisticDataPostMatch({commit:e,dispatch:o},s){e("prepareCleanAllStatistics"),e("updateHomeTeamPlays",[]),e("updateVisitingTeamPlays",[]),e("setIsSectionLoading",!0,{root:!0});try{let B=[];e("updateGameForAnalysis",s.gameInfo),B.push(o("setAndGetStatsPostMatch",{gameId:s.game,homeTeam:s.homeTeam,awayTeam:s.awayTeam})),await Promise.all(B)}catch(B){throw new Error(B)}finally{e("setIsSectionLoading",!1,{root:!0})}},async checkState({state:e,dispatch:o,commit:s,rootGetters:B},{gameId:U,isTeamsAnalysis:m,currentSeasonId:y,isLoginChanged:a=!1,defaultFilter:v=null,gameInfo:p=null,isCupGame:r=!1}){try{let _={},b=e.seasonId!==Number(y);const x=B.getProviderId;await o("fillNextGameDataStructure",{provider:x});const h=[];s("setIsSectionLoading",!0,{root:!0}),s("setUsePastSeasonId",!1),b&&s("setSeasonId",y),s("updateGameId",Number(U)),e.oldSeasonId!==e.seasonId&&s("resetNextGamesDataStructure");const n=await o("getCurrentSeasonGames",Number(U));if(s("leagueGeneral/updateCurrentSeasonGames",n,{root:!0}),_=n.find(i=>i.game_id===Number(U)),!_&&p&&(_=p),_&&p&&(_.game_status=_.game_status??p.game_status,_.is_live=_.is_live??p.is_live),_&&s("updateGameForAnalysis",_),_.game_status!==1&&((a||e.categoriesMap.size===0)&&s("generateCategoriesMap"),r||await o("checkTeamsData",{gameId:U,isFromBet:!!v}),(a||e.oldSeasonId!==e.seasonId||e.statistics.length===0)&&h.push(o("getSeasonStatistics"))),e.usePastSeasonId){const i=await o("getCurrentSeasonGamesLast");s("leagueGeneral/updateCurrentSeasonGames",i,{root:!0})}(a||e.currentSeasonTeams.length===0||!e.currentSeasonTeams.find(i=>_.home_team===i.team_id))&&h.push(o("getCurrentSeasonTeams")),s("setHomeResultGame",_.score[0]),s("setAwayResultGame",_.score[1]),m?_.game_status!==1?(await o("fillStatisticData",{gameId:U,gameinfo:_,promises:h,defaultFilter:v}),s("updateShowPostMatchData",!1)):(s("updateStats",[]),s("updateShowPostMatchData",!0),h.push(o("fillStatisticDataPostMatch",{game:U,homeTeam:_.home_team,awayTeam:_.visiting_team,gameInfo:_})),await Promise.all(h)):s("setIsSectionLoading",!1,{root:!0})}catch(_){return Promise.reject(_)}},async fillStatisticData({commit:e,dispatch:o,getters:s,rootGetters:B,state:U},{gameId:m,gameinfo:y,promises:a=[],defaultFilter:v=null}){let p=null;try{const r=B.getProviderId,_=B.getIsDevApis;e("setIsSectionLoading",!0,{root:!0}),e("prepareCleanAllStatistics"),e("updateHomeTeamPlays",[]),e("updateVisitingTeamPlays",[]),e("updateGameForAnalysis",y),(y.is_live||y.game_status===0)&&a.push(o("getCurrentLiveGamePlays",m)),a.push(o("getSpecialMentionsByGame",m)),a.push(o("getHomeTeamPlays")),a.push(o("getVisitingTeamPlays")),a.push(o("getCurrentSeasonPlays")),v&&a.push(aHt({...v,providerId:r,isDevApis:_})),p=await Promise.all(a)}catch(r){throw new Error(r)}finally{setTimeout(()=>{if(e("addRankingInSubcategories",{getters:s,isPremiumAccount:B["loginGeneral/getPremiumAccount"]}),v){const[r]=p.pop();r&&(e("setBetSubcategories",r.categories),e("setBetDescription",r.sectionDescription),e("setDefaultFilter",r.params),e("updateFilterAux"),e("updateFilters",{filters:U.defaultFilter,needsFormat:!1}),o("updateRankingInSubcategories"))}},100),e("setIsSectionLoading",!1,{root:!0})}},async checkTeamsData({state:e,dispatch:o,rootState:s,commit:B},{gameId:U,isFromBet:m}){try{const y=Number(U);if(e.pastSeasonId){B("setPastSeasonId",e.pastSeasonId,{root:!0});const a=s.leagueGeneral.currentSeasonGames.find(v=>v.game_id===y);a&&B("updateGameForAnalysis",a),await Promise.all([o("getHomeTeamPlays"),o("getVisitingTeamPlays")]),B("setUsePastSeasonId",m||(!e.homeTeamPlays||e.homeTeamPlays.length===0)&&(!e.visitingTeamPlays||e.visitingTeamPlays.length===0))}else B("setUsePastSeasonId",!1)}catch(y){throw new Error(y)}},async getSpecialMentionsByGame({commit:e,rootGetters:o},s){try{const B=o.getProviderId,U=o.getIsDevApis,m=await XGt({gameId:s,providerId:B,isDevApis:U});e("addSpecialMentions",m)}catch(B){return Promise.reject(B)}},async getCurrentSeasonGames({commit:e,state:o,rootGetters:s},B){try{const U=s.getProviderId,m=s.getIsDevApis,{teams:y,games:a,past_season_id:v,tournament_id:p}=await JGt({seasonId:o.usePastSeasonId?o.pastSeasonId:o.seasonId,gameId:B,providerId:U,isDevApis:m}),r=fHt.find(_=>_.id===p);return r&&e("setCurrentTournamentName",r.name),e("setHome",y[0]),e("setAway",y[1]),o.usePastSeasonId||e("setPastSeasonId",v),await e("updateCurrentSeasonGames",a),a&&Array.isArray(a)&&e("updateFinishedGames",a.reduce((_,b)=>(b.game_status===1&&(_+=1),_),0)),a}catch(U){return Promise.reject(U)}},async getCurrentSeasonGamesLast({commit:e,state:o,rootGetters:s}){try{const B=s.getProviderId,U=s.getIsDevApis,{games:m,past_season_id:y}=await SW({seasonId:o.usePastSeasonId?o.pastSeasonId:o.seasonId,providerId:B,isDevApis:U});return o.usePastSeasonId||e("setPastSeasonId",y),await e("updateCurrentSeasonGames",m),m&&Array.isArray(m)&&e("updateFinishedGames",m.reduce((a,v)=>(v.game_status===1&&(a+=1),a),0)),m}catch(B){return Promise.reject(B)}},async getCurrentSeasonTeams({commit:e,state:o,rootGetters:s}){try{const B=s.getProviderId,U=s.getIsDevApis,m=await QGt({seasonId:o.usePastSeasonId?o.pastSeasonId:o.seasonId,providerId:B,isDevApis:U});e("updateCurrentSeasonTeams",m.data.teams)}catch{}},async getSeasonStatistics({commit:e,state:o,rootGetters:s}){try{const B=s.getProviderId,U=s.getIsDevApis,m=o.usePastSeasonId?o.pastSeasonId:o.seasonId,y=await WGt({seasonId:m,providerId:B,isDevApis:U});e("updateSeasonStatistics",y),e("updateOldSeasonId",m)}catch(B){return Promise.reject(B)}},updateRankingInSubcategories({state:e,commit:o,getters:s,rootGetters:B}){e.currentSeasonGames.length>0&&o("addRankingInSubcategories",{getters:s,isPremiumAccount:B["loginGeneral/getPremiumAccount"]})},async getHomeTeamPlays({commit:e,state:o,rootGetters:s}){try{const B=s.getProviderId,U=s.getIsDevApis,m=await TW({seasonId:o.usePastSeasonId?o.pastSeasonId:o.seasonId,teamId:o.gameForAnalysis.home_team,providerId:B,isDevApis:U});m.data&&(e("updateHomeTeamPlays",m.data.data),e("setHomeGames",m.data.games))}catch(B){return Promise.reject(B)}},async getVisitingTeamPlays({commit:e,state:o,rootGetters:s}){try{const B=s.getProviderId,U=s.getIsDevApis,m=await TW({seasonId:o.usePastSeasonId?o.pastSeasonId:o.seasonId,teamId:o.gameForAnalysis.visiting_team,providerId:B,isDevApis:U});m.data&&(e("updateVisitingTeamPlays",m.data.data),e("setVisitingGames",m.data.games))}catch(B){return Promise.reject(B)}},async getCurrentSeasonPlays({commit:e,state:o,rootGetters:s}){try{const B=s.getProviderId,U=s.getIsDevApis,m=await ZGt({seasonId:o.usePastSeasonId?o.pastSeasonId:o.seasonId,providerId:B,isDevApis:U});e("updateStats",m)}catch(B){return Promise.reject(new Error(B))}},async getCurrentLiveGamePlays({state:e,commit:o,rootGetters:s},B){try{const U=s.getProviderId,m=s.getIsDevApis,y=await YGt({gameId:B,providerId:U,isDevApis:m});e.livePlays=new Map,y.forEach(a=>{e.gameForAnalysis.game_id===a[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===a[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===a[e.indexesTLP.teamId])&&o("addLiveGamePlay",a)})}catch(U){throw new Error(U)}},socket_new({state:e,commit:o},s){const B=s[1];(e.gameForAnalysis.home_team===B[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===B[e.indexesTLP.teamId])&&o("addLiveGamePlay",B)},socket_update({state:e,commit:o},s){const B=s[1];e.gameForAnalysis.game_id===B[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===B[e.indexesTLP.teamId]||e.gameForAnalysis.visitingTeam===B[e.indexesTLP.teamId])&&o("updateLiveGamePlay",B)},socket_delete({state:e,commit:o},s){const B=s[1];e.gameForAnalysis.game_id===B[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===B[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===B[e.indexesTLP.teamId])&&o("deleteLiveGamePlay",B)},exitChannel({state:e,getters:o,rootState:s,rootGetters:B,commit:U}){const m=B["loginGeneral/getPremiumAccount"];o.isLive&&m&&(U("updateShowLiveData",!0),U("clearLiveTotals"),e.livePlays.clear(),pHt.emit("unsubscribe",{channel:`game.${e.gameForAnalysis.game_id}.v2`}))},cleanStats({state:e}){for(const s of Object.values(e.nextGamesDataStructure))for(const B of Object.values(s.subcategories))B.homeTeam.resetTotals(),B.visitingTeam.resetTotals(),B.homeTeam.resetTotalsLive(),B.visitingTeam.resetTotalsLive(),B.isBetMainSubcategory=!1;Object.values(e.nextGamesDataStructure).forEach(s=>{for(const B of Object.values(s.subcategories))B.resetMentions()}),e.currentSeasonPlays=null,e.homeTeamPlays=[],e.visitingTeamPlays=[],e.homeTeamFilter.requiresPlaysFiltering=!0,e.visitingTeamFilter.requiresPlaysFiltering=!0,e.isRankingCalculating=!0},cleanAllStats({state:e}){for(const s of Object.values(e.nextGamesDataStructure))for(const B of Object.values(s.subcategories))B.homeTeam.resetTotals(),B.visitingTeam.resetTotals(),B.isBetMainSubcategory=!1;Object.values(e.nextGamesDataStructure).forEach(s=>{for(const B of Object.values(s.subcategories))B.resetMentions()}),e.currentSeasonGames=[],e.currentSeasonTeams=[],e.gameForAnalysis={},e.homeTeamPlays=[],e.visitingTeamPlays=[],e.currentSeasonPlays=null,e.totalSeasonFinishedGames=0,e.totalHomeTeamFinishedGames=0,e.totalVisitingTeamFinishedGames=0,e.homeGames=[],e.showPostMatch=!1,e.homeResultGame=null,e.awayResultGame=null,e.visitingGames=[],e.idAssetSelected=1,e.showAdvanceFilter=!1,e.selectedAnalysis={},e.homeTeamFilter={teamId:0,statistics:0,playingAs:[],matchResult:[],sections:[],requiresPlaysFiltering:!0},e.visitingTeamFilter={teamId:0,statistics:0,playingAs:[],matchResult:[],sections:[],requiresPlaysFiltering:!0},e.isRankingCalculating=!0}}}};async function gHt({providerId:e,isDevApis:o}={}){try{const{data:s}=await Uu({url:"https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/tournaments",providerId:e,isDevApis:o});return s}catch(s){throw new Error(s)}}const yHt={gameGlobal:{namespaced:!0,state:{videoSrc:null,isVideoModalVisible:!1,tournaments:[],seccionBetsGolTipster:1,tournamentSelected:{},tournamentType:0,sectionAnalytics:"Banner_Home",previewSectionAnalytics:"",sectionRef:"",booleanIsStatisticModalOpen:!1},getters:{getTournamentType:e=>e.tournamentType,getSectionAnalytics(e){return e.sectionAnalytics},getPreviewSectionAnalytics(e){return e.previewSectionAnalytics},getSeccionBetsGolTipster(e){return e.seccionBetsGolTipster}},mutations:{setBooleanIsStatisticModalOpen(e,o){e.booleanIsStatisticModalOpen=o},setTournamentType(e,o){e.tournamentType=o},setSectionRef(e,o){e.sectionRef=o},setSectionAnalytics(e,o){e.sectionAnalytics=o},setSeccionBetsGolTipster(e,o){e.seccionBetsGolTipster=o},setPreviewSectionAnalytics(e,o){e.previewSectionAnalytics=o},setVideoSrc(e,o){e.videoSrc=o},setVideoModalVisibility(e,o){e.isVideoModalVisible=o},setSelectedTournament(e,o){e.selectedTournament=o},setTournaments(e,o){e.tournaments=o.map(s=>({...s.tournament,seasons:s.seasons})),e.tournamentSelected=e.tournaments[0]},setTournamentSelected(e,o){e.tournamentSelected=o}},actions:{async fetchTournaments({state:e,commit:o,rootGetters:s}){try{if(e.tournaments.length===0){const B=s.getProviderId,U=s.getIsDevApis,m=await gHt({providerId:B,isDevApis:U});o("setTournaments",m)}}catch(B){throw new Error(B)}}}}};async function vHt({seasonId:e,localTeamId:o,visitingTeamId:s,providerId:B,isDevApis:U}){try{const m=`https://bzznnzehtf.execute-api.us-west-2.amazonaws.com/prod/xg/seasons/${e}/teams/${o}/${s}`;return(await Uu({url:m,providerId:B,isDevApis:U})).data}catch(m){return Promise.reject(m)}}async function bHt({seasonId:e,localTeamId:o,visitingTeamId:s,providerId:B,isDevApis:U}){try{const m=`https://bzznnzehtf.execute-api.us-west-2.amazonaws.com/prod/xg/game/${e}/teams/${o}/${s}`;return(await Uu({url:m,providerId:B,isDevApis:U})).data}catch(m){return Promise.reject(m)}}const IW=(e,o)=>{let s={};return e.forEach((B,U)=>{U==3&&(o[0]==35||o[0]==54)&&(o[U]==2?o[U]=1:o[U]=2),U==2&&(o[0]==35||o[0]==54)&&(o[U]==1?o[U]=2:o[U]==2&&(o[U]=1)),s[B]=o[U]}),s},PW=(e,o)=>e.filter(B=>{const U=o.playingAs.includes(B.playing_as),m=o.matchResult.includes(B.match_result),y=o.sections.includes(B.section);return U&&m&&y});(function(){function e(o,s,B){return typeof B>"u"||+B==0?Math[o](s):(s=+s,B=+B,isNaN(s)||!(typeof B=="number"&&B%1===0)?NaN:(s=s.toString().split("e"),s=Math[o](+(s[0]+"e"+(s[1]?+s[1]-B:-B))),s=s.toString().split("e"),+(s[0]+"e"+(s[1]?+s[1]+B:B))))}Math.ceil10||(Math.ceil10=function(o,s){return e("ceil",o,s)})})();function LW(e,o){let s=o*-1;return Math.ceil10(e,s)}const Pf={goals:"Goles",shots:"Tiros a gol",head:"Remates con cabeza",penalties:"Penales"};function Lf(e,o){const s=(e||[]).find(B=>B.name===o);return new Set((s==null?void 0:s.categories)||[])}const _Ht={...yHt,...tHt,...mHt,...{xgGeneral:{namespaced:!0,state:{teamSelected:"Local",xGLocalPlays:[],xGVisitingPlays:[],xgCategories:z2},getters:{playsLocal:(e,o,s)=>{const B=e.xGLocalPlays,U="homeTeamFilter",m=s.nextGeneral[U];return PW(B,m)||[]},playsAway:(e,o,s)=>{const B=e.xGVisitingPlays,U="visitingTeamFilter",m=s.nextGeneral[U];return PW(B,m)},getXgCategories:e=>e.xgCategories||[],goalsQtyLocal:(e,o)=>{const s=Lf(e.xgCategories,Pf.goals);return o.playsLocal.filter(B=>s.has(B.category_id)).length},goalsQtyAway:(e,o)=>{const s=Lf(e.xgCategories,Pf.goals);return o.playsAway.filter(B=>s.has(B.category_id)).length},shotsOnGoalQtyLocal:(e,o)=>{const s=Lf(e.xgCategories,Pf.shots);return o.playsLocal.filter(B=>s.has(B.category_id)).length},shotsOnGoalQtyAway:(e,o)=>{const s=Lf(e.xgCategories,Pf.shots);return o.playsAway.filter(B=>s.has(B.category_id)).length},headQtyLocal:(e,o)=>{const s=Lf(e.xgCategories,Pf.head);return o.playsLocal.filter(B=>s.has(B.category_id)).length},headQtyAway:(e,o)=>{const s=Lf(e.xgCategories,Pf.head);return o.playsAway.filter(B=>s.has(B.category_id)).length},penaltiesQtyLocal:(e,o)=>{const s=Lf(e.xgCategories,Pf.penalties);return o.playsLocal.filter(B=>s.has(B.category_id)).length},penaltiesQtyAway:(e,o)=>{const s=Lf(e.xgCategories,Pf.penalties);return o.playsAway.filter(B=>s.has(B.category_id)).length},xGLocal:(e,o)=>{const s=new Set;let B=o.playsLocal.reduce((U,m)=>(s.has(m.moment_of_play)||(s.add(m.moment_of_play),U+=m.xG2),U),0);return LW(B,2)},xGAway:(e,o)=>{const s=new Set;let B=o.playsAway.reduce((U,m)=>(s.has(m.moment_of_play)||(s.add(m.moment_of_play),U+=m.xG2),U),0);return LW(B,2)}},mutations:{setTeamSelected(e,o){e.teamSelected=o},setXgCategories(e,o){e.xgCategories=o},setPlays(e,o){const s=Lf(e.xgCategories,Pf.goals),B=Lf(e.xgCategories,Pf.shots),U=Lf(e.xgCategories,Pf.head),m=Lf(e.xgCategories,Pf.penalties),y=o.local_team.map(l=>IW(o.data_headers,l)),a=[],v=[],p=[],r=[],_=new Set;y.forEach(l=>{s.has(l.category_id)?_.has(l.moment_of_play)||(_.add(l.moment_of_play),a.push(l)):B.has(l.category_id)?v.push(l):U.has(l.category_id)?p.push(l):m.has(l.category_id)&&r.push(l)}),e.xGLocalPlays=[...v,...a,...p,...r];const b=o.visiting_team.map(l=>IW(o.data_headers,l)),x=new Set,h=[],n=[],i=[],c=[];b.forEach(l=>{s.has(l.category_id)?x.has(l.moment_of_play)||(x.add(l.moment_of_play),h.push(l)):B.has(l.category_id)?n.push(l):U.has(l.category_id)?i.push(l):m.has(l.category_id)&&c.push(l)}),e.xGVisitingPlays=[...n,...h,...i,...c]},cleanXgStore(e){e.localStorage="Local",e.xGLocalPlays=[],e.xGVisitingPlays=[]}},actions:{async loadXgCategories({commit:e,rootGetters:o}){const s=o.getProviderId,B=await aie(s);e("setXgCategories",(B==null?void 0:B.categories)??z2)},async getXgPlays({commit:e,dispatch:o,rootGetters:s},{seasonId:B,localTeamId:U,visitingTeamId:m,postMatch:y=!1}){try{if(!B||!U||!m)return;const a=s.getProviderId,v=s.getIsDevApis;await o("loadXgCategories");let p={};y?p=await bHt({seasonId:B,localTeamId:U,visitingTeamId:m,providerId:a,isDevApis:v}):p=await vHt({seasonId:B,localTeamId:U,visitingTeamId:m,providerId:a,isDevApis:v}),e("setPlays",p)}catch(a){return Promise.reject(a)}}}}}};function xHt(e){for(const[o,s]of Object.entries(_Ht))e.hasModule(o)||e.registerModule(o,s)}const wHt={class:"subcategory-group"},kHt={__name:"SubcategoryGroup",props:{subcategoryGroup:{type:Array,default:()=>[]}},setup(e){return(o,s)=>(t.openBlock(),t.createElementBlock("div",wHt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroup,B=>(t.openBlock(),t.createBlock(t.unref(Zl),{key:B.id,modelValue:B.isSelected,"onUpdate:modelValue":U=>B.isSelected=U,label:B.name},null,8,["modelValue","onUpdate:modelValue","label"]))),128))]))}},SHt=ic(kHt,[["__scopeId","data-v-ae6f3d72"]]),CHt={class:"filter-subcategories"},THt=Object.freeze(Object.defineProperty({__proto__:null,default:ic({__name:"FilterSubcategories",props:{subcategoryGroups:{type:Array,default:()=>[]}},setup(e){return(o,s)=>(t.openBlock(),t.createElementBlock("div",CHt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroups,B=>(t.openBlock(),t.createElementBlock("div",{key:B.id,class:"filter-subcategories__group"},[t.createVNode(SHt,{subcategoryGroup:B},null,8,["subcategoryGroup"])]))),128))]))}},[["__scopeId","data-v-5edaefc2"]])},Symbol.toStringTag,{value:"Module"})),Hw=e=>(t.pushScopeId("data-v-80d9c265"),e=e(),t.popScopeId(),e),AHt={class:"details__header"},EHt=Hw(()=>t.createElementVNode("div",{class:"details__header__title"},"Jugando como",-1)),MHt={class:"details__header__checkbox"},IHt={class:"details__body"},PHt={class:"details__body__playing-as"},LHt=["onClick"],BHt={class:"details__header"},zHt=Hw(()=>t.createElementVNode("div",{class:"details__header__title"},"En: (Elige el lapso de tiempo)",-1)),OHt={class:"details__header__checkbox"},DHt={class:"details__body"},NHt=Hw(()=>t.createElementVNode("div",{class:"details__body__title"},"1er tiempo",-1)),FHt={class:"details__body__game-section"},RHt=["onClick"],VHt={class:"details__body"},jHt=Hw(()=>t.createElementVNode("div",{class:"details__body__title"},"2do tiempo",-1)),UHt={class:"details__body__game-section"},GHt=["onClick"],HHt=Object.freeze(Object.defineProperty({__proto__:null,default:ic({__name:"FilterConditions",props:{playingAs:{type:Array,default:()=>[{name:"Local",isSelected:!0},{name:"Visitante",isSelected:!0}]},gameSections:{type:Array,default:()=>[{text:"0-15",value:1,isSelected:!0},{text:"16-30",value:2,isSelected:!0},{text:"31-45",value:3,isSelected:!0},{text:"46-60",value:4,isSelected:!0},{text:"61-75",value:5,isSelected:!0},{text:"76-90",value:6,isSelected:!0}]},buttonsBackgroundColor:{type:String,default:"rgba(255, 255, 255, 0)"},buttonsBackgroundColorActive:{type:String,default:"rgba(203, 238, 107, 0.05)"},buttonsTextColor:{type:String,default:"rgba(255, 255, 255, 0.8)"},buttonsTextColorActive:{type:String,default:"rgba(255, 255, 255, 1)"},buttonsBorderColor:{type:String,default:"#8ea2ab"},buttonsBorderColorActive:{type:String,default:"#cbee6b"},buttonsBorderWidth:{type:String,default:"0.8px"},buttonsBorderWidthActive:{type:String,default:"1px"},buttonsBorderRadius:{type:String,default:"4px"}},setup(e){const o=e;t.useCssVars(r=>({"49cba245":e.buttonsBackgroundColor,"52f02da6":e.buttonsTextColor,"7d3f686a":e.buttonsBorderWidth,"7c286a07":e.buttonsBorderColor,"24a6f4aa":e.buttonsBackgroundColorActive,cd8d7768:e.buttonsTextColorActive,"35fa5c10":e.buttonsBorderWidthActive,"0cde1826":e.buttonsBorderColorActive}));const s=t.computed(()=>o.playingAs.every(r=>r.isSelected)),B=t.computed(()=>o.gameSections.every(r=>r.isSelected)),U=t.computed(()=>o.gameSections.reduce((r,_)=>(_.value<=3?r.firstHalf.push(_):r.secondHalf.push(_),r),{firstHalf:[],secondHalf:[]})),m=t.computed(()=>({"--border-radius-first-button":`${o.buttonsBorderRadius} 0 0 ${o.buttonsBorderRadius}`,"--border-radius-last-button":`0 ${o.buttonsBorderRadius} ${o.buttonsBorderRadius} 0`}));function y(r){r?o.playingAs.forEach(_=>{_.isSelected=!0}):o.playingAs.forEach((_,b)=>{_.isSelected=b===0})}function a(r){o.playingAs.filter(_=>_.isSelected).length===1&&r.isSelected||(r.isSelected=!r.isSelected)}function v(r){o.gameSections.filter(_=>_.isSelected).length===1&&r.isSelected||(r.isSelected=!r.isSelected)}function p(r){r?o.gameSections.forEach(_=>{_.isSelected=!0}):o.gameSections.forEach((_,b)=>{_.isSelected=b===0})}return(r,_)=>(t.openBlock(),t.createElementBlock("div",{class:"details",style:t.normalizeStyle(m.value)},[t.createElementVNode("div",AHt,[EHt,t.createElementVNode("div",MHt,[t.createVNode(t.unref(Zl),{label:"Todos","model-value":s.value,"onUpdate:modelValue":y},null,8,["model-value"])])]),t.createElementVNode("div",IHt,[t.createElementVNode("div",PHt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.playingAs,(b,x)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${x}`,class:t.normalizeClass(["details__body__button",{active:b.isSelected}]),onClick:h=>a(b)},t.toDisplayString(b.name),11,LHt))),128))])]),t.createElementVNode("div",BHt,[zHt,t.createElementVNode("div",OHt,[t.createVNode(t.unref(Zl),{label:"Todos","model-value":B.value,"onUpdate:modelValue":p},null,8,["model-value"])])]),t.createElementVNode("div",DHt,[NHt,t.createElementVNode("div",FHt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(U.value.firstHalf,(b,x)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${x}`,class:t.normalizeClass(["details__body__button",{active:b.isSelected}]),onClick:h=>v(b)},t.toDisplayString(b.text),11,RHt))),128))])]),t.createElementVNode("div",VHt,[jHt,t.createElementVNode("div",UHt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(U.value.secondHalf,(b,x)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${x}`,class:t.normalizeClass(["details__body__button",{active:b.isSelected}]),onClick:h=>v(b)},t.toDisplayString(b.text),11,GHt))),128))])])],4))}},[["__scopeId","data-v-80d9c265"]])},Symbol.toStringTag,{value:"Module"})),ZHt={class:"filter-field"},WHt=Object.freeze(Object.defineProperty({__proto__:null,default:ic({__name:"FilterField",setup(e){const o=t.ref(Array.from({length:16},(B,U)=>U+1));function s(){}return(B,U)=>(t.openBlock(),t.createElementBlock("div",ZHt,[t.createVNode(t.unref(OF),{width:"100%","background-color":"#2E3B46",value:o.value,"onUpdate:modelValue":s},null,8,["value"])]))}},[["__scopeId","data-v-8103c3e1"]])},Symbol.toStringTag,{value:"Module"})),qHt={class:"subcategory-group"},JHt={__name:"SubcategoryGroup",props:{subcategoryGroup:{type:Array,default:()=>[]}},setup(e){return(o,s)=>(t.openBlock(),t.createElementBlock("div",qHt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroup,B=>(t.openBlock(),t.createBlock(t.unref(Wl),{key:B.id,modelValue:B.isSelected,"onUpdate:modelValue":U=>B.isSelected=U,label:B.name},null,8,["modelValue","onUpdate:modelValue","label"]))),128))]))}},YHt=oc(JHt,[["__scopeId","data-v-85bc2114"]]),XHt={class:"filter-subcategories"},$Ht=Object.freeze(Object.defineProperty({__proto__:null,default:oc({__name:"FilterSubcategories",props:{subcategoryGroups:{type:Array,default:()=>[]}},setup(e){return(o,s)=>(t.openBlock(),t.createElementBlock("div",XHt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroups,B=>(t.openBlock(),t.createElementBlock("div",{key:B.id,class:"filter-subcategories__group"},[t.createVNode(YHt,{subcategoryGroup:B},null,8,["subcategoryGroup"])]))),128))]))}},[["__scopeId","data-v-74a77bab"]])},Symbol.toStringTag,{value:"Module"})),Zw=e=>(t.pushScopeId("data-v-893b389d"),e=e(),t.popScopeId(),e),KHt={class:"details__header"},QHt=Zw(()=>t.createElementVNode("div",{class:"details__header__title"},"Jugando como",-1)),eZt={class:"details__header__checkbox"},tZt={class:"details__body"},aZt={class:"details__body__playing-as"},rZt=["onClick"],nZt={class:"details__header"},iZt=Zw(()=>t.createElementVNode("div",{class:"details__header__title"},"En: (Elige el lapso de tiempo)",-1)),oZt={class:"details__header__checkbox"},sZt={class:"details__body"},lZt=Zw(()=>t.createElementVNode("div",{class:"details__body__title"},"1er tiempo",-1)),cZt={class:"details__body__game-section"},uZt=["onClick"],dZt={class:"details__body"},hZt=Zw(()=>t.createElementVNode("div",{class:"details__body__title"},"2do tiempo",-1)),pZt={class:"details__body__game-section"},fZt=["onClick"],mZt=Object.freeze(Object.defineProperty({__proto__:null,default:oc({__name:"FilterConditions",props:{playingAs:{type:Array,default:()=>[{name:"Local",isSelected:!0},{name:"Visitante",isSelected:!0}]},gameSections:{type:Array,default:()=>[{text:"0-15",value:1,isSelected:!0},{text:"16-30",value:2,isSelected:!0},{text:"31-45",value:3,isSelected:!0},{text:"46-60",value:4,isSelected:!0},{text:"61-75",value:5,isSelected:!0},{text:"76-90",value:6,isSelected:!0}]},buttonsBackgroundColor:{type:String,default:"rgba(255, 255, 255, 0)"},buttonsBackgroundColorActive:{type:String,default:"rgba(203, 238, 107, 0.05)"},buttonsTextColor:{type:String,default:"rgba(255, 255, 255, 0.8)"},buttonsTextColorActive:{type:String,default:"rgba(255, 255, 255, 1)"},buttonsBorderColor:{type:String,default:"#8ea2ab"},buttonsBorderColorActive:{type:String,default:"#cbee6b"},buttonsBorderWidth:{type:String,default:"0.8px"},buttonsBorderWidthActive:{type:String,default:"1px"},buttonsBorderRadius:{type:String,default:"4px"}},setup(e){const o=e;t.useCssVars(r=>({"2715f84a":e.buttonsBackgroundColor,"97bea92a":e.buttonsTextColor,"544788ef":e.buttonsBorderWidth,"53308a8c":e.buttonsBorderColor,e844f820:e.buttonsBackgroundColorActive,"76839a51":e.buttonsTextColorActive,"2bf17656":e.buttonsBorderWidthActive,a4c4469c:e.buttonsBorderColorActive}));const s=t.computed(()=>o.playingAs.every(r=>r.isSelected)),B=t.computed(()=>o.gameSections.every(r=>r.isSelected)),U=t.computed(()=>o.gameSections.reduce((r,_)=>(_.value<=3?r.firstHalf.push(_):r.secondHalf.push(_),r),{firstHalf:[],secondHalf:[]})),m=t.computed(()=>({"--border-radius-first-button":`${o.buttonsBorderRadius} 0 0 ${o.buttonsBorderRadius}`,"--border-radius-last-button":`0 ${o.buttonsBorderRadius} ${o.buttonsBorderRadius} 0`}));function y(r){r?o.playingAs.forEach(_=>{_.isSelected=!0}):o.playingAs.forEach((_,b)=>{_.isSelected=b===0})}function a(r){o.playingAs.filter(_=>_.isSelected).length===1&&r.isSelected||(r.isSelected=!r.isSelected)}function v(r){o.gameSections.filter(_=>_.isSelected).length===1&&r.isSelected||(r.isSelected=!r.isSelected)}function p(r){r?o.gameSections.forEach(_=>{_.isSelected=!0}):o.gameSections.forEach((_,b)=>{_.isSelected=b===0})}return(r,_)=>(t.openBlock(),t.createElementBlock("div",{class:"details",style:t.normalizeStyle(m.value)},[t.createElementVNode("div",KHt,[QHt,t.createElementVNode("div",eZt,[t.createVNode(t.unref(Wl),{label:"Todos","model-value":s.value,"onUpdate:modelValue":y},null,8,["model-value"])])]),t.createElementVNode("div",tZt,[t.createElementVNode("div",aZt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.playingAs,(b,x)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${x}`,class:t.normalizeClass(["details__body__button",{active:b.isSelected}]),onClick:h=>a(b)},t.toDisplayString(b.name),11,rZt))),128))])]),t.createElementVNode("div",nZt,[iZt,t.createElementVNode("div",oZt,[t.createVNode(t.unref(Wl),{label:"Todos","model-value":B.value,"onUpdate:modelValue":p},null,8,["model-value"])])]),t.createElementVNode("div",sZt,[lZt,t.createElementVNode("div",cZt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(U.value.firstHalf,(b,x)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${x}`,class:t.normalizeClass(["details__body__button",{active:b.isSelected}]),onClick:h=>v(b)},t.toDisplayString(b.text),11,uZt))),128))])]),t.createElementVNode("div",dZt,[hZt,t.createElementVNode("div",pZt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(U.value.secondHalf,(b,x)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${x}`,class:t.normalizeClass(["details__body__button",{active:b.isSelected}]),onClick:h=>v(b)},t.toDisplayString(b.text),11,fZt))),128))])])],4))}},[["__scopeId","data-v-893b389d"]])},Symbol.toStringTag,{value:"Module"})),gZt={class:"filter-field"},yZt=Object.freeze(Object.defineProperty({__proto__:null,default:oc({__name:"FilterField",setup(e){const o=t.ref(Array.from({length:16},(B,U)=>U+1));function s(){}return(B,U)=>(t.openBlock(),t.createElementBlock("div",gZt,[t.createVNode(t.unref(MG),{width:"100%","background-color":"#2E3B46",value:o.value,"onUpdate:modelValue":s},null,8,["value"])]))}},[["__scopeId","data-v-ef90fbbd"]])},Symbol.toStringTag,{value:"Module"}));Nd.GSCGameData=HGt,Nd.connectSocket=t8,Nd.disconnectSocket=a8,Nd.getSocket=e8,Nd.registerStoreModules=xHt,Object.defineProperty(Nd,Symbol.toStringTag,{value:"Module"})});
8204
+ */var aW="store";function Ljt(e){return e===void 0&&(e=null),t.inject(e!==null?e:aW)}function Ng(e,o){Object.keys(e).forEach(function(s){return o(e[s],s)})}function rW(e){return e!==null&&typeof e=="object"}function Bjt(e){return e&&typeof e.then=="function"}function n0(e,o){if(!e)throw new Error("[vuex] "+o)}function zjt(e,o){return function(){return e(o)}}function nW(e,o,s){return o.indexOf(e)<0&&(s&&s.prepend?o.unshift(e):o.push(e)),function(){var B=o.indexOf(e);B>-1&&o.splice(B,1)}}function iW(e,o){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var s=e.state;Rw(e,s,[],e._modules.root,!0),eA(e,s,o)}function eA(e,o,s){var B=e._state;e.getters={},e._makeLocalGettersCache=Object.create(null);var U=e._wrappedGetters,m={};Ng(U,function(y,a){m[a]=zjt(y,e),Object.defineProperty(e.getters,a,{get:function(){return m[a]()},enumerable:!0})}),e._state=t.reactive({data:o}),e.strict&&Rjt(e),B&&s&&e._withCommit(function(){B.data=null})}function Rw(e,o,s,B,U){var m=!s.length,y=e._modules.getNamespace(s);if(B.namespaced&&(e._modulesNamespaceMap[y]&&process.env.NODE_ENV!=="production"&&console.error("[vuex] duplicate namespace "+y+" for the namespaced module "+s.join("/")),e._modulesNamespaceMap[y]=B),!m&&!U){var a=tA(o,s.slice(0,-1)),v=s[s.length-1];e._withCommit(function(){process.env.NODE_ENV!=="production"&&v in a&&console.warn('[vuex] state field "'+v+'" was overridden by a module with the same name at "'+s.join(".")+'"'),a[v]=B.state})}var p=B.context=Ojt(e,y,s);B.forEachMutation(function(r,_){var b=y+_;Djt(e,b,r,p)}),B.forEachAction(function(r,_){var b=r.root?_:y+_,x=r.handler||r;Njt(e,b,x,p)}),B.forEachGetter(function(r,_){var b=y+_;Fjt(e,b,r,p)}),B.forEachChild(function(r,_){Rw(e,o,s.concat(_),r,U)})}function Ojt(e,o,s){var B=o==="",U={dispatch:B?e.dispatch:function(m,y,a){var v=Vw(m,y,a),p=v.payload,r=v.options,_=v.type;if((!r||!r.root)&&(_=o+_,process.env.NODE_ENV!=="production"&&!e._actions[_])){console.error("[vuex] unknown local action type: "+v.type+", global type: "+_);return}return e.dispatch(_,p)},commit:B?e.commit:function(m,y,a){var v=Vw(m,y,a),p=v.payload,r=v.options,_=v.type;if((!r||!r.root)&&(_=o+_,process.env.NODE_ENV!=="production"&&!e._mutations[_])){console.error("[vuex] unknown local mutation type: "+v.type+", global type: "+_);return}e.commit(_,p,r)}};return Object.defineProperties(U,{getters:{get:B?function(){return e.getters}:function(){return oW(e,o)}},state:{get:function(){return tA(e.state,s)}}}),U}function oW(e,o){if(!e._makeLocalGettersCache[o]){var s={},B=o.length;Object.keys(e.getters).forEach(function(U){if(U.slice(0,B)===o){var m=U.slice(B);Object.defineProperty(s,m,{get:function(){return e.getters[U]},enumerable:!0})}}),e._makeLocalGettersCache[o]=s}return e._makeLocalGettersCache[o]}function Djt(e,o,s,B){var U=e._mutations[o]||(e._mutations[o]=[]);U.push(function(m){s.call(e,B.state,m)})}function Njt(e,o,s,B){var U=e._actions[o]||(e._actions[o]=[]);U.push(function(m){var y=s.call(e,{dispatch:B.dispatch,commit:B.commit,getters:B.getters,state:B.state,rootGetters:e.getters,rootState:e.state},m);return Bjt(y)||(y=Promise.resolve(y)),e._devtoolHook?y.catch(function(a){throw e._devtoolHook.emit("vuex:error",a),a}):y})}function Fjt(e,o,s,B){if(e._wrappedGetters[o]){process.env.NODE_ENV!=="production"&&console.error("[vuex] duplicate getter key: "+o);return}e._wrappedGetters[o]=function(U){return s(B.state,B.getters,U.state,U.getters)}}function Rjt(e){t.watch(function(){return e._state.data},function(){process.env.NODE_ENV!=="production"&&n0(e._committing,"do not mutate vuex store state outside mutation handlers.")},{deep:!0,flush:"sync"})}function tA(e,o){return o.reduce(function(s,B){return s[B]},e)}function Vw(e,o,s){return rW(e)&&e.type&&(s=o,o=e,e=e.type),process.env.NODE_ENV!=="production"&&n0(typeof e=="string","expects string as the type, but found "+typeof e+"."),{type:e,payload:o,options:s}}var Vjt="vuex bindings",sW="vuex:mutations",aA="vuex:actions",f2="vuex",jjt=0;function Ujt(e,o){Pjt({id:"org.vuejs.vuex",app:e,label:"Vuex",homepage:"https://next.vuex.vuejs.org/",logo:"https://vuejs.org/images/icons/favicon-96x96.png",packageName:"vuex",componentStateTypes:[Vjt]},function(s){s.addTimelineLayer({id:sW,label:"Vuex Mutations",color:lW}),s.addTimelineLayer({id:aA,label:"Vuex Actions",color:lW}),s.addInspector({id:f2,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),s.on.getInspectorTree(function(B){if(B.app===e&&B.inspectorId===f2)if(B.filter){var U=[];hW(U,o._modules.root,B.filter,""),B.rootNodes=U}else B.rootNodes=[dW(o._modules.root,"")]}),s.on.getInspectorState(function(B){if(B.app===e&&B.inspectorId===f2){var U=B.nodeId;oW(o,U),B.state=Zjt(qjt(o._modules,U),U==="root"?o.getters:o._makeLocalGettersCache,U)}}),s.on.editInspectorState(function(B){if(B.app===e&&B.inspectorId===f2){var U=B.nodeId,m=B.path;U!=="root"&&(m=U.split("/").filter(Boolean).concat(m)),o._withCommit(function(){B.set(o._state.data,m,B.state.value)})}}),o.subscribe(function(B,U){var m={};B.payload&&(m.payload=B.payload),m.state=U,s.notifyComponentUpdate(),s.sendInspectorTree(f2),s.sendInspectorState(f2),s.addTimelineEvent({layerId:sW,event:{time:Date.now(),title:B.type,data:m}})}),o.subscribeAction({before:function(B,U){var m={};B.payload&&(m.payload=B.payload),B._id=jjt++,B._time=Date.now(),m.state=U,s.addTimelineEvent({layerId:aA,event:{time:B._time,title:B.type,groupId:B._id,subtitle:"start",data:m}})},after:function(B,U){var m={},y=Date.now()-B._time;m.duration={_custom:{type:"duration",display:y+"ms",tooltip:"Action duration",value:y}},B.payload&&(m.payload=B.payload),m.state=U,s.addTimelineEvent({layerId:aA,event:{time:Date.now(),title:B.type,groupId:B._id,subtitle:"end",data:m}})}})})}var lW=8702998,Gjt=6710886,Hjt=16777215,cW={label:"namespaced",textColor:Hjt,backgroundColor:Gjt};function uW(e){return e&&e!=="root"?e.split("/").slice(-2,-1)[0]:"Root"}function dW(e,o){return{id:o||"root",label:uW(o),tags:e.namespaced?[cW]:[],children:Object.keys(e._children).map(function(s){return dW(e._children[s],o+s+"/")})}}function hW(e,o,s,B){B.includes(s)&&e.push({id:B||"root",label:B.endsWith("/")?B.slice(0,B.length-1):B||"Root",tags:o.namespaced?[cW]:[]}),Object.keys(o._children).forEach(function(U){hW(e,o._children[U],s,B+U+"/")})}function Zjt(e,o,s){o=s==="root"?o:o[s];var B=Object.keys(o),U={state:Object.keys(e.state).map(function(y){return{key:y,editable:!0,value:e.state[y]}})};if(B.length){var m=Wjt(o);U.getters=Object.keys(m).map(function(y){return{key:y.endsWith("/")?uW(y):y,editable:!1,value:rA(function(){return m[y]})}})}return U}function Wjt(e){var o={};return Object.keys(e).forEach(function(s){var B=s.split("/");if(B.length>1){var U=o,m=B.pop();B.forEach(function(y){U[y]||(U[y]={_custom:{value:{},display:y,tooltip:"Module",abstract:!0}}),U=U[y]._custom.value}),U[m]=rA(function(){return e[s]})}else o[s]=rA(function(){return e[s]})}),o}function qjt(e,o){var s=o.split("/").filter(function(B){return B});return s.reduce(function(B,U,m){var y=B[U];if(!y)throw new Error('Missing module "'+U+'" for path "'+o+'".');return m===s.length-1?y:y._children},o==="root"?e:e.root._children)}function rA(e){try{return e()}catch(o){return o}}var i0=function(e,o){this.runtime=o,this._children=Object.create(null),this._rawModule=e;var s=e.state;this.state=(typeof s=="function"?s():s)||{}},pW={namespaced:{configurable:!0}};pW.namespaced.get=function(){return!!this._rawModule.namespaced},i0.prototype.addChild=function(e,o){this._children[e]=o},i0.prototype.removeChild=function(e){delete this._children[e]},i0.prototype.getChild=function(e){return this._children[e]},i0.prototype.hasChild=function(e){return e in this._children},i0.prototype.update=function(e){this._rawModule.namespaced=e.namespaced,e.actions&&(this._rawModule.actions=e.actions),e.mutations&&(this._rawModule.mutations=e.mutations),e.getters&&(this._rawModule.getters=e.getters)},i0.prototype.forEachChild=function(e){Ng(this._children,e)},i0.prototype.forEachGetter=function(e){this._rawModule.getters&&Ng(this._rawModule.getters,e)},i0.prototype.forEachAction=function(e){this._rawModule.actions&&Ng(this._rawModule.actions,e)},i0.prototype.forEachMutation=function(e){this._rawModule.mutations&&Ng(this._rawModule.mutations,e)},Object.defineProperties(i0.prototype,pW);var Fg=function(e){this.register([],e,!1)};Fg.prototype.get=function(e){return e.reduce(function(o,s){return o.getChild(s)},this.root)},Fg.prototype.getNamespace=function(e){var o=this.root;return e.reduce(function(s,B){return o=o.getChild(B),s+(o.namespaced?B+"/":"")},"")},Fg.prototype.update=function(e){fW([],this.root,e)},Fg.prototype.register=function(e,o,s){var B=this;s===void 0&&(s=!0),process.env.NODE_ENV!=="production"&&yW(e,o);var U=new i0(o,s);if(e.length===0)this.root=U;else{var m=this.get(e.slice(0,-1));m.addChild(e[e.length-1],U)}o.modules&&Ng(o.modules,function(y,a){B.register(e.concat(a),y,s)})},Fg.prototype.unregister=function(e){var o=this.get(e.slice(0,-1)),s=e[e.length-1],B=o.getChild(s);if(!B){process.env.NODE_ENV!=="production"&&console.warn("[vuex] trying to unregister module '"+s+"', which is not registered");return}B.runtime&&o.removeChild(s)},Fg.prototype.isRegistered=function(e){var o=this.get(e.slice(0,-1)),s=e[e.length-1];return o?o.hasChild(s):!1};function fW(e,o,s){if(process.env.NODE_ENV!=="production"&&yW(e,s),o.update(s),s.modules)for(var B in s.modules){if(!o.getChild(B)){process.env.NODE_ENV!=="production"&&console.warn("[vuex] trying to add a new module '"+B+"' on hot reloading, manual reload is needed");return}fW(e.concat(B),o.getChild(B),s.modules[B])}}var mW={assert:function(e){return typeof e=="function"},expected:"function"},Jjt={assert:function(e){return typeof e=="function"||typeof e=="object"&&typeof e.handler=="function"},expected:'function or object with "handler" function'},gW={getters:mW,mutations:mW,actions:Jjt};function yW(e,o){Object.keys(gW).forEach(function(s){if(o[s]){var B=gW[s];Ng(o[s],function(U,m){n0(B.assert(U),Yjt(e,s,m,U,B.expected))})}})}function Yjt(e,o,s,B,U){var m=o+" should be "+U+' but "'+o+"."+s+'"';return e.length>0&&(m+=' in module "'+e.join(".")+'"'),m+=" is "+JSON.stringify(B)+".",m}var Jp=function e(o){var s=this;o===void 0&&(o={}),process.env.NODE_ENV!=="production"&&(n0(typeof Promise<"u","vuex requires a Promise polyfill in this browser."),n0(this instanceof e,"store must be called with the new operator."));var B=o.plugins;B===void 0&&(B=[]);var U=o.strict;U===void 0&&(U=!1);var m=o.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new Fg(o),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._devtools=m;var y=this,a=this,v=a.dispatch,p=a.commit;this.dispatch=function(_,b){return v.call(y,_,b)},this.commit=function(_,b,x){return p.call(y,_,b,x)},this.strict=U;var r=this._modules.root.state;Rw(this,r,[],this._modules.root),eA(this,r),B.forEach(function(_){return _(s)})},nA={state:{configurable:!0}};Jp.prototype.install=function(e,o){e.provide(o||aW,this),e.config.globalProperties.$store=this;var s=this._devtools!==void 0?this._devtools:process.env.NODE_ENV!=="production"||!1;s&&Ujt(e,this)},nA.state.get=function(){return this._state.data},nA.state.set=function(e){process.env.NODE_ENV!=="production"&&n0(!1,"use store.replaceState() to explicit replace store state.")},Jp.prototype.commit=function(e,o,s){var B=this,U=Vw(e,o,s),m=U.type,y=U.payload,a=U.options,v={type:m,payload:y},p=this._mutations[m];if(!p){process.env.NODE_ENV!=="production"&&console.error("[vuex] unknown mutation type: "+m);return}this._withCommit(function(){p.forEach(function(r){r(y)})}),this._subscribers.slice().forEach(function(r){return r(v,B.state)}),process.env.NODE_ENV!=="production"&&a&&a.silent&&console.warn("[vuex] mutation type: "+m+". Silent option has been removed. Use the filter functionality in the vue-devtools")},Jp.prototype.dispatch=function(e,o){var s=this,B=Vw(e,o),U=B.type,m=B.payload,y={type:U,payload:m},a=this._actions[U];if(!a){process.env.NODE_ENV!=="production"&&console.error("[vuex] unknown action type: "+U);return}try{this._actionSubscribers.slice().filter(function(p){return p.before}).forEach(function(p){return p.before(y,s.state)})}catch(p){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in before action subscribers: "),console.error(p))}var v=a.length>1?Promise.all(a.map(function(p){return p(m)})):a[0](m);return new Promise(function(p,r){v.then(function(_){try{s._actionSubscribers.filter(function(b){return b.after}).forEach(function(b){return b.after(y,s.state)})}catch(b){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in after action subscribers: "),console.error(b))}p(_)},function(_){try{s._actionSubscribers.filter(function(b){return b.error}).forEach(function(b){return b.error(y,s.state,_)})}catch(b){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in error action subscribers: "),console.error(b))}r(_)})})},Jp.prototype.subscribe=function(e,o){return nW(e,this._subscribers,o)},Jp.prototype.subscribeAction=function(e,o){var s=typeof e=="function"?{before:e}:e;return nW(s,this._actionSubscribers,o)},Jp.prototype.watch=function(e,o,s){var B=this;return process.env.NODE_ENV!=="production"&&n0(typeof e=="function","store.watch only accepts a function."),t.watch(function(){return e(B.state,B.getters)},o,Object.assign({},s))},Jp.prototype.replaceState=function(e){var o=this;this._withCommit(function(){o._state.data=e})},Jp.prototype.registerModule=function(e,o,s){s===void 0&&(s={}),typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&(n0(Array.isArray(e),"module path must be a string or an Array."),n0(e.length>0,"cannot register the root module by using registerModule.")),this._modules.register(e,o),Rw(this,this.state,e,this._modules.get(e),s.preserveState),eA(this,this.state)},Jp.prototype.unregisterModule=function(e){var o=this;typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&n0(Array.isArray(e),"module path must be a string or an Array."),this._modules.unregister(e),this._withCommit(function(){var s=tA(o.state,e.slice(0,-1));delete s[e[e.length-1]]}),iW(this)},Jp.prototype.hasModule=function(e){return typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&n0(Array.isArray(e),"module path must be a string or an Array."),this._modules.isRegistered(e)},Jp.prototype.hotUpdate=function(e){this._modules.update(e),iW(this,!0)},Jp.prototype._withCommit=function(e){var o=this._committing;this._committing=!0,e(),this._committing=o},Object.defineProperties(Jp.prototype,nA);var Xjt=Kjt(function(e,o){var s={};return process.env.NODE_ENV!=="production"&&!vW(o)&&console.error("[vuex] mapMutations: mapper parameter must be either an Array or an Object"),$jt(o).forEach(function(B){var U=B.key,m=B.val;s[U]=function(){for(var y=[],a=arguments.length;a--;)y[a]=arguments[a];var v=this.$store.commit;if(e){var p=Qjt(this.$store,"mapMutations",e);if(!p)return;v=p.context.commit}return typeof m=="function"?m.apply(this,[v].concat(y)):v.apply(this.$store,[m].concat(y))}}),s});function $jt(e){return vW(e)?Array.isArray(e)?e.map(function(o){return{key:o,val:o}}):Object.keys(e).map(function(o){return{key:o,val:e[o]}}):[]}function vW(e){return Array.isArray(e)||rW(e)}function Kjt(e){return function(o,s){return typeof o!="string"?(s=o,o=""):o.charAt(o.length-1)!=="/"&&(o+="/"),e(o,s)}}function Qjt(e,o,s){var B=e._modulesNamespaceMap[s];return process.env.NODE_ENV!=="production"&&!B&&console.error("[vuex] module namespace not found in "+o+"(): "+s),B}const eUt={name:"tooltip",props:{data:{type:Object,required:!0}},computed:{showTooltip(){return{visible:this.data.visible}}},methods:{tooltipClick:function(e){},closeClick:function(e){this.data.link="",this.data.visible=!1}}};function tUt(e,o,s,B,U,m){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["back-tooltip",m.showTooltip])},[t.createElementVNode("div",{class:t.normalizeClass(["box-tooltip",m.showTooltip]),onClick:o[1]||(o[1]=(...y)=>m.tooltipClick&&m.tooltipClick(...y))},[t.createElementVNode("span",{class:"box-tooltip-close",onClick:o[0]||(o[0]=(...y)=>m.closeClick&&m.closeClick(...y))},"×"),t.renderSlot(e.$slots,"default",{},void 0,!0)],2)],2)}const aUt=v_(eUt,[["render",tUt],["__scopeId","data-v-cc97d3a4"]]),rUt=/^https:\/\/[a-z0-9]+\.execute-api\.[a-z0-9-]+\.amazonaws\.com\/(prod|qa\d*)\//,nUt=/^https:\/\/golstats-microservices\.s3[.-]us-west-2\.amazonaws\.com\//,iUt="https://apis.golstats.com",oUt="https://dev-apis.golstats.com";function sUt(e,o,s=!1){if(!o||o===1)return e;const B=s?oUt:iUt,U=e.match(rUt);if(U){const y=e.replace(U[0],"");return`${B}/${o}/${y}`}const m=e.match(nUt);if(m){const y=e.replace(m[0],"");return`${B}/${o}/${y}`}return e}const lUt=1e3,bW=lUt*60,iA=bW*60,_W=iA*24,cUt={data(){return{timeLeft:"",currentTime:new Date().valueOf(),interval:null,gameDateTime:new Date,now:new Date}},computed:{isToday(){return`${this.now.getFullYear()}.${this.now.getMonth()}.${this.now.getDate()}`==`${this.gameDateTime.getFullYear()}.${this.gameDateTime.getMonth()}.${this.gameDateTime.getDate()}`},gameStart(){return this.gameDateTime.toTimeString().slice(0,5)}},methods:{checkTimeLeft(){const e=new Date(this.gameData.dateTimeUTC).valueOf();e>this.currentTime?(this.timeLeft=this.getTimeLeft(e),this.interval=setInterval(()=>{this.timeLeft=this.getTimeLeft(e)},6e4)):this.timeLeft="00:00 hrs"},getTimeLeft(e){let o=e.valueOf()-this.currentTime;const s=Math.floor(o/_W);o=o-s*_W;const B=Math.floor(o/iA);o=o-B*iA;const U=Math.floor(o/bW);return`${s?`${s} dias `:""}${B<10?`0${B}`:B}:${U<10?`0${U}`:U} hrs.`}},beforeDestroy(){this.interval&&clearInterval(this.interval)}};function uUt(e,o){return`${o==1?{}.TEAM_LOGOS_URL||"https://golstatsimages.blob.core.windows.net/teams-80/":"https://golstatsimages.blob.core.windows.net/teams-80/"+o+"/"}${e}.png`}function dUt(e,o){return`${o==1?{}.PROFILE_PHOTO_PLAYER||"https://golstatsimages.blob.core.windows.net/players-profile/":"https://golstatsimages.blob.core.windows.net/players-profile/"+o+"/"}${e}.png`}const oA={GOAL_IDS:["1-1","1-2","1-3","1-4","1-5","1-6","1-7","1-12","1-13","1-16","4-14"],YELLOW_CARD_IDS:["2-8"],RED_CARD_IDS:["2-9"]},hUt="/icn-play.svg",pUt="/icn-tiros-de-esquina.svg",fUt="/icn-tiro-a-porteria.svg",mUt="/icn-cambio.svg",gUt="/icn-falta.svg",yUt="/atajada.svg",vUt="/fuera-de-lugar.svg",sA="/gol.svg",bUt="/var.png",_Ut="/tiempo-agregado.svg",xUt="/jugada-peligrosa.svg",wUt="/penal-marcado.svg",kUt="/penal-fallado.svg",SUt="/inicia-el-partido.svg",CUt="/fin-del-partido.svg",TUt="/icn-tarjeta-amarilla.svg",AUt="/icn-tarjeta-roja.svg",EUt=[1,2,3,4,6],MUt={name:"TimeLineEvent",props:{gameEvent:{type:Object,required:!0},isMobile:{type:Boolean,default:!1},provider:{type:Number,default:0},width:{type:Number,default:352},timeLineWidth:{type:Number,default:0},canPlayVideos:{type:Boolean,default:!0}},data(){return{lastHeight:0,gameEventKey:0}},computed:{nameClasses(){const e=[],o=`${this.gameEvent.event_type_id}-${this.gameEvent.category_id}`;return oA.GOAL_IDS.includes(o)?(e.push("is-main-event"),e.push("goal")):oA.YELLOW_CARD_IDS.includes(o)?(e.push("is-main-event"),e.push("yellow-card")):oA.RED_CARD_IDS.includes(o)?(e.push("is-main-event"),e.push("red-card")):this.gameEvent.video_link!=="-"&&(e.push("is-main-event"),e.push("normal-video")),this.gameEvent.teamType===1?e.push("time-line-event--home-team"):e.push("time-line-event--away-team"),e},srcImgPlayers(){let e=null;return this.gameEvent.player_id&&this.gameEvent.player_id!=="-"&&(e=this.gameEvent.player_id.split("@"),e=e.map(o=>dUt(o,this.provider))),e},teamTypeClasses(){const e=`time-line-event--${this.gameEvent.teamType===1?"home":"away"}-team`;return[e,`${e}-desktop`]},teamTypeClasses2(){return[`time-line-event--info--${this.gameEvent.teamType===1?"home":"away"}-team`]},minuteClasses(){const e=[`time-line-event__minute--desktop-${this.gameEvent.teamType===1?"home":"away"}-team`];return e.push("time-line-event__minute--desktop"),e},playerName(){return this.gameEvent.category_id===28||EUt.includes(this.gameEvent.event_type_id)?"":this.gameEvent.player_name}},watch:{width(){this.emitHeight()},gameEvent:{deep:!0,handler(){this.gameEventKey++}}},methods:{...Xjt("general",["setVideoModalVisibility","setVideoSrc"]),thumbnailClick(e){e!=="-"&&this.$emit("thumbnail-click",e)},showVideoTimeline(e){this.setVideoSrc(e),this.setVideoModalVisibility(!0)},getIconClasses(){return["time-line-event__icon--desktop",`time-line-event__icon--desktop-${this.gameEvent.teamType===1?"home":"away"}-team`]},emitHeight(){setTimeout(()=>{this.$refs.timeLineEvent&&this.$refs.timeLineEvent.clientHeight&&this.$refs.timeLineEvent.clientHeight!==this.lastHeight&&(this.lastHeight=this.$refs.timeLineEvent.clientHeight,this.$emit("event-height",this.lastHeight))},500)}},mounted(){if(this.emitHeight(),this.gameEvent.event_type_id===3){const[e,o]=this.gameEvent.player_id.split("@");this.$emit("player-changed",{playerOut:Number(e),playerIn:Number(o),teamId:this.gameEvent.team_id})}}},IUt=e=>(t.pushScopeId("data-v-dff2f5b8"),e=e(),t.popScopeId(),e),PUt={class:"time-line-event__details"},LUt={width:"127",preload:"metadata",style:{"border-radius":"8px"}},BUt=["src"],zUt=IUt(()=>t.createElementVNode("div",{class:"time-line-event__details__video-thumbnail__gradient"},[t.createElementVNode("div",{class:"time-line-event__details__video-thumbnail__gradient__button-play"},[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none"},[t.createElementVNode("path",{d:"M6.6041 22.8554C6.42105 22.7512 6.26805 22.5956 6.1616 22.4053C6.05515 22.215 5.99927 21.9973 6.00001 21.7755V2.22137C6.00026 2.00039 6.0565 1.78362 6.16274 1.59409C6.26899 1.40456 6.42127 1.24936 6.6034 1.14499C6.78553 1.04062 6.9907 0.990981 7.1971 1.00135C7.4035 1.01171 7.60342 1.0817 7.77561 1.20386L21.4907 10.9821C21.6473 11.0935 21.7758 11.2446 21.8646 11.4219C21.9535 11.5992 22 11.7973 22 11.9985C22 12.1996 21.9535 12.3977 21.8646 12.575C21.7758 12.7523 21.6473 12.9034 21.4907 13.0148L7.77561 22.7954C7.60369 22.9178 7.40392 22.988 7.19761 22.9986C6.9913 23.0092 6.78617 22.9597 6.6041 22.8554ZM7.14347 21.7779L20.8585 11.9996L7.14347 21.7779Z",fill:"#CBEE6B"})])])],-1)),OUt={class:"time-line-event__details__info"},DUt={key:0,class:"time-line-event__details__info__header__players"},NUt={class:"time-line-event__details__info__header__players__div-img"},FUt=["src"],RUt={class:"time-line-event__details__info__body"},VUt={class:"time-line-event__details__info__body__comment"},jUt={class:"time-line-event__minute__container"},UUt={class:"time-line-event__minute__container__text"},GUt={class:"time-line-event__minute__container__icon-container"},HUt={class:"time-line-event__minute__container__icon-container__icon"},ZUt={key:0,src:pUt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},WUt={key:1,src:fUt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},qUt={key:2,src:mUt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},JUt={key:3,src:gUt,class:"time-line-event__minute__container__icon-container__icon__img",alt:"Event icon"},YUt={key:4,src:yUt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},XUt={key:5,src:vUt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},$Ut={key:6,src:sA,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},KUt={key:7,src:sA,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},QUt={key:8,src:sA,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},eGt={key:9,src:bUt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},tGt={key:10,src:_Ut,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},aGt={key:11,src:xUt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},rGt={key:12,src:wUt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},nGt={key:13,src:kUt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},iGt={key:14,src:SUt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},oGt={key:15,src:CUt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},sGt={key:16,src:TUt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},lGt={key:17,src:AUt,class:"time-line-event__minute__container__icon-container__icon__img",alt:"Event icon"},cGt={key:18,src:"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg id='Layer_2' data-name='Layer 2' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cdefs%3E%3Cstyle%3E .cls-1 %7B fill: %23fff; %7D .cls-2 %7B fill: %23172531; %7D %3C/style%3E%3C/defs%3E%3Cg id='Layer_1-2' data-name='Layer 1'%3E%3Cg%3E%3Cg id='Oval'%3E%3Ccircle class='cls-2' cx='24' cy='24' r='24'/%3E%3C/g%3E%3Cg id='Group-19'%3E%3Cg id='Path-16'%3E%3Cpath class='cls-1' d='M32.85,36.6H15.15c-.41,0-.75-.34-.75-.75s.34-.75,.75-.75h17.69c.41,0,.75,.34,.75,.75s-.34,.75-.75,.75Z'/%3E%3C/g%3E%3C/g%3E%3Cg id='Rectangle'%3E%3Cg id='path-1'%3E%3Cpath class='cls-1' d='M38.02,32.62H9.98V13.43h28.04v19.19Zm-26.54-1.5h25.04V14.93H11.48V31.12Z'/%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E",alt:"Event icon"};function uGt(e,o,s,B,U,m){return t.openBlock(),t.createElementBlock("div",{ref:"timeLineEvent",class:t.normalizeClass(["time-line-event",m.teamTypeClasses]),style:t.normalizeStyle({width:`${s.width}px`}),key:U.gameEventKey},[t.createElementVNode("div",PUt,[s.canPlayVideos&&s.gameEvent.video_link!=="-"&&s.timeLineWidth>700?(t.openBlock(),t.createElementBlock("div",{key:0,class:"time-line-event__details__video-thumbnail",onClick:o[0]||(o[0]=y=>m.thumbnailClick(s.gameEvent.video_link,s.gameEvent.event_type_name))},[t.createElementVNode("video",LUt,[t.createElementVNode("source",{src:s.gameEvent.video_link+"#t=0.1",type:"video/mp4"},null,8,BUt)]),zUt])):t.createCommentVNode("",!0),t.createElementVNode("div",OUt,[t.createElementVNode("div",{class:t.normalizeClass(["time-line-event__details__info__header",m.teamTypeClasses2])},[s.gameEvent.video_link=="-"?(t.openBlock(),t.createElementBlock("div",DUt,[m.srcImgPlayers?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(m.srcImgPlayers,(y,a)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["img-player",{"second-player":a===1}]),key:a},[t.createElementVNode("div",NUt,[t.createElementVNode("img",{src:y,alt:""},null,8,FUt)])],2))),128)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["time-line-event__details__info__header__event-name",m.nameClasses]),onClick:o[1]||(o[1]=y=>m.thumbnailClick(s.gameEvent.video_link,s.gameEvent.event_type_name))},[s.canPlayVideos&&s.gameEvent.video_link!=="-"?(t.openBlock(),t.createElementBlock("img",{key:0,src:hUt,class:t.normalizeClass(`time-line-event__details__info__header__event-play ${[1,2].includes(s.gameEvent.event_type_id)?`time-line-event__details__info__header__event-play__${s.gameEvent.event_type_name}`:s.gameEvent.video_link!=="-"?"time-line-event__details__info__header__event-play__normal-video":""}`)},null,2)):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(s.gameEvent.category_id?s.gameEvent.event_type_id===5?s.gameEvent.category_name:s.gameEvent.event_type_name==="Gol"?`${[13,16].includes(s.gameEvent.category_id)?"Autogol":"Gol"} de `+s.gameEvent.team_name:s.gameEvent.event_type_name:s.gameEvent.comments),1)],2)],2),t.createElementVNode("div",RUt,[t.createElementVNode("div",VUt,t.toDisplayString(this.gameEvent.category_id?`${this.gameEvent.comments}`:""),1)])])]),t.createElementVNode("div",{class:t.normalizeClass(["time-line-event__minute",m.minuteClasses])},[t.createElementVNode("div",jUt,[t.createElementVNode("div",UUt,t.toDisplayString(s.gameEvent.minute)+"'",1),t.createElementVNode("div",GUt,[t.createElementVNode("div",HUt,[s.gameEvent.category_id==18?(t.openBlock(),t.createElementBlock("img",ZUt)):s.gameEvent.category_id==20?(t.openBlock(),t.createElementBlock("img",WUt)):s.gameEvent.category_id==10?(t.openBlock(),t.createElementBlock("img",qUt)):s.gameEvent.category_id==21?(t.openBlock(),t.createElementBlock("img",JUt)):s.gameEvent.category_id==27?(t.openBlock(),t.createElementBlock("img",YUt)):s.gameEvent.category_id==17?(t.openBlock(),t.createElementBlock("img",XUt)):s.gameEvent.category_id==6&&s.gameEvent.event_type_id==1||s.gameEvent.category_id==5&&s.gameEvent.event_type_id==1||s.gameEvent.category_id==1&&s.gameEvent.event_type_id==1||s.gameEvent.category_id==2&&s.gameEvent.event_type_id==1||s.gameEvent.category_id==3&&s.gameEvent.event_type_id==1||s.gameEvent.category_id==7&&s.gameEvent.event_type_id==1||s.gameEvent.category_id==12&&s.gameEvent.event_type_id==1?(t.openBlock(),t.createElementBlock("img",$Ut)):s.gameEvent.category_id==4?(t.openBlock(),t.createElementBlock("img",KUt)):s.gameEvent.category_id==13||s.gameEvent.category_id==16?(t.openBlock(),t.createElementBlock("img",QUt)):s.gameEvent.category_id==30||s.gameEvent.category_id==31||s.gameEvent.category_id==32||s.gameEvent.category_id==33||s.gameEvent.category_id==34||s.gameEvent.category_id==35||s.gameEvent.category_id==36||s.gameEvent.category_id==37||s.gameEvent.category_id==38||s.gameEvent.category_id==39||s.gameEvent.category_id==40?(t.openBlock(),t.createElementBlock("img",eGt)):s.gameEvent.category_id==28?(t.openBlock(),t.createElementBlock("img",tGt)):s.gameEvent.category_id==26?(t.openBlock(),t.createElementBlock("img",aGt)):s.gameEvent.category_id==22?(t.openBlock(),t.createElementBlock("img",rGt)):s.gameEvent.category_id==15||s.gameEvent.category_id==23?(t.openBlock(),t.createElementBlock("img",nGt)):s.gameEvent.category_id==0&&s.gameEvent.game_status_id==16||s.gameEvent.category_id==0&&s.gameEvent.game_status_id==18||s.gameEvent.category_id==0&&s.gameEvent.game_status_id==20||s.gameEvent.category_id==0&&s.gameEvent.game_status_id==22?(t.openBlock(),t.createElementBlock("img",iGt)):s.gameEvent.category_id==0&&s.gameEvent.game_status_id==13||s.gameEvent.category_id==0&&s.gameEvent.game_status_id==17||s.gameEvent.category_id==0&&s.gameEvent.game_status_id==19||s.gameEvent.category_id==0&&s.gameEvent.game_status_id==21||s.gameEvent.category_id==0&&s.gameEvent.game_status_id==23?(t.openBlock(),t.createElementBlock("img",oGt)):s.gameEvent.category_id==8?(t.openBlock(),t.createElementBlock("img",sGt)):s.gameEvent.category_id==9?(t.openBlock(),t.createElementBlock("img",lGt)):(t.openBlock(),t.createElementBlock("img",cGt))])])])],2)],6)}const dGt=v_(MUt,[["render",uGt],["__scopeId","data-v-dff2f5b8"]]),hGt={"1-1":"gol","1-2":"gol","1-3":"gol","1-4":"gol","1-5":"gol","1-6":"gol","1-7":"gol","1-12":"gol","1-13":"gol","1-16":"gol","2-8":"amonestacion","2-9":"expulsion","3-10":"cambio_de_jugador","3-11":"cambio_de_jugador","4-14":"gol","4-15":"penal_fallado","5-17":"fuera_de_lugar","5-18":"tiro_de_esquina","5-20":"tiro_a_gol","5-21":"falta_cometida","5-22":"penal_marcado","5-23":"penal_fallado","5-24":"","5-25":"","5-26":"jugada_peligro_dentro_area","5-27":"atajada","5-28":"tiempo_agregado","5-29":"presion_para_anotar","7-30":"revision_var","7-31":"revision_var","7-32":"revision_var","7-33":"revision_var","7-34":"revision_var"},pGt={3:{name:"Inicia Primer Tiempo",weight:1,playTimer:1,abbreviation:"1T:"},4:{name:"Final Primer Tiempo",weight:2,playTimer:0,abbreviation:"1T:"},5:{name:"Inicia Segundo Tiempo",weight:3,playTimer:1,abbreviation:"2T:"},8:{name:"Final Segundo Tiempo",weight:4,playTimer:0,abbreviation:"2T:"},9:{name:"Inicia Primer Tiempo Extra",weight:5,playTimer:1,abbreviation:"1T extra:"},12:{name:"Final Primer Tiempo Extra",weight:6,playTimer:0,abbreviation:"1T extra:"},10:{name:"Inicia Segundo Tiempo Extra",weight:7,playTimer:1,abbreviation:"2T extra:"},13:{name:"Final Segundo Tiempo Extra",weight:8,playTimer:0,abbreviation:"2T extra:"},11:{name:"Inicia Tanda de Penales",weight:9,playTimer:1,abbreviation:"Penales:"},15:{name:"Final Tanda de Penales",weight:10,playTimer:0,abbreviation:"Penales:"},6:{name:"Marcador Final",weight:11,playTimer:0,abbreviation:"Final"}};let jw=null;const fGt={name:"TimeLine",components:{Tooltip:aUt,TimeLineEvent:dGt},mixins:[cUt],props:{gameData:{type:Object,required:!0},providerId:{type:Number,default:0},timeLinePeriod:{type:String,default:"all"},socket:{type:Object,default:()=>({})},canPlayVideos:{type:Boolean,default:!0}},data(){return{gameEvents:[],gameEventsByPeriod:{firstHalf:[],secondHalf:[]},dataVideo:{visible:!1,link:""},gameEventsQueue:[],gameEventsUrl:"https://al2nv2dmkc.execute-api.us-west-2.amazonaws.com/prod/mxm/",transitionName:"",subscriptionInfo:{gameId:0,isSubscribed:!1},areGameEventsFilled:!1,timeLineWidth:812,eventContainerWidth:0,channelName:"",timeLineStatus:"awaiting",timeLeft:"",lastMinute:0,timeLineStatuses:[],currentStatus:{abbreviation:""},timer:"00:00"}},computed:{isMobile(){return this.timeLineWidth<580},gameEventWidth(){return this.timeLineWidth/2-30},gameEventsToShow(){return this.timeLinePeriod==="all"?this.gameEvents:this.gameEventsByPeriod[this.timeLinePeriod]}},watch:{gameData:{deep:!0,immediate:!0,handler(e){e&&e.id&&(this.gameDateTime=new Date(this.gameData.dateTimeUTC),this.gameEventsQueue=[],this.timeLineStatuses=[],this.transitionName="",this.checkTimeLeft(),e.status!==1&&this.socket&&this.socket.connected?this.subscribeToMXMChannel():this.timeLineStatus="finished",this.fillGameEvents(e.id))}},"socket.connected":{immediate:!0,handler(e){e&&this.gameData.id&&this.gameData.status!==1&&this.subscribeToMXMChannel()}},gameEvents(e){e.length&&this.gameData.status!==1&&(this.timeLineStatus="live")}},methods:{async fillGameEvents(e){try{const o=await this.fetchGameEvents(e);o?(this.gameEvents=[...o],this.checkGameEventsQueue(),this.sortGameEvents(),setTimeout(()=>{this.transitionName="list"},500)):this.gameEvents=[],this.gameData.status===1?this.lastMinute=`${this.gameEvents[this.gameEvents.length-1].minute}'`:this.checkTimeLineStatus()}catch(o){throw new Error(o)}},getGameEventClassAndSetIcon(e,o){return e.icon=o===0?"inicio_del_partido":hGt[`${e.event_type_id}-${e.category_id}`],e.team_id===this.gameData.homeTeam.team_id||!e.team_id?(e.teamType=1,["home-team-event"]):(e.teamType=2,["away-team-event"])},getEventContainerClass(){return this.isMobile,["time-line-event__container--desktop"]},async fetchGameEvents(e){try{const o=this.$store.getters.getProviderId,s=this.$store.getters.getIsDevApis,B=sUt(`${this.gameEventsUrl}${e}`,o,s),{data:{plays:U}}=await eW.get(B);return U}catch(o){throw new Error(o)}},subscribeToMXMChannel(){this.channelName=`mxm.game.${this.gameData.id}`,this.socket.emit("subscribe",{channel:this.channelName}),this.isSubscribed=!0},checkGameEventsQueue(){this.gameEventsQueue.length&&this.gameEvents.push(...this.gameEventsQueue),this.areGameEventsFilled=!0},setUpResizeObserver(){if(window.ResizeObserver)jw=new ResizeObserver(()=>{this.timeLineWidth=this.$refs.timeLine.clientWidth}),jw.observe(this.$refs.timeLine);else throw new Error("Resize observer not supported!")},updateContainerHeight(e,o){const s=this.$refs[`gameEventDiv${o}`][0],B=this.$refs[`gameEventLine${o}`]?this.$refs[`gameEventLine${o}`][0]:null,U=e+12;s&&(s.style.height=`${U}px`),B&&(B.style.height=`${U}px`)},sortGameEvents(){this.gameEvents.sort((e,o)=>this.getMatchLapseMinutes(e.match_lapse)+Number(e.minute)-(this.getMatchLapseMinutes(o.match_lapse)+Number(o.minute))),this.gameEventsByPeriod={firstHalf:[],secondHalf:[]},this.gameEvents.forEach(e=>{this.gameEventsByPeriod[e.match_lapse===1?"firstHalf":"secondHalf"].push(e)})},getMatchLapseMinutes(e){let o=0;switch(e){case 1:o=0;break;case 2:o=45;break;case 3:o=90;break;case 4:o=105;break;case 5:o=120;break}return o},addGameEventFromChannel(e){this.areGameEventsFilled?(this.gameEvents.push(e),this.sortGameEvents()):this.gameEventsQueue.push(e)},deleteGameEventFromChannel(e){const o=this.gameEvents.findIndex(s=>s.play_id===e.play_id);o&&this.gameEvents.splice(o,1)},checkTimeLineStatus(){this.gameEvents.forEach(o=>{const s=pGt[o.game_status];s&&this.timeLineStatuses.push({...s,gameEvent:o})}),this.timeLineStatuses.sort((o,s)=>s.weight-o.weight);const e=this.timeLineStatuses[0];e&&(this.currentStatus=e,e.playTimer&&this.startTimer())},startTimer(){},getTeamLogoSrc(e="homeTeam"){const o=this.gameData[e].team_id;return uUt(o,this.$store.getters.getProviderId)},thumbnailClick(e){this.canPlayVideos&&(this.dataVideo.link=e,this.dataVideo.visible=!0)}},mounted(){this.$nextTick(()=>{this.setUpResizeObserver()})},beforeUnmount(){jw&&jw.unobserve(this.$refs.timeLine)},sockets:{new_mxm([e,o]){this.channelName===e&&this.addGameEventFromChannel(o)},update_mxm([e,o]){this.channelName===e&&(this.deleteGameEventFromChannel(o),this.addGameEventFromChannel(o))},delete_mxm([e,o]){this.channelName===e&&this.deleteGameEventFromChannel(o)}}},xW=e=>(t.pushScopeId("data-v-a81f7bcf"),e=e(),t.popScopeId(),e),mGt={ref:"timeLine",class:"time-line"},gGt={class:"time-line__header"},yGt={class:"time-line__header__dot"},vGt={class:"time-line__header__dot__home-team team-logo"},bGt=["src"],_Gt={class:"time-line__header__dot__away-team team-logo"},xGt=["src"],wGt={key:1,class:"start-line"},kGt=xW(()=>t.createElementVNode("div",null,null,-1)),SGt=xW(()=>t.createElementVNode("div",null,null,-1)),CGt=[kGt,SGt],TGt={key:1,class:"noEventText"},AGt={class:"tooltip-data"},EGt=["src"];function MGt(e,o,s,B,U,m){const y=t.resolveComponent("TimeLineEvent"),a=t.resolveComponent("Tooltip");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",mGt,[t.createElementVNode("div",gGt,[t.createElementVNode("div",yGt,[t.createElementVNode("div",vGt,[t.createElementVNode("img",{src:m.getTeamLogoSrc("homeTeam"),alt:""},null,8,bGt)]),t.createElementVNode("div",_Gt,[t.createElementVNode("img",{src:m.getTeamLogoSrc("awayTeam"),alt:""},null,8,xGt)])])]),(t.openBlock(),t.createElementBlock("div",{class:"time-line__game-events",key:`tlk-${U.gameEvents.length}`},[s.gameData.status!==4||s.gameData.is_live?(t.openBlock(),t.createBlock(t.TransitionGroup,{key:0,name:U.transitionName,tag:"div"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(m.gameEventsToShow,(v,p)=>(t.openBlock(),t.createElementBlock("div",{class:"time-line__game-events__grid",key:v.play_id},[t.createElementVNode("div",{ref_for:!0,ref:`gameEventDiv${p}`,class:t.normalizeClass(m.getGameEventClassAndSetIcon(v,p))},[t.createElementVNode("div",{class:t.normalizeClass(m.getEventContainerClass(v))},[t.createVNode(y,{"game-event":v,"is-mobile":m.isMobile,provider:e.$store.getters.getProviderId,"time-line-width":U.timeLineWidth,width:m.gameEventWidth,"can-play-videos":s.canPlayVideos,onEventHeight:r=>m.updateContainerHeight(r,p),onPlayerChanged:o[0]||(o[0]=r=>e.$emit("player-changed",r)),onThumbnailClick:m.thumbnailClick},null,8,["game-event","is-mobile","provider","time-line-width","width","can-play-videos","onEventHeight","onThumbnailClick"])],2),p>0?(t.openBlock(),t.createElementBlock("div",{key:0,ref_for:!0,ref:`gameEventLine${p}`,class:"line"},null,512)):t.createCommentVNode("",!0),s.gameData.status===1&&p===m.gameEventsToShow.length-1?(t.openBlock(),t.createElementBlock("div",wGt,CGt)):t.createCommentVNode("",!0)],2)]))),128))]),_:1},8,["name"])):(t.openBlock(),t.createElementBlock("div",TGt,"Aún no comienza el partido"))]))],512),t.createVNode(a,{data:U.dataVideo},{default:t.withCtx(()=>[t.createElementVNode("div",AGt,[t.createElementVNode("div",null,[t.createElementVNode("video",{class:"tooltip-video",controls:"",autoplay:"",src:U.dataVideo.link,format:"video/mp4"},null,8,EGt)])])]),_:1},8,["data"])],64)}const IGt=v_(fGt,[["render",MGt],["__scopeId","data-v-a81f7bcf"]]),PGt={class:"game-time-line__options"},LGt={class:"game-time-line__timeline"},BGt={__name:"GSC-GameTimeLine",props:{game:{type:Object,default:()=>({id:79601,seasonId:1772,status:1,dateTimeUTC:"2023-10-01T22:20:00Z",is_live:0,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/1.png",team_id:1,provisional_logo:"https://golstatsimages.blob.core.windows.net/teams-provisional/1.png",colloquial_name:"Chivas",acronym:"CHI",team_name:"Guadalajara"}})},socket:{type:Object,default:()=>({})},canPlayVideos:{type:Boolean,default:!0},providerId:{type:Number,default:0},isDevApis:{type:Boolean,default:!1}},setup(e){const o=e;eW.defaults.headers.common.Authorization="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE";const s=t.ref({width:"103px",height:"30px",borderRadius:"50px",borderColor:"#8a8a8a",borderWidth:"0.5px",backgroundColor:"rgba(255, 255, 255, 0.04)",fontSize:"14px",fontFamily:"Poppins-Regular, sans-serif",fontColor:"rgba(255, 255, 255, 0.5)",activeFontColor:"#FFFFFF",activeBorderColor:"#cbee6b"}),B=t.ref({width:"auto",height:"30px",padding:"0px 20px",borderRadius:"50px",borderColor:"#8a8a8a",borderWidth:"0.5px",backgroundColor:"rgba(255, 255, 255, 0.04)",fontSize:"14px",fontFamily:"Poppins-Regular, sans-serif",fontColor:"rgba(255, 255, 255, 0.5)",activeFontColor:"#FFFFFF",activeBorderColor:"#cbee6b"});let U=null;const m=Ljt();m.commit("setProviderId",o.providerId),m.commit("setIsDevApis",o.isDevApis);const y=t.ref(["Todo","1er tiempo","2do tiempo"]),a=t.ref("Todo"),v=t.ref({}),p=t.ref(null),r=t.ref(0),_=t.computed(()=>{let i="all";return a.value==="1er tiempo"||a.value==="1er"?i="firstHalf":(a.value==="2do tiempo"||a.value==="2do")&&(i="secondHalf"),i}),b=t.computed(()=>r.value<500);function x(i){a.value=i}function h(i){v.value=i}function n(){if(window.ResizeObserver)U=new ResizeObserver(()=>{r.value=p.value.clientWidth}),U.observe(p.value);else throw new Error("Resize observer not supported!")}return t.onMounted(()=>{n()}),t.onBeforeUnmount(()=>{U&&U.unobserve(p.value)}),(i,c)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"gameTimeLine",ref:p,class:"game-time-line"},[t.createElementVNode("div",PGt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(y.value,l=>(t.openBlock(),t.createElementBlock("div",{key:l,class:"game-time-line__options__option"},[t.createVNode(xRt,t.mergeProps(r.value<390?B.value:s.value,{text:l=="Todo"?l:r.value<390?l.substring(0,3):l,"is-active":a.value===l,onClick:d=>x(l)}),null,16,["text","is-active","onClick"])]))),128))]),t.createElementVNode("div",LGt,[t.createVNode(IGt,{"game-data":e.game,"time-line-period":_.value,"is-mobile":b.value,socket:e.socket,provider:e.providerId,"can-play-videos":e.canPlayVideos,onGameEventsByPeriodFilled:h},null,8,["game-data","time-line-period","is-mobile","socket","provider","can-play-videos"])])],512))}},zGt=v_(BGt,[["__scopeId","data-v-691198f5"]]),jta="",OGt={class:"game-data__header"},DGt={class:"game-data__header__tournament-season-dropdown"},NGt={class:"game-data__header__teams-carousel"},FGt={class:"game-data__body"},RGt={key:0,class:"no-stats-container"},VGt={key:1,class:"no-stats-container-mobile"},jGt={class:"game-data__body__menu"},UGt={class:"game-data__body__menu__contmenuswitch"};pu.defaults.headers.common.Authorization="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE";const GGt=t.defineComponent({name:"GSC-GameData",components:{StatisticsMain:Yue,GSCGameTimeLine:zGt,GscSwitchComponent:XS,GSCLineupsMain:y4e,GSCPositining:p_t,GSCDatosGSMain:qEe,GSCVideoGame:Aje,ModalEvents:mN,GSCTacticaFijaMain:bRt,GSCProminentMain:Oct,GSCComparative:jht}}),HGt=Ki(Object.assign(GGt,{props:{tournamentsApiUrl:{type:String,default:""},tournamentSelectProps:{type:Object,default:null},areFemaleTournamentsVisible:{type:Boolean,default:!0},currentSeasonId:{type:Number,default:0},isClubes:{type:Boolean,default:!1},defaultGameId:{type:Number,default:0,validator(e){return!Number.isNaN(e)&&e>=0}},sortCalendar:{type:Boolean,default:!0},isWidget:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},socket:{type:Object,default:()=>null},isSynchronization:{type:Boolean,default:!1},isTeamGamePerPage:{type:Boolean,default:!1},clientPrivilegesBySeasons:{type:Object,default:()=>null},areTournamentAndSeasonSelectsVisible:{type:Boolean,default:!0},disabledSectionsIds:{type:Array,default:()=>[]},tournamentsIdsToInclude:{type:Set,default:()=>new Set},volumetricFieldIntervalMinutes:{type:Number,default:2},chalkboardIntervalMinutes:{type:Number,default:2},gameEventsIntervalMinutes:{type:Number,default:1},isFemaleMode:{type:Boolean,default:!1},providerId:{type:Number,default:0},isDevApis:{type:Boolean,default:!1},token:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"}},emits:["openmedia","change-season-id","onOpenProfile","openProfileTeam","openProfilePlayer"],setup(e,{emit:o}){const s=fp();let B=null;Vd.on("socket-connected",()=>{s.commit("nextGeneral/updateIsSocketConnected",U.socket.connected)});const U=e,m=t.ref(B2(kx));t.watch(()=>U.providerId,async mt=>{s.commit("setProviderId",mt),s.commit("setIsDevApis",U.isDevApis),m.value=await rie(mt)},{immediate:!0}),t.provide("playOffAbbreviationsStructure",m);const y=t.ref("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"),a=t.ref({season:[]}),v=t.ref({}),p=t.ref(!1),r=t.ref({}),_=t.ref(1),b=t.ref(0),x=3e4,h=3e4,n=3e4,i=3e4,c=3e4,l=3e4,d=3e4,g=3e4,w=6e4,C=t.ref(null),E=t.ref(null),A=t.ref(null),P=t.ref([]),L=t.ref(null),T=t.ref(!0),I=t.ref(new Set([1,2])),M=t.ref({}),S=t.ref({minute:"",recent_lapse:0,score:{}}),z=t.ref(0),k=t.ref("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"),O=t.ref(U.isWidget?[{componentName:"GSCProminentMain",name:"Generales",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:U.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6}]:[{componentName:"GSCProminentMain",name:"Destacado",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:4},{componentName:"GSCComparative",name:U.isWidget?"Destacados":"Comparativa",id:3},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6},{componentName:"GSCTacticaFijaMain",name:"Táctica Fija",id:7}]),N=t.ref(U.isWidget?[{componentName:"GSCProminentMain",name:"Generales",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:U.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6}]:[{componentName:"GSCProminentMain",name:"Destacado",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:U.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6},{componentName:"GSCTacticaFijaMain",name:"Táctica Fija",id:7}]),j=t.ref(U.isWidget?[{componentName:"GSCProminentMain",name:"Generales",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:U.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6}]:[{componentName:"GSCProminentMain",name:"Destacado",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:U.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6},{componentName:"GSCTacticaFijaMain",name:"Táctica Fija",id:7}]);t.ref(U.isWidget?[{componentName:"GSCProminentMain",name:"Generales",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:U.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6}]:[{componentName:"GSCProminentMain",name:"Destacado",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:U.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6},{componentName:"GSCTacticaFijaMain",name:"Táctica Fija",id:7}]);const G=t.ref(0);let H=null;const Z=t.ref(null),$=t.ref(0),ne=t.ref(N.value[0]),q=t.ref([]);let K=t.ref("");const ee={seasonAndPrivileges:null,canPrivilegesTeamPlayVideos:!1,homeTeamDetails:{canPlayVideos:!1,team:{}},awayTeamDetails:{canPlayVideos:!1,team:{}}},X=t.computed(()=>{const mt=[];return v.value&&v.value.id&&(mt.push({id:v.value.id,name:v.value.name,type:v.value.type}),v.value.related_seasons&&v.value.related_seasons.forEach(bt=>{mt.push({id:bt.id,type:bt.type})})),mt}),Q=t.computed(()=>{if(U.clientPrivilegesBySeasons){const mt=U.clientPrivilegesBySeasons.seasonsAndPrivileges.get(v.value.id);if(mt)return mt.teamId}return 0});function ce(){p.value=!1}function de(mt){const bt=mt.split(",");return!(bt.length<2||bt[1].split(" ").length<2)}function he(mt){C.value=mt}function pe(mt){P.value.push(mt)}function re(mt){L.value=mt}function se(mt){A.value=mt}function ie(mt){E.value=mt}function me(mt){if(!de(mt))return"";const bt=ve(mt);return`${ye(mt)}. ${bt}`}function ye(mt){return mt.split(",")[1].split(" ")[1][0]}function ve(mt){const bt=mt.split(",")[0].split(" ");return bt[0].length<=3&&bt.length>1?`${bt[0]} ${bt[1]}`:bt[0]}async function we(mt){if(!(!mt||!mt.game_id))try{const bt=pu.create({headers:{Authorization:`${y.value}`}});M.value={};const It=await bt.get(uu("https://al2nv2dmkc.execute-api.us-west-2.amazonaws.com/prod/mxm/"+mt.game_id,U.providerId,U.isDevApis));if(M.value[mt.home_team.team_id]=[],M.value[mt.home_team.team_id].team={name:mt.home_team.acronym,logo:mt.home_team.logo},M.value[mt.home_team.team_id].goals=[],M.value[mt.home_team.team_id].red=[],M.value[mt.home_team.team_id].yellow=[],M.value[mt.visiting_team.team_id]=[],M.value[mt.visiting_team.team_id].team={name:mt.visiting_team.acronym,logo:mt.visiting_team.logo},M.value[mt.visiting_team.team_id].goals=[],M.value[mt.visiting_team.team_id].red=[],M.value[mt.visiting_team.team_id].yellow=[],It.data.minute!=null&&(S.value={minute:It.data.minute,recent_lapse:It.data.recent_lapse,score:It.data.score}),It.data.plays)for(let Ot=0;Ot<It.data.plays.length;Ot++)It.data.plays[Ot].category_name=="Roja"&&It.data.plays[Ot].status==1&&(mt.home_team.team_id==It.data.plays[Ot].team_id?(me(It.data.plays[Ot].player_name)in M.value[mt.home_team.team_id].red||(M.value[mt.home_team.team_id].red[me(It.data.plays[Ot].player_name)]={},M.value[mt.home_team.team_id].red[me(It.data.plays[Ot].player_name)].event=[],M.value[mt.home_team.team_id].red[me(It.data.plays[Ot].player_name)].name=me(It.data.plays[Ot].player_name)),M.value[mt.home_team.team_id].red[me(It.data.plays[Ot].player_name)].event.push(It.data.plays[Ot].minute)):(me(It.data.plays[Ot].player_name)in M.value[mt.visiting_team.team_id].red||(M.value[mt.visiting_team.team_id].red[me(It.data.plays[Ot].player_name)]={},M.value[mt.visiting_team.team_id].red[me(It.data.plays[Ot].player_name)].event=[],M.value[mt.visiting_team.team_id].red[me(It.data.plays[Ot].player_name)].name=me(It.data.plays[Ot].player_name)),M.value[mt.visiting_team.team_id].red[me(It.data.plays[Ot].player_name)].event.push(It.data.plays[Ot].minute))),It.data.plays[Ot].category_name=="Amarilla"&&It.data.plays[Ot].status==1&&(mt.home_team.team_id==It.data.plays[Ot].team_id?(me(It.data.plays[Ot].player_name)in M.value[mt.home_team.team_id].yellow||(M.value[mt.home_team.team_id].yellow[me(It.data.plays[Ot].player_name)]={},M.value[mt.home_team.team_id].yellow[me(It.data.plays[Ot].player_name)].event=[],M.value[mt.home_team.team_id].yellow[me(It.data.plays[Ot].player_name)].name=me(It.data.plays[Ot].player_name)),M.value[mt.home_team.team_id].yellow[me(It.data.plays[Ot].player_name)].event.push(It.data.plays[Ot].minute)):(me(It.data.plays[Ot].player_name)in M.value[mt.visiting_team.team_id].yellow||(M.value[mt.visiting_team.team_id].yellow[me(It.data.plays[Ot].player_name)]={},M.value[mt.visiting_team.team_id].yellow[me(It.data.plays[Ot].player_name)].event=[],M.value[mt.visiting_team.team_id].yellow[me(It.data.plays[Ot].player_name)].name=me(It.data.plays[Ot].player_name)),M.value[mt.visiting_team.team_id].yellow[me(It.data.plays[Ot].player_name)].event.push(It.data.plays[Ot].minute))),It.data.plays[Ot].event_type_name=="Gol"&&It.data.plays[Ot].status==1&&(mt.home_team.team_id==It.data.plays[Ot].team_id?It.data.plays[Ot].category_name=="Autogol"?(me(It.data.plays[Ot].player_name)in M.value[mt.visiting_team.team_id].goals||(M.value[mt.visiting_team.team_id].goals[me(It.data.plays[Ot].player_name)]={},M.value[mt.visiting_team.team_id].goals[me(It.data.plays[Ot].player_name)].event=[],M.value[mt.visiting_team.team_id].goals[me(It.data.plays[Ot].player_name)].name=me(It.data.plays[Ot].player_name)),M.value[mt.visiting_team.team_id].goals[me(It.data.plays[Ot].player_name)].event.push(It.data.plays[Ot].minute)):(me(It.data.plays[Ot].player_name)in M.value[mt.home_team.team_id].goals||(M.value[mt.home_team.team_id].goals[me(It.data.plays[Ot].player_name)]={},M.value[mt.home_team.team_id].goals[me(It.data.plays[Ot].player_name)].event=[],M.value[mt.home_team.team_id].goals[me(It.data.plays[Ot].player_name)].name=me(It.data.plays[Ot].player_name)),M.value[mt.home_team.team_id].goals[me(It.data.plays[Ot].player_name)].event.push(It.data.plays[Ot].minute)):It.data.plays[Ot].category_name=="Autogol"?(me(It.data.plays[Ot].player_name)in M.value[mt.home_team.team_id].goals||(M.value[mt.home_team.team_id].goals[me(It.data.plays[Ot].player_name)]={},M.value[mt.home_team.team_id].goals[me(It.data.plays[Ot].player_name)].event=[],M.value[mt.home_team.team_id].goals[me(It.data.plays[Ot].player_name)].name=me(It.data.plays[Ot].player_name)),M.value[mt.home_team.team_id].goals[me(It.data.plays[Ot].player_name)].event.push(It.data.plays[Ot].minute)):(me(It.data.plays[Ot].player_name)in M.value[mt.visiting_team.team_id].goals||(M.value[mt.visiting_team.team_id].goals[me(It.data.plays[Ot].player_name)]={},M.value[mt.visiting_team.team_id].goals[me(It.data.plays[Ot].player_name)].event=[],M.value[mt.visiting_team.team_id].goals[me(It.data.plays[Ot].player_name)].name=me(It.data.plays[Ot].player_name)),M.value[mt.visiting_team.team_id].goals[me(It.data.plays[Ot].player_name)].event.push(It.data.plays[Ot].minute)))}catch(bt){return Promise.reject(bt)}}function Se(mt){p.value=!0,mt.is_live!=1&&mt.game_status!=0&&(mt.game_status==4||Object.keys(mt.minutes).length>0)?(z.value=1,M.value={plays:mt.minutes,home_team:mt.home_team,visiting_team:mt.visiting_team}):(z.value=0,we(mt))}function Ce(){H=new ResizeObserver(mt=>{for(const bt of mt)$.value=bt.contentRect.width}),H.observe(Z.value)}const Me=t.computed(()=>{let mt={};return r.value&&r.value.game_id&&(mt={gameId:r.value.game_id,id:r.value.game_id,seasonId:r.value.season_id,regularSeasonId:r.value.regularSeasonId,matchday_name:r.value.matchday_name,status:r.value.game_status,score:r.value.score,game_status:r.value.game_status,dateTimeUTC:r.value.date_time_utc,homeTeam:r.value.home_team,awayTeam:r.value.visiting_team,is_live:r.value.is_live,minutes:r.value.minutes}),mt});t.watch(()=>r.value.game_id,He,{immediate:!0}),t.watch(()=>r.value.is_live,Pe,{immediate:!0}),t.watch(()=>s.state.nextGeneral.gameForAnalysis,()=>{s.commit("nextGeneral/updateIsSocketConnected",U.socket.connected)},{deep:!0,immediate:!0});function Le(mt){_.value=mt.is_captured,b.value=mt.is_female,T.value=mt.is_captured!==0,a.value.id!==mt.id&&(a.value=mt,s.commit("gameGlobal/setTournamentType",mt.tournament_type))}const ze=o;function He(mt,bt){s.commit("nextGeneral/updateShowLiveData",!0);const It=b.value?"Destacados":"Destacadas";N.value.forEach(Ot=>{Ot.name===It&&(Ot.name=b.value?"Destacadas":"Destacados")}),we({game_id:r.value.game_id,home_team:r.value.home_team,visiting_team:r.value.visiting_team}),Ie(),G.value+=1}function Pe(mt,bt){if(Ie(),s.state.nextGeneral.gameForAnalysis.is_live!==mt&&s.commit("nextGeneral/updateGameForAnalysis",{...s.state.nextGeneral.gameForAnalysis,is_live:r.value.is_live,game_status:r.value.game_status}),mt){const It=e8();It.disconnected?t8():It.connected&&r.value.game_id&&r8(`game.${r.value.game_id}.v2`),Ve(),B=setInterval(()=>{z.value=0,we({game_id:r.value.game_id,home_team:r.value.home_team,visiting_team:r.value.visiting_team})},6e4)}else Ve(),a8();mt!==bt&&(G.value+=1)}function Ve(){B&&clearInterval(B)}function Ie(){N.value=[],r.value.is_live||r.value.game_status===4?N.value=[...O.value]:N.value=[...j.value],U.isWidget||((v.value.is_tactic_available===0||r.value.is_live||r.value.game_status===0)&&N.value.pop(),r.value.has_tracking===1&&!(r.value.is_live||r.value.game_status===4)&&N.value.push({componentName:"GSCPositining",name:"Posicionamiento",id:8})),ne.value=N.value[0]}function ge(mt){mt.gameSeasonId=r.value.season_id,mt.gameRegularSeasonId=r.value.regularSeasonId,!(!mt.auxwidget&&Be.value&&!Be.value.canPrivilegesTeamPlayVideos)&&((r.value.is_live||r.value.game_status===0||r.value.game_status===1)&&(mt.gameIdsToFilter=[r.value.game_id]),mt.isLiveAccumulated&&(mt.gameIdsToFilter=null),(r.value.is_live||r.value.game_status===0)&&!mt.isLiveAccumulated&&(mt.liveGameConfig={gameId:r.value.game_id}),mt.fakeLiveConfig={gameId:r.value.game_id},ze("openmedia",mt))}function Ae(mt){ze("onOpenProfile",mt)}function ke(mt){ze("openProfileTeam",mt)}function je(mt){ze("openProfilePlayer",mt)}function De(mt){et(mt),mt=="Estadísticas"&&(K.value="Comparativa")}function Ne(){K.value=""}function qe(mt){v.value.id!==mt.id&&(v.value=mt,ze("change-season-id",mt.id))}const Ze=t.computed(()=>N.value.reduce((mt,bt)=>(U.disabledSectionsIds.includes(bt.id)||Be.value&&!Be.value.isVideoTabVisible&&bt.id===2||U.clientPrivilegesBySeasons&&bt.id===7||(T.value||bt.id!==5&&bt.id!==6)&&mt.push(bt.name),mt),[]));function _e(mt){if(r.value.is_live||r.value.game_status===1||r.value.game_status===0){const bt=mt.playingAs.has(r.value.playingAs);return U.clientPrivilegesBySeasons.canPlayVideos&&bt}else{const bt=Re.value.filter(It=>mt.playingAs.has(It.playingAs));return U.clientPrivilegesBySeasons.canPlayVideos&&bt.length>0}}const Be=t.computed(()=>{if(U.clientPrivilegesBySeasons){if(v.value&&r.value&&r.value.game_id){const mt=U.clientPrivilegesBySeasons.seasonsAndPrivileges.get(v.value.id);if(mt)if(We(mt.playingAs),(r.value.is_live||r.value.game_status===1||r.value.game_status===0)&&s.state.nextGeneral.showLiveData){const bt=mt.playingAs.has(r.value.playingAs);return{seasonAndPrivileges:mt,canPrivilegesTeamPlayVideos:U.clientPrivilegesBySeasons.canPlayVideos&&bt,isPrivilegesTeamOnly:!1,isPrivilegesTeamHome:r.value.home_team.team_id===mt.teamId,homeTeamDetails:{canPlayVideos:bt,team:r.value.home_team},awayTeamDetails:{canPlayVideos:bt,team:r.value.visiting_team},isVideoTabVisible:_e(mt)}}else{const bt=r.value.home_team.team_id===mt.teamId,It=Re.value.filter(Gt=>mt.playingAs.has(Gt.playingAs));return{seasonAndPrivileges:mt,canPrivilegesTeamPlayVideos:U.clientPrivilegesBySeasons.canPlayVideos&&It.length>0,isPrivilegesTeamOnly:!0,isPrivilegesTeamHome:bt,homeTeamDetails:{canPlayVideos:U.clientPrivilegesBySeasons.canPlayVideos&&bt&&It.length>0,team:r.value.home_team},awayTeamDetails:{canPlayVideos:U.clientPrivilegesBySeasons.canPlayVideos&&!bt&&It.length>0,team:r.value.visiting_team},isVideoTabVisible:_e(mt)}}We(new Set)}return ee}return null}),Re=t.computed(()=>{if(U.clientPrivilegesBySeasons){if(v.value){const mt=U.clientPrivilegesBySeasons.seasonsAndPrivileges.get(v.value.id);if(mt)return q.value.filter(bt=>bt.game_status===1&&mt.playingAs.has(bt.playingAs))}return[]}return[]});t.watch(Ze,()=>{Be.value&&!Be.value.canPrivilegesTeamPlayVideos&&(ne.value.id===2||ne.value.id===7||ne.value.id===8)&&et("Resumen")},{deep:!0,immediate:!0});function We(mt){I.value=mt}function et(mt){if(s.commit("nextGeneral/updateShowLiveData",!0),C.value!=null&&(clearInterval(C.value),C.value=null),E.value!=null&&(clearInterval(E.value),E.value=null),A.value!=null&&(clearInterval(A.value),A.value=null),L.value!=null&&(clearInterval(L.value),L.value=null),P.value.length>0){for(let bt of P.value)clearInterval(bt);P.value=[]}U.isWidget?ne.value=N.value.find(bt=>bt.name===mt)||N.value[1]:ne.value=N.value.find(bt=>bt.name===mt)||N.value[0]}t.onMounted(()=>{Ce(),t.nextTick(()=>{U.isSynchronization&&et("Táctica Fija")})}),t.onBeforeUnmount(()=>{if(H&&H.disconnect(),C.value!=null&&(clearInterval(C.value),C.value=null),E.value!=null&&(clearInterval(E.value),E.value=null),A.value!=null&&(clearInterval(A.value),A.value=null),L.value!=null&&(clearInterval(L.value),L.value=null),P.value.length>0){for(let mt of P.value)clearInterval(mt);P.value=[]}n8()});function tt(mt){if(mt.playingAs||(mt.playingAs=Q.value?mt.home_team.team_id===Q.value?1:2:0),C.value!=null&&(clearInterval(C.value),C.value=null),E.value!=null&&(clearInterval(E.value),E.value=null),A.value!=null&&(clearInterval(A.value),A.value=null),L.value!=null&&(clearInterval(L.value),L.value=null),P.value.length>0){for(let bt of P.value)clearInterval(bt);P.value=[]}r.value=mt,mt.is_live&&mt.game_status===4?t8():a8()}function ht(mt){q.value=mt.map(bt=>{const It={...bt};return Q.value&&(It.playingAs=It.home_team.team_id===Q.value?1:2),It})}return(mt,bt)=>(t.openBlock(),t.createElementBlock("div",{class:"game-data",ref_key:"gamedata",ref:Z},[t.createElementVNode("div",OGt,[t.withDirectives(t.createElementVNode("div",DGt,[t.createVNode(t.unref(TA),{"current-season-id":e.currentSeasonId,"tournaments-ids-to-include":e.tournamentsIdsToInclude,"api-url":e.tournamentSelectProps?void 0:e.tournamentsApiUrl,items:e.tournamentSelectProps?e.tournamentSelectProps.items:void 0,"default-item-by-prop":e.tournamentSelectProps?e.tournamentSelectProps.defaultItemByProp:void 0,"list-height":"370px","are-female-visible":e.areFemaleTournamentsVisible,"is-clubes-active":e.isClubes,"is-female-mode":e.isFemaleMode,token:e.token,onInput:Le,onChangeTournaments:Le},null,8,["current-season-id","tournaments-ids-to-include","api-url","items","default-item-by-prop","are-female-visible","is-clubes-active","is-female-mode","token"]),t.createVNode(t.unref(MA),{"current-season-id":e.currentSeasonId,"list-height":"370px",seasons:a.value.seasons,onInput:qe},null,8,["current-season-id","seasons"])],512),[[t.vShow,e.areTournamentAndSeasonSelectsVisible]]),t.createElementVNode("div",NGt,[t.createVNode(t.unref(Pee),{"plays-live":M.value,"info-live":S.value,token:k.value,is_captured:_.value,"await-for-seasons":"",seasons:X.value,"is-pagination-visible":!1,"are-games-carousel-type":"","default-game-id":e.defaultGameId,"sort-calendar":e.sortCalendar,"is-team-game-per-page":e.isTeamGamePerPage,"client-privileges-team-id":Q.value,"only-games-team-id":Q.value,"tournament-type":t.unref(s).state.gameGlobal.tournamentType,"provider-id":t.unref(s).getters.getProviderId,"is-dev-apis":t.unref(s).getters.getIsDevApis,onChangeGameCarousel:tt,onOpenModalEvent:Se,onChangeGamesByClientPrivileges:ht},null,8,["plays-live","info-live","token","is_captured","seasons","default-game-id","sort-calendar","is-team-game-per-page","client-privileges-team-id","only-games-team-id","tournament-type","provider-id","is-dev-apis"])])]),p.value?(t.openBlock(),t.createBlock(mN,{key:0,width:$.value,onCloseModalEventsLive:ce,plays:M.value,game:r.value,type:z.value},null,8,["width","plays","game","type"])):t.createCommentVNode("",!0),t.createElementVNode("div",FGt,[r.value&&"live_stats"in r.value&&r.value.live_stats==0&&r.value.game_status==0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[$.value>500?(t.openBlock(),t.createElementBlock("div",RGt,bt[0]||(bt[0]=[t.createElementVNode("div",{class:"no-stats-content"},[t.createElementVNode("h2",{class:"no-stats-title"}," Este partido se publicará en un plazo de hasta 72 horas después de finalizada la jornada. ")],-1)]))):(t.openBlock(),t.createElementBlock("div",VGt,bt[1]||(bt[1]=[t.createElementVNode("div",{class:"no-stats-content"},[t.createElementVNode("h2",{class:"no-stats-title"}," Este partido se publicará en un plazo de hasta 72 horas después de finalizada la jornada. ")],-1)])))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createElementVNode("div",jGt,[t.createElementVNode("div",UGt,[t.createVNode(t.unref(XS),{type:2,buttons:Ze.value,"font-family":"Poppins-Regular","font-size":"16px",width:$.value<400||$.value<700?"max-content":$.value<840||$.value<1050?"155px":"165px","selected-option":ne.value.name,borderWidth:"1px",arrow:!1,height:"30px",onInput:et},null,8,["buttons","width","selected-option"])])]),Me.value&&Me.value.gameId?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(ne.value.componentName),{key:G.value,game:Me.value,"is-widget":e.isWidget,"team-widget":e.teamWidget,onIntervalidpossesion:ie,onIntervalidhighlive:se,onIntervalidtops:pe,onIntervalidgs:re,subsection:t.unref(K),seasonSelected:v.value,tournamentSelected:a.value,"tournament-select-props":e.tournamentSelectProps,showLineups:T.value,socket:e.socket,"time-live-prominent-data":x,"time-live-highlights-prominent-and-video":h,"time-live-possesion":n,"time-live-video-goals":i,"time-live-video-best-plays":c,"time-live-video-this-game":l,"time-live-video-specific-plays":d,"time-live-comparative-best-players":g,"time-live-comparative-avanced":w,is_captured:_.value,"is-tactic-visible":!!v.value.show_tactic,"is-synchronization":e.isSynchronization,"can-play-videos":Be.value?Be.value.canPrivilegesTeamPlayVideos:!0,"video-privileges-playing-as":I.value,"client-privileges-team-id":Q.value,"play-videos-privileges":Be.value,token:k.value,"game-events-interval-minutes":e.gameEventsIntervalMinutes,"volumetric-field-interval-minutes":e.volumetricFieldIntervalMinutes,"chalkboard-interval-minutes":e.chalkboardIntervalMinutes,"is-female-mode":e.isFemaleMode,"provider-id":t.unref(s).getters.getProviderId,"is-dev-apis":t.unref(s).getters.getIsDevApis,onResetSubsection:Ne,onOpenmedia:ge,onOnOpenProfile:Ae,onOpenProfileTeam:ke,onOpenProfilePlayer:je,onChangeToTab:De,onOpenMediaPlayer:ge,onIntervalid:he},null,40,["game","is-widget","team-widget","subsection","seasonSelected","tournamentSelected","tournament-select-props","showLineups","socket","is_captured","is-tactic-visible","is-synchronization","can-play-videos","video-privileges-playing-as","client-privileges-team-id","play-videos-privileges","token","game-events-interval-minutes","volumetric-field-interval-minutes","chalkboard-interval-minutes","is-female-mode","provider-id","is-dev-apis"])):t.createCommentVNode("",!0)],64))])],512))}}),[["__scopeId","data-v-ce7f3d66"]]);async function wW({seasonId:e,providerId:o,isDevApis:s},B=!0){try{const U=`https://golstats-microservices.s3-us-west-2.amazonaws.com/statsLeagueBySeason-${e}.json`;return(await(await fetch(qy(U,o))).json()).data}catch(U){if(B)return wW({seasonId:e,providerId:o,isDevApis:s},!1);throw new Error(U)}}async function ZGt({seasonId:e,providerId:o,isDevApis:s}){try{return(await Uu({url:`https://iwxfzq6e2h.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsLeagueBySeason/${e}`,providerId:o,isDevApis:s})).data.data}catch(B){return Promise.reject(B)}}async function WGt({seasonId:e,providerId:o,isDevApis:s}){try{return(await Uu({url:`https://sqf4rkvoge.execute-api.us-west-2.amazonaws.com/prod/v3/statisticsGroupedBySeason/${e}`,providerId:o,isDevApis:s})).data.data}catch(B){return Promise.reject(B)}}function qGt(e,o,s,B,U,m,y=!1){const a=s.map(v=>v===1?2:v===2?1:3);return e.filter(v=>{const p=m&&v[U.teamId]?v[U.teamId]!==m:!1,r=o===1?2:1;return(y||B.includes(v[U.gameId]))&&(!o||(p?r:o)===v[U.playingAs])&&(s.includes(v[U.matchResult])&&v[U.teamId]===m||a.includes(v[U.matchResult])&&v[U.teamId]!==m)})}function kW(e,o,s,B,U){return o.length===2&&s.length===3&&B.length===6?e:e.filter(m=>o.includes(m[U.playingAs])&&s.includes(m[U.matchResult])&&B.includes(m[U.section]))}async function SW({seasonId:e,providerId:o,isDevApis:s}){try{const B=`https://8tvo5bp9ai.execute-api.us-west-2.amazonaws.com/prod/gamesBySeason/${e}`;return(await Uu({url:B,providerId:o,isDevApis:s})).data}catch(B){return Promise.reject(B)}}async function JGt({seasonId:e,gameId:o,providerId:s,isDevApis:B}){try{const U=`https://iwxfzq6e2h.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsLeagueBySeason/${e}/games/${o}`,{data:m}=await Uu({url:U,providerId:s,isDevApis:B});return m}catch(U){return Promise.reject(U)}}async function YGt({gameId:e,providerId:o,isDevApis:s}){try{const B=`https://2uj7ojhmt5.execute-api.us-west-2.amazonaws.com/prod/V2/statisticsLive/${e}`;return(await Uu({url:B,providerId:o,isDevApis:s})).data.data}catch(B){return Promise.reject(B)}}async function XGt({gameId:e,providerId:o,isDevApis:s}){try{const B=`https://55sbpmq0f5.execute-api.us-west-2.amazonaws.com/prod/specialMentions/${e}`;return(await Uu({url:B,providerId:o,isDevApis:s})).data.data||[]}catch(B){return Promise.reject(B)}}const $Gt=["categoryId","matchLapse","section","matchResult","playingAs","total"];let lA=null;function CW(){return lA||(lA=Yy($Gt)),lA}async function KGt(e){try{const o=`https://d2oco6mqmc.execute-api.us-west-2.amazonaws.com/prod/teamsBySeason/${e.seasonId}`;return(await Uu({url:o,providerId:e.providerId,isDevApis:e.isDevApis})).data}catch(o){return Promise.reject(o)}}async function TW({seasonId:e,teamId:o,providerId:s,isDevApis:B}){try{return await Uu({url:`https://a4dcb6avog.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsTeamBySeason/${e}/${o}`,providerId:s,isDevApis:B})}catch(U){return Promise.reject(U)}}async function QGt(e){try{const o=`https://yjeig444bb.execute-api.us-west-2.amazonaws.com/prod/teamsBySeason/${e.seasonId}`;return await Uu({url:o,providerId:e.providerId,isDevApis:e.isDevApis})}catch(o){return Promise.reject(o)}}async function eHt(e){try{return await Uu({url:`https://nckawv8v3b.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsByGame/${e.gameId}`,providerId:e.providerId,isDevApis:e.isDevApis})}catch(o){return Promise.reject(o)}}const tHt={leagueGeneral:{namespaced:!0,state:{seasonPlays:[],currentSeasonGames:[],currentSeasonTeams:[],selectedRound:1,booleanAreLiveGames:!1,booleanIsLiveGamesModalOpen:!1},getters:{seasonPlays:e=>e.seasonPlays,filteredPlaysStack(e,o,s,B){return qGt(e.seasonPlays,B["filterGeneral/getPlayingAs"],B["filterGeneral/getResults"],B["filterGeneral/getSelectedGamesIds"],CW(),B["teamsGeneral/team"].team_id,!0)},nextGamesSchedule(e){const o=e.currentSeasonGames.reduce((s,B)=>{const U={...B};return U.home_team=e.currentSeasonTeams.find(m=>m.team_id===B.home_team),U.visiting_team=e.currentSeasonTeams.find(m=>m.team_id===B.visiting_team),s[B.matchday_abbreviation]?s[B.matchday_abbreviation][B.game_status===3?"canceled":B.date]?s[B.matchday_abbreviation][B.game_status===3?"canceled":B.date].push(U):s[B.matchday_abbreviation][B.game_status===3?"canceled":B.date]=[U]:s[B.matchday_abbreviation]={[B.game_status===3?"canceled":B.date]:[U]},s},{});for(let[s,B]of Object.entries(o))o[s]=Object.entries(B).map(([U,m])=>({date:U,games:m})),o[s].sort((U,m)=>U.date<m.date?-1:U.date>m.date?1:0);return o},matchdaysDates(e,o){let s=[];if(o.nextGamesSchedule){let B=Object.keys(o.nextGamesSchedule);for(let U of B){let m=Number(U.replace("M","")),y=o.nextGamesSchedule[U].map(a=>({matchday:m,date:new Date(a.date)}));s=s.concat(y)}}return s},closestMatchDay(e,o){let s=new Date,B=0,U=-new Date(0,0,0).valueOf(),m=o.matchdaysDates,y=m.length;for(let a=0;a<m.length;a++)B=Math.abs(m[a].date-s),B<U&&(y=a,U=B);return m[y]?m[y].matchday:1}},mutations:{setBooleanIsLiveGamesModalOpen(e,o){e.booleanIsLiveGamesModalOpen=o},setBooleanAreLiveGames(e,o){e.booleanAreLiveGames=o},updateSeasonPlays(e,o){e.seasonPlays=o},updateCurrentSeasonTeams(e,o){e.currentSeasonTeams=o},updateCurrentSeasonGames(e,o){e.currentSeasonGames=o},updateSelectedRound(e,o){e.selectedRound=o}},actions:{async getSeasonPlays({commit:e,rootGetters:o},s=!1){try{const B=o.getProviderId,U=o.getIsDevApis,m=await wW({seasonId:o["filterGeneral/getSeasonId"],providerId:B,isDevApis:U});if(s)return m;e("updateSeasonPlays",m)}catch(B){return Promise.reject(B)}},async getCurrentSeasonGames({commit:e,rootGetters:o}){try{const s=o.getProviderId,B=o.getIsDevApis,U=await SW({seasonId:o["loginGeneral/seasonId"],providerId:s,isDevApis:B});e("updateCurrentSeasonGames",U)}catch(s){return Promise.reject(s)}},async getCurrentSeasonTeams({commit:e,rootGetters:o}){try{const s=o.getProviderId,B=o.getIsDevApis,U=await KGt({seasonId:o["loginGeneral/seasonId"],providerId:s,isDevApis:B});e("updateCurrentSeasonTeams",U.teams)}catch(s){return Promise.reject(s)}},async isDataFilled({state:e,dispatch:o,commit:s}){try{if(e.currentSeasonGames.length>0&&e.currentSeasonTeams.length>0)return s("setIsSectionLoading",!1,{root:!0}),!0;const B=[void 0,void 0];return e.currentSeasonGames.length===0&&(B[0]=o("getCurrentSeasonGames")),e.currentSeasonTeams.length===0&&(B[1]=o("getCurrentSeasonTeams")),await Promise.all(B),!1}catch(B){throw new Error(B)}}}}};async function aHt({filter:e,providerId:o,isDevApis:s}){try{const B=`https://n7ielynjxk.execute-api.us-east-2.amazonaws.com/qa/filters?filters=${e}`,{data:U}=await Uu({url:B,providerId:o,isDevApis:s});return U}catch(B){return Promise.reject(B)}}const rHt=["categoryId","teamId","matchResult","playingAs","matchLapse","section","total"];let cA=null;function nHt(){return cA||(cA=Yy(rHt)),cA}const uA=6;let AW=uA;function iHt(e){AW=Math.max(uA,Number(e)||uA)}class Uw{constructor(){_u(this,"maximumLiveSection",1);_u(this,"accomplished",{totalPostGame:0,avgPostGame:0,avgPreGame:0,totalLive:0,avgPostGameTrendLive:{accumulated:this.getZeroTotalsTrendSections(),sections:this.getZeroTotalsTrendSections()},totalsLiveTrendLive:{accumulated:this.getZeroTotalsTrendSections(),sections:this.getZeroTotalsTrendSections()},ranking:null,leader:{},arrayRankings:[]});_u(this,"received",{totalPostGame:0,avgPostGame:0,totalLive:0,avgPostGameTrendLive:{accumulated:this.getZeroTotalsTrendSections(),sections:this.getZeroTotalsTrendSections()},totalsLiveTrendLive:{accumulated:this.getZeroTotalsTrendSections(),sections:this.getZeroTotalsTrendSections()},ranking:null,leader:{}})}setMaximumLiveSection(o){o>this.maximumLiveSection&&(this.maximumLiveSection=o)}getZeroTotalsTrendSections(){return new Array(AW).fill(0)}resetTotals(){this.accomplished.totalPostGame=0,this.accomplished.avgPostGame=0,this.received.totalPostGame=0,this.received.avgPostGame=0,this.accomplished.avgPostGameTrendLive.sections=this.getZeroTotalsTrendSections(),this.accomplished.avgPostGameTrendLive.accumulated=this.getZeroTotalsTrendSections(),this.received.avgPostGameTrendLive.sections=this.getZeroTotalsTrendSections(),this.received.avgPostGameTrendLive.accumulated=this.getZeroTotalsTrendSections()}resetTotalsLive(){this.accomplished.totalLive=0,this.received.totalLive=0,this.accomplished.totalsLiveTrendLive.sections=this.getZeroTotalsTrendSections(),this.accomplished.totalsLiveTrendLive.accumulated=this.getZeroTotalsTrendSections(),this.received.totalsLiveTrendLive.sections=this.getZeroTotalsTrendSections(),this.received.totalsLiveTrendLive.accumulated=this.getZeroTotalsTrendSections()}increaseAccomplishedByOne(o,s,B){B&&(this.setMaximumLiveSection(o),this.accomplished.totalLive+=s,this.accomplished.totalsLiveTrendLive.sections[o-1]+=s,this.increaseTrendLiveAccumulatedByOne(this.accomplished.totalsLiveTrendLive,o,s)),this.accomplished.totalPostGame+=s,this.accomplished.avgPostGameTrendLive.sections[o-1]+=s,this.increaseTrendLiveAccumulatedByOne(this.accomplished.avgPostGameTrendLive,o,s)}increaseReceivedByOne(o,s,B){B&&(this.setMaximumLiveSection(o),this.received.totalLive+=s,this.received.totalsLiveTrendLive.sections[o-1]+=s,this.increaseTrendLiveAccumulatedByOne(this.received.totalsLiveTrendLive,o,s)),this.received.totalPostGame+=s,this.received.avgPostGameTrendLive.sections[o-1]+=s,this.increaseTrendLiveAccumulatedByOne(this.received.avgPostGameTrendLive,o,s)}increaseTrendLiveAccumulatedByOne(o,s,B){for(;o.accumulated.length<s;)o.accumulated.push(0);for(let U=s-1;U<o.accumulated.length;U++)o.accumulated[U]+=B}decreaseAccomplishedLiveByOne(o,s){this.accomplished.totalLive>0&&(this.accomplished.totalLive-=s),this.accomplished.totalsLiveTrendLive.sections[o-1]>0&&(this.accomplished.totalsLiveTrendLive.sections[o-1]-=s,this.decreaseTotalsLiveTrendLiveAccumulatedByOne(this.accomplished.totalsLiveTrendLive,o,s))}decreaseReceivedLiveByOne(o,s){this.received.totalLive>0&&(this.received.totalLive-=s),this.received.totalsLiveTrendLive.sections[o-1]>0&&(this.received.totalsLiveTrendLive.sections[o-1]-=s,this.decreaseTotalsLiveTrendLiveAccumulatedByOne(this.received.totalsLiveTrendLive,o,s))}decreaseTotalsLiveTrendLiveAccumulatedByOne(o,s,B){for(let U=o.accumulated.length-1;U>=s-1;U--)o.accumulated[U]-=B}calculateAvg(o){o&&(this.accomplished.avgPostGame=this.accomplished.totalPostGame/o,this.received.avgPostGame=this.received.totalPostGame/o,this.accomplished.avgPostGameTrendLive.sections=this.getAvgPostGameTrendLiveAvg(this.accomplished.avgPostGameTrendLive.sections,o),this.accomplished.avgPostGameTrendLive.accumulated=this.getAvgPostGameTrendLiveAvg(this.accomplished.avgPostGameTrendLive.accumulated,o),this.received.avgPostGameTrendLive.sections=this.getAvgPostGameTrendLiveAvg(this.received.avgPostGameTrendLive.sections,o),this.received.avgPostGameTrendLive.accumulated=this.getAvgPostGameTrendLiveAvg(this.received.avgPostGameTrendLive.accumulated,o))}getAvgPostGameTrendLiveAvg(o,s){return o.map(B=>B/s)}calculateRanking(o,s,B,U,m,y,a,v){let p=[];U===3&&o&&o.length&&(B.playingAs.length!==2||B.matchResult.length!==3)?p=Array.from(o.reduce((_,b)=>{const x=b[s.playingAs]===1,h=x?"1":"2",n=_.get(b[s.gameId]);if(n)n[h]?n[h].arrayPlays.push(b):n[h]={numberTeamId:b[s.teamId],arrayPlays:[b]};else{const i={numberMatchResult:b[s.matchResult]};x&&(i[1]={numberTeamId:b[s.teamId],arrayPlays:[b]}),_.set(b[s.gameId],i)}return _},new Map).values()).reduce((_,b)=>{const x=B.playingAs.length===2?"both":B.playingAs[0].toString();return(x==="both"&&(b[1].numberTeamId===B.teamId||b[2].numberTeamId===B.teamId)||x!=="both"&&b[x].numberTeamId===B.teamId)&&B.matchResult.includes(b.numberMatchResult)&&_.push(...b[1].arrayPlays,...b[2].arrayPlays),_},[]).filter(_=>B.sections.includes(_[s.section])):(p=o?[...o]:[],a&&o&&(p=o.filter(r=>B.playingAs.includes(r[s.playingAs])&&B.matchResult.includes(r[s.matchResult])&&B.sections.includes(r[s.section])))),this.setTeamRanking(p,U,s,B.teamId,y,"accomplished",v)}setTeamRanking(o,s,B,U,m,y,a){let v=null,p=null;s===3&&(v=new Map,p={},o.forEach(b=>{const x=v.get(b[B.gameId]);x?x[b[B.teamId.toString()]]?x[b[B.teamId.toString()]]+=b[B.total]:x[b[B.teamId.toString()]]=b[B.total]:v.set(b[B.gameId],{[b[B.teamId.toString()]]:b[B.total]})}),Array.from(v.values()).forEach(b=>{const[x,h]=Object.keys(b).map(i=>i),n=b[x]+b[h];this.addPassesAvgByTeam(p,x,n?b[x]/n:0),this.addPassesAvgByTeam(p,h,n?b[h]/n:0)}));const r=m.sort((b,x)=>b.team_id-x.team_id).map(b=>{if(s===3){const x=p[b.team_id.toString()];return{teamId:b.team_id,points:x?x.numberTotalPassesAvg/x.numberGamesCount:0,total:x?x.numberTotalPassesAvg:0}}else{const x=o.reduce((h,n)=>n[B.teamId]===b.team_id&&s===n[B.categoryId]?h+n[B.total]:h,0);return{teamId:b.team_id,points:b[`${a}FilterGames`]?x/b[`${a}FilterGames`]:0,total:x}}}).sort((b,x)=>x.points-b.points);this.accomplished.arrayRankings=r;const _=r.findIndex(b=>b.teamId===U);s===3&&(this.accomplished.avgPreGame=r[_].points),this[y].ranking=_+1,this[y].leader=r[0]}addPassesAvgByTeam(o,s,B){o[s]?(o[s].numberGamesCount+=1,o[s].numberTotalPassesAvg+=B):o[s]={numberGamesCount:1,numberTotalPassesAvg:B}}}class oHt{constructor(o,s,B,U,m,y,a,v,p,r,_=!0){_u(this,"id","");_u(this,"generalId",0);_u(this,"name","");_u(this,"names",{"0-0":"","1-1":"","0-1":"","1-0":""});_u(this,"mentions",{"0-0":"","1-1":"","0-1":"","1-0":""});_u(this,"accomplishedCategoryIds",[]);_u(this,"receivedCategoryIds",[]);_u(this,"generalCategoriesIds",{accomplished:0,received:0});_u(this,"specialMention","");_u(this,"homeTeam",new Uw);_u(this,"visitingTeam",new Uw);_u(this,"isLeagueDataCalculated",!1);_u(this,"leagueAccomplishedMax",0);_u(this,"leagueReceivedMax",0);_u(this,"leagueAccomplishedAvg",0);_u(this,"leagueReceivedAvg",0);_u(this,"leagueAccomplishedAccumulator",0);_u(this,"leagueReceivedAccumulator",0);_u(this,"homeTeamType","homeTeam");_u(this,"visitingTeamType","visitingTeam");_u(this,"betOnly",!1);_u(this,"isPercent",!1);this.id=`${B.accomplished}-${B.received}`,this.accomplishedCategoryIds=o||[],this.receivedCategoryIds=s||[],this.generalCategoriesIds=B||{accomplished:0,received:0},this.name=U,this.names["0-0"]=U||"",this.names["1-1"]=m||"",this.names["0-1"]=y||"",this.names["1-0"]=a||"",this.generalId=v||0,this.betOnly=p||!1,this.isPercent=r||!1,this.isVisible=_}addLeaguePlays(o,s,B){o.length===0||!B||this.isLeagueDataCalculated||(o.forEach(U=>{this.isAccomplishedLeaguePlay(U[s.categoryId])&&(this.leagueAccomplishedAccumulator+=U[s.total]),this.isReceivedLeaguePlay(U[s.categoryId])&&(this.leagueReceivedAccumulator+=U[s.total])}),this.leagueAccomplishedAvg=(this.leagueAccomplishedAccumulator/(2*B)).toFixed(2),this.leagueAccomplishedMax=Math.round(this.leagueAccomplishedAvg*1.5),this.leagueReceivedAvg=(this.leagueReceivedAccumulator/(2*B)).toFixed(2),this.leagueReceivedMax=Math.round(this.leagueReceivedAvg*1.5),this.isLeagueDataCalculated=!0)}addSpecialMention(o,s,B){let U="-";for(const[m,y]of Object.entries(this.generalCategoriesIds))o===y&&(U=`${m==="accomplished"?"0":"1"}${U}`),s===y&&(U=`${U}${m==="accomplished"?"0":"1"}`);U.length===3&&(this.mentions[U]=B)}resetMentions(){this.mentions={"0-0":"","1-1":"","0-1":"","1-0":""}}addTeamPlays(o,s,B,U,m){!B||!m||o!==this.homeTeamType&&o!==this.visitingTeamType||(B.forEach(y=>{this.isAccomplishedPlay(y[U.categoryId])?this[o].increaseAccomplishedByOne(y[U.section],y[U.total]):this.isReceivedPlay(y[U.categoryId])&&this[o].increaseReceivedByOne(y[U.section],y[U.total])}),this[o].calculateAvg(m))}addLivePlay(o,s,B,U,m=!1,y=!1){(o===this.homeTeamType||o===this.visitingTeamType)&&B[U.categoryId].includes(this.generalCategoriesIds.accomplished)&&this[o].increaseAccomplishedByOne(B[U.section],B[U.total],!0)}subtractLivePlay(o,s,B,U,m){(o===this.homeTeamType||o===this.visitingTeamType)&&(this.isAccomplishedPlay(B[U.categoryId])&&!m?this[o].decreaseAccomplishedLiveByOne(B[U.section],B[U.total]):this.isReceivedPlay(B[U.categoryId])&&m&&this[o].decreaseReceivedLiveByOne(B[U.section],B[U.total]))}isAccomplishedLeaguePlay(o){return!!(this.receivedCategoryIds[0]===40?this.receivedCategoryIds:this.accomplishedCategoryIds).find(B=>o===B||`${o}_r`===B)}isReceivedLeaguePlay(o){return!!this.receivedCategoryIds.find(s=>o===s)}isAccomplishedPlay(o){return this.generalCategoriesIds.accomplished===o}isReceivedPlay(o){return this.generalCategoriesIds.received===o}calcRankingLeague(o,s,B,U,m,y=!1){this[this.homeTeamType].calculateRanking(o,s,B,this.generalCategoriesIds.accomplished,this.generalCategoriesIds.received,m,y,this.homeTeamType),this[this.visitingTeamType].calculateRanking(o,s,U,this.generalCategoriesIds.accomplished,this.generalCategoriesIds.received,m,y,this.visitingTeamType)}resetData(){this.homeTeam=new Uw,this.visitingTeam=new Uw,this.isLeagueDataCalculated=!1,this.leagueAccomplishedMax=0,this.leagueReceivedMax=0,this.leagueAccomplishedAvg=0,this.leagueReceivedAvg=0,this.leagueAccomplishedAccumulator=0,this.leagueReceivedAccumulator=0}isInGeneralCategory(o){return this.generalCategoriesIds.accomplished===o||this.generalCategoriesIds.received===o}}function sHt(e){for(const o of Object.values(e))for(let s of Object.keys(o.subcategories)){const B=o.subcategories[s];o.subcategories[s]=new oHt(B.accomplishedCategoryIds,B.receivedCategoryIds,B.generalCategoriesIds,B.accomplishedName,B.receivedName,B.accomplishedReceivedName,B.receivedAccomplishedName,B.generalId,B.betOnly,B.isPercent,B.isVisible===void 0?!0:B.isVisible)}return e}const lHt=[{parentAnalysis:[1,2,3],value:0,text:"Realizado",block:1},{parentAnalysis:[1,2,3],value:1,text:"Recibido",block:1},{parentAnalysis:[1],value:0,text:"Posesión",block:2},{parentAnalysis:[1,2],value:0,text:"Origen de gol realizado",block:3},{parentAnalysis:[1,2],value:1,text:"Origen de gol recibido",block:3}],cHt=["teamId","categoryId","matchlapse","section","matchResult","playingAs","total","gameId"];let dA=null;function uHt(){return dA||(dA=Yy(cHt)),dA}const dHt=["playId","gameId","teamId","playerId","momentOfPlay","categoryId","categoryType","matchLapse","section","matchResult","playingAs","total","coordinate1X","coordinate1Y","coordinate2X","coordinate2Y","coordinate3X","coordinate3Y"];let hA=null;function hHt(){return hA||(hA=Yy(dHt)),hA}function Gw(e,o,s){return[s.get(e[o.categoryId])||[],e[o.teamId],e[o.matchResult],e[o.playingAs],e[o.matchLapse],e[o.section],e[o.total]]}function EW(e){return[[1,1,e.local.win],[1,2,e.local.lose],[1,3,e.local.draw],[2,1,e.visit.win],[2,2,e.visit.lose],[2,3,e.visit.draw]]}function pA(e,o,s){let B=[...o];return e[s.categoryId]===2&&(B[0]=14),e[s.categoryId]===20&&(B[0]=15),[14,15].includes(B[0])?B:null}function MW(e){const o=e.indexesTSP.section;let s=0;for(const B of[e.homeTeamPlays,e.visitingTeamPlays])if(Array.isArray(B))for(const U of B){const m=U[o];m>s&&(s=m)}iHt(s)}const pHt=e8(),fHt=[{name:"Liga MX",id:1},{name:"Liga MX Femenil",id:1001},{name:"Liga Expansión MX",id:1071}],mHt={nextGeneral:{namespaced:!0,state:{seasonId:0,pastSeasonId:0,usePastSeasonId:!1,isSocketConnected:!1,indexesLP:CW(),indexesTSP:nHt(),indexesLS:uHt(),indexesTLP:hHt(),nextGamesDataStructure:{},currentSeasonGames:[],currentSeasonTeams:[],gameForAnalysis:{},showPostMatch:!1,homeResultGame:null,awayResultGame:null,selectedAnalysis:{},selectedStatisticTypeBlock:1,gameId:null,game:{},games:[],homeTeamPlays:[],visitingTeamPlays:[],currentSeasonPlays:[],livePlays:new Map,totalSeasonFinishedGames:0,totalHomeTeamFinishedGames:0,totalVisitingTeamFinishedGames:0,homeGames:[],homeTeamInfo:{},awayTeamInfo:{},visitingGames:[],idAssetSelected:1,isLive:!1,menuOptionActive:"",showLiveData:!0,showAdvanceFilter:!1,homeTeamFilter:{teamId:0,statistics:0,playingAs:[],matchResult:[],sections:[],requiresPlaysFiltering:!0},visitingTeamFilter:{teamId:0,statistics:0,playingAs:[],matchResult:[],sections:[],requiresPlaysFiltering:!0},oldSeasonId:0,statistics:[],isRankingCalculating:!0,categoriesMap:new Map,defaultFilter:null,filterAux:null,betSubcategories:[],betDescription:{},regularSeasonName:"",betSubcategoriesObjects:[],currentTournamentName:"",toBackRouteName:"home"},getters:{betSubcategoriesIds(e){return e.betSubcategories.map(o=>o.id)},showPostMatchData:e=>e.showPostMatch,getHomeResultGame:e=>e.homeResultGame,getAwayResultGame:e=>e.awayResultGame,getSeasonId:e=>e.seasonId,getGameForAnalysis:e=>e.gameForAnalysis,isLive:e=>e.isLive,showLive:e=>e.gameForAnalysis.game_status===4&&e.gameForAnalysis.is_live,menuOptionActive:e=>e.menuOptionActive,showLiveData:e=>e.showLiveData,showAdvanceFilter:e=>e.showAdvanceFilter,idAssetSelected:e=>e.idAssetSelected,gameId:e=>e.gameId,game:e=>e.game,homeTeam(e){return e.homeTeamInfo},visitingTeam(e){return e.awayTeamInfo},rankingData(e){return e.statistics},homeTeamStatisticsType(e){return e.homeTeamFilter.statistics?"received":"accomplished"},visitingTeamStatisticsType(e){return e.visitingTeamFilter.statistics?"received":"accomplished"},subcategoryName(e){return`${e.homeTeamFilter.statistics}-${e.visitingTeamFilter.statistics}`},statisticsTypes(e){return lHt.filter(o=>o.parentAnalysis.includes(e.selectedAnalysis.id))},homeTeamFilteredPlays(e){if(e.homeTeamFilter.requiresPlaysFiltering)return kW(e.homeTeamPlays,e.homeTeamFilter.playingAs,e.homeTeamFilter.matchResult,e.homeTeamFilter.sections,e.indexesTSP)},visitingTeamFilteredPlays(e){if(e.visitingTeamFilter.requiresPlaysFiltering)return kW(e.visitingTeamPlays,e.visitingTeamFilter.playingAs,e.visitingTeamFilter.matchResult,e.visitingTeamFilter.sections,e.indexesTSP)},currentSeasonTeamsIds(e){return e.currentSeasonTeams.map(o=>o.team_id)},canFilledStructure(e){return e.homeTeamFilter.requiresPlaysFiltering||e.visitingTeamFilter.requiresPlaysFiltering},totalFilteredHomeGames(e){return e.homeGames.filter(o=>e.homeTeamFilter.playingAs.includes(o[0])).filter(o=>e.homeTeamFilter.matchResult.includes(o[1])).reduce((o,s)=>o+s[2],0)},totalFilteredVisitingGames(e){return e.visitingGames.filter(o=>e.visitingTeamFilter.playingAs.includes(o[0])).filter(o=>e.visitingTeamFilter.matchResult.includes(o[1])).reduce((o,s)=>o+s[2],0)},filledDataStructure(e,o){if(e.currentSeasonPlays)for(const s of Object.values(e.nextGamesDataStructure))for(const B of Object.values(s.subcategories))e.homeTeamFilter.requiresPlaysFiltering&&B.homeTeam.resetTotals(),e.visitingTeamFilter.requiresPlaysFiltering&&B.visitingTeam.resetTotals(),B.addLeaguePlays(e.currentSeasonPlays,e.indexesLP,e.totalSeasonFinishedGames),B.addTeamPlays(B.homeTeamType,e.gameForAnalysis.home_team,o.homeTeamFilteredPlays,e.indexesTSP,e.showPostMatch?1:o.totalFilteredHomeGames),B.addTeamPlays(B.visitingTeamType,e.gameForAnalysis.visiting_team,o.visitingTeamFilteredPlays,e.indexesTSP,e.showPostMatch?1:o.totalFilteredVisitingGames);return e.nextGamesDataStructure},arrayFilledDataSortedByPriority(e,o){return Object.values(o.filledDataStructure).sort((s,B)=>s.priority-B.priority)},statisticData(e,o){for(const s of Object.values(o.filledDataStructure))if(s.parentInfo.parentAnalysis.includes(e.selectedAnalysis.id)&&s.parentInfo.analysisTypeBlocks.includes(e.selectedStatisticTypeBlock))return s.subcategories;return{}},accomplished(e){return e.homeTeamFilter.statistics===0}},mutations:{updateNextGamesDataStructure(e,o){e.nextGamesDataStructure=o},updateGameForAnalysisByProps(e,o){for(const[s,B]of Object.entries(o))e.gameForAnalysis[s]=B},setCurrentTournamentName(e,o){e.currentTournamentName=o},setBetSubcategoriesObjects(e,o){e.betSubcategoriesObjects=o},setRegularSeasonName(e,o){e.regularSeasonName=o},setBetSubcategories(e,o){e.betSubcategories=o},setBetDescription(e,o){e.betDescription=o},setSeasonId(e,o){e.seasonId=Number(o)},setHome(e,o){e.homeTeamInfo=o},setAway(e,o){e.awayTeamInfo=o},setMenuOptionActive(e,o){e.menuOptionActive=o},setPastSeasonId(e,o){e.pastSeasonId=o},setUsePastSeasonId(e,o){e.usePastSeasonId=o,o&&(e.oldSeasonId=e.pastSeasonId)},updateShowPostMatchData(e,o){e.showPostMatch=o},setHomeResultGame(e,o){e.homeResultGame=o},setAwayResultGame(e,o){e.awayResultGame=o},updateIsSocketConnected(e,o){e.isSocketConnected=o,o&&e.gameForAnalysis.is_live&&e.gameForAnalysis.game_status===4&&e.gameForAnalysis.game_id&&r8(`game.${e.gameForAnalysis.game_id}.v2`)},updateCurrentSeasonTeams(e,o){e.currentSeasonTeams=o,e.currentSeasonTeams.forEach(s=>{s.playedGames=e.currentSeasonGames.reduce((B,U)=>{if(U.game_status===1&&(U.home_team===s.team_id||U.visiting_team===s.team_id)){const m=U.score[0]-U.score[1],y=U.home_team===s.team_id;B.push({playingAs:y?1:2,matchResult:m===0?3:y?m>0?1:2:m<0?1:2})}return B},[])})},updateCurrentSeasonGames(e,o){e.currentSeasonGames=o},updateGameId(e,o){e.gameId=o},updateGameForAnalysis(e,o){e.gameForAnalysis=o,e.isLive=!!o.is_live,e.homeTeamFilter.teamId=e.gameForAnalysis.home_team,e.visitingTeamFilter.teamId=e.gameForAnalysis.visiting_team,e.isSocketConnected&&o.is_live&&o.game_status===4&&o.game_id&&r8(`game.${o.game_id}.v2`)},updateSelectedAnalysis(e,o){e.selectedAnalysis=o},updateShowLiveData(e,o){e.showLiveData=o},toggleAdvanceFilter(e){e.showAdvanceFilter=!e.showAdvanceFilter},updateIdAssetSelected(e,o){e.idAssetSelected=o},updateStats(e,o){e.currentSeasonPlays=o},updateFilterAux(e){e.filterAux||(e.filterAux={homeTeamFilter:{...e.homeTeamFilter},visitingTeamFilter:{...e.visitingTeamFilter}})},updateFilters(e,{filters:o,needsFormat:s=!1}){if(s){if(!o||!o.local||!o.local.statistics||!o.visit||!o.visit.statistics)return;e.homeTeamFilter=kI(e.homeTeamFilter,o.local,e.gameForAnalysis.home_team),e.visitingTeamFilter=kI(e.visitingTeamFilter,o.visit,e.gameForAnalysis.visiting_team),e.selectedStatisticTypeBlock!==o.local.statistics.block&&(e.selectedStatisticTypeBlock=o.local.statistics.block)}else e.homeTeamFilter={...o.homeTeamFilter,statistics:0},e.visitingTeamFilter={...o.visitingTeamFilter,statistics:0}},updateFinishedGames(e,o){e.totalSeasonFinishedGames=o},updateHomeTeamPlays(e,o){e.homeTeamPlays=o,MW(e)},updateVisitingTeamPlays(e,o){e.visitingTeamPlays=o,MW(e)},addSpecialMentions(e,o){const s=Object.values(e.nextGamesDataStructure);s.forEach(B=>{for(const U of Object.values(B.subcategories))U.resetMentions()}),s.forEach(B=>{for(const U of o)for(const m of Object.values(B.subcategories))m.addSpecialMention(U[0],U[1],U[2])})},setDefaultFilter(e,o){e.defaultFilter={homeTeamFilter:{...o.homeTeamFilter,teamId:e.gameForAnalysis.home_team},visitingTeamFilter:{...o.awayTeamFilter,teamId:e.gameForAnalysis.visiting_team}}},addLiveGamePlay(e,o){if(!e.livePlays.has(o[e.indexesTLP.playId])){e.livePlays.set(o[e.indexesTLP.playId],o);const B=Gw(o,e.indexesTLP,e.categoriesMap);for(const U of Object.values(e.nextGamesDataStructure))for(const m of Object.values(U.subcategories))m.addLivePlay(e.gameForAnalysis.home_team===B[e.indexesTSP.teamId]?"homeTeam":"visitingTeam",B[e.indexesTSP.teamId],B,e.indexesTSP,e.isLive,!1)}},updateLiveGamePlay(e,o){const s=!!o[e.indexesTLP.length],B=e.livePlays.get(o[e.indexesTLP.playId]);if(qie(B,o))return;let U="";const m=e.gameForAnalysis.home_team===o[e.indexesTLP.teamId]?"homeTeam":"visitingTeam";B&&(U=e.gameForAnalysis.home_team===B[e.indexesTLP.teamId]?"homeTeam":"visitingTeam");const y=Gw(B,e.indexesTLP,e.categoriesMap),a=pA(B,y,e.indexesTLP),v=Gw(o,e.indexesTLP,e.categoriesMap),p=pA(o,v,e.indexesTLP);for(const r of Object.values(e.nextGamesDataStructure))for(const _ of Object.values(r.subcategories))B&&(_.subtractLivePlay(U,y[e.indexesTSP.teamId],y,e.indexesTSP,s),a&&_.subtractLivePlay(U,a[e.indexesTSP.teamId],a,e.indexesTSP,s)),_.addLivePlay(m,v[e.indexesTSP.teamId],v,e.indexesTSP,e.isLive,s),p&&_.addLivePlay(m,p[e.indexesTSP.teamId],p,e.indexesTSP,e.isLive,s);e.livePlays.set(o[e.indexesTLP.playId],o)},deleteLiveGamePlay(e,o){const s=!!o[e.indexesTLP.length],B=e.livePlays.get(o[e.indexesTLP.playId]);let U="";if(B){U=e.gameForAnalysis.home_team===B[e.indexesTLP.teamId]?"homeTeam":"visitingTeam",e.livePlays.delete(B[e.indexesTLP.playId]);const m=Gw(B,e.indexesTLP,e.categoriesMap),y=pA(o,m,e.indexesTLP);for(const a of Object.values(e.nextGamesDataStructure))for(const v of Object.values(a.subcategories))v.subtractLivePlay(U,m[e.indexesTSP.teamId],m,e.indexesTSP,s),y&&v.subtractLivePlay(U,y[e.indexesTSP.teamId],y,e.indexesTSP,s)}},clearLiveTotals(e){for(const o of Object.values(e.nextGamesDataStructure))for(const s of Object.values(o.subcategories))s.homeTeam.resetTotalsLive(),s.visitingTeam.resetTotalsLive()},updateSeasonStatistics(e,o){e.statistics=o},updateOldSeasonId(e,o){e.oldSeasonId=o},addRankingInSubcategories(e,{getters:o,isPremiumAccount:s}){if(!(e.homeTeamFilter.teamId&&e.visitingTeamFilter.teamId))return;e.isRankingCalculating=!1,e.currentSeasonTeams.forEach(m=>{m.homeTeamFilterGames=m.playedGames.filter(y=>e.homeTeamFilter.playingAs.includes(y.playingAs)&&e.homeTeamFilter.matchResult.includes(y.matchResult)).length,m.visitingTeamFilterGames=m.playedGames.filter(y=>e.visitingTeamFilter.playingAs.includes(y.playingAs)&&e.visitingTeamFilter.matchResult.includes(y.matchResult)).length});const B=[],U=new Map;for(const m of Object.values(e.nextGamesDataStructure))for(const y of Object.values(m.subcategories))B.push(y);o.rankingData.forEach(m=>{for(const y of B)if(y.isInGeneralCategory(m[e.indexesLS.categoryId])){U.has(y.id)?U.get(y.id).push(m):U.set(y.id,[m]);break}})},prepareCleanAllStatistics(e){e.homeTeamFilter.requiresPlaysFiltering=!0,e.visitingTeamFilter.requiresPlaysFiltering=!0},setHomeGames(e,o){e.homeGames=EW(o)},setVisitingGames(e,o){e.visitingGames=EW(o)},generateCategoriesMap(e){for(const o of Object.values(e.nextGamesDataStructure))for(const s of Object.values(o.subcategories))s.accomplishedCategoryIds.forEach(B=>{const U=e.categoriesMap.get(B);U?U.push(s.generalCategoriesIds.accomplished):e.categoriesMap.set(B,[s.generalCategoriesIds.accomplished])})},resetNextGamesDataStructure(e){for(const o of Object.values(e.nextGamesDataStructure))for(const s of Object.values(o.subcategories))s.resetData()}},actions:{async fillNextGameDataStructure({commit:e},{provider:o}){try{const s=await Kne(o),B=sHt(s);e("updateNextGamesDataStructure",B)}catch(s){return Promise.reject(s)}},turnOnOffDefaultFilters({state:e,commit:o},{command:s}){s==="on"?o("updateFilters",{filters:e.defaultFilter,needsFormat:!1}):o("updateFilters",{filters:e.filterAux,needsFormat:!1})},async setAndGetStatsPostMatch({commit:e,rootGetters:o},s){try{const a=o.getProviderId,v=o.getIsDevApis,p=await eHt({gameId:s.gameId,providerId:a,isDevApis:v});if(p){var B=[],U=[],m={season:0,total:0,visit:{total:0,draw:0,win:0,lose:0},played:0,local:{total:0,draw:0,win:0,lose:0}},y={season:0,total:0,visit:{total:0,draw:0,win:0,lose:0},played:0,local:{total:0,draw:0,win:0,lose:0}};if(Object.keys(p.data).length!==0){const r=_=>{const b=_.slice(),x=Number(b[0]);return Number.isNaN(x)||(b[0]=x),b};B=p.data.data.filter(_=>_[1]==s.homeTeam).map(r),U=p.data.data.filter(_=>_[1]==s.awayTeam).map(r),m=p.data.games,y=p.data.games}e("updateHomeTeamPlays",B),e("updateVisitingTeamPlays",U),e("setHomeGames",m),e("setVisitingGames",y)}else e("updateHomeTeamPlays",[]),e("updateVisitingTeamPlays",[])}catch(a){return Promise.reject(a)}},async fillStatisticDataPostMatch({commit:e,dispatch:o},s){e("prepareCleanAllStatistics"),e("updateHomeTeamPlays",[]),e("updateVisitingTeamPlays",[]),e("setIsSectionLoading",!0,{root:!0});try{let B=[];e("updateGameForAnalysis",s.gameInfo),B.push(o("setAndGetStatsPostMatch",{gameId:s.game,homeTeam:s.homeTeam,awayTeam:s.awayTeam})),await Promise.all(B)}catch(B){throw new Error(B)}finally{e("setIsSectionLoading",!1,{root:!0})}},async checkState({state:e,dispatch:o,commit:s,rootGetters:B},{gameId:U,isTeamsAnalysis:m,currentSeasonId:y,isLoginChanged:a=!1,defaultFilter:v=null,gameInfo:p=null,isCupGame:r=!1}){try{let _={},b=e.seasonId!==Number(y);const x=B.getProviderId;await o("fillNextGameDataStructure",{provider:x});const h=[];s("setIsSectionLoading",!0,{root:!0}),s("setUsePastSeasonId",!1),b&&s("setSeasonId",y),s("updateGameId",Number(U)),e.oldSeasonId!==e.seasonId&&s("resetNextGamesDataStructure");const n=await o("getCurrentSeasonGames",Number(U));if(s("leagueGeneral/updateCurrentSeasonGames",n,{root:!0}),_=n.find(i=>i.game_id===Number(U)),!_&&p&&(_=p),_&&p&&(_.game_status=_.game_status??p.game_status,_.is_live=_.is_live??p.is_live),_&&s("updateGameForAnalysis",_),_.game_status!==1&&((a||e.categoriesMap.size===0)&&s("generateCategoriesMap"),r||await o("checkTeamsData",{gameId:U,isFromBet:!!v}),(a||e.oldSeasonId!==e.seasonId||e.statistics.length===0)&&h.push(o("getSeasonStatistics"))),e.usePastSeasonId){const i=await o("getCurrentSeasonGamesLast");s("leagueGeneral/updateCurrentSeasonGames",i,{root:!0})}(a||e.currentSeasonTeams.length===0||!e.currentSeasonTeams.find(i=>_.home_team===i.team_id))&&h.push(o("getCurrentSeasonTeams")),s("setHomeResultGame",_.score[0]),s("setAwayResultGame",_.score[1]),m?_.game_status!==1?(await o("fillStatisticData",{gameId:U,gameinfo:_,promises:h,defaultFilter:v}),s("updateShowPostMatchData",!1)):(s("updateStats",[]),s("updateShowPostMatchData",!0),h.push(o("fillStatisticDataPostMatch",{game:U,homeTeam:_.home_team,awayTeam:_.visiting_team,gameInfo:_})),await Promise.all(h)):s("setIsSectionLoading",!1,{root:!0})}catch(_){return Promise.reject(_)}},async fillStatisticData({commit:e,dispatch:o,getters:s,rootGetters:B,state:U},{gameId:m,gameinfo:y,promises:a=[],defaultFilter:v=null}){let p=null;try{const r=B.getProviderId,_=B.getIsDevApis;e("setIsSectionLoading",!0,{root:!0}),e("prepareCleanAllStatistics"),e("updateHomeTeamPlays",[]),e("updateVisitingTeamPlays",[]),e("updateGameForAnalysis",y),(y.is_live||y.game_status===0)&&a.push(o("getCurrentLiveGamePlays",m)),a.push(o("getSpecialMentionsByGame",m)),a.push(o("getHomeTeamPlays")),a.push(o("getVisitingTeamPlays")),a.push(o("getCurrentSeasonPlays")),v&&a.push(aHt({...v,providerId:r,isDevApis:_})),p=await Promise.all(a)}catch(r){throw new Error(r)}finally{setTimeout(()=>{if(e("addRankingInSubcategories",{getters:s,isPremiumAccount:B["loginGeneral/getPremiumAccount"]}),v){const[r]=p.pop();r&&(e("setBetSubcategories",r.categories),e("setBetDescription",r.sectionDescription),e("setDefaultFilter",r.params),e("updateFilterAux"),e("updateFilters",{filters:U.defaultFilter,needsFormat:!1}),o("updateRankingInSubcategories"))}},100),e("setIsSectionLoading",!1,{root:!0})}},async checkTeamsData({state:e,dispatch:o,rootState:s,commit:B},{gameId:U,isFromBet:m}){try{const y=Number(U);if(e.pastSeasonId){B("setPastSeasonId",e.pastSeasonId,{root:!0});const a=s.leagueGeneral.currentSeasonGames.find(v=>v.game_id===y);a&&B("updateGameForAnalysis",a),await Promise.all([o("getHomeTeamPlays"),o("getVisitingTeamPlays")]),B("setUsePastSeasonId",m||(!e.homeTeamPlays||e.homeTeamPlays.length===0)&&(!e.visitingTeamPlays||e.visitingTeamPlays.length===0))}else B("setUsePastSeasonId",!1)}catch(y){throw new Error(y)}},async getSpecialMentionsByGame({commit:e,rootGetters:o},s){try{const B=o.getProviderId,U=o.getIsDevApis,m=await XGt({gameId:s,providerId:B,isDevApis:U});e("addSpecialMentions",m)}catch(B){return Promise.reject(B)}},async getCurrentSeasonGames({commit:e,state:o,rootGetters:s},B){try{const U=s.getProviderId,m=s.getIsDevApis,{teams:y,games:a,past_season_id:v,tournament_id:p}=await JGt({seasonId:o.usePastSeasonId?o.pastSeasonId:o.seasonId,gameId:B,providerId:U,isDevApis:m}),r=fHt.find(_=>_.id===p);return r&&e("setCurrentTournamentName",r.name),e("setHome",y[0]),e("setAway",y[1]),o.usePastSeasonId||e("setPastSeasonId",v),await e("updateCurrentSeasonGames",a),a&&Array.isArray(a)&&e("updateFinishedGames",a.reduce((_,b)=>(b.game_status===1&&(_+=1),_),0)),a}catch(U){return Promise.reject(U)}},async getCurrentSeasonGamesLast({commit:e,state:o,rootGetters:s}){try{const B=s.getProviderId,U=s.getIsDevApis,{games:m,past_season_id:y}=await SW({seasonId:o.usePastSeasonId?o.pastSeasonId:o.seasonId,providerId:B,isDevApis:U});return o.usePastSeasonId||e("setPastSeasonId",y),await e("updateCurrentSeasonGames",m),m&&Array.isArray(m)&&e("updateFinishedGames",m.reduce((a,v)=>(v.game_status===1&&(a+=1),a),0)),m}catch(B){return Promise.reject(B)}},async getCurrentSeasonTeams({commit:e,state:o,rootGetters:s}){try{const B=s.getProviderId,U=s.getIsDevApis,m=await QGt({seasonId:o.usePastSeasonId?o.pastSeasonId:o.seasonId,providerId:B,isDevApis:U});e("updateCurrentSeasonTeams",m.data.teams)}catch{}},async getSeasonStatistics({commit:e,state:o,rootGetters:s}){try{const B=s.getProviderId,U=s.getIsDevApis,m=o.usePastSeasonId?o.pastSeasonId:o.seasonId,y=await WGt({seasonId:m,providerId:B,isDevApis:U});e("updateSeasonStatistics",y),e("updateOldSeasonId",m)}catch(B){return Promise.reject(B)}},updateRankingInSubcategories({state:e,commit:o,getters:s,rootGetters:B}){e.currentSeasonGames.length>0&&o("addRankingInSubcategories",{getters:s,isPremiumAccount:B["loginGeneral/getPremiumAccount"]})},async getHomeTeamPlays({commit:e,state:o,rootGetters:s}){try{const B=s.getProviderId,U=s.getIsDevApis,m=await TW({seasonId:o.usePastSeasonId?o.pastSeasonId:o.seasonId,teamId:o.gameForAnalysis.home_team,providerId:B,isDevApis:U});m.data&&(e("updateHomeTeamPlays",m.data.data),e("setHomeGames",m.data.games))}catch(B){return Promise.reject(B)}},async getVisitingTeamPlays({commit:e,state:o,rootGetters:s}){try{const B=s.getProviderId,U=s.getIsDevApis,m=await TW({seasonId:o.usePastSeasonId?o.pastSeasonId:o.seasonId,teamId:o.gameForAnalysis.visiting_team,providerId:B,isDevApis:U});m.data&&(e("updateVisitingTeamPlays",m.data.data),e("setVisitingGames",m.data.games))}catch(B){return Promise.reject(B)}},async getCurrentSeasonPlays({commit:e,state:o,rootGetters:s}){try{const B=s.getProviderId,U=s.getIsDevApis,m=await ZGt({seasonId:o.usePastSeasonId?o.pastSeasonId:o.seasonId,providerId:B,isDevApis:U});e("updateStats",m)}catch(B){return Promise.reject(new Error(B))}},async getCurrentLiveGamePlays({state:e,commit:o,rootGetters:s},B){try{const U=s.getProviderId,m=s.getIsDevApis,y=await YGt({gameId:B,providerId:U,isDevApis:m});e.livePlays=new Map,y.forEach(a=>{e.gameForAnalysis.game_id===a[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===a[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===a[e.indexesTLP.teamId])&&o("addLiveGamePlay",a)})}catch(U){throw new Error(U)}},socket_new({state:e,commit:o},s){const B=s[1];(e.gameForAnalysis.home_team===B[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===B[e.indexesTLP.teamId])&&o("addLiveGamePlay",B)},socket_update({state:e,commit:o},s){const B=s[1];e.gameForAnalysis.game_id===B[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===B[e.indexesTLP.teamId]||e.gameForAnalysis.visitingTeam===B[e.indexesTLP.teamId])&&o("updateLiveGamePlay",B)},socket_delete({state:e,commit:o},s){const B=s[1];e.gameForAnalysis.game_id===B[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===B[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===B[e.indexesTLP.teamId])&&o("deleteLiveGamePlay",B)},exitChannel({state:e,getters:o,rootState:s,rootGetters:B,commit:U}){const m=B["loginGeneral/getPremiumAccount"];o.isLive&&m&&(U("updateShowLiveData",!0),U("clearLiveTotals"),e.livePlays.clear(),pHt.emit("unsubscribe",{channel:`game.${e.gameForAnalysis.game_id}.v2`}))},cleanStats({state:e}){for(const s of Object.values(e.nextGamesDataStructure))for(const B of Object.values(s.subcategories))B.homeTeam.resetTotals(),B.visitingTeam.resetTotals(),B.homeTeam.resetTotalsLive(),B.visitingTeam.resetTotalsLive(),B.isBetMainSubcategory=!1;Object.values(e.nextGamesDataStructure).forEach(s=>{for(const B of Object.values(s.subcategories))B.resetMentions()}),e.currentSeasonPlays=null,e.homeTeamPlays=[],e.visitingTeamPlays=[],e.homeTeamFilter.requiresPlaysFiltering=!0,e.visitingTeamFilter.requiresPlaysFiltering=!0,e.isRankingCalculating=!0},cleanAllStats({state:e}){for(const s of Object.values(e.nextGamesDataStructure))for(const B of Object.values(s.subcategories))B.homeTeam.resetTotals(),B.visitingTeam.resetTotals(),B.isBetMainSubcategory=!1;Object.values(e.nextGamesDataStructure).forEach(s=>{for(const B of Object.values(s.subcategories))B.resetMentions()}),e.currentSeasonGames=[],e.currentSeasonTeams=[],e.gameForAnalysis={},e.homeTeamPlays=[],e.visitingTeamPlays=[],e.currentSeasonPlays=null,e.totalSeasonFinishedGames=0,e.totalHomeTeamFinishedGames=0,e.totalVisitingTeamFinishedGames=0,e.homeGames=[],e.showPostMatch=!1,e.homeResultGame=null,e.awayResultGame=null,e.visitingGames=[],e.idAssetSelected=1,e.showAdvanceFilter=!1,e.selectedAnalysis={},e.homeTeamFilter={teamId:0,statistics:0,playingAs:[],matchResult:[],sections:[],requiresPlaysFiltering:!0},e.visitingTeamFilter={teamId:0,statistics:0,playingAs:[],matchResult:[],sections:[],requiresPlaysFiltering:!0},e.isRankingCalculating=!0}}}};async function gHt({providerId:e,isDevApis:o}={}){try{const{data:s}=await Uu({url:"https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/tournaments",providerId:e,isDevApis:o});return s}catch(s){throw new Error(s)}}const yHt={gameGlobal:{namespaced:!0,state:{videoSrc:null,isVideoModalVisible:!1,tournaments:[],seccionBetsGolTipster:1,tournamentSelected:{},tournamentType:0,sectionAnalytics:"Banner_Home",previewSectionAnalytics:"",sectionRef:"",booleanIsStatisticModalOpen:!1},getters:{getTournamentType:e=>e.tournamentType,getSectionAnalytics(e){return e.sectionAnalytics},getPreviewSectionAnalytics(e){return e.previewSectionAnalytics},getSeccionBetsGolTipster(e){return e.seccionBetsGolTipster}},mutations:{setBooleanIsStatisticModalOpen(e,o){e.booleanIsStatisticModalOpen=o},setTournamentType(e,o){e.tournamentType=o},setSectionRef(e,o){e.sectionRef=o},setSectionAnalytics(e,o){e.sectionAnalytics=o},setSeccionBetsGolTipster(e,o){e.seccionBetsGolTipster=o},setPreviewSectionAnalytics(e,o){e.previewSectionAnalytics=o},setVideoSrc(e,o){e.videoSrc=o},setVideoModalVisibility(e,o){e.isVideoModalVisible=o},setSelectedTournament(e,o){e.selectedTournament=o},setTournaments(e,o){e.tournaments=o.map(s=>({...s.tournament,seasons:s.seasons})),e.tournamentSelected=e.tournaments[0]},setTournamentSelected(e,o){e.tournamentSelected=o}},actions:{async fetchTournaments({state:e,commit:o,rootGetters:s}){try{if(e.tournaments.length===0){const B=s.getProviderId,U=s.getIsDevApis,m=await gHt({providerId:B,isDevApis:U});o("setTournaments",m)}}catch(B){throw new Error(B)}}}}};async function vHt({seasonId:e,localTeamId:o,visitingTeamId:s,providerId:B,isDevApis:U}){try{const m=`https://bzznnzehtf.execute-api.us-west-2.amazonaws.com/prod/xg/seasons/${e}/teams/${o}/${s}`;return(await Uu({url:m,providerId:B,isDevApis:U})).data}catch(m){return Promise.reject(m)}}async function bHt({seasonId:e,localTeamId:o,visitingTeamId:s,providerId:B,isDevApis:U}){try{const m=`https://bzznnzehtf.execute-api.us-west-2.amazonaws.com/prod/xg/game/${e}/teams/${o}/${s}`;return(await Uu({url:m,providerId:B,isDevApis:U})).data}catch(m){return Promise.reject(m)}}const IW=(e,o)=>{let s={};return e.forEach((B,U)=>{U==3&&(o[0]==35||o[0]==54)&&(o[U]==2?o[U]=1:o[U]=2),U==2&&(o[0]==35||o[0]==54)&&(o[U]==1?o[U]=2:o[U]==2&&(o[U]=1)),s[B]=o[U]}),s},PW=(e,o)=>e.filter(B=>{const U=o.playingAs.includes(B.playing_as),m=o.matchResult.includes(B.match_result),y=o.sections.includes(B.section);return U&&m&&y});(function(){function e(o,s,B){return typeof B>"u"||+B==0?Math[o](s):(s=+s,B=+B,isNaN(s)||!(typeof B=="number"&&B%1===0)?NaN:(s=s.toString().split("e"),s=Math[o](+(s[0]+"e"+(s[1]?+s[1]-B:-B))),s=s.toString().split("e"),+(s[0]+"e"+(s[1]?+s[1]+B:B))))}Math.ceil10||(Math.ceil10=function(o,s){return e("ceil",o,s)})})();function LW(e,o){let s=o*-1;return Math.ceil10(e,s)}const Pf={goals:"Goles",shots:"Tiros a gol",head:"Remates con cabeza",penalties:"Penales"};function Lf(e,o){const s=(e||[]).find(B=>B.name===o);return new Set((s==null?void 0:s.categories)||[])}const _Ht={...yHt,...tHt,...mHt,...{xgGeneral:{namespaced:!0,state:{teamSelected:"Local",xGLocalPlays:[],xGVisitingPlays:[],xgCategories:z2},getters:{playsLocal:(e,o,s)=>{const B=e.xGLocalPlays,U="homeTeamFilter",m=s.nextGeneral[U];return PW(B,m)||[]},playsAway:(e,o,s)=>{const B=e.xGVisitingPlays,U="visitingTeamFilter",m=s.nextGeneral[U];return PW(B,m)},getXgCategories:e=>e.xgCategories||[],goalsQtyLocal:(e,o)=>{const s=Lf(e.xgCategories,Pf.goals);return o.playsLocal.filter(B=>s.has(B.category_id)).length},goalsQtyAway:(e,o)=>{const s=Lf(e.xgCategories,Pf.goals);return o.playsAway.filter(B=>s.has(B.category_id)).length},shotsOnGoalQtyLocal:(e,o)=>{const s=Lf(e.xgCategories,Pf.shots);return o.playsLocal.filter(B=>s.has(B.category_id)).length},shotsOnGoalQtyAway:(e,o)=>{const s=Lf(e.xgCategories,Pf.shots);return o.playsAway.filter(B=>s.has(B.category_id)).length},headQtyLocal:(e,o)=>{const s=Lf(e.xgCategories,Pf.head);return o.playsLocal.filter(B=>s.has(B.category_id)).length},headQtyAway:(e,o)=>{const s=Lf(e.xgCategories,Pf.head);return o.playsAway.filter(B=>s.has(B.category_id)).length},penaltiesQtyLocal:(e,o)=>{const s=Lf(e.xgCategories,Pf.penalties);return o.playsLocal.filter(B=>s.has(B.category_id)).length},penaltiesQtyAway:(e,o)=>{const s=Lf(e.xgCategories,Pf.penalties);return o.playsAway.filter(B=>s.has(B.category_id)).length},xGLocal:(e,o)=>{const s=new Set;let B=o.playsLocal.reduce((U,m)=>(s.has(m.moment_of_play)||(s.add(m.moment_of_play),U+=m.xG2),U),0);return LW(B,2)},xGAway:(e,o)=>{const s=new Set;let B=o.playsAway.reduce((U,m)=>(s.has(m.moment_of_play)||(s.add(m.moment_of_play),U+=m.xG2),U),0);return LW(B,2)}},mutations:{setTeamSelected(e,o){e.teamSelected=o},setXgCategories(e,o){e.xgCategories=o},setPlays(e,o){const s=Lf(e.xgCategories,Pf.goals),B=Lf(e.xgCategories,Pf.shots),U=Lf(e.xgCategories,Pf.head),m=Lf(e.xgCategories,Pf.penalties),y=o.local_team.map(l=>IW(o.data_headers,l)),a=[],v=[],p=[],r=[],_=new Set;y.forEach(l=>{s.has(l.category_id)?_.has(l.moment_of_play)||(_.add(l.moment_of_play),a.push(l)):B.has(l.category_id)?v.push(l):U.has(l.category_id)?p.push(l):m.has(l.category_id)&&r.push(l)}),e.xGLocalPlays=[...v,...a,...p,...r];const b=o.visiting_team.map(l=>IW(o.data_headers,l)),x=new Set,h=[],n=[],i=[],c=[];b.forEach(l=>{s.has(l.category_id)?x.has(l.moment_of_play)||(x.add(l.moment_of_play),h.push(l)):B.has(l.category_id)?n.push(l):U.has(l.category_id)?i.push(l):m.has(l.category_id)&&c.push(l)}),e.xGVisitingPlays=[...n,...h,...i,...c]},cleanXgStore(e){e.localStorage="Local",e.xGLocalPlays=[],e.xGVisitingPlays=[]}},actions:{async loadXgCategories({commit:e,rootGetters:o}){const s=o.getProviderId,B=await aie(s);e("setXgCategories",(B==null?void 0:B.categories)??z2)},async getXgPlays({commit:e,dispatch:o,rootGetters:s},{seasonId:B,localTeamId:U,visitingTeamId:m,postMatch:y=!1}){try{if(!B||!U||!m)return;const a=s.getProviderId,v=s.getIsDevApis;await o("loadXgCategories");let p={};y?p=await bHt({seasonId:B,localTeamId:U,visitingTeamId:m,providerId:a,isDevApis:v}):p=await vHt({seasonId:B,localTeamId:U,visitingTeamId:m,providerId:a,isDevApis:v}),e("setPlays",p)}catch(a){return Promise.reject(a)}}}}}};function xHt(e){for(const[o,s]of Object.entries(_Ht))e.hasModule(o)||e.registerModule(o,s)}const wHt={class:"subcategory-group"},kHt={__name:"SubcategoryGroup",props:{subcategoryGroup:{type:Array,default:()=>[]}},setup(e){return(o,s)=>(t.openBlock(),t.createElementBlock("div",wHt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroup,B=>(t.openBlock(),t.createBlock(t.unref(Zl),{key:B.id,modelValue:B.isSelected,"onUpdate:modelValue":U=>B.isSelected=U,label:B.name},null,8,["modelValue","onUpdate:modelValue","label"]))),128))]))}},SHt=ic(kHt,[["__scopeId","data-v-ae6f3d72"]]),CHt={class:"filter-subcategories"},THt=Object.freeze(Object.defineProperty({__proto__:null,default:ic({__name:"FilterSubcategories",props:{subcategoryGroups:{type:Array,default:()=>[]}},setup(e){return(o,s)=>(t.openBlock(),t.createElementBlock("div",CHt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroups,B=>(t.openBlock(),t.createElementBlock("div",{key:B.id,class:"filter-subcategories__group"},[t.createVNode(SHt,{subcategoryGroup:B},null,8,["subcategoryGroup"])]))),128))]))}},[["__scopeId","data-v-5edaefc2"]])},Symbol.toStringTag,{value:"Module"})),Hw=e=>(t.pushScopeId("data-v-80d9c265"),e=e(),t.popScopeId(),e),AHt={class:"details__header"},EHt=Hw(()=>t.createElementVNode("div",{class:"details__header__title"},"Jugando como",-1)),MHt={class:"details__header__checkbox"},IHt={class:"details__body"},PHt={class:"details__body__playing-as"},LHt=["onClick"],BHt={class:"details__header"},zHt=Hw(()=>t.createElementVNode("div",{class:"details__header__title"},"En: (Elige el lapso de tiempo)",-1)),OHt={class:"details__header__checkbox"},DHt={class:"details__body"},NHt=Hw(()=>t.createElementVNode("div",{class:"details__body__title"},"1er tiempo",-1)),FHt={class:"details__body__game-section"},RHt=["onClick"],VHt={class:"details__body"},jHt=Hw(()=>t.createElementVNode("div",{class:"details__body__title"},"2do tiempo",-1)),UHt={class:"details__body__game-section"},GHt=["onClick"],HHt=Object.freeze(Object.defineProperty({__proto__:null,default:ic({__name:"FilterConditions",props:{playingAs:{type:Array,default:()=>[{name:"Local",isSelected:!0},{name:"Visitante",isSelected:!0}]},gameSections:{type:Array,default:()=>[{text:"0-15",value:1,isSelected:!0},{text:"16-30",value:2,isSelected:!0},{text:"31-45",value:3,isSelected:!0},{text:"46-60",value:4,isSelected:!0},{text:"61-75",value:5,isSelected:!0},{text:"76-90",value:6,isSelected:!0}]},buttonsBackgroundColor:{type:String,default:"rgba(255, 255, 255, 0)"},buttonsBackgroundColorActive:{type:String,default:"rgba(203, 238, 107, 0.05)"},buttonsTextColor:{type:String,default:"rgba(255, 255, 255, 0.8)"},buttonsTextColorActive:{type:String,default:"rgba(255, 255, 255, 1)"},buttonsBorderColor:{type:String,default:"#8ea2ab"},buttonsBorderColorActive:{type:String,default:"#cbee6b"},buttonsBorderWidth:{type:String,default:"0.8px"},buttonsBorderWidthActive:{type:String,default:"1px"},buttonsBorderRadius:{type:String,default:"4px"}},setup(e){const o=e;t.useCssVars(r=>({"49cba245":e.buttonsBackgroundColor,"52f02da6":e.buttonsTextColor,"7d3f686a":e.buttonsBorderWidth,"7c286a07":e.buttonsBorderColor,"24a6f4aa":e.buttonsBackgroundColorActive,cd8d7768:e.buttonsTextColorActive,"35fa5c10":e.buttonsBorderWidthActive,"0cde1826":e.buttonsBorderColorActive}));const s=t.computed(()=>o.playingAs.every(r=>r.isSelected)),B=t.computed(()=>o.gameSections.every(r=>r.isSelected)),U=t.computed(()=>o.gameSections.reduce((r,_)=>(_.value<=3?r.firstHalf.push(_):r.secondHalf.push(_),r),{firstHalf:[],secondHalf:[]})),m=t.computed(()=>({"--border-radius-first-button":`${o.buttonsBorderRadius} 0 0 ${o.buttonsBorderRadius}`,"--border-radius-last-button":`0 ${o.buttonsBorderRadius} ${o.buttonsBorderRadius} 0`}));function y(r){r?o.playingAs.forEach(_=>{_.isSelected=!0}):o.playingAs.forEach((_,b)=>{_.isSelected=b===0})}function a(r){o.playingAs.filter(_=>_.isSelected).length===1&&r.isSelected||(r.isSelected=!r.isSelected)}function v(r){o.gameSections.filter(_=>_.isSelected).length===1&&r.isSelected||(r.isSelected=!r.isSelected)}function p(r){r?o.gameSections.forEach(_=>{_.isSelected=!0}):o.gameSections.forEach((_,b)=>{_.isSelected=b===0})}return(r,_)=>(t.openBlock(),t.createElementBlock("div",{class:"details",style:t.normalizeStyle(m.value)},[t.createElementVNode("div",AHt,[EHt,t.createElementVNode("div",MHt,[t.createVNode(t.unref(Zl),{label:"Todos","model-value":s.value,"onUpdate:modelValue":y},null,8,["model-value"])])]),t.createElementVNode("div",IHt,[t.createElementVNode("div",PHt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.playingAs,(b,x)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${x}`,class:t.normalizeClass(["details__body__button",{active:b.isSelected}]),onClick:h=>a(b)},t.toDisplayString(b.name),11,LHt))),128))])]),t.createElementVNode("div",BHt,[zHt,t.createElementVNode("div",OHt,[t.createVNode(t.unref(Zl),{label:"Todos","model-value":B.value,"onUpdate:modelValue":p},null,8,["model-value"])])]),t.createElementVNode("div",DHt,[NHt,t.createElementVNode("div",FHt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(U.value.firstHalf,(b,x)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${x}`,class:t.normalizeClass(["details__body__button",{active:b.isSelected}]),onClick:h=>v(b)},t.toDisplayString(b.text),11,RHt))),128))])]),t.createElementVNode("div",VHt,[jHt,t.createElementVNode("div",UHt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(U.value.secondHalf,(b,x)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${x}`,class:t.normalizeClass(["details__body__button",{active:b.isSelected}]),onClick:h=>v(b)},t.toDisplayString(b.text),11,GHt))),128))])])],4))}},[["__scopeId","data-v-80d9c265"]])},Symbol.toStringTag,{value:"Module"})),ZHt={class:"filter-field"},WHt=Object.freeze(Object.defineProperty({__proto__:null,default:ic({__name:"FilterField",setup(e){const o=t.ref(Array.from({length:16},(B,U)=>U+1));function s(){}return(B,U)=>(t.openBlock(),t.createElementBlock("div",ZHt,[t.createVNode(t.unref(OF),{width:"100%","background-color":"#2E3B46",value:o.value,"onUpdate:modelValue":s},null,8,["value"])]))}},[["__scopeId","data-v-8103c3e1"]])},Symbol.toStringTag,{value:"Module"})),qHt={class:"subcategory-group"},JHt={__name:"SubcategoryGroup",props:{subcategoryGroup:{type:Array,default:()=>[]}},setup(e){return(o,s)=>(t.openBlock(),t.createElementBlock("div",qHt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroup,B=>(t.openBlock(),t.createBlock(t.unref(Wl),{key:B.id,modelValue:B.isSelected,"onUpdate:modelValue":U=>B.isSelected=U,label:B.name},null,8,["modelValue","onUpdate:modelValue","label"]))),128))]))}},YHt=oc(JHt,[["__scopeId","data-v-85bc2114"]]),XHt={class:"filter-subcategories"},$Ht=Object.freeze(Object.defineProperty({__proto__:null,default:oc({__name:"FilterSubcategories",props:{subcategoryGroups:{type:Array,default:()=>[]}},setup(e){return(o,s)=>(t.openBlock(),t.createElementBlock("div",XHt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroups,B=>(t.openBlock(),t.createElementBlock("div",{key:B.id,class:"filter-subcategories__group"},[t.createVNode(YHt,{subcategoryGroup:B},null,8,["subcategoryGroup"])]))),128))]))}},[["__scopeId","data-v-74a77bab"]])},Symbol.toStringTag,{value:"Module"})),Zw=e=>(t.pushScopeId("data-v-893b389d"),e=e(),t.popScopeId(),e),KHt={class:"details__header"},QHt=Zw(()=>t.createElementVNode("div",{class:"details__header__title"},"Jugando como",-1)),eZt={class:"details__header__checkbox"},tZt={class:"details__body"},aZt={class:"details__body__playing-as"},rZt=["onClick"],nZt={class:"details__header"},iZt=Zw(()=>t.createElementVNode("div",{class:"details__header__title"},"En: (Elige el lapso de tiempo)",-1)),oZt={class:"details__header__checkbox"},sZt={class:"details__body"},lZt=Zw(()=>t.createElementVNode("div",{class:"details__body__title"},"1er tiempo",-1)),cZt={class:"details__body__game-section"},uZt=["onClick"],dZt={class:"details__body"},hZt=Zw(()=>t.createElementVNode("div",{class:"details__body__title"},"2do tiempo",-1)),pZt={class:"details__body__game-section"},fZt=["onClick"],mZt=Object.freeze(Object.defineProperty({__proto__:null,default:oc({__name:"FilterConditions",props:{playingAs:{type:Array,default:()=>[{name:"Local",isSelected:!0},{name:"Visitante",isSelected:!0}]},gameSections:{type:Array,default:()=>[{text:"0-15",value:1,isSelected:!0},{text:"16-30",value:2,isSelected:!0},{text:"31-45",value:3,isSelected:!0},{text:"46-60",value:4,isSelected:!0},{text:"61-75",value:5,isSelected:!0},{text:"76-90",value:6,isSelected:!0}]},buttonsBackgroundColor:{type:String,default:"rgba(255, 255, 255, 0)"},buttonsBackgroundColorActive:{type:String,default:"rgba(203, 238, 107, 0.05)"},buttonsTextColor:{type:String,default:"rgba(255, 255, 255, 0.8)"},buttonsTextColorActive:{type:String,default:"rgba(255, 255, 255, 1)"},buttonsBorderColor:{type:String,default:"#8ea2ab"},buttonsBorderColorActive:{type:String,default:"#cbee6b"},buttonsBorderWidth:{type:String,default:"0.8px"},buttonsBorderWidthActive:{type:String,default:"1px"},buttonsBorderRadius:{type:String,default:"4px"}},setup(e){const o=e;t.useCssVars(r=>({"2715f84a":e.buttonsBackgroundColor,"97bea92a":e.buttonsTextColor,"544788ef":e.buttonsBorderWidth,"53308a8c":e.buttonsBorderColor,e844f820:e.buttonsBackgroundColorActive,"76839a51":e.buttonsTextColorActive,"2bf17656":e.buttonsBorderWidthActive,a4c4469c:e.buttonsBorderColorActive}));const s=t.computed(()=>o.playingAs.every(r=>r.isSelected)),B=t.computed(()=>o.gameSections.every(r=>r.isSelected)),U=t.computed(()=>o.gameSections.reduce((r,_)=>(_.value<=3?r.firstHalf.push(_):r.secondHalf.push(_),r),{firstHalf:[],secondHalf:[]})),m=t.computed(()=>({"--border-radius-first-button":`${o.buttonsBorderRadius} 0 0 ${o.buttonsBorderRadius}`,"--border-radius-last-button":`0 ${o.buttonsBorderRadius} ${o.buttonsBorderRadius} 0`}));function y(r){r?o.playingAs.forEach(_=>{_.isSelected=!0}):o.playingAs.forEach((_,b)=>{_.isSelected=b===0})}function a(r){o.playingAs.filter(_=>_.isSelected).length===1&&r.isSelected||(r.isSelected=!r.isSelected)}function v(r){o.gameSections.filter(_=>_.isSelected).length===1&&r.isSelected||(r.isSelected=!r.isSelected)}function p(r){r?o.gameSections.forEach(_=>{_.isSelected=!0}):o.gameSections.forEach((_,b)=>{_.isSelected=b===0})}return(r,_)=>(t.openBlock(),t.createElementBlock("div",{class:"details",style:t.normalizeStyle(m.value)},[t.createElementVNode("div",KHt,[QHt,t.createElementVNode("div",eZt,[t.createVNode(t.unref(Wl),{label:"Todos","model-value":s.value,"onUpdate:modelValue":y},null,8,["model-value"])])]),t.createElementVNode("div",tZt,[t.createElementVNode("div",aZt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.playingAs,(b,x)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${x}`,class:t.normalizeClass(["details__body__button",{active:b.isSelected}]),onClick:h=>a(b)},t.toDisplayString(b.name),11,rZt))),128))])]),t.createElementVNode("div",nZt,[iZt,t.createElementVNode("div",oZt,[t.createVNode(t.unref(Wl),{label:"Todos","model-value":B.value,"onUpdate:modelValue":p},null,8,["model-value"])])]),t.createElementVNode("div",sZt,[lZt,t.createElementVNode("div",cZt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(U.value.firstHalf,(b,x)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${x}`,class:t.normalizeClass(["details__body__button",{active:b.isSelected}]),onClick:h=>v(b)},t.toDisplayString(b.text),11,uZt))),128))])]),t.createElementVNode("div",dZt,[hZt,t.createElementVNode("div",pZt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(U.value.secondHalf,(b,x)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${x}`,class:t.normalizeClass(["details__body__button",{active:b.isSelected}]),onClick:h=>v(b)},t.toDisplayString(b.text),11,fZt))),128))])])],4))}},[["__scopeId","data-v-893b389d"]])},Symbol.toStringTag,{value:"Module"})),gZt={class:"filter-field"},yZt=Object.freeze(Object.defineProperty({__proto__:null,default:oc({__name:"FilterField",setup(e){const o=t.ref(Array.from({length:16},(B,U)=>U+1));function s(){}return(B,U)=>(t.openBlock(),t.createElementBlock("div",gZt,[t.createVNode(t.unref(MG),{width:"100%","background-color":"#2E3B46",value:o.value,"onUpdate:modelValue":s},null,8,["value"])]))}},[["__scopeId","data-v-ef90fbbd"]])},Symbol.toStringTag,{value:"Module"}));Nd.GSCGameData=HGt,Nd.connectSocket=t8,Nd.disconnectSocket=a8,Nd.getSocket=e8,Nd.registerStoreModules=xHt,Object.defineProperty(Nd,Symbol.toStringTag,{value:"Module"})});