Build 533169stable
Module 735991
3,318 characters · in no known chunkDependencies
Required by (27)
Lazily required by (0)none
Requires (22)
Lazily requires (0)none
Source Raw
function(e,t,n){"use strict";n.d(t,{$B:()=>N,Ag:()=>O,Cx:()=>M,EF:()=>B,Ii:()=>w,K4:()=>k,ME:()=>U,MJ:()=>P,N3:()=>v,NO:()=>D,Pp:()=>H,V1:()=>j,X2:()=>x,b7:()=>b,fl:()=>L,hX:()=>V,kF:()=>F,lq:()=>C,sw:()=>G,u8:()=>R}),n(321073);var r=n(487899),i=n(157559),s=n(843472),a=n(155718),o=n(847381),l=n(264322),u=n(392054),c=n(168186),d=n(545152),_=n(20015),f=n(204776),p=n(451909),h=n(611010),m=n(486020),E=n(723702),g=n(989837),A=n(500049),I=n(652215),T=n(73510),S=n(381941),y=n(985018);let v={id:T.Ik.BUILT_IN};function N(e){return e.id!==T.Ik.BUILT_IN}function C(e){return N(e)?e.name:y.intl.string(y.t.UB2gG2)}function R(e){return N(e)?e.description:y.intl.string(y.t.X9fusn)}function O(e){return N(e)&&(0,_.n)(e,I.gfo.EMBEDDED)}function b(e){return N(e)&&(0,_.n)(e,I.gfo.PARTNER)}function D(e){return N(e)&&(0,_.n)(e,I.gfo.PROMOTED)}function L(e){let t=M(e),n=t?.client_platform_config[(0,o.A)((0,E.getOS)())],r=Date.now();return n?.label_until!=null&&r<Date.parse(n.label_until)&&n?.label_from!=null&&r>Date.parse(n.label_from)?n?.label_type??a.Hr.NONE:a.Hr.NONE}function w(e){switch(L(e)){case a.Hr.NEW:return"New";case a.Hr.UPDATED:return"Updated";default:return""}}function M(e){return N(e)&&O(e)?e instanceof h.Ay?e.embeddedActivityConfig:e.embedded_activity_config:null}function P(e){let{command:t,optionValues:n,context:r,commandTargetId:a,maxSizeCallback:o,sectionName:l,commandOrigin:c=u.iw.APPLICATION_LAUNCHER}=e,{channel:_}=r,f=async()=>{try{let e=await (0,d.A)({command:t,optionValues:n,context:r,commandTargetId:a,maxSizeCallback:o,commandOrigin:c,sectionName:l,source:g.A.entrypoint()});if(t.inputType===u.y$.BUILT_IN_TEXT&&null!=e&&null!=r.channel){let t=p.Ay.parse(_,e.content);t.tts=e.tts??!1,s.A.sendMessage(r.channel.id,t,!0,{location:S.Hx.APP_COMMAND})}}catch(e){throw i.A.show({title:y.intl.string(y.t["aHO//m"]),body:y.intl.string(y.t.kuzKHK),confirmText:y.intl.string(y.t["5911Lb"]),onConfirm:()=>f()}),e}};return f()}function x(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{fakeAppIconURL:n,...r}=t;return N(e)?{iconURL:m.Ay.getApplicationIconURL({...r,id:e.id,icon:e.icon}),name:e.name,description:e.description}:{iconURL:n??null,name:y.intl.string(y.t.UB2gG2),description:y.intl.string(y.t.X9fusn)}}function k(e){return!!N(e)&&(e instanceof h.Ay?e.isMonetized:e.is_monetized)}function U(e){let t=M(e);return null!=t&&t.displays_advertisements}function G(e){return e===A.s4.TEXT}function F(e){return null==e?"":(e.charAt(0).toLocaleUpperCase()+e.slice(1)).replaceAll("_"," ")}function V(e){let t=[];for(let n of e){let e=n.application_directory_collection_items.filter(e=>e.type===r.L.APPLICATION&&O(e.application));0!==e.length&&t.push({...n,application_directory_collection_items:e})}return t}function B(e){return{applicationId:e.id,customInstallUrl:e.customInstallUrl,installParams:e.installParams,integrationTypesConfig:e.integrationTypesConfig}}function H(e){return e instanceof h.Ay?{applicationId:e.id,customInstallUrl:e.customInstallUrl,installParams:e.installParams,integrationTypesConfig:e.integrationTypesConfig}:{applicationId:e.id,customInstallUrl:e.custom_install_url,installParams:e.install_params,integrationTypesConfig:e.integration_types_config}}function j(e,t){let n=null!=t?l.Ay.getGuildState(t):null,r=null!=n&&(0,c.gI)(e.id,n);return(0,f.Kp)(e)||r}}