{"version":3,"sources":["jsdelivr-header.js","webpack://@wistia/src/utilities/script-utils.js","webpack://@wistia/src/utilities/performance.ts","webpack://@wistia/src/utilities/judy.js","webpack://@wistia/src/utilities/wistiaQueue.ts","webpack://@wistia/src/utilities/metrics.js","webpack://@wistia/src/utilities/obj.js","webpack://@wistia/src/appHostname.js","webpack://@wistia/src/utilities/mediaDataError.ts","webpack://@wistia/src/utilities/color-utils.ts","webpack://@wistia/src/utilities/simpleMetrics.js","webpack://@wistia/src/utilities/seqid.js","webpack://@wistia/src/utilities/runScript.js","webpack://@wistia/src/utilities/duration.ts","webpack://@wistia/src/embeds/wistiaPlayer/utilities/constants.ts","webpack://@wistia/src/utilities/core.js","webpack://@wistia/src/utilities/media_data.js","webpack://@wistia/src/utilities/svg_boilerplate.ts","webpack://@wistia/src/utilities/injectJsonLd.js","webpack://@wistia/src/utilities/unescape-html.js","webpack://@wistia/src/utilities/sentryUtils.ts","webpack://@wistia/src/utilities/url.js","webpack://@wistia/src/utilities/eventShepherd.ts","webpack://@wistia/src/embeds/wistiaPlayer/hooks/usePlayerData.tsx","webpack://@wistia/src/utilities/eventConstants.ts","webpack://@wistia/src/utilities/namespacedLocalStorage.js","webpack://@wistia/src/utilities/fetchMediaData.ts","webpack://@wistia/src/utilities/roundedPlayerDefaults.ts","webpack://@wistia/src/embeds/shared/ProgressiveThumbnail.jsx","webpack://@wistia/src/utilities/embedOptionStore.ts","webpack://@wistia/src/utilities/remote-data-cache.ts","webpack://@wistia/src/utilities/keyMoments.ts","webpack://@wistia/src/utilities/legacyLocalstorage.js","webpack://@wistia/src/utilities/timeout-utils.js","webpack://@wistia/node_modules/preact/hooks/dist/hooks.module.js","webpack://@wistia/src/utilities/extractEmailFromParams.ts","webpack://@wistia/src/utilities/media-data-transforms.js","webpack://@wistia/src/utilities/wistiaData.js","webpack://@wistia/src/utilities/globalBindAndTrigger.js","webpack://@wistia/src/utilities/fit-control.js","webpack://@wistia/src/utilities/gradients.ts","webpack://@wistia/src/embeds/wistiaPlayer/utilities/getPreferredLanguageIndex.ts","webpack://@wistia/src/utilities/image.js","webpack://@wistia/src/embeds/media/players/vulcanV2Player/shared/ui_components/BigPlayButtonLoadingAnim.tsx","webpack://@wistia/src/embeds/shared/translations.js","webpack://@wistia/src/utilities/trackingConsentApi.js","webpack://@wistia/src/utilities/camelCaseToKebabCase.ts","webpack://@wistia/src/utilities/wistiaLocalStorage.js","webpack://@wistia/node_modules/preact/dist/preact.module.js","webpack://@wistia/src/utilities/inferPageUrl.ts","webpack://@wistia/src/utilities/color.js","webpack://@wistia/src/wistia_namespace.ts","webpack://@wistia/src/utilities/getApiHandles.ts","webpack://@wistia/src/embeds/shared/Thumbnail.jsx","webpack://@wistia/src/embeds/wistiaPlayer/utilities/getInitialMediaData.ts","webpack://@wistia/src/utilities/hosts.js","webpack://@wistia/src/utilities/script-tags.js","webpack://@wistia/src/embeds/wistiaPlayer/utilities/PlayerDataHandler.ts","webpack://@wistia/node_modules/iso8601-duration/lib/index.js","webpack://@wistia/src/utilities/wlog.js","webpack://@wistia/src/embeds/media/players/vulcanV2Player/shared/ui_components/BigPlayButton.tsx","webpack://@wistia/src/utilities/dynamicImport.ts","webpack://@wistia/src/utilities/assets.js","webpack://@wistia/src/utilities/shouldEnableMux.ts","webpack://@wistia/src/utilities/iso8601Helper.ts","webpack://@wistia/src/utilities/detect.js","webpack://@wistia/src/utilities/coinFlip.ts","webpack://@wistia/src/types/gradient.ts","webpack://@wistia/src/utilities/viewerPreferences.js","webpack://@wistia/src/utilities/elem.js","webpack://@wistia/src/embeds/media/players/vulcanV2Player/shared/ui_components/svgs/BigPlayButtonSVG.tsx","webpack://@wistia/node_modules/lodash.merge/index.js","webpack://@wistia/src/utilities/root.js","webpack://@wistia/src/utilities/interFontFamily.js","webpack://@wistia/node_modules/lodash.clonedeep/index.js","webpack://@wistia/src/utilities/assign.js","webpack://@wistia/src/utilities/bindify.js","webpack://@wistia/src/utilities/normalizeChapters.ts","webpack://@wistia/src/utilities/wbindable.js","webpack://@wistia/src/utilities/wistiaOptions.ts","webpack://@wistia/src/utilities/pageLoaded.js","webpack://@wistia/src/embeds/wistiaPlayer/components/PreloadThumbnail.tsx","webpack://@wistia/node_modules/@wistia/type-guards/dist/index.mjs","webpack://@wistia/wistia-player/webpack/bootstrap","/npm/@wistia/wistia-player@0.3.15/dist/webpack:/@wistia/wistia-player/webpack/runtime/compat get default export","/npm/@wistia/wistia-player@0.3.15/dist/webpack:/@wistia/wistia-player/webpack/runtime/define property getters","webpack://@wistia/wistia-player/webpack/runtime/global","/npm/@wistia/wistia-player@0.3.15/dist/webpack:/@wistia/wistia-player/webpack/runtime/hasOwnProperty shorthand","/npm/@wistia/wistia-player@0.3.15/dist/webpack:/@wistia/wistia-player/webpack/runtime/node module decorator","webpack://@wistia/src/embeds/wistiaPlayer/WistiaPlayer.tsx"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,gFCFO,IAAM,EAAuB,SAAC,GAEnC,IAF+D,IAAjB,EAAO,UAAA,OAAA,QAAA,IAAA,UAAA,GAAA,UAAA,GAAG,CAAC,EACnD,EAAa,SAAS,qBAAqB,UACxC,EAAI,EAAG,EAAI,EAAW,OAAQ,IAAK,CAC1C,IAAM,EAAI,EAAW,GACjB,EAAM,EAAE,aAAa,QAAU,GAEnC,GAAI,EAAQ,kBAAmB,CAC7B,IAAI,EAAU,EAAI,MAAM,KAExB,EADuB,EAAQ,EAEjC,CAOA,IALK,EAAQ,aAAe,EAAQ,iBAClC,EAAM,EAAI,QAAQ,WAAY,IAC9B,EAAY,EAAU,QAAQ,WAAY,KAGxC,EAAQ,aAAe,EAAQ,YAAY,KAAK,GAClD,OAAO,EAET,GAAI,EAAQ,gBAA6C,IAA3B,EAAI,QAAQ,GACxC,OAAO,EAET,GAAI,IAAQ,EACV,OAAO,CAEX,CACA,OAAO,IACT,C,iCChCO,IAAM,EAA+B,WAC1C,IAAQ,EAAgB,OAAhB,YAER,OAAO,QAAQ,IAAgB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EACK,GAAK,GAAA,EAAA,KACb,gBArB+B,EAAA,GAAA,OAAA,EAAA,MAAA,KAAA,UAAA,UAuBY,IAAxC,eAAe,IAAI,kBACrB,eAAe,OAAO,gBAAiB,c","file":"/npm/@wistia/wistia-player@0.3.15/dist/wistia-player.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@wistia/wistia-player@0.3.15/dist/wistia-player.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","import { wlog } from 'utilities/wlog.js';\nimport { isObject } from 'utilities/obj.js';\nimport { runScript as runScriptWithPromise } from 'utilities/runScript.js';\n\nexport const findScriptInDomBySrc = (targetSrc, options = {}) => {\n  const scriptTags = document.getElementsByTagName('script');\n  for (let i = 0; i < scriptTags.length; i++) {\n    const s = scriptTags[i];\n    let src = s.getAttribute('src') || '';\n\n    if (options.ignoreQueryParams) {\n      let matches = src.split('?');\n      let urlWithoutParams = matches[0];\n      src = urlWithoutParams;\n    }\n\n    if (!options.scriptRegex && options.ignoreProtocol) {\n      src = src.replace(/^https?:/, '');\n      targetSrc = targetSrc.replace(/^https?:/, '');\n    }\n\n    if (options.scriptRegex && options.scriptRegex.test(src)) {\n      return s;\n    }\n    if (options.testStartsWith && src.indexOf(targetSrc) === 0) {\n      return s;\n    }\n    if (src === targetSrc) {\n      return s;\n    }\n  }\n  return null;\n};\n\nexport const removeScriptsBySrc = (targetSrc, options = {}) => {\n  let s;\n  while ((s = findScriptInDomBySrc(targetSrc, options))) {\n    if (s) {\n      s.onload = s.onreadystatechange = s.onerror = null;\n      if (s.parentNode && typeof s.parentNode.removeChild) {\n        try {\n          s.parentNode.removeChild(s);\n        } catch (e) {\n          setTimeout(() => {\n            throw e;\n          }, 0);\n        }\n      }\n    }\n  }\n};\n\n// fire and forget.\n// run a script and immediately remove it from the DOM.\nexport const runScript = (src, timeout = 8000, options = {}) => {\n  if (timeout == null) {\n    timeout = 8000;\n  }\n  if (options == null) {\n    options = {};\n  }\n  let s;\n  let alreadyExists;\n\n  return new Promise((resolve) => {\n    if (options.once === true && (s = findScriptInDomBySrc(src))) {\n      alreadyExists = true;\n    }\n\n    if (options.once && alreadyExists) {\n      if (!s.readyState || /loaded|complete/.test(s.readyState)) {\n        setTimeout(() => {\n          resolve();\n        }, 1);\n      }\n    } else {\n      runScriptWithPromise(src, timeout)\n        .then(resolve)\n        .catch((msg) => {\n          resolve(msg);\n          setTimeout(() => {\n            console.error(msg);\n          }, 1);\n        });\n    }\n  });\n};\n\nexport const runScripts = (...args) => {\n  // support either an array of scripts or a single script as a string\n  let scripts;\n  if (args[0] instanceof Array) {\n    scripts = args[0];\n  } else {\n    scripts = args;\n  }\n\n  scripts = scriptInputsToHash(scripts);\n\n  const asyncScripts = [];\n  const syncScripts = [];\n  const scriptPromises = [];\n\n  scripts.forEach((s) => {\n    const script = { ...s };\n    const p = new Promise((resolve) => {\n      script.resolve = resolve;\n    });\n\n    script.promise = p;\n\n    scriptPromises.push(script.promise);\n\n    if (s.async) {\n      asyncScripts.push(script);\n    } else {\n      syncScripts.push(script);\n    }\n  });\n\n  syncScripts.reduce((prev, script) => {\n    if (script.fn) {\n      try {\n        script.fn();\n      } catch (e) {\n        wlog.error(e);\n      } finally {\n        script.resolve();\n      }\n    } else if (script.src) {\n      runScript(script.src, null, script).then(script.resolve);\n    }\n\n    return prev.then(script.promise);\n  }, Promise.resolve());\n\n  setTimeout(() => {\n    asyncScripts.forEach((script) => {\n      if (script.fn) {\n        try {\n          script.fn();\n        } catch (e) {\n          wlog.error(e);\n        } finally {\n          script.resolve();\n        }\n      } else if (script.src) {\n        runScript(script.src, null, script).then(script.resolve);\n      }\n    });\n  }, 1);\n\n  return Promise.all(scriptPromises);\n};\n\nexport const scriptInputsToHash = (scripts) => {\n  const result = [];\n  for (let i = 0; i < scripts.length; i++) {\n    let script = scripts[i];\n    if (typeof script === 'string') {\n      result.push({ src: script, async: false });\n    } else if (isObject(script)) {\n      result.push(script);\n    } else {\n      result.push({ fn: script, async: false });\n    }\n  }\n  return result;\n};\n","export const hasPerformanceMeasureSupport = (): boolean => {\n  const { performance } = window;\n  // eslint-disable-next-line @typescript-eslint/unbound-method\n  return Boolean(performance) && Boolean(performance.measure);\n};\n","import { cast, clone, except, getDeep, indexOf, merge } from 'utilities/obj.js';\nimport { cachedDetect } from 'utilities/detect.js';\nimport { count } from 'utilities/metrics.js';\nimport { setOrGet as wlocalstorage } from 'utilities/legacyLocalstorage.js';\nimport { root } from 'utilities/root.js';\nimport { wlog as wlogRaw } from 'utilities/wlog.js';\nimport {\n  filter,\n  READY,\n  readyPublicMp4s,\n  readyPublicM3u8s,\n  readyPublicMp3s,\n  nonfailedPublicOver400,\n  readyPublicOver400,\n} from './assets.js';\nimport { Wistia } from '../wistia_namespace.ts';\n\nconst wlog = wlogRaw.getPrefixedFunctions('judy');\n\nconst AUTO = 'auto';\nconst CAROUSEL_HARD_WALL = 'carouselHardWall';\nconst EXTERNAL = 'external';\nconst HLS_VIDEO = 'hlsVideo';\nconst HTML5 = 'html5';\nconst MANUAL_QUALITY_VIDEO = 'manualQualityVideo';\nconst NATIVE_HLS_VIDEO = 'nativeHlsVideo';\nconst NOT_PLAYABLE = 'notplayable';\nconst PASSWORD_PROTECTED = 'passwordprotected';\nconst SIMPLE_HTML5 = 'simplehtml5';\nconst VULCAN_V2 = 'vulcan-v2';\nconst SPHERICAL_VIDEO = 'sphericalVideo';\nconst PLAYERS = [VULCAN_V2, HTML5, SIMPLE_HTML5, EXTERNAL, NOT_PLAYABLE, PASSWORD_PROTECTED];\n\nexport const HLS_ENGINE_PATH = 'engines/hls_video.js';\nexport const NATIVE_HLS_ENGINE_PATH = 'engines/native_hls_video.js';\nexport const SIMPLE_AUDIO_ENGINE_PATH = 'engines/simple_audio.js';\nexport const MANUAL_QUALITY_ENGINE_PATH = 'engines/manual_quality_video.js';\nexport const SPHERICAL_VIDEO_ENGINE_PATH = 'engines/spherical_video.js';\n\nexport const PLUGIN_CONFIGS = {\n  notPlayableVideo: {\n    on: true,\n    initBeforeHasData: true,\n    async: false,\n    loadWeight: -1,\n  },\n  vulcanV2Player: {\n    on: true,\n    initBeforeHasData: false,\n    async: false,\n    loadWeight: -1,\n  },\n  hlsVideo: {\n    on: true,\n    initBeforeHasData: false,\n    async: false,\n    loadWeight: 0,\n  },\n  nativeHlsVideo: {\n    on: true,\n    initBeforeHasData: false,\n    async: false,\n    loadWeight: 0,\n  },\n  passwordProtectedVideo: {\n    on: true,\n    initBeforeHasData: true,\n    async: false,\n    loadWeight: -1,\n  },\n  externalPlayer: {\n    on: true,\n    initBeforeHasData: false,\n    async: false,\n    loadWeight: -1,\n  },\n  html5Player: {\n    on: true,\n    initBeforeHasData: false,\n    async: false,\n    loadWeight: -1,\n  },\n  playlist: {\n    on: true,\n    initBeforeHasData: false,\n    async: false,\n    loadWeight: -1,\n  },\n};\n\nexport const bestPlayer = (context, mediaData, embedOptions) => {\n  const { detect, logger } = context;\n\n  const isSpherical = isSphericalVideo({ mediaData, options: embedOptions }, detect);\n\n  if (detect.oldandroid) {\n    logger.info('external on old android');\n    return EXTERNAL;\n  }\n  if (canUsePlayer(context, VULCAN_V2, mediaData)) {\n    logger.info('default, ret', VULCAN_V2);\n    return VULCAN_V2;\n  }\n  if (mediaData.mediaType === 'Audio' || mediaData.mediaType === 'LiveStream') {\n    // audio and lives are only supported with vulcan_v2\n    return VULCAN_V2;\n  }\n  if (canUsePlayer(context, HTML5, mediaData)) {\n    logger.info('default, ret', HTML5);\n    return HTML5;\n  }\n  logger.info('nothing left, use', EXTERNAL);\n  // Everything supports external, but nobody likes it. It's just an image\n  // and a link to an mp4 file.\n  return EXTERNAL;\n};\n\nexport const bestUsableEngine = (context, mediaData, options = {}) => {\n  const { detect, logger } = context;\n  logger.info('bestUsableEngineClass');\n  const allowHls = shouldServeHls(context, mediaData, options);\n\n  const isSpherical = isSphericalVideo(\n    {\n      mediaData,\n      options,\n    },\n    detect,\n  );\n\n  if (options.engine) {\n    return options.engine;\n  }\n\n  if (isSpherical) {\n    logger.info(SPHERICAL_VIDEO);\n    return SPHERICAL_VIDEO_ENGINE_PATH;\n  }\n\n  if (mediaData.mediaType === 'Audio') {\n    return SIMPLE_AUDIO_ENGINE_PATH;\n  }\n\n  // If managedMediaSource is false or restricted by same origin (often iframes), we need to use the native hls video engine\n  // Otherwise, we can use the hls.js in Safari\n  const isApple = detect.safari || detect.ios.version > 0;\n  const allowsSameOrigin = window.origin !== 'null';\n  const restrictedBySameOrigin = isApple && !allowsSameOrigin;\n  if (\n    allowHls &&\n    detect.nativeHls &&\n    (detect.managedMediaSource === false || restrictedBySameOrigin)\n  ) {\n    logger.info(NATIVE_HLS_VIDEO);\n    return NATIVE_HLS_ENGINE_PATH;\n  }\n\n  if (allowHls) {\n    logger.info(HLS_VIDEO);\n    return HLS_ENGINE_PATH;\n  }\n\n  logger.info(MANUAL_QUALITY_VIDEO);\n  return MANUAL_QUALITY_ENGINE_PATH;\n};\n\n// Given a media data blob and options--and assuming all engine scripts have\n// been loaded--return the engine class that we should initialize.\nexport const bestUsableEngineClass = (context, mediaData, options = {}) => {\n  const { detect, logger } = context;\n  logger.info('bestUsableEngineClass');\n  const allowHls = shouldServeHls(context, mediaData, options);\n\n  const engines = Wistia.engines || {};\n\n  if (mediaData.mediaType === 'Audio') {\n    return engines.SimpleAudio;\n  }\n\n  if (allowHls && detect.nativeHls && engines.NativeHlsVideo) {\n    logger.info(NATIVE_HLS_VIDEO);\n    return engines.NativeHlsVideo;\n  }\n\n  if (allowHls && engines.HlsVideo) {\n    logger.info(HLS_VIDEO);\n    return engines.HlsVideo;\n  }\n\n  logger.info(MANUAL_QUALITY_VIDEO);\n  return engines.ManualQualityVideo;\n};\n\nexport const buildContext = (overrides = {}) => {\n  const pageUrl = contextUrl(overrides);\n  return { ...getDefaultContext(), ...overrides, pageUrl };\n};\n\nexport const canPlayInline = (context) => {\n  const { detect } = context;\n  return detect.android || detect.ios.version >= 10;\n};\n\nexport const canUsePlayer = (context, player, mediaData) => {\n  return isSupportedPlayer(context, player) && hasAssetsForPlayer(context, player, mediaData);\n};\n\nexport const choosePlayer = (context, mediaData, embedOptions) => {\n  const { detect } = context;\n  const { logger } = context;\n  let { playerForce } = embedOptions;\n\n  logger.info('choosePlayer input', mediaData.hashedId);\n\n  // This can be falsey if there is no specific player preference. Users may\n  // also pass in \"auto\" to be explicit, which means there should be no\n  // preference.\n  let playerPreference = determinePlayerPreferenceFromInput(context, mediaData, embedOptions);\n\n  // Loudly error but don't die if given invalid input.\n  if (playerForce && !isValidPlayer(context, playerForce)) {\n    logger.error(`Invalid playerForce option: \"${playerForce}\", ignoring`);\n    playerForce = null;\n  }\n  if (playerPreference && playerPreference !== AUTO && !isValidPlayer(context, playerPreference)) {\n    logger.error(`Invalid playerPreference option: \"${playerPreference}\", ignoring`);\n    playerPreference = AUTO;\n  }\n\n  logger.info('playerPreference is', playerPreference);\n\n  if (playerForce) {\n    // This is really only used when testing.\n    logger.info('\"playerForce\" used, return', playerForce);\n    return playerForce;\n  }\n  // A carousel can contain a password-protected media which should be unlocked\n  // when the carousel is unlocked, so this check should always\n  // come before the check to see if a media is password-protected\n  if (mediaData.carouselHardWall) {\n    logger.info('return', CAROUSEL_HARD_WALL);\n    return CAROUSEL_HARD_WALL;\n  }\n  if (isPasswordProtected(context, embedOptions)) {\n    // the video is marked as being password protected. it's expected that the\n    // password protected player, upon a successful password entry, changes an\n    // option and is replaced such that isPasswordProtected() returns false.\n    logger.info('return', PASSWORD_PROTECTED);\n    return PASSWORD_PROTECTED;\n  }\n  if (isNotPlayable(context, mediaData, embedOptions)) {\n    // 1. We can generate embed codes before a video can actually be played. If we\n    //    can't field any kind of player, we want to embed NOT_PLAYABLE instead,\n    //    which shows upload and encoding progress, then re-embeds as a \"real\"\n    //    player once it reaches 100%.\n    // 2. DRM-lite customers must include their `authorization` credentials as embedOptions. If we know\n    //    a media is \"protected\", but there are no authorization credentials for the embed, we can build\n    //    directly into the NotPlayablePlayer state.\n    // 3. DRM-lite customers that either do not have HLS enabled or cannot use HLS\n    //    will reach a NOT_PLAYABLE state.\n    logger.info('return', NOT_PLAYABLE);\n    return NOT_PLAYABLE;\n  }\n\n  // DRM-lite medias are marked as \"protected\". And those medias must be played back using our\n  // VULCAN_V2 player.\n  if (mediaData.protected) {\n    return VULCAN_V2;\n  }\n\n  if (playerPreference !== AUTO && canUsePlayer(context, playerPreference, mediaData)) {\n    const isSpherical = isSphericalVideo({ mediaData, options: embedOptions }, detect);\n    if (playerPreference !== VULCAN_V2 && isSpherical) {\n      logger.info(\"this player doesn't support spherical, return\", VULCAN_V2);\n      return VULCAN_V2;\n    }\n    // Hooray! The customer has chosen a preference that we can actually use.\n    // Let's use it.\n    logger.info('\"playerPreference\" used, return', playerPreference);\n    return playerPreference;\n  }\n  // Okay, we are not being compelled to use any particular player. Choose\n  // the best one that we can support.\n  logger.info('choosing player with no preference');\n  return bestPlayer(context, mediaData, embedOptions);\n};\n\n// return the url to use for building up the Judy context.\nconst contextUrl = (opts = {}) => {\n  if (opts.pageUrl) {\n    return opts.pageUrl;\n  }\n\n  if (Object(window.FreshUrl).originalUrl) {\n    return window.FreshUrl.originalUrl;\n  }\n\n  if (window.top === window.self) {\n    return location.href || '';\n  }\n\n  return document.referrer || '';\n};\n\nexport const determinePlayerPreferenceFromInput = (context, mediaData, embedOptions) => {\n  // platformPreference is a legacy option. It used to have difference\n  // semantics as playerPreference, but let's treat it the same now.\n  const playerPreference = embedOptions.playerPreference || embedOptions.platformPreference;\n\n  if (playerPreference && playerPreference !== AUTO) {\n    if (playerPreference === HTML5) {\n      if (isMobile(context)) {\n        return HTML5;\n      }\n      return VULCAN_V2;\n    }\n    if (playerPreference === SIMPLE_HTML5) {\n      // Because \"html5\" is an overloaded term on desktop, we add this other one\n      // so we can more easily test the simple/mobile html5 player.\n      return HTML5;\n    }\n    return playerPreference;\n  }\n  // no preference was specified\n  return AUTO;\n};\n\n// the browser can support hlsjs or native HLS\nexport const doesBrowserSupportHlsTools = (detect) => {\n  const hasPromise = Boolean(window.Promise);\n\n  return (detect.mediaSource || detect.nativeHls) && hasPromise;\n};\n\n// Given a media data blob and options, return _all_ engines and sub-engines\n// that will need to be loaded. This is how we determine which scripts to load.\nexport const enginesToLoad = (context, mediaData, options = {}) => {\n  const { detect, logger } = context;\n  let engineNames = [];\n\n  logger.info('enginesToLoad');\n\n  const allowHls = shouldServeHls(context, mediaData, options);\n  if (allowHls && detect.nativeHls) {\n    logger.info(NATIVE_HLS_VIDEO);\n    engineNames.push(NATIVE_HLS_VIDEO);\n  } else if (allowHls) {\n    logger.info(HLS_VIDEO);\n    engineNames.push(HLS_VIDEO);\n  } else {\n    logger.info(MANUAL_QUALITY_VIDEO);\n    engineNames.push(MANUAL_QUALITY_VIDEO);\n  }\n\n  const isSpherical = isSphericalVideo({ mediaData, options }, detect);\n\n  if (isSpherical) {\n    engineNames.push(SPHERICAL_VIDEO);\n    logger.info(SPHERICAL_VIDEO);\n  }\n\n  // Make sure engine names are unique in this array.\n  const tmpHash = {};\n  engineNames.forEach((engineName) => {\n    tmpHash[engineName] = true;\n  });\n  const result = [];\n  for (let engineName in tmpHash) {\n    result.push(engineName);\n  }\n\n  return result;\n};\n\nlet cachedDefaultContext;\nexport const getDefaultContext = () => {\n  if (cachedDefaultContext) {\n    return cachedDefaultContext;\n  }\n\n  cachedDefaultContext = {\n    detect: clone(cachedDetect()),\n    inIframe: top !== self,\n    location: window.location,\n    logger: wlog,\n    pageUrl: location.href,\n    silenceGlobalWarnings: root.wistiaSilenceGlobalWarnings,\n    userAgent: navigator.userAgent,\n  };\n\n  return cachedDefaultContext;\n};\n\nconst getPluginConfig = (context, pluginName) => {\n  const result = {};\n  result[pluginName] = PLUGIN_CONFIGS[pluginName];\n  return result;\n};\n\nconst canUseInstantHls = (context, mediaData, embedOptions = {}) => {\n  return (\n    embedOptions.instantHls !== false &&\n    mediaData.instantHlsAssetsReady &&\n    shouldServeHls(context, mediaData, embedOptions)\n  );\n};\n\nconst canUseOriginalFilePlayback = (context, mediaData, embedOptions = {}) => {\n  return (\n    mediaData.originalIsEligibleForDirectPlayback &&\n    shouldServeHls(context, mediaData, embedOptions)\n  );\n};\n\nexport const hasAssetsForPlayer = (context, player, mediaData) => {\n  if (!isValidPlayer(context, player)) {\n    return false;\n  }\n\n  if (player === NOT_PLAYABLE || player === PASSWORD_PROTECTED || player === CAROUSEL_HARD_WALL) {\n    // No special asset requirements for these.\n    return true;\n  }\n\n  const { assets } = mediaData;\n\n  if (player === VULCAN_V2) {\n    return (\n      canUseInstantHls(context, mediaData) ||\n      canUseOriginalFilePlayback(context, mediaData) ||\n      hasReadyVideoAssets(assets) ||\n      hasReadyAudioAssets(assets)\n    );\n  }\n  if (player === HTML5) {\n    return readyPublicMp4s(assets).length > 0;\n  }\n  if (player === EXTERNAL) {\n    return readyPublicMp4s(assets).length > 0;\n  }\n  throw new Error(`Unhandled player type '${player}'`);\n};\n\nconst hasReadyVideoAssets = (assets) => {\n  return readyPublicMp4s(assets).length > 0 || readyPublicM3u8s(assets).length > 0;\n};\n\nconst hasReadyAudioAssets = (assets) => {\n  return readyPublicMp3s(assets).length > 0;\n};\n\nexport const hasEnoughReadyMp4Assets = (assets) => {\n  const mp4Assets = filter(assets, {\n    container: 'mp4',\n    metadata: (m) => {\n      return m && m.max_bitrate;\n    },\n    public: true,\n    sortBy: 'width desc',\n    status: READY,\n    type: /\\b(?!captioned_video)\\S+/, // no burned in captions\n  });\n\n  // ensure that we have at least one asset at or above 400 width. This prevents\n  // using HLS from using too low quality an asset, say in the scenario where\n  // the other assets are still being processed.\n  const hasAssetWithBitRateAndSize = Boolean(mp4Assets[0] && mp4Assets[0].width >= 400);\n  return hasAssetWithBitRateAndSize;\n};\n\nexport const hasSupportedHlsAssets = (mediaData, options = {}) => {\n  if (options.instantHls !== false && mediaData.instantHlsAssetsReady) {\n    return true;\n  }\n  if (mediaData.originalIsEligibleForDirectPlayback) {\n    return true;\n  }\n  const hasAssets = hasEnoughReadyMp4Assets(mediaData.assets);\n  if (!hasAssets) {\n    count('player/originV2/media-has-no-metadata', 1, { hashedId: mediaData.hashedId });\n  }\n  return hasAssets;\n};\n\nconst hlsOverrideValue = ({ pageUrl }, embedOptions) => {\n  const paramVal = hlsQueryParamValue(pageUrl);\n  if (paramVal != null) {\n    return paramVal;\n  }\n\n  const localStorageVal = wlocalstorage('forceHls');\n  if (localStorageVal != null) {\n    return localStorageVal;\n  }\n\n  return embedOptions.hls;\n};\n\nconst hlsQueryParamValue = (pageUrl) => {\n  const match = pageUrl && pageUrl.match && pageUrl.match(/[&?]whls=([^&]+)/);\n  const val = match && match[1];\n  if (val != null) {\n    return cast(val);\n  }\n  return null;\n};\n\n// Chromecast doesn't work with hlsjs because it only understands a src\n// that can be referenced externally. And playsinline=false or\n// nativeMode=true is our signal to use something close to a native player.\nexport const isBrowserInNativeAndroid = (detect, embedOptions) => {\n  return detect.android && (embedOptions.playsinline === false || embedOptions.nativeMode === true);\n};\n\n// chrome 49 and earlier (the last supported version on Win XP/Vista) does\n// not support MSE well enough for hls.js.\nexport const isBrowserOldChrome = (detect) => {\n  return detect.chrome && parseInt(detect.chrome.version, 10) < 50;\n};\n\nexport const isHlsEnabled = (context, mediaData, embedOptions) => {\n  // always prefer the hls override value if it is present, regardless of the\n  // hls_enabled value\n  const overrideValue = hlsOverrideValue(context, embedOptions);\n  if (overrideValue === true || overrideValue === false) {\n    return overrideValue;\n  }\n\n  if (mediaData.hls_enabled === false) {\n    return false;\n  }\n  return true;\n};\n\nexport const isMobile = ({ detect }) => {\n  return detect.iphone || detect.ipad || detect.android;\n};\n\nexport const isNotPlayable = (context, mediaData, embedOptions = {}) => {\n  const { assets } = mediaData;\n\n  if (\n    !mediaData.protected &&\n    (canUseInstantHls(context, mediaData, embedOptions) ||\n      canUseOriginalFilePlayback(context, mediaData, embedOptions))\n  ) {\n    return false;\n  }\n\n  const assetsArentReady =\n    mediaData.type === 'Audio'\n      ? readyPublicMp3s(assets).length == 0\n      : readyPublicMp4s(assets).length == 0;\n\n  // LiveStreams won't have ready assets, but that does not mean we're in an\n  // unplayable position.\n  if (mediaData.mediaType === 'LiveStream') {\n    return false;\n  }\n\n  // DRM-lite authorization check!\n  // For DRM-lite, customers must include their `authorization` credentials as embedOptions. If we know\n  // a media is \"protected\", but there are no authorization credentials for the embed, we can build\n  // directly into the NotPlayablePlayer state.\n  if (mediaData.protected && !embedOptions.authorization?.jwt) {\n    embedOptions.notPlayableOptions = {\n      fadeIn: false,\n      message: 'This video is set to private.',\n      shouldRefresh: false,\n    };\n\n    return true;\n  }\n\n  const allowHls = shouldServeHls(context, mediaData, embedOptions);\n  if (mediaData.protected && allowHls === false) {\n    embedOptions.notPlayableOptions = {\n      fadeIn: false,\n      message: 'This video is not playable.',\n      shouldRefresh: false,\n    };\n\n    return true;\n  }\n\n  return (\n    assets.length === 0 ||\n    (assets.length === 1 && assets[0].type === 'original') ||\n    assetsArentReady ||\n    (nonfailedPublicOver400(assets).length > 0 && readyPublicOver400(assets).length === 0)\n  );\n};\n\nexport const isPasswordProtected = (context, embedOptions) => {\n  const pluginOpts = getDeep(embedOptions, 'plugin.passwordProtectedVideo');\n  return pluginOpts != null && pluginOpts.on !== false;\n};\n\nconst isSphericalVideo = (mediaInfo = {}) => {\n  if (mediaInfo.options.overrideSpherical) {\n    return false;\n  }\n\n  const mediaDataSpherical = String(mediaInfo.mediaData?.spherical);\n  const optsSpherical = String(mediaInfo.opts?.spherical);\n\n  return mediaDataSpherical === 'true' || optsSpherical === 'true';\n};\n\nexport const isSupportedPlayer = (context, player) => {\n  if (!isValidPlayer(context, player)) {\n    return false;\n  }\n  return indexOf(supportedPlayers(context), player) >= 0;\n};\n\nexport const isValidPlayer = (context, player) => {\n  return indexOf(PLAYERS, player) >= 0;\n};\n\nexport const logWarnings = (context) => {\n  const { detect, userAgent, logger, silenceGlobalWarnings } = context;\n\n  if (silenceGlobalWarnings) {\n    // Customers can set window.wistiaSilenceGlobalWarnings = true, and that\n    // will be included in the default judy context.\n    return;\n  }\n\n  const isHeadless = /phantomjs/i.test(userAgent);\n  if (xhrHasBeenTamperedWith()) {\n    if (!isHeadless) {\n      logger.error(\n        'The XMLHttpRequest constructor has been tampered with. Because this affects CORS/Range XHR requests, HLS playback has been disabled. To enable HLS playback and other important features, please remove code that changes the definition of window.XMLHttpRequest.',\n      );\n    }\n  }\n\n  if (urlHasBeenTamperedWith()) {\n    if (detect.mediaSource && !isHeadless) {\n      logger.error(\n        'window.URL.createObjectURL has been tampered with. Because this affects use of Media Source Extensions, HLS playback has been disabled. window.URL is a browser API that should not be clobbered. Its current value is:',\n        window.URL,\n      );\n    }\n  }\n};\n\nexport const playerPlugins = (context, player, mediaData, embedOptions) => {\n  const { logger } = context;\n  const plugins = {};\n\n  logger.info('playerPlugins input', player, mediaData.hashedId, mediaData, embedOptions);\n\n  if (player === NOT_PLAYABLE) {\n    merge(plugins, getPluginConfig(context, 'notPlayableVideo'));\n  } else if (player === PASSWORD_PROTECTED) {\n    merge(plugins, getPluginConfig(context, 'passwordProtectedVideo'));\n  } else if (player === HTML5) {\n    merge(plugins, getPluginConfig(context, 'html5Player'));\n  } else if (player === EXTERNAL) {\n    merge(plugins, getPluginConfig(context, 'externalPlayer'));\n  } else if (player === VULCAN_V2) {\n    merge(plugins, getPluginConfig(context, 'vulcanV2Player'));\n  }\n\n  const pluginNames = [];\n  for (let k in plugins) {\n    pluginNames.push(k);\n  }\n  logger.info('playerPlugins output', ...pluginNames, plugins);\n\n  return plugins;\n};\n\nexport const report = (context, mediaData, embedOptions) => {\n  return {\n    bestPlayer: bestPlayer(context, mediaData, embedOptions),\n    playerPreferenceFromInput: determinePlayerPreferenceFromInput(context, mediaData, embedOptions),\n    supportedPlayers: supportedPlayers(context),\n    usablePlayers: usablePlayers(context, mediaData.assets),\n  };\n};\n\nexport const shouldServeHls = (context, mediaData, embedOptions) => {\n  // start by forcing HLS when the type is livestream, but later\n  // refactor things such that NotPlayablePlayer is used if we can't handle\n  // live\n  if (mediaData.type === 'LiveStream') {\n    return true;\n  }\n  const { detect } = context;\n  return (\n    doesBrowserSupportHlsTools(detect) &&\n    !isBrowserOldChrome(detect) &&\n    !isBrowserInNativeAndroid(detect, embedOptions) &&\n    // the account has hls enabled or explicitly trying to force\n    isHlsEnabled(context, mediaData, embedOptions) &&\n    // the media actually has desktop assets compatable with the delivery system\n    hasSupportedHlsAssets(mediaData) &&\n    // Some sites completely replace the XMLHttpRequest constructor with one\n    // that doesn't work with hls.js. If we detect that, don't use HLS\n    // (...unless we explicitly say to try it.)\n    ((!xhrHasBeenTamperedWith(context) && !urlHasBeenTamperedWith(context)) ||\n      hlsOverrideValue(context, embedOptions))\n  );\n};\n\nexport const supportedPlayers = (context) => {\n  const { detect } = context;\n  const result = [NOT_PLAYABLE, PASSWORD_PROTECTED, EXTERNAL, CAROUSEL_HARD_WALL];\n\n  if (detect.vulcanV2Support) {\n    result.push(VULCAN_V2);\n  }\n\n  if (detect.video.h264) {\n    result.push(HTML5);\n  }\n\n  return result;\n};\n\nexport const usablePlayers = (context, mediaData) => {\n  const result = [];\n  const candidates = supportedPlayers(context);\n  for (let i = 0; i < candidates.length; i++) {\n    let player = candidates[i];\n    if (canUsePlayer(context, player, mediaData)) {\n      result.push(player);\n    }\n  }\n  return result;\n};\n\n// `URL` is a built-in type, but a lot sites accidentally clobber it like\n// `URL = location.href`. hls.js uses it though.\nexport const urlHasBeenTamperedWith = () => {\n  return typeof (window.URL && window.URL.createObjectURL) !== 'function';\n};\n\n// `XMLHttpRequest.prototype.constructor.toString()` should be of this form if it's untampered with\nconst XMLHTTPREQUEST_CONSTRUCTOR_RE =\n  /\\s*function\\s+XMLHttpRequest\\(\\)\\s*{\\s*\\[native code\\]\\s*}\\s*/m;\n// Oddly, safari 9.x seems to display this in the [object ...] form.\nconst XMLHTTPREQUEST_CONSTRUCTOR_IN_SAFARI_9_RE = /\\[object XMLHttpRequestConstructor\\]/m;\n\nexport const xhrHasBeenTamperedWith = () => {\n  if (XMLHttpRequest && XMLHttpRequest.prototype && XMLHttpRequest.prototype.constructor) {\n    const constructorString = XMLHttpRequest.prototype.constructor.toString();\n    return !(\n      XMLHTTPREQUEST_CONSTRUCTOR_RE.test(constructorString) ||\n      XMLHTTPREQUEST_CONSTRUCTOR_IN_SAFARI_9_RE.test(constructorString)\n    );\n  }\n  return true;\n};\n","import { Wistia } from '../wistia_namespace.ts';\nimport type { WistiaGlobal } from '../types/player-api-types.ts';\n\nconst QUEUE_INTERVAL = 500;\n\nlet wistiaQueue = null as unknown as NodeJS.Timeout | null;\n\n/**\n * Periodically checks the Wistia queue and executes the functions in it\n * @returns {void}\n */\nexport const maybeStartWistiaQueue = (): void => {\n  if (wistiaQueue) {\n    return;\n  }\n\n  wistiaQueue = setInterval(() => {\n    const queue = window._wq;\n    if (!queue || queue.length === 0) {\n      return;\n    }\n\n    queue.slice(0).forEach((item) => {\n      if (typeof item === 'function') {\n        item(Wistia as unknown as WistiaGlobal);\n        queue.splice(queue.indexOf(item), 1);\n      } else if (!Wistia.flushInitQueue) {\n        queue.splice(queue.indexOf(item), 1);\n        // eslint-disable-next-line no-console\n        console.warn(\n          `<wistia-player> elements must be configured via window.wistiaOptions instead of window._wq. Config not applied`,\n          item,\n        );\n      }\n    });\n  }, QUEUE_INTERVAL);\n};\n\n/**\n * Stops the Wistia queue\n * @returns {void}\n */\nexport const stopWistiaQueue = (): void => {\n  if (wistiaQueue) {\n    clearInterval(wistiaQueue);\n    wistiaQueue = null;\n  }\n};\n","import { doTimeout } from 'utilities/timeout-utils.js';\nimport { wlog } from 'utilities/wlog.js';\nimport { merge } from 'utilities/obj.js';\nimport { pageLoaded } from 'utilities/elem.js';\nimport { proto as urlProto } from 'utilities/url.js';\nimport { metricsHost } from 'utilities/hosts.js';\nimport { isVisitorTrackingEnabled } from 'utilities/trackingConsentApi.js';\nimport { Wistia } from '../wistia_namespace.ts';\n\nconst W = Wistia;\n\nif (Wistia._metricsCache == null) {\n  Wistia._metricsCache = {};\n}\n\nconst METRICS_CACHE = Wistia._metricsCache;\n\nexport const send = (type, key, val, extraData = {}) => {\n  try {\n    if (METRICS_CACHE.toMput == null) {\n      METRICS_CACHE.toMput = [];\n    }\n    if (METRICS_CACHE.requestId == null) {\n      METRICS_CACHE.requestId = 0;\n    }\n\n    const messageObj = merge(\n      {\n        type,\n        key,\n        value: val != null ? val : null,\n        request_id: METRICS_CACHE.requestId,\n      },\n      extraData,\n    );\n\n    const serialized = JSON.stringify(messageObj);\n    wlog.debug('send metrics', serialized);\n    METRICS_CACHE.toMput.push(serialized);\n\n    doTimeout(\n      'metrics.debounce',\n      () => {\n        pageLoaded(() => {\n          msend.apply(this, METRICS_CACHE.toMput);\n          METRICS_CACHE.toMput = [];\n          METRICS_CACHE.requestId += 1;\n        });\n      },\n      500,\n    );\n  } catch (e) {\n    wlog.error(e);\n  }\n};\n\nexport const msend = (...messages) => {\n  if (!isVisitorTrackingEnabled()) {\n    return;\n  }\n  const url = `${urlProto()}//${metricsHost()}/mput?topic=metrics`;\n  return fetch(url, {\n    method: 'POST',\n    mode: 'cors',\n    headers: {\n      'Content-Type': 'application/x-www-form-urlencoded',\n    },\n    body: messages.join('\\n'),\n  })\n    .then((response) => {\n      if (!response.ok) {\n        // If fetch returns a response with an HTTP error code,\n        // print an error in the console\n        console.error(response);\n      }\n    })\n    .catch((reason) => {\n      // If fetch fails (such as when this URL is blocked by an ad blocking extension),\n      // print an error in the console\n      console.error(reason);\n    });\n};\n\nexport const count = (key, val = 1, extraData = {}) => {\n  return send('count', key, val, extraData);\n};\n\nexport const sample = (key, val, extraData) => {\n  return send('sample', key, val, extraData);\n};\n","import { assign } from 'utilities/assign.js';\n\n// Old trick to clone arrays, i.e. `aps.call(array)`.\nconst aps = Array.prototype.slice;\n\nconst merge = (obj1, ...objs) => {\n  if (objs.length === 0) {\n    return obj1;\n  }\n  for (let i = 0; i < objs.length; i++) {\n    mergeOne(obj1, objs[i]);\n  }\n  return obj1;\n};\n\n// Recursively merge the leaf values of obj2 into obj1. obj1 is modified\n// in-place. Accepts objects or arrays. Always returns obj1.\n//\n// By default, we do not transform any merged values.\n//\n// We also use a non-ideal legacy strategy when merging null/undefined\n// values from obj2: they will _delete_ corresponding keys in obj1. The more\n// correct solution seems like it would be to _never_ delete from obj1, or\n// at least to only delete `undefined` values, but maybe not null. We _may_\n// be able to just make this change, but let's do one thing at a time.\nconst mergeOne = (\n  obj1,\n  obj2,\n  transformerFn = identityFunc,\n  shouldDeleteFn = legacyShouldDeleteFromMerge,\n) => {\n  if (isArray(obj2)) {\n    if (!isArray(obj1)) {\n      obj1 = [];\n    }\n    for (let i = 0; i < obj2.length; i++) {\n      let v = obj2[i];\n      // note that setting an index of an array will naturally increase the\n      // length of the array. Array#push() is not necessary.\n      if (obj1[i] == null && v != null) {\n        if (isArray(v)) {\n          obj1[i] = [];\n        } else if (isObject(v)) {\n          obj1[i] = {};\n        }\n      }\n      const result = mergeOne(obj1[i], v, transformerFn);\n      if (shouldDeleteFn(obj2, i, result)) {\n        delete obj1[i];\n      } else {\n        obj1[i] = result;\n      }\n    }\n    return transformerFn(obj1);\n  }\n  if (isObject(obj2)) {\n    for (let k in obj2) {\n      if (Object.hasOwn(obj2, k) && (Object.hasOwn(obj1, k) || obj1[k] == null)) {\n        let v = obj2[k];\n        if (isArray(v)) {\n          if (!isArray(obj1[k])) {\n            obj1[k] = [];\n          }\n          mergeOne(obj1[k], v, transformerFn);\n          obj1[k] = transformerFn(obj1[k]);\n        } else if (isObject(v)) {\n          if (!isObject(obj1[k])) {\n            obj1[k] = {};\n          }\n          mergeOne(obj1[k], v, transformerFn);\n          obj1[k] = transformerFn(obj1[k]);\n        } else if (obj1 == null) {\n          obj1 = {};\n          if (!shouldDeleteFn(obj2, k, v)) {\n            obj1[k] = transformerFn(v);\n          }\n        } else if (shouldDeleteFn(obj2, k, v)) {\n          delete obj1[k];\n        } else {\n          obj1[k] = transformerFn(v);\n        }\n      }\n    }\n    return transformerFn(obj1);\n  }\n  // obj2 is not an object that can be cloned. Since we may recurse down\n  // to this level, we should just return obj2, since it will overwrite\n  // obj1.\n  return transformerFn(obj2);\n};\n\nconst identityFunc = (v) => {\n  return v;\n};\n\n// When merging, delete key from obj1 if the value from obj2 is null or\n// undefined.\nconst legacyShouldDeleteFromMerge = (obj, k, v) => {\n  return v == null;\n};\n\nconst clone = (obj, transformerFn) => {\n  if (isArray(obj)) {\n    return mergeOne([], obj, transformerFn);\n  }\n  return mergeOne({}, obj, transformerFn);\n};\n\nconst getDeep = (obj, parts, create) => {\n  if (typeof parts === 'string') {\n    parts = parts.split('.');\n  } else {\n    parts = aps.call(parts);\n  }\n\n  let lastObj = obj;\n  let lastP;\n  while (obj != null && parts.length) {\n    let p = parts.shift();\n    if ((obj[p] === undefined || (!isObject(obj[p]) && !isArray(obj[p]))) && create) {\n      if (p === 0) {\n        obj = lastObj[lastP] = [];\n        obj[p] = {};\n      } else {\n        obj[p] = {};\n      }\n    }\n    lastObj = obj;\n    lastP = p;\n\n    // Only descend into properties that the object directly owns. getDeep({}, '__proto__')\n    // See for security vulnerability reproduction.\n    // https://github.com/wistia/player-modern/issues/1800\n    if (Object.hasOwn(obj, p)) {\n      obj = obj[p];\n    } else {\n      obj = undefined;\n    }\n  }\n\n  return obj;\n};\n\nconst setDeep = (obj, parts, value) => {\n  return setAndMaybeDeleteUndefined(obj, parts, value, true);\n};\n\nconst setAndPreserveUndefined = (obj, parts, value) => {\n  return setAndMaybeDeleteUndefined(obj, parts, value, false);\n};\n\nconst setAndMaybeDeleteUndefined = (obj, parts, value, shouldDeleteUndefined = true) => {\n  if (typeof parts === 'string') {\n    parts = parts.split('.');\n  } else {\n    parts = aps.call(parts);\n  }\n  const prop = parts.pop();\n  obj = getDeep(obj, parts, true);\n  if (obj != null && (isObject(obj) || isArray(obj)) && prop != null) {\n    if (!shouldDeleteUndefined || value != null) {\n      obj[prop] = value;\n    } else {\n      delete obj[prop];\n    }\n  } else {\n    // nothing to set or delete\n    return undefined;\n  }\n};\n\nconst unsetDeep = (obj, parts) => {\n  return setDeep(obj, parts);\n};\n\nconst exists = (obj, name) => {\n  return getDeep(obj, name) !== undefined;\n};\n\nconst cast = (maybeStr) => {\n  if (maybeStr == null) {\n    return maybeStr;\n  }\n\n  if (isObject(maybeStr) || isArray(maybeStr)) {\n    return castDeep(maybeStr);\n  }\n\n  return castStr(`${maybeStr}`, maybeStr);\n};\n\nconst castStr = (str, defaultRet = str) => {\n  if (/^-?[1-9]\\d*?$/.test(str)) {\n    return parseInt(str, 10);\n  }\n  if (str === '0' || str === '-0') {\n    return 0;\n  }\n  if (/^-?\\d*\\.\\d+$/.test(str)) {\n    return parseFloat(str);\n  }\n  if (/^true$/i.test(str)) {\n    return true;\n  }\n  if (/^false$/i.test(str)) {\n    return false;\n  }\n  return defaultRet;\n};\n\n// Given an object or array, iterates over each leaf and casts the value.\nconst castDeep = (obj) => {\n  const castTransformer = (val) => {\n    if (typeof val === 'string') {\n      return castStr(val);\n    }\n    return val;\n  };\n  const dontDeleteAnything = () => false;\n  return mergeOne(obj, obj, castTransformer, dontDeleteAnything);\n};\n\nconst only = (hash, keys) => {\n  const result = {};\n  const keyHash = {};\n  for (let i = 0; i < keys.length; i++) {\n    keyHash[keys[i]] = true;\n  }\n  for (let k in hash) {\n    if (keyHash[k]) {\n      result[k] = hash[k];\n    }\n  }\n  return result;\n};\n\nconst except = (hash, keys) => {\n  const result = {};\n  const keyHash = {};\n  for (let i = 0; i < keys.length; i++) {\n    keyHash[keys[i]] = true;\n  }\n  for (let k in hash) {\n    if (!keyHash[k]) {\n      result[k] = hash[k];\n    }\n  }\n  return result;\n};\n\n// Advanced sorting and filtering so we can be expressive and concise when\n// choosing assets.\n//\n// Defined at the class level so it's easier to test sorting and filtering.\nconst select = (arr, keyPairs) => {\n  const result = [];\n\n  const isFn = typeof keyPairs === 'function';\n  const filterFn = isFn ? keyPairs : null;\n\n  for (let i = 0; i < arr.length; i++) {\n    let elem = arr[i];\n    if (isFn) {\n      // Filter by function. This gives the most freedom.\n      if (filterFn(elem)) {\n        result.push(elem);\n      }\n    } else {\n      // Select the asset if all keyPairs of the object match. Common.\n      let matching = true;\n      for (let k in keyPairs) {\n        let v = keyPairs[k];\n        if (v instanceof Array) {\n          // Range check.\n          if (!elem[k] || elem[k] < v[0] || elem[k] > v[1]) {\n            matching = false;\n            break;\n          }\n        } else if (v instanceof RegExp) {\n          // Regular Expression check.\n          if (!v.test(elem[k])) {\n            matching = false;\n            break;\n          }\n        } else if (v instanceof MultipleValues) {\n          let anyMatch = false;\n          for (let j = 0; j < v.values.length; j++) {\n            let value = v.values[j];\n            if (elem[k] === value) {\n              anyMatch = true;\n              break;\n            }\n          }\n          if (!anyMatch) {\n            matching = false;\n            break;\n          }\n        } else if (typeof v === 'function') {\n          if (elem[k] == null || !v(elem[k])) {\n            matching = false;\n            break;\n          }\n        } else if (elem[k] !== v) {\n          // Exact match.\n          matching = false;\n          break;\n        }\n      }\n      if (matching) {\n        result.push(elem);\n      }\n    }\n  }\n\n  return result;\n};\n\n// This is just a way to box multiple values in a semantic way, to help us\n// differentiate between AND/OR/Range type situations.\nconst MultipleValues = function (values) {\n  const self = this;\n\n  const construct = function () {\n    self.values = values;\n  };\n\n  construct();\n\n  return self;\n};\n\nconst values = (...values) => {\n  return new MultipleValues(values);\n};\n\nconst sort = (arr, keys) => {\n  const isFn = typeof keys === 'function';\n  const filterFn = isFn ? keys : null;\n  const result = aps.call(arr);\n\n  // Sort results with this option.\n  if (isFn) {\n    // Sort via sort functions. This gives the most freedom.\n    result.sort(filterFn);\n  } else {\n    // Convenience for sorting by one or many properties. Can either pass an\n    // array or a comma separated list.\n    result.sort((a, b) => {\n      let sortBys;\n      if (keys instanceof Array) {\n        sortBys = clone(keys);\n      } else {\n        sortBys = keys.split(/\\s*,\\s*/);\n      }\n      let ret = 0;\n      while (ret === 0 && sortBys.length > 0) {\n        let pieces = sortBys.shift().split(/\\s+/);\n        let sortBy = pieces[0];\n        let dir = pieces[1];\n        dir = dir === 'desc' ? -1 : 1;\n        if (a[sortBy] < b[sortBy]) {\n          ret = -1 * dir;\n          break;\n        } else if (a[sortBy] === b[sortBy]) {\n          ret = 0;\n        } else {\n          ret = 1 * dir;\n          break;\n        }\n      }\n      return ret;\n    });\n  }\n  return result;\n};\n\nconst filter = (arr, callback, thisArg) => {\n  const ctx = thisArg === undefined ? this : thisArg;\n  const result = [];\n  for (let i = 0; i < arr.length; i++) {\n    if (callback.call(ctx, arr[i], i, arr)) {\n      result.push(arr[i]);\n    }\n  }\n  return result;\n};\n\n// returns true if obj is a basic Array, []\n// duck type push as optimization; most checks are not arrays and will not\n// have push set. this way we avoid the implicit toString() on the\n// constructor.\nconst ARR_REGEXP = /^\\s*function Array()/;\nconst isArray = (obj) => {\n  return obj != null && obj.push && ARR_REGEXP.test(obj.constructor);\n};\n\n// returns true if obj is a basic Object, {}\nconst OBJ_REGEXP = /^\\s*function Object()/;\nconst isObject = (obj) => {\n  return obj != null && typeof obj === 'object' && OBJ_REGEXP.test(obj.constructor);\n};\n\nconst isFunction = (obj) => {\n  return obj != null && typeof obj === 'function';\n};\n\nconst REGEXP_REGEXP = /^\\s*function RegExp()/;\nconst isRegExp = (obj) => {\n  return obj != null && REGEXP_REGEXP.test(obj.constructor);\n};\n\n// returns true if obj is one of javascript's basic types\nconst BASIC_TYPE_REGEXP = /^string|number|boolean|function$/i;\nconst isBasicType = (obj) => {\n  return obj != null && (BASIC_TYPE_REGEXP.test(typeof obj) || isRegExp(obj));\n};\n\nconst isEmpty = (obj) => {\n  if (obj == null) {\n    return true;\n  }\n  if (isArray(obj) && !obj.length) {\n    return true;\n  }\n  if (isObject(obj)) {\n    if (Object.keys(obj).length) {\n      return false;\n    }\n    return true;\n  }\n  return false;\n};\n\n// returns true if obj1 is a subset of obj2\nconst isSubsetDeep = (obj1, obj2) => {\n  if (obj1 === obj2) {\n    return true;\n  }\n  if ((obj1 != null && obj2 == null) || (obj1 == null && obj2 != null)) {\n    return false;\n  }\n  let result = true;\n  eachLeaf(obj1, (obj1LeafVal, path) => {\n    let obj2LeafVal = getDeep(obj2, path);\n    if (obj1LeafVal !== obj2LeafVal) {\n      result = false;\n    }\n  });\n  return result;\n};\n\n// true if each object is a subset of the other\nconst equalsDeep = (obj1, obj2) => {\n  return isSubsetDeep(obj1, obj2) && isSubsetDeep(obj2, obj1);\n};\n\n//\n// This is the meat and potatoes for iterating over\n// javascript object/array structures.\n//\n// Call fn(node, path, parent, key) for each node in an object.\n//\n// We include the parent + key so that the callback can modify the leaf\n// value in-place. We pass the path to the root node (the keys from root to\n// leaf) so that we can serialize objects.\nconst eachDeep = (obj, fn, path, parent, key) => {\n  if (path == null) {\n    path = [];\n  }\n  if (isBasicType(obj)) {\n    fn(obj, path, parent, key);\n  } else if (isObject(obj) || isArray(obj)) {\n    fn(obj, path, parent, key);\n    for (let key in obj) {\n      if (Object.hasOwn(obj, key)) {\n        const newPath = aps.call(path);\n        newPath.push(key);\n        eachDeep(obj[key], fn, newPath, obj, key);\n      }\n    }\n  } else {\n    fn(obj, path, parent, key);\n  }\n};\n\n// call fn(node, path, parent, key) for each leaf node in an object\nconst eachLeaf = (obj, fn) => {\n  eachDeep(obj, (obj, path, parent, key) => {\n    if (!isArray(obj) && !isObject(obj)) {\n      fn(obj, path, parent, key);\n    }\n  });\n};\n\nconst pick = (obj, keys) => {\n  const result = {};\n  for (let i = 0; i < keys.length; i++) {\n    const key = keys[i];\n    if (obj[key]) {\n      result[key] = obj[key];\n    }\n  }\n  return result;\n};\n\nconst indexOf = (arr, target) => {\n  for (let i = 0; i < arr.length; i++) {\n    if (arr[i] === target) {\n      return i;\n    }\n  }\n  return -1;\n};\n\nconst keys = (obj) => {\n  if (Object.keys) {\n    return Object.keys(obj);\n  }\n  const result = [];\n  for (let k in obj) {\n    if (Object.hasOwn(obj, k)) {\n      result.push(k);\n    }\n  }\n  return result;\n};\n\nexport {\n  merge,\n  mergeOne,\n  identityFunc,\n  legacyShouldDeleteFromMerge,\n  clone,\n  getDeep,\n  setDeep,\n  setAndPreserveUndefined,\n  unsetDeep,\n  exists,\n  assign,\n  cast,\n  castDeep,\n  only,\n  except,\n  select,\n  filter,\n  values,\n  sort,\n  isArray,\n  isObject,\n  isFunction,\n  isRegExp,\n  isBasicType,\n  isEmpty,\n  isSubsetDeep,\n  equalsDeep,\n  eachDeep,\n  eachLeaf,\n  pick,\n  indexOf,\n  keys,\n};\n","// Regex to match cloud dev box hostnames: [subdomain]-cde-[devbox].[region].wistia.io\nexport const REGEX_CLOUD_DEV_BOX = /([a-z0-9-]+)-cde-([a-z0-9-]+)\\.([a-z0-9-]+)\\.wistia\\.io/i;\nexport const REGEX_DEV_METAL_TUNNEL =\n  /([a-z0-9-]+)-txl-([a-z0-9-]+)\\.([a-z0-9-]+)\\.mtl\\.wistia\\.io/i;\n\nexport const appHostname = (subdomain = 'app') => {\n  const hostname = process.env.BASE_HOSTNAME || process.env.HOSTNAME;\n  const subdomainSuffixHostname = getSubdomainSuffixHostname(subdomain);\n  if (subdomainSuffixHostname) {\n    return subdomainSuffixHostname;\n  }\n\n  return `${subdomain}.${hostname}`;\n};\n\nexport const getSubdomainSuffixHostname = (subdomain = 'app') => {\n  // Check if we're running in a cloud dev environment by parsing the current hostname\n  if (typeof window !== 'undefined' && window.location) {\n    const currentHost = window.location.hostname;\n\n    // If we're already on a cloud dev box, extract the devbox and region\n    const cloudDevBoxMatches = REGEX_CLOUD_DEV_BOX.exec(currentHost);\n    if (cloudDevBoxMatches) {\n      // Return the new hostname with the same devbox and region\n      return `${subdomain}-cde-${cloudDevBoxMatches[2]}.${cloudDevBoxMatches[3]}.wistia.io`;\n    }\n    const metalTunnelMatches = REGEX_DEV_METAL_TUNNEL.exec(currentHost);\n    if (metalTunnelMatches) {\n      // Return the new hostname with the same tunnel subdomain suffix and region\n      return `${subdomain}-txl-${metalTunnelMatches[2]}.${metalTunnelMatches[3]}.mtl.wistia.io`;\n    }\n  }\n  return null;\n};\n","import { isNil } from '@wistia/type-guards';\nimport { MediaDataServerResponse } from '../types/player-api-types.ts';\n\nexport const isMediaDataError = (mediaData: MediaDataServerResponse): boolean => {\n  if (isNil(mediaData.error)) {\n    return false;\n  }\n\n  if (mediaData.error === 'true' || mediaData.error === true) {\n    return true;\n  }\n\n  return false;\n};\n","import { isNil, isNonEmptyString } from '@wistia/type-guards';\nimport { Color } from './color.js';\nimport { reportError } from './sentryUtils.ts';\n\n/* eslint-disable @typescript-eslint/no-magic-numbers */\nexport const colorContrastRatiosByShape = {\n  nonText: 3, // 3:1 - https://www.w3.org/TR/WCAG21/#non-text-contrast\n  largeText: 3, // 3:1 - https://www.w3.org/TR/WCAG21/#contrast-minimum\n  paragraphText: 4.5, // 4.5:1 -  https://www.w3.org/TR/WCAG21/#contrast-minimum\n  smallText: 5.5, // We're making this up, but it should be more than the paragraph text\n  // This one is made up, but we want to offer _some_ visual contrast between the background color and its non-text hit areas with properly contrasting contents.\n  // However, the contrast here is for visual interest, not for accessibility (since the contents have proper contrast).\n  // In these cases, we'll use a lower contrast ratio than the normal nonText value.\n  backgroundColorWhereNonTextHitAreaContentsHaveProperContrast: 2, // https://www.w3.org/WAI/WCAG21/Understanding/non-text-contrast.html#intent\n};\n\nexport const rgbToHsl = (\n  color: Color | number[] | string,\n): { hue: number; lightness: number; saturation: number } => {\n  let colorArray = color;\n  if (color instanceof Color) {\n    if (isNil(color.r) || isNil(color.g) || isNil(color.b)) {\n      throw new Error('Color does not contain required RGB values');\n    }\n    colorArray = [color.r, color.g, color.b];\n  } else if (typeof color === 'string') {\n    const colorInstance = new Color(color);\n    if (isNil(colorInstance.r) || isNil(colorInstance.g) || isNil(colorInstance.b)) {\n      throw new Error('Color does not contain required RGB values');\n    }\n    colorArray = [colorInstance.r, colorInstance.g, colorInstance.b];\n  }\n  const red = colorArray[0] / 255;\n  const green = colorArray[1] / 255;\n  const blue = colorArray[2] / 255;\n  const max = Math.max(red, green, blue);\n  const min = Math.min(red, green, blue);\n  let hue = 0;\n  let saturation = 0;\n  const lightness = (max + min) / 2;\n\n  if (max === min) {\n    hue = 0;\n    saturation = 0;\n  }\n\n  const delta = max - min;\n  if (delta === 0) {\n    return {\n      hue,\n      saturation,\n      lightness: red * 100,\n    };\n  }\n  if (lightness > 0.5) {\n    saturation = delta / (2 - max - min);\n  } else {\n    saturation = delta / (max + min);\n  }\n\n  if (max === red) {\n    hue = (green - blue) / delta + (green < blue ? 6 : 0);\n  } else if (max === green) {\n    hue = (blue - red) / delta + 2;\n  } else {\n    hue = (red - green) / delta + 4;\n  }\n  hue /= 6;\n\n  return { hue: hue * 360, saturation: saturation * 100, lightness: lightness * 100 };\n};\n\nexport const getContrast = (foreground: Color | string, background: Color | string): number => {\n  // WCAG contrast ratio\n  // see http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef\n  const foregroundColor = new Color(foreground);\n  const backgroundColor = new Color(background);\n  const l1 = foregroundColor.getRelativeLuminance();\n  const l2 = backgroundColor.getRelativeLuminance();\n  const contrastRatio = l1 > l2 ? (l1 + 0.05) / (l2 + 0.05) : (l2 + 0.05) / (l1 + 0.05);\n  return Number.parseFloat(contrastRatio.toFixed(1));\n};\n\nexport const adjustColorForProperContrast = (\n  foreground: Color | string,\n  background: Color | string,\n  shape: keyof typeof colorContrastRatiosByShape = 'paragraphText',\n): string => {\n  const foregroundColor = new Color(foreground);\n  const backgroundColor = new Color(background);\n\n  // This shouldn't be a valid scenario, but since the Color class isn't converted to TS yet\n  // the r, g, and b properties could theoretically be optional\n  if (isNil(foregroundColor.r) || isNil(foregroundColor.g) || isNil(foregroundColor.b)) {\n    throw new Error('Color does not contain required RGB values');\n  }\n\n  /* eslint-disable @typescript-eslint/no-magic-numbers */\n  const initialContrastRatio = getContrast(\n    foregroundColor.toHexWithHash(),\n    backgroundColor.toHexWithHash(),\n  );\n  if (foregroundColor.hasAccessibleContrast(backgroundColor, shape)) {\n    return foregroundColor.toHexWithHash();\n  }\n\n  const { lightness: foregroundColorLightness } = rgbToHsl([\n    foregroundColor.r,\n    foregroundColor.g,\n    foregroundColor.b,\n  ]);\n\n  const slightlyLighterForegroundColor = new Color(foregroundColor).lighten(1);\n  const slightlyDarkerForegroundColor = new Color(foregroundColor).darken(1);\n\n  // Does lightening the foreground color slightly increase the contrast ratio?\n  let shouldForegroundColorBeLighter =\n    foregroundColorLightness < 15 ||\n    slightlyLighterForegroundColor.getContrastRatio(backgroundColor) >\n      slightlyDarkerForegroundColor.getContrastRatio(backgroundColor);\n\n  // If the foreground color is already very light and the initial contrast ratio was 1:1,\n  // lightening the foreground color technically would have increased the contrast ratio, but\n  // we know it can never be lightened enough to provide sufficient contrast,\n  // so we'll set shouldForegroundColorBeLighter to false.\n  if (foregroundColorLightness > 75 && initialContrastRatio === 1) {\n    shouldForegroundColorBeLighter = false;\n  }\n\n  let adjustedForegroundColor = new Color(foregroundColor);\n  let i = 0;\n  while (!adjustedForegroundColor.hasAccessibleContrast(backgroundColor, shape)) {\n    i += 1;\n    // This is a safety mechanism to prevent getting stuck in an infinite loop.\n    // If anyone exceeds 1,000 attempts to find a contrasting color, just return the best option we have\n    // and log the colors where we couldn't generate sufficient contrast.\n    if (i > 1000) {\n      reportError('other', new Error(`Exceeded ${i} attempts to find contrasting color`), {\n        key: 'adjust-color-for-proper-contrast',\n        foregroundColor: foregroundColor.toHexWithHash(),\n        backgroundColor: backgroundColor.toHexWithHash(),\n      });\n      return adjustedForegroundColor.toHexWithHash();\n    }\n    const adjustedForegroundColorLuminance = adjustedForegroundColor.getRelativeLuminance();\n    // If the adjusted foreground color is white or black and the required contrast ratio is more than 3:1,\n    // we should just return the adjusted foreground color.\n    // Otherwise, if the adjusted foreground color is white or black,\n    // reset the adjusted foreground color to the original foreground color and try looking\n    // in the opposite direction for a properly contrasting color.\n    if (\n      i > 1 &&\n      (adjustedForegroundColorLuminance === 1 || adjustedForegroundColorLuminance === 0)\n    ) {\n      if (colorContrastRatiosByShape[shape] > 3) {\n        return getContrast('#fff', backgroundColor.toHexWithHash()) >\n          getContrast('#000', backgroundColor.toHexWithHash())\n          ? '#fff'\n          : '#000';\n      }\n      shouldForegroundColorBeLighter = !shouldForegroundColorBeLighter;\n      adjustedForegroundColor = new Color(foregroundColor);\n    }\n\n    if (shouldForegroundColorBeLighter) {\n      adjustedForegroundColor.lighten(1);\n    } else {\n      adjustedForegroundColor.darken(1);\n    }\n\n    /* eslint-enable @typescript-eslint/no-magic-numbers */\n  }\n  return adjustedForegroundColor.toHexWithHash();\n};\n\n/**\n * Takes an array of values, either strings or Color objects, then\n *   - inserts black and white values in case we need these for our contrast-fetching functions using palettes\n *   - filters any duplicate values\n *   - sorts the palette from darkest to lightest color value by its relative luminance\n *\n * @param colors - an array of Color objects or strings representing hex values\n * @returns Color[]\n */\nexport const generateColorPalette = (colors: Color[] | string[]): Color[] => {\n  const formattedColors = colors.map((color) => new Color(color));\n  // Make sure we have black and white colors available in case they're needed for sufficient contrast\n  const uniqueColors = [new Color('#ffffff'), new Color('#000000'), ...formattedColors].reduce<\n    Color[]\n  >((acc, currentColor) => {\n    if (acc.find((colorObj) => colorObj.toHex() === currentColor.toHex())) {\n      return acc;\n    }\n    acc.push(currentColor);\n    return acc;\n  }, []);\n\n  return uniqueColors.sort(\n    (colorOne, colorTwo) => colorOne.getRelativeLuminance() - colorTwo.getRelativeLuminance(),\n  );\n};\n\n/**\n * Given a set of colors, a background color, and any colors from the set that we want to exclude from consideration,\n * this utility returns an appropriate foreground color based on the contrast ratio required for the shape param.\n *\n * For example, this method could be used to determine that we should use white text against a black background and vice versa.\n *\n * @param colors - an array of Color objects or strings representing hex values\n * @param backgroundColor - a Color object or hex string\n * @param [colorsToExclude] - optional,  an array of Color objects or strings representing hex values\n * @param [shape] - optional, used to determine the appropriate contrast ratio used in calculating the foreground color\n * @returns\n */\nexport const getBestColorForShape = (\n  colors: Color[] | string[],\n  backgroundColor: Color | string,\n  colorsToExclude: Color[] | string[] = [],\n  shape: keyof typeof colorContrastRatiosByShape = 'paragraphText',\n): string => {\n  const colorPalette = generateColorPalette(colors);\n\n  const backgroundColorObj = new Color(backgroundColor);\n\n  // Always exclude the background color in addition to the colorsToExclude\n  let formattedExcludedColors = colorsToExclude.map((color: Color | string) => new Color(color));\n  formattedExcludedColors.push(new Color(backgroundColor));\n\n  // If one of the excluded colors is black or white, don't exclude it.\n  // We always need black and white as potential text color options.\n  formattedExcludedColors = formattedExcludedColors.filter(\n    (color) => color.toHex() !== '000000' && color.toHex() !== 'FFFFFF',\n  );\n\n  const stringifiedExcludedColors = formattedExcludedColors.map((formattedColor) =>\n    formattedColor.toHex(),\n  );\n\n  const availableColors = colorPalette.filter((color) => {\n    return !stringifiedExcludedColors.includes(color.toHex());\n  });\n\n  // If the background color is light, sort the available colors from lightest to darkest\n  if (!backgroundColorObj.isDark(true)) {\n    availableColors.reverse();\n  }\n\n  const textColor = availableColors.find((color) => {\n    return color.getContrastRatio(backgroundColor) >= colorContrastRatiosByShape[shape];\n  });\n\n  if (!textColor) {\n    return backgroundColorObj.isDark(true) ? '#ffffff' : '#000000';\n  }\n\n  return textColor.toHexWithHash();\n};\n\nexport const getHexWithoutHash = (hex?: string): string => {\n  if (!isNonEmptyString(hex)) {\n    return '';\n  }\n\n  if (hex.startsWith('#')) {\n    return hex.substring(1);\n  }\n\n  return hex;\n};\n\nexport const getVideoPlayerIconColor = (\n  _playerColor: Color | string,\n  shouldUseAccessibleIconColor: boolean,\n  isGradientEnabled: boolean,\n): string => {\n  const playerColor = new Color(_playerColor);\n  const { searchParams } = new URL(window.location.toString());\n  const hasQueryParamOverride = Boolean(searchParams.get('useAccessiblePlayerIconColor') ?? false);\n\n  if (isGradientEnabled || (!hasQueryParamOverride && !shouldUseAccessibleIconColor)) {\n    return '#ffffff';\n  }\n\n  if (new Color('#fff').getContrastRatio(playerColor) >= colorContrastRatiosByShape.nonText) {\n    return '#ffffff';\n  }\n\n  return adjustColorForProperContrast(_playerColor, _playerColor, 'nonText');\n};\n\nexport const getAudioPlayerIconColor = (\n  _playerColor: Color | string,\n  shouldUseAccessibleIconColor: boolean,\n  isGradientEnabled: boolean,\n): string => {\n  const playerColor = new Color(_playerColor);\n  const { searchParams } = new URL(window.location.toString());\n  const hasQueryParamOverride = Boolean(searchParams.get('useAccessiblePlayerIconColor') ?? false);\n\n  if (isGradientEnabled || (!hasQueryParamOverride && !shouldUseAccessibleIconColor)) {\n    return '#ffffff';\n  }\n\n  if (new Color('#fff').getContrastRatio(playerColor) >= colorContrastRatiosByShape.paragraphText) {\n    return '#ffffff';\n  }\n\n  return adjustColorForProperContrast(_playerColor, _playerColor, 'nonText');\n};\n","import { assign } from 'utilities/assign.js';\nimport { pageLoaded } from 'utilities/pageLoaded.js';\nimport { isVisitorTrackingEnabled } from 'utilities/trackingConsentApi.js';\nimport { metricsHost } from './hosts.js';\nimport { Wistia } from '../wistia_namespace.ts';\n\nif (Wistia._simpleMetricsCache == null) {\n  Wistia._simpleMetricsCache = {};\n}\n\nif (Wistia._simpleMetricsDebounceInterval == null) {\n  Wistia._simpleMetricsDebounceInterval = 500;\n}\n\nconst METRICS_CACHE = Wistia._simpleMetricsCache;\n\nexport const countMetric = (key, val = 1, extraData = {}) => {\n  return sendMetric('count', key, val, extraData);\n};\n\nexport const sendMetrics = (...messages) => {\n  if (!isVisitorTrackingEnabled()) {\n    return;\n  }\n  const url = `https://${metricsHost()}/mput?topic=metrics`;\n  return fetch(url, {\n    method: 'POST',\n    mode: 'cors',\n    headers: {\n      'Content-Type': 'application/x-www-form-urlencoded',\n    },\n    body: messages.join('\\n'),\n  })\n    .then((response) => {\n      if (!response.ok) {\n        // If fetch returns a response with an HTTP error code,\n        // print an error in the console\n        console.error(response);\n      }\n    })\n    .catch((reason) => {\n      // If fetch fails (such as when this URL is blocked by an ad blocking extension),\n      // print an error in the console\n      console.error(reason);\n    });\n};\n\nexport const sampleMetric = (key, val, extraData) => {\n  return sendMetric('sample', key, val, extraData);\n};\n\nconst getCircularReplacer = () => {\n  // form a closure and use this\n  // weakset to monitor object reference.\n  const seen = new WeakSet();\n\n  // return the replacer function\n  return (key, value) => {\n    if (typeof value === 'object' && value !== null) {\n      if (seen.has(value)) {\n        return '[Circular]';\n      }\n      seen.add(value);\n    }\n    return value;\n  };\n};\n\nexport const sendMetric = (type, key, val, extraData = {}) => {\n  if (!isVisitorTrackingEnabled()) {\n    return;\n  }\n  try {\n    if (METRICS_CACHE.toMput == null) {\n      METRICS_CACHE.toMput = [];\n    }\n\n    const messageObj = assign(\n      {\n        type,\n        key,\n        value: val != null ? val : null,\n      },\n      extraData,\n    );\n\n    const serialized = JSON.stringify(messageObj, getCircularReplacer());\n    METRICS_CACHE.toMput.push(serialized);\n\n    clearTimeout(Wistia._msendTimeout);\n    Wistia._msendTimeout = setTimeout(() => {\n      pageLoaded(() => {\n        sendMetrics.apply(this, METRICS_CACHE.toMput);\n        METRICS_CACHE.toMput = [];\n      });\n    }, Wistia._simpleMetricsDebounceInterval);\n  } catch (e) {\n    console.error(e.message);\n    console.error(e.stack);\n  }\n};\n\n// only used in testing to clear the cache\nexport const _clearMetricsCache = () => {\n  METRICS_CACHE.toMput = [];\n};\n","import { Wistia } from '../wistia_namespace.ts';\n\nexport const seqId = (prefix = 'wistia_', suffix = '') => {\n  const currentVal = Wistia._sequenceVal || 1;\n  const result = `${prefix}${currentVal}${suffix}`;\n  Wistia._sequenceVal = currentVal + 1;\n  return result;\n};\n","import { TAGGED_VERSION } from './hosts.js';\n// fire and forget.\n// run a script and immediately remove it from the DOM.\nexport const runScript = (src, timeout) => {\n  const taggedVersion = TAGGED_VERSION;\n  return new Promise((resolve, reject) => {\n    if (timeout == null) {\n      timeout = 8000;\n    }\n    let s;\n\n    s = document.createElement('script');\n    s.src = src;\n    s.async = true;\n    s.type = 'text/javascript';\n\n    if (\n      /https?:\\/\\/fast\\.wistia\\./.test(s.src) &&\n      taggedVersion !== '' &&\n      taggedVersion.length > 0\n    ) {\n      s.src = `${s.src}@${taggedVersion}`;\n    }\n\n    let cleanupTimeoutId = null;\n    let done = false;\n\n    const cleanUp = () => {\n      s.onerror = s.onreadystatechange = s.onload = null;\n      clearTimeout(cleanupTimeoutId);\n      clearTimeout(loadingTimeout);\n      cleanupTimeoutId = setTimeout(() => {\n        if (s && s.parentNode) {\n          s.parentNode.removeChild(s);\n        }\n      }, 500);\n    };\n\n    const onSuccess = () => {\n      const state = s.readyState;\n      if (!done && (!state || /loaded|complete/.test(state))) {\n        done = true;\n        // We call success on next tick to separate script evaluation time from\n        // callback execution time. This helps reduce thread-blocking since\n        // script-eval and initialization tend to be expensive.\n        setTimeout(() => {\n          resolve();\n          cleanUp();\n        }, 1);\n      }\n    };\n\n    const onTimeout = () => {\n      done = true;\n      cleanUp();\n      reject(new Error('timeout'));\n    };\n\n    const onError = (e) => {\n      done = true;\n      cleanUp();\n      reject(e);\n    };\n\n    const loadingTimeout = setTimeout(onTimeout, timeout);\n    s.onerror = onError;\n    s.onreadystatechange = onSuccess;\n    s.onload = onSuccess;\n\n    (document.body || document.head).appendChild(s);\n  });\n};\n","import { toSeconds, parse } from 'iso8601-duration';\nimport { isNil, isNumber } from '@wistia/type-guards';\n\ntype DurationData = {\n  hours: number;\n  minutes: number;\n  seconds: number;\n};\n\nconst SECONDS_IN_HOUR = 3600;\nconst MINUTES_IN_HOUR = 60;\nconst SECONDS_IN_MINUTE = 60;\n\nconst padNumber = (num: number, length = 0): string => {\n  let result = `${num}`;\n  while (result.length < length) {\n    result = `0${result}`;\n  }\n  return result;\n};\n\nexport const secondsConverter = (total: number, format: string): DurationData => {\n  let hours = 0;\n  let minutes = 0;\n  let seconds = 0;\n\n  let remainingDuration = total;\n\n  const useHours = format.includes('h');\n  const useMinutes = format.includes('m');\n\n  if (useHours && remainingDuration > 0) {\n    hours += Math.floor(remainingDuration / SECONDS_IN_HOUR);\n    remainingDuration %= SECONDS_IN_HOUR;\n  }\n\n  if (useMinutes && remainingDuration > 0) {\n    minutes += Math.floor(remainingDuration / MINUTES_IN_HOUR);\n    remainingDuration %= MINUTES_IN_HOUR;\n  }\n\n  seconds = Math.round(remainingDuration);\n\n  if (useHours && minutes === MINUTES_IN_HOUR) {\n    hours += 1;\n    minutes = 0;\n  }\n\n  if (useMinutes && seconds === SECONDS_IN_MINUTE) {\n    minutes += 1;\n    seconds = 0;\n  }\n\n  return {\n    hours,\n    minutes,\n    seconds,\n  };\n};\n\n// flexibleDuration is a duration format that uses as\n// few digits as possible to express that duration\nexport const flexibleDuration = (total: number): string => {\n  const { hours, minutes, seconds } = secondsConverter(total, 'hms');\n\n  if (hours === 0) {\n    return `${minutes}:${padNumber(seconds, 2)}`;\n  }\n  return `${hours}:${padNumber(minutes, 2)}:${padNumber(seconds, 2)}`;\n};\n\nexport const formattedDurationToSeconds = (dur: string): number | string => {\n  if (isNil(dur) || isNumber(dur)) {\n    return dur;\n  }\n\n  try {\n    const parsed = parse(dur.toUpperCase());\n    return toSeconds(parsed);\n  } catch {\n    /* empty, we want to swallow and continue */\n  }\n\n  // We allow for non-standard IS0 6801 Duration strings, eg. 1H30M,\n  // the parsing lib can do that if prefixed with the correct ISO Duration prefixes\n  try {\n    const parsed = parse(`PT${dur.toUpperCase()}`);\n    return toSeconds(parsed);\n  } catch {\n    /* empty, we want to swallow and continue */\n  }\n\n  return dur;\n};\n\nexport const accessibilityDuration = (duration: number): string => {\n  const { hours, minutes, seconds } = secondsConverter(duration, 'hms');\n  const zeroHours = hours === 0;\n  const zeroMinutes = minutes === 0;\n  if (zeroHours && zeroMinutes) {\n    return `${seconds} second${seconds === 1 ? '' : 's'}`;\n  }\n\n  const hoursText = zeroHours ? '' : `${hours} hour${hours === 1 ? '' : 's'}`;\n  const minText = zeroMinutes ? '' : `${minutes} minute${hours === 1 ? '' : 's'}`;\n\n  return `${hoursText} ${minText}`.trim();\n};\n\nexport const humanReadableDuration = (duration: number): string => {\n  const { hours, minutes, seconds } = secondsConverter(duration, 'hms');\n  const zeroHours = hours === 0;\n  const zeroMinutes = minutes === 0;\n  if (zeroHours && zeroMinutes) return `${seconds} Sec`;\n\n  const hoursText = zeroHours ? '' : `${hours} Hr`;\n  const minText = zeroMinutes ? '' : `${minutes} Min`;\n  return `${hoursText} ${minText}`.trim();\n};\n\nexport const getSecondsRemaining = (start: Date, end: Date): number => {\n  const remaining = end.getTime() - start.getTime();\n  return remaining / 1000;\n};\n\nexport const secondsToMilliseconds = (seconds: number): number => seconds * 1000;\n","export const CONTROL_BAR_HEIGHT = 34;\n\n// eslint-disable-next-line @typescript-eslint/no-magic-numbers\nexport const DEFAULT_ASPECT = 16 / 9;\n","import { poll } from 'utilities/poll.js';\nimport { throttle } from 'utilities/throttle.js';\nimport { unescapeHtml } from 'utilities/unescape-html.js';\nimport { Wistia } from '../wistia_namespace.ts';\n\nexport { poll, throttle, unescapeHtml };\n\n// replace spaces in text with &nbsp; this prevents the line from wrapping.\n// specifically, it allows menu items in the vulcan ui to push their parent div\n// open as wide as the text.\nexport const unbreakifyText = (text = '') => {\n  return text.replace(' ', '&nbsp;');\n};\n\nexport const stripHtml = (htmlStr) => {\n  const tmp = document.createElement('div');\n  tmp.innerHTML = htmlStr;\n  return tmp.textContent || tmp.innerText || '';\n};\n\nexport const camelCase = (snakeStr) => {\n  return snakeStr.replace(/[_-]([a-z])/g, (g) => {\n    return g.charAt(1).toUpperCase();\n  });\n};\n\nexport const snakeCase = (camelStr) => {\n  return camelStr.replace(/[A-Z]/g, (g) => {\n    return `_${g.toLowerCase()}`;\n  });\n};\n\n// Not safe IE8 and below.\nexport const shallowCamelizeKeys = (o) => {\n  return Object.keys(o).reduce((memo, key) => {\n    memo[camelCase(key)] = o[key];\n    return memo;\n  }, {});\n};\n\n// Not safe IE8 and below.\nexport const shallowSnakeKeys = (o) => {\n  return Object.keys(o).reduce((memo, key) => {\n    memo[snakeCase(key)] = o[key];\n    return memo;\n  }, {});\n};\n\n// the implementations of base64Decode and base64Encode here are adapted from\n// https://stackoverflow.com/a/30106551/529530, and designed to safely handle\n// multibyte characters\n\nexport const base64Decode = (input) => {\n  return decodeURIComponent(\n    atob(input)\n      .split('')\n      .map((c) => {\n        return `%${`00${c.charCodeAt(0).toString(16)}`.slice(-2)}`;\n      })\n      .join(''),\n  );\n};\n\nexport const base64Encode = (input) => {\n  return btoa(\n    encodeURIComponent(input).replace(/%([0-9A-F]{2})/g, (match, p1) => {\n      return String.fromCharCode(`0x${p1}`);\n    }),\n  );\n};\n\nexport const notSetOrTrue = (val) => {\n  return val == null || val === true;\n};\n\n// prevent scrolling outside a container\n// topMargin and bottomMargin are optional and can be used to provide a cushion to adjust to determine\n// if you are at the top. We have seen some weird behavior with some uses where the scrollTop maxes out\n// at scrollHeight - offsetHeight - 1.  Possible subpixel rendering issue???\nexport const preventOuterMouseWheel = (e, container, topMargin = 0, bottomMargin = 0) => {\n  const { scrollTop, scrollHeight, offsetHeight } = container;\n  const hitTop = (extra = 0) => {\n    return scrollTop + extra - topMargin <= 0;\n  };\n  const hitBottom = (extra = 0) => {\n    return scrollTop + extra + bottomMargin >= scrollHeight - offsetHeight;\n  };\n\n  const delta = e.deltaY || -e.wheelDelta;\n  const dir = delta > 0 ? 'down' : 'up';\n  const isModernBrowser = !!e.deltaY;\n  if (isModernBrowser) {\n    if ((dir === 'up' && hitTop()) || (dir === 'down' && hitBottom())) {\n      e.preventDefault();\n    }\n  } else {\n    // IE scrolls 47.5 pixels each scroll but reports 120\n    const extra = (47.5 * delta) / 120;\n    if (dir === 'up' && hitTop(extra)) {\n      e.preventDefault();\n      // Manually set scroll to avoid scrolling parent in IE 11\n      container.scrollTop = 0;\n    } else if (dir === 'down' && hitBottom(extra)) {\n      e.preventDefault();\n      container.scrollTop = scrollHeight - offsetHeight;\n    }\n  }\n};\n\n// parent.frames.length should tell us how many iframes exist on the parent\n// page. However, if the user has overwritten the accessor with something\n// that's not safe for CORS (i.e. they changed it at all), then\n// parent.frames.length throws an exception and screws up the embedding\n// process. This function just gives a safe way of getting the value, or\n// defaulting to something unknown.\nexport const parentFramesLength = function () {\n  try {\n    return parent.frames.length;\n  } catch (e) {\n    Wistia.warn(e);\n    return 1;\n  }\n};\n","import { Wistia } from 'wistia_namespace.ts';\nimport { root } from 'utilities/root.js';\nimport { merge } from 'utilities/obj.js';\nimport { removeScriptsBySrc } from 'utilities/script-utils.js';\nimport {\n  cacheMediaData,\n  uncacheMediaData,\n  getMediaDataFromCache,\n} from 'utilities/remote-data-cache.ts';\nimport {\n  eV1Protocol,\n  cdnFastWistiaComHost,\n  cdnFastWistiaNetHost,\n  mediaDataHost,\n} from 'utilities/hosts.js';\nimport { mediaDataTransforms } from 'utilities/media-data-transforms.js';\n\nexport const transformResponse = (mediaData, options) => {\n  const mediaWithOpts = { ...mediaData };\n  const transformOpts = merge({}, mediaWithOpts.media?.embedOptions, options);\n\n  if (mediaWithOpts.error) {\n    return mediaWithOpts;\n  }\n\n  delete mediaWithOpts.media.unnamed_assets;\n  mediaDataTransforms(mediaWithOpts.media, transformOpts);\n  return mediaWithOpts.media;\n};\n\nexport const mediaDataUrl = (hashedId, options = {}) => {\n  const host = mediaDataHost(options);\n  return `${eV1Protocol()}//${host}/embed/medias/${hashedId}.json`;\n};\n\nexport const mediaDataScriptRegExp = (hashedId) => {\n  const protocolMatch = location.protocol === 'https:' ? 'https' : 'https?';\n  return new RegExp(\n    `^(${protocolMatch}:)?//((${cdnFastWistiaComHost().replace(\n      '.',\n      '\\\\.',\n    )})|(${cdnFastWistiaNetHost().replace('.', '\\\\.')}))/embed/medias/${hashedId}\\\\.jsonp\\\\??`,\n  );\n};\n\nexport const cacheMedia = (hashedId, data) => {\n  return cacheMediaData(hashedId, data);\n};\n\nexport const uncacheMedia = (hashedId) => {\n  uncacheMediaData(hashedId);\n  Wistia.uncacheCaptions?.(hashedId);\n  removeSpeedDemonScriptAndData(hashedId);\n};\n\nconst removeSpeedDemonScriptAndData = (hashedId) => {\n  window[`wistiajsonp-/embed/medias/${hashedId}.json`] = null;\n  removeScriptsBySrc(mediaDataUrl(hashedId), {\n    scriptRegex: mediaDataScriptRegExp(hashedId),\n  });\n};\n\nexport const mediaFromCache = (hashedId) => {\n  return dataFromCache(hashedId);\n};\n\nconst dataFromCache = (hashedId) => {\n  const resultFromFetchCache = getMediaDataFromCache(hashedId);\n  if (resultFromFetchCache) {\n    return resultFromFetchCache;\n  }\n\n  const speedDemonData = root[`wistiajsonp-/embed/medias/${hashedId}.json`];\n  if (speedDemonData != null && speedDemonData.media) {\n    return speedDemonData.media;\n  }\n\n  return null;\n};\n","import type { CSSProperties, SVGAttributes } from 'preact';\n\ntype Props = {\n  ariaHidden?: boolean;\n  fillColor?: string;\n  height: number;\n  styleOverride?: CSSProperties;\n  width: number;\n};\nexport const standardSvgAttrs = ({\n  width = 40,\n  height = 34,\n  styleOverride = {},\n  ariaHidden = false,\n  fillColor = '#ffffff',\n}: Props): Pick<\n  SVGAttributes,\n  'aria-hidden' | 'enable-background' | 'style' | 'viewBox' | 'x' | 'y'\n> => {\n  return {\n    x: '0px',\n    y: '0px',\n    viewBox: `0 0 ${width} ${height}`,\n    'enable-background': `new 0 0 ${width} ${height}`,\n    'aria-hidden': `${!!ariaHidden}`,\n    style: {\n      fill: fillColor,\n      height: '100%',\n      left: 0,\n      strokeWidth: 0,\n      top: 0,\n      width: '100%',\n      // eslint-disable-next-line @typescript-eslint/no-misused-spread\n      ...styleOverride,\n    },\n  };\n};\n","import {\n  clipsFromChapters,\n  shouldAddKeyMoments,\n  shouldAddClipsFromChapters,\n  seekToAction,\n} from 'utilities/keyMoments.ts';\nimport { cast, clone } from 'utilities/obj.js';\nimport { cdnFastWistiaNetHost } from 'utilities/hosts.js';\nimport {\n  stillUrl,\n  findClosestAssetByQuality,\n  readyPublicMp3s,\n  readyPublicMp4s,\n} from 'utilities/assets.js';\nimport { Url } from 'utilities/url.js';\nimport { secondsToIso8601Duration } from './iso8601Helper.ts';\nimport { normalizeChapters } from './normalizeChapters.ts';\n\nconst generateAudioJsonLd = (mediaData, options = {}) => {\n  const { videoWidth, videoHeight } = options;\n  let { embedOptions } = options;\n\n  if (!embedOptions) {\n    embedOptions = cast(clone(mediaData.embedOptions));\n  }\n\n  const obj = {\n    '@context': 'http://schema.org/',\n    '@id': `https://${cdnFastWistiaNetHost()}/embed/iframe/${mediaData.hashedId}`,\n    '@type': 'AudioObject',\n    duration: `PT${secondsToIso8601Duration(mediaData.duration)}`,\n    name: mediaData.name,\n    thumbnailUrl: stillUrl(mediaData.assets, {\n      ext: 'jpg',\n      protocol: 'https:',\n      videoWidth,\n      videoHeight,\n      embedHost: embedOptions?.embedHost,\n    }),\n    contentUrl: generateContentUrl(mediaData),\n    embedUrl: generateEmbedUrl(mediaData, embedOptions),\n    uploadDate: new Date(mediaData.createdAt * 1000).toISOString(),\n    description: mediaData.seoDescription,\n  };\n\n  // multilingual captions should come as array of transcript objects.\n  if (mediaData.captions && mediaData.captions[0]) {\n    obj.transcript = mediaData.captions[0].text;\n  }\n\n  return obj;\n};\n\nconst generateEmbedUrl = (mediaData, embedOptions) => {\n  const baseUrl = `https://${cdnFastWistiaNetHost()}/embed/iframe/${mediaData.hashedId}`;\n  // if we're doing SeekToAction for Google KeyMoments AND video thumbnail\n  // is enabled, we need to attach a query param so that it is disabled when\n  // Google tries to crawl it\n  if (\n    shouldAddKeyMoments(mediaData, embedOptions) &&\n    !shouldAddClipsFromChapters(embedOptions) &&\n    mediaData.embedOptions.plugin?.videoThumbnail\n  ) {\n    return `${baseUrl}?wseektoaction=true`;\n  }\n  return baseUrl;\n};\n\n// Google has been struggling with Key Moments using our normal iframe pages as the embedUrl\n// and have asked us to use a contentUrl with a direct m3u8 asset instead.\nconst generateContentUrl = (mediaData) => {\n  const { assets } = mediaData;\n  if (mediaData.mediaType === 'Audio') {\n    return readyPublicMp3s(assets)[0]?.url;\n  }\n\n  const availableMp4s = readyPublicMp4s(assets);\n  if (availableMp4s.length === 0) {\n    return;\n  }\n\n  const highestQuality = findClosestAssetByQuality(availableMp4s, 1080);\n  if (!highestQuality) {\n    return;\n  }\n  const url = new Url(highestQuality.url);\n\n  url.ext('m3u8');\n  return url.absolute();\n};\n\nconst generateVideoJsonLd = (mediaData, options = {}) => {\n  const { videoWidth, videoHeight } = options;\n  let { embedOptions } = options;\n\n  if (!embedOptions) {\n    embedOptions = cast(clone(mediaData.embedOptions)) ?? {};\n  }\n\n  const obj = {\n    '@context': 'http://schema.org/',\n    '@id': `https://${cdnFastWistiaNetHost()}/embed/iframe/${mediaData.hashedId}`,\n    '@type': 'VideoObject',\n    duration: `PT${secondsToIso8601Duration(mediaData.duration)}`,\n    name: mediaData.name,\n    thumbnailUrl: stillUrl(mediaData.assets, {\n      ext: 'jpg',\n      protocol: 'https:',\n      videoWidth,\n      videoHeight,\n      embedHost: embedOptions?.embedHost,\n    }),\n    embedUrl: generateEmbedUrl(mediaData, embedOptions),\n    uploadDate: new Date(mediaData.createdAt * 1000).toISOString(),\n    description: mediaData.seoDescription,\n  };\n\n  // LiveStream Medias should not get content urls as we might not have any video assets available\n  if (mediaData.mediaType === 'Video') {\n    obj.contentUrl = generateContentUrl(mediaData);\n  }\n\n  // multilingual captions should come as array of transcript objects. Like\n  // Scar in Lion King, we should Be Prepared!\n  if (mediaData.captions && mediaData.captions[0]) {\n    obj.transcript = mediaData.captions[0].text;\n  }\n\n  if (shouldAddKeyMoments(mediaData, embedOptions)) {\n    // keyMoments come in two flavors.\n    // A. If we have chapters, then we will manually define the key moments via the \"Clip\" schema property\n    // B. If we don't, we will use the \"SeekToAction\" property that lets google parse via `wtime`\n    if (shouldAddClipsFromChapters(embedOptions)) {\n      const chapters = normalizeChapters(embedOptions);\n      const chapterList = chapters.chapterList;\n      obj.hasPart = clipsFromChapters(chapterList, location.href, mediaData.duration);\n    } else {\n      obj.potentialAction = seekToAction();\n    }\n  }\n\n  return obj;\n};\n\nexport const injectJsonLd = (id, mediaData, options = {}) => {\n  let jsonLdObj;\n\n  if (mediaData.mediaType === 'Audio') {\n    jsonLdObj = generateAudioJsonLd(mediaData, options);\n  } else {\n    jsonLdObj = generateVideoJsonLd(mediaData, options);\n  }\n\n  const stringified = JSON.stringify(jsonLdObj);\n  const jsonLd = document.createElement('script');\n  jsonLd.className = 'w-json-ld';\n  jsonLd.type = 'application/ld+json';\n  jsonLd.innerHTML = stringified;\n  jsonLd._wistia = true;\n  jsonLd.setAttribute('id', id);\n  removeInjectedJsonLd(id);\n\n  const existingScripts = document.querySelectorAll('script.w-json-ld');\n  const existingScript = existingScripts[existingScripts.length - 1];\n  if (existingScript) {\n    // insert JSON-LD after last JSON-LD script we injected.\n    existingScript.parentNode.insertBefore(jsonLd, existingScript.nextSibling);\n  } else {\n    // prepend JSON-LD to head if we don't see any others yet\n    document.head.insertBefore(jsonLd, document.head.childNodes[0]);\n  }\n};\n\nexport const removeInjectedJsonLd = (id) => {\n  if (!id) {\n    return;\n  }\n\n  const el = document.getElementById(id);\n  if (!el) {\n    return;\n  }\n\n  el.remove();\n};\n","const unescapedCache = {};\n\nexport const unescapeHtml = (encodedHtmlStr, options = {}) => {\n  if (!encodedHtmlStr) {\n    return '';\n  }\n\n  if (options.cache) {\n    const cachedVal = unescapedCache[encodedHtmlStr];\n    if (unescapedCache[encodedHtmlStr]) {\n      return cachedVal;\n    }\n  }\n\n  const e = document.createElement('div');\n  e.innerHTML = encodedHtmlStr.toString().replace(/</g, '&lt;').replace(/>/g, '&gt;');\n  let result;\n  if (e.childNodes.length > 0) {\n    result = e.childNodes[0].nodeValue;\n  } else {\n    result = '';\n  }\n\n  if (options.cache) {\n    unescapedCache[encodedHtmlStr] = result;\n  }\n\n  return result;\n};\n","import { isNil, isNonEmptyRecord, isNonEmptyString } from '@wistia/type-guards';\nimport { isVisitorTrackingEnabled } from './trackingConsentApi.js';\nimport { Wistia } from '../wistia_namespace.ts';\nimport { appHostname } from '../appHostname.js';\nimport { CURRENT_SHA, TAGGED_VERSION } from './hosts.js';\n\nexport type SentryProductType =\n  | 'carousel'\n  | 'channel'\n  | 'form'\n  | 'globalListener'\n  | 'mediaPlayback'\n  | 'other'\n  | 'player'\n  | 'playlist'\n  | 'transcript';\n\nconst getSampleRatesByProductType = (productType: SentryProductType) => {\n  // These errors don't seem terribly useful for us, and it's not clear they are actionable.\n  // Let's set a low sample rate for them.\n  if (productType === 'mediaPlayback') {\n    // eslint-disable-next-line @typescript-eslint/no-magic-numbers\n    return 0.001;\n  }\n\n  return 1;\n};\n\nconst IS_DEV_ENV = process.env.NODE_ENV === 'development';\nconst IS_TEST_ENV = process.env.NODE_ENV === 'test';\n\nconst configureSentry = () => {\n  if (\n    isNil(window.Sentry) ||\n    isNil(window.Sentry.BrowserClient) ||\n    isNil(window.Sentry.makeFetchTransport) ||\n    isNil(window.Sentry.defaultStackParser) ||\n    isNil(window.Sentry.Scope)\n  ) {\n    return;\n  }\n\n  /**\n   * Since the webpages our code is embedded in might have their own Sentry instances defined,\n   * we cannot use Sentry.init();\n   *\n   * Instead, we can follow the example provided by Sentry (https://docs.sentry.io/platforms/javascript/best-practices/shared-environments/)\n   * and create our own client that we use to report errors. This will prevent any Wistia exceptions\n   * from being logged in customer Sentry instances, and it should also help prevent our Sentry instance\n   * from picking up exceptions in customer code.\n   */\n  const client = new window.Sentry.BrowserClient({\n    dsn: 'https://a3591ba5e949a37083cc6f5a4191e903@o4505518331658240.ingest.us.sentry.io/4505794284290048',\n    transport: window.Sentry.makeFetchTransport,\n    stackParser: window.Sentry.defaultStackParser,\n    integrations: [],\n    release: isNonEmptyString(TAGGED_VERSION) ? TAGGED_VERSION : CURRENT_SHA,\n  });\n  const scope = new window.Sentry.Scope();\n  scope.setClient(client);\n  scope.setTags({\n    pillar: 'publish',\n  });\n\n  Wistia._sentryScope = scope;\n  client.init(); // initializing has to be done after setting the client on the scope\n\n  Wistia.isSentryInitialized = true;\n\n  // eslint-disable-next-line @typescript-eslint/no-use-before-define\n  listenForGlobalErrors();\n  // eslint-disable-next-line @typescript-eslint/no-use-before-define\n  listenForGlobalUnhandledRejections();\n};\n\nexport const initializeSentry = (): void => {\n  if (isVisitorTrackingEnabled() !== true) {\n    return;\n  }\n\n  if (!window.Sentry || !Wistia.isSentryInitialized) {\n    const sentryLoader = document.createElement('script');\n    /**\n     * Using the Sentry loader script means Sentry will init a second time after\n     * our own call to init inside configureSentry(). The second init will include\n     * all the default Sentry integrations, which we do not want.\n     *\n     * Instead of using the loader script, we can load the bundle directly\n     * and configure the client when the script loads. This allows us to maintain\n     * our own Sentry client without worrying about it colliding with customer instances of Sentry.\n     *\n     */\n    sentryLoader.src = 'https://browser.sentry-cdn.com/9.6.1/bundle.min.js';\n    sentryLoader.crossOrigin = 'anonymous';\n    sentryLoader.integrity =\n      'sha384-kbRmCeIl7Uxr+vT9YhSAdguCdd4L5QPRj7jzQTanorUVVlw/Y5X9vtzVyOEHLfpH';\n    sentryLoader.onload = () => configureSentry();\n    document.head.appendChild(sentryLoader);\n  }\n};\n\nexport const reportError = (\n  product: SentryProductType,\n  error: Error,\n  details?: Record<string, string>,\n): void => {\n  try {\n    if (!Wistia.isSentryInitialized) {\n      return;\n    }\n\n    const sampleRate = getSampleRatesByProductType(product);\n\n    if (IS_DEV_ENV) {\n      console.error(error); // eslint-disable-line no-console\n      return;\n    }\n    if (IS_TEST_ENV) {\n      // Do nothing\n      return;\n    }\n\n    let shouldSendToSentry = false;\n\n    const cryptoObj = isNil(window.crypto) ? window.msCrypto : window.crypto;\n    if (cryptoObj !== undefined) {\n      const cryptoRandom = cryptoObj.getRandomValues(new Uint32Array(1));\n      // eslint-disable-next-line @typescript-eslint/no-magic-numbers\n      shouldSendToSentry = cryptoRandom[0] / (0xffffffff + 1) < sampleRate;\n    } else {\n      const mathRandom = Math.random();\n      shouldSendToSentry = mathRandom < sampleRate;\n    }\n\n    if (!shouldSendToSentry) {\n      // If we shouldn't send to Sentry, just print to the console\n      console.error(error); // eslint-disable-line no-console\n      // trackingConsentApi is not yet converted to TS\n      // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n    } else if (isVisitorTrackingEnabled()) {\n      // The Sentry docs indicate that we can pass context in a few different ways (https://docs.sentry.io/platforms/javascript/enriching-events/context/#passing-context-directly)\n      // Those examples do not actually seem to work.\n      // Instead, we will clear out the scope each time we report a new exception and manually re-create it.\n      Wistia._sentryScope.clear();\n      Wistia._sentryScope.setTag('pillar', 'publish');\n      Wistia._sentryScope.setTag('product', product);\n      Wistia._sentryScope.setTag('url', window.location.href);\n      if (isNonEmptyRecord(details)) {\n        Wistia._sentryScope.setTags(details);\n      }\n      Wistia._sentryScope.captureException(error);\n    }\n  } catch (err) {\n    // We don't want any problems with our error logging to break other things,\n    // so we'll just print this to the console.\n    console.error(err); // eslint-disable-line no-console\n  }\n};\n\nconst globalErrorHandler = (event: ErrorEvent) => {\n  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n  const eventError = event.error;\n  if (!(eventError instanceof Error)) {\n    return;\n  }\n  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access\n  const eventErrorSource: string = event.error?.source ?? '';\n  const fastHostName = appHostname('fast');\n  // Filter out any global errors that didn't originate from Wistia code\n  if (eventErrorSource.includes(fastHostName)) {\n    reportError('globalListener', eventError);\n  }\n};\n\nconst globalUnhandledRejectionHandler = (event: PromiseRejectionEvent) => {\n  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n  const eventReason = event.reason;\n  if (!(eventReason instanceof Error)) {\n    return;\n  }\n\n  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access\n  const eventReasonStack: string = event.reason?.stack ?? '';\n  // Filter out any unhandled rejections that didn't originate from Wistia code\n  if (eventReasonStack.includes(appHostname('fast'))) {\n    reportError('globalListener', eventReason);\n  }\n};\n\nexport const listenForGlobalErrors = (): void => {\n  if (!Wistia._isListeningForGlobalErrors) {\n    window.addEventListener('error', globalErrorHandler);\n    Wistia._isListeningForGlobalErrors = true;\n  }\n};\n\nexport const listenForGlobalUnhandledRejections = (): void => {\n  if (!Wistia._isListeningForGlobalUnhandledRejections) {\n    window.addEventListener('unhandledrejection', globalUnhandledRejectionHandler);\n    Wistia._isListeningForGlobalUnhandledRejections = true;\n  }\n};\n","import { cast, clone, getDeep, isArray, setAndPreserveUndefined, eachLeaf } from 'utilities/obj.js';\nimport { wlog } from 'utilities/wlog.js';\n\nexport const proto = (url = location.href) => {\n  if (/^http:\\/\\//.test(url)) {\n    return 'http:';\n  }\n\n  return 'https:';\n};\n\n// decompose the raw query params into a JSON object\n// root[level1][level2][level3] to deep set\n// param[a]=1&param[a]=2 to create an array\nexport const queryParamsToObject = (raw) => {\n  // get each key/val pair separated by &\n  const result = {};\n  if (!raw) {\n    return result;\n  }\n\n  const parts = raw.split('&');\n  for (let i = 0; i < parts.length; i++) {\n    let part = parts[i];\n\n    // break up key/vals\n    let pair = part.split('=');\n    let key = pair[0];\n    let val = pair[1];\n    try {\n      key = debrack(decodeURIComponent(key)) || '';\n    } catch (e) {\n      // log on a timeout so that wlog has a chance to set its level from page\n      // url.\n      setTimeout(() => {\n        wlog.notice(e);\n      }, 50);\n      key = '';\n    }\n\n    // deep cast each piece of the key (e.g. \"foo.1\" yields [\"foo\", 1])\n    cast(key);\n\n    // if the key already exists in params\n    const existing = getDeep(result, key);\n    if (existing != null) {\n      // make this value an array of same-name params\n      if (isArray(existing)) {\n        existing.push(urlComponentToObject(val));\n      } else {\n        const arr = [existing];\n        arr.push(urlComponentToObject(val));\n        setAndPreserveUndefined(result, key, arr);\n      }\n    } else {\n      // otherwise save key/val\n      setAndPreserveUndefined(result, key, urlComponentToObject(val));\n    }\n  }\n\n  // return the json object\n  return result;\n};\n\n// Any val that starts with json:slashslash should have its data\n// parsed as JSON.\nexport const urlComponentToObject = (val) => {\n  if (val == null) {\n    return val;\n  }\n\n  let result;\n  try {\n    result = decodeURIComponent(val);\n  } catch (e) {\n    // log on a timeout so that wlog has a chance to set its level from page\n    // url.\n    setTimeout(() => {\n      wlog.notice(e);\n    }, 50);\n    result = val;\n  }\n  return result;\n};\n\nexport const objectToQueryParams = (obj) => {\n  const result = [];\n  eachLeaf(obj, (leafVal, path) => {\n    if (leafVal != null) {\n      result.push(`${encodeURIComponent(brack(path))}=${encodeURIComponent(leafVal)}`);\n    } else {\n      result.push(encodeURIComponent(brack(path)));\n    }\n  });\n  return result.join('&');\n};\n\nexport const splitPath = (str) => {\n  const result = [];\n  if (str == null) {\n    return result;\n  }\n  const parts = str.split(/\\/+/);\n  for (let i = 0; i < parts.length; i++) {\n    let part = parts[i];\n    if (part != null && part !== '') {\n      result.push(part);\n    }\n  }\n  return result;\n};\n\n// `path` can be a string or an array of strings.\nexport const joinPath = (path) => {\n  if (typeof path === 'string') {\n    path = path.split('/');\n  }\n  if (path == null) {\n    return '';\n  }\n  return `/${path.join('/')}`;\n};\n\n// convert array [abc, def, ghi] to bracketed format \"abc[def][ghi]\"\nexport const brack = (path) => {\n  let result = path[0];\n  for (let i = 1; i < path.length; i++) {\n    result += `[${path[i]}]`;\n  }\n  return result;\n};\n\n// convert \"abc[def][ghi][jkl]\" to array [abc, def, ghi, jkl]\nexport const debrack = (str) => {\n  return str.match(/([\\w\\-_]+)/g);\n};\n\n/// /\n// An object to represent an URL, and to make it easy to\n// get/set various properties and parameters of the URL.\n/// /\nconst URL_CONSTRUCTOR_KEYS = ['protocol', 'host', 'port', 'params', 'path'];\nexport const Url = function (url) {\n  const self = this;\n\n  // if an url is supplied, parse. if it's an object, explicitly\n  // set options. otherwise, just assume we're building an url\n  // from scratch.\n  const construct = function () {\n    self.params = {};\n    self.path = [];\n    self.host = '';\n    if (typeof url === 'object') {\n      self.fromOptions(url);\n    } else if (url) {\n      self.fromRaw(url);\n    }\n  };\n\n  construct();\n};\n\nconst uproto = Url.prototype;\n\nuproto.fromOptions = function (options) {\n  for (let i = 0; i < URL_CONSTRUCTOR_KEYS.length; i++) {\n    let opt = URL_CONSTRUCTOR_KEYS[i];\n    if (options[opt] != null) {\n      this[opt] = options[opt];\n    }\n  }\n  return this;\n};\n\n// parse the url and save the info\nuproto.fromRaw = function (raw) {\n  this.rawUrl = raw;\n\n  let match;\n\n  // protocol\n  match = raw.match(/^((?:https?:)|(?:file:)|(?:ftp:))?\\/\\//);\n  if (match) {\n    this.protocol = match[1] || undefined;\n  }\n\n  // host\n  match = raw.match(/\\/\\/([^:?#/]*)/);\n  if (match) {\n    this.host = match[1] || undefined;\n  }\n\n  // path\n  match = raw.match(/\\/\\/.*?(\\/[^?#$]+)/) || raw.match(/(^\\/[^/][^?#$]+)/);\n  if (match) {\n    this.setPath(match[1]);\n  }\n\n  // port\n  match = raw.match(/:(\\d+)/);\n  if (match) {\n    this.port = parseInt(match[1], 10);\n  }\n\n  // url parameters\n  match = raw.match(/\\?([^#]+)/);\n  if (match) {\n    this.rawParams = match[1];\n    this.params = queryParamsToObject(this.rawParams);\n  }\n\n  // anchor\n  match = raw.match(/#(.*)$/);\n  if (match) {\n    this.anchor = match[1];\n  }\n\n  return this;\n};\n\nuproto.clone = function () {\n  return new Url({\n    protocol: this.protocol,\n    host: this.host,\n    port: this.port,\n    path: clone(this.path),\n    params: clone(this.params),\n    anchor: this.anchor,\n  });\n};\n\nuproto.ext = function (ext) {\n  if (ext != null) {\n    const current = this.ext();\n    const i = this.path.length - 1;\n    const regexp = new RegExp(`\\\\.${current}`, 'g');\n    if (current) {\n      this.path[i] = `${this.path[i].replace(regexp, '')}`;\n    }\n    return (this.path[i] = `${this.path[i]}.${ext}`);\n  }\n  const match = this.path[this.path.length - 1].match(/\\.(.*)$/);\n  return (match != null && match[1]) || null;\n};\n\n// accept loc for testing purposes\nuproto.isRelative = function (loc = window.location) {\n  const proto = this.protocol;\n  const host = this.host;\n  return (\n    (proto == null || proto === '' || proto === loc.protocol) && (!host || host === loc.hostname)\n  );\n};\n\nuproto.toString = function () {\n  if (this.isRelative()) {\n    return this.relative();\n  }\n  return this.absolute();\n};\n\n// print this url object as a simple string\n// choose sane defaults if parts aren't specified\nuproto.absolute = function () {\n  let protocolPart = '';\n  if (this.protocol != null) {\n    protocolPart = this.protocol;\n  }\n  let portPart = '';\n  if (this.port != null) {\n    portPart = `:${this.port}`;\n  }\n  return `${protocolPart}//${this.host || location.host}${portPart}${this.relative()}`;\n};\n\nuproto.relative = function () {\n  let pathPart = '';\n  if (this.path.length > 0) {\n    pathPart = joinPath(this.path);\n    if (this._hasTrailingSlash) {\n      pathPart += '/';\n    }\n  }\n  let paramPart = `?${objectToQueryParams(this.params)}`;\n  if (paramPart.length === 1) {\n    paramPart = '';\n  }\n  return `${pathPart}${paramPart}${this.relativeAnchor()}`;\n};\n\nuproto.authority = function () {\n  const portPart = this.port != null ? `:${this.port}` : '';\n  return `${this.host}${portPart}`;\n};\n\nuproto.relativeProtocol = function () {\n  let portPart = '';\n  if (this.port != null) {\n    portPart = `:${this.port}`;\n  }\n  return `//${this.host}${portPart}${this.relative()}`;\n};\n\nuproto.relativeAnchor = function () {\n  let anchorPart = '';\n  if (this.anchor != null) {\n    anchorPart = `#${this.anchor}`;\n  }\n  return `${anchorPart}`;\n};\n\nuproto.setPath = function (rawPath) {\n  this.rawPath = rawPath;\n  this._hasTrailingSlash = /\\/$/.test(this.rawPath);\n  this.path = splitPath(this.rawPath);\n};\n\n// create some aliases in Url to create/parse URLs\nUrl.create = (options) => {\n  return new Url(options);\n};\n\nexport const createUrl = Url.create;\nUrl.parse = (str) => {\n  return new Url(str);\n};\nexport const parseUrl = Url.parse;\n","import { MUTE_CHANGE_EVENT } from './eventConstants.ts';\nimport type { MUTE_CHANGE_EVENT_TYPE } from '../types/events.ts';\n\ntype EventCallback = (detail?: unknown) => void;\n\ntype StoredCallbacks = {\n  eventListenerCallback: EventCallback;\n  givenCallback: unknown;\n};\n\n// some legacy events are converted to a different name when they are added to the event listener\nexport const convertedEventNames: Record<string, string> = {\n  mutechange: MUTE_CHANGE_EVENT,\n};\n\n// some legacy events have a different detail structure than the new ones\n// this is a mapping of the old detail structure to the new one\nconst callbackDetailsConversions: Record<string, ((detail: unknown) => unknown) | undefined> = {\n  mutechange: (detail: MUTE_CHANGE_EVENT_TYPE['detail']) => {\n    return detail.isMuted;\n  },\n};\n\nexport class EventShepherd {\n  private readonly convertedEventsMap: Record<string, StoredCallbacks[] | undefined> = {};\n\n  public addListener(eventName: string, element: HTMLElement, callback: EventCallback): void {\n    // if the event name is not in the convertedEventNames map, use the event name as is\n    // this accounts for legacy events that do not have kebab-case names\n    const normalizedEventName = convertedEventNames[eventName] ?? eventName;\n\n    // if the event name is not in the convertedEventsMap, initialize an empty array\n    this.convertedEventsMap[normalizedEventName] ??= [];\n\n    const eventListenerCallback = (customEvent: CustomEvent) => {\n      // if the callbackDetailsConversions map has a conversion function for the event name, use it.\n      // for example, the mute-change event has a detail of { isMuted: boolean }, but the legacy event just passes a boolean\n      if (callbackDetailsConversions[eventName]) {\n        const convertedDetail = callbackDetailsConversions[eventName](customEvent.detail);\n        callback(convertedDetail);\n      } else {\n        callback();\n      }\n    };\n\n    // we have to store the callback and the event listener callback separately because:\n    // 1. to properly remove the event listener, we need to have a reference to the event listener callback\n    // 2. we need to match against the given callback to remove the correct listener\n    this.convertedEventsMap[normalizedEventName].push({\n      givenCallback: callback,\n      eventListenerCallback,\n    });\n\n    // add the event listener to the element\n    element.addEventListener(normalizedEventName, eventListenerCallback);\n  }\n\n  public removeAllListeners(element: HTMLElement): void {\n    Object.keys(this.convertedEventsMap).forEach((eventName) => {\n      this.convertedEventsMap[eventName]?.forEach((storedCallbacks: StoredCallbacks) => {\n        element.removeEventListener(eventName, storedCallbacks.eventListenerCallback);\n      });\n\n      this.convertedEventsMap[eventName] = [];\n    });\n  }\n\n  public removeListener(eventName: string, element: HTMLElement, callback?: EventCallback): void {\n    const normalizedEventName = convertedEventNames[eventName] ?? eventName;\n    const indexesToRemove: number[] = [];\n    if (callback) {\n      element.removeEventListener(normalizedEventName, callback);\n\n      if (this.convertedEventsMap[normalizedEventName]) {\n        this.convertedEventsMap[normalizedEventName].forEach((storedCallbacks, index) => {\n          if (storedCallbacks.givenCallback === callback) {\n            indexesToRemove.push(index);\n            element.removeEventListener(normalizedEventName, storedCallbacks.eventListenerCallback);\n          }\n        });\n\n        // remove the bindings entirely\n        indexesToRemove.forEach((index: number) => {\n          if (this.convertedEventsMap[normalizedEventName]) {\n            this.convertedEventsMap[normalizedEventName].splice(index, 1);\n          }\n        });\n      }\n    } else {\n      this.convertedEventsMap[normalizedEventName] = [];\n    }\n  }\n}\n","import { ComponentChildren, createContext, h, JSX } from 'preact';\nimport { useContext } from 'preact/hooks';\nimport type { MediaData } from '../../../types/player-api-types.ts';\nimport type { EmbedOptions } from '../../../types/EmbedOptions.ts';\n\ntype PlayerDataContextType = {\n  embedOptions: EmbedOptions;\n  mediaData: MediaData;\n};\n\nconst PlayerDataContext = createContext<PlayerDataContextType | null>(null);\n\nexport const PlayerDataProvider = ({\n  children,\n  embedOptions,\n  mediaData,\n}: {\n  children: ComponentChildren;\n  embedOptions: EmbedOptions;\n  mediaData: MediaData;\n}): JSX.Element | null => {\n  return (\n    <PlayerDataContext.Provider\n      value={{\n        embedOptions,\n        mediaData,\n      }}\n    >\n      {children}\n    </PlayerDataContext.Provider>\n  );\n};\n\nexport const usePlayerData = (): PlayerDataContextType => {\n  const context = useContext(PlayerDataContext);\n  if (context == null) {\n    throw new Error('usePlayerData must be used within a PlayerDataProvider');\n  }\n  return context;\n};\n","export const AFTER_REPLACE_EVENT = 'after-replace';\n\nexport const API_READY_EVENT = 'api-ready';\n\nexport const BEFORE_REPLACE_EVENT = 'before-replace';\n\nexport const BETWEENTIMES_EVENT_EV1 = 'betweentimes';\n\nexport const CROSSTIME_EVENT_EV1 = 'crosstime';\n\nexport const EMBED_OPTIONS_CHANGED_EVENT = 'embed-options-changed';\n\nexport const IMPL_CREATED_EVENT = 'impl-created';\n\nexport const INIT_EMBED_EVENT = 'initembed';\n\nexport const INPUT_CONTEXT_CHANGE_EVENT = 'input-context-change';\n\nexport const INTERNAL_API_ON_FIND_EVENT = 'internal-api-on-find';\n\nexport const LOADED_MEDIA_DATA_EVENT = 'loaded-media-data';\n\nexport const MUTE_CHANGE_EVENT = 'mute-change';\n\nexport const TIME_UPDATE_EVENT = 'time-update';\n","import { Wistia } from '../wistia_namespace.ts';\n\n/*\n * This module is designed as a simpler version of our old localStorage\n * utility.  To reduce potential bundle size, it doesn't make use of Obj\n * utilities or wlog, and doesn't return early based on browser detection.\n *\n * To avoid multiple tab bugs, it does not try to do any kind of commit\n * debouncing. Every call to `set` involves JSON.serialize() and every call to\n * `get` involves JSON.parse(). Therefore, if you are performing many\n * operations, you should cache an intermediate value. The\n * updateLocalStorage function is also provided for doing many updates\n * with a single parse and serialize call.\n *\n * If you are working with localStorage on something that requires lots of\n * updates, you should use a separate namespace. That way there is less to\n * deserialize and serialize on each read and write.\n */\n\nconst throwAsync = (e) => {\n  setTimeout(() => {\n    throw e;\n  }, 0);\n};\n\nconst OBJ_PROP = '_namespacedLocalStorage';\n\nconst localStorageWorks = (ns = 'wistia-test-localstorage') => {\n  if (Wistia._localStorageWorks != null) {\n    return Wistia._localStorageWorks;\n  }\n  try {\n    // no-ops that test get, set, and remove. These may throw an exception\n    // in Private Browsing mode on iOS and Safari.\n    const currentVal = localStorage.getItem(ns);\n    localStorage.removeItem(ns);\n    localStorage.setItem(ns, currentVal);\n    localStorage.removeItem(ns);\n    Wistia._localStorageWorks = true;\n  } catch (e) {\n    Wistia._localStorageWorks = false;\n  }\n  return Wistia._localStorageWorks;\n};\n\n// Gets our memory store, which we use in parallel with localStorage in case\n// localStorage is disabled. In some browsers and situations, disabled\n// localStorage will throw exceptions.\nconst getMemory = () => {\n  if (Wistia[OBJ_PROP] == null) {\n    Wistia[OBJ_PROP] = {};\n  }\n  return Wistia[OBJ_PROP];\n};\n\nexport const getLocalStorage = (ns) => {\n  if (!localStorageWorks()) {\n    return getMemory()[ns] || {};\n  }\n\n  if (localStorage[ns]) {\n    try {\n      if (localStorage[ns] === 'null') {\n        // \"null\" is valid JSON, and JSON.parse(\"null\") will return null, which\n        // isn't usable for our purposes at all.\n        return {};\n      }\n      return JSON.parse(localStorage[ns]);\n    } catch (e) {\n      throwAsync(e);\n    }\n  }\n  return {};\n};\n\nexport const removeLocalStorage = (ns) => {\n  if (!localStorageWorks()) {\n    getMemory()[ns] = {};\n    return;\n  }\n\n  try {\n    localStorage.removeItem(ns);\n  } catch (e) {\n    throwAsync(e);\n  }\n};\n\nexport const setLocalStorage = (ns, obj) => {\n  if (!localStorageWorks()) {\n    if (obj != null && typeof obj === 'object') {\n      getMemory()[ns] = obj;\n    }\n    return obj;\n  }\n\n  try {\n    // We set Wistia._localStorage for compatibility with the old localStorage util,\n    // which would otherwise overwrite any changes we make. :0\n    getMemory()[ns] = obj;\n\n    localStorage[ns] = JSON.stringify(obj);\n  } catch (e) {\n    throwAsync(e);\n\n    // TODO: We might want some strategy of dealing with QuotaExceededError\n    // exceptions. Ideally we'd be really smart about pruning, but our other\n    // options are (a) just don't update localStorage (that's what we're\n    // doing now), or (b) clobber our localStorage to see if that helps.\n  }\n  return obj;\n};\n\nexport const updateLocalStorage = (ns, fn) => {\n  const obj = getLocalStorage(ns);\n\n  // fn() may throw an exception. we catch and report because we don't want\n  // an exception after modifying in-place localStorage to get our local store\n  // out of sync.\n  try {\n    fn(obj);\n  } catch (e) {\n    throwAsync(e);\n  }\n  return setLocalStorage(ns, obj);\n};\n","import { isNotNil } from '@wistia/type-guards';\nimport { Wistia } from '../wistia_namespace.ts';\nimport { mediaDataHost } from './hosts.js';\nimport { mediaDataTransforms } from './media-data-transforms.js';\nimport { cacheMediaData, getMediaDataFromCache } from './remote-data-cache.ts';\nimport type {\n  MediaDataServerResponse,\n  MediaDataServerErrorResponse,\n  MediaData,\n  Localization,\n} from '../types/player-api-types.ts';\nimport { isMediaDataError } from './mediaDataError.ts';\nimport type { PluginConfigs } from '../types/plugins.ts';\nimport { getPreferredAvailableLanguageIndex } from '../embeds/wistiaPlayer/utilities/getPreferredLanguageIndex.ts';\nimport { getViewerPreferences } from './viewerPreferences.js';\n\nexport type FetchMediaDataOptions = {\n  bypassOriginShield?: boolean;\n  channelId?: number | null;\n  channelPassword?: string | null;\n  defaultMediaLanguage?: string;\n  deferFetchingToCarousel?: boolean;\n  embedHost?: string;\n  overrideMediaLanguage?: string;\n  password?: string | null;\n  plugin?: PluginConfigs;\n  skipCache?: boolean;\n};\n\nconst fetchUnlocalizedMediaData = async (\n  hashedId: string,\n  options: FetchMediaDataOptions = {},\n): Promise<MediaData | MediaDataServerErrorResponse> => {\n  const cacheKey = hashedId;\n\n  const mediaDataFromCache = getMediaDataFromCache(cacheKey);\n  if (mediaDataFromCache && options.skipCache !== true) {\n    return Promise.resolve(mediaDataFromCache);\n  }\n\n  if (isNotNil(Wistia._mediaDataPromises[cacheKey]) && options.skipCache !== true) {\n    return Wistia._mediaDataPromises[cacheKey];\n  }\n\n  const host = mediaDataHost(options) as string;\n  const url = new window.URL(`https://${host}/embed/medias/${hashedId}.json`);\n\n  if (isNotNil(options.channelId)) {\n    url.searchParams.set('channelId', options.channelId.toString());\n  }\n\n  const channelPasswordParam =\n    options.channelPassword ?? options.plugin?.passwordProtectedChannel?.password;\n  if (isNotNil(channelPasswordParam)) {\n    url.searchParams.set('channelPassword', channelPasswordParam);\n  }\n\n  if (isNotNil(options.password)) {\n    url.searchParams.set('password', options.password);\n  }\n\n  if (options.deferFetchingToCarousel) {\n    url.searchParams.set('defer_fetching_to_carousel', 'true');\n  }\n\n  // See: https://www.fastly.com/documentation/guides/concepts/edge-state/cache/purging/#shielding\n  if (options.bypassOriginShield) {\n    url.searchParams.set('bos', '1');\n  }\n\n  const promise = fetch(url.href)\n    .then((resp) => resp.json() as MediaDataServerResponse)\n    .then((response: MediaDataServerResponse): MediaData | MediaDataServerErrorResponse => {\n      if (isMediaDataError(response)) {\n        return response;\n      }\n      const { media: mediaData } = response as { media: MediaData };\n\n      mediaDataTransforms(mediaData, options);\n      cacheMediaData(mediaData.hashedId ?? '', mediaData);\n\n      return mediaData;\n    })\n    .finally(() => {\n      Reflect.deleteProperty(Wistia._mediaDataPromises, cacheKey);\n    });\n\n  Wistia._mediaDataPromises[cacheKey] = promise;\n\n  return promise;\n};\n\nexport const fetchMediaData = async (\n  hashedId: string,\n  options: FetchMediaDataOptions = {},\n): Promise<MediaData | MediaDataServerErrorResponse> => {\n  const mediaDataOrError = await fetchUnlocalizedMediaData(hashedId, options);\n  if (isMediaDataError(mediaDataOrError)) {\n    return mediaDataOrError as MediaDataServerErrorResponse;\n  }\n\n  const mediaData = mediaDataOrError as MediaData;\n\n  if (mediaData.localizations == null || mediaData.localizations.length === 0) {\n    return mediaData;\n  }\n\n  const typedViewerPreferences = getViewerPreferences() as Record<string, unknown>;\n  const localizationViewerPreferences = typedViewerPreferences.localization as\n    | Partial<Localization>\n    | undefined;\n\n  // The order is meaningful here. Languages earlier in the array take priority\n  // over those later in the array.\n  const preferredLanguages: string[] = [];\n  if (options.overrideMediaLanguage != null) {\n    preferredLanguages.push(options.overrideMediaLanguage);\n  }\n  if (localizationViewerPreferences?.iso6392LanguageCode != null) {\n    preferredLanguages.push(localizationViewerPreferences.iso6392LanguageCode);\n  }\n  if (options.defaultMediaLanguage != null) {\n    preferredLanguages.push(options.defaultMediaLanguage);\n  }\n\n  // Remove duplicates, keeping the first occurrence\n  const uniquePreferredLanguages = preferredLanguages.filter(\n    (lang, index) => preferredLanguages.indexOf(lang) === index,\n  );\n\n  // First look for exact iso639-2 language code matches\n  let preferredLanguageIndex = getPreferredAvailableLanguageIndex(\n    mediaData.localizations.map((loc) => loc.iso6392LanguageCode),\n    uniquePreferredLanguages,\n  );\n\n  // If none found, look for exact ietfLanguageTag matches\n  if (preferredLanguageIndex === -1) {\n    preferredLanguageIndex = getPreferredAvailableLanguageIndex(\n      mediaData.localizations.map((loc) => loc.ietfLanguageTag),\n      uniquePreferredLanguages,\n    );\n  }\n\n  // If still no match, default to the browser language preferences\n  if (preferredLanguageIndex === -1) {\n    preferredLanguageIndex = getPreferredAvailableLanguageIndex(\n      mediaData.localizations.map((loc) => loc.iso6392LanguageCode),\n      // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n      [...(navigator.languages ?? ['en'])],\n    );\n  }\n\n  if (preferredLanguageIndex >= 0) {\n    const preferredLocalization = mediaData.localizations[preferredLanguageIndex];\n\n    if (mediaData.hashedId === preferredLocalization.hashedId) {\n      return mediaData;\n    }\n\n    return fetchUnlocalizedMediaData(preferredLocalization.hashedId, {\n      ...options,\n    });\n  }\n\n  return mediaData;\n};\n","import type { EmbedOptions } from '../types/EmbedOptions.ts';\n\nconst BIG_PLAY_BUTTON_RADIUS_RATIO = 0.75;\nexport const CONTROL_BAR_DISTANCE_RATIO = 0.75;\n\nconst FLOATING_CONTROL_BAR_RADIUS = 18;\nconst FLOATING_CONTROL_BAR_DISTANCE = 6;\n\n/*\n\nRounded Player\n\nThese four methods determine the defaults for rounding the player.\n\n- {roundedPlayer} - if it is the _only_ option, it is used as the base upon which all the other border radiuses are derived.\n- {playerBorderRadius} - Determines the border radius of the thumbnail and outer parts of the player.\n- {bigPlayButtonBorderRadius} - Border radius of the big play button.\n- {controlBarBorderRadius} - Border radius of the control bar.\n- {controlBarDistance} - Distance the control bar is from the edges of the player - also how far control bar dialogs are from the control bar.\n- {floatingControlBar} - Boolean that can used to just create a floating control bar with border radius - no configuration.\n\n*/\n\n/**\n * Takes rounded player embed options and returns the calculated player border radius.\n * @param {EmbedOptions} embedOptions\n * @returns {number}\n */\nexport const getDefaultPlayerBorderRadius = ({\n  playerBorderRadius,\n  roundedPlayer,\n}: EmbedOptions): number => {\n  if (roundedPlayer !== undefined) {\n    return roundedPlayer;\n  }\n  if (playerBorderRadius !== undefined) {\n    return playerBorderRadius;\n  }\n  return 0;\n};\n\n/**\n * Takes rounded player embed options and returns the calculated big play button border radius.\n * @param {EmbedOptions} embedOptions\n * @returns {number}\n */\nexport const getDefaultBigPlayButtonBorderRadius = ({\n  bigPlayButtonBorderRadius,\n  roundedPlayer,\n}: EmbedOptions): number => {\n  if (bigPlayButtonBorderRadius !== undefined) {\n    return bigPlayButtonBorderRadius;\n  }\n  if (roundedPlayer !== undefined) {\n    return roundedPlayer * BIG_PLAY_BUTTON_RADIUS_RATIO;\n  }\n\n  return 0;\n};\n\n/**\n * Takes rounded player embed options and returns the calculated control bar border radius.\n * @param {EmbedOptions} embedOptions\n * @returns {number}\n */\nexport const getDefaultControlBarBorderRadius = ({\n  controlBarBorderRadius,\n  floatingControlBar,\n  roundedPlayer,\n}: EmbedOptions): number => {\n  if (controlBarBorderRadius !== undefined) {\n    return controlBarBorderRadius;\n  }\n  if (roundedPlayer !== undefined) {\n    return roundedPlayer * CONTROL_BAR_DISTANCE_RATIO;\n  }\n  if (floatingControlBar === true) {\n    return FLOATING_CONTROL_BAR_RADIUS;\n  }\n\n  return 0;\n};\n\n/**\n * Takes rounded player embed options and returns the calculated control bar distance.\n * @param {EmbedOptions} embedOptions\n * @returns {number}\n */\nexport const getDefaultControlBarDistance = ({\n  controlBarBorderRadius,\n  floatingControlBar,\n  roundedPlayer,\n}: EmbedOptions): number => {\n  if (roundedPlayer !== undefined) {\n    return roundedPlayer / 4;\n  }\n  if (controlBarBorderRadius !== undefined) {\n    return controlBarBorderRadius / 2;\n  }\n  if (floatingControlBar === true) {\n    return FLOATING_CONTROL_BAR_DISTANCE;\n  }\n\n  return 0;\n};\n","import { assign } from 'utilities/obj.js';\nimport { h, render, Component } from 'preact';\nimport { eV1Protocol, eV1Host } from 'utilities/hosts.js';\nimport { Thumbnail } from './Thumbnail.jsx';\n\nexport class ProgressiveThumbnail extends Component {\n  constructor(props) {\n    super(props);\n    this.state = {\n      normalThumbOpacity: props.isVisible ? 1 : 0,\n    };\n    this.onDisplay = props.onDisplay;\n  }\n\n  componentWillReceiveProps(nextProps) {\n    if (!this.onDisplay && nextProps.onDisplay) {\n      this.onDisplay = nextProps.onDisplay;\n    }\n  }\n\n  render() {\n    if (this.props.isVisible) {\n      this._hasRenderedVisible = true;\n    }\n\n    const sharedProps = {\n      backgroundColor: this.props.backgroundColor,\n      fitStrategy: this.props.fitStrategy,\n      isVisible: this.props.isVisible,\n      stillSnap: this.props.stillSnap,\n      stretchLimit: this.props.stretchLimit,\n      videoHeight: this.props.videoHeight,\n      videoWidth: this.props.videoWidth,\n      thumbnailAltText: this.props.thumbnailAltText,\n      playerBorderRadius: this.props.playerBorderRadius,\n    };\n    const swatchProps = assign({}, sharedProps, {\n      ariaHidden: true,\n      images: [\n        {\n          url: `${eV1Protocol()}//${eV1Host()}/embed/medias/${this.props.hashedId}/swatch`,\n        },\n      ],\n    });\n    const normalThumbProps = assign({}, sharedProps, {\n      onDisplay: this.onDisplayNormalThumb,\n      images: this.props.images,\n    });\n    return (\n      <div ref={this.props.elemRef}>\n        {this.props.swatchEnabled && this._hasRenderedVisible ? (\n          <Thumbnail {...swatchProps} wrapperStyle={this.swatchWrapperStyle()} />\n        ) : null}\n        {this._hasRenderedVisible ? (\n          <Thumbnail {...normalThumbProps} wrapperStyle={this.normalThumbWrapperStyle()} />\n        ) : null}\n      </div>\n    );\n  }\n\n  componentDidMount() {\n    setTimeout(this.afterTwoSeconds, 2000);\n  }\n\n  normalThumbWrapperStyle() {\n    const transition =\n      this.props.swatchEnabled && this.props.uiHasRendered && this.state.normalThumbOpacity === 1\n        ? 'opacity 3s'\n        : '';\n    return {\n      height: '100%',\n      left: 0,\n      opacity: this.state.normalThumbOpacity,\n      position: this.props.fitStrategy === 'naturalHeight' ? 'relative' : 'absolute',\n      top: 0,\n      transition,\n      width: '100%',\n    };\n  }\n\n  swatchWrapperStyle() {\n    return {\n      filter: 'blur(5px)',\n      height: '100%',\n      left: 0,\n      position: this.props.fitStrategy === 'naturalHeight' ? 'relative' : 'absolute',\n      top: 0,\n      width: '100%',\n    };\n  }\n\n  afterTwoSeconds = () => {\n    // If we've waited 2 seconds for the thumbnail to load but it still hasn't\n    // finished, then we guessed wrong about what the initial opacity should\n    // be. Set it back to 0 so we do a slow fade when it's done loading.\n    if (!this._displayed && this.state.normalThumbOpacity === 1) {\n      this.setState({ normalThumbOpacity: 0 });\n    }\n  };\n\n  onDisplayNormalThumb = () => {\n    this.setState({ normalThumbOpacity: 1 });\n\n    this._displayed = true;\n    if (this.onDisplay) {\n      this.onDisplay();\n    }\n  };\n}\n","import type { PublicApi } from '../types/player-api-types.ts';\nimport { cast, clone, isObject } from './obj.js';\nimport { wData, wRemoveData } from './wistiaData.js';\nimport { getOneApiHandle } from './getApiHandles.ts';\n\nexport const OPTION_PREFIX = 'wistia_embed_options_';\nexport const GLOBAL_ID_KEY = '__global__';\n\n/**\n * Get the embed options for a given key or embed id\n * @param {string} id - The key or embed id\n * @param {Function} [matcherFn=getOneApiHandle] - Custom matcher function\n * @returns {object}\n */\nexport const getEmbedOptionStore = (id: string, matcherFn = getOneApiHandle): object => {\n  // If options exist for the provided id, just return them\n  if (wData([OPTION_PREFIX, id]) !== undefined) {\n    return wData([OPTION_PREFIX, id]) as object;\n  }\n\n  // Otherwise, lets check this key's api handle\n  const apiHandleFromKey = matcherFn(id) as PublicApi | 'removed' | null;\n  if (apiHandleFromKey === null || apiHandleFromKey === 'removed') {\n    return {};\n  }\n  // And compare it against all the other stored api handles\n  if (wData(OPTION_PREFIX) !== undefined) {\n    // If the api handles match, return the options for that key\n    const matchedKey = Object.keys(wData(OPTION_PREFIX) as object).find(\n      (key) => matcherFn(key) === apiHandleFromKey,\n    );\n    if (wData([OPTION_PREFIX, matchedKey]) !== undefined) {\n      return wData([OPTION_PREFIX, matchedKey]) as object;\n    }\n  }\n  return {};\n};\n\n/**\n * Set the embed options for a given key or embed id\n * @param {string} id - The key or embed id\n * @param {object} options - The options to set\n * @returns {object}\n */\nexport const setEmbedOptionStore = (id: string, options: object | null): object => {\n  if (options !== null) {\n    return wData([OPTION_PREFIX, id], cast(clone(options))) as object;\n  }\n  return {};\n};\n\n/**\n * Remove the embed options for a given key or embed id\n * @param {string} id - The key or embed id\n * @param {object} options - The options to set\n * @returns {void}\n */\nexport const removeEmbedOptionStore = (id: string): void => {\n  wRemoveData([OPTION_PREFIX, id]);\n};\n\n/**\n * Legacy behavior replacement for Wistia.options - Get or set embed options based\n * on the parameters provided\n * @param {string | object} id - The id of the embed or an object of options\n * @param {object} options - The options to set\n * @returns {object}\n */\nexport const getOrSetEmbedOptionStore = (id?: object | string, options?: object | null): object => {\n  let optionsKey = id;\n  let embedOptions = options;\n\n  // Redundant \"typeof\" check is needed to make typescript happy\n  if (isObject(optionsKey) && typeof optionsKey === 'object') {\n    embedOptions = optionsKey;\n    optionsKey = GLOBAL_ID_KEY;\n  }\n\n  // Set options\n  if (embedOptions !== undefined && embedOptions !== null) {\n    return wData([OPTION_PREFIX, optionsKey], cast(clone(embedOptions))) as object;\n  }\n\n  // Get options\n  if (optionsKey !== undefined) {\n    // If options exist for the provided id, just return them\n    if (wData([OPTION_PREFIX, id]) !== undefined) {\n      return wData([OPTION_PREFIX, id]) as object;\n    }\n\n    // Otherwise, lets check this key's api handle\n    const apiHandleFromKey = getOneApiHandle(optionsKey as string) as PublicApi | 'removed' | null;\n    if (apiHandleFromKey === null || apiHandleFromKey === 'removed') {\n      return {};\n    }\n    // And compare it against all the other stored api handles\n    if (wData(OPTION_PREFIX) !== undefined) {\n      // If the api handles match, return the options for that key\n      const matchedKey = Object.keys(wData(OPTION_PREFIX) as object).find(\n        (key) => getOneApiHandle(key) === apiHandleFromKey,\n      );\n      if (wData([OPTION_PREFIX, matchedKey]) !== undefined) {\n        return wData([OPTION_PREFIX, matchedKey]) as object;\n      }\n    }\n    return {};\n  }\n  return wData(OPTION_PREFIX) as object;\n};\n","import { isNil } from '@wistia/type-guards';\nimport { CarouselData } from '../types/carousel.ts';\nimport { Wistia } from '../wistia_namespace.ts';\nimport { MediaData } from '../types/player-api-types.ts';\nimport { wlog } from './wlog.js';\nimport { LiveStreamEventData } from '../types/live-stream-event.ts';\n\nexport const getMediaDataFromCache = (hashedId: string): MediaData | null | undefined => {\n  const mediaData = Wistia._remoteData.get(`media_${hashedId}`);\n  if (isNil(mediaData)) return null;\n\n  // It's possible that we're caching a server error response as MediaData.\n  // If we find one of those places, log an error.\n  if (Object.hasOwn(mediaData, 'error')) {\n    wlog.error(\n      `Received cached error response instead of MediaData when retrieving cached mediaData for ${hashedId}`,\n    );\n  }\n\n  return mediaData as MediaData;\n};\n\nexport const cacheMediaData = (hashedId: string, data: MediaData): void => {\n  Wistia._remoteData.set(`media_${hashedId}`, data);\n};\n\nexport const uncacheMediaData = (hashedId: string): void => {\n  Wistia._remoteData.delete(`media_${hashedId}`);\n  Reflect.deleteProperty(Wistia._mediaDataPromises, hashedId);\n};\n\nexport const cacheLiveStreamEventData = (hashedId: string, data: LiveStreamEventData): void => {\n  Wistia._remoteData.set(`live_stream_event_${hashedId}`, data);\n};\n\nexport const uncacheLiveStreamEventData = (hashedId: string): void => {\n  Wistia._remoteData.delete(`live_stream_event_${hashedId}`);\n};\n\nexport const getLiveStreamEventDataFromCache = (\n  hashedId: string,\n): LiveStreamEventData | null | undefined => {\n  const liveStreamEventData = Wistia._remoteData.get(`live_stream_event_${hashedId}`);\n  if (isNil(liveStreamEventData)) return null;\n\n  // It's possible that we're caching a server error response as LiveStreamEventData.\n  // If we find one of those places, log an error.\n  if (Object.hasOwn(liveStreamEventData, 'error')) {\n    wlog.error(\n      `Received cached error response instead of LiveStreamEventData when retrieving cached liveStreamEventData for ${hashedId}`,\n    );\n    uncacheLiveStreamEventData(hashedId);\n  }\n\n  return liveStreamEventData as LiveStreamEventData;\n};\n\nexport const getCarouselDataFromCache = (hashedId: string): CarouselData | null | undefined => {\n  const carouselData = Wistia._remoteData.get(`carousel_${hashedId}`);\n  if (isNil(carouselData)) return null;\n\n  return carouselData as CarouselData;\n};\n\nexport const cacheCarouselData = (hashedId: string, data: CarouselData): void => {\n  Wistia._remoteData.set(`carousel_${hashedId}`, data);\n};\n\nexport const uncacheCarouselData = (hashedId: string): void => {\n  Wistia._remoteData.delete(`carousel_${hashedId}`);\n};\n","import { isNotNil } from '@wistia/type-guards';\nimport { normalizeChapters } from './normalizeChapters.ts';\nimport { Chapter, ChaptersPluginConfig } from '../types/plugins.ts';\nimport type { MediaData } from '../types/player-api-types.ts';\nimport type { EmbedOptions } from '../types/EmbedOptions.ts';\n\n// Google got mad that the default chapter title is (of course) not very\n// descriptive, and wanted us to make sure it's never used for Key Moments.\nconst DEFAULT_CHAPTER_TITLE = 'Chapter Title';\nconst MINIMUM_DURATION = 30;\n\nexport const shouldAddClipsFromChapters = (embedOptions: EmbedOptions): boolean => {\n  const chapters = normalizeChapters(embedOptions);\n  if (!chapters) {\n    return false;\n  }\n\n  const { chapterList } = chapters;\n\n  // the `on` property must be explicitly false to disable\n  return (\n    chapters.on !== false &&\n    chapters.on !== 'false' &&\n    Array.isArray(chapterList) &&\n    chapterList.length > 0\n  );\n};\n\n// keyMoments should only be limited by a few factors:\n// 1. a turnstile is blocking content\n// 2. it's password protected\n// 3. the video is really short\n// 4. only available for VOD, not Live\n// Then, there are two different _types_ of key moments. If we have chapters\n// we will use the Clips format to specifically tell google the timestamps we think\n// are important. Otherwise, we will use the SeekToAction field along with the wtime\n// param to allow Google to search through the video for key moments\nexport const shouldAddKeyMoments = (mediaData: MediaData, embedOptions: EmbedOptions): boolean => {\n  if (embedOptions.keyMoments === false) {\n    return false;\n  }\n\n  const { duration, type } = mediaData;\n  const { passwordProtectedVideo, 'requireEmail-v1': turnstilePlugin } = embedOptions.plugin ?? {};\n  const isLiveStream = type === 'LiveStream';\n\n  const passwordEnabled =\n    passwordProtectedVideo?.on === true || passwordProtectedVideo?.on === 'true';\n\n  const turnstileBlocksContent =\n    turnstilePlugin &&\n    turnstilePlugin.on !== false &&\n    turnstilePlugin.time !== 'end' &&\n    !turnstilePlugin.persistentTurnstile;\n\n  return Boolean(\n    !passwordEnabled &&\n      !turnstileBlocksContent &&\n      !isLiveStream &&\n      typeof duration === 'number' &&\n      duration >= MINIMUM_DURATION,\n  );\n};\n\nconst sortedFilteredChapters = (\n  chapterList: ChaptersPluginConfig['chapterList'],\n): ChaptersPluginConfig['chapterList'] => {\n  const chapterExistsAtTime = {};\n\n  return [...chapterList]\n    .sort((firstChapter: Chapter, secondChapter) => firstChapter.time - secondChapter.time)\n    .filter(({ time, title, deleted }) => {\n      if (Boolean(chapterExistsAtTime[time]) || deleted || title === DEFAULT_CHAPTER_TITLE) {\n        return false;\n      }\n      chapterExistsAtTime[time] = true;\n      return true;\n    });\n};\n\ntype Clips = {\n  '@type': string;\n  endOffset: number;\n  name: string;\n  startOffset: number;\n  url: string;\n}[];\n\nexport const clipsFromChapters = (\n  chapterList: ChaptersPluginConfig['chapterList'],\n  baseUrl: string,\n  mediaDuration: number,\n): Clips => {\n  if (!Array.isArray(chapterList) || chapterList.length === 0) {\n    return [];\n  }\n\n  const clips = sortedFilteredChapters(chapterList).map((chapter, index, chapters) => {\n    const { time, title } = chapter;\n    const url = new window.URL(baseUrl);\n    const floorTime = Math.floor(time);\n    const nextChapter = chapters[index + 1];\n    const endOffsetTime = isNotNil(nextChapter) ? nextChapter.time : mediaDuration;\n\n    // wtime does not support decimals\n    url.searchParams.set('wtime', `${floorTime}s`);\n\n    // https://schema.org/Clip\n    return {\n      '@type': 'Clip',\n      endOffset: Math.floor(endOffsetTime),\n      name: title,\n      startOffset: floorTime,\n      url: url.toString(),\n    };\n  });\n\n  return clips;\n};\n\ntype SeekToAction = {\n  '@type': string;\n  'startOffset-input': string;\n  target: string;\n};\n// https://developers.google.com/search/docs/advanced/structured-data/video#seek\nexport const seekToAction = (): SeekToAction => {\n  const url = new window.URL(window.location.href);\n  // if wtime is already on the url as query param, it will be overwritten here. This is only for the JSON+LD though.\n  url.searchParams.set('wtime', '{seek_to_second_number}');\n\n  return {\n    '@type': 'SeekToAction',\n    target: url.toString().replace('%7Bseek_to_second_number%7D', '{seek_to_second_number}'), // we need to replace the encoded uri with the direct string\n    'startOffset-input': 'required name=seek_to_second_number',\n  };\n};\n","import {\n  getWistiaLocalStorage,\n  removeWistiaLocalStorage,\n  updateWistiaLocalStorage,\n} from 'utilities/wistiaLocalStorage.js';\nimport { getDeep, setDeep, unsetDeep } from 'utilities/obj.js';\nimport { Wistia } from '../wistia_namespace.ts';\n\n/*\n * DEPRECATED: Use utilities/wistiaLocalStorage.js directly instead.\n *\n * This module has two failings.\n *\n * First, it must include utilities/obj for its deep setting and getting\n * functionality, which is a core part of its API. However, this convenience\n * does not merit the size of its inclusion; if we want to do deep setting and\n * getting, we can just compose with Obj.setDeep and Obj.getDeep at the import site.\n *\n * Second, in order to avoid lots of JSON.parse calls, it keeps a cache that\n * should mirror the contents of localStorage. However, because localStorage\n * data is shared across tabs with the same domain--and because we are never\n * syncing the actual localStorage values here--changes in multiple open tabs\n * will overwrite each other, causing general strangeness.\n */\n\nif (!Wistia._localStorage) {\n  Wistia._localStorage = getWistiaLocalStorage();\n}\n\nexport const uncache = () => {\n  Wistia._localStorage = {};\n};\n\nexport const setOrGet = (key, val, unset = false) => {\n  if (val != null) {\n    const fn = unset ? unsetDeep : setDeep;\n    Wistia._localStorage = updateWistiaLocalStorage((ls) => fn(ls, key, val));\n    return val;\n  }\n  if (key != null) {\n    return getDeep(Wistia._localStorage, key);\n  }\n  return Wistia._localStorage;\n};\n\nexport const removeLocalStorage = (key) => {\n  return setOrGet(key, 'nada', true);\n};\n\nexport const dumpLocalStorage = removeWistiaLocalStorage;\n","import { isArray, isEmpty } from 'utilities/obj.js';\nimport { Wistia } from '../wistia_namespace.ts';\n\nconst W = Wistia;\n\nif (Wistia._timeouts == null) {\n  Wistia._timeouts = {};\n}\n\n// Improved timeouts!\n// allows us to\n//   1. auto-debounce if an identical key is replaced\n//   2. associate timeouts with a specific context, but access them globally\n//   3. Clear all timeouts in a specific context\n//   4. Do nextTick by not specifying the time argument\n// e.g. Wistia.timeout(\"video1234\", function() { ... });\n//\n// In our implementation, we treat the first dot-delimited value in the key\n// as a namespace. This is an optimization since most of our videos prefix\n// their timeouts with a uuid. By keeping them in a namespace, it means\n// clearTimeouts doesn't need to iterate through _all_ timeouts globally,\n// which makes doTimeout itself faster (since it calls clearTimeouts internally).\n//\n// Returns the timeoutId.\nexport const doTimeout = (key, fn, time = 1) => {\n  if (isArray(key)) {\n    key = key.join('.');\n  }\n  const namespace = timeoutNamespace(key);\n  clearTimeouts(key, namespace);\n  if (fn) {\n    let timeouts = Wistia._timeouts[namespace];\n    if (timeouts == null) {\n      timeouts = Wistia._timeouts[namespace] = {};\n    }\n    let timeoutId = setTimeout(() => {\n      delete timeouts[key];\n      fn();\n    }, time);\n    timeouts[key] = timeoutId;\n    return timeoutId;\n  }\n  return Wistia._timeouts[namespace][key];\n};\n\n// This will clear timeouts matching the key. Key is dot-delimited list\n// like:\n//\n// mynamespace.more_specific.\n// mynamespace.anothernamespace.more_specific\n//\n// We allow passing in namespace as an optimization for doTimeout.\nexport const clearTimeouts = (key, namespace = null) => {\n  if (isArray(key)) {\n    key = key.join('.');\n  }\n  namespace = namespace || timeoutNamespace(key);\n\n  // If there's no namespacing on the input key, then we should treat the\n  // input as both a namespace _and_ a key. This handles the namespace case.\n  // We handle the key case with our normal logic.\n  let timeouts;\n  if (namespace === '__global__') {\n    timeouts = Wistia._timeouts[key];\n    if (timeouts) {\n      for (let k in timeouts) {\n        let v = timeouts[k];\n        clearTimeout(v);\n        delete timeouts[k];\n      }\n    }\n  }\n\n  timeouts = Wistia._timeouts[namespace];\n  if (timeouts) {\n    for (let k in timeouts) {\n      let v = timeouts[k];\n      if (\n        k.indexOf &&\n        k.indexOf(key) === 0 &&\n        (k.length === key.length || k.charAt(key.length) === '.')\n      ) {\n        clearTimeout(v);\n        delete timeouts[k];\n      }\n    }\n  }\n\n  // Cleaning out namespaces is not particularly efficient, and isn't\n  // particularly helpful, so let's only do it once every 5 seconds.\n  if (!Wistia.blockSweepTimeouts) {\n    Wistia.blockSweepTimeouts = true;\n    setTimeout(sweepTimeouts, 0);\n    setTimeout(() => {\n      Wistia.blockSweepTimeouts = false;\n    }, 5000);\n  }\n};\n\n// Clear out any namespaces that are no longer active\nconst sweepTimeouts = () => {\n  for (let namespace in Wistia._timeouts) {\n    let timeouts = Wistia._timeouts[namespace];\n    if (isEmpty(timeouts)) {\n      delete Wistia._timeouts[namespace];\n    }\n  }\n};\n\nconst timeoutNamespace = (key) => {\n  const dotIndex = key.indexOf('.');\n  if (dotIndex > 0) {\n    return key.substring(0, dotIndex);\n  }\n  return '__global__';\n};\n","import{options as n}from\"preact\";var t,r,u,i,o=0,f=[],c=n,e=c.__b,a=c.__r,v=c.diffed,l=c.__c,m=c.unmount,s=c.__;function p(n,t){c.__h&&c.__h(r,n,o||t),o=0;var u=r.__H||(r.__H={__:[],__h:[]});return n>=u.__.length&&u.__.push({}),u.__[n]}function d(n){return o=1,h(D,n)}function h(n,u,i){var o=p(t++,2);if(o.t=n,!o.__c&&(o.__=[i?i(u):D(void 0,u),function(n){var t=o.__N?o.__N[0]:o.__[0],r=o.t(t,n);t!==r&&(o.__N=[r,o.__[1]],o.__c.setState({}))}],o.__c=r,!r.__f)){var f=function(n,t,r){if(!o.__c.__H)return!0;var u=o.__c.__H.__.filter(function(n){return!!n.__c});if(u.every(function(n){return!n.__N}))return!c||c.call(this,n,t,r);var i=o.__c.props!==n;return u.forEach(function(n){if(n.__N){var t=n.__[0];n.__=n.__N,n.__N=void 0,t!==n.__[0]&&(i=!0)}}),c&&c.call(this,n,t,r)||i};r.__f=!0;var c=r.shouldComponentUpdate,e=r.componentWillUpdate;r.componentWillUpdate=function(n,t,r){if(this.__e){var u=c;c=void 0,f(n,t,r),c=u}e&&e.call(this,n,t,r)},r.shouldComponentUpdate=f}return o.__N||o.__}function y(n,u){var i=p(t++,3);!c.__s&&C(i.__H,u)&&(i.__=n,i.u=u,r.__H.__h.push(i))}function _(n,u){var i=p(t++,4);!c.__s&&C(i.__H,u)&&(i.__=n,i.u=u,r.__h.push(i))}function A(n){return o=5,T(function(){return{current:n}},[])}function F(n,t,r){o=6,_(function(){if(\"function\"==typeof n){var r=n(t());return function(){n(null),r&&\"function\"==typeof r&&r()}}if(n)return n.current=t(),function(){return n.current=null}},null==r?r:r.concat(n))}function T(n,r){var u=p(t++,7);return C(u.__H,r)&&(u.__=n(),u.__H=r,u.__h=n),u.__}function q(n,t){return o=8,T(function(){return n},t)}function x(n){var u=r.context[n.__c],i=p(t++,9);return i.c=n,u?(null==i.__&&(i.__=!0,u.sub(r)),u.props.value):n.__}function P(n,t){c.useDebugValue&&c.useDebugValue(t?t(n):n)}function b(n){var u=p(t++,10),i=d();return u.__=n,r.componentDidCatch||(r.componentDidCatch=function(n,t){u.__&&u.__(n,t),i[1](n)}),[i[0],function(){i[1](void 0)}]}function g(){var n=p(t++,11);if(!n.__){for(var u=r.__v;null!==u&&!u.__m&&null!==u.__;)u=u.__;var i=u.__m||(u.__m=[0,0]);n.__=\"P\"+i[0]+\"-\"+i[1]++}return n.__}function j(){for(var n;n=f.shift();)if(n.__P&&n.__H)try{n.__H.__h.forEach(z),n.__H.__h.forEach(B),n.__H.__h=[]}catch(t){n.__H.__h=[],c.__e(t,n.__v)}}c.__b=function(n){r=null,e&&e(n)},c.__=function(n,t){n&&t.__k&&t.__k.__m&&(n.__m=t.__k.__m),s&&s(n,t)},c.__r=function(n){a&&a(n),t=0;var i=(r=n.__c).__H;i&&(u===r?(i.__h=[],r.__h=[],i.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(i.__h.forEach(z),i.__h.forEach(B),i.__h=[],t=0)),u=r},c.diffed=function(n){v&&v(n);var t=n.__c;t&&t.__H&&(t.__H.__h.length&&(1!==f.push(t)&&i===c.requestAnimationFrame||((i=c.requestAnimationFrame)||w)(j)),t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),u=r=null},c.__c=function(n,t){t.some(function(n){try{n.__h.forEach(z),n.__h=n.__h.filter(function(n){return!n.__||B(n)})}catch(r){t.some(function(n){n.__h&&(n.__h=[])}),t=[],c.__e(r,n.__v)}}),l&&l(n,t)},c.unmount=function(n){m&&m(n);var t,r=n.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{z(n)}catch(n){t=n}}),r.__H=void 0,t&&c.__e(t,r.__v))};var k=\"function\"==typeof requestAnimationFrame;function w(n){var t,r=function(){clearTimeout(u),k&&cancelAnimationFrame(t),setTimeout(n)},u=setTimeout(r,35);k&&(t=requestAnimationFrame(r))}function z(n){var t=r,u=n.__c;\"function\"==typeof u&&(n.__c=void 0,u()),r=t}function B(n){var t=r;n.__c=n.__(),r=t}function C(n,t){return!n||n.length!==t.length||t.some(function(t,r){return t!==n[r]})}function D(n,t){return\"function\"==typeof t?t(n):t}export{q as useCallback,x as useContext,P as useDebugValue,y as useEffect,b as useErrorBoundary,g as useId,F as useImperativeHandle,_ as useLayoutEffect,T as useMemo,h as useReducer,A as useRef,d as useState};\n//# sourceMappingURL=hooks.module.js.map\n","import { base64Decode } from './core.js';\nimport { wlog } from './wlog.js';\n\n/**\n * Extracts the email from the pageUrl and returns it if found\n * @param {string} pageUrl the url of the page\n * @returns {string | null} the email if found, null otherwise\n */\nexport const extractEmailFromParams = (pageUrl: string): string | null => {\n  const wemail = /wemail=([^&#]+)/.exec(pageUrl) ?? null;\n\n  if (wemail) {\n    return wemail[1];\n  }\n\n  const wkey = /wkey=([^&#]+)/.exec(pageUrl) ?? null;\n\n  if (wkey) {\n    const base64Email = wkey[1];\n    try {\n      const decodedEmail = base64Decode(base64Email);\n      return decodedEmail;\n    } catch (error) {\n      wlog.info('Failed to decode email from wkey', error);\n    }\n  }\n\n  return null;\n};\n","import { assign } from 'utilities/obj.js';\nimport { Url } from 'utilities/url.js';\nimport { cachedDetect } from 'utilities/detect.js';\nimport { isNotNil } from '@wistia/type-guards';\nimport { readyPublicOver400 } from './assets.js';\n\nconst detect = cachedDetect();\n\nconst convertStillImageToWebp = (media) => {\n  if (media.assets && detect.webp) {\n    media.assets = media.assets.map((asset) => {\n      // there was a flow with the uploader + notPlayablePlayer where we have assets\n      // but they're not ready and don't have urls, so just double check for that here\n      if (asset.type === 'still_image' && Object(asset).url) {\n        const url = new Url(asset.url);\n        url.ext('webp');\n        asset.url = url.absolute();\n      }\n\n      return asset;\n    });\n  }\n};\n\nconst maybeCloneOriginalAsMp4 = (media, options = {}) => {\n  if (options.allowOriginalAsMp4 !== true) {\n    // only transform if the embed options ask for it\n    return;\n  }\n\n  const original = media.assets.filter((a) => a.type === 'original')[0];\n\n  if (readyPublicOver400(media.assets).length > 0) {\n    // we have a derivative we can show instead\n    return;\n  }\n\n  media.assets = [\n    ...media.assets,\n    assign({}, original, {\n      display_name: `${original.display_name} copy`,\n      container: 'mp4',\n      codec: 'h264',\n      type: 'mp4_video',\n    }),\n  ];\n};\n\nconst maybeAddChannelIdToEmbedOptions = (media, options = {}) => {\n  if (isNotNil(options.channelId) && media.embedOptions) {\n    media.embedOptions.channelId = options.channelId;\n  }\n};\n\nconst maybeAddChannelPasswordToEmbedOptions = (media, options = {}) => {\n  if (isNotNil(options.channelPassword) && media.embedOptions) {\n    media.embedOptions.channelPassword = options.channelPassword;\n  }\n};\n\nexport const mediaDataTransforms = (media, options = {}) => {\n  maybeCloneOriginalAsMp4(media, options);\n  convertStillImageToWebp(media);\n  maybeAddChannelIdToEmbedOptions(media, options);\n  maybeAddChannelPasswordToEmbedOptions(media, options);\n  return media;\n};\n","import { isArray, getDeep, setDeep, unsetDeep } from 'utilities/obj.js';\nimport { Wistia } from '../wistia_namespace.ts';\n\n// A simple key/value store implementation\n// stored on the Wistia namespace\n//\n// To set:\n//\n//     wData(\"key.path\", \"val\")\n//     wData([\"key\", \"path\"], \"val\")\n//\n// To get\n//\n//     wData(\"key.path\")\n//     wData([\"key\", \"path\"])\n\nexport const wData = (key, val) => {\n  if (!isArray(key)) {\n    key = key.split('.');\n  }\n  if (val != null) {\n    setDeep(Wistia, ['_data'].concat(key), val);\n  }\n  return getDeep(Wistia, ['_data'].concat(key));\n};\n\nexport const wRemoveData = (key) => {\n  if (!isArray(key)) {\n    key = key.split('.');\n  }\n  return unsetDeep(Wistia, ['_data'].concat(key));\n};\n","import { makeWbindable } from 'utilities/wbindable.js';\nimport { Wistia } from '../wistia_namespace.ts';\n\nmakeWbindable(Wistia);\n\nexport const globalBind = Wistia.bind.bind(Wistia);\nexport const globalOn = Wistia.on.bind(Wistia);\nexport const globalOff = Wistia.off.bind(Wistia);\nexport const globalRebind = Wistia.rebind.bind(Wistia);\nexport const globalTrigger = Wistia.trigger.bind(Wistia);\nexport const globalUnbind = Wistia.unbind.bind(Wistia);\n","import { elemStyle } from 'utilities/elem.js';\nimport { doTimeout } from 'utilities/timeout-utils.js';\nimport { cachedDetect } from 'utilities/detect.js';\nimport { cast, merge } from 'utilities/obj.js';\n\nconst detect = cachedDetect();\n\nexport const scalingOptionsFromVideo = (video, options) => {\n  return merge(\n    {\n      videoWidth: video.videoWidth(),\n      videoHeight: video.videoHeight(),\n      isInFullscreen: video.inFullscreen(),\n      controlScaling: video.controlScaling(),\n    },\n    options,\n  );\n};\n\nexport const controlDimensions = (options = {}, baseWidth = 40, baseHeight = 34) => {\n  options = merge(\n    {\n      videoWidth: 640,\n      videoHeight: 360,\n      isInFullscreen: false,\n      baseWidth: baseWidth != null ? baseWidth : 40,\n      baseHeight: baseHeight != null ? baseHeight : 34,\n    },\n    options,\n  );\n  const multiplier = controlMultiplier(options);\n  return { width: multiplier * options.baseWidth, height: multiplier * options.baseHeight };\n};\n\nexport const bigPlayButtonDimensions = (options, baseWidth, baseHeight) => {\n  return controlDimensions(options, baseWidth, baseHeight);\n};\n\n// abstracted so this can easily be changed if we wanted.\nexport const fontSizeMultiplier = (options) => {\n  return controlMultiplier(options);\n};\n\nexport const allowBigControls = (options = {}) => {\n  const screenHeight = options.screenHeight || window.screen.height;\n  const screenWidth = options.screenWidth || window.screen.width;\n  return (\n    options.controlScaling != 'auto' ||\n    detect.iphone ||\n    detect.android ||\n    screenWidth < screenHeight\n  );\n};\n\nexport const maxMultiplierForVideo = (options) => {\n  if (options.controlScaling != 'auto') {\n    return options.controlScaling;\n  }\n\n  if (allowBigControls(options)) {\n    // the device dimensions are oriented vertically; this is probably a phone\n    // or tablet, or just a monitor that would be fine with huge controls.\n    return 3.5;\n  }\n  return 1.4;\n};\n\nexport const minMultiplierForVideo = (options) => {\n  if (options.controlScaling != 'auto') {\n    return options.controlScaling;\n  }\n\n  if (allowBigControls(options)) {\n    // the controls are unusable if we scale down too much for on phones and\n    // tablets.\n    return 1;\n  }\n  return 0.75;\n};\n\nexport const getZoomMultiplier = (options) => {\n  if (!options.isInFullscreen) {\n    return 1;\n  }\n\n  const result = Math.max(1, window.innerWidth / Math.max(screen.width, screen.height));\n  return result;\n};\n\nexport const getDeviceMultiplier = (options) => {\n  if (allowBigControls(options)) {\n    return 1.4;\n  }\n  return 1;\n};\n\nexport const controlMultiplierForVideo = (video, options) => {\n  return controlMultiplier(scalingOptionsFromVideo(video, options));\n};\n\nexport const controlMultiplier = (options) => {\n  if (options.controlScaling != 'auto') {\n    return options.controlScaling;\n  }\n\n  const { videoWidth, videoHeight } = options;\n  const zoomMultiplier = getZoomMultiplier(options);\n  const largestDimension = Math.max(videoWidth, videoHeight);\n  if (largestDimension > 960) {\n    const percentOverThreshold = largestDimension / 960;\n    const scaleFactor = percentOverThreshold * getDeviceMultiplier(options);\n    return Math.min(maxMultiplierForVideo(options) * zoomMultiplier, scaleFactor * zoomMultiplier);\n  }\n  if (largestDimension < 640) {\n    const percentUnderThreshold = largestDimension / 640;\n    const scaleFactor = percentUnderThreshold * getDeviceMultiplier(options);\n    return Math.max(minMultiplierForVideo(options) * zoomMultiplier, scaleFactor * zoomMultiplier);\n  }\n  return 1 * getDeviceMultiplier(options);\n};\n\n// abstracted so this can easily be changed if we wanted.\nexport const menuMultiplier = (options) => {\n  return Math.max(0.75, controlMultiplier(options));\n};\n\nexport const fitControl = (options) => {\n  const { controlId, video, controlElem } = options;\n  options = merge(\n    {\n      videoWidth: video.videoWidth(),\n      videoHeight: video.videoHeight(),\n      controlScaling: video.controlScaling(),\n      isInFullscreen: video.inFullscreen(),\n    },\n    options,\n  );\n  const { width, height } = controlDimensions(options);\n  elemStyle(controlElem, {\n    height: `${height}px`,\n    width: `${width}px`,\n  });\n  tapIcon(`${video.uuid}.${controlId}`, controlElem);\n  return { width, height };\n};\n\n// Often the svg size changes don't visually change the vertical position of\n// the icon. \"tapping\" it by forcing it to reevaluate the stack is one way to\n// fix that.\nexport const tapIcon = (timeoutPrefix, controlElem) => {\n  const svgs = controlElem.getElementsByTagName('svg');\n  for (let i = 0; i < svgs.length; i++) {\n    ((svg) => {\n      doTimeout(\n        `${timeoutPrefix}.tap_icon`,\n        () => {\n          elemStyle(svg, { position: 'relative' });\n          doTimeout(\n            '#{timeoutPrefix}.tap_icon',\n            () => {\n              elemStyle(svg, { position: '' });\n            },\n            30,\n          );\n        },\n        30,\n      );\n    })(svgs[i]);\n  }\n};\n\nexport const parseMetaViewport = () => {\n  const metaTag = document.querySelector('meta[name=viewport]');\n  const content = metaTag && metaTag.getAttribute('content');\n  const result = {};\n  if (content) {\n    const pairs = content.split(/[\\s,]+/);\n    pairs.forEach((pair) => {\n      const keyAndVal = pair.split('=');\n      if (keyAndVal.length === 2) {\n        result[keyAndVal[0]] = cast(keyAndVal[1]);\n      }\n    });\n  }\n  return result;\n};\n\nconst normalScaleWidthRange = (media) => {\n  const onMobile = detect.iphone || detect.ipad || detect.android;\n\n  if (!onMobile) {\n    return [640, 960];\n  }\n\n  if (media?.isAudio()) {\n    return [500, 960];\n  }\n\n  const viewport = parseMetaViewport();\n\n  let screenWidth;\n  if (viewport.width) {\n    // Initial render being controled by <meta name='viewport' content='...'/>\n    if (typeof viewport.width === 'number') {\n      screenWidth = 0 + viewport.width;\n    } else {\n      screenWidth = screen.width || window.innerWidth;\n    }\n\n    // This doesn't capture any scaling the user does after the initial\n    // render, but the page designer would expect the video to render at the\n    // scale they set.\n    const scale = Math.max(\n      viewport['minimum-scale'] || 0,\n      Math.min(viewport['maximum-scale'] || 10, viewport['initial-scale'] || 1),\n    );\n    if (scale < 1) {\n      screenWidth /= scale;\n    }\n  } else {\n    // Initial render will use the width of the document to determine its\n    // size, then zoom out to show the whole page.\n    screenWidth = window.innerWidth;\n  }\n\n  return [screenWidth, (screenWidth * 2) / 3];\n};\n\nconst normalScaleHeightRange = (media) => {\n  const onMobile = detect.iphone || detect.ipad || detect.android;\n\n  if (!onMobile) {\n    return [340, 860];\n  }\n\n  if (media?.isAudio()) {\n    return [500, 960];\n  }\n\n  const viewport = parseMetaViewport();\n\n  let screenHeight;\n  if (viewport.height) {\n    // Initial render being controled by <meta name='viewport' content='...'/>\n    if (typeof viewport.height === 'number') {\n      screenHeight = 0 + viewport.height;\n    } else {\n      screenHeight = screen.height || window.innerHeight;\n    }\n\n    // This doesn't capture any scaling the user does after the initial\n    // render, but the page designer would expect the video to render at the\n    // scale they set.\n    const scale = Math.max(\n      viewport['minimum-scale'] || 0,\n      Math.min(viewport['maximum-scale'] || 10, viewport['initial-scale'] || 1),\n    );\n    if (scale < 1) {\n      screenHeight /= scale;\n    }\n  } else {\n    // Initial render will use the width of the document to determine its\n    // size, then zoom out to show the whole page.\n    screenHeight = window.innerWidth;\n  }\n\n  return [screenHeight, (screenHeight * 2) / 1.3];\n};\n\nexport const controlMultiplierBasedOnVideo = (video, normalRange) => {\n  const vidWidth = video.videoWidth();\n  const vidHeight = video.videoHeight();\n  const aspect = vidWidth / vidHeight;\n\n  // vertical orientation\n  if (aspect < 1) {\n    const [lowerCutoff, upperCutoff] = normalScaleHeightRange(video);\n\n    if (vidHeight <= lowerCutoff) {\n      return vidHeight / lowerCutoff;\n    }\n    if (vidHeight > upperCutoff) {\n      return vidHeight / upperCutoff;\n    }\n  }\n  // horizontal orientation\n  else {\n    const [lowerCutoff, upperCutoff] = normalRange || normalScaleWidthRange(video);\n\n    if (vidWidth <= lowerCutoff) {\n      return vidWidth / lowerCutoff;\n    }\n    if (vidWidth > upperCutoff) {\n      return vidWidth / upperCutoff;\n    }\n  }\n\n  // default when the video is within normal range\n  return 1;\n};\n\n// A more general version of controlMultiplierBasedOnVideo that doesn't require\n// a video object.\nexport const controlMultiplierEstimatedByWidth = (width, normalRange) => {\n  const [lowerCutoff, upperCutoff] = normalRange || normalScaleWidthRange();\n  if (width <= lowerCutoff) {\n    return width / lowerCutoff;\n  }\n  if (width > upperCutoff) {\n    return width / upperCutoff;\n  }\n  return 1;\n};\n","import { Gradient, GradientMaybeWithColorsAsNumbers, isGradient } from '../types/gradient.ts';\nimport { Color } from './color.js';\nimport { cast, clone } from './obj.js';\n\nconst DEFAULT_ALPHA = 0.9;\nconst GRADIENT_COLOR_INDEX = 0;\nconst GRADIENT_PERCENTAGE_INDEX = 1;\n\nexport const DEFAULT_GRADIENT: Gradient = {\n  colors: [\n    ['#2949E5', 0],\n    ['#6A84FF', 1],\n  ],\n  on: true,\n};\n\nconst hexToRGBA = (hex: string, alpha = DEFAULT_ALPHA): string => {\n  const color = new Color(hex);\n\n  // the \"as Color\" here is because the implicit types are not quite right... because we're passing a value to the\n  // alpha function and using it as a setter it returns the new color as a Color object, not a number or undefined\n  // (which happens if you're using the function as a getter)\n  const colorWithAlpha = color.alpha(alpha) as Color;\n\n  return colorWithAlpha.toRgba();\n};\n\nconst decimalToPercentage = (decimal: number): number => decimal * 100;\n\nexport const getCssGradient = (gradient: Gradient, alpha = DEFAULT_ALPHA): string | null => {\n  if (gradient.colors.length === 0) {\n    return null;\n  }\n\n  const areAllColorsValid = gradient.colors.every((gradientColor): boolean =>\n    Boolean(\n      gradientColor[GRADIENT_COLOR_INDEX] &&\n        gradientColor[GRADIENT_PERCENTAGE_INDEX] >= 0 &&\n        gradientColor[GRADIENT_PERCENTAGE_INDEX] <= 1,\n    ),\n  );\n\n  if (!areAllColorsValid) {\n    return null;\n  }\n\n  return `linear-gradient(90deg, ${gradient.colors.map((gradientColor) => `${hexToRGBA(gradientColor[0], alpha)} ${decimalToPercentage(gradientColor[1])}%`).join(', ')})`;\n};\n\nexport const getGradientColor = (gradient: Gradient, index = 0): string | null => {\n  if (!isGradient(gradient)) {\n    return null;\n  }\n\n  return gradient.colors[index][GRADIENT_COLOR_INDEX];\n};\n\nexport const cleanGradient = (gradient: unknown): Gradient => {\n  const casted = cast(clone(gradient)) as GradientMaybeWithColorsAsNumbers;\n\n  const result: Gradient = {\n    colors: casted.colors.map(([color, percentage]) => [color.toString(), percentage]),\n    on: casted.on,\n  };\n\n  return result;\n};\n","const getAlpha2Code = (iso6392Code: string) => {\n  return iso6392Code.split('-')[0];\n};\n\nconst getStack = () => {\n  const err = new Error();\n  return err.stack?.split('\\n').slice(2).join('\\n');\n};\n\n/**\n * Finds the index of the preferred language from a list of available languages.\n *\n * This function helps select the best matching language based on user preferences and browser settings.\n * It's designed to work with arrays of ISO 639-2 language codes, optionally with region codes (e.g. 'en' or 'en-US'),\n * but can also be used for matching alpha3 ietf language tags, e.g. \"eng\".\n *\n * @param availableLanguages - Array of language codes that are available to choose from\n * @param preferredLanguages - Array of language codes to try matching\n * @returns The index of the best matching language in the availableLanguages array, or -1 if no languages are available\n *\n * @example\n * const captions = [\n *   { language: 'en', text: 'Hello' },\n *   { language: 'es', text: 'Hola' }\n * ];\n * const index = getPreferredAvailableLanguageIndex(\n *   captions.map(c => c.language),\n *   ['es']\n * );\n * const preferredCaption = captions[index];\n */\nexport const getPreferredAvailableLanguageIndex = (\n  availableLanguages: string[],\n  preferredLanguages: string[],\n): number => {\n  // Many of the call sites are not typescript, so are susceptible to pass in\n  // non-string values. We don't want to break in that scenario, but we do want\n  // to log the issue so we can fix it.\n  if ((availableLanguages as unknown[]).some((lang) => typeof lang !== 'string')) {\n    // eslint-disable-next-line no-console\n    console.error('availableLanguages has non-string values', availableLanguages, getStack());\n    // eslint-disable-next-line no-param-reassign\n    availableLanguages = availableLanguages.filter((lang) => typeof lang === 'string');\n  }\n  if ((preferredLanguages as unknown[]).some((lang) => typeof lang !== 'string')) {\n    // eslint-disable-next-line no-console\n    console.error('preferredLanguages has non-string values', preferredLanguages, getStack());\n    // eslint-disable-next-line no-param-reassign\n    preferredLanguages = preferredLanguages.filter((lang) => typeof lang === 'string');\n  }\n\n  // eslint-disable-next-line no-restricted-syntax\n  for (const preferredLanguage of preferredLanguages) {\n    // Try exact matches first\n    if (availableLanguages.includes(preferredLanguage)) {\n      return availableLanguages.indexOf(preferredLanguage);\n    }\n\n    // Try region matches\n    const preferredAlpha2 = getAlpha2Code(preferredLanguage);\n    const hasRegionMatch = availableLanguages.some(\n      (lang) => getAlpha2Code(lang) === preferredAlpha2,\n    );\n\n    if (hasRegionMatch) {\n      return availableLanguages.findIndex((lang) => getAlpha2Code(lang) === preferredAlpha2);\n    }\n  }\n\n  return -1;\n};\n","import { eV1HostWithPort } from 'utilities/hosts.js';\n\nexport const bestImage = (images, opts = {}) => {\n  const _sortedImages = sortedImages(images);\n\n  if (_sortedImages.length === 0) {\n    // If the still failed to process, we might find ourselves going down\n    // this path.\n    return blankImage(opts.videoWith, opts.videoHeight);\n  }\n\n  // When this first loads it's possible that @img will have a width of -1\n  // until fit() fully takes hold. This could probably be fixed a better\n  // way, but this code is here to ensure that we don't return a bogus\n  // bestImage() if that's the case.\n  const currentWidth = opts.videoWidth;\n\n  // For sharper screens, let's load up larger images so the thumbnail\n  // looks hella sharp\n  const desiredWidth = (window.devicePixelRatio || 1) * currentWidth;\n\n  if (desiredWidth <= _sortedImages[0].width) {\n    return _sortedImages[0];\n  }\n\n  for (let i = 0; i < _sortedImages.length; i++) {\n    const image = _sortedImages[i];\n    if (image.width >= desiredWidth) {\n      return image;\n    }\n  }\n\n  return _sortedImages[_sortedImages.length - 1];\n};\n\nexport const blankImage = (videoWidth, videoHeight) => {\n  return {\n    height: videoHeight,\n    url: `https://${eV1HostWithPort()}/assets/images/blank.gif`,\n    width: videoWidth,\n  };\n};\n\nexport const sortedImages = (images) => {\n  return images.map((image) => {\n    image.aspect = image.width / image.height;\n    return image;\n  });\n};\n","import { h, JSX } from 'preact';\nimport { useEffect, useRef, useState } from 'preact/hooks';\nimport { addInlineCss } from '../../../../../../utilities/elem.js';\n\nexport const BigPlayButtonLoadingAnim = (): JSX.Element => {\n  const svgEl = useRef(null);\n  const [isAnimating, setIsAnimating] = useState(false);\n\n  useEffect(() => {\n    addInlineCss(\n      svgEl.current,\n      `\n        @keyframes w-loading-pulse {\n          from {\n            stroke-dashoffset: 55;\n          }\n          to {\n            stroke-dashoffset: -175;\n          }\n        }\n        .w-big-play-button-loading-anim {\n          stroke-dasharray: 50 260;\n          stroke-dashoffset: 55;\n          animation: w-loading-pulse 1.2s infinite cubic-bezier(0.65, 0, 0, 1);\n        }\n      `,\n    );\n\n    setIsAnimating(true);\n  }, []);\n\n  return (\n    <line\n      ref={svgEl}\n      class=\"w-big-play-button-loading-anim\"\n      x1=\"0\"\n      y1=\"78\"\n      x2=\"125\"\n      y2=\"78\"\n      style={{\n        stroke: 'currentcolor',\n        strokeWidth: 4,\n        strokeLinecap: 'round',\n        opacity: isAnimating ? 1 : 0,\n      }}\n    />\n  );\n};\n","import { merge, clone } from 'utilities/obj.js';\nimport { dynamicImport } from 'utilities/dynamicImport.ts';\nimport { Wistia } from '../../wistia_namespace.ts';\n\nconst languages = (Wistia.languages = Wistia.languages || {});\nconst translations = (Wistia.translations = Wistia.translations || {});\n\n// set translationPromises if doesn't exist\nif (!Wistia._translationPromises) {\n  Wistia._translationPromises = {};\n}\n\nexport const supportedLanguages = [\n  'ar',\n  'de',\n  'es',\n  'en-US',\n  'fr',\n  'it',\n  'ja',\n  'ko',\n  'pt',\n  'ru',\n  'zh-CN',\n];\n\nconst ietfLanguageTagToCode = {\n  ara: 'ar',\n  ger: 'de',\n  spa: 'es',\n  eng: 'en-US',\n  fre: 'fr',\n  ita: 'it',\n  jpn: 'ja',\n  kor: 'ko',\n  por: 'pt',\n  rus: 'ru',\n  chi: 'zh-CN',\n};\n\nconst normalizeLanguageCode = (code) => {\n  if (code == null) {\n    // whoops, passed no code, don't fail.\n    return 'en-US';\n  }\n\n  // eng -> en-US, etc.\n  code = ietfLanguageTagToCode[code] || code;\n\n  // en-UK -> en, es-419 -> es, etc.\n  if (!supportedLanguages.includes(code)) {\n    const match = matchingLanguages(() => [code])[0];\n    if (match) {\n      code = match;\n    }\n  }\n\n  // we have a translation for en-US, but not en\n  if (code === 'en' || /^en-/.test(code)) {\n    code = 'en-US';\n  }\n\n  // we have a translation for zh-CN, but not zh\n  if (code === 'zh' || /^zh-/.test(code)) {\n    code = 'zh-CN';\n  }\n\n  return code;\n};\n\nconst defineLanguage = (code, text, translations) => {\n  languages[code] = { code, text: decodeEntities(text) };\n  if (translations) {\n    defineTranslations(code, translations);\n  }\n};\n\nexport const getLanguage = (code) => {\n  return languages[normalizeLanguageCode(code)];\n};\n\nexport const isSupportedPlayerLanguage = (code) => {\n  return supportedLanguages.includes(normalizeLanguageCode(code));\n};\n\nexport const defineTranslations = (code, keyValPairs) => {\n  if (languages[code] == null) {\n    throw new Error(`Must define a language with code ${code} before defining its translations.`);\n  }\n\n  const translation = translations[code];\n  if (translation) {\n    merge(translation, keyValPairs);\n  } else {\n    translations[code] = clone(keyValPairs);\n  }\n};\n\nconst withFallbackText = (text) => {\n  if (text == null) {\n    return '?';\n  }\n  return text;\n};\n\nlet dummyTextArea;\nconst cachedDecodings = (Wistia.cachedDecodings = Wistia.cachedDecodings || {});\nconst decodeEntities = (text) => {\n  if (!dummyTextArea) {\n    // Create this lazily to avoid race conditions while document is rendering.\n    dummyTextArea = document.createElement('textarea');\n  }\n  if (cachedDecodings[text] != null) {\n    // If we've decoded this before, use that value; DOM operations aren't\n    // fast.\n    return cachedDecodings[text];\n  }\n  dummyTextArea.innerHTML = text;\n  cachedDecodings[text] = dummyTextArea.value;\n  return dummyTextArea.value;\n};\n\nexport const getTranslation = (code, key) => {\n  code = normalizeLanguageCode(code);\n\n  let text;\n  if (translations[code] && translations[code][key]) {\n    text = translations[code][key];\n  } else {\n    text = translations['en-US'][key];\n  }\n  return decodeEntities(withFallbackText(text));\n};\n\n/**\n * Gets translations for the specified language code and keys\n * @param {string} code - The language code to get translations for\n * @param {string[]} [keys=[]] - Array of translation keys to retrieve\n * @returns {Record<string, string>} Object containing the translations with keys as properties\n */\nexport const getTranslations = (code, keys = []) => {\n  const translations = {};\n  keys.forEach((key) => {\n    translations[key] = getTranslation(code, key);\n  });\n  return translations;\n};\n\nexport const getLanguagePreference = () => {\n  if (navigator.languages || navigator.language) {\n    Wistia.languagePreference = navigator.languages || [navigator.language];\n  } else {\n    // in old browsers that don't support navigator.language(s), like IE 9/10,\n    // just go with English.\n    Wistia.languagePreference = ['en-US'];\n  }\n\n  return Wistia.languagePreference;\n};\n\nlet defaultPromise = Promise.resolve({\n  code: 'en-US',\n  translations: translations['en-US'],\n});\n\nexport const loadAndDefineTranslation = (code) => {\n  code = normalizeLanguageCode(code);\n\n  if (!supportedLanguages.includes(code)) {\n    // we don't support this language; just use en-US\n    return defaultPromise;\n  }\n\n  if (Wistia._translationPromises[code]) {\n    return Wistia._translationPromises[code];\n  }\n\n  if (code === 'en-US') {\n    return defaultPromise;\n  }\n\n  const result = new Promise((resolve, reject) => {\n    dynamicImport([`assets/external/translations/${code}.js`])\n      .then((moduleClass) => {\n        const { languageCode, languageLabel, translations } = moduleClass;\n        defineLanguage(languageCode, languageLabel, translations);\n        resolve({\n          code,\n          translations: translations[code],\n        });\n      })\n      .catch(reject);\n  });\n\n  Wistia._translationPromises[code] = result;\n  return result;\n};\n\nexport const matchingLanguages = (languagePrefs = getLanguagePreference) => {\n  return languagePrefs().reduce((matches, langCode) => {\n    const isFullMatch = supportedLanguages.indexOf(langCode) !== -1;\n\n    // strip the region off a language, e.g. `es-ES` -> `es`\n    const partialLangCode = langCode.split('-')[0];\n\n    // take a partial match if the language hits, just not the region, e.g. `es-ES` -> `es`\n    const isPartialMatch = supportedLanguages.indexOf(partialLangCode) !== -1;\n\n    if (isFullMatch) {\n      matches.push(langCode);\n    } else if (isPartialMatch) {\n      matches.push(partialLangCode);\n    }\n\n    return matches;\n  }, []);\n};\n\nexport const getDefaultTranslation = () => {\n  let matchingLanguage = matchingLanguages()[0];\n\n  // if there is not match, or if it is 'en', go to our\n  // default of 'en-US'\n  if (!matchingLanguage || matchingLanguage === 'en') {\n    matchingLanguage = 'en-US';\n  }\n\n  if (translations[matchingLanguage]) {\n    return Promise.resolve({\n      code: matchingLanguage,\n      translations: translations[matchingLanguage],\n    });\n  }\n\n  return loadAndDefineTranslation(matchingLanguage);\n};\n\n// Most translations are defined where they are used, however these translations are\n// rather generic and used in multiple places. They are defined here so we don't\n// duplicate multiple translation keys.\ndefineLanguage('en-US', 'English');\ndefineTranslations('en-US', {\n  PLAY: 'Play',\n  PLAY_BUTTON_LIVE_NOT_STARTED: 'Livestream has not started',\n  PLAY_BUTTON_TITLE_WHEN_NOT_PLAYING: 'Play Video',\n  PLAY_BUTTON_TITLE_WHEN_PLAYING: 'Pause',\n\n  REWATCH: 'Rewatch',\n\n  SKIP: 'Skip',\n});\n","import { globalTrigger } from 'utilities/globalBindAndTrigger.js';\nimport { getWistiaLocalStorage, updateWistiaLocalStorage } from 'utilities/wistiaLocalStorage.js';\nimport { getAllApiHandles } from 'utilities/getApiHandles.ts';\nimport { Wistia } from '../wistia_namespace.ts';\n\nexport const migrateLegacyVisitorTracking = () => {\n  const legacyIsEnabled = getWistiaLocalStorage().visitorTrackingEnabled;\n  if (legacyIsEnabled != null) {\n    // Migrate old structure to new structure\n    //\n    // old:\n    // localStorage\n    //   visitorTrackingEnabled: boolean\n    //\n    // new:\n    // localStorage\n    //   visitorTracking: {\n    //     isEnabled: boolean,\n    //     updatedAt: timestamp,\n    //   }\n    //\n    updateWistiaLocalStorage((ls) => delete ls.visitorTrackingEnabled);\n    Wistia._visitorTracking = {};\n    Wistia._visitorTracking[Wistia._visitorTrackingDomain] = {\n      isEnabled: legacyIsEnabled,\n      updatedAt: Date.now(),\n    };\n    updateWistiaLocalStorage((ls) => (ls.visitorTracking = Wistia._visitorTracking));\n  }\n};\n\nif (!Wistia._visitorTrackingDomain) {\n  Wistia._visitorTrackingDomain = location.hostname || '';\n}\n\n// Initialize from localStorage, or with an empty hash if not set.\nif (!Wistia._visitorTracking) {\n  migrateLegacyVisitorTracking();\n  Wistia._visitorTracking = getWistiaLocalStorage().visitorTracking || {};\n}\n\nexport const consent = (val) => {\n  if (val == null) {\n    return isVisitorTrackingEnabled();\n  }\n  return setVisitorTrackingEnabled(val);\n};\nWistia.consent = consent;\n\nexport const setVisitorTrackingEnabled = (val, domain = Wistia._visitorTrackingDomain) => {\n  if (val === 'default') {\n    delete Wistia._visitorTracking[domain];\n  } else {\n    Wistia._visitorTracking[domain] = {\n      isEnabled: `${val}` === 'true',\n      updatedAt: Date.now(),\n    };\n  }\n  updateWistiaLocalStorage((obj) => (obj.visitorTracking = Wistia._visitorTracking));\n  globalTrigger('visitortrackingchange', val);\n\n  const allWistiaPlayers = [...document.getElementsByTagName('wistia-player')];\n  allWistiaPlayers.forEach((player) => {\n    player.dispatchEvent(\n      new CustomEvent('visitor-tracking-change', { detail: { isTrackingEnabled: val } }),\n    );\n  });\n};\n\nconst isCurrentDomainOrAnyParentDomainsEnabled = () => {\n  if (Wistia._visitorTrackingDomain) {\n    const domainParts = Wistia._visitorTrackingDomain.split('.');\n    while (domainParts.length > 0) {\n      const entry = Wistia._visitorTracking[domainParts.join('.')];\n      const enabledVal = entry && entry.isEnabled;\n      if (enabledVal != null) {\n        return enabledVal;\n      }\n      domainParts.shift();\n    }\n  }\n\n  // returns undefined instead of false as a result so that we can have\n  // different behavior if it has not been set.\n};\n\nexport const isVisitorTrackingEnabled = () => {\n  if (typeof Wistia._visitorTracking === 'boolean') {\n    // Legacy. We previously persisted this data as a boolean\n    return Wistia._visitorTracking;\n  }\n\n  if (Wistia._visitorTracking) {\n    // _visitorTracking has been set. Let's check the value for the current\n    // domain. And if that's set, we return.\n    const isEnabledVal = isCurrentDomainOrAnyParentDomainsEnabled();\n    if (isEnabledVal != null) {\n      return Boolean(isEnabledVal);\n    }\n  }\n\n  const apis = getAllApiHandles();\n\n  if (Wistia.channel && Wistia.channel.all) {\n    try {\n      apis.push(...Wistia.channel.all());\n    } catch (e) {\n      // If Wistia.api.all() is called before Wistia._data is setup, this will throw\n      // an exception. That's okay--it just means there are effectively no\n      // channel embeds yet.\n    }\n  }\n\n  // By default, if any videos have privacy mode enabled, then we disable\n  // visitor tracking for all videos on the page. In practice, we would only\n  // see this occur if videos from multiple accounts--with different privacy\n  // mode settings--appear on the same page.\n  const isPrivacyModeEnabled = apis.some((api) => {\n    const data = api._mediaData || api._galleryData || {};\n    return data.privacyMode === true;\n  });\n\n  return !isPrivacyModeEnabled;\n};\n","export const camelCaseToKebabCase = (camelCaseString: string): string => {\n  return camelCaseString.replace(/[A-Z]+(?![a-z])|[A-Z]/g, (letter: string, idx?: number) => {\n    return (idx !== undefined ? '-' : '') + letter.toLowerCase();\n  });\n};\n\nexport const kebabCaseToCamelCase = (kebabCaseString: string): string => {\n  return kebabCaseString.replace(/-./g, (word) => word[1].toUpperCase());\n};\n","import {\n  getLocalStorage,\n  removeLocalStorage,\n  setLocalStorage,\n  updateLocalStorage,\n} from 'utilities/namespacedLocalStorage.js';\nimport { Wistia } from '../wistia_namespace.ts';\n\n// This localStorage utility can be used in situations where we don't need to\n// do very frequent updates or reads. If frequent updates or reads are\n// expected, you should use namespacedLocalStorage.js with its own namespace,\n// since the entire namespace is deserialized and serialized on read and write\n// respectively.\n\nconst WISTIA_NAMESPACE = 'wistia';\n\nexport const getWistiaLocalStorage = () => {\n  return getLocalStorage(WISTIA_NAMESPACE);\n};\n\nexport const removeWistiaLocalStorage = () => {\n  Wistia._localStorage = removeLocalStorage(WISTIA_NAMESPACE);\n  return Wistia._localStorage;\n};\n\nexport const setWistiaLocalStorage = (obj) => {\n  Wistia._localStorage = setLocalStorage(WISTIA_NAMESPACE, obj);\n  return Wistia._localStorage;\n};\n\nexport const updateWistiaLocalStorage = (fn) => {\n  Wistia._localStorage = updateLocalStorage(WISTIA_NAMESPACE, fn);\n  return Wistia._localStorage;\n};\n","var n,l,u,t,i,r,o,e,f,c,s,a,h,p={},v=[],y=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,w=Array.isArray;function d(n,l){for(var u in l)n[u]=l[u];return n}function g(n){n&&n.parentNode&&n.parentNode.removeChild(n)}function _(l,u,t){var i,r,o,e={};for(o in u)\"key\"==o?i=u[o]:\"ref\"==o?r=u[o]:e[o]=u[o];if(arguments.length>2&&(e.children=arguments.length>3?n.call(arguments,2):t),\"function\"==typeof l&&null!=l.defaultProps)for(o in l.defaultProps)void 0===e[o]&&(e[o]=l.defaultProps[o]);return m(l,e,i,r,null)}function m(n,t,i,r,o){var e={type:n,props:t,key:i,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==o?++u:o,__i:-1,__u:0};return null==o&&null!=l.vnode&&l.vnode(e),e}function b(){return{current:null}}function k(n){return n.children}function x(n,l){this.props=n,this.context=l}function S(n,l){if(null==l)return n.__?S(n.__,n.__i+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return\"function\"==typeof n.type?S(n):null}function C(n){var l,u;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e){n.__e=n.__c.base=u.__e;break}return C(n)}}function M(n){(!n.__d&&(n.__d=!0)&&i.push(n)&&!$.__r++||r!=l.debounceRendering)&&((r=l.debounceRendering)||o)($)}function $(){for(var n,u,t,r,o,f,c,s=1;i.length;)i.length>s&&i.sort(e),n=i.shift(),s=i.length,n.__d&&(t=void 0,r=void 0,o=(r=(u=n).__v).__e,f=[],c=[],u.__P&&((t=d({},r)).__v=r.__v+1,l.vnode&&l.vnode(t),O(u.__P,t,r,u.__n,u.__P.namespaceURI,32&r.__u?[o]:null,f,null==o?S(r):o,!!(32&r.__u),c),t.__v=r.__v,t.__.__k[t.__i]=t,N(f,t,c),r.__e=r.__=null,t.__e!=o&&C(t)));$.__r=0}function I(n,l,u,t,i,r,o,e,f,c,s){var a,h,y,w,d,g,_,m=t&&t.__k||v,b=l.length;for(f=P(u,l,m,f,b),a=0;a<b;a++)null!=(y=u.__k[a])&&(h=-1==y.__i?p:m[y.__i]||p,y.__i=a,g=O(n,y,h,i,r,o,e,f,c,s),w=y.__e,y.ref&&h.ref!=y.ref&&(h.ref&&B(h.ref,null,y),s.push(y.ref,y.__c||w,y)),null==d&&null!=w&&(d=w),(_=!!(4&y.__u))||h.__k===y.__k?f=A(y,f,n,_):\"function\"==typeof y.type&&void 0!==g?f=g:w&&(f=w.nextSibling),y.__u&=-7);return u.__e=d,f}function P(n,l,u,t,i){var r,o,e,f,c,s=u.length,a=s,h=0;for(n.__k=new Array(i),r=0;r<i;r++)null!=(o=l[r])&&\"boolean\"!=typeof o&&\"function\"!=typeof o?(f=r+h,(o=n.__k[r]=\"string\"==typeof o||\"number\"==typeof o||\"bigint\"==typeof o||o.constructor==String?m(null,o,null,null,null):w(o)?m(k,{children:o},null,null,null):null==o.constructor&&o.__b>0?m(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=n,o.__b=n.__b+1,e=null,-1!=(c=o.__i=L(o,u,f,a))&&(a--,(e=u[c])&&(e.__u|=2)),null==e||null==e.__v?(-1==c&&(i>s?h--:i<s&&h++),\"function\"!=typeof o.type&&(o.__u|=4)):c!=f&&(c==f-1?h--:c==f+1?h++:(c>f?h--:h++,o.__u|=4))):n.__k[r]=null;if(a)for(r=0;r<s;r++)null!=(e=u[r])&&0==(2&e.__u)&&(e.__e==t&&(t=S(e)),D(e,e));return t}function A(n,l,u,t){var i,r;if(\"function\"==typeof n.type){for(i=n.__k,r=0;i&&r<i.length;r++)i[r]&&(i[r].__=n,l=A(i[r],l,u,t));return l}n.__e!=l&&(t&&(l&&n.type&&!l.parentNode&&(l=S(n)),u.insertBefore(n.__e,l||null)),l=n.__e);do{l=l&&l.nextSibling}while(null!=l&&8==l.nodeType);return l}function H(n,l){return l=l||[],null==n||\"boolean\"==typeof n||(w(n)?n.some(function(n){H(n,l)}):l.push(n)),l}function L(n,l,u,t){var i,r,o,e=n.key,f=n.type,c=l[u],s=null!=c&&0==(2&c.__u);if(null===c&&null==n.key||s&&e==c.key&&f==c.type)return u;if(t>(s?1:0))for(i=u-1,r=u+1;i>=0||r<l.length;)if(null!=(c=l[o=i>=0?i--:r++])&&0==(2&c.__u)&&e==c.key&&f==c.type)return o;return-1}function T(n,l,u){\"-\"==l[0]?n.setProperty(l,null==u?\"\":u):n[l]=null==u?\"\":\"number\"!=typeof u||y.test(l)?u:u+\"px\"}function j(n,l,u,t,i){var r,o;n:if(\"style\"==l)if(\"string\"==typeof u)n.style.cssText=u;else{if(\"string\"==typeof t&&(n.style.cssText=t=\"\"),t)for(l in t)u&&l in u||T(n.style,l,\"\");if(u)for(l in u)t&&u[l]==t[l]||T(n.style,l,u[l])}else if(\"o\"==l[0]&&\"n\"==l[1])r=l!=(l=l.replace(f,\"$1\")),o=l.toLowerCase(),l=o in n||\"onFocusOut\"==l||\"onFocusIn\"==l?o.slice(2):l.slice(2),n.l||(n.l={}),n.l[l+r]=u,u?t?u.u=t.u:(u.u=c,n.addEventListener(l,r?a:s,r)):n.removeEventListener(l,r?a:s,r);else{if(\"http://www.w3.org/2000/svg\"==i)l=l.replace(/xlink(H|:h)/,\"h\").replace(/sName$/,\"s\");else if(\"width\"!=l&&\"height\"!=l&&\"href\"!=l&&\"list\"!=l&&\"form\"!=l&&\"tabIndex\"!=l&&\"download\"!=l&&\"rowSpan\"!=l&&\"colSpan\"!=l&&\"role\"!=l&&\"popover\"!=l&&l in n)try{n[l]=null==u?\"\":u;break n}catch(n){}\"function\"==typeof u||(null==u||!1===u&&\"-\"!=l[4]?n.removeAttribute(l):n.setAttribute(l,\"popover\"==l&&1==u?\"\":u))}}function F(n){return function(u){if(this.l){var t=this.l[u.type+n];if(null==u.t)u.t=c++;else if(u.t<t.u)return;return t(l.event?l.event(u):u)}}}function O(n,u,t,i,r,o,e,f,c,s){var a,h,p,v,y,_,m,b,S,C,M,$,P,A,H,L,T,j=u.type;if(null!=u.constructor)return null;128&t.__u&&(c=!!(32&t.__u),o=[f=u.__e=t.__e]),(a=l.__b)&&a(u);n:if(\"function\"==typeof j)try{if(b=u.props,S=\"prototype\"in j&&j.prototype.render,C=(a=j.contextType)&&i[a.__c],M=a?C?C.props.value:a.__:i,t.__c?m=(h=u.__c=t.__c).__=h.__E:(S?u.__c=h=new j(b,M):(u.__c=h=new x(b,M),h.constructor=j,h.render=E),C&&C.sub(h),h.props=b,h.state||(h.state={}),h.context=M,h.__n=i,p=h.__d=!0,h.__h=[],h._sb=[]),S&&null==h.__s&&(h.__s=h.state),S&&null!=j.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=d({},h.__s)),d(h.__s,j.getDerivedStateFromProps(b,h.__s))),v=h.props,y=h.state,h.__v=u,p)S&&null==j.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),S&&null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(S&&null==j.getDerivedStateFromProps&&b!==v&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(b,M),!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(b,h.__s,M)||u.__v==t.__v){for(u.__v!=t.__v&&(h.props=b,h.state=h.__s,h.__d=!1),u.__e=t.__e,u.__k=t.__k,u.__k.some(function(n){n&&(n.__=u)}),$=0;$<h._sb.length;$++)h.__h.push(h._sb[$]);h._sb=[],h.__h.length&&e.push(h);break n}null!=h.componentWillUpdate&&h.componentWillUpdate(b,h.__s,M),S&&null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(v,y,_)})}if(h.context=M,h.props=b,h.__P=n,h.__e=!1,P=l.__r,A=0,S){for(h.state=h.__s,h.__d=!1,P&&P(u),a=h.render(h.props,h.state,h.context),H=0;H<h._sb.length;H++)h.__h.push(h._sb[H]);h._sb=[]}else do{h.__d=!1,P&&P(u),a=h.render(h.props,h.state,h.context),h.state=h.__s}while(h.__d&&++A<25);h.state=h.__s,null!=h.getChildContext&&(i=d(d({},i),h.getChildContext())),S&&!p&&null!=h.getSnapshotBeforeUpdate&&(_=h.getSnapshotBeforeUpdate(v,y)),L=a,null!=a&&a.type===k&&null==a.key&&(L=V(a.props.children)),f=I(n,w(L)?L:[L],u,t,i,r,o,e,f,c,s),h.base=u.__e,u.__u&=-161,h.__h.length&&e.push(h),m&&(h.__E=h.__=null)}catch(n){if(u.__v=null,c||null!=o)if(n.then){for(u.__u|=c?160:128;f&&8==f.nodeType&&f.nextSibling;)f=f.nextSibling;o[o.indexOf(f)]=null,u.__e=f}else{for(T=o.length;T--;)g(o[T]);z(u)}else u.__e=t.__e,u.__k=t.__k,n.then||z(u);l.__e(n,u,t)}else null==o&&u.__v==t.__v?(u.__k=t.__k,u.__e=t.__e):f=u.__e=q(t.__e,u,t,i,r,o,e,c,s);return(a=l.diffed)&&a(u),128&u.__u?void 0:f}function z(n){n&&n.__c&&(n.__c.__e=!0),n&&n.__k&&n.__k.forEach(z)}function N(n,u,t){for(var i=0;i<t.length;i++)B(t[i],t[++i],t[++i]);l.__c&&l.__c(u,n),n.some(function(u){try{n=u.__h,u.__h=[],n.some(function(n){n.call(u)})}catch(n){l.__e(n,u.__v)}})}function V(n){return\"object\"!=typeof n||null==n||n.__b&&n.__b>0?n:w(n)?n.map(V):d({},n)}function q(u,t,i,r,o,e,f,c,s){var a,h,v,y,d,_,m,b=i.props,k=t.props,x=t.type;if(\"svg\"==x?o=\"http://www.w3.org/2000/svg\":\"math\"==x?o=\"http://www.w3.org/1998/Math/MathML\":o||(o=\"http://www.w3.org/1999/xhtml\"),null!=e)for(a=0;a<e.length;a++)if((d=e[a])&&\"setAttribute\"in d==!!x&&(x?d.localName==x:3==d.nodeType)){u=d,e[a]=null;break}if(null==u){if(null==x)return document.createTextNode(k);u=document.createElementNS(o,x,k.is&&k),c&&(l.__m&&l.__m(t,e),c=!1),e=null}if(null==x)b===k||c&&u.data==k||(u.data=k);else{if(e=e&&n.call(u.childNodes),b=i.props||p,!c&&null!=e)for(b={},a=0;a<u.attributes.length;a++)b[(d=u.attributes[a]).name]=d.value;for(a in b)if(d=b[a],\"children\"==a);else if(\"dangerouslySetInnerHTML\"==a)v=d;else if(!(a in k)){if(\"value\"==a&&\"defaultValue\"in k||\"checked\"==a&&\"defaultChecked\"in k)continue;j(u,a,null,d,o)}for(a in k)d=k[a],\"children\"==a?y=d:\"dangerouslySetInnerHTML\"==a?h=d:\"value\"==a?_=d:\"checked\"==a?m=d:c&&\"function\"!=typeof d||b[a]===d||j(u,a,d,b[a],o);if(h)c||v&&(h.__html==v.__html||h.__html==u.innerHTML)||(u.innerHTML=h.__html),t.__k=[];else if(v&&(u.innerHTML=\"\"),I(\"template\"==t.type?u.content:u,w(y)?y:[y],t,i,r,\"foreignObject\"==x?\"http://www.w3.org/1999/xhtml\":o,e,f,e?e[0]:i.__k&&S(i,0),c,s),null!=e)for(a=e.length;a--;)g(e[a]);c||(a=\"value\",\"progress\"==x&&null==_?u.removeAttribute(\"value\"):null!=_&&(_!==u[a]||\"progress\"==x&&!_||\"option\"==x&&_!=b[a])&&j(u,a,_,b[a],o),a=\"checked\",null!=m&&m!=u[a]&&j(u,a,m,b[a],o))}return u}function B(n,u,t){try{if(\"function\"==typeof n){var i=\"function\"==typeof n.__u;i&&n.__u(),i&&null==u||(n.__u=n(u))}else n.current=u}catch(n){l.__e(n,t)}}function D(n,u,t){var i,r;if(l.unmount&&l.unmount(n),(i=n.ref)&&(i.current&&i.current!=n.__e||B(i,null,u)),null!=(i=n.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(n){l.__e(n,u)}i.base=i.__P=null}if(i=n.__k)for(r=0;r<i.length;r++)i[r]&&D(i[r],u,t||\"function\"!=typeof n.type);t||g(n.__e),n.__c=n.__=n.__e=void 0}function E(n,l,u){return this.constructor(n,u)}function G(u,t,i){var r,o,e,f;t==document&&(t=document.documentElement),l.__&&l.__(u,t),o=(r=\"function\"==typeof i)?null:i&&i.__k||t.__k,e=[],f=[],O(t,u=(!r&&i||t).__k=_(k,null,[u]),o||p,p,t.namespaceURI,!r&&i?[i]:o?null:t.firstChild?n.call(t.childNodes):null,e,!r&&i?i:o?o.__e:t.firstChild,r,f),N(e,u,f)}function J(n,l){G(n,l,J)}function K(l,u,t){var i,r,o,e,f=d({},l.props);for(o in l.type&&l.type.defaultProps&&(e=l.type.defaultProps),u)\"key\"==o?i=u[o]:\"ref\"==o?r=u[o]:f[o]=void 0===u[o]&&null!=e?e[o]:u[o];return arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):t),m(l.type,f,i||l.key,r||l.ref,null)}function Q(n){function l(n){var u,t;return this.getChildContext||(u=new Set,(t={})[l.__c]=this,this.getChildContext=function(){return t},this.componentWillUnmount=function(){u=null},this.shouldComponentUpdate=function(n){this.props.value!=n.value&&u.forEach(function(n){n.__e=!0,M(n)})},this.sub=function(n){u.add(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){u&&u.delete(n),l&&l.call(n)}}),n.children}return l.__c=\"__cC\"+h++,l.__=n,l.Provider=l.__l=(l.Consumer=function(n,l){return n.children(l)}).contextType=l,l}n=v.slice,l={__e:function(n,l,u,t){for(var i,r,o;l=l.__;)if((i=l.__c)&&!i.__)try{if((r=i.constructor)&&null!=r.getDerivedStateFromError&&(i.setState(r.getDerivedStateFromError(n)),o=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(n,t||{}),o=i.__d),o)return i.__E=i}catch(l){n=l}throw n}},u=0,t=function(n){return null!=n&&null==n.constructor},x.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=d({},this.state),\"function\"==typeof n&&(n=n(d({},u),this.props)),n&&d(u,n),null!=n&&this.__v&&(l&&this._sb.push(l),M(this))},x.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),M(this))},x.prototype.render=k,i=[],o=\"function\"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,e=function(n,l){return n.__v.__b-l.__v.__b},$.__r=0,f=/(PointerCapture)$|Capture$/i,c=0,s=F(!1),a=F(!0),h=0;export{x as Component,k as Fragment,K as cloneElement,Q as createContext,_ as createElement,b as createRef,_ as h,J as hydrate,t as isValidElement,l as options,G as render,H as toChildArray};\n//# sourceMappingURL=preact.module.js.map\n","/**\n * Infer the url of the page best we can\n * @returns {string} the url of the page\n */\nexport const inferPageUrl = (): string => {\n  if (window.FreshUrl?.originalUrl != null) {\n    return window.FreshUrl.originalUrl;\n  }\n  if (window.top === window.self) {\n    return window.location.href || '';\n  }\n  return document.referrer || '';\n};\n","// Logic adapted from this Javascript Color class:\n// https://github.com/moagrius/Color/blob/master/Color.js\n//\n// HSL to RGB logic (broken in Color class) taken from:\n// http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript\n\nimport { isNil } from '@wistia/type-guards';\nimport { colorContrastRatiosByShape, getContrast, rgbToHsl } from './color-utils.ts';\n\n// LRGB color blending taken from chroma-js:\n// https://github.com/gka/chroma.js/blob/main/src/interpolator/lrgb.js\n\n// ## Regular expressions ##\nconst rHex = /^#?([0-9a-f]{3,4}|[0-9a-f]{6,8})$/i;\nconst rRgb =\n  /^rgba?\\((\\d{1,3}(?:\\.\\d+)?%?),\\s*(\\d{1,3}(?:\\.\\d+)?%?),\\s*(\\d{1,3}(?:\\.\\d+)?%?)(?:,\\s*([01]?\\.?\\d*))?\\)$/;\nconst rPercent = /^\\d+(\\.\\d+)*%$/;\nconst hexBit = /([0-9a-f])/gi;\n\nconst p2v = (p) => {\n  if (rPercent.test(p)) {\n    return parseFloat(p) * 2.55;\n  }\n  return p;\n};\n\nconst hue2rgb = (a, b, c) => {\n  if (c < 0) {\n    c += 1;\n  }\n  if (c > 1) {\n    c -= 1;\n  }\n  if (c < 1 / 6) {\n    return a + (b - a) * 6 * c;\n  }\n  if (c < 1 / 2) {\n    return b;\n  }\n  if (c < 2 / 3) {\n    return a + (b - a) * (2 / 3 - c) * 6;\n  }\n  return a;\n};\n\nexport class Color {\n  // ## Constructor ##\n  //\n  // Construct our own color representation either from an\n  // existing color, or a color string.\n  constructor(input) {\n    if (input instanceof Color) {\n      this.r = input.r;\n      this.g = input.g;\n      this.b = input.b;\n      this.a = input.a;\n    } else if (input) {\n      this.parse(input);\n    } else {\n      this.r = this.g = this.b = 0;\n      this.a = 1;\n    }\n  }\n\n  // ## Parse ##\n  //\n  // Accept #RRGGBB, #RRGGBBAA, rgba(R,G,B), or rgba(R,G,B,A) formats\n  // as well as [r, g, b, a].\n  // The rgb formats also allows percents.\n  parse(input) {\n    if (Array.isArray(input)) {\n      this.r = input[0];\n      this.g = input[1];\n      this.b = input[2];\n      this.a = input[3] ?? 1;\n    } else if (rHex.test(input)) {\n      input = String(input);\n      let stripped = input.replace(/^#/, '');\n      if (stripped.length === 3 || stripped.length === 4) {\n        stripped = stripped.replace(hexBit, '$1$1');\n      }\n      this.r = parseInt(stripped.substr(0, 2), 16);\n      this.g = parseInt(stripped.substr(2, 2), 16);\n      this.b = parseInt(stripped.substr(4, 2), 16);\n      if (stripped.length === 8) {\n        this.a = parseInt(stripped.substr(6, 2), 16) / 255;\n      } else {\n        this.a = 1;\n      }\n    } else if (rRgb.test(input)) {\n      input = String(input);\n      const parts = input.match(rRgb);\n      this.r = parseFloat(p2v(parts[1]));\n      this.g = parseFloat(p2v(parts[2]));\n      this.b = parseFloat(p2v(parts[3]));\n      if (parts[4]) {\n        this.a = parseFloat(parts[4]);\n      } else {\n        this.a = 1;\n      }\n    }\n    return this;\n  }\n\n  clone() {\n    return new Color(this);\n  }\n\n  // Compute internal HSL values based on internal RGB values.\n  _hslFromRgb() {\n    const { hue, saturation, lightness } = rgbToHsl([this.r, this.g, this.b]);\n\n    this._h = hue;\n    this._s = saturation;\n    this._l = lightness;\n\n    return this;\n  }\n\n  // Compute internal RGB values based on internal HSL values.\n  _rgbFromHsl() {\n    const h = this._h / 360;\n    const s = this._s / 100;\n    const l = this._l / 100;\n    const q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n    const p = 2 * l - q;\n\n    this.r = hue2rgb(p, q, h + 1 / 3) * 255;\n    this.g = hue2rgb(p, q, h) * 255;\n    this.b = hue2rgb(p, q, h - 1 / 3) * 255;\n\n    return this;\n  }\n\n  // Do math to blend a channel with a different value. Alpha is\n  // the strength of the blend.\n  blendChannel(channel, value, alpha, shouldUseLrgb) {\n    if (shouldUseLrgb) {\n      this[channel] = Math.sqrt(this[channel] ** 2 * (1 - alpha) + value ** 2 * alpha);\n      return this;\n    }\n    this[channel] = alpha * value + (1 - alpha) * this[channel];\n    return this;\n  }\n\n  // Blend this color with another color by blending each RGB\n  // channel individually.\n  blend(color, alpha, shouldUseLrgb) {\n    color = new Color(color);\n    this.blendChannel('r', color.r, alpha, shouldUseLrgb);\n    this.blendChannel('g', color.g, alpha, shouldUseLrgb);\n    this.blendChannel('b', color.b, alpha, shouldUseLrgb);\n    return this;\n  }\n\n  // background color can be a string or a Color\n  getContrastRatio(backgroundColor) {\n    return Number.parseFloat(\n      getContrast(this.toHexWithHash(), new Color(backgroundColor).toHexWithHash()).toFixed(1),\n    );\n  }\n\n  // background color can be a string or a Color\n  // shape will be a key of colorContrastRatiosByShape\n  hasAccessibleContrast(backgroundColor, shape) {\n    return this.getContrastRatio(backgroundColor) >= colorContrastRatiosByShape[shape];\n  }\n\n  hue() {\n    this._hslFromRgb();\n    return this._h;\n  }\n\n  // Increase a channel by a fixed value, but within the [0,255] range.\n  lightenChannel(channel, steps) {\n    this[channel] += steps;\n    if (this[channel] < 0) {\n      this[channel] = 0;\n    } else if (this[channel] > 255) {\n      this[channel] = 255;\n    }\n    return this;\n  }\n\n  // Lighten this color by increasing each channel by a fixed value.\n  lighten(steps) {\n    if (this.looksLikePercent(steps)) {\n      this.lightness(this.lightness() + parseFloat(steps));\n    } else {\n      this.lightenChannel('r', steps);\n      this.lightenChannel('g', steps);\n      this.lightenChannel('b', steps);\n    }\n    return this;\n  }\n\n  darken(steps) {\n    if (typeof steps === 'string') {\n      return this.lighten(`-${steps}`);\n    }\n    return this.lighten(-steps);\n  }\n\n  looksLikePercent(str) {\n    return /^-?\\d+(\\.\\d+)?%$/.test(str);\n  }\n\n  // Set the lightness of this color by modifying the L value in\n  // HSL, then recomputing the RGB.\n  //\n  // No args gets the current lightness.\n  lightness(l) {\n    this._hslFromRgb();\n    if (l != null) {\n      this._l = Math.max(0, Math.min(100, l));\n      this._rgbFromHsl();\n      return this;\n    }\n    return this._l;\n  }\n\n  // Set the saturation of this color by modifying the S value in\n  // HSL, then recomputing the RGB.\n  //\n  // No args gets the current saturation.\n  saturation(s) {\n    this._hslFromRgb();\n    if (s != null) {\n      this._s = Math.max(0, Math.min(100, s));\n      this._rgbFromHsl();\n      return this;\n    }\n    return this._s;\n  }\n\n  setHue(hueValue) {\n    this._hslFromRgb();\n    if (hueValue != null) {\n      this._h = Math.max(0, Math.min(360, hueValue));\n      this._rgbFromHsl();\n      return this;\n    }\n  }\n\n  shade(percentage, shouldUseLrgb) {\n    return this.blend('#000000', percentage, shouldUseLrgb);\n  }\n\n  // Gray level accounts for the strength of each individual channel.\n  // This is more visually accurate than just averaging all the channels.\n  grayLevel() {\n    return (0.299 * this.r + 0.587 * this.g + 0.114 * this.b) / 255;\n  }\n\n  tint(percentage, shouldUseLrgb) {\n    return this.blend('#ffffff', percentage, shouldUseLrgb);\n  }\n\n  // The white level is basically paleness, and is determined by the\n  // minimum of all the RGB channels.\n  whiteLevel() {\n    return Math.min(Math.min(this.r, this.g), this.b);\n  }\n\n  getRelativeLuminance() {\n    // For reference on calculating relative luminance: https://www.w3.org/WAI/GL/wiki/Relative_luminance\n    const adjustChannel = (givenVal) => {\n      const val = givenVal * 0.003921569; // 1 / 255 = 0.003921569; avoiding division\n      if (val <= 0.03928) {\n        return val / 12.92;\n      }\n      return ((val + 0.055) / 1.055) ** 2.4;\n    };\n\n    const rAdjusted = adjustChannel(this.r);\n    const gAdjusted = adjustChannel(this.g);\n    const bAdjusted = adjustChannel(this.b);\n    return Math.min(0.2126 * rAdjusted + 0.7152 * gAdjusted + 0.0722 * bAdjusted, 1);\n  }\n\n  isDark(shouldUseRL) {\n    if (shouldUseRL) {\n      return this.getRelativeLuminance() < 0.15;\n    }\n    return this.grayLevel() <= 0.4;\n  }\n\n  isLight(shouldUseRL) {\n    if (shouldUseRL) {\n      return this.getRelativeLuminance() >= 0.8;\n    }\n    return this.grayLevel() > 0.4;\n  }\n\n  isGrayscale() {\n    return this.r === this.g && this.g === this.b;\n  }\n\n  distanceFrom(color) {\n    return Math.sqrt((this.r - color.r) ** 2 + (this.g - color.g) ** 2 + (this.b - color.b) ** 2);\n  }\n\n  channelDominance() {\n    return ['r', 'g', 'b'].sort((a, b) => this[b] - this[a]);\n  }\n\n  alpha(a) {\n    if (a != null) {\n      this.a = a;\n      return this;\n    }\n    return this.a;\n  }\n\n  red(r) {\n    if (r != null) {\n      this.r = r;\n      return this;\n    }\n    return this.r;\n  }\n\n  green(g) {\n    if (g != null) {\n      this.g = g;\n      return this;\n    }\n    return this.g;\n  }\n\n  blue(b) {\n    if (b != null) {\n      this.b = b;\n      return this;\n    }\n    return this.b;\n  }\n\n  toHex() {\n    let r = Math.round(this.r).toString(16);\n    let g = Math.round(this.g).toString(16);\n    let b = Math.round(this.b).toString(16);\n    if (r.length === 1) {\n      r = `0${r}`;\n    }\n    if (g.length === 1) {\n      g = `0${g}`;\n    }\n    if (b.length === 1) {\n      b = `0${b}`;\n    }\n    return `${r}${g}${b}`;\n  }\n\n  toHexWithAlpha() {\n    let a = Math.round(this.a * 255).toString(16);\n    if (a.length === 1) {\n      a = `0${a}`;\n    }\n    return `${a}${this.toHex()}`;\n  }\n\n  toHexWithHash() {\n    return `#${this.toHex()}`;\n  }\n\n  toRgb() {\n    return `rgb(${Math.round(this.r)},${Math.round(this.g)},${Math.round(this.b)})`;\n  }\n\n  toRgba() {\n    return `rgba(${Math.round(this.r)},${Math.round(this.g)},${Math.round(this.b)},${this.a})`;\n  }\n\n  toRgbaOrHex() {\n    return this.toRgba();\n  }\n\n  toPercent() {\n    return `rgba(${(this.r / 255) * 100}%,${(this.g / 255) * 100}%,${(this.b / 255) * 100}%,${\n      this.a\n    })`;\n  }\n\n  // IE8 and below don't support RGBA, but we can use this gradient hack to\n  // do the same thing. The catch is that it functions as a background image\n  // instead of a color, and therefore overrides other background images in IE.\n  //\n  // This should go after a `filter` CSS property.\n  toIeGradient() {\n    return `progid:DXImageTransform.Microsoft.gradient(startColorStr='#${this.toHexWithAlpha()}', endColorStr='#${this.toHexWithAlpha()}')`;\n  }\n\n  toString() {\n    return this.toPercent();\n  }\n}\n\n// @param {string} hex\n// @return {string}\nexport const addHashToHex = (hex) => {\n  if (isNil(hex)) {\n    return;\n  }\n\n  // return if already has hash\n  if (hex.charAt(0) === '#') {\n    return hex;\n  }\n\n  return `#${hex}`;\n};\n\nexport const colorWithAlpha = (color, alpha) => {\n  return new Color(color).alpha(alpha).toRgba();\n};\n","/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable no-console */\nimport { root } from './utilities/root.js';\nimport { WistiaGlobal } from './types/player-api-types.ts';\n\nroot.Wistia ??= {};\n\nroot.Wistia._destructors ??= {};\n\nroot.Wistia._initializers ??= {};\n\nroot.Wistia._remoteData ??= new Map();\n\nroot.Wistia.api ??= () => {\n  console.error('Accessed Wistia.api() before it was initialized');\n  return null;\n};\n\n// this will be overwritten in _async.coffee\nroot.Wistia.defineControl ??= () => {\n  console.error('Accessed Wistia.defineControl() before it was initialized');\n  return null;\n};\n\nroot.Wistia.EventShepherdManager ??= {};\n\nroot.Wistia.mixin ??= <T>(klass: T, obj: Partial<Record<keyof T, unknown>> = {}) => {\n  Object.keys(obj).forEach((key) => {\n    if (Object.hasOwn(obj, key)) {\n      // eslint-disable-next-line no-param-reassign\n      klass[key] = obj[key] as unknown as T[keyof T];\n    }\n  });\n};\n\nroot.Wistia.playlistMethods ??= new Map();\n\n// will be overwritten in _public_api.coffee\nroot.Wistia.PublicApi ??= null;\n\n// will be overwritten in _remote_data.js\nroot.Wistia.uncacheMedia ??= () => {\n  console.error('Accessed Wistia.uncacheMedia() before it was initialized');\n  return null;\n};\n\n// will be overwritten in _visitor_key.js\nroot.Wistia.VisitorKey ??= null;\n\n// will be overwritten in _visitor_key.js\nroot.Wistia.visitorKey ??= null;\n\n// will be overwritten in WistiaPlayer.tsx\nroot.Wistia.wistia ??= undefined;\n\nroot.Wistia._liveStreamEventDataPromises ??= {};\n\nroot.Wistia._mediaDataPromises ??= {};\n\nroot.Wistia._liveStreamPollingPromises ??= {};\n\nroot.Wistia.first ??= () => {\n  // eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-call\n  return root.Wistia.api() ?? document.querySelector('wistia-player');\n  // 👆 prefer the E-v1 api first, so for translated embeds, it'll use the TranslationApi, otherwise use the first wistia-player on the page\n};\n\nexport const Wistia = root.Wistia as WistiaGlobal;\n","import type { PublicApi, WistiaContainerHTMLElement } from '../types/player-api-types.ts';\nimport { getAllApiEmbedElements } from './getEmbedElements.ts';\nimport { wlog } from './wlog.js';\nimport { wData } from './wistiaData.js';\nimport { ensureString } from './hashedId.ts';\n\nexport type MatcherFunction = (\n  video?: MatcherFunction | PublicApi | WistiaContainerHTMLElement | 'removed' | null,\n) => void;\n\n/**\n * Initialized embeds are API embeds that have a wistiaApi property set on the\n * container. container.wistiaApi is set on legacy embeds in _public_api.js\n * @returns {PublicApi[]}\n */\nexport const getAllInitializedEmbedApiHandles = (): (PublicApi | 'removed' | undefined)[] => {\n  if (wData('video') === undefined) {\n    return [];\n  }\n  return Object.values(wData('video') as PublicApi[]);\n};\n\n/**\n * Get all initialized instances of the iframe api\n * @returns {PublicApi[]}\n */\nexport const getAllIframeApiHandles = (): (PublicApi | 'removed' | undefined)[] => {\n  if (wData('iframe_api') === undefined) {\n    return [];\n  }\n  return Object.values(wData('iframe_api') as PublicApi[]);\n};\n\n/**\n * Get all initialized instances of the API, inclusive of both\n * iframe API and regular embed public API\n * @returns {PublicApi[]}\n */\nexport const getAllApiHandles = (): (PublicApi | 'removed' | undefined)[] => {\n  return getAllInitializedEmbedApiHandles().concat(getAllIframeApiHandles());\n};\n\n/**\n * Get a single API handle by matcher\n * @param {Function | HTMLElement | number | string | undefined} matcher - The matcher\n * @returns {PublicApi | null}\n */\nexport const getOneApiHandle = (\n  matcher?: HTMLElement | MatcherFunction | number | string,\n  // fn?: MatcherFunction | undefined, // TODO: Handle the case where functions are provided\n): MatcherFunction | PublicApi | WistiaContainerHTMLElement | 'removed' | null => {\n  // If no matcher is provided, return the first api handle\n  if (matcher === undefined) {\n    return getAllApiHandles()[0] ?? null;\n  }\n\n  /* TODO: Handle the case where functions are provided to completely replicate\n   * the original behavior of the `Wistia.api` function from _async.coffee\n   * This will also require us to port over the Wistia.api.onFind function\n   *\n  // If a callback is provided, return the first api handle that matches\n  if (fn !== undefined) {\n    return onFindApiHandle(matcher, fn);\n  }\n\n  // If the matcher provided is a function, return the first api handle that matches\n  if (typeof matcher === 'function') {\n    return onFindApiHandle(matcher);\n  }\n   *\n   * END TODO\n   */\n\n  // TODO: Consider using the strategy pattern here to isolate the logic for these cases a little more!\n  let container: WistiaContainerHTMLElement | null = null;\n  if (typeof matcher === 'string') {\n    const query = matcher;\n\n    // Find by DOM ID\n    // Prefer unique-id attribute over id attribute\n    container =\n      document.querySelector(`[unique-id='${query}']`) ??\n      (document.getElementById(query) as WistiaContainerHTMLElement | null);\n\n    // Or find by fuzzy match on hashed ID or container\n    if (container === null) {\n      const apiHandles = getAllApiHandles();\n      const matchedHandle = apiHandles.find((handle: PublicApi) => {\n        // note: eslint flagged the logical OR below but it's intentional and necessary\n        // see: https://github.com/wistia/player-modern/pull/2964#discussion_r1274876654\n\n        if (handle.hashedId()?.startsWith(query) || handle.container?.id.startsWith(query)) {\n          return handle;\n        }\n\n        // not all public api handles will have this method\n        if ('mediaLanguages' in handle) {\n          const queryMatchesLocalization = handle.mediaLanguages().some((language) => {\n            return ensureString(language.hashedId).startsWith(query);\n          });\n\n          if (queryMatchesLocalization) {\n            return handle;\n          }\n\n          const queryMatchesSourceMediaId = ensureString(\n            handle._mediaData?.sourceHashedId,\n          ).startsWith(query);\n\n          if (queryMatchesSourceMediaId) {\n            return handle;\n          }\n        }\n\n        return null;\n      });\n      if (matchedHandle !== 'removed') {\n        container = (matchedHandle?.container as WistiaContainerHTMLElement | null) ?? null;\n      }\n    }\n  } else if (typeof matcher === 'number') {\n    let index = matcher;\n    const apiHandles = getAllApiHandles();\n    // Allow negative indices to get from the end\n    if (index < 0) {\n      index = apiHandles.length + index;\n    }\n\n    const apiHandle = apiHandles[index];\n    if (apiHandle !== undefined && apiHandle !== 'removed') {\n      container = apiHandle.container ?? null;\n    }\n  } else if (matcher instanceof HTMLElement) {\n    container = matcher as WistiaContainerHTMLElement;\n  } else {\n    wlog.error('Unrecognized matcher', matcher);\n  }\n\n  // If our container is a wistia-player web component, it handles its own API\n  // and we can just return it.\n  if (container?.tagName === 'WISTIA-PLAYER') {\n    // TODO: We need to call the PublicApi methods for now, but once WistiaPlayer\n    // is more built out we should be able to just send that over directly\n    return container.deprecatedApiDoNotUse as unknown as PublicApi;\n  }\n\n  // If the container has an API handle that isn't 'removed', return it\n  // More on 'removed': https://github.com/wistia/player-modern/pull/1280\n  if (container?.wistiaApi !== undefined && container.wistiaApi !== 'removed') {\n    return container.wistiaApi as unknown as PublicApi;\n  }\n  return null;\n};\n\n/**\n * Get a single API handle by ONLY hashed id, not by container id\n * @param {number | string | undefined} hashedId\n * @returns {PublicApi | null}\n */\nexport const getOneApiHandleFromHashedId = (\n  hashedId: string,\n): MatcherFunction | PublicApi | WistiaContainerHTMLElement | 'removed' | null => {\n  let container: WistiaContainerHTMLElement | null = null;\n  const query = hashedId;\n\n  // Find by fuzzy match on hashed ID\n  const apiHandles = getAllApiHandles();\n  const matchedHandle = apiHandles.find((handle: PublicApi) => {\n    if (handle.hashedId()?.startsWith(query)) {\n      return handle;\n    }\n    return null;\n  });\n\n  if (matchedHandle !== 'removed') {\n    container = (matchedHandle?.container as WistiaContainerHTMLElement | null) ?? null;\n  }\n\n  // If our container is a wistia-player web component, it handles its own API\n  // and we can just return it.\n  if (container?.tagName === 'WISTIA-PLAYER') {\n    // TODO: We need to call the PublicApi methods for now, but once WistiaPlayer\n    // is more built out we should be able to just send that over directly\n    return container.deprecatedApiDoNotUse as unknown as PublicApi;\n  }\n\n  // If the container has an API handle that isn't 'removed', return it\n  // More on 'removed': https://github.com/wistia/player-modern/pull/1280\n  if (container?.wistiaApi !== undefined && container.wistiaApi !== 'removed') {\n    return container.wistiaApi as unknown as PublicApi;\n  }\n  return null;\n};\n\n/**\n * Get all (non-iframe) API handles in the order they appear in the DOM\n * @returns {PublicApi[]}\n */\nexport const getAllApiHandlesByDomOrder = (): (PublicApi | 'removed' | undefined)[] => {\n  // Legacy embeds have a wistia_embed_initialized class added to the container\n  // when their public api is initialized and set (container.wistiaApi)\n  const legacyHandles = Array.from(\n    getAllApiEmbedElements('wistia_embed_initialized') as unknown as WistiaContainerHTMLElement[],\n  ).reduce((accumulator: PublicApi[], legacyContainer: WistiaContainerHTMLElement) => {\n    // Make sure the api has been initialized, set, and is not marked as 'removed'\n    if (\n      legacyContainer.wistiaApi !== undefined &&\n      legacyContainer.wistiaApi !== 'removed' &&\n      legacyContainer.wistiaApi !== null\n    ) {\n      accumulator.push(legacyContainer.wistiaApi);\n    }\n    return accumulator;\n  }, []);\n\n  const wistiaPlayerHandles = Array.from(document.querySelectorAll('wistia-player')).reduce(\n    (accumulator: PublicApi[], container: WistiaContainerHTMLElement) => {\n      if (\n        container.deprecatedApiDoNotUse !== undefined &&\n        container.deprecatedApiDoNotUse !== 'removed' &&\n        container.deprecatedApiDoNotUse !== null\n      ) {\n        accumulator.push(container.deprecatedApiDoNotUse);\n      }\n      return accumulator;\n    },\n    [],\n  );\n\n  return [...legacyHandles, ...wistiaPlayerHandles];\n};\n","import { bestImage, blankImage, sortedImages } from 'utilities/image.js';\nimport { Component, h, render } from 'preact';\nimport { assign } from 'utilities/obj.js';\nimport { elemInDom } from 'utilities/elem.js';\nimport { defineTranslations, getTranslation } from './translations.js';\n\ndefineTranslations('en-US', {\n  THUMBNAIL_VIDEO_THUMBNAIL: 'Video Thumbnail',\n});\n\nexport class Thumbnail extends Component {\n  constructor(props) {\n    super(props);\n    this.initialState = this.state = {\n      isLoaded: false,\n      isDisplaying: false,\n    };\n\n    this.onDisplay = this.props.onDisplay;\n  }\n\n  componentWillReceiveProps(nextProps) {\n    if (nextProps.images !== this.props.images) {\n      // clear the cache if we're changing which images to operate on.\n      this._sortedImages = null;\n      this.setState({ isLoaded: false, isDisplaying: false });\n    }\n\n    if (!this.onDisplay && nextProps.onDisplay) {\n      this.onDisplay = nextProps.onDisplay;\n    }\n  }\n\n  render() {\n    const altText =\n      this.props.thumbnailAltText !== undefined\n        ? this.props.thumbnailAltText\n        : this.translate('VIDEO_THUMBNAIL');\n    return (\n      <div style={this.wrapperStyle()} class=\"w-css-reset\">\n        <img\n          class=\"w-css-reset\"\n          srcset={this.props.images.length > 1 ? this.srcSet() : null}\n          src={this.bestSrc()}\n          style={this.imgStyle()}\n          alt={altText}\n          ref={(e) => (this.imgElem = e)}\n          aria-hidden={this.props.ariaHidden ? 'true' : null}\n        />\n      </div>\n    );\n  }\n\n  translate(key) {\n    return getTranslation(this.props.playerLanguage, `THUMBNAIL_${key}`);\n  }\n\n  componentDidMount() {\n    this.setStateBasedOnImgStatus();\n    this.maybeCallOnDisplay(this.initialState);\n  }\n\n  componentDidUpdate(prevProps, prevState) {\n    this.setStateBasedOnImgStatus();\n    this.maybeCallOnDisplay(prevState);\n  }\n\n  maybeCallOnDisplay() {\n    if (this.onDisplay && this.state.isDisplaying && !this.calledOnDisplay) {\n      // There may be components outside the thumbnail that depend on this.\n      // For example, we might not want to show controls until the thumbnail\n      // is displayed.\n      this.calledOnDisplay = true;\n      this.onDisplay();\n    }\n  }\n\n  setStateBasedOnImgStatus() {\n    const state = this.state;\n\n    const imgElem = this.imgElem;\n    if (state.isLoaded) {\n      return;\n    }\n\n    if (!imgElem.onload) {\n      imgElem.onload = () => {\n        if (elemInDom(imgElem)) {\n          this.setState({ isLoaded: true, isDisplaying: true });\n        }\n      };\n    }\n\n    if (imgElem.complete) {\n      this.setState({ isLoaded: true, isDisplaying: true });\n    }\n  }\n\n  wrapperStyle() {\n    const shouldShow = this.state.isDisplaying && this.props.isVisible;\n    return assign({}, this.props.wrapperStyle, {\n      display: this.state.isLoaded && !shouldShow ? 'none' : 'block',\n    });\n  }\n\n  baseStyle() {\n    const fitStrategy = this.props.fitStrategy;\n    if (fitStrategy === 'cover') {\n      return this.coverStyle();\n    }\n    if (fitStrategy === 'contain') {\n      return this.containStyle();\n    }\n    if (fitStrategy === 'fill') {\n      return this.fillStyle();\n    }\n    if (fitStrategy === 'naturalHeight') {\n      return this.naturalHeightStyle();\n    }\n    return this.containStyle();\n  }\n\n  imgStyle() {\n    const shouldShow = this.state.isDisplaying && this.props.isVisible;\n    return assign(this.baseStyle(), {\n      // We use position/clip to hide/show the thumbnail until it has loaded\n      // because the img may not try to load if it's not visible. But after\n      // it's loaded, we use display: none/block to defeat over-aggressive css\n      // that might do something like position: static !important.\n      clip: shouldShow ? 'auto' : 'rect(0,0,0,0)',\n      display: this.state.isLoaded && !shouldShow ? 'none' : 'block',\n      borderRadius: `${this.props.playerBorderRadius}px`,\n    });\n  }\n\n  containStyle() {\n    return {\n      backgroundColor: this.props.backgroundColor || '#000',\n      height: '100%',\n      objectFit: 'contain',\n      position: 'absolute',\n      width: '100%',\n      top: 0,\n      left: 0,\n    };\n  }\n\n  coverStyle() {\n    // IE11 does not support objectFit. Screw em.\n    return {\n      height: '100%',\n      objectFit: 'cover',\n      position: 'absolute',\n      width: '100%',\n    };\n  }\n\n  fillStyle() {\n    // Though object-fit will be ignored, this will work in IE1 because the\n    // default is to stretch the image.\n    return {\n      height: '100%',\n      objectFit: 'fill',\n      position: 'absolute',\n      width: '100%',\n    };\n  }\n\n  naturalHeightStyle() {\n    return {\n      width: '100%',\n      position: 'relative',\n    };\n  }\n\n  bestSrc() {\n    return bestImage(this.props.images, {\n      videoWidth: this.props.videoWidth,\n      videoHeight: this.props.videoHeight,\n    }).url;\n  }\n\n  srcSet() {\n    let sortedImages = this.sortedImages();\n\n    if (sortedImages.length === 0) {\n      sortedImages = [blankImage(this.props.videoWidth, this.props.videoHeight)];\n    }\n\n    return sortedImages\n      .map((image) => {\n        return `${image.url} ${image.width}w`;\n      })\n      .join(', ');\n  }\n\n  sortedImages() {\n    if (this._sortedImages) {\n      return this._sortedImages;\n    }\n\n    this._sortedImages = sortedImages(this.props.images);\n\n    return this._sortedImages;\n  }\n\n  stretchLimit() {\n    const stretchLimit = this.props.stretchLimit;\n    if (stretchLimit != null) {\n      return stretchLimit;\n    }\n    return 10;\n  }\n}\n","import { Wistia } from '../../../wistia_namespace.ts';\nimport { findScriptInDomBySrc } from '../../../utilities/script-utils.js';\nimport { mediaDataScriptRegExp, mediaDataUrl } from '../../../utilities/media_data.js';\nimport { eV1Protocol, mediaDataHost } from '../../../utilities/hosts.js';\nimport { mediaDataTransforms } from '../../../utilities/media-data-transforms.js';\nimport { cacheMediaData, getMediaDataFromCache } from '../../../utilities/remote-data-cache.ts';\nimport { isMediaDataError } from '../../../utilities/mediaDataError.ts';\nimport { clone } from '../../../utilities/obj.js';\nimport { fetchMediaData } from '../../../utilities/fetchMediaData.ts';\nimport type {\n  MediaData,\n  MediaDataServerResponse,\n  MediaDataServerErrorResponse,\n} from '../../../types/player-api-types.ts';\nimport type { FetchMediaDataOptions } from '../../../utilities/fetchMediaData.ts';\n\n// This file is designed to efficiently retrieve media data from multiple potential sources.\n// The goal is to obtain the media data as quickly as possible.\n// Our legacy embed scripts use JSONP and our new scripts use a JS module.\n// It includes functions to check for the presence of these JSONP and JavaScript embed scripts in the DOM,\n// which can provide the necessary media data.\n// If they aren't there or don't load fast enough, we use server data.\n\nconst INTERVAL_TIME = 15;\nconst JS_LOAD_TIMEOUT = 30000; // 30 seconds\nconst SERVER_FETCH_FALLBACK_TIMEOUT = 15000; // 15 seconds\n\nconst doesJsonpExist = (mediaId: string, options: FetchMediaDataOptions = {}): boolean => {\n  const url = mediaDataUrl(mediaId, options);\n  // the mediaDataUrl above 👆 ends with `json` and we're specifically looking for jsonp here\n  // also, really old embed codes may have added query params to the end of the url, which we want to exclude\n  const matchUrl = url.replace(/\\.json(?!p)/, '.jsonp').replace(/&$/, '');\n\n  const isJsonpScriptInDom = findScriptInDomBySrc(matchUrl, {\n    ignoreProtocol: true,\n    scriptRegex: mediaDataScriptRegExp(mediaId),\n  });\n\n  return Boolean(isJsonpScriptInDom);\n};\n\nconst jsScriptUrl = (mediaId: string, options: FetchMediaDataOptions = {}): string => {\n  const host = mediaDataHost(options) as string;\n  return `${eV1Protocol()}//${host}/embed/${mediaId}.js`;\n};\n\nconst doesJsMediaDataScriptExist = (\n  mediaId: string,\n  options: FetchMediaDataOptions = {},\n): boolean => {\n  const url = jsScriptUrl(mediaId, options);\n  const isJsScriptInDom = findScriptInDomBySrc(url, {\n    ignoreProtocol: true,\n  });\n\n  return Boolean(isJsScriptInDom);\n};\n\nconst pollForJsonp = async (\n  mediaId: string,\n  options: FetchMediaDataOptions,\n): Promise<MediaData | MediaDataServerErrorResponse> => {\n  return new Promise((resolve, reject) => {\n    let poll = -1;\n\n    // try looking once before the interval. This is especially useful for tests\n    // since using jest.useFakeTimers() doesn't work with this function\n    const checkForJsonp = () => {\n      const jsonp = window[`wistiajsonp-/embed/medias/${mediaId}.jsonp`] as\n        | MediaDataServerResponse\n        | undefined;\n\n      if (jsonp) {\n        if (jsonp.media) {\n          clearInterval(poll);\n\n          // Any data from speed demon scripts we know won't be localized, so we can\n          // cache it.\n          cacheMediaData(mediaId, jsonp.media);\n\n          // Still call fetchMediaData in case we need to get the localized version.\n          fetchMediaData(mediaId, options)\n            .then(resolve)\n            .catch(() => {\n              reject(new Error('Failed to fetch media data via jsonp'));\n            });\n          return;\n        }\n\n        if (isMediaDataError(jsonp)) {\n          clearInterval(poll);\n          resolve(jsonp);\n        }\n      }\n    };\n\n    checkForJsonp();\n\n    poll = window.setInterval(checkForJsonp, INTERVAL_TIME);\n\n    setTimeout(() => {\n      clearInterval(poll);\n      reject(new Error('Timeout loading jsonp media data'));\n    }, JS_LOAD_TIMEOUT);\n  });\n};\n\nconst getJsScript = async (\n  mediaId: string,\n  options: FetchMediaDataOptions = {},\n): Promise<MediaData | MediaDataServerErrorResponse> => {\n  const url = jsScriptUrl(mediaId, options);\n  return new Promise((resolve, reject) => {\n    setTimeout(() => {\n      reject(new Error('Timeout loading js media data'));\n    }, JS_LOAD_TIMEOUT);\n    void import(/* webpackIgnore: true */ url)\n      .then((module: { mediaData: MediaDataServerResponse }) => {\n        const { mediaData } = module;\n\n        // Any data from speed demon scripts we know won't be localized, so we can\n        // cache it.\n        cacheMediaData(mediaId, mediaData as MediaData);\n\n        fetchMediaData(mediaId, options)\n          .then(resolve)\n          .catch(() => {\n            reject(new Error('Failed to fetch media data via js script'));\n          });\n      })\n      .catch(() => {\n        reject(new Error('Failed to load js media data'));\n      });\n  });\n};\n\nconst fetchMediaDataDelayed = (\n  mediaId: string,\n  options: FetchMediaDataOptions = {},\n): [Promise<MediaData | MediaDataServerErrorResponse>, { current: number }] => {\n  const timeoutRef = { current: -1 };\n  const promise = new Promise<MediaData | MediaDataServerErrorResponse>((resolve, reject) => {\n    timeoutRef.current = window.setTimeout(() => {\n      void fetchMediaData(mediaId, options)\n        .then(resolve)\n        .catch((err: unknown) => {\n          reject(err instanceof Error ? err : new Error(String(err)));\n        });\n    }, SERVER_FETCH_FALLBACK_TIMEOUT);\n  });\n  return [promise, timeoutRef];\n};\n\nexport const getInitialMediaData = async (\n  mediaId: string,\n  options: FetchMediaDataOptions = {},\n): Promise<MediaData | MediaDataServerErrorResponse> => {\n  // If the media data is already in the cache, no need to wait for everything\n  // else.  Also, if we've cached from an external source like password\n  // protected video, this lets us respect that value.\n  const mediaDataFromCache = getMediaDataFromCache(mediaId);\n  if (mediaDataFromCache != null && options.skipCache !== true) {\n    return fetchMediaData(mediaId, options);\n  }\n\n  const inlineMediaData = Wistia._inlineMediaData?.[mediaId];\n  if (inlineMediaData != null) {\n    // Any data from inline media data we know won't be localized, so we can\n    // cache it.\n    const clonedInlineMediaData = clone(inlineMediaData) as MediaData;\n    mediaDataTransforms(clonedInlineMediaData, options);\n    cacheMediaData(mediaId, clonedInlineMediaData);\n    // Still call fetchMediaData in case we need to get the localized version.\n    return fetchMediaData(mediaId, options);\n  }\n\n  const speedDemonPromises: Promise<MediaData | MediaDataServerErrorResponse>[] = [];\n\n  if (doesJsonpExist(mediaId, options)) {\n    speedDemonPromises.push(pollForJsonp(mediaId, options));\n  }\n\n  if (doesJsMediaDataScriptExist(mediaId, options)) {\n    speedDemonPromises.push(getJsScript(mediaId, options));\n  }\n\n  // eslint-disable-next-line @typescript-eslint/init-declarations\n  let mediaData: MediaData | MediaDataServerErrorResponse | undefined;\n\n  if (speedDemonPromises.length === 0) {\n    // If we get the json from the server, it'll do its own caching and mediaDataTransforms,\n    // so we don't want to do that here. Doing so here could assign the mediaData to the\n    // wrong mediaId (if it's localized) in the cache or double transform the data.\n    mediaData = await fetchMediaData(mediaId, options);\n  } else {\n    const [delayedMediaDataPromise, delayedFetchTimeoutRef] = fetchMediaDataDelayed(\n      mediaId,\n      options,\n    );\n    mediaData = await Promise.any([...speedDemonPromises, delayedMediaDataPromise]);\n    clearTimeout(delayedFetchTimeoutRef.current);\n  }\n\n  return mediaData;\n};\n","import { root } from 'utilities/root.js';\nimport { Url, proto as urlProto } from 'utilities/url.js';\nimport { appHostname, getSubdomainSuffixHostname } from '../appHostname.js';\n\nconst APP_WISTIA_COM = appHostname('app');\nconst CDN_FAST_PROTECTED_WISTIA_COM = appHostname('fast-protected');\nconst CDN_FAST_WISTIA_COM = appHostname('fast');\nconst CDN_FAST_WISTIA_CANARY = process.env.FAST_HOSTNAME_CANARY;\n\nexport const EMBED_HOST = process.env.EMBED_HOST;\n\nexport const PROD_FAST_HOSTNAME_NET = 'fast.wistia.net';\nexport const PROD_FAST_HOSTNAME_COM = 'fast.wistia.com';\n\nexport const PROD_EMBED_HOST = 'embed.wistia.com';\nexport const PROD_SSL_EMBED_HOST = 'embed-ssl.wistia.com';\n\nexport const PROD_FASTLY_SSL_HOST = 'embed-fastly.wistia.com';\n\nexport const SSL_EMBED_HOST = process.env.SSL_EMBED_HOST;\n\nexport const TAGGED_VERSION = process.env.TAGGED_VERSION || '';\n\nexport const CURRENT_SHA = process.env.CURRENT_SHA || '';\n\nconst DEFAULT_PROTOCOL = (() => {\n  if (typeof window !== 'undefined' && root === window && root.location) {\n    return root.location.protocol;\n  }\n  return 'https:';\n})();\n\nconst sslOrNonSsl = (protocol, sslHost, nonSslHost) => {\n  return protocol === 'https:' ? sslHost : nonSslHost;\n};\n\nexport const deliveryHost = (protocol = DEFAULT_PROTOCOL) => {\n  return sslOrNonSsl(protocol, SSL_EMBED_HOST, EMBED_HOST);\n};\n\nexport const appHost = () => {\n  return APP_WISTIA_COM;\n};\n/**\n * Checks if we're running in a cloud dev environment or exposing a public endpoint\n * via a dev metal tunnel and returns the appropriate fast hostname\n * @returns {string|null} The fast hostname for cloud dev environment, or null if not in cloud dev\n */\nexport const getDevFastHostname = () => {\n  const fastDevHostname = getSubdomainSuffixHostname('fast');\n  if (fastDevHostname) {\n    return fastDevHostname;\n  }\n  return null;\n};\n\n/**\n * @param {string} embedHost\n * @returns {string}\n */\nexport const cdnFastWistiaComHost = (embedHost = undefined) => {\n  if (embedHost) {\n    return embedHost;\n  }\n\n  const devFastHostname = getDevFastHostname();\n  if (devFastHostname) {\n    return devFastHostname;\n  }\n\n  return CDN_FAST_WISTIA_COM;\n};\n\nexport const cdnFastProtectedWistiaComHost = (assetHost) => {\n  if (assetHost) {\n    return assetHost;\n  }\n  return CDN_FAST_PROTECTED_WISTIA_COM;\n};\n\nexport const cdnFastWistiaNetHost = () => {\n  const devFastHostname = getDevFastHostname();\n  if (devFastHostname) {\n    return devFastHostname;\n  }\n\n  const hostName = process.env.BASE_HOSTNAME || process.env.FAST_HOSTNAME_NET;\n  return `fast.${hostName}`;\n};\n\nexport const cdnFastWistiaCanaryHost = () => {\n  return CDN_FAST_WISTIA_CANARY;\n};\n// We run this immediately because we'll be guaranteed that E-v1 is in the DOM\n// when this is executing--unless we're loading a legacy thing like\n// playlist-v1.js or embed-shepherd_v1.js. We can use the result to determine\n// what host we should load other dynamic assets on.\nexport const eV1Url = (() => {\n  const scripts = document.getElementsByTagName('script');\n  for (let i = 0; i < scripts.length; i++) {\n    const s = scripts[i];\n    if (s.src) {\n      const url = new Url(s.src);\n\n      // Check that this is definitely our script.\n      const pathIsEv1 = /\\/assets\\/external\\/E-v1?\\.js$/.test(url.rawPath);\n      const hasKnownHost =\n        url.host === cdnFastWistiaComHost() ||\n        url.host === cdnFastWistiaNetHost() ||\n        url.host === cdnFastWistiaCanaryHost();\n\n      // Check that the script's protocol is sensible for the page we're on.\n      const usesHttpsIfRequired = location.protocol === 'https:' && url.protocol === 'https:';\n      const isProtocolRelative = url.protocol === '' || url.protocol == null;\n      const protoIsSane =\n        usesHttpsIfRequired || isProtocolRelative || location.protocol === 'http:';\n\n      // It's possible there are multiple versions of the script and one failed\n      // to load. Let's use the domain that succeeded.\n      const scriptHasLoaded = !s.readyState || /loaded|complete/.test(s.readyState);\n\n      if (pathIsEv1 && hasKnownHost && protoIsSane && scriptHasLoaded) {\n        return url;\n      }\n    }\n  }\n\n  // If we can't find an instance of E-v1 matching\n  return new Url(`${urlProto()}//${cdnFastWistiaNetHost()}/E-v1.js`);\n})();\n\n/**\n * @returns { string } string of the host\n */\nexport const eV1Host = () => {\n  return eV1Url.host;\n};\n\n/**\n * @returns { string } string of the host with port\n */\nexport const eV1HostWithPort = () => {\n  if (eV1Url.port) {\n    return `${eV1Host()}:${eV1Url.port}`;\n  }\n\n  return eV1Host();\n};\n\n/**\n * @returns { string } string of the protocol\n */\nexport const eV1Protocol = () => {\n  return eV1Url.protocol;\n};\n\nexport const mediaDataHost = (options = {}) => {\n  // If embedHost is specified, just use that.\n  if (options.embedHost) {\n    return forceValidFastWistiaHost(options.embedHost);\n  }\n\n  // Try to match whatever host E-v1 is set to by default.\n  return eV1HostWithPort();\n};\n\nexport const metricsHost = () => {\n  const hostname = process.env.BASE_HOSTNAME ? process.env.BASE_HOSTNAME : process.env.METRICS_HOST;\n\n  return `pipedream.${hostname}`;\n};\n\nconst VALID_PRODUCTION_HOSTS = ['wistia.net', 'wistia.com'];\n\n// We have some non-production hosts in here to allow connecting to the player via ngrok - which\n// is used for testing Live in VMA.\nexport const VALID_FASTLY_HOSTS = [\n  ...VALID_PRODUCTION_HOSTS,\n  'wistia.mx', // ngrok hosts\n  'wistia.dev',\n  'wistia.tech',\n  'wistia.am',\n  'wistia.se',\n  'wistia.io', // development\n  'wistia.st', // staging\n];\n\nconst VALID_FASTLY_HOSTS_R = new RegExp(\n  `(${VALID_FASTLY_HOSTS.map((h) => `\\\\.${h.replace('.', '\\\\.')}`).join('|')})$`,\n);\n\nexport const forceValidFastWistiaHost = (host) => {\n  if (host && VALID_FASTLY_HOSTS_R.test(host)) {\n    return host;\n  }\n\n  return eV1HostWithPort();\n};\n\n/**\n * Checks to see if the window location is a page that's hosted by wistia,\n * e.g., https://app.wistia.com, http://player.wistia.io, https://customer-name.wistia.com\n *\n * If so, return false.\n *\n * @returns boolean\n */\nexport const isEmbedOnACustomerPage = () => {\n  return window.location.href.match(/^http(s)?:\\/\\/(\\S)*.wistia.(io|test|st|com)/gi) === null;\n};\n","import { runScripts } from 'utilities/script-utils.js';\n\nexport const getScriptTags = (htmlStr) => {\n  return htmlStr.match(/<script.*?src[^>]*>\\s*<\\/script>|<script.*?>[\\s\\S]+?<\\/script>/gi) || [];\n};\n\nexport const scriptTagsToRunScriptsInput = (scriptTags) => {\n  if (!scriptTags) {\n    return [];\n  }\n  if (!(scriptTags instanceof Array)) {\n    scriptTags = getScriptTags(scriptTags);\n  }\n  const hashes = [];\n  for (let i = 0; i < scriptTags.length; i++) {\n    let scriptTag = scriptTags[i];\n    let hash = {};\n    let matches = scriptTag.match(/<script.*?>/i);\n    if (matches) {\n      matches = matches[0].match(/src=\"([^\"]+)\"/i);\n      if (matches) {\n        hash.src = matches[1];\n        hash.async = /async/i.test(scriptTag.replace(hash.src, ''));\n      }\n    }\n    if (!matches) {\n      matches = scriptTag.match(/<script>([\\s\\S]+?)<\\/script>/i);\n      if (matches) {\n        let src = matches[1];\n        hash.fn = function () {\n          // eslint-disable-next-line no-eval\n          return eval(src);\n        };\n      }\n    }\n    hashes.push(hash);\n  }\n  return hashes;\n};\n\nexport const execScriptTags = (scriptTags, callback) => {\n  if (!scriptTags) {\n    return null;\n  }\n  const hashes = scriptTagsToRunScriptsInput(scriptTags);\n  return runScripts(hashes).then(callback);\n};\n\nexport const removeScriptTags = (htmlStr) => {\n  return htmlStr.replace(/<script.*?src[^>]*>\\s*<\\/script>|<script>[\\s\\S]+?<\\/script>/g, '');\n};\n","import merge from 'lodash.merge';\nimport cloneDeep from 'lodash.clonedeep';\nimport { cast } from '../../../utilities/obj.js';\nimport type { MediaData } from '../../../types/player-api-types.ts';\nimport type { EmbedOptions } from '../../../types/EmbedOptions.ts';\n\ninterface SourceEmbedOptions {\n  domOptions?: EmbedOptions;\n  iframeOptions?: EmbedOptions;\n  mediaDataOptions?: EmbedOptions;\n  wistiaWindowOptions?: EmbedOptions;\n}\n\nexport class PlayerDataHandler {\n  // Embed options set after initialization which override the embed options\n  // gathered from the source data\n  #embedOptionOverrides: EmbedOptions = {};\n\n  // Merged embed options gathered from source data\n  #embedOptions: EmbedOptions = {};\n\n  // Merged media data gathered from source data\n  #mediaData: MediaData = {};\n\n  // Source data which is used to create the final embed options\n  readonly #sourceEmbedOptions: SourceEmbedOptions = {\n    domOptions: {} as EmbedOptions,\n    iframeOptions: {} as EmbedOptions,\n    mediaDataOptions: {} as EmbedOptions,\n    wistiaWindowOptions: {} as EmbedOptions,\n  };\n\n  // Source data which is used to create the final media data\n  #sourceMediaData: MediaData = {};\n\n  /**\n   * Returns the final embed options which are a merge of all the source data and the overrides\n   * @returns {EmbedOptions}\n   * @readonly\n   */\n  public get embedOptions(): EmbedOptions {\n    return this.#embedOptions;\n  }\n\n  /**\n   * Returns the final media data which is a merge of all the source data\n   * @returns {MediaData}\n   * @readonly\n   */\n  public get mediaData(): MediaData {\n    // Our embed options can be overridden after our initial source data fetches\n    // Make sure the embed options within the media data are up to date\n    this.#mediaData.embedOptions = this.#embedOptions;\n    return this.#mediaData;\n  }\n\n  /**\n   * Sets the source data for the embed options set on the <wistia-player> DOM element\n   * @param {EmbedOptions} data\n   * @returns {void}\n   */\n  public setDomEmbedOptionSource(data: EmbedOptions): void {\n    this.#sourceEmbedOptions.domOptions = data;\n    this.#updatePlayerEmbedOptions();\n  }\n\n  /**\n   * Sets the source data for the embed options from an iframe's url search params\n   * @returns {void}\n   */\n  public setIframeEmbedOptionSource(data: EmbedOptions): void {\n    this.#sourceEmbedOptions.iframeOptions = data;\n    this.#updatePlayerEmbedOptions();\n  }\n\n  /**\n   * Sets the source data for the media data\n   * @param {MediaData} data\n   * @returns {void}\n   */\n  public setMediaDataSource(data: MediaData): void {\n    this.#sourceMediaData = data;\n    this.#mediaData = cast(cloneDeep(this.#sourceMediaData)) as MediaData;\n    // Sometimes the hashedId has no alpha characters, so cast() will convert it to a number.\n    // Our api expects hashedId to be a string, so we need to convert it back.\n    if (this.#mediaData.hashedId !== undefined) {\n      this.#mediaData.hashedId = this.#mediaData.hashedId.toString();\n    }\n\n    this.#sourceEmbedOptions.mediaDataOptions = cloneDeep(this.#mediaData.embedOptions) ?? {};\n    this.#updatePlayerEmbedOptions();\n  }\n\n  /**\n   * Sets the source data for the embed options set on the window via wistiaOptions\n   * @param {EmbedOptions} data\n   * @returns {void}\n   */\n  public setWistiaWindowEmbedOptionSource(data: EmbedOptions): void {\n    this.#sourceEmbedOptions.wistiaWindowOptions = data;\n    this.#updatePlayerEmbedOptions();\n  }\n\n  /**\n   * Updates the embed option overrides which will be merged with the source embed option data\n   * This merge can happen more frequently than our finite source data sets, which is why it's separate.\n   * That way we don't have to re-merge the source data every time we update the overrides.\n   * @param {EmbedOptions} data\n   * @returns {void}\n   */\n  public updateEmbedOptionOverrides(data: EmbedOptions): void {\n    this.#embedOptionOverrides = merge(this.#embedOptionOverrides, data);\n    this.#embedOptions = merge(this.#embedOptions, this.#embedOptionOverrides);\n  }\n\n  /**\n   * Merge the source embed options together to create a single source of truth of embed options\n   * @private\n   * @returns {void}\n   */\n  #updatePlayerEmbedOptions(): void {\n    const { mediaDataOptions, wistiaWindowOptions, domOptions, iframeOptions } =\n      this.#sourceEmbedOptions;\n\n    // Merge the embed options together to create a single source of truth of embed options\n    this.#embedOptions = cast(\n      merge(\n        {},\n        mediaDataOptions ?? {},\n        wistiaWindowOptions ?? {},\n        domOptions ?? {},\n        iframeOptions ?? {},\n        this.#embedOptionOverrides,\n      ),\n    ) as EmbedOptions;\n\n    // Make sure the embed options within the media data are up to date\n    this.#mediaData.embedOptions = this.#embedOptions;\n  }\n}\n","\"use strict\";\n/**\n * @description A module for parsing ISO8601 durations\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toSeconds = exports.end = exports.parse = exports.pattern = void 0;\n/**\n * The pattern used for parsing ISO8601 duration (PnYnMnWnDTnHnMnS).\n */\n// PnYnMnWnDTnHnMnS\nvar numbers = \"\\\\d+\";\nvar fractionalNumbers = \"\".concat(numbers, \"(?:[\\\\.,]\").concat(numbers, \")?\");\nvar datePattern = \"(\".concat(numbers, \"Y)?(\").concat(numbers, \"M)?(\").concat(numbers, \"W)?(\").concat(numbers, \"D)?\");\nvar timePattern = \"T(\".concat(fractionalNumbers, \"H)?(\").concat(fractionalNumbers, \"M)?(\").concat(fractionalNumbers, \"S)?\");\nvar iso8601 = \"P(?:\".concat(datePattern, \"(?:\").concat(timePattern, \")?)\");\nvar objMap = [\n    \"years\",\n    \"months\",\n    \"weeks\",\n    \"days\",\n    \"hours\",\n    \"minutes\",\n    \"seconds\",\n];\nvar defaultDuration = Object.freeze({\n    years: 0,\n    months: 0,\n    weeks: 0,\n    days: 0,\n    hours: 0,\n    minutes: 0,\n    seconds: 0,\n});\n/**\n * The ISO8601 regex for matching / testing durations\n */\nexports.pattern = new RegExp(iso8601);\n/** Parse PnYnMnDTnHnMnS format to object */\nvar parse = function (durationString) {\n    var matches = durationString.replace(/,/g, \".\").match(exports.pattern);\n    if (!matches) {\n        throw new RangeError(\"invalid duration: \".concat(durationString));\n    }\n    // Slice away first entry in match-array (the input string)\n    var slicedMatches = matches.slice(1);\n    if (slicedMatches.filter(function (v) { return v != null; }).length === 0) {\n        throw new RangeError(\"invalid duration: \".concat(durationString));\n    }\n    // Check only one fraction is used\n    if (slicedMatches.filter(function (v) { return /\\./.test(v || \"\"); }).length > 1) {\n        throw new RangeError(\"only the smallest unit can be fractional\");\n    }\n    return slicedMatches.reduce(function (prev, next, idx) {\n        prev[objMap[idx]] = parseFloat(next || \"0\") || 0;\n        return prev;\n    }, {});\n};\nexports.parse = parse;\n/** Convert ISO8601 duration object to an end Date. */\nvar end = function (durationInput, startDate) {\n    if (startDate === void 0) { startDate = new Date(); }\n    var duration = Object.assign({}, defaultDuration, durationInput);\n    // Create two equal timestamps, add duration to 'then' and return time difference\n    var timestamp = startDate.getTime();\n    var then = new Date(timestamp);\n    then.setFullYear(then.getFullYear() + duration.years);\n    then.setMonth(then.getMonth() + duration.months);\n    then.setDate(then.getDate() + duration.days);\n    // set time as milliseconds to get fractions working for minutes/hours\n    var hoursInMs = duration.hours * 3600 * 1000;\n    var minutesInMs = duration.minutes * 60 * 1000;\n    then.setMilliseconds(then.getMilliseconds() + duration.seconds * 1000 + hoursInMs + minutesInMs);\n    // Special case weeks\n    then.setDate(then.getDate() + duration.weeks * 7);\n    return then;\n};\nexports.end = end;\n/** Convert ISO8601 duration object to seconds */\nvar toSeconds = function (durationInput, startDate) {\n    if (startDate === void 0) { startDate = new Date(); }\n    var duration = Object.assign({}, defaultDuration, durationInput);\n    var timestamp = startDate.getTime();\n    var now = new Date(timestamp);\n    var then = (0, exports.end)(duration, now);\n    // Account for timezone offset between start and end date\n    var tzStart = startDate.getTimezoneOffset();\n    var tzEnd = then.getTimezoneOffset();\n    var tzOffsetSeconds = (tzStart - tzEnd) * 60;\n    var seconds = (then.getTime() - now.getTime()) / 1000;\n    return seconds + tzOffsetSeconds;\n};\nexports.toSeconds = toSeconds;\nexports.default = {\n    end: exports.end,\n    toSeconds: exports.toSeconds,\n    pattern: exports.pattern,\n    parse: exports.parse,\n};\n","/* eslint no-console: \"off\" */\n/*\n * wlog\n *\n * wlog seeks to give us flexibility and power.\n *\n * Basic usage:\n *\n *     import {Logger} from 'utilities/wlog.js';\n *     const logger = new Logger();\n *\n *     logger.error(exception); // this will print the message and stack nicely\n *     logger.error('an error');\n *     logger.info('informational');\n *     logger.warn('a warning');\n *     logger.debug('really high volume stuff');\n *\n * You can change the level:\n *\n *     logger.setLevel(LOG_LEVELS.INFO);\n *\n * You can change grep (include matching) and grepv (exclude matching):\n *\n *     logger.setGrep('include only lines matching this text');\n *     logger.setGrepv('exclude any lines matching this text');\n *\n * If you want loggers to share context--for example, all logs for the player\n * should send to the same first1000LogLines and last1000LogLines caches.\n *\n *     Wistia.wlog = Wistia.wlog || {};\n *     const logger = new Logger(Wistia.wlog);\n *\n * A more advanced case would be to return the context in a function. This is\n * helpful if your logger is initialized/configured in one point, but used in\n * others that don't need to know about that configuration. In fact, this is\n * how the `wlog` constant is setup at the bottom of this file.\n *\n * We often want to have a global logger, but prefix certain portions of it.\n *\n *     const myLogger = logger.getPrefixedFunctions('my prefix');\n *     myLogger.info('aha'); // outputs \"my prefix aha\"\n *\n * A prefix can be a string or an array of strings. It can also be a function\n * that returns a string or an array of strings.\n *\n * In the above example, `myLogger` is a simple Object with defined logging\n * functions and fixed `this` context:\n *\n *    {\n *      error: (...messages) => { ... },\n *      warn: (...messages) => { ... },\n *      info: (...messages) => { ... },\n *      etc...\n *    }\n *\n * So it can also be used as a mix-in for other objects, e.g.\n *\n *    import {Logger} from 'utilities/wlog.js';\n *    class MyThing {\n *      constructor () {\n *        this.logger = new Logger().getPrefixedFunctions(this.logPrefix);\n *        for (let k in this.logger) {\n *          this[k] = this.logger[k];\n *        }\n *        this.info('my mixed-in logger is setup!');\n *      }\n *\n *      logPrefix = () => {\n *        return [this.id, this.variable];\n *      }\n *    }\n */\nimport { globalTrigger } from 'utilities/globalBindAndTrigger.js';\nimport { Wistia } from '../wistia_namespace.ts';\n\nexport const ERROR = 0;\nexport const WARNING = 1;\nexport const NOTICE = 2;\nexport const INFO = 3;\nexport const DEBUG = 4;\nexport const LOG_LEVELS = {\n  ERROR,\n  WARNING,\n  NOTICE,\n  INFO,\n  DEBUG,\n  error: ERROR,\n  warning: WARNING,\n  notice: NOTICE,\n  info: INFO,\n  debug: DEBUG,\n};\n\nconst NOOP = function () {};\n\nexport const Logger = function (ctx) {\n  const self = this;\n\n  if (ctx == null) {\n    ctx = {};\n  }\n\n  const construct = function () {\n    self.ctx = ctx;\n    if (!self.ctx.initializedAt) {\n      self.reset();\n    }\n  };\n\n  self.error = (...messages) => {\n    return self.log(ERROR, messages);\n  };\n  self.warn = (...messages) => {\n    return self.log(WARNING, messages);\n  };\n  self.notice = (...messages) => {\n    return self.log(WARNING, messages);\n  };\n  self.info = (...messages) => {\n    return self.log(INFO, messages);\n  };\n  self.debug = (...messages) => {\n    return self.log(DEBUG, messages);\n  };\n\n  construct();\n\n  return self;\n};\n\nconst lproto = Logger.prototype;\n\nlproto.reset = function () {\n  this.ctx.level = ERROR;\n  this.ctx.grep = null;\n  this.ctx.grepv = null;\n  this.ctx.first1000LogLines = [];\n  this.ctx.last1000LogLines = [];\n  this.ctx.initializedAt = new Date().getTime();\n};\n\nlproto.setLevel = function (level) {\n  const logFunc = this.logFunc(INFO);\n  if (LOG_LEVELS[level] != null) {\n    this.ctx.level = LOG_LEVELS[level];\n    logFunc(`Log level set to \"${level}\" (${LOG_LEVELS[level]})`);\n  } else {\n    logFunc(`Unknown log level \"${level}\"`);\n  }\n};\n\nlproto.setGrep = function (grep) {\n  this.ctx.grep = grep;\n};\n\nlproto.setGrepv = function (grepv) {\n  this.ctx.grepv = grepv;\n};\n\nlproto.first1000LogLines = function () {\n  return this.ctx.first1000LogLines;\n};\n\nlproto.last1000LogLines = function () {\n  return this.ctx.last1000LogLines;\n};\n\nlproto.matchedGrep = function (messages) {\n  let matched = false;\n  if (this.ctx.grep || this.ctx.grepv) {\n    let messageStrings = [];\n    for (let i = 0; i < messages.length; i++) {\n      try {\n        let message = messages[i];\n        messageStrings.push(message.toString && message.toString());\n      } catch (e) {\n        messageStrings.push('');\n      }\n    }\n    let fullLine = messageStrings.join(' ');\n    let matchesGrep = !this.ctx.grep || fullLine.match(this.ctx.grep);\n    let matchesGrepv = !this.ctx.grepv || !fullLine.match(this.ctx.grepv);\n    matched = matchesGrep && matchesGrepv;\n  } else {\n    matched = true;\n  }\n  return matched;\n};\n\nlproto.now = function () {\n  // IE9 has window.performance, but not performance.now\n  if (typeof performance !== 'undefined' && typeof performance.now === 'function') {\n    return performance.now().toFixed(3);\n  }\n  if (Date.now) {\n    return Date.now() - this.ctx.initializedAt;\n  }\n  return new Date().getTime() - this.ctx.initializedAt;\n};\n\nlproto.messagesToLogLine = function (level, time, messages) {\n  let logLine = [level, time];\n  logLine = logLine.concat(messages);\n  let cappedLine;\n  try {\n    cappedLine = logLine.join(' ') || '';\n    if (cappedLine.length > 200) {\n      cappedLine = cappedLine.slice(0, 200);\n    }\n  } catch (e1) {\n    cappedLine = 'could not serialize';\n  }\n  return cappedLine;\n};\n\nlproto.persistLine = function (logLine) {\n  if (this.ctx.first1000LogLines.length < 1000) {\n    this.ctx.first1000LogLines.push(logLine);\n  } else {\n    if (this.ctx.last1000LogLines.length >= 1000) {\n      this.ctx.last1000LogLines.shift();\n    }\n    this.ctx.last1000LogLines.push(logLine);\n  }\n};\n\nlproto.log = function (level, messages) {\n  const withinLevel = level <= this.ctx.level;\n  const notDebug = level < DEBUG;\n  const matched = (withinLevel || notDebug) && this.matchedGrep(messages);\n\n  if (level === ERROR) {\n    globalTrigger('problem', {\n      type: 'error-logged',\n      data: { messages },\n    });\n  }\n\n  let now;\n  if (matched && (withinLevel || notDebug)) {\n    // This is initialized conditionally as a micro-optimization. We call\n    // this function _a lot_, and new Date().getTime() (used on older\n    // browsers) is expensive.\n    now = this.now();\n  }\n\n  // Don't store \"debug\" lines, but keep the first and last 1000 lines so we\n  // can send it with problem reports.\n  if (notDebug && matched) {\n    const logLine = this.messagesToLogLine(level, now, messages);\n    this.persistLine(logLine);\n  }\n\n  // Output that log to the console! Minus info that is distracting like the\n  // timestamp and log level.\n  if (withinLevel && matched) {\n    const logFunc = this.logFunc(level);\n    let e;\n    if (messages.length === 1 && (e = messages[0]) instanceof Error) {\n      logFunc(e.message);\n      if (e.stack) {\n        logFunc(e.stack);\n      }\n    } else {\n      logFunc(...messages);\n    }\n  }\n};\n\nconst logError = function (...messages) {\n  console.error.apply(console, messages);\n};\n\nconst logWarn = function (...messages) {\n  console.warn.apply(console, messages);\n};\n\nconst logInfo = function (...messages) {\n  console.info.apply(console, messages);\n};\n\nconst logDebug = function (...messages) {\n  console.debug.apply(console, messages);\n};\n\nconst logLog = function (messages) {\n  console.log.apply(console, messages);\n};\n\nlproto.logFunc = function (level) {\n  if (level == null) {\n    level = this.level;\n  }\n\n  if (!console) {\n    return NOOP;\n  }\n\n  let func;\n  if (level === ERROR) {\n    func = logError;\n  } else if (level === WARNING) {\n    func = logWarn;\n  } else if (level === INFO) {\n    func = logInfo;\n  } else if (level === DEBUG) {\n    func = logDebug;\n  }\n\n  if (!func) {\n    func = logLog;\n  }\n\n  if (typeof func !== 'function') {\n    // This should pretty much never happen, but if it does, we could only\n    // tell by checking the value of logger.noConsoleLog.\n    this.noConsoleLog = true;\n    func = NOOP;\n  }\n\n  return func;\n};\n\nlproto.maybePrefix = function (prefix, messages) {\n  if (prefix) {\n    // prefix can be a fixed value, or a function that returns a value.\n    if (typeof prefix === 'function') {\n      try {\n        prefix = prefix();\n      } catch (e) {\n        prefix = `prefix err \"${e.message}\"`;\n      }\n    }\n\n    if (prefix instanceof Array) {\n      return prefix.concat(messages);\n    }\n    return [prefix].concat(messages);\n  }\n  return messages;\n};\n\n// Return a hash of functions so we can easily setup prefixes and mix in the\n// results.\nlproto.getPrefixedFunctions = function (prefix) {\n  return {\n    log: (...messages) => {\n      return this.log(ERROR, this.maybePrefix(prefix, messages));\n    },\n    error: (...messages) => {\n      return this.log(ERROR, this.maybePrefix(prefix, messages));\n    },\n    warn: (...messages) => {\n      return this.log(WARNING, this.maybePrefix(prefix, messages));\n    },\n    notice: (...messages) => {\n      return this.log(WARNING, this.maybePrefix(prefix, messages));\n    },\n    info: (...messages) => {\n      return this.log(INFO, this.maybePrefix(prefix, messages));\n    },\n    debug: (...messages) => {\n      return this.log(DEBUG, this.maybePrefix(prefix, messages));\n    },\n  };\n};\n\n// This should work in either the browser or node.\nif (Wistia && Wistia.wlogCtx == null) {\n  Wistia.wlogCtx = {};\n}\nexport const wlog = new Logger(Wistia.wlogCtx);\n","import { h, JSX, Ref } from 'preact';\nimport { useState } from 'preact/hooks';\nimport { BigPlayButtonSVG } from './svgs/BigPlayButtonSVG.tsx';\nimport { getTranslation } from '../../../../../shared/translations.js';\nimport { Color } from '../../../../../../utilities/color.js';\nimport { unescapeHtml } from '../../../../../../utilities/core.js';\nimport { cachedDetect } from '../../../../../../utilities/detect.js';\nimport { flexibleDuration } from '../../../../../../utilities/duration.ts';\nimport { interNumbersSemiBold } from '../../../../../../utilities/interFontFamily.js';\nimport {\n  adjustColorForProperContrast,\n  getVideoPlayerIconColor,\n} from '../../../../../../utilities/color-utils.ts';\n\nconst detect = cachedDetect() as { edge: boolean };\n\nexport const BASE_BUTTON_WIDTH = 125;\nexport const BASE_BUTTON_HEIGHT = 80;\n\nconst BASE_FONT_SIZE = 18;\nconst BASE_LINE_HEIGHT = 30;\n\nconst ALPHA_MIX_BLEND_MODE = 0.7;\nconst ALPHA_NO_MIX_BLEND_MODE = 0.85;\n\ninterface BigPlayButtonProps {\n  backgroundGradientCss?: string | null;\n  baseHeight?: number;\n  baseWidth?: number;\n  borderRadius: number;\n  buttonTabIndex: number;\n  color?: string;\n  controlBarDistance?: number;\n  duration: number;\n  elemRef?: Ref<HTMLDivElement>;\n  hasContrastIcons: boolean;\n  isLiveMedia: boolean;\n  isLoading?: boolean;\n  isOpaque?: boolean;\n  isVisible: boolean;\n  leftNudgeFraction?: number;\n  noMixBlendMode?: boolean;\n  onClick?: () => void;\n  playerLanguage: {\n    code: string;\n  };\n  scale: number;\n  showBpbTime: boolean;\n  topNudgeFraction?: number;\n  videoName: string;\n  videoWidth: number;\n}\n\nexport const BigPlayButton = ({\n  backgroundGradientCss,\n  baseHeight = BASE_BUTTON_HEIGHT,\n  baseWidth = BASE_BUTTON_WIDTH,\n  borderRadius,\n  buttonTabIndex,\n  color,\n  controlBarDistance = 0,\n  duration,\n  elemRef,\n  hasContrastIcons,\n  isLiveMedia,\n  isLoading = false,\n  isOpaque = false,\n  isVisible,\n  leftNudgeFraction = 0,\n  noMixBlendMode = false,\n  onClick,\n  playerLanguage,\n  scale,\n  showBpbTime,\n  topNudgeFraction = 0,\n  videoName,\n  videoWidth,\n}: BigPlayButtonProps): JSX.Element => {\n  const [isFocused, setIsFocused] = useState(false);\n\n  const scaledWidth = baseWidth * scale;\n  const scaledHeight = baseHeight * scale;\n\n  const translate = (key) => getTranslation(playerLanguage.code, `PLAY_BUTTON_${key}`) as string;\n  const unescapedVideoName = unescapeHtml(videoName) as string;\n  const ariaLabel = `${translate('TITLE_WHEN_NOT_PLAYING')}: ${unescapedVideoName}`;\n\n  const wrapperStyle = {\n    borderRadius: `${borderRadius}px`,\n    display: isVisible ? 'block' : 'none',\n    height: `${scaledHeight}px`,\n    left: `calc(50% + ${(leftNudgeFraction || 0) * 100}%)`,\n    marginLeft: `-${scaledWidth / 2}px`,\n    marginTop: `-${scaledHeight / 2}px`,\n    overflow: 'hidden',\n    position: 'absolute',\n    top: `calc(50% + ${(topNudgeFraction || 0) * 100}% - ${controlBarDistance}px)`,\n    boxShadow: isOpaque ? '0 3px 5px rgba(0,0,0,0.3)' : undefined,\n  };\n\n  const shouldMixBlendMode = !detect.edge && !noMixBlendMode;\n\n  const blendColor = new Color(color ?? '#000').alpha(1) as Color;\n  const blendStyle = {\n    background: blendColor.toRgba(),\n    display: shouldMixBlendMode ? 'block' : 'none',\n    left: 0,\n    height: `${scaledHeight}px`,\n    mixBlendMode: 'darken',\n    position: 'absolute',\n    top: 0,\n    width: `${scaledWidth}px`,\n  };\n\n  const shouldUseGradient = backgroundGradientCss != null;\n  const playerColorObj = new Color(color ?? '#000000');\n  let hoverButtonColor = adjustColorForProperContrast(playerColorObj, playerColorObj, 'nonText');\n  const overlayColor = isFocused ? hoverButtonColor : playerColorObj;\n  const overlayAlphaValue = shouldMixBlendMode ? ALPHA_MIX_BLEND_MODE : ALPHA_NO_MIX_BLEND_MODE;\n  const overlayColorObj = new Color(overlayColor);\n  const playerIconColor = getVideoPlayerIconColor(\n    playerColorObj,\n    hasContrastIcons,\n    shouldUseGradient,\n  );\n\n  let hoverIconColor = hasContrastIcons\n    ? adjustColorForProperContrast(playerIconColor, hoverButtonColor, 'paragraphText')\n    : '#fff';\n\n  overlayColorObj.alpha(isOpaque ? 1 : overlayAlphaValue);\n\n  const gradientStyles = shouldUseGradient\n    ? {\n        background: backgroundGradientCss,\n        backgroundSize: `${videoWidth}px 100%`,\n        backgroundPositionX: 'center',\n      }\n    : {};\n\n  if (shouldUseGradient) {\n    hoverIconColor = '#ffffff';\n    hoverButtonColor = 'rgba(0,0,0,0.4)';\n  }\n\n  const overlayStyle = {\n    backgroundColor: overlayColorObj.toRgba(),\n    ...gradientStyles,\n    height: `${scaledHeight}px`,\n    left: 0,\n    position: 'absolute',\n    top: 0,\n    transition: 'background-color 150ms',\n    width: `${scaledWidth}px`,\n  };\n\n  const buttonStyle = {\n    backgroundColor: 'transparent',\n    border: 0,\n    color: isFocused ? hoverIconColor : playerIconColor,\n    cursor: 'pointer',\n    height: `${scaledHeight}px`,\n    boxShadow: 'none',\n    width: `${scaledWidth}px`,\n  };\n\n  const shouldDisplayDuration = showBpbTime && !isLiveMedia;\n  const timeStyle = {\n    background: 'rgba(0,0,0,.4)',\n    color: '#fff',\n    fontFamily: interNumbersSemiBold,\n    fontSize: `${BASE_FONT_SIZE * scale}px`,\n    lineHeight: `${BASE_LINE_HEIGHT * scale}px`,\n    pointerEvents: 'none',\n    textAlign: 'center',\n  };\n\n  const handleIsFocused = () => {\n    setIsFocused(true);\n  };\n\n  const handleNotFocused = () => {\n    setIsFocused(false);\n  };\n\n  return (\n    <div class=\"w-bpb-wrapper w-css-reset w-css-reset-tree\" ref={elemRef} style={wrapperStyle}>\n      <button\n        class=\"w-big-play-button w-css-reset-button-important w-vulcan-v2-button\"\n        style={buttonStyle}\n        onMouseEnter={handleIsFocused}\n        onMouseLeave={handleNotFocused}\n        onFocusIn={handleIsFocused}\n        onFocusOut={handleNotFocused}\n        onClick={onClick}\n        aria-label={ariaLabel}\n        tabIndex={buttonTabIndex}\n        type=\"button\"\n      >\n        <div style={blendStyle} />\n        <div style={overlayStyle} />\n        <BigPlayButtonSVG\n          width={baseWidth}\n          height={baseHeight}\n          scale={scale}\n          isLoading={isLoading}\n          overrideFillColor={isFocused ? hoverIconColor : playerIconColor}\n        />\n      </button>\n      {shouldDisplayDuration ? (\n        <div class=\"w-bpb-time\" style={timeStyle}>\n          {flexibleDuration(duration)}\n        </div>\n      ) : null}\n    </div>\n  );\n};\n","import { eV1Protocol, eV1HostWithPort, TAGGED_VERSION } from './hosts.js';\n\nexport type DynamicImportOptions = {\n  host?: string;\n  mediaData?: boolean;\n};\nexport const dynamicImport = async (\n  filePath: string,\n  options: DynamicImportOptions = {},\n): Promise<unknown> => {\n  const host: string = options.host ?? eV1HostWithPort();\n\n  const taggedVersion: string = TAGGED_VERSION;\n\n  if (taggedVersion !== '' && taggedVersion.length > 0 && options.mediaData !== true) {\n    return import(\n      /* webpackIgnore: true */ `${eV1Protocol()}//${host}/${filePath}@${taggedVersion}`\n    );\n  }\n\n  return import(/* webpackIgnore: true */ `${eV1Protocol()}//${host}/${filePath}`);\n};\n","import { clone, merge, select, except, only, sort } from 'utilities/obj.js';\nimport { Url } from 'utilities/url.js';\nimport { cachedDetect } from 'utilities/detect.js';\nimport * as Hosts from 'utilities/hosts.js';\nimport { wlog } from 'utilities/wlog.js';\nimport { appHostname } from '../appHostname.js';\n\nconst aps = Array.prototype.slice;\n\nexport const FAILED = -1;\nexport const QUEUED = 0;\nexport const PROCESSING = 1;\nexport const READY = 2;\n\n// Advanced sorting and filtering so we can be expressive and concise when\n// choosing assets.\nconst FILTER_KEYS = ['select', 'sortFn', 'sortBy', 'unique'];\nexport const filter = (assets, options = {}) => {\n  // there was an issues in the uploader + notPlayablePlayer flow where we\n  // occasionally asked to filter assets when we didn't have any. If we\n  // don't have assets just gtfo\n  if (!assets) {\n    return [];\n  }\n  // We started out passing the whole mediaData object here, but we only\n  // operate on assets, and that's more convenient for filtering result sets\n  // multiple times. This if continues to allow mediaData to be passed in.\n  if (assets.assets) {\n    assets = assets.assets;\n  }\n\n  // If qualityMin/qualityMax are specified, filtered the assets with those\n  // before doing anything else. That's because those aren't set directly on\n  // the assets; rather, it is a computed value for each asset.\n  if (options.qualityMin != null || options.qualityMax != null) {\n    assets = withinQualityRange(assets, options.qualityMin, options.qualityMax);\n    options = except(options, ['qualityMin', 'qualityMax']);\n  }\n\n  const filterOptions = only(options, FILTER_KEYS);\n  const selectFn = filterOptions.select || except(options, FILTER_KEYS);\n\n  if (selectFn) {\n    filterOptions.select = selectFn;\n  }\n\n  let result = filterOptions.select ? select(assets, filterOptions.select) : clone(assets);\n\n  if (filterOptions.sortFn || filterOptions.sortBy) {\n    result = sort(result, filterOptions.sortFn || filterOptions.sortBy);\n  }\n\n  // If \"unique\" is given, it means we only want the first asset with that\n  // property. We can leverage sortBy and select to meaningfully order the\n  // assets, essentially letting us choose which one is unique.\n  if (filterOptions.unique) {\n    const uniqHash = {};\n    for (let i = 0; i < result.length; i++) {\n      let asset = result[i];\n      let bucket = asset[`${filterOptions.unique}`] || '__undefined__';\n      if (!uniqHash[bucket]) {\n        uniqHash[bucket] = asset;\n      }\n    }\n    result = [];\n    for (let k in uniqHash) {\n      result.push(uniqHash[k]);\n    }\n  }\n\n  return result;\n};\n\nexport const one = (assets, options) => {\n  return filter(assets, options)[0] || null;\n};\n\nexport const readyPublicMp3s = (assets) => {\n  return filter(assets, {\n    ext: 'mp3',\n    status: READY,\n    public: true,\n  });\n};\n\nexport const readyPublicMp4s = (assets) => {\n  return filter(assets, {\n    container: 'mp4',\n    status: READY,\n    public: true,\n  });\n};\n\nexport const readyPublicM3u8s = (assets) => {\n  return filter(assets, {\n    container: 'm3u8',\n    status: READY,\n    public: true,\n  });\n};\n\nexport const filterOver400 = (assets) => {\n  const result = [];\n  for (let i = 0; i < assets.length; i++) {\n    let a = assets[i];\n    let vbitrateInRange =\n      a.opt_vbitrate != null && a.opt_vbitrate >= 500 && a.opt_vbitrate <= 100000;\n    let widthInRange = a.width != null && a.width > 400;\n    if (vbitrateInRange || widthInRange) {\n      result.push(a);\n    }\n  }\n  return result;\n};\n\nexport const readyPublicOver400 = (assets) => {\n  return filterOver400(\n    filter(assets, {\n      container: /mp4/,\n      public: true,\n      status: READY,\n    }),\n  );\n};\n\nexport const nonfailedPublicOver400 = (assets) => {\n  return filterOver400(\n    filter(assets, {\n      container: /mp4/,\n      public: true,\n      status: (s) => {\n        return s !== FAILED;\n      },\n    }),\n  );\n};\n\nexport const withinQualityRange = (assets, qualityMin = 100, qualityMax = 10000) => {\n  return filter(assets, {\n    select: (asset) => {\n      // quality is based on width * height, and given back in a format like\n      // 720, 1080, 3840, etc.\n      const quality = numericSizeSnapped(asset.width, asset.height);\n      return qualityMin <= quality && quality <= qualityMax;\n    },\n  });\n};\n\nexport const numericSizeSnapped = (width, height) => {\n  if (height > width) {\n    // let's mathematically rotate vertical videos when determining their\n    // snapped size.\n    const tmpWidth = width;\n    width = height;\n    height = tmpWidth;\n  }\n\n  const aspectRatio = width / height;\n\n  // If given a square video, expand the width so we'll name it as if\n  // it's 16:9 with the given height.\n  if (aspectRatio < 1.05) {\n    width = height * (16 / 9);\n  }\n\n  if (width >= 3740) {\n    return 2160;\n  }\n  if (width >= 2460) {\n    return 1440;\n  }\n  if (width >= 1820) {\n    return 1080;\n  }\n  if (width >= 1180) {\n    return 720;\n  }\n  if (width >= 860) {\n    return 540;\n  }\n  if (width >= 540) {\n    return 360;\n  }\n\n  return height;\n};\n\n// Expect that assets are a subset of assets that we are allowed to select.\n// This function does not have any special logic to filter only selectable\n// assets.\nexport const findClosestAssetByQuality = (assets, quality) => {\n  let height;\n  if (quality === '4k') {\n    height = 2160;\n  } else {\n    // '360p' yields 360, '1080i' yields 1080, etc.\n    height = parseInt(quality, 10);\n  }\n\n  const exactMatch = withinQualityRange(assets, height, height)[0];\n  if (exactMatch) {\n    return exactMatch;\n  }\n\n  const surroundingAssets = nearestOutsideRange(assets, height, height);\n  if (surroundingAssets.length === 1) {\n    return surroundingAssets[0];\n  }\n  const aspect = videoAspect(assets);\n  const width = Math.round(aspect * height);\n  const [lowerAsset, upperAsset] = surroundingAssets;\n  const lowerDiff = Math.abs(lowerAsset.width - width);\n  const upperDiff = Math.abs(upperAsset.width - width);\n  if (lowerDiff < upperDiff) {\n    return lowerAsset;\n  }\n  return upperAsset;\n};\n\nexport const still = (assets) => {\n  let stillAsset = one(assets, {\n    type: /^still_image$/,\n    sortBy: 'created_at desc',\n  });\n\n  // If no still is associated, check for channel artwork\n  if (!stillAsset) {\n    stillAsset = channelArtworkStill(assets);\n  }\n\n  // If no still or channel art is associated, generate from the first video asset\n  // we can find.\n  if (!stillAsset) {\n    stillAsset = one(assets, { container: /mp4/, sortBy: 'width desc' });\n  }\n\n  return stillAsset;\n};\n\nexport const channelArtworkStill = (assets) => {\n  return one(assets, {\n    type: /^channel_still_image$/,\n    sortBy: 'created_at desc',\n  });\n};\n\nexport const thumbnailAssets = (assets, options) => {\n  if (options.stillUrl) {\n    return [{ height: null, url: options.stillUrl, width: null }];\n  }\n\n  const stillAsset = still(assets);\n  if (options.instantHlsStillAsset != null && (!stillAsset || /mp4/.test(stillAsset.container))) {\n    return [options.instantHlsStillAsset];\n  }\n\n  if (options.originalFileStillAsset != null && (!stillAsset || /mp4/.test(stillAsset.container))) {\n    return [options.originalFileStillAsset];\n  }\n\n  if (!stillAsset) {\n    return [];\n  }\n\n  const stillAspect = stillAsset.width / stillAsset.height;\n  return [320, 640, 960, 1280, 1920, 3840].map((width) => {\n    const height = Math.round(width / stillAspect);\n    const url = stillUrl(assets, { videoWidth: width, videoHeight: height, playButton: false });\n    return { height, url, width };\n  });\n};\n\nconst FAST_HOSTNAME = appHostname('fast');\nexport const stillUrl = (assets, options = {}) => {\n  const stillAsset = still(assets);\n\n  // @TODO should this throw an error instead?\n  if (!stillAsset) return;\n\n  if (stillAsset.status !== READY) {\n    // occasionally we might get a stillAsset that isn't ready, but its\n    // channel art is for an audio! fallback to that first!\n    const channelArtwork = channelArtworkStill();\n    if (channelArtwork && channelArtwork.status === READY) {\n      return channelArtwork.url;\n    }\n\n    return `//${FAST_HOSTNAME}/assets/images/blank.gif`;\n  }\n\n  options = merge(\n    {\n      aspect: stillAsset.width / stillAsset.height || 1, // default to square if we can't determine the aspect\n      stillUrl: stillAsset.url,\n      playButton: false,\n      playerColor: options.playerColor || '636155',\n      videoWidth: stillAsset.width || 640,\n      videoHeight: stillAsset.height || 360,\n      stillSnap: true,\n    },\n    options,\n  );\n\n  let stillWidth = options.videoWidth;\n  let stillHeight = options.videoHeight;\n  const result = new Url(options.stillUrl);\n\n  if (options.retina) {\n    result.params.image_play_button_size = '2x';\n    stillWidth *= 2;\n    stillHeight *= 2;\n  }\n\n  // By default, we snap to a pre-generated still size\n  if (options.stillSnap) {\n    stillWidth = getStillWidth({\n      videoWidth: stillWidth,\n      stillAssetWidth: stillAsset.width || 640, // there have been times where we fail to have proper width returned\n    });\n\n    stillHeight = Math.round(stillWidth / options.aspect);\n  }\n\n  // Don't do anything special if this is not a Wistia hosted image.\n  if (!isBakeryUrl(options.stillUrl)) {\n    return options.stillUrl;\n  }\n\n  if (options.protocol === 'https:') {\n    result.protocol = 'https:';\n    // Under normal circumstances, the host for assets should depend on the\n    // environment – but if you're using the embedHost option to use non-prod\n    // code with prod embeds, we force using a prod host.\n    result.host =\n      options.embedHost === Hosts.PROD_FAST_HOSTNAME_COM ||\n      options.embedHost === Hosts.PROD_FAST_HOSTNAME_NET\n        ? Hosts.PROD_SSL_EMBED_HOST\n        : Hosts.SSL_EMBED_HOST;\n  }\n\n  result.params.image_crop_resized = `${stillWidth}x${stillHeight}`;\n\n  if (options.playButton == null || options.playButton) {\n    result.params.image_play_button_rounded = 1;\n    result.params.image_play_button_color = `${`${options.playerColor}`.replace(/^#+/, '')}e0`;\n  }\n\n  if (options.ext) {\n    result.ext(options.ext);\n  }\n\n  // if the extension has not been transformed, default to a jpg\n  if (result.ext() === 'bin') {\n    result.ext('jpg');\n  }\n\n  return result.absolute();\n};\n\n// We only make three sizes of a thumbnail for a given video: 1280, 960, and\n// 640 wide. We have logic on the server that matches this as well. The idea\n// is that since we only use these three, we can generate them beforehand so\n// they're always ready and automatic for the people.\nexport const getStillWidth = (options) => {\n  const potentialStillWidths = [640, 960, 1280, 1920, 3840];\n\n  // We also have a still that's the exact width of the one they uploaded\n  // or generated (so long as it is less than 3840px across)\n  if (options.stillAssetWidth < 3840) {\n    potentialStillWidths.push(options.stillAssetWidth);\n  }\n\n  // We don't create thumbnails that are larger than the stillAssetWidth,\n  // so eliminate anything that's larger than that, because it's wasteful to\n  // scale up an image past it's original size!\n  const availableStillWidths = [];\n  for (let i = 0; i < potentialStillWidths.length; i++) {\n    let width = potentialStillWidths[i];\n    if (width <= options.stillAssetWidth) {\n      availableStillWidths.push(width);\n    }\n  }\n\n  // sort the widths in place.\n  availableStillWidths.sort((a, b) => {\n    return a - b;\n  });\n\n  // Use the still that's equal to or slightly larger than the size of the\n  // video embed.\n  for (let i = 0; i < availableStillWidths.length; i++) {\n    let width = availableStillWidths[i];\n    if (options.videoWidth <= width) {\n      return width;\n    }\n  }\n\n  // Can't find one that fits? Let's use the biggest available width.\n  return Math.max(...availableStillWidths);\n};\n\nexport const BAKERY_HOSTS = [\n  Hosts.EMBED_HOST,\n  Hosts.SSL_EMBED_HOST,\n  appHostname('embed'),\n  appHostname('prime'),\n  appHostname('mixergy-cdn'),\n  appHostname('embed-fastly'), // XXX: akamai test\n  Hosts.PROD_EMBED_HOST,\n  Hosts.PROD_SSL_EMBED_HOST,\n  Hosts.PROD_FASTLY_SSL_HOST,\n];\n\n// Check if a given url is like embed.wistia.com, embed-ssl.wistia.com,\n// prime.wistia.com, etc.\nexport const isBakeryUrl = (rawUrl) => {\n  if (rawUrl == null) {\n    return false;\n  }\n  const url = new Url(rawUrl);\n  if (!url.host) {\n    return false;\n  }\n  return BAKERY_HOSTS.join(',').indexOf(url.host) >= 0;\n};\n\nexport const onePublicReadyWithContainer = (assets, type, options) => {\n  options = merge(\n    {\n      container: type,\n      public: true,\n      status: READY,\n    },\n    options,\n  );\n\n  return one(assets, options);\n};\n\nexport const hasAnyReadyHdrAssets = (assets) => {\n  return assets.some(\n    (asset) =>\n      asset.type === 'hdr_video' &&\n      asset.status === READY &&\n      asset.public &&\n      asset.container === 'mp4',\n  );\n};\n\nexport const mp4 = (assets, options) => {\n  return onePublicReadyWithContainer(assets, 'mp4', options);\n};\n\nexport const webm = (assets, options) => {\n  return onePublicReadyWithContainer(assets, 'webm', options);\n};\n\nexport const m3u8 = (assets, options) => {\n  return onePublicReadyWithContainer(assets, 'm3u8', options);\n};\n\nexport const original = (assets) => {\n  return one(assets, { type: 'original' });\n};\n\n// If we support webm, prefer webm (since VP9 codec is better), otherwise\n// use mp4 (h264)\nexport const playable = (assets, options, detect = cachedDetect()) => {\n  if (detect.video.webm) {\n    return webm(assets, options) || mp4(assets, options);\n  }\n  return mp4(assets, options);\n};\n\nexport const videoAspect = (assets) => {\n  const asset = mp4(assets) || m3u8(assets) || webm(assets) || original(assets);\n  if (asset && asset.height) {\n    return asset.width / asset.height;\n  }\n  // no assets available; use default aspect 1.6667\n  return 640 / 360;\n};\n\nexport const originalAspect = (assets) => {\n  const derivativeAspect = videoAspect(assets);\n  const asset = original(assets);\n  if (asset && asset.width && asset.height) {\n    const candidateAspect = asset.width / asset.height;\n    if (\n      (candidateAspect > 1 && derivativeAspect < 1) ||\n      (candidateAspect < 1 && derivativeAspect > 1)\n    ) {\n      // the original is rotated relative to its derivatives\n      return 1 / candidateAspect;\n    }\n    return candidateAspect;\n  }\n  return derivativeAspect;\n};\n\nexport const iphone = (assets, options) => {\n  const aspect = videoAspect(assets);\n  if (aspect > 1) {\n    options = merge({ width: 640 }, options);\n    return mp4(assets, options) || smallestNormalMp4(assets, options);\n  }\n  const opt1 = merge({ width: 320 }, options);\n  const opt2 = merge({ width: 640 }, options);\n  return mp4(assets, opt1) || mp4(assets, opt2) || smallestNormalMp4(assets, options);\n};\n\nexport const smallestNormalMp4 = (assets, options) => {\n  options = merge({ sortBy: 'width asc', width: [640, 1920] }, options);\n  return mp4(assets, options);\n};\n\nexport const urlWithCorrectHost = (assetUrl, proto = Hosts.eV1Protocol()) => {\n  const parsedUrl = new Url(assetUrl);\n  if (isBakeryUrl(assetUrl)) {\n    if (proto === 'https:') {\n      parsedUrl.host = Hosts.deliveryHost(location.protocol);\n      parsedUrl.protocol = 'https:';\n    } else {\n      parsedUrl.host = Hosts.deliveryHost(location.protocol);\n      parsedUrl.protocol = 'http:';\n    }\n  }\n  return parsedUrl.absolute();\n};\n\n// It is possible for our customers to give us quality ranges that are\n// impossible to solve for a given video. In these cases, we want to instead\n// use the assets that are closest to satisfying their constraints. For\n// example, if they specify 4k and we only go up to 1080p, it'll use 1080p.\n// Or if they specify a range _between_ two, say 800p to 900p, it'll use the\n// two surrounding values: 720p and 1080p.\nexport const nearestOutsideRange = (assets, lower, upper) => {\n  if (assets.length === 0) {\n    return [];\n  }\n\n  const sortedAssets = aps.call(assets).sort((a, b) => {\n    return numericSizeSnapped(a.width, a.height) - numericSizeSnapped(b.width, b.height);\n  });\n\n  let lowerAsset;\n  let upperAsset;\n  for (let i = 0; i < sortedAssets.length; i++) {\n    let asset = sortedAssets[i];\n    let assetSize = numericSizeSnapped(asset.width, asset.height);\n    if (assetSize < lower) {\n      lowerAsset = asset;\n    }\n    if (assetSize >= upper) {\n      upperAsset = asset;\n      break;\n    }\n  }\n\n  // get rid of nulls\n  const result = [];\n  if (lowerAsset) {\n    result.push(lowerAsset);\n  }\n  if (upperAsset) {\n    result.push(upperAsset);\n  }\n\n  // If somehow we didn't end up with any assets, don't fail completely, but\n  // let us know.\n  if (result.length === 0) {\n    wlog.error('nearestOutsideRange: no nearby assets found, using first in list', sortedAssets[0]);\n    result.push(sortedAssets[0]);\n  }\n\n  return result;\n};\n\n// This operates on the array in-place\nexport const moveToFront = (assets, toFront) => {\n  if (!toFront) {\n    return assets;\n  }\n\n  let index = -1;\n  for (let i = 0; i < assets.length; i++) {\n    let asset = assets[i];\n    if (asset.url === toFront.url) {\n      index = i;\n      break;\n    }\n  }\n\n  // If it's -1, it wasn't found. If it's 0, it's already in front.\n  if (index > 0) {\n    assets.splice(index, 1);\n    assets.unshift(toFront);\n  }\n\n  return assets;\n};\n","import { PublicApi } from '../types/player-api-types.ts';\n\nexport const MUX_PERCENTAGE_TO_ENABLE = 0.1;\n\n/**\n * Determines if Mux should be enabled for an embed based on various conditions.\n * @param {PublicApi} video The embed mux should be enabled for.\n * @param {boolean} didWinCoinFlip Whether or not the embed won the coin flip which determines if Mux should be enabled.\n * @returns {boolean} True if Mux should be enabled, false otherwise.\n */\nexport const shouldEnableMux = (video: PublicApi, didWinCoinFlip: boolean): boolean => {\n  const isMuxEnabledOnWindow = window.wistiaDisableMux !== true;\n  const isMuxEnabledFromOpts = video._opts?.mux !== false;\n  const isMuxEnabledFromStandardEmbed = video.iframe == null;\n  const isMuxEnabledFromCoinFlip = didWinCoinFlip;\n  const isMuxEnabledFromLiveStream = Boolean(video._mediaData?.type === 'LiveStream');\n\n  // Mux should be enabled if all of the following are true:\n  // 1. Mux is not disabled on the window\n  // 2. Mux is not disabled from the embed options\n  // 3. Mux is not disabled from the video being an iframe embed\n  // 4. Mux is not disabled from the coin flip OR the video is a live stream\n  // (Live streams should always have Mux enabled, regardless of the coin flip result)\n  return (\n    isMuxEnabledOnWindow &&\n    isMuxEnabledFromOpts &&\n    isMuxEnabledFromStandardEmbed &&\n    (isMuxEnabledFromCoinFlip || isMuxEnabledFromLiveStream)\n  );\n};\n","import { secondsConverter } from './duration.ts';\n\nconst SECONDS_IN_MINUTE = 60;\n\nexport const secondsToIso8601Duration = (totalSeconds: number): string => {\n  const { hours, minutes, seconds } = secondsConverter(totalSeconds, 'hms');\n\n  let result = '';\n\n  if (hours) {\n    result += `${hours}H`;\n  }\n\n  if (minutes || (totalSeconds > SECONDS_IN_MINUTE && seconds !== 0)) {\n    result += `${minutes}M`;\n  }\n\n  if (seconds || totalSeconds === 0) {\n    result += `${seconds}S`;\n  }\n\n  return result;\n};\n","import { root } from 'utilities/root.js';\nimport { hasPerformanceMeasureSupport } from './performance.ts';\n\nconst na = navigator.userAgent;\n\nlet _playerDetectCache = null;\n\n// ua regexes taken from http://code.jquery.com/jquery-1.6.4.js\nconst rwebkit = /(webkit)[ /]([^\\s]+)/i;\nconst ropera = /OPR\\/([^\\s]+)/i;\nconst redge = /(edge)\\/(\\d+(?:\\.\\d+)?)/i;\nconst rmozilla = /(mozilla)(?:.*? rv:([^\\s)]+))?/i;\n\n// special platform regexes\nconst randroid = /(android) ([^;]+)/i;\nconst riphone = /(iphone)/i;\nconst rwinphone = /(Windows Phone OS (\\d+(?:\\.\\d+)?))/;\nconst rios = /OS (\\d+)_(\\d+)/i;\nconst rfirefox = /(firefox)/i;\nconst rgearvr = /Mobile VR/i;\n\n// Apple keeps their Safari version the same as their iOS version\n// (with the exception being that they occasionally release the new safari\n// slightly before the new iOS is available)\nconst riosVersion = /Version\\/([^\\s]+)/i;\n\nconst browser = () => {\n  return (browserMatch()[1] || 'webkit').toLowerCase();\n};\n\nconst browserVersion = () => {\n  return browserMatch()[2];\n};\n\nconst browserMatch = () => {\n  let match;\n\n  match = na.match(redge);\n  if (match) {\n    return match;\n  }\n\n  match = na.match(rwebkit);\n  if (match) {\n    return match;\n  }\n\n  match = na.match(ropera);\n  if (match) {\n    return match;\n  }\n\n  if (match) {\n    if (document.documentMode != null) {\n      match[2] = document.documentMode;\n    }\n    return match;\n  }\n\n  match = na.match(rmozilla);\n  if (match) {\n    return match;\n  }\n\n  return [];\n};\n\n// return false if not android, version info if android\nconst android = () => {\n  const matches = na.match(randroid);\n  if (matches == null) {\n    return false;\n  }\n  return { version: matches[2] };\n};\n\nconst oldandroid = () => {\n  return android() && parseFloat(android().version) < 4.1;\n};\n\nconst iphone = () => {\n  return riphone.test(na);\n};\n\nconst touchScreen = () => {\n  return iosVersion() > 0 || android() || ipad();\n};\n\nconst HDRCodecSupport = () => {\n  return {\n    hevc: window.MediaSource?.isTypeSupported?.('video/mp4; codecs=\"hvc1.2.4.L153.B0\"') ?? false, // // HEVC Main10\n    av1:\n      window.MediaSource?.isTypeSupported?.('video/mp4; codecs=\"av01.0.08M.10.0.110.09.16.09\"') ??\n      false, // AV1 10-bit Main, PQ (HDR10)\n    vp92:\n      window.MediaSource?.isTypeSupported?.('video/mp4; codecs=\"vp09.02.10.10.01.09.16.09\"') ??\n      false, // // VP9 Profile 2 (10-bit)\n  };\n};\n\nconst HDRSupported = () => {\n  if (window.matchMedia?.('(dynamic-range: high)').matches) {\n    return true; // modern Safari, Chrome\n  }\n\n  // Unfortunately, many screens that support HDR may still report a colorDepth of 24. But if screen only reports\n  // 24 and doesn't support `matchMedia` there is no way to tell if the screen supports HDR or not.\n  if (screen.colorDepth && screen.colorDepth >= 30) {\n    return true; // legacy hint or Firefox fallback\n  }\n\n  return false;\n};\n\nconst hoverIsNatural = () => {\n  // The (hover: hover) query matches when two conditions are met:\n  //\n  // 1. hover is supported\n  // 2. hover is easy to access for the user based on their primary input device\n  //\n  // So for example, when the user’s primary input is touch, this returns false\n  // even though hover interactions are technically supported.\n  //\n  // If matchMedia is unsupported or the hover query is unsupported, we fall\n  // back on returning the heuristic check for iOS or Android. If it is true,\n  // we assume hover is not natural. This can produce false negatives and false\n  // positives, but most agents support the hover query.\n  //\n  // This is an alternative to using touchScreen() when deciding whether to\n  // attach enter/leave mouse event handlers based on hover capability.\n\n  try {\n    const mediaQueryList = matchMedia('(hover:hover)');\n\n    if (mediaQueryList.media !== 'not all') {\n      return mediaQueryList.matches;\n    }\n  } catch (err) {\n    // feature detection: swallow errors.\n  }\n\n  return !touchScreen();\n};\n\nconst retina = () => {\n  return root.devicePixelRatio != null && root.devicePixelRatio > 1;\n};\n\nconst ipad = () => {\n  return (\n    /Macintosh/i.test(navigator.userAgent) &&\n    navigator.maxTouchPoints &&\n    navigator.maxTouchPoints > 1\n  );\n};\n\nconst safari = () => {\n  return rwebkit.test(na) && !/chrome/i.test(na) && !ipad() && !iphone();\n};\n\nconst chrome = () => {\n  if (/Chrome/.test(na) && /Google Inc/.test(navigator.vendor)) {\n    return { version: chromeVersion() };\n  }\n  return false;\n};\n\nconst silkVersion = () => {\n  const match = na.match(/\\bSilk\\/([^\\s]+)/);\n  return match && match[1];\n};\n\nconst chromeVersion = () => {\n  const match = na.match(/\\bChrome\\/([^\\s]+)/);\n  return match && match[1];\n};\n\nconst opera = () => {\n  return ropera.test(na);\n};\n\nconst iosVersion = () => {\n  const iosMatch = na.match(rios);\n  const versionMatch = na.match(riosVersion);\n\n  if (iosMatch != null) {\n    return parseFloat(`${iosMatch[1]}.${iosMatch[2]}`);\n  }\n  if (versionMatch != null && versionMatch[1] && ipad()) {\n    // to get the version of an ipad that is reporting as a Mac in its\n    // user agent, we can rely on the Version part of the ua to be\n    // fairly certain\n    return parseFloat(versionMatch[1]);\n  }\n  return 0;\n};\n\nconst windowsPhone = () => {\n  return rwinphone.test(na);\n};\n\nconst edge = () => {\n  return redge.test(na);\n};\n\nconst firefox = () => {\n  return rfirefox.test(na);\n};\n\nconst gearvr = () => {\n  return rgearvr.test(na);\n};\n\nconst windows = () => {\n  return /win/i.test(navigator.platform);\n};\n\nconst mac = () => {\n  return /mac/i.test(navigator.platform);\n};\n\n// modified slightly from http://www.modernizr.com/downloads/modernizr-2.0.6.js\nconst html5Video = () => {\n  const elem = document.createElement('video');\n  let result = false;\n\n  // IE9 Running on Windows Server SKU can cause an exception to be thrown, bug #224\n  try {\n    if (elem.canPlayType) {\n      result = {};\n      // Workaround required for IE9, which doesn't report video support without audio codec specified.\n      // bug 599718 @ msft connect\n      const h264 = 'video/mp4; codecs=\"avc1.42E01E';\n      result.h264 = !!elem.canPlayType(`${h264}\"`) || !!elem.canPlayType(`${h264}, mp4a.40.2\"`);\n      result.webm = !!elem.canPlayType('video/webm; codecs=\"vp9, vorbis\"');\n      result.nativeHls = !!elem.canPlayType('application/vnd.apple.mpegURL');\n    }\n  } catch (e) {\n    result = {\n      ogg: false,\n      h264: false,\n      webm: false,\n      nativeHls: false,\n    };\n  }\n  return result;\n};\n\nconst mediaSource = () => {\n  const h264 = 'video/mp4; codecs=\"avc1.42E01E';\n  return root.MediaSource && root.MediaSource.isTypeSupported(`${h264}, mp4a.40.2\"`);\n};\n\nconst nativeHls = () => {\n  return (iphone() || ipad() || safari()) && html5Video().nativeHls;\n};\n\nconst localStorage = () => {\n  try {\n    return 'localStorage' in root && root.localStorage != null;\n  } catch (e) {\n    return false;\n  }\n};\n\nconst fullscreenEnabled = () => {\n  return (\n    document.fullscreenEnabled ||\n    document.mozFullScreenEnabled ||\n    document.webkitFullscreenEnabled ||\n    document.msFullscreenEnabled\n  );\n};\n\nconst managedMediaSource = () => {\n  return (\n    'ManagedMediaSource' in window &&\n    typeof window.ManagedMediaSource?.isTypeSupported === 'function'\n  );\n};\n\nconst browserPrefixes = ['WebKit', 'Moz', 'O', 'Ms', ''];\nconst mutationObserver = () => {\n  for (let i = 0; i < browserPrefixes.length; i++) {\n    let prefix = browserPrefixes[i];\n    let prop = `${prefix}MutationObserver`;\n    if (root[prop]) {\n      return prop;\n    }\n  }\n  return null;\n};\n\nconst vulcanV2Support = () => {\n  const modernBrowser = /webkit|mozilla|edge/.test(browser());\n\n  if (iphone() || ipad() || android()) {\n    return true;\n  }\n\n  return Boolean(modernBrowser && html5Video().h264 && Object.defineProperties);\n};\n\nlet isPassiveSupported;\nconst passiveSupported = () => {\n  if (isPassiveSupported != null) {\n    return isPassiveSupported;\n  }\n  try {\n    const options = Object.defineProperty({}, 'passive', {\n      /* eslint-disable-next-line getter-return */\n      get() {\n        isPassiveSupported = true;\n      },\n    });\n\n    window.addEventListener('test', null, options);\n  } catch (err) {\n    isPassiveSupported = false;\n  }\n  return isPassiveSupported;\n};\n\nexport const callingPlayRequiresEventContext = () => {\n  return iosVersion() > 0 || android() || safari();\n};\n\n// https://caniuse.com/#search=webp\n// use user-agent for browser and version webp detection\n// we're opting for this over a feature detection mechanism so that our detection\n// can be as fast and synchronous as possible. Doing an async feature detection\n// occasionally resulted in false negatives.\nexport const webp = () => {\n  const chromeBrowser = chrome();\n  const firefoxBrowser = firefox();\n  const edgeBrowser = edge();\n  const operaBrowser = opera();\n\n  const isChromeDesktopSupported = chromeBrowser && browserVersion() >= 32;\n  const isChromeAndroidSupported = chromeBrowser && browserVersion() >= 75 && android();\n  const isFirefoxDesktopSupported = firefoxBrowser && browserVersion() >= 65;\n  const isFirefoxAndroidSupported = firefoxBrowser && browserVersion() >= 67 && android();\n  const isEdgeSupported = edgeBrowser && browserVersion() >= 18;\n  const isOperaSupported = operaBrowser && browserVersion() >= 19;\n\n  return (\n    isChromeDesktopSupported ||\n    isChromeAndroidSupported ||\n    isFirefoxDesktopSupported ||\n    isFirefoxAndroidSupported ||\n    isEdgeSupported ||\n    isOperaSupported\n  );\n};\n\nexport const cachedDetect = () => {\n  if (_playerDetectCache) {\n    // Allow this to be cached globally so it's not executed once every time\n    // it's imported.\n    return _playerDetectCache;\n  }\n\n  _playerDetectCache = uncachedDetect();\n  return _playerDetectCache;\n};\n\nexport const uncachedDetect = () => {\n  const result = {\n    browser: {\n      version: browserVersion(),\n    },\n    edge: edge(),\n    firefox: firefox(),\n    gearvr: gearvr(),\n    hdr: HDRSupported(),\n    hdrCodecs: HDRCodecSupport(),\n    android: android(),\n    oldandroid: oldandroid(),\n    iphone: iphone(),\n    ipad: ipad(),\n    safari: safari(),\n    chrome: chrome(),\n    winphone: { version: windowsPhone()[2] },\n    ios: { version: iosVersion() },\n    windows: windows(),\n    mac: mac(),\n    retina: retina(),\n    hoverIsNatural: hoverIsNatural(),\n    touchScreen: touchScreen(),\n    video: html5Video(),\n    managedMediaSource: managedMediaSource(),\n    mediaSource: mediaSource(),\n    nativeHls: nativeHls(),\n    localstorage: localStorage(),\n    fullscreenEnabled: fullscreenEnabled(),\n    vulcanV2Support: vulcanV2Support(),\n    mutationObserver: mutationObserver(),\n    callingPlayRequiresEventContext: callingPlayRequiresEventContext(),\n    passiveSupported: passiveSupported(),\n    webp: webp(),\n    performanceMeasure: hasPerformanceMeasureSupport(),\n  };\n\n  result.browser[browser()] = true;\n\n  return result;\n};\n\nexport const clearDetectCache = () => {\n  _playerDetectCache = null;\n};\n\n// Starting a migration away from cachedDetect in the wistia-player web component\n// Based on https://github.com/wistia/player-modern/blob/main/docs/ifaq.md#whats-the-deal-with-cacheddetect-and-why-do-we-also-assign-the-result-of-it\nexport const detectIsMobile = () => {\n  const isAndroid = android();\n  const isIPad = ipad();\n  const isIPhone = iphone();\n\n  return isAndroid || isIPad || isIPhone;\n};\n","const MAX_RANDOM_VALUE = 0xffffffff;\n\n/**\n * Simulates a coin flip with a given percentage to win\n * @param percentToWinCoinFlip - Number between 0 and 1 representing the percentage to win the coin flip\n * @returns boolean - True if the coin flip was won, false otherwise\n */\nexport const didWinCoinFlip = (percentToWinCoinFlip: number): boolean => {\n  const cryptoObj = window.crypto;\n  if (typeof cryptoObj !== 'undefined') {\n    const cryptoRandom = cryptoObj.getRandomValues(new Uint32Array(1));\n    return cryptoRandom[0] / (MAX_RANDOM_VALUE + 1) < percentToWinCoinFlip;\n  }\n\n  const mathRandom = Math.random();\n  return mathRandom >= percentToWinCoinFlip;\n};\n","export type GradientColor = [string, number]; // [color, percentage]\n\nexport type Gradient = {\n  colors: GradientColor[];\n  on: boolean;\n};\n\n// Gradients can get into this state if the hex code for the color is a numeric\n// string and it gets casted to a number.\nexport type GradientMaybeWithColorsAsNumbers = {\n  colors: [number | string, number][];\n  on: boolean;\n};\n\nexport const isGradient = (value: unknown): value is Gradient => {\n  if (typeof value !== 'object' || value === null) {\n    return false;\n  }\n\n  const { colors, on } = value as Gradient;\n\n  if (!on) {\n    return true;\n  }\n\n  if (!Array.isArray(colors) || typeof on !== 'boolean') {\n    return false;\n  }\n\n  if (colors.length === 0) {\n    return false;\n  }\n\n  return colors.every((color) => {\n    return typeof color[0] === 'string' && typeof color[1] === 'number';\n  });\n};\n","import {\n  getLocalStorage,\n  removeLocalStorage,\n  updateLocalStorage,\n} from 'utilities/namespacedLocalStorage.js';\n\nexport const deleteViewerPreferences = () => {\n  removeLocalStorage(getLocalStorageKey());\n};\n\nconst getLocalStorageKey = () => {\n  return 'wistia-viewer-preferences';\n};\n\nexport const getViewerPreferences = () => {\n  return getLocalStorage(getLocalStorageKey());\n};\n\nexport const getViewerPreference = (preference) => {\n  const preferences = getViewerPreferences();\n\n  if (!preferences) {\n    return null;\n  }\n\n  return preferences[preference];\n};\n\nexport const setViewerPreference = (preference, value) => {\n  // delete the plugin property. fix for captions setting plugin.captions-v1 - which caused a bug\n  // as when captions was getting enabled. This can be removed after a couple\n  // of weeks or so\n  updateLocalStorage(getLocalStorageKey(), (obj) => {\n    if (obj.plugin) {\n      delete obj.plugin;\n    }\n\n    obj[preference] = value;\n  });\n};\n","import { isObject, isArray, merge } from 'utilities/obj.js';\nimport { isDocReady, onDocReady } from 'utilities/docReady.js';\nimport { pageLoaded } from 'utilities/pageLoaded.js';\nimport { cachedDetect } from 'utilities/detect.js';\nimport { wlog } from 'utilities/wlog.js';\nimport { elemOffset, elemZoom, isBoxModel } from 'utilities/elemOffset.js';\nimport { execScriptTags, getScriptTags, removeScriptTags } from 'utilities/script-tags.js';\nimport { seqId } from 'utilities/seqid.js';\nimport { Wistia } from '../wistia_namespace.ts';\n\nconst W = Wistia;\nconst detect = cachedDetect();\n\nexport { isDocReady, onDocReady };\nexport { pageLoaded };\nexport { execScriptTags, getScriptTags, removeScriptTags };\nexport { elemOffset, elemZoom, isBoxModel };\n\nexport const elemHtml = (elem, content) => {\n  const cssTags = getCssTags(content);\n  const scriptTags = getScriptTags(content);\n  content = removeCssTags(content);\n  content = removeScriptTags(content);\n\n  elem.innerHTML = content;\n  execCssTags(cssTags, elem);\n\n  // these script tags will be removed in short order as part of the script\n  // loader\n  return execScriptTags(scriptTags);\n};\n\nexport const getCssTags = (htmlStr) => {\n  return htmlStr.match(/<link.*?rel=['\"]stylesheet['\"][^>]*>|<style>[\\s\\S]+?<\\/style>/gi) || [];\n};\n\nexport const execCssTags = (cssTags, parentElem) => {\n  if (!cssTags) {\n    return null;\n  }\n\n  if (!isArray(cssTags)) {\n    cssTags = getCssTags(cssTags);\n  }\n  const inserted = [];\n  for (let i = 0; i < cssTags.length; i++) {\n    let cssTag = cssTags[i];\n    if (/<link.*?rel=['\"]stylesheet['\"][^>]*>/.test(cssTag)) {\n      const matches = cssTag.match(/href=['\"](.*?)['\"]/i);\n      if (matches) {\n        let link = document.createElement('link');\n        link.setAttribute('rel', 'stylesheet');\n        link.setAttribute('href', matches[1]);\n        link.className = 'wistia_injected_style';\n        (parentElem || document.body || document.head).appendChild(link);\n        inserted.push(link);\n      }\n    } else if (/<style>[\\s\\S]+?<\\/style>/gi.test(cssTag)) {\n      const matches = cssTag.match(/<style>([\\s\\S]+?)<\\/style>/i);\n      if (matches) {\n        let style = addInlineCss(parentElem || document.body || document.head, matches[1]);\n        inserted.push(style);\n      }\n    }\n  }\n  return inserted;\n};\n\nexport const removeCssTags = (htmlStr) => {\n  return htmlStr.replace(/<link.*?rel=['\"]stylesheet['\"][^>]*>|<style>[\\s\\S]+?<\\/style>/gi, '');\n};\n\nexport const addInlineCss = (domTarget, css) => {\n  const target = domTarget || document.body || document.head;\n\n  const styleElem = document.createElement('style');\n  styleElem.id = seqId('wistia_', '_style');\n  styleElem.setAttribute('type', 'text/css');\n  styleElem.className = 'wistia_injected_style';\n  target.appendChild(styleElem, target.nextSibling);\n  if (styleElem.styleSheet) {\n    styleElem.styleSheet.cssText = css;\n  } else {\n    styleElem.appendChild(document.createTextNode(css));\n  }\n  return styleElem;\n};\n\nexport const elemFromObject = (obj) => {\n  if (isArray(obj)) {\n    let result = [];\n    for (let i = 0; i < obj.length; i++) {\n      result.push(elemFromObject(obj[i]));\n    }\n    return result;\n  }\n\n  const tagName = obj.tagName || 'div';\n  let childNodes = obj.childNodes || [];\n  if (!isArray(childNodes)) {\n    childNodes = [childNodes];\n  }\n\n  const elem = document.createElement(tagName);\n\n  for (let key in obj) {\n    if (Object.hasOwn(obj, key)) {\n      let val = obj[key];\n      if (key !== 'childNodes' && key !== 'tagName' && key !== 'ref') {\n        let dashedKey = key.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();\n        if (key === 'style') {\n          if (isObject(val)) {\n            for (let p in val) {\n              elem.style[p] = val[p];\n            }\n          } else {\n            // setAttribute('style', ...) only works in IE8+, so parse inline\n            // styles if it's passed in as a string.\n            let styles = val.split(';');\n            for (let i = 0; i < styles.length; i++) {\n              let pair = styles[i].split(/\\s*:\\s*/);\n              let p = pair[0];\n              let v = pair[1];\n              if (p && v) {\n                elem.style[p] = v;\n              }\n            }\n          }\n        } else if (key === 'events') {\n          for (let evt in val) {\n            let callback = val[evt];\n            elemBind(elem, evt, callback);\n          }\n        } else if (key === 'className' || key === 'class') {\n          elem.className = val;\n        } else if (key === 'innerHTML') {\n          elem.innerHTML = val;\n        } else if (key === 'innerText') {\n          elem.innerText = val;\n        } else if (val != null && typeof val.toString === 'function') {\n          elem.setAttribute(dashedKey, val.toString());\n        }\n      }\n    }\n  }\n\n  for (let i = 0; i < childNodes.length; i++) {\n    let childObj = childNodes[i];\n    if (isObject(childObj)) {\n      let child = elemFromObject(childObj);\n      elemAppend(elem, child);\n    } else {\n      let child = document.createTextNode(childObj.toString());\n      elemAppend(elem, child);\n    }\n  }\n\n  if (typeof obj.ref === 'function') {\n    obj.ref(elem);\n  }\n\n  return elem;\n};\n\nexport const elemToObject = (elem) => {\n  if (isArray(elem)) {\n    let result = [];\n    for (let i = 0; i < elem.length; i++) {\n      result.push(elemToObject(elem[i]));\n    }\n  }\n\n  const result = {};\n  result.tagName = elem.tagName.toLowerCase();\n\n  const elemKeys = Object.keys(elem);\n  for (let i = 0; i < elemKeys.length; i++) {\n    let attr = elemKeys[i];\n    if (\n      attr !== 'tagName' &&\n      attr !== 'childNodes' &&\n      attr !== 'nodeType' &&\n      attr !== 'nodeValue'\n    ) {\n      if (attr === 'style') {\n        result.style = {};\n        let styleKeys = Object.keys(elem.style);\n        for (let j = 0; j < styleKeys.length; j++) {\n          let prop = styleKeys[j];\n          const val = elem.style[prop];\n          if (val && !/^\\d/.test(prop) && prop !== 'length') {\n            result.style[prop] = val;\n          }\n        }\n      } else {\n        const value = elem.getAttribute(attr);\n        if (value != null) {\n          result[attr] = value;\n        }\n      }\n    }\n  }\n\n  let children = [];\n  for (let i = 0; i < elem.childNodes.length; i++) {\n    let child = elem.childNodes[i];\n    if (child.nodeType === 1) {\n      children.push(elemToObject(child));\n    } else if (child.nodeType === 3) {\n      children.push(child.nodeValue);\n    }\n  }\n  if (children.length > 0) {\n    result.childNodes = children;\n  }\n  return result;\n};\n\nexport const elemClone = (elem) => {\n  const obj = elemToObject(elem);\n  return elemFromObject(obj);\n};\n\nexport const elemAppend = (par, elem) => {\n  if (isArray(elem)) {\n    for (let i = 0; i < elem.length; i++) {\n      elemAppend(par, elem[i]);\n    }\n    return;\n  }\n\n  if (par.tagName.includes('-')) {\n    par.shadowRoot.appendChild(elem, { wistiaGridCaller: true });\n  } else {\n    par.appendChild(elem, { wistiaGridCaller: true });\n  }\n};\n\nexport const elemPrepend = (par, elem) => {\n  if (isArray(elem)) {\n    for (let i = 0; i < elem.length; i++) {\n      elemPrepend(par, elem[i]);\n    }\n    return;\n  }\n\n  if (par.childNodes.length === 0) {\n    return elemAppend(par, elem);\n  }\n  return par.insertBefore(elem, par.childNodes[0]);\n};\n\nexport const elemBefore = (sibling, elem) => {\n  if (isArray(elem)) {\n    elem = elem.reverse();\n    for (let i = 0; i < elem.length; i++) {\n      elemBefore(sibling, elem[i]);\n    }\n    return;\n  }\n\n  return sibling.parentNode.insertBefore(elem, sibling);\n};\n\nexport const elemAfter = (sibling, elem) => {\n  if (isArray(elem)) {\n    elem = elem.reverse();\n    for (let i = 0; i < elem.length; i++) {\n      elemAfter(sibling, elem[i]);\n    }\n    return;\n  }\n\n  return sibling.parentNode.insertBefore(elem, sibling.nextSibling);\n};\n\nexport const elemRemove = (elem) => {\n  if (isArray(elem) || (window.NodeList && elem instanceof NodeList)) {\n    for (let i = 0; i < elem.length; i++) {\n      elemRemove(elem[i]);\n    }\n    return;\n  }\n\n  let par;\n  if (elem != null && (elem.nodeType === 1 || elem.nodeType === 3) && (par = elem.parentNode)) {\n    par.removeChild(elem);\n    elem = null;\n  }\n};\n\nexport const elemRemoveClass = (elem, klass) => {\n  if (isArray(elem) || (window.NodeList && elem instanceof NodeList)) {\n    for (let i = 0; i < elem.length; i++) {\n      elemRemoveClass(elem[i], klass);\n    }\n    return;\n  }\n\n  if (!elemHasClass(elem, klass)) {\n    return;\n  }\n\n  let className = elem.getAttribute('class');\n  if (className) {\n    const regexp = new RegExp(`\\\\b${klass}\\\\b`, 'g');\n    const newClassString = normalizeClassName(className.replace(regexp, ''));\n    elem.setAttribute('class', newClassString);\n  }\n};\n\nexport const elemAddClass = (elem, klass) => {\n  if (isArray(elem) || (window.NodeList && elem instanceof NodeList)) {\n    for (let i = 0; i < elem.length; i++) {\n      elemAddClass(elem[i], klass);\n    }\n    return;\n  }\n\n  if (elemHasClass(elem, klass)) {\n    return;\n  }\n\n  let className = elem.getAttribute('class');\n  let newClassString;\n  if (className) {\n    elemRemoveClass(elem, klass);\n    newClassString = normalizeClassName(`${className} ${klass}`);\n  } else {\n    newClassString = klass;\n  }\n\n  elem.setAttribute('class', newClassString);\n};\n\n// Longer than ` ${elem.className} `.indexOf(` ${klass} `) >= 0, but doesn't\n// cause JIT code deoptimization in Chrome.\nexport const elemHasClass = (elem, klass) => {\n  let className =\n    elem != null && typeof elem.getAttribute === 'function' && elem.getAttribute('class');\n  if (!className && elem && typeof elem.className === 'string') {\n    className = elem.className;\n  }\n\n  if (!className) {\n    return false;\n  }\n\n  let returnValue = false;\n\n  eachIndexOf(className, klass, (index) => {\n    let classBeginningFound = index === 0 || className.charAt(index - 1) === ' ';\n    let endsWidthClass = index + klass.length === className.length;\n    let classInMiddle = className.charAt(index + klass.length) === ' ';\n\n    if (classBeginningFound && (endsWidthClass || classInMiddle)) {\n      returnValue = true;\n      return BREAK_IDENTIFIER;\n    }\n  });\n\n  return returnValue;\n};\n\nconst BREAK_IDENTIFIER = {};\nconst eachIndexOf = (str, needle, fn) => {\n  let i = -1;\n\n  while ((i = str.indexOf(needle, i + 1)) != -1) {\n    if (fn(i) === BREAK_IDENTIFIER) {\n      break;\n    }\n  }\n};\n\nexport const elemClasses = (elem) => {\n  if (elem && typeof elem.className !== 'string') {\n    // Sometimes, className doesn't return a string. Who knew?!\n    // https://wistia.zendesk.com/agent/tickets/196879\n    return [''];\n  }\n  return ((elem && elem.className) || '').split(/\\s+/);\n};\n\nconst normalizeClassName = (className) => {\n  return className.replace(/^\\s+/g, '').replace(/\\s+$/g, '').replace(/\\s+/g, ' ');\n};\n\nexport const elemStyle = (elem, ...args) => {\n  if (isArray(elem) || (window.NodeList && elem instanceof NodeList)) {\n    let result = [];\n    for (let i = 0; i < elem.length; i++) {\n      let node = elem[i];\n      if (node.nodeType === 1) {\n        result.push(elemStyle(node, ...args));\n      }\n    }\n    return result;\n  }\n  if (args.length === 2) {\n    let prop = args[0];\n    let val = args[1];\n    elem.style[prop] = val;\n  } else if (args.length === 1) {\n    if (typeof args[0] === 'string') {\n      let prop = args[0];\n      try {\n        if (elem.currentStyle) {\n          return elem.currentStyle[prop];\n        }\n        if (window.getComputedStyle) {\n          return window.getComputedStyle(elem, null).getPropertyValue(prop);\n        }\n        return null;\n      } catch (e) {\n        wlog.notice(e);\n      }\n    } else {\n      let props = propsWithVendorPrefixes(args[0]);\n      for (let prop in props) {\n        let val = props[prop];\n        elem.style[prop] = val;\n      }\n    }\n  } else {\n    wlog('Unexpected args', elem, ...args);\n  }\n};\n\nconst VENDORED_PROPERTIES = {\n  borderImage: true,\n  mixBlendMode: true,\n  transform: true,\n  transition: true,\n  transitionDuration: true,\n};\n\nconst VENDOR_PREFIXES = ['webkit', 'moz', 'o', 'ms'];\n\nexport const propsWithVendorPrefixes = (props) => {\n  if (detect.chrome) {\n    return props;\n  }\n\n  const result = {};\n  for (let prop in props) {\n    let val = props[prop];\n    result[prop] = val;\n    if (VENDORED_PROPERTIES[prop]) {\n      let prefixes = VENDOR_PREFIXES;\n      for (let i = 0; i < prefixes.length; i++) {\n        let prefix = prefixes[i];\n        let prefixedProp = prefix + prop.charAt(0).toUpperCase() + prop.slice(1);\n        if (!prop[prefixedProp]) {\n          result[prefixedProp] = val;\n        }\n      }\n    }\n  }\n  return result;\n};\n\nexport const getComputedStyle = (elem, prop) => {\n  if (!window.getComputedStyle) {\n    return null;\n  }\n  const computed = window.getComputedStyle(elem, null);\n  if (computed == null) {\n    return null;\n  }\n  if (prop != null) {\n    return computed[prop];\n  }\n  return computed;\n};\n\nexport const elemWidth = (elem) => {\n  if (elem === window) {\n    if (window.innerWidth) {\n      return window.innerWidth;\n    }\n    if (document.documentElement) {\n      return document.documentElement.offsetWidth;\n    }\n    return document.body.offsetWidth;\n  }\n  if (elem === document) {\n    const body = document.body;\n    const html = document.documentElement;\n    return Math.max(\n      body.scrollWidth,\n      body.offsetWidth,\n      html.clientWidth,\n      html.scrollWidth,\n      html.offsetWidth,\n    );\n  }\n  let val;\n  if ((val = getComputedStyle(elem, 'width')) && val != null) {\n    return parseFloat(val);\n  }\n  if (elem.currentStyle) {\n    return elem.offsetWidth;\n  }\n  return -1;\n};\n\nexport const elemHeight = (elem) => {\n  if (elem === window) {\n    if (window.innerHeight) {\n      return window.innerHeight;\n    }\n    if (document.documentElement) {\n      return document.documentElement.offsetHeight;\n    }\n    return document.body.offsetHeight;\n  }\n  if (elem === document) {\n    const body = document.body;\n    const html = document.documentElement;\n    return Math.max(\n      body.scrollHeight,\n      body.offsetHeight,\n      html.clientHeight,\n      html.scrollHeight,\n      html.offsetHeight,\n    );\n  }\n  let val;\n  if ((val = getComputedStyle(elem, 'height')) && val != null) {\n    return parseFloat(val);\n  }\n  if (elem.currentStyle) {\n    return elem.offsetHeight;\n  }\n  return -1;\n};\n\nexport const elemContainsOffset = (elem, left, top) => {\n  let offset = elemOffset(elem);\n  offset.right = offset.left + elemWidth(elem);\n  offset.bottom = offset.top + elemHeight(elem);\n  return offset.left <= left && left < offset.right && offset.top <= top && top < offset.bottom;\n};\n\nexport const elemScrollOffset = (elem) => {\n  let curLeft = 0;\n  let curTop = 0;\n  if (elem.parentNode) {\n    while (elem && elem.offsetParent) {\n      curTop += elem.scrollTop;\n      curLeft += elem.scrollLeft;\n      elem = elem.parentNode;\n    }\n  }\n  return {\n    left: curLeft,\n    top: curTop,\n  };\n};\n\nexport const elemIsHidden = (elem) => {\n  while (elem && elem.nodeType === 1) {\n    if (elemStyle(elem, 'display') === 'none') {\n      return true;\n    }\n    elem = elem.parentNode;\n  }\n\n  return false;\n};\n\nexport const elemInDom = (elem) => {\n  while (elem) {\n    if (elem === document) {\n      return true;\n    }\n    elem = elem.parentNode || elem.getRootNode().host;\n  }\n  return false;\n};\n\nexport const elemIsDescendantOf = (elem, target) => {\n  let ancestors = elemAncestors(elem);\n  for (let i = 0; i < ancestors.length; i++) {\n    if (ancestors[i] === target) {\n      return true;\n    }\n  }\n  return false;\n};\n\nexport const elemAncestorWithClass = (elem, klass) => {\n  let ancestors = elemAncestors(elem);\n  for (let i = 0; i < ancestors.length; i++) {\n    if (elemHasClass(ancestors[i], klass)) {\n      return ancestors[i];\n    }\n  }\n  return null;\n};\n\nexport const elemAncestorHasClass = (elem, klass) => {\n  const ancestor = elemAncestorWithClass(elem, klass);\n  return !!ancestor;\n};\n\nexport const elemAncestors = (elem) => {\n  let current = elem;\n  const result = [];\n  while ((current = current.parentNode)) {\n    result.push(current);\n  }\n  return result;\n};\n\nexport const elemIsInside = (elem, ancestor) => {\n  return elem === ancestor || elemIsDescendantOf(elem, ancestor);\n};\n\nconst getTransitionProp = (props, time, easing) => {\n  const result = [];\n  for (let prop in props) {\n    result.push(`${prop} ${time}ms ${easing}`);\n  }\n  return result.join(',');\n};\n\nexport const elemAnimate = (elem, props = {}, options = {}) => {\n  options = merge({ time: 400, easing: 'ease' }, options);\n\n  const transitions = getTransitionProp(props, options.time, options.easing);\n  elemStyle(elem, { transition: transitions });\n\n  safeRequestAnimationFrame(() => {\n    elemStyle(elem, props);\n    setTimeout(() => {\n      elemStyle(elem, { transition: '' });\n      if (typeof options.callback === 'function') {\n        options.callback();\n      }\n    }, options.time);\n  });\n};\n\nexport const elemBind = (elem, event, fn, useCapture = false) => {\n  const eventShim = (e, ...args) => {\n    e = e || window.event;\n\n    // Normalize pageX, pagey\n    if (!e.pageX && !e.pageY && (e.clientX || e.clientY)) {\n      e.pageX = e.clientX + docScrollLeft();\n      e.pageY = e.clientY + docScrollTop();\n    }\n\n    // Normalize preventDefault\n    if (!e.preventDefault) {\n      e.preventDefault = function () {\n        e.returnValue = false;\n      };\n    }\n\n    // Normalize stopPropagation\n    if (!e.stopPropagation) {\n      e.stopPropagation = function () {\n        e.cancelBubble = true;\n      };\n    }\n\n    // Normalize `which`\n    if (e.which == null) {\n      e.which = e.charCode != null ? e.charCode : e.keyCode;\n    }\n    if (e.which == null && e.button != null) {\n      if (e.button & 1) {\n        e.which = 1; // left\n      } else if (e.button & 2) {\n        e.which = 3; // right\n      } else if (e.button & 4) {\n        e.which = 2; // middle\n      } else {\n        e.which = 0; // no button pressed\n      }\n    }\n\n    // Normalize `target`\n    if (e.target) {\n      // perfect\n    } else if (e.srcElement) {\n      e.target = e.srcElement;\n    }\n    if (e.target && e.target.nodeType === 3) {\n      e.target = e.target.parentNode;\n    }\n\n    // Actually call the function\n    const result = fn.apply(e.target, [e].concat(args));\n\n    // Sweet anonymous unbinding logic\n    if (result === elemUnbind) {\n      elemUnbind(elem, event, fn);\n    }\n\n    return result;\n  };\n\n  Wistia._elemBind = Wistia._elemBind || {};\n  const key = elemBindKey(elem, event, fn);\n  Wistia._elemBind[key] = eventShim;\n\n  // Set the elem/event property so we can unbind all for the elem\n  eventShim.elem = elem;\n  eventShim.event = event;\n\n  elem.addEventListener(event, eventShim, useCapture);\n  return function () {\n    elemUnbind(elem, event, fn, useCapture);\n  };\n};\n\nexport const elemUnbind = (elem, event, fn, useCapture = false) => {\n  if (!(elem != null && elem._wistiaElemId != null && fn != null && fn._wistiaBindId)) {\n    return;\n  }\n  const key = elemBindKey(elem, event, fn);\n  const eventShim = Wistia._elemBind[key];\n  if (eventShim) {\n    elem.removeEventListener(event, eventShim, useCapture);\n    eventShim.elem = null;\n    eventShim.event = null;\n  }\n  return delete Wistia._elemBind[key];\n};\n\nexport const elemUnbindAll = (elem) => {\n  for (let key in Wistia._elemBind) {\n    let eventShim = Wistia._elemBind[key];\n    if (eventShim && elem === eventShim.elem) {\n      let event = eventShim.event;\n      eventShim.elem.removeEventListener(event, eventShim, false);\n      eventShim.elem = null;\n      eventShim.event = null;\n      delete Wistia._elemBind[key];\n    }\n  }\n};\n\nexport const elemUnbindAllInside = (container) => {\n  let count = 0;\n  for (let key in Wistia._elemBind) {\n    let eventShim = Wistia._elemBind[key];\n    if (eventShim && elemIsInside(eventShim.elem, container)) {\n      let event = eventShim.event;\n      eventShim.elem.removeEventListener(event, eventShim, false);\n      eventShim.elem = null;\n      eventShim.event = null;\n      delete Wistia._elemBind[key];\n      count += 1;\n    }\n  }\n\n  return count;\n};\n\nexport const elemBindKey = (elem, event, fn) => {\n  elem._wistiaElemId = elem._wistiaElemId || seqId('wistia_elem_');\n  fn._wistiaBindId = fn._wistiaBindId || seqId('wistia_bind_');\n  return `${elem._wistiaElemId}.${event}.${fn._wistiaBindId}`;\n};\n\nexport const elemRebind = (elem, event, fn) => {\n  if (fn) {\n    elemUnbind(elem, event, fn);\n    return elemBind(elem, event, fn);\n  }\n};\n\nexport const elemBindOnce = (elem, event, fn) => {\n  const wrap = function (...args) {\n    fn.apply(this, args);\n    return elemUnbind;\n  };\n  return elemBind(elem, event, wrap);\n};\n\nexport const elemTrigger = (elem, event, ...customArguments) => {\n  if (elem.dispatchEvent) {\n    const eventObj = document.createEvent('Events');\n    eventObj.initEvent(event, true, false);\n    if (event === 'click' || event === 'doubleclick') {\n      eventObj.which = 1;\n    } else if (event === 'rightclick') {\n      eventObj.which = 2;\n    }\n    eventObj.customArguments = customArguments;\n    return elem.dispatchEvent(eventObj);\n  }\n  if (elem.fireEvent) {\n    const eventObj = { customArguments };\n    return elem.fireEvent(`on${event}`, eventObj);\n  }\n  wlog.error('neither dispatchEvent nor fireEvent is defined for', elem, event);\n};\n\nexport const fullscreenElement = () => {\n  return document.fullscreenElement || document.webkitFullscreenElement;\n};\n\nexport const elemRequestFullscreen = (elem) => {\n  if (elem.requestFullscreen) {\n    return elem.requestFullscreen();\n  }\n  if (elem.webkitEnterFullscreen) {\n    return new Promise((resolve) => {\n      elem.webkitEnterFullscreen();\n      resolve();\n    });\n  }\n  wlog.notice('no requestFullscreen functionality detected');\n  return Promise.resolve();\n};\n\nexport const elemCancelFullscreen = (elem) => {\n  if (document.exitFullscreen) {\n    return document.exitFullscreen();\n  }\n  if (elem && elem.webkitExitFullscreen) {\n    return new Promise((resolve) => {\n      elem.webkitExitFullscreen();\n      resolve();\n    });\n  }\n  wlog.notice('no cancelFullscreen functionality detected');\n  return Promise.resolve();\n};\n\nexport const elemStripEventAttributes = (elem) => {\n  const attributes = (elem && elem.attributes) || [];\n  try {\n    for (let i = 0; i < attributes.length; i++) {\n      let attr = attributes[i];\n      if (/^on.+/i.test(attr.name)) {\n        elem[attr.name] = null;\n        elem.removeAttribute(attr.name);\n      }\n    }\n  } catch (e) {\n    wlog.error(e);\n  }\n\n  if (elem.childNodes) {\n    for (let i = 0; i < elem.childNodes.length; i++) {\n      let child = elem.childNodes[i];\n      if (child.nodeType === 1) {\n        elemStripEventAttributes(child);\n      }\n    }\n  }\n};\n\nexport const elemMutationObserver = (fn) => {\n  const klass = detect.mutationObserver;\n  if (klass) {\n    return new window[klass](fn);\n  }\n  return null;\n};\n\nexport const docScrollTop = (t) => {\n  let docBody = document.body;\n  let docElem = document.documentElement;\n  if (t != null) {\n    if (docBody) {\n      docBody.scrollTop = t;\n    }\n    if (docElem) {\n      docElem.scrollTop = t;\n    }\n  } else {\n    return (docElem && docElem.scrollTop) || (docBody && docBody.scrollTop) || 0;\n  }\n};\n\nexport const docScrollLeft = (t) => {\n  let docBody = document.body;\n  let docElem = document.documentElement;\n  if (t != null) {\n    if (docBody) {\n      docBody.scrollLeft = t;\n    }\n    if (docElem) {\n      docElem.scrollLeft = t;\n    }\n  } else {\n    return (docElem && docElem.scrollLeft) || (docBody && docBody.scrollLeft) || 0;\n  }\n};\n\nexport const safeRequestAnimationFrame = (fn) => {\n  const requestAnimFrame =\n    window.requestAnimationFrame ||\n    window.webkitRequestAnimationFrame ||\n    window.mozRequestAnimationFrame ||\n    ((callback) => setTimeout(callback, 1000 / 60));\n  return requestAnimFrame(fn);\n};\n\nexport const formInputIsFocused = () => {\n  const activeElement =\n    document.activeElement.tagName === 'WISTIA-PLAYER'\n      ? document.activeElement.shadowRoot.activeElement\n      : document.activeElement;\n\n  return /^textarea|input|select$/i.test(activeElement.tagName) || activeElement.isContentEditable;\n};\n\nexport const currentEventSource = () => {\n  return inUserEventContext() ? 'user-event' : 'non-user-event';\n};\n\nexport const inUserEventContext = () => {\n  return !!activeDOMEvent;\n};\n\nexport const getLastActiveEventAt = () => {\n  return lastActiveEventAt;\n};\n\nlet activeDOMEvent;\nlet lastActiveEventAt = -1;\nconst userEventsThatShowIntent = [\n  'auxclick',\n  'click',\n  'contextmenu',\n  'dblclick',\n  'focus',\n  'keydown',\n  'keypress',\n  'keyup',\n  'mousedown',\n  'mouseup',\n  'reset',\n  'submit',\n  'touchend',\n  'touchstart',\n];\nuserEventsThatShowIntent.forEach((type) => {\n  const onEvent = (e) => {\n    activeDOMEvent = e;\n    lastActiveEventAt = Date.now();\n    setTimeout(() => {\n      if (activeDOMEvent === e) {\n        // if some other event has triggered synchronously, let's not clobber it;\n        // the last one to fire will set this to null.\n        activeDOMEvent = undefined;\n      }\n    }, 0);\n  };\n\n  // We use capture = true because event.stopPropagation() would cause us to\n  // miss this.\n  elemBind(\n    document,\n    type,\n    onEvent,\n    detect.passiveSupported ? { capture: true, passive: true } : true,\n  );\n});\n","import { h, JSX, type SVGAttributes } from 'preact';\nimport { BigPlayButtonLoadingAnim } from '../BigPlayButtonLoadingAnim.tsx';\nimport { standardSvgAttrs } from '../../../../../../../utilities/svg_boilerplate.ts';\n\ninterface BigPlayButtonSVGProps {\n  height: number;\n  isLoading?: boolean;\n  overrideFillColor?: string;\n  scale: number;\n  width: number;\n}\n\nconst ICON_WIDTH = 37;\nconst ICON_HEIGHT = 36;\n\nconst LOADING_ALPHA = 0.5;\n\nexport const BigPlayButtonSVG = ({\n  width,\n  height,\n  scale,\n  isLoading = false,\n  overrideFillColor,\n}: BigPlayButtonSVGProps): JSX.Element => {\n  const scaledHeight = height * scale;\n  const svgAttrs = standardSvgAttrs({\n    width,\n    height,\n    styleOverride: {\n      position: 'absolute',\n      height: `${scaledHeight}px`,\n      color: overrideFillColor,\n    },\n    ariaHidden: true,\n  }) as SVGAttributes<SVGSVGElement>;\n\n  // Center the icon within the width and height of the button\n  const iconXOffset = -(ICON_WIDTH / 2) + width / 2;\n  const iconYOffset = -(ICON_HEIGHT / 2) + height / 2;\n\n  return (\n    <svg {...svgAttrs} aria-hidden=\"true\">\n      <path\n        fill-rule=\"evenodd\"\n        clip-rule=\"evenodd\"\n        fill=\"currentcolor\"\n        opacity={isLoading ? LOADING_ALPHA : 1}\n        transform={`translate(${iconXOffset}, ${iconYOffset})`}\n        d=\"M12.138 2.173C10.812 1.254 9 2.203 9 3.817v28.366c0 1.613 1.812 2.563 3.138 1.644l20.487-14.183a2 2 0 0 0 0-3.288L12.138 2.173Z\"\n      />\n      {isLoading && <BigPlayButtonLoadingAnim />}\n    </svg>\n  );\n};\n","/**\n * Lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n    HOT_SPAN = 16;\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n    arrayTag = '[object Array]',\n    asyncTag = '[object AsyncFunction]',\n    boolTag = '[object Boolean]',\n    dateTag = '[object Date]',\n    errorTag = '[object Error]',\n    funcTag = '[object Function]',\n    genTag = '[object GeneratorFunction]',\n    mapTag = '[object Map]',\n    numberTag = '[object Number]',\n    nullTag = '[object Null]',\n    objectTag = '[object Object]',\n    proxyTag = '[object Proxy]',\n    regexpTag = '[object RegExp]',\n    setTag = '[object Set]',\n    stringTag = '[object String]',\n    undefinedTag = '[object Undefined]',\n    weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n    dataViewTag = '[object DataView]',\n    float32Tag = '[object Float32Array]',\n    float64Tag = '[object Float64Array]',\n    int8Tag = '[object Int8Array]',\n    int16Tag = '[object Int16Array]',\n    int32Tag = '[object Int32Array]',\n    uint8Tag = '[object Uint8Array]',\n    uint8ClampedTag = '[object Uint8ClampedArray]',\n    uint16Tag = '[object Uint16Array]',\n    uint32Tag = '[object Uint32Array]';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n  try {\n    // Use `util.types` for Node.js 10+.\n    var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n    if (types) {\n      return types;\n    }\n\n    // Legacy `process.binding('util')` for Node.js < 10.\n    return freeProcess && freeProcess.binding && freeProcess.binding('util');\n  } catch (e) {}\n}());\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n  switch (args.length) {\n    case 0: return func.call(thisArg);\n    case 1: return func.call(thisArg, args[0]);\n    case 2: return func.call(thisArg, args[0], args[1]);\n    case 3: return func.call(thisArg, args[0], args[1], args[2]);\n  }\n  return func.apply(thisArg, args);\n}\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n  var index = -1,\n      result = Array(n);\n\n  while (++index < n) {\n    result[index] = iteratee(index);\n  }\n  return result;\n}\n\n/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n  return function(value) {\n    return func(value);\n  };\n}\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n  return object == null ? undefined : object[key];\n}\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n  return function(arg) {\n    return func(transform(arg));\n  };\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n    funcProto = Function.prototype,\n    objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n  var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n  return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n  funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n  .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n    Symbol = root.Symbol,\n    Uint8Array = root.Uint8Array,\n    allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,\n    getPrototype = overArg(Object.getPrototypeOf, Object),\n    objectCreate = Object.create,\n    propertyIsEnumerable = objectProto.propertyIsEnumerable,\n    splice = arrayProto.splice,\n    symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\nvar defineProperty = (function() {\n  try {\n    var func = getNative(Object, 'defineProperty');\n    func({}, '', {});\n    return func;\n  } catch (e) {}\n}());\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n    nativeMax = Math.max,\n    nativeNow = Date.now;\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map'),\n    nativeCreate = getNative(Object, 'create');\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n  function object() {}\n  return function(proto) {\n    if (!isObject(proto)) {\n      return {};\n    }\n    if (objectCreate) {\n      return objectCreate(proto);\n    }\n    object.prototype = proto;\n    var result = new object;\n    object.prototype = undefined;\n    return result;\n  };\n}());\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n  var index = -1,\n      length = entries == null ? 0 : entries.length;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n  this.__data__ = nativeCreate ? nativeCreate(null) : {};\n  this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n  var result = this.has(key) && delete this.__data__[key];\n  this.size -= result ? 1 : 0;\n  return result;\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n  var data = this.__data__;\n  if (nativeCreate) {\n    var result = data[key];\n    return result === HASH_UNDEFINED ? undefined : result;\n  }\n  return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n  var data = this.__data__;\n  return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n  var data = this.__data__;\n  this.size += this.has(key) ? 0 : 1;\n  data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n  return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n  var index = -1,\n      length = entries == null ? 0 : entries.length;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n  this.__data__ = [];\n  this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  if (index < 0) {\n    return false;\n  }\n  var lastIndex = data.length - 1;\n  if (index == lastIndex) {\n    data.pop();\n  } else {\n    splice.call(data, index, 1);\n  }\n  --this.size;\n  return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n  return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  if (index < 0) {\n    ++this.size;\n    data.push([key, value]);\n  } else {\n    data[index][1] = value;\n  }\n  return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n  var index = -1,\n      length = entries == null ? 0 : entries.length;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n  this.size = 0;\n  this.__data__ = {\n    'hash': new Hash,\n    'map': new (Map || ListCache),\n    'string': new Hash\n  };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n  var result = getMapData(this, key)['delete'](key);\n  this.size -= result ? 1 : 0;\n  return result;\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n  return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n  return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n  var data = getMapData(this, key),\n      size = data.size;\n\n  data.set(key, value);\n  this.size += data.size == size ? 0 : 1;\n  return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n  var data = this.__data__ = new ListCache(entries);\n  this.size = data.size;\n}\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n  this.__data__ = new ListCache;\n  this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n  var data = this.__data__,\n      result = data['delete'](key);\n\n  this.size = data.size;\n  return result;\n}\n\n/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n  return this.__data__.get(key);\n}\n\n/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n  return this.__data__.has(key);\n}\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n  var data = this.__data__;\n  if (data instanceof ListCache) {\n    var pairs = data.__data__;\n    if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n      pairs.push([key, value]);\n      this.size = ++data.size;\n      return this;\n    }\n    data = this.__data__ = new MapCache(pairs);\n  }\n  data.set(key, value);\n  this.size = data.size;\n  return this;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n  var isArr = isArray(value),\n      isArg = !isArr && isArguments(value),\n      isBuff = !isArr && !isArg && isBuffer(value),\n      isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n      skipIndexes = isArr || isArg || isBuff || isType,\n      result = skipIndexes ? baseTimes(value.length, String) : [],\n      length = result.length;\n\n  for (var key in value) {\n    if ((inherited || hasOwnProperty.call(value, key)) &&\n        !(skipIndexes && (\n           // Safari 9 has enumerable `arguments.length` in strict mode.\n           key == 'length' ||\n           // Node.js 0.10 has enumerable non-index properties on buffers.\n           (isBuff && (key == 'offset' || key == 'parent')) ||\n           // PhantomJS 2 has enumerable non-index properties on typed arrays.\n           (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n           // Skip index properties.\n           isIndex(key, length)\n        ))) {\n      result.push(key);\n    }\n  }\n  return result;\n}\n\n/**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignMergeValue(object, key, value) {\n  if ((value !== undefined && !eq(object[key], value)) ||\n      (value === undefined && !(key in object))) {\n    baseAssignValue(object, key, value);\n  }\n}\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n  var objValue = object[key];\n  if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n      (value === undefined && !(key in object))) {\n    baseAssignValue(object, key, value);\n  }\n}\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n  var length = array.length;\n  while (length--) {\n    if (eq(array[length][0], key)) {\n      return length;\n    }\n  }\n  return -1;\n}\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n  if (key == '__proto__' && defineProperty) {\n    defineProperty(object, key, {\n      'configurable': true,\n      'enumerable': true,\n      'value': value,\n      'writable': true\n    });\n  } else {\n    object[key] = value;\n  }\n}\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n  if (value == null) {\n    return value === undefined ? undefinedTag : nullTag;\n  }\n  return (symToStringTag && symToStringTag in Object(value))\n    ? getRawTag(value)\n    : objectToString(value);\n}\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n  return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n *  else `false`.\n */\nfunction baseIsNative(value) {\n  if (!isObject(value) || isMasked(value)) {\n    return false;\n  }\n  var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n  return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n  return isObjectLike(value) &&\n    isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n  if (!isObject(object)) {\n    return nativeKeysIn(object);\n  }\n  var isProto = isPrototype(object),\n      result = [];\n\n  for (var key in object) {\n    if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n      result.push(key);\n    }\n  }\n  return result;\n}\n\n/**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n *  counterparts.\n */\nfunction baseMerge(object, source, srcIndex, customizer, stack) {\n  if (object === source) {\n    return;\n  }\n  baseFor(source, function(srcValue, key) {\n    stack || (stack = new Stack);\n    if (isObject(srcValue)) {\n      baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n    }\n    else {\n      var newValue = customizer\n        ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n        : undefined;\n\n      if (newValue === undefined) {\n        newValue = srcValue;\n      }\n      assignMergeValue(object, key, newValue);\n    }\n  }, keysIn);\n}\n\n/**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n *  counterparts.\n */\nfunction baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n  var objValue = safeGet(object, key),\n      srcValue = safeGet(source, key),\n      stacked = stack.get(srcValue);\n\n  if (stacked) {\n    assignMergeValue(object, key, stacked);\n    return;\n  }\n  var newValue = customizer\n    ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n    : undefined;\n\n  var isCommon = newValue === undefined;\n\n  if (isCommon) {\n    var isArr = isArray(srcValue),\n        isBuff = !isArr && isBuffer(srcValue),\n        isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n    newValue = srcValue;\n    if (isArr || isBuff || isTyped) {\n      if (isArray(objValue)) {\n        newValue = objValue;\n      }\n      else if (isArrayLikeObject(objValue)) {\n        newValue = copyArray(objValue);\n      }\n      else if (isBuff) {\n        isCommon = false;\n        newValue = cloneBuffer(srcValue, true);\n      }\n      else if (isTyped) {\n        isCommon = false;\n        newValue = cloneTypedArray(srcValue, true);\n      }\n      else {\n        newValue = [];\n      }\n    }\n    else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n      newValue = objValue;\n      if (isArguments(objValue)) {\n        newValue = toPlainObject(objValue);\n      }\n      else if (!isObject(objValue) || isFunction(objValue)) {\n        newValue = initCloneObject(srcValue);\n      }\n    }\n    else {\n      isCommon = false;\n    }\n  }\n  if (isCommon) {\n    // Recursively merge objects and arrays (susceptible to call stack limits).\n    stack.set(srcValue, newValue);\n    mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n    stack['delete'](srcValue);\n  }\n  assignMergeValue(object, key, newValue);\n}\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n  return setToString(overRest(func, start, identity), func + '');\n}\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n  return defineProperty(func, 'toString', {\n    'configurable': true,\n    'enumerable': false,\n    'value': constant(string),\n    'writable': true\n  });\n};\n\n/**\n * Creates a clone of  `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n  if (isDeep) {\n    return buffer.slice();\n  }\n  var length = buffer.length,\n      result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n  buffer.copy(result);\n  return result;\n}\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n  var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n  new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n  return result;\n}\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n  var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n  return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\n/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n  var index = -1,\n      length = source.length;\n\n  array || (array = Array(length));\n  while (++index < length) {\n    array[index] = source[index];\n  }\n  return array;\n}\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n  var isNew = !object;\n  object || (object = {});\n\n  var index = -1,\n      length = props.length;\n\n  while (++index < length) {\n    var key = props[index];\n\n    var newValue = customizer\n      ? customizer(object[key], source[key], key, object, source)\n      : undefined;\n\n    if (newValue === undefined) {\n      newValue = source[key];\n    }\n    if (isNew) {\n      baseAssignValue(object, key, newValue);\n    } else {\n      assignValue(object, key, newValue);\n    }\n  }\n  return object;\n}\n\n/**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\nfunction createAssigner(assigner) {\n  return baseRest(function(object, sources) {\n    var index = -1,\n        length = sources.length,\n        customizer = length > 1 ? sources[length - 1] : undefined,\n        guard = length > 2 ? sources[2] : undefined;\n\n    customizer = (assigner.length > 3 && typeof customizer == 'function')\n      ? (length--, customizer)\n      : undefined;\n\n    if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n      customizer = length < 3 ? undefined : customizer;\n      length = 1;\n    }\n    object = Object(object);\n    while (++index < length) {\n      var source = sources[index];\n      if (source) {\n        assigner(object, source, index, customizer);\n      }\n    }\n    return object;\n  });\n}\n\n/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n  return function(object, iteratee, keysFunc) {\n    var index = -1,\n        iterable = Object(object),\n        props = keysFunc(object),\n        length = props.length;\n\n    while (length--) {\n      var key = props[fromRight ? length : ++index];\n      if (iteratee(iterable[key], key, iterable) === false) {\n        break;\n      }\n    }\n    return object;\n  };\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n  var data = map.__data__;\n  return isKeyable(key)\n    ? data[typeof key == 'string' ? 'string' : 'hash']\n    : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n  var value = getValue(object, key);\n  return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n  var isOwn = hasOwnProperty.call(value, symToStringTag),\n      tag = value[symToStringTag];\n\n  try {\n    value[symToStringTag] = undefined;\n    var unmasked = true;\n  } catch (e) {}\n\n  var result = nativeObjectToString.call(value);\n  if (unmasked) {\n    if (isOwn) {\n      value[symToStringTag] = tag;\n    } else {\n      delete value[symToStringTag];\n    }\n  }\n  return result;\n}\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n  return (typeof object.constructor == 'function' && !isPrototype(object))\n    ? baseCreate(getPrototype(object))\n    : {};\n}\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n  var type = typeof value;\n  length = length == null ? MAX_SAFE_INTEGER : length;\n\n  return !!length &&\n    (type == 'number' ||\n      (type != 'symbol' && reIsUint.test(value))) &&\n        (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n *  else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n  if (!isObject(object)) {\n    return false;\n  }\n  var type = typeof index;\n  if (type == 'number'\n        ? (isArrayLike(object) && isIndex(index, object.length))\n        : (type == 'string' && index in object)\n      ) {\n    return eq(object[index], value);\n  }\n  return false;\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n  var type = typeof value;\n  return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n    ? (value !== '__proto__')\n    : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n  return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n  var Ctor = value && value.constructor,\n      proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n  return value === proto;\n}\n\n/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n  var result = [];\n  if (object != null) {\n    for (var key in Object(object)) {\n      result.push(key);\n    }\n  }\n  return result;\n}\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n  return nativeObjectToString.call(value);\n}\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n  start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n  return function() {\n    var args = arguments,\n        index = -1,\n        length = nativeMax(args.length - start, 0),\n        array = Array(length);\n\n    while (++index < length) {\n      array[index] = args[start + index];\n    }\n    index = -1;\n    var otherArgs = Array(start + 1);\n    while (++index < start) {\n      otherArgs[index] = args[index];\n    }\n    otherArgs[start] = transform(array);\n    return apply(func, this, otherArgs);\n  };\n}\n\n/**\n * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction safeGet(object, key) {\n  if (key === 'constructor' && typeof object[key] === 'function') {\n    return;\n  }\n\n  if (key == '__proto__') {\n    return;\n  }\n\n  return object[key];\n}\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n  var count = 0,\n      lastCalled = 0;\n\n  return function() {\n    var stamp = nativeNow(),\n        remaining = HOT_SPAN - (stamp - lastCalled);\n\n    lastCalled = stamp;\n    if (remaining > 0) {\n      if (++count >= HOT_COUNT) {\n        return arguments[0];\n      }\n    } else {\n      count = 0;\n    }\n    return func.apply(undefined, arguments);\n  };\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n  if (func != null) {\n    try {\n      return funcToString.call(func);\n    } catch (e) {}\n    try {\n      return (func + '');\n    } catch (e) {}\n  }\n  return '';\n}\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n  return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n *  else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n  return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n    !propertyIsEnumerable.call(value, 'callee');\n};\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n  return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n *  else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n  return isObjectLike(value) && isArrayLike(value);\n}\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n  if (!isObject(value)) {\n    return false;\n  }\n  // The use of `Object#toString` avoids issues with the `typeof` operator\n  // in Safari 9 which returns 'object' for typed arrays and other constructors.\n  var tag = baseGetTag(value);\n  return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n  return typeof value == 'number' &&\n    value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n  var type = typeof value;\n  return value != null && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n  return value != null && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n *   this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n  if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n    return false;\n  }\n  var proto = getPrototype(value);\n  if (proto === null) {\n    return true;\n  }\n  var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n  return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n    funcToString.call(Ctor) == objectCtorString;\n}\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n/**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n *   this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\nfunction toPlainObject(value) {\n  return copyObject(value, keysIn(value));\n}\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n *   this.a = 1;\n *   this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n  return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\n/**\n * This method is like `_.assign` except that it recursively merges own and\n * inherited enumerable string keyed properties of source objects into the\n * destination object. Source properties that resolve to `undefined` are\n * skipped if a destination value exists. Array and plain object properties\n * are merged recursively. Other objects and value types are overridden by\n * assignment. Source objects are applied from left to right. Subsequent\n * sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {\n *   'a': [{ 'b': 2 }, { 'd': 4 }]\n * };\n *\n * var other = {\n *   'a': [{ 'c': 3 }, { 'e': 5 }]\n * };\n *\n * _.merge(object, other);\n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n */\nvar merge = createAssigner(function(object, source, srcIndex) {\n  baseMerge(object, source, srcIndex);\n});\n\n/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n  return function() {\n    return value;\n  };\n}\n\n/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n  return value;\n}\n\n/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n  return false;\n}\n\nmodule.exports = merge;\n","let rootTest;\ntry {\n  rootTest = self; // dom or web worker\n  if (\n    rootTest.self !== rootTest &&\n    typeof rootTest.self !== 'undefined' &&\n    typeof window !== 'undefined'\n  ) {\n    // Accidentally assigning `self` is a thing that websites do. But most of\n    // these accidental assigns won't have a self property pointing at themselves.\n    rootTest = window;\n  }\n} catch (err) {\n  if (typeof globalThis !== 'undefined') {\n    rootTest = globalThis; // es native in the future\n  } else {\n    // oh god, what's even happening\n    rootTest = window;\n  }\n}\n\nexport const root = rootTest;\n","export const interBoldItalicFontFamily = 'WistiaPlayerInterBoldItalic, Helvetica, Sans-Serif';\nexport const interFontFamily = 'WistiaPlayerInter, Helvetica, Sans-Serif';\nexport const interSemiBoldFontFamily = 'WistiaPlayerInterSemiBold, Helvetica, Sans-Serif';\nexport const interNumbersSemiBold = 'WistiaPlayerInterNumbersSemiBold, Helvetica, Sans-Serif';\n","/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n    arrayTag = '[object Array]',\n    boolTag = '[object Boolean]',\n    dateTag = '[object Date]',\n    errorTag = '[object Error]',\n    funcTag = '[object Function]',\n    genTag = '[object GeneratorFunction]',\n    mapTag = '[object Map]',\n    numberTag = '[object Number]',\n    objectTag = '[object Object]',\n    promiseTag = '[object Promise]',\n    regexpTag = '[object RegExp]',\n    setTag = '[object Set]',\n    stringTag = '[object String]',\n    symbolTag = '[object Symbol]',\n    weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n    dataViewTag = '[object DataView]',\n    float32Tag = '[object Float32Array]',\n    float64Tag = '[object Float64Array]',\n    int8Tag = '[object Int8Array]',\n    int16Tag = '[object Int16Array]',\n    int32Tag = '[object Int32Array]',\n    uint8Tag = '[object Uint8Array]',\n    uint8ClampedTag = '[object Uint8ClampedArray]',\n    uint16Tag = '[object Uint16Array]',\n    uint32Tag = '[object Uint32Array]';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/**\n * Adds the key-value `pair` to `map`.\n *\n * @private\n * @param {Object} map The map to modify.\n * @param {Array} pair The key-value pair to add.\n * @returns {Object} Returns `map`.\n */\nfunction addMapEntry(map, pair) {\n  // Don't return `map.set` because it's not chainable in IE 11.\n  map.set(pair[0], pair[1]);\n  return map;\n}\n\n/**\n * Adds `value` to `set`.\n *\n * @private\n * @param {Object} set The set to modify.\n * @param {*} value The value to add.\n * @returns {Object} Returns `set`.\n */\nfunction addSetEntry(set, value) {\n  // Don't return `set.add` because it's not chainable in IE 11.\n  set.add(value);\n  return set;\n}\n\n/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n  var index = -1,\n      length = array ? array.length : 0;\n\n  while (++index < length) {\n    if (iteratee(array[index], index, array) === false) {\n      break;\n    }\n  }\n  return array;\n}\n\n/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n  var index = -1,\n      length = values.length,\n      offset = array.length;\n\n  while (++index < length) {\n    array[offset + index] = values[index];\n  }\n  return array;\n}\n\n/**\n * A specialized version of `_.reduce` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the first element of `array` as\n *  the initial value.\n * @returns {*} Returns the accumulated value.\n */\nfunction arrayReduce(array, iteratee, accumulator, initAccum) {\n  var index = -1,\n      length = array ? array.length : 0;\n\n  if (initAccum && length) {\n    accumulator = array[++index];\n  }\n  while (++index < length) {\n    accumulator = iteratee(accumulator, array[index], index, array);\n  }\n  return accumulator;\n}\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n  var index = -1,\n      result = Array(n);\n\n  while (++index < n) {\n    result[index] = iteratee(index);\n  }\n  return result;\n}\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n  return object == null ? undefined : object[key];\n}\n\n/**\n * Checks if `value` is a host object in IE < 9.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\n */\nfunction isHostObject(value) {\n  // Many host objects are `Object` objects that can coerce to strings\n  // despite having improperly defined `toString` methods.\n  var result = false;\n  if (value != null && typeof value.toString != 'function') {\n    try {\n      result = !!(value + '');\n    } catch (e) {}\n  }\n  return result;\n}\n\n/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n  var index = -1,\n      result = Array(map.size);\n\n  map.forEach(function(value, key) {\n    result[++index] = [key, value];\n  });\n  return result;\n}\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n  return function(arg) {\n    return func(transform(arg));\n  };\n}\n\n/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n  var index = -1,\n      result = Array(set.size);\n\n  set.forEach(function(value) {\n    result[++index] = value;\n  });\n  return result;\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n    funcProto = Function.prototype,\n    objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n  var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n  return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n  funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n  .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n    Symbol = root.Symbol,\n    Uint8Array = root.Uint8Array,\n    getPrototype = overArg(Object.getPrototypeOf, Object),\n    objectCreate = Object.create,\n    propertyIsEnumerable = objectProto.propertyIsEnumerable,\n    splice = arrayProto.splice;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols,\n    nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n    nativeKeys = overArg(Object.keys, Object);\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView'),\n    Map = getNative(root, 'Map'),\n    Promise = getNative(root, 'Promise'),\n    Set = getNative(root, 'Set'),\n    WeakMap = getNative(root, 'WeakMap'),\n    nativeCreate = getNative(Object, 'create');\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n    mapCtorString = toSource(Map),\n    promiseCtorString = toSource(Promise),\n    setCtorString = toSource(Set),\n    weakMapCtorString = toSource(WeakMap);\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n    symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n  var index = -1,\n      length = entries ? entries.length : 0;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n  this.__data__ = nativeCreate ? nativeCreate(null) : {};\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n  return this.has(key) && delete this.__data__[key];\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n  var data = this.__data__;\n  if (nativeCreate) {\n    var result = data[key];\n    return result === HASH_UNDEFINED ? undefined : result;\n  }\n  return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n  var data = this.__data__;\n  return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n  var data = this.__data__;\n  data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n  return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n  var index = -1,\n      length = entries ? entries.length : 0;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n  this.__data__ = [];\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  if (index < 0) {\n    return false;\n  }\n  var lastIndex = data.length - 1;\n  if (index == lastIndex) {\n    data.pop();\n  } else {\n    splice.call(data, index, 1);\n  }\n  return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n  return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  if (index < 0) {\n    data.push([key, value]);\n  } else {\n    data[index][1] = value;\n  }\n  return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n  var index = -1,\n      length = entries ? entries.length : 0;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n  this.__data__ = {\n    'hash': new Hash,\n    'map': new (Map || ListCache),\n    'string': new Hash\n  };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n  return getMapData(this, key)['delete'](key);\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n  return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n  return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n  getMapData(this, key).set(key, value);\n  return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n  this.__data__ = new ListCache(entries);\n}\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n  this.__data__ = new ListCache;\n}\n\n/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n  return this.__data__['delete'](key);\n}\n\n/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n  return this.__data__.get(key);\n}\n\n/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n  return this.__data__.has(key);\n}\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n  var cache = this.__data__;\n  if (cache instanceof ListCache) {\n    var pairs = cache.__data__;\n    if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n      pairs.push([key, value]);\n      return this;\n    }\n    cache = this.__data__ = new MapCache(pairs);\n  }\n  cache.set(key, value);\n  return this;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n  // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n  // Safari 9 makes `arguments.length` enumerable in strict mode.\n  var result = (isArray(value) || isArguments(value))\n    ? baseTimes(value.length, String)\n    : [];\n\n  var length = result.length,\n      skipIndexes = !!length;\n\n  for (var key in value) {\n    if ((inherited || hasOwnProperty.call(value, key)) &&\n        !(skipIndexes && (key == 'length' || isIndex(key, length)))) {\n      result.push(key);\n    }\n  }\n  return result;\n}\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n  var objValue = object[key];\n  if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n      (value === undefined && !(key in object))) {\n    object[key] = value;\n  }\n}\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n  var length = array.length;\n  while (length--) {\n    if (eq(array[length][0], key)) {\n      return length;\n    }\n  }\n  return -1;\n}\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n  return object && copyObject(source, keys(source), object);\n}\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @param {boolean} [isFull] Specify a clone including symbols.\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, isDeep, isFull, customizer, key, object, stack) {\n  var result;\n  if (customizer) {\n    result = object ? customizer(value, key, object, stack) : customizer(value);\n  }\n  if (result !== undefined) {\n    return result;\n  }\n  if (!isObject(value)) {\n    return value;\n  }\n  var isArr = isArray(value);\n  if (isArr) {\n    result = initCloneArray(value);\n    if (!isDeep) {\n      return copyArray(value, result);\n    }\n  } else {\n    var tag = getTag(value),\n        isFunc = tag == funcTag || tag == genTag;\n\n    if (isBuffer(value)) {\n      return cloneBuffer(value, isDeep);\n    }\n    if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n      if (isHostObject(value)) {\n        return object ? value : {};\n      }\n      result = initCloneObject(isFunc ? {} : value);\n      if (!isDeep) {\n        return copySymbols(value, baseAssign(result, value));\n      }\n    } else {\n      if (!cloneableTags[tag]) {\n        return object ? value : {};\n      }\n      result = initCloneByTag(value, tag, baseClone, isDeep);\n    }\n  }\n  // Check for circular references and return its corresponding clone.\n  stack || (stack = new Stack);\n  var stacked = stack.get(value);\n  if (stacked) {\n    return stacked;\n  }\n  stack.set(value, result);\n\n  if (!isArr) {\n    var props = isFull ? getAllKeys(value) : keys(value);\n  }\n  arrayEach(props || value, function(subValue, key) {\n    if (props) {\n      key = subValue;\n      subValue = value[key];\n    }\n    // Recursively populate clone (susceptible to call stack limits).\n    assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack));\n  });\n  return result;\n}\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} prototype The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nfunction baseCreate(proto) {\n  return isObject(proto) ? objectCreate(proto) : {};\n}\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n  var result = keysFunc(object);\n  return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\n/**\n * The base implementation of `getTag`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n  return objectToString.call(value);\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n *  else `false`.\n */\nfunction baseIsNative(value) {\n  if (!isObject(value) || isMasked(value)) {\n    return false;\n  }\n  var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;\n  return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n  if (!isPrototype(object)) {\n    return nativeKeys(object);\n  }\n  var result = [];\n  for (var key in Object(object)) {\n    if (hasOwnProperty.call(object, key) && key != 'constructor') {\n      result.push(key);\n    }\n  }\n  return result;\n}\n\n/**\n * Creates a clone of  `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n  if (isDeep) {\n    return buffer.slice();\n  }\n  var result = new buffer.constructor(buffer.length);\n  buffer.copy(result);\n  return result;\n}\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n  var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n  new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n  return result;\n}\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n  var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n  return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\n/**\n * Creates a clone of `map`.\n *\n * @private\n * @param {Object} map The map to clone.\n * @param {Function} cloneFunc The function to clone values.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned map.\n */\nfunction cloneMap(map, isDeep, cloneFunc) {\n  var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map);\n  return arrayReduce(array, addMapEntry, new map.constructor);\n}\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n  var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n  result.lastIndex = regexp.lastIndex;\n  return result;\n}\n\n/**\n * Creates a clone of `set`.\n *\n * @private\n * @param {Object} set The set to clone.\n * @param {Function} cloneFunc The function to clone values.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned set.\n */\nfunction cloneSet(set, isDeep, cloneFunc) {\n  var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set);\n  return arrayReduce(array, addSetEntry, new set.constructor);\n}\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n  return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n  var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n  return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\n/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n  var index = -1,\n      length = source.length;\n\n  array || (array = Array(length));\n  while (++index < length) {\n    array[index] = source[index];\n  }\n  return array;\n}\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n  object || (object = {});\n\n  var index = -1,\n      length = props.length;\n\n  while (++index < length) {\n    var key = props[index];\n\n    var newValue = customizer\n      ? customizer(object[key], source[key], key, object, source)\n      : undefined;\n\n    assignValue(object, key, newValue === undefined ? source[key] : newValue);\n  }\n  return object;\n}\n\n/**\n * Copies own symbol properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n  return copyObject(source, getSymbols(source), object);\n}\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n  return baseGetAllKeys(object, keys, getSymbols);\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n  var data = map.__data__;\n  return isKeyable(key)\n    ? data[typeof key == 'string' ? 'string' : 'hash']\n    : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n  var value = getValue(object, key);\n  return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * Creates an array of the own enumerable symbol properties of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray;\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11,\n// for data views in Edge < 14, and promises in Node.js.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n    (Map && getTag(new Map) != mapTag) ||\n    (Promise && getTag(Promise.resolve()) != promiseTag) ||\n    (Set && getTag(new Set) != setTag) ||\n    (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n  getTag = function(value) {\n    var result = objectToString.call(value),\n        Ctor = result == objectTag ? value.constructor : undefined,\n        ctorString = Ctor ? toSource(Ctor) : undefined;\n\n    if (ctorString) {\n      switch (ctorString) {\n        case dataViewCtorString: return dataViewTag;\n        case mapCtorString: return mapTag;\n        case promiseCtorString: return promiseTag;\n        case setCtorString: return setTag;\n        case weakMapCtorString: return weakMapTag;\n      }\n    }\n    return result;\n  };\n}\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n  var length = array.length,\n      result = array.constructor(length);\n\n  // Add properties assigned by `RegExp#exec`.\n  if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n    result.index = array.index;\n    result.input = array.input;\n  }\n  return result;\n}\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n  return (typeof object.constructor == 'function' && !isPrototype(object))\n    ? baseCreate(getPrototype(object))\n    : {};\n}\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {Function} cloneFunc The function to clone values.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, cloneFunc, isDeep) {\n  var Ctor = object.constructor;\n  switch (tag) {\n    case arrayBufferTag:\n      return cloneArrayBuffer(object);\n\n    case boolTag:\n    case dateTag:\n      return new Ctor(+object);\n\n    case dataViewTag:\n      return cloneDataView(object, isDeep);\n\n    case float32Tag: case float64Tag:\n    case int8Tag: case int16Tag: case int32Tag:\n    case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n      return cloneTypedArray(object, isDeep);\n\n    case mapTag:\n      return cloneMap(object, isDeep, cloneFunc);\n\n    case numberTag:\n    case stringTag:\n      return new Ctor(object);\n\n    case regexpTag:\n      return cloneRegExp(object);\n\n    case setTag:\n      return cloneSet(object, isDeep, cloneFunc);\n\n    case symbolTag:\n      return cloneSymbol(object);\n  }\n}\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n  length = length == null ? MAX_SAFE_INTEGER : length;\n  return !!length &&\n    (typeof value == 'number' || reIsUint.test(value)) &&\n    (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n  var type = typeof value;\n  return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n    ? (value !== '__proto__')\n    : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n  return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n  var Ctor = value && value.constructor,\n      proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n  return value === proto;\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to process.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n  if (func != null) {\n    try {\n      return funcToString.call(func);\n    } catch (e) {}\n    try {\n      return (func + '');\n    } catch (e) {}\n  }\n  return '';\n}\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n  return baseClone(value, true, true);\n}\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n  return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n *  else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nfunction isArguments(value) {\n  // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n  return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&\n    (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);\n}\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n  return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n *  else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n  return isObjectLike(value) && isArrayLike(value);\n}\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n  // The use of `Object#toString` avoids issues with the `typeof` operator\n  // in Safari 8-9 which returns 'object' for typed array and other constructors.\n  var tag = isObject(value) ? objectToString.call(value) : '';\n  return tag == funcTag || tag == genTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n  return typeof value == 'number' &&\n    value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n  var type = typeof value;\n  return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n  return !!value && typeof value == 'object';\n}\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n *   this.a = 1;\n *   this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n  return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\n/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n  return [];\n}\n\n/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n  return false;\n}\n\nmodule.exports = cloneDeep;\n","// You wouldn't believe it, but IE11 does not support Object.assign(), so this\n// is our non-polyfill replacement.\n\nexport const assign = (obj1, ...objs) => {\n  if (Object.assign) {\n    return Object.assign(obj1, ...objs);\n  }\n  for (let i = 0; i < objs.length; i++) {\n    assignOne(obj1, objs[i]);\n  }\n  return obj1;\n};\n\nconst assignOne = (obj1, obj2) => {\n  for (let k in obj2) {\n    if (Object.hasOwn(obj2, k)) {\n      obj1[k] = obj2[k];\n    }\n  }\n  return obj1;\n};\n","import { Wistia } from '../wistia_namespace.ts';\n\nconst aps = Array.prototype.slice;\n\nexport const bind = function (event, fn) {\n  const self = this;\n  if (!self._bindings) {\n    self._bindings = {};\n  }\n  if (!self._bindings[event]) {\n    self._bindings[event] = [];\n  }\n  self._bindings[event].push(fn);\n  return function () {\n    self.unbind(event, fn);\n  };\n};\n\nexport const unbind = function (event, fn) {\n  if (!this._bindings) {\n    return this;\n  }\n  if (!this._bindings[event]) {\n    return this;\n  }\n  const bindings = [];\n  for (let i = 0; i < this._bindings[event].length; i++) {\n    let boundFn = this._bindings[event][i];\n    if (boundFn !== fn) {\n      bindings.push(boundFn);\n    }\n  }\n  this._bindings[event] = bindings;\n};\n\nexport const rebind = function (event, fn) {\n  this.unbind(event, fn);\n  this.bind(event, fn);\n  return { event, fn };\n};\n\nexport const trigger = function (event, ...args) {\n  if (this._bindings && this._bindings.all != null) {\n    triggerImpl.apply(this, ['all', event].concat(args));\n  }\n  return triggerImpl.apply(this, [event].concat(args));\n};\n\nconst triggerImpl = function (event) {\n  if (!this._bindings) {\n    return this;\n  }\n  if (!this._bindings[event]) {\n    return this;\n  }\n  const args = aps.call(arguments, 1);\n  let unbinds;\n  // memoize necessary to loop over all bindings if one of the bindings\n  // unbinds a following binding\n  const bindings = [...this._bindings[event]];\n  for (let i = 0; i < bindings.length; i++) {\n    let fn = bindings[i];\n    try {\n      let ret = fn.apply(this, args);\n      // special return value will unbind when triggered\n      if (ret === this.unbind) {\n        if (unbinds == null) {\n          unbinds = [];\n        }\n        unbinds.push({ event, fn });\n      }\n    } catch (e) {\n      if (this._throwTriggerErrors) {\n        throw e;\n      } else if (Wistia.error) {\n        Wistia.error(e);\n      }\n    }\n  }\n\n  if (unbinds) {\n    for (let i = 0; i < unbinds.length; i++) {\n      let unbind = unbinds[i];\n      this.unbind(unbind.event, unbind.fn);\n    }\n  }\n\n  return this;\n};\n\nexport const once = function (event, fn) {\n  const wrappedFn = function () {\n    fn.apply(this, aps.call(arguments, 0));\n    return unbind;\n  };\n  return bind(event, wrappedFn);\n};\n\nexport const initNamespace = function (ctx, namespace) {\n  if (ctx._namedBindings == null) {\n    ctx._namedBindings = {};\n  }\n\n  if (ctx._namedBindings[namespace] == null) {\n    ctx._namedBindings[namespace] = {};\n  }\n};\n\nconst getNamedBinding = function (ctx, namespace, fnKey) {\n  initNamespace(ctx, namespace);\n  return ctx._namedBindings[namespace][fnKey];\n};\n\nconst setNamedBinding = function (ctx, namespace, fnKey, event, fn) {\n  initNamespace(ctx, namespace);\n  ctx._namedBindings[namespace][fnKey] = { event, fn };\n};\n\nexport const bindNamed = function (namespace, fnKey, event, fn) {\n  this.unbindNamed(namespace, fnKey);\n  setNamedBinding(this, namespace, fnKey, event, fn);\n  this.bind(event, fn);\n  return function () {\n    this.unbindNamed(namespace, fnKey);\n  };\n};\n\nexport const unbindNamed = function (namespace, fnKey) {\n  initNamespace(this, namespace);\n  const entry = getNamedBinding(this, namespace, fnKey);\n  if (entry) {\n    const { event, fn } = entry;\n    this.unbind(event, fn);\n  }\n  const namedBindings = this._namedBindings;\n  delete namedBindings[namespace][fnKey];\n  if (isEmpty(namedBindings[namespace])) {\n    delete namedBindings[namespace];\n  }\n  return this;\n};\n\nexport const unbindAllInNamespace = function (namespace) {\n  const bindings = this._namedBindings && this._namedBindings[namespace];\n  if (bindings == null) {\n    return this;\n  }\n  for (let fnKey in bindings) {\n    if (Object.hasOwn(bindings, fnKey)) {\n      this.unbindNamed(namespace, fnKey);\n    }\n  }\n};\n\nconst isEmpty = function (obj) {\n  for (let k in obj) {\n    if (Object.hasOwn(obj, k)) {\n      return false;\n    }\n  }\n  return true;\n};\n\nexport const bindify = function (prototype) {\n  prototype.bind = bind;\n  prototype.unbind = unbind;\n  prototype.on = bind;\n  prototype.off = unbind;\n  prototype.rebind = rebind;\n  prototype.trigger = trigger;\n  prototype.bindNamed = bindNamed;\n  prototype.unbindNamed = unbindNamed;\n  prototype.unbindAllInNamespace = unbindAllInNamespace;\n  return prototype;\n};\n\n// If you don't want to mix in state with an existing object, you can use this\n// as a proxy, for example:\n//\n// var bindings = new Bindings();\n// bindings.bind('hello', function(name) {\n//   console.log('hi', name);\n//   return bindings.unbind;\n// });\n// bindings.trigger('hello', 'Max');\nexport const Bindings = function () {};\nbindify(Bindings.prototype);\n","// chapters has two ways of being defined in embed options.\n// The current way is as an object inside `embedOptions.plugin`\n// The old way was as root embed options like `chaptersOn` and `chapterList`.\n// This function normalizes the old root embed option format to an object\n// like the current model\n\nimport { isNotNil } from '@wistia/type-guards';\nimport type { EmbedOptions } from '../types/EmbedOptions.ts';\nimport type { ChaptersPluginConfig } from '../types/plugins.ts';\n\nexport const normalizeChapters = (embedOptions: EmbedOptions): ChaptersPluginConfig | undefined => {\n  const { plugin, chaptersOn, chapterList } = embedOptions;\n\n  if (plugin?.chapters) {\n    return plugin.chapters;\n  }\n\n  const areChaptersOn = chaptersOn === true || chaptersOn === 'true';\n\n  if (isNotNil(chapterList) || areChaptersOn) {\n    const hasChapters = isNotNil(chapterList) && chapterList.length > 0;\n    const list = hasChapters ? chapterList : [];\n\n    return {\n      on: chaptersOn,\n      chapterList: list,\n    };\n  }\n\n  return undefined;\n};\n","import * as bindify from 'utilities/bindify.js';\nimport { Wistia } from '../wistia_namespace.ts';\nimport { convertedEventNames, EventShepherd } from './eventShepherd.ts';\n\n// This is an adaptation on top of bindify that is intended to provide both\n// legacy functionality (returning `this` instead of an \"unbind\" function) and\n// and functionality for \"crosstime\" and \"betweentimes\", which are\n// \"composite\" bindings that do not have normal event signatures, as they take additional arguments.\n//\n// If you're setting up on/off/trigger for any new things, you should use\n// bindify directly instead.\n\nif (!Wistia.bindable) {\n  if (!Wistia.EventShepherdManager) {\n    Wistia.EventShepherdManager = {};\n  }\n\n  Wistia.bindable = {\n    bind(event, callback) {\n      if (event === 'crosstime' && this.crossTime) {\n        this.crossTime.addBinding(arguments[1], arguments[2]);\n        return this;\n      }\n\n      if (event === 'betweentimes' && this.betweenTimes) {\n        this.betweenTimes.addBinding(arguments[1], arguments[2], arguments[3]);\n        return this;\n      }\n\n      const embedElement = this.embedElement || this.container;\n\n      if (Object.keys(convertedEventNames).includes(event) && embedElement) {\n        const id = identifierFromEmbedElement(embedElement);\n        if (Wistia.EventShepherdManager[id] === undefined) {\n          Wistia.EventShepherdManager[id] = new EventShepherd();\n        }\n        Wistia.EventShepherdManager[id].addListener(event, embedElement, callback);\n        return this;\n      }\n\n      if (callback) {\n        bindify.bind.call(this, event, callback);\n        return this;\n      }\n\n      if (Wistia.warn) {\n        Wistia.warn(this.constructor.name, 'bind', 'falsey value passed in as callback:', callback);\n      }\n    },\n\n    // unbind the matching callback and event for this video\n    unbind(event, callback) {\n      if (event === 'crosstime' && this.crossTime) {\n        if (!callback) {\n          this.crossTime.removeAllBindings();\n        } else {\n          this.crossTime.removeBinding(arguments[1], arguments[2]);\n        }\n\n        return this;\n      }\n\n      if (event === 'betweentimes' && this.betweenTimes) {\n        if (!callback) {\n          this.betweenTimes.removeAllBindings();\n        } else {\n          this.betweenTimes.removeBinding(arguments[1], arguments[2], arguments[3]);\n        }\n        return this;\n      }\n\n      const embedElement = this.embedElement || this.container;\n      if (Object.keys(convertedEventNames).includes(event) && embedElement) {\n        const id = identifierFromEmbedElement(embedElement);\n        // return early if the EventShepherd for the hashedId is not defined\n        if (Wistia.EventShepherdManager[id] === undefined) {\n          return this;\n        }\n        Wistia.EventShepherdManager[id].removeListener(event, embedElement, callback);\n        return this;\n      }\n\n      if (callback) {\n        bindify.unbind.call(this, event, callback);\n      } else if (this._bindings) {\n        // no callback passed in, so clear all callbacks for this event\n        this._bindings[event] = [];\n      }\n\n      // null/delete the event keys if they have no events\n      if (this._bindings && this._bindings[event] && !this._bindings[event].length) {\n        this._bindings[event] = null;\n        delete this._bindings[event];\n      }\n\n      return this;\n    },\n\n    on(event, fn) {\n      if (event === 'crosstime' && this.crossTime) {\n        this.crossTime.addBinding(arguments[1], arguments[2]);\n\n        return () => {\n          this.crossTime.removeBinding(arguments[1], arguments[2]);\n        };\n      }\n\n      if (event === 'betweentimes' && this.betweenTimes) {\n        this.betweenTimes.addBinding(arguments[1], arguments[2], arguments[3]);\n\n        return () => {\n          this.betweenTimes.removeBinding(arguments[1], arguments[2], arguments[3]);\n        };\n      }\n\n      const embedElement = this.embedElement || this.container;\n      if (Object.keys(convertedEventNames).includes(event) && embedElement) {\n        const id = identifierFromEmbedElement(embedElement);\n        if (Wistia.EventShepherdManager[id] === undefined) {\n          Wistia.EventShepherdManager[id] = new EventShepherd(embedElement);\n        }\n\n        Wistia.EventShepherdManager[id].addListener(event, embedElement, fn);\n\n        return () => {\n          Wistia.EventShepherdManager[id].removeListener(event, embedElement, fn);\n        };\n      }\n\n      return bindify.bind.call(this, event, fn);\n    },\n\n    off(event, fn) {\n      if (event === 'crosstime' && this.crossTime) {\n        return this.crossTime.removeBinding(arguments[1], arguments[2]);\n      }\n\n      if (event === 'betweentimes' && this.betweenTimes) {\n        return this.betweenTimes.removeBinding(arguments[1], arguments[2], arguments[3]);\n      }\n\n      const embedElement = this.embedElement || this.container;\n      if (Object.keys(convertedEventNames).includes(event) && embedElement) {\n        const id = identifierFromEmbedElement(embedElement);\n        // return early if the EventShepherd for the hashedId is not defined\n        if (Wistia.EventShepherdManager[id] === undefined) {\n          return () => {};\n        }\n        return Wistia.EventShepherdManager[id].removeListener(event, embedElement, fn);\n      }\n\n      return bindify.unbind.call(this, event, fn);\n    },\n\n    rebind(event, callback) {\n      this.unbind(event, callback);\n      this.bind(event, callback);\n      return this;\n    },\n\n    // fire an event trigger on the video. for play/pause/ended callbacks.\n    trigger(event, ...args) {\n      bindify.trigger.call(this, event, ...args);\n      return this;\n    },\n\n    bindNamed() {\n      return bindify.bindNamed.apply(this, arguments);\n    },\n\n    unbindNamed() {\n      return bindify.unbindNamed.apply(this, arguments);\n    },\n\n    unbindAllInNamespace() {\n      return bindify.unbindAllInNamespace.apply(this, arguments);\n    },\n  };\n}\n\nexport const makeWbindable = function (obj) {\n  for (let k in Wistia.bindable) {\n    const v = Wistia.bindable[k];\n    if (!obj[k]) {\n      obj[k] = v;\n    }\n  }\n};\n\nconst identifierFromEmbedElement = function (embedElement) {\n  if (embedElement?.mediaId) {\n    return embedElement.mediaId;\n  }\n\n  if (embedElement?.id) {\n    return embedElement.id;\n  }\n};\n","import merge from 'lodash.merge';\nimport type { EmbedOptions } from '../types/EmbedOptions.ts';\n\nexport const getWistiaOptions = (mediaId: string): EmbedOptions => {\n  if (!window.wistiaOptions) {\n    return {};\n  }\n\n  const globalOptions: EmbedOptions = window.wistiaOptions._all ?? {};\n\n  const mediaOptions: EmbedOptions = window.wistiaOptions[mediaId] ?? {};\n\n  return merge(globalOptions, mediaOptions);\n};\n","export const pageLoaded = (fn, timeout = 4000, doc = document, win = window) => {\n  if (/loaded|complete/.test(doc.readyState)) {\n    setTimeout(fn, 0);\n  } else {\n    const unbind = () => {\n      win.removeEventListener('load', onPageLoad, false);\n    };\n\n    const onPageLoad = () => {\n      clearTimeout(onLoadTimeout);\n      unbind();\n      fn();\n    };\n\n    win.addEventListener('load', onPageLoad, false);\n\n    const onLoadTimeout = setTimeout(() => {\n      unbind();\n      fn();\n    }, timeout);\n  }\n};\n","/* eslint-disable jsx-a11y/no-static-element-interactions */\n/* eslint-disable jsx-a11y/click-events-have-key-events */\nimport { h, JSX } from 'preact';\nimport { useEffect, useState } from 'preact/hooks';\nimport type { PlayerLanguage, Players } from '../../../types/player-api-types.ts';\nimport { usePlayerData } from '../hooks/usePlayerData.tsx';\nimport { CONTROL_BAR_HEIGHT, DEFAULT_ASPECT } from '../utilities/constants.ts';\nimport { BigPlayButton } from '../../media/players/vulcanV2Player/shared/ui_components/BigPlayButton.tsx';\nimport { ProgressiveThumbnail } from '../../shared/ProgressiveThumbnail.jsx';\nimport { getLanguage } from '../../shared/translations.js';\nimport { thumbnailAssets as getThumbnailAssets } from '../../../utilities/assets.js';\nimport { controlMultiplierEstimatedByWidth } from '../../../utilities/fit-control.js';\nimport {\n  getDefaultBigPlayButtonBorderRadius,\n  getDefaultControlBarDistance,\n  getDefaultPlayerBorderRadius,\n} from '../../../utilities/roundedPlayerDefaults.ts';\nimport { getCssGradient, getGradientColor } from '../../../utilities/gradients.ts';\nimport { isGradient } from '../../../types/gradient.ts';\nimport { getVideoPlayerIconColor } from '../../../utilities/color-utils.ts';\n\nconst MAX_SCALE = 1.3;\nconst MIN_SCALE = 0.3;\nconst DEFAULT_LOWER_CUTOFF_WIDTH = 640;\nconst DEFAULT_UPPER_CUTOFF_WIDTH = 960;\n\ninterface PreloadThumbnailProps {\n  isPlayPending: boolean;\n  mediaId: string;\n  playerType: Players;\n  playerWidth: number;\n}\n\nexport const PreloadThumbnail = ({\n  isPlayPending,\n  mediaId,\n  playerType,\n  playerWidth,\n}: PreloadThumbnailProps): JSX.Element => {\n  const [isLoading, setIsLoading] = useState(false);\n\n  useEffect(() => {\n    if (isPlayPending) {\n      setIsLoading(true);\n    }\n  }, [isPlayPending]);\n\n  const { embedOptions, mediaData } = usePlayerData();\n  const {\n    aspect,\n    bigPlayButton,\n    bpbTime,\n    bigPlayButtonBorderRadius,\n    contrastIcons,\n    controlBarBorderRadius,\n    controlsVisibleOnLoad,\n    floatingControlBar,\n    noMixBlendMode,\n    opaqueControls,\n    playButton,\n    playerBorderRadius,\n    playerColor,\n    playerColorGradient,\n    playerLanguage,\n    roundedPlayer,\n    thumbnailAltText,\n    transparentLetterbox,\n  } = embedOptions;\n  const { aspectRatio, assets, duration, mediaType, name } = mediaData;\n  const height = playerWidth / (aspect ?? aspectRatio ?? DEFAULT_ASPECT);\n\n  const scale = Math.min(\n    MAX_SCALE,\n    Math.max(\n      MIN_SCALE,\n      controlMultiplierEstimatedByWidth(playerWidth, [\n        DEFAULT_LOWER_CUTOFF_WIDTH,\n        DEFAULT_UPPER_CUTOFF_WIDTH,\n      ]),\n    ),\n  );\n\n  const calculatedControlsVisibleOnLoad = controlsVisibleOnLoad && playerType === 'vulcan-v2';\n\n  const defaultControlBarDistance = getDefaultControlBarDistance({\n    controlBarBorderRadius,\n    floatingControlBar,\n    roundedPlayer,\n  });\n  const calculatedControlBarDistance = calculatedControlsVisibleOnLoad\n    ? (CONTROL_BAR_HEIGHT / 2 + defaultControlBarDistance) * scale\n    : defaultControlBarDistance * scale;\n\n  const calculatedBigPlayButtonBorderRadius =\n    getDefaultBigPlayButtonBorderRadius({\n      bigPlayButtonBorderRadius,\n      roundedPlayer,\n    }) * scale;\n\n  const calculatedPlayerBorderRadius =\n    getDefaultPlayerBorderRadius({\n      playerBorderRadius,\n      roundedPlayer,\n    }) * scale;\n\n  const backgroundColor =\n    transparentLetterbox === true || calculatedPlayerBorderRadius > 0 ? 'transparent' : undefined;\n\n  const thumbnailAssets = getThumbnailAssets(assets, {});\n\n  const calculatedPlayerLanguage =\n    (getLanguage(playerLanguage) as PlayerLanguage | undefined) ??\n    (getLanguage('en-US') as PlayerLanguage);\n\n  const shouldShowBigPlayButton = bigPlayButton !== false && playButton !== false;\n  const shouldShowBpbTime = bpbTime === true || bpbTime === 'true';\n\n  const backgroundGradientCss = playerColorGradient?.on\n    ? getCssGradient(playerColorGradient)\n    : undefined;\n\n  // if the gradient is enabled and valid, use the first color in the gradient as the player color,\n  // otherwise, just use the player color like normal\n  const playerColorOrGradientColor =\n    playerColorGradient?.on && isGradient(playerColorGradient)\n      ? (getGradientColor(playerColorGradient) ?? playerColor)\n      : playerColor;\n\n  const handleClick = () => {\n    setIsLoading(true);\n  };\n\n  return (\n    // Provide the icon color for the BigPlayButton\n    <div\n      style={{\n        '--wistia-player-icon-color': getVideoPlayerIconColor(\n          playerColor ?? '#636155',\n          contrastIcons ?? false,\n          playerColorGradient?.on === true,\n        ),\n      }}\n    >\n      <div\n        class=\"w-css-reset\"\n        style={{\n          cursor: 'pointer',\n          width: '100%',\n          height: `${height}px`,\n        }}\n        onClick={handleClick}\n        tabIndex={shouldShowBigPlayButton ? -1 : 0}\n      >\n        <ProgressiveThumbnail\n          backgroundColor={backgroundColor}\n          images={thumbnailAssets}\n          isVisible={true}\n          hashedId={mediaId}\n          playerBorderRadius={calculatedPlayerBorderRadius}\n          swatchEnabled={false}\n          uiHasRendered={false}\n          thumbnailAltText={thumbnailAltText ?? ''}\n          height={`${height}px`}\n        />\n      </div>\n      {shouldShowBigPlayButton && (\n        <BigPlayButton\n          borderRadius={calculatedBigPlayButtonBorderRadius}\n          buttonTabIndex={0}\n          color={playerColorOrGradientColor}\n          controlBarDistance={calculatedControlBarDistance}\n          duration={duration ?? 0}\n          hasContrastIcons={contrastIcons ?? false}\n          isLiveMedia={mediaType === 'LiveStream'}\n          isLoading={isLoading}\n          isOpaque={opaqueControls}\n          isVisible={true}\n          noMixBlendMode={noMixBlendMode}\n          onClick={handleClick}\n          playerLanguage={calculatedPlayerLanguage}\n          scale={scale}\n          showBpbTime={shouldShowBpbTime}\n          videoName={name ?? ''}\n          videoWidth={playerWidth}\n          backgroundGradientCss={backgroundGradientCss}\n        ></BigPlayButton>\n      )}\n    </div>\n  );\n};\n","\n/*\n * @license @wistia/type-guards v0.9.1\n *\n * Copyright (c) 2023-2025, Wistia, Inc. and its affiliates.\n *\n * This source code is unlicensed, all rights reserved.\n */\n\n\n// index.ts\nvar FALSY_VALUES = [false, 0, -0, 0n, \"\", null, void 0, Number.NaN];\nvar isNull = (value) => value === null;\nvar isNotNull = (value) => !isNull(value);\nvar isUndefined = (value) => value === void 0;\nvar isNotUndefined = (value) => !isUndefined(value);\nvar isNil = (value) => isNull(value) || isUndefined(value);\nvar isNotNil = (value) => !isNil(value);\nvar isString = (value) => typeof value === \"string\";\nvar isNotString = (value) => !isString(value);\nvar isEmptyString = (value) => isString(value) && value === \"\";\nvar isNonEmptyString = (value) => isString(value) && !isEmptyString(value);\nvar isNumber = (value) => typeof value === \"number\";\nvar isNotNumber = (value) => !isNumber(value);\nvar isNaN = (value) => Number.isNaN(value);\nvar isInteger = (value) => Number.isInteger(value);\nvar isRecord = (value) => isNotNil(value) && typeof value === \"object\" && !(value instanceof Array);\nvar isNotRecord = (value) => !isRecord(value);\nvar isEmptyRecord = (value) => isRecord(value) && Object.keys(value).length === 0;\nvar isNonEmptyRecord = (value) => isRecord(value) && Object.keys(value).length > 0;\nvar isArray = (value) => isNotNil(value) && typeof value === \"object\" && value instanceof Array;\nvar isNotArray = (value) => !isArray(value);\nvar isEmptyArray = (value) => isArray(value) && value.length === 0;\nvar isNonEmptyArray = (value) => isArray(value) && value.length > 0;\nvar isFunction = (value) => isNotNil(value) && typeof value === \"function\";\nvar isNotFunction = (value) => !isFunction(value);\nvar isBoolean = (value) => isNotNil(value) && typeof value === \"boolean\";\nvar isNotBoolean = (value) => !isBoolean(value);\nvar isVoid = (value) => value === void 0;\nvar isNotVoid = (value) => !isVoid(value);\nvar isError = (value) => {\n  return isNotNil(value) && value instanceof Error;\n};\nvar isFalsy = (value) => FALSY_VALUES.includes(value) || Number.isNaN(value);\nvar isTruthy = (value) => !FALSY_VALUES.includes(value) && !Number.isNaN(value);\nvar hasKey = (value, key) => isNonEmptyRecord(value) && key in value;\nexport {\n  hasKey,\n  isArray,\n  isBoolean,\n  isEmptyArray,\n  isEmptyRecord,\n  isEmptyString,\n  isError,\n  isFalsy,\n  isFunction,\n  isInteger,\n  isNaN,\n  isNil,\n  isNonEmptyArray,\n  isNonEmptyRecord,\n  isNonEmptyString,\n  isNotArray,\n  isNotBoolean,\n  isNotFunction,\n  isNotNil,\n  isNotNull,\n  isNotNumber,\n  isNotRecord,\n  isNotString,\n  isNotUndefined,\n  isNotVoid,\n  isNull,\n  isNumber,\n  isRecord,\n  isString,\n  isTruthy,\n  isUndefined,\n  isVoid\n};\n//# sourceMappingURL=index.mjs.map","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n",null,null,"__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();",null,null,"import { Fragment, h, render } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { isEmptyString, isNil } from '@wistia/type-guards';\nimport { getGradientColor } from '../../utilities/gradients.ts';\nimport { Wistia } from '../../wistia_namespace.ts';\nimport type { Authorization, FullscreenState } from './types.ts';\nimport type { EmailChangeEventData } from '../../types/custom-event-data.js';\nimport type {\n  IMPL_CREATED_EVENT_TYPE,\n  LOADED_MEDIA_DATA_EVENT_TYPE,\n  WistiaPlayerEvents,\n} from '../../types/events.ts';\nimport type {\n  AllowedQualities,\n  EventListenerMap,\n  Impl,\n  JudyContext,\n  Language,\n  Localization,\n  LoggerType,\n  MediaData,\n  MediaDataServerErrorResponse,\n  Mux,\n  OverlayOptions,\n  Players,\n  PlayerState,\n  PopoverAnimation,\n  PopoverContentSettings,\n  PublicApi,\n  PublicApiOptions,\n  ReplaceWithMediaOptions,\n  WistiaLocalStorage,\n} from '../../types/player-api-types.ts';\nimport type { FetchMediaDataOptions } from '../../utilities/fetchMediaData.ts';\nimport type { EmbedOptions } from '../../types/EmbedOptions.ts';\nimport type { PluginConfigs, PluginInstances } from '../../types/plugins.ts';\nimport { PreloadThumbnail } from './components/PreloadThumbnail.tsx';\nimport { PlayerDataProvider } from './hooks/usePlayerData.tsx';\nimport { DEFAULT_ASPECT } from './utilities/constants.ts';\nimport { PlayerDataHandler } from './utilities/PlayerDataHandler.ts';\nimport { appHostname } from '../../appHostname.js';\nimport { thumbnailAssets as getThumbnailAssets } from '../../utilities/assets.js';\nimport { didWinCoinFlip } from '../../utilities/coinFlip.ts';\nimport { detectIsMobile } from '../../utilities/detect.js';\nimport { dynamicImport } from '../../utilities/dynamicImport.ts';\nimport { removeEmbedOptionStore, setEmbedOptionStore } from '../../utilities/embedOptionStore.ts';\nimport { elemWidth } from '../../utilities/elem.js';\nimport {\n  AFTER_REPLACE_EVENT,\n  API_READY_EVENT,\n  BEFORE_REPLACE_EVENT,\n  IMPL_CREATED_EVENT,\n  INPUT_CONTEXT_CHANGE_EVENT,\n  INTERNAL_API_ON_FIND_EVENT,\n  LOADED_MEDIA_DATA_EVENT,\n  MUTE_CHANGE_EVENT,\n} from '../../utilities/eventConstants.ts';\nimport { extractEmailFromParams } from '../../utilities/extractEmailFromParams.ts';\nimport { cdnFastWistiaComHost } from '../../utilities/hosts.js';\nimport { inferPageUrl } from '../../utilities/inferPageUrl.ts';\nimport { buildContext, choosePlayer } from '../../utilities/judy.js';\nimport { getDefaultPlayerBorderRadius } from '../../utilities/roundedPlayerDefaults.ts';\nimport { runScript } from '../../utilities/runScript.js';\nimport { seqId } from '../../utilities/seqid.js';\nimport { MUX_PERCENTAGE_TO_ENABLE, shouldEnableMux } from '../../utilities/shouldEnableMux.ts';\nimport { countMetric } from '../../utilities/simpleMetrics.js';\nimport { isVisitorTrackingEnabled } from '../../utilities/trackingConsentApi.js';\nimport { proto } from '../../utilities/url.js';\nimport {\n  getWistiaLocalStorage,\n  updateWistiaLocalStorage,\n} from '../../utilities/wistiaLocalStorage.js';\nimport { getWistiaOptions } from '../../utilities/wistiaOptions.ts';\nimport { maybeStartWistiaQueue } from '../../utilities/wistiaQueue.ts';\nimport { wlog } from '../../utilities/wlog.js';\nimport { injectJsonLd, removeInjectedJsonLd } from '../../utilities/injectJsonLd.js';\nimport { getInitialMediaData } from './utilities/getInitialMediaData.ts';\nimport { isMediaDataError } from '../../utilities/mediaDataError.ts';\nimport { uncacheMediaData } from '../../utilities/remote-data-cache.ts';\nimport {\n  camelCaseToKebabCase,\n  kebabCaseToCamelCase,\n} from '../../utilities/camelCaseToKebabCase.ts';\nimport { ControlInstances } from '../../types/controls.ts';\nimport { Gradient, isGradient } from '../../types/gradient.ts';\n\n// The component will not run without these attributes.\nconst requiredAttributes = ['media-id'];\n\n// Optional attributes surfaced in documentation to our customers.\nconst optionalPublicAttributes = [\n  'aspect',\n  'audio-description-control',\n  'autoplay',\n  'big-play-button',\n  'branding',\n  'contrast-icons',\n  'controls-visible-on-load',\n  'copy-link-and-thumbnail',\n  'current-time',\n  'do-not-track',\n  'email',\n  'end-video-behavior',\n  'fullscreen-control',\n  'language',\n  'muted',\n  'opaque-controls',\n  'playback-rate-control',\n  'play-bar-control',\n  'player-color',\n  'playlist-links',\n  'playlist-loop',\n  'play-pause-control',\n  'play-pause-notifier',\n  'popover-animate-thumbnail',\n  'popover-animation',\n  'popover-border-color',\n  'popover-border-radius',\n  'popover-border-width',\n  'popover-box-shadow',\n  'popover-caption',\n  'popover-caption-container',\n  'popover-content',\n  'popover-disable-autoplay',\n  'popover-overlay-color',\n  'popover-overlay-opacity',\n  'popover-prevent-scroll',\n  'popover-show-on-load',\n  'poster',\n  'preload',\n  'quality-control',\n  'quality-max',\n  'quality-min',\n  'resumable',\n  'rounded-player',\n  'seo',\n  'settings-control',\n  'silent-autoplay',\n  'transparent-letterbox',\n  'video-quality',\n  'volume',\n  'volume-control',\n  'wistia-popover',\n];\n\n// Optional attributes used by Wistia developers.\nconst optionalPrivateAttributes = [\n  'big-play-button-border-radius',\n  'control-bar-border-radius',\n  'embed-host',\n  'hls',\n  'page-url',\n  'player-border-radius',\n  'player-force',\n  'stats-url',\n  'swatch',\n  'unique-id',\n  'use-web-component',\n];\n\nconst defaultEmbedOptions = {\n  audioDescriptionControl: false,\n  autoplay: false,\n  bigPlayButton: true,\n  bigPlayButtonBorderRadius: undefined,\n  contrastIcons: false,\n  controlBarBorderRadius: undefined,\n  controlsVisibleOnLoad: true,\n  copyLinkAndThumbnail: true,\n  currentTime: 0,\n  doNotTrack: false,\n  endVideoBehavior: 'default',\n  fullscreenControl: true,\n  hls: true,\n  opaqueControls: false,\n  playBarControl: true,\n  playerBorderRadius: undefined,\n  playerColor: '636155',\n  playPauseControl: true,\n  playPauseNotifier: true,\n  playbackRateControl: true,\n  playlistLinks: '',\n  playlistLoop: false,\n  popoverAnimateThumbnail: false,\n  popoverAnimation: 'slide',\n  popoverBorderColor: 'ffffff',\n  popoverBorderRadius: 0,\n  popoverBorderWidth: 0,\n  popoverBoxShadow: true,\n  popoverCaption: '',\n  popoverCaptionContainer: '',\n  popoverContent: undefined,\n  popoverDisableAutoplay: false,\n  popoverOverlayColor: '000000',\n  popoverOverlayOpacity: 0.5,\n  popoverPreventScroll: false,\n  popoverShowOnLoad: false,\n  poster: '',\n  qualityControl: true,\n  qualityMax: undefined,\n  qualityMin: undefined,\n  resumable: 'auto',\n  roundedPlayer: undefined,\n  seo: true,\n  settingsControl: true,\n  silentAutoplay: false,\n  state: 'beforeplay' as PlayerState,\n  statsUrl: null,\n  transparentLetterbox: false,\n  volume: 1,\n  volumeControl: true,\n  wistiaPopover: false,\n};\n\n/**\n * Returns the swatch url for a given mediaId\n * @param {string} mediaId\n * @param {string} embedHost\n * @returns {string}\n */\nconst getSwatchUrl = (mediaId, embedHost = '') => {\n  const fastHost = cdnFastWistiaComHost(embedHost);\n  return `https://${fastHost}/embed/medias/${mediaId}/swatch`;\n};\n\nexport class WistiaPlayer extends HTMLElement {\n  public plugin: PluginInstances | null;\n\n  // can be null when doing document.createElement and referencing an attribute/property\n  // before being injected into the dom\n  #_api: PublicApi | null;\n\n  #_eventListeners: EventListenerMap = {};\n\n  // private internal fullscreen state of the video. Stored as a property on the web component\n  // for easy transfer to another web component during replace if necessary.\n  #_fullscreenState: FullscreenState = {\n    heightBeforeFullscreen: undefined,\n    inFullscreen: false,\n    nativeFullscreen: false,\n    widthBeforeFullscreen: undefined,\n  };\n\n  #_impl: Impl | undefined;\n\n  readonly #_internals: ElementInternals | undefined;\n\n  #_jsonLdId: string;\n\n  #_judyContext: JudyContext | null = null;\n\n  #_logger: LoggerType;\n\n  // private value used during the replace flow to pass along the old engine.\n  #_oldEngine: object | null | undefined;\n\n  readonly #_playerData: PlayerDataHandler;\n\n  #_playerType: Players;\n\n  readonly #_removeEventListeners: (() => void)[] = [];\n\n  #cachedRemapTime:\n    | ((fromLanguage: string, toLanguage: string, fromTime: number) => number)\n    | undefined = undefined;\n\n  #hasElementConnectedToDOM = false;\n\n  #paddingTop = '0px';\n\n  #playPending = false;\n\n  #preactRoot: HTMLDivElement | null = null;\n\n  #preloadThumbnailRoot: HTMLDivElement | null = null;\n\n  readonly #publicApiScript: Promise<void> = runScript(\n    `${proto()}//${appHostname('fast')}/assets/external/publicApi.js`,\n  ) as Promise<void>;\n\n  #resizeObserver: ResizeObserver | null = null;\n\n  /**\n   * Represents one embedded Wistia media player.\n   * @constructor\n   */\n  public constructor() {\n    super();\n    if ('attachInternals' in HTMLElement.prototype && 'states' in ElementInternals.prototype) {\n      this.#_internals = this.attachInternals();\n      this.#_internals.states.add('--initializing');\n    }\n\n    this.attachShadow({ mode: 'open' });\n\n    this.dispatchEvent(new CustomEvent('load-start'));\n\n    this.paddingTop = getComputedStyle(this).paddingTop;\n\n    // Set up a prefixed logger\n    this.#_logger = (wlog as unknown as LoggerType).getPrefixedFunctions(\n      'WistiaPlayer',\n    ) as LoggerType;\n\n    this.#_playerData = new PlayerDataHandler();\n\n    // Wistia global setup if this is the first time we've seen a Wistia player\n    Wistia.wistia ??= Date.now();\n  }\n\n  // --------------------------------------------------\n  // Public properties\n  // --------------------------------------------------\n\n  /**\n   * Return an array of the attributes that we want to observe for changes.\n   * If one of these attributes changes, the attributeChangedCallback will be called.\n   * @returns {string[]}\n   */\n  public static get observedAttributes(): string[] {\n    return [...requiredAttributes, ...optionalPublicAttributes, ...optionalPrivateAttributes];\n  }\n\n  /**\n   * @returns {FullscreenState} private fullscreenState of the video.\n   */\n  public get _fullscreenState(): FullscreenState {\n    return this.#_fullscreenState;\n  }\n\n  /**\n   * @param {FullscreenState} state private fullscreenState of the video.\n   */\n  public set _fullscreenState(state: FullscreenState) {\n    this.#_fullscreenState = state;\n  }\n\n  /**\n   * @deprecated The method should not be used\n   * @returns {object | null |undefined }  private - old engine being transferred.\n   */\n  public get _oldEngine(): object | null | undefined {\n    return this.#_oldEngine;\n  }\n\n  /**\n   * @deprecated The method should not be used\n   * @param {object | null | undefined} engine private old engine to be transferred of the video.\n   */\n  public set _oldEngine(engine: object | null | undefined) {\n    this.#_oldEngine = engine;\n  }\n\n  /**\n   * Returns the aspect ratio (width / height) of the originally uploaded video or given aspect ratio.\n   * @returns {number}\n   */\n  public get aspect(): number {\n    const fallbackAspect =\n      !Number.isNaN(this.offsetWidth / this.offsetHeight) &&\n      Number.isFinite(this.offsetWidth / this.offsetHeight)\n        ? this.offsetWidth / this.offsetHeight\n        : DEFAULT_ASPECT;\n\n    return (\n      this.#_impl?.aspect() ??\n      this.embedOptions.aspect ??\n      (this.#getValueFromAttribute('aspect') as number | null) ??\n      fallbackAspect\n    );\n  }\n\n  /**\n   * Sets the aspect ratio (width / height) of the video.\n   * @param {number} newAspect\n   * @returns {void}\n   */\n  public set aspect(newAspect: number) {\n    this.#setSyncedEmbedOption('aspect', newAspect);\n\n    // By re-setting width to the same value, we trigger the aspect ratio to be recalculated.\n    this.#_impl?.width(elemWidth(this) as number, { constrain: true });\n  }\n\n  /**\n   * Returns whether the Audio Description control in the control bar is enabled.\n   * @returns {boolean}\n   */\n  public get audioDescriptionControl(): boolean {\n    return this.#getSyncedEmbedOption('audioDescriptionControl') as boolean;\n  }\n\n  /**\n   * Enable or disable the Audio Description control in the control bar. Note: Even if set to `true`, this control will\n   * only appear if the video has an Audio Description track.\n   * @param {boolean} shouldDisplay\n   * @returns {void}\n   */\n  public set audioDescriptionControl(shouldDisplay: boolean) {\n    this.#_impl?.audioDescriptionControlEnabled(shouldDisplay);\n    this.#setSyncedEmbedOption('audioDescriptionControl', shouldDisplay);\n  }\n\n  /**\n   * sets the authorization property to be used for authorized asset delivery\n   * @param {Authorization}\n   * @returns {void}\n   */\n  public set authorization(auth: Authorization) {\n    this.#setSyncedEmbedOption('authorization', auth);\n  }\n\n  /**\n   * Returns if the player should attempt to autoplay as soon as it's ready.\n   * @returns {boolean}\n   */\n  public get autoplay(): boolean {\n    return this.#getSyncedEmbedOption('autoplay') as boolean;\n  }\n\n  /**\n   * Sets the attribute to enable/disable autoplay.\n   * @param {boolean} shouldSetAutoplay\n   * @returns {void}\n   */\n  public set autoplay(shouldSetAutoplay: boolean) {\n    // This method is called a second time when the attribute value (string | null)\n    // is set on the element. Checking for typeof boolean here prevents us from\n    // saving that second value to the api.\n    if (typeof shouldSetAutoplay !== 'boolean') {\n      return;\n    }\n    this.#setSyncedEmbedOption('autoplay', shouldSetAutoplay);\n\n    // Sync the element's autoplay attribute with this property\n    // This matches the behavior of the native <video> element\n    if (shouldSetAutoplay) {\n      this.setAttribute('autoplay', '');\n    } else {\n      this.removeAttribute('autoplay');\n    }\n  }\n\n  /**\n   * Returns if the big play button control will appear in the center of the video before play.\n   * @returns {boolean}\n   */\n  public get bigPlayButton(): boolean {\n    return this.#getSyncedEmbedOption('bigPlayButton') as boolean;\n  }\n\n  /**\n   * Sets if the big play button control will appear in the center of the video before play.\n   * @param {boolean} shouldDisplay\n   * @returns {void}\n   */\n  public set bigPlayButton(shouldDisplay: boolean) {\n    this.#_impl?.bigPlayButtonEnabled(shouldDisplay);\n    this.#setSyncedEmbedOption('bigPlayButton', shouldDisplay);\n  }\n\n  /**\n   * Returns the border radius of the big play button.\n   * @returns {number}\n   */\n  public get bigPlayButtonBorderRadius(): number {\n    return this.#getSyncedEmbedOption('bigPlayButtonBorderRadius') as number;\n  }\n\n  /**\n   * Sets the border radius of the big play button.\n   * @param {number} radius\n   * @returns {void}\n   */\n  public set bigPlayButtonBorderRadius(radius: number) {\n    this.#_impl?.setBigPlayButtonBorderRadius(Number(radius));\n    this.#setSyncedEmbedOption('bigPlayButtonBorderRadius', radius);\n  }\n\n  public get branding(): boolean {\n    return this.#getSyncedEmbedOption('branding') as boolean;\n  }\n\n  /**\n   * This can only be used to enable the wistia logo for players\n   * that might not otherwise require it. We don't want to introduce\n   * the ability to easily hide the wistia logo for players where it's required.\n   */\n  public set branding(value: unknown) {\n    if (value === 'true' || value === true) {\n      this.#setSyncedEmbedOption('branding', true);\n    }\n  }\n\n  /**\n   * Returns a new static normalized TimeRanges object that represents the ranges of the media resource,\n   * if any, that the user agent has buffered at the moment the buffered property is accessed.\n   * @returns {TimeRanges}\n   */\n  public get buffered(): TimeRanges {\n    return this.#_impl?.getStandardBuffered() ?? ({} as TimeRanges);\n  }\n\n  public get captionsEnabled(): boolean {\n    return this.#_api?.captionsEnabled() ?? false;\n  }\n\n  public set captionsEnabled(enabled: boolean) {\n    this.#_api?.captionsEnabled(enabled);\n  }\n\n  // the public api has a different syntax for setting the captionsLanguage and getting it\n  // eslint-disable-next-line @typescript-eslint/related-getter-setter-pairs\n  public get captionsLanguage(): Language {\n    return this.#_api?.captionsLanguage() ?? this.#defaultLocalization();\n  }\n\n  public set captionsLanguage(language: string) {\n    this.#_api?.captionsLanguage(language);\n  }\n\n  public get captionsLanguages(): Language[] {\n    return this.#_api?.captionsLanguages() ?? [this.#defaultLocalization()];\n  }\n\n  /**\n   * Returns the status of the contrastIcons embed option, which determines\n   * if the the player controls should use icons with accessible contrast or default to white.\n   *\n   * @returns {boolean}\n   */\n  public get contrastIcons(): boolean {\n    return this.#getSyncedEmbedOption('contrastIcons') as boolean;\n  }\n\n  /**\n   * When true the player will use icons with accessible contrast or default to white.\n   * @param {boolean} contrastIcons\n   * @returns {void}\n   */\n  public set contrastIcons(contrastIcons: boolean) {\n    this.#setSyncedEmbedOption('contrastIcons', contrastIcons);\n  }\n\n  /**\n   * Returns the border radius of the control bar.\n   * @returns {number}\n   */\n  public get controlBarBorderRadius(): number {\n    return this.#getSyncedEmbedOption('controlBarBorderRadius') as number;\n  }\n\n  /**\n   * Sets the border radius of the control bar.\n   * @param {number} radius\n   * @returns {void}\n   */\n  public set controlBarBorderRadius(radius: number) {\n    this.#_impl?.setControlBarBorderRadius(Number(radius));\n    this.#setSyncedEmbedOption('controlBarBorderRadius', radius);\n  }\n\n  /**\n   * Getter. Returns all defined controls.\n   * @returns {ControlInstances} returns object of defined controls. Please note this may return an\n   * empty object if not controls have yet been defined.\n   */\n  public get controls(): ControlInstances {\n    if (this.#_impl) {\n      // We don't want customers modifying this object (adding/deleting what is already here).\n      // But they may need to interact/modify the existing ones, so we only use `seal`.\n      return Object.seal({ ...this.#_impl.controls });\n    }\n    return {};\n  }\n\n  /**\n   * Returns whether or not to hide the controls on load.\n   * @returns {boolean}\n   */\n  public get controlsVisibleOnLoad(): boolean {\n    return this.#getSyncedEmbedOption('controlsVisibleOnLoad') as boolean;\n  }\n\n  /**\n   * Sets whether or not to hide the controls on load.\n   * @param {boolean} shouldHide\n   * @returns {void}\n   */\n  public set controlsVisibleOnLoad(shouldHide: boolean) {\n    this.#_impl?.renderUI();\n    this.#setSyncedEmbedOption('controlsVisibleOnLoad', shouldHide);\n  }\n\n  /**\n   * Returns whether or the copy link and thumbnail option from the context menu\n   * is available.\n   * @returns {boolean}\n   */\n  public get copyLinkAndThumbnail(): boolean {\n    return this.#getSyncedEmbedOption('copyLinkAndThumbnail') as boolean;\n  }\n\n  /**\n   * Enable or disable the copy link and thumbnail option from the context menu.\n   * @param {boolean} enabled\n   * @returns {void}\n   */\n  public set copyLinkAndThumbnail(enabled: boolean) {\n    const prevVal = this.copyLinkAndThumbnail;\n    this.#setSyncedEmbedOption('copyLinkAndThumbnail', enabled);\n\n    if (prevVal !== enabled) {\n      this.dispatchEvent(\n        new CustomEvent('copy-link-and-thumbnail-change', {\n          detail: { copyLinkAndThumbnail: enabled },\n        }),\n      );\n    }\n  }\n\n  /**\n   * Returns the current time of the video as a decimal in seconds.\n   * @returns {number}\n   */\n  public get currentTime(): number {\n    return (this.#_impl?.time() as number | null) ?? this.embedOptions.currentTime ?? 0;\n  }\n\n  /**\n   * Sets the current time of the video as a decimal in seconds.\n   * @param {number} newTime\n   * @returns {void}\n   */\n  public set currentTime(newTime: number) {\n    void this.#_impl?.time(newTime);\n    this.#setSyncedEmbedOption('currentTime', newTime);\n  }\n\n  /**\n   * @returns {object} helpful object for debugging\n   */\n  public get debug(): object {\n    return {\n      impl: this.#_impl,\n      engine: this.#_impl?.engine,\n    };\n  }\n\n  /**\n   * Returns the public api instance.\n   * @deprecated this is a deprecated method and should not be used.\n   * @returns {PublicApi | null}\n   */\n  public get deprecatedApiDoNotUse(): PublicApi | null {\n    return this.#_api;\n  }\n\n  /**\n   * Returns the status of the do not track embed option that controls whether the player\n   * sends tracking pings.\n   * @returns {boolean}\n   */\n  public get doNotTrack(): boolean {\n    return this.#getSyncedEmbedOption('doNotTrack') as boolean;\n  }\n\n  /**\n   * When present the player will not send tracking events for stats.\n   * Note that this must be set at the time of embed to have any impact.\n   * @param {boolean} dontTrack\n   * @returns {void}\n   */\n  public set doNotTrack(dontTrack: boolean) {\n    this.#setSyncedEmbedOption('doNotTrack', dontTrack);\n  }\n\n  /**\n   * Returns the duration of the video in seconds.\n   * @returns {number}\n   */\n  public get duration(): number {\n    return this.#_impl?.duration() ?? 0;\n  }\n\n  /**\n   * Returns the email associated with this viewing session.\n   * If no email is associated, it will return undefined.\n   * NOTE: This attribute will impact the entire page and is not scoped to the player.\n   * @returns {string | undefined}\n   */\n  // the public api doesn't allow for unsetting an email, so we don't wan to allow the setter\n  // eslint-disable-next-line @typescript-eslint/related-getter-setter-pairs\n  public get email(): string | undefined {\n    return (\n      extractEmailFromParams(this.#pageUrl) ??\n      ((getWistiaLocalStorage() as WistiaLocalStorage)[this.#pageUrl]?.trackEmail as\n        | string\n        | undefined) ??\n      this.embedOptions.email ??\n      undefined\n    );\n  }\n\n  /**\n   * Associates the view of this media with the given email value.\n   * This email will appear in stats for the video.\n   * NOTE: This attribute will impact the entire page and is not scoped to the player.\n   * @param {string} newEmail\n   * @returns {void}\n   */\n  public set email(newEmail: string) {\n    if (this.email === newEmail) {\n      return;\n    }\n    this.#updateEmail(newEmail);\n    this.#setSyncedEmbedOption('email', newEmail);\n  }\n\n  /**\n   * Returns the overridding embed host for the player.\n   * Internal use only.\n   * @returns {string | null | undefined}\n   */\n  // we don't want to allow for unsetting this option\n  // eslint-disable-next-line @typescript-eslint/related-getter-setter-pairs\n  public get embedHost(): string | null | undefined {\n    return this.#getSyncedEmbedOption('embedHost') as string | null | undefined;\n  }\n\n  /**\n   * Sets the overridding embed host for the player.\n   * Internal use only.\n   * @param {string} newEmbedHost\n   * @returns {void}\n   */\n  public set embedHost(newEmbedHost: string) {\n    this.#setSyncedEmbedOption('embedHost', newEmbedHost);\n  }\n\n  /**\n   * Returns all the embed options being set on the WistiaPlayer from attributes and mediaData json\n   * @returns {EmbedOptions }\n   */\n  public get embedOptions(): EmbedOptions {\n    return this.#_playerData.embedOptions;\n  }\n\n  /**\n   * Returns whether the video has ended playback.\n   * @returns {boolean}\n   */\n  public get ended(): boolean {\n    return this.#_impl?.state() === 'ended';\n  }\n\n  /**\n   * Returns the current end video behavior value\n   * @returns {'default' | 'loop' | 'reset'}\n   */\n  public get endVideoBehavior(): NonNullable<EmbedOptions['endVideoBehavior']> {\n    return this.#getSyncedEmbedOption('endVideoBehavior') as NonNullable<\n      EmbedOptions['endVideoBehavior']\n    >;\n  }\n\n  /**\n   * Sets the behavior for what the video should do when it ends.\n   * @param {'default' | 'loop' | 'reset'} behavior\n   * @returns {void}\n   */\n  public set endVideoBehavior(behavior: NonNullable<EmbedOptions['endVideoBehavior']>) {\n    // loop is a slightly odd option, as it's set as an attribute directly on the\n    // underlying <video /> element. So we must do more than just change the _impl._attrs\n    // for it to be updated.\n    if (behavior === 'loop') {\n      this.#_impl?.addLoopBehavior();\n    } else {\n      this.#_impl?.removeLoopBehavior();\n    }\n\n    this.#setSyncedEmbedOption('endVideoBehavior', behavior);\n  }\n\n  /**\n   * Returns the embed's event key if it exists.\n   * @returns {string | undefined}\n   */\n  public get eventKey(): string | undefined {\n    return this.#_impl?.eventKey();\n  }\n\n  /**\n   * Returns if the fullscreen button control will appear in the control bar.\n   * @returns {boolean}\n   */\n  public get fullscreenControl(): boolean {\n    return this.#getSyncedEmbedOption('fullscreenControl') as boolean;\n  }\n\n  /**\n   * Sets if the fullscreen button control is enabled in the control bar.\n   * @param {boolean} shouldDisplay\n   * @returns {void}\n   */\n  public set fullscreenControl(shouldDisplay: boolean) {\n    this.#_impl?.fullscreenControlEnabled(shouldDisplay);\n    this.#setSyncedEmbedOption('fullscreenControl', shouldDisplay);\n  }\n\n  /**\n   * Returns if the video should use HLS playback.\n   * Internal only.\n   * @returns {boolean}\n   */\n  public get hls(): boolean {\n    return this.#getSyncedEmbedOption('hls') as boolean;\n  }\n\n  /**\n   * Sets if the video should use HLS playback.\n   * Internal only.\n   * @param {boolean} shouldUseHls\n   * @returns {void}\n   */\n  public set hls(shouldUseHls: boolean) {\n    this.#setSyncedEmbedOption('hls', shouldUseHls);\n  }\n\n  /**\n   * Returns whether the video is currently in fullscreen\n   * @returns {boolean}\n   */\n  public get inFullscreen(): boolean {\n    return this.#_impl?.inFullscreen() ?? false;\n  }\n\n  public get inputContext(): string | undefined {\n    return this.#_impl?.getInputContext();\n  }\n\n  /**\n   * Returns whether instantHLS is enabled for the video.\n   * @returns {boolean}\n   */\n  public get instantHls(): boolean {\n    return this.#_impl?.isInstantHls() ?? false;\n  }\n\n  // the publicApi returns a language object, but you are not allowed to pass that object as a type when setting the language\n  // eslint-disable-next-line @typescript-eslint/related-getter-setter-pairs\n  public get language(): Language | undefined {\n    return this.#_api?.language() ?? this.#defaultLocalization();\n  }\n\n  public set language(language: string | undefined) {\n    this.#_api?.language(language);\n  }\n\n  public get languages(): Language[] {\n    return this.#_api?.languages() ?? [this.#defaultLocalization()];\n  }\n\n  /**\n   * Returns all the mediaData set on the WistiaPlayer\n   * @returns {MediaData }\n   */\n  public get mediaData(): MediaData {\n    return this.#_playerData.mediaData;\n  }\n\n  /**\n   * Returns the hashed id of the media.\n   * @returns {string}\n   */\n  public get mediaId(): string {\n    return this.getAttribute('media-id') ?? '';\n  }\n\n  /**\n   * Replaces the content of the current video with the video identified by the given mediaId.\n   * @param {string} newMediaId\n   * @returns {void}\n   */\n  public set mediaId(newMediaId: string) {\n    const prevMediaId = this.mediaId;\n\n    if (prevMediaId === newMediaId) {\n      return;\n    }\n\n    this.#_logger.info('set mediaId', newMediaId);\n\n    // Sync the element's media-id attribute with this property\n    // This is the most important and only required attribute on the element\n    // and won't change frequently, so it shouldn't cost too much to keep in sync\n    this.setAttribute('media-id', newMediaId);\n  }\n\n  /**\n   * Returns the language of the media stream.\n   * @returns {Localization | undefined}\n   */\n  // the publicApi returns a Localization object, but you are not allowed to pass that object as a type when setting the localization\n  // eslint-disable-next-line @typescript-eslint/related-getter-setter-pairs\n  public get mediaLanguage(): Localization | undefined {\n    return this.#_api?.mediaLanguage() ?? this.#defaultLocalization();\n  }\n\n  /**\n   * Changes the language of the media stream/content.\n   * @param {string} language\n   * @returns {void}\n   */\n  public set mediaLanguage(language: string | undefined) {\n    this.#_api?.mediaLanguage(language);\n  }\n\n  /**\n   * Returns the languages of the media.\n   * @returns {Localization[]}\n   */\n  public get mediaLanguages(): Localization[] {\n    return this.#_api?.mediaLanguages() ?? [this.#defaultLocalization()];\n  }\n\n  /**\n   * Returns if player is currently muted\n   * @returns {boolean}\n   */\n  public get muted(): boolean {\n    return this.#_impl?.isMuted() ?? this.embedOptions.muted ?? false;\n  }\n\n  /**\n   * Change player muted state\n   * @param {boolean} shouldMute\n   */\n  public set muted(shouldMute: boolean) {\n    if (this.#_impl) {\n      if (shouldMute) {\n        void this.#_impl.mute();\n      } else {\n        void this.#_impl.unmute();\n      }\n    }\n\n    this.#setSyncedEmbedOption('muted', shouldMute);\n  }\n\n  /**\n   * Returns the name of the media as it is in the Wistia application.\n   * Returns undefined until media data is loaded.\n   * @returns {string | undefined}\n   */\n  public get name(): string | undefined {\n    return this.#_playerData.mediaData.name ?? this.#_api?._mediaData?.name ?? undefined;\n  }\n\n  /**\n   * Returns the status of the opaqueControls embed option, which determines\n   * if the playbar and big play button are opaque ore semi-transparent\n   *\n   * @returns {boolean}\n   */\n  public get opaqueControls(): boolean {\n    return this.#getSyncedEmbedOption('opaqueControls') as boolean;\n  }\n\n  /**\n   * When true the player will use a fully opaque big play button and playbar\n   * @param {boolean} opaqueControls\n   * @returns {void}\n   */\n  public set opaqueControls(opaqueControls: unknown) {\n    const valueAsBoolean = Boolean(opaqueControls);\n    this.#_impl?.opaqueControls(valueAsBoolean);\n    this.#setSyncedEmbedOption('opaqueControls', valueAsBoolean);\n  }\n\n  public get paddingTop(): string {\n    return this.#paddingTop;\n  }\n\n  public set paddingTop(paddingTop: string) {\n    this.#paddingTop = paddingTop;\n  }\n\n  /**\n   * Returns a boolean that indicates whether the video is paused.\n   * @returns {boolean}\n   */\n  public get paused(): boolean {\n    return this.#_impl?.state() === 'paused';\n  }\n\n  /**\n   * Returns the percent of the video that has been watched as a decimal between 0 and 1.\n   * @returns {number}\n   */\n  public get percentWatched(): number {\n    return this.#_impl?.percentWatched() ?? 0;\n  }\n\n  /**\n   * Returns the playback rate of the video.\n   * @returns {number}\n   */\n  public get playbackRate(): number {\n    return this.#_impl?.playbackRate() ?? this.embedOptions.playbackRate ?? 1;\n  }\n\n  /**\n   * Set the playback rate of the video.\n   * @param {number} rate\n   * @returns {void}\n   */\n  public set playbackRate(rate: number) {\n    this.#_impl?.playbackRate(rate);\n    this.#setSyncedEmbedOption('playbackRate', rate);\n  }\n\n  /**\n   * If set to true, the playback rate control will appear in the setting control.\n   * @returns {boolean}\n   */\n  public get playbackRateControl(): boolean {\n    return this.#getSyncedEmbedOption('playbackRateControl') as boolean;\n  }\n\n  /**\n   * enable or disable the playback rate control in the settings control.\n   * @param {boolean} shouldDisplay\n   * @returns {void}\n   */\n  public set playbackRateControl(shouldDisplay: boolean) {\n    this.#_impl?.playbackRateControlEnabled(shouldDisplay);\n    this.#setSyncedEmbedOption('playbackRateControl', shouldDisplay);\n  }\n\n  /**\n   * Returns if the playbar - which includes the playhead, current time, and scrubbing functionality - will be available.\n   * @returns {boolean}\n   */\n  public get playBarControl(): boolean {\n    return this.#getSyncedEmbedOption('playBarControl') as boolean;\n  }\n\n  /**\n   * Sets if the playbar - which includes the playhead, current time, and scrubbing functionality - will be available.\n   * @param {boolean} shouldDisplay\n   * @returns {void}\n   */\n  public set playBarControl(shouldDisplay: boolean) {\n    this.#_impl?.playbarControlEnabled(shouldDisplay);\n    this.#setSyncedEmbedOption('playBarControl', shouldDisplay);\n  }\n\n  /**\n   * Returns the border radius of the player.\n   * @returns {number}\n   */\n  public get playerBorderRadius(): number {\n    return this.#getSyncedEmbedOption('playerBorderRadius') as number;\n  }\n\n  /**\n   * Sets the border radius of the player.\n   * @param {number} radius\n   * @returns {void}\n   */\n  public set playerBorderRadius(radius: number) {\n    this.#_impl?.setPlayerBorderRadius(Number(radius));\n    this.#setSyncedEmbedOption('playerBorderRadius', radius);\n  }\n\n  /**\n   * Returns the base color of the player.\n   * @returns {string}\n   */\n  public get playerColor(): string {\n    if (this.playerColorGradient?.on) {\n      return (\n        getGradientColor(this.playerColorGradient) ??\n        (this.#getSyncedEmbedOption('playerColor') as string)\n      );\n    }\n    return this.#getSyncedEmbedOption('playerColor') as string;\n  }\n\n  /**\n   * Changes the base color of the player.\n   * Expects a hexadecimal rgb string like \"ff0000\" (red), \"000000\" (black), \"ffffff\" (white), or \"0000ff\" (blue).\n   * @param {string} newColor\n   * @returns {void}\n   */\n  public set playerColor(newColor: string) {\n    this.#_impl?.playerColor(newColor);\n    this.#setSyncedEmbedOption('playerColor', newColor);\n  }\n\n  /**\n   * Returns the player color gradient object.\n   * @returns {Gradient}\n   */\n  public get playerColorGradient(): Gradient | undefined {\n    const value = this.#getSyncedEmbedOption('playerColorGradient');\n    if (isGradient(value)) {\n      return value;\n    }\n    return undefined;\n  }\n\n  /**\n   * Sets the player color gradient object.\n   * @param {Gradient} gradient\n   * @returns {void}\n   */\n  public set playerColorGradient(gradient: unknown) {\n    if (!isGradient(gradient)) {\n      throw new Error('playerColorGradient must be a valid gradient object');\n    }\n\n    this.#_impl?.playerColorGradient(gradient);\n    this.#setSyncedEmbedOption('playerColorGradient', gradient);\n  }\n\n  /**\n   * Returns the overridding player.\n   * Internal use only.\n   * @returns {Players | undefined}\n   */\n  // This will return undefined if it's not set, but you are not allowed to set it to undefined\n  // eslint-disable-next-line @typescript-eslint/related-getter-setter-pairs\n  public get playerForce(): Players | undefined {\n    return (this.getAttribute('player-force') as Players | null) ?? undefined;\n  }\n\n  /**\n   * Sets the overridding player.\n   * Internal use only.\n   * @param {string} newPlayer\n   * @returns {void}\n   */\n  public set playerForce(newPlayer: Players) {\n    this.#_logger.info('set playerForce', newPlayer);\n    this.setAttribute('player-force', newPlayer);\n  }\n\n  /**\n   * Returns the strategy for associating specially crafted links on a page with a video, turning them into a playlist.\n   * auto: For each video on the page, look for links after the video, until we come to another Wistia video.\n   * manual: Given each link element, look at its 'container' option to determine which video it should connect to.\n   * \"container\": For all embed links in a container whose id matches this given string, connect them to this specific video.\n   * @returns {'auto' | 'manual' | string}\n   */\n  public get playlistLinks(): string {\n    return this.#getSyncedEmbedOption('playlistLinks') as string;\n  }\n\n  /**\n   * Sets the strategy for associating specially crafted links on a page with a video, turning them into a playlist.\n   * @param {'auto' | 'manual' | string} newStrategy\n   * @returns {void}\n   */\n  public set playlistLinks(newStrategy: string) {\n    this.#setSyncedEmbedOption('playlistLinks', newStrategy);\n  }\n\n  /**\n   * When present or set to true and this video has a playlist, it will loop back to\n   * the first video and replay it once the last video has finished.\n   * @returns {boolean}\n   */\n  public get playlistLoop(): boolean {\n    return this.#getSyncedEmbedOption('playlistLoop') as boolean;\n  }\n\n  /**\n   * When present or set to true and this video has a playlist, it will loop back to\n   * the first video and replay it once the last video has finished.\n   * @param {boolean} shouldLoop\n   * @returns {void}\n   */\n  public set playlistLoop(shouldLoop: boolean) {\n    this.#setSyncedEmbedOption('playlistLoop', shouldLoop);\n  }\n\n  /**\n   * If set to true, the small play button control will be available.\n   * @returns {boolean}\n   */\n  public get playPauseControl(): boolean {\n    return this.#getSyncedEmbedOption('playPauseControl') as boolean;\n  }\n\n  /**\n   * If set to true, the small play button control will be available.\n   * @param {boolean} shouldDisplay\n   * @returns {void}\n   */\n  public set playPauseControl(shouldDisplay: boolean) {\n    this.#_impl?.playPauseControlEnabled(shouldDisplay);\n    this.#setSyncedEmbedOption('playPauseControl', shouldDisplay);\n  }\n\n  /**\n   * By default, pausing a video will display a brief animation of the pause symbol\n   * and resuming the video will display an animation of the play symbol.\n   * Setting this embed option to false will remove those animations.\n   * @returns {boolean}\n   */\n  public get playPauseNotifier(): boolean {\n    return this.#getSyncedEmbedOption('playPauseNotifier') as boolean;\n  }\n\n  /**\n   * By default, pausing a video will display a brief animation of the pause symbol\n   * and resuming the video will display an animation of the play symbol.\n   * Setting this embed option to false will remove those animations.\n   * @param {boolean} shouldDisplay\n   * @returns {void}\n   */\n  public set playPauseNotifier(shouldDisplay: boolean) {\n    this.#_impl?.playPauseNotifierEnabled(shouldDisplay);\n    this.#setSyncedEmbedOption('playPauseNotifier', shouldDisplay);\n  }\n\n  /**\n   * Getter. Returns all defined plugins.\n   * @returns {PluginInstances} returns object of defined plugins. Please note this may return an\n   * empty object if not plugins have yet been defined.\n   */\n  public get plugins(): PluginInstances {\n    if (this.#_impl) {\n      // We don't want customers modifying this object (adding/deleting what is already here).\n      // But they may need to interact/modify the existing ones, so we only use `seal`.\n      return Object.seal({ ...this.#_impl.plugin });\n    }\n    return {};\n  }\n\n  /**\n   * Returns if the play button will expand to cover the thumbnail on hover,\n   * while also displaying the duration of the video.\n   * @returns {boolean}\n   */\n  public get popoverAnimateThumbnail(): boolean {\n    return this.#getSyncedEmbedOption('popoverAnimateThumbnail') as boolean;\n  }\n\n  /**\n   * Sets if the play button will expand to cover the thumbnail on hover,\n   * while also displaying the duration of the video.\n   * @param {boolean} shouldAnimate\n   * @returns {void}\n   */\n  public set popoverAnimateThumbnail(shouldAnimate: boolean) {\n    this.#setSyncedEmbedOption('popoverAnimateThumbnail', shouldAnimate);\n  }\n\n  /**\n   * Returns the current state of the video.\n   * @returns {PopoverAnimation}\n   */\n  public get popoverAnimation(): PopoverAnimation {\n    return this.#getSyncedEmbedOption('popoverAnimation') as PopoverAnimation;\n  }\n\n  /**\n   * Sets if the play button will expand to cover the thumbnail on hover,\n   * while also displaying the duration of the video.\n   * @param {PopoverAnimation} newAnimation\n   * @returns {void}\n   */\n  public set popoverAnimation(newAnimation: PopoverAnimation) {\n    this.#setSyncedEmbedOption('popoverAnimation', newAnimation);\n  }\n\n  /**\n   * Returns the border color of the popover.\n   * @returns {string}\n   */\n  public get popoverBorderColor(): string {\n    return this.#getSyncedEmbedOption('popoverBorderColor') as string;\n  }\n\n  /**\n   * Sets the border color of the popover.\n   * @param {string} newColor\n   * @returns {void}\n   */\n  public set popoverBorderColor(newColor: string) {\n    this.#setSyncedEmbedOption('popoverBorderColor', newColor);\n  }\n\n  /**\n   * Returns the border radius of the popover.\n   * @returns {number}\n   */\n  public get popoverBorderRadius(): number {\n    return this.#getSyncedEmbedOption('popoverBorderRadius') as number;\n  }\n\n  /**\n   * Sets the border radius of the popover.\n   * @param {number} newRadius\n   * @returns {void}\n   */\n  public set popoverBorderRadius(newRadius: number) {\n    this.#setSyncedEmbedOption('popoverBorderRadius', newRadius);\n  }\n\n  /**\n   * Returns the border width of the popover.\n   * @returns {number}\n   */\n  public get popoverBorderWidth(): number {\n    return this.#getSyncedEmbedOption('popoverBorderWidth') as number;\n  }\n\n  /**\n   * Sets the border width of the popover.\n   * @param {number} newWidth\n   * @returns {void}\n   */\n  public set popoverBorderWidth(newWidth: number) {\n    this.#setSyncedEmbedOption('popoverBorderWidth', newWidth);\n  }\n\n  /**\n   * Returns if the popover should be displayed with a box shadow.\n   * @returns {boolean}\n   */\n  public get popoverBoxShadow(): boolean {\n    return this.#getSyncedEmbedOption('popoverBoxShadow') as boolean;\n  }\n\n  /**\n   * Sets if the popover should be displayed with a box shadow.\n   * @param {boolean} shouldDisplayBoxShadow\n   * @returns {void}\n   */\n  public set popoverBoxShadow(shouldDisplayBoxShadow: boolean) {\n    this.#setSyncedEmbedOption('popoverBoxShadow', shouldDisplayBoxShadow);\n  }\n\n  /**\n   * Returns text set to be displayed directly below the popover.\n   * @returns {string}\n   */\n  public get popoverCaption(): string {\n    return this.#getSyncedEmbedOption('popoverCaption') as string;\n  }\n\n  /**\n   * Sets text set to be displayed directly below the popover.\n   * @param {string} newCaption\n   * @returns {void}\n   */\n  public set popoverCaption(newCaption: string) {\n    this.#setSyncedEmbedOption('popoverCaption', newCaption);\n  }\n\n  /**\n   * Returns the id of the dom element which will be moved beneath the popover.\n   * @returns {string}\n   */\n  public get popoverCaptionContainer(): string {\n    return this.#getSyncedEmbedOption('popoverCaptionContainer') as string;\n  }\n\n  /**\n   * Sets the id of the dom element which will be moved beneath the popover.\n   * @param {string} newCaptionContainer\n   * @returns {void}\n   */\n  public set popoverCaptionContainer(newCaptionContainer: string) {\n    this.#setSyncedEmbedOption('popoverCaptionContainer', newCaptionContainer);\n  }\n\n  /**\n   * Returns how the popover content will render.\n   * @returns {PopoverContentSettings | string | undefined}\n   */\n  // This will return undefined if it's not set, but you are not allowed to set it to undefined\n  // eslint-disable-next-line @typescript-eslint/related-getter-setter-pairs\n  public get popoverContent(): PopoverContentSettings | undefined {\n    return this.#getSyncedEmbedOption('popoverContent') as unknown as\n      | PopoverContentSettings\n      | undefined;\n  }\n\n  /**\n   * Sets how the popover content will render.\n   * @param {PopoverContentSettings} newContentType\n   * @returns {void}\n   */\n  public set popoverContent(newContentType: PopoverContentSettings) {\n    this.#setSyncedEmbedOption('popoverContent', newContentType);\n  }\n\n  /**\n   * Returns if embed should override the behavior for the autoplay option in Customize for\n   * a popover specifically, so that launching the popover doesn't also play the video.\n   * @returns {boolean}\n   */\n  public get popoverDisableAutoplay(): boolean {\n    return this.#getSyncedEmbedOption('popoverDisableAutoplay') as boolean;\n  }\n\n  /**\n   * Sets if embed should override the behavior for the autoplay option in Customize for\n   * a popover specifically, so that launching the popover doesn't also play the video.\n   * @param {boolean} shouldDisable\n   * @returns {void}\n   */\n  public set popoverDisableAutoplay(shouldDisable: boolean) {\n    this.#setSyncedEmbedOption('popoverDisableAutoplay', shouldDisable);\n  }\n\n  /**\n   * Returns the overlay's background color in RGB hexadecimal.\n   * @returns {string}\n   */\n  public get popoverOverlayColor(): string {\n    return this.#getSyncedEmbedOption('popoverOverlayColor') as string;\n  }\n\n  /**\n   * Sets the overlay's background color in RGB hexadecimal.\n   * @param {string} newColor\n   * @returns {void}\n   */\n  public set popoverOverlayColor(newColor: string) {\n    this.#setSyncedEmbedOption('popoverOverlayColor', newColor);\n  }\n\n  /**\n   * Returns the overlay's opacity. Expects a decimal value between 0 and 1.\n   * @returns {number}\n   */\n  public get popoverOverlayOpacity(): number {\n    return this.#getSyncedEmbedOption('popoverOverlayOpacity') as number;\n  }\n\n  /**\n   * Sets the overlay's opacity. Expects a decimal value between 0 and 1.\n   * @param {number} newOpacity\n   * @returns {void}\n   */\n  public set popoverOverlayOpacity(newOpacity: number) {\n    this.#setSyncedEmbedOption('popoverOverlayOpacity', newOpacity);\n  }\n\n  /**\n   * Returns if scrolling should be prevented when the popover is open.\n   * @returns {boolean}\n   */\n  public get popoverPreventScroll(): boolean {\n    return this.#getSyncedEmbedOption('popoverPreventScroll') as boolean;\n  }\n\n  /**\n   * Sets if scrolling should be prevented when the popover is open.\n   * @param {boolean} shouldPreventScroll\n   * @returns {void}\n   */\n  public set popoverPreventScroll(shouldPreventScroll: boolean) {\n    this.#setSyncedEmbedOption('popoverPreventScroll', shouldPreventScroll);\n  }\n\n  /**\n   * Returns if popover should immediately open as if it was clicked.\n   * @returns {boolean}\n   */\n  public get popoverShowOnLoad(): boolean {\n    return this.#getSyncedEmbedOption('popoverShowOnLoad') as boolean;\n  }\n\n  /**\n   * Sets if popover should immediately open as if it was clicked.\n   * @param {boolean} shouldShow\n   * @returns {void}\n   */\n  public set popoverShowOnLoad(shouldShow: boolean) {\n    this.#setSyncedEmbedOption('popoverShowOnLoad', shouldShow);\n  }\n\n  /**\n   * Overrides the thumbnail image that appears before the video plays.\n   * Expects an absolute URL to an image.\n   * @returns {string}\n   */\n  public get poster(): string {\n    return this.#getSyncedEmbedOption('poster') as string;\n  }\n\n  /**\n   * Overrides the thumbnail image that appears before the video plays.\n   * Expects an absolute URL to an image.\n   * @param {string} newUrl\n   * @returns {void}\n   */\n  public set poster(newUrl: string) {\n    // This method is called a second time when the attribute value\n    // is set on the element. Checking for the same value here prevents\n    // us from running that second redundant set.\n    const prevVal = this.poster;\n    if (prevVal === newUrl) {\n      return;\n    }\n\n    const prevUrl = this.poster;\n    this.#setSyncedEmbedOption('poster', newUrl);\n\n    // Sync the element's autoplay attribute with this property\n    // This matches the behavior of the native <video> element\n    this.setAttribute('poster', newUrl);\n\n    if (prevUrl !== newUrl) {\n      this.dispatchEvent(new CustomEvent('thumbnailchange'));\n    }\n  }\n\n  /**\n   * Returns the preload setting for the player.\n   * @returns {string | undefined}\n   * undefined is allowed as a return type because there may be situations\n   * where the player and/or engine has not loaded and we don't know what\n   * preload setting will be used\n   */\n  public get preload(): NonNullable<EmbedOptions['preload']> {\n    return this.#_impl?.preloadValue() ?? this.embedOptions.preload ?? 'metadata';\n  }\n\n  /**\n   * sets the preload value for the player. Note that changing this option\n   * after player initialization has no impact.\n   * @param {'auto'| 'metadata' | 'none'} preloadValue\n   * @returns {void}\n   */\n  public set preload(preloadValue: NonNullable<EmbedOptions['preload']>) {\n    // This method is called a second time when the attribute value\n    // is set on the element. Checking for the same value here prevents\n    // us from running that second redundant set.\n    const prevVal = this.preload;\n    if (prevVal === preloadValue) {\n      return;\n    }\n    this.#setSyncedEmbedOption('preload', preloadValue);\n\n    // Sync the element's autoplay attribute with this property\n    // This matches the behavior of the native <video> element\n    this.setAttribute('preload', preloadValue);\n  }\n\n  /**\n   * If set to true, the quality control will appear in the setting control.\n   * @returns {boolean}\n   */\n  public get qualityControl(): boolean {\n    return this.#getSyncedEmbedOption('qualityControl') as boolean;\n  }\n\n  /**\n   * enable or disable the quality control in the settings control.\n   * @param {boolean} shouldDisplay\n   * @returns {void}\n   */\n  public set qualityControl(shouldDisplay: boolean) {\n    this.#_impl?.qualityControlEnabled(shouldDisplay);\n    this.#setSyncedEmbedOption('qualityControl', shouldDisplay);\n  }\n\n  /**\n   * Return the max quality allowed for the 'Auto' asset in HLS playback\n   * @returns {number | undefined}\n   */\n  public get qualityMax(): AllowedQualities {\n    return this.#getSyncedEmbedOption('qualityMax') as AllowedQualities;\n  }\n\n  /**\n   * Set the max quality to be used for \"Auto\" in the HLS stream.\n   * @param {number} quality\n   * @returns {void}\n   */\n  public set qualityMax(quality: AllowedQualities) {\n    this.#_impl?.qualityMax(quality);\n    this.#setSyncedEmbedOption('qualityMax', quality);\n  }\n\n  /**\n   * Return the min quality allowed for the 'Auto' asset in HLS playback\n   * @returns {number}\n   */\n  public get qualityMin(): AllowedQualities {\n    return this.#getSyncedEmbedOption('qualityMin') as AllowedQualities;\n  }\n\n  /**\n   * Set the min quality to be used for \"Auto\" in the HLS stream.\n   * @param {number} quality\n   * @returns {void}\n   */\n  public set qualityMin(quality: AllowedQualities) {\n    this.#_impl?.qualityMin(quality);\n    this.#setSyncedEmbedOption('qualityMin', quality);\n  }\n\n  /**\n   * Returns the readyState of the inner video HTML element.\n   * @returns {number}\n   */\n  public get readyState(): number {\n    return this.#_impl?.getReadyState() ?? 0;\n  }\n\n  /**\n   * Returns the current resumable status of the video.\n   * @returns {'auto' | boolean}\n   */\n  public get resumable(): NonNullable<EmbedOptions['resumable']> {\n    return (this.#getSyncedEmbedOption('resumable') ?? 'auto') as NonNullable<\n      EmbedOptions['resumable']\n    >;\n  }\n\n  /**\n   * set the resumable state of the video to 'auto' | true | false.\n   * note that this can be changed 'beforeplay', however changing the\n   * value after play will have no effect\n   * @param {'auto' | boolean} resumableState\n   * @returns {void}\n   */\n  public set resumable(resumableState: NonNullable<EmbedOptions['resumable']>) {\n    this.#_impl?.setResumable(resumableState);\n    this.#setSyncedEmbedOption('resumable', resumableState);\n  }\n\n  /**\n   * Returns a value which controls all rounded corners of the player.\n   * @returns {number}\n   */\n  public get roundedPlayer(): number {\n    return this.#getSyncedEmbedOption('roundedPlayer') as number;\n  }\n\n  /**\n   * Returns the value which controls all rounded corners of the player.\n   * @param {number} radius\n   * @returns {void}\n   */\n  public set roundedPlayer(radius: number) {\n    this.#_impl?.setRoundedPlayer(Number(radius));\n    this.#setSyncedEmbedOption('roundedPlayer', radius);\n  }\n\n  /**\n   * Returns the number of unique seconds that have been watched for the video.\n   * This does not include seconds that have been skipped by seeking.\n   * @returns {number}\n   */\n  public get secondsWatched(): number {\n    return this.#_impl?.secondsWatched() ?? 0;\n  }\n\n  /**\n   * Returns an array where each index represents the number of times the viewer has watched each second of the video.\n   * @returns {number[]}\n   */\n  public get secondsWatchedVector(): number[] {\n    return this.#_impl?.secondsWatchedVector() ?? [];\n  }\n\n  /**\n   * Returns whether JSON+LD seo data will be injected.\n   * @returns {boolean}\n   */\n  public get seo(): boolean {\n    return this.#getSyncedEmbedOption('seo') as boolean;\n  }\n\n  /**\n   * Set whether JSON+LD seo data will be injected.\n   * Note that changing this value after embed has no impact as JSON+LD needs\n   * to be injected as soon as possible.\n   * @param {boolean} val\n   * @returns {void}\n   */\n  public set seo(val: boolean) {\n    this.#setSyncedEmbedOption('seo', val);\n  }\n\n  /**\n   * If set to true, the settings control will appear in the control bar.\n   * @returns {boolean}\n   */\n  public get settingsControl(): boolean {\n    return this.#getSyncedEmbedOption('settingsControl') as boolean;\n  }\n\n  /**\n   * enable or disable the settings control in the control bar.\n   * @param {boolean} shouldDisplay\n   * @returns {void}\n   */\n  public set settingsControl(shouldDisplay: boolean) {\n    this.#_impl?.settingsControlEnabled(shouldDisplay);\n    this.#setSyncedEmbedOption('settingsControl', shouldDisplay);\n  }\n\n  /**\n   * This option allows videos to autoplay in a muted state in contexts where normal autoplay\n   * is blocked or not supported (e.g. iOS, Safari 11+, Chrome 66+).\n   * allow: The video will default to normal autoplay, with silent autoplay as a fallback if needed.\n   * false: The video will not autoplay silently.\n   * true: The video will default to autoplaying silently.\n   * @returns {boolean | 'allow'}\n   */\n  public get silentAutoplay(): boolean | 'allow' {\n    return this.#getSyncedEmbedOption('silentAutoplay') as boolean | 'allow';\n  }\n\n  /**\n   * This option allows videos to autoplay in a muted state in contexts where normal autoplay\n   * is blocked or not supported (e.g. iOS, Safari 11+, Chrome 66+).\n   * @param {boolean | 'allow'} silentAutoplayValue\n   * @returns {void}\n   */\n  public set silentAutoplay(silentAutoplayValue: boolean | 'allow') {\n    this.#setSyncedEmbedOption('silentAutoplay', silentAutoplayValue);\n  }\n\n  public get sourceLanguage(): Localization | undefined {\n    return (\n      this.#_playerData.mediaData.localizations?.find((loc) => loc.sourceLanguage) ??\n      this.mediaLanguages[0]\n    );\n  }\n\n  /**\n   * Returns the source media id for the player. If a player has different localized versions,\n   * each will have a different mediaId, but the same sourceMediaId.\n   * @returns {string}\n   */\n  public get sourceMediaId(): string {\n    return this.mediaData.sourceHashedId ?? this.mediaId;\n  }\n\n  /**\n   * Returns the current state of the video.\n   * @returns {PlayerState}\n   */\n  public get state(): PlayerState {\n    return this.#_api?.state() ?? defaultEmbedOptions.state;\n  }\n\n  /**\n   * Returns the stats url for the player.\n   * @returns {string | null}\n   */\n  // This will return undefined if it's not set, but you are not allowed to set it to undefined\n  // eslint-disable-next-line @typescript-eslint/related-getter-setter-pairs\n  public get statsUrl(): EmbedOptions['statsUrl'] {\n    return this.#getSyncedEmbedOption('statsUrl') as EmbedOptions['statsUrl'];\n  }\n\n  /**\n   * Sets the stats url for the player.\n   * @param {string} url\n   * @returns {void}\n   */\n  public set statsUrl(url: NonNullable<EmbedOptions['statsUrl']>) {\n    this.#setSyncedEmbedOption('statsUrl', url);\n  }\n\n  /**\n   * Returns if a swatch should be shown before the player renders.\n   * Internal use only.\n   * @returns {boolean | undefined}\n   */\n  // This will return undefined if it's not set, but you are not allowed to set it to undefined\n  // eslint-disable-next-line @typescript-eslint/related-getter-setter-pairs\n  public get swatch(): boolean | undefined {\n    return this.#getSyncedEmbedOption('swatch') as boolean | undefined;\n  }\n\n  /**\n   * Sets if a swatch should be shown before the player renders.\n   * Internal use only.\n   * @param {boolean} shouldShowSwatch\n   * @returns {void}\n   */\n  public set swatch(shouldShowSwatch: boolean) {\n    this.#setSyncedEmbedOption('swatch', shouldShowSwatch);\n  }\n\n  /**\n   * If present, the background behind the video player will be transparent\n   * allowing the page color to show through instead of black.\n   * @returns {boolean}\n   */\n  public get transparentLetterbox(): boolean {\n    return this.#getSyncedEmbedOption('transparentLetterbox') as boolean;\n  }\n\n  /**\n   * Sets the letterbox to be transparent or not.\n   * @param {boolean} shouldSetTransparentLetterbox\n   * @returns {void}\n   */\n  public set transparentLetterbox(shouldSetTransparentLetterbox: boolean) {\n    this.#setSyncedEmbedOption('transparentLetterbox', shouldSetTransparentLetterbox);\n  }\n\n  /**\n   * Returns the unique id of this embed\n   * Expected format is `wistia-mediaId-index`\n   * @returns {string}\n   */\n  public get uniqueId(): string {\n    return this.getAttribute('unique-id') ?? '';\n  }\n\n  /**\n   * Sets the unique id of this embed.\n   * Expected format is `wistia-mediaId-index`\n   * @returns {string}\n   */\n  public set uniqueId(id: string) {\n    this.setAttribute('unique-id', id);\n  }\n\n  /**\n   * Returns if this custom element was created from a legacy translated embed.\n   * Internal use only.\n   * @returns {boolean}\n   */\n  public get useWebComponent(): boolean {\n    return this.getAttribute('use-web-component') === 'true';\n  }\n\n  /**\n   * Set if this custom element was created from a legacy translated embed.\n   * Internal use only.\n   * @param {boolean} val\n   * @returns {void}\n   */\n  public set useWebComponent(val: boolean) {\n    if (val) {\n      this.setAttribute('use-web-component', String(val));\n    } else {\n      this.removeAttribute('use-web-component');\n    }\n  }\n\n  /**\n   * Returns the current video quality.\n   * @returns {number | 'auto'}\n   */\n  public get videoQuality(): number | 'auto' {\n    return this.#_impl?.getVideoQuality() ?? this.embedOptions.videoQuality ?? 'auto';\n  }\n\n  /**\n   * Sets the video quality.\n   * @param {number | 'auto'} quality\n   * @returns {void}\n   */\n  public set videoQuality(quality: number | 'auto') {\n    this.#_impl?.setVideoQuality(quality);\n    this.#setSyncedEmbedOption('videoQuality', quality);\n  }\n\n  /**\n   * Returns the visitor_key of the viewer of this player.\n   * @returns {string | null | undefined}\n   */\n  public get visitorKey(): string | null | undefined {\n    return Wistia.visitorKey?.value();\n  }\n\n  /**\n   * Returns the current volume set on the player\n   * @returns {number}\n   */\n  public get volume(): number {\n    return this.#getSyncedEmbedOption('volume') as number;\n  }\n\n  /**\n   * Set the current volume set on the player\n   * @param {number} level - a Number from 0 - 1\n   * @returns {void}\n   */\n  public set volume(level: number) {\n    this.#_impl?.volume(level);\n    this.#setSyncedEmbedOption('volume', level);\n  }\n\n  /**\n   * If set to true, the volume control will appear in the control bar.\n   * Note that on mobile, we never show a volume control, as the device\n   * volume is used.\n   * @returns {boolean}\n   */\n  public get volumeControl(): boolean {\n    return this.#getSyncedEmbedOption('volumeControl') as boolean;\n  }\n\n  /**\n   * enable or disable the volume control in the control bar.\n   * @param {boolean} shouldDisplay\n   * @returns {void}\n   */\n  public set volumeControl(shouldDisplay: boolean) {\n    this.#_impl?.volumeControlEnabled(shouldDisplay);\n    this.#setSyncedEmbedOption('volumeControl', shouldDisplay);\n  }\n\n  /**\n   * Returns if the player embed is a popover.\n   * @returns {boolean}\n   */\n  public get wistiaPopover(): boolean {\n    return this.#getSyncedEmbedOption('wistiaPopover') as boolean;\n  }\n\n  /**\n   * Sets if the player embed is a popover.\n   * @param {boolean} shouldBePopover\n   * @returns {void}\n   */\n  public set wistiaPopover(shouldBePopover: boolean) {\n    this.#setSyncedEmbedOption('wistiaPopover', shouldBePopover);\n  }\n\n  get #pageUrl(): string {\n    return this.getAttribute('page-url') ?? inferPageUrl();\n  }\n\n  // --------------------------------------------------\n  // Public api methods\n  // --------------------------------------------------\n\n  /**\n   * Adds an event listener to the player.\n   * @param {string} eventName - The name of the event to listen for.\n   * @param {EventListenerOrEventListenerObject} listener - The function to call when the event occurs.\n   * @param {AddEventListenerOptions | boolean} options - Additional options for the event listener.\n   */\n  public addEventListener(\n    eventName: string,\n    listener: EventListenerOrEventListenerObject,\n    options?: AddEventListenerOptions | boolean,\n  ): void {\n    if (!Array.isArray(this.#_eventListeners[eventName])) {\n      this.#_eventListeners[eventName] = [];\n    }\n    this.#_eventListeners[eventName].push({ listener, options });\n\n    super.addEventListener(eventName, listener, options);\n  }\n\n  /**\n   * Attempt to enter fullscreen mode.\n   * @returns {Promise<void>}\n   */\n  public async cancelFullscreen(): Promise<void> {\n    return this.#_impl?.cancelFullscreen().then(() => {\n      this._fullscreenState.heightBeforeFullscreen = undefined;\n      this._fullscreenState.widthBeforeFullscreen = undefined;\n    });\n  }\n\n  /**\n   * Creates an overlay with the specified name and options.\n   * @param {string} name - The name of the overlay.\n   * @param {OverlayOptions} options - The options for the overlay.\n   * @returns A promise that resolves when the overlay is created successfully, or rejects with an error if the overlay cannot be defined at this time.\n   */\n  public async createOverlay(name: string, options: OverlayOptions): Promise<void> {\n    if (this.#_impl?.defineOverlay) {\n      return this.#_impl.defineOverlay(name, options);\n    }\n    return Promise.reject(new Error(`overlay ${name} cannot be defined at this time`));\n  }\n\n  /**\n   * Defines a plugin on the player.\n   * @param {T extends keyof PluginConfigs} name name of the plugin to define\n   * @param {PluginConfigs[T]} options object of plugin options related to the specific plugin\n   * @returns {Promise<PluginInstances<T>>} returns a Promise that resolves with the defined plugin\n   */\n  public async definePlugin<T extends keyof PluginConfigs>(\n    name: T,\n    options: PluginConfigs[T],\n  ): Promise<PluginInstances[T]> {\n    const addPlugin = async (): Promise<PluginInstances[T]> => {\n      return (\n        this.#_api?.addPlugin(name, options) ??\n        Promise.reject(new Error(`plugin ${name} cannot be defined`))\n      );\n    };\n\n    if (this.#_api) {\n      return addPlugin();\n    }\n\n    return new Promise((resolve, reject) => {\n      this.whenApiReady()\n        .then(() => {\n          addPlugin()\n            .then((plugin) => resolve(plugin))\n            .catch((err: unknown) => {\n              if (err instanceof Error) {\n                reject(err);\n              } else {\n                reject(new Error('Promise rejected with non-Error value'));\n              }\n            });\n        })\n        // eslint-disable-next-line @typescript-eslint/no-empty-function\n        .catch((_error: unknown) => {});\n    });\n  }\n\n  /**\n   * Deletes an overlay with the specified name.\n   * @param {string} name - The name of the overlay to delete.\n   * @returns A promise that resolves when the overlay is successfully deleted, or rejects with an error if the overlay cannot be deleted at this time.\n   */\n  public async deleteOverlay(name: string): Promise<void> {\n    if (this.#_impl?.undefineOverlay) {\n      return this.#_impl.undefineOverlay(name);\n    }\n    return Promise.reject(new Error(`overlay ${name} cannot be deleted at this time`));\n  }\n\n  /**\n   *\n   * @param {string} name the handle name of the control to be disabled\n   * @returns {Promise<void>} Promise that resolves when operation is complete\n   */\n  public async disableControl(name: string): Promise<void> {\n    if (this.#_impl?.setControlEnabled) {\n      return this.#_impl.setControlEnabled(name, false);\n    }\n    return Promise.reject(new Error(`control \"${name}\" cannot be disabled at this time`));\n  }\n\n  /**\n   *\n   * @param {string} name the handle name of the control to be enabled\n   * @returns {Promise<void>} Promise that resolves when operation is complete\n   */\n  public async enableControl(name: string): Promise<void> {\n    if (this.#_impl?.setControlEnabled) {\n      return this.#_impl.setControlEnabled(name, true);\n    }\n    return Promise.reject(new Error(`control \"${name}\" cannot be enabled at this time`));\n  }\n\n  public async enterInputContext(context: string): Promise<void> {\n    if (this.#_impl?.enterInputContext) {\n      return new Promise((resolve) => {\n        const handler = (event: WistiaPlayerEvents[typeof INPUT_CONTEXT_CHANGE_EVENT]) => {\n          const { detail } = event;\n\n          if (detail.context === context) {\n            resolve();\n          }\n\n          this.removeEventListener(INPUT_CONTEXT_CHANGE_EVENT, handler);\n        };\n\n        this.addEventListener(INPUT_CONTEXT_CHANGE_EVENT, handler);\n\n        this.#_impl?.enterInputContext(context);\n      });\n    }\n\n    return Promise.reject(\n      new Error(`input context of name \"${context}\" cannot be enabled at this time`),\n    );\n  }\n\n  public async exitInputContext(context: string): Promise<void> {\n    if (this.#_impl?.exitInputContext) {\n      return Promise.resolve(this.#_impl.exitInputContext(context));\n    }\n    return Promise.reject(new Error(`control \"${context}\" cannot be enabled at this time`));\n  }\n\n  /**\n   * Gets initial media data for the video. This method exists purely to make\n   * mocking easier in tests and mirrors the import from getInitialMediaData.ts.\n   * @param {string} mediaId - The hashed ID of the media\n   * @param {FetchMediaDataOptions} options - Options for fetching media data\n   * @returns {Promise<MediaData | MediaDataServerErrorResponse>} The media data or error response\n   */\n  public async getInitialMediaData(\n    mediaId: string,\n    options: FetchMediaDataOptions,\n  ): Promise<MediaData | MediaDataServerErrorResponse> {\n    return getInitialMediaData(mediaId, options);\n  }\n\n  /**\n   * Gets a plugin from the player.\n   * @param {T extends keyof PluginInstances} name name of the plugin to retrieve\n   * @returns {Promise<PluginInstances[T]>} returns a Promise that resolves with the request plugin\n   */\n  public async getPlugin<T extends keyof PluginInstances>(name: T): Promise<PluginInstances[T]> {\n    return new Promise((resolve, reject) => {\n      if (this.#_api?.plugin && name in this.#_api.plugin) {\n        resolve(this.#_api.plugin[name]);\n      }\n\n      reject(new Error(`plugin ${name} is not defined`));\n    });\n  }\n\n  /**\n   * Returns a function that remaps the time of the video from one language to another.\n   * @returns {Function} A function that remaps the time of the video from one\n   * language to another with signature\n   * (fromLanguage: string, toLanguage: string, fromTime: number) => number\n   */\n  public async getRemapTime(): Promise<\n    (fromLanguage: string, toLanguage: string, fromTime: number) => number\n  > {\n    if (this.#cachedRemapTime != null) {\n      return this.#cachedRemapTime;\n    }\n\n    if (this.languages.length <= 1) {\n      this.#cachedRemapTime = (_fromLanguage: string, _toLanguage: string, fromTime: number) =>\n        fromTime;\n      return this.#cachedRemapTime;\n    }\n\n    this.#cachedRemapTime ??= await dynamicImport('assets/external/timeMapping.js').then(\n      ({\n        remapTime,\n      }: {\n        remapTime: (\n          sourceLocalization: Localization,\n          fromLocalization: Localization,\n          toLocalization: Localization,\n          fromTime: number,\n        ) => number;\n      }) =>\n        (fromLanguage: string, toLanguage: string, fromTime: number) => {\n          const fromTimeInMilliseconds = fromTime * 1000;\n          const fromLocalization = this.#findLocalizationByLanguage(fromLanguage);\n          const sourceLocalization = this.sourceLanguage;\n          const toLocalization = this.#findLocalizationByLanguage(toLanguage);\n\n          if (fromLocalization == null || toLocalization == null || sourceLocalization == null) {\n            return fromTime;\n          }\n\n          return (\n            remapTime(\n              sourceLocalization,\n              fromLocalization,\n              toLocalization,\n              fromTimeInMilliseconds,\n            ) / 1000\n          );\n        },\n    );\n    return this.#cachedRemapTime as (\n      fromLanguage: string,\n      toLanguage: string,\n      fromTime: number,\n    ) => number;\n  }\n\n  /**\n   * Hides the specified overlay.\n   * @param {string} name - The name of the overlay to hide.\n   * @returns A promise that resolves when the overlay is hidden, or rejects with an error if the overlay cannot be cancelled at this time.\n   */\n  public async hideOverlay(name: string): Promise<void> {\n    if (this.#_impl?.cancelOverlay) {\n      return this.#_impl.cancelOverlay(name);\n    }\n    return Promise.reject(new Error(`overlay ${name} cannot be cancelled at this time`));\n  }\n\n  /**\n   * Hides the popover if this is a popover embed.\n   * @returns {Promise<void>}\n   */\n  // eslint-disable-next-line @typescript-eslint/no-misused-promises\n  public async hidePopover(): Promise<void> {\n    return new Promise((resolve, reject) => {\n      if (this.#_api?.popover) {\n        this.#_api.popover.hide();\n        resolve();\n      }\n\n      reject(new Error(`Popover cannot be accessed`));\n    });\n  }\n\n  /**\n   * Pauses the video.\n   * If this is called and the video's state is \"playing,\"\n   * it's expected that it will change to \"paused.\"\n   * @returns {Promise<void>}\n   */\n  public async pause(): Promise<void> {\n    return this.#_impl?.pause();\n  }\n\n  /**\n   * Plays the video.\n   * If this is called, it is expected that the state will change to \"playing.\"\n   * @returns {Promise<void>}\n   */\n  public async play(): Promise<void> {\n    return this.#_impl?.play();\n  }\n\n  /**\n   * @param {string} name name of the controls\n   * @returns {Promise<void?>}\n   */\n  public async releaseControls(name: string): Promise<void> {\n    return this.#_impl?.releaseControls(name);\n  }\n\n  /**\n   * Removes all event listeners from the player\n   * @returns {void}\n   */\n  public removeAllEventListeners(): void {\n    Object.entries(this.#_eventListeners).forEach(([type, listeners]) => {\n      listeners.forEach(({ listener, options }) => {\n        this.removeEventListener(type, listener, options);\n      });\n    });\n  }\n\n  /**\n   * Removes an event listener from the player.\n   * @param {string} type - The type of event to remove.\n   * @param {EventListenerOrEventListenerObject} listener - The function to remove.\n   * @param {EventListenerOptions | boolean} options\n   * @returns {void}\n   */\n  public removeEventListener(\n    type: string,\n    listener: EventListenerOrEventListenerObject,\n    options?: EventListenerOptions | boolean,\n  ): void {\n    const listeners = this.#_eventListeners[type];\n    if (!Array.isArray(listeners)) return;\n\n    // Find index of the matching listener+options\n    const index = listeners.findIndex(\n      (entry) =>\n        entry.listener === listener && JSON.stringify(entry.options) === JSON.stringify(options),\n    );\n\n    if (index !== -1) {\n      // Remove event listener from DOM\n      super.removeEventListener(type, listener, options);\n\n      // Remove it from the tracked list\n      listeners.splice(index, 1);\n\n      // If no listeners remain for this type, clean up the key\n      if (listeners.length === 0) {\n        this.#_eventListeners[type] = [];\n      }\n    }\n  }\n\n  /**\n   * Replaces the media and then resolves when the new media is ready to play\n   * @param {string} mediaId\n   * @param {EmbedOptions} options\n   * @returns {Promise<void>}\n   */\n  public async replaceWithMedia(\n    mediaId: string,\n    options: ReplaceWithMediaOptions = {},\n  ): Promise<void> {\n    return new Promise((resolve, reject) => {\n      if (!this.#_api) {\n        reject(new Error('api not ready to replace'));\n      }\n\n      removeInjectedJsonLd(this.#_jsonLdId);\n\n      const handleAfterReplace = () => {\n        this.removeEventListener(AFTER_REPLACE_EVENT, handleAfterReplace);\n        resolve();\n      };\n\n      this.addEventListener(AFTER_REPLACE_EVENT, handleAfterReplace);\n      this.#_api?.replaceWith(mediaId, options);\n    });\n  }\n\n  /**\n   * @param {string} name name of the controls\n   * @returns {Promise<void?>}\n   */\n  public async requestControls(name: string): Promise<void> {\n    return this.#_impl?.requestControls(name);\n  }\n\n  /**\n   * Attempt to enter fullscreen mode.\n   * @returns {Promise<void>}\n   */\n  public async requestFullscreen(): Promise<void> {\n    if (this.#_impl?.requestFullscreen) {\n      return this.#_impl.requestFullscreen();\n    }\n\n    return Promise.reject(new Error('Fullscreen cannot be accessed'));\n  }\n\n  /**\n   * Shows an overlay with the specified name.\n   * @param {string} name - The name of the overlay to show.\n   * @returns A promise that resolves when the overlay is shown, or rejects with an error if the overlay cannot be requested at this time.\n   */\n  public async showOverlay(name: string): Promise<void> {\n    if (this.#_impl?.requestOverlay) {\n      return this.#_impl.requestOverlay(name);\n    }\n    return Promise.reject(new Error(`overlay ${name} cannot be requested at this time`));\n  }\n\n  /**\n   * Shows the popover if this is a popover embed.\n   * @returns {Promise<void>}\n   */\n  // eslint-disable-next-line @typescript-eslint/no-misused-promises\n  public async showPopover(): Promise<void> {\n    return new Promise((resolve, reject) => {\n      if (this.#_api?.popover) {\n        this.#_api.popover.show();\n        resolve();\n      }\n\n      reject(new Error(`Popover cannot be accessed`));\n    });\n  }\n\n  /**\n   * Updates the embed options for the player.\n   * @param {Partial<EmbedOptions>} options - The new embed options to set.\n   * @returns {Promise<EmbedOptions>} The updated embed options.\n   */\n  public async updateEmbedOptions(options: Partial<EmbedOptions>): Promise<EmbedOptions> {\n    return new Promise((resolve) => {\n      this.#setMultipleSyncedEmbedOptions(options);\n      resolve(this.embedOptions);\n    });\n  }\n\n  public async whenApiReady(): Promise<void> {\n    return new Promise((resolve) => {\n      if (this.#_api) {\n        this.#_api.ready(() => {\n          resolve();\n        });\n      }\n\n      const handler = () => {\n        this.removeEventListener(API_READY_EVENT, handler);\n        resolve();\n      };\n\n      this.addEventListener(API_READY_EVENT, handler);\n    });\n  }\n\n  public async whenControlMounted<T extends keyof ControlInstances>(\n    handle: T,\n  ): Promise<ControlInstances[T]> {\n    await this.whenApiReady();\n\n    if (this.#_api === null) {\n      throw new Error('Control API not available');\n    }\n\n    const control = await this.#_api.whenControlMounted(handle);\n    if (control === null || control === undefined) {\n      throw new Error('Control not found');\n    }\n\n    return control;\n  }\n\n  // --------------------------------------------------\n  // Custom element lifecycle methods\n  // --------------------------------------------------\n\n  /**\n   * Called when an observed attribute has been added, removed, updated, or replaced.\n   * Also called for initial values when an element is created by the parser, or upgraded.\n   * Note: only attributes listed in the observedAttributes property will receive this callback.\n   * @param {string} name - The name of the attribute that changed.\n   * @param {string} oldValue - The previous value of the attribute, or null if it was added for the first time.\n   * @param {string} newValue - The new value of the attribute, or null if it was removed.\n   * @returns {void}\n   */\n  protected attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n    // We need this to make sure we don't needlessly call api methods during initial component setup\n    if (!this.#hasElementConnectedToDOM) {\n      return;\n    }\n\n    if (oldValue === newValue) {\n      return;\n    }\n\n    // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n    if (oldValue === null && newValue === '') {\n      return;\n    }\n\n    // If the attribute string is equal to 'true' or 'false', go ahead and assume we'd\n    // like the boolean value instead of the string\n    let finalValue: boolean | string = newValue;\n    switch (newValue) {\n      case 'true':\n        finalValue = true;\n        break;\n      case 'false':\n        finalValue = false;\n        break;\n      default:\n        break;\n    }\n\n    // Attribute names must match their corresponding property names (kebab-case -> camelCase)\n    // So the player-color attribute maps to the playerColor property\n    this[kebabCaseToCamelCase(name)] = finalValue;\n  }\n\n  protected connectedCallback(): void {\n    if (this.#hasElementConnectedToDOM) {\n      return;\n    }\n    this.#hasElementConnectedToDOM = true;\n\n    const mediaId = this.getAttribute('media-id');\n    if (mediaId == null) {\n      countMetric('player/failure/init-failed');\n      throw new Error('media-id attribute is required');\n    }\n\n    // Allows for all bulk setting of embed options and mediaData\n    window.wistiaOptions = window.wistiaOptions ?? {};\n    const opts = getWistiaOptions(this.mediaId);\n    this.#_playerData.setWistiaWindowEmbedOptionSource(opts);\n\n    // Add the media id to the logger now that we have it\n    this.#_logger = (wlog as unknown as LoggerType).getPrefixedFunctions(\n      `WistiaPlayer ${mediaId}`,\n    ) as LoggerType;\n\n    this.#_judyContext = buildContext() as JudyContext;\n\n    // If the player was created from our React wrapper component, send a tracking event\n    if (this.getAttribute('react') === 'true') {\n      countMetric('player/initembed.react');\n    }\n\n    this.#setupEventListeners();\n\n    this.#_logger.info('initialize embed');\n\n    if (!this.useWebComponent) {\n      maybeStartWistiaQueue();\n    }\n\n    // Generate a unique id for this embed in case there are\n    // multiple embeds with the same hashed id on the page\n    this.uniqueId = this.#generateUniqueId(mediaId);\n\n    this.#maybeSetupEmbedOptionsFromIframe();\n\n    // Sometimes if an attribute is set on the player, we want to do something immediately\n    this.#runMethodsFromAttributes();\n\n    // Gather any attributes set on the element and save them so the public api can use them\n    this.#saveInitialAttributesFromDomOptions();\n\n    const resizeCallback = () => {\n      this.#renderPreloadThumbnail();\n    };\n    this.#resizeObserver = new ResizeObserver(resizeCallback);\n    this.#resizeObserver.observe(this);\n\n    const optsForFetch = {\n      deferFetchingToCarousel: this.#deferMediaDataFetchingToCarouselEmbed(),\n      embedHost: this.embedHost ?? '',\n      overrideMediaLanguage: this.embedOptions.language,\n    };\n\n    this.getInitialMediaData(mediaId, optsForFetch)\n      .then((mediaDataOrError: MediaData | MediaDataServerErrorResponse) => {\n        if (isMediaDataError(mediaDataOrError)) {\n          return;\n        }\n\n        const mediaData = mediaDataOrError as MediaData;\n\n        this.mediaId = mediaData.hashedId ?? this.mediaId;\n        this.#_playerData.setMediaDataSource(mediaData);\n\n        this.dispatchEvent(\n          new CustomEvent(LOADED_MEDIA_DATA_EVENT, {\n            detail: {\n              mediaData: this.#_playerData.mediaData,\n            },\n          }),\n        );\n\n        // If the player is not available in the document, assume it's inside a shadow root\n        const bestMatchContainer: WistiaPlayer | string = document.querySelector(\n          `[unique-id='${this.uniqueId}']`,\n        )\n          ? this.uniqueId\n          : this;\n\n        this.#initPlayerEmbed({\n          container: bestMatchContainer,\n          mediaData: this.#_playerData.mediaData,\n        });\n      })\n      .catch((error: unknown) => {\n        countMetric('player/failure/init-failed');\n        throw new Error((error as Error).message);\n      });\n\n    // Add our responsive embed template to the shadow DOM\n    if (this.shadowRoot) {\n      // Create slot for user content, to allow styling of children of\n      // <wistia-player> via css that's external to the shadow dom.\n      // This is mainly for popover embeds.\n      if (this.wistiaPopover && this.popoverContent === 'link') {\n        const slot = document.createElement('slot');\n        slot.name = `${this.uniqueId}-popover-link`;\n        this.shadowRoot.appendChild(slot);\n      }\n\n      // Render the embed template as soon as we can\n      this.#preactRoot = document.createElement('div');\n      this.#renderEmbedTemplate();\n      this.shadowRoot.insertBefore(this.#preactRoot, this.shadowRoot.firstChild);\n    }\n  }\n\n  protected disconnectedCallback(): void {\n    this.#_removeEventListeners.forEach((removeListener) => removeListener());\n\n    this.removeAllEventListeners();\n\n    this.#_eventListeners = {};\n    removeInjectedJsonLd(this.#_jsonLdId);\n\n    uncacheMediaData(this.mediaId);\n\n    this.#resizeObserver?.disconnect();\n    this.#resizeObserver = null;\n\n    removeEmbedOptionStore(`__${this.uniqueId}_dom_options__`);\n\n    this.#_api?.remove();\n    this.#_api = null;\n\n    this.shadowRoot?.replaceChildren();\n    this.#preactRoot = null;\n    this.#preloadThumbnailRoot = null;\n\n    this.#hasElementConnectedToDOM = false;\n  }\n\n  // --------------------------------------------------\n  // Private methods\n  // --------------------------------------------------\n\n  #defaultLocalization(): Localization {\n    return {\n      alpha3Bibliographic: 'eng',\n      alpha3Terminologic: 'eng',\n      duration: 0,\n      genericName: 'English',\n      genericNativeName: 'English',\n      hashedId: this.mediaId,\n      ietfLanguageTag: 'eng',\n      isLocalization: true,\n      iso6392LanguageCode: 'en',\n      name: 'English',\n      nativeName: 'English',\n      sourceLanguage: true,\n      timeMappings: [],\n    };\n  }\n\n  /**\n   * Should the player defer fetching media data to a carousel embed?\n   * Look for a connected carousel embed that is not inside a playlist embed.\n   * If one is found, return true.\n   * @returns {boolean}\n   */\n  #deferMediaDataFetchingToCarouselEmbed(): boolean {\n    return !!document.querySelector(\n      `wistia-channel-carousel[player-dom-id=\"${this.id}\"]:not([is-inside-playlist-embed=\"true\"][channel-id])`,\n    );\n  }\n\n  #findLocalizationByLanguage(language: string | undefined): Localization | undefined {\n    if (language == null) {\n      return undefined;\n    }\n\n    return this.#_playerData.mediaData.localizations?.find(\n      (localization) =>\n        localization.ietfLanguageTag === language || localization.iso6392LanguageCode === language,\n    );\n  }\n\n  /**\n   * Generates a unique id for the embed\n   * @param {number | string} mediaId - The media id\n   * @returns {string}\n   */\n  #generateUniqueId(mediaId): string {\n    const prefix = `wistia-${mediaId}-`;\n    return seqId(prefix);\n  }\n\n  /**\n   * Returns either the value of an embed option from the public api\n   * or the value of an embed option saved on this element.\n   *\n   * For now, the public api is the source of truth for embed options.\n   * However, this will change in the future. We also need a non-public\n   * api source for embed options so we can use them before the public\n   * api is ready.\n   * @param {string} key - Name of the embed option\n   * @returns {boolean | number | string | null}\n   */\n  #getSyncedEmbedOption(key: string): boolean | number | string | null | undefined {\n    // If the public api is ready, use it as the source of truth\n    if (this.#_impl && key in this.#_impl._attrs) {\n      return this.#_impl._attrs[key] as boolean | number | string | null | undefined;\n    }\n\n    // Otherwise check this element's embed config for a value and fallback\n    // to the default embed options as a last resort\n    return (\n      (this.embedOptions[key] as boolean | number | string | null | undefined) ??\n      (this.#getValueFromAttribute(camelCaseToKebabCase(key)) as\n        | boolean\n        | number\n        | string\n        | null\n        | undefined) ??\n      (defaultEmbedOptions[key] as boolean | number | string | undefined)\n    );\n  }\n\n  /**\n   * Gets the value of an attribute if it exists, returns null if not\n   * @param {string} name - Name of the attribute\n   * @returns {boolean | string | null}\n   */\n  #getValueFromAttribute(name: string): boolean | string | null {\n    // If no attribute is present, return null instead of an explicit false\n    // so our media data config doesn't get overridden\n    if (!this.hasAttribute(name)) {\n      return null;\n    }\n\n    switch (this.getAttribute(name)) {\n      case 'true':\n        return true;\n      case 'false':\n        return false;\n      case '':\n        // Boolean attributes are set to '' when they are present\n        // so we need to convert them to true\n        return true;\n      case null:\n      default:\n        return this.getAttribute(name);\n    }\n  }\n\n  readonly #handleAfterReplace = () => {\n    this.#maybeInjectJsonLd();\n    setEmbedOptionStore(`__${this.uniqueId}_dom_options__`, this.#_playerData.embedOptions);\n  };\n\n  readonly #handleBeforeReplace = (event: WistiaPlayerEvents[typeof BEFORE_REPLACE_EVENT]) => {\n    /**\n     * Since the public API reads embed options assigned to the DOM container,\n     * we need to make sure the DOM container ID/uniqueId is updated before\n     * the public API starts gathering options in replaceWithMediaDataQueuable.\n     */\n    this.mediaId = event.detail.mediaId;\n    this.uniqueId = this.#generateUniqueId(event.detail.mediaId);\n\n    // When we replace, we're getting new media data, and the function we return\n    // is based off the current media data.\n    this.#cachedRemapTime = undefined;\n  };\n\n  readonly #handlePreloadThumbnailClick: () => void = () => {\n    if (\n      this.#_playerType !== 'carouselHardWall' &&\n      this.#_playerType !== 'notplayable' &&\n      this.#_playerType !== 'passwordprotected'\n    ) {\n      this.#playPending = true;\n    }\n    this.#renderPreloadThumbnail();\n  };\n\n  /**\n   * Handles initialization of the player for fresh Aurora embeds\n   * @returns {void}\n   */\n  #initPlayerEmbed({\n    container,\n    mediaData,\n  }: {\n    container: WistiaPlayer | string;\n    mediaData?: MediaData | MediaDataServerErrorResponse;\n  }): void {\n    if (!this.#hasElementConnectedToDOM) {\n      return;\n    }\n    this.#_playerData.updateEmbedOptionOverrides({ videoFoam: true });\n\n    if (mediaData && !isMediaDataError(mediaData as MediaDataServerErrorResponse)) {\n      this.#_playerType = choosePlayer(\n        this.#_judyContext,\n        this.#_playerData.mediaData,\n        this.#_playerData.embedOptions,\n      ) as Players;\n\n      this.#renderPreloadThumbnail();\n\n      this.#maybeInjectJsonLd();\n    }\n\n    if ('attachInternals' in HTMLElement.prototype && 'states' in ElementInternals.prototype) {\n      this.#_internals?.states.delete('--initializing');\n    }\n\n    // Create and save the public api instance\n    void this.#initPublicApi(this.mediaId, {\n      container,\n      mediaData,\n    });\n  }\n\n  /**\n   * Initializes the public api instance and sends a ready event\n   * @param {number | string} mediaId - The media id\n   * @param {EmbedOptions | PublicApiOptions | undefined} options - The public api options\n   * @returns {Promise<void>}\n   */\n  async #initPublicApi(\n    mediaId: number | string,\n    options: EmbedOptions | PublicApiOptions | undefined,\n  ): Promise<void> {\n    // Import the public api script\n    await this.#publicApiScript;\n\n    if (!Wistia.PublicApi) {\n      countMetric('player/failure/init-failed');\n      throw new Error('Wistia.PublicApi is not defined');\n    }\n\n    const embeddedCallback = () => {\n      void this.#maybeInitializeMux();\n      this.#renderEmbedTemplate();\n\n      if (this.#playPending) {\n        void this.play();\n      }\n    };\n\n    this.addEventListener('embedded', embeddedCallback);\n    this.#_removeEventListeners.push(() => {\n      this.removeEventListener('embedded', embeddedCallback);\n    });\n\n    // Initialize!\n    this.#_api = new Wistia.PublicApi(mediaId, options) as PublicApi;\n\n    this.addEventListener(BEFORE_REPLACE_EVENT, this.#handleBeforeReplace);\n    this.addEventListener(AFTER_REPLACE_EVENT, this.#handleAfterReplace);\n\n    this.#_removeEventListeners.push(() => {\n      this.removeEventListener(BEFORE_REPLACE_EVENT, this.#handleBeforeReplace);\n      this.removeEventListener(AFTER_REPLACE_EVENT, this.#handleAfterReplace);\n    });\n\n    this.#_api.ready(() => {\n      this.#resizeObserver?.disconnect();\n      this.#resizeObserver = null;\n      this.#preloadThumbnailRoot?.remove();\n      this.removeEventListener('click', this.#handlePreloadThumbnailClick);\n      // event for public consumption, exposed on our event types\n      this.dispatchEvent(new CustomEvent(API_READY_EVENT, { detail: { mediaId } }));\n\n      // event for internal consumption, not exposed on our event types\n      this.dispatchEvent(\n        new CustomEvent(INTERNAL_API_ON_FIND_EVENT, { detail: { mediaId, api: this.#_api } }),\n      );\n\n      this.#maybeSetupLLMOptimizedEmbed();\n\n      // Sync embed options from the public api back to the embed config\n      if (this.#_impl) {\n        Object.entries(this.#_impl._attrs).forEach(\n          ([key, value]: [string, boolean | number | string]) => {\n            this.#_playerData.updateEmbedOptionOverrides({ [key]: value });\n          },\n        );\n      }\n\n      // Updates our PlayerDataProvider and re-renders the thumbnail with the new embed options\n      this.#renderPreloadThumbnail();\n    });\n  }\n\n  /**\n   * Returns if this player is a popover embed with a thumbnail.\n   * @returns {boolean}\n   */\n  #isPopoverWithThumbnail(): boolean {\n    return (\n      this.wistiaPopover &&\n      (isNil(this.popoverContent) ||\n        isEmptyString(this.popoverContent) ||\n        this.popoverContent === 'thumbnail')\n    );\n  }\n\n  /**\n   * Do a coin flip to determine if Mux should be enabled\n   * And enable Mux for the player if the coin flip is a win\n   * @returns {Promise<void>}\n   */\n  async #maybeInitializeMux() {\n    if (!this.#_api) {\n      return;\n    }\n\n    const shouldRandomEnableMux = didWinCoinFlip(MUX_PERCENTAGE_TO_ENABLE);\n    const shouldEnableMuxForPlayer =\n      shouldEnableMux(this.#_api, shouldRandomEnableMux) && (isVisitorTrackingEnabled() as boolean);\n\n    const embedType = this.useWebComponent ? 'translated-web-component' : 'web-component';\n\n    if (shouldEnableMuxForPlayer) {\n      const mux = (await dynamicImport('assets/external/wistia-mux.js')) as Mux;\n      mux.init(this.#_api, { embedType });\n\n      this.addEventListener(\n        'visitor-tracking-change',\n        (event: CustomEvent<{ isTrackingEnabled: boolean }>) => {\n          const { isTrackingEnabled } = event.detail;\n\n          if (!isTrackingEnabled) {\n            this.#_api?.mux?.destroy();\n          }\n        },\n      );\n    }\n  }\n\n  #maybeInjectJsonLd() {\n    if (\n      this.seo &&\n      this.#_playerType !== 'notplayable' &&\n      this.#_playerType !== 'passwordprotected' &&\n      this.#_playerType !== 'carouselHardWall'\n    ) {\n      this.#_jsonLdId = `w-json-ld-${this.uniqueId}`;\n      removeInjectedJsonLd(this.#_jsonLdId);\n\n      injectJsonLd(this.#_jsonLdId, this.#_playerData.mediaData, {\n        embedOptions: this.#_playerData.embedOptions,\n        videoHeight: this.offsetHeight,\n        videoWidth: this.offsetWidth,\n      });\n    }\n  }\n\n  #maybeSetupEmbedOptionsFromIframe() {\n    if (!window._inWistiaIframe) {\n      return;\n    }\n    // If we're in an iframe, grab the embed options from the iframe URL now\n    // instead of waiting for insideIframe.coffee to do it - otherwise we won't\n    // have these embed options until after the api has been initialized.\n    const searchParams = new URLSearchParams(window.location.search);\n    const iframeEmbedOptions = Object.fromEntries(searchParams.entries()) as EmbedOptions;\n\n    iframeEmbedOptions.pageTitle = document.title;\n    iframeEmbedOptions._inIframe = true;\n\n    this.#_playerData.setIframeEmbedOptionSource(iframeEmbedOptions);\n  }\n\n  // The LLM-optimized embed is not meant to be long-lived or supported forever.\n  // Once we decide to stop supporting it, we should remove this function.\n  #maybeSetupLLMOptimizedEmbed() {\n    const preloadTranscriptForLLMEmbed = this.querySelector(\n      '.wistia_preload_transcript_outer_wrapper',\n    );\n    if (!preloadTranscriptForLLMEmbed) {\n      return;\n    }\n\n    countMetric('player/initembed.llm-optimized', 1, {\n      href: window.location.href,\n      mediaId: this.mediaId,\n    });\n\n    preloadTranscriptForLLMEmbed.remove();\n    this.captionsEnabled = true;\n  }\n\n  /**\n   * Renders a template for the embed code\n   * @returns {HTMLTemplateElement}\n   */\n  #renderEmbedTemplate() {\n    if (!this.#preactRoot) {\n      return;\n    }\n\n    const { mediaType } = this.#_playerData.mediaData;\n\n    const swatchUrl = getSwatchUrl(this.mediaId, this.embedHost ?? '');\n\n    let swatchHeight = '100%';\n    if (parseFloat(this.#paddingTop) !== 0 && this.#paddingTop !== '') {\n      swatchHeight = `${parseFloat(this.#paddingTop)}px`;\n    }\n\n    const playerBorderRadius = getDefaultPlayerBorderRadius({\n      playerBorderRadius: this.playerBorderRadius,\n      roundedPlayer: this.roundedPlayer,\n    });\n\n    render(\n      <Fragment>\n        <style>\n          {`:host {\n              display: flex;\n              position: relative;\n              width: 100%;\n              ${mediaType === 'Audio' ? `min-height: 45px;` : ''}\n            }`}\n        </style>\n        {this.#shouldDisplaySwatch() && (\n          <div\n            style={{ height: swatchHeight, left: 0, position: 'absolute', top: 0, width: '100%' }}\n            class=\"wistia_swatch\"\n          >\n            <div style={{ height: '100%', position: 'relative', width: '100%' }}>\n              <div\n                style={{\n                  height: '100%',\n                  left: 0,\n                  overflow: 'hidden',\n                  position: 'absolute',\n                  top: 0,\n                  width: '100%',\n                  borderRadius: `${playerBorderRadius}px`,\n                }}\n              >\n                <img\n                  src={swatchUrl}\n                  style={{\n                    filter: 'blur(5px)',\n                    height: '100%',\n                    objectFit: 'contain',\n                    width: '100%',\n                  }}\n                  alt=\"\"\n                  aria-hidden=\"true\"\n                />\n              </div>\n            </div>\n          </div>\n        )}\n        <div\n          ref={(ref) => {\n            this.#preloadThumbnailRoot = ref;\n          }}\n        ></div>\n      </Fragment>,\n      this.#preactRoot,\n    );\n  }\n\n  /**\n   * Renders a progressive thumbnail and a big play button as soon as possible,\n   * while the rest of the player is loading.\n   * @returns {void}\n   */\n  #renderPreloadThumbnail() {\n    if (!this.#preloadThumbnailRoot) {\n      return;\n    }\n\n    const { assets, mediaType, carouselHardWall } = this.#_playerData.mediaData;\n    const { autoPlay, plugin } = this.#_playerData.embedOptions;\n\n    // Don't render the preload thumbnail if we're going to show a carousel hard wall player.\n    if (carouselHardWall) {\n      return;\n    }\n\n    const thumbnailAssets = getThumbnailAssets(assets, {});\n    const willAutoplay = this.autoplay || autoPlay;\n    const hasVideoThumbnail = plugin?.videoThumbnail !== undefined;\n\n    const shouldRenderThumbnail =\n      (!this.wistiaPopover || this.#isPopoverWithThumbnail()) &&\n      mediaType !== 'Audio' &&\n      thumbnailAssets.length > 0 &&\n      !willAutoplay &&\n      !hasVideoThumbnail;\n\n    if (!shouldRenderThumbnail) {\n      return;\n    }\n\n    render(\n      <PlayerDataProvider\n        embedOptions={this.#_playerData.embedOptions}\n        mediaData={this.#_playerData.mediaData}\n      >\n        <PreloadThumbnail\n          mediaId={this.mediaId}\n          playerType={this.playerForce ?? this.#_playerType}\n          playerWidth={this.offsetWidth}\n          isPlayPending={this.#playPending}\n        ></PreloadThumbnail>\n      </PlayerDataProvider>,\n      this.#preloadThumbnailRoot,\n    );\n  }\n\n  /**\n   * Runs any methods associated with set attributes when the element is connected to the DOM\n   * @returns {void}\n   * @private\n   */\n  #runMethodsFromAttributes(): void {\n    // We have to wait until the api is ready to set the current time\n    if (this.#getValueFromAttribute('current-time') !== null) {\n      this.whenApiReady()\n        .then(() => {\n          const newTime = Number(this.#getValueFromAttribute('current-time'));\n\n          const isClosedPopover = (this.#_api?.popover && !this.#_api.popover.isVisible()) ?? false;\n          const isMobile = detectIsMobile() as unknown as boolean;\n          const shouldDelayUntilPlay = this.state !== 'playing' && (isMobile || isClosedPopover);\n\n          void this.#_impl?.time(newTime, { lazy: shouldDelayUntilPlay });\n          this.#setSyncedEmbedOption('currentTime', newTime);\n        })\n        // eslint-disable-next-line @typescript-eslint/no-empty-function\n        .catch((_error: unknown) => {});\n    }\n\n    if (this.#getValueFromAttribute('email') !== null) {\n      this.#updateEmail(this.#getValueFromAttribute('email') as string);\n    }\n\n    if (this.#getValueFromAttribute('video-quality') !== null) {\n      this.whenApiReady()\n        .then(() => {\n          const newQuality = this.#getValueFromAttribute('video-quality') as number | 'auto';\n\n          this.#_impl?.setVideoQuality(newQuality);\n          this.#setSyncedEmbedOption('videoQuality', newQuality);\n        })\n        // eslint-disable-next-line @typescript-eslint/no-empty-function\n        .catch((_error: unknown) => {});\n    }\n  }\n\n  /**\n   * Saves the initial attributes from the DOM to a store so the public api can use them\n   * @returns {void}\n   * @private\n   */\n  #saveInitialAttributesFromDomOptions(): void {\n    const domOptions = Object.fromEntries(\n      Object.entries(this.attributes).map(([, value]) => [\n        kebabCaseToCamelCase(value.name),\n        this.#getValueFromAttribute(value.name),\n      ]),\n    );\n\n    this.#_playerData.setDomEmbedOptionSource(domOptions);\n\n    // The public api uses this store when it gathers options from our many different sources\n    setEmbedOptionStore(`__${this.uniqueId}_dom_options__`, this.#_playerData.embedOptions);\n  }\n\n  /**\n   * Takes an object of embed options and sets both the value of an\n   * embed option from the public api and the value of an embed option\n   * saved on this element.\n   *\n   * For now, the public api is the source of truth for embed options.\n   * However, this will change in the future. We also need a non-public\n   * api source for embed options so we can use them before the public\n   * api is ready.\n   * @param {Partial<EmbedOptions>} options - Object of embed options\n   * @returns {void}\n   */\n  #setMultipleSyncedEmbedOptions(options: Partial<EmbedOptions>): void {\n    Object.entries(options).forEach((entry) => {\n      const [key, value] = entry;\n      // The TypeScript compiler is complaining because it thinks the value can never be undefined\n      // based on the type definition, but we're being defensive here\n      if (value == null) {\n        return;\n      }\n\n      // If the embed option has a setter, use that. Our setters call #setSyncedEmbedOption\n      // which will update the public api and the embed option store, and importantly they\n      // *also* run any specific functions that are needed for that embed option.\n      if (Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this), key)?.set) {\n        this[key] = value;\n      } else {\n        // Otherwise, we'll just run #setSyncedEmbedOption directly\n        this.#setSyncedEmbedOption(\n          key,\n          value as Authorization | Gradient | boolean | number | string,\n        );\n      }\n    });\n  }\n\n  /**\n   * Sets both the value of an embed option from the public api\n   * and the value of an embed option saved on this element.\n   *\n   * For now, the public api is the source of truth for embed options.\n   * However, this will change in the future. We also need a non-public\n   * api source for embed options so we can use them before the public\n   * api is ready.\n   * @param {string} key - Name of the embed option\n   * @param {boolean | number | string} value - Value of the embed option\n   * @returns {void}\n   */\n  #setSyncedEmbedOption(\n    key: string,\n    value: Authorization | Gradient | boolean | number | string,\n  ): void {\n    // eslint-disable-next-line @typescript-eslint/no-base-to-string\n    this.#_logger.info(`set ${key}`, value.toString());\n\n    if (this.#_impl) {\n      this.#_impl._attrs[key] = value;\n    }\n    this.#_playerData.updateEmbedOptionOverrides({ [key]: value });\n\n    // Updates our PlayerDataProvider and re-renders the thumbnail with the new embed option\n    this.#renderPreloadThumbnail();\n  }\n\n  #setupEventListeners(): void {\n    const loadedMediaDataCallback = (event: LOADED_MEDIA_DATA_EVENT_TYPE) => {\n      this.#updateMediaData(event.detail.mediaData);\n    };\n\n    const implCreatedCallback = (event: IMPL_CREATED_EVENT_TYPE) => {\n      this.#_impl = event.detail.impl;\n    };\n\n    this.addEventListener(LOADED_MEDIA_DATA_EVENT, loadedMediaDataCallback);\n    this.addEventListener(IMPL_CREATED_EVENT, implCreatedCallback);\n\n    this.#_removeEventListeners.push(\n      () => {\n        this.removeEventListener(LOADED_MEDIA_DATA_EVENT, loadedMediaDataCallback);\n      },\n      () => {\n        this.removeEventListener(IMPL_CREATED_EVENT, implCreatedCallback);\n      },\n    );\n    this.addEventListener('click', this.#handlePreloadThumbnailClick, {\n      once: true,\n    });\n  }\n\n  /**\n   * Determines if a swatch should be displayed based on the embed options\n   * @returns {boolean}\n   */\n  #shouldDisplaySwatch(): boolean {\n    // If this is a popover and it renders a thumbnail in its container, we'll want to show a swatch\n    return this.swatch !== false && (!this.wistiaPopover || this.#isPopoverWithThumbnail());\n  }\n\n  /**\n   * Saves new email within localstorage and dispatches an emailchange event\n   * @param {string} email - The new email\n   * @returns {void}\n   * @emits {EmailChangeEventData}\n   * @private\n   */\n  #updateEmail(email: string): void {\n    updateWistiaLocalStorage((localStorage: WistiaLocalStorage) => {\n      // eslint-disable-next-line no-param-reassign\n      localStorage[this.#pageUrl] = {\n        ...localStorage[this.#pageUrl],\n        trackEmail: email,\n      };\n    });\n    this.dispatchEvent(\n      new CustomEvent<EmailChangeEventData>('emailchange', {\n        detail: { email },\n      }),\n    );\n  }\n\n  /**\n   * Called when we have new mediadata for the player\n   * @param {MediaData} mediaData\n   * @returns {void}\n   * @private\n   */\n  #updateMediaData(mediaData: MediaData): void {\n    if (isMediaDataError(mediaData)) {\n      // Return early to avoid errors since the rest of the code assumes a\n      // MediaData object.\n      return;\n    }\n\n    this.#_playerData.setMediaDataSource(mediaData);\n\n    this.#_playerType = choosePlayer(\n      this.#_judyContext,\n      this.#_playerData.mediaData,\n      this.#_playerData.embedOptions,\n    ) as Players;\n\n    this.#renderPreloadThumbnail();\n  }\n}\n\n/**\n * Takes an image url (swatch) and returns the image metadata\n * @param {string} url\n * @returns {Promise<HTMLImageElement>}\n */\nconst getSwatchMetaData = async (url: string) => {\n  const swatch = new Image();\n  swatch.src = url;\n  await swatch.decode();\n  return swatch;\n};\n\n/**\n * Takes a media id and returns a swatch style element once we\n * have the swatch image metadata to calculate the aspect ratio\n * @param {string} mediaId\n * @returns {Promise<HTMLStyleElement>}\n */\nexport const wistiaSwatchElement = async (\n  mediaId: string,\n  embedHost?: string,\n): Promise<HTMLStyleElement> => {\n  const swatchUrl = getSwatchUrl(mediaId, embedHost);\n\n  const swatchImg = await getSwatchMetaData(swatchUrl);\n  const { naturalHeight, naturalWidth } = swatchImg;\n  const ratio = (naturalHeight / naturalWidth) * 100;\n\n  const style = document.createElement('style');\n  style.innerHTML = `\n    wistia-player[media-id='${mediaId}']:not(:defined) {\n      padding: ${ratio}% 0 0 0;\n      background: url(${swatchUrl});\n      background-size: contain;\n      filter: blur(5px);\n      display: block;\n    }\n  `;\n  return style;\n};\n\nif (customElements.get('wistia-player') === undefined) {\n  customElements.define('wistia-player', WistiaPlayer);\n}\n\ndeclare global {\n  interface HTMLElementTagNameMap {\n    'wistia-player': WistiaPlayer;\n  }\n\n  interface GlobalEventHandlersEventMap {\n    [AFTER_REPLACE_EVENT]: WistiaPlayerEvents[typeof AFTER_REPLACE_EVENT];\n    [API_READY_EVENT]: WistiaPlayerEvents[typeof API_READY_EVENT];\n    [BEFORE_REPLACE_EVENT]: WistiaPlayerEvents[typeof BEFORE_REPLACE_EVENT];\n    [INPUT_CONTEXT_CHANGE_EVENT]: WistiaPlayerEvents[typeof INPUT_CONTEXT_CHANGE_EVENT];\n    [LOADED_MEDIA_DATA_EVENT]: WistiaPlayerEvents[typeof LOADED_MEDIA_DATA_EVENT];\n    [MUTE_CHANGE_EVENT]: WistiaPlayerEvents[typeof MUTE_CHANGE_EVENT];\n  }\n}\n\ntype WistiaPlayerHTMLAttributes = HTMLAttributes<WistiaPlayer> &\n  Partial<\n    Pick<\n      WistiaPlayer,\n      | 'aspect'\n      | 'bigPlayButton'\n      | 'branding'\n      | 'doNotTrack'\n      | 'embedHost'\n      | 'playerColor'\n      | 'playerColorGradient'\n      | 'roundedPlayer'\n      | 'swatch'\n    >\n  > &\n  Pick<WistiaPlayer, 'mediaId'>;\n\ndeclare module 'preact/src/jsx' {\n  // eslint-disable-next-line @typescript-eslint/no-namespace\n  namespace JSXInternal {\n    interface IntrinsicElements {\n      'wistia-player': WistiaPlayerHTMLAttributes;\n    }\n  }\n}\n"]}