PageSourceSearch

https://studpro.vercel.app/_next/static/chunks/714.ab6f812a44acdd70.js

js studpro.vercel.app collected 2026-10-03 07:49:53 UTC 13,102 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[714],{68376:function(e,t,n){n.d(t,{O:function(){return p}});var r=n(85893),i=n(40168),l=n(42930),u=n(11636),s=n(67294),o=n(32932),a=n(7431);n(57557),n(66996);let c=(e,t)=>({title:(0,r.jsxs)("em",{children:["No schema found for type ",(0,r.jsx)("code",{children:t})]}),subtitle:(0,r.jsxs)("em",{children:["Document: ",(0,r.jsx)("code",{children:e})]}),media:()=>(0,r.jsx)(i.foC,{})});function d(e){let{layout:t,value:n}=e;return(0,r.jsx)(o.ogX,{...c(n._id,n._type),layout:t})}function f(e,t,n){return!1!==e&&(e||t&&t.icon||n||!1)}function p(e){let{icon:t,id:n,layout:c="default",pressed:p,schemaType:m,selected:h,title:x,value:y,margin:g,marginBottom:j,marginTop:b}=e,v=(0,o.I_y)(),k=(0,o.rq_)(),{ChildLink:_}=(0,a.RL)(),C=(0,o.Dqo)(n),w=!!(m&&m.name&&v.get(m.name)),[S,R]=(0,s.useState)(!1),E=(0,s.useMemo)(()=>y&&(0,l.Si)(y)?m&&w?(0,r.jsx)(a.iJ,{documentPreviewStore:k,icon:f(t,m,i.$lS),layout:c,schemaType:m,value:y,presence:C}):(0,r.jsx)(d,{value:y}):(0,r.jsx)(o.ogX,{status:(0,r.jsx)(u.xv,{muted:!0,children:(0,r.jsx)(i.XCv,{})}),icon:f(t,m,i.ROc),layout:c,title:x}),[k,w,t,c,m,x,y,C]),M=(0,s.useMemo)(()=>function(e){return(0,r.jsx)(_,{...e,childId:n})},[_,n]),P=(0,s.useCallback)(e=>{if(e.metaKey){R(!1);return}R(!0)},[]);return(0,s.useEffect)(()=>R(!1),[h]),(0,r.jsx)(o.oUE,{__unstable_focusRing:!0,as:M,"data-as":"a","data-ui":"PaneItem",margin:g,marginBottom:j,marginTop:b,onClick:P,padding:2,pressed:p,radius:2,selected:h||S,sizing:"border",tabIndex:-1,tone:"inherit",children:E})}},98714:function(e,t,n){n.r(t),n.d(t,{default:function(){return eh}});var r,i,l,u,s,o=n(85893),a=n(67294),c=n(11636),d=n(38993),f=n.n(d),p=n(18446),m=n.n(p),h=n(40168),x=n(186),y=n(19917),g=n(5014),j=n(83610),b=n(32817),v=n(65583),k=n(30743),_=n(23071),C=n(74727),w=n(9132),S=n(37991),R=n(6222),E=n(82649),M=n(69243),P=n(22401),q=n(29127),T=n(42006),D=n(92574),z=n(28440),O=n(32932),W=n(7431),I=n(59713),X=n(66996),B=n(42930),$=n(68376);n(57557),n(81763),n(47037);var L=n(98430),N=n(79878),A=n(56542),K=n(85092);let Y={by:[{field:"_updatedAt",direction:"desc"}]},Z={},F=/\b_type\s*==\s*(['"].*?['"]|\$.*?(?:\s|$))|\B(['"].*?['"]|\$.*?(?:\s|$))\s*==\s*_type\b/;function H(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.match(F);if(!n)return null;let r=(n[1]||n[2]).trim().replace(/^["']|["']$/g,"");if("$"===r[0]){let e=r.slice(1),n=t[e];return"string"==typeof n?n:null}return r}var V=Object.freeze,Q=Object.defineProperty,U=(e,t)=>V(Q(e,"raw",{value:V(t||e.slice())}));let J=(0,x.ZP)(c.xu)(r||(r=U(["\n  position: relative;\n"]))),G=(0,x.ZP)(c.xu)(i||(i=U(["\n  position: absolute;\n  left: 0;\n  right: 0;\n  top: 0;\n  bottom: 0;\n"]))),ee=[...Array(30).keys()];function et(e){let{layout:t}=e;return(0,o.jsx)(c.Kq,{padding:2,space:1,children:ee.map(e=>(0,o.jsx)(c.Zb,{padding:2,children:(0,o.jsx)(O.ogX,{isPlaceholder:!0,layout:t})},e))})}function en(e){let{childItemId:t,error:n,filterIsSimpleTypeConstraint:r,hasMaxItems:i,hasSearchQuery:l,isActive:u,isLazyLoading:s,isLoading:d,items:f,layout:p,loadingVariant:m,onListChange:x,onRetry:y,paneTitle:g,searchInputElement:j,showIcons:b}=e,v=(0,O.I_y)(),{collapsed:k}=(0,W.Cc)(),{collapsed:_,index:C}=(0,W.ec)(),[w,S]=(0,a.useState)(!1),R=(0,a.useCallback)(()=>{d||s||!w||x()},[s,d,x,w]);(0,a.useEffect)(()=>{if(_)return;let e=setTimeout(()=>{S(!0)},0);return()=>{clearTimeout(e)}},[_,f]);let E=(0,a.useCallback)((e,n)=>{let{activeIndex:r}=n,l=(0,O.vsM)(e._id),a=t===l,d=!u&&a,m=u&&a,h=r===f.length-1,x=h&&s,y=h&&i;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)($.O,{icon:!1!==b&&void 0,id:l,layout:p,marginBottom:1,pressed:d,schemaType:v.get(e._type),selected:m,value:e}),x&&(0,o.jsx)(c.kC,{align:"center",justify:"center",padding:4,children:(0,o.jsx)(c.$j,{muted:!0})}),y&&(0,o.jsx)(c.xu,{marginY:1,paddingX:3,paddingY:4,children:(0,o.jsxs)(c.xv,{align:"center",muted:!0,size:1,children:["Displaying a maximum of ",2e3," documents"]})})]})},[t,u,f.length,p,v,b,i,s]),M=(0,a.useMemo)(()=>l?(0,o.jsx)(c.kC,{align:"center",direction:"column",height:"fill",justify:"center",children:(0,o.jsx)(c.W2,{width:1,children:(0,o.jsx)(c.xu,{paddingX:4,paddingY:5,children:(0,o.jsx)(c.xv,{align:"center",muted:!0,children:"No results found"})})})}):(0,o.jsx)(c.kC,{align:"center",direction:"column",height:"fill",justify:"center",children:(0,o.jsx)(c.W2,{width:1,children:(0,o.jsx)(c.xu,{paddingX:4,paddingY:5,children:(0,o.jsx)(c.xv,{align:"center",muted:!0,children:r?"No documents of this type":"No matching documents"})})})}),[r,l]),P=(0,a.useMemo)(()=>
1{if(!w)return null;if(n)return(0,o.jsx)(c.kC,{align:"center",direction:"column",height:"fill",justify:"center",children:(0,o.jsx)(c.W2,{width:1,children:(0,o.jsxs)(c.Kq,{paddingX:4,paddingY:5,space:4,children:[(0,o.jsx)(c.X6,{as:"h3",children:"Could not fetch list items"}),(0,o.jsxs)(c.xv,{as:"p",children:["Error: ",(0,o.jsx)("code",{children:n.message})]}),y&&(0,o.jsx)(c.xu,{children:(0,o.jsx)(c.zx,{icon:h.bnu,onClick:y,text:"Retry",tone:"primary"})})]})})});if(!d&&0===f.length)return M;if("initial"===m&&d)return(0,o.jsx)(W.cN,{ms:300,children:(0,o.jsx)(et,{layout:p})});if("spinner"===m&&d)return null;let e="".concat(C,"-").concat(_);return(0,o.jsx)(J,{overflow:"hidden",height:"fill",children:(0,o.jsx)(G,{children:(0,o.jsx)(O.e8h,{activeItemDataAttr:"data-hovered",ariaLabel:g,canReceiveFocus:!0,focusRingOffset:-3,inputElement:j,itemHeight:51,items:f,onEndReached:R,onlyShowSelectionWhenActive:!0,overscan:10,padding:2,paddingBottom:1,renderItem:E,wrapAround:!1},e)})})},[_,n,R,C,d,f,p,m,y,E,j,w]);return(0,o.jsx)(W.Bh,{overflow:k||"initial"===m?"hidden":"auto",children:P})}let er=(0,a.memo)(e=>{let{contentAfter:t,index:n,initialValueTemplates:r=[],menuItemGroups:i=[],menuItems:l=[],setLayout:u,setSortOrder:s,title:d}=e,{features:f}=(0,W.xu)(),{collapsed:p,isLast:m}=(0,W.ec)(),x=m&&!p?-1:0,y=(0,a.useMemo)(()=>({setLayout:e=>{let{layout:t}=e;u(t)},setSortOrder:e=>{s(e)}}),[u,s]);return(0,o.jsx)(W.hX,{actions:(0,o.jsx)(W.cp,{initialValueTemplateItems:r,actionHandlers:y,menuItemGroups:i,menuItems:l}),backButton:f.backButton&&n>0&&(0,o.jsx)(c.zx,{as:W.hb,"data-as":"a",icon:h.Y4O,mode:"bleed"}),contentAfter:t,tabIndex:x,title:d})});er.displayName="DocumentListPaneHeader";let ei=[],el={error:null,onRetry:void 0,result:null},eu={result:null,error:null};var es=Object.freeze,eo=Object.defineProperty,ea=(e,t)=>es(eo(e,"raw",{value:es(t||e.slice())}));let ec=[],ed=(0,x.F4)(l||(l=ea(["\n  from {\n    transform: rotate(0deg);\n  }\n  to {\n    transform: rotate(360deg);\n  }\n"]))),ef=(0,x.ZP)(h.L4p)(u||(u=ea(["\n  animation: "," 500ms linear infinite;\n"])),ed),ep=(0,x.ZP)(c.Zb)(s||(s=ea(["\n  [data-ui='TextInput'] {\n    border-radius: inherit;\n  }\n"]))),em=e=>{let{menuItems:t,sortOrderRaw:n,layout:r}=e;return null==t?void 0:t.map(e=>{var t,i,l,u;return(null==(t=e.params)?void 0:t.layout)?{...e,selected:r===(null==(i=e.params)?void 0:i.layout)}:(null==(l=null==e?void 0:e.params)?void 0:l.by)?{...e,selected:m()(null==n?void 0:n.by,(null==(u=null==e?void 0:e.params)?void 0:u.by)||ec)}:{...e,selected:!1}})},eh=(0,a.memo)(function(e){let{childItemId:t,index:n,isActive:r,isSelected:i,pane:l,paneKey:u}=e,s=(0,O.I_y)(),{name:d}=(0,O.Lky)(),{defaultLayout:p="default",displayOptions:m,initialValueTemplates:x=ec,menuItemGroups:$,menuItems:F,options:V,title:Q}=l,{apiVersion:U,defaultOrdering:J=ec,filter:G}=V,ee=function(e){let t=(0,a.useRef)(e);return f()(t.current,e)||(t.current=e),t.current}(V.params||Z),et=l.source,es=(0,a.useMemo)(()=>H(G,ee),[G,ee]),eo=(null==m?void 0:m.showIcons)!==!1,[ea,ed]=(0,I.useDeskToolSetting)(es,"layout",p),[eh,ex]=(0,a.useState)(""),[ey,eg]=(0,a.useState)(""),[ej,eb]=(0,a.useState)(null),ev=(0,a.useRef)(!1),ek=(0,a.useMemo)(()=>(null==J?void 0:J.length)>0?{by:J}:Y,[J]),[e_,eC]=(0,I.useDeskToolSetting)(es,"sortOrder",ek),ew=es&&e_?function(e,t){let n=e.by.map(e=>{if(e.mapWith)return e;let n=function(e,t){let n=X.mL(t),r=e;for(let e of n){if(!r)return;if("string"==typeof e){r=function(e,t){if(!("fields"in e))return;let n=e.fields.find(e=>e.name===t);return n?n.type:void 0}(r,e);continue}let t=(0,B.Fd)(e)||(0,B.dw)(e);if(!t||"array"!==r.jsonType)return;let[n,i]=r.of||[];if(i||!n)return;if(!(0,B.dD)(n)){r=n;continue}let[l,u]=n.to||[];if(u||!l)return;r=l}return r}(t,e.field);return n?!function(e,t){let n=e.type;for(;n;){if(n.name===t||!n.type&&n.jsonType===t)return!0;n=n.type}return!1}(n,"datetime")?"string"===n.jsonType?{...e,mapWith:"lower"}:e:{...e,mapWith:"dateTime"}:e});return n.every((t,n)=>t===e.by[n])?e:{...e,by:n}}(e_,s.get(es)):e_,eS=(0,O.BoV)(ew),eR=/^_type\s*==\s*['"$]\w+['"]?\s*$/.test(G.trim()),{error:eE,hasMaxItems:eM,isLazyLoading:eP,isLoading:eq,isSearchReady:eT,items:eD,onListChange:ez,onRetry:eO}=function(e){let{filter:t,params:n,sortOrder:r,searchQuery:i,apiVersion:l}=e,u=(0,O.m85)({...O.Dr7,apiVersion:l||O.Dr7.apiVersion}),s=(0,O.I_y)(),[o,c]=(0,a.useState)(el),{onRetry:d,error:f,result:p}=o,m=null==p?void 0:p.documents,h=(0,a.useMemo)(()=>m?(0,O.RgL)(m).map(e=>{let t=e.draft||e.published;return{...t,hasPublished:!!e.published,hasDraft:!!e.draft}}):ei,[m]),[x,T]=(0,a.useState)(!1),[D,z]=(0,a.useState)(!1),[W,I]=(0,a.useState)(!1),X=(0,a.useMemo)(()=>H(t,n),[t,n]),B=null===p&&!f,$=(null==m?void 0:m.length)===2e3,Z=(0,a.useCallback)(()=>{B||D||W||I(!0)},[B,D,W]),F=(0,a.useCallback)(e=>{var t,n;if(e.error){c(e);return}let r=(null==(n=null==(t=e.result)?void 0:t.documents)?void 0:n.length)||0,i=!e.error&&(null==e?void 0:e.result)===null&&W;if(i){T(!0);return}if(r<100&&0!==r&&!W&&z(!0),(null==e?void 0:e.result)===null){c(t=>({...t.error?e:t}));return}T(!1),c(e)},[W]),V=(0,a.useMemo)(()=>{let e=new E.x,l=()=>e.next(),o=W?2e3:100,a=r||Y;return(function(e){let{client:t,schema:n,sort:r,limit:i,params:l,filter:u,searchQuery:s,staticTypeNames:o}=e,a=r.by,c=null==r?void 0:r.extendedProjection,d=(0,y.P)(()=>t.listen("*[".concat(u,"]"),l,{events:["welcome","mutation","reconnect"],includeResult:!1,visibility:"query"})).pipe((0,g.z)((e,t)=>0===t&&"welcome"!==e.type?(0,j._)(()=>Error("reconnect"===e.type?"Could not establish EventSource connection":'Received unexpected type of first event "'.concat(e.type,'"'))):(0,b.of)(e)),(0,v.B)()),[f,p]=(0,k.u)(d,e=>"welcome"===e.type);return(0,_.T)(f.pipe((0,C.q)(1)),p.pipe((0,w.p)(1e3,S.z,{leading:!0,trailing:!0}))).pipe((0,K.q)(e=>{let r=o?(0,b.of)(o):t.observable.fetch("array::unique(*[".concat(u,"][]._type)"),l);return r.pipe((0,g.z)(r=>{let o=r.flatMap(e=>n.get(e)||[]),{query:d,params:f}=(0,O.kqP)({filter:u,query:s||"",types:o},{__unstable_extendedProjection:c,comments:["findability-source: ".concat(s?"list-query":"list")],limit:i,params:l,sort:a}),p=()=>t.observable.fetch(d,f);return"mutation"===e.type&&"query"!==e.visibility?(0,R.H)(1200).pipe((0,g.z)(p)):p()}))}))})({client:u,filter:t,limit:o,params:n,schema:s,searchQuery:i||"",sort:a,staticTypeNames:X?[X]:void 0}).pipe((0,q.U)(e=>({result:{documents:e},error:null})),(0,L.O)(eu),(0,N.K)(e=>e instanceof ProgressEvent?(0,j._)(()=>Error("Request error")):(0,j._)(()=>e)),(0,N.K)((t,n)=>(0,M.z)((0,b.of)({result:null,error:t}),(0,_.T)((0,P.R)(window,"online"),e).pipe((0,C.q)(1),(0,g.z)(()=>n)))),(0,A.R)((e,t)=>({...e,...t,onRetry:l})))},[u,t,n,s,i,W,r,X]);(0,a.useEffect)(()=>{let e=V.subscribe(F);return()=>{e.unsubscribe()}},[F,V]);let Q=(0,a.useCallback)(()=>{z(!1),T(!1),c(el),I(!1)},[]);return(0,a.useEffect)(()=>{Q()},[Q,t,n,r,i]),{error:f,hasMaxItems:$,isLazyLoading:x,isLoading:B,isSearchReady:!f,items:h,onListChange:Z,onRetry:d}}({apiVersion:U,filter:G,params:ee,searchQuery:null==eh?void 0:eh.trim(),sortOrder:eS}),eW=(0,a.useMemo)(()=>em({menuItems:F,sortOrderRaw:e_,layout:ea}),[ea,F,e_]),eI=(0,z.W2)(e=>e.pipe((0,q.U)(e=>e.target.value),(0,T.b)(eg),(0,D.D)(e=>""===e?(0,b.of)(""):(0,R.H)(300)),(0,T.b)(ex)),[]),eX=(0,a.useCallback)(()=>{ex(""),eg("")},[]),eB=(0,a.useCallback)(e=>{"Escape"===e.key&&eX()},[eX]);(0,a.useEffect)(()=>(!1!==ev.current||eq||(ev.current=!0),()=>{ev.current=!1}),[eq]),(0,a.useEffect)(()=>{eX(),ev.current=!1},[u,eX]);let e$=(0,a.useMemo)(()=>{let e=eq&&0===eD.length&&ev.current;return e?"spinner":"initial"},[eq,eD.length]),eL=(0,o.jsx)(c.xu,{paddingX:2,paddingBottom:2,children:(0,o.jsx)(ep,{radius:4,tone:"transparent",children:(0,o.jsx)(c.oi,{"aria-label":"Search list",autoComplete:"off",border:!1,clearButton:!!eh,disabled:!eT,fontSize:[2,2,1],icon:"spinner"===e$?ef:h.W1M,onChange:eI,onClear:eX,onKeyDown:eB,placeholder:"Search list",radius:2,ref:eb,spellCheck:!1,value:ey})})});return(0,o.jsx)(O.cWh,{name:et||d,children:(0,o.jsxs)(W.X6,{currentMaxWidth:350,"data-ui":"DocumentListPane",id:u,maxWidth:640,minWidth:320,selected:i,children:[W.Oo,(0,o.jsx)(er,{contentAfter:eL,index:n,initialValueTemplates:x,menuItemGroups:$,menuItems:eW,setLayout:ed,setSortOrder:eC,title:Q}),(0,o.jsx)(en,{childItemId:t,error:eE,filterIsSimpleTypeConstraint:eR,hasMaxItems:eM,hasSearchQuery:!!eh,isActive:r,isLazyLoading:eP,isLoading:eq,items:eD,layout:ea,loadingVariant:e$,onListChange:ez,onRetry:eO,paneTitle:Q,searchInputElement:ej,showIcons:eo},u)]})})})}}]);

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.