PageSourceSearch

https://www.vdocipher.com/dashboard/assets/index-CqKI3YMh.js

js vdocipher.com collected 2026-09-24 17:15:29 UTC 5,008 bytes, 1 lines download raw bytes

1import{j as e,y as k,z as B,C as R,U as z,H as L,x as I,a1 as H,r as n,W as A,m as F,e3 as M,e4 as r,Q as q,eC as G,e2 as K,e5 as O,cH as Q,k as W,K as P,ac as _}from"./main-aBTKHUp_.js";import{L as $}from"./loading-Bk1A64wn.js";import{T as U}from"./TablePagination-BtH5DZhT.js";import{T as J}from"./TableHead-CJLY4dpJ.js";import"./LastPage-DU8rFpBX.js";const X=()=>{H("/dashboard")},Y=()=>e.jsxs(k,{maxWidth:"sm",open:!0,children:[e.jsx(B,{children:"Vimeo Import Not Allowed"}),e.jsx(R,{children:e.jsx(z,{children:"Vimeo only allows video export iff you have a Pro, Business or Premium Membership."})}),e.jsx(L,{children:e.jsx(I,{onClick:X,color:"primary",autoFocus:!0,children:"Dashboard"})})]}),Z=({total:t,pagination:c,disabled:o,onPageChange:d,onRowsPerPageChange:j})=>{const{current:m=1,perPage:h=6}=c||{},[p,x]=n.useState(""),a=Math.max(1,Math.ceil(t/h)),f=()=>{const s=parseInt(p,10);if(isNaN(s))return;const u=Math.min(Math.max(s,1),a);x(""),u!==m&&d(u-1,h)};return e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:8,paddingTop:18},children:[e.jsx(U,{component:"div",disabled:o,count:t,page:m-1,onPageChange:(s,u)=>d(u,h),rowsPerPage:h,rowsPerPageOptions:[10,25,50,100],onRowsPerPageChange:s=>s.target&&j(parseInt(s.target.value,10))}),a>2&&e.jsxs(e.Fragment,{children:[e.jsx(A,{label:"Go to page",size:"small",type:"number",disabled:o,value:p,inputProps:{min:1,max:a,style:{width:96}},onChange:s=>x(s.target.value),onKeyDown:s=>s.key==="Enter"&&f()}),e.jsx(I,{variant:"outlined",size:"small",disabled:o||p==="",onClick:f,children:"Go"})]})]})},ee=(t={})=>F({url:"/videos/import/vimeo/list",method:"POST",data:t}),te=t=>F({url:`/videos/import/vimeo/${t}`,method:"POST",data:{}}),oe=({id:t,name:c,duration:o,status:d,thumbnail:j,createdAt:m,imported:h,importedVideoID:p,onImport:x})=>{const[a,f]=n.useState(!1),[s,u]=n.useState(d!=="available"?`Vimeo Status : ${d}`:"Import"),[g,w]=n.useState(p);return e.jsxs(M,{children:[e.jsx(r,{children:e.jsx("img",{src:j,height:50,width:"auto",alt:c,loading:"lazy"})}),e.jsx(r,{children:c}),e.jsx(r,{children:o}),e.jsx(q,{title:m,placement:"left-start",children:e.jsx(r,{children:G(m)})}),e.jsx(r,{children:g?e.jsx(e.Fragment,{children:g}):e.jsx(I,{size:"small",color:"primary",disabled:a||h||d!=="available",onClick:()=>{f(!0),u("Importing..."),x(t,(C,T)=>{T||w(C)})},children:s})})]},t)},se=({onImport:t,videos:c})=>e.jsxs(K,{children:[e.jsx(J,{children:e.jsxs(M,{children:[e.jsx(r,{}),e.jsx(r,{children:"Title"}),e.jsx(r,{children:"Duration"}),e.jsx(r,{children:"Created At"}),e.jsx(r,{})]})}),e.jsx(O,{children:c.map(o=>e.jsx(oe,{id:o.id,name:o.name,duration:o.duration,status:o.status,thumbnail:o.thumbnail,imported:o.imported,importedVideoID:o.importedVideoID,createdAt:o.created_time,onImport:t},o.id))})]}),ie=()=>{window.location.href="/api/videos/import/vimeo/auth/redirect"},ne=()=>{const t=Q();return e.jsxs(k,{maxWidth:"sm",open:!0,onClose:t.goBack,children:[e.jsx(B,{children:"Vimeo Connect Required"}),e.jsx(R,{children:e.jsx(z,{children:"Vimeo accounts need to be connected in order to view/import videos."})}),e.jsxs(L,{children:[e.jsx(I,{onClick:t.goBack,color:"primary",children:"Cancel"}),e.jsx(I,{onClick:ie,color:"primary",variant:"contained",autoFocus:!0,children:"Connect"})]})]})},D=()=>e.jsx(P,{item:!0,xs:4,children:e.jsx("div",{style:{minHeight:400},children:e.jsx($,{loadingMessage:"Fetching videos"})})}),re=t=>{const{location:{hash:c=""}={}}=t,o=c==="#not-allowed",[d,j]=n.useState(!1),[m,h]=n.useState(null),[p,x]=n.useState(!1),[a,f]=n.useState(""),[s,u]=n.useState("");async function g(i=0,V=100,l=s){x(!0);try{const{data:y}=await ee({page:i+1,per_page:V,...l?{query:l}:{}});h(y),u(l)}catch(y){const{status:E}=y;E===409?j(!0):console.error("[VimeoImport][fetchVideos][error] ",y)}x(!1)}async function w(i,V){try{const{data:{id:l=""}={}}=await te(i);V(l,null)}catch(l){const{status:y}=l;y===409?j(!0):(console.error("[VimeoImport][importVideo][error] ",l),V(null,l))}}n.useEffect(()=>{!o&&g()},[]);const{total:C=-1,data:T=[],pagination:b={}}=m||{},S=()=>{const i=a.trim();i!==s&&g(0,b.perPage||100,i)},N=e.jsxs("div",{style:{display:"flex",gap:8,marginBottom:18},children:[e.jsx(A,{label:"Search videos",size:"small",style:{width:320},value:a,onChange:i=>f(i.target.value),onKeyDown:i=>i.key==="Enter"&&S()}),e.jsx(I,{variant:"outlined",size:"small",disabled:a.trim()===s,onClick:S,children:"Search"})]});let v=e.jsx(D,{});return o?v=e.jsx(Y,{}):p?v=e.jsx(D,{}):d?v=e.jsx(ne,{}):m&&(v=e.jsxs(_,{style:{width:"100%",padding:18},variant:"elevation",children:[N,e.jsx(se,{total:C,videos:T,pagination:b,onImport:w}),e.jsx(Z,{total:C,pagination:b,onPageChange:(i,V)=>g(i,V),onRowsPerPageChange:i=>g(0,i)})]})),e.jsx("div",{className:"video-list-container",children:e.jsx(P,{container:!0,spacing:3,children:e.jsx(P,{item:!0,xs:12,children:e.jsx(P,{container:!0,direction:"row",justify:"center",alignItems:"center",style:{padding:36},children:v})})})})},ae=t=>t,ue=W(ae)(re);export{ue as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.