import{p as z,k as F,d as G,u as H,i as d,b as J,a as K}from"./i18n-eTakDDhg.js";import{R as L,y as M,t as _,a as o,T as N,X as O,x as Q,W as S,V,u as U,a6 as f,S as y,w as t,a0 as k,Y as I,a7 as Z}from"./index-BkylzejB.js";import{b as $}from"./size-oyICZHuE.js";import{I as ee}from"./Image-BfEz-0y2.js";import"./ScrollFade.svelte_svelte_type_style_lang-De9nUaYy.js";/* empty css                                                   */import{V as te}from"./Video-BImfEEkZ.js";import"./misc-Q1bfX-rj.js";/* empty css                                            */import"./snippet-CC9u6I34.js";import"./actions-CWv1ghz2.js";var ae=S("<audio controls></audio>"),se=S("<div><p> </p> <!></div>");function _e(W,m){L(m,!0);let u=z(m,"value",19,()=>({text:"",files:[]})),w=z(m,"selected",3,!1),n=U(0),v;function E(a,e){a.style.setProperty("--local-text-width",`${e&&e<150?e:200}px`),a.style.whiteSpace="unset"}M(()=>{v&&t(n)&&E(v,t(n))});var s=se();let x;var c=V(s),P=V(c,!0);I(c);var R=O(c,2);F(R,17,()=>u().files,H,(a,e)=>{var g=f(),T=y(g);{var X=r=>{ee(r,{get src(){return t(e).url},alt:""})},Y=r=>{var b=f(),j=y(b);{var q=i=>{te(i,{get src(){return t(e).url},alt:"",loop:!0,is_stream:!1})},A=i=>{var h=f(),B=y(h);{var C=l=>{var p=ae();_(()=>K(p,"src",t(e).url)),o(l,p)},D=l=>{var p=Z();_(()=>k(p,t(e).orig_name)),o(l,p)};d(B,l=>{t(e).mime_type&&t(e).mime_type.includes("audio")?l(C):l(D,!1)},!0)}o(i,h)};d(j,i=>{t(e).mime_type&&t(e).mime_type.includes("video")?i(q):i(A,!1)},!0)}o(r,b)};d(T,r=>{t(e).mime_type&&t(e).mime_type.includes("image")?r(X):r(Y,!1)})}o(a,g)}),I(s),G(s,a=>v=a,()=>v),_(()=>{x=J(s,1,"container svelte-xz0m7l",null,x,{table:m.type==="table",gallery:m.type==="gallery",selected:w(),border:u()}),k(P,u().text?u().text:"")}),$(s,"clientWidth",a=>Q(n,a)),o(W,s),N()}export{_e as default};
