2026-09-24 16:03:38 +00:00
// Module ID: 13398
// Function ID: 13399
2026-09-21 13:40:21 +00:00
// Name: VibegrationsCustomWidget
2026-09-24 16:03:38 +00:00
// Dependencies: [2067, 558, 568, 1438, 5308, 504, 2]
2026-09-21 19:31:18 +00:00
// Exports: composeVibegrationsCustomWidgetPrompt
2026-09-21 13:40:21 +00:00
2026-09-24 16:03:38 +00:00
// Module 13398 (VibegrationsCustomWidget)
2026-09-21 19:31:18 +00:00
import GuildStore from "GuildStore" /* 2067 */ ;
2026-09-21 13:40:21 +00:00
const require = globalThis . __r ;
const require = fn ;
2026-09-21 19:31:18 +00:00
const ReactCompilerGating = fn ( 558 ) ;
2026-09-21 13:40:21 +00:00
const size = fn ( 2 ) ;
const result = size . fileFinishedImporting ( "modules/vibegrations/lib/VibegrationsCustomWidget.tsx" ) ;
export const VIBEGRATIONS_CUSTOM_WIDGET_PROMPT_MAX_LENGTH = 2000 ;
2026-09-21 19:31:18 +00:00
export const useCanConjureVibegrationsCustomWidget = ReactCompilerGating . isReactCompilerEnabled ( ) ? ( ( arg0 , arg1 ) = > {
_require = arg0 ;
const cResult = require ( "c" ) . c ( 5 ) ;
dependencyMap = tmp4 ;
if ( cResult [ 0 ] === Symbol . for ( "react.memo_cache_sentinel" ) ) {
const items = [ GuildStore , tmp ( 1438 ) . ApexExperimentStore ] ;
cResult [ 0 ] = items ;
let first = items ;
} else {
first = cResult [ 0 ] ;
}
if ( cResult [ 1 ] === ( undefined === arg1 || arg1 ) ) {
if ( cResult [ 2 ] === arg0 ) {
let tmp7 = cResult [ 3 ] ;
let tmp8 = cResult [ 4 ] ;
}
return tmp ( 504 ) . useStateFromStores ( first , tmp7 , tmp8 ) ;
}
const fn = function u() {
let someResult = closure_1 ;
if ( closure_1 ) {
const guildsArray = GuildStore . getGuildsArray ( ) ;
someResult = guildsArray . some ( ( item ) = > closure_0 ( closure_1 [ 4 ] ) . isVibegrationsGuildEligible ( item , closure_1_0 ) ) ;
}
return someResult ;
} ;
const items1 = [ arg0 , undefined === arg1 || arg1 ] ;
cResult [ 1 ] = undefined === arg1 || arg1 ;
cResult [ 2 ] = arg0 ;
cResult [ 3 ] = fn ;
cResult [ 4 ] = items1 ;
tmp8 = items1 ;
tmp7 = fn ;
} ) : ( ( arg0 ) = > {
_require = arg0 ;
let flag = arg1 ;
if ( arg1 === undefined ) {
2026-09-21 13:40:21 +00:00
flag = true ;
}
const items = [ GuildStore , require ( "ApexExperiment" ) . ApexExperimentStore ] ;
2026-09-21 19:31:18 +00:00
const items1 = [ arg0 , flag ] ;
2026-09-21 13:40:21 +00:00
return require ( "initialize" ) . useStateFromStores ( items , ( ) = > {
let someResult = flag ;
if ( flag ) {
const guildsArray = GuildStore . getGuildsArray ( ) ;
2026-09-21 19:31:18 +00:00
someResult = guildsArray . some ( ( item ) = > closure_0 ( flag [ 4 ] ) . isVibegrationsGuildEligible ( item , closure_1_0 ) ) ;
2026-09-21 13:40:21 +00:00
}
return someResult ;
} , items1 ) ;
2026-09-21 19:31:18 +00:00
} ) ;
2026-09-21 13:40:21 +00:00
export const composeVibegrationsCustomWidgetPrompt = function composeVibegrationsCustomWidgetPrompt ( arg0 ) {
const items = [ "Build a profile card (an application profile widget) for my Discord profile." , "Read the data from the public source below \u2014 it must be reachable without a login." , "Recommend which fields the card should show and ask me to confirm or edit them before you build." , "" , arg0 ] ;
return items . join ( "\n" ) ;
} ;