PageSourceSearch

https://faddit.co.kr/assets/Home-azpO4tra.js

js faddit.co.kr collected 2026-10-06 04:21:29 UTC 43,936 bytes, 1 lines download raw bytes

1import{u as Ft,j as t,e as xe,a1 as xr,a3 as br,a4 as kr,a5 as wr,a6 as Ae,a2 as vr,a7 as Sr}from"./index-Diga5ypv.js";import{b as a,g as Ir,u as Cr}from"./vendor-react-41hKIdpx.js";import{u as jr,a as Nr}from"./DriveContext-Ck31lyKg.js";import{D as Dr,a as Mr,b as Tr}from"./DriveFolderTile-ULKkBbCR.js";import{g as Rr,a as Le}from"./driveLabels-BPPkAwYh.js";import{u as Fr}from"./useChatSocketStore-DXmX5NOI.js";import{g as Oe,i as ae,t as Pr,a as He,c as St,b as It}from"./driveApi-Bh_uRlRS.js";import{u as Er,b as Ar,D as Lr,a as Or,g as _r,f as Ur}from"./DriveEmptyPlaceholder-DF6poLa-.js";import{g as Br}from"./materialApi-BevmwKPQ.js";import{o as Hr,s as $r,G as zr,D as Wr,a as Kr,b as Gr,C as Vr,c as Yr,d as qr,U as Zr}from"./CreateFolderModal-CgjhVumJ.js";import{R as Jr,T as Xr,P as Qr,C as ea}from"./index-fFyqdjwg.js";import{D as ta}from"./DriveFolderIcon-BDbFVsLC.js";import{B as ra}from"./BreadcrumbPathBar-BPe29LD7.js";import{G as Ct}from"./GlobalTooltip-CrYb3OGQ.js";import{M as A,m as jt,a as aa}from"./Modal-CDnQ2bv-.js";import{getTeams as sa}from"./collaborationApi-CjV-UOd6.js";import{s as oa,a as ia,c as na,u as la}from"./worksheetApi-BruF7dst.js";import{g as da,h as ca,i as ma,m as ua}from"./playgroundSeedUtils-BshXg4ab.js";import{K as Nt}from"./kakao-logo-alN0z1Gn.js";import{M as pa}from"./mail-Bs3SBQPl.js";import{C as Dt}from"./chevron-right-CL-uhSjg.js";import{C as fa}from"./chevron-left-xEz9VyHs.js";import{L as Mt}from"./LocationPickerModal-HV2wRFVX.js";import{U as ga}from"./UploadModal-C_s_gc0Z.js";import{c as ha,u as ya}from"./useFileDropZone-DlyRh-fr.js";import{C as xa}from"./CreateWorksheetModal-QxYtGgwN.js";import{w as ba}from"./worksheetRecommendationSeed-DjP6Bicj.js";import{D as _e,r as ka}from"./worksheetEditorMode-C1A8NZ_I.js";import{L as wa}from"./list-CzotFzSl.js";import{L as va}from"./worksheetClassification-CK0gZfln.js";import{F as Sa}from"./folder-plus-6httMbJj.js";import{F as Ia}from"./file-text-B6Sa2m9U.js";import{C as Ca}from"./cloud-upload-zss3DfdQ.js";import{F as ja}from"./file-CS2NvsXm.js";import"./intl-C5BrJCnb.js";import"./pencil-YDJVfPBM.js";import"./x-p7AIBDAb.js";import"./CreatableDropdown-YoF2lL0E.js";import"./useComposingGuard-B9KBpySz.js";import"./chevron-down-CWccYasz.js";import"./plus-WGGaA_XB.js";import"./check-gGxAArTG.js";import"./Dropdown-B2dFolWl.js";import"./DriveFilePreviewModal-0VBHdisF.js";import"./bodyScrollLock-Bn7b9CXx.js";import"./loader-circle-C1VQJWcK.js";import"./DriveImagePreviewModal-YmTEsIua.js";import"./download-DibGawtP.js";import"./minus-BAhZplKI.js";import"./rotate-ccw-Dtus8Rj4.js";import"./driveCategoryChip-CdPtjcX8.js";import"./DriveFileThumbnail-BVM0zoFm.js";import"./mockupUrl-BLB3GaHJ.js";import"./eye-1oSSvCdw.js";import"./MaterialEditEntry-V7EDBpF_.js";import"./image-plus-5_hpW1rR.js";import"./core.esm-CKbXej5Q.js";import"./star-b0CdN1FC.js";import"./ellipsis-C-UzeMp7.js";import"./vendor-socketio-aPgxPig1.js";import"./resolveMaterialName-DZ-ILEzS.js";import"./pickLocaleLabel-DAQ2F49q.js";import"./LockBadge-CG4v41tP.js";import"./subscription-NAl-PhyB.js";import"./lock-CoM3rFKp.js";import"./CatalogCategoryIcon-BIXzgWXn.js";import"./WorksheetEditorModeGlyph-Cx9FutnU.js";import"./worksheetEditorModeIcon-fu9eeLZt.js";import"./files-DwiBsGc-.js";import"./swatch-book-rSZV3boR.js";import"./tag-DleEsw70.js";import"./scissors-BIMSWFWK.js";import"./spline-lNpKIGNd.js";import"./upload-DGgTv7HJ.js";import"./image-BCAwS4iE.js";import"./hard-drive-BzfSgvp6.js";import"./folder-BhIFoKXc.js";import"./search-DiZkvZPt.js";import"./Skeleton-nIDrP-sZ.js";import"./floating-ui.dom-BjxHdFtu.js";import"./tslib.es6-CMwweBXX.js";import"./stallWatch-Bed_N0HJ.js";import"./index-BK-cOEe-.js";import"./iconBase-Bq-dX0Eg.js";import"./teamColor-b3lR_VMY.js";import"./workspaceColors-FiUqbzR1.js";import"./driveIdPath-BZv60XHl.js";import"./hardwareSchema-By_TS4MF.js";import"./fabricSchema-DeUQ0z6F.js";import"./assetTaxonomy-BHMpbosw.js";import"./HardwareProductInfoForm-D4EGKxxt.js";import"./useQuery-D-8c8XHh.js";import"./useBaseQuery-DSKwsvKe.js";import"./DemoModeContext-fzQ_bgb5.js";import"./ChipSelect-Cz2t7Djt.js";import"./worksheetEditorSchema-yvK0Sj_n.js";import"./purify.es-DP5U8-sc.js";import"./vendor-fabric-hsqf7c0T.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./patternDefinitions-DPJjrmdu.js";import"./patternFill-BSd8K93A.js";import"./pathMath-BOl0kYrq.js";import"./uploadCategoryConfig-DwyzwhcZ.js";import"./tutorialRegistry-Cpq8GVd6.js";import"./featureFlags-w0828S8z.js";import"./childcloth-C2fROTma.js";import"./recommendationApi-BQYIPhU1.js";import"./useSubscriptionGate-CgB9IewQ.js";import"./subscriptionGateContext-CamRILL4.js";import"./index-Be5vijT1.js";import"./file-plus-corner-klA1EfPH.js";import"./maximize-2-h8luYh7N.js";import"./arrow-right-DZdFSzNk.js";import"./fabric-patches-n9XgOHyI.js";const Na=(n,d)=>{},Da=n=>{if(!n)return"";const[d,o]=n.split("@");return o?`${d.slice(0,2)}${"•".repeat(Math.max(2,Math.min(d.length-2,5)))}@${o}`:n},Ma=({worksheetId:n,email:d,onContinueToDrive:o})=>{const{t:g}
1=Ft(),[x,I]=a.useState("choose"),[T,h]=a.useState(""),[p,B]=a.useState(!1),[R,v]=a.useState(null),[j,be]=a.useState(null),[J,l]=a.useState(""),N=T.replace(/\D/g,""),se=/^01\d{8,9}$/.test(N)&&p&&!R,H=async C=>{l(""),v(C);try{if((C==="email"?await oa(n):await ia(n,N)).status!=="sent"){l(g("drive.playground.pcHandoff.deliveryFailed"));return}be(C)}catch{l(g("drive.playground.pcHandoff.deliveryFailed"))}finally{v(null)}};return j?t.jsxs("div",{role:"status",children:[t.jsx(A.Header,{title:g(j==="email"?"drive.playground.pcHandoff.emailSent":"drive.playground.pcHandoff.kakaoSent"),subtitle:g("drive.playground.pcHandoff.openOnPc"),showClose:!1}),t.jsx(A.Footer,{children:t.jsx("button",{type:"button",onClick:o,className:jt,children:g("drive.playground.pcHandoff.continueToDrive")})})]}):t.jsxs("section",{className:"text-gray-900 dark:text-gray-100",children:[t.jsx(A.Header,{title:g("drive.playground.pcHandoff.title"),subtitle:g("drive.playground.pcHandoff.description"),showClose:!1}),t.jsxs(A.Body,{className:"space-y-3",children:[x==="choose"?t.jsxs("div",{className:"grid gap-2",children:[t.jsxs("button",{type:"button",className:"dark:bg-drive-surface flex min-h-14 items-center gap-3 rounded-[10px] border border-gray-200 bg-white px-3.5 py-2.5 text-left transition-colors hover:bg-gray-50 disabled:cursor-not-allowed disabled:opacity-50 dark:border-gray-700 dark:hover:bg-gray-800",onClick:()=>void H("email"),disabled:!d||!!R,children:[t.jsx(pa,{className:"h-5 w-5 shrink-0","aria-hidden":"true"}),t.jsxs("span",{className:"min-w-0 flex-1",children:[t.jsx("span",{className:"block text-xs font-semibold",children:g(R==="email"?"drive.playground.pcHandoff.sending":"drive.playground.pcHandoff.emailAction")}),t.jsx("span",{className:"mt-0.5 block truncate text-[11px] text-gray-500 dark:text-gray-400",children:d?Da(d):g("drive.playground.pcHandoff.noEmail")})]}),t.jsx(Dt,{className:"h-4 w-4 shrink-0 text-gray-400","aria-hidden":"true"})]}),t.jsxs("button",{type:"button",className:"flex min-h-14 items-center gap-3 rounded-[10px] border border-[#ead300] bg-[#fee500] px-3.5 py-2.5 text-left text-[#191600] transition-colors hover:bg-[#f5dc00] disabled:cursor-not-allowed disabled:opacity-50",onClick:()=>{I("kakao"),l("")},disabled:!!R,children:[t.jsx("img",{src:Nt,alt:"",className:"h-6 w-6 shrink-0","aria-hidden":"true"}),t.jsx("span",{className:"flex-1 text-xs font-semibold",children:g("drive.playground.pcHandoff.kakaoAction")}),t.jsx(Dt,{className:"h-4 w-4 shrink-0 text-black/60","aria-hidden":"true"})]})]}):t.jsxs("div",{children:[t.jsxs("button",{type:"button",className:"mb-4 inline-flex items-center gap-1 text-xs font-medium text-gray-500 hover:text-gray-800 dark:text-gray-400 dark:hover:text-gray-200",onClick:()=>{I("choose"),l("")},children:[t.jsx(fa,{className:"h-4 w-4","aria-hidden":"true"}),g("drive.playground.pcHandoff.back")]}),t.jsx("label",{htmlFor:"pc-handoff-phone",className:"block text-xs font-semibold",children:g("drive.playground.pcHandoff.phoneLabel")}),t.jsx("input",{id:"pc-handoff-phone",type:"tel",inputMode:"numeric",autoComplete:"tel",value:T,onChange:C=>h(C.target.value),placeholder:"010 1234 5678",className:"dark:bg-drive-chrome mt-2 h-10 w-full rounded-[10px] border border-gray-200 bg-white px-3 text-sm transition-shadow outline-none focus:border-gray-400 focus:ring-2 focus:ring-gray-200 dark:border-gray-700 dark:focus:ring-gray-700"}),t.jsxs("label",{className:"mt-3 flex items-start gap-2 text-xs leading-5 text-gray-600 dark:text-gray-300",children:[t.jsx("input",{type:"checkbox",checked:p,onChange:C=>B(C.target.checked),className:"mt-0.5 h-4 w-4 rounded border-gray-300 text-gray-900 focus:ring-gray-400"}),t.jsxs("span",{children:[g("drive.playground.pcHandoff.consent"),t.jsx("span",{className:"block text-[11px] text-gray-500 dark:text-gray-400",children:g("drive.playground.pcHandoff.consentDetail")})]})]}),t.jsxs("button",{type:"button",className:"mt-4 inline-flex h-10 w-full items-center justify-center gap-2 rounded-[10px] border border-[#ead300] bg-[#fee500] px-4 text-sm font-semibold text-[#191600] transition-colors hover:bg-[#f5dc00] disabled:cursor-not-allowed disabled:border-gray-200 disabled:bg-gray-200 disabled:text-gray-400 dark:disabled:border-gray-700 dark:disabled:bg-gray-700",onClick:()=>void H("kakao"),disabled:!se,children:[t.jsx("img",{src:Nt,alt:"",className:"h-5 w-5","aria-hidden":"true"}),g(R==="kakao"?"drive.playground.pcHandoff.sending":"drive.playground.pcHandoff.kakaoSend")]}),t.jsx("p",{className:"mt-2 text-[11px] leading-4 text-gray-500 dark:text-gray-400",children:g("drive.playground.pcHandoff.phoneRetention")})]}),J?t.jsx("p",{className:"text-xs text-red-600 dark:text-red-400",role:"alert",children:J}):null]}),t.jsx(A.Footer,{children:t.jsx("button",{type:"button",onClick:o,disabled:!!R,className:jt,children:g("drive.playground.pcHandoff.continueToDrive")})})]})},Ue=new Set(["fabric","rib_fabric","label","trim"]),Ta=250,Ra=5,Fa=[{labelKey:"drive.filters.all",value:"all"},{labelKey:"drive.filters.folder",value:"folder"},{labelKey:"drive.filters.worksheet",value:"worksheet"},{labelKey:"drive.filters.label",value:"label"},{labelKey:"drive.filters.fabric",value:"fabric"},{labelKey:"drive.filters.ribFabric",value:"rib_fabric"},{labelKey:"drive.filters.print",value:"print"},{labelKey:"drive.filters.other",value:"etc"},{labelKey:"drive.filters.trim",value:"trim"},{labelKey:"drive.filters.upload",value:"upload"}],Pa=new Set(["folder","worksheet","upload"]),Tt=n=>Pa.has(n);
1function Ea(n,d){return d(n==="file_create"?"drive.recent.createdByMe":n==="file_edit"?"drive.recent.editedByMe":"drive.recent.viewedByMe")}function Aa(n,d){return d==="all"?!0:d==="folder"?n.type==="folder":d==="worksheet"?n.type==="worksheet":d==="upload"?n.type==="file"&&!n.tag:n.tag===d}function La(n){return{id:n.fileSystemId,name:n.name,shared:!1,updatedAt:n.updatedAt??"",creatorName:n.creatorName??"",parentId:n.parentId,isStarred:n.isStarred,sourcePath:n.path,visibilityScope:n.visibilityScope}}const Rt=n=>{if(n!=null)return n<1024?`${n} B`:n<1024*1024?`${(n/1024).toFixed(1)} KB`:`${(n/(1024*1024)).toFixed(1)} MB`},Oa=new Set(["code_internal","vendor_name","item_name","origin_country"]),re=()=>{},Be=n=>n.filter(d=>ae(d.mimetype)).map(d=>[d.fileSystemId,He(d.fileSystemId,d.updatedAt||"")]),_a=(n,d,o)=>{const g=new Set(d.map(h=>h.fileSystemId)),I=n.slice(0,d.length).map(h=>h.fileSystemId).filter(h=>!g.has(h)),T=o!=null&&o.pruneMissingTop?I:[];return{nodes:[...d,...n.filter(h=>!g.has(h.fileSystemId)&&!T.includes(h.fileSystemId))],droppedTopIds:T}},Ua=(n,d)=>{const o=new Map(d.map(x=>[x.fileSystemId,x])),g=new Set(n.map(x=>x.fileSystemId));return[...n.map(x=>o.get(x.fileSystemId)??x),...d.filter(x=>!g.has(x.fileSystemId))]},Vo=()=>{var wt;const n=Ir(),d=Cr(),{t:o,locale:g}=Ft(),{teamWorkspaces:x,rootFolderId:I,setItemsStarred:T,syncSidebarAfterMutation:h}=jr(),p=xe(e=>{var r;return(r=e.user)==null?void 0:r.userId}),B=Fr(e=>e.socket),R=Nr(e=>e.clearDriveView);a.useEffect(()=>{R()},[]);const[v,j]=a.useState([]),[be,J]=a.useState(!1),[l,N]=a.useState(null),[se,H]=a.useState(new Map),[C,X]=a.useState(new Map),$e=a.useRef([]),L=a.useRef(null),oe=a.useRef(!1),$=a.useRef(!1),ke=a.useRef(null),[ie,Pt]=a.useState(()=>localStorage.getItem("faddit-drive-view-mode")||"grid"),ze=e=>{Pt(e),localStorage.setItem("faddit-drive-view-mode",e)},Et=a.useRef(null),Q=xe(e=>{var r,s;return((r=e.user)==null?void 0:r.name)??((s=e.user)==null?void 0:s.email)??""}),At=xe(e=>{var r;return(r=e.user)==null?void 0:r.email}),[we,ve]=a.useState(()=>da()),We=new URLSearchParams(d.search).get("device")==="mobile",Lt=new URLSearchParams(d.search).get("saved")==="1",Ke=new URLSearchParams(d.search).get("worksheetId"),Ge=a.useRef(!1);a.useEffect(()=>{Ge.current||ca()&&(!p||!I||(Ge.current=!0,ve("pending"),ma({userId:p,rootFolderId:I,managerName:Q,navigate:n,syncDrive:h,resumeDestination:We?"home":"worksheet"}).then(e=>{e||ve(null)}).catch(e=>{ua(),ve("failed"),console.error("[playgroundSeed] import 실패",e)})))},[p,I,Q,n,We]);const Ve=a.useMemo(()=>we==="pending"?{message:o("drive.playground.importing"),description:o("drive.playground.importingDescription")}:we==="failed"?{message:o("drive.playground.importFailed"),description:o("drive.playground.importFailedDescription")}:{message:o("drive.recent.empty"),description:void 0},[we,o]),[Ye,qe]=a.useState([]),[Ot,Ze]=a.useState(!1),[_t,Se]=a.useState(!1),[F,P]=a.useState(null),[b,E]=a.useState(""),[Ut,Je]=a.useState(!1),[Bt,Xe]=a.useState(!1),[Ht,Qe]=a.useState(!1),[O,z]=a.useState(null),[$t,et]=a.useState(!1),[zt,tt]=a.useState(!1),[rt,at]=a.useState(!1),[Wt,Ie]=a.useState(!1),[Kt,st]=a.useState(!1),[Gt,Ce]=a.useState(null),[D,W]=a.useState(null),je=a.useRef(!1),[Ne,w]=a.useState(null);xe(e=>e.setUser);const ne=xr(e=>e.setActiveWorkspace),[Vt,ot]=a.useState(!1),[Yt,qt]=a.useState({files:[],folders:[]}),[_,it]=a.useState(null),[Zt,De]=a.useState(!1);a.useEffect(()=>{sa().then(qe).catch(()=>qe([]))},[]);const le=a.useRef(null),de=a.useRef(null),U=a.useRef(null);a.useEffect(()=>{$e.current=v},[v]);const K=a.useCallback(async e=>{if(!p)return new Map;const r=e.filter(i=>i.type!=="folder"&&Ue.has((i.tag??"").toLowerCase()));if(r.length===0)return new Map;const s=await Promise.all(r.map(async i=>{try{const f=await Br(i.fileSystemId,p);return[i.fileSystemId,(f==null?void 0:f[0])??null]}catch{return[i.fileSystemId,null]}}));return new Map(s)},[p]),Jt=a.useCallback(async()=>{var c;const e=await Oe("all",{fileCursor:le.current??void 0,fileCursorId:de.current??void 0,fileLimit:5}),r=e.files,s=r.filter(m=>ae(m.mimetype)),i=Be(s),f=await K(r);j(m=>Ua(m,r)),H(m=>{const u=new Map(m);
1return i.forEach(([y,k])=>{k&&u.set(y,k)}),u}),f.size>0&&X(m=>{const u=new Map(m);return f.forEach((y,k)=>u.set(k,y)),u}),le.current=e.nextFileCursor??null,de.current=e.nextFileCursorId??null,(c=U.current)==null||c.call(U,e)},[K]),nt=a.useRef(null),Me=a.useRef(null),G=Er(Jt,{rootRef:nt});U.current=G.onPageLoaded;const Xt=a.useCallback((e,r)=>({id:e.fileSystemId,worksheetId:e.worksheetId,nodeType:e.type,mimetype:e.mimetype,tag:e.tag,imageSrc:r,imageAlt:e.name,title:e.name,subtitle:Rr(e.mimetype,o),badge:Le(e,o),isStarred:e.isStarred,owner:e.creatorName,ownerProfileImg:e.creatorProfileImg,updatedAt:e.updatedAt,date:e.updatedAt?new Date(e.updatedAt).toLocaleString("ko-KR",{year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"2-digit"}):"-",size:Rt(e.size),sizeBytes:e.size??null,parentId:e.parentId,sourcePath:e.path,idPath:e.idPath,visibilityScope:e.visibilityScope,documentThumbnailStatus:e.documentThumbnailStatus??null,worksheetManagerName:e.worksheetManagerName??null,worksheetBrandName:e.worksheetBrandName??null,worksheetSeasonYear:e.worksheetSeasonYear??null,worksheetSeasonType:e.worksheetSeasonType??null,worksheetGender:e.worksheetGender??null,worksheetAge:e.worksheetAge??null,worksheetCategory:e.worksheetCategory??null,worksheetClothes:e.worksheetClothes??null,worksheetMockup2dCount:e.worksheetMockup2dCount??0,worksheetMockup3dCount:e.worksheetMockup3dCount??0,workspaceId:e.workspaceId,workspaceName:e.workspaceName,workspaceType:e.workspaceType}),[o]),[V,Qt]=a.useState("all"),lt=a.useMemo(()=>{const e=[{id:"personal",label:o("drive.sidebar.myWorkspace")}];return x.forEach(r=>{e.push({id:r.workspaceId,label:r.name})}),e},[o,x]);a.useEffect(()=>{if(!p)return;let e=!1;return J(!0),Oe("all").then(async r=>{if(e)return;const s=[...r.folders,...r.files];j(s);const i=s.filter(u=>u.type!=="folder"&&ae(u.mimetype)),f=s.filter(u=>u.type!=="folder"&&Ue.has((u.tag??"").toLowerCase())),[c,m]=await Promise.all([(async()=>{const u=Date.now();return{entries:Be(i),elapsedMs:Date.now()-u}})(),(async()=>{const u=Date.now(),y=await K(f);return{materialEntries:Array.from(y.entries()),elapsedMs:Date.now()-u}})()]);e||(H(new Map(c.entries.filter(([,u])=>u))),X(new Map(m.materialEntries)),G.onPageLoaded(r),le.current=r.nextFileCursor??null,de.current=r.nextFileCursorId??null)}).catch(r=>{}).finally(()=>{e||J(!1)}),()=>{e=!0}},[p,d.key,K]),a.useEffect(()=>{if(!l)return;const e=v.find(r=>r.fileSystemId===l.fileSystemId);if(!e){N(null);return}e!==l&&N(e)},[v,l]),a.useEffect(()=>{if(!B||!p)return;const e=async()=>{var f;if(oe.current){$.current=!0;return}oe.current=!0;const s=Date.now(),i=ke.current;try{const c=await Oe("all",{fileLimit:Ra}),m=[...c.folders,...c.files],u=m.filter(Z=>Z.type!=="folder"&&ae(Z.mimetype)),y=Date.now(),k=Be(u),q=Date.now()-y,Ee=Date.now(),vt=await K(m),hr=Date.now()-Ee,he=_a($e.current,m,{pruneMissingTop:(i==null?void 0:i.action)==="items_deleted"});j(he.nodes),H(Z=>{const M=new Map(Z);return he.droppedTopIds.forEach(S=>M.delete(S)),m.forEach(S=>{const ye=k.find(([yr])=>yr===S.fileSystemId);ye!=null&&ye[1]?M.set(S.fileSystemId,ye[1]):M.delete(S.fileSystemId)}),M}),X(Z=>{const M=new Map(Z);return he.droppedTopIds.forEach(S=>M.delete(S)),m.forEach(S=>{if(!Ue.has((S.tag??"").toLowerCase())){M.delete(S.fileSystemId);return}M.set(S.fileSystemId,vt.get(S.fileSystemId)??null)}),M}),le.current=c.nextFileCursor??null,de.current=c.nextFileCursorId??null,(f=U.current)==null||f.call(U,c),Na("recent-home:socket-refresh:success",()=>({userId:p,action:(i==null?void 0:i.action)??null,workspaceId:(i==null?void 0:i.workspaceId)??null,parentId:(i==null?void 0:i.parentId)??null,folderCount:c.folders.length,fileCount:c.files.length,imageNodeCount:u.length,materialNodeCount:vt.size,droppedTopCount:he.droppedTopIds.length,previewMs:q,materialsMs:hr,totalMs:Date.now()-s}))}catch{}finally{oe.current=!1,$.current&&($.current=!1,e())}},r=s=>{ke.current=s,$.current=!0,L.current&&clearTimeout(L.current),L.current=setTimeout(()=>{L.current=null,$.current=!1,e()},Ta)};return B.on("drive.changed",r),()=>{L.current&&(clearTimeout(L.current),L.current=null),oe.current=!1,$.current=!1,ke.current=null,B.off("drive.changed",r)}},[B,p,K]);const dt=a.useCallback(e=>e.workspaceType==="team"&&e.workspaceId?e.workspaceId:"personal",[]),ce=a.useCallback(async(e,r)=>{j(s=>s.map(i=>i.fileSystemId===e?{...i,isStarred:r}:i));try{await T([e],r)}catch{j(s=>s.map(i=>i.fileSystemId===e?{...i,isStarred:!r}:i))}},[T]),ct=a.useCallback(e=>{n(`/faddit/drive/${e}`)},[n]),mt=a.useCallback(e=>{const r=v.find(s=>
1s.fileSystemId===e);N(s=>(s==null?void 0:s.fileSystemId)===e?null:r??null)},[v]),er=a.useCallback(e=>{e.target.closest('[data-selectable-item="true"],button,input,label,a,textarea,select,[data-drive-item-card],[data-drive-folder-tile]')||N(null)},[]),ut=a.useCallback(e=>{const r=v.find(s=>s.fileSystemId===e);if((r==null?void 0:r.type)==="folder"){n(`/faddit/drive/${r.fileSystemId}`);return}(r==null?void 0:r.type)==="worksheet"&&r.worksheetId&&(br.getState().startOpening(),n(`/faddit/worksheet/${r.worksheetId}`))},[v,n]);a.useCallback(async(e,r)=>{N(s=>(s==null?void 0:s.fileSystemId)===e?{...s,isStarred:r}:s),await ce(e,r)},[ce]);const tr=a.useCallback(()=>{if(!l)return;const e=l.parentId??I,r=new URLSearchParams;if(r.set("file",l.fileSystemId),r.set("edit","1"),e){n(`/faddit/drive/${e}?${r.toString()}`);return}n(`/faddit/drive?${r.toString()}`)},[n,l,I]),Te=a.useCallback(e=>{const r=Pr(e.worksheetThumbnail,e.worksheetId);if(r)return r;if(e.documentThumbnailStatus==="ready")return He(e.fileSystemId,e.documentThumbnailUpdatedAt||e.updatedAt||"");if(e.type==="worksheet")return"";const s=se.get(e.fileSystemId);return s||(ae(e.mimetype)?He(e.fileSystemId,e.updatedAt||""):"")},[se]),ee=a.useMemo(()=>v.filter(e=>Aa(e,V)),[v,V]),Re=a.useMemo(()=>ee.filter(e=>e.type==="folder"&&!e.isRoot),[ee]),Fe=a.useMemo(()=>ee.filter(e=>e.type!=="folder"),[ee]),rr=a.useCallback(e=>{const r=dt(e),s=lt.find(i=>i.id===r);return(s==null?void 0:s.label)??o("drive.sidebar.myWorkspace")},[dt,lt,o]),pt=V==="all"||V==="folder",ft=V!=="folder",ar=300,Pe=450,me=!!l,[ue,gt]=a.useState(null),pe=a.useRef(new Map),ht=a.useRef(me);a.useEffect(()=>{var i;if(ht.current===me)return;ht.current=me;const e=(i=Me.current)==null?void 0:i.querySelector(".grid");if(!e)return;const r=getComputedStyle(e).gridTemplateColumns;gt(r);const s=setTimeout(()=>{var c;pe.current.clear();const f=(c=Me.current)==null?void 0:c.querySelectorAll(".grid");f&&f.forEach(m=>{Array.from(m.children).forEach(u=>{pe.current.set(u,u.getBoundingClientRect())})}),gt(null)},ar+20);return()=>clearTimeout(s)},[me]),a.useLayoutEffect(()=>{if(ue!==null||pe.current.size===0)return;const e=pe.current,r=[];if(e.forEach((i,f)=>{const c=f,m=c.getBoundingClientRect(),u=i.left-m.left,y=i.top-m.top,k=Math.abs(i.width-m.width)>.5,q=Math.abs(u)>.5||Math.abs(y)>.5;!k&&!q||(c.style.width=`${i.width}px`,c.style.transform=`translate(${u}px, ${y}px)`,c.style.transition="none",r.push({el:c,targetWidth:m.width}))}),e.clear(),r.length===0)return;document.body.offsetHeight,r.forEach(({el:i,targetWidth:f})=>{i.style.transition=`transform ${Pe}ms ease-in-out, width ${Pe}ms ease-in-out`,i.style.width=`${f}px`,i.style.transform=""});const s=setTimeout(()=>{r.forEach(({el:i})=>{i.style.transition="",i.style.transform="",i.style.width=""})},Pe+20);return()=>clearTimeout(s)},[ue]);const fe=ue?{gridTemplateColumns:ue}:void 0,Y=a.useCallback(e=>{kr(e),E(""),z(null),P(null)},[]),ge=a.useCallback(e=>{Tt(e)&&wr(e),P(e),Ze(!1),Se(!0)},[]),te=a.useCallback((e,r)=>{w({type:e,message:r}),setTimeout(()=>w(null),3e3)},[]),yt=a.useCallback(async(e,r="folder")=>{if(!p){te("error",o("drive.toast.googleDriveImportFailed"));return}at(!0);try{const s=await Hr(r);if(s.items.length===0){W(null);return}Ce(s),st(!0)}catch(s){console.error("Failed to open Google Drive Picker",s),te("error",s instanceof Error?s.message:o("drive.toast.googleDriveImportFailed")),W(null)}finally{at(!1)}},[te,o,p]),sr=a.useCallback(async e=>{const r=D;if(!r)return;await h(r.folderId);const s=e.importedFiles+e.importedFolders;te(s>0?"success":"error",e.failed.length>0?o("drive.toast.googleDriveImportPartial",{count:s,failed:e.failed.length}):o("drive.toast.googleDriveImported",{count:s})),n(`/faddit/drive/${r.folderId}`),e.failed.length===0&&(W(null),Ce(null)),E(""),z(null),P(null)},[n,D,te,h,o]),or=a.useCallback(e=>{if(e.status==="cancelled"){F&&Tt(F)&&Y(F);return}E(e.folderId),z(e.workspace),ne(e.workspace),Se(!1),F==="folder"?Je(!0):F==="worksheet"?Xe(!0):F==="upload"?Qe(!0):F==="googleDriveImport"&&(W(e),Ie(!0))},[Y,yt,F,ne]),ir=a.useCallback(async e=>{if(b){et(!0);try{await St({parentId:b,name:e}),Ae("folder"),await h(b),w({type:"success",message:o("drive.toast.folderCreated")}),setTimeout(()=>w(null),3e3),n(`/faddit/drive/${b}`)}catch{w({type:"error",message:o("drive.toast.folderCreateError")}),setTimeout(()=>w(null),3e3)}finally{et(!1),E(""),P(null)}}},[b,n,h,o]),nr=a.useCallback(async e=>{if(!(!p||!b))try{tt(!0);const r=await na({userId:p,parentId:b,name:e.title||o("drive.defaults.newWorksheet"),default_name:!0,manager_name:e.managerName||Q||o("drive.defaults.manager"),brand_name:e.brandName||"",season_year:typeof e.seasonYear=="number"&&Number.isFinite(e.seasonYear)?e.seasonYear:new Date().getFullYear(),season_type:e.seasonType||"",gender:e.genderCode,age:e.ageCode,category:e.categoryCode,clothes:e.clothes||"",size_spec:e.description||"",product_kind:e.productKind??"clothing",editor_version:e.editorVersion??_e}),s=r.worksheetId||r.worksheet_id;if(vr({userId:p,worksheetId:s}),s&&e.recommendationSeed)try{const i=ba({},{templateId:e.recommendationSeed.templateId,classBase:e.recommendationSeed.classBase,source:e.recommendationSeed.source,svgUrl:e.recommendationSeed.svgUrl,svgExists:e.recommendationSeed.svgExists,svgStatus:e.recommendationSeed.svgStatus,sketchUrl:e.recommendationSeed.sketchUrl,patternUrl:e.recommendationSeed.patternUrl,score:e.recommendationSeed.score});await la(s,{userId:p,meta_data_json:JSON.stringify(i)})}catch(i){console.error("Failed to save worksheet recommendation metadata",i)}s&&(Ae("worksheet"),await h(b),n(`/faddit/worksheet/${s}`,{state:{editorVersion:e.editorVersion??_e,...ka(e.editorVersion??_e)==="board"?{seedDefaultSpecBoard:!0}:{},...e.recommendationSeed?{templateSeed:e.recommendationSeed,templateName:e.title||e.recommendationSeed.templateId}:{}}}))}
1catch{w({type:"error",message:o("drive.toast.worksheetCreateError")}),setTimeout(()=>w(null),3e3)}finally{tt(!1),E(""),P(null)}},[b,p,Q,n,o,h]),lr=a.useCallback(async()=>{je.current=!0,b&&await h(b),Ae("upload"),w({type:"success",message:o("drive.toast.uploadComplete")}),setTimeout(()=>w(null),3e3),b&&n(`/faddit/drive/${b}`),E(""),z(null),P(null)},[b,n,h,o]),dr=a.useCallback(()=>{je.current||Y("upload"),je.current=!1,Qe(!1)},[Y]),xt=50,[cr,bt]=a.useState(!1),mr=a.useCallback(e=>{const r=ha(e);if(r>xt){w({type:"error",message:o("drive.toast.dropFileLimit",{max:xt,count:r})}),setTimeout(()=>w(null),4e3);return}r!==0&&(it(e),De(!0))},[o]),{isDraggingOver:ur,handlers:pr}=ya({onDrop:mr}),kt=async(e,r,s)=>{var u;const i=await St({parentId:r,name:e.folderName}),f=(i==null?void 0:i.id)??(i==null?void 0:i.fileSystemId),c=[],m=[];if(f){if(e.files.length>0){const y=await It({parentId:f,userId:s,files:e.files,tags:e.files.map(()=>"etc")});for(const k of y.result)if(k.success&&k.result){const q=k.result.id??k.result.fileSystemId,Ee=k.result.name??((u=e.files[k.index])==null?void 0:u.name)??"file";q&&c.push({fileSystemId:q,name:Ee,tag:"etc"})}}for(const y of e.subFolders)try{m.push(await kt(y,f,s))}catch{}}return{folderName:e.folderName,files:c,subFolders:m}},fr=a.useCallback(async e=>{var f;if(e.status==="cancelled"||!_||!p)return;ne(e.workspace),De(!1),bt(!0);const r=e.folderId,s=[],i=[];try{if(_.files.length>0){const c=await It({parentId:r,userId:p,files:_.files,tags:_.files.map(()=>"etc")});for(const m of c.result)if(m.success&&m.result){const u=m.result.id??m.result.fileSystemId,y=m.result.name??((f=_.files[m.index])==null?void 0:f.name)??"file";u&&s.push({fileSystemId:u,name:y,tag:"etc"})}}for(const c of _.folders)try{i.push(await kt(c,r,p))}catch{}await h(r),(s.length>0||i.length>0)&&(qt({files:s,folders:i}),ot(!0))}catch{w({type:"error",message:o("drive.toast.uploadFailed")}),setTimeout(()=>w(null),3e3)}finally{bt(!1),it(null)}},[_,p,ne,h,o]),gr=a.useCallback(async e=>{if(!p)return;const r=await Promise.all(e.map(async s=>({fileSystemId:s.fileSystemId,tag:s.tag,materials:await $r({userId:p,fileSystemId:s.fileSystemId,tag:s.tag})})));j(s=>s.map(i=>{const f=r.find(c=>c.fileSystemId===i.fileSystemId);return f?{...i,tag:f.tag}:i})),X(s=>{const i=new Map(s);return r.forEach(({fileSystemId:f,materials:c})=>{i.set(f,c[0]||null)}),i})},[p]);return t.jsxs("div",{className:"flex h-[calc(100dvh-64px)] w-full overflow-hidden",children:[t.jsx(A,{open:Lt,onClose:()=>n("/faddit/home",{replace:!0}),dismissable:!1,size:"sm","aria-label":"PC에서 이어하기",children:Ke?t.jsx(Ma,{worksheetId:Ke,email:At,onContinueToDrive:()=>n("/faddit/home",{replace:!0})}):t.jsxs(t.Fragment,{children:[t.jsx(A.Header,{title:"작업지시서를 저장했어요.",subtitle:"큰 화면에서 작업지시서를 열면 편집을 이어갈 수 있어요.",showClose:!1}),t.jsx(A.Footer,{children:t.jsx("button",{type:"button",onClick:()=>n("/faddit/home",{replace:!0}),className:aa,children:"드라이브로 이동하기"})})]})}),t.jsxs("div",{className:"drive-dotted-bg bg-gray-150 dark:bg-drive-chrome relative flex min-h-0 min-w-0 flex-1 flex-col",children:[ur&&t.jsx("div",{className:"pointer-events-none absolute inset-0 z-40 p-4 sm:p-6 lg:p-8",children:t.jsx("div",{className:"flex h-full items-center justify-center rounded-xl border-4 border-dashed border-drive-accent-border bg-drive-accent-soft dark:border-drive-accent-border dark:bg-drive-accent-soft",children:t.jsxs("div",{className:"text-center",children:[t.jsx("p",{className:"text-lg font-semibold text-drive-accent dark:text-drive-accent",children:o("drive.dropzone.title")}),t.jsx("p",{className:"mt-1 text-sm text-drive-accent dark:text-drive-accent",children:o("drive.dropzone.description")})]})})}),cr&&t.jsx("div",{className:"pointer-events-none absolute inset-0 z-40 flex items-center justify-center bg-white/70 dark:bg-gray-900/70",children:t.jsxs("div",{className:"flex flex-col items-center gap-3",children:[t.jsxs("svg",{className:"h-8 w-8 animate-spin text-gray-500",viewBox:"0 0 24 24",fill:"none",children:[t.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),t.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),t.jsx("p",{className:"text-sm font-medium text-gray-600 dark:text-gray-300",children:o("drive.dropzone.uploading")})]})}),t.jsxs("div",{ref:e=>{nt.current=e,Me.current=e},className:"scrollbar-drive relative flex-1 overflow-x-hidden overflow-y-auto px-4 py-6 sm:px-6 lg:px-8",onClick:er,...pr,children:[t.jsxs("div",{className:"mb-4 flex items-center justify-between gap-3",children:[t.jsx("h2",{className:"text-lg font-bold text-gray-800 dark:text-gray-100",children:o("drive.page.recentDocuments")}),t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsxs("div",{className:"flex",children:[t.jsx(Ct,{content:o("drive.view.list"),position:"bottom",children:t.jsx("button",{type:"button",onClick:()=>
1ze("list"),className:`btn inline-flex h-[38px] w-[42px] cursor-pointer items-center justify-center rounded-r-none border-gray-200 p-0 dark:border-gray-700/60 ${ie==="list"?"dark:bg-drive-surface bg-white text-drive-accent":"dark:bg-drive-surface dark:hover:bg-drive-surface bg-white text-gray-500 hover:bg-gray-50 dark:text-gray-300"}`,"aria-label":o("drive.view.list"),children:t.jsx(wa,{className:"h-4 w-4",strokeWidth:2})})}),t.jsx(Ct,{content:o("drive.view.grid"),position:"bottom",children:t.jsx("button",{type:"button",onClick:()=>ze("grid"),className:`btn -ml-px inline-flex h-[38px] w-[42px] cursor-pointer items-center justify-center rounded-l-none border-gray-200 p-0 dark:border-gray-700/60 ${ie==="grid"?"dark:bg-drive-surface bg-white text-drive-accent":"dark:bg-drive-surface dark:hover:bg-drive-surface bg-white text-gray-500 hover:bg-gray-50 dark:text-gray-300"}`,"aria-label":o("drive.view.grid"),children:t.jsx(va,{className:"h-4 w-4",strokeWidth:2})})})]}),t.jsxs(Jr,{open:Ot,onOpenChange:Ze,children:[t.jsx(Xr,{asChild:!0,children:t.jsx("button",{type:"button","data-tour":"create",onClick:Sr,className:"btn dark:bg-drive-surface dark:hover:bg-drive-surface bg-gray-900 text-gray-100 hover:bg-gray-800 dark:text-gray-100",children:o("drive.create.openMenu")})}),t.jsx(Qr,{children:t.jsxs(ea,{align:"end",side:"bottom",sideOffset:8,className:"dark:bg-drive-surface z-50 w-56 rounded-lg border border-gray-200 bg-white p-2 shadow-lg dark:border-gray-700/60",children:[t.jsxs("button",{type:"button",className:"dark:hover:bg-drive-surface flex w-full items-center gap-2.5 rounded-md px-3 py-2 text-left text-sm text-gray-700 hover:bg-gray-100 dark:text-gray-200",onClick:()=>ge("folder"),children:[t.jsx("span",{className:"inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-lg bg-gray-50 text-gray-700 dark:bg-gray-800 dark:text-gray-200",children:t.jsx(Sa,{className:"h-4 w-4"})}),o("drive.create.folder")]}),t.jsxs("button",{type:"button",className:"dark:hover:bg-drive-surface flex w-full items-center gap-2.5 rounded-md px-3 py-2 text-left text-sm text-gray-700 hover:bg-gray-100 dark:text-gray-200",onClick:()=>ge("worksheet"),children:[t.jsx("span",{className:"inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-lg bg-gray-50 text-gray-700 dark:bg-gray-800 dark:text-gray-200",children:t.jsx(Ia,{className:"h-4 w-4"})}),o("drive.create.worksheet")]}),t.jsxs("button",{type:"button",className:"dark:hover:bg-drive-surface flex w-full items-center gap-2.5 rounded-md px-3 py-2 text-left text-sm text-gray-700 hover:bg-gray-100 dark:text-gray-200",onClick:()=>ge("upload"),children:[t.jsx("span",{className:"inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-lg bg-gray-50 text-gray-700 dark:bg-gray-800 dark:text-gray-200",children:t.jsx(Ca,{className:"h-4 w-4"})}),o("drive.create.upload")]}),t.jsxs("button",{type:"button",className:"dark:hover:bg-drive-surface flex w-full items-center gap-2.5 whitespace-nowrap rounded-md px-3 py-2 text-left text-sm text-gray-700 hover:bg-gray-100 disabled:cursor-not-allowed disabled:opacity-50 dark:text-gray-200",onClick:()=>ge("googleDriveImport"),disabled:rt,children:[t.jsx("span",{className:"inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-lg bg-gray-50 text-gray-700 dark:bg-gray-800 dark:text-gray-200",children:t.jsx(zr,{className:"h-4 w-4"})}),o(rt?"drive.upload.googleDrive.importing":"drive.create.googleDriveImport")]})]})})]})]})]}),t.jsx("div",{className:"mb-8 flex items-center justify-between gap-4",children:t.jsx("div",{"data-tour":"filter",className:"flex flex-wrap items-center gap-[8px]",children:Fa.map(e=>t.jsx("button",{type:"button",onClick:()=>{Qt(e.value),G.resetPagination()},className:`rounded-full px-[16px] py-[6px] text-xs font-semibold transition ${V===e.value?"dark:bg-drive-surface bg-gray-800 text-white dark:text-gray-100 dark:ring-1 dark:ring-gray-600/60":"dark:bg-drive-surface dark:hover:bg-drive-surface bg-white text-gray-600 hover:bg-gray-100 dark:text-gray-300"}`,children:o(e.labelKey)},e.value))})}),be?t.jsx("div",{className:"space-y-6",children:ie==="grid"?t.jsxs(t.Fragment,{children:[t.jsxs("div",{children:[t.jsx("div",{className:"mb-3 h-4 w-12 animate-pulse rounded bg-gray-200 dark:bg-gray-700/70"}),t.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(240px,1fr))] gap-3",style:fe,children:Array.from({length:4}).map((e,r)=>t.jsx(Wr,{},`folder-sk-${r}`))})]}),t.jsxs("div",{children:[t.jsx("div",{className:"mb-3 h-4 w-12 animate-pulse rounded bg-gray-200 dark:bg-gray-700/70"}),t.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(240px,1fr))] gap-5",style:fe,children:Array.from({length:6}).map((e,r)=>t.jsx(Kr,{},`file-sk-${r}`))})]})]}):t.jsx("div",{className:"dark:bg-drive-surface overflow-x-auto rounded-xl bg-white shadow-xs",children:t.jsxs("table",{className:"w-full min-w-[860px] table-auto text-sm dark:text-gray-300",children:[t.jsx("thead",{className:"dark:bg-drive-surface bg-gray-50 text-xs font-semibold text-gray-500 dark:text-gray-400",children:t.jsxs("tr",{children:[t.jsx("th",{className:"min-w-[280px] px-4 py-3 text-left",children:o("drive.table.name")}),t.jsx("th",{className:"min-w-[120px] px-4 py-3 text-left whitespace-nowrap",children:o("drive.table.creator")}),t.jsx("th",{className:"min-w-[190px] px-4 py-3 text-left whitespace-nowrap",children:o("drive.table.updatedAt")}),t.jsx("th",{className:"min-w-[110px] px-4 py-3 text-left whitespace-nowrap",children:o("drive.table.fileSize")})]})}),t.jsx("tbody",{children:Array.from({length:8}).map((e,r)=>t.jsx(Gr,{},`list-sk-${r}`))})]})})}):t.jsxs("div",{className:"space-y-6",children:[ie==="grid"?t.jsxs(t.Fragment,{children:[pt&&Re.length>0&&t.jsxs("div",{children:[t.jsx("h2",{className:"mb-3 text-sm font-semibold text-gray-500 dark:text-gray-400",children:o("drive.item.folder")}),t.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(240px,1fr))] gap-3",style:fe,children:Re.map(e=>t.jsx(Dr,{folder:La(e),isSelected:!1,dragSelectionIds:[],dragSelectionEntries:[],onToggleSelect:re,onPress:re,onOpen:ct,canMove:!1,canRename:!1,canDelete:!1,hideHoverTools:!0,locationLabel:rr(e),onMoveFolder:re,onAddFavorite:ce,onRenameFolder:re,onDeleteFolder:re},e.fileSystemId))})]}),ft&&Fe.length>0&&t.jsxs("div",{children:[t.jsx("h2",{className:"mb-3 text-sm font-semibold text-gray-500 dark:text-gray-400",children:o("drive.item.file")}),t.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(240px,1fr))] gap-5",style:fe,children:Fe.map(e=>{const r=C.get(e.fileSystemId)??null,s=Ar({source:{nodeType:e.type,worksheetId:e.worksheetId,mimetype:e.mimetype,size:e.size,creatorName:e.creatorName,updatedAt:e.updatedAt,worksheetManagerName:e.worksheetManagerName,worksheetBrandName:e.worksheetBrandName,worksheetSeasonYear:e.worksheetSeasonYear,worksheetSeasonType:e.worksheetSeasonType,worksheetGender:e.worksheetGender,worksheetAge:e.worksheetAge,worksheetCategory:e.worksheetCategory,worksheetClothes:e.worksheetClothes,worksheetProductKind:e.worksheetProductKind},primaryMaterial:r,t:o,locale:g});return t.jsx(Lr,{id:e.fileSystemId,fileSystemId:e.fileSystemId,nodeType:e.type,mimetype:e.mimetype,fileSizeBytes:e.size??null,documentThumbn
1ailStatus:e.documentThumbnailStatus??null,imageSrc:Te(e),imageAlt:e.name,title:e.name,fileTag:e.tag,badge:Le(e,o),worksheetEditorVersion:e.worksheetEditorVersion??null,actionLabel:o("drive.actions.open"),actionHref:"#0",isStarred:e.isStarred,creatorAvatarUrl:e.creatorProfileImg??void 0,creatorName:Ea(e.recentActionType,o),creatorSeedName:e.creatorName??void 0,isSelected:!1,isActive:(l==null?void 0:l.fileSystemId)===e.fileSystemId,metaRows:s,mockupCounts:e.type==="worksheet"?{d2:e.worksheetMockup2dCount??0,d3:e.worksheetMockup3dCount??0}:void 0,commentUnreadCount:e.type==="worksheet"?e.worksheetUnreadCommentCount??0:void 0,mockupPreview:e.type==="worksheet"?{d2ImagePath:e.worksheetMockup2dLatestPath,d3ModelPath:e.worksheetMockup3dLatestModelPath}:void 0,onSelectChange:()=>{},onCardClick:mt,onCardDoubleClick:ut,onAddFavorite:ce,canRename:!1,canDelete:!1,canMoveToFolder:!1,recentMode:!0,dragSelectionIds:[],dragSelectionEntries:[],className:"min-w-0"},e.fileSystemId)})})]})]}):t.jsx("div",{className:"dark:bg-drive-surface overflow-x-auto rounded-xl bg-white shadow-xs",children:t.jsxs("table",{className:"w-full min-w-[860px] table-auto text-sm dark:text-gray-300",children:[t.jsx("thead",{className:"dark:bg-drive-surface bg-gray-50 text-xs font-semibold text-gray-500 dark:text-gray-400",children:t.jsxs("tr",{children:[t.jsx("th",{className:"min-w-[280px] px-4 py-3 text-left",children:o("drive.table.name")}),t.jsx("th",{className:"min-w-[120px] px-4 py-3 text-left whitespace-nowrap",children:o("drive.table.creator")}),t.jsx("th",{className:"min-w-[190px] px-4 py-3 text-left whitespace-nowrap",children:o("drive.table.updatedAt")}),t.jsx("th",{className:"min-w-[110px] px-4 py-3 text-left whitespace-nowrap",children:o("drive.table.fileSize")})]})}),t.jsxs("tbody",{children:[pt&&Re.map(e=>t.jsxs("tr",{"data-drive-item-card":!0,className:"dark:hover:bg-drive-surface cursor-pointer border-t border-gray-100 hover:bg-gray-50/70 dark:border-gray-700/60",onDoubleClick:()=>ct(e.fileSystemId),children:[t.jsx("td",{className:"min-w-[280px] px-4 py-3",children:t.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[t.jsx(ta,{className:"h-5 w-5 shrink-0 text-gray-500 dark:text-gray-100"}),t.jsx("span",{className:"truncate font-medium text-gray-800 dark:text-gray-100",children:e.name})]})}),t.jsx("td",{className:"min-w-[120px] px-4 py-3 text-gray-600 dark:text-gray-300",children:e.creatorName??"-"}),t.jsx("td",{className:"min-w-[190px] px-4 py-3 text-gray-600 dark:text-gray-300",children:e.updatedAt?new Date(e.updatedAt).toLocaleString("ko-KR",{year:"numeric",month:"long",day:"numeric"}):"-"}),t.jsx("td",{className:"min-w-[110px] px-4 py-3 text-gray-600 dark:text-gray-300",children:"—"})]},e.fileSystemId)),ft&&Fe.map(e=>t.jsxs("tr",{"data-drive-item-card":!0,className:`cursor-pointer border-t dark:border-gray-700/60 ${(l==null?void 0:l.fileSystemId)===e.fileSystemId?"border-drive-accent-border bg-drive-accent-soft dark:border-drive-accent-border dark:bg-drive-accent-soft":"dark:hover:bg-drive-surface border-gray-100 hover:bg-gray-50/70"}`,onClick:()=>mt(e.fileSystemId),onDoubleClick:()=>ut(e.fileSystemId),children:[t.jsx("td",{className:"min-w-[280px] px-4 py-3",children:t.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[t.jsx(ja,{className:"h-5 w-5 shrink-0 text-[#cecbcb] dark:text-gray-500",strokeWidth:1.9}),t.jsx("span",{className:"truncate font-medium text-gray-800 dark:text-gray-100",children:e.name})]})}),t.jsx("td",{className:"min-w-[120px] px-4 py-3 text-gray-600 dark:text-gray-300",children:e.creatorName??"-"}),t.jsx("td",{className:"min-w-[190px] px-4 py-3 text-gray-600 dark:text-gray-300",children:e.updatedAt?new Date(e.updatedAt).toLocaleString("ko-KR",{year:"numeric",month:"long",day:"numeric"}):"-"}),t.jsx("td",{className:"min-w-[110px] px-4 py-3 text-gray-600 dark:text-gray-300",children:Rt(e.size)??"-"})]},e.fileSystemId))]})]})}),G.isLoadingMore&&t.jsx("div",{className:"flex justify-center py-4",children:t.jsx("div",{className:"h-6 w-6 animate-spin rounded-full border-2 border-gray-300 border-t-drive-accent"})}),G.hasMore&&t.jsx("div",{ref:G.sentinelRef,className:"h-px"}),ee.length===0&&t.jsx(Or,{message:Ve.message,description:Ve.description,className:"min-h-[10rem] px-4 py-8"})]})]}),l&&t.jsx(ra,{path:l.path??"",idPath:l.idPath??"",nodeId:l.fileSystemId,nodeType:l.type,parentId:l.parentId,teamWorkspaces:x,rootFolderId:I})]}),t.jsx(Mr,{open:!!l,hasItem:!!l,onRequestEdit:tr,onRequestClose:()=>N(null),showShareAction:!1,children:l&&(()=>{const e=C.get(l.fileSystemId)??null,r=e?Object.entries(e.attributes??{}).filter(([s])=>!Oa.has(s)):[];return t.jsx(Tr,{item:Xt(l,Te(l)),currentUserName:Q,categoryLabel:Le(l,o),displayImageSrc:Te(l),attributeEntries:r,primaryMaterial:e,isWorksheetItem:l.type==="worksheet"||!!l.worksheetId,editMode:!1,detailSaveLoading:!1,getAttributeLabel:s=>_r(s,s,o),formatAttributeValue:(s,i)=>Ur(s,i,o),formatDriveItemSubtitle:s=>s||"",formatUnitForDisplay:s=>s,editValues:{fileName:l.name,codeInternal:"",vendorName:"",itemName:"",originCountry:"",imageUrl:"",imageFile:null,imagePreviewUrl:null,imageDragging:!1,imageInputRef:Et},onEditTextFieldChange:()=>{},onEditImageDraggingChange:()=>{},onDropEditImageFile:()=>{},onCancelEdit:()=>{},onSave:()=>{},onOpenWorksheet:()=>{l.worksheetId&&n(`/faddit/worksheet/${l.worksheetId}`)}})})()}),t.jsx(Mt,{open:_t,onOpenChange:Se,onResult:or,teams:Ye}),t.jsx(Vr,{modalOpen:Ut,setModalOpen:Je,isSubmitting:$t,onSubmit:ir,onCancel:()=>Y("folder")}),t.jsx(xa,{modalOpen:Bt,setModalOpen:Xe,isSubmitting:zt,onSubmit:nr,onCancel:()=>Y("worksheet")}),t.jsx(Yr,{open:Wt,onCancel:()=>{Ie(!1),W(null),E(""),z(null),P(null)},onConfirm:e=>{const r=D;Ie(!1),r&&yt(r,e)}}),t.jsx(qr,{open:Kt,initialSelection:Gt,parentId:(D==null?void 0:D.folderId)??"",destinationLabel:(wt=D==null?void 0:D.display)==null?void 0:wt.name,onClose:()=>{st(!1),Ce(null),W(null),E(""),z(null),P(null)},onComplete:sr}),p&&t.jsx(ga,{open:Ht,onClose:dr,onUploaded:lr,userId:p,parentId:b,destinationLabel:(O==null?void 0:O.type)==="team"?o("drive.workspace.teamPrefix",{name:O.teamName??""}):(O==null?void 0:O.type)==="personal"?o("drive.sidebar.myWorkspace"):void 0}),Ne?t.jsx("div",{className:`fixed right-4 bottom-4 z-50 rounded-lg px-4 py-3 text-sm font-medium text-white shadow-lg ${Ne.type==="success"?"bg-emerald-500":"bg-red-500"}`,children:Ne.message}):null,t.jsx(Mt,{open:Zt,onOpenChange:De,onResult:fr,teams:Ye,title:o("drive.locationPicker.uploadTitle")}),t.jsx(Zr,{open:Vt,onClose:()=>ot(!1),data:Yt,onSave:gr})]})};export{Vo 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.