function k(e){window.enmity.plugins.registerPlugin(e)}const a=window.enmity.modules.common.Constants;window.enmity.modules.common.Clipboard,window.enmity.modules.common.Assets,window.enmity.modules.common.Messages,window.enmity.modules.common.Clyde,window.enmity.modules.common.Avatars,window.enmity.modules.common.Native;const t=window.enmity.modules.common.React;window.enmity.modules.common.Dispatcher,window.enmity.modules.common.Storage,window.enmity.modules.common.Toasts,window.enmity.modules.common.Dialog,window.enmity.modules.common.Token,window.enmity.modules.common.REST,window.enmity.modules.common.Settings,window.enmity.modules.common.Users,window.enmity.modules.common.Navigation,window.enmity.modules.common.NavigationNative,window.enmity.modules.common.NavigationStack,window.enmity.modules.common.Theme,window.enmity.modules.common.Linking;const S=window.enmity.modules.common.StyleSheet;window.enmity.modules.common.ColorMap,window.enmity.modules.common.Components,window.enmity.modules.common.Locale,window.enmity.modules.common.Profiles,window.enmity.modules.common.Lodash,window.enmity.modules.common.Logger,window.enmity.modules.common.Flux,window.enmity.modules.common.SVG,window.enmity.modules.common.Scenes,window.enmity.modules.common.Moment;const P={byProps:(...e)=>window.enmity.modules.filters.byProps(...e),byName:(e,n)=>window.enmity.modules.filters.byName(e,n),byTypeName:(e,n)=>window.enmity.modules.filters.byTypeName(e,n),byDisplayName:(e,n)=>window.enmity.modules.filters.byDisplayName(e,n)};function R(...e){return window.enmity.modules.bulk(...e)}function O(...e){return window.enmity.modules.getByProps(...e)}function V(...e){return window.enmity.modules.getByName(...e)}window.enmity.modules.common;function M(e){return window.enmity.patcher.create(e)}var U="UnrealProfileThemes",_="1.0.0",H="Uses hidden 3y3 codes to allow you to change your profile theme colors for anyone using the plugin",z=[{name:"FutureMapper",profile:"https://github.com/Futuremappermydud",id:"741727188809810181"}],Y={source:"https://github.com/Futuremappermydud/Emnity-UnrealProfileThemes/",dist:"https://github.com/Futuremappermydud/Emnity-UnrealProfileThemes/blob/main/dist/UnrealProfileThemes.js"},f={name:U,version:_,description:H,authors:z,links:Y};function j(e,n,r){return window.enmity.utilities.findInReactTree(e,n,r)}const{components:o}=window.enmity;o.Alert,o.Button,o.FlatList;const G=o.Image;o.ImageBackground,o.KeyboardAvoidingView,o.Modal,o.Pressable,o.RefreshControl;const K=o.ScrollView;o.SectionList,o.StatusBar,o.StyleSheet,o.Switch;const g=o.Text;o.TextInput,o.TouchableHighlight;const b=o.TouchableOpacity;o.TouchableWithoutFeedback,o.Touchable;const y=o.View;o.VirtualizedList,o.Form,o.FormArrow,o.FormCTA,o.FormCTAButton,o.FormCardSection,o.FormCheckbox,o.FormDivider,o.FormHint,o.FormIcon,o.FormInput,o.FormLabel,o.FormRadio;const x=o.FormRow;o.FormSection,o.FormSelect,o.FormSubLabel;const A=o.FormSwitch;o.FormTernaryCheckBox,o.FormText,o.FormTextColors,o.FormTextSizes;const L=(e=.1)=>({shadowColor:"#000",shadowOffset:{width:1,height:4},shadowOpacity:e,shadowRadius:4.65,elevation:8}),m=S.createThemedStyleSheet({container:{marginTop:25,marginLeft:"5%",marginBottom:-15,flexDirection:"row"},textContainer:{paddingLeft:15,paddingTop:5,flexDirection:"column",flexWrap:"wrap",...L},image:{width:75,height:75,borderRadius:10,...L},mainText:{opacity:.975,letterSpacing:.25},header:{color:a.ThemeColorMap.HEADER_PRIMARY,fontFamily:a.Fonts.DISPLAY_BOLD,fontSize:25,letterSpacing:.25},subHeader:{color:a.ThemeColorMap.HEADER_SECONDARY,fontSize:12.75}}),v=window.enmity.modules.common.Components.General.Animated,[D]=R(P.byProps("transitionToGuild","openURL"));var W=({manifest:e})=>{const n=t.useRef(new v.Value(1)).current,r=()=>{v.spring(n,{toValue:1.1,duration:250,useNativeDriver:!0}).start()},i=()=>{v.spring(n,{toValue:1,duration:250,useNativeDriver:!0}).start()},l=()=>D.openURL(e.links.source),u={transform:[{scale:n}]};return t.createElement(y,{style:m.container},t.createElement(b,{onPress:l,onPressIn:r,onPressOut:i},t.createElement(v.View,{style:u},t.createElement(G,{style:[m.image],source:{uri:"https://cdn.discordapp.com/avatars/741727188809810181/8bb5f28abad304e8f5983d077bdf9ae9.png"}}))),t.createElement(y,{style:m.textContainer},t.createElement(b,{onPress:()=>D.openURL(e.links.source)},t.createElement(g,{style:[m.mainText,m.header]},e.name)),t.createElement(y,{style:{flexDirection:"row"}},t.createElement(g,{style:[m.mainText,m.subHeader]},"A project by ",e.authors[0].name)),t.createElement(y,null,t.createElement(b,{style:{flexDirection:"row"}},t.createElement(g,{style:[m.mainText,m.subHeader]},"Version:"),t.createElement(g,{style:[m.mainText,m.subHeader,{paddingLeft:4,fontFamily:a.Fonts.DISPLAY_BOLD}]},e.version)))))};const $=(e=.1)=>({shadowColor:"#000",shadowOffset:{width:1,height:4},shadowOpacity:e,shadowRadius:4.65,elevation:8}),q=S.createThemedStyleSheet({container:{width:"90%",marginTop:25,marginLeft:"5%",borderRadius:10,backgroundColor:a.ThemeColorMap.BACKGROUND_MOBILE_SECONDARY,shadow:$}});var X=({settings:e})=>t.createElement(K,null,t.createElement(W,{manifest:f}),t.createElement(y,{style:[q.container]},t.createElement(x,{label:"Nitro First",subLabel:"If on then use nitro colors first if available then 3y3 colors. If off then only use 3y3 codes",trailing:t.createElement(A,{value:e.getBoolean("nitroFirst",!0),onValueChange:()=>{e.toggle("nitroFirst",!0)}})}),t.createElement(x,{label:"Strip Missing letters",subLabel:"If enabled then 3y3 codes will be stripped after parsing so that they are not visible. This will make it difficult to edit your bio.",trailing:t.createElement(A,{value:e.getBoolean("strip",!1),onValueChange:()=>{e.toggle("strip",!1)}})})));function N(e,n,r){return window.enmity.settings.getBoolean(e,n,r)}function J(e,n){const r=`[#${e.toString(16).padStart(6,"0")},#${n.toString(16).padStart(6,"0")}]`,i=Array.from(r).map(l=>l.codePointAt(0)).filter(l=>l>=32&&l<=127).map(l=>String.fromCodePoint(l+917504)).join("");return" "+i}function Q(e){if(e==null)return null;const n=e.match(/\u{e005b}\u{e0023}([\u{e0061}-\u{e0066}\u{e0041}-\u{e0046}\u{e0030}-\u{e0039}]+?)\u{e002c}\u{e0023}([\u{e0061}-\u{e0066}\u{e0041}-\u{e0046}\u{e0030}-\u{e0039}]+?)\u{e005d}/u);if(n!=null){const r=[...n[0]].map(i=>String.fromCodePoint(i.codePointAt(0)-917504)).join("");return r.substring(1,r.length-1).split(",").map(i=>parseInt(i.replace("#","0x"),16))}else return null}function Z(e,n){return e==null?null:e.replace(/\u{e005b}\u{e0023}([\u{e0061}-\u{e0066}\u{e0041}-\u{e0046}\u{e0030}-\u{e0039}]+?)\u{e002c}\u{e0023}([\u{e0061}-\u{e0066}\u{e0041}-\u{e0046}\u{e0030}-\u{e0039}]+?)\u{e005d}/u,n)}const B=S.createThemedStyleSheet({container:{backgroundColor:a.Colors.BRAND_500,height:50,borderRadius:5,margin:5,marginTop:0,justifyContent:"center",alignItems:"center",flexDirection:"row"},text:{color:a.ThemeColorMap.TEXT_NORMAL,fontFamily:a.Fonts.PRIMARY_BOLD,paddingLeft:10,paddingRight:10,letterSpacing:.25,fontSize:16,textAlign:"center"}}),T=M("unreal-profile-colors"),ee=O("getUserProfile"),oe=V("EditProfileTheme",{default:!1}),[te]=R(P.byProps("setString")),ne={...f,onStart(){T.instead(ee,"getUserProfile",(e,n,r)=>{let i=r.apply(e,n);if(N(f.name,"nitroFirst",!0)&&(i==null?void 0:i.themeColors))return i;const l=Q(i==null?void 0:i.bio);return l&&(i.themeColors=l,i.premiumType=2,N(f.name,"strip",!1)&&(i.bio=Z(i==null?void 0:i.bio,""))),i}),T.after(oe,"default",(e,n,r)=>{var i,l;let u=(i=j(r,s=>{var p,h;return((p=s==null?void 0:s.type)==null?void 0:p.displayName)==="View"&&((h=s==null?void 0:s.props)==null?void 0:h.children.findIndex(d=>{var c;return((c=d==null?void 0:d.type)==null?void 0:c.name)==="ColorSwatch"}))!==-1}))==null?void 0:i.props;(l=u==null?void 0:u.children)==null||l.unshift(t.createElement(y,null,t.createElement(b,{onPress:()=>{var s,p,h;let d,c;(s=u==null?void 0:u.children)==null||s.forEach(w=>{var F,C;if(((F=w==null?void 0:w.type)==null?void 0:F.name)==="ColorSwatch"){let E=(C=w==null?void 0:w.props)==null?void 0:C.description;E=="Primary"&&(d=w),E=="Accent"&&(c=w)}});let I=J((p=d==null?void 0:d.props)==null?void 0:p.color,(h=c==null?void 0:c.props)==null?void 0:h.color);te.setString(I)},style:B.container},t.createElement(g,{style:B.text},"Copy 3y3"))))})},onStop(){T.unpatchAll()},getSettingsPanel({settings:e}){return t.createElement(X,{settings:e})}};k(ne);