1"use strict";(this.webpackChunkgoodwood_ui=this.webpackChunkgoodwood_ui||[]).push([[5612],{5048(e,t,i){i.d(t,{default:()=>p});var n,o=!1,r=new Promise(function(e){n=e});function a(){return window.onYouTubeIframeAPIReady=function(){n("")},o||(!function(){if(!document.getElementById("youtube-api")){var e=document.createElement("script");e.id="youtube-api",e.src="https://www.youtube.com/iframe_api";var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)}}(),o=!0),r}function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function s(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,y(n.key),n)}}function l(e,t,i){return(t=y(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function y(e){var t=function(e,t){if("object"!=u(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t||"default");if("object"!=u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==u(t)?t:t+""}var p=function(){return e=function e(t,i){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),l(this,"play",function(){n.player&&n.player.playVideo()}),l(this,"stop",function(){n.player&&n.player.stopVideo()}),l(this,"pause",function(){n.player&&n.player.pauseVideo()}),l(this,"reset",function(){}),l(this,"dispose",function(){n.player&&n.player.destroy()}),this.wrapper=t,this.videoOptions=i,this.videoId=i.videoId,this.autoplay=Object.hasOwn(i,"autoplay")&&!1!==i.autoplay,this.muted=Object.hasOwn(i,"muted")&&!1!==i.muted,this.loop=Object.hasOwn(i,"loop")&&!1!==i.loop,this.playsInline=Object.hasOwn(i,"playsinline")&&!1!==i.playsinline,this.controls=Object.hasOwn(i,"defaultControls")&&!1!==i.defaultControls,this.videoPlayerId=this.createUniqueId(),this.readyPromise=new Promise(function(e){n.readyResolve=e}),this.init()},(t=[{key:"init",value:function(){this.createVideoPlayerContainer(),this.addYoutubeApiScript()}},{key:"createUniqueId",value:function(){var e=new Uint8Array(10);return window.crypto.getRandomValues(e).join("")}},{key:"addYoutubeApiScript",value:function(){var e=this;a().then(function(){e.initYoutubePlayer()})}},{key:"initYoutubePlayer",value:function(){var e=this;this.player=new YT.Player(this.videoPlayerId,{height:"100%",width:"100%",videoId:this.videoId,playerVars:{playsinline:this.playsInline?1:0,controls:this.controls?1:0,loop:this.loop?1:0,autoplay:this.autoplay?1:0,mute:this.muted?1:0},events:{onReady:function(){e.readyResolve(),e.videoOptions.onReady&&e.videoOptions.onReady()}}})}},{key:"createVideoPlayerContainer",value:function(){this.playerContainer=document.createElement("div"),this.playerContainer.setAttribute("id",this.videoPlayerId),this.wrapper.appendChild(this.playerContainer)}},{key:"ready",value:function(){return this.readyPromise}}])&&s(e.prototype,t),i&&s(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,i}()}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.