@swiftcast/clip-editor-react 0.0.1-alpha.6 → 0.0.2
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.
- package/dist/index.html +1 -1
- package/dist/mf-manifest.json +33 -32
- package/dist/mf-stats.json +33 -32
- package/dist/remoteEntry.js +3 -3
- package/dist/static/css/async/{__federation_expose_WorkFlow.53ab9a50.css → __federation_expose_WorkFlow.3ee29d14.css} +1 -1
- package/dist/static/js/{637.83cf8d27.js → 94.b12ae178.js} +4 -4
- package/dist/static/js/async/115.cc1fa793.js +2 -0
- package/dist/static/js/async/115.cc1fa793.js.LICENSE.txt +9 -0
- package/dist/static/js/async/194.1c950ca8.js +1 -0
- package/dist/static/js/async/304.e8652e65.js +2 -0
- package/dist/static/js/async/304.e8652e65.js.LICENSE.txt +9 -0
- package/dist/static/js/async/307.c4997706.js +2 -0
- package/dist/static/js/async/{682.f9ec3784.js.LICENSE.txt → 307.c4997706.js.LICENSE.txt} +2 -2
- package/dist/static/js/async/375.4f08c1b1.js +1 -0
- package/dist/static/js/async/432.c1467d27.js +1 -0
- package/dist/static/js/async/473.6f1380b6.js +36 -0
- package/dist/static/js/async/{593.a28c81c3.js.LICENSE.txt → 473.6f1380b6.js.LICENSE.txt} +3 -13
- package/dist/static/js/async/491.e6c05189.js +1 -0
- package/dist/static/js/async/525.8d2cc416.js +1 -0
- package/dist/static/js/async/620.b26dd7c1.js +9 -0
- package/dist/static/js/async/{914.1bc3e252.js.LICENSE.txt → 620.b26dd7c1.js.LICENSE.txt} +6 -3
- package/dist/static/js/async/{365.c527c8f5.js → 826.d0b8337b.js} +57 -53
- package/dist/static/js/async/{365.c527c8f5.js.LICENSE.txt → 826.d0b8337b.js.LICENSE.txt} +21 -1
- package/dist/static/js/async/{661.7ab5634a.js → 861.bafeeb80.js} +2 -2
- package/dist/static/js/async/{661.7ab5634a.js.LICENSE.txt → 861.bafeeb80.js.LICENSE.txt} +1 -1
- package/dist/static/js/async/{852.06f45cf6.js → 893.8969935f.js} +3 -3
- package/dist/static/js/async/{852.06f45cf6.js.LICENSE.txt → 893.8969935f.js.LICENSE.txt} +1 -1
- package/dist/static/js/async/993.5ddcca60.js +9 -0
- package/dist/static/js/async/993.5ddcca60.js.LICENSE.txt +58 -0
- package/dist/static/js/async/__federation_expose_ProjectsPage.01da0212.js +2 -0
- package/dist/static/js/async/{__federation_expose_ProjectsPage.c3d4eb98.js.LICENSE.txt → __federation_expose_ProjectsPage.01da0212.js.LICENSE.txt} +1 -1
- package/dist/static/js/async/__federation_expose_SniffingPage.da5afebe.js +1 -0
- package/dist/static/js/async/__federation_expose_WorkFlow.dc059c9e.js +11 -0
- package/dist/static/js/index.cf60526b.js +1 -0
- package/package.json +52 -51
- package/dist/static/js/async/191.71dfdad9.js +0 -2
- package/dist/static/js/async/191.71dfdad9.js.LICENSE.txt +0 -19
- package/dist/static/js/async/194.b5006c1a.js +0 -1
- package/dist/static/js/async/375.46fcb5d6.js +0 -1
- package/dist/static/js/async/491.3bcb1d90.js +0 -1
- package/dist/static/js/async/502.fcdc65e5.js +0 -3
- package/dist/static/js/async/502.fcdc65e5.js.LICENSE.txt +0 -21
- package/dist/static/js/async/525.6ae73442.js +0 -1
- package/dist/static/js/async/593.a28c81c3.js +0 -36
- package/dist/static/js/async/682.f9ec3784.js +0 -2
- package/dist/static/js/async/720.a9a82d77.js +0 -1
- package/dist/static/js/async/914.1bc3e252.js +0 -3
- package/dist/static/js/async/__federation_expose_ProjectsPage.c3d4eb98.js +0 -2
- package/dist/static/js/async/__federation_expose_SniffingPage.f4c73b9b.js +0 -1
- package/dist/static/js/async/__federation_expose_WorkFlow.a7a39987.js +0 -11
- package/dist/static/js/index.d158f4a7.js +0 -1
- /package/dist/static/css/async/{139.ecec5306.css → 505.ecec5306.css} +0 -0
@@ -9,17 +9,7 @@
|
|
9
9
|
|
10
10
|
/**
|
11
11
|
* @license React
|
12
|
-
* react-jsx-runtime.production.
|
13
|
-
*
|
14
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
15
|
-
*
|
16
|
-
* This source code is licensed under the MIT license found in the
|
17
|
-
* LICENSE file in the root directory of this source tree.
|
18
|
-
*/
|
19
|
-
|
20
|
-
/**
|
21
|
-
* @license React
|
22
|
-
* use-sync-external-store-shim.production.js
|
12
|
+
* react-jsx-runtime.production.js
|
23
13
|
*
|
24
14
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
25
15
|
*
|
@@ -29,7 +19,7 @@
|
|
29
19
|
|
30
20
|
/**
|
31
21
|
* @license React
|
32
|
-
* use-sync-external-store-shim
|
22
|
+
* use-sync-external-store-shim.production.js
|
33
23
|
*
|
34
24
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
35
25
|
*
|
@@ -38,7 +28,7 @@
|
|
38
28
|
*/
|
39
29
|
|
40
30
|
/**
|
41
|
-
* @license lucide-react v0.
|
31
|
+
* @license lucide-react v0.501.0 - ISC
|
42
32
|
*
|
43
33
|
* This source code is licensed under the ISC license.
|
44
34
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunkremote=self.webpackChunkremote||[]).push([["491"],{52099:function(e,t,s){s.d(t,{u:()=>a});var l=s(70813),i=s(37287);s(91415);var r=s(71553),n=s(65005);let a=e=>{let{children:t,content:s,tooltipContentClassName:a}=e;return(0,l.jsxs)("div",{className:"inline-flex whitespace-nowrap justify-center items-center w-fit",children:[t,(0,l.jsx)(n.pn,{children:(0,l.jsxs)(n.u,{children:[(0,l.jsx)(n.aJ,{className:"inline-flex w-fit",children:(0,l.jsx)(i.Z,{className:"ml-1",size:15})}),(0,l.jsx)(n._v,{className:(0,r.cn)("max-w-60 overflow-y-auto h-full",a),children:(0,l.jsx)("div",{children:s})})]})})]})}},38137:function(e,t,s){s.d(t,{Z:()=>eg});var l=s(70813),i=s(53589),r=s(71553);let n=async(e,t)=>{try{let s=`/sniffing/account/${e.replace(" ","")}/${t}`;return await i.hi.get(s)}catch(e){console.error("Error fetching video posts:",e)}},a=async(e,t)=>{try{let s=`/sniffing/video/${e.replace(" ","")}/${t}`;return await i.hi.get(s)}catch(e){console.error("Error fetching video posts:",e)}};var c=s(55429),o=s(67961),d=(s(28649),s(91415)),u=s.n(d);let m=d.forwardRef((e,t)=>{let{...s}=e;return(0,l.jsx)("nav",{ref:t,"aria-label":"breadcrumb",...s})});m.displayName="Breadcrumb";let x=d.forwardRef((e,t)=>{let{className:s,...i}=e;return(0,l.jsx)("ol",{ref:t,className:(0,r.cn)("flex flex-wrap items-center gap-1.5 break-words text-sm text-zinc-500 sm:gap-2.5 dark:text-zinc-400",s),...i})});x.displayName="BreadcrumbList";let h=d.forwardRef((e,t)=>{let{className:s,...i}=e;return(0,l.jsx)("li",{ref:t,className:(0,r.cn)("inline-flex items-center gap-1.5",s),...i})});h.displayName="BreadcrumbItem";let f=d.forwardRef((e,t)=>{let{asChild:s,className:i,...n}=e,a=s?c.g7:"a";return(0,l.jsx)(a,{ref:t,className:(0,r.cn)("transition-colors hover:text-zinc-950 dark:hover:text-zinc-50",i),...n})});f.displayName="BreadcrumbLink";let j=d.forwardRef((e,t)=>{let{className:s,...i}=e;return(0,l.jsx)("span",{ref:t,role:"link","aria-disabled":"true","aria-current":"page",className:(0,r.cn)("font-normal font-semibold text-zinc-950 text- dark:text-zinc-50",s),...i})});j.displayName="BreadcrumbPage";let g=e=>{let{children:t,className:s,...i}=e;return(0,l.jsx)("li",{role:"presentation","aria-hidden":"true",className:(0,r.cn)("[&>svg]:w-3.5 [&>svg]:h-3.5",s),...i,children:t??(0,l.jsx)(o.Z,{})})};g.displayName="BreadcrumbSeparator";var p=s(57282);let v=e=>{let{data_type:t,links:s,children:i}=e;function r(e,s){return"account_add_sniffing"==e?(0,l.jsx)(f,{href:"http://dev.swfitcast.ai:8001/swfitcast_admin/",children:s}):t!=e?(0,l.jsx)(f,{href:`?data_type=${e}`,children:s}):(0,l.jsx)(j,{children:s})}return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"h-10 px-4 w-full inline-flex items-center justify-between",children:[(0,l.jsx)(m,{children:(0,l.jsxs)(x,{children:[(0,l.jsx)(h,{children:r(s[0].key,s[0].value)},"crumb-0"),s.slice(1).map((e,t)=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(g,{},`crumb${t+1}`),(0,l.jsx)(h,{children:r(e.key,e.value)},`crumb${t}`)]}))]})}),i]}),(0,l.jsx)(p.Z,{})]})},w=[{key:"video_sniffing",value:"视频"},{key:"account_sniffing",value:"账号"}];var _=s(45299),y=s(31421),N=s(48959),b=s(39378),k=s.n(b),C=s(76920),z=s(13338),S=s(66540),F=s(30564),R=s(85132),T=s(12187),K=s(30157),Z=s(85737),V=s(94502);let M=e=>{let{generateCurrentTableData:t}=e,[s,i]=(0,d.useState)(""),[n,a]=(0,d.useState)(!1);return(0,l.jsxs)(Z.J2,{children:[(0,l.jsxs)(Z.xo,{children:[" ",(0,l.jsx)(K.z,{className:"ml-1 h-8 w-8 ",variant:"outline",size:"sm",onClick:()=>{},children:(0,l.jsx)(R.Z,{})})]}),(0,l.jsxs)(Z.yk,{className:"w-[700px]",children:[(0,l.jsxs)("div",{children:[(0,l.jsxs)(K.z,{disabled:n,onClick:async()=>{let e=(0,N.iL)({fieldSeparator:",",decimalSeparator:".",useKeysAsHeaders:!0,filename:`${(0,r.eF)()}`});(0,N.gB)(e)(t()),a(!0),i("loading...."),a(!1)},children:["Ask 广林 ",n&&(0,l.jsx)(T.Z,{className:"animate-spin"})]})," ",(0,l.jsx)("span",{className:"ml-2 text-sm",children:"关闭设置 chrome://flags/#block-insecure-private-network-requests"})]}),(0,l.jsx)(V.g,{className:"mt-4 min-h-[500px]",value:s})]})]})};var $=s(17511),L=s(44153);let P=e=>{let{className:t}=e;return(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:(0,r.cn)("animate-spin",t),children:(0,l.jsx)("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})})};var D=s(72513),A=s(95269);class B extends u().PureComponent{componentDidMount(){this.props.listenRef.addEventListener("scroll",this.onScroll)}componentWillUnmount(){this.props.listenRef.removeEventListener("scroll",this.onScroll)}render(){return(0,l.jsx)("div",{style:{position:"absolute",float:"right",right:"20px",bottom:"20px",width:"40px",textAlign:"center",zIndex:2},children:this.isShowAvailable()&&(0,l.jsx)("div",{className:"bg-gray-200 w-fit rounded-md p-1 cursor-pointer",onClick:this.scrollToTop,children:(0,l.jsx)(A.Z,{})})})}constructor(...e){super(...e),(0,D._)(this,"state",{scrollLastTop:this.props.listenRef.scrollTop}),(0,D._)(this,"isShowAvailable",()=>this.props.listenRef.scrollHeight>window.innerHeight&&5*this.props.listenRef.scrollTop>this.props.listenRef.scrollHeight),(0,D._)(this,"scrollToTop",()=>{null!=this.props.listenRef&&this.props.listenRef.scrollTo({top:0,left:0,behavior:"smooth"})}),(0,D._)(this,"onScroll",()=>{this.setState({scrollLastTop:this.props.listenRef.scrollTop})})}}function E(e){var t,s;let{columns:i,data:n,filter:a,init:c={defaultSortColumn:void 0,pageIndex:0,pageSize:Number.MAX_VALUE,disableTool:!1},loading:u=!1,assistTools:m,height:x=""}=e,[h,f]=d.useState([]),[j,g]=d.useState([]),[p,v]=d.useState({}),[w,b]=d.useState({}),R=(0,d.useRef)(null),T=(0,_.b7)({data:n,columns:i,onSortingChange:f,onColumnFiltersChange:g,getCoreRowModel:(0,y.sC)(),getPaginationRowModel:(0,y.G_)(),getSortedRowModel:(0,y.tj)(),getFilteredRowModel:(0,y.vL)(),onColumnVisibilityChange:v,onRowSelectionChange:b,state:{sorting:h,columnFilters:j,columnVisibility:p,rowSelection:w},initialState:{pagination:{...c}}});(0,d.useEffect)(()=>{let e=(0,r.n6)(window.location.href).filter;e&&a&&Z(a.accessorKey,e),c&&(T.setColumnVisibility({...c.columnVisibility}),c.defaultSortColumn&&T.setSorting([{id:c.defaultSortColumn,desc:!0}]))},[]);let Z=async(e,t)=>{var s;await (null==(s=T.getColumn(e))?void 0:s.setFilterValue(t)),a&&a.callback&&setTimeout(()=>{let e=T.getFilteredRowModel().rows.map(e=>e);a.callback&&a.callback(e)},1e3)};function V(){let e=T.getPrePaginationRowModel().rows.map(e=>e.original),t={};for(let s of i)s.accessorKey&&s.csvTitle&&s.accessorKey in e[0]&&(t[s.accessorKey]=s.csvTitle);c&&c.csv&&(t={...c.csv.keyDict,...t});let s=Object.keys(t);return e.map(e=>{let t=k().pick(e,s);return c&&c.csv&&c.csv.appendRows&&(t={...t,...c.csv.appendRows(e)}),t}).map(e=>(0,r.U_)(e,t))}return(0,l.jsxs)("div",{children:[!(c&&c.disableTool)&&(0,l.jsxs)("div",{className:"flex items-center py-4 justify-between",children:[(0,l.jsxs)("div",{children:[" ",m&&m.map(e=>e)]}),(0,l.jsxs)("div",{className:"w-fit items-center inline-flex ",children:[(0,l.jsxs)("span",{className:"text-gray-400 mr-1 text-sm",children:["当前显示 ",T.getState().pagination.pageIndex+1," of"," ",T.getPageCount()," 页,总"," ",T.getFilteredRowModel().rows.length," 行"]}),(0,l.jsx)(K.z,{variant:"outline",size:"sm",className:"ml-1 h-8 w-8",onClick:()=>T.previousPage(),disabled:!T.getCanPreviousPage(),children:(0,l.jsx)(C.Z,{})}),(0,l.jsx)(K.z,{className:"ml-1 h-8 w-8 ",variant:"outline",size:"sm",onClick:()=>T.nextPage(),disabled:!T.getCanNextPage(),children:(0,l.jsx)(o.Z,{})}),c&&c.enableAI&&(0,l.jsx)(M,{generateCurrentTableData:V}),a?(0,l.jsx)(l.Fragment,{children:(0,l.jsx)("div",{className:"w-fit inline-flex ml-1",children:(0,l.jsxs)("div",{className:(0,r.cn)("flex h-8 items-center rounded-md border border-input bg-white pr-3 text-sm ring-offset-background focus-within:ring-1 focus-within:ring-ring focus-within:ring-offset-2"),children:[(0,l.jsx)("input",{placeholder:`Filter ${a.placement}...`,value:(null==(t=T.getColumn(a.accessorKey))?void 0:t.getFilterValue())??"",onChange:e=>{Z(a.accessorKey,e.target.value)},className:"w-full h-7 p-2 placeholder:text-muted-foreground focus-visible:outline-hidden disabled:cursor-not-allowed disabled:opacity-50"}),(0,l.jsx)("div",{className:" ml-1 hover:cursor-pointer opacity-10 hover:opacity-100 ",onClick:()=>{T.resetColumnFilters()},children:(0,l.jsx)(z.Z,{size:15})})]})})}):(0,l.jsx)("div",{}),(0,l.jsx)(K.z,{size:"sm",variant:"outline",className:"ml-1 h-8 w-8",onClick:()=>{let e=V(),t=[];Object.keys(e[0]).forEach(e=>{let s={key:e,displayLabel:e};e.includes("id")?t.unshift(s):t.push(s)});let s=(0,N.iL)({fieldSeparator:",",decimalSeparator:".",useKeysAsHeaders:!1,columnHeaders:t,filename:`${(0,r.eF)()}`}),l=(0,N.gB)(s);(0,N.LR)(s)(l(e))},children:(0,l.jsx)(S.Z,{})}),(0,l.jsxs)($.h_,{children:[(0,l.jsx)($.$F,{asChild:!0,children:(0,l.jsxs)(K.z,{variant:"outline",className:"ml-1 h-8",children:["显示列 ",(0,l.jsx)(F.Z,{})]})}),(0,l.jsx)($.AW,{align:"end",children:T.getAllColumns().filter(e=>e.getCanHide()).map(e=>(0,l.jsx)($.bO,{className:"capitalize",checked:e.getIsVisible(),onCheckedChange:t=>e.toggleVisibility(!!t),children:e.columnDef.csvTitle?e.columnDef.csvTitle:e.id},e.id))})]})]})]}),(0,l.jsx)("div",{className:"rounded-md border",children:u?(0,l.jsx)("div",{className:"flex w-full h-[600px] justify-center items-center",children:(0,l.jsx)(P,{})}):(0,l.jsxs)(L.iA,{ref:R,className:(0,r.cn)("inline-block overflow-y-auto w-full",x),children:[(0,l.jsx)(L.xD,{className:"sticky top-0 bg-white z-10 shadow-xs",children:T.getHeaderGroups().map(e=>(0,l.jsx)(L.SC,{children:e.headers.map(e=>(0,l.jsx)(L.ss,{children:e.isPlaceholder?null:(0,_.ie)(e.column.columnDef.header,e.getContext())},e.id))},e.id))}),(0,l.jsx)(L.RM,{className:"relative",children:(null==(s=T.getRowModel().rows)?void 0:s.length)?T.getRowModel().rows.map(e=>(0,l.jsx)(L.SC,{"data-state":e.getIsSelected()&&"selected",children:e.getVisibleCells().map(e=>(0,l.jsx)(L.pj,{children:(0,_.ie)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,l.jsx)(L.SC,{children:(0,l.jsx)(L.pj,{colSpan:null==i?void 0:i.length,className:"h-24 text-center",children:"No results."})})}),R.current&&(0,l.jsx)(B,{listenRef:R.current})]})})]})}let H=e=>{let{children:t,link:s,className:i}=e;return(0,l.jsx)("a",{target:"_blank",href:s,className:(0,r.cn)("cursor-pointer mx-1 inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 text-foreground",i),rel:"noreferrer",children:t})},Y=e=>{let{link:t,className:s}=e;return(0,l.jsx)(H,{link:t,className:(0,r.cn)(!t&&"text-gray-400 cursor-default"),children:"抖音"})},I=e=>{let{children:t,className:s,src:i}=e;return(0,l.jsx)("a",{className:(0,r.cn)("hover:underline",s),href:function(e){let t=new URLSearchParams(window.location.search);return t.set("filter",e),i&&t.set("data_type",i),`?${t.toString()}`}(t),children:t})};var Q=s(89783);let J=d.forwardRef((e,t)=>{let{className:s,...i}=e;return(0,l.jsx)(Q.fC,{ref:t,className:(0,r.cn)("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",s),...i})});J.displayName=Q.fC.displayName;let O=d.forwardRef((e,t)=>{let{className:s,...i}=e;return(0,l.jsx)(Q.Ee,{ref:t,className:(0,r.cn)("aspect-square h-full w-full",s),...i})});O.displayName=Q.Ee.displayName;let U=d.forwardRef((e,t)=>{let{className:s,...i}=e;return(0,l.jsx)(Q.NY,{ref:t,className:(0,r.cn)("flex h-full w-full items-center justify-center rounded-full bg-zinc-100 dark:bg-zinc-800",s),...i})});U.displayName=Q.NY.displayName;let W=e=>{let{account:t}=e;return k().isEmpty(t.name)?"":(0,l.jsxs)("div",{className:"inline-flex w-fit justify-center items-center ",children:[(0,l.jsxs)(J,{className:"w-8 h-8",children:[(0,l.jsx)(O,{src:t.user_cover}),(0,l.jsx)(U,{children:t.sid})]}),(0,l.jsx)(I,{className:"ml-2",src:"video_sniffing",children:t.name?t.name:""})," ",(0,l.jsx)(Y,{link:t.user_visit_url})]})};var q=s(52099),G=s(84025),X=s.n(G);let ee=e=>{let{src:t,className:s}=e;return(0,l.jsxs)(Z.J2,{children:[(0,l.jsxs)(Z.xo,{children:[" ",(0,l.jsx)("img",{className:(0,r.cn)(s),src:t,alt:"Video Cover"})]}),(0,l.jsx)(Z.yk,{side:"top",children:(0,l.jsx)("img",{src:t,alt:"Video Cover"})})]})},et=e=>{let{children:t,link:s,className:i}=e;return(0,l.jsx)("a",{title:t,target:"_blank",className:(0,r.cn)("cursor-pointer hover:underline hover:text-blue-600 truncate max-w-[350px] ",i),href:s,rel:"noreferrer",children:t})};var es=s(11068);let el=e=>{let{info:t}=e;return(0,l.jsxs)("div",{className:"inline-flex flex-row w-[300px] overflow-hidden",children:[(0,l.jsx)("div",{children:(0,l.jsx)(ee,{src:t.cover_url,className:" min-w-[50px] h-[80px] object-cover"})}),(0,l.jsxs)("div",{className:"flex flex-col ml-2 w-full justify-center py-1 ",children:[(0,l.jsxs)("div",{className:"truncate",title:t.title,children:[(0,l.jsx)(K.z,{size:"2",variant:"ghost",onClick:async()=>{let e=(await (0,es.DQ)({task_type:"download_video",download_video_link_platform:"douyin",download_video_link:t.visit_link})).workflow_id;window.open(`https://task.8600800.com/runs/${e}`,"_blank")},children:(0,l.jsx)(S.Z,{className:"mx-2",size:1})}),(0,l.jsx)(Y,{link:t.visit_link}),t.title?t.title:"无标题"]}),(0,l.jsxs)("div",{className:"text-sm text-gray-600 truncate ",title:t.tag,children:[" ",t.tag?t.tag:"无标签"]}),(0,l.jsxs)("span",{className:"text-[10px] ",children:["发布时间:"," ",(0,l.jsx)(et,{link:t.visit_link,children:(0,r.eF)({current:t.video_create_time,format:"YYYY-MM-DD HH:mm:ss"})})]}),(0,l.jsxs)("span",{className:"text-[10px] ",title:`update_time: ${t.update_time}`,children:["爬取时间: ",function(){if(!t.update_time)return"update_time 获取异常";let e=X()().diff(X()(t.update_time),"milliseconds"),s=X().duration(e);return 0!=s.days()?`${s.days()} 天前`:0!=s.hours()?`${s.hours()} 小时 ${s.minutes()} 分钟前`:0!=s.minutes()?`${s.minutes()} 分钟前`:"时间差值计算异常"}()]})]})]})};var ei=s(20501),er=s(66089),en=s(21803);let ea=e=>{let{column:t,children:s,tooltip:i}=e,r=t.getIsSorted();function n(){return(0,l.jsxs)(K.z,{variant:"ghost",onClick:()=>{!1===r?t.toggleSorting(!0):"desc"===r?t.toggleSorting(!1):t.toggleSorting(!0)},children:[s,!1===r&&(0,l.jsx)(ei.Z,{}),"desc"===r&&(0,l.jsx)(er.Z,{className:"text-[#FF9000]"}),"asc"===r&&(0,l.jsx)(en.Z,{className:"text-[#FF9000]"})]})}return i?(0,l.jsx)(q.u,{content:i,children:n()}):n()},ec=[{csvTitle:"账号名称",header:e=>{let{column:t}=e;return(0,l.jsx)(ea,{column:t,children:"账号名称"})},accessorKey:"name",cell:e=>{let{row:t}=e,s=t.original;return(0,l.jsx)(W,{account:s})}},{csvTitle:"新增发布",accessorKey:"new_video_count",header:e=>{let{column:t}=e;return(0,l.jsx)(ea,{column:t,children:"新增发布"})},cell:e=>{let{row:t}=e,s=t.original;return(0,l.jsx)(q.u,{tooltipContentClassName:"max-w-100",content:(0,l.jsxs)("div",{className:"grid grid-cols-2 gap-1",children:[(0,l.jsx)("div",{children:" 开始时间: "}),(0,l.jsx)("div",{children:s.new_video_start_time}),(0,l.jsx)("div",{children:" 结束时间: "}),(0,l.jsx)("div",{children:s.new_video_end_time})]}),children:(0,l.jsxs)("div",{className:"text-[#FF9000]",children:[" ",s.new_video_count]})})}},{csvTitle:"新增点赞",accessorKey:"incr_digg_counts",header:e=>{let{column:t}=e;return(0,l.jsx)(ea,{column:t,children:"新增点赞"})},cell:e=>{let{row:t}=e,s=t.original;return(0,l.jsx)(q.u,{tooltipContentClassName:"max-w-100",content:(0,l.jsxs)("div",{className:"grid grid-cols-2 gap-1",children:[(0,l.jsx)("div",{children:" 开始时间:"}),(0,l.jsx)("div",{children:s.new_video_start_time}),(0,l.jsx)("div",{children:" 结束时间:"}),(0,l.jsx)("div",{children:s.new_video_end_time})]}),children:(0,l.jsxs)("div",{className:"text-[#FF9000]",children:[" ",s.incr_digg_counts]})})}},{csvTitle:"新增粉丝",accessorKey:"incr_follower_count",header:e=>{let{column:t}=e;return(0,l.jsx)(ea,{column:t,children:"新增粉丝"})},cell:e=>{let{row:t}=e,s=t.original;return(0,l.jsx)(q.u,{tooltipContentClassName:"max-w-100",content:(0,l.jsxs)("div",{className:"grid grid-cols-3 gap-1",children:[(0,l.jsx)("div",{children:" 最近日期: "}),(0,l.jsx)("div",{children:s.old_update_time}),(0,l.jsxs)("div",{children:["最近值: ",s.old_follower_count]}),(0,l.jsx)("div",{children:" 最新抓取时间: "}),(0,l.jsx)("div",{children:s.update_time}),(0,l.jsxs)("div",{children:["最新值: ",s.follower_count]})]}),children:(0,l.jsx)("div",{className:"text-[#FF9000]",children:s.incr_follower_count})})}},{csvTitle:"粉丝",accessorKey:"collect_count",header:e=>{let{column:t}=e;return(0,l.jsx)(ea,{column:t,children:"粉丝"})},cell:e=>{let{row:t}=e,s=t.original;return(0,l.jsx)("div",{children:(0,r.Zv)(s.collect_count,2)})}},{csvTitle:"获赞",accessorKey:"digg_count",header:e=>{let{column:t}=e;return(0,l.jsx)(ea,{column:t,children:"获赞"})},cell:e=>{let{row:t}=e,s=t.original;return(0,l.jsx)("div",{children:(0,r.Zv)(s.digg_count,2)})}},{csvTitle:"评论",accessorKey:"comment_counts",header:e=>{let{column:t}=e;return(0,l.jsx)(q.u,{content:"快照数据求和 comment求和",children:(0,l.jsx)(ea,{column:t,children:"总评论"})})},cell:e=>{let{row:t}=e,s=t.original;return(0,l.jsx)("div",{children:(0,r.Zv)(s.comment_counts,2)})}},{csvTitle:"分享",accessorKey:"share_counts",header:e=>{let{column:t}=e;return(0,l.jsxs)(q.u,{content:"快照数据求和 share_count 求和",children:[" ",(0,l.jsx)(ea,{column:t,children:"总分享"})]})},cell:e=>{let{row:t}=e,s=t.original;return(0,l.jsx)("div",{children:(0,r.Zv)(s.share_counts,2)})}},{csvTitle:"最近一次发布视频时间",accessorKey:"create_time",header:e=>{let{column:t}=e;return(0,l.jsx)(ea,{column:t,children:"最近一次发布视频"})},sortingFn:(e,t)=>e.original.video_create_time<t.original.video_create_time?-1:1,cell:e=>{let{row:t}=e,s=t.original;return(0,l.jsx)("div",{className:"flex flex-row w-full",children:(0,l.jsx)(el,{info:s})})}}],eo=e=>{let{cell:t,dataKey:s}=e,i=t.original;return(0,l.jsx)("div",{children:(0,r.Zv)(i[s],2)})},ed=[{csvTitle:"账号名称",accessorKey:"name",header:"账号名称",cell:e=>{let{row:t}=e,s=t.original;return(0,l.jsx)(W,{account:s})}},{csvTitle:"视频时间",accessorKey:"create_time",header:e=>{let{column:t}=e;return(0,l.jsx)(ea,{column:t,children:"视频信息"})},sortingFn:(e,t)=>X()(e.original.create_time)>X()(t.original.create_time)?1:-1,cell:e=>{let{row:t}=e,s=t.original;return(0,l.jsx)("div",{className:"flex flex-row min-w-[400px] ",children:(0,l.jsx)(el,{info:{title:s.desc,tag:s.tag,visit_link:s.link,cover_url:s.cover,video_create_time:s.create_time,update_time:s.update_time}})})}},{csvTitle:"点赞",accessorKey:"digg_count",header:e=>{let{column:t}=e;return(0,l.jsx)(ea,{column:t,children:"点赞"})},cell:e=>{let{row:t}=e;return(0,l.jsx)(eo,{cell:t,dataKey:"digg_count"})}},{csvTitle:"评论",accessorKey:"comment_count",header:e=>{let{column:t}=e;return(0,l.jsx)(ea,{column:t,children:"评论"})},cell:e=>{let{row:t}=e;return(0,l.jsx)(eo,{cell:t,dataKey:"comment_count"})}},{csvTitle:"收藏",accessorKey:"collect_count",header:e=>{let{column:t}=e;return(0,l.jsx)(ea,{column:t,children:"收藏"})},cell:e=>{let{row:t}=e;return(0,l.jsx)(eo,{cell:t,dataKey:"collect_count"})}},{csvTitle:"分享",accessorKey:"share_count",header:e=>{let{column:t}=e;return(0,l.jsx)(ea,{column:t,children:"分享"})},cell:e=>{let{row:t}=e;return(0,l.jsx)(eo,{cell:t,dataKey:"share_count"})}}];var eu=s(57972);let em="yyyy-MM-D";var ex=s(76497),eh=s(13569),ef=s(45061);let ej=e=>{let{defaultValue:t="365",callback:s}=e,i="yyyy-MM-D";return(0,l.jsxs)(eu.Ph,{defaultValue:t,onValueChange:async e=>{let t,l;4==e?(t=(0,r.eF)({offset:3,format:i}),l=(0,r.eF)({format:i})):7==e?(t=(0,r.eF)({offset:7,format:i}),l=(0,r.eF)({format:i})):15==e?(t=(0,r.eF)({offset:15,format:i}),l=(0,r.eF)({format:i})):365==e?(t=(0,r.eF)({offset:365,format:i}),l=(0,r.eF)({format:i})):(t=(0,r.eF)({offset:e,format:i}),l=(0,r.eF)({offset:e,format:i})),await s(t,l,e)},children:[(0,l.jsx)(eu.i4,{className:"w-[180px]",children:(0,l.jsx)(eu.ki,{})}),(0,l.jsxs)(eu.Bw,{children:[(0,l.jsx)(eu.Ql,{value:"365",children:"全部时间"}),(0,l.jsx)(eu.Ql,{value:"1",children:"昨天"}),(0,l.jsx)(eu.Ql,{value:"2",children:"前天"}),(0,l.jsx)(eu.Ql,{value:"3",children:"大前天"}),(0,l.jsx)(eu.Ql,{value:"4",children:"3天内"}),(0,l.jsx)(eu.Ql,{value:"7",children:"7天内"}),(0,l.jsx)(eu.Ql,{value:"15",children:"15天内"})]})]})},eg=()=>{let[e,t]=(0,d.useState)([]),[s,i]=(0,d.useState)(!0),[c,o]=(0,d.useState)(!1),[u,m]=(0,d.useState)("account_sniffing"),x=(0,eh.T)();return(0,ex.Z)(async()=>{let e=x.search.data_type;e=e||"account_sniffing",o(!0);try{let s;"account_sniffing"===e?s=await n((0,r.eF)({offset:3,format:em}),(0,r.eF)({format:em})):"video_sniffing"===e?s=await a((0,r.eF)({offset:3,format:em}),(0,r.eF)({format:em})):"account_add_sniffing"===e&&(s=[]),t(s),m(e)}finally{o(!1)}},[]),(0,l.jsxs)("div",{className:"w-fit",children:[(0,l.jsx)(v,{links:w,data_type:u,children:(0,l.jsx)(K.z,{className:"h-[20px]",size:"sm",onClick:()=>{window.open("http://122.9.155.28:7100/swfitcast_admin/account-login-info/list","_blank")},children:"添加监控账号"})}),(0,l.jsxs)(ef.Z,{spinning:c,children:["account_sniffing"===u&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)("div",{className:"px-4",children:(0,l.jsx)("div",{className:"flex flex-col w-full",children:(0,l.jsx)("div",{className:"flex w-full",children:(0,l.jsx)(E,{height:"max-h-[calc(100vh-180px)]",columns:ec.filter(e=>s||!s&&!["incr_digg_counts","incr_follower_counts"].includes(e.accessorKey)),data:e,init:{pageSize:100,defaultSortColumn:"incr_digg_counts"},filter:{placement:"账号名称",accessorKey:"name"},assistTools:[(0,l.jsx)(ej,{defaultValue:"4",callback:async(e,s,l)=>{o(!0),t(await n(e,s)),i(365!=l),o(!1)}})]})})})})}),"video_sniffing"===u&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)("div",{className:"inline-flex w-full items-center justify-center",children:(0,l.jsx)(E,{height:"max-h-[calc(100vh-180px)]",columns:ed.filter(e=>s||!s&&!["incr_video_count","incr_digg_count"].includes(e.accessorKey)),data:e,filter:{placement:" 账号名称",accessorKey:"name"},init:{pageIndex:0,pageSize:100,columnVisibility:{},defaultSortColumn:"digg_count"},assistTools:[(0,l.jsx)(ej,{defaultValue:"4",callback:async(e,s)=>{o(!0),t(await a(e,s)),o(!1)}})]})})})]})]})}},85737:function(e,t,s){s.d(t,{J2:()=>a,xo:()=>c,yk:()=>o});var l=s(70813),i=s(84095),r=s(91415),n=s(71553);let a=i.fC,c=i.xz;i.ee;let o=r.forwardRef((e,t)=>{let{className:s,align:r="center",sideOffset:a=4,...c}=e;return(0,l.jsx)(i.h_,{children:(0,l.jsx)(i.VY,{ref:t,align:r,sideOffset:a,className:(0,n.cn)("z-50 w-72 rounded-md border border-zinc-200 bg-white p-2 text-zinc-950 shadow-md outline-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-zinc-800 dark:bg-zinc-950 dark:text-zinc-50",s),...c})})});o.displayName=i.VY.displayName},94502:function(e,t,s){s.d(t,{g:()=>n});var l=s(70813),i=s(91415),r=s(71553);let n=i.forwardRef((e,t)=>{let{className:s,...i}=e;return(0,l.jsx)("textarea",{className:(0,r.cn)("flex min-h-[60px] w-full rounded-md border border-zinc-200 bg-transparent px-3 py-2 text-base shadow-xs placeholder:text-zinc-500 focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-zinc-950 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:border-zinc-800 dark:placeholder:text-zinc-400 dark:focus-visible:ring-zinc-300",s),ref:t,...i})});n.displayName="Textarea"},65005:function(e,t,s){s.d(t,{_v:()=>d,aJ:()=>o,pn:()=>a,u:()=>c});var l=s(70813),i=s(80988),r=s(91415),n=s(71553);let a=i.zt,c=i.fC,o=i.xz,d=r.forwardRef((e,t)=>{let{className:s,sideOffset:r=4,...a}=e;return(0,l.jsx)(i.h_,{children:(0,l.jsx)(i.VY,{ref:t,sideOffset:r,className:(0,n.cn)("z-50 overflow-hidden rounded-md bg-zinc-900 px-3 py-1.5 text-xs text-zinc-50 animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:bg-zinc-50 dark:text-zinc-900",s),...a})})});d.displayName=i.VY.displayName}}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunkremote=self.webpackChunkremote||[]).push([["525"],{85079:function(e,s,t){t.d(s,{z:()=>i});var a=t(70813),n=t(93573),r=t(71553);let i=e=>{let{className:s}=e;return(0,a.jsx)("div",{className:(0,r.cn)("bg-[#EFF2F9] rounded-lg m-2 inline-flex items-center justify-center",s),children:(0,a.jsx)(n.Z,{className:"text-gray-400"})})}},19813:function(e,s,t){t.d(s,{Z:()=>Q});var a=t(70813),n=t(71542),r=t(5794),i=t(91415),l=t(29055),c=t(56896),d=t(30157),o=t(36997),h=t(2552),m=t(61793),x=t(8176),u=t(30929),j=t(23942),p=t(93585),f=t(53589),v=t(57282),y=t(93330);async function N(e){try{return await f.hi.get(`/studio_manager/generate-share-link/${e}`)}catch(e){console.error("该项目共享链接生成失败:",e),(0,p.S3)("共享链接生成失败")}}async function g(e){try{let s=new URL(e).pathname.split("/").pop();return await f.hi.get(`/studio_manager/share-content/${s}`)}catch(e){console.error("使用共享链接失败:",e),(0,p.S3)("共享链接使用失败")}}function _(e){let{projectId:s,disabled:t=!1}=e,[n,r]=(0,i.useState)(!1),[l,c]=(0,i.useState)(""),[f,_]=(0,i.useState)(""),[w,b]=(0,i.useState)(!1),[S,C]=(0,i.useState)(!1),[k,z]=(0,i.useState)(!1),{t:$}=(0,y.$)();(0,i.useEffect)(()=>{let e=!0;return n&&(b(!0),(async()=>{try{let t=await N(s);e&&t&&(c(t),z(!1))}catch(e){console.error("获取分享链接失败:",e)}finally{e&&b(!1)}})()),()=>{e=!1}},[n]);let Z=async()=>{try{await navigator.clipboard.writeText(l),z(!0),(0,p.x9)("分享链接已复制到剪贴板")}catch(e){console.error(`复制失败 ${e}`),(0,p.S3)("复制失败,请手动复制")}},R=async()=>{if(!f.trim())return void(0,p.L$)("请输入共享链接");try{C(!0);let e=await g(f);e.used_flag?(_(""),(0,p.x9)("共享链接使用成功,Team 已在新窗口打开"),r(!1),window.open(`/?${e}`,"_blank")):(0,p.L$)("你已经在这个 Team 中了")}catch(e){console.error(`共享链接使用失败 ${e}`),(0,p.S3)("使用共享链接失败")}finally{C(!1)}};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(d.z,{variant:"outline",size:"default",onClick:()=>{r(!0),c(""),z(!1)},disabled:t,children:[(0,a.jsx)(o.Z,{className:"mr-2 h-4 w-4"}),$("home.share.title")]}),(0,a.jsx)(u.Vq,{open:n,onOpenChange:e=>r(e),children:(0,a.jsxs)(u.cZ,{className:"sm:max-w-md",children:[(0,a.jsx)(u.fK,{children:(0,a.jsxs)(u.$N,{children:[" ",$("home.share.title")]})}),(0,a.jsxs)("div",{className:"space-y-4 mb-6",children:[(0,a.jsxs)("h3",{className:"text-sm font-medium",children:[" ",$("home.share.link")]}),(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)(j.I,{value:l,readOnly:!0,placeholder:"点击生成按钮获取共享链接",className:"flex-1"}),(0,a.jsxs)(d.z,{size:"sm",onClick:Z,variant:"secondary",children:[k?(0,a.jsx)(h.Z,{className:"h-4 w-4 mr-2"}):(0,a.jsx)(m.Z,{className:"h-4 w-4 mr-2"}),$(k?"home.share.copied":"home.share.copy")]})]})]}),(0,a.jsx)(v.Z,{}),(0,a.jsxs)("div",{className:"space-y-4 mt-6",children:[(0,a.jsxs)("h3",{className:"text-sm font-medium",children:[" ",$("home.share.use_share_link_content")]}),(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)(j.I,{value:f,onChange:e=>_(e.target.value),placeholder:"粘贴共享链接",className:"flex-1"}),(0,a.jsxs)(d.z,{size:"sm",onClick:R,disabled:S||!f.trim(),variant:"secondary",children:[(0,a.jsx)(x.Z,{className:"h-4 w-4 mr-2"}),S?"处理中...":"共享"]})]})]})]})})]})}var w=t(17511),b=t(56e3),S=t(13569),C=t(31546),k=t(76497),z=t(79530),$=t(78271),Z=t(58334),R=t(16313),F=t(45061),O=t(57972),E=t(28649),q=t(85079);function A(e){let{isOpen:s,onClose:t,onConfirm:n,projectName:r}=e;return(0,a.jsx)(u.Vq,{open:s,onOpenChange:t,children:(0,a.jsxs)(u.cZ,{className:"sm:max-w-[425px]",children:[(0,a.jsxs)(u.fK,{children:[(0,a.jsx)(u.$N,{children:"确认克隆"}),(0,a.jsxs)(u.Be,{children:['你确定要克隆项目 "',r,'" 吗?']})]}),(0,a.jsxs)(u.cN,{children:[(0,a.jsx)(d.z,{type:"button",variant:"outline",onClick:t,children:"取消"}),(0,a.jsx)(d.z,{type:"button",variant:"default",onClick:n,children:"克隆"})]})]})})}var T=t(53701);function I(e){let{isOpen:s,onClose:t,onConfirm:n,projectName:r}=e;return(0,a.jsx)(u.Vq,{open:s,onOpenChange:t,children:(0,a.jsxs)(u.cZ,{className:"sm:max-w-[425px]",children:[(0,a.jsxs)(u.fK,{children:[(0,a.jsx)(u.$N,{children:"确认删除"}),(0,a.jsxs)(u.Be,{children:['你确定要删除项目 "',r,'" 吗?此操作不可逆。']})]}),(0,a.jsxs)(u.cN,{children:[(0,a.jsx)(d.z,{type:"button",variant:"secondary",onClick:t,children:"取消"}),(0,a.jsx)(d.z,{type:"button",variant:"destructive",onClick:n,children:"删除"})]})]})})}var D=t(66264);function K(e){let{isOpen:s,onClose:t,onRename:n,currentName:r}=e,[l,c]=(0,i.useState)(r);return(0,a.jsx)(u.Vq,{open:s,onOpenChange:t,children:(0,a.jsxs)(u.cZ,{className:"sm:max-w-[425px]",children:[(0,a.jsxs)(u.fK,{children:[(0,a.jsx)(u.$N,{children:"重命名项目"}),(0,a.jsx)(u.Be,{children:"输入新的项目名称"})]}),(0,a.jsx)("div",{className:"grid gap-4 py-4",children:(0,a.jsxs)("div",{className:"grid grid-cols-4 items-center gap-4",children:[(0,a.jsx)(D._,{htmlFor:"name",className:"text-right",children:"名称"}),(0,a.jsx)(j.I,{id:"name",value:l,onChange:e=>c(e.target.value),className:"col-span-3"})]})}),(0,a.jsxs)(u.cN,{children:[(0,a.jsx)(d.z,{type:"button",variant:"secondary",onClick:t,children:"取消"}),(0,a.jsx)(d.z,{type:"button",onClick:()=>{n(l),t()},children:"确认"})]})]})})}function V(e){let{project:s,onRename:t,onClone:n,onDelete:r}=e,[l,c]=(0,i.useState)(!1),[o,h]=(0,i.useState)(!1),[m,x]=(0,i.useState)(!1),u=(0,C.s)({from:"/"}),{t:j}=(0,y.$)();return(0,a.jsxs)("div",{children:[(0,a.jsx)(T.Zb,{className:"hover:shadow-lg hover:cursor-pointer p-4",onClick:()=>{u({to:"/editor?project="+s.short_url_id})},children:(0,a.jsx)("div",{className:"aspect-video relative overflow-hidden rounded-md",children:(0,a.jsx)(q.z,{className:"w-full h-full m-0"})})}),(0,a.jsxs)("div",{className:"flex flex-row items-center justify-between space-y-0 pb-2 pt-4",children:[(0,a.jsx)("h3",{className:"font-medium text-xl text-gray-600 truncate w-[70%]",children:s.title}),(0,a.jsxs)(w.h_,{children:[(0,a.jsx)(w.$F,{asChild:!0,children:(0,a.jsxs)(d.z,{variant:"ghost",size:"icon",className:"h-8 w-8 p-0",children:[(0,a.jsx)("span",{className:"sr-only",children:"Open menu"}),(0,a.jsx)(E.Z,{})]})}),(0,a.jsxs)(w.AW,{align:"end",children:[(0,a.jsx)(w.Xi,{onSelect:()=>c(!0),children:j("home.project.rename")}),(0,a.jsx)(w.Xi,{onSelect:()=>h(!0),children:j("home.project.clone")}),(0,a.jsx)(w.Xi,{onSelect:()=>x(!0),className:"text-red-600",children:j("home.project.delete")})]})]})]}),(0,a.jsx)("div",{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:(0,a.jsxs)("span",{className:"text-sm",children:[" ",s.createdAt]})}),(0,a.jsx)(K,{isOpen:l,onClose:()=>c(!1),onRename:e=>t(s.short_url_id,e),currentName:s.title}),(0,a.jsx)(A,{isOpen:o,onClose:()=>h(!1),onConfirm:()=>{n(s.short_url_id),h(!1)},projectName:s.title}),(0,a.jsx)(I,{isOpen:m,onClose:()=>x(!1),onConfirm:()=>{console.info(555,s),r(s.short_url_id)},projectName:s.title})]})}function X(e){let{teamId:s}=e,{t}=(0,y.$)(),n=(0,R.D)({mutationFn:async e=>await c.R.POST("/studio_manager/projects/",{body:{name:"工作流"+(0,$.Vj)(),create_at:(0,$.Ux)(),update_at:(0,$.Ux)(),team_id:e}}),onSuccess:async e=>{window.open(`/editor?project=${e.data.data.short_url_id}`,"_blank")}});return(0,a.jsx)("div",{children:(0,a.jsx)(d.z,{disabled:-1==s,onClick:()=>{n.mutate(s)},children:t("home.create_project")})})}var L=t(44153);function P(e){let{projects:s,onRename:t,onDelete:n}=e,[r,l]=(0,i.useState)(null),[c,o]=(0,i.useState)(!1),[h,m]=(0,i.useState)(!1),x=(e,s)=>{t(e,s),l(null),o(!1)},u=e=>{n(e),l(null),m(!1)};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"rounded-md border",children:(0,a.jsxs)(L.iA,{children:[(0,a.jsx)(L.xD,{children:(0,a.jsxs)(L.SC,{children:[(0,a.jsx)(L.ss,{className:"w-[100px]",children:"缩略图"}),(0,a.jsx)(L.ss,{children:"项目名称"}),(0,a.jsx)(L.ss,{children:"创建时间"}),(0,a.jsx)(L.ss,{className:"w-[100px]",children:"操作"})]})}),(0,a.jsx)(L.RM,{children:s.map(e=>(0,a.jsxs)(L.SC,{children:[(0,a.jsx)(L.pj,{children:(0,a.jsx)("div",{className:"relative w-16 h-16 rounded-md overflow-hidden",children:(0,a.jsx)("img",{src:e.thumbnail||"/placeholder.svg",alt:e.title,className:"object-cover"})})}),(0,a.jsx)(L.pj,{className:"font-medium",children:e.title}),(0,a.jsx)(L.pj,{children:e.createdAt}),(0,a.jsx)(L.pj,{children:(0,a.jsxs)(w.h_,{children:[(0,a.jsx)(w.$F,{asChild:!0,children:(0,a.jsxs)(d.z,{variant:"ghost",className:"h-8 w-8 p-0",children:[(0,a.jsx)("span",{className:"sr-only",children:"Open menu"}),(0,a.jsx)(E.Z,{className:"h-4 w-4"})]})}),(0,a.jsxs)(w.AW,{align:"end",children:[(0,a.jsx)(w.Xi,{onSelect:()=>{l(e),o(!0)},children:"重命名"}),(0,a.jsx)(w.Xi,{onSelect:()=>{l(e),m(!0)},className:"text-red-600",children:"删除"})]})]})})]},e.id))})]})}),r&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(K,{isOpen:c,onClose:()=>{o(!1),l(null)},onRename:e=>x(r.short_url_id,e),currentName:r.title}),(0,a.jsx)(I,{isOpen:h,onClose:()=>{m(!1),l(null)},onConfirm:()=>u(r.id),projectName:r.title})]})]})}function Q(){let[e,s]=(0,i.useState)("grid"),t=(0,S.T)(),[o,h]=function(e,s){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(0,b.t)();let a=(0,S.T)(),n=(0,C.s)(),[r,l]=(0,i.useState)(s);return(0,i.useEffect)(()=>{let n=a.search[e];n?t.validate?t.validate(n)&&l(n):l(n):l(s)},[a,e,s,t.validate]),[r,s=>{l(s);let r=new URLSearchParams(a.searchStr);r.set(e,s),t.replace,n({to:`?${r.toString()}`})}]}("teamId","-1"),{t:m}=(0,y.$)(),{isPending:x,error:u,data:j}=(0,Z.a)({queryKey:["teams"],queryFn:async()=>{let e=await c.R.GET("/studio_manager/teams/",{params:{query:{user_id:(0,l.rc)()}}}),s=await c.R.GET("/studio_manager/projects/",{params:{query:{user_id:(0,l.rc)()}}});return(0,$.yV)({teams:[],projects:[]},e,s)}});(0,k.Z)(async()=>{j&&"-1"===o&&!t.search.teamId&&h(j.teams.find(e=>e.name.startsWith("我的")).short_url_id)},[j]);let p=(0,R.D)({mutationFn:async e=>await c.R.DELETE("/studio_manager/projects/{project_id}/",{params:{path:{project_id:e}}}),onSuccess:e=>z.E.invalidateQueries({queryKey:["teams"]})}),f=(0,R.D)({mutationFn:async e=>await c.R.POST("/studio_manager/projects/clone/",{body:{project_id:e}}),onSuccess:async e=>{console.info(444,e),window.open(`/editor?project=${e.data.data.short_url_id}`,"_blank")}}),v=(0,R.D)({mutationKey:["update_project_name"],mutationFn:async e=>await c.R.PUT("/studio_manager/projects/{project_id}/",{params:{path:{project_id:e.project_id}},body:{name:e.name}}),onSuccess:e=>z.E.invalidateQueries({queryKey:["teams"]})}),N=(e,s)=>{v.mutate({project_id:e,name:s})},g=e=>{f.mutate(e)},E=e=>{p.mutate(e)},q=null==j?void 0:j.teams.find(e=>e.short_url_id===o),A=null==j?void 0:j.projects.map(e=>({id:e.id,short_url_id:e.short_url_id,team_id:e.team_id,title:e.name,thumbnail:"",createdAt:e.update_at})).filter(e=>"-1"!==o&&String(e.team_id)===String(null==q?void 0:q.id));return(0,a.jsx)(F.Z,{spinning:x,children:(0,a.jsx)("div",{className:"w-full h-full flex-1 flex-col space-y-8 p-8 flex ",children:(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("div",{className:"flex items-end space-x-2",children:(0,a.jsx)("h2",{className:"text-xl font-semibold",children:m("home.title")})}),(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsxs)(w.h_,{children:[(0,a.jsx)(w.$F,{asChild:!0,children:(0,a.jsx)(d.z,{size:"icon",variant:"outline",children:"grid"===e?(0,a.jsx)(n.Z,{className:"h-4 w-4"}):(0,a.jsx)(r.Z,{className:"h-4 w-4"})})}),(0,a.jsxs)(w.AW,{align:"end",children:[(0,a.jsxs)(w.Xi,{onClick:()=>s("grid"),children:[(0,a.jsx)(n.Z,{className:"mr-2 h-4 w-4"})," Grid view"]}),(0,a.jsxs)(w.Xi,{onClick:()=>s("list"),children:[(0,a.jsx)(r.Z,{className:"mr-2 h-4 w-4"})," List view"]})]})]}),(0,a.jsx)(_,{projectId:o}),(0,a.jsxs)(O.Ph,{value:o,onValueChange:e=>{z.E.invalidateQueries({queryKey:["teams"]}),h(e)},children:[(0,a.jsx)(O.i4,{className:"w-[180px]",children:(0,a.jsx)(O.ki,{placeholder:"Select a fruit"})}),(0,a.jsx)(O.Bw,{children:(0,a.jsx)(O.DI,{children:null==j?void 0:j.teams.map((e,s)=>(0,a.jsx)(O.Ql,{value:String(e.short_url_id),children:e.name},e.short_url_id))})})]}),(0,a.jsx)(X,{teamId:o})]})]}),"grid"===e?(0,a.jsx)("div",{className:"grid grid-cols-5 gap-14",children:null==A?void 0:A.map(e=>(0,a.jsx)(V,{project:e,onRename:N,onClone:g,onDelete:E},e.id))}):(0,a.jsx)(P,{projects:A,onRename:N,onDelete:E})]})})})}},23942:function(e,s,t){t.d(s,{I:()=>i});var a=t(70813),n=t(91415),r=t(71553);let i=n.forwardRef((e,s)=>{let{className:t,type:n,...i}=e;return(0,a.jsx)("input",{type:n,className:(0,r.cn)("flex h-9 w-full rounded-md border border-zinc-200 bg-transparent px-3 py-1 text-base shadow-xs transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-zinc-950 placeholder:text-zinc-500 focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-zinc-950 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:border-zinc-800 dark:file:text-zinc-50 dark:placeholder:text-zinc-400 dark:focus-visible:ring-zinc-300",t),ref:s,...i})});i.displayName="Input"},66264:function(e,s,t){t.d(s,{_:()=>d});var a=t(70813),n=t(14568),r=t(68621),i=t(91415),l=t(71553);let c=(0,r.j)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),d=i.forwardRef((e,s)=>{let{className:t,...r}=e;return(0,a.jsx)(n.f,{ref:s,className:(0,l.cn)(c(),t),...r})});d.displayName=n.f.displayName},93330:function(e,s,t){t.d(s,{$:()=>n});var a=t(91299);function n(){let{language:e,setLanguage:s,languages:t,dictionary:n}=(0,a.Qg)();return{t:(e,s)=>{let t=(Array.isArray(e)?e:e.split(".")).reduce((e,s)=>null==e?void 0:e[s],n);return t?(s&&"string"==typeof t&&Object.entries(s).forEach(e=>{let[s,a]=e;t=t.replace(RegExp(`{{${s}}}`,"g"),a)}),t):Array.isArray(e)?e[e.length-1]:e.split(".").pop()||e},language:e,setLanguage:s,languages:t}}}}]);
|