@maveio/components 0.0.173 → 0.0.174

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.
Files changed (193) hide show
  1. package/dist/chunk-3FKZJPP6.cjs +2 -0
  2. package/dist/chunk-HDVI5ING.js +2583 -0
  3. package/dist/chunk-KCEF7VQS.cjs +2583 -0
  4. package/dist/chunk-SWNRHAZK.js +2 -0
  5. package/dist/config.cjs +1 -1
  6. package/dist/config.d.cts +9 -3
  7. package/dist/config.d.ts +9 -3
  8. package/dist/config.js +1 -1
  9. package/dist/de-4HGSV4NX.cjs +1 -0
  10. package/dist/de-AM53RBF2.js +1 -0
  11. package/dist/{themes/default.cjs → default-LFHA4VXP.cjs} +1 -1
  12. package/dist/{themes/default.js → default-OIQBJJAX.js} +1 -1
  13. package/dist/{themes/dolphin.cjs → dolphin-B2Z26DWX.cjs} +1 -1
  14. package/dist/{themes/dolphin.js → dolphin-JJOJS5EI.js} +1 -1
  15. package/dist/en-H7UBETC6.js +1 -0
  16. package/dist/en-M6OWHDJ2.cjs +1 -0
  17. package/dist/fr-2IL2CZKO.js +1 -0
  18. package/dist/fr-OXQSVAX4.cjs +1 -0
  19. package/dist/index.cjs +1 -1
  20. package/dist/index.d.cts +470 -16
  21. package/dist/index.d.ts +470 -16
  22. package/dist/index.js +1 -1
  23. package/dist/nl-CPFN66G7.js +1 -0
  24. package/dist/nl-YHUQM5IK.cjs +1 -0
  25. package/dist/react.cjs +1 -1
  26. package/dist/react.d.cts +2 -11
  27. package/dist/react.d.ts +2 -11
  28. package/dist/react.js +1 -1
  29. package/dist/{themes/synthwave.cjs → synthwave-JAIVYLQN.cjs} +1 -1
  30. package/dist/{themes/synthwave.js → synthwave-X45G4Z3J.js} +1 -1
  31. package/dist/vue.cjs +1 -1
  32. package/dist/vue.d.cts +1 -0
  33. package/dist/vue.d.ts +1 -0
  34. package/dist/vue.js +1 -1
  35. package/package.json +7 -2
  36. package/dist/chunk-2E5GLLOS.cjs +0 -19
  37. package/dist/chunk-2FUCHY2J.cjs +0 -35
  38. package/dist/chunk-2JCNQPEK.js +0 -1
  39. package/dist/chunk-3BAQWQNY.cjs +0 -25
  40. package/dist/chunk-3UQNIS3L.js +0 -194
  41. package/dist/chunk-474VILDO.cjs +0 -194
  42. package/dist/chunk-5NKBIUPL.cjs +0 -1
  43. package/dist/chunk-5PIHL662.js +0 -19
  44. package/dist/chunk-5ZZKAVXJ.js +0 -38
  45. package/dist/chunk-6DDQAAOQ.cjs +0 -211
  46. package/dist/chunk-6XQ6KWYP.js +0 -154
  47. package/dist/chunk-AOBEOJ2U.cjs +0 -10
  48. package/dist/chunk-B6P2GJBQ.js +0 -9
  49. package/dist/chunk-BCTXH32I.cjs +0 -1
  50. package/dist/chunk-BTCK3T4L.cjs +0 -24
  51. package/dist/chunk-CNPQ5Q2M.js +0 -1
  52. package/dist/chunk-CVXHA76S.js +0 -3
  53. package/dist/chunk-DL4BV5IH.cjs +0 -24
  54. package/dist/chunk-DXS4BF7U.js +0 -33
  55. package/dist/chunk-EVKPEPYP.cjs +0 -2
  56. package/dist/chunk-FAONFKQ2.cjs +0 -9
  57. package/dist/chunk-GNSSFU2Y.cjs +0 -7
  58. package/dist/chunk-HMVS6DJE.js +0 -186
  59. package/dist/chunk-IBQULJZC.cjs +0 -3
  60. package/dist/chunk-J7OISSKU.cjs +0 -1
  61. package/dist/chunk-K5Z7QHTN.cjs +0 -1
  62. package/dist/chunk-KNLOZXCA.cjs +0 -33
  63. package/dist/chunk-KO3CETGD.js +0 -25
  64. package/dist/chunk-KZGLJUFY.cjs +0 -38
  65. package/dist/chunk-LVGLIRQU.cjs +0 -186
  66. package/dist/chunk-MK4VIJT3.js +0 -1
  67. package/dist/chunk-MMHEOMF5.js +0 -9
  68. package/dist/chunk-NDPOBFNC.js +0 -20
  69. package/dist/chunk-NPP5B5PV.cjs +0 -16
  70. package/dist/chunk-NRAQPBUM.js +0 -7
  71. package/dist/chunk-OX42Y2HR.js +0 -1
  72. package/dist/chunk-P6SBZPDR.js +0 -1
  73. package/dist/chunk-PTN427IG.js +0 -24
  74. package/dist/chunk-QFF6OUH6.js +0 -9
  75. package/dist/chunk-QOM4AP6R.cjs +0 -9
  76. package/dist/chunk-QQDH35OW.cjs +0 -9
  77. package/dist/chunk-R3SDTEHC.js +0 -9
  78. package/dist/chunk-R6AMJOJL.cjs +0 -154
  79. package/dist/chunk-RHTBV6KZ.js +0 -24
  80. package/dist/chunk-RKL7JR7S.js +0 -211
  81. package/dist/chunk-RQN3DXJB.cjs +0 -1
  82. package/dist/chunk-RRCW5BBR.cjs +0 -9
  83. package/dist/chunk-S4RV2LTD.cjs +0 -1639
  84. package/dist/chunk-SDKTBB4N.cjs +0 -1
  85. package/dist/chunk-SWRFZ3FV.js +0 -1
  86. package/dist/chunk-TH3DUBVR.js +0 -35
  87. package/dist/chunk-TJ5F2FGY.cjs +0 -20
  88. package/dist/chunk-TKJYRGEU.cjs +0 -1
  89. package/dist/chunk-WE5NUDRY.js +0 -0
  90. package/dist/chunk-WOXKZOJ3.js +0 -10
  91. package/dist/chunk-X7OGQ4KH.cjs +0 -1
  92. package/dist/chunk-YJOQHWVN.js +0 -1639
  93. package/dist/chunk-YPCQNE3R.js +0 -16
  94. package/dist/chunk-ZQXFK7PD.js +0 -1
  95. package/dist/chunk-ZTDQPDC6.js +0 -2
  96. package/dist/components/audio-track-menu.cjs +0 -1
  97. package/dist/components/audio-track-menu.d.cts +0 -27
  98. package/dist/components/audio-track-menu.d.ts +0 -27
  99. package/dist/components/audio-track-menu.js +0 -1
  100. package/dist/components/captions-menu-button.cjs +0 -1
  101. package/dist/components/captions-menu-button.d.cts +0 -10
  102. package/dist/components/captions-menu-button.d.ts +0 -10
  103. package/dist/components/captions-menu-button.js +0 -1
  104. package/dist/components/clip.cjs +0 -1
  105. package/dist/components/clip.d.cts +0 -55
  106. package/dist/components/clip.d.ts +0 -55
  107. package/dist/components/clip.js +0 -1
  108. package/dist/components/files.cjs +0 -1
  109. package/dist/components/files.d.cts +0 -22
  110. package/dist/components/files.d.ts +0 -22
  111. package/dist/components/files.js +0 -1
  112. package/dist/components/img.cjs +0 -1
  113. package/dist/components/img.d.cts +0 -16
  114. package/dist/components/img.d.ts +0 -16
  115. package/dist/components/img.js +0 -1
  116. package/dist/components/list.cjs +0 -1
  117. package/dist/components/list.d.cts +0 -29
  118. package/dist/components/list.d.ts +0 -29
  119. package/dist/components/list.js +0 -1
  120. package/dist/components/player.cjs +0 -1
  121. package/dist/components/player.d.cts +0 -104
  122. package/dist/components/player.d.ts +0 -104
  123. package/dist/components/player.js +0 -1
  124. package/dist/components/pop.cjs +0 -1
  125. package/dist/components/pop.d.cts +0 -37
  126. package/dist/components/pop.d.ts +0 -37
  127. package/dist/components/pop.js +0 -1
  128. package/dist/components/text.cjs +0 -1
  129. package/dist/components/text.d.cts +0 -55
  130. package/dist/components/text.d.ts +0 -55
  131. package/dist/components/text.js +0 -1
  132. package/dist/components/upload.cjs +0 -1
  133. package/dist/components/upload.d.cts +0 -94
  134. package/dist/components/upload.d.ts +0 -94
  135. package/dist/components/upload.js +0 -1
  136. package/dist/embed/api.cjs +0 -1
  137. package/dist/embed/api.d.cts +0 -112
  138. package/dist/embed/api.d.ts +0 -112
  139. package/dist/embed/api.js +0 -1
  140. package/dist/embed/caption.cjs +0 -1
  141. package/dist/embed/caption.d.cts +0 -24
  142. package/dist/embed/caption.d.ts +0 -24
  143. package/dist/embed/caption.js +0 -1
  144. package/dist/embed/controller.cjs +0 -1
  145. package/dist/embed/controller.d.cts +0 -34
  146. package/dist/embed/controller.d.ts +0 -34
  147. package/dist/embed/controller.js +0 -1
  148. package/dist/embed/socket.cjs +0 -1
  149. package/dist/embed/socket.d.cts +0 -14
  150. package/dist/embed/socket.d.ts +0 -14
  151. package/dist/embed/socket.js +0 -1
  152. package/dist/generated/locales/de.cjs +0 -1
  153. package/dist/generated/locales/de.d.cts +0 -17
  154. package/dist/generated/locales/de.d.ts +0 -17
  155. package/dist/generated/locales/de.js +0 -1
  156. package/dist/generated/locales/en.cjs +0 -1
  157. package/dist/generated/locales/en.d.cts +0 -17
  158. package/dist/generated/locales/en.d.ts +0 -17
  159. package/dist/generated/locales/en.js +0 -1
  160. package/dist/generated/locales/fr.cjs +0 -1
  161. package/dist/generated/locales/fr.d.cts +0 -17
  162. package/dist/generated/locales/fr.d.ts +0 -17
  163. package/dist/generated/locales/fr.js +0 -1
  164. package/dist/generated/locales/nl.cjs +0 -1
  165. package/dist/generated/locales/nl.d.cts +0 -17
  166. package/dist/generated/locales/nl.d.ts +0 -17
  167. package/dist/generated/locales/nl.js +0 -1
  168. package/dist/themes/default.d.cts +0 -3
  169. package/dist/themes/default.d.ts +0 -3
  170. package/dist/themes/dolphin.d.cts +0 -3
  171. package/dist/themes/dolphin.d.ts +0 -3
  172. package/dist/themes/loader.cjs +0 -1
  173. package/dist/themes/loader.d.cts +0 -11
  174. package/dist/themes/loader.d.ts +0 -11
  175. package/dist/themes/loader.js +0 -1
  176. package/dist/themes/synthwave.d.cts +0 -3
  177. package/dist/themes/synthwave.d.ts +0 -3
  178. package/dist/utils/localization.cjs +0 -1
  179. package/dist/utils/localization.d.cts +0 -24
  180. package/dist/utils/localization.d.ts +0 -24
  181. package/dist/utils/localization.js +0 -1
  182. package/dist/utils/mave_element.cjs +0 -1
  183. package/dist/utils/mave_element.d.cts +0 -19
  184. package/dist/utils/mave_element.d.ts +0 -19
  185. package/dist/utils/mave_element.js +0 -1
  186. package/dist/utils/origin.cjs +0 -1
  187. package/dist/utils/origin.d.cts +0 -3
  188. package/dist/utils/origin.d.ts +0 -3
  189. package/dist/utils/origin.js +0 -1
  190. package/dist/utils/video_events.cjs +0 -1
  191. package/dist/utils/video_events.d.cts +0 -3
  192. package/dist/utils/video_events.d.ts +0 -3
  193. package/dist/utils/video_events.js +0 -1
