import"./svelte/svelte_internal_flags_legacy.js";import"./svelte/svelte_internal_flags_async.js";import*as e from"./svelte/svelte_internal_client.js";import{p as f,V as E}from"./Video-06U9X4-1.js";import"./index-Ds2meNS5.js";import"./svelte/svelte_svelte.js";import"./svelte/svelte_animate.js";import"./svelte/svelte_attachments.js";import"./svelte/svelte_easing.js";import"./svelte/svelte_internal_flags_tracing.js";import"./svelte/svelte_internal_server.js";import"./svelte/svelte_legacy.js";import"./svelte/svelte_motion.js";import"./svelte/svelte_reactivity.js";import"./svelte/svelte_reactivity_window.js";import"./svelte/svelte_server.js";import"./svelte/svelte_store.js";import"./svelte/svelte_transition.js";import"./svelte/svelte_events.js";var I=e.from_html("<div><!></div>"),j=e.from_html("<div> </div>");function U(g,p){e.push(p,!1);let s=e.prop(p,"type",12),n=e.prop(p,"selected",12,!1),l=e.prop(p,"value",12,null),u=e.prop(p,"loop",12),t=e.mutable_source();async function c(){e.mutate(t,e.get(t).muted=!0),e.mutate(t,e.get(t).playsInline=!0),e.mutate(t,e.get(t).controls=!1),e.get(t).setAttribute("muted",""),await e.get(t).play(),e.get(t).pause()}var _={get type(){return s()},set type(r){s(r),e.flush()},get selected(){return n()},set selected(r){n(r),e.flush()},get value(){return l()},set value(r){l(r),e.flush()},get loop(){return u()},set loop(r){u(r),e.flush()}};e.init();var m=e.comment(),h=e.first_child(m);{var y=r=>{var v=e.comment(),b=e.first_child(v);{var x=o=>{var a=I();let d;var V=e.child(a),q=e.derived(()=>e.get(t).play.bind(e.get(t))),w=e.derived(()=>e.get(t).pause.bind(e.get(t)));{let A=e.derived_safe_equal(()=>(e.deep_read_state(l()),e.untrack(()=>l()?.url)));E(V,{muted:!0,playsinline:!0,get src(){return e.get(A)},is_stream:!1,get loop(){return u()},get node(){return e.get(t)},set node(i){e.set(t,i)},$$events:{loadeddata:c,mouseover(...i){e.get(q)?.apply(this,i)},mouseout(...i){e.get(w)?.apply(this,i)}},$$legacy:!0})}e.reset(a),e.template_effect(()=>d=e.set_class(a,1,"container svelte-1nl1glk",null,d,{table:s()==="table",gallery:s()==="gallery",selected:n()})),e.append(o,a)},k=o=>{var a=j(),d=e.child(a,!0);e.reset(a),e.template_effect(()=>e.set_text(d,l())),e.append(o,a)};e.if(b,o=>{e.deep_read_state(f),e.untrack(f)?o(x):o(k,!1)})}e.append(r,v)};e.if(h,r=>{l()&&r(y)})}return e.append(g,m),e.pop(_)}export{U as default};
