classicy 0.5.8 → 0.5.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/395.index.js ADDED
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 395.index.js.LICENSE.txt */
2
+ export const __webpack_id__=395;export const __webpack_ids__=[395];export const __webpack_modules__={1121:(t,e,i)=>{i.d(e,{lB:()=>c});const n=["abort","canplay","canplaythrough","durationchange","emptied","encrypted","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting","waitingforkey","resize","enterpictureinpicture","leavepictureinpicture","webkitbeginfullscreen","webkitendfullscreen","webkitpresentationmodechanged"],s=["autopictureinpicture","disablepictureinpicture","disableremoteplayback","autoplay","controls","controlslist","crossorigin","loop","muted","playsinline","poster","preload","src"];function o(t){return`\n <style>\n :host {\n display: inline-flex;\n line-height: 0;\n flex-direction: column;\n justify-content: end;\n }\n\n audio {\n width: 100%;\n }\n </style>\n <slot name="media">\n <audio${l(t)}></audio>\n </slot>\n <slot></slot>\n `}function a(t){return`\n <style>\n :host {\n display: inline-block;\n line-height: 0;\n }\n\n video {\n max-width: 100%;\n max-height: 100%;\n min-width: 100%;\n min-height: 100%;\n object-fit: var(--media-object-fit, contain);\n object-position: var(--media-object-position, 50% 50%);\n }\n\n video::-webkit-media-text-track-container {\n transform: var(--media-webkit-text-track-transform);\n transition: var(--media-webkit-text-track-transition);\n }\n </style>\n <slot name="media">\n <video${l(t)}></video>\n </slot>\n <slot></slot>\n `}function r(t,{tag:e,is:i}){const r=globalThis.document?.createElement?.(e,{is:i}),l=r?function(t){const e=[];for(let i=Object.getPrototypeOf(t);i&&i!==HTMLElement.prototype;i=Object.getPrototypeOf(i)){const t=Object.getOwnPropertyNames(i);e.push(...t)}return e}(r):[];return class c extends t{static getTemplateHTML=e.endsWith("audio")?o:a;static shadowRootOptions={mode:"open"};static Events=n;static#t=!1;static get observedAttributes(){return c.#e(),[...r?.constructor?.observedAttributes??[],...s]}static#e(){if(this.#t)return;this.#t=!0;const t=new Set(this.observedAttributes);t.delete("muted");for(const e of l)if(!(e in this.prototype))if("function"==typeof r[e])this.prototype[e]=function(...t){return this.#i(),(()=>{if(this.call)return this.call(e,...t);const i=this.nativeEl?.[e];return i?.apply(this.nativeEl,t)})()};else{const i={get(){this.#i();const i=e.toLowerCase();if(t.has(i)){const t=this.getAttribute(i);return null!==t&&(""===t||t)}return this.get?.(e)??this.nativeEl?.[e]}};e!==e.toUpperCase()&&(i.set=function(i){this.#i();const n=e.toLowerCase();t.has(n)?!0===i||!1===i||null==i?this.toggleAttribute(n,Boolean(i)):this.setAttribute(n,i):this.set?this.set(e,i):this.nativeEl&&(this.nativeEl[e]=i)}),Object.defineProperty(this.prototype,e,i)}}#n=!1;#s=null;#o=new Map;#a;get;set;call;get nativeEl(){return this.#i(),this.#s??this.querySelector(":scope > [slot=media]")??this.querySelector(e)??this.shadowRoot?.querySelector(e)??null}set nativeEl(t){this.#s=t}get defaultMuted(){return this.hasAttribute("muted")}set defaultMuted(t){this.toggleAttribute("muted",t)}get src(){return this.getAttribute("src")}set src(t){this.setAttribute("src",`${t}`)}get preload(){return this.getAttribute("preload")??this.nativeEl?.preload}set preload(t){this.setAttribute("preload",`${t}`)}#i(){this.#n||(this.#n=!0,this.init())}init(){if(!this.shadowRoot){this.attachShadow({mode:"open"});const t=function(t){const e={};for(const i of t)e[i.name]=i.value;return e}(this.attributes);i&&(t.is=i),e&&(t.part=e),this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(t)}this.nativeEl.muted=this.hasAttribute("muted");for(const t of l)this.#r(t);this.#a=new MutationObserver(this.#l.bind(this)),this.shadowRoot.addEventListener("slotchange",()=>this.#c()),this.#c();for(const t of this.constructor.Events)this.shadowRoot.addEventListener(t,this,!0)}handleEvent(t){t.target===this.nativeEl&&this.dispatchEvent(new CustomEvent(t.type,{detail:t.detail}))}#c(){const t=new Map(this.#o),e=this.shadowRoot?.querySelector("slot:not([name])"),i=e?.assignedElements({flatten:!0}).filter(t=>["track","source"].includes(t.localName));i.forEach(e=>{t.delete(e);let i=this.#o.get(e);i||(i=e.cloneNode(),this.#o.set(e,i),this.#a?.observe(e,{attributes:!0})),this.nativeEl?.append(i),this.#d(i)}),t.forEach((t,e)=>{t.remove(),this.#o.delete(e)})}#l(t){for(const e of t)if("attributes"===e.type){const{target:t,attributeName:i}=e,n=this.#o.get(t);n&&i&&(n.setAttribute(i,t.getAttribute(i)??""),this.#d(n))}}#d(t){t&&"track"===t.localName&&t.default&&("chapters"===t.kind||"metadata"===t.kind)&&"disabled"===t.track.mode&&(t.track.mode="hidden")}#r(t){if(Object.prototype.hasOwnProperty.call(this,t)){const e=this[t];delete this[t],this[t]=e}}attributeChangedCallback(t,e,i){this.#i(),this.#u(t,e,i)}#u(t,e,i){["id","class"].includes(t)||!c.observedAttributes.includes(t)&&this.constructor.observedAttributes.includes(t)||(null===i?this.nativeEl?.removeAttribute(t):this.nativeEl?.getAttribute(t)!==i&&this.nativeEl?.setAttribute(t,i))}connectedCallback(){this.#i()}}}function l(t){let e="";for(const i in t){if(!s.includes(i))continue;const n=t[i];e+=""===n?` ${i}`:` ${i}="${n}"`}return e}const c=r(globalThis.HTMLElement??class{},{tag:"video"});r(globalThis.HTMLElement??class{},{tag:"audio"})},6517:(t,e,i)=>{i.r(e),i.d(e,{default:()=>h});var n=i(6540),s=i(1121);class o extends s.lB{static shadowRootOptions={...s.lB.shadowRootOptions};static getTemplateHTML=t=>{const{src:e,...i}=t;return s.lB.getTemplateHTML(i)};#h;attributeChangedCallback(t,e,i){"src"!==t&&super.attributeChangedCallback(t,e,i),"src"===t&&e!=i&&this.load()}async load(){if(this.#h)this.api.attachSource(this.src);else{this.#h=!0;const t=await i.e(303).then(i.bind(i,303));this.api=t.MediaPlayer().create(),this.api.initialize(this.nativeEl,this.src,this.autoplay)}}}globalThis.customElements&&!globalThis.customElements.get("dash-video")&&globalThis.customElements.define("dash-video",o);var a=o,r=new Set(["style","children","ref","key","suppressContentEditableWarning","suppressHydrationWarning","dangerouslySetInnerHTML"]),l={className:"class",htmlFor:"for"};function c(t){return t.toLowerCase()}function d(t){return"boolean"==typeof t?t?"":void 0:"function"==typeof t||"object"==typeof t&&null!==t?void 0:t}function u(t,e,i){var n;t[e]=i,null==i&&e in((null==(n=globalThis.HTMLElement)?void 0:n.prototype)??{})&&t.removeAttribute(e)}var h=function({react:t,tagName:e,elementClass:i,events:n,displayName:s,defaultProps:o,toAttributeName:a=c,toAttributeValue:h=d}){const p=Number.parseInt(t.version)>=19,f=t.forwardRef((s,c)=>{var f,b;const m=t.useRef(null),v=t.useRef(new Map),g={},y={},w={},E={};for(const[t,e]of Object.entries(s)){if(r.has(t)){w[t]=e;continue}const n=a(l[t]??t);if(t in i.prototype&&!(t in((null==(f=globalThis.HTMLElement)?void 0:f.prototype)??{}))&&!(null==(b=i.observedAttributes)?void 0:b.some(t=>t===n))){E[t]=e;continue}if(t.startsWith("on")){g[t]=e;continue}const s=h(e);if(n&&null!=s&&(y[n]=String(s),p||(w[n]=s)),n&&p){const t=d(e);w[n]=s!==t?s:e}}if("undefined"!=typeof window){for(const e in g){const i=g[e],s=e.endsWith("Capture"),o=((null==n?void 0:n[e])??e.slice(2).toLowerCase()).slice(0,s?-7:void 0);t.useLayoutEffect(()=>{const t=null==m?void 0:m.current;if(t&&"function"==typeof i)return t.addEventListener(o,i,s),()=>{t.removeEventListener(o,i,s)}},[null==m?void 0:m.current,i])}t.useLayoutEffect(()=>{if(null===m.current)return;const t=new Map;for(const e in E)u(m.current,e,E[e]),v.current.delete(e),t.set(e,E[e]);for(const[t,e]of v.current)u(m.current,t,void 0);v.current=t})}if("undefined"==typeof window&&(null==i?void 0:i.getTemplateHTML)&&(null==i?void 0:i.shadowRootOptions)){const{mode:e,delegatesFocus:n}=i.shadowRootOptions,o=t.createElement("template",{shadowrootmode:e,shadowrootdelegatesfocus:n,dangerouslySetInnerHTML:{__html:i.getTemplateHTML(y,s)}});w.children=[o,w.children]}return t.createElement(e,{...o,...w,ref:t.useCallback(t=>{m.current=t,"function"==typeof c?c(t):null!==c&&(c.current=t)},[c])})});return f.displayName=s??i.name,f}({react:n,tagName:"dash-video",elementClass:a,toAttributeName:t=>"muted"===t?"":"defaultMuted"===t?"muted":c(t)})}};
@@ -0,0 +1,11 @@
1
+ /*! Bundled license information:
2
+
3
+ ce-la-react/dist/ce-la-react.js:
4
+ (**
5
+ * @license
6
+ * Copyright 2018 Google LLC
7
+ * SPDX-License-Identifier: BSD-3-Clause
8
+ *
9
+ * Modified version of `@lit/react` for vanilla custom elements with support for SSR.
10
+ *)
11
+ */
package/42.index.js ADDED
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 42.index.js.LICENSE.txt */
2
+ export const __webpack_id__=42;export const __webpack_ids__=[42];export const __webpack_modules__={2682:(t,e,n)=>{n.r(e),n.d(e,{default:()=>b});var s=n(6540);const o="https://player.twitch.tv",i=/(?:www\.|go\.)?twitch\.tv\/(?:videos?\/|\?video=)(\d+)($|\?)/,a=/(?:www\.|go\.)?twitch\.tv\/([a-zA-Z0-9_]+)($|\?)/;function r(t,e={}){const n={src:l(t,e),frameborder:"0",width:"100%",height:"100%",allow:"accelerometer; fullscreen; autoplay; encrypted-media; picture-in-picture;",sandbox:"allow-modals allow-scripts allow-same-origin allow-popups allow-popups-to-escape-sandbox",scrolling:"no"};return e.config&&(n["data-config"]=JSON.stringify(e.config)),`\n <style>\n :host {\n display: inline-block;\n min-width: 300px;\n min-height: 150px;\n position: relative;\n }\n iframe {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n }\n :host(:not([controls])) {\n pointer-events: none;\n }\n </style>\n <iframe${function(t){let e="";for(const n in t){const s=t[n];e+=""===s?` ${d(n)}`:` ${d(n)}="${d(`${s}`)}"`}return e}(n)}></iframe>\n `}function l(t,e){var n;if(!t.src)return;const s=t.src.match(i),r=t.src.match(a),l={parent:null==(n=globalThis.location)?void 0:n.hostname,controls:""===t.controls&&null,autoplay:""===t.autoplay&&null,muted:t.muted,preload:t.preload,...e.config};if(s){const t=s[1];return`${o}/?video=v${t}&${c(l)}`}if(r){const t=r[1];return`${o}/?channel=${t}&${c(l)}`}return""}class u extends(globalThis.HTMLElement??class{}){static getTemplateHTML=r;static shadowRootOptions={mode:"open"};static observedAttributes=["autoplay","controls","loop","muted","playsinline","preload","src"];loadComplete=new h;#t;#e;#n;#s={};#o=0;#i=!1;#a=1;#r=!this.autoplay;#l=!1;#u=0;#d=null;constructor(){super(),this.#c("config")}get config(){return this.#d}set config(t){this.#d=t}async load(){if(this.#t)return;this.shadowRoot||this.attachShadow({mode:"open"});const t=!this.#e;if(this.#e&&(this.loadComplete=new h),this.#e=!0,await(this.#t=Promise.resolve()),this.#t=null,this.#u=0,this.dispatchEvent(new Event("emptied")),!this.src)return this.shadowRoot.innerHTML="",void globalThis.removeEventListener("message",this.#h);this.dispatchEvent(new Event("loadstart"));let e=this.shadowRoot.querySelector("iframe");const n=function(t){let e={};for(let n of t)e[n.name]=n.value;return e}(this.attributes);t&&e&&(this.#d=JSON.parse(e.getAttribute("data-config")||"{}")),(null==e?void 0:e.src)&&e.src===l(n,this)||(this.shadowRoot.innerHTML=r(n,this),e=this.shadowRoot.querySelector("iframe")),this.#n=e,globalThis.addEventListener("message",this.#h)}attributeChangedCallback(t,e,n){if(e!==n)switch(t){case"src":case"controls":this.load()}}get src(){return this.getAttribute("src")}set src(t){this.setAttribute("src",t)}get readyState(){return this.#u}get seeking(){return this.#l}get buffered(){var t,e,n;return n=(null==(e=null==(t=this.#s.stats)?void 0:t.videoStats)?void 0:e.bufferSize)??0,Array.isArray(0)?p(0):p(null==n||0===n?[[0,0]]:[[0,n]])}get paused(){return this.#s.playback?"Idle"===this.#s.playback:this.#r}get ended(){return!!this.#s.playback&&"Ended"===this.#s.playback}get duration(){return this.#s.duration??NaN}get autoplay(){return this.hasAttribute("autoplay")}set autoplay(t){this.autoplay!=t&&this.toggleAttribute("autoplay",Boolean(t))}get controls(){return this.hasAttribute("controls")}set controls(t){this.controls!=t&&this.toggleAttribute("controls",Boolean(t))}get currentTime(){return this.#s.currentTime?this.#s.currentTime:this.#o}set currentTime(t){this.#o=t,this.loadComplete.then(()=>{this.#p(4,t)})}get defaultMuted(){return this.hasAttribute("muted")}set defaultMuted(t){this.toggleAttribute("muted",Boolean(t))}get loop(){return this.hasAttribute("loop")}set loop(t){this.toggleAttribute("loop",Boolean(t))}get muted(){return this.#i}set muted(t){this.#i=t,this.loadComplete.then(()=>{this.#p(10,t)})}get volume(){return this.#a}set volume(t){this.#a=t,this.loadComplete.then(()=>{this.#p(11,t)})}get playsInline(){return this.hasAttribute("playsinline")}set playsInline(t){this.toggleAttribute("playsinline",Boolean(t))}play(){this.#r=!1,this.#p(3)}pause(){this.#r=!0,this.#p(2)}#h=async t=>{var e,n,s,o;if(!this.#n.contentWindow)return;const{data:i,source:a}=t;if(a===this.#n.contentWindow)if("twitch-embed"===i.namespace)await new Promise(t=>setTimeout(t,10)),"ready"===i.eventName?(this.dispatchEvent(new Event("loadcomplete")),this.loadComplete.resolve(),this.#u=1,this.dispatchEvent(new Event("loadedmetadata"))):"seek"===i.eventName?(this.#l=!0,this.dispatchEvent(new Event("seeking"))):"playing"===i.eventName?(this.#l&&(this.#l=!1,this.dispatchEvent(new Event("seeked"))),this.#u=3,this.dispatchEvent(new Event("playing"))):this.dispatchEvent(new Event(i.eventName));else if("twitch-embed-player-proxy"===i.namespace&&"UPDATE_STATE"===i.eventName){const t=this.#s.duration,a=this.#s.currentTime,r=this.#s.volume,l=this.#s.muted,u=null==(n=null==(e=this.#s.stats)?void 0:e.videoStats)?void 0:n.bufferSize;this.#s={...this.#s,...i.params},t!==this.#s.duration&&this.dispatchEvent(new Event("durationchange")),a!==this.#s.currentTime&&this.dispatchEvent(new Event("timeupdate")),r===this.#s.volume&&l===this.#s.muted||this.dispatchEvent(new Event("volumechange")),u!==(null==(o=null==(s=this.#s.stats)?void 0:s.videoStats)?void 0:o.bufferSize)&&this.dispatchEvent(new Event("progress"))}};#p(t,e){if(!this.#n.contentWindow)return;const n={eventName:t,params:e,namespace:"twitch-embed-player-proxy"};this.#n.contentWindow.postMessage(n,o)}#c(t){if(Object.prototype.hasOwnProperty.call(this,t)){const e=this[t];delete this[t],this[t]=e}}}function d(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/`/g,"&#x60;")}function c(t){return String(new URLSearchParams(function(t){let e={};for(let n in t){let s=t[n];!0===s||""===s?e[n]=!0:!1===s?e[n]=!1:null!=s&&(e[n]=s)}return e}(t)))}class h extends Promise{constructor(t=()=>{}){let e,n;super((s,o)=>{t(s,o),e=s,n=o}),this.resolve=e,this.reject=n}}function p(t){return Object.defineProperties(t,{start:{value:e=>t[e][0]},end:{value:e=>t[e][1]}}),t}globalThis.customElements&&!globalThis.customElements.get("twitch-video")&&globalThis.customElements.define("twitch-video",u);var m=u,f=new Set(["style","children","ref","key","suppressContentEditableWarning","suppressHydrationWarning","dangerouslySetInnerHTML"]),g={className:"class",htmlFor:"for"};function v(t){return t.toLowerCase()}function y(t){return"boolean"==typeof t?t?"":void 0:"function"==typeof t||"object"==typeof t&&null!==t?void 0:t}function w(t,e,n){var s;t[e]=n,null==n&&e in((null==(s=globalThis.HTMLElement)?void 0:s.prototype)??{})&&t.removeAttribute(e)}var b=function({react:t,tagName:e,elementClass:n,events:s,displayName:o,defaultProps:i,toAttributeName:a=v,toAttributeValue:r=y}){const l=Number.parseInt(t.version)>=19,u=t.forwardRef((o,u)=>{var d,c;const h=t.useRef(null),p=t.useRef(new Map),m={},v={},b={},S={};for(const[t,e]of Object.entries(o)){if(f.has(t)){b[t]=e;continue}const s=a(g[t]??t);if(t in n.prototype&&!(t in((null==(d=globalThis.HTMLElement)?void 0:d.prototype)??{}))&&!(null==(c=n.observedAttributes)?void 0:c.some(t=>t===s))){S[t]=e;continue}if(t.startsWith("on")){m[t]=e;continue}const o=r(e);if(s&&null!=o&&(v[s]=String(o),l||(b[s]=o)),s&&l){const t=y(e);b[s]=o!==t?o:e}}if("undefined"!=typeof window){for(const e in m){const n=m[e],o=e.endsWith("Capture"),i=((null==s?void 0:s[e])??e.slice(2).toLowerCase()).slice(0,o?-7:void 0);t.useLayoutEffect(()=>{const t=null==h?void 0:h.current;if(t&&"function"==typeof n)return t.addEventListener(i,n,o),()=>{t.removeEventListener(i,n,o)}},[null==h?void 0:h.current,n])}t.useLayoutEffect(()=>{if(null===h.current)return;const t=new Map;for(const e in S)w(h.current,e,S[e]),p.current.delete(e),t.set(e,S[e]);for(const[t,e]of p.current)w(h.current,t,void 0);p.current=t})}if("undefined"==typeof window&&(null==n?void 0:n.getTemplateHTML)&&(null==n?void 0:n.shadowRootOptions)){const{mode:e,delegatesFocus:s}=n.shadowRootOptions,i=t.createElement("template",{shadowrootmode:e,shadowrootdelegatesfocus:s,dangerouslySetInnerHTML:{__html:n.getTemplateHTML(v,o)}});b.children=[i,b.children]}return t.createElement(e,{...i,...b,ref:t.useCallback(t=>{h.current=t,"function"==typeof u?u(t):null!==u&&(u.current=t)},[u])})});return u.displayName=o??n.name,u}({react:s,tagName:"twitch-video",elementClass:m,toAttributeName:t=>"muted"===t?"":"defaultMuted"===t?"muted":v(t)})}};
@@ -0,0 +1,11 @@
1
+ /*! Bundled license information:
2
+
3
+ ce-la-react/dist/ce-la-react.js:
4
+ (**
5
+ * @license
6
+ * Copyright 2018 Google LLC
7
+ * SPDX-License-Identifier: BSD-3-Clause
8
+ *
9
+ * Modified version of `@lit/react` for vanilla custom elements with support for SSR.
10
+ *)
11
+ */
package/446.index.js ADDED
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 446.index.js.LICENSE.txt */
2
+ export const __webpack_id__=446;export const __webpack_ids__=[446];export const __webpack_modules__={4808:(e,t,s)=>{s.r(t),s.d(t,{default:()=>k});var n=s(6540);const i=/(?:youtu\.be\/|youtube(?:-nocookie)?\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=|shorts\/|live\/))((\w|-){11})/,o=/(?:youtu\.be\/|youtube(?:-nocookie)?\.com\/.*?[?&]list=)([\w_-]+)/;function a(e,t={}){const s={src:r(e,t),frameborder:0,width:"100%",height:"100%",allow:"accelerometer; fullscreen; autoplay; encrypted-media; gyroscope; picture-in-picture"};return t.config&&(s["data-config"]=JSON.stringify(t.config)),`\n <style>\n :host {\n display: inline-block;\n line-height: 0;\n position: relative;\n min-width: 300px;\n min-height: 150px;\n }\n iframe {\n position: absolute;\n top: 0;\n left: 0;\n }\n </style>\n <iframe${function(e){let t="";for(const s in e){const n=e[s];t+=""===n?` ${u(s)}`:` ${u(s)}="${u(`${n}`)}"`}return t}(s)}></iframe>\n `}function r(e,t){if(!e.src)return;const s=e.src.includes("-nocookie")?"https://www.youtube-nocookie.com/embed":"https://www.youtube.com/embed",n={controls:""===e.controls?null:0,autoplay:e.autoplay,loop:e.loop,mute:e.muted,playsinline:e.playsinline,preload:e.preload??"metadata",enablejsapi:1,showinfo:0,rel:0,iv_load_policy:3,modestbranding:1,...t.config};if(i.test(e.src)){const t=e.src.match(i);return`${s}/${t&&t[1]}?${d(n)}`}const a=e.src.match(o);return`${s}?${d({listType:"playlist",list:a&&a[1],...n})}`}class l extends(globalThis.HTMLElement??class{}){static getTemplateHTML=a;static shadowRootOptions={mode:"open"};static observedAttributes=["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src"];loadComplete=new p;#e;#t;#s=0;#n=!1;#i;isLoaded=!1;#o=null;#a=null;constructor(){super(),this.#r("config")}get config(){return this.#a}set config(e){this.#a=e}async load(){if(this.#e)return;this.shadowRoot||this.attachShadow({mode:"open"});const e=!this.#t;this.#t&&(this.loadComplete=new p,this.isLoaded=!1),this.#t=!0,await(this.#e=Promise.resolve()),this.#e=null,this.#s=0,this.dispatchEvent(new Event("emptied"));let t=this.api;if(this.api=null,!this.src)return void(null==t||t.destroy());this.dispatchEvent(new Event("loadstart"));let s=this.shadowRoot.querySelector("iframe"),n=function(e){let t={};for(let s of e)t[s.name]=s.value;return t}(this.attributes);e&&s&&(this.#a=JSON.parse(s.getAttribute("data-config")||"{}")),(null==s?void 0:s.src)&&s.src===r(n,this)||(this.shadowRoot.innerHTML=a(n,this),s=this.shadowRoot.querySelector("iframe"));const i=await async function(e,t,s){return c[e]?c[e]:t&&self[t]?(await h(0),self[t]):c[e]=new Promise(function(n,i){const o=document.createElement("script");o.src=e;const a=()=>n(self[t]);s&&(self[s]=a),o.onload=()=>!1,o.onerror=i,document.head.append(o)})}("https://www.youtube.com/iframe_api","YT","onYouTubeIframeAPIReady");this.api=new i.Player(s,{events:{onReady:()=>{this.#s=1,this.dispatchEvent(new Event("loadedmetadata")),this.dispatchEvent(new Event("durationchange")),this.dispatchEvent(new Event("volumechange")),this.dispatchEvent(new Event("loadcomplete")),this.isLoaded=!0,this.loadComplete.resolve()},onError:e=>{console.error(e),this.#o={code:e.data,message:`YouTube iframe player error #${e.data}; visit https://developers.google.com/youtube/iframe_api_reference#onError for the full error message.`},this.dispatchEvent(new Event("error"))}}});let o=!1;this.api.addEventListener("onStateChange",e=>{var t;const s=e.data;if(s!==i.PlayerState.PLAYING&&s!==i.PlayerState.BUFFERING||o||(o=!0,this.dispatchEvent(new Event("play"))),s===i.PlayerState.PLAYING)this.seeking&&(this.#n=!1,null==(t=this.#i)||t.resolve(),this.dispatchEvent(new Event("seeked"))),this.#s=3,this.dispatchEvent(new Event("playing"));else if(s===i.PlayerState.PAUSED){const e=Math.abs(this.currentTime-u);!this.seeking&&e>.1&&(this.#n=!0,this.dispatchEvent(new Event("seeking"))),o=!1,this.dispatchEvent(new Event("pause"))}s===i.PlayerState.ENDED&&(o=!1,this.dispatchEvent(new Event("pause")),this.dispatchEvent(new Event("ended")),this.loop&&this.play())}),this.api.addEventListener("onPlaybackRateChange",()=>{this.dispatchEvent(new Event("ratechange"))}),this.api.addEventListener("onVolumeChange",()=>{this.dispatchEvent(new Event("volumechange"))}),this.api.addEventListener("onVideoProgress",()=>{this.dispatchEvent(new Event("timeupdate"))}),await this.loadComplete;let l,u=0;setInterval(()=>{var e;const t=Math.abs(this.currentTime-u),s=this.buffered.end(this.buffered.length-1);this.seeking&&s>.1?(this.#n=!1,null==(e=this.#i)||e.resolve(),this.dispatchEvent(new Event("seeked"))):!this.seeking&&t>.1&&(this.#n=!0,this.dispatchEvent(new Event("seeking"))),u=this.currentTime},50);const d=setInterval(()=>{const e=this.buffered.end(this.buffered.length-1);e>=this.duration&&(clearInterval(d),this.#s=4),l!=e&&(l=e,this.dispatchEvent(new Event("progress")))},100)}async attributeChangedCallback(e,t,s){if(t!==s)switch(e){case"src":case"autoplay":case"controls":case"loop":case"playsinline":this.load()}}async play(){var e,t,s;return this.#i=null,await this.loadComplete,null==(e=this.api)||e.playVideo(),t=this,(s=(e,s)=>{let n;t.addEventListener(e,n=()=>{t.removeEventListener(e,n),s()})},(...e)=>new Promise(t=>{s(...e,(...e)=>{e.length>1?t(e):t(e[0])})}))("playing")}async pause(){var e;return await this.loadComplete,null==(e=this.api)?void 0:e.pauseVideo()}get seeking(){return this.#n}get readyState(){return this.#s}get src(){return this.getAttribute("src")}set src(e){this.src!=e&&this.setAttribute("src",e)}get error(){return this.#o}get paused(){var e,t;return this.isLoaded?[-1,0,2,5].includes(null==(t=null==(e=this.api)?void 0:e.getPlayerState)?void 0:t.call(e)):!this.autoplay}get duration(){var e,t;return(null==(t=null==(e=this.api)?void 0:e.getDuration)?void 0:t.call(e))??NaN}get autoplay(){return this.hasAttribute("autoplay")}set autoplay(e){this.autoplay!=e&&this.toggleAttribute("autoplay",Boolean(e))}get buffered(){var e,t;if(!this.isLoaded)return v();const s=(null==(e=this.api)?void 0:e.getVideoLoadedFraction())*(null==(t=this.api)?void 0:t.getDuration());return s>0?v(0,s):v()}get controls(){return this.hasAttribute("controls")}set controls(e){this.controls!=e&&this.toggleAttribute("controls",Boolean(e))}get currentTime(){var e,t;return(null==(t=null==(e=this.api)?void 0:e.getCurrentTime)?void 0:t.call(e))??0}set currentTime(e){this.currentTime!=e&&(this.#i=new p,this.loadComplete.then(()=>{var t,s;null==(t=this.api)||t.seekTo(e,!0),this.paused&&(null==(s=this.#i)||s.then(()=>{var e;this.#i&&(null==(e=this.api)||e.pauseVideo())}))}))}set defaultMuted(e){this.defaultMuted!=e&&this.toggleAttribute("muted",Boolean(e))}get defaultMuted(){return this.hasAttribute("muted")}get loop(){return this.hasAttribute("loop")}set loop(e){this.loop!=e&&this.toggleAttribute("loop",Boolean(e))}set muted(e){this.muted!=e&&this.loadComplete.then(()=>{var t,s;e?null==(t=this.api)||t.mute():null==(s=this.api)||s.unMute()})}get muted(){var e,t;return this.isLoaded?null==(t=null==(e=this.api)?void 0:e.isMuted)?void 0:t.call(e):this.defaultMuted}get playbackRate(){var e,t;return(null==(t=null==(e=this.api)?void 0:e.getPlaybackRate)?void 0:t.call(e))??1}set playbackRate(e){this.playbackRate!=e&&this.loadComplete.then(()=>{var t;null==(t=this.api)||t.setPlaybackRate(e)})}get playsInline(){return this.hasAttribute("playsinline")}set playsInline(e){this.playsInline!=e&&this.toggleAttribute("playsinline",Boolean(e))}get poster(){return this.getAttribute("poster")}set poster(e){this.poster!=e&&this.setAttribute("poster",`${e}`)}set volume(e){this.volume!=e&&this.loadComplete.then(()=>{var t;null==(t=this.api)||t.setVolume(100*e)})}get volume(){var e;return this.isLoaded?(null==(e=this.api)?void 0:e.getVolume())/100:1}#r(e){if(Object.prototype.hasOwnProperty.call(this,e)){const t=this[e];delete this[e],this[e]=t}}}function u(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/`/g,"&#x60;")}function d(e){return String(new URLSearchParams(function(e){let t={};for(let s in e){let n=e[s];!0===n||""===n?t[s]=1:!1===n?t[s]=0:null!=n&&(t[s]=n)}return t}(e)))}const c={},h=e=>new Promise(t=>setTimeout(t,e));class p extends Promise{constructor(e=()=>{}){let t,s;super((n,i)=>{e(n,i),t=n,s=i}),this.resolve=t,this.reject=s}}function v(e,t){return Array.isArray(e)?m(e):m(null==e||null==t||0===e&&0===t?[[0,0]]:[[e,t]])}function m(e){return Object.defineProperties(e,{start:{value:t=>e[t][0]},end:{value:t=>e[t][1]}}),e}globalThis.customElements&&!globalThis.customElements.get("youtube-video")&&globalThis.customElements.define("youtube-video",l);var f=l,g=new Set(["style","children","ref","key","suppressContentEditableWarning","suppressHydrationWarning","dangerouslySetInnerHTML"]),y={className:"class",htmlFor:"for"};function b(e){return e.toLowerCase()}function w(e){return"boolean"==typeof e?e?"":void 0:"function"==typeof e||"object"==typeof e&&null!==e?void 0:e}function E(e,t,s){var n;e[t]=s,null==s&&t in((null==(n=globalThis.HTMLElement)?void 0:n.prototype)??{})&&e.removeAttribute(t)}var k=function({react:e,tagName:t,elementClass:s,events:n,displayName:i,defaultProps:o,toAttributeName:a=b,toAttributeValue:r=w}){const l=Number.parseInt(e.version)>=19,u=e.forwardRef((i,u)=>{var d,c;const h=e.useRef(null),p=e.useRef(new Map),v={},m={},f={},b={};for(const[e,t]of Object.entries(i)){if(g.has(e)){f[e]=t;continue}const n=a(y[e]??e);if(e in s.prototype&&!(e in((null==(d=globalThis.HTMLElement)?void 0:d.prototype)??{}))&&!(null==(c=s.observedAttributes)?void 0:c.some(e=>e===n))){b[e]=t;continue}if(e.startsWith("on")){v[e]=t;continue}const i=r(t);if(n&&null!=i&&(m[n]=String(i),l||(f[n]=i)),n&&l){const e=w(t);f[n]=i!==e?i:t}}if("undefined"!=typeof window){for(const t in v){const s=v[t],i=t.endsWith("Capture"),o=((null==n?void 0:n[t])??t.slice(2).toLowerCase()).slice(0,i?-7:void 0);e.useLayoutEffect(()=>{const e=null==h?void 0:h.current;if(e&&"function"==typeof s)return e.addEventListener(o,s,i),()=>{e.removeEventListener(o,s,i)}},[null==h?void 0:h.current,s])}e.useLayoutEffect(()=>{if(null===h.current)return;const e=new Map;for(const t in b)E(h.current,t,b[t]),p.current.delete(t),e.set(t,b[t]);for(const[e,t]of p.current)E(h.current,e,void 0);p.current=e})}if("undefined"==typeof window&&(null==s?void 0:s.getTemplateHTML)&&(null==s?void 0:s.shadowRootOptions)){const{mode:t,delegatesFocus:n}=s.shadowRootOptions,o=e.createElement("template",{shadowrootmode:t,shadowrootdelegatesfocus:n,dangerouslySetInnerHTML:{__html:s.getTemplateHTML(m,i)}});f.children=[o,f.children]}return e.createElement(t,{...o,...f,ref:e.useCallback(e=>{h.current=e,"function"==typeof u?u(e):null!==u&&(u.current=e)},[u])})});return u.displayName=i??s.name,u}({react:n,tagName:"youtube-video",elementClass:f,toAttributeName:e=>"muted"===e?"":"defaultMuted"===e?"muted":b(e)})}};
@@ -0,0 +1,11 @@
1
+ /*! Bundled license information:
2
+
3
+ ce-la-react/dist/ce-la-react.js:
4
+ (**
5
+ * @license
6
+ * Copyright 2018 Google LLC
7
+ * SPDX-License-Identifier: BSD-3-Clause
8
+ *
9
+ * Modified version of `@lit/react` for vanilla custom elements with support for SSR.
10
+ *)
11
+ */