Spaces:
Running
Running
import{S as Y,i as Z,s as Q,B as L,C as f,g as B,E as v,F as I,q as T,G as q,H as J,I as te,e as V,L as oe,aa as ke,M as me,D as H,m as N,J as S,a2 as de,aj as ve,l as ee,t as p,o as le,p as w,K as ae,n as j,a0 as ye,aq as Be,ar as Te,y as U,b as he,T as ue,f as ne,r as fe,a as Ve,k as Ne,V as je,X as Ce,Y as Me,Z as Ue,a8 as Se,x as Ie,$ as Ee,h as Pe,j as De}from"../lite.js";import{n as be}from"./ModifyUpload.svelte_svelte_type_style_lang-ba6baa96.js";import{B as Re}from"./Button-5b68d65a.js";/* empty css */import{U as qe}from"./Upload-09ed31cf.js";import{M as ze,I as Fe}from"./ModifyUpload-33254150.js";import{B as pe}from"./BlockLabel-e392131b.js";import{U as Xe,W as Ae}from"./StaticImage.svelte_svelte_type_style_lang-8f029e82.js";import{E as Oe}from"./Empty-b331fdfe.js";import{D as He}from"./Download-604a4bc6.js";import{U as Je}from"./UploadText-45e994b7.js";import"./Blocks-b77f2878.js";function Le(n){let e,t;return{c(){e=L("svg"),t=L("path"),f(t,"d","M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"),f(e,"xmlns","http://www.w3.org/2000/svg"),f(e,"width","100%"),f(e,"height","100%"),f(e,"viewBox","0 0 24 24"),f(e,"fill","none"),f(e,"stroke","currentColor"),f(e,"stroke-width","1.5"),f(e,"stroke-linecap","round"),f(e,"stroke-linejoin","round")},m(l,r){B(l,e,r),v(e,t)},p:I,i:I,o:I,d(l){l&&T(e)}}}class Ge extends Y{constructor(e){super(),Z(this,e,null,Le,Q,{})}}function Ke(n){let e,t,l;return{c(){e=L("svg"),t=L("rect"),l=L("rect"),f(t,"x","6"),f(t,"y","4"),f(t,"width","4"),f(t,"height","16"),f(l,"x","14"),f(l,"y","4"),f(l,"width","4"),f(l,"height","16"),f(e,"xmlns","http://www.w3.org/2000/svg"),f(e,"width","100%"),f(e,"height","100%"),f(e,"viewBox","0 0 24 24"),f(e,"fill","none"),f(e,"stroke","currentColor"),f(e,"stroke-width","1.5"),f(e,"stroke-linecap","round"),f(e,"stroke-linejoin","round")},m(r,o){B(r,e,o),v(e,t),v(e,l)},p:I,i:I,o:I,d(r){r&&T(e)}}}class We extends Y{constructor(e){super(),Z(this,e,null,Ke,Q,{})}}function Ye(n){let e,t;return{c(){e=L("svg"),t=L("polygon"),f(t,"points","5 3 19 12 5 21 5 3"),f(e,"xmlns","http://www.w3.org/2000/svg"),f(e,"width","100%"),f(e,"height","100%"),f(e,"viewBox","0 0 24 24"),f(e,"fill","none"),f(e,"stroke","currentColor"),f(e,"stroke-width","1.5"),f(e,"stroke-linecap","round"),f(e,"stroke-linejoin","round")},m(l,r){B(l,e,r),v(e,t)},p:I,i:I,o:I,d(l){l&&T(e)}}}class Ze extends Y{constructor(e){super(),Z(this,e,null,Ye,Q,{})}}function Qe(n){let e,t,l;return{c(){e=L("svg"),t=L("polygon"),l=L("rect"),f(t,"points","23 7 16 12 23 17 23 7"),f(l,"x","1"),f(l,"y","5"),f(l,"width","15"),f(l,"height","14"),f(l,"rx","2"),f(l,"ry","2"),f(e,"xmlns","http://www.w3.org/2000/svg"),f(e,"width","100%"),f(e,"height","100%"),f(e,"viewBox","0 0 24 24"),f(e,"fill","none"),f(e,"stroke","currentColor"),f(e,"stroke-width","1.5"),f(e,"stroke-linecap","round"),f(e,"stroke-linejoin","round"),f(e,"class","feather feather-video")},m(r,o){B(r,e,o),v(e,t),v(e,l)},p:I,i:I,o:I,d(r){r&&T(e)}}}class ce extends Y{constructor(e){super(),Z(this,e,null,Qe,Q,{})}}const ge=n=>{let e=["B","KB","MB","GB","PB"],t=0;for(;n>1024;)n/=1024,t++;let l=e[t];return n.toFixed(1)+" "+l},$e=()=>!0;const{isNaN:xe}=Be;function el(n){let e,t;return e=new We({}),{c(){V(e.$$.fragment)},m(l,r){N(e,l,r),t=!0},i(l){t||(w(e.$$.fragment,l),t=!0)},o(l){p(e.$$.fragment,l),t=!1},d(l){j(e,l)}}}function ll(n){let e,t;return e=new Ze({}),{c(){V(e.$$.fragment)},m(l,r){N(e,l,r),t=!0},i(l){t||(w(e.$$.fragment,l),t=!0)},o(l){p(e.$$.fragment,l),t=!1},d(l){j(e,l)}}}function tl(n){let e,t;return e=new Xe({}),{c(){V(e.$$.fragment)},m(l,r){N(e,l,r),t=!0},i(l){t||(w(e.$$.fragment,l),t=!0)},o(l){p(e.$$.fragment,l),t=!1},d(l){j(e,l)}}}function nl(n){let e,t,l,r,o,u=!1,b,a=!0,s,i,c,_,m,y,C,P,X=ie(n[3])+"",D,z,R=ie(n[4])+"",A,g,F,W,x,G,O,E,h,K;function d(){cancelAnimationFrame(b),t.paused||(b=Te(d),u=!0),n[18].call(t)}const re=[tl,ll,el],$=[];function _e(k,M){return k[3]===k[4]?0:k[5]?1:2}return m=_e(n),y=$[m]=re[m](n),O=new Ge({}),{c(){e=q("div"),t=q("video"),l=q("track"),s=J(),i=q("div"),c=q("div"),_=q("span"),y.c(),C=J(),P=q("span"),D=te(X),z=te(" / "),A=te(R),g=J(),F=q("progress"),x=J(),G=q("div"),V(O.$$.fragment),f(l,"kind","captions"),oe(l.src,r=n[1])||f(l,"src",r),l.default=!0,oe(t.src,o=n[0])||f(t,"src",o),f(t,"preload","auto"),f(t,"class","svelte-1vnmhm4"),n[4]===void 0&&ke(()=>n[19].call(t)),me(t,"mirror",n[2]),H(t,"opacity",n[8]),H(t,"transition",n[10]),f(_,"class","icon svelte-1vnmhm4"),f(P,"class","time svelte-1vnmhm4"),F.value=W=n[3]/n[4]||0,f(F,"class","svelte-1vnmhm4"),f(G,"class","icon svelte-1vnmhm4"),f(c,"class","inner svelte-1vnmhm4"),f(i,"class","controls svelte-1vnmhm4"),H(i,"opacity",n[8]===1&&n[4]&&n[7]?1:0),H(i,"transition",n[10]),f(e,"class","wrap svelte-1vnmhm4"),H(e,"opacity",n[9])},m(k,M){B(k,e,M),v(e,t),v(t,l),n[21](t),v(e,s),v(e,i),v(i,c),v(c,_),$[m].m(_,null),v(c,C),v(c,P),v(P,D),v(P,z),v(P,A),v(c,g),v(c,F),v(c,x),v(c,G),N(O,G,null),E=!0,h||(K=[S(t,"mousemove",n[11]),S(t,"click",n[13]),S(t,"play",n[15]),S(t,"pause",n[16]),S(t,"ended",n[17]),S(t,"timeupdate",d),S(t,"durationchange",n[19]),S(t,"play",n[20]),S(t,"pause",n[20]),S(_,"click",n[13]),S(F,"mousemove",n[12]),S(F,"touchmove",de(n[12])),S(F,"click",ve(de(n[14]))),S(G,"click",n[22]),S(i,"mousemove",n[11])],h=!0)},p(k,[M]){(!E||M&2&&!oe(l.src,r=k[1]))&&f(l,"src",r),(!E||M&1&&!oe(t.src,o=k[0]))&&f(t,"src",o),!u&&M&8&&!xe(k[3])&&(t.currentTime=k[3]),u=!1,M&32&&a!==(a=k[5])&&t[a?"pause":"play"](),(!E||M&4)&&me(t,"mirror",k[2]),M&256&&H(t,"opacity",k[8]),M&1024&&H(t,"transition",k[10]);let se=m;m=_e(k),m!==se&&(ee(),p($[se],1,1,()=>{$[se]=null}),le(),y=$[m],y||(y=$[m]=re[m](k),y.c()),w(y,1),y.m(_,null)),(!E||M&8)&&X!==(X=ie(k[3])+"")&&ae(D,X),(!E||M&16)&&R!==(R=ie(k[4])+"")&&ae(A,R),(!E||M&24&&W!==(W=k[3]/k[4]||0))&&(F.value=W),M&400&&H(i,"opacity",k[8]===1&&k[4]&&k[7]?1:0),M&1024&&H(i,"transition",k[10]),M&512&&H(e,"opacity",k[9])},i(k){E||(w(y),w(O.$$.fragment,k),E=!0)},o(k){p(y),p(O.$$.fragment,k),E=!1},d(k){k&&T(e),n[21](null),$[m].d(),j(O),h=!1,ye(K)}}}function ie(n){if(isNaN(n)||!isFinite(n))return"...";const e=Math.floor(n/60);let t=Math.floor(n%60);return n<10&&(t=`0${t}`),`${e}:${t}`}function rl(n,e,t){let{src:l}=e,{subtitle:r=null}=e,{mirror:o}=e,u=0,b,a=!0,s,i=!0,c;function _(){clearTimeout(c),c=setTimeout(()=>t(7,i=!1),500),t(7,i=!0)}function m(h){if(!b)return;if(h.type==="click"){C(h);return}if(h.type!=="touchmove"&&!(h.buttons&1))return;const K=h.type==="touchmove"?h.touches[0].clientX:h.clientX,{left:d,right:re}=h.currentTarget.getBoundingClientRect();t(3,u=b*(K-d)/(re-d))}async function y(){document.fullscreenElement!=s&&(s.currentTime>0&&!s.paused&&!s.ended&&s.readyState>s.HAVE_CURRENT_DATA?s.pause():await s.play())}function C(h){const{left:K,right:d}=h.currentTarget.getBoundingClientRect();t(3,u=b*(h.clientX-K)/(d-K))}async function P(){t(10,R="0s"),await ue(),t(9,z=.8),t(8,D=0),await ue();var h=setInterval(async()=>{s.readyState>=3&&(t(6,s.currentTime=9999,s),t(5,a=!0),t(10,R="0.2s"),setTimeout(async()=>{t(6,s.currentTime=0,s),t(8,D=1),t(9,z=1)},50),clearInterval(h))},15)}async function X(){P()}let D=0,z=0,R="0.5s";function A(h){U.call(this,n,h)}function g(h){U.call(this,n,h)}function F(h){U.call(this,n,h)}function W(){u=this.currentTime,t(3,u)}function x(){b=this.duration,t(4,b)}function G(){a=this.paused,t(5,a)}function O(h){he[h?"unshift":"push"](()=>{s=h,t(6,s)})}const E=()=>s.requestFullscreen();return n.$$set=h=>{"src"in h&&t(0,l=h.src),"subtitle"in h&&t(1,r=h.subtitle),"mirror"in h&&t(2,o=h.mirror)},n.$$.update=()=>{n.$$.dirty&1&&l&&X()},[l,r,o,u,b,a,s,i,D,z,R,_,m,y,C,A,g,F,W,x,G,O,E]}class we extends Y{constructor(e){super(),Z(this,e,rl,nl,Q,{src:0,subtitle:1,mirror:2})}}function ol(n){let e,t,l,r,o,u,b;e=new ze({}),e.$on("clear",n[10]);const a=[sl,al],s=[];function i(c,_){return l==null&&(l=!!$e()),l?0:c[0].size?1:-1}return~(r=i(n))&&(o=s[r]=a[r](n)),{c(){V(e.$$.fragment),t=J(),o&&o.c(),u=ne()},m(c,_){N(e,c,_),B(c,t,_),~r&&s[r].m(c,_),B(c,u,_),b=!0},p(c,_){let m=r;r=i(c),r===m?~r&&s[r].p(c,_):(o&&(ee(),p(s[m],1,1,()=>{s[m]=null}),le()),~r?(o=s[r],o?o.p(c,_):(o=s[r]=a[r](c),o.c()),w(o,1),o.m(u.parentNode,u)):o=null)},i(c){b||(w(e.$$.fragment,c),w(o),b=!0)},o(c){p(e.$$.fragment,c),p(o),b=!1},d(c){j(e,c),c&&T(t),~r&&s[r].d(c),c&&T(u)}}}function il(n){let e,t,l,r;const o=[fl,ul],u=[];function b(a,s){return a[2]==="upload"?0:a[2]==="webcam"?1:-1}return~(e=b(n))&&(t=u[e]=o[e](n)),{c(){t&&t.c(),l=ne()},m(a,s){~e&&u[e].m(a,s),B(a,l,s),r=!0},p(a,s){let i=e;e=b(a),e===i?~e&&u[e].p(a,s):(t&&(ee(),p(u[i],1,1,()=>{u[i]=null}),le()),~e?(t=u[e],t?t.p(a,s):(t=u[e]=o[e](a),t.c()),w(t,1),t.m(l.parentNode,l)):t=null)},i(a){r||(w(t),r=!0)},o(a){p(t),r=!1},d(a){~e&&u[e].d(a),a&&T(l)}}}function al(n){let e,t=n[0].name+"",l,r,o,u=ge(n[0].size)+"",b;return{c(){e=q("div"),l=te(t),r=J(),o=q("div"),b=te(u),f(e,"class","file-name svelte-a6ruol"),f(o,"class","file-size svelte-a6ruol")},m(a,s){B(a,e,s),v(e,l),B(a,r,s),B(a,o,s),v(o,b)},p(a,s){s&1&&t!==(t=a[0].name+"")&&ae(l,t),s&1&&u!==(u=ge(a[0].size)+"")&&ae(b,u)},i:I,o:I,d(a){a&&T(e),a&&T(r),a&&T(o)}}}function sl(n){let e,t;return e=new we({props:{src:n[0].data,subtitle:n[1]?.data,mirror:n[5]&&n[2]==="webcam"}}),e.$on("play",n[15]),e.$on("pause",n[16]),e.$on("ended",n[17]),{c(){V(e.$$.fragment)},m(l,r){N(e,l,r),t=!0},p(l,r){const o={};r&1&&(o.src=l[0].data),r&2&&(o.subtitle=l[1]?.data),r&36&&(o.mirror=l[5]&&l[2]==="webcam"),e.$set(o)},i(l){t||(w(e.$$.fragment,l),t=!0)},o(l){p(e.$$.fragment,l),t=!1},d(l){j(e,l)}}}function ul(n){let e,t;return e=new Ae({props:{mirror_webcam:n[5],include_audio:n[6],mode:"video"}}),e.$on("error",n[13]),e.$on("capture",n[14]),{c(){V(e.$$.fragment)},m(l,r){N(e,l,r),t=!0},p(l,r){const o={};r&32&&(o.mirror_webcam=l[5]),r&64&&(o.include_audio=l[6]),e.$set(o)},i(l){t||(w(e.$$.fragment,l),t=!0)},o(l){p(e.$$.fragment,l),t=!1},d(l){j(e,l)}}}function fl(n){let e,t,l;function r(u){n[12](u)}let o={filetype:"video/x-m4v,video/*",$$slots:{default:[cl]},$$scope:{ctx:n}};return n[7]!==void 0&&(o.dragging=n[7]),e=new qe({props:o}),he.push(()=>Ve(e,"dragging",r)),e.$on("load",n[9]),{c(){V(e.$$.fragment)},m(u,b){N(e,u,b),l=!0},p(u,b){const a={};b&262144&&(a.$$scope={dirty:b,ctx:u}),!t&&b&128&&(t=!0,a.dragging=u[7],Ne(()=>t=!1)),e.$set(a)},i(u){l||(w(e.$$.fragment,u),l=!0)},o(u){p(e.$$.fragment,u),l=!1},d(u){j(e,u)}}}function cl(n){let e;const t=n[11].default,l=je(t,n,n[18],null);return{c(){l&&l.c()},m(r,o){l&&l.m(r,o),e=!0},p(r,o){l&&l.p&&(!e||o&262144)&&Ce(l,t,r,r[18],e?Ue(t,r[18],o,null):Me(r[18]),null)},i(r){e||(w(l,r),e=!0)},o(r){p(l,r),e=!1},d(r){l&&l.d(r)}}}function _l(n){let e,t,l,r,o,u;e=new pe({props:{show_label:n[4],Icon:ce,label:n[3]||"Video"}});const b=[il,ol],a=[];function s(i,c){return i[0]===null?0:1}return l=s(n),r=a[l]=b[l](n),{c(){V(e.$$.fragment),t=J(),r.c(),o=ne()},m(i,c){N(e,i,c),B(i,t,c),a[l].m(i,c),B(i,o,c),u=!0},p(i,[c]){const _={};c&16&&(_.show_label=i[4]),c&8&&(_.label=i[3]||"Video"),e.$set(_);let m=l;l=s(i),l===m?a[l].p(i,c):(ee(),p(a[m],1,1,()=>{a[m]=null}),le(),r=a[l],r?r.p(i,c):(r=a[l]=b[l](i),r.c()),w(r,1),r.m(o.parentNode,o))},i(i){u||(w(e.$$.fragment,i),w(r),u=!0)},o(i){p(e.$$.fragment,i),p(r),u=!1},d(i){j(e,i),i&&T(t),a[l].d(i),i&&T(o)}}}function ml(n,e,t){let{$$slots:l={},$$scope:r}=e,{value:o=null}=e,{subtitle:u=null}=e,{source:b}=e,{label:a=void 0}=e,{show_label:s=!0}=e,{mirror_webcam:i=!1}=e,{include_audio:c}=e;const _=fe();function m({detail:g}){_("change",g),_("upload",g),t(0,o=g)}function y({detail:g}){t(0,o=null),_("change",g),_("clear")}let C=!1;function P(g){C=g,t(7,C)}function X(g){U.call(this,n,g)}const D=({detail:g})=>_("change",g);function z(g){U.call(this,n,g)}function R(g){U.call(this,n,g)}function A(g){U.call(this,n,g)}return n.$$set=g=>{"value"in g&&t(0,o=g.value),"subtitle"in g&&t(1,u=g.subtitle),"source"in g&&t(2,b=g.source),"label"in g&&t(3,a=g.label),"show_label"in g&&t(4,s=g.show_label),"mirror_webcam"in g&&t(5,i=g.mirror_webcam),"include_audio"in g&&t(6,c=g.include_audio),"$$scope"in g&&t(18,r=g.$$scope)},n.$$.update=()=>{n.$$.dirty&128&&_("drag",C)},[o,u,b,a,s,i,c,C,_,m,y,l,P,X,D,z,R,A,r]}let dl=class extends Y{constructor(e){super(),Z(this,e,ml,_l,Q,{value:0,subtitle:1,source:2,label:3,show_label:4,mirror_webcam:5,include_audio:6})}};function bl(n){let e,t,l,r,o,u,b,a;return e=new we({props:{src:n[0].data,subtitle:n[1]?.data,mirror:!1}}),e.$on("play",n[4]),e.$on("pause",n[5]),e.$on("ended",n[6]),o=new Fe({props:{Icon:He,label:"Download"}}),{c(){V(e.$$.fragment),t=J(),l=q("div"),r=q("a"),V(o.$$.fragment),f(r,"href",u=n[0].data),f(r,"target",window.__is_colab__?"_blank":null),f(r,"download",b=n[0].orig_name||n[0].name),f(l,"class","download svelte-90pr3x"),f(l,"data-testid","download-div")},m(s,i){N(e,s,i),B(s,t,i),B(s,l,i),v(l,r),N(o,r,null),a=!0},p(s,i){const c={};i&1&&(c.src=s[0].data),i&2&&(c.subtitle=s[1]?.data),e.$set(c),(!a||i&1&&u!==(u=s[0].data))&&f(r,"href",u),(!a||i&1&&b!==(b=s[0].orig_name||s[0].name))&&f(r,"download",b)},i(s){a||(w(e.$$.fragment,s),w(o.$$.fragment,s),a=!0)},o(s){p(e.$$.fragment,s),p(o.$$.fragment,s),a=!1},d(s){j(e,s),s&&T(t),s&&T(l),j(o)}}}function gl(n){let e,t;return e=new Oe({props:{size:"large",unpadded_box:!0,$$slots:{default:[hl]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(l,r){N(e,l,r),t=!0},p(l,r){const o={};r&1024&&(o.$$scope={dirty:r,ctx:l}),e.$set(o)},i(l){t||(w(e.$$.fragment,l),t=!0)},o(l){p(e.$$.fragment,l),t=!1},d(l){j(e,l)}}}function hl(n){let e,t;return e=new ce({}),{c(){V(e.$$.fragment)},m(l,r){N(e,l,r),t=!0},i(l){t||(w(e.$$.fragment,l),t=!0)},o(l){p(e.$$.fragment,l),t=!1},d(l){j(e,l)}}}function pl(n){let e,t,l,r,o,u;e=new pe({props:{show_label:n[3],Icon:ce,label:n[2]||"Video"}});const b=[gl,bl],a=[];function s(i,c){return i[0]===null?0:1}return l=s(n),r=a[l]=b[l](n),{c(){V(e.$$.fragment),t=J(),r.c(),o=ne()},m(i,c){N(e,i,c),B(i,t,c),a[l].m(i,c),B(i,o,c),u=!0},p(i,[c]){const _={};c&8&&(_.show_label=i[3]),c&4&&(_.label=i[2]||"Video"),e.$set(_);let m=l;l=s(i),l===m?a[l].p(i,c):(ee(),p(a[m],1,1,()=>{a[m]=null}),le(),r=a[l],r?r.p(i,c):(r=a[l]=b[l](i),r.c()),w(r,1),r.m(o.parentNode,o))},i(i){u||(w(e.$$.fragment,i),w(r),u=!0)},o(i){p(e.$$.fragment,i),p(r),u=!1},d(i){j(e,i),i&&T(t),a[l].d(i),i&&T(o)}}}function wl(n,e,t){let{value:l=null}=e,{subtitle:r=null}=e,{label:o=void 0}=e,{show_label:u=!0}=e,b=null,a=null;const s=fe();Se(async()=>{l!==b&&r!==a&&a!==null&&(b=l,t(0,l=null),await ue(),t(0,l=b)),b=l,a=r});function i(m){U.call(this,n,m)}function c(m){U.call(this,n,m)}function _(m){U.call(this,n,m)}return n.$$set=m=>{"value"in m&&t(0,l=m.value),"subtitle"in m&&t(1,r=m.subtitle),"label"in m&&t(2,o=m.label),"show_label"in m&&t(3,u=m.show_label)},n.$$.update=()=>{n.$$.dirty&1&&l&&s("change",l)},[l,r,o,u,i,c,_]}class kl extends Y{constructor(e){super(),Z(this,e,wl,pl,Q,{value:0,subtitle:1,label:2,show_label:3})}}function vl(n){let e,t;return e=new dl({props:{value:n[12],subtitle:n[13],label:n[5],show_label:n[7],source:n[6],mirror_webcam:n[9],include_audio:n[10],$$slots:{default:[Bl]},$$scope:{ctx:n}}}),e.$on("change",n[15]),e.$on("drag",n[21]),e.$on("error",n[22]),e.$on("clear",n[23]),e.$on("play",n[24]),e.$on("pause",n[25]),e.$on("upload",n[26]),{c(){V(e.$$.fragment)},m(l,r){N(e,l,r),t=!0},p(l,r){const o={};r&4096&&(o.value=l[12]),r&8192&&(o.subtitle=l[13]),r&32&&(o.label=l[5]),r&128&&(o.show_label=l[7]),r&64&&(o.source=l[6]),r&512&&(o.mirror_webcam=l[9]),r&1024&&(o.include_audio=l[10]),r&268435456&&(o.$$scope={dirty:r,ctx:l}),e.$set(o)},i(l){t||(w(e.$$.fragment,l),t=!0)},o(l){p(e.$$.fragment,l),t=!1},d(l){j(e,l)}}}function yl(n){let e,t;return e=new kl({props:{value:n[12],subtitle:n[13],label:n[5],show_label:n[7]}}),e.$on("play",n[19]),e.$on("pause",n[20]),{c(){V(e.$$.fragment)},m(l,r){N(e,l,r),t=!0},p(l,r){const o={};r&4096&&(o.value=l[12]),r&8192&&(o.subtitle=l[13]),r&32&&(o.label=l[5]),r&128&&(o.show_label=l[7]),e.$set(o)},i(l){t||(w(e.$$.fragment,l),t=!0)},o(l){p(e.$$.fragment,l),t=!1},d(l){j(e,l)}}}function Bl(n){let e,t;return e=new Je({props:{type:"video"}}),{c(){V(e.$$.fragment)},m(l,r){N(e,l,r),t=!0},p:I,i(l){t||(w(e.$$.fragment,l),t=!0)},o(l){p(e.$$.fragment,l),t=!1},d(l){j(e,l)}}}function Tl(n){let e,t,l,r,o,u;const b=[n[1]];let a={};for(let _=0;_<b.length;_+=1)a=Ie(a,b[_]);e=new Ee({props:a});const s=[yl,vl],i=[];function c(_,m){return _[11]==="static"?0:1}return l=c(n),r=i[l]=s[l](n),{c(){V(e.$$.fragment),t=J(),r.c(),o=ne()},m(_,m){N(e,_,m),B(_,t,m),i[l].m(_,m),B(_,o,m),u=!0},p(_,m){const y=m&2?Pe(b,[De(_[1])]):{};e.$set(y);let C=l;l=c(_),l===C?i[l].p(_,m):(ee(),p(i[C],1,1,()=>{i[C]=null}),le(),r=i[l],r?r.p(_,m):(r=i[l]=s[l](_),r.c()),w(r,1),r.m(o.parentNode,o))},i(_){u||(w(e.$$.fragment,_),w(r),u=!0)},o(_){p(e.$$.fragment,_),p(r),u=!1},d(_){j(e,_),_&&T(t),i[l].d(_),_&&T(o)}}}function Vl(n){let e,t;return e=new Re({props:{visible:n[4],variant:n[11]==="dynamic"&&n[0]===null&&n[6]==="upload"?"dashed":"solid",border_mode:n[14]?"focus":"base",padding:!1,elem_id:n[2],elem_classes:n[3],style:{height:n[8].height,width:n[8].width},allow_overflow:!1,$$slots:{default:[Tl]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(l,r){N(e,l,r),t=!0},p(l,[r]){const o={};r&16&&(o.visible=l[4]),r&2113&&(o.variant=l[11]==="dynamic"&&l[0]===null&&l[6]==="upload"?"dashed":"solid"),r&16384&&(o.border_mode=l[14]?"focus":"base"),r&4&&(o.elem_id=l[2]),r&8&&(o.elem_classes=l[3]),r&256&&(o.style={height:l[8].height,width:l[8].width}),r&268467938&&(o.$$scope={dirty:r,ctx:l}),e.$set(o)},i(l){t||(w(e.$$.fragment,l),t=!0)},o(l){p(e.$$.fragment,l),t=!1},d(l){j(e,l)}}}function Nl(n,e,t){let{elem_id:l=""}=e,{elem_classes:r=[]}=e,{visible:o=!0}=e,{value:u=null}=e,b=null,{label:a}=e,{source:s}=e,{root:i}=e,{root_url:c}=e,{show_label:_}=e,{loading_status:m}=e,{style:y={}}=e,{mirror_webcam:C}=e,{include_audio:P}=e,{mode:X}=e,D=null,z=null,R=!1;const A=fe();function g({detail:d}){d!=null?t(0,u=[d,null]):t(0,u=null),A("change")}function F(d){U.call(this,n,d)}function W(d){U.call(this,n,d)}const x=({detail:d})=>t(14,R=d),G=({detail:d})=>{t(1,m=m||{}),t(1,m.status="error",m),t(1,m.message=d,m)};function O(d){U.call(this,n,d)}function E(d){U.call(this,n,d)}function h(d){U.call(this,n,d)}function K(d){U.call(this,n,d)}return n.$$set=d=>{"elem_id"in d&&t(2,l=d.elem_id),"elem_classes"in d&&t(3,r=d.elem_classes),"visible"in d&&t(4,o=d.visible),"value"in d&&t(0,u=d.value),"label"in d&&t(5,a=d.label),"source"in d&&t(6,s=d.source),"root"in d&&t(16,i=d.root),"root_url"in d&&t(17,c=d.root_url),"show_label"in d&&t(7,_=d.show_label),"loading_status"in d&&t(1,m=d.loading_status),"style"in d&&t(8,y=d.style),"mirror_webcam"in d&&t(9,C=d.mirror_webcam),"include_audio"in d&&t(10,P=d.include_audio),"mode"in d&&t(11,X=d.mode)},n.$$.update=()=>{n.$$.dirty&196609&&(u!=null?(t(12,D=be(u[0],i,c)),t(13,z=be(u[1],i,c))):(t(12,D=null),t(13,z=null))),n.$$.dirty&262145&&JSON.stringify(u)!==JSON.stringify(b)&&(t(18,b=u),A("change"))},[u,m,l,r,o,a,s,_,y,C,P,X,D,z,R,g,i,c,b,F,W,x,G,O,E,h,K]}class jl extends Y{constructor(e){super(),Z(this,e,Nl,Vl,Q,{elem_id:2,elem_classes:3,visible:4,value:0,label:5,source:6,root:16,root_url:17,show_label:7,loading_status:1,style:8,mirror_webcam:9,include_audio:10,mode:11})}}const Al=jl,Ol=["static","dynamic"],Hl=n=>({type:{input_payload:"{ name: string; data: string }",response_object:"{ name: string; data: string, is_file: boolean }"},description:{input_payload:"object with file name and base64 data",response_object:"object that includes path to video file. The URL: {ROOT}file={name} contains the data"}});export{Al as Component,Hl as document,Ol as modes}; | |
//# sourceMappingURL=index-dab60517.js.map | |