@@ -1 +0,0 @@
1
- 'use strict';var e=["audioprocess","canplay","canplaythrough","complete","duration_change","emptied","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting"];exports.a=e;
@@ -1 +0,0 @@
1
- import {a}from'./chunk-PTN427IG.js';import {g,a as a$2}from'./chunk-5PIHL662.js';import {a as a$1}from'./chunk-ZTDQPDC6.js';import {c}from'./chunk-KA24PL7V.js';var s=class extends g{constructor(){super(...arguments);this.EVENT_TYPES={CLICK:"user_click"};}get embed(){return this._embed}set embed(t){this._embed=t;}get embedId(){return this._embed?.substring(5,this._embed?.length)}get spaceId(){return this.embed?.substring(0,5)}get cdn_root(){return a$1.cdn.endpoint.replace("${this.spaceId}",this.spaceId)}get _stylesheets(){if(typeof document>"u")return a$2``;let t=document.querySelectorAll('style, link[rel="stylesheet"]');return a$2`${Array.from(t).map(e=>e.cloneNode(true))}`}durationToTime(t){let e=Math.floor(t),n=Math.floor(e/3600),i=Math.floor(e%3600/60),o=e%60;return n>0?`${n}:${i.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}`:`${i}:${o.toString().padStart(2,"0")}`}emit(t,e){this.dispatchEvent(new CustomEvent(`mave:${t}`,{detail:{...e,eventType:t}})),this.dispatchEvent(new CustomEvent("mave:*",{detail:{...e,eventType:t}}));}};c([a({type:String})],s.prototype,"embed",1);export{s as a};
@@ -1,35 +0,0 @@
1
- import {a as a$3}from'./chunk-B6P2GJBQ.js';import {a as a$2}from'./chunk-CNPQ5Q2M.js';import {a as a$4}from'./chunk-R3SDTEHC.js';import {a as a$1,b}from'./chunk-PTN427IG.js';import {g,e as e$1,a as a$5}from'./chunk-5PIHL662.js';import {a}from'./chunk-YPCQNE3R.js';import {c,e,g as g$1}from'./chunk-KA24PL7V.js';var o,k,C,S,n=class extends g{constructor(){super(...arguments);e(this,o);this._clickable=true;this._autoscroll=true;this._lastScrollTime=0;this.currentTime=0;}get embed(){return this._embedId}set embed(t){this._embedId!=t&&(this._embedId=t,this.captionController=new a$2(this,this.embed),this.reset(),this.requestUpdate("embed"));}get clickable(){return this._clickable}set clickable(t){this._clickable!=t&&(typeof t=="string"?this._clickable=t==="true"||t==="":this._clickable=t,this.requestUpdate("clickable"));}get autoscroll(){return this._autoscroll}set autoscroll(t){this._autoscroll!=t&&(typeof t=="string"?this._autoscroll=t==="true"||t==="":this._autoscroll=t,this.requestUpdate("autoscroll"));}get wordIndex(){return this._wordIndex}set wordIndex(t){if(this._wordIndex!=t&&(this._wordIndex=t,this.autoscroll)){let e=this.shadowRoot?.querySelector(`[data-word-id="word-${this.segmentIndex}-${this.wordIndex}"]`);if(e&&this._lastScrollTime+2500<Date.now()){let r=this.getBoundingClientRect(),i=e.getBoundingClientRect(),s=i.top-r.top;if(s>0){let c=this.scrollTop+s;g$1(this,o,k).call(this,this,c-i.height/2);}}}}get segmentIndex(){return this._segmentIndex}set segmentIndex(t){this._segmentIndex!=t&&(this._segmentIndex=t);}connectedCallback(){super.connectedCallback(),this.addEventListener("scroll",g$1(this,o,C).bind(this)),this.reset();}reset(){if(typeof document>"u")return;this.loop=false,this.currentTime=0,this.wordIndex=0,this.segmentIndex=0;let t=document.querySelector(`mave-player[embed="${this.embed}"]`);t&&(this.player=t,t.addEventListener("play",()=>{this.loop=true,this.loopUpdateTime();}),t.addEventListener("pause",()=>{this.loop=false;}));}updateTime(){this.currentTime=this.player.currentTime;}loopUpdateTime(){this.updateTime(),setTimeout(()=>{this.loop&&requestAnimationFrame(this.loopUpdateTime.bind(this));},10);}inRange({start:t,end:e},r,i,s){if(this.currentTime>=t&&this.currentTime<=e)return s&&(this.wordIndex=s),i&&(this.segmentIndex=i),r||true}segmentStyle(){return this.clickable?{cursor:"pointer"}:{}}wordStyle(t){return t?{"background-color":this.highlight}:{}}render(){return this.captionController?this.captionController.render({complete:t=>(this.captions=t,a$5`
2
- <div>
3
- ${this.captions.segments.map((e,r)=>a$5`
4
- <p
5
- data-segment-id="segment-${r}"
6
- style=${a$3(this.segmentStyle())}
7
- @click=${this.clickable?g$1(this,o,S):e$1}
8
- part=${a$4(this.inRange(e,"segment"))}
9
- x-caption-segment-start="${e.start}"
10
- x-caption-segment-end="${e.end}"
11
- >
12
- ${e.words.map((i,s)=>a$5`
13
- <span
14
- data-word-id="word-${r}-${s}"
15
- style=${a$3(this.wordStyle(this.inRange(i)))}
16
- part=${a$4(this.inRange(i,"word",r,s))}
17
- x-caption-word-start="${i.start}"
18
- x-caption-word-end="${i.end}"
19
- >${i.word.trim()}</span
20
- >
21
- `)}
22
- </p>
23
- `)}
24
- </div>
25
- `)}):e$1}};o=new WeakSet,k=function(t,e,r=500){let i=this.scrollTop,s=e-i,c=null,p=false;function w(l){c||(c=l);let y=l-c,v=Math.min(y/r,1);t.scrollTop=i+s*x(v),y<r&&p?requestAnimationFrame(w):p=false;}function x(l){return l<.5?2*l*l:1-Math.pow(-2*l+2,2)/2}p=true,requestAnimationFrame(w);},C=function(){this._lastScrollTime=Date.now();},S=function(t){if(this.clickable){let e=t.target.closest("p");if(e&&this.player){let r=e.getAttribute("x-caption-segment-start");this.player.currentTime=Number(r),this.player.paused&&this.player.play();}}},n.styles=a`
26
- :host {
27
- display: block;
28
- width: 100%;
29
- height: 100%;
30
- }
31
-
32
- [part='word'] {
33
- background-color: rgba(255, 210, 42, 0.5);
34
- }
35
- `,c([a$1()],n.prototype,"embed",1),c([a$1()],n.prototype,"highlight",2),c([a$1()],n.prototype,"clickable",1),c([a$1()],n.prototype,"autoscroll",1),c([b()],n.prototype,"currentTime",2),c([b()],n.prototype,"captions",2);typeof window<"u"&&window.customElements&&(window.customElements.get("mave-text")||window.customElements.define("mave-text",n));export{n as a};
@@ -1,20 +0,0 @@
1
- 'use strict';var chunkTKJYRGEU_cjs=require('./chunk-TKJYRGEU.cjs'),chunkRQN3DXJB_cjs=require('./chunk-RQN3DXJB.cjs'),chunkDL4BV5IH_cjs=require('./chunk-DL4BV5IH.cjs'),chunk2E5GLLOS_cjs=require('./chunk-2E5GLLOS.cjs'),chunkNPP5B5PV_cjs=require('./chunk-NPP5B5PV.cjs'),chunkJHSFSCC2_cjs=require('./chunk-JHSFSCC2.cjs');var i,l,C,R,g,v,w,z,L,U,F,y,f=class extends chunkTKJYRGEU_cjs.a{constructor(){super(...arguments);chunkJHSFSCC2_cjs.e(this,i);this.embedController=new chunkRQN3DXJB_cjs.b(this);}get embed(){return this._embed}set embed(e){this._embed!==e&&(this._embed=e,this.requestUpdate("embed"),this.embedController.embed=this.embed);}get _slottedChildren(){return this.shadowRoot?.querySelector("slot")?.assignedElements({flatten:true})||[]}render(){return chunk2E5GLLOS_cjs.a`
2
- ${this.embedController.render({pending:this.renderPending,complete:e=>{if(this._data=e,!e)return;let n=chunkJHSFSCC2_cjs.g(this,i,U).call(this),t=chunkJHSFSCC2_cjs.g(this,i,F).call(this),o=this._slottedChildren.map(a=>{function h(){let s;return a.nodeName==="TEMPLATE"?s=a.content.cloneNode(true):s=a.cloneNode(true),s}if(a.getAttribute("name")=="mave-files-video"){if(!n)return;let s=h(),d=Number(this._data.created_at),m=d&&d<1e12?d*1e3:d;Number.isFinite(m)&&chunkJHSFSCC2_cjs.g(this,i,l).call(this,s,"date",new Date(m).toLocaleDateString().replaceAll("/","-"));let p=this._data.video.duration;p&&chunkJHSFSCC2_cjs.g(this,i,l).call(this,s,"duration",this.durationToTime(p));let u=this._data.video.filetype;u&&chunkJHSFSCC2_cjs.g(this,i,l).call(this,s,"filetype",u);let k=n.file_size||this._data.video.size;k&&chunkJHSFSCC2_cjs.g(this,i,l).call(this,s,"size",chunkJHSFSCC2_cjs.g(this,i,v).call(this,k));let M=chunkJHSFSCC2_cjs.g(this,i,z).call(this,n),S=n.container||"mp4",b=chunkJHSFSCC2_cjs.g(this,i,g).call(this,M,`${this._data.name}.${S}`);return b.setAttribute("aria-label","Download video"),b.appendChild(s),chunk2E5GLLOS_cjs.a`${b}`}if(t&&a.getAttribute("name")=="mave-files-audio"){let s=h(),d=t.codec||chunkJHSFSCC2_cjs.g(this,i,y).call(this,t.filename)||"mp3";chunkJHSFSCC2_cjs.g(this,i,l).call(this,s,"filetype",d);let m=t.file_size;m&&chunkJHSFSCC2_cjs.g(this,i,l).call(this,s,"size",chunkJHSFSCC2_cjs.g(this,i,v).call(this,m));let p=chunkJHSFSCC2_cjs.g(this,i,L).call(this,t),u=chunkJHSFSCC2_cjs.g(this,i,g).call(this,p,t.filename||`${this._data.name}.${d}`);return u.setAttribute("aria-label","Download audio"),u.appendChild(s),chunk2E5GLLOS_cjs.a`${u}`}let _=this._data.subtitles.find(s=>s.language==this._data.video.language);if(_&&a.getAttribute("name")=="mave-files-subtitles"){let s=h();chunkJHSFSCC2_cjs.g(this,i,l).call(this,s,"filetype","vtt");let d=chunkJHSFSCC2_cjs.g(this,i,g).call(this,_.path,`${this._data.name}.vtt`);return d.setAttribute("aria-label","Download subtitles"),d.appendChild(s),chunk2E5GLLOS_cjs.a`${d}`}});return chunk2E5GLLOS_cjs.a`${this._stylesheets} ${o}`}})}
3
- `}renderPending(){return chunk2E5GLLOS_cjs.a`<slot style="display: none"></slot>`}};i=new WeakSet,l=function(e,n,t){let o=e.querySelector(`[slot="${n}"], [data-slot="${n}"]`);o&&(o.textContent=t,o.removeAttribute("slot"),o.removeAttribute("data-slot"));},C=function(e,n){let t=window.URL.createObjectURL(e),o=document.createElement("a");o.style.display="none",o.href=t,o.download=n,this.appendChild(o),o.click(),window.URL.revokeObjectURL(t),this.removeChild(o);},R=function(e,n){return fetch(e).then(t=>{if(!t.ok)throw new Error("Network response was not ok");return t.blob()}).then(t=>chunkJHSFSCC2_cjs.g(this,i,C).call(this,t,n)).catch(t=>console.error("Something went wrong:",t))},g=function(e,n){let t=document.createElement("a");t.classList.add("link"),t.setAttribute("href",e),t.setAttribute("download",n),t.setAttribute("target","new");let o=false;return t.addEventListener("click",a=>{a.preventDefault(),!o&&(o=true,t.style.cursor="wait",t.style.opacity="0.5",chunkJHSFSCC2_cjs.g(this,i,R).call(this,e,n).then(()=>{o=false,t.style.cursor="pointer",t.style.opacity="1";}));}),t},v=function(e){let n=e/1e6;if(n<10)return `${n.toFixed(1)} MB`;let t=n%1!==0;return `${n.toFixed(t?1:0)} MB`},w=function(e){let n=this._data?.video?.version&&this._data.video.version>0?`v${this._data.video.version}/`:"";return `${this.cdn_root}/${this.embedId}/${n}${e}`},z=function(e){let n=e?.codec||"h264",t=e?.size||"hd",o=e?.container||"mp4";return chunkJHSFSCC2_cjs.g(this,i,w).call(this,`${n}_${t}.${o}`)},L=function(e){if(e?.path)return e.path;let n=e?.codec||chunkJHSFSCC2_cjs.g(this,i,y).call(this,e?.filename||"")||"mp3";return chunkJHSFSCC2_cjs.g(this,i,w).call(this,`audio.${n}`)},U=function(){let e=this._data?.video?.renditions||[];if(!e.length)return;let n=e.filter(o=>o.container==="mp4"&&o.codec==="h264"&&(!o.type||o.type==="video")),t=["hd","fhd","sd","qhd","uhd"];for(let o of t){let a=n.find(h=>h.size===o);if(a)return a}return n[0]||e.find(o=>o.type==="video")},F=function(){let e=this._data?.audio_tracks||[];if(e.length)return e.find(n=>n.default)||e[0]},y=function(e){if(!e)return;let n=e.split(".");return n.length>1?n.pop():void 0},f.styles=chunkNPP5B5PV_cjs.a`
4
- :host {
5
- display: block;
6
- --link-color: #006fc6;
7
- --link-decoration: underline;
8
- --link-decoration-thickness: 1px;
9
- --link-decoration-offset: 1px;
10
- --link-cursor: pointer;
11
- }
12
-
13
- a {
14
- text-decoration: var(--link-decoration);
15
- text-decoration-thickness: var(--link-decoration-thickness);
16
- text-underline-offset: var(--link-decoration-thickness);
17
- color: var(--link-color);
18
- cursor: var(--link-cursor);
19
- }
20
- `,chunkJHSFSCC2_cjs.c([chunkDL4BV5IH_cjs.a({type:String})],f.prototype,"embed",1);typeof window<"u"&&window.customElements&&(window.customElements.get("mave-files")||window.customElements.define("mave-files",f));exports.a=f;
@@ -1 +0,0 @@
1
- 'use strict';var chunkDL4BV5IH_cjs=require('./chunk-DL4BV5IH.cjs'),chunk2E5GLLOS_cjs=require('./chunk-2E5GLLOS.cjs'),chunkEVKPEPYP_cjs=require('./chunk-EVKPEPYP.cjs'),chunkJHSFSCC2_cjs=require('./chunk-JHSFSCC2.cjs');var s=class extends chunk2E5GLLOS_cjs.g{constructor(){super(...arguments);this.EVENT_TYPES={CLICK:"user_click"};}get embed(){return this._embed}set embed(t){this._embed=t;}get embedId(){return this._embed?.substring(5,this._embed?.length)}get spaceId(){return this.embed?.substring(0,5)}get cdn_root(){return chunkEVKPEPYP_cjs.a.cdn.endpoint.replace("${this.spaceId}",this.spaceId)}get _stylesheets(){if(typeof document>"u")return chunk2E5GLLOS_cjs.a``;let t=document.querySelectorAll('style, link[rel="stylesheet"]');return chunk2E5GLLOS_cjs.a`${Array.from(t).map(e=>e.cloneNode(true))}`}durationToTime(t){let e=Math.floor(t),n=Math.floor(e/3600),i=Math.floor(e%3600/60),o=e%60;return n>0?`${n}:${i.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}`:`${i}:${o.toString().padStart(2,"0")}`}emit(t,e){this.dispatchEvent(new CustomEvent(`mave:${t}`,{detail:{...e,eventType:t}})),this.dispatchEvent(new CustomEvent("mave:*",{detail:{...e,eventType:t}}));}};chunkJHSFSCC2_cjs.c([chunkDL4BV5IH_cjs.a({type:String})],s.prototype,"embed",1);exports.a=s;
File without changes
@@ -1,10 +0,0 @@
1
- import {a as a$1}from'./chunk-SWRFZ3FV.js';import {a as a$2}from'./chunk-5PIHL662.js';import {a}from'./chunk-YPCQNE3R.js';var e=class extends a$1{get poster(){return `${this.cdn_root}/${this.embedId}/poster.webp`}render(){return a$2`<img src=${this.poster} />`}};e.styles=a`
2
- :host {
3
- display: block;
4
- }
5
-
6
- img {
7
- width: 100%;
8
- max-height: 100vh;
9
- }
10
- `;typeof window<"u"&&window.customElements&&(window.customElements.get("mave-img")||window.customElements.define("mave-img",e));export{e as a};
@@ -1 +0,0 @@
1
- 'use strict';var chunkEVKPEPYP_cjs=require('./chunk-EVKPEPYP.cjs');var i=chunkEVKPEPYP_cjs.a.api.endpoint;exports.a=i;