|
|
|
|
`)},[t]),i=(n||"").trim().toLowerCase();return e.React.createElement(_,null,r.map(function(d,A){const R=d.match(F),y=R?.[1]??"",o=R?.[2],f=R?.[3]??d,c=!!i&&d.toLowerCase().includes(i),b=!!i&&!c;return e.React.createElement(B,{key:A,selectable:!0,style:{fontFamily:"monospace",fontSize:12.5,lineHeight:18,opacity:b?.35:1,backgroundColor:c?"rgba(88,101,242,0.25)":"transparent"}},y,o?e.React.createElement(B,{style:{color:l.key}},o):null,e.React.createElement(B,{style:{color:L(f)}},f))}))}const{View:z,ScrollView:T,TextInput:H,Text:v}=e.ReactNative;function W({message:t}){const[n,r]=e.React.useState(""),i=e.React.useMemo(function(){return JSON.stringify(m(t),null,4)},[t.id]);return e.React.createElement(T,{style:{flex:1,marginHorizontal:13,marginVertical:10}},e.React.createElement(z,{style:{flexDirection:"row"}},e.React.createElement(h.Button,{style:{flex:1,marginRight:8,marginBottom:8},text:"Copy Content",color:"brand",size:"small",disabled:!t.content,onPress:function(){e.clipboard.setString(t.content),S.showToast("Copied content to clipboard",p.getAssetIDByName("toast_copy_link"))}}),e.React.createElement(h.Button,{style:{flex:1,marginBottom:8},text:"Copy JSON",color:"brand",size:"small",onPress:function(){e.clipboard.setString(i),S.showToast("Copied JSON to clipboard",p.getAssetIDByName("toast_copy_link"))}})),e.React.createElement(H,{value:n,onChangeText:r,placeholder:"Search keys or values\u2026",placeholderTextColor:"#888",autoCapitalize:"none",autoCorrect:!1,style:{borderWidth:1,borderColor:"rgba(128,128,128,0.35)",borderRadius:8,paddingHorizontal:10,paddingVertical:8,marginBottom:10,color:"#fff"}}),!!t.content&&e.React.createElement(z,{style:{marginBottom:12}},e.React.createElement(v,{style:{fontSize:11,opacity:.6,marginBottom:4,fontWeight:"700"}},"MESSAGE CONTENT"),e.React.createElement(v,{selectable:!0,style:{fontFamily:"monospace",fontSize:13}},t.content)),e.React.createElement(v,{style:{fontSize:11,opacity:.6,marginBottom:4,fontWeight:"700"}},"RAW DATA"),e.React.createElement(T,{horizontal:!0,showsHorizontalScrollIndicator:!0},e.React.createElement(O,{text:i,query:n})))}function u(t,n=""){x.storage.lastDetection={strategy:t,detail:n,timestamp:Date.now()}}function J(){return x.storage.lastDetection}const{ScrollView:M,View:q}=e.ReactNative;function G({children:t}){return e.React.createElement(M,{style:{flex:1}},t,e.React.createElement(q,{style:{height:24}}))}const{View:j,Text:U}=e.ReactNative;function V({children:t,style:n}){return e.React.createElement(j,{style:[{marginHorizontal:16,marginVertical:8,padding:10,borderRadius:8,borderWidth:1,borderColor:"rgba(128,128,128,0.25)"},n]},e.React.createElement(U,{style:{fontSize:12.5,lineHeight:18,opacity:.75}},t))}const{TouchableOpacity:K,Text:Q}=e.ReactNative;function X({label:t,onPress:n,disabled:r,style:i}){return e.React.createElement(K,{disabled:r,onPress:n,style:[{backgroundColor:"#5865F2",borderRadius:8,padding:10,alignItems:"center",opacity:r?.5:1},i]},e.React.createElement(Q,{style:{color:"white",fontWeight:"600"}},t))}const{FormSection:Y,FormRow:Z}=h.Forms,ee={buttons:"Strategy 1 (button list) - working normally",actionSheetRow:"Strategy 2 (row group) - working normally",generic:"Strategy 3 (generic fallback) - the primary two shapes didn't match on this Discord build, but a broader fallback found a spot anyway",none:"None matched - the button couldn't be added on this Discord build"};function te(){const t=J();return e.React.createElement(G,null,e.React.createElement(Y,{title:"Diagnostics"},t?e.React.createElement(Z,{label:ee[t.strategy]??t.strategy,subLabel:`Last checked ${new Date(t.timestamp).toLocaleString()}${t.detail?` - ${t.detail}`:""}`}):e.React.createElement(V,null,"No data yet - long-press any message once, then come back here."),e.React.createElement(X,{style:{marginHorizontal:16,marginTop:8},label:"Copy diagnostics",disabled:!t,onPress:function(){e.clipboard.setString(JSON.stringify(t,null,2)),S.showToast("Copied - paste this if you're reporting an issue",void 0)}})),e.React.createElement(V,null,`"View Raw" is added to the message long-press menu by d
|