PageSourceSearch

https://www.zhipuai.cn/_next/static/chunks/5773.e79e1b2483677b57.js

js zhipuai.cn collected 2026-10-02 04:07:47 UTC 3,286 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5773],{55773:(e,l,a)=>{a.r(l),a.d(l,{UploadComponent:()=>f});var t=a(20091),s=a(23590),i=a(22877),o=a(20117),n=a(25921),r=a(13034),d=a(58046),u=a(13864),c=a(98162),m=a(17691),h=a(41947),p=a(909),g=a(27137),_=a(3301),b={depth:0},f=e=>{let{className:l,data:{fields:a,relationTo:f,value:w},nodeKey:v}=e;if("object"==typeof w)throw Error("Upload value should be a string or number. The Lexical Upload component should not receive the populated value object.");let{config:{routes:{api:x},serverURL:$},getEntityConfig:j}=(0,c.c)(),N=(0,_.useRef)(null),{uuid:D}=(0,o.b)(),C=(0,m.useEditDepth)(),[S]=(0,r.DF)(),{editorConfig:y,fieldProps:{schemaPath:k}}=(0,o.b)(),P=(0,d.a)(),{i18n:U,t:E}=(0,h.d)(),[T,z]=(0,_.useReducer)(e=>e+1,0),[B]=(0,_.useState)(()=>j({collectionSlug:f})),L=(0,_.useId)(),R=(0,m.formatDrawerSlug)({slug:"lexical-upload-drawer-"+D+L,depth:C}),{toggleDrawer:F}=(0,s.a)(R,!0),{closeDocumentDrawer:K,DocumentDrawer:I,DocumentDrawerToggler:A}=(0,i.a)({id:w,collectionSlug:B.slug}),[{data:M},{setParams:O}]=(0,m.usePayloadAPI)(`${$}${x}/${B.slug}/${w}`,{initialParams:b}),q=M?.thumbnailURL||M?.url,G=(0,_.useCallback)(()=>{S.update(()=>{(0,p.nsf)(v)?.remove()})},[S,v]),H=(0,_.useCallback)(e=>{O({...b,cacheBust:T}),z(),K()},[O,T,K]),J=y?.resolvedFeatureMap?.get("upload")?.sanitizedClientFeatureProps.collections?.[B.slug]?.hasExtraFields,Q=(0,_.useCallback)((e,l)=>{S.update(()=>{let e=(0,p.nsf)(v);if(e){let a={...e.getData(),fields:l};e.setData(a)}})},[S,v]),V=q&&M?.width&&M?.height?M.width>M.height?"landscape":"portrait":"landscape";return(0,n.jsxs)("div",{className:`${l}__contents ${l}__contents--${V}`,"data-filename":M?.filename,ref:N,children:[(0,n.jsxs)("div",{className:`${l}__card`,children:[(0,n.jsxs)("div",{className:`${l}__media`,children:[(0,n.jsx)(m.Thumbnail,{collectionSlug:f,fileSrc:(0,g.w)(M?.mimeType)?q:null,height:M?.height,size:"none",width:M?.width}),P&&(0,n.jsx)("div",{className:`${l}__overlay ${l}__floater`,children:(0,n.jsxs)("div",{className:`${l}__actions`,role:"toolbar",children:[J?(0,n.jsx)(m.Button,{buttonStyle:"icon-label",className:`${l}__upload-drawer-toggler`,disabled:!P,el:"button",icon:"edit",onClick:F,round:!0,size:"medium",tooltip:E("fields:editRelationship")}):null,(0,n.jsx)(m.Button,{buttonStyle:"icon-label",className:`${l}__swap-drawer-toggler`,disabled:!P,el:"button",icon:"swap",onClick:()=>{S.dispatchCommand(t.b,{replace:{nodeKey:v}})},round:!0,size:"medium",tooltip:E("fields:swapUpload")}),(0,n.jsx)(m.Button,{buttonStyle:"icon-label",className:`${l}__removeButton`,disabled:!P,icon:"x",onClick:e=>{e.preventDefault(),G()},round:!0,size:"medium",tooltip:E("fields:removeUpload")})]})})]}),(0,n.jsxs)("div",{className:`${l}__metaOverlay ${l}__floater`,children:[(0,n.jsx)(A,{className:`${l}__doc-drawer-toggler`,children:(0,n.jsx)("strong",{className:`${l}__filename`,children:M?.filename||E("general:untitled")})}),(0,n.jsx)("div",{className:`${l}__collectionLabel`,children:(0,u.s)(B.labels.singular,U)})]})]}),w?(0,n.jsx)(I,{onSave:H}):null,J?(0,n.jsx)(t.a,{data:a,drawerSlug:R,drawerTitle:E("general:editLabel",{label:(0,u.s)(B.labels.singular,U)}),featureKey:"upload",handleDrawerSubmit:Q,schemaPath:k,schemaPathSuffix:B.slug}):null]})}}}]);

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.