"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[243],{9984:function(e,t,n){n.r(t),n.d(t,{default:function(){return r}});var o=n(7792),r=function(){function e(e){this.el=e,e.hasAttribute("data-hero-mirror")&&this.init()}return e.prototype.init=function(){var e=this.el.querySelector("[data-hero-video]"),t=new o.s_({container:this.el.querySelector("[data-hero-canvas]"),watchScroll:!1,pixelRatio:Math.min(1.5,window.devicePixelRatio)});t.onError((function(e){document.body.classList.add("no-curtains","curtains-ready"),console.log("error",e)})).onContextLost((function(){t.restoreContext()}));var n={vertexShader:"\n    #ifdef GL_ES\n    precision mediump float;\n    #endif\n\n    // those are the mandatory attributes that the lib sets\n    attribute vec3 aVertexPosition;\n    attribute vec2 aTextureCoord;\n\n    // those are mandatory uniforms that the lib sets and that contain our model view and projection matrix\n    uniform mat4 uMVMatrix;\n    uniform mat4 uPMatrix;\n\n    // our texture matrix that will handle image cover\n    uniform mat4 uTextureMatrix0;\n\n    // pass your vertex and texture coords to the fragment shader\n    varying vec3 vVertexPosition;\n    varying vec2 vTextureCoord;\n\n    void main() {\n        gl_Position = uPMatrix * uMVMatrix * vec4(aVertexPosition, 1.0);\n\n        // set the varyings\n        // here we use our texture matrix to calculate the accurate texture coords\n        vTextureCoord = (uTextureMatrix0 * vec4(aTextureCoord, 0.0, 1.0)).xy;\n        vVertexPosition = aVertexPosition;\n    }\n    ",fragmentShader:"\n    #ifdef GL_ES\n    precision mediump float;\n    #endif\n\n    // get our varyings\n    varying vec3 vVertexPosition;\n    varying vec2 vTextureCoord;\n\n    // the uniform we declared inside our javascript\n    uniform float uTime;\n    uniform vec2 uResolution;\n\n    // our texture sampler (default name, to use a different name please refer to the documentation)\n    uniform sampler2D uSampler0;\n\n    void main() {\n        // get our texture coords from our varying\n        vec2 textureCoord = vTextureCoord;\n\n        // displace our pixels along the X axis based on our time uniform\n        // textures coords are ranging from 0.0 to 1.0 on both axis\n        //textureCoord.x += sin(textureCoord.y * 25.0) * cos(textureCoord.x * 25.0) * (cos(uTime / 50.0)) / 25.0;\n        // textureCoord.x = mod(textureCoord.x + 0.33, 1.0);\n\n        if (uResolution.x >= 768.0) {\n          if (uResolution.x < 1024.0) {\n            // Tablet\n            if (textureCoord.y > 0.628) {\n              textureCoord.y = 1.0 - textureCoord.y + 0.628;\n              textureCoord.x = 1.0 - textureCoord.x;\n            }\n          }\n          else {\n            // Desktop\n            if (textureCoord.x > 0.628) {\n              textureCoord.y = 1.0 - textureCoord.y;\n              textureCoord.x = 1.0 - textureCoord.x + 0.628;\n            }\n          }\n        }\n\n\n\n        // map our texture with the texture matrix coords\n        gl_FragColor = texture2D(uSampler0, textureCoord);\n    }\n    ",widthSegments:2,heightSegments:2,uniforms:{resolution:{name:"uResolution",type:"2f",value:[e.clientWidth,e.clientHeight]},time:{name:"uTime",type:"1f",value:0}}},r=new o.JO(t,e,n);r.onRender((function(){r.uniforms.time.value++})),r.onAfterResize((function(){var e=r.getBoundingRect();r.uniforms.resolution.value=[e.width,e.height]})),r.onReady((function(){r.playVideos(),document.body.addEventListener("click",(function(){r.playVideos()}))}))},e}()}}]);