// Code generated by templ - DO NOT EDIT.

// templ: version: v0.2.778
package modals

//lint:file-ignore SA4006 This context is only used if a nested component is present.

import "github.com/a-h/templ"
import templruntime "github.com/a-h/templ/runtime"

func IntroVideo() templ.Component {
	return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
		templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
		if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
			return templ_7745c5c3_CtxErr
		}
		templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
		if !templ_7745c5c3_IsBuffer {
			defer func() {
				templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
				if templ_7745c5c3_Err == nil {
					templ_7745c5c3_Err = templ_7745c5c3_BufErr
				}
			}()
		}
		ctx = templ.InitializeContext(ctx)
		templ_7745c5c3_Var1 := templ.GetChildren(ctx)
		if templ_7745c5c3_Var1 == nil {
			templ_7745c5c3_Var1 = templ.NopComponent
		}
		ctx = templ.ClearChildren(ctx)
		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div x-data=\"{\nsources: {\nmp4: &#39;https://cdn.devdojo.com/pines/videos/coast.mp4&#39;,\nwebm: &#39;https://cdn.devdojo.com/pines/videos/coast.webm&#39;,\nogg: &#39;https://cdn.devdojo.com/pines/videos/coast.ogg&#39;\n},\nplaying: false,\ncontrols: true,\nmuted: false,\nmuteForced: false,\nfullscreen: false,\nended: false,\nmouseleave: false,\nautoHideControlsDelay: 3000,\ncontrolsHideTimeout: null,\nposter: null,\nvideoDuration: 0,\ntimeDurationString: &#39;00:00&#39;,\ntimeElapsedString: &#39;00:00&#39;,\nshowTime: false,\nvolume: 1,\nvolumeBeforeMute: 1,\nvideoPlayerReady: false,\ntimelineSeek(e) {\ntime = this.formatTime(Math.round(e.target.value));\nthis.timeElapsedString = `${time.minutes}:${time.seconds}`;\n},\nmetaDataLoaded(event) {\nthis.videoDuration = event.target.duration;\nthis.$refs.videoProgress.setAttribute(&#39;max&#39;, this.videoDuration);\ntime = this.formatTime(Math.round(this.videoDuration));\nthis.timeDurationString = `${time.minutes}:${time.seconds}`;\nthis.showTime = true;\nthis.videoPlayerReady = true;\n},\ntogglePlay(e) {\nif (this.$refs.player.paused || this.$refs.player.ended) {\nthis.playing = true;\nthis.$refs.player.play();\n} else {\nthis.$refs.player.pause();\nthis.playing = false;\n}\n},\ntoggleMute(){\nthis.muted = !this.muted;\nthis.$refs.player.muted = this.muted;\nif(this.muted){\nthis.volumeBeforeMute = this.volume;\nthis.volume = 0;\n} else {\nthis.volume = this.volumeBeforeMute;\n}\n},\ntimeUpdatedInterval() {\nif (!this.$refs.videoProgress.getAttribute(&#39;max&#39;))\nthis.$refs.videoProgress.setAttribute(&#39;max&#39;, $refs.player.duration);\nthis.$refs.videoProgress.value = this.$refs.player.currentTime;\ntime = this.formatTime(Math.round(this.$refs.player.currentTime));\nthis.timeElapsedString = `${time.minutes}:${time.seconds}`;\n},\nupdateVolume(e) {\nthis.volume = e.target.value;\nthis.$refs.player.volume = this.volume;\nif(this.volume == 0){\nthis.muted = true;\n}\nif(this.muted &amp;&amp; this.volume &gt; 0){\nthis.muted = false;\n}\n},\ntimelineClicked(e) {\nrect = this.$refs.videoProgress.getBoundingClientRect();\npos = (e.pageX - rect.left) / this.$refs.videoProgress.offsetWidth;\nthis.$refs.player.currentTime = pos * this.$refs.player.duration;\n},\nhandleFullscreen() {\nif (document.fullscreenElement !== null) {\n// The document is in fullscreen mode\ndocument.exitFullscreen();\n} else {\n// The document is not in fullscreen mode\nthis.$refs.videoContainer.requestFullscreen();\n}\n},\nmousemoveVideo() {\nif(this.playing){\nthis.resetControlsTimeout();\n} else {\nthis.controls=true;\nclearTimeout(this.controlsHideTimeout);\n}\n},\nvideoEnded() {\nthis.ended = true;\nthis.playing = false;\nthis.$refs.player.currentTime = 0;\n},\nresetControlsTimeout() {\nthis.controls = true;\nclearTimeout(this.controlsHideTimeout);\nlet that = this;\nthis.controlsHideTimeout = setTimeout(function(){\nthat.controls=false\n}, this.autoHideControlsDelay);\n},\nformatTime(timeInSeconds) {\nresult = new Date(timeInSeconds * 1000).toISOString().substring(11, 19);\nreturn {\nminutes: result.substring(3, 5),\nseconds: result.substring(6, 8),\n};\n}\n}\" x-data=\"introVideo\" x-ref=\"videoContainer\" @mouseleave=\"mouseleave=true\" @mousemove=\"mousemoveVideo\" class=\"relative h-[360px] min-w-[640px] overflow-hidden rounded-md aspect-video\"><video x-ref=\"player\" @loadedmetadata=\"metaDataLoaded\" @timeupdate=\"timeUpdatedInterval\" @ended=\"videoEnded\" preload=\"metadata\" :poster=\"poster\" class=\"relative z-10 object-cover w-full h-full bg-black\" crossorigin=\"anonymous\"><source :src=\"sources.mp4\" type=\"video/mp4\"> <source :src=\"sources.webm\" type=\"video/webm\"> <source :src=\"sources.ogg\" type=\"video/ogg\"></video><div x-show=\"videoPlayerReady\" class=\"absolute inset-0 w-full h-full\"><div x-ref=\"videoBackground\" @click=\"togglePlay()\" class=\"absolute inset-0 z-30 flex items-center justify-center w-full h-full bg-black bg-opacity-0 cursor-pointer group\"><div x-show=\"playing\" x-transition:enter=\"transition ease-out duration-1000\" x-transition:enter-start=\"scale-50 opacity-100\" x-transition:enter-end=\"scale-100 opacity-0\" class=\"absolute z-20 flex items-center justify-center w-24 h-24 bg-blue-600 rounded-full opacity-0 bg-opacity-20\" x-cloak><svg class=\"w-10 h-10 translate-x-0.5 text-white\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M8.42737 3.41611C6.46665 2.24586 4.00008 3.67188 4.00007 5.9427L4 18.0572C3.99999 20.329 6.46837 21.7549 8.42907 20.5828L18.5698 14.5207C20.4775 13.3802 20.4766 10.6076 18.568 9.46853L8.42737 3.41611Z\" fill=\"currentColor\"></path></svg></div><div x-show=\"!playing &amp;&amp; !ended\" x-transition:enter=\"transition ease-out duration-1000\" x-transition:enter-start=\"scale-50 opacity-100\" x-transition:enter-end=\"scale-100 opacity-0\" class=\"absolute z-20 flex items-center justify-center w-24 h-24 bg-blue-600 rounded-full opacity-0 bg-opacity-20\" x-cloak><svg class=\"w-10 h-10 text-white\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M8 3C8.55228 3 9 3.44772 9 4L9 20C9 20.5523 8.55228 21 8 21C7.44772 21 7 20.5523 7 20L7 4C7 3.44772 7.44772 3 8 3ZM16 3C16.5523 3 17 3.44772 17 4V20C17 20.5523 16.5523 21 16 21C15.4477 21 15 20.5523 15 20V4C15 3.44772 15.4477 3 16 3Z\" fill=\"currentColor\"></path></svg></div><div class=\"absolute z-10 duration-300 ease-out group-hover:scale-110\"><button x-show=\"!playing\" x-transition:enter=\"transition ease-in delay-200 duration-300\" x-transition:enter-start=\"opacity-0 scale-75\" x-transition:enter-end=\"opacity-100 scale-100\" x-transition:leave=\"transition ease-out duration-300\" x-transition:leave-start=\"opacity-100\" x-transition:leave-end=\"opacity-0\" class=\"flex items-center justify-center w-12 h-12 text-white duration-150 ease-out bg-blue-600 rounded-full cursor-pointer bg-opacity-80\" type=\"button\"><svg class=\"w-5 h-5 translate-x-px\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M8.42737 3.41611C6.46665 2.24586 4.00008 3.67188 4.00007 5.9427L4 18.0572C3.99999 20.329 6.46837 21.7549 8.42907 20.5828L18.5698 14.5207C20.4775 13.3802 20.4766 10.6076 18.568 9.46853L8.42737 3.41611Z\" fill=\"currentColor\" x-cloak></path></svg></button></div></div><div x-show=\"controls\" x-transition:enter=\"transition ease-out duration-300\" x-transition:enter-start=\"-translate-y-full\" x-transition:enter-end=\"translate-y-0\" x-transition:leave=\"transition ease-in duration-300\" x-transition:leave-start=\"translate-y-0\" x-transition:leave-end=\"-translate-y-full\" class=\"absolute top-0 left-0 z-20 w-full h-1/4 opacity-20 bg-gradient-to-b from-black to-transparent\" x-cloak></div><div x-show=\"controls\" x-transition:enter=\"transition ease-out duration-300\" x-transition:enter-start=\"translate-y-full\" x-transition:enter-end=\"translate-y-0\" x-transition:leave=\"transition ease-in duration-300\" x-transition:leave-start=\"translate-y-0\" x-transition:leave-end=\"translate-y-full\" class=\"absolute bottom-0 left-0 z-20 w-full h-1/4 opacity-20 bg-gradient-to-b from-transparent to-black\" x-cloak></div><div x-show=\"controls\" @click=\"resetControlsTimeout\" x-transition:enter=\"transition ease-out duration-300\" x-transition:enter-start=\"-translate-y-full\" x-transition:enter-end=\"translate-y-0\" x-transition:leave=\"transition ease-in duration-300\" x-transition:leave-start=\"translate-y-0\" x-transition:leave-end=\"-translate-y-full\" class=\"absolute top-0 left-0 z-40 flex items-center w-full h-12 text-white\" x-cloak><div class=\"absolute right-0 top-0 mr-0.5 mt-0.5 flex items-center\"><div class=\"flex items-center h-auto group\"><button @click=\"toggleMute()\" type=\"button\" class=\"flex items-center justify-center w-6 h-auto duration-150 ease-out opacity-80 hover:opacity-100\"><svg x-show=\"!muted\" class=\"w-[18px] h-[18px]\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\" x-cloak><path d=\"M13.5 4.06c0-1.336-1.616-2.005-2.56-1.06l-4.5 4.5H4.508c-1.141 0-2.318.664-2.66 1.905A9.76 9.76 0 001.5 12c0 .898.121 1.768.35 2.595.341 1.24 1.518 1.905 2.659 1.905h1.93l4.5 4.5c.945.945 2.561.276 2.561-1.06V4.06zM18.584 5.106a.75.75 0 011.06 0c3.808 3.807 3.808 9.98 0 13.788a.75.75 0 11-1.06-1.06 8.25 8.25 0 000-11.668.75.75 0 010-1.06z\"></path><path d=\"M15.932 7.757a.75.75 0 011.061 0 6 6 0 010 8.486.75.75 0 01-1.06-1.061 4.5 4.5 0 000-6.364.75.75 0 010-1.06z\"></path></svg> <svg x-show=\"muted\" class=\"w-[18px] h-[18px]\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\" x-cloak><path d=\"M13.5 4.06c0-1.336-1.616-2.005-2.56-1.06l-4.5 4.5H4.508c-1.141 0-2.318.664-2.66 1.905A9.76 9.76 0 001.5 12c0 .898.121 1.768.35 2.595.341 1.24 1.518 1.905 2.659 1.905h1.93l4.5 4.5c.945.945 2.561.276 2.561-1.06V4.06zM17.78 9.22a.75.75 0 10-1.06 1.06L18.44 12l-1.72 1.72a.75.75 0 001.06 1.06l1.72-1.72 1.72 1.72a.75.75 0 101.06-1.06L20.56 12l1.72-1.72a.75.75 0 00-1.06-1.06l-1.72 1.72-1.72-1.72z\"></path></svg></button><div class=\"relative h-1.5 mx-0 group-hover:mx-1 rounded-full group-hover:w-12 invisible group-hover:visible w-0 ease-out duration-300\"><input x-ref=\"volume\" @input=\"updateVolume(event)\" type=\"range\" min=\"0\" max=\"1\" :value=\"volume\" step=\"0.01\" class=\"w-full h-full appearance-none flex items-center cursor-pointer bg-transparent z-30\n[&amp;::-webkit-slider-thumb]:bg-white [&amp;::-webkit-slider-thumb]:rounded-full [&amp;::-webkit-slider-thumb]:border-0 [&amp;::-webkit-slider-thumb]:w-2 [&amp;::-webkit-slider-thumb]:h-2 [&amp;::-webkit-slider-thumb]:appearance-none\n[&amp;::-moz-range-thumb]:bg-white [&amp;::-moz-range-thumb]:rounded-full [&amp;::-moz-range-thumb]:border-0 [&amp;::-moz-range-thumb]:w-2 [&amp;::-moz-range-thumb]:h-2 [&amp;::-moz-range-thumb]:appearance-none\n[&amp;::-ms-thumb]:bg-white [&amp;::-ms-thumb]:rounded-full [&amp;::-ms-thumb]:border-0 [&amp;::-ms-thumb]:w-2 [&amp;::-ms-thumb]:h-2 [&amp;::-ms-thumb]:appearance-none\n[&amp;::-webkit-slider-runnable-track]:bg-white [&amp;::-webkit-slider-runnable-track]:bg-opacity-30 [&amp;::-webkit-slider-runnable-track]:rounded-full [&amp;::-webkit-slider-runnable-track]:overflow-hidden [&amp;::-moz-range-track]:bg-neutral-200 [&amp;::-moz-range-track]:rounded-full [&amp;::-ms-track]:bg-neutral-200 [&amp;::-ms-track]:rounded-full\n[&amp;::-moz-range-progress]:bg-white [&amp;::-moz-range-progress]:bg-opacity-80 [&amp;::-moz-range-progress]:rounded-full [&amp;::-ms-fill-lower]:bg-white [&amp;::-ms-fill-lower]:bg-opacity-80 [&amp;::-ms-fill-lower]:rounded-full [&amp;::-webkit-slider-thumb]:shadow-[-995px_0px_0px_990px_rgba(255,_255,_255,_0.8)]\n\"></div></div><button x-ref=\"fullscreenButton\" @click=\"handleFullscreen\" class=\"flex items-center justify-center w-10 h-10 duration-150 ease-out scale-90 opacity-80 hover:opacity-100 hover:scale-100\" type=\"button\"><svg class=\"w-5 h-5\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.72685 5C5.77328 5 5 5.77318 5 6.72727V9C5 9.55228 4.55228 10 4 10C3.44772 10 3 9.55228 3 9V6.72727C3 4.6689 4.66842 3 6.72685 3H9C9.55228 3 10 3.44772 10 4C10 4.55228 9.55228 5 9 5H6.72685ZM14 4C14 3.44772 14.4477 3 15 3H17.2727C19.3312 3 21 4.66876 21 6.72727V9C21 9.55228 20.5523 10 20 10C19.4477 10 19 9.55228 19 9V6.72727C19 5.77333 18.2267 5 17.2727 5H15C14.4477 5 14 4.55228 14 4ZM4 14C4.55228 14 5 14.4477 5 15V17.2727C5 18.2268 5.77328 19 6.72685 19H9C9.55228 19 10 19.4477 10 20C10 20.5523 9.55228 21 9 21H6.72685C4.66842 21 3 19.3311 3 17.2727V15C3 14.4477 3.44772 14 4 14ZM20 14C20.5523 14 21 14.4477 21 15V17.2727C21 19.3312 19.3312 21 17.2727 21H15C14.4477 21 14 20.5523 14 20C14 19.4477 14.4477 19 15 19H17.2727C18.2267 19 19 18.2267 19 17.2727V15C19 14.4477 19.4477 14 20 14Z\" fill=\"currentColor\"></path></svg></button></div></div><div x-show=\"controls\" @click=\"resetControlsTimeout\" x-transition:enter=\"transition ease-out duration-300\" x-transition:enter-start=\"translate-y-full\" x-transition:enter-end=\"translate-y-0\" x-transition:leave=\"transition ease-in duration-300\" x-transition:leave-start=\"translate-y-0\" x-transition:leave-end=\"translate-y-full\" class=\"absolute bottom-0 left-0 z-40 w-full h-12\" x-cloak><div class=\"absolute bottom-0 z-30 w-full px-2.5 -translate-y-8\"><div class=\"relative w-full h-1 rounded-full\"><input x-ref=\"videoProgress\" @click=\"timelineClicked\" @input=\"timelineSeek(event)\" type=\"range\" min=\"0\" max=\"100\" value=\"0\" step=\"any\" class=\"w-full h-full appearance-none flex items-center cursor-pointer bg-transparent z-30\n[&amp;::-webkit-slider-thumb]:bg-white [&amp;::-webkit-slider-thumb]:rounded-full [&amp;::-webkit-slider-thumb]:border-0 [&amp;::-webkit-slider-thumb]:w-1.5 [&amp;::-webkit-slider-thumb]:h-1.5 [&amp;::-webkit-slider-thumb]:appearance-none\n[&amp;::-moz-range-thumb]:bg-white [&amp;::-moz-range-thumb]:rounded-full [&amp;::-moz-range-thumb]:border-0 [&amp;::-moz-range-thumb]:w-1.5 [&amp;::-moz-range-thumb]:h-1.5 [&amp;::-moz-range-thumb]:appearance-none\n[&amp;::-ms-thumb]:bg-white [&amp;::-ms-thumb]:rounded-full [&amp;::-ms-thumb]:border-0 [&amp;::-ms-thumb]:w-1.5 [&amp;::-ms-thumb]:h-1.5 [&amp;::-ms-thumb]:appearance-none\n[&amp;::-webkit-slider-runnable-track]:bg-white [&amp;::-webkit-slider-runnable-track]:bg-opacity-30 [&amp;::-webkit-slider-runnable-track]:rounded-full [&amp;::-webkit-slider-runnable-track]:overflow-hidden [&amp;::-moz-range-track]:bg-neutral-200 [&amp;::-moz-range-track]:rounded-full [&amp;::-ms-track]:bg-neutral-200 [&amp;::-ms-track]:rounded-full\n[&amp;::-moz-range-progress]:bg-blue-600 [&amp;::-moz-range-progress]:rounded-full [&amp;::-ms-fill-lower]:bg-blue-600 [&amp;::-ms-fill-lower]:rounded-full [&amp;::-webkit-slider-thumb]:shadow-[-995px_0px_0px_990px_#2463eb]\n\"></div></div><div class=\"absolute bottom-0 left-0 z-20 flex items-center w-full h-8 text-white\"><div x-show=\"showTime\" class=\"flex items-center justify-between w-full mx-3 font-mono text-xs opacity-80 hover:opacity-100\" x-cloak><time x-ref=\"timeElapsed\" x-text=\"timeElapsedString\">00:00</time> <time x-ref=\"timeDuration\" x-text=\"timeDurationString\">00:00</time></div></div></div></div></div>")
		if templ_7745c5c3_Err != nil {
			return templ_7745c5c3_Err
		}
		return templ_7745c5c3_Err
	})
}

var _ = templruntime.GeneratedTemplate
