import{kD as A,d3 as C}from"./index-Cq8aT7Ma.js";import{C as h}from"./custom-media-element-Ce0vsE-t.js";class L extends h{static shadowRootOptions={...h.shadowRootOptions};static getTemplateHTML=i=>{const{src:n,...s}=i;return h.getTemplateHTML(s)};#t;attributeChangedCallback(i,n,s){i!=="src"&&super.attributeChangedCallback(i,n,s),i==="src"&&n!=s&&this.load()}async load(){if(this.#t)this.api.attachSource(this.src);else{this.#t=!0;const i=await A(()=>import("./dash.all.min-C1mu-HkH.js"),[],import.meta.url);this.api=i.MediaPlayer().create(),this.api.initialize(this.nativeEl,this.src,this.autoplay)}}}globalThis.customElements&&!globalThis.customElements.get("dash-video")&&globalThis.customElements.define("dash-video",L);var N=L,O=new Set(["style","children","ref","key","suppressContentEditableWarning","suppressHydrationWarning","dangerouslySetInnerHTML"]),S={className:"class",htmlFor:"for"};function M(t){return t.toLowerCase()}function _(t){if(typeof t=="boolean")return t?"":void 0;if(typeof t!="function"&&!(typeof t=="object"&&t!==null))return t}function I({react:t,tagName:i,elementClass:n,events:s,displayName:P,defaultProps:k,toAttributeName:H=M,toAttributeValue:R=_}){const v=Number.parseInt(t.version)>=19,y=t.forwardRef((b,d)=>{var T,E;const a=t.useRef(null),p=t.useRef(new Map),m={},g={},l={},f={};for(const[e,o]of Object.entries(b)){if(O.has(e)){l[e]=o;continue}const r=H(S[e]??e);if(e in n.prototype&&!(e in(((T=globalThis.HTMLElement)==null?void 0:T.prototype)??{}))&&!((E=n.observedAttributes)!=null&&E.some(c=>c===r))){f[e]=o;continue}if(e.startsWith("on")){m[e]=o;continue}const u=R(o);if(r&&u!=null&&(g[r]=String(u),v||(l[r]=u)),r&&v){const c=_(o);u!==c?l[r]=u:l[r]=o}}if(typeof window<"u"){for(const e in m){const o=m[e],r=e.endsWith("Capture"),u=(s?.[e]??e.slice(2).toLowerCase()).slice(0,r?-7:void 0);t.useLayoutEffect(()=>{const c=a?.current;if(!(!c||typeof o!="function"))return c.addEventListener(u,o,r),()=>{c.removeEventListener(u,o,r)}},[a?.current,o])}t.useLayoutEffect(()=>{if(a.current===null)return;const e=new Map;for(const o in f)w(a.current,o,f[o]),p.current.delete(o),e.set(o,f[o]);for(const[o,r]of p.current)w(a.current,o,void 0);p.current=e})}if(typeof window>"u"&&n?.getTemplateHTML&&n?.shadowRootOptions){const{mode:e,delegatesFocus:o}=n.shadowRootOptions,r=t.createElement("template",{shadowrootmode:e,shadowrootdelegatesfocus:o,dangerouslySetInnerHTML:{__html:n.getTemplateHTML(g,b)}});l.children=[r,l.children]}return t.createElement(i,{...k,...l,ref:t.useCallback(e=>{a.current=e,typeof d=="function"?d(e):d!==null&&(d.current=e)},[d])})});return y.displayName=P??n.name,y}function w(t,i,n){var s;t[i]=n,n==null&&i in(((s=globalThis.HTMLElement)==null?void 0:s.prototype)??{})&&t.removeAttribute(i)}var F=I({react:C,tagName:"dash-video",elementClass:N,toAttributeName(t){return t==="muted"?"":t==="defaultMuted"?"muted":M(t)}});/*! Bundled license information:

ce-la-react/dist/ce-la-react.js:
  (**
   * @license
   * Copyright 2018 Google LLC
   * SPDX-License-Identifier: BSD-3-Clause
   *
   * Modified version of `@lit/react` for vanilla custom elements with support for SSR.
   *)
*/export{F as default};
