OCDevManagePerformanceTracesTablePageContent.react",["fbt","ix","GeoDropdownMenu.react","GeoMenuItem.react","GeoMenuLink.react","GeoSpinner.react","GeoTable.react","GeoTableWidth","HorizonTimestamp.react","HorizonWorldsCreatorPerformanceTraceUtils","OCDevManagePerformanceTracesHeader.react","OCDevManagePerformanceTracesTablePageContentQuery.graphql","OCDevManagePerformanceTracesTablePageContent_traceSessions.graphql","Placeholder.react","RelayHooks","createGeoTableDataSource","fbicon","nullthrows","react","useOCDevUIQuery"],(function(t,n,r,o,a,i,l,s,u){"use strict";var e=["data"],c,d,m,p=m||(m=o("react")),_=m,f=_.useMemo,g=_.useState,h=10;function y(e,t){var n,r;return((n=e.name)==null?void 0:n.toLowerCase().includes(t.toLowerCase()))||e.trace_session_id.toLowerCase().includes(t.toLowerCase())||((r=e.session_id.toLowerCase().includes(t.toLowerCase()))!=null?r:!1)}function C(t){var n=t.world_id,a=r("useOCDevUIQuery")(b,n!=null?{world_id:n}:{}),l=o("RelayHooks").usePaginationFragment(v,a),u=l.data,c=babelHelpers.objectWithoutPropertiesLoose(l,e),d=g(null),m=d[0],_=d[1],C=g(""),R=C[0],L=C[1],E=f(function(){var e;return u==null||(e=u.xfb_horizon_performance_trace_sessions)==null?void 0:e.edges.flatMap(function(e){var t;return e==null||(t=e.node)==null||(t=t.traces)==null||(t=t.nodes)==null||(t=t.filter(function(e){var t;return!((t=e.name)!=null&&t.startsWith("memory_snapshot"))}))==null?void 0:t.map(function(e){return{creation_time:e.creation_time,id:e.id,name:e.name,session_id:e.trace_session.session_id,trace_artifact_url:e.trace_artifact_url,trace_session_id:e.trace_session_id,trace_type:e.trace_type}})}).filter(Boolean)},[u]),k=f(function(){return R===""?E:E==null?void 0:E.filter(function(e){return y(e,R)})},[E,R]),I=f(function(){return m==null?k:k==null?void 0:k.filter(function(e){return m==="PLAYTEST"?e.trace_type==="PLAYTEST":e.trace_type!=="PLAYTEST"})},[k,m]),T=f(function(){var e;return[{cell:function(t){var e=t.item;return e.name},header:s._(/*BTDS*/"Name"),key:"name",width:(e=o("GeoTableWidth")).proportional(2)},{cell:function(t){var e=t.item;return p.jsx(o("HorizonTimestamp.react").HorizonTimestamp,{date:new Date(r("nullthrows")(e.creation_time)*1e3)})},header:s._(/*BTDS*/"Date created"),key:"trace_creation_time",width:e.proportional(1)},{cell:function(t){var e=t.item;return e.session_id},header:s._(/*BTDS*/"Session ID"),key:"session_id",width:e.proportional(2)},{cell:function(t){var e=t.item;return e.trace_session_id},header:s._(/*BTDS*/"Trace session ID"),key:"trace_session_id",width:e.proportional(2)},{cell:function(t){var e=t.item,n=e.trace_artifact_url,r=e.name,o=e.trace_type;return n==null||r==null||o==null?null:p.jsx(S,{traceArtifactUrl:n,traceName:r,traceType:o})},header:s._(/*BTDS*/"Actions"),key:"actions",width:e.proportional(1)}]},[]),D=f(function(){return r("createGeoTableDataSource")(I!=null?I:[],{getStableUniqueID:function(t){return t.id}})},[I]),x=c;return p.jsxs(p.Fragment,{children:[p.jsx("div",{style:{paddingLeft:12,paddingRight:12},children:p.jsx(r("OCDevManagePerformanceTracesHeader.react"),{searchQuery:R,setSearchQuery:L,setTraceType:_,traceType:m})}),p.jsx(r("Placeholder.react"),{fallback:p.jsx(r("GeoSpinner.react"),{loggingName:i.id}),children:p.jsx(r("GeoTable.react"),{columns:T,dataSource:D,label:s._(/*BTDS*/"Simple table"),pagination:{hasNext:x.hasNext,isLoadingNext:x.isLoadingNext,loadNext:x.loadNext,pageSize:h}})})]})}C.displayName=C.name+" [from "+i.id+"]";var b=c!==void 0?c:c=n("OCDevManagePerformanceTracesTablePageContentQuery.graphql"),v=d!==void 0?d:d=n("OCDevManagePerformanceTracesTablePageContent_traceSessions.graphql");function S(e){var t=e.traceArtifactUrl,n=e.traceName,a=e.traceType,i=a==="PLAYTEST",l=a==="WORLD_CONTENT_UNDERSTANDING",c=n==null?void 0:n.match(o("HorizonWorldsCreatorPerformanceTraceUtils").JS_TRACE_REGEX);return p.jsxs(r("GeoDropdownMenu.react"),{label:s._(/*BTDS*/"Open trace"),children:[c&&p.jsx(r("GeoMenuLink.react"),{href:o("HorizonWorldsCreatorPerformanceTraceUtils").CHROME_DEVTOOLS_URL,icon:o("fbicon")._(u("509932"),16),label:s._(/*BTDS*/"Chrome dev tools"),openLinkInNewTab:!0}),!(c||i||l)&&p.jsx(r("GeoMenuItem.react"),{icon:o("fbicon")._(u("509932"),16),label:s._(/*BTDS*/"Perfetto"),onClick:function(){return o("HorizonWorldsCreatorPerformanceTraceUtils").openTraceInPerfetto(t,n)}}),p.jsx(r("GeoMenuLink.react"),{href:t,icon:o("fbicon")._(u("489717"),16),label:s._(/*BTDS*/"Download"),openLinkInNewTab:!0})]})}S.displayName=S.name+" [from "+i.id+"]",l.default=C}),226);
-----
OCDevManagePerformanceTracesTablePageContentQuery.graphql",[],(function(a,b,c,d,e,f){"use strict";a=function(){var a=[{defaultValue:null,kind:"LocalArgument",name:"world_id"}],b={kind:"Variable",name:"world_id",variableName:"world_id"},c=[{kind:"Literal",name:"first",value:10},{kind:"Literal",name:"only_uploaded_by_viewer",value:!0},b],d={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null};return{fragment:{argumentDefinitions:a,kind:"Fragment",metadata:null,name:"OCDevManagePerformanceTracesTablePageContentQuery",selections:[{args:[b],kind:"FragmentSpread",name:"OCDevManagePerformanceTracesTablePageContent_traceSessions"}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:a,kind:"Operation",name:"OCDevManagePerformanceTracesTablePageContentQuery",selections:[{alias:null,args:c,concreteType:"XFBHorizonPerformanceTraceSessionsConnection",kind:"LinkedField",name:"xfb_horizon_performance_trace_sessions",plural:!1,selections:[{alias:null,args:null,concreteType:"XFBHorizonPerformanceTraceSessionsEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:null,args:null,concreteType:"XFBHorizonPerformanceTraceSession",kind:"LinkedField",name:"node",plural:!1,selections:[d,{alias:null,args:null,concreteType:"XFBHorizonPerformanceTraceSessionTracesConnection",kind:"LinkedField",name:"traces",plural:!1,selections:[{alias:null,args:null,concreteType:"XFBHorizonPerformanceTrace",kind:"LinkedField",name:"nodes",plural:!0,selections:[d,{alias:null,args:null,kind:"ScalarField",name:"creation_time",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"trace_session_id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"trace_type",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"trace_artifact_url",storageKey:null},{alias:null,args:null,concreteType:"XFBHorizonPerformanceTraceSession",kind:"LinkedField",name:"trace_session",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"session_id",storageKey:null},d],storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"XFBPageInfo",kind:"LinkedField",name:"page_info",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"has_next_page",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"end_cursor",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:c,filters:["world_id","only_uploaded_by_viewer"],handle:"connection",key:"OCDevManagePerformanceTracesTablePageContent_xfb_horizon_performance_trace_sessions",kind:"LinkedHandle",name:"xfb_horizon_performance_trace_sessions"}]},params:{id:"25089299310763899",metadata:{},name:"OCDevManagePerformanceTracesTablePageContentQuery",operationKind:"query",text:null}}}();e.exports=a}),null);
-----