aiware-js 1.0.0-master.1229 → 1.0.0-master.1230
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/js-core.esm18.js +1 -1
- package/js-core.esm18.js.gz +0 -0
- package/js-core.esm71.js +2 -2
- package/js-core.esm71.js.gz +0 -0
- package/js-core.umd.css +92 -92
- package/js-core.umd.css.gz +0 -0
- package/js-core.umd.js +163 -163
- package/js-core.umd.js.gz +0 -0
- package/js-core.umd.min.css +92 -92
- package/js-core.umd.min.css.gz +0 -0
- package/locales/en.json +1 -1
- package/locales/es.json +1 -1
- package/locales/fr.json +1 -1
- package/package.json +1 -1
package/js-core.esm18.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ao as unmountPanel$1,a1 as hidePanel$1,e9 as unmountAllPanel$1,ea as getUniqueID,ap as mountPanel$1,bO as AvailableWidgets,bM as updatePanelMicroFrontendProps,bN as setData,eb as mountWidget,ec as unmountWidget,ed as updateTokenRequest,b5 as logout,ee as updateActivityStatus,ef as HelpCenter,B as takeEvery$1,eg as mountPanelForResponse$1,eh as DataCenter,C as select}from"./js-core.esm.js";import{setCustomKnowledgeBaseUrl,setCustomDocsUrl,updateSelectedTab}from"./js-core.esm19.js";import"./js-core.esm4.js";import"./js-core.esm6.js";class RateLimiter{constructor(){this.lastCall=null}checkIfCanCall(e=1){return e<1&&(e=1),(!this.lastCall||(new Date).getTime()-this.lastCall>=6e4*e)&&(this.lastCall=(new Date).getTime(),!0)}}const rateLimiter=new RateLimiter,createAuthHelpers=t=>({updateToken(e){e?t.dispatch(updateTokenRequest({token:e})):console.error("[AiWARE JS]: Please provide a valid token!")},logout(e){"function"==typeof e?(e(),setTimeout(()=>{t.dispatch(logout())},1e3)):t.dispatch(logout())},reportAppActivity(e){rateLimiter.checkIfCanCall(e)&&t.dispatch(updateActivityStatus())}}),helpCenter=()=>{var e=new HelpCenter({actions:{setCustomKnowledgeBaseUrlAction:setCustomKnowledgeBaseUrl,setCustomDocsUrlAction:setCustomDocsUrl,updateSelectedTabAction:updateSelectedTab}});return{openKnowledgeBasePanel:e.openKnowledgeBasePanel.bind(e),openDocsPanel:e.openDocsPanel.bind(e)}},dataCenter=()=>{var e=new DataCenter;return{openImporterPanel:e.openImporterPanel.bind(e)}},unmountPanel=t=>e=>(t.dispatch(unmountPanel$1(e)),!0),hidePanel=t=>e=>(t.dispatch(hidePanel$1(e)),!0),unmountAllPanel=e=>()=>{e.dispatch(unmountAllPanel$1(""))},mountPanel=l=>(e,t)=>{const n=e.panelId||getUniqueID();var{microFrontend:e,panelConfig:a}=e;l.dispatch(mountPanel$1({microFrontend:e,panelId:n,panelConfig:a}));const o=[...(null==(e=null==a?void 0:a.header)?void 0:e.actions)||[],...(null==(e=null==a?void 0:a.footer)?void 0:e.actions)||[]].filter(e=>e.submit).map(e=>e.action);a={id:n,sagas:[function*(){yield takeEvery$1(o.map(e=>e.type),function*(){var e=(yield select(e=>e.data.find(e=>e.id===n)))["data"];t&&t(e)})}]};return l.addModule(a),n},mountPanelForResponse=t=>e=>mountPanelForResponse$1(e,t),attachSdkToWindow=e=>{var{init:e,store:t,aiwareEvents:n,bootstrapOptions:a}=e;!window||void 0!==window.aiware&&0!==Object.keys(window.aiware).length||(window.aiware={init:e,store:t,auth:createAuthHelpers(t),helpCenter:helpCenter(),dataCenter:dataCenter(),on:n.on,off:n.off,hidePanel:hidePanel(t),unmountPanel:unmountPanel(t),mountPanel:mountPanel(t),mountPanelForResponse:mountPanelForResponse(t),registry:a.registry,registryLookup:a.registryLookup,AvailableWidgets:AvailableWidgets,mountPanelAction:mountPanel$1,unmountPanelAction:unmountPanel$1,hidePanelAction:hidePanel$1,updatePanelMicroFrontendPropsAction:updatePanelMicroFrontendProps,setData:setData,mountWidget:mountWidget,unmountWidget:unmountWidget,commit:"
|
|
1
|
+
import{ao as unmountPanel$1,a1 as hidePanel$1,e9 as unmountAllPanel$1,ea as getUniqueID,ap as mountPanel$1,bO as AvailableWidgets,bM as updatePanelMicroFrontendProps,bN as setData,eb as mountWidget,ec as unmountWidget,ed as updateTokenRequest,b5 as logout,ee as updateActivityStatus,ef as HelpCenter,B as takeEvery$1,eg as mountPanelForResponse$1,eh as DataCenter,C as select}from"./js-core.esm.js";import{setCustomKnowledgeBaseUrl,setCustomDocsUrl,updateSelectedTab}from"./js-core.esm19.js";import"./js-core.esm4.js";import"./js-core.esm6.js";class RateLimiter{constructor(){this.lastCall=null}checkIfCanCall(e=1){return e<1&&(e=1),(!this.lastCall||(new Date).getTime()-this.lastCall>=6e4*e)&&(this.lastCall=(new Date).getTime(),!0)}}const rateLimiter=new RateLimiter,createAuthHelpers=t=>({updateToken(e){e?t.dispatch(updateTokenRequest({token:e})):console.error("[AiWARE JS]: Please provide a valid token!")},logout(e){"function"==typeof e?(e(),setTimeout(()=>{t.dispatch(logout())},1e3)):t.dispatch(logout())},reportAppActivity(e){rateLimiter.checkIfCanCall(e)&&t.dispatch(updateActivityStatus())}}),helpCenter=()=>{var e=new HelpCenter({actions:{setCustomKnowledgeBaseUrlAction:setCustomKnowledgeBaseUrl,setCustomDocsUrlAction:setCustomDocsUrl,updateSelectedTabAction:updateSelectedTab}});return{openKnowledgeBasePanel:e.openKnowledgeBasePanel.bind(e),openDocsPanel:e.openDocsPanel.bind(e)}},dataCenter=()=>{var e=new DataCenter;return{openImporterPanel:e.openImporterPanel.bind(e)}},unmountPanel=t=>e=>(t.dispatch(unmountPanel$1(e)),!0),hidePanel=t=>e=>(t.dispatch(hidePanel$1(e)),!0),unmountAllPanel=e=>()=>{e.dispatch(unmountAllPanel$1(""))},mountPanel=l=>(e,t)=>{const n=e.panelId||getUniqueID();var{microFrontend:e,panelConfig:a}=e;l.dispatch(mountPanel$1({microFrontend:e,panelId:n,panelConfig:a}));const o=[...(null==(e=null==a?void 0:a.header)?void 0:e.actions)||[],...(null==(e=null==a?void 0:a.footer)?void 0:e.actions)||[]].filter(e=>e.submit).map(e=>e.action);a={id:n,sagas:[function*(){yield takeEvery$1(o.map(e=>e.type),function*(){var e=(yield select(e=>e.data.find(e=>e.id===n)))["data"];t&&t(e)})}]};return l.addModule(a),n},mountPanelForResponse=t=>e=>mountPanelForResponse$1(e,t),attachSdkToWindow=e=>{var{init:e,store:t,aiwareEvents:n,bootstrapOptions:a}=e;!window||void 0!==window.aiware&&0!==Object.keys(window.aiware).length||(window.aiware={init:e,store:t,auth:createAuthHelpers(t),helpCenter:helpCenter(),dataCenter:dataCenter(),on:n.on,off:n.off,hidePanel:hidePanel(t),unmountPanel:unmountPanel(t),mountPanel:mountPanel(t),mountPanelForResponse:mountPanelForResponse(t),registry:a.registry,registryLookup:a.registryLookup,AvailableWidgets:AvailableWidgets,mountPanelAction:mountPanel$1,unmountPanelAction:unmountPanel$1,hidePanelAction:hidePanel$1,updatePanelMicroFrontendPropsAction:updatePanelMicroFrontendProps,setData:setData,mountWidget:mountWidget,unmountWidget:unmountWidget,commit:"cebd6f9f16"})};export{attachSdkToWindow,hidePanel,mountPanel,unmountAllPanel,unmountPanel};
|
package/js-core.esm18.js.gz
CHANGED
|
Binary file
|
package/js-core.esm71.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{X as createSlice,fX as md5,Y as combineReducers,bP as AvailableComponents,j as jsxRuntime,aJ as AIWareThemeProvider,bW as AIWareCacheProvider,Z as useSelector,bX as selectIsFullscreenEnabled,r as react,V as Box,z as all,ap as mountPanel,w as useIntl,B as takeEvery$1,bG as selectIsSuperAdmin,a1 as hidePanel,C as select,a0 as selectApiConfigs,G as put,F as call$i,a4 as preferredLanguageSelector,a5 as showMessage,a6 as MessageSeverity,W as isEqual_1,K as userSelector,fY as EUserStatus,d_ as selectOrgId,a7 as AIWareFormatMessage,bQ as AvailablePanels,a3 as baseGraphQLApiWithError}from"./js-core.esm.js";import{m as makeStyles,o as DynamicModuleLoader,A as AIWareIntlProvider,T as Typography,F as FormattedMessage,g as Button,d4 as AddUser,ah as Grid,D as Divider,U as Select,V as MenuItem,a$ as Tabs,b1 as Tab,Y as TabPanel,P as Popover,cv as MenuList,q as List}from"./js-core.esm4.js";import{p as organizationInvites_selector,s as selectAdminCenterOrgId,q as selectAdminCenterOrgGuid,r as actions$2,u as selectAdminCenterOrgParameter,j as selectAdminCenterOrgIdString,k as contextMenuStyles}from"./js-core.esm2.js";import{z as debounce_1,t as tableInfiniteScroll,A as Avatar,N as index,g as Tooltip,I as IconButton,p as panelComponents,K as tableSearchComponents,j as Skeleton}from"./js-core.esm5.js";import{useOrganizationPermissions,EAuthSubResourceType,EPermissionAction}from"./js-core.esm8.js";import{M as MoreVert}from"./js-core.esm62.js";import{L as ListItem,b as ListItemAvatar,a as ListItemText,e as ListItemSecondaryAction}from"./js-core.esm3.js";import{u as useDispatch}from"./js-core.esm6.js";var match,version,set$1,get,store,STATE,activeXDocument,IteratorPrototype$2,PrototypeOfArrayIteratorPrototype,arrayIterator,commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},check=function(e){return e&&e.Math===Math&&e},global$m=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof commonjsGlobal&&commonjsGlobal)||check("object"==typeof commonjsGlobal&&commonjsGlobal)||function(){return this}()||Function("return this")(),objectGetOwnPropertyDescriptor={},fails$k=function(e){try{return!!e()}catch(e){return!0}},fails$j=fails$k,descriptors=!fails$k(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}),fails$i=fails$k,functionBindNative=!fails$k(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}),NATIVE_BIND$3=functionBindNative,call$h=Function.prototype.call,functionCall=NATIVE_BIND$3?call$h.bind(call$h):function(){return call$h.apply(call$h,arguments)},objectPropertyIsEnumerable={},$propertyIsEnumerable={}.propertyIsEnumerable,getOwnPropertyDescriptor$2=Object.getOwnPropertyDescriptor,NASHORN_BUG=getOwnPropertyDescriptor$2&&!$propertyIsEnumerable.call({1:2},1),createPropertyDescriptor$3=(objectPropertyIsEnumerable.f=NASHORN_BUG?function(e){e=getOwnPropertyDescriptor$2(this,e);return!!e&&e.enumerable}:$propertyIsEnumerable,function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}),NATIVE_BIND$2=functionBindNative,FunctionPrototype$2=Function.prototype,call$g=FunctionPrototype$2.call,uncurryThisWithBind=NATIVE_BIND$2&&FunctionPrototype$2.bind.bind(call$g,call$g),functionUncurryThis=NATIVE_BIND$2?uncurryThisWithBind:function(e){return function(){return call$g.apply(e,arguments)}},uncurryThis$l=functionUncurryThis,toString$8=uncurryThis$l({}.toString),stringSlice$5=uncurryThis$l("".slice),classofRaw$2=function(e){return stringSlice$5(toString$8(e),8,-1)},uncurryThis$k=functionUncurryThis,fails$h=fails$k,classof$8=classofRaw$2,$Object$4=Object,split=functionUncurryThis("".split),indexedObject=fails$h(function(){return!$Object$4("z").propertyIsEnumerable(0)})?function(e){return"String"===classof$8(e)?split(e,""):$Object$4(e)}:$Object$4,isNullOrUndefined$5=function(e){return null==e},isNullOrUndefined$4=isNullOrUndefined$5,$TypeError$f=TypeError,requireObjectCoercible$7=function(e){if(isNullOrUndefined$4(e))throw new $TypeError$f("Can't call method on "+e);return e},IndexedObject$1=indexedObject,requireObjectCoercible$6=requireObjectCoercible$7,toIndexedObject$5=function(e){return IndexedObject$1(requireObjectCoercible$6(e))},documentAll="object"==typeof document&&document.all,isCallable$l=void 0===documentAll&&void 0!==documentAll?function(e){return"function"==typeof e||e===documentAll}:function(e){return"function"==typeof e},isCallable$k=isCallable$l,isObject$c=function(e){return"object"==typeof e?null!==e:isCallable$k(e)},global$l=global$m,isCallable$j=isCallable$l,aFunction=function(e){return isCallable$j(e)?e:void 0},getBuiltIn$7=function(e,t){return arguments.length<2?aFunction(global$l[e]):global$l[e]&&global$l[e][t]},uncurryThis$j=functionUncurryThis,objectIsPrototypeOf=functionUncurryThis({}.isPrototypeOf),engineUserAgent="undefined"!=typeof navigator&&String(navigator.userAgent)||"",global$k=global$m,userAgent$3=engineUserAgent,process$4=global$k.process,Deno$1=global$k.Deno,versions=process$4&&process$4.versions||Deno$1&&Deno$1.version,v8=versions&&versions.v8,engineV8Version=version=!(version=v8?0<(match=v8.split("."))[0]&&match[0]<4?1:+(match[0]+match[1]):version)&&userAgent$3&&(!(match=userAgent$3.match(/Edge\/(\d+)/))||74<=match[1])&&(match=userAgent$3.match(/Chrome\/(\d+)/))?+match[1]:version,V8_VERSION$1=engineV8Version,fails$g=fails$k,global$j=global$m,$String$5=global$m.String,symbolConstructorDetection=!!Object.getOwnPropertySymbols&&!fails$g(function(){var e=Symbol("symbol detection");return!$String$5(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&V8_VERSION$1&&V8_VERSION$1<41}),NATIVE_SYMBOL$1=symbolConstructorDetection,useSymbolAsUid=symbolConstructorDetection&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,getBuiltIn$6=getBuiltIn$7,isCallable$i=isCallable$l,isPrototypeOf$2=objectIsPrototypeOf,USE_SYMBOL_AS_UID$1=useSymbolAsUid,$Object$3=Object,isSymbol$2=useSymbolAsUid?function(e){return"symbol"==typeof e}:function(e){var t=getBuiltIn$6("Symbol");return isCallable$i(t)&&isPrototypeOf$2(t.prototype,$Object$3(e))},$String$4=String,tryToString$4=function(e){try{return $String$4(e)}catch(e){return"Object"}},isCallable$h=isCallable$l,tryToString$3=tryToString$4,$TypeError$e=TypeError,aCallable$8=function(e){if(isCallable$h(e))return e;throw new $TypeError$e(tryToString$3(e)+" is not a function")},aCallable$7=aCallable$8,isNullOrUndefined$3=isNullOrUndefined$5,getMethod$4=function(e,t){e=e[t];return isNullOrUndefined$3(e)?void 0:aCallable$7(e)},call$f=functionCall,isCallable$g=isCallable$l,isObject$b=isObject$c,$TypeError$d=TypeError,ordinaryToPrimitive$1=function(e,t){var r,n;if("string"===t&&isCallable$g(r=e.toString)&&!isObject$b(n=call$f(r,e)))return n;if(isCallable$g(r=e.valueOf)&&!isObject$b(n=call$f(r,e)))return n;if("string"!==t&&isCallable$g(r=e.toString)&&!isObject$b(n=call$f(r,e)))return n;throw new $TypeError$d("Can't convert object to primitive value")},sharedStore={exports:{}},global$i=global$m,defineProperty$6=Object.defineProperty,defineGlobalProperty$3=function(t,r){try{defineProperty$6(global$i,t,{value:r,configurable:!0,writable:!0})}catch(e){global$i[t]=r}return r},globalThis$1=global$m,defineGlobalProperty$2=defineGlobalProperty$3,SHARED="__core-js_shared__",store$3=sharedStore.exports=globalThis$1[SHARED]||defineGlobalProperty$2(SHARED,{}),store$2=((store$3.versions||(store$3.versions=[])).push({version:"3.37.0",mode:"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.37.0/LICENSE",source:"https://github.com/zloirock/core-js"}),sharedStore.exports),shared$4=function(e,t){return store$2[e]||(store$2[e]=t||{})},requireObjectCoercible$5=requireObjectCoercible$7,$Object$2=Object,toObject$5=function(e){return $Object$2(requireObjectCoercible$5(e))},uncurryThis$i=functionUncurryThis,toObject$4=toObject$5,hasOwnProperty=functionUncurryThis({}.hasOwnProperty),hasOwnProperty_1=Object.hasOwn||function(e,t){return hasOwnProperty(toObject$4(e),t)},uncurryThis$h=functionUncurryThis,id=0,postfix=Math.random(),toString$7=uncurryThis$h(1..toString),uid$2=function(e){return"Symbol("+(void 0===e?"":e)+")_"+toString$7(++id+postfix,36)},global$h=global$m,shared$3=shared$4,hasOwn$9=hasOwnProperty_1,uid$1=uid$2,NATIVE_SYMBOL=symbolConstructorDetection,USE_SYMBOL_AS_UID=useSymbolAsUid,Symbol$2=global$m.Symbol,WellKnownSymbolsStore=shared$3("wks"),createWellKnownSymbol=USE_SYMBOL_AS_UID?Symbol$2.for||Symbol$2:Symbol$2&&Symbol$2.withoutSetter||uid$1,wellKnownSymbol$j=function(e){return hasOwn$9(WellKnownSymbolsStore,e)||(WellKnownSymbolsStore[e]=NATIVE_SYMBOL&&hasOwn$9(Symbol$2,e)?Symbol$2[e]:createWellKnownSymbol("Symbol."+e)),WellKnownSymbolsStore[e]},call$e=functionCall,isObject$a=isObject$c,isSymbol$1=isSymbol$2,getMethod$3=getMethod$4,ordinaryToPrimitive=ordinaryToPrimitive$1,wellKnownSymbol$i=wellKnownSymbol$j,$TypeError$c=TypeError,TO_PRIMITIVE=wellKnownSymbol$j("toPrimitive"),toPrimitive$1=function(e,t){if(!isObject$a(e)||isSymbol$1(e))return e;var r=getMethod$3(e,TO_PRIMITIVE);if(r){if(r=call$e(r,e,t=void 0===t?"default":t),!isObject$a(r)||isSymbol$1(r))return r;throw new $TypeError$c("Can't convert object to primitive value")}return ordinaryToPrimitive(e,t=void 0===t?"number":t)},toPrimitive=toPrimitive$1,isSymbol=isSymbol$2,toPropertyKey$2=function(e){e=toPrimitive(e,"string");return isSymbol(e)?e:e+""},global$g=global$m,isObject$9=isObject$c,document$3=global$m.document,EXISTS$1=isObject$9(document$3)&&isObject$9(document$3.createElement),documentCreateElement$2=function(e){return EXISTS$1?document$3.createElement(e):{}},DESCRIPTORS$b=descriptors,fails$f=fails$k,createElement$1=documentCreateElement$2,ie8DomDefine=!descriptors&&!fails$k(function(){return 7!==Object.defineProperty(createElement$1("div"),"a",{get:function(){return 7}}).a}),DESCRIPTORS$a=descriptors,call$d=functionCall,propertyIsEnumerableModule$1=objectPropertyIsEnumerable,createPropertyDescriptor$2=createPropertyDescriptor$3,toIndexedObject$4=toIndexedObject$5,toPropertyKey$1=toPropertyKey$2,hasOwn$8=hasOwnProperty_1,IE8_DOM_DEFINE$1=ie8DomDefine,$getOwnPropertyDescriptor$1=Object.getOwnPropertyDescriptor,objectDefineProperty=(objectGetOwnPropertyDescriptor.f=DESCRIPTORS$a?$getOwnPropertyDescriptor$1:function(e,t){if(e=toIndexedObject$4(e),t=toPropertyKey$1(t),IE8_DOM_DEFINE$1)try{return $getOwnPropertyDescriptor$1(e,t)}catch(e){}if(hasOwn$8(e,t))return createPropertyDescriptor$2(!call$d(propertyIsEnumerableModule$1.f,e,t),e[t])},{}),DESCRIPTORS$9=descriptors,fails$e=fails$k,v8PrototypeDefineBug=descriptors&&fails$k(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),isObject$8=isObject$c,$String$3=String,$TypeError$b=TypeError,anObject$c=function(e){if(isObject$8(e))return e;throw new $TypeError$b($String$3(e)+" is not an object")},DESCRIPTORS$8=descriptors,IE8_DOM_DEFINE=ie8DomDefine,V8_PROTOTYPE_DEFINE_BUG$1=v8PrototypeDefineBug,anObject$b=anObject$c,toPropertyKey=toPropertyKey$2,$TypeError$a=TypeError,$defineProperty=Object.defineProperty,$getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,ENUMERABLE="enumerable",CONFIGURABLE$1="configurable",WRITABLE="writable",DESCRIPTORS$7=(objectDefineProperty.f=DESCRIPTORS$8?V8_PROTOTYPE_DEFINE_BUG$1?function(e,t,r){var n;return anObject$b(e),t=toPropertyKey(t),anObject$b(r),"function"==typeof e&&"prototype"===t&&"value"in r&&WRITABLE in r&&!r[WRITABLE]&&(n=$getOwnPropertyDescriptor(e,t))&&n[WRITABLE]&&(e[t]=r.value,r={configurable:(CONFIGURABLE$1 in r?r:n)[CONFIGURABLE$1],enumerable:(ENUMERABLE in r?r:n)[ENUMERABLE],writable:!1}),$defineProperty(e,t,r)}:$defineProperty:function(e,t,r){if(anObject$b(e),t=toPropertyKey(t),anObject$b(r),IE8_DOM_DEFINE)try{return $defineProperty(e,t,r)}catch(e){}if("get"in r||"set"in r)throw new $TypeError$a("Accessors not supported");return"value"in r&&(e[t]=r.value),e},descriptors),definePropertyModule$3=objectDefineProperty,createPropertyDescriptor$1=createPropertyDescriptor$3,createNonEnumerableProperty$5=DESCRIPTORS$7?function(e,t,r){return definePropertyModule$3.f(e,t,createPropertyDescriptor$1(1,r))}:function(e,t,r){return e[t]=r,e},makeBuiltIn$3={exports:{}},DESCRIPTORS$6=descriptors,hasOwn$7=hasOwnProperty_1,FunctionPrototype$1=Function.prototype,getDescriptor=DESCRIPTORS$6&&Object.getOwnPropertyDescriptor,EXISTS=hasOwn$7(FunctionPrototype$1,"name"),PROPER=EXISTS&&"something"===function(){}.name,CONFIGURABLE=EXISTS&&(!DESCRIPTORS$6||getDescriptor(FunctionPrototype$1,"name").configurable),functionName={EXISTS:EXISTS,PROPER:PROPER,CONFIGURABLE:CONFIGURABLE},uncurryThis$g=functionUncurryThis,isCallable$f=isCallable$l,store$1=sharedStore.exports,functionToString=uncurryThis$g(Function.toString),inspectSource$3=(isCallable$f(store$1.inspectSource)||(store$1.inspectSource=function(e){return functionToString(e)}),store$1.inspectSource),global$f=global$m,isCallable$e=isCallable$l,WeakMap$1=global$m.WeakMap,weakMapBasicDetection=isCallable$e(WeakMap$1)&&/native code/.test(String(WeakMap$1)),shared$2=shared$4,uid=uid$2,keys=shared$4("keys"),sharedKey$3=function(e){return keys[e]||(keys[e]=uid(e))},hiddenKeys$4={},NATIVE_WEAK_MAP=weakMapBasicDetection,global$e=global$m,isObject$7=isObject$c,createNonEnumerableProperty$4=createNonEnumerableProperty$5,hasOwn$6=hasOwnProperty_1,shared$1=sharedStore.exports,sharedKey$2=sharedKey$3,hiddenKeys$3=hiddenKeys$4,OBJECT_ALREADY_INITIALIZED="Object already initialized",TypeError$2=global$e.TypeError,WeakMap=global$e.WeakMap,enforce=function(e){return has(e)?get(e):set$1(e,{})},getterFor=function(t){return function(e){if(isObject$7(e)&&(e=get(e)).type===t)return e;throw new TypeError$2("Incompatible receiver, "+t+" required")}},has=NATIVE_WEAK_MAP||shared$1.state?((store=shared$1.state||(shared$1.state=new WeakMap)).get=store.get,store.has=store.has,store.set=store.set,set$1=function(e,t){if(store.has(e))throw new TypeError$2(OBJECT_ALREADY_INITIALIZED);return t.facade=e,store.set(e,t),t},get=function(e){return store.get(e)||{}},function(e){return store.has(e)}):(STATE=sharedKey$2("state"),hiddenKeys$3[STATE]=!0,set$1=function(e,t){if(hasOwn$6(e,STATE))throw new TypeError$2(OBJECT_ALREADY_INITIALIZED);return t.facade=e,createNonEnumerableProperty$4(e,STATE,t),t},get=function(e){return hasOwn$6(e,STATE)?e[STATE]:{}},function(e){return hasOwn$6(e,STATE)}),internalState={set:set$1,get:get,has:has,enforce:enforce,getterFor:getterFor},uncurryThis$f=functionUncurryThis,fails$d=fails$k,isCallable$d=isCallable$l,hasOwn$5=hasOwnProperty_1,DESCRIPTORS$5=descriptors,CONFIGURABLE_FUNCTION_NAME$1=functionName.CONFIGURABLE,inspectSource$2=inspectSource$3,InternalStateModule$2=internalState,enforceInternalState=InternalStateModule$2.enforce,getInternalState$2=InternalStateModule$2.get,$String$2=String,defineProperty$5=Object.defineProperty,stringSlice$4=uncurryThis$f("".slice),replace$3=uncurryThis$f("".replace),join=uncurryThis$f([].join),CONFIGURABLE_LENGTH=DESCRIPTORS$5&&!fails$d(function(){return 8!==defineProperty$5(function(){},"length",{value:8}).length}),TEMPLATE=String(String).split("String"),makeBuiltIn$2=makeBuiltIn$3.exports=function(e,t,r){"Symbol("===stringSlice$4($String$2(t),0,7)&&(t="["+replace$3($String$2(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!hasOwn$5(e,"name")||CONFIGURABLE_FUNCTION_NAME$1&&e.name!==t)&&(DESCRIPTORS$5?defineProperty$5(e,"name",{value:t,configurable:!0}):e.name=t),CONFIGURABLE_LENGTH&&r&&hasOwn$5(r,"arity")&&e.length!==r.arity&&defineProperty$5(e,"length",{value:r.arity});try{r&&hasOwn$5(r,"constructor")&&r.constructor?DESCRIPTORS$5&&defineProperty$5(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}r=enforceInternalState(e);return hasOwn$5(r,"source")||(r.source=join(TEMPLATE,"string"==typeof t?t:"")),e},isCallable$c=(Function.prototype.toString=makeBuiltIn$2(function(){return isCallable$d(this)&&getInternalState$2(this).source||inspectSource$2(this)},"toString"),isCallable$l),definePropertyModule$2=objectDefineProperty,makeBuiltIn$1=makeBuiltIn$3.exports,defineGlobalProperty$1=defineGlobalProperty$3,defineBuiltIn$6=function(e,t,r,n){var s=(n=n||{}).enumerable,o=void 0!==n.name?n.name:t;if(isCallable$c(r)&&makeBuiltIn$1(r,o,n),n.global)s?e[t]=r:defineGlobalProperty$1(t,r);else{try{n.unsafe?e[t]&&(s=!0):delete e[t]}catch(e){}s?e[t]=r:definePropertyModule$2.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},objectGetOwnPropertyNames={},ceil=Math.ceil,floor$1=Math.floor,mathTrunc=Math.trunc||function(e){e=+e;return(0<e?floor$1:ceil)(e)},trunc=mathTrunc,toIntegerOrInfinity$5=function(e){e=+e;return e!=e||0==e?0:trunc(e)},toIntegerOrInfinity$4=toIntegerOrInfinity$5,max$1=Math.max,min$2=Math.min,toAbsoluteIndex$1=function(e,t){e=toIntegerOrInfinity$4(e);return e<0?max$1(e+t,0):min$2(e,t)},toIntegerOrInfinity$3=toIntegerOrInfinity$5,min$1=Math.min,toLength$2=function(e){e=toIntegerOrInfinity$3(e);return 0<e?min$1(e,9007199254740991):0},toLength$1=toLength$2,lengthOfArrayLike$4=function(e){return toLength$1(e.length)},toIndexedObject$3=toIndexedObject$5,toAbsoluteIndex=toAbsoluteIndex$1,lengthOfArrayLike$3=lengthOfArrayLike$4,createMethod$2=function(i){return function(e,t,r){var n=toIndexedObject$3(e),s=lengthOfArrayLike$3(n);if(0!==s){var o,a=toAbsoluteIndex(r,s);if(i&&t!=t){for(;a<s;)if((o=n[a++])!=o)return!0}else for(;a<s;a++)if((i||a in n)&&n[a]===t)return i||a||0}return!i&&-1}},arrayIncludes={includes:createMethod$2(!0),indexOf:createMethod$2(!1)},uncurryThis$e=functionUncurryThis,hasOwn$4=hasOwnProperty_1,toIndexedObject$2=toIndexedObject$5,indexOf$1=arrayIncludes.indexOf,hiddenKeys$2=hiddenKeys$4,push$1=uncurryThis$e([].push),objectKeysInternal=function(e,t){var r,n=toIndexedObject$2(e),s=0,o=[];for(r in n)!hasOwn$4(hiddenKeys$2,r)&&hasOwn$4(n,r)&&push$1(o,r);for(;t.length>s;)!hasOwn$4(n,r=t[s++])||~indexOf$1(o,r)||push$1(o,r);return o},enumBugKeys$3=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],internalObjectKeys$1=objectKeysInternal,enumBugKeys$2=enumBugKeys$3,hiddenKeys$1=enumBugKeys$3.concat("length","prototype"),objectGetOwnPropertySymbols=(objectGetOwnPropertyNames.f=Object.getOwnPropertyNames||function(e){return internalObjectKeys$1(e,hiddenKeys$1)},{}),getBuiltIn$5=(objectGetOwnPropertySymbols.f=Object.getOwnPropertySymbols,getBuiltIn$7),uncurryThis$d=functionUncurryThis,getOwnPropertyNamesModule=objectGetOwnPropertyNames,getOwnPropertySymbolsModule$1=objectGetOwnPropertySymbols,anObject$a=anObject$c,concat$2=functionUncurryThis([].concat),ownKeys$1=getBuiltIn$5("Reflect","ownKeys")||function(e){var t=getOwnPropertyNamesModule.f(anObject$a(e)),r=getOwnPropertySymbolsModule$1.f;return r?concat$2(t,r(e)):t},hasOwn$3=hasOwnProperty_1,ownKeys=ownKeys$1,getOwnPropertyDescriptorModule=objectGetOwnPropertyDescriptor,definePropertyModule$1=objectDefineProperty,copyConstructorProperties$1=function(e,t,r){for(var n=ownKeys(t),s=definePropertyModule$1.f,o=getOwnPropertyDescriptorModule.f,a=0;a<n.length;a++){var i=n[a];hasOwn$3(e,i)||r&&hasOwn$3(r,i)||s(e,i,o(t,i))}},fails$c=fails$k,isCallable$b=isCallable$l,replacement=/#|\.prototype\./,isForced$2=function(e,t){e=data[normalize(e)];return e===POLYFILL||e!==NATIVE&&(isCallable$b(t)?fails$c(t):!!t)},normalize=isForced$2.normalize=function(e){return String(e).replace(replacement,".").toLowerCase()},data=isForced$2.data={},NATIVE=isForced$2.NATIVE="N",POLYFILL=isForced$2.POLYFILL="P",isForced_1=isForced$2,global$d=global$m,getOwnPropertyDescriptor$1=objectGetOwnPropertyDescriptor.f,createNonEnumerableProperty$3=createNonEnumerableProperty$5,defineBuiltIn$5=defineBuiltIn$6,defineGlobalProperty=defineGlobalProperty$3,copyConstructorProperties=copyConstructorProperties$1,isForced$1=isForced_1,_export=function(e,t){var r,n,s,o=e.target,a=e.global,i=e.stat,l=a?global$d:i?global$d[o]||defineGlobalProperty(o,{}):global$d[o]&&global$d[o].prototype;if(l)for(r in t){if(n=t[r],s=e.dontCallGetSet?(s=getOwnPropertyDescriptor$1(l,r))&&s.value:l[r],!isForced$1(a?r:o+(i?".":"#")+r,e.forced)&&void 0!==s){if(typeof n==typeof s)continue;copyConstructorProperties(n,s)}(e.sham||s&&s.sham)&&createNonEnumerableProperty$3(n,"sham",!0),defineBuiltIn$5(l,r,n,e)}},internalObjectKeys=objectKeysInternal,enumBugKeys$1=enumBugKeys$3,objectKeys$2=Object.keys||function(e){return internalObjectKeys(e,enumBugKeys$1)},DESCRIPTORS$4=descriptors,uncurryThis$c=functionUncurryThis,call$c=functionCall,fails$b=fails$k,objectKeys$1=objectKeys$2,getOwnPropertySymbolsModule=objectGetOwnPropertySymbols,propertyIsEnumerableModule=objectPropertyIsEnumerable,toObject$3=toObject$5,IndexedObject=indexedObject,$assign=Object.assign,defineProperty$4=Object.defineProperty,concat$1=uncurryThis$c([].concat),objectAssign=!$assign||fails$b(function(){var e,t,r,n;return!(!DESCRIPTORS$4||1===$assign({b:1},$assign(defineProperty$4({},"a",{enumerable:!0,get:function(){defineProperty$4(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)||(t={},n="abcdefghijklmnopqrst",(e={})[r=Symbol("assign detection")]=7,n.split("").forEach(function(e){t[e]=e}),7!==$assign({},e)[r])||objectKeys$1($assign({},t)).join("")!==n})?function(e,t){for(var r=toObject$3(e),n=arguments.length,s=1,o=getOwnPropertySymbolsModule.f,a=propertyIsEnumerableModule.f;s<n;)for(var i,l=IndexedObject(arguments[s++]),c=o?concat$1(objectKeys$1(l),o(l)):objectKeys$1(l),u=c.length,d=0;d<u;)i=c[d++],DESCRIPTORS$4&&!call$c(a,l,i)||(r[i]=l[i]);return r}:$assign,$$c=_export,assign=objectAssign,objectDefineProperties=(_export({target:"Object",stat:!0,arity:2,forced:Object.assign!==assign},{assign:assign}),{}),DESCRIPTORS$3=descriptors,V8_PROTOTYPE_DEFINE_BUG=v8PrototypeDefineBug,definePropertyModule=objectDefineProperty,anObject$9=anObject$c,toIndexedObject$1=toIndexedObject$5,objectKeys=objectKeys$2,getBuiltIn$4=(objectDefineProperties.f=DESCRIPTORS$3&&!V8_PROTOTYPE_DEFINE_BUG?Object.defineProperties:function(e,t){anObject$9(e);for(var r,n=toIndexedObject$1(t),s=objectKeys(t),o=s.length,a=0;a<o;)definePropertyModule.f(e,r=s[a++],n[r]);return e},getBuiltIn$7),html$2=getBuiltIn$7("document","documentElement"),anObject$8=anObject$c,definePropertiesModule=objectDefineProperties,enumBugKeys=enumBugKeys$3,hiddenKeys=hiddenKeys$4,html$1=html$2,documentCreateElement$1=documentCreateElement$2,sharedKey$1=sharedKey$3,GT=">",LT="<",PROTOTYPE="prototype",SCRIPT="script",IE_PROTO$1=sharedKey$3("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(e){return LT+SCRIPT+GT+e+LT+"/"+SCRIPT+GT},NullProtoObjectViaActiveX=function(e){e.write(scriptTag("")),e.close();var t=e.parentWindow.Object;return e=null,t},NullProtoObjectViaIFrame=function(){var e=documentCreateElement$1("iframe"),t="java"+SCRIPT+":";return e.style.display="none",html$1.appendChild(e),e.src=String(t),(t=e.contentWindow.document).open(),t.write(scriptTag("document.F=Object")),t.close(),t.F},NullProtoObject=function(){try{activeXDocument=new ActiveXObject("htmlfile")}catch(e){}NullProtoObject="undefined"==typeof document||document.domain&&activeXDocument?NullProtoObjectViaActiveX(activeXDocument):NullProtoObjectViaIFrame();for(var e=enumBugKeys.length;e--;)delete NullProtoObject[PROTOTYPE][enumBugKeys[e]];return NullProtoObject()},objectCreate=(hiddenKeys[IE_PROTO$1]=!0,Object.create||function(e,t){var r;return null!==e?(EmptyConstructor[PROTOTYPE]=anObject$8(e),r=new EmptyConstructor,EmptyConstructor[PROTOTYPE]=null,r[IE_PROTO$1]=e):r=NullProtoObject(),void 0===t?r:definePropertiesModule.f(r,t)}),wellKnownSymbol$h=wellKnownSymbol$j,create$2=objectCreate,defineProperty$3=objectDefineProperty.f,UNSCOPABLES=wellKnownSymbol$h("unscopables"),ArrayPrototype$1=Array.prototype,addToUnscopables$3=(void 0===ArrayPrototype$1[UNSCOPABLES]&&defineProperty$3(ArrayPrototype$1,UNSCOPABLES,{configurable:!0,value:create$2(null)}),function(e){ArrayPrototype$1[UNSCOPABLES][e]=!0}),iterators={},fails$a=fails$k,correctPrototypeGetter=!fails$k(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),hasOwn$2=hasOwnProperty_1,isCallable$a=isCallable$l,toObject$2=toObject$5,sharedKey=sharedKey$3,CORRECT_PROTOTYPE_GETTER=correctPrototypeGetter,IE_PROTO=sharedKey$3("IE_PROTO"),$Object$1=Object,ObjectPrototype=$Object$1.prototype,objectGetPrototypeOf=CORRECT_PROTOTYPE_GETTER?$Object$1.getPrototypeOf:function(e){var t,e=toObject$2(e);return hasOwn$2(e,IE_PROTO)?e[IE_PROTO]:(t=e.constructor,isCallable$a(t)&&e instanceof t?t.prototype:e instanceof $Object$1?ObjectPrototype:null)},fails$9=fails$k,isCallable$9=isCallable$l,isObject$6=isObject$c,getPrototypeOf$1=objectGetPrototypeOf,defineBuiltIn$4=defineBuiltIn$6,wellKnownSymbol$g=wellKnownSymbol$j,ITERATOR$6=wellKnownSymbol$j("iterator"),BUGGY_SAFARI_ITERATORS$1=!1,NEW_ITERATOR_PROTOTYPE=([].keys&&("next"in(arrayIterator=[].keys())?(PrototypeOfArrayIteratorPrototype=getPrototypeOf$1(getPrototypeOf$1(arrayIterator)))!==Object.prototype&&(IteratorPrototype$2=PrototypeOfArrayIteratorPrototype):BUGGY_SAFARI_ITERATORS$1=!0),!isObject$6(IteratorPrototype$2)||fails$9(function(){var e={};return IteratorPrototype$2[ITERATOR$6].call(e)!==e})),iteratorsCore=(isCallable$9((IteratorPrototype$2=NEW_ITERATOR_PROTOTYPE?{}:IteratorPrototype$2)[ITERATOR$6])||defineBuiltIn$4(IteratorPrototype$2,ITERATOR$6,function(){return this}),{IteratorPrototype:IteratorPrototype$2,BUGGY_SAFARI_ITERATORS:BUGGY_SAFARI_ITERATORS$1}),defineProperty$2=objectDefineProperty.f,hasOwn$1=hasOwnProperty_1,wellKnownSymbol$f=wellKnownSymbol$j,TO_STRING_TAG$2=wellKnownSymbol$j("toStringTag"),setToStringTag$4=function(e,t,r){(e=e&&!r?e.prototype:e)&&!hasOwn$1(e,TO_STRING_TAG$2)&&defineProperty$2(e,TO_STRING_TAG$2,{configurable:!0,value:t})},IteratorPrototype$1=iteratorsCore.IteratorPrototype,create$1=objectCreate,createPropertyDescriptor=createPropertyDescriptor$3,setToStringTag$3=setToStringTag$4,Iterators$4=iterators,returnThis$1=function(){return this},iteratorCreateConstructor=function(e,t,r,n){t+=" Iterator";return e.prototype=create$1(IteratorPrototype$1,{next:createPropertyDescriptor(+!n,r)}),setToStringTag$3(e,t,!1),Iterators$4[t]=returnThis$1,e},uncurryThis$b=functionUncurryThis,aCallable$6=aCallable$8,functionUncurryThisAccessor=function(e,t,r){try{return uncurryThis$b(aCallable$6(Object.getOwnPropertyDescriptor(e,t)[r]))}catch(e){}},isObject$5=isObject$c,isPossiblePrototype$1=function(e){return isObject$5(e)||null===e},isPossiblePrototype=isPossiblePrototype$1,$String$1=String,$TypeError$9=TypeError,aPossiblePrototype$1=function(e){if(isPossiblePrototype(e))return e;throw new $TypeError$9("Can't set "+$String$1(e)+" as a prototype")},uncurryThisAccessor=functionUncurryThisAccessor,isObject$4=isObject$c,requireObjectCoercible$4=requireObjectCoercible$7,aPossiblePrototype=aPossiblePrototype$1,objectSetPrototypeOf=Object.setPrototypeOf||("__proto__"in{}?function(){var r,n=!1,e={};try{(r=uncurryThisAccessor(Object.prototype,"__proto__","set"))(e,[]),n=e instanceof Array}catch(e){}return function(e,t){return requireObjectCoercible$4(e),aPossiblePrototype(t),isObject$4(e)&&(n?r(e,t):e.__proto__=t),e}}():void 0),$$b=_export,call$b=functionCall,FunctionName=functionName,isCallable$8=isCallable$l,createIteratorConstructor=iteratorCreateConstructor,getPrototypeOf=objectGetPrototypeOf,setPrototypeOf$1=objectSetPrototypeOf,setToStringTag$2=setToStringTag$4,createNonEnumerableProperty$2=createNonEnumerableProperty$5,defineBuiltIn$3=defineBuiltIn$6,wellKnownSymbol$e=wellKnownSymbol$j,Iterators$3=iterators,IteratorsCore=iteratorsCore,PROPER_FUNCTION_NAME=FunctionName.PROPER,CONFIGURABLE_FUNCTION_NAME=FunctionName.CONFIGURABLE,IteratorPrototype=IteratorsCore.IteratorPrototype,BUGGY_SAFARI_ITERATORS=IteratorsCore.BUGGY_SAFARI_ITERATORS,ITERATOR$5=wellKnownSymbol$e("iterator"),KEYS="keys",VALUES="values",ENTRIES="entries",returnThis=function(){return this},iteratorDefine=function(e,t,r,n,s,o,a){createIteratorConstructor(r,t,n);function i(e){if(e===s&&$)return $;if(!BUGGY_SAFARI_ITERATORS&&e&&e in d)return d[e];switch(e){case KEYS:case VALUES:case ENTRIES:return function(){return new r(this,e)}}return function(){return new r(this)}}var l,c,n=t+" Iterator",u=!1,d=e.prototype,p=d[ITERATOR$5]||d["@@iterator"]||s&&d[s],$=!BUGGY_SAFARI_ITERATORS&&p||i(s),g="Array"===t&&d.entries||p;if(g&&(g=getPrototypeOf(g.call(new e)))!==Object.prototype&&g.next&&(getPrototypeOf(g)!==IteratorPrototype&&(setPrototypeOf$1?setPrototypeOf$1(g,IteratorPrototype):isCallable$8(g[ITERATOR$5])||defineBuiltIn$3(g,ITERATOR$5,returnThis)),setToStringTag$2(g,n,!0)),PROPER_FUNCTION_NAME&&s===VALUES&&p&&p.name!==VALUES&&(CONFIGURABLE_FUNCTION_NAME?createNonEnumerableProperty$2(d,"name",VALUES):(u=!0,$=function(){return call$b(p,this)})),s)if(l={values:i(VALUES),keys:o?$:i(KEYS),entries:i(ENTRIES)},a)for(c in l)!BUGGY_SAFARI_ITERATORS&&!u&&c in d||defineBuiltIn$3(d,c,l[c]);else $$b({target:t,proto:!0,forced:BUGGY_SAFARI_ITERATORS||u},l);return d[ITERATOR$5]!==$&&defineBuiltIn$3(d,ITERATOR$5,$,{name:s}),Iterators$3[t]=$,l},createIterResultObject$1=function(e,t){return{value:e,done:t}},toIndexedObject=toIndexedObject$5,addToUnscopables$2=addToUnscopables$3,Iterators$2=iterators,InternalStateModule$1=internalState,defineProperty$1=objectDefineProperty.f,defineIterator=iteratorDefine,createIterResultObject=createIterResultObject$1,DESCRIPTORS$2=descriptors,ARRAY_ITERATOR="Array Iterator",setInternalState$1=InternalStateModule$1.set,getInternalState$1=InternalStateModule$1.getterFor(ARRAY_ITERATOR),es_array_iterator=defineIterator(Array,"Array",function(e,t){setInternalState$1(this,{type:ARRAY_ITERATOR,target:toIndexedObject(e),index:0,kind:t})},function(){var e=getInternalState$1(this),t=e.target,r=e.index++;if(!t||r>=t.length)return e.target=void 0,createIterResultObject(void 0,!0);switch(e.kind){case"keys":return createIterResultObject(r,!1);case"values":return createIterResultObject(t[r],!1)}return createIterResultObject([r,t[r]],!1)},"values"),values=Iterators$2.Arguments=Iterators$2.Array;if(addToUnscopables$2("keys"),addToUnscopables$2("values"),addToUnscopables$2("entries"),DESCRIPTORS$2&&"values"!==values.name)try{defineProperty$1(values,"name",{value:"values"})}catch(e){}var COLLECTION_NAME,domIterables={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},documentCreateElement=documentCreateElement$2,classList=documentCreateElement$2("span").classList,DOMTokenListPrototype$1=classList&&classList.constructor&&classList.constructor.prototype,domTokenListPrototype=DOMTokenListPrototype$1===Object.prototype?void 0:DOMTokenListPrototype$1,global$c=global$m,DOMIterables=domIterables,DOMTokenListPrototype=domTokenListPrototype,ArrayIteratorMethods=es_array_iterator,createNonEnumerableProperty$1=createNonEnumerableProperty$5,setToStringTag$1=setToStringTag$4,wellKnownSymbol$d=wellKnownSymbol$j,ITERATOR$4=wellKnownSymbol$j("iterator"),ArrayValues=ArrayIteratorMethods.values,handlePrototype=function(t,e){if(t){if(t[ITERATOR$4]!==ArrayValues)try{createNonEnumerableProperty$1(t,ITERATOR$4,ArrayValues)}catch(e){t[ITERATOR$4]=ArrayValues}if(setToStringTag$1(t,e,!0),DOMIterables[e])for(var r in ArrayIteratorMethods)if(t[r]!==ArrayIteratorMethods[r])try{createNonEnumerableProperty$1(t,r,ArrayIteratorMethods[r])}catch(e){t[r]=ArrayIteratorMethods[r]}}};for(COLLECTION_NAME in DOMIterables)handlePrototype(global$c[COLLECTION_NAME]&&global$c[COLLECTION_NAME].prototype,COLLECTION_NAME);handlePrototype(DOMTokenListPrototype,"DOMTokenList");const useStyles$3=makeStyles()(()=>({badge:{fontSize:"9px",lineHeight:"18px",borderRadius:"30px",height:"18px",width:"fit-content",padding:"0px 10px",fontWeight:800},active:{background:"rgba(209, 223, 210, 1)",color:"rgba(56, 142, 60, 1)"},suspended:{background:"rgba(254, 238, 211, 1)",color:"rgba(245, 124, 0, 1)"},deactivated:{background:"rgba(241, 210, 210, 1)",color:"rgba(183, 28, 28, 1)"},deleted:{background:"rgba(233, 233, 233, 1)",color:"rgba(33, 33, 33, 1)"}})),UserStatusBadge=({status:e})=>{var t=useStyles$3()["classes"];return jsxRuntime.exports.jsx(Box,Object.assign({className:t.badge+" "+t[e],"data-testid":"admin-center.users.user-status-badge","data-test":"admin-center.users.user-status-badge"},{children:e.toUpperCase()}))},SLICE_NAME="adminCenterUsers",PAGE_LIMIT=30;var wellKnownSymbol$c=wellKnownSymbol$j,TO_STRING_TAG$1=wellKnownSymbol$j("toStringTag"),test={},toStringTagSupport=(test[TO_STRING_TAG$1]="z","[object z]"===String(test)),TO_STRING_TAG_SUPPORT=toStringTagSupport,isCallable$7=isCallable$l,classofRaw$1=classofRaw$2,wellKnownSymbol$b=wellKnownSymbol$j,TO_STRING_TAG=wellKnownSymbol$j("toStringTag"),$Object=Object,CORRECT_ARGUMENTS="Arguments"===classofRaw$1(function(){return arguments}()),tryGet=function(e,t){try{return e[t]}catch(e){}},classof$7=TO_STRING_TAG_SUPPORT?classofRaw$1:function(e){var t;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(t=tryGet(e=$Object(e),TO_STRING_TAG))?t:CORRECT_ARGUMENTS?classofRaw$1(e):"Object"===(t=classofRaw$1(e))&&isCallable$7(e.callee)?"Arguments":t},classof$6=classof$7,$String=String,toString$6=function(e){if("Symbol"===classof$6(e))throw new TypeError("Cannot convert a Symbol value to a string");return $String(e)},whitespaces$2="\t\n\v\f\r \u2028\u2029\ufeff",uncurryThis$a=functionUncurryThis,requireObjectCoercible$3=requireObjectCoercible$7,toString$5=toString$6,whitespaces$1=whitespaces$2,replace$2=functionUncurryThis("".replace),ltrim=RegExp("^["+whitespaces$1+"]+"),rtrim=RegExp("(^|[^"+whitespaces$1+"])["+whitespaces$1+"]+$"),createMethod$1=function(t){return function(e){e=toString$5(requireObjectCoercible$3(e));return 1&t&&(e=replace$2(e,ltrim,"")),e=2&t?replace$2(e,rtrim,"$1"):e}},stringTrim={start:createMethod$1(1),end:createMethod$1(2),trim:createMethod$1(3)},global$b=global$m,fails$8=fails$k,uncurryThis$9=functionUncurryThis,toString$4=toString$6,trim=stringTrim.trim,whitespaces=whitespaces$2,$parseInt$1=global$b.parseInt,Symbol$1=global$b.Symbol,ITERATOR$3=Symbol$1&&Symbol$1.iterator,hex=/^[+-]?0x/i,exec$2=uncurryThis$9(hex.exec),FORCED=8!==$parseInt$1(whitespaces+"08")||22!==$parseInt$1(whitespaces+"0x16")||ITERATOR$3&&!fails$8(function(){$parseInt$1(Object(ITERATOR$3))}),numberParseInt=FORCED?function(e,t){e=trim(toString$4(e));return $parseInt$1(e,t>>>0||(exec$2(hex,e)?16:10))}:$parseInt$1,$$a=_export,$parseInt=numberParseInt;_export({global:!0,forced:parseInt!==numberParseInt},{parseInt:numberParseInt});const namespace$1="adminCenterUsers",avatarColors=["#f94144ff","#f3722cff","#f8961eff","#f9844aff","#f9c74fff","#90be6dff","#43aa8bff","#4d908eff","#577590ff","#277da1ff"];let prevIndex=0;const initialState$1={status:"idle",users:[],offset:0,hasMore:!0,userDetailPanel:{userId:null,userData:null,loadingStatus:"idle"},userOrgs:[],userRoles:[],searchTerm:"",isSearching:!1},adminCenterSlice=createSlice({name:SLICE_NAME+"/"+namespace$1,initialState:initialState$1,reducers:{fetchOrgUsersStart(e){e.status="loading"},fetchOrgUsersSuccess(e,t){e.status="success",e.isSearching=!1;var r=[];for(const o of t.payload.records){var n=md5((o.id||"")+(o.email||"")+o.lastLoginDateTime+(o.firstName||""));let e=parseInt(n,16)%avatarColors.length;e===prevIndex&&(e+1>avatarColors.length-1?--e:e+=1),prevIndex=e,r.push(Object.assign(Object.assign({},o),{avatarColor:avatarColors[e]}))}var s=[...e.users,...r],s=[...new Map(s.map(e=>[e.id,e])).values()];e.users=s,e.hasMore=t.payload.hasMore,e.offset=t.payload.nextOffset},fetchOrgUsersFailure(e){e.status="failure",e.isSearching=!1},removeUserFromOrgStart(e,t){e.status="loading"},removeUserFromOrgSuccess(e,t){e.status="success",e.users=[...e.users].filter(e=>e.id!==t.payload),e.offset=e.offset-1},removeUserFromOrgFailure(e){e.status="failure"},updateUserStatusStart(e,t){e.status="loading"},updateUserStatusSuccess(e,t){e.status="success";var r,n=e.users.findIndex(e=>e.id===t.payload.id);-1!==n&&((r=[...e.users])[n]=Object.assign(Object.assign({},r[n]),{status:t.payload.status}),e.users=r)},updateUserStatusFailure(e){e.status="failure"},fetchUserStart(e,t){e.userDetailPanel.userId=t.payload.userId,e.userDetailPanel.loadingStatus="loading"},fetchUserSuccess(e,t){const r=t.payload["user"];let n=avatarColors[5];var s=e.users.find(e=>e.id===r.id);s&&s.avatarColor&&(n=s.avatarColor),e.userDetailPanel.userData=Object.assign(Object.assign({},t.payload.user),{avatarColor:n}),e.userDetailPanel.loadingStatus="success"},fetchUserFailure(e){e.userDetailPanel.loadingStatus="failure"},fetchUserOrganizationsStart(e,t){e.status="loading"},fetchUserOrganizationsSuccess(e,t){e.userOrgs=t.payload.orgs,e.status="success"},fetchUserOrganizationsFailure(e){e.status="failure"},getUserApplicationRolesStart(e,t){e.userDetailPanel.loadingStatus="loading"},getUserApplicationRolesSuccess(e,t){e.userDetailPanel.loadingStatus="success",e.userRoles=t.payload.roles},getUserApplicationRolesFailure(e){e.userDetailPanel.loadingStatus="failure"},resetUserRoles:e=>{e.userRoles=initialState$1.userRoles},setSearchTerm(e,t){e.searchTerm=t.payload,e.users=[],e.status="loading"},setIsSearching(e,t){e.isSearching=t.payload}}}),actions$1=adminCenterSlice.actions;var adminCenterUsers_state=adminCenterSlice.reducer;const namespace=SLICE_NAME,initialState={[namespace$1]:initialState$1},actions={[namespace$1]:actions$1},rootReducer=combineReducers({[namespace$1]:adminCenterUsers_state});var $location,defer,channel,port,toggle,node,promise,then,queue,flush,notify$1,Internal,OwnPromiseCapability,PromiseWrapper,nativeThen,classof$5=classofRaw$2,isArray$2=Array.isArray||function(e){return"Array"===classof$5(e)},$TypeError$8=TypeError,MAX_SAFE_INTEGER=9007199254740991,doesNotExceedSafeInteger$1=function(e){if(MAX_SAFE_INTEGER<e)throw $TypeError$8("Maximum allowed index exceeded");return e},classofRaw=classofRaw$2,uncurryThis$8=functionUncurryThis,functionUncurryThisClause=function(e){if("Function"===classofRaw(e))return uncurryThis$8(e)},uncurryThis$7=functionUncurryThisClause,aCallable$5=aCallable$8,NATIVE_BIND$1=functionBindNative,bind$5=functionUncurryThisClause(functionUncurryThisClause.bind),functionBindContext=function(e,t){return aCallable$5(e),void 0===t?e:NATIVE_BIND$1?bind$5(e,t):function(){return e.apply(t,arguments)}},isArray$1=isArray$2,lengthOfArrayLike$2=lengthOfArrayLike$4,doesNotExceedSafeInteger=doesNotExceedSafeInteger$1,bind$4=functionBindContext,flattenIntoArray$1=function(e,t,r,n,s,o,a,i){for(var l,c,u=s,d=0,p=!!a&&bind$4(a,i);d<n;)d in r&&(l=p?p(r[d],d,t):r[d],0<o&&isArray$1(l)?(c=lengthOfArrayLike$2(l),u=flattenIntoArray$1(e,t,l,c,u,o-1)-1):(doesNotExceedSafeInteger(u+1),e[u]=l),u++),d++;return u},flattenIntoArray_1=flattenIntoArray$1,uncurryThis$6=functionUncurryThis,fails$7=fails$k,isCallable$6=isCallable$l,classof$4=classof$7,getBuiltIn$3=getBuiltIn$7,inspectSource$1=inspectSource$3,noop=function(){},construct=getBuiltIn$7("Reflect","construct"),constructorRegExp=/^\s*(?:class|function)\b/,exec$1=uncurryThis$6(constructorRegExp.exec),INCORRECT_TO_STRING=!constructorRegExp.test(noop),isConstructorModern=function(e){if(!isCallable$6(e))return!1;try{return construct(noop,[],e),!0}catch(e){return!1}},isConstructorLegacy=function(e){if(!isCallable$6(e))return!1;switch(classof$4(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return INCORRECT_TO_STRING||!!exec$1(constructorRegExp,inspectSource$1(e))}catch(e){return!0}},isConstructor$2=(isConstructorLegacy.sham=!0,!construct||fails$7(function(){var e;return isConstructorModern(isConstructorModern.call)||!isConstructorModern(Object)||!isConstructorModern(function(){e=!0})||e})?isConstructorLegacy:isConstructorModern),isArray=isArray$2,isConstructor$1=isConstructor$2,isObject$3=isObject$c,wellKnownSymbol$a=wellKnownSymbol$j,SPECIES$4=wellKnownSymbol$j("species"),$Array=Array,arraySpeciesConstructor$1=function(e){var t;return void 0===(t=isArray(e)&&(t=e.constructor,isConstructor$1(t)&&(t===$Array||isArray(t.prototype))||isObject$3(t)&&null===(t=t[SPECIES$4]))?void 0:t)?$Array:t},arraySpeciesConstructor=arraySpeciesConstructor$1,arraySpeciesCreate$1=function(e,t){return new(arraySpeciesConstructor(e))(0===t?0:t)},$$9=_export,flattenIntoArray=flattenIntoArray_1,toObject$1=toObject$5,lengthOfArrayLike$1=lengthOfArrayLike$4,toIntegerOrInfinity$2=toIntegerOrInfinity$5,arraySpeciesCreate=arraySpeciesCreate$1,addToUnscopables$1=(_export({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=toObject$1(this),r=lengthOfArrayLike$1(t),n=arraySpeciesCreate(t,0);return n.length=flattenIntoArray(n,t,t,r,0,void 0===e?1:toIntegerOrInfinity$2(e)),n}}),addToUnscopables$3),global$a=(addToUnscopables$3("flat"),global$m),classof$3=classofRaw$2,engineIsNode="process"===classofRaw$2(global$m.process),makeBuiltIn=makeBuiltIn$3.exports,defineProperty=objectDefineProperty,defineBuiltInAccessor$1=function(e,t,r){return r.get&&makeBuiltIn(r.get,t,{getter:!0}),r.set&&makeBuiltIn(r.set,t,{setter:!0}),defineProperty.f(e,t,r)},getBuiltIn$2=getBuiltIn$7,defineBuiltInAccessor=defineBuiltInAccessor$1,wellKnownSymbol$9=wellKnownSymbol$j,DESCRIPTORS$1=descriptors,SPECIES$3=wellKnownSymbol$j("species"),setSpecies$1=function(e){e=getBuiltIn$2(e);DESCRIPTORS$1&&e&&!e[SPECIES$3]&&defineBuiltInAccessor(e,SPECIES$3,{configurable:!0,get:function(){return this}})},isPrototypeOf$1=objectIsPrototypeOf,$TypeError$7=TypeError,anInstance$1=function(e,t){if(isPrototypeOf$1(t,e))return e;throw new $TypeError$7("Incorrect invocation")},isConstructor=isConstructor$2,tryToString$2=tryToString$4,$TypeError$6=TypeError,aConstructor$1=function(e){if(isConstructor(e))return e;throw new $TypeError$6(tryToString$2(e)+" is not a constructor")},anObject$7=anObject$c,aConstructor=aConstructor$1,isNullOrUndefined$2=isNullOrUndefined$5,wellKnownSymbol$8=wellKnownSymbol$j,SPECIES$2=wellKnownSymbol$j("species"),speciesConstructor$1=function(e,t){var e=anObject$7(e).constructor;return void 0===e||isNullOrUndefined$2(e=anObject$7(e)[SPECIES$2])?t:aConstructor(e)},NATIVE_BIND=functionBindNative,FunctionPrototype=Function.prototype,apply$2=FunctionPrototype.apply,call$a=FunctionPrototype.call,functionApply="object"==typeof Reflect&&Reflect.apply||(NATIVE_BIND?call$a.bind(apply$2):function(){return call$a.apply(apply$2,arguments)}),uncurryThis$5=functionUncurryThis,arraySlice$1=functionUncurryThis([].slice),$TypeError$5=TypeError,validateArgumentsLength$1=function(e,t){if(e<t)throw new $TypeError$5("Not enough arguments");return e},userAgent$2=engineUserAgent,engineIsIos=/(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$2),global$9=global$m,apply$1=functionApply,bind$3=functionBindContext,isCallable$5=isCallable$l,hasOwn=hasOwnProperty_1,fails$6=fails$k,html=html$2,arraySlice=arraySlice$1,createElement=documentCreateElement$2,validateArgumentsLength=validateArgumentsLength$1,IS_IOS$1=engineIsIos,IS_NODE$3=engineIsNode,set=global$9.setImmediate,clear=global$9.clearImmediate,process$3=global$9.process,Dispatch=global$9.Dispatch,Function$1=global$9.Function,MessageChannel=global$9.MessageChannel,String$1=global$9.String,counter=0,queue$2={},ONREADYSTATECHANGE="onreadystatechange",run=(fails$6(function(){$location=global$9.location}),function(e){var t;hasOwn(queue$2,e)&&(t=queue$2[e],delete queue$2[e],t())}),runner=function(e){return function(){run(e)}},eventListener=function(e){run(e.data)},globalPostMessageDefer=function(e){global$9.postMessage(String$1(e),$location.protocol+"//"+$location.host)},task$1=(set&&clear||(set=function(e){validateArgumentsLength(arguments.length,1);var t=isCallable$5(e)?e:Function$1(e),r=arraySlice(arguments,1);return queue$2[++counter]=function(){apply$1(t,void 0,r)},defer(counter),counter},clear=function(e){delete queue$2[e]},IS_NODE$3?defer=function(e){process$3.nextTick(runner(e))}:Dispatch&&Dispatch.now?defer=function(e){Dispatch.now(runner(e))}:MessageChannel&&!IS_IOS$1?(port=(channel=new MessageChannel).port2,channel.port1.onmessage=eventListener,defer=bind$3(port.postMessage,port)):global$9.addEventListener&&isCallable$5(global$9.postMessage)&&!global$9.importScripts&&$location&&"file:"!==$location.protocol&&!fails$6(globalPostMessageDefer)?(defer=globalPostMessageDefer,global$9.addEventListener("message",eventListener,!1)):defer=ONREADYSTATECHANGE in createElement("script")?function(e){html.appendChild(createElement("script"))[ONREADYSTATECHANGE]=function(){html.removeChild(this),run(e)}}:function(e){setTimeout(runner(e),0)}),{set:set,clear:clear}),global$8=global$m,DESCRIPTORS=descriptors,getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,safeGetBuiltIn$1=function(e){var t;return DESCRIPTORS?(t=getOwnPropertyDescriptor(global$8,e))&&t.value:global$8[e]},Queue$2=function(){this.head=null,this.tail=null},queue$1=(Queue$2.prototype={add:function(e){var e={item:e,next:null},t=this.tail;t?t.next=e:this.head=e,this.tail=e},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}},Queue$2),userAgent$1=engineUserAgent,engineIsIosPebble=/ipad|iphone|ipod/i.test(userAgent$1)&&"undefined"!=typeof Pebble,userAgent=engineUserAgent,engineIsWebosWebkit=/web0s(?!.*chrome)/i.test(userAgent),global$7=global$m,safeGetBuiltIn=safeGetBuiltIn$1,bind$2=functionBindContext,macrotask=task$1.set,Queue$1=queue$1,IS_IOS=engineIsIos,IS_IOS_PEBBLE=engineIsIosPebble,IS_WEBOS_WEBKIT=engineIsWebosWebkit,IS_NODE$2=engineIsNode,MutationObserver=global$7.MutationObserver||global$7.WebKitMutationObserver,document$2=global$7.document,process$2=global$7.process,Promise$1=global$7.Promise,microtask$1=safeGetBuiltIn("queueMicrotask"),microtask_1=(microtask$1||(queue=new Queue$1,flush=function(){var e,t;for(IS_NODE$2&&(e=process$2.domain)&&e.exit();t=queue.get();)try{t()}catch(e){throw queue.head&¬ify$1(),e}e&&e.enter()},notify$1=IS_IOS||IS_NODE$2||IS_WEBOS_WEBKIT||!MutationObserver||!document$2?!IS_IOS_PEBBLE&&Promise$1&&Promise$1.resolve?((promise=Promise$1.resolve(void 0)).constructor=Promise$1,then=bind$2(promise.then,promise),function(){then(flush)}):IS_NODE$2?function(){process$2.nextTick(flush)}:(macrotask=bind$2(macrotask,global$7),function(){macrotask(flush)}):(toggle=!0,node=document$2.createTextNode(""),new MutationObserver(flush).observe(node,{characterData:!0}),function(){node.data=toggle=!toggle}),microtask$1=function(e){queue.head||notify$1(),queue.add(e)}),microtask$1),hostReportErrors$1=function(e,t){try{1===arguments.length?console.error(e):console.error(e,t)}catch(e){}},perform$3=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},global$6=global$m,promiseNativeConstructor=global$m.Promise,engineIsDeno="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,IS_DENO$1=engineIsDeno,IS_NODE$1=engineIsNode,engineIsBrowser=!engineIsDeno&&!engineIsNode&&"object"==typeof window&&"object"==typeof document,global$5=global$m,NativePromiseConstructor$3=promiseNativeConstructor,isCallable$4=isCallable$l,isForced=isForced_1,inspectSource=inspectSource$3,wellKnownSymbol$7=wellKnownSymbol$j,IS_BROWSER=engineIsBrowser,IS_DENO=engineIsDeno,V8_VERSION=engineV8Version,SPECIES$1=(NativePromiseConstructor$3&&NativePromiseConstructor$3.prototype,wellKnownSymbol$7("species")),SUBCLASSING=!1,NATIVE_PROMISE_REJECTION_EVENT$1=isCallable$4(global$5.PromiseRejectionEvent),FORCED_PROMISE_CONSTRUCTOR$5=isForced("Promise",function(){var e=inspectSource(NativePromiseConstructor$3),t=e!==String(NativePromiseConstructor$3);if(!t&&66===V8_VERSION)return!0;if(!V8_VERSION||V8_VERSION<51||!/native code/.test(e)){function r(e){e(function(){},function(){})}e=new NativePromiseConstructor$3(function(e){e(1)});if((e.constructor={})[SPECIES$1]=r,!(SUBCLASSING=e.then(function(){})instanceof r))return!0}return!t&&(IS_BROWSER||IS_DENO)&&!NATIVE_PROMISE_REJECTION_EVENT$1}),promiseConstructorDetection={CONSTRUCTOR:FORCED_PROMISE_CONSTRUCTOR$5,REJECTION_EVENT:NATIVE_PROMISE_REJECTION_EVENT$1,SUBCLASSING:SUBCLASSING},newPromiseCapability$2={},aCallable$4=aCallable$8,$TypeError$4=TypeError,PromiseCapability=function(e){var r,n;this.promise=new e(function(e,t){if(void 0!==r||void 0!==n)throw new $TypeError$4("Bad Promise constructor");r=e,n=t}),this.resolve=aCallable$4(r),this.reject=aCallable$4(n)},$$8=(newPromiseCapability$2.f=function(e){return new PromiseCapability(e)},_export),IS_NODE=engineIsNode,global$4=global$m,call$9=functionCall,defineBuiltIn$2=defineBuiltIn$6,setPrototypeOf=objectSetPrototypeOf,setToStringTag=setToStringTag$4,setSpecies=setSpecies$1,aCallable$3=aCallable$8,isCallable$3=isCallable$l,isObject$2=isObject$c,anInstance=anInstance$1,speciesConstructor=speciesConstructor$1,task=task$1.set,microtask=microtask_1,hostReportErrors=hostReportErrors$1,perform$2=perform$3,Queue=queue$1,InternalStateModule=internalState,NativePromiseConstructor$2=promiseNativeConstructor,PromiseConstructorDetection=promiseConstructorDetection,newPromiseCapabilityModule$3=newPromiseCapability$2,PROMISE="Promise",FORCED_PROMISE_CONSTRUCTOR$4=PromiseConstructorDetection.CONSTRUCTOR,NATIVE_PROMISE_REJECTION_EVENT=PromiseConstructorDetection.REJECTION_EVENT,NATIVE_PROMISE_SUBCLASSING=PromiseConstructorDetection.SUBCLASSING,getInternalPromiseState=InternalStateModule.getterFor(PROMISE),setInternalState=InternalStateModule.set,NativePromisePrototype$1=NativePromiseConstructor$2&&NativePromiseConstructor$2.prototype,PromiseConstructor=NativePromiseConstructor$2,PromisePrototype=NativePromisePrototype$1,TypeError$1=global$4.TypeError,document$1=global$4.document,process$1=global$4.process,newPromiseCapability$1=newPromiseCapabilityModule$3.f,newGenericPromiseCapability=newPromiseCapability$1,DISPATCH_EVENT=!!(document$1&&document$1.createEvent&&global$4.dispatchEvent),UNHANDLED_REJECTION="unhandledrejection",REJECTION_HANDLED="rejectionhandled",PENDING=0,FULFILLED=1,REJECTED=2,HANDLED=1,UNHANDLED=2,isThenable=function(e){var t;return!(!isObject$2(e)||!isCallable$3(t=e.then))&&t},callReaction=function(e,t){var r,n,s,o=t.value,a=t.state===FULFILLED,i=a?e.ok:e.fail,l=e.resolve,c=e.reject,u=e.domain;try{i?(a||(t.rejection===UNHANDLED&&onHandleUnhandled(t),t.rejection=HANDLED),!0===i?r=o:(u&&u.enter(),r=i(o),u&&(u.exit(),s=!0)),r===e.promise?c(new TypeError$1("Promise-chain cycle")):(n=isThenable(r))?call$9(n,r,l,c):l(r)):c(o)}catch(e){u&&!s&&u.exit(),c(e)}},notify=function(r,n){r.notified||(r.notified=!0,microtask(function(){for(var e,t=r.reactions;e=t.get();)callReaction(e,r);r.notified=!1,n&&!r.rejection&&onUnhandled(r)}))},dispatchEvent=function(e,t,r){var n;DISPATCH_EVENT?((n=document$1.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),global$4.dispatchEvent(n)):n={promise:t,reason:r},!NATIVE_PROMISE_REJECTION_EVENT&&(t=global$4["on"+e])?t(n):e===UNHANDLED_REJECTION&&hostReportErrors("Unhandled promise rejection",r)},onUnhandled=function(n){call$9(task,global$4,function(){var e=n.facade,t=n.value,r=isUnhandled(n);if(r&&(r=perform$2(function(){IS_NODE?process$1.emit("unhandledRejection",t,e):dispatchEvent(UNHANDLED_REJECTION,e,t)}),n.rejection=IS_NODE||isUnhandled(n)?UNHANDLED:HANDLED,r.error))throw r.value})},isUnhandled=function(e){return e.rejection!==HANDLED&&!e.parent},onHandleUnhandled=function(t){call$9(task,global$4,function(){var e=t.facade;IS_NODE?process$1.emit("rejectionHandled",e):dispatchEvent(REJECTION_HANDLED,e,t.value)})},bind$1=function(t,r,n){return function(e){t(r,e,n)}},internalReject=function(e,t,r){e.done||(e.done=!0,(e=r?r:e).value=t,e.state=REJECTED,notify(e,!0))},internalResolve=function(r,e,t){if(!r.done){r.done=!0,t&&(r=t);try{if(r.facade===e)throw new TypeError$1("Promise can't be resolved itself");var n=isThenable(e);n?microtask(function(){var t={done:!1};try{call$9(n,e,bind$1(internalResolve,t,r),bind$1(internalReject,t,r))}catch(e){internalReject(t,e,r)}}):(r.value=e,r.state=FULFILLED,notify(r,!1))}catch(e){internalReject({done:!1},e,r)}}};if(FORCED_PROMISE_CONSTRUCTOR$4&&(PromisePrototype=(PromiseConstructor=function(e){anInstance(this,PromisePrototype),aCallable$3(e),call$9(Internal,this);var t=getInternalPromiseState(this);try{e(bind$1(internalResolve,t),bind$1(internalReject,t))}catch(e){internalReject(t,e)}}).prototype,(Internal=function(e){setInternalState(this,{type:PROMISE,done:!1,notified:!1,parent:!1,reactions:new Queue,rejection:!1,state:PENDING,value:void 0})}).prototype=defineBuiltIn$2(PromisePrototype,"then",function(e,t){var r=getInternalPromiseState(this),n=newPromiseCapability$1(speciesConstructor(this,PromiseConstructor));return r.parent=!0,n.ok=!isCallable$3(e)||e,n.fail=isCallable$3(t)&&t,n.domain=IS_NODE?process$1.domain:void 0,r.state===PENDING?r.reactions.add(n):microtask(function(){callReaction(n,r)}),n.promise}),OwnPromiseCapability=function(){var e=new Internal,t=getInternalPromiseState(e);this.promise=e,this.resolve=bind$1(internalResolve,t),this.reject=bind$1(internalReject,t)},newPromiseCapabilityModule$3.f=newPromiseCapability$1=function(e){return e===PromiseConstructor||e===PromiseWrapper?new OwnPromiseCapability(e):newGenericPromiseCapability(e)},isCallable$3(NativePromiseConstructor$2))&&NativePromisePrototype$1!==Object.prototype){nativeThen=NativePromisePrototype$1.then,NATIVE_PROMISE_SUBCLASSING||defineBuiltIn$2(NativePromisePrototype$1,"then",function(e,t){var r=this;return new PromiseConstructor(function(e,t){call$9(nativeThen,r,e,t)}).then(e,t)},{unsafe:!0});try{delete NativePromisePrototype$1.constructor}catch(e){}setPrototypeOf&&setPrototypeOf(NativePromisePrototype$1,PromisePrototype)}$$8({global:!0,constructor:!0,wrap:!0,forced:FORCED_PROMISE_CONSTRUCTOR$4},{Promise:PromiseConstructor}),setToStringTag(PromiseConstructor,PROMISE,!1),setSpecies(PROMISE);var wellKnownSymbol$6=wellKnownSymbol$j,Iterators$1=iterators,ITERATOR$2=wellKnownSymbol$j("iterator"),ArrayPrototype=Array.prototype,isArrayIteratorMethod$1=function(e){return void 0!==e&&(Iterators$1.Array===e||ArrayPrototype[ITERATOR$2]===e)},classof$2=classof$7,getMethod$2=getMethod$4,isNullOrUndefined$1=isNullOrUndefined$5,Iterators=iterators,wellKnownSymbol$5=wellKnownSymbol$j,ITERATOR$1=wellKnownSymbol$j("iterator"),getIteratorMethod$2=function(e){if(!isNullOrUndefined$1(e))return getMethod$2(e,ITERATOR$1)||getMethod$2(e,"@@iterator")||Iterators[classof$2(e)]},call$8=functionCall,aCallable$2=aCallable$8,anObject$6=anObject$c,tryToString$1=tryToString$4,getIteratorMethod$1=getIteratorMethod$2,$TypeError$3=TypeError,getIterator$1=function(e,t){var r=arguments.length<2?getIteratorMethod$1(e):t;if(aCallable$2(r))return anObject$6(call$8(r,e));throw new $TypeError$3(tryToString$1(e)+" is not iterable")},call$7=functionCall,anObject$5=anObject$c,getMethod$1=getMethod$4,iteratorClose$1=function(e,t,r){var n,s;anObject$5(e);try{if(!(n=getMethod$1(e,"return"))){if("throw"===t)throw r;return r}n=call$7(n,e)}catch(e){s=!0,n=e}if("throw"===t)throw r;if(s)throw n;return anObject$5(n),r},bind=functionBindContext,call$6=functionCall,anObject$4=anObject$c,tryToString=tryToString$4,isArrayIteratorMethod=isArrayIteratorMethod$1,lengthOfArrayLike=lengthOfArrayLike$4,isPrototypeOf=objectIsPrototypeOf,getIterator=getIterator$1,getIteratorMethod=getIteratorMethod$2,iteratorClose=iteratorClose$1,$TypeError$2=TypeError,Result=function(e,t){this.stopped=e,this.result=t},ResultPrototype=Result.prototype,iterate$2=function(e,t,r){function n(e){return o&&iteratorClose(o,"normal",e),new Result(!0,e)}function s(e){return p?(anObject$4(e),m?f(e[0],e[1],n):f(e[0],e[1])):m?f(e,n):f(e)}var o,a,i,l,c,u,d=r&&r.that,p=!(!r||!r.AS_ENTRIES),$=!(!r||!r.IS_RECORD),g=!(!r||!r.IS_ITERATOR),m=!(!r||!r.INTERRUPTED),f=bind(t,d);if($)o=e.iterator;else if(g)o=e;else{if(!(r=getIteratorMethod(e)))throw new $TypeError$2(tryToString(e)+" is not iterable");if(isArrayIteratorMethod(r)){for(a=0,i=lengthOfArrayLike(e);a<i;a++)if((l=s(e[a]))&&isPrototypeOf(ResultPrototype,l))return l;return new Result(!1)}o=getIterator(e,r)}for(c=($?e:o).next;!(u=call$6(c,o)).done;){try{l=s(u.value)}catch(e){iteratorClose(o,"throw",e)}if("object"==typeof l&&l&&isPrototypeOf(ResultPrototype,l))return l}return new Result(!1)},wellKnownSymbol$4=wellKnownSymbol$j,ITERATOR=wellKnownSymbol$j("iterator"),SAFE_CLOSING=!1;try{var called=0,iteratorWithReturn={next:function(){return{done:!!called++}},return:function(){SAFE_CLOSING=!0}};iteratorWithReturn[ITERATOR]=function(){return this},Array.from(iteratorWithReturn,function(){throw 2})}catch(e){}var method,checkCorrectnessOfIteration$1=function(e,t){try{if(!t&&!SAFE_CLOSING)return!1}catch(e){return!1}var r=!1;try{var n={};n[ITERATOR]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r},NativePromiseConstructor$1=promiseNativeConstructor,checkCorrectnessOfIteration=checkCorrectnessOfIteration$1,FORCED_PROMISE_CONSTRUCTOR$3=promiseConstructorDetection.CONSTRUCTOR,promiseStaticsIncorrectIteration=FORCED_PROMISE_CONSTRUCTOR$3||!checkCorrectnessOfIteration(function(e){NativePromiseConstructor$1.all(e).then(void 0,function(){})}),$$7=_export,call$5=functionCall,aCallable$1=aCallable$8,newPromiseCapabilityModule$2=newPromiseCapability$2,perform$1=perform$3,iterate$1=iterate$2,PROMISE_STATICS_INCORRECT_ITERATION$1=promiseStaticsIncorrectIteration,$$6=(_export({target:"Promise",stat:!0,forced:promiseStaticsIncorrectIteration},{all:function(e){var i=this,t=newPromiseCapabilityModule$2.f(i),l=t.resolve,c=t.reject,r=perform$1(function(){var n=aCallable$1(i.resolve),s=[],o=0,a=1;iterate$1(e,function(e){var t=o++,r=!1;a++,call$5(n,i,e).then(function(e){r||(r=!0,s[t]=e,--a)||l(s)},c)}),--a||l(s)});return r.error&&c(r.value),t.promise}}),_export),FORCED_PROMISE_CONSTRUCTOR$2=promiseConstructorDetection.CONSTRUCTOR,NativePromiseConstructor=promiseNativeConstructor,getBuiltIn$1=getBuiltIn$7,isCallable$2=isCallable$l,defineBuiltIn$1=defineBuiltIn$6,NativePromisePrototype=NativePromiseConstructor&&NativePromiseConstructor.prototype,$$5=($$6({target:"Promise",proto:!0,forced:FORCED_PROMISE_CONSTRUCTOR$2,real:!0},{catch:function(e){return this.then(void 0,e)}}),isCallable$2(NativePromiseConstructor)&&(method=getBuiltIn$1("Promise").prototype.catch,NativePromisePrototype.catch!==method)&&defineBuiltIn$1(NativePromisePrototype,"catch",method,{unsafe:!0}),_export),call$4=functionCall,aCallable=aCallable$8,newPromiseCapabilityModule$1=newPromiseCapability$2,perform=perform$3,iterate=iterate$2,PROMISE_STATICS_INCORRECT_ITERATION=promiseStaticsIncorrectIteration,$$4=(_export({target:"Promise",stat:!0,forced:promiseStaticsIncorrectIteration},{race:function(e){var r=this,n=newPromiseCapabilityModule$1.f(r),s=n.reject,t=perform(function(){var t=aCallable(r.resolve);iterate(e,function(e){call$4(t,r,e).then(n.resolve,s)})});return t.error&&s(t.value),n.promise}}),_export),newPromiseCapabilityModule=newPromiseCapability$2,FORCED_PROMISE_CONSTRUCTOR$1=promiseConstructorDetection.CONSTRUCTOR,anObject$3=($$4({target:"Promise",stat:!0,forced:FORCED_PROMISE_CONSTRUCTOR$1},{reject:function(e){var t=newPromiseCapabilityModule.f(this);return(0,t.reject)(e),t.promise}}),anObject$c),isObject$1=isObject$c,newPromiseCapability=newPromiseCapability$2,promiseResolve$1=function(e,t){return anObject$3(e),isObject$1(t)&&t.constructor===e?t:((0,(e=newPromiseCapability.f(e)).resolve)(t),e.promise)},$$3=_export,getBuiltIn=getBuiltIn$7,FORCED_PROMISE_CONSTRUCTOR=promiseConstructorDetection.CONSTRUCTOR,promiseResolve=promiseResolve$1;function __awaiter(e,a,i,l){return new(i=i||Promise)(function(r,t){function n(e){try{o(l.next(e))}catch(e){t(e)}}function s(e){try{o(l.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?r(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(n,s)}o((l=l.apply(e,a||[])).next())})}getBuiltIn("Promise"),$$3({target:"Promise",stat:!0,forced:FORCED_PROMISE_CONSTRUCTOR},{resolve:function(e){return promiseResolve(this,e)}});const parseFilter=e=>{var t=[];return null!=e&&e.name&&t.push(`name: "${e.name}"`),null!=e&&e.orgId&&t.push(`organizationIds: ["${e.orgId}"]`),t.join(" ")};function fetchOrgUsers(r,n,s,o){return __awaiter(this,void 0,void 0,function*(){var e="fetchOrgUsers",t=parseFilter(o);return(yield baseGraphQLApiWithError(Object.assign({query:`
|
|
1
|
+
import{X as createSlice,fX as md5,Y as combineReducers,bP as AvailableComponents,j as jsxRuntime,aJ as AIWareThemeProvider,bW as AIWareCacheProvider,Z as useSelector,bX as selectIsFullscreenEnabled,r as react,V as Box,z as all,ap as mountPanel,w as useIntl,B as takeEvery$1,bG as selectIsSuperAdmin,a1 as hidePanel,C as select,a0 as selectApiConfigs,G as put,F as call$i,a4 as preferredLanguageSelector,a5 as showMessage,a6 as MessageSeverity,W as isEqual_1,K as userSelector,fY as EUserStatus,d_ as selectOrgId,a7 as AIWareFormatMessage,bQ as AvailablePanels,dZ as EPanelSize,a3 as baseGraphQLApiWithError}from"./js-core.esm.js";import{m as makeStyles,o as DynamicModuleLoader,A as AIWareIntlProvider,T as Typography,F as FormattedMessage,g as Button,d4 as AddUser,ah as Grid,D as Divider,U as Select,V as MenuItem,a$ as Tabs,b1 as Tab,Y as TabPanel,P as Popover,cv as MenuList,q as List}from"./js-core.esm4.js";import{p as organizationInvites_selector,s as selectAdminCenterOrgId,q as selectAdminCenterOrgGuid,r as actions$2,u as selectAdminCenterOrgParameter,j as selectAdminCenterOrgIdString,k as contextMenuStyles}from"./js-core.esm2.js";import{z as debounce_1,t as tableInfiniteScroll,A as Avatar,N as index,g as Tooltip,I as IconButton,p as panelComponents,K as tableSearchComponents,j as Skeleton}from"./js-core.esm5.js";import{useOrganizationPermissions,EAuthSubResourceType,EPermissionAction}from"./js-core.esm8.js";import{M as MoreVert}from"./js-core.esm62.js";import{L as ListItem,b as ListItemAvatar,a as ListItemText,e as ListItemSecondaryAction}from"./js-core.esm3.js";import{u as useDispatch}from"./js-core.esm6.js";var match,version,set$1,get,store,STATE,activeXDocument,IteratorPrototype$2,PrototypeOfArrayIteratorPrototype,arrayIterator,commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},check=function(e){return e&&e.Math===Math&&e},global$m=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof commonjsGlobal&&commonjsGlobal)||check("object"==typeof commonjsGlobal&&commonjsGlobal)||function(){return this}()||Function("return this")(),objectGetOwnPropertyDescriptor={},fails$m=function(e){try{return!!e()}catch(e){return!0}},fails$l=fails$m,descriptors=!fails$m(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}),fails$k=fails$m,functionBindNative=!fails$m(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}),NATIVE_BIND$3=functionBindNative,call$h=Function.prototype.call,functionCall=NATIVE_BIND$3?call$h.bind(call$h):function(){return call$h.apply(call$h,arguments)},objectPropertyIsEnumerable={},$propertyIsEnumerable={}.propertyIsEnumerable,getOwnPropertyDescriptor$2=Object.getOwnPropertyDescriptor,NASHORN_BUG=getOwnPropertyDescriptor$2&&!$propertyIsEnumerable.call({1:2},1),createPropertyDescriptor$3=(objectPropertyIsEnumerable.f=NASHORN_BUG?function(e){e=getOwnPropertyDescriptor$2(this,e);return!!e&&e.enumerable}:$propertyIsEnumerable,function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}),NATIVE_BIND$2=functionBindNative,FunctionPrototype$2=Function.prototype,call$g=FunctionPrototype$2.call,uncurryThisWithBind=NATIVE_BIND$2&&FunctionPrototype$2.bind.bind(call$g,call$g),functionUncurryThis=NATIVE_BIND$2?uncurryThisWithBind:function(e){return function(){return call$g.apply(e,arguments)}},uncurryThis$m=functionUncurryThis,toString$9=uncurryThis$m({}.toString),stringSlice$5=uncurryThis$m("".slice),classofRaw$2=function(e){return stringSlice$5(toString$9(e),8,-1)},uncurryThis$l=functionUncurryThis,fails$j=fails$m,classof$8=classofRaw$2,$Object$4=Object,split=functionUncurryThis("".split),indexedObject=fails$j(function(){return!$Object$4("z").propertyIsEnumerable(0)})?function(e){return"String"===classof$8(e)?split(e,""):$Object$4(e)}:$Object$4,isNullOrUndefined$5=function(e){return null==e},isNullOrUndefined$4=isNullOrUndefined$5,$TypeError$g=TypeError,requireObjectCoercible$7=function(e){if(isNullOrUndefined$4(e))throw new $TypeError$g("Can't call method on "+e);return e},IndexedObject$1=indexedObject,requireObjectCoercible$6=requireObjectCoercible$7,toIndexedObject$5=function(e){return IndexedObject$1(requireObjectCoercible$6(e))},documentAll="object"==typeof document&&document.all,isCallable$l=void 0===documentAll&&void 0!==documentAll?function(e){return"function"==typeof e||e===documentAll}:function(e){return"function"==typeof e},isCallable$k=isCallable$l,isObject$c=function(e){return"object"==typeof e?null!==e:isCallable$k(e)},global$l=global$m,isCallable$j=isCallable$l,aFunction=function(e){return isCallable$j(e)?e:void 0},getBuiltIn$7=function(e,t){return arguments.length<2?aFunction(global$l[e]):global$l[e]&&global$l[e][t]},uncurryThis$k=functionUncurryThis,objectIsPrototypeOf=functionUncurryThis({}.isPrototypeOf),engineUserAgent="undefined"!=typeof navigator&&String(navigator.userAgent)||"",global$k=global$m,userAgent$5=engineUserAgent,process$4=global$k.process,Deno$1=global$k.Deno,versions=process$4&&process$4.versions||Deno$1&&Deno$1.version,v8=versions&&versions.v8,engineV8Version=version=!(version=v8?0<(match=v8.split("."))[0]&&match[0]<4?1:+(match[0]+match[1]):version)&&userAgent$5&&(!(match=userAgent$5.match(/Edge\/(\d+)/))||74<=match[1])&&(match=userAgent$5.match(/Chrome\/(\d+)/))?+match[1]:version,V8_VERSION$1=engineV8Version,fails$i=fails$m,global$j=global$m,$String$5=global$m.String,symbolConstructorDetection=!!Object.getOwnPropertySymbols&&!fails$i(function(){var e=Symbol("symbol detection");return!$String$5(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&V8_VERSION$1&&V8_VERSION$1<41}),NATIVE_SYMBOL$1=symbolConstructorDetection,useSymbolAsUid=symbolConstructorDetection&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,getBuiltIn$6=getBuiltIn$7,isCallable$i=isCallable$l,isPrototypeOf$2=objectIsPrototypeOf,USE_SYMBOL_AS_UID$1=useSymbolAsUid,$Object$3=Object,isSymbol$2=useSymbolAsUid?function(e){return"symbol"==typeof e}:function(e){var t=getBuiltIn$6("Symbol");return isCallable$i(t)&&isPrototypeOf$2(t.prototype,$Object$3(e))},$String$4=String,tryToString$5=function(e){try{return $String$4(e)}catch(e){return"Object"}},isCallable$h=isCallable$l,tryToString$4=tryToString$5,$TypeError$f=TypeError,aCallable$9=function(e){if(isCallable$h(e))return e;throw new $TypeError$f(tryToString$4(e)+" is not a function")},aCallable$8=aCallable$9,isNullOrUndefined$3=isNullOrUndefined$5,getMethod$4=function(e,t){e=e[t];return isNullOrUndefined$3(e)?void 0:aCallable$8(e)},call$f=functionCall,isCallable$g=isCallable$l,isObject$b=isObject$c,$TypeError$e=TypeError,ordinaryToPrimitive$1=function(e,t){var r,n;if("string"===t&&isCallable$g(r=e.toString)&&!isObject$b(n=call$f(r,e)))return n;if(isCallable$g(r=e.valueOf)&&!isObject$b(n=call$f(r,e)))return n;if("string"!==t&&isCallable$g(r=e.toString)&&!isObject$b(n=call$f(r,e)))return n;throw new $TypeError$e("Can't convert object to primitive value")},sharedStore={exports:{}},global$i=global$m,defineProperty$6=Object.defineProperty,defineGlobalProperty$3=function(t,r){try{defineProperty$6(global$i,t,{value:r,configurable:!0,writable:!0})}catch(e){global$i[t]=r}return r},globalThis$1=global$m,defineGlobalProperty$2=defineGlobalProperty$3,SHARED="__core-js_shared__",store$3=sharedStore.exports=globalThis$1[SHARED]||defineGlobalProperty$2(SHARED,{}),store$2=((store$3.versions||(store$3.versions=[])).push({version:"3.37.0",mode:"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.37.0/LICENSE",source:"https://github.com/zloirock/core-js"}),sharedStore.exports),shared$4=function(e,t){return store$2[e]||(store$2[e]=t||{})},requireObjectCoercible$5=requireObjectCoercible$7,$Object$2=Object,toObject$6=function(e){return $Object$2(requireObjectCoercible$5(e))},uncurryThis$j=functionUncurryThis,toObject$5=toObject$6,hasOwnProperty=functionUncurryThis({}.hasOwnProperty),hasOwnProperty_1=Object.hasOwn||function(e,t){return hasOwnProperty(toObject$5(e),t)},uncurryThis$i=functionUncurryThis,id=0,postfix=Math.random(),toString$8=uncurryThis$i(1..toString),uid$2=function(e){return"Symbol("+(void 0===e?"":e)+")_"+toString$8(++id+postfix,36)},global$h=global$m,shared$3=shared$4,hasOwn$9=hasOwnProperty_1,uid$1=uid$2,NATIVE_SYMBOL=symbolConstructorDetection,USE_SYMBOL_AS_UID=useSymbolAsUid,Symbol$2=global$m.Symbol,WellKnownSymbolsStore=shared$3("wks"),createWellKnownSymbol=USE_SYMBOL_AS_UID?Symbol$2.for||Symbol$2:Symbol$2&&Symbol$2.withoutSetter||uid$1,wellKnownSymbol$j=function(e){return hasOwn$9(WellKnownSymbolsStore,e)||(WellKnownSymbolsStore[e]=NATIVE_SYMBOL&&hasOwn$9(Symbol$2,e)?Symbol$2[e]:createWellKnownSymbol("Symbol."+e)),WellKnownSymbolsStore[e]},call$e=functionCall,isObject$a=isObject$c,isSymbol$1=isSymbol$2,getMethod$3=getMethod$4,ordinaryToPrimitive=ordinaryToPrimitive$1,wellKnownSymbol$i=wellKnownSymbol$j,$TypeError$d=TypeError,TO_PRIMITIVE=wellKnownSymbol$j("toPrimitive"),toPrimitive$1=function(e,t){if(!isObject$a(e)||isSymbol$1(e))return e;var r=getMethod$3(e,TO_PRIMITIVE);if(r){if(r=call$e(r,e,t=void 0===t?"default":t),!isObject$a(r)||isSymbol$1(r))return r;throw new $TypeError$d("Can't convert object to primitive value")}return ordinaryToPrimitive(e,t=void 0===t?"number":t)},toPrimitive=toPrimitive$1,isSymbol=isSymbol$2,toPropertyKey$2=function(e){e=toPrimitive(e,"string");return isSymbol(e)?e:e+""},global$g=global$m,isObject$9=isObject$c,document$3=global$m.document,EXISTS$1=isObject$9(document$3)&&isObject$9(document$3.createElement),documentCreateElement$2=function(e){return EXISTS$1?document$3.createElement(e):{}},DESCRIPTORS$b=descriptors,fails$h=fails$m,createElement$1=documentCreateElement$2,ie8DomDefine=!descriptors&&!fails$m(function(){return 7!==Object.defineProperty(createElement$1("div"),"a",{get:function(){return 7}}).a}),DESCRIPTORS$a=descriptors,call$d=functionCall,propertyIsEnumerableModule$1=objectPropertyIsEnumerable,createPropertyDescriptor$2=createPropertyDescriptor$3,toIndexedObject$4=toIndexedObject$5,toPropertyKey$1=toPropertyKey$2,hasOwn$8=hasOwnProperty_1,IE8_DOM_DEFINE$1=ie8DomDefine,$getOwnPropertyDescriptor$1=Object.getOwnPropertyDescriptor,objectDefineProperty=(objectGetOwnPropertyDescriptor.f=DESCRIPTORS$a?$getOwnPropertyDescriptor$1:function(e,t){if(e=toIndexedObject$4(e),t=toPropertyKey$1(t),IE8_DOM_DEFINE$1)try{return $getOwnPropertyDescriptor$1(e,t)}catch(e){}if(hasOwn$8(e,t))return createPropertyDescriptor$2(!call$d(propertyIsEnumerableModule$1.f,e,t),e[t])},{}),DESCRIPTORS$9=descriptors,fails$g=fails$m,v8PrototypeDefineBug=descriptors&&fails$m(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),isObject$8=isObject$c,$String$3=String,$TypeError$c=TypeError,anObject$c=function(e){if(isObject$8(e))return e;throw new $TypeError$c($String$3(e)+" is not an object")},DESCRIPTORS$8=descriptors,IE8_DOM_DEFINE=ie8DomDefine,V8_PROTOTYPE_DEFINE_BUG$1=v8PrototypeDefineBug,anObject$b=anObject$c,toPropertyKey=toPropertyKey$2,$TypeError$b=TypeError,$defineProperty=Object.defineProperty,$getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,ENUMERABLE="enumerable",CONFIGURABLE$1="configurable",WRITABLE="writable",DESCRIPTORS$7=(objectDefineProperty.f=DESCRIPTORS$8?V8_PROTOTYPE_DEFINE_BUG$1?function(e,t,r){var n;return anObject$b(e),t=toPropertyKey(t),anObject$b(r),"function"==typeof e&&"prototype"===t&&"value"in r&&WRITABLE in r&&!r[WRITABLE]&&(n=$getOwnPropertyDescriptor(e,t))&&n[WRITABLE]&&(e[t]=r.value,r={configurable:(CONFIGURABLE$1 in r?r:n)[CONFIGURABLE$1],enumerable:(ENUMERABLE in r?r:n)[ENUMERABLE],writable:!1}),$defineProperty(e,t,r)}:$defineProperty:function(e,t,r){if(anObject$b(e),t=toPropertyKey(t),anObject$b(r),IE8_DOM_DEFINE)try{return $defineProperty(e,t,r)}catch(e){}if("get"in r||"set"in r)throw new $TypeError$b("Accessors not supported");return"value"in r&&(e[t]=r.value),e},descriptors),definePropertyModule$3=objectDefineProperty,createPropertyDescriptor$1=createPropertyDescriptor$3,createNonEnumerableProperty$5=DESCRIPTORS$7?function(e,t,r){return definePropertyModule$3.f(e,t,createPropertyDescriptor$1(1,r))}:function(e,t,r){return e[t]=r,e},makeBuiltIn$3={exports:{}},DESCRIPTORS$6=descriptors,hasOwn$7=hasOwnProperty_1,FunctionPrototype$1=Function.prototype,getDescriptor=DESCRIPTORS$6&&Object.getOwnPropertyDescriptor,EXISTS=hasOwn$7(FunctionPrototype$1,"name"),PROPER=EXISTS&&"something"===function(){}.name,CONFIGURABLE=EXISTS&&(!DESCRIPTORS$6||getDescriptor(FunctionPrototype$1,"name").configurable),functionName={EXISTS:EXISTS,PROPER:PROPER,CONFIGURABLE:CONFIGURABLE},uncurryThis$h=functionUncurryThis,isCallable$f=isCallable$l,store$1=sharedStore.exports,functionToString=uncurryThis$h(Function.toString),inspectSource$3=(isCallable$f(store$1.inspectSource)||(store$1.inspectSource=function(e){return functionToString(e)}),store$1.inspectSource),global$f=global$m,isCallable$e=isCallable$l,WeakMap$1=global$m.WeakMap,weakMapBasicDetection=isCallable$e(WeakMap$1)&&/native code/.test(String(WeakMap$1)),shared$2=shared$4,uid=uid$2,keys=shared$4("keys"),sharedKey$3=function(e){return keys[e]||(keys[e]=uid(e))},hiddenKeys$4={},NATIVE_WEAK_MAP=weakMapBasicDetection,global$e=global$m,isObject$7=isObject$c,createNonEnumerableProperty$4=createNonEnumerableProperty$5,hasOwn$6=hasOwnProperty_1,shared$1=sharedStore.exports,sharedKey$2=sharedKey$3,hiddenKeys$3=hiddenKeys$4,OBJECT_ALREADY_INITIALIZED="Object already initialized",TypeError$2=global$e.TypeError,WeakMap=global$e.WeakMap,enforce=function(e){return has(e)?get(e):set$1(e,{})},getterFor=function(t){return function(e){if(isObject$7(e)&&(e=get(e)).type===t)return e;throw new TypeError$2("Incompatible receiver, "+t+" required")}},has=NATIVE_WEAK_MAP||shared$1.state?((store=shared$1.state||(shared$1.state=new WeakMap)).get=store.get,store.has=store.has,store.set=store.set,set$1=function(e,t){if(store.has(e))throw new TypeError$2(OBJECT_ALREADY_INITIALIZED);return t.facade=e,store.set(e,t),t},get=function(e){return store.get(e)||{}},function(e){return store.has(e)}):(STATE=sharedKey$2("state"),hiddenKeys$3[STATE]=!0,set$1=function(e,t){if(hasOwn$6(e,STATE))throw new TypeError$2(OBJECT_ALREADY_INITIALIZED);return t.facade=e,createNonEnumerableProperty$4(e,STATE,t),t},get=function(e){return hasOwn$6(e,STATE)?e[STATE]:{}},function(e){return hasOwn$6(e,STATE)}),internalState={set:set$1,get:get,has:has,enforce:enforce,getterFor:getterFor},uncurryThis$g=functionUncurryThis,fails$f=fails$m,isCallable$d=isCallable$l,hasOwn$5=hasOwnProperty_1,DESCRIPTORS$5=descriptors,CONFIGURABLE_FUNCTION_NAME$1=functionName.CONFIGURABLE,inspectSource$2=inspectSource$3,InternalStateModule$2=internalState,enforceInternalState=InternalStateModule$2.enforce,getInternalState$2=InternalStateModule$2.get,$String$2=String,defineProperty$5=Object.defineProperty,stringSlice$4=uncurryThis$g("".slice),replace$3=uncurryThis$g("".replace),join=uncurryThis$g([].join),CONFIGURABLE_LENGTH=DESCRIPTORS$5&&!fails$f(function(){return 8!==defineProperty$5(function(){},"length",{value:8}).length}),TEMPLATE=String(String).split("String"),makeBuiltIn$2=makeBuiltIn$3.exports=function(e,t,r){"Symbol("===stringSlice$4($String$2(t),0,7)&&(t="["+replace$3($String$2(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!hasOwn$5(e,"name")||CONFIGURABLE_FUNCTION_NAME$1&&e.name!==t)&&(DESCRIPTORS$5?defineProperty$5(e,"name",{value:t,configurable:!0}):e.name=t),CONFIGURABLE_LENGTH&&r&&hasOwn$5(r,"arity")&&e.length!==r.arity&&defineProperty$5(e,"length",{value:r.arity});try{r&&hasOwn$5(r,"constructor")&&r.constructor?DESCRIPTORS$5&&defineProperty$5(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}r=enforceInternalState(e);return hasOwn$5(r,"source")||(r.source=join(TEMPLATE,"string"==typeof t?t:"")),e},isCallable$c=(Function.prototype.toString=makeBuiltIn$2(function(){return isCallable$d(this)&&getInternalState$2(this).source||inspectSource$2(this)},"toString"),isCallable$l),definePropertyModule$2=objectDefineProperty,makeBuiltIn$1=makeBuiltIn$3.exports,defineGlobalProperty$1=defineGlobalProperty$3,defineBuiltIn$6=function(e,t,r,n){var s=(n=n||{}).enumerable,o=void 0!==n.name?n.name:t;if(isCallable$c(r)&&makeBuiltIn$1(r,o,n),n.global)s?e[t]=r:defineGlobalProperty$1(t,r);else{try{n.unsafe?e[t]&&(s=!0):delete e[t]}catch(e){}s?e[t]=r:definePropertyModule$2.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},objectGetOwnPropertyNames={},ceil=Math.ceil,floor$2=Math.floor,mathTrunc=Math.trunc||function(e){e=+e;return(0<e?floor$2:ceil)(e)},trunc=mathTrunc,toIntegerOrInfinity$5=function(e){e=+e;return e!=e||0==e?0:trunc(e)},toIntegerOrInfinity$4=toIntegerOrInfinity$5,max$1=Math.max,min$2=Math.min,toAbsoluteIndex$1=function(e,t){e=toIntegerOrInfinity$4(e);return e<0?max$1(e+t,0):min$2(e,t)},toIntegerOrInfinity$3=toIntegerOrInfinity$5,min$1=Math.min,toLength$2=function(e){e=toIntegerOrInfinity$3(e);return 0<e?min$1(e,9007199254740991):0},toLength$1=toLength$2,lengthOfArrayLike$5=function(e){return toLength$1(e.length)},toIndexedObject$3=toIndexedObject$5,toAbsoluteIndex=toAbsoluteIndex$1,lengthOfArrayLike$4=lengthOfArrayLike$5,createMethod$2=function(i){return function(e,t,r){var n=toIndexedObject$3(e),s=lengthOfArrayLike$4(n);if(0!==s){var o,a=toAbsoluteIndex(r,s);if(i&&t!=t){for(;a<s;)if((o=n[a++])!=o)return!0}else for(;a<s;a++)if((i||a in n)&&n[a]===t)return i||a||0}return!i&&-1}},arrayIncludes={includes:createMethod$2(!0),indexOf:createMethod$2(!1)},uncurryThis$f=functionUncurryThis,hasOwn$4=hasOwnProperty_1,toIndexedObject$2=toIndexedObject$5,indexOf$1=arrayIncludes.indexOf,hiddenKeys$2=hiddenKeys$4,push$2=uncurryThis$f([].push),objectKeysInternal=function(e,t){var r,n=toIndexedObject$2(e),s=0,o=[];for(r in n)!hasOwn$4(hiddenKeys$2,r)&&hasOwn$4(n,r)&&push$2(o,r);for(;t.length>s;)!hasOwn$4(n,r=t[s++])||~indexOf$1(o,r)||push$2(o,r);return o},enumBugKeys$3=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],internalObjectKeys$1=objectKeysInternal,enumBugKeys$2=enumBugKeys$3,hiddenKeys$1=enumBugKeys$3.concat("length","prototype"),objectGetOwnPropertySymbols=(objectGetOwnPropertyNames.f=Object.getOwnPropertyNames||function(e){return internalObjectKeys$1(e,hiddenKeys$1)},{}),getBuiltIn$5=(objectGetOwnPropertySymbols.f=Object.getOwnPropertySymbols,getBuiltIn$7),uncurryThis$e=functionUncurryThis,getOwnPropertyNamesModule=objectGetOwnPropertyNames,getOwnPropertySymbolsModule$1=objectGetOwnPropertySymbols,anObject$a=anObject$c,concat$2=functionUncurryThis([].concat),ownKeys$1=getBuiltIn$5("Reflect","ownKeys")||function(e){var t=getOwnPropertyNamesModule.f(anObject$a(e)),r=getOwnPropertySymbolsModule$1.f;return r?concat$2(t,r(e)):t},hasOwn$3=hasOwnProperty_1,ownKeys=ownKeys$1,getOwnPropertyDescriptorModule=objectGetOwnPropertyDescriptor,definePropertyModule$1=objectDefineProperty,copyConstructorProperties$1=function(e,t,r){for(var n=ownKeys(t),s=definePropertyModule$1.f,o=getOwnPropertyDescriptorModule.f,a=0;a<n.length;a++){var i=n[a];hasOwn$3(e,i)||r&&hasOwn$3(r,i)||s(e,i,o(t,i))}},fails$e=fails$m,isCallable$b=isCallable$l,replacement=/#|\.prototype\./,isForced$2=function(e,t){e=data[normalize(e)];return e===POLYFILL||e!==NATIVE&&(isCallable$b(t)?fails$e(t):!!t)},normalize=isForced$2.normalize=function(e){return String(e).replace(replacement,".").toLowerCase()},data=isForced$2.data={},NATIVE=isForced$2.NATIVE="N",POLYFILL=isForced$2.POLYFILL="P",isForced_1=isForced$2,global$d=global$m,getOwnPropertyDescriptor$1=objectGetOwnPropertyDescriptor.f,createNonEnumerableProperty$3=createNonEnumerableProperty$5,defineBuiltIn$5=defineBuiltIn$6,defineGlobalProperty=defineGlobalProperty$3,copyConstructorProperties=copyConstructorProperties$1,isForced$1=isForced_1,_export=function(e,t){var r,n,s,o=e.target,a=e.global,i=e.stat,l=a?global$d:i?global$d[o]||defineGlobalProperty(o,{}):global$d[o]&&global$d[o].prototype;if(l)for(r in t){if(n=t[r],s=e.dontCallGetSet?(s=getOwnPropertyDescriptor$1(l,r))&&s.value:l[r],!isForced$1(a?r:o+(i?".":"#")+r,e.forced)&&void 0!==s){if(typeof n==typeof s)continue;copyConstructorProperties(n,s)}(e.sham||s&&s.sham)&&createNonEnumerableProperty$3(n,"sham",!0),defineBuiltIn$5(l,r,n,e)}},internalObjectKeys=objectKeysInternal,enumBugKeys$1=enumBugKeys$3,objectKeys$2=Object.keys||function(e){return internalObjectKeys(e,enumBugKeys$1)},DESCRIPTORS$4=descriptors,uncurryThis$d=functionUncurryThis,call$c=functionCall,fails$d=fails$m,objectKeys$1=objectKeys$2,getOwnPropertySymbolsModule=objectGetOwnPropertySymbols,propertyIsEnumerableModule=objectPropertyIsEnumerable,toObject$4=toObject$6,IndexedObject=indexedObject,$assign=Object.assign,defineProperty$4=Object.defineProperty,concat$1=uncurryThis$d([].concat),objectAssign=!$assign||fails$d(function(){var e,t,r,n;return!(!DESCRIPTORS$4||1===$assign({b:1},$assign(defineProperty$4({},"a",{enumerable:!0,get:function(){defineProperty$4(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)||(t={},n="abcdefghijklmnopqrst",(e={})[r=Symbol("assign detection")]=7,n.split("").forEach(function(e){t[e]=e}),7!==$assign({},e)[r])||objectKeys$1($assign({},t)).join("")!==n})?function(e,t){for(var r=toObject$4(e),n=arguments.length,s=1,o=getOwnPropertySymbolsModule.f,a=propertyIsEnumerableModule.f;s<n;)for(var i,l=IndexedObject(arguments[s++]),c=o?concat$1(objectKeys$1(l),o(l)):objectKeys$1(l),u=c.length,d=0;d<u;)i=c[d++],DESCRIPTORS$4&&!call$c(a,l,i)||(r[i]=l[i]);return r}:$assign,$$d=_export,assign=objectAssign,objectDefineProperties=(_export({target:"Object",stat:!0,arity:2,forced:Object.assign!==assign},{assign:assign}),{}),DESCRIPTORS$3=descriptors,V8_PROTOTYPE_DEFINE_BUG=v8PrototypeDefineBug,definePropertyModule=objectDefineProperty,anObject$9=anObject$c,toIndexedObject$1=toIndexedObject$5,objectKeys=objectKeys$2,getBuiltIn$4=(objectDefineProperties.f=DESCRIPTORS$3&&!V8_PROTOTYPE_DEFINE_BUG?Object.defineProperties:function(e,t){anObject$9(e);for(var r,n=toIndexedObject$1(t),s=objectKeys(t),o=s.length,a=0;a<o;)definePropertyModule.f(e,r=s[a++],n[r]);return e},getBuiltIn$7),html$2=getBuiltIn$7("document","documentElement"),anObject$8=anObject$c,definePropertiesModule=objectDefineProperties,enumBugKeys=enumBugKeys$3,hiddenKeys=hiddenKeys$4,html$1=html$2,documentCreateElement$1=documentCreateElement$2,sharedKey$1=sharedKey$3,GT=">",LT="<",PROTOTYPE="prototype",SCRIPT="script",IE_PROTO$1=sharedKey$3("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(e){return LT+SCRIPT+GT+e+LT+"/"+SCRIPT+GT},NullProtoObjectViaActiveX=function(e){e.write(scriptTag("")),e.close();var t=e.parentWindow.Object;return e=null,t},NullProtoObjectViaIFrame=function(){var e=documentCreateElement$1("iframe"),t="java"+SCRIPT+":";return e.style.display="none",html$1.appendChild(e),e.src=String(t),(t=e.contentWindow.document).open(),t.write(scriptTag("document.F=Object")),t.close(),t.F},NullProtoObject=function(){try{activeXDocument=new ActiveXObject("htmlfile")}catch(e){}NullProtoObject="undefined"==typeof document||document.domain&&activeXDocument?NullProtoObjectViaActiveX(activeXDocument):NullProtoObjectViaIFrame();for(var e=enumBugKeys.length;e--;)delete NullProtoObject[PROTOTYPE][enumBugKeys[e]];return NullProtoObject()},objectCreate=(hiddenKeys[IE_PROTO$1]=!0,Object.create||function(e,t){var r;return null!==e?(EmptyConstructor[PROTOTYPE]=anObject$8(e),r=new EmptyConstructor,EmptyConstructor[PROTOTYPE]=null,r[IE_PROTO$1]=e):r=NullProtoObject(),void 0===t?r:definePropertiesModule.f(r,t)}),wellKnownSymbol$h=wellKnownSymbol$j,create$2=objectCreate,defineProperty$3=objectDefineProperty.f,UNSCOPABLES=wellKnownSymbol$h("unscopables"),ArrayPrototype$1=Array.prototype,addToUnscopables$3=(void 0===ArrayPrototype$1[UNSCOPABLES]&&defineProperty$3(ArrayPrototype$1,UNSCOPABLES,{configurable:!0,value:create$2(null)}),function(e){ArrayPrototype$1[UNSCOPABLES][e]=!0}),iterators={},fails$c=fails$m,correctPrototypeGetter=!fails$m(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),hasOwn$2=hasOwnProperty_1,isCallable$a=isCallable$l,toObject$3=toObject$6,sharedKey=sharedKey$3,CORRECT_PROTOTYPE_GETTER=correctPrototypeGetter,IE_PROTO=sharedKey$3("IE_PROTO"),$Object$1=Object,ObjectPrototype=$Object$1.prototype,objectGetPrototypeOf=CORRECT_PROTOTYPE_GETTER?$Object$1.getPrototypeOf:function(e){var t,e=toObject$3(e);return hasOwn$2(e,IE_PROTO)?e[IE_PROTO]:(t=e.constructor,isCallable$a(t)&&e instanceof t?t.prototype:e instanceof $Object$1?ObjectPrototype:null)},fails$b=fails$m,isCallable$9=isCallable$l,isObject$6=isObject$c,getPrototypeOf$1=objectGetPrototypeOf,defineBuiltIn$4=defineBuiltIn$6,wellKnownSymbol$g=wellKnownSymbol$j,ITERATOR$6=wellKnownSymbol$j("iterator"),BUGGY_SAFARI_ITERATORS$1=!1,NEW_ITERATOR_PROTOTYPE=([].keys&&("next"in(arrayIterator=[].keys())?(PrototypeOfArrayIteratorPrototype=getPrototypeOf$1(getPrototypeOf$1(arrayIterator)))!==Object.prototype&&(IteratorPrototype$2=PrototypeOfArrayIteratorPrototype):BUGGY_SAFARI_ITERATORS$1=!0),!isObject$6(IteratorPrototype$2)||fails$b(function(){var e={};return IteratorPrototype$2[ITERATOR$6].call(e)!==e})),iteratorsCore=(isCallable$9((IteratorPrototype$2=NEW_ITERATOR_PROTOTYPE?{}:IteratorPrototype$2)[ITERATOR$6])||defineBuiltIn$4(IteratorPrototype$2,ITERATOR$6,function(){return this}),{IteratorPrototype:IteratorPrototype$2,BUGGY_SAFARI_ITERATORS:BUGGY_SAFARI_ITERATORS$1}),defineProperty$2=objectDefineProperty.f,hasOwn$1=hasOwnProperty_1,wellKnownSymbol$f=wellKnownSymbol$j,TO_STRING_TAG$2=wellKnownSymbol$j("toStringTag"),setToStringTag$4=function(e,t,r){(e=e&&!r?e.prototype:e)&&!hasOwn$1(e,TO_STRING_TAG$2)&&defineProperty$2(e,TO_STRING_TAG$2,{configurable:!0,value:t})},IteratorPrototype$1=iteratorsCore.IteratorPrototype,create$1=objectCreate,createPropertyDescriptor=createPropertyDescriptor$3,setToStringTag$3=setToStringTag$4,Iterators$4=iterators,returnThis$1=function(){return this},iteratorCreateConstructor=function(e,t,r,n){t+=" Iterator";return e.prototype=create$1(IteratorPrototype$1,{next:createPropertyDescriptor(+!n,r)}),setToStringTag$3(e,t,!1),Iterators$4[t]=returnThis$1,e},uncurryThis$c=functionUncurryThis,aCallable$7=aCallable$9,functionUncurryThisAccessor=function(e,t,r){try{return uncurryThis$c(aCallable$7(Object.getOwnPropertyDescriptor(e,t)[r]))}catch(e){}},isObject$5=isObject$c,isPossiblePrototype$1=function(e){return isObject$5(e)||null===e},isPossiblePrototype=isPossiblePrototype$1,$String$1=String,$TypeError$a=TypeError,aPossiblePrototype$1=function(e){if(isPossiblePrototype(e))return e;throw new $TypeError$a("Can't set "+$String$1(e)+" as a prototype")},uncurryThisAccessor=functionUncurryThisAccessor,isObject$4=isObject$c,requireObjectCoercible$4=requireObjectCoercible$7,aPossiblePrototype=aPossiblePrototype$1,objectSetPrototypeOf=Object.setPrototypeOf||("__proto__"in{}?function(){var r,n=!1,e={};try{(r=uncurryThisAccessor(Object.prototype,"__proto__","set"))(e,[]),n=e instanceof Array}catch(e){}return function(e,t){return requireObjectCoercible$4(e),aPossiblePrototype(t),isObject$4(e)&&(n?r(e,t):e.__proto__=t),e}}():void 0),$$c=_export,call$b=functionCall,FunctionName=functionName,isCallable$8=isCallable$l,createIteratorConstructor=iteratorCreateConstructor,getPrototypeOf=objectGetPrototypeOf,setPrototypeOf$1=objectSetPrototypeOf,setToStringTag$2=setToStringTag$4,createNonEnumerableProperty$2=createNonEnumerableProperty$5,defineBuiltIn$3=defineBuiltIn$6,wellKnownSymbol$e=wellKnownSymbol$j,Iterators$3=iterators,IteratorsCore=iteratorsCore,PROPER_FUNCTION_NAME=FunctionName.PROPER,CONFIGURABLE_FUNCTION_NAME=FunctionName.CONFIGURABLE,IteratorPrototype=IteratorsCore.IteratorPrototype,BUGGY_SAFARI_ITERATORS=IteratorsCore.BUGGY_SAFARI_ITERATORS,ITERATOR$5=wellKnownSymbol$e("iterator"),KEYS="keys",VALUES="values",ENTRIES="entries",returnThis=function(){return this},iteratorDefine=function(e,t,r,n,s,o,a){createIteratorConstructor(r,t,n);function i(e){if(e===s&&$)return $;if(!BUGGY_SAFARI_ITERATORS&&e&&e in d)return d[e];switch(e){case KEYS:case VALUES:case ENTRIES:return function(){return new r(this,e)}}return function(){return new r(this)}}var l,c,n=t+" Iterator",u=!1,d=e.prototype,p=d[ITERATOR$5]||d["@@iterator"]||s&&d[s],$=!BUGGY_SAFARI_ITERATORS&&p||i(s),g="Array"===t&&d.entries||p;if(g&&(g=getPrototypeOf(g.call(new e)))!==Object.prototype&&g.next&&(getPrototypeOf(g)!==IteratorPrototype&&(setPrototypeOf$1?setPrototypeOf$1(g,IteratorPrototype):isCallable$8(g[ITERATOR$5])||defineBuiltIn$3(g,ITERATOR$5,returnThis)),setToStringTag$2(g,n,!0)),PROPER_FUNCTION_NAME&&s===VALUES&&p&&p.name!==VALUES&&(CONFIGURABLE_FUNCTION_NAME?createNonEnumerableProperty$2(d,"name",VALUES):(u=!0,$=function(){return call$b(p,this)})),s)if(l={values:i(VALUES),keys:o?$:i(KEYS),entries:i(ENTRIES)},a)for(c in l)!BUGGY_SAFARI_ITERATORS&&!u&&c in d||defineBuiltIn$3(d,c,l[c]);else $$c({target:t,proto:!0,forced:BUGGY_SAFARI_ITERATORS||u},l);return d[ITERATOR$5]!==$&&defineBuiltIn$3(d,ITERATOR$5,$,{name:s}),Iterators$3[t]=$,l},createIterResultObject$1=function(e,t){return{value:e,done:t}},toIndexedObject=toIndexedObject$5,addToUnscopables$2=addToUnscopables$3,Iterators$2=iterators,InternalStateModule$1=internalState,defineProperty$1=objectDefineProperty.f,defineIterator=iteratorDefine,createIterResultObject=createIterResultObject$1,DESCRIPTORS$2=descriptors,ARRAY_ITERATOR="Array Iterator",setInternalState$1=InternalStateModule$1.set,getInternalState$1=InternalStateModule$1.getterFor(ARRAY_ITERATOR),es_array_iterator=defineIterator(Array,"Array",function(e,t){setInternalState$1(this,{type:ARRAY_ITERATOR,target:toIndexedObject(e),index:0,kind:t})},function(){var e=getInternalState$1(this),t=e.target,r=e.index++;if(!t||r>=t.length)return e.target=void 0,createIterResultObject(void 0,!0);switch(e.kind){case"keys":return createIterResultObject(r,!1);case"values":return createIterResultObject(t[r],!1)}return createIterResultObject([r,t[r]],!1)},"values"),values=Iterators$2.Arguments=Iterators$2.Array;if(addToUnscopables$2("keys"),addToUnscopables$2("values"),addToUnscopables$2("entries"),DESCRIPTORS$2&&"values"!==values.name)try{defineProperty$1(values,"name",{value:"values"})}catch(e){}var COLLECTION_NAME,domIterables={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},documentCreateElement=documentCreateElement$2,classList=documentCreateElement$2("span").classList,DOMTokenListPrototype$1=classList&&classList.constructor&&classList.constructor.prototype,domTokenListPrototype=DOMTokenListPrototype$1===Object.prototype?void 0:DOMTokenListPrototype$1,global$c=global$m,DOMIterables=domIterables,DOMTokenListPrototype=domTokenListPrototype,ArrayIteratorMethods=es_array_iterator,createNonEnumerableProperty$1=createNonEnumerableProperty$5,setToStringTag$1=setToStringTag$4,wellKnownSymbol$d=wellKnownSymbol$j,ITERATOR$4=wellKnownSymbol$j("iterator"),ArrayValues=ArrayIteratorMethods.values,handlePrototype=function(t,e){if(t){if(t[ITERATOR$4]!==ArrayValues)try{createNonEnumerableProperty$1(t,ITERATOR$4,ArrayValues)}catch(e){t[ITERATOR$4]=ArrayValues}if(setToStringTag$1(t,e,!0),DOMIterables[e])for(var r in ArrayIteratorMethods)if(t[r]!==ArrayIteratorMethods[r])try{createNonEnumerableProperty$1(t,r,ArrayIteratorMethods[r])}catch(e){t[r]=ArrayIteratorMethods[r]}}};for(COLLECTION_NAME in DOMIterables)handlePrototype(global$c[COLLECTION_NAME]&&global$c[COLLECTION_NAME].prototype,COLLECTION_NAME);handlePrototype(DOMTokenListPrototype,"DOMTokenList");const useStyles$3=makeStyles()(()=>({badge:{fontSize:"9px",lineHeight:"18px",borderRadius:"30px",height:"18px",width:"fit-content",padding:"0px 10px",fontWeight:800},active:{background:"rgba(209, 223, 210, 1)",color:"rgba(56, 142, 60, 1)"},suspended:{background:"rgba(254, 238, 211, 1)",color:"rgba(245, 124, 0, 1)"},deactivated:{background:"rgba(241, 210, 210, 1)",color:"rgba(183, 28, 28, 1)"},deleted:{background:"rgba(233, 233, 233, 1)",color:"rgba(33, 33, 33, 1)"}})),UserStatusBadge=({status:e})=>{var t=useStyles$3()["classes"];return jsxRuntime.exports.jsx(Box,Object.assign({className:t.badge+" "+t[e],"data-testid":"admin-center.users.user-status-badge","data-test":"admin-center.users.user-status-badge"},{children:e.toUpperCase()}))},SLICE_NAME="adminCenterUsers",PAGE_LIMIT=30;var wellKnownSymbol$c=wellKnownSymbol$j,TO_STRING_TAG$1=wellKnownSymbol$j("toStringTag"),test$1={},toStringTagSupport=(test$1[TO_STRING_TAG$1]="z","[object z]"===String(test$1)),TO_STRING_TAG_SUPPORT=toStringTagSupport,isCallable$7=isCallable$l,classofRaw$1=classofRaw$2,wellKnownSymbol$b=wellKnownSymbol$j,TO_STRING_TAG=wellKnownSymbol$j("toStringTag"),$Object=Object,CORRECT_ARGUMENTS="Arguments"===classofRaw$1(function(){return arguments}()),tryGet=function(e,t){try{return e[t]}catch(e){}},classof$7=TO_STRING_TAG_SUPPORT?classofRaw$1:function(e){var t;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(t=tryGet(e=$Object(e),TO_STRING_TAG))?t:CORRECT_ARGUMENTS?classofRaw$1(e):"Object"===(t=classofRaw$1(e))&&isCallable$7(e.callee)?"Arguments":t},classof$6=classof$7,$String=String,toString$7=function(e){if("Symbol"===classof$6(e))throw new TypeError("Cannot convert a Symbol value to a string");return $String(e)},whitespaces$2="\t\n\v\f\r \u2028\u2029\ufeff",uncurryThis$b=functionUncurryThis,requireObjectCoercible$3=requireObjectCoercible$7,toString$6=toString$7,whitespaces$1=whitespaces$2,replace$2=functionUncurryThis("".replace),ltrim=RegExp("^["+whitespaces$1+"]+"),rtrim=RegExp("(^|[^"+whitespaces$1+"])["+whitespaces$1+"]+$"),createMethod$1=function(t){return function(e){e=toString$6(requireObjectCoercible$3(e));return 1&t&&(e=replace$2(e,ltrim,"")),e=2&t?replace$2(e,rtrim,"$1"):e}},stringTrim={start:createMethod$1(1),end:createMethod$1(2),trim:createMethod$1(3)},global$b=global$m,fails$a=fails$m,uncurryThis$a=functionUncurryThis,toString$5=toString$7,trim=stringTrim.trim,whitespaces=whitespaces$2,$parseInt$1=global$b.parseInt,Symbol$1=global$b.Symbol,ITERATOR$3=Symbol$1&&Symbol$1.iterator,hex=/^[+-]?0x/i,exec$2=uncurryThis$a(hex.exec),FORCED$1=8!==$parseInt$1(whitespaces+"08")||22!==$parseInt$1(whitespaces+"0x16")||ITERATOR$3&&!fails$a(function(){$parseInt$1(Object(ITERATOR$3))}),numberParseInt=FORCED$1?function(e,t){e=trim(toString$5(e));return $parseInt$1(e,t>>>0||(exec$2(hex,e)?16:10))}:$parseInt$1,$$b=_export,$parseInt=numberParseInt;_export({global:!0,forced:parseInt!==numberParseInt},{parseInt:numberParseInt});const namespace$1="adminCenterUsers",avatarColors=["#f94144ff","#f3722cff","#f8961eff","#f9844aff","#f9c74fff","#90be6dff","#43aa8bff","#4d908eff","#577590ff","#277da1ff"];let prevIndex=0;const initialState$1={status:"idle",users:[],offset:0,hasMore:!0,userDetailPanel:{userId:null,userData:null,loadingStatus:"idle"},userOrgs:[],userRoles:[],searchTerm:"",isSearching:!1},adminCenterSlice=createSlice({name:SLICE_NAME+"/"+namespace$1,initialState:initialState$1,reducers:{fetchOrgUsersStart(e){e.status="loading"},fetchOrgUsersSuccess(e,t){e.status="success",e.isSearching=!1;var r=[];for(const o of t.payload.records){var n=md5((o.id||"")+(o.email||"")+o.lastLoginDateTime+(o.firstName||""));let e=parseInt(n,16)%avatarColors.length;e===prevIndex&&(e+1>avatarColors.length-1?--e:e+=1),prevIndex=e,r.push(Object.assign(Object.assign({},o),{avatarColor:avatarColors[e]}))}var s=[...e.users,...r],s=[...new Map(s.map(e=>[e.id,e])).values()];e.users=s,e.hasMore=t.payload.hasMore,e.offset=t.payload.nextOffset},fetchOrgUsersFailure(e){e.status="failure",e.isSearching=!1},removeUserFromOrgStart(e,t){e.status="loading"},removeUserFromOrgSuccess(e,t){e.status="success",e.users=[...e.users].filter(e=>e.id!==t.payload),e.offset=e.offset-1},removeUserFromOrgFailure(e){e.status="failure"},updateUserStatusStart(e,t){e.status="loading"},updateUserStatusSuccess(e,t){e.status="success";var r,n=e.users.findIndex(e=>e.id===t.payload.id);-1!==n&&((r=[...e.users])[n]=Object.assign(Object.assign({},r[n]),{status:t.payload.status}),e.users=r)},updateUserStatusFailure(e){e.status="failure"},fetchUserStart(e,t){e.userDetailPanel.userId=t.payload.userId,e.userDetailPanel.loadingStatus="loading"},fetchUserSuccess(e,t){const r=t.payload["user"];let n=avatarColors[5];var s=e.users.find(e=>e.id===r.id);s&&s.avatarColor&&(n=s.avatarColor),e.userDetailPanel.userData=Object.assign(Object.assign({},t.payload.user),{avatarColor:n}),e.userDetailPanel.loadingStatus="success"},fetchUserFailure(e){e.userDetailPanel.loadingStatus="failure"},fetchUserOrganizationsStart(e,t){e.status="loading"},fetchUserOrganizationsSuccess(e,t){e.userOrgs=t.payload.orgs,e.status="success"},fetchUserOrganizationsFailure(e){e.status="failure"},getUserApplicationRolesStart(e,t){e.userDetailPanel.loadingStatus="loading"},getUserApplicationRolesSuccess(e,t){e.userDetailPanel.loadingStatus="success",e.userRoles=t.payload.roles},getUserApplicationRolesFailure(e){e.userDetailPanel.loadingStatus="failure"},resetUserRoles:e=>{e.userRoles=initialState$1.userRoles},setSearchTerm(e,t){e.searchTerm=t.payload,e.users=[],e.status="loading"},setIsSearching(e,t){e.isSearching=t.payload}}}),actions$1=adminCenterSlice.actions;var adminCenterUsers_state=adminCenterSlice.reducer;const namespace=SLICE_NAME,initialState={[namespace$1]:initialState$1},actions={[namespace$1]:actions$1},rootReducer=combineReducers({[namespace$1]:adminCenterUsers_state});var $location,defer,channel,port,toggle,node,promise,then,queue,flush,notify$1,Internal,OwnPromiseCapability,PromiseWrapper,nativeThen,classof$5=classofRaw$2,isArray$2=Array.isArray||function(e){return"Array"===classof$5(e)},$TypeError$9=TypeError,MAX_SAFE_INTEGER=9007199254740991,doesNotExceedSafeInteger$1=function(e){if(MAX_SAFE_INTEGER<e)throw $TypeError$9("Maximum allowed index exceeded");return e},classofRaw=classofRaw$2,uncurryThis$9=functionUncurryThis,functionUncurryThisClause=function(e){if("Function"===classofRaw(e))return uncurryThis$9(e)},uncurryThis$8=functionUncurryThisClause,aCallable$6=aCallable$9,NATIVE_BIND$1=functionBindNative,bind$5=functionUncurryThisClause(functionUncurryThisClause.bind),functionBindContext=function(e,t){return aCallable$6(e),void 0===t?e:NATIVE_BIND$1?bind$5(e,t):function(){return e.apply(t,arguments)}},isArray$1=isArray$2,lengthOfArrayLike$3=lengthOfArrayLike$5,doesNotExceedSafeInteger=doesNotExceedSafeInteger$1,bind$4=functionBindContext,flattenIntoArray$1=function(e,t,r,n,s,o,a,i){for(var l,c,u=s,d=0,p=!!a&&bind$4(a,i);d<n;)d in r&&(l=p?p(r[d],d,t):r[d],0<o&&isArray$1(l)?(c=lengthOfArrayLike$3(l),u=flattenIntoArray$1(e,t,l,c,u,o-1)-1):(doesNotExceedSafeInteger(u+1),e[u]=l),u++),d++;return u},flattenIntoArray_1=flattenIntoArray$1,uncurryThis$7=functionUncurryThis,fails$9=fails$m,isCallable$6=isCallable$l,classof$4=classof$7,getBuiltIn$3=getBuiltIn$7,inspectSource$1=inspectSource$3,noop=function(){},construct=getBuiltIn$7("Reflect","construct"),constructorRegExp=/^\s*(?:class|function)\b/,exec$1=uncurryThis$7(constructorRegExp.exec),INCORRECT_TO_STRING=!constructorRegExp.test(noop),isConstructorModern=function(e){if(!isCallable$6(e))return!1;try{return construct(noop,[],e),!0}catch(e){return!1}},isConstructorLegacy=function(e){if(!isCallable$6(e))return!1;switch(classof$4(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return INCORRECT_TO_STRING||!!exec$1(constructorRegExp,inspectSource$1(e))}catch(e){return!0}},isConstructor$2=(isConstructorLegacy.sham=!0,!construct||fails$9(function(){var e;return isConstructorModern(isConstructorModern.call)||!isConstructorModern(Object)||!isConstructorModern(function(){e=!0})||e})?isConstructorLegacy:isConstructorModern),isArray=isArray$2,isConstructor$1=isConstructor$2,isObject$3=isObject$c,wellKnownSymbol$a=wellKnownSymbol$j,SPECIES$4=wellKnownSymbol$j("species"),$Array=Array,arraySpeciesConstructor$1=function(e){var t;return void 0===(t=isArray(e)&&(t=e.constructor,isConstructor$1(t)&&(t===$Array||isArray(t.prototype))||isObject$3(t)&&null===(t=t[SPECIES$4]))?void 0:t)?$Array:t},arraySpeciesConstructor=arraySpeciesConstructor$1,arraySpeciesCreate$1=function(e,t){return new(arraySpeciesConstructor(e))(0===t?0:t)},$$a=_export,flattenIntoArray=flattenIntoArray_1,toObject$2=toObject$6,lengthOfArrayLike$2=lengthOfArrayLike$5,toIntegerOrInfinity$2=toIntegerOrInfinity$5,arraySpeciesCreate=arraySpeciesCreate$1,addToUnscopables$1=(_export({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=toObject$2(this),r=lengthOfArrayLike$2(t),n=arraySpeciesCreate(t,0);return n.length=flattenIntoArray(n,t,t,r,0,void 0===e?1:toIntegerOrInfinity$2(e)),n}}),addToUnscopables$3),global$a=(addToUnscopables$3("flat"),global$m),classof$3=classofRaw$2,engineIsNode="process"===classofRaw$2(global$m.process),makeBuiltIn=makeBuiltIn$3.exports,defineProperty=objectDefineProperty,defineBuiltInAccessor$1=function(e,t,r){return r.get&&makeBuiltIn(r.get,t,{getter:!0}),r.set&&makeBuiltIn(r.set,t,{setter:!0}),defineProperty.f(e,t,r)},getBuiltIn$2=getBuiltIn$7,defineBuiltInAccessor=defineBuiltInAccessor$1,wellKnownSymbol$9=wellKnownSymbol$j,DESCRIPTORS$1=descriptors,SPECIES$3=wellKnownSymbol$j("species"),setSpecies$1=function(e){e=getBuiltIn$2(e);DESCRIPTORS$1&&e&&!e[SPECIES$3]&&defineBuiltInAccessor(e,SPECIES$3,{configurable:!0,get:function(){return this}})},isPrototypeOf$1=objectIsPrototypeOf,$TypeError$8=TypeError,anInstance$1=function(e,t){if(isPrototypeOf$1(t,e))return e;throw new $TypeError$8("Incorrect invocation")},isConstructor=isConstructor$2,tryToString$3=tryToString$5,$TypeError$7=TypeError,aConstructor$1=function(e){if(isConstructor(e))return e;throw new $TypeError$7(tryToString$3(e)+" is not a constructor")},anObject$7=anObject$c,aConstructor=aConstructor$1,isNullOrUndefined$2=isNullOrUndefined$5,wellKnownSymbol$8=wellKnownSymbol$j,SPECIES$2=wellKnownSymbol$j("species"),speciesConstructor$1=function(e,t){var e=anObject$7(e).constructor;return void 0===e||isNullOrUndefined$2(e=anObject$7(e)[SPECIES$2])?t:aConstructor(e)},NATIVE_BIND=functionBindNative,FunctionPrototype=Function.prototype,apply$2=FunctionPrototype.apply,call$a=FunctionPrototype.call,functionApply="object"==typeof Reflect&&Reflect.apply||(NATIVE_BIND?call$a.bind(apply$2):function(){return call$a.apply(apply$2,arguments)}),uncurryThis$6=functionUncurryThis,arraySlice$2=functionUncurryThis([].slice),$TypeError$6=TypeError,validateArgumentsLength$1=function(e,t){if(e<t)throw new $TypeError$6("Not enough arguments");return e},userAgent$4=engineUserAgent,engineIsIos=/(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$4),global$9=global$m,apply$1=functionApply,bind$3=functionBindContext,isCallable$5=isCallable$l,hasOwn=hasOwnProperty_1,fails$8=fails$m,html=html$2,arraySlice$1=arraySlice$2,createElement=documentCreateElement$2,validateArgumentsLength=validateArgumentsLength$1,IS_IOS$1=engineIsIos,IS_NODE$3=engineIsNode,set=global$9.setImmediate,clear=global$9.clearImmediate,process$3=global$9.process,Dispatch=global$9.Dispatch,Function$1=global$9.Function,MessageChannel=global$9.MessageChannel,String$1=global$9.String,counter=0,queue$2={},ONREADYSTATECHANGE="onreadystatechange",run=(fails$8(function(){$location=global$9.location}),function(e){var t;hasOwn(queue$2,e)&&(t=queue$2[e],delete queue$2[e],t())}),runner=function(e){return function(){run(e)}},eventListener=function(e){run(e.data)},globalPostMessageDefer=function(e){global$9.postMessage(String$1(e),$location.protocol+"//"+$location.host)},task$1=(set&&clear||(set=function(e){validateArgumentsLength(arguments.length,1);var t=isCallable$5(e)?e:Function$1(e),r=arraySlice$1(arguments,1);return queue$2[++counter]=function(){apply$1(t,void 0,r)},defer(counter),counter},clear=function(e){delete queue$2[e]},IS_NODE$3?defer=function(e){process$3.nextTick(runner(e))}:Dispatch&&Dispatch.now?defer=function(e){Dispatch.now(runner(e))}:MessageChannel&&!IS_IOS$1?(port=(channel=new MessageChannel).port2,channel.port1.onmessage=eventListener,defer=bind$3(port.postMessage,port)):global$9.addEventListener&&isCallable$5(global$9.postMessage)&&!global$9.importScripts&&$location&&"file:"!==$location.protocol&&!fails$8(globalPostMessageDefer)?(defer=globalPostMessageDefer,global$9.addEventListener("message",eventListener,!1)):defer=ONREADYSTATECHANGE in createElement("script")?function(e){html.appendChild(createElement("script"))[ONREADYSTATECHANGE]=function(){html.removeChild(this),run(e)}}:function(e){setTimeout(runner(e),0)}),{set:set,clear:clear}),global$8=global$m,DESCRIPTORS=descriptors,getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,safeGetBuiltIn$1=function(e){var t;return DESCRIPTORS?(t=getOwnPropertyDescriptor(global$8,e))&&t.value:global$8[e]},Queue$2=function(){this.head=null,this.tail=null},queue$1=(Queue$2.prototype={add:function(e){var e={item:e,next:null},t=this.tail;t?t.next=e:this.head=e,this.tail=e},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}},Queue$2),userAgent$3=engineUserAgent,engineIsIosPebble=/ipad|iphone|ipod/i.test(userAgent$3)&&"undefined"!=typeof Pebble,userAgent$2=engineUserAgent,engineIsWebosWebkit=/web0s(?!.*chrome)/i.test(userAgent$2),global$7=global$m,safeGetBuiltIn=safeGetBuiltIn$1,bind$2=functionBindContext,macrotask=task$1.set,Queue$1=queue$1,IS_IOS=engineIsIos,IS_IOS_PEBBLE=engineIsIosPebble,IS_WEBOS_WEBKIT=engineIsWebosWebkit,IS_NODE$2=engineIsNode,MutationObserver=global$7.MutationObserver||global$7.WebKitMutationObserver,document$2=global$7.document,process$2=global$7.process,Promise$1=global$7.Promise,microtask$1=safeGetBuiltIn("queueMicrotask"),microtask_1=(microtask$1||(queue=new Queue$1,flush=function(){var e,t;for(IS_NODE$2&&(e=process$2.domain)&&e.exit();t=queue.get();)try{t()}catch(e){throw queue.head&¬ify$1(),e}e&&e.enter()},notify$1=IS_IOS||IS_NODE$2||IS_WEBOS_WEBKIT||!MutationObserver||!document$2?!IS_IOS_PEBBLE&&Promise$1&&Promise$1.resolve?((promise=Promise$1.resolve(void 0)).constructor=Promise$1,then=bind$2(promise.then,promise),function(){then(flush)}):IS_NODE$2?function(){process$2.nextTick(flush)}:(macrotask=bind$2(macrotask,global$7),function(){macrotask(flush)}):(toggle=!0,node=document$2.createTextNode(""),new MutationObserver(flush).observe(node,{characterData:!0}),function(){node.data=toggle=!toggle}),microtask$1=function(e){queue.head||notify$1(),queue.add(e)}),microtask$1),hostReportErrors$1=function(e,t){try{1===arguments.length?console.error(e):console.error(e,t)}catch(e){}},perform$3=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},global$6=global$m,promiseNativeConstructor=global$m.Promise,engineIsDeno="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,IS_DENO$1=engineIsDeno,IS_NODE$1=engineIsNode,engineIsBrowser=!engineIsDeno&&!engineIsNode&&"object"==typeof window&&"object"==typeof document,global$5=global$m,NativePromiseConstructor$3=promiseNativeConstructor,isCallable$4=isCallable$l,isForced=isForced_1,inspectSource=inspectSource$3,wellKnownSymbol$7=wellKnownSymbol$j,IS_BROWSER=engineIsBrowser,IS_DENO=engineIsDeno,V8_VERSION=engineV8Version,SPECIES$1=(NativePromiseConstructor$3&&NativePromiseConstructor$3.prototype,wellKnownSymbol$7("species")),SUBCLASSING=!1,NATIVE_PROMISE_REJECTION_EVENT$1=isCallable$4(global$5.PromiseRejectionEvent),FORCED_PROMISE_CONSTRUCTOR$5=isForced("Promise",function(){var e=inspectSource(NativePromiseConstructor$3),t=e!==String(NativePromiseConstructor$3);if(!t&&66===V8_VERSION)return!0;if(!V8_VERSION||V8_VERSION<51||!/native code/.test(e)){function r(e){e(function(){},function(){})}e=new NativePromiseConstructor$3(function(e){e(1)});if((e.constructor={})[SPECIES$1]=r,!(SUBCLASSING=e.then(function(){})instanceof r))return!0}return!t&&(IS_BROWSER||IS_DENO)&&!NATIVE_PROMISE_REJECTION_EVENT$1}),promiseConstructorDetection={CONSTRUCTOR:FORCED_PROMISE_CONSTRUCTOR$5,REJECTION_EVENT:NATIVE_PROMISE_REJECTION_EVENT$1,SUBCLASSING:SUBCLASSING},newPromiseCapability$2={},aCallable$5=aCallable$9,$TypeError$5=TypeError,PromiseCapability=function(e){var r,n;this.promise=new e(function(e,t){if(void 0!==r||void 0!==n)throw new $TypeError$5("Bad Promise constructor");r=e,n=t}),this.resolve=aCallable$5(r),this.reject=aCallable$5(n)},$$9=(newPromiseCapability$2.f=function(e){return new PromiseCapability(e)},_export),IS_NODE=engineIsNode,global$4=global$m,call$9=functionCall,defineBuiltIn$2=defineBuiltIn$6,setPrototypeOf=objectSetPrototypeOf,setToStringTag=setToStringTag$4,setSpecies=setSpecies$1,aCallable$4=aCallable$9,isCallable$3=isCallable$l,isObject$2=isObject$c,anInstance=anInstance$1,speciesConstructor=speciesConstructor$1,task=task$1.set,microtask=microtask_1,hostReportErrors=hostReportErrors$1,perform$2=perform$3,Queue=queue$1,InternalStateModule=internalState,NativePromiseConstructor$2=promiseNativeConstructor,PromiseConstructorDetection=promiseConstructorDetection,newPromiseCapabilityModule$3=newPromiseCapability$2,PROMISE="Promise",FORCED_PROMISE_CONSTRUCTOR$4=PromiseConstructorDetection.CONSTRUCTOR,NATIVE_PROMISE_REJECTION_EVENT=PromiseConstructorDetection.REJECTION_EVENT,NATIVE_PROMISE_SUBCLASSING=PromiseConstructorDetection.SUBCLASSING,getInternalPromiseState=InternalStateModule.getterFor(PROMISE),setInternalState=InternalStateModule.set,NativePromisePrototype$1=NativePromiseConstructor$2&&NativePromiseConstructor$2.prototype,PromiseConstructor=NativePromiseConstructor$2,PromisePrototype=NativePromisePrototype$1,TypeError$1=global$4.TypeError,document$1=global$4.document,process$1=global$4.process,newPromiseCapability$1=newPromiseCapabilityModule$3.f,newGenericPromiseCapability=newPromiseCapability$1,DISPATCH_EVENT=!!(document$1&&document$1.createEvent&&global$4.dispatchEvent),UNHANDLED_REJECTION="unhandledrejection",REJECTION_HANDLED="rejectionhandled",PENDING=0,FULFILLED=1,REJECTED=2,HANDLED=1,UNHANDLED=2,isThenable=function(e){var t;return!(!isObject$2(e)||!isCallable$3(t=e.then))&&t},callReaction=function(e,t){var r,n,s,o=t.value,a=t.state===FULFILLED,i=a?e.ok:e.fail,l=e.resolve,c=e.reject,u=e.domain;try{i?(a||(t.rejection===UNHANDLED&&onHandleUnhandled(t),t.rejection=HANDLED),!0===i?r=o:(u&&u.enter(),r=i(o),u&&(u.exit(),s=!0)),r===e.promise?c(new TypeError$1("Promise-chain cycle")):(n=isThenable(r))?call$9(n,r,l,c):l(r)):c(o)}catch(e){u&&!s&&u.exit(),c(e)}},notify=function(r,n){r.notified||(r.notified=!0,microtask(function(){for(var e,t=r.reactions;e=t.get();)callReaction(e,r);r.notified=!1,n&&!r.rejection&&onUnhandled(r)}))},dispatchEvent=function(e,t,r){var n;DISPATCH_EVENT?((n=document$1.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),global$4.dispatchEvent(n)):n={promise:t,reason:r},!NATIVE_PROMISE_REJECTION_EVENT&&(t=global$4["on"+e])?t(n):e===UNHANDLED_REJECTION&&hostReportErrors("Unhandled promise rejection",r)},onUnhandled=function(n){call$9(task,global$4,function(){var e=n.facade,t=n.value,r=isUnhandled(n);if(r&&(r=perform$2(function(){IS_NODE?process$1.emit("unhandledRejection",t,e):dispatchEvent(UNHANDLED_REJECTION,e,t)}),n.rejection=IS_NODE||isUnhandled(n)?UNHANDLED:HANDLED,r.error))throw r.value})},isUnhandled=function(e){return e.rejection!==HANDLED&&!e.parent},onHandleUnhandled=function(t){call$9(task,global$4,function(){var e=t.facade;IS_NODE?process$1.emit("rejectionHandled",e):dispatchEvent(REJECTION_HANDLED,e,t.value)})},bind$1=function(t,r,n){return function(e){t(r,e,n)}},internalReject=function(e,t,r){e.done||(e.done=!0,(e=r?r:e).value=t,e.state=REJECTED,notify(e,!0))},internalResolve=function(r,e,t){if(!r.done){r.done=!0,t&&(r=t);try{if(r.facade===e)throw new TypeError$1("Promise can't be resolved itself");var n=isThenable(e);n?microtask(function(){var t={done:!1};try{call$9(n,e,bind$1(internalResolve,t,r),bind$1(internalReject,t,r))}catch(e){internalReject(t,e,r)}}):(r.value=e,r.state=FULFILLED,notify(r,!1))}catch(e){internalReject({done:!1},e,r)}}};if(FORCED_PROMISE_CONSTRUCTOR$4&&(PromisePrototype=(PromiseConstructor=function(e){anInstance(this,PromisePrototype),aCallable$4(e),call$9(Internal,this);var t=getInternalPromiseState(this);try{e(bind$1(internalResolve,t),bind$1(internalReject,t))}catch(e){internalReject(t,e)}}).prototype,(Internal=function(e){setInternalState(this,{type:PROMISE,done:!1,notified:!1,parent:!1,reactions:new Queue,rejection:!1,state:PENDING,value:void 0})}).prototype=defineBuiltIn$2(PromisePrototype,"then",function(e,t){var r=getInternalPromiseState(this),n=newPromiseCapability$1(speciesConstructor(this,PromiseConstructor));return r.parent=!0,n.ok=!isCallable$3(e)||e,n.fail=isCallable$3(t)&&t,n.domain=IS_NODE?process$1.domain:void 0,r.state===PENDING?r.reactions.add(n):microtask(function(){callReaction(n,r)}),n.promise}),OwnPromiseCapability=function(){var e=new Internal,t=getInternalPromiseState(e);this.promise=e,this.resolve=bind$1(internalResolve,t),this.reject=bind$1(internalReject,t)},newPromiseCapabilityModule$3.f=newPromiseCapability$1=function(e){return e===PromiseConstructor||e===PromiseWrapper?new OwnPromiseCapability(e):newGenericPromiseCapability(e)},isCallable$3(NativePromiseConstructor$2))&&NativePromisePrototype$1!==Object.prototype){nativeThen=NativePromisePrototype$1.then,NATIVE_PROMISE_SUBCLASSING||defineBuiltIn$2(NativePromisePrototype$1,"then",function(e,t){var r=this;return new PromiseConstructor(function(e,t){call$9(nativeThen,r,e,t)}).then(e,t)},{unsafe:!0});try{delete NativePromisePrototype$1.constructor}catch(e){}setPrototypeOf&&setPrototypeOf(NativePromisePrototype$1,PromisePrototype)}$$9({global:!0,constructor:!0,wrap:!0,forced:FORCED_PROMISE_CONSTRUCTOR$4},{Promise:PromiseConstructor}),setToStringTag(PromiseConstructor,PROMISE,!1),setSpecies(PROMISE);var wellKnownSymbol$6=wellKnownSymbol$j,Iterators$1=iterators,ITERATOR$2=wellKnownSymbol$j("iterator"),ArrayPrototype=Array.prototype,isArrayIteratorMethod$1=function(e){return void 0!==e&&(Iterators$1.Array===e||ArrayPrototype[ITERATOR$2]===e)},classof$2=classof$7,getMethod$2=getMethod$4,isNullOrUndefined$1=isNullOrUndefined$5,Iterators=iterators,wellKnownSymbol$5=wellKnownSymbol$j,ITERATOR$1=wellKnownSymbol$j("iterator"),getIteratorMethod$2=function(e){if(!isNullOrUndefined$1(e))return getMethod$2(e,ITERATOR$1)||getMethod$2(e,"@@iterator")||Iterators[classof$2(e)]},call$8=functionCall,aCallable$3=aCallable$9,anObject$6=anObject$c,tryToString$2=tryToString$5,getIteratorMethod$1=getIteratorMethod$2,$TypeError$4=TypeError,getIterator$1=function(e,t){var r=arguments.length<2?getIteratorMethod$1(e):t;if(aCallable$3(r))return anObject$6(call$8(r,e));throw new $TypeError$4(tryToString$2(e)+" is not iterable")},call$7=functionCall,anObject$5=anObject$c,getMethod$1=getMethod$4,iteratorClose$1=function(e,t,r){var n,s;anObject$5(e);try{if(!(n=getMethod$1(e,"return"))){if("throw"===t)throw r;return r}n=call$7(n,e)}catch(e){s=!0,n=e}if("throw"===t)throw r;if(s)throw n;return anObject$5(n),r},bind=functionBindContext,call$6=functionCall,anObject$4=anObject$c,tryToString$1=tryToString$5,isArrayIteratorMethod=isArrayIteratorMethod$1,lengthOfArrayLike$1=lengthOfArrayLike$5,isPrototypeOf=objectIsPrototypeOf,getIterator=getIterator$1,getIteratorMethod=getIteratorMethod$2,iteratorClose=iteratorClose$1,$TypeError$3=TypeError,Result=function(e,t){this.stopped=e,this.result=t},ResultPrototype=Result.prototype,iterate$2=function(e,t,r){function n(e){return o&&iteratorClose(o,"normal",e),new Result(!0,e)}function s(e){return p?(anObject$4(e),m?f(e[0],e[1],n):f(e[0],e[1])):m?f(e,n):f(e)}var o,a,i,l,c,u,d=r&&r.that,p=!(!r||!r.AS_ENTRIES),$=!(!r||!r.IS_RECORD),g=!(!r||!r.IS_ITERATOR),m=!(!r||!r.INTERRUPTED),f=bind(t,d);if($)o=e.iterator;else if(g)o=e;else{if(!(r=getIteratorMethod(e)))throw new $TypeError$3(tryToString$1(e)+" is not iterable");if(isArrayIteratorMethod(r)){for(a=0,i=lengthOfArrayLike$1(e);a<i;a++)if((l=s(e[a]))&&isPrototypeOf(ResultPrototype,l))return l;return new Result(!1)}o=getIterator(e,r)}for(c=($?e:o).next;!(u=call$6(c,o)).done;){try{l=s(u.value)}catch(e){iteratorClose(o,"throw",e)}if("object"==typeof l&&l&&isPrototypeOf(ResultPrototype,l))return l}return new Result(!1)},wellKnownSymbol$4=wellKnownSymbol$j,ITERATOR=wellKnownSymbol$j("iterator"),SAFE_CLOSING=!1;try{var called=0,iteratorWithReturn={next:function(){return{done:!!called++}},return:function(){SAFE_CLOSING=!0}};iteratorWithReturn[ITERATOR]=function(){return this},Array.from(iteratorWithReturn,function(){throw 2})}catch(e){}var method,checkCorrectnessOfIteration$1=function(e,t){try{if(!t&&!SAFE_CLOSING)return!1}catch(e){return!1}var r=!1;try{var n={};n[ITERATOR]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r},NativePromiseConstructor$1=promiseNativeConstructor,checkCorrectnessOfIteration=checkCorrectnessOfIteration$1,FORCED_PROMISE_CONSTRUCTOR$3=promiseConstructorDetection.CONSTRUCTOR,promiseStaticsIncorrectIteration=FORCED_PROMISE_CONSTRUCTOR$3||!checkCorrectnessOfIteration(function(e){NativePromiseConstructor$1.all(e).then(void 0,function(){})}),$$8=_export,call$5=functionCall,aCallable$2=aCallable$9,newPromiseCapabilityModule$2=newPromiseCapability$2,perform$1=perform$3,iterate$1=iterate$2,PROMISE_STATICS_INCORRECT_ITERATION$1=promiseStaticsIncorrectIteration,$$7=(_export({target:"Promise",stat:!0,forced:promiseStaticsIncorrectIteration},{all:function(e){var i=this,t=newPromiseCapabilityModule$2.f(i),l=t.resolve,c=t.reject,r=perform$1(function(){var n=aCallable$2(i.resolve),s=[],o=0,a=1;iterate$1(e,function(e){var t=o++,r=!1;a++,call$5(n,i,e).then(function(e){r||(r=!0,s[t]=e,--a)||l(s)},c)}),--a||l(s)});return r.error&&c(r.value),t.promise}}),_export),FORCED_PROMISE_CONSTRUCTOR$2=promiseConstructorDetection.CONSTRUCTOR,NativePromiseConstructor=promiseNativeConstructor,getBuiltIn$1=getBuiltIn$7,isCallable$2=isCallable$l,defineBuiltIn$1=defineBuiltIn$6,NativePromisePrototype=NativePromiseConstructor&&NativePromiseConstructor.prototype,$$6=($$7({target:"Promise",proto:!0,forced:FORCED_PROMISE_CONSTRUCTOR$2,real:!0},{catch:function(e){return this.then(void 0,e)}}),isCallable$2(NativePromiseConstructor)&&(method=getBuiltIn$1("Promise").prototype.catch,NativePromisePrototype.catch!==method)&&defineBuiltIn$1(NativePromisePrototype,"catch",method,{unsafe:!0}),_export),call$4=functionCall,aCallable$1=aCallable$9,newPromiseCapabilityModule$1=newPromiseCapability$2,perform=perform$3,iterate=iterate$2,PROMISE_STATICS_INCORRECT_ITERATION=promiseStaticsIncorrectIteration,$$5=(_export({target:"Promise",stat:!0,forced:promiseStaticsIncorrectIteration},{race:function(e){var r=this,n=newPromiseCapabilityModule$1.f(r),s=n.reject,t=perform(function(){var t=aCallable$1(r.resolve);iterate(e,function(e){call$4(t,r,e).then(n.resolve,s)})});return t.error&&s(t.value),n.promise}}),_export),newPromiseCapabilityModule=newPromiseCapability$2,FORCED_PROMISE_CONSTRUCTOR$1=promiseConstructorDetection.CONSTRUCTOR,anObject$3=($$5({target:"Promise",stat:!0,forced:FORCED_PROMISE_CONSTRUCTOR$1},{reject:function(e){var t=newPromiseCapabilityModule.f(this);return(0,t.reject)(e),t.promise}}),anObject$c),isObject$1=isObject$c,newPromiseCapability=newPromiseCapability$2,promiseResolve$1=function(e,t){return anObject$3(e),isObject$1(t)&&t.constructor===e?t:((0,(e=newPromiseCapability.f(e)).resolve)(t),e.promise)},$$4=_export,getBuiltIn=getBuiltIn$7,FORCED_PROMISE_CONSTRUCTOR=promiseConstructorDetection.CONSTRUCTOR,promiseResolve=promiseResolve$1;function __awaiter(e,a,i,l){return new(i=i||Promise)(function(r,t){function n(e){try{o(l.next(e))}catch(e){t(e)}}function s(e){try{o(l.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?r(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(n,s)}o((l=l.apply(e,a||[])).next())})}getBuiltIn("Promise"),$$4({target:"Promise",stat:!0,forced:FORCED_PROMISE_CONSTRUCTOR},{resolve:function(e){return promiseResolve(this,e)}});const parseFilter=e=>{var t=[];return null!=e&&e.name&&t.push(`name: "${e.name}"`),null!=e&&e.orgId&&t.push(`organizationIds: ["${e.orgId}"]`),t.join(" ")};function fetchOrgUsers(r,n,s,o){return __awaiter(this,void 0,void 0,function*(){var e="fetchOrgUsers",t=parseFilter(o);return(yield baseGraphQLApiWithError(Object.assign({query:`
|
|
2
2
|
query ${e} {
|
|
3
3
|
users (offset: ${n}, limit: ${s} ${t}) {
|
|
4
4
|
records {
|
|
@@ -89,4 +89,4 @@ import{X as createSlice,fX as md5,Y as combineReducers,bP as AvailableComponents
|
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
|
-
`,operationName:e},t))).users})}const selectOrgUsers=e=>{var{users:e,hasMore:t,offset:r}=(null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace$1])||{};return{users:e,hasMore:t,offset:r}},selectStatus=e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace$1].status},selectUserOrgs=e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace$1].userOrgs},selectUserApplicationRoles=e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace$1].userRoles},selectUserDetailPanelUserData=e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace$1].userDetailPanel.userData},selectUserDetailPanelLoadingStatus=e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace$1].userDetailPanel.loadingStatus},selectSearchTerm=e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace$1].searchTerm},selectIsSearching=e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace$1].isSearching};function*fetchUserByIdSaga(e){var t;try{var r=yield select(selectApiConfigs),n=yield select(selectAdminCenterOrgParameter),s=yield select(selectAdminCenterOrgIdString),o=yield select(selectIsSuperAdmin),a=e.payload["userId"],i=(yield fetchOrgUserById(r,a,n))["records"];if(!i||0===i.length)throw new Error("User not found");yield put(actions.adminCenterUsers.getUserApplicationRolesStart({userId:i[0].id||"",orgId:s||""})),yield put(actions.adminCenterUsers.fetchUserSuccess({user:i[0]})),o&&null!=(t=i[0])&&t.organizationGuids&&(yield put(actions.adminCenterUsers.fetchUserOrganizationsStart({orgGuids:i[0].organizationGuids})))}catch(e){console.log(e),yield put(actions.adminCenterUsers.fetchUserFailure())}}function*fetchUsers(e,t){var r=yield select(selectApiConfigs),n=yield select(selectAdminCenterOrgParameter),s=yield select(selectOrgId),e={name:e,orgId:null!=n?n:s},n=(yield fetchOrgUsers(r,t,PAGE_LIMIT,e))["records"];return n}function*fetchUsersSaga(e){try{var t,r=yield select(selectSearchTerm),{offset:n,hasMore:s}=yield select(selectOrgUsers);s&&(t=yield call$i(fetchUsers,r,n),yield put(actions.adminCenterUsers.fetchOrgUsersSuccess({records:t,hasMore:PAGE_LIMIT===t.length,nextOffset:n+PAGE_LIMIT})))}catch(e){console.log(e),yield put(actions.adminCenterUsers.fetchOrgUsersFailure())}}function*searchUsersSaga(e){try{var t=yield call$i(fetchUsers,e.payload,0);yield put(actions.adminCenterUsers.fetchOrgUsersSuccess({records:t,hasMore:PAGE_LIMIT===t.length,nextOffset:PAGE_LIMIT}))}catch(e){console.log(e),yield put(actions.adminCenterUsers.fetchOrgUsersFailure())}}function*removeUserFromOrgSaga(e){var{userId:e,orgGuid:t}=e.payload;try{var r=(yield removeUserFromOrg(yield select(selectApiConfigs),e,t))["id"];yield put(actions.adminCenterUsers.removeUserFromOrgSuccess(r||""))}catch(e){console.log(e),yield put(actions.adminCenterUsers.removeUserFromOrgFailure())}}function*updateUserStatusSaga(e){var{userId:e,status:t}=e.payload,r=yield select(preferredLanguageSelector),r=AIWareFormatMessage(r);try{var{id:n,status:s}=yield updateUserStatus(yield select(selectApiConfigs),e,t);n&&s&&(yield put(actions.adminCenterUsers.updateUserStatusSuccess({id:n,status:s})),yield put(showMessage({severity:MessageSeverity.Success,content:isEqual_1(process.env.NODE_ENV,"development")?"This user has been successfully "+s:r({id:"adminCenterUsers.updateUserStatusSuccess",defaultMessage:[{type:0,value:"This user has been successfully "},{type:1,value:"status"}]},{status:s})})))}catch(e){console.error(e),yield put(actions.adminCenterUsers.updateUserStatusFailure()),yield put(showMessage({severity:MessageSeverity.Error,content:isEqual_1(process.env.NODE_ENV,"development")?"This user status update failed":r({id:"adminCenterUsers.updateUserStatusFailure",defaultMessage:[{type:0,value:"This user status update failed"}]})}))}}function*fetchUserOrganizationsSaga(e){e=e.payload.orgGuids;try{const r=yield select(selectApiConfigs);var t=(yield Promise.all(e.map(e=>fetchUserOrganizations(r,e)))).map(({records:e})=>e).flat();yield put(actions.adminCenterUsers.fetchUserOrganizationsSuccess({orgs:t}))}catch(e){console.log(e),yield put(actions.adminCenterUsers.fetchUserOrganizationsFailure())}}function*getUserApplicationRolesSaga(e){try{var t=yield select(selectApiConfigs),{userId:r,orgId:n}=e.payload,s=yield call$i(getUserApplicationRoles,t,r,n);yield put(actions.adminCenterUsers.getUserApplicationRolesSuccess({roles:s}))}catch(e){console.log(e),yield put(actions.adminCenterUsers.getUserApplicationRolesFailure())}}function*fetchUsersWatcher(){yield takeEvery$1(actions.adminCenterUsers.fetchOrgUsersStart.type,fetchUsersSaga)}function*fetchUserByIdWatcher(){yield takeEvery$1(actions.adminCenterUsers.fetchUserStart.type,fetchUserByIdSaga)}function*removeUserFromOrgWatcher(){yield takeEvery$1(actions.adminCenterUsers.removeUserFromOrgStart.type,removeUserFromOrgSaga)}function*updateUserStatusWatcher(){yield takeEvery$1(actions.adminCenterUsers.updateUserStatusStart.type,updateUserStatusSaga)}function*fetchUserOrganizationsWatcher(){yield takeEvery$1(actions.adminCenterUsers.fetchUserOrganizationsStart.type,fetchUserOrganizationsSaga)}function*getUserApplicationRolesSagaWatcher(){yield takeEvery$1(actions.adminCenterUsers.getUserApplicationRolesStart.type,getUserApplicationRolesSaga)}function*searchUsersWatcher(){yield takeEvery$1(actions.adminCenterUsers.setSearchTerm.type,searchUsersSaga)}function*rootSaga(){yield all([fetchUsersWatcher(),removeUserFromOrgWatcher(),updateUserStatusWatcher(),fetchUserOrganizationsWatcher(),getUserApplicationRolesSagaWatcher(),fetchUserByIdWatcher(),searchUsersWatcher()])}function getAdminCenterUsersModule(){return{id:SLICE_NAME,reducerMap:{[SLICE_NAME]:rootReducer},sagas:[rootSaga],initialActions:[]}}const userDetailsPanel=AvailableComponents.USER_DETAILS_PANEL,openUserDetailsPanel=(e,t,r)=>{e={name:userDetailsPanel,config:{name:"User Table Settings",id:e}},r={type:AvailablePanels.APP_BAR_PANEL_TEMPLATE,marginTop:r?0:55,marginStart:r?0:80,size:"medium",parentPanelId:AvailableComponents.ADMIN_CENTER,dimmed:0,dimmedStatus:"dimParent",borderBottom:!0};t(mountPanel({panelId:userDetailsPanel,microFrontend:e,panelConfig:r}))},UserContextMenu=({anchorEl:e,id:t,open:r,onClose:n,onItemClick:s,userId:o,orgGuid:a,status:i,hasMultipleOrgs:l,isUserDetailsPanelOpen:c=!1})=>{var u=contextMenuStyles({width:44})["classes"];const d=useDispatch();var p=useOrganizationPermissions(EAuthSubResourceType.User),$=p.hasPermission(EPermissionAction.Create),p=p.hasPermission(EPermissionAction.Delete),g=null==(g=useSelector(userSelector))?void 0:g.userId;const m=useSelector(selectIsFullscreenEnabled);var $=o!==g&&(i===EUserStatus.deactivated?$:p),f=i===EUserStatus.deleted,g=!(o===g)&&!f&&l&&p,p=!f&&!l&&$;return jsxRuntime.exports.jsx(Popover,Object.assign({anchorEl:e,id:t,open:r,onClose:n,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"right"}},{children:jsxRuntime.exports.jsxs(MenuList,Object.assign({role:"menu",className:u.menuList,"data-testid":"admin-center-user.menu","data-test":"admin-center-user.menu",sx:{padding:"7.5px"}},{children:[!c&&jsxRuntime.exports.jsx(MenuItem,Object.assign({"data-testid":"ac-user-context.menu-item.user-details","data-test":"context-menu-item",onClick:e=>{null!=s&&s(),openUserDetailsPanel(o,d,m)},className:u.menuItem,sx:{cursor:"pointer"}},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"admin-center-user-row.open-user-details-panel-btn",defaultMessage:"User Details",description:"User Detail row context menu"})})),jsxRuntime.exports.jsx(MenuItem,Object.assign({"data-testid":"ac-user.menu-item.status-update","data-test":"context-menu-item",onClick:()=>{null!=s&&s(),d(actions.adminCenterUsers.updateUserStatusStart({userId:o,status:i===EUserStatus.deactivated?EUserStatus.active:EUserStatus.deactivated}))},sx:{cursor:"pointer"},className:u.menuItem,disabled:!p},{children:i===EUserStatus.deactivated?jsxRuntime.exports.jsx(FormattedMessage,{id:"ac-users.user-row.activate-btn",defaultMessage:"Activate",description:"Activate button in the user row context menu"}):jsxRuntime.exports.jsx(FormattedMessage,{id:"ac-users.user-row.deactivate-btn",defaultMessage:"Deactivate",description:"Deactivate button in the user row context menu"})})),jsxRuntime.exports.jsx(MenuItem,Object.assign({onClick:()=>{null!=s&&s(),d(actions.adminCenterUsers.removeUserFromOrgStart({userId:o,orgGuid:a}))},className:u.menuItem,"data-test":"context-menu-item",disabled:!g,sx:{cursor:g?"pointer":"not-allowed"},"data-testid":"admin-center-user.menu-item.remove-from-org"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"ac-users.user-row.remove-from-org-btn",defaultMessage:"Remove from Org",description:"Remove from Org button in the user row context menu"})}))]}))}))},useStyles$2=makeStyles()((e,{})=>({userAvatar:{border:"2px solid #FFFFFF",height:"40px",width:"40px",marginRight:"14px",fontSize:"14px",color:"white"},row:{padding:"13px",height:"100%",overflow:"hidden",boxSizing:"border-box","&:hover":{backgroundColor:"#f2f5f9",cursor:"pointer"}},userName:{alignSelf:"center"},truncate:{paddingRight:"20px","& p":{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}}})),UserRow=({user:{id:t,imageUrl:e,firstName:r,lastName:n,email:s,lastLoginDateTime:o,status:a,organizationGuids:i=[],organization:l,avatarColor:c}})=>{var u=useStyles$2({status:a})["classes"];const[d,p]=react.exports.useState(null);var $=d?"contextMenuId-"+t:void 0;const g=useDispatch(),m=useSelector(selectIsFullscreenEnabled);return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs(Grid,Object.assign({direction:"row",justifyContent:"space-between",alignItems:"center",container:!0,"data-testid":"admin-center-org-user-row-"+t,"data-test":"admin-center-org-user-row-"+t,className:u.row,onClick:e=>{d||openUserDetailsPanel(t,g,m)}},{children:[jsxRuntime.exports.jsxs(Grid,Object.assign({container:!0,item:!0,xs:11,alignItems:"center"},{children:[jsxRuntime.exports.jsxs(Grid,Object.assign({sx:{display:"flex"},xs:4,item:!0,className:u.truncate,"data-testid":"admin-center-org-user.avatar-name-col","data-test":"admin-center-org-user.avatar-name-col"},{children:[e?jsxRuntime.exports.jsx(Avatar,{alt:r+" "+n,src:e,className:u.userAvatar}):jsxRuntime.exports.jsx(Avatar,Object.assign({className:u.userAvatar,sx:{background:c}},{children:(e=n||"",""+(null==(c=null==(c=r||"")?void 0:c.charAt(0))?void 0:c.toUpperCase())+(null==(c=null==e?void 0:e.charAt(0))?void 0:c.toUpperCase()))})),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:r+" "+n,arrow:!0},{children:jsxRuntime.exports.jsx(Typography,Object.assign({className:u.userName,variant:"body2",sx:{fontWeight:400},"data-testid":"admin-center-org-user.user-name","data-test":"admin-center-org-user.user-name"},{children:r+" "+n}))}))]})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:4,item:!0,className:u.truncate,"data-testid":"admin-center-org-user.email-col","data-test":"admin-center-org-user.email-col"},{children:jsxRuntime.exports.jsx(Tooltip,Object.assign({title:s||"",arrow:!0},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2",sx:{fontWeight:400}},{children:s}))}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:3,item:!0,"data-testid":"admin-center-org-user.last-login-col","data-test":"admin-center-org-user.last-login-col"},{children:o&&jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2",sx:{mb:"-6px",fontWeight:400}},{children:new Date(o).toLocaleDateString()})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:index.formatTime(new Date(o))}))]})})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:1,item:!0,"data-testid":"admin-center-org-user.status-col","data-test":"admin-center-org-user.status-col"},{children:jsxRuntime.exports.jsx(UserStatusBadge,{status:a})}))]})),jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:1,sx:{textAlign:"end"},"data-testid":"admin-center-org-user.menu-col","data-test":"admin-center-org-user.menu-col"},{children:[jsxRuntime.exports.jsx(IconButton,Object.assign({"data-testid":"user-row-menu-button-"+t,"data-test":"user-row-menu-button-"+t,onClick:e=>{e.stopPropagation(),p(e.currentTarget)},size:"small"},{children:jsxRuntime.exports.jsx(MoreVert,{fontSize:"small"})})),jsxRuntime.exports.jsx(UserContextMenu,{anchorEl:d,id:$,open:!!d,onItemClick:()=>{p(null)},onClose:()=>{p(null)},userId:t||"",orgGuid:(null==l?void 0:l.guid)||"",hasMultipleOrgs:1<i.length,status:a,"data-testid":"admin-center-org-user.menu-icon","data-test":"admin-center-org-user.menu-icon"})]}))]})),jsxRuntime.exports.jsx(Divider,{})]})},{TableInfiniteScroll}=tableInfiniteScroll["jsx"],TableHeader=()=>jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs(Grid,Object.assign({direction:"row",justifyContent:"space-between",alignItems:"center",container:!0,"data-testid":"admin-center-org-user-table-header","data-test":"admin-center-org-user-table-header",sx:{pl:"13px",pr:"13px",height:"35px"}},{children:[jsxRuntime.exports.jsxs(Grid,Object.assign({container:!0,item:!0,xs:11},{children:[jsxRuntime.exports.jsx(Grid,Object.assign({xs:4,item:!0,"data-test":"os-admin-center.org-user-table-header.name"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"ac-user-table.header.name-col",defaultMessage:"Name",description:"Name column header"})}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:4,item:!0,"data-test":"os-admin-center.org-user-table-header.email"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"ac-user-table.header.email-col",defaultMessage:"Email",description:"Email column header"})}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:3,item:!0,"data-test":"os-admin-center.org-user-table-header.last-login"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"ac-user-table.header.last-login-col",defaultMessage:"Last Login",description:"Last Login column header"})}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:1,item:!0,"data-test":"os-admin-center.org-user-table-header.status"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"ac-user-table.header.status-col",defaultMessage:"Status",description:"Status column header"})}))})),jsxRuntime.exports.jsx(Grid,{xs:1,item:!0})]})),jsxRuntime.exports.jsx(Grid,{xs:1,item:!0})]})),jsxRuntime.exports.jsx(Divider,{})]}),itemHeight=68,TableRow=({item:e})=>jsxRuntime.exports.jsx(Box,Object.assign({"data-test":"users-table-row",sx:{width:"100%",height:itemHeight+"px"}},{children:jsxRuntime.exports.jsx(UserRow,{user:e})}),"users-table-row-"+e.id),UserTable=()=>{var{users:e=[],hasMore:t,offset:r}=useSelector(selectOrgUsers),n=useSelector(selectStatus);const s=useDispatch();var o=react.exports.useCallback(()=>{s(actions$1.fetchOrgUsersStart())},[s]);return jsxRuntime.exports.jsx(TableInfiniteScroll,{hasMore:!!t,fetchMore:o,fetchOnMount:0===e.length,offset:r||0,items:e,itemHeight:itemHeight,isLoading:"loading"===n||"pending"===n,error:"failure"===n,TableRowComponent:TableRow,TableHeaderComponent:jsxRuntime.exports.jsx(TableHeader,{}),adjustTableHeight:-35})},inviteUsersPanel="INVITE_USERS_PANEL",inviteRequestsPanel="INVITE_REQUESTS_PANEL",handleClickInviteUsers=(e,t,r,n)=>{r={name:inviteUsersPanel,config:{name:"Invite Users",organizationId:r||void 0,organizationGuid:n||void 0}},n={type:"APP_BAR_PANEL_TEMPLATE",marginTop:t?0:55,marginStart:t?0:80,size:"medium",parentPanelId:"ADMIN_CENTER",dimmed:0,dimmedStatus:"dimParent",borderBottom:!0};e(mountPanel({panelId:inviteUsersPanel,microFrontend:r,panelConfig:n}))},handleViewRequests=(e,t)=>{var r={name:inviteRequestsPanel,config:{name:"Invite Requests"}},t={type:"APP_BAR_PANEL_TEMPLATE",marginTop:t?0:55,marginStart:t?0:80,size:"medium",parentPanelId:"ADMIN_CENTER",dimmed:0,dimmedStatus:"dimParent",borderBottom:!0,header:{title:jsxRuntime.exports.jsx(FormattedMessage,{id:"admin-center.users.button.invite-requests",defaultMessage:"Invite Requests",description:"Invite Requests header title"})}};e(mountPanel({panelId:inviteRequestsPanel,microFrontend:r,panelConfig:t}))},userLabels=e=>({panelHeader:e.formatMessage({id:"ac-user-details-header-title",defaultMessage:[{type:0,value:"USER DETAILS"}]}),panelCloseTitle:e.formatMessage({id:"ac-user-details-header-close-btn",defaultMessage:[{type:0,value:"Close Panel"}]}),menuItemLabel:e.formatMessage({id:"ac-user-details-header-edit-btn",defaultMessage:[{type:0,value:"Menu"}]}),logoAltTitle:e.formatMessage({id:"ac-user-detail-header-image-alt",defaultMessage:[{type:0,value:"User Avatar"}]}),lastLoginLabel:e.formatMessage({id:"ac-user-detail-header-last-login.label",defaultMessage:[{type:0,value:"Last Login"}]}),activeUserLabel:e.formatMessage({id:"ac-users.user-row.activate-user-btn",defaultMessage:[{type:0,value:"Activate User"}]}),deactivateUserLabel:e.formatMessage({id:"ac-users.user-row.deactivate-user-btn",defaultMessage:[{type:0,value:"Deactivate User"}]}),removeOrgLabel:e.formatMessage({id:"ac-users.user-row.remove-user-from-org-btn",defaultMessage:[{type:0,value:"Remove from Org"}]})}),PANEL_ID=AvailableComponents.USER_DETAILS_PANEL,useStyles$1=makeStyles()(e=>({root:{display:"flex",flexDirection:"column"},header:{display:"flex",justifyContent:"space-between",padding:e.spacing(4),borderBottom:"0.5px solid "+e.palette.divider,"& button":{height:"28px"}},tableWrapper:{height:"calc(100vh - 55px - 64px - 69px - 20px)",overflow:"hidden"},toolbar:{alignItems:"baseline","& button svg":{marginRight:"5px"},display:"flex",justifyContent:"center"},addUserBtn:{"& svg":{marginRight:"10px",height:"14px",width:"14px"}},searchBox:{display:"flex",flexGrow:1,alignItems:"center",justifyContent:"flex-end",padding:"0 16px"},headerButtons:{display:"flex",alignItems:"center"}})),useStyles=makeStyles()(e=>({root:{display:"flex",flexDirection:"column",height:"calc(100vh - 55px - 5px)",alignItems:"stretch",justifyContent:"space-between"},panelRoot:{width:"100%"},panelContainer:{display:"flex",flexDirection:"column",width:"100%"},panelBody:{display:"flex",flexGrow:1},panelLoading:{height:300},panelContent:{width:"100%",padding:"0"},tabsContainer:{"& .Sdk-Mui-selected":{color:"black"},"& .Sdk-MuiTabs-indicator":{backgroundColor:"#000"}},tabsParent:{paddingLeft:e.spacing(4),"& div":{borderBottom:"none"},"& div button":{fontFamily:"Nunito",fontWeight:400,flex:"0 1 auto !important",minWidth:"unset"}},divider:{opacity:.9},secondBox:{display:"flex",flexDirection:"column",flexGrow:1},orgAvatar:{border:"2px solid #FFFFFF",height:"40px",width:"40px",marginRight:"14px",fontSize:"14px",color:"white",fontWeight:400,lineHeight:"20px"},appContainer:{display:"flex",width:"100%",padding:"20px 0",flexDirection:"row",alignItems:"center"},roleBox:{width:"30%",display:"flex",alignItems:"center",justifyContent:"flex-start"}})),headerUseStyles=makeStyles()(e=>({headerActionContainer:{alignItems:"center",display:"flex",flexGrow:1,height:"100%",justifyContent:"flex-end",paddingRight:"10px"},header:{alignItems:"center",display:"flex",justifyContent:"space-between",height:"55px",margin:"10px 10px 10px 30px"},title:{color:"#5C6269"},cardContainer:{display:"flex",padding:"20px 10px 20px 10px"},cardImgContainer:{position:"relative",marginLeft:"20px"},email:{color:"#5C6269",fontWeight:"400"},login:{color:"#2A323C",fontWeight:"400"},userAvatar:{border:"2px solid #FFFFFF",height:"90px",width:"90px",fontSize:"35px",color:"white"},statusLabel:{position:"absolute",bottom:"2px",left:"50%",right:"50%",display:"flex",justifyContent:"center"},divider:{opacity:.9},orgsName:{color:"black",fontWeight:400,fontSize:"12px",maxHeight:"26px",paddingTop:"1px",transform:"translateY(1px)",marginRight:"14px","& fieldset":{border:"1px solid #D5DFE9"}}})),UserDetailCard=({userData:e})=>{var t=useIntl(),r=headerUseStyles()["classes"],{logoAltTitle:t,lastLoginLabel:n}=userLabels(t),{imageUrl:e,avatarColor:s,firstName:o,lastName:a,lastLoginDateTime:i,status:l,email:c}=e;return jsxRuntime.exports.jsxs(Box,Object.assign({className:r.cardContainer},{children:[jsxRuntime.exports.jsxs(Box,Object.assign({className:r.cardImgContainer},{children:[e?jsxRuntime.exports.jsx(Avatar,{alt:t,src:e,className:r.userAvatar,sx:{border:"2px solid rgb(255, 255, 255)",height:"90px",width:"90px",fontSize:"35px",color:"white"},"data-testid":"ac-user-details-header-avatar","data-test":"ac-user-details-header-avatar"}):jsxRuntime.exports.jsx(Avatar,Object.assign({className:r.userAvatar,sx:{background:s,border:"2px solid rgb(255, 255, 255)",height:"90px",width:"90px",fontSize:"35px",color:"white"},"data-testid":"ac-user-details-header-avatar-fallback","data-test":"ac-user-details-header-avatar-fallback"},{children:(t=a||"",""+(null==(e=null==(e=o||"")?void 0:e.charAt(0))?void 0:e.toUpperCase())+(null==(e=null==t?void 0:t.charAt(0))?void 0:e.toUpperCase()))})),jsxRuntime.exports.jsx("div",Object.assign({className:r.statusLabel,"data-testid":"ac-user-details-status-badge-wrapper","data-test":"ac-user-details-status-badge-wrapper"},{children:jsxRuntime.exports.jsx(UserStatusBadge,{status:l})}))]})),jsxRuntime.exports.jsxs(Box,Object.assign({sx:{pl:2}},{children:[jsxRuntime.exports.jsx(Box,Object.assign({sx:{mb:1}},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h1","data-testid":"ac-user-detail-first-and-last-name","data-test":"ac-user-detail-first-and-last-name"},{children:o+" "+a}))})),jsxRuntime.exports.jsx(Box,{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2",className:r.email,"data-testid":"ac-user-detail-email-address","data-test":"ac-user-detail-email-address"},{children:c}))}),i&&jsxRuntime.exports.jsxs(Box,Object.assign({sx:{mt:1}},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption",className:r.email},{children:n})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2",className:r.login,"data-testid":"ac-user-detail-last-login","data-test":"ac-user-detail-last-login"},{children:new Date(i).toLocaleDateString("en-us",{day:"numeric",year:"numeric",month:"long"})}))]}))]}))]}))},UserDetailHeaderActions=({userData:r})=>{var e=headerUseStyles()["classes"],t=useIntl();const n=useDispatch(),{id:s,status:o,organizationGuids:a=[],organization:i}=r,[l,c]=react.exports.useState(null);var u=l?"contextMenuId-"+s:void 0;const d=useSelector(selectIsSuperAdmin),p=useSelector(selectUserOrgs),$=useSelector(selectAdminCenterOrgGuid);t=userLabels(t).menuItemLabel;const[g,m]=react.exports.useState(),[f,b]=react.exports.useState();var y=d&&1<p.length&&f;return react.exports.useEffect(()=>{var e;p&&(e=p.find(e=>e.guid===$),m(p&&(null==e?void 0:e.name)||""),b((null==e?void 0:e.id)||0))},[p,$]),jsxRuntime.exports.jsxs("div",Object.assign({className:e.headerActionContainer},{children:[y&&jsxRuntime.exports.jsx(Select,Object.assign({name:"orgs-select",className:e.orgsName,sx:{fontSize:"12px"},value:g,onChange:e=>{const t=e.target.value;m(t);e=p.find(e=>e.name===t),b(e.id),e=d&&e.id?e.id:null==r?void 0:r.organizationId;n(actions$1.getUserApplicationRolesStart({userId:""+s,orgId:""+e}))},inputProps:{"data-testid":"ac-user-detail-select-org-name"}},{children:null===p||void 0===p?void 0:p.map((e,t)=>jsxRuntime.exports.jsx(MenuItem,Object.assign({value:e.name,"data-testid":"ac-user-detail-select-option","data-test":"ac-user-detail-select-option"},{children:(null==e?void 0:e.name)&&index.truncatedString(e.name,22)}),e.guid+"+"+t))})),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:t,"data-testid":"ac-user-details-header.user-menu-button","data-test":"ac-user-details-header.user-menu-button"},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({"aria-labelledby":"ac-user-details-header.user-menu-button","data-testid":"ac-user-details-header.user-menu-button","data-test":"ac-user-details-header.user-menu-button",size:"medium",onClick:e=>c(e.currentTarget)},{children:jsxRuntime.exports.jsx(MoreVert,{})}))})),jsxRuntime.exports.jsx(UserContextMenu,{anchorEl:l,id:u,open:!!l,onItemClick:()=>c(null),onClose:()=>c(null),hasMultipleOrgs:1<a.length,userId:s||"",orgGuid:(null==i?void 0:i.guid)||"",status:o,"data-testid":"admin-center-org-user.menu-icon","data-test":"admin-center-org-user.menu-icon",isUserDetailsPanelOpen:!0})]}))};var $$2=_export,$includes=arrayIncludes.includes,fails$5=fails$k,addToUnscopables=addToUnscopables$3,BROKEN_ON_SPARSE=fails$k(function(){return!Array(1).includes()}),anObject$2=($$2({target:"Array",proto:!0,forced:BROKEN_ON_SPARSE},{includes:function(e){return $includes(this,e,1<arguments.length?arguments[1]:void 0)}}),addToUnscopables("includes"),anObject$c),regexpFlags$1=function(){var e=anObject$2(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},fails$4=fails$k,global$3=global$m,$RegExp$2=global$m.RegExp,UNSUPPORTED_Y$1=fails$4(function(){var e=$RegExp$2("a","y");return e.lastIndex=2,null!==e.exec("abcd")}),MISSED_STICKY=UNSUPPORTED_Y$1||fails$4(function(){return!$RegExp$2("a","y").sticky}),BROKEN_CARET=UNSUPPORTED_Y$1||fails$4(function(){var e=$RegExp$2("^r","gy");return e.lastIndex=2,null!==e.exec("str")}),regexpStickyHelpers={BROKEN_CARET:BROKEN_CARET,MISSED_STICKY:MISSED_STICKY,UNSUPPORTED_Y:UNSUPPORTED_Y$1},fails$3=fails$k,global$2=global$m,$RegExp$1=global$m.RegExp,regexpUnsupportedDotAll=fails$3(function(){var e=$RegExp$1(".","s");return!(e.dotAll&&e.test("\n")&&"s"===e.flags)}),fails$2=fails$k,global$1=global$m,$RegExp=global$m.RegExp,regexpUnsupportedNcg=fails$2(function(){var e=$RegExp("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")}),call$3=functionCall,uncurryThis$4=functionUncurryThis,toString$3=toString$6,regexpFlags=regexpFlags$1,stickyHelpers=regexpStickyHelpers,shared=shared$4,create=objectCreate,getInternalState=internalState.get,UNSUPPORTED_DOT_ALL=regexpUnsupportedDotAll,UNSUPPORTED_NCG=regexpUnsupportedNcg,nativeReplace=shared("native-string-replace",String.prototype.replace),nativeExec=RegExp.prototype.exec,patchedExec=nativeExec,charAt$3=uncurryThis$4("".charAt),indexOf=uncurryThis$4("".indexOf),replace$1=uncurryThis$4("".replace),stringSlice$3=uncurryThis$4("".slice),UPDATES_LAST_INDEX_WRONG=function(){var e=/a/,t=/b*/g;return call$3(nativeExec,e,"a"),call$3(nativeExec,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),UNSUPPORTED_Y=stickyHelpers.BROKEN_CARET,NPCG_INCLUDED=void 0!==/()??/.exec("")[1],PATCH=UPDATES_LAST_INDEX_WRONG||NPCG_INCLUDED||UNSUPPORTED_Y||UNSUPPORTED_DOT_ALL||UNSUPPORTED_NCG,regexpExec$2=patchedExec=PATCH?function(e){var t,r,n,s,o,a,i=this,l=getInternalState(i),e=toString$3(e),c=l.raw;if(c)return c.lastIndex=i.lastIndex,d=call$3(patchedExec,c,e),i.lastIndex=c.lastIndex,d;var u=l.groups,c=UNSUPPORTED_Y&&i.sticky,d=call$3(regexpFlags,i),l=i.source,p=0,$=e;if(c&&(d=replace$1(d,"y",""),-1===indexOf(d,"g")&&(d+="g"),$=stringSlice$3(e,i.lastIndex),0<i.lastIndex&&(!i.multiline||i.multiline&&"\n"!==charAt$3(e,i.lastIndex-1))&&(l="(?: "+l+")",$=" "+$,p++),t=new RegExp("^(?:"+l+")",d)),NPCG_INCLUDED&&(t=new RegExp("^"+l+"$(?!\\s)",d)),UPDATES_LAST_INDEX_WRONG&&(r=i.lastIndex),n=call$3(nativeExec,c?t:i,$),c?n?(n.input=stringSlice$3(n.input,p),n[0]=stringSlice$3(n[0],p),n.index=i.lastIndex,i.lastIndex+=n[0].length):i.lastIndex=0:UPDATES_LAST_INDEX_WRONG&&n&&(i.lastIndex=i.global?n.index+n[0].length:r),NPCG_INCLUDED&&n&&1<n.length&&call$3(nativeReplace,n[0],t,function(){for(s=1;s<arguments.length-2;s++)void 0===arguments[s]&&(n[s]=void 0)}),n&&u)for(n.groups=o=create(null),s=0;s<u.length;s++)o[(a=u[s])[0]]=n[a[1]];return n}:patchedExec,$$1=_export,exec=regexpExec$2,isObject=(_export({target:"RegExp",proto:!0,forced:/./.exec!==exec},{exec:exec}),isObject$c),classof$1=classofRaw$2,wellKnownSymbol$3=wellKnownSymbol$j,MATCH$1=wellKnownSymbol$j("match"),isRegexp=function(e){var t;return isObject(e)&&(void 0!==(t=e[MATCH$1])?!!t:"RegExp"===classof$1(e))},isRegExp=isRegexp,$TypeError$1=TypeError,notARegexp=function(e){if(isRegExp(e))throw new $TypeError$1("The method doesn't accept regular expressions");return e},wellKnownSymbol$2=wellKnownSymbol$j,MATCH=wellKnownSymbol$j("match"),correctIsRegexpLogic=function(t){var r=/./;try{"/./"[t](r)}catch(e){try{return r[MATCH]=!1,"/./"[t](r)}catch(e){}}return!1},$=_export,uncurryThis$3=functionUncurryThis,notARegExp=notARegexp,requireObjectCoercible$2=requireObjectCoercible$7,toString$2=toString$6,correctIsRegExpLogic=correctIsRegexpLogic,stringIndexOf$1=functionUncurryThis("".indexOf),call$2=($({target:"String",proto:!0,forced:!correctIsRegExpLogic("includes")},{includes:function(e){return!!~stringIndexOf$1(toString$2(requireObjectCoercible$2(this)),toString$2(notARegExp(e)),1<arguments.length?arguments[1]:void 0)}}),functionCall),defineBuiltIn=defineBuiltIn$6,regexpExec$1=regexpExec$2,fails$1=fails$k,wellKnownSymbol$1=wellKnownSymbol$j,createNonEnumerableProperty=createNonEnumerableProperty$5,SPECIES=wellKnownSymbol$1("species"),RegExpPrototype=RegExp.prototype,fixRegexpWellKnownSymbolLogic=function(r,e,t,n){var a,s=wellKnownSymbol$1(r),i=!fails$1(function(){var e={};return e[s]=function(){return 7},7!==""[r](e)}),o=i&&!fails$1(function(){var e=!1,t=/a/;return"split"===r&&((t={constructor:{}}).constructor[SPECIES]=function(){return t},t.flags="",t[s]=/./[s]),t.exec=function(){return e=!0,null},t[s](""),!e});i&&o&&!t||(a=/./[s],o=e(s,""[r],function(e,t,r,n,s){var o=t.exec;return o===regexpExec$1||o===RegExpPrototype.exec?i&&!s?{done:!0,value:call$2(a,t,r,n)}:{done:!0,value:call$2(e,r,t,n)}:{done:!1}}),defineBuiltIn(String.prototype,r,o[0]),defineBuiltIn(RegExpPrototype,s,o[1])),n&&createNonEnumerableProperty(RegExpPrototype[s],"sham",!0)},uncurryThis$2=functionUncurryThis,toIntegerOrInfinity$1=toIntegerOrInfinity$5,toString$1=toString$6,requireObjectCoercible$1=requireObjectCoercible$7,charAt$2=uncurryThis$2("".charAt),charCodeAt=uncurryThis$2("".charCodeAt),stringSlice$2=uncurryThis$2("".slice),createMethod=function(s){return function(e,t){var r,e=toString$1(requireObjectCoercible$1(e)),t=toIntegerOrInfinity$1(t),n=e.length;return t<0||n<=t?s?"":void 0:(r=charCodeAt(e,t))<55296||56319<r||t+1===n||(n=charCodeAt(e,t+1))<56320||57343<n?s?charAt$2(e,t):r:s?stringSlice$2(e,t,t+2):n-56320+(r-55296<<10)+65536}},stringMultibyte={codeAt:createMethod(!1),charAt:createMethod(!0)},charAt$1=stringMultibyte.charAt,advanceStringIndex$1=function(e,t,r){return t+(r?charAt$1(e,t).length:1)},uncurryThis$1=functionUncurryThis,toObject=toObject$5,floor=Math.floor,charAt=uncurryThis$1("".charAt),replace=uncurryThis$1("".replace),stringSlice$1=uncurryThis$1("".slice),SUBSTITUTION_SYMBOLS=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,SUBSTITUTION_SYMBOLS_NO_NAMED=/\$([$&'`]|\d{1,2})/g,getSubstitution$1=function(o,a,i,l,c,e){var u=i+o.length,d=l.length,t=SUBSTITUTION_SYMBOLS_NO_NAMED;return void 0!==c&&(c=toObject(c),t=SUBSTITUTION_SYMBOLS),replace(e,t,function(e,t){var r;switch(charAt(t,0)){case"$":return"$";case"&":return o;case"`":return stringSlice$1(a,0,i);case"'":return stringSlice$1(a,u);case"<":r=c[stringSlice$1(t,1,-1)];break;default:var n,s=+t;if(0==s)return e;if(d<s)return 0!==(n=floor(s/10))&&n<=d?void 0===l[n-1]?charAt(t,1):l[n-1]+charAt(t,1):e;r=l[s-1]}return void 0===r?"":r})},call$1=functionCall,anObject$1=anObject$c,isCallable$1=isCallable$l,classof=classofRaw$2,regexpExec=regexpExec$2,$TypeError=TypeError,regexpExecAbstract=function(e,t){var r=e.exec;if(isCallable$1(r))return null!==(r=call$1(r,e,t))&&anObject$1(r),r;if("RegExp"===classof(e))return call$1(regexpExec,e,t);throw new $TypeError("RegExp#exec called on incompatible receiver")},apply=functionApply,call=functionCall,uncurryThis=functionUncurryThis,fixRegExpWellKnownSymbolLogic=fixRegexpWellKnownSymbolLogic,fails=fails$k,anObject=anObject$c,isCallable=isCallable$l,isNullOrUndefined=isNullOrUndefined$5,toIntegerOrInfinity=toIntegerOrInfinity$5,toLength=toLength$2,toString=toString$6,requireObjectCoercible=requireObjectCoercible$7,advanceStringIndex=advanceStringIndex$1,getMethod=getMethod$4,getSubstitution=getSubstitution$1,regExpExec=regexpExecAbstract,wellKnownSymbol=wellKnownSymbol$j,REPLACE=wellKnownSymbol$j("replace"),max=Math.max,min=Math.min,concat=uncurryThis([].concat),push=uncurryThis([].push),stringIndexOf=uncurryThis("".indexOf),stringSlice=uncurryThis("".slice),maybeToString=function(e){return void 0===e?e:String(e)},REPLACE_KEEPS_$0="$0"==="a".replace(/./,"$0"),REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE=!!/./[REPLACE]&&""===/./[REPLACE]("a","$0"),REPLACE_SUPPORTS_NAMED_GROUPS=!fails(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")});fixRegExpWellKnownSymbolLogic("replace",function(e,y,h){var S=REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE?"$":"$0";return[function(e,t){var r=requireObjectCoercible(this),n=isNullOrUndefined(e)?void 0:getMethod(e,REPLACE);return n?call(n,e,r,t):call(y,toString(r),e,t)},function(e,t){var r=anObject(this),n=toString(e);if("string"==typeof t&&-1===stringIndexOf(t,S)&&-1===stringIndexOf(t,"$<")){e=h(y,r,n,t);if(e.done)return e.value}for(var s,o=isCallable(t),a=(o||(t=toString(t)),r.global),i=(a&&(s=r.unicode,r.lastIndex=0),[]);null!==(d=regExpExec(r,n))&&(push(i,d),a);)""===toString(d[0])&&(r.lastIndex=advanceStringIndex(n,toLength(r.lastIndex),s));for(var l="",c=0,u=0;u<i.length;u++){for(var d,p=toString((d=i[u])[0]),$=max(min(toIntegerOrInfinity(d.index),n.length),0),g=[],m=1;m<d.length;m++)push(g,maybeToString(d[m]));var f=d.groups,b=o?(b=concat([p],g,$,n),void 0!==f&&push(b,f),toString(apply(t,void 0,b))):getSubstitution(p,n,$,g,f,t);c<=$&&(l+=stringSlice(n,c,$)+b,c=$+p.length)}return l+stringSlice(n,c)}]},!REPLACE_SUPPORTS_NAMED_GROUPS||!REPLACE_KEEPS_$0||REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);const LoaderSkeletonItem=()=>jsxRuntime.exports.jsxs(ListItem,Object.assign({alignItems:"center",sx:{height:"83px"}},{children:[jsxRuntime.exports.jsx(ListItemAvatar,{children:jsxRuntime.exports.jsx(Skeleton,{variant:"circular",width:40,height:40})}),jsxRuntime.exports.jsx(ListItemText,{children:jsxRuntime.exports.jsx(Skeleton,{variant:"text",width:150,height:30})}),jsxRuntime.exports.jsx(ListItemSecondaryAction,{children:jsxRuntime.exports.jsx(Skeleton,{variant:"text",width:87,height:35})})]})),LoaderSkeleton=()=>jsxRuntime.exports.jsxs(List,{children:[jsxRuntime.exports.jsx(LoaderSkeletonItem,{}),jsxRuntime.exports.jsx(Divider,{}),jsxRuntime.exports.jsx(LoaderSkeletonItem,{}),jsxRuntime.exports.jsx(Divider,{}),jsxRuntime.exports.jsx(LoaderSkeletonItem,{}),jsxRuntime.exports.jsx(Divider,{})]});let usedColors$1=[];const getAvatarColor$1=()=>{var e=Math.floor(Math.random()*avatarColors.length);return usedColors$1.includes(e)?getAvatarColor$1():((usedColors$1=usedColors$1.length>=avatarColors.length/2?[]:usedColors$1).push(e),avatarColors[e])},Applications=()=>{const n=useStyles()["classes"];var e=useSelector(selectUserApplicationRoles);return"loading"===useSelector(selectUserDetailPanelLoadingStatus)?jsxRuntime.exports.jsx(LoaderSkeleton,{}):jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2",sx:{color:"#2A323C",mb:1}},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-user-details-applications-tab-description",defaultMessage:"View the Applications this user has access to.",description:"User details applications tab description"})})),e.map((e,t)=>{var r;return jsxRuntime.exports.jsxs("div",Object.assign({"data-testid":"os-ac-user-details-applications-list","data-test":"os-ac-user-details-applications-list"},{children:[jsxRuntime.exports.jsxs(Box,Object.assign({className:n.appContainer},{children:[jsxRuntime.exports.jsxs(Box,Object.assign({sx:{display:"flex",flexDirection:"row",width:"70%"}},{children:[jsxRuntime.exports.jsx(Avatar,Object.assign({className:n.orgAvatar,sx:{background:""+getAvatarColor$1()}},{children:null!=e&&e.appName?""+(null==(r=null==(r=null==e?void 0:e.appName)?void 0:r.charAt(0))?void 0:r.toUpperCase())+String(t)[0]:"--"})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1",sx:{fontWeight:400,display:"flex",alignItems:"center"},"data-testid":"ac-user-details-application-name","data-test":"ac-user-details-application-name"},{children:null!=e&&e.appName?e.appName.replace(/\b\w/g,e=>e.toUpperCase()):""}))]})),jsxRuntime.exports.jsxs(Box,Object.assign({className:n.roleBox},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2",sx:{color:"#5C6269",fontWeight:700}},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-user-details-applications-tab-roles-label",defaultMessage:"Role: ",description:"User details applications tab description role label"})}))," ",jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2",sx:{fontWeight:400},"data-testid":"ac-user-details.application-role","data-test":"ac-user-details.application-role"},{children:null!=e&&e.name?index.truncatedString(e.name.replace(/\b\w/g,e=>e.toUpperCase()),10):""}))]}))]}),e.id),jsxRuntime.exports.jsx(Divider,{})]}),e.id)})]})};let usedColors=[];const getAvatarColor=()=>{var e=Math.floor(Math.random()*avatarColors.length);return usedColors.includes(e)?getAvatarColor():((usedColors=usedColors.length>=avatarColors.length/2?[]:usedColors).push(e),avatarColors[e])},Organizations=()=>{const n=useStyles()["classes"];var e=useSelector(selectUserOrgs);return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2",sx:{color:"#2A323C",mb:1}},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-user-details-org-tab-description",defaultMessage:"View the Organizations that this user is currently a part of.",description:"User details org tab description"})})),0<(null==e?void 0:e.length)?jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment,{children:e.map((e,t)=>{var r;return jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[jsxRuntime.exports.jsxs(Box,Object.assign({sx:{display:"flex",flexDirection:"row",alignItems:"center",py:4}},{children:[null!=e&&e.imageUrl?jsxRuntime.exports.jsx(Avatar,{alt:""+(null==(r=null==(r=null==e?void 0:e.name)?void 0:r.charAt(0))?void 0:r.toUpperCase())+String(t+1)[0],src:null==e?void 0:e.imageUrl,className:n.orgAvatar,"data-testid":"ac-user-details-organization-image","data-test":"ac-user-details-organization-image"}):jsxRuntime.exports.jsx(Avatar,Object.assign({className:n.orgAvatar,sx:{background:""+getAvatarColor()},"data-testid":"ac-user-details-organization-fallback-image","data-test":"ac-user-details-organization-fallback-image"},{children:null!=e&&e.name?""+(null==(r=null==(r=null==e?void 0:e.name)?void 0:r.charAt(0))?void 0:r.toUpperCase())+String(t)[0]:"--"})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1",sx:{fontWeight:400},"data-testid":"ac-user-details-organization-tab-org-name","data-test":"ac-user-details-organization-tab-org-name"},{children:null!=e&&e.name?e.name:""}))]})),jsxRuntime.exports.jsx(Divider,{})]},"os-admin-center-org-row-"+e.id)})}):null]})},muiTabA11yProps=e=>({id:"user-details-tab-"+e,"aria-controls":"user-details-tabpanel-"+e}),UserDetailTabs=()=>{const r=useStyles()["classes"],[n,s]=react.exports.useState(0);var e=useSelector(selectIsSuperAdmin),e=[{label:"Applications",disabled:!1,id:"applications",component:jsxRuntime.exports.jsx(Box,Object.assign({sx:{p:6,height:"calc(100vh - 325px)",overflow:"auto"}},{children:jsxRuntime.exports.jsx(Applications,{})}))},...e?[{label:"Organizations",disabled:!1,id:"organizations",component:jsxRuntime.exports.jsx(Box,Object.assign({sx:{p:6}},{children:jsxRuntime.exports.jsx(Organizations,{})}))}]:[]];return jsxRuntime.exports.jsxs("div",Object.assign({className:r.tabsContainer,"data-testid":"ac-user-details-panel-tabs","data-test":"ac-user-details-panel-tabs"},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:r.tabsParent},{children:jsxRuntime.exports.jsx(Tabs,Object.assign({sx:{"& .Sdk-MuiTab-root.Sdk-Mui-selected":{color:"#000000!important"}},onChange:(e,t)=>{s(t)},value:n},{children:e.map((e,t)=>jsxRuntime.exports.jsx(Tab,Object.assign({label:e.label,disabled:e.disabled},muiTabA11yProps(t),{"data-testid":e.id+"-tab","data-test":e.id+"-tab"}),e.id))}))})),jsxRuntime.exports.jsx(Divider,{className:r.divider}),jsxRuntime.exports.jsx("div",{children:e.map((e,t)=>jsxRuntime.exports.jsx("div",Object.assign({className:r.secondBox},{children:jsxRuntime.exports.jsx(TabPanel,Object.assign({value:n,index:t},{children:e.component}))}),e.id))})]}))},{header:PanelHeader,container:PanelContainer,content:PanelContent}=panelComponents,MainLayout=({id:e,isPanelFullScreen:t})=>{const r=useDispatch();var n=useIntl(),n=userLabels(n)["panelHeader"],s=useSelector(selectUserDetailPanelLoadingStatus),o=useSelector(selectUserDetailPanelUserData),a="loading"===s,s="failure"===s;return react.exports.useEffect(()=>{e&&r(actions$1.fetchUserStart({userId:e}))},[r,e]),react.exports.useEffect(()=>()=>{r(actions$1.resetUserRoles())},[]),jsxRuntime.exports.jsxs(PanelContainer,Object.assign({panelId:PANEL_ID,isFullScreen:t},{children:[jsxRuntime.exports.jsx(PanelHeader,{title:n,testId:"ac-user-details.header-title",PanelActions:o&&jsxRuntime.exports.jsx(UserDetailHeaderActions,{userData:o}),onPanelClose:()=>{r(hidePanel(PANEL_ID))}}),jsxRuntime.exports.jsxs(PanelContent,Object.assign({isLoading:a,isErrored:s},{children:[o&&jsxRuntime.exports.jsx(UserDetailCard,{userData:o}),jsxRuntime.exports.jsx(UserDetailTabs,{})]}))]}))},UserDetailsPanel=e=>jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getAdminCenterUsersModule()]},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(AIWareCacheProvider,{children:jsxRuntime.exports.jsx(MainLayout,Object.assign({},e))})})}))}),TableSearchInputButton=tableSearchComponents["TableSearchInputButton"],UserTableSearchButton=()=>{const[e,t]=react.exports.useState(""),[r,n]=react.exports.useState(!1);var s=useSelector(selectSearchTerm),o=useSelector(selectIsSearching);const a=useDispatch(),i=react.exports.useRef(debounce_1(e=>{a(actions$1.setSearchTerm(e))},1e3)).current;return jsxRuntime.exports.jsx(TableSearchInputButton,{onChange:e=>{t(e.target.value),e.target.value?(a(actions$1.setIsSearching(!0)),i(e.target.value)):i("")},onClear:()=>{t(""),a(actions$1.setSearchTerm(""))},onToggleSearch:()=>{n(e=>!e)},testId:"admin-center-org-user-table-search",placeholderText:"Search by name",searchValue:s,inputValue:e,isSearchVisible:r,isSearching:o,searchItemTooltipText:"Users"})},UsersPanel=()=>{var e=useStyles$1()["classes"];const t=useDispatch();var r=useSelector(organizationInvites_selector.selectPendingOrgInvites);const n=useSelector(selectAdminCenterOrgId),s=useSelector(selectAdminCenterOrgGuid),o=useSelector(selectIsFullscreenEnabled);react.exports.useEffect(()=>{t(actions$2.organizationInvitesState.fetchPendingInvitesStart(n))},[t,n]);r=jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx("section",Object.assign({className:e.root},{children:jsxRuntime.exports.jsxs("header",Object.assign({className:e.header},{children:[jsxRuntime.exports.jsx(Box,Object.assign({sx:{mr:2,display:"flex",alignItems:"center","& h5":{lineHeight:"28px"}}},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h5","data-testid":"os-admin-center-panel.users.table.header","data-test":"os-admin-center-panel.users.table.header"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-panel.users.table.header",defaultMessage:"Users",description:"Users Header"})}))})),jsxRuntime.exports.jsx(Box,Object.assign({className:e.searchBox,sx:{maxWidth:o?"100%":"440px"}},{children:jsxRuntime.exports.jsx(UserTableSearchButton,{})})),jsxRuntime.exports.jsxs(Box,Object.assign({className:e.headerButtons},{children:[jsxRuntime.exports.jsxs(Button,Object.assign({variant:"outlined",onClick:()=>handleViewRequests(t,o),"data-test":"os-admin-center-panel.users.table.requests-button"},{children:[jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-panel.users.user-requests.btn",defaultMessage:"User Requests",description:"User Requests tab button"})," ","(",r.length,")"]})),jsxRuntime.exports.jsxs(Button,Object.assign({variant:"contained",sx:{ml:"13px"},className:e.addUserBtn,onClick:()=>handleClickInviteUsers(t,o,n,s),"data-test":"os-admin-center-panel.users.table.invite-button"},{children:[jsxRuntime.exports.jsx(AddUser,{}),jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-panel.users.invite-user.btn",defaultMessage:"Invite User",description:"Invite User tab button"})]}))]}))]}))})),jsxRuntime.exports.jsx("div",Object.assign({className:e.tableWrapper},{children:jsxRuntime.exports.jsx(UserTable,{})}))]});return o?jsxRuntime.exports.jsx(AIWareThemeProvider,{children:r}):r};export{UserDetailsPanel,UsersPanel,actions,getAdminCenterUsersModule,initialState,namespace,rootReducer};
|
|
92
|
+
`,operationName:e},t))).users})}const selectOrgUsers=e=>{var{users:e,hasMore:t,offset:r}=(null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace$1])||{};return{users:e,hasMore:t,offset:r}},selectStatus=e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace$1].status},selectUserOrgs=e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace$1].userOrgs},selectUserApplicationRoles=e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace$1].userRoles},selectUserDetailPanelUserData=e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace$1].userDetailPanel.userData},selectUserDetailPanelLoadingStatus=e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace$1].userDetailPanel.loadingStatus},selectSearchTerm=e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace$1].searchTerm},selectIsSearching=e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace$1].isSearching};function*fetchUserByIdSaga(e){var t;try{var r=yield select(selectApiConfigs),n=yield select(selectAdminCenterOrgParameter),s=yield select(selectAdminCenterOrgIdString),o=yield select(selectIsSuperAdmin),a=e.payload["userId"],i=(yield fetchOrgUserById(r,a,n))["records"];if(!i||0===i.length)throw new Error("User not found");"0"!==s&&(yield put(actions.adminCenterUsers.getUserApplicationRolesStart({userId:i[0].id||"",orgId:s||""}))),yield put(actions.adminCenterUsers.fetchUserSuccess({user:i[0]})),o&&null!=(t=i[0])&&t.organizationGuids&&(yield put(actions.adminCenterUsers.fetchUserOrganizationsStart({orgGuids:i[0].organizationGuids})))}catch(e){console.log(e),yield put(actions.adminCenterUsers.fetchUserFailure())}}function*fetchUsers(e,t){var r=yield select(selectApiConfigs),n=yield select(selectAdminCenterOrgParameter),s=yield select(selectOrgId),e={name:e,orgId:null!=n?n:s},n=(yield fetchOrgUsers(r,t,PAGE_LIMIT,e))["records"];return n}function*fetchUsersSaga(e){try{var t,r=yield select(selectSearchTerm),{offset:n,hasMore:s}=yield select(selectOrgUsers);s&&(t=yield call$i(fetchUsers,r,n),yield put(actions.adminCenterUsers.fetchOrgUsersSuccess({records:t,hasMore:PAGE_LIMIT===t.length,nextOffset:n+PAGE_LIMIT})))}catch(e){console.log(e),yield put(actions.adminCenterUsers.fetchOrgUsersFailure())}}function*searchUsersSaga(e){try{var t=yield call$i(fetchUsers,e.payload,0);yield put(actions.adminCenterUsers.fetchOrgUsersSuccess({records:t,hasMore:PAGE_LIMIT===t.length,nextOffset:PAGE_LIMIT}))}catch(e){console.log(e),yield put(actions.adminCenterUsers.fetchOrgUsersFailure())}}function*removeUserFromOrgSaga(e){var{userId:e,orgGuid:t}=e.payload;try{var r=(yield removeUserFromOrg(yield select(selectApiConfigs),e,t))["id"];yield put(actions.adminCenterUsers.removeUserFromOrgSuccess(r||""))}catch(e){console.log(e),yield put(actions.adminCenterUsers.removeUserFromOrgFailure())}}function*updateUserStatusSaga(e){var{userId:e,status:t}=e.payload,r=yield select(preferredLanguageSelector),r=AIWareFormatMessage(r);try{var{id:n,status:s}=yield updateUserStatus(yield select(selectApiConfigs),e,t);n&&s&&(yield put(actions.adminCenterUsers.updateUserStatusSuccess({id:n,status:s})),yield put(showMessage({severity:MessageSeverity.Success,content:isEqual_1(process.env.NODE_ENV,"development")?"This user has been successfully "+s:r({id:"adminCenterUsers.updateUserStatusSuccess",defaultMessage:[{type:0,value:"This user has been successfully "},{type:1,value:"status"}]},{status:s})})))}catch(e){console.error(e),yield put(actions.adminCenterUsers.updateUserStatusFailure()),yield put(showMessage({severity:MessageSeverity.Error,content:isEqual_1(process.env.NODE_ENV,"development")?"This user status update failed":r({id:"adminCenterUsers.updateUserStatusFailure",defaultMessage:[{type:0,value:"This user status update failed"}]})}))}}function*fetchUserOrganizationsSaga(e){e=e.payload.orgGuids;try{const r=yield select(selectApiConfigs);var t=(yield Promise.all(e.map(e=>fetchUserOrganizations(r,e)))).map(({records:e})=>e).flat();yield put(actions.adminCenterUsers.fetchUserOrganizationsSuccess({orgs:t}))}catch(e){console.log(e),yield put(actions.adminCenterUsers.fetchUserOrganizationsFailure())}}function*getUserApplicationRolesSaga(e){try{var t=yield select(selectApiConfigs),{userId:r,orgId:n}=e.payload,s=yield call$i(getUserApplicationRoles,t,r,n);yield put(actions.adminCenterUsers.getUserApplicationRolesSuccess({roles:s}))}catch(e){console.log(e),yield put(actions.adminCenterUsers.getUserApplicationRolesFailure())}}function*fetchUsersWatcher(){yield takeEvery$1(actions.adminCenterUsers.fetchOrgUsersStart.type,fetchUsersSaga)}function*fetchUserByIdWatcher(){yield takeEvery$1(actions.adminCenterUsers.fetchUserStart.type,fetchUserByIdSaga)}function*removeUserFromOrgWatcher(){yield takeEvery$1(actions.adminCenterUsers.removeUserFromOrgStart.type,removeUserFromOrgSaga)}function*updateUserStatusWatcher(){yield takeEvery$1(actions.adminCenterUsers.updateUserStatusStart.type,updateUserStatusSaga)}function*fetchUserOrganizationsWatcher(){yield takeEvery$1(actions.adminCenterUsers.fetchUserOrganizationsStart.type,fetchUserOrganizationsSaga)}function*getUserApplicationRolesSagaWatcher(){yield takeEvery$1(actions.adminCenterUsers.getUserApplicationRolesStart.type,getUserApplicationRolesSaga)}function*searchUsersWatcher(){yield takeEvery$1(actions.adminCenterUsers.setSearchTerm.type,searchUsersSaga)}function*rootSaga(){yield all([fetchUsersWatcher(),removeUserFromOrgWatcher(),updateUserStatusWatcher(),fetchUserOrganizationsWatcher(),getUserApplicationRolesSagaWatcher(),fetchUserByIdWatcher(),searchUsersWatcher()])}function getAdminCenterUsersModule(){return{id:SLICE_NAME,reducerMap:{[SLICE_NAME]:rootReducer},sagas:[rootSaga],initialActions:[]}}const openUserDetailsPanel=(e,t,r)=>{e={name:AvailableComponents.USER_DETAILS_PANEL,config:{name:"User Table Settings",id:e}},r={type:AvailablePanels.APP_BAR_PANEL_TEMPLATE,marginTop:r?0:55,marginStart:r?0:80,size:EPanelSize.medium,parentPanelId:AvailableComponents.ADMIN_CENTER,dimmed:0,dimmedStatus:"dimParent",borderBottom:!0};t(mountPanel({panelId:AvailableComponents.USER_DETAILS_PANEL,microFrontend:e,panelConfig:r}))},UserContextMenu=({anchorEl:e,id:t,open:r,onClose:n,onItemClick:s,userId:o,orgGuid:a,status:i,hasMultipleOrgs:l,isUserDetailsPanelOpen:c=!1})=>{var u=contextMenuStyles({width:44})["classes"];const d=useDispatch();var p=useOrganizationPermissions(EAuthSubResourceType.User),$=p.hasPermission(EPermissionAction.Create),p=p.hasPermission(EPermissionAction.Delete),g=null==(g=useSelector(userSelector))?void 0:g.userId;const m=useSelector(selectIsFullscreenEnabled);var $=o!==g&&(i===EUserStatus.deactivated?$:p),f=i===EUserStatus.deleted,g=!(o===g)&&!f&&l&&p,p=!f&&!l&&$;return jsxRuntime.exports.jsx(Popover,Object.assign({anchorEl:e,id:t,open:r,onClose:n,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"right"}},{children:jsxRuntime.exports.jsxs(MenuList,Object.assign({role:"menu",className:u.menuList,"data-testid":"admin-center-user.menu","data-test":"admin-center-user.menu",sx:{padding:"7.5px"}},{children:[!c&&jsxRuntime.exports.jsx(MenuItem,Object.assign({"data-testid":"ac-user-context.menu-item.user-details","data-test":"context-menu-item",onClick:e=>{null!=s&&s(),openUserDetailsPanel(o,d,m)},className:u.menuItem,sx:{cursor:"pointer"}},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"admin-center-user-row.open-user-details-panel-btn",defaultMessage:"User Details",description:"User Detail row context menu"})})),jsxRuntime.exports.jsx(MenuItem,Object.assign({"data-testid":"ac-user.menu-item.status-update","data-test":"context-menu-item",onClick:()=>{null!=s&&s(),d(actions.adminCenterUsers.updateUserStatusStart({userId:o,status:i===EUserStatus.deactivated?EUserStatus.active:EUserStatus.deactivated}))},sx:{cursor:"pointer"},className:u.menuItem,disabled:!p},{children:i===EUserStatus.deactivated?jsxRuntime.exports.jsx(FormattedMessage,{id:"ac-users.user-row.activate-btn",defaultMessage:"Activate",description:"Activate button in the user row context menu"}):jsxRuntime.exports.jsx(FormattedMessage,{id:"ac-users.user-row.deactivate-btn",defaultMessage:"Deactivate",description:"Deactivate button in the user row context menu"})})),jsxRuntime.exports.jsx(MenuItem,Object.assign({onClick:()=>{null!=s&&s(),d(actions.adminCenterUsers.removeUserFromOrgStart({userId:o,orgGuid:a}))},className:u.menuItem,"data-test":"context-menu-item",disabled:!g,sx:{cursor:g?"pointer":"not-allowed"},"data-testid":"admin-center-user.menu-item.remove-from-org"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"ac-users.user-row.remove-from-org-btn",defaultMessage:"Remove from Org",description:"Remove from Org button in the user row context menu"})}))]}))}))},useStyles$2=makeStyles()((e,{})=>({userAvatar:{border:"2px solid #FFFFFF",height:"40px",width:"40px",marginRight:"14px",fontSize:"14px",color:"white"},row:{padding:"13px",height:"100%",overflow:"hidden",boxSizing:"border-box","&:hover":{backgroundColor:"#f2f5f9",cursor:"pointer"}},userName:{alignSelf:"center"},truncate:{paddingRight:"20px","& p":{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}}})),UserRow=({user:{id:t,imageUrl:e,firstName:r,lastName:n,email:s,lastLoginDateTime:o,status:a,organizationGuids:i=[],organization:l,avatarColor:c}})=>{var u=useStyles$2({status:a})["classes"];const[d,p]=react.exports.useState(null);var $=d?"contextMenuId-"+t:void 0;const g=useDispatch(),m=useSelector(selectIsFullscreenEnabled);return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs(Grid,Object.assign({direction:"row",justifyContent:"space-between",alignItems:"center",container:!0,"data-testid":"admin-center-org-user-row-"+t,"data-test":"admin-center-org-user-row-"+t,className:u.row,onClick:e=>{d||openUserDetailsPanel(t,g,m)}},{children:[jsxRuntime.exports.jsxs(Grid,Object.assign({container:!0,item:!0,xs:11,alignItems:"center"},{children:[jsxRuntime.exports.jsxs(Grid,Object.assign({sx:{display:"flex"},xs:4,item:!0,className:u.truncate,"data-testid":"admin-center-org-user.avatar-name-col","data-test":"admin-center-org-user.avatar-name-col"},{children:[e?jsxRuntime.exports.jsx(Avatar,{alt:r+" "+n,src:e,className:u.userAvatar}):jsxRuntime.exports.jsx(Avatar,Object.assign({className:u.userAvatar,sx:{background:c}},{children:(e=n||"",""+(null==(c=null==(c=r||"")?void 0:c.charAt(0))?void 0:c.toUpperCase())+(null==(c=null==e?void 0:e.charAt(0))?void 0:c.toUpperCase()))})),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:r+" "+n,arrow:!0},{children:jsxRuntime.exports.jsx(Typography,Object.assign({className:u.userName,variant:"body2",sx:{fontWeight:400},"data-testid":"admin-center-org-user.user-name","data-test":"admin-center-org-user.user-name"},{children:r+" "+n}))}))]})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:4,item:!0,className:u.truncate,"data-testid":"admin-center-org-user.email-col","data-test":"admin-center-org-user.email-col"},{children:jsxRuntime.exports.jsx(Tooltip,Object.assign({title:s||"",arrow:!0},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2",sx:{fontWeight:400}},{children:s}))}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:3,item:!0,"data-testid":"admin-center-org-user.last-login-col","data-test":"admin-center-org-user.last-login-col"},{children:o&&jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2",sx:{mb:"-6px",fontWeight:400}},{children:new Date(o).toLocaleDateString()})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:index.formatTime(new Date(o))}))]})})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:1,item:!0,"data-testid":"admin-center-org-user.status-col","data-test":"admin-center-org-user.status-col"},{children:jsxRuntime.exports.jsx(UserStatusBadge,{status:a})}))]})),jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:1,sx:{textAlign:"end"},"data-testid":"admin-center-org-user.menu-col","data-test":"admin-center-org-user.menu-col"},{children:[jsxRuntime.exports.jsx(IconButton,Object.assign({"data-testid":"user-row-menu-button-"+t,"data-test":"user-row-menu-button-"+t,onClick:e=>{e.stopPropagation(),p(e.currentTarget)},size:"small"},{children:jsxRuntime.exports.jsx(MoreVert,{fontSize:"small"})})),jsxRuntime.exports.jsx(UserContextMenu,{anchorEl:d,id:$,open:!!d,onItemClick:()=>{p(null)},onClose:()=>{p(null)},userId:t||"",orgGuid:(null==l?void 0:l.guid)||"",hasMultipleOrgs:1<i.length,status:a,"data-testid":"admin-center-org-user.menu-icon","data-test":"admin-center-org-user.menu-icon"})]}))]})),jsxRuntime.exports.jsx(Divider,{})]})},{TableInfiniteScroll}=tableInfiniteScroll["jsx"],TableHeader=()=>jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs(Grid,Object.assign({direction:"row",justifyContent:"space-between",alignItems:"center",container:!0,"data-testid":"admin-center-org-user-table-header","data-test":"admin-center-org-user-table-header",sx:{pl:"13px",pr:"13px",height:"35px"}},{children:[jsxRuntime.exports.jsxs(Grid,Object.assign({container:!0,item:!0,xs:11},{children:[jsxRuntime.exports.jsx(Grid,Object.assign({xs:4,item:!0,"data-test":"os-admin-center.org-user-table-header.name"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"ac-user-table.header.name-col",defaultMessage:"Name",description:"Name column header"})}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:4,item:!0,"data-test":"os-admin-center.org-user-table-header.email"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"ac-user-table.header.email-col",defaultMessage:"Email",description:"Email column header"})}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:3,item:!0,"data-test":"os-admin-center.org-user-table-header.last-login"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"ac-user-table.header.last-login-col",defaultMessage:"Last Login",description:"Last Login column header"})}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:1,item:!0,"data-test":"os-admin-center.org-user-table-header.status"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"ac-user-table.header.status-col",defaultMessage:"Status",description:"Status column header"})}))})),jsxRuntime.exports.jsx(Grid,{xs:1,item:!0})]})),jsxRuntime.exports.jsx(Grid,{xs:1,item:!0})]})),jsxRuntime.exports.jsx(Divider,{})]}),itemHeight=68,TableRow=({item:e})=>jsxRuntime.exports.jsx(Box,Object.assign({"data-test":"users-table-row",sx:{width:"100%",height:itemHeight+"px"}},{children:jsxRuntime.exports.jsx(UserRow,{user:e})}),"users-table-row-"+e.id),UserTable=()=>{var{users:e=[],hasMore:t,offset:r}=useSelector(selectOrgUsers),n=useSelector(selectStatus);const s=useDispatch();var o=react.exports.useCallback(()=>{s(actions$1.fetchOrgUsersStart())},[s]);return jsxRuntime.exports.jsx(TableInfiniteScroll,{hasMore:!!t,fetchMore:o,fetchOnMount:0===e.length,offset:r||0,items:e,itemHeight:itemHeight,isLoading:"loading"===n||"pending"===n,error:"failure"===n,TableRowComponent:TableRow,TableHeaderComponent:jsxRuntime.exports.jsx(TableHeader,{}),adjustTableHeight:-35})},inviteUsersPanel="INVITE_USERS_PANEL",inviteRequestsPanel="INVITE_REQUESTS_PANEL",handleClickInviteUsers=(e,t,r,n)=>{r={name:inviteUsersPanel,config:{name:"Invite Users",organizationId:r||void 0,organizationGuid:n||void 0}},n={type:"APP_BAR_PANEL_TEMPLATE",marginTop:t?0:55,marginStart:t?0:80,size:"medium",parentPanelId:"ADMIN_CENTER",dimmed:0,dimmedStatus:"dimParent",borderBottom:!0};e(mountPanel({panelId:inviteUsersPanel,microFrontend:r,panelConfig:n}))},handleViewRequests=(e,t)=>{var r={name:inviteRequestsPanel,config:{name:"Invite Requests"}},t={type:"APP_BAR_PANEL_TEMPLATE",marginTop:t?0:55,marginStart:t?0:80,size:"medium",parentPanelId:"ADMIN_CENTER",dimmed:0,dimmedStatus:"dimParent",borderBottom:!0,header:{title:jsxRuntime.exports.jsx(FormattedMessage,{id:"admin-center.users.button.invite-requests",defaultMessage:"Invite Requests",description:"Invite Requests header title"})}};e(mountPanel({panelId:inviteRequestsPanel,microFrontend:r,panelConfig:t}))},userLabels=e=>({panelHeader:e.formatMessage({id:"ac-user-details-header-title",defaultMessage:[{type:0,value:"USER DETAILS"}]}),panelCloseTitle:e.formatMessage({id:"ac-user-details-header-close-btn",defaultMessage:[{type:0,value:"Close Panel"}]}),menuItemLabel:e.formatMessage({id:"ac-user-details-header-edit-btn",defaultMessage:[{type:0,value:"Menu"}]}),logoAltTitle:e.formatMessage({id:"ac-user-detail-header-image-alt",defaultMessage:[{type:0,value:"User Avatar"}]}),lastLoginLabel:e.formatMessage({id:"ac-user-detail-header-last-login.label",defaultMessage:[{type:0,value:"Last Login"}]}),activeUserLabel:e.formatMessage({id:"ac-users.user-row.activate-user-btn",defaultMessage:[{type:0,value:"Activate User"}]}),deactivateUserLabel:e.formatMessage({id:"ac-users.user-row.deactivate-user-btn",defaultMessage:[{type:0,value:"Deactivate User"}]}),removeOrgLabel:e.formatMessage({id:"ac-users.user-row.remove-user-from-org-btn",defaultMessage:[{type:0,value:"Remove from Org"}]})}),PANEL_ID=AvailableComponents.USER_DETAILS_PANEL,useStyles$1=makeStyles()(e=>({root:{display:"flex",flexDirection:"column"},header:{display:"flex",justifyContent:"space-between",padding:e.spacing(4),borderBottom:"0.5px solid "+e.palette.divider,"& button":{height:"28px"}},tableWrapper:{height:"calc(100vh - 55px - 64px - 69px - 20px)",overflow:"hidden"},toolbar:{alignItems:"baseline","& button svg":{marginRight:"5px"},display:"flex",justifyContent:"center"},addUserBtn:{"& svg":{marginRight:"10px",height:"14px",width:"14px"}},searchBox:{display:"flex",flexGrow:1,alignItems:"center",justifyContent:"flex-end",padding:"0 16px"},headerButtons:{display:"flex",alignItems:"center"}})),useStyles=makeStyles()(e=>({root:{display:"flex",flexDirection:"column",height:"calc(100vh - 55px - 5px)",alignItems:"stretch",justifyContent:"space-between"},panelRoot:{width:"100%"},panelContainer:{display:"flex",flexDirection:"column",width:"100%"},panelBody:{display:"flex",flexGrow:1},panelLoading:{height:300},panelContent:{width:"100%",padding:"0"},tabsContainer:{"& .Sdk-Mui-selected":{color:"black"},"& .Sdk-MuiTabs-indicator":{backgroundColor:"#000"}},tabsParent:{paddingLeft:e.spacing(4),"& div":{borderBottom:"none"},"& div button":{fontFamily:"Nunito",fontWeight:400,flex:"0 1 auto !important",minWidth:"unset"}},divider:{opacity:.9},secondBox:{display:"flex",flexDirection:"column",flexGrow:1},orgAvatar:{border:"2px solid #FFFFFF",height:"40px",width:"40px",marginRight:"14px",fontSize:"14px",color:"white",fontWeight:400,lineHeight:"20px"},appContainer:{display:"flex",width:"100%",padding:"20px 0",flexDirection:"row",alignItems:"center"},roleBox:{width:"30%",display:"flex",alignItems:"center",justifyContent:"flex-start"}})),headerUseStyles=makeStyles()(e=>({headerActionContainer:{alignItems:"center",display:"flex",flexGrow:1,height:"100%",justifyContent:"flex-end",paddingRight:"10px"},header:{alignItems:"center",display:"flex",justifyContent:"space-between",height:"55px",margin:"10px 10px 10px 30px"},title:{color:"#5C6269"},cardContainer:{display:"flex",padding:"20px 10px 20px 10px"},cardImgContainer:{position:"relative",marginLeft:"20px"},email:{color:"#5C6269",fontWeight:"400"},login:{color:"#2A323C",fontWeight:"400"},userAvatar:{border:"2px solid #FFFFFF",height:"90px",width:"90px",fontSize:"35px",color:"white"},statusLabel:{position:"absolute",bottom:"2px",left:"50%",right:"50%",display:"flex",justifyContent:"center"},divider:{opacity:.9},orgsName:{color:"black",fontWeight:400,fontSize:"12px",maxHeight:"26px",paddingTop:"1px",transform:"translateY(1px)",marginRight:"14px","& fieldset":{border:"1px solid #D5DFE9"}}})),UserDetailCard=({userData:e})=>{var t=useIntl(),r=headerUseStyles()["classes"],{logoAltTitle:t,lastLoginLabel:n}=userLabels(t),{imageUrl:e,avatarColor:s,firstName:o,lastName:a,lastLoginDateTime:i,status:l,email:c}=e;return jsxRuntime.exports.jsxs(Box,Object.assign({className:r.cardContainer},{children:[jsxRuntime.exports.jsxs(Box,Object.assign({className:r.cardImgContainer},{children:[e?jsxRuntime.exports.jsx(Avatar,{alt:t,src:e,className:r.userAvatar,sx:{border:"2px solid rgb(255, 255, 255)",height:"90px",width:"90px",fontSize:"35px",color:"white"},"data-testid":"ac-user-details-header-avatar","data-test":"ac-user-details-header-avatar"}):jsxRuntime.exports.jsx(Avatar,Object.assign({className:r.userAvatar,sx:{background:s,border:"2px solid rgb(255, 255, 255)",height:"90px",width:"90px",fontSize:"35px",color:"white"},"data-testid":"ac-user-details-header-avatar-fallback","data-test":"ac-user-details-header-avatar-fallback"},{children:(t=a||"",""+(null==(e=null==(e=o||"")?void 0:e.charAt(0))?void 0:e.toUpperCase())+(null==(e=null==t?void 0:t.charAt(0))?void 0:e.toUpperCase()))})),jsxRuntime.exports.jsx("div",Object.assign({className:r.statusLabel,"data-testid":"ac-user-details-status-badge-wrapper","data-test":"ac-user-details-status-badge-wrapper"},{children:jsxRuntime.exports.jsx(UserStatusBadge,{status:l})}))]})),jsxRuntime.exports.jsxs(Box,Object.assign({sx:{pl:2}},{children:[jsxRuntime.exports.jsx(Box,Object.assign({sx:{mb:1}},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h1","data-testid":"ac-user-detail-first-and-last-name","data-test":"ac-user-detail-first-and-last-name"},{children:o+" "+a}))})),jsxRuntime.exports.jsx(Box,{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2",className:r.email,"data-testid":"ac-user-detail-email-address","data-test":"ac-user-detail-email-address"},{children:c}))}),i&&jsxRuntime.exports.jsxs(Box,Object.assign({sx:{mt:1}},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption",className:r.email},{children:n})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2",className:r.login,"data-testid":"ac-user-detail-last-login","data-test":"ac-user-detail-last-login"},{children:new Date(i).toLocaleDateString("en-us",{day:"numeric",year:"numeric",month:"long"})}))]}))]}))]}))};var tryToString=tryToString$5,$TypeError$2=TypeError,deletePropertyOrThrow$1=function(e,t){if(!delete e[t])throw new $TypeError$2("Cannot delete property "+tryToString(t)+" of "+tryToString(e))},arraySlice=arraySlice$2,floor$1=Math.floor,sort=function(e,t){var r=e.length;if(r<8)for(var n,s,o=1;o<r;){for(n=e[s=o];s&&0<t(e[s-1],n);)e[s]=e[--s];s!==o++&&(e[s]=n)}else for(var a=floor$1(r/2),i=sort(arraySlice(e,0,a),t),l=sort(arraySlice(e,a),t),c=i.length,u=l.length,d=0,p=0;d<c||p<u;)e[d+p]=d<c&&p<u?t(i[d],l[p])<=0?i[d++]:l[p++]:d<c?i[d++]:l[p++];return e},arraySort=sort,fails$7=fails$m,arrayMethodIsStrict$1=function(e,t){var r=[][e];return!!r&&fails$7(function(){r.call(null,t||function(){return 1},1)})},userAgent$1=engineUserAgent,firefox=engineUserAgent.match(/firefox\/(\d+)/i),engineFfVersion=!!firefox&&+firefox[1],UA=engineUserAgent,engineIsIeOrEdge=/MSIE|Trident/.test(UA),userAgent=engineUserAgent,webkit=engineUserAgent.match(/AppleWebKit\/(\d+)\./),engineWebkitVersion=!!webkit&&+webkit[1],$$3=_export,uncurryThis$5=functionUncurryThis,aCallable=aCallable$9,toObject$1=toObject$6,lengthOfArrayLike=lengthOfArrayLike$5,deletePropertyOrThrow=deletePropertyOrThrow$1,toString$4=toString$7,fails$6=fails$m,internalSort=arraySort,arrayMethodIsStrict=arrayMethodIsStrict$1,FF=engineFfVersion,IE_OR_EDGE=engineIsIeOrEdge,V8=engineV8Version,WEBKIT=engineWebkitVersion,test=[],nativeSort=uncurryThis$5(test.sort),push$1=uncurryThis$5(test.push),FAILS_ON_UNDEFINED=fails$6(function(){test.sort(void 0)}),FAILS_ON_NULL=fails$6(function(){test.sort(null)}),STRICT_METHOD=arrayMethodIsStrict("sort"),STABLE_SORT=!fails$6(function(){if(V8)return V8<70;if(!(FF&&3<FF)){if(IE_OR_EDGE)return!0;if(WEBKIT)return WEBKIT<603;for(var e,t,r,n="",s=65;s<76;s++){switch(e=String.fromCharCode(s),s){case 66:case 69:case 70:case 72:t=3;break;case 68:case 71:t=4;break;default:t=2}for(r=0;r<47;r++)test.push({k:e+r,v:t})}for(test.sort(function(e,t){return t.v-e.v}),r=0;r<test.length;r++)e=test[r].k.charAt(0),n.charAt(n.length-1)!==e&&(n+=e);return"DGBEFHACIJK"!==n}}),FORCED=FAILS_ON_UNDEFINED||!FAILS_ON_NULL||!STRICT_METHOD||!STABLE_SORT,getSortCompare=function(r){return function(e,t){return void 0===t?-1:void 0===e?1:void 0!==r?+r(e,t)||0:toString$4(e)>toString$4(t)?1:-1}};$$3({target:"Array",proto:!0,forced:FORCED},{sort:function(e){void 0!==e&&aCallable(e);var t=toObject$1(this);if(STABLE_SORT)return void 0===e?nativeSort(t):nativeSort(t,e);for(var r,n=[],s=lengthOfArrayLike(t),o=0;o<s;o++)o in t&&push$1(n,t[o]);for(internalSort(n,getSortCompare(e)),r=lengthOfArrayLike(n),o=0;o<r;)t[o]=n[o++];for(;o<s;)deletePropertyOrThrow(t,o++);return t}});const UserDetailHeaderActions=({userData:r})=>{var e=headerUseStyles()["classes"],t=useIntl();const n=useDispatch(),{id:s,status:o,organizationGuids:a=[],organization:i}=r,[l,c]=react.exports.useState(null);var u=l?"contextMenuId-"+s:void 0;const d=useSelector(selectIsSuperAdmin),p=useSelector(selectUserOrgs),$=useSelector(selectAdminCenterOrgGuid);t=userLabels(t).menuItemLabel;const[g,m]=react.exports.useState(),[f,b]=react.exports.useState();var y=d&&1<p.length&&f;return react.exports.useEffect(()=>{var e,t;g&&(e=p.find(e=>e.guid===g),t=d&&e.id?e.id:null==r?void 0:r.organizationId,b(e.id),n(actions$1.getUserApplicationRolesStart({userId:""+s,orgId:""+t})))},[g,p]),react.exports.useEffect(()=>{if(p){let e=$?p.find(e=>e.guid===$):p.find(e=>{return null!==(e=e.id===r.organizationId)?e:0});e=e||p[0],m((null===e||void 0===e?void 0:e.guid)||"")}},[p,$]),jsxRuntime.exports.jsxs("div",Object.assign({className:e.headerActionContainer},{children:[y&&jsxRuntime.exports.jsx(Select,Object.assign({name:"orgs-select",className:e.orgsName,sx:{fontSize:"12px"},value:g,onChange:e=>{e=e.target.value;m(e)},inputProps:{"data-testid":"ac-user-detail-select-org-name"}},{children:[...p].sort((e,t)=>e&&t&&e.name&&t.name?e.name.localeCompare(t.name):0).map((e,t)=>jsxRuntime.exports.jsx(MenuItem,Object.assign({value:e.guid,"data-testid":"ac-user-detail-select-option","data-test":"ac-user-detail-select-option"},{children:(null==e?void 0:e.name)&&index.truncatedString(e.name,22)}),e.guid+"+"+t))})),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:t,"data-testid":"ac-user-details-header.user-menu-button","data-test":"ac-user-details-header.user-menu-button"},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({"aria-labelledby":"ac-user-details-header.user-menu-button","data-testid":"ac-user-details-header.user-menu-button","data-test":"ac-user-details-header.user-menu-button",size:"medium",onClick:e=>c(e.currentTarget)},{children:jsxRuntime.exports.jsx(MoreVert,{})}))})),jsxRuntime.exports.jsx(UserContextMenu,{anchorEl:l,id:u,open:!!l,onItemClick:()=>c(null),onClose:()=>c(null),hasMultipleOrgs:1<a.length,userId:s||"",orgGuid:(null==i?void 0:i.guid)||"",status:o,"data-testid":"admin-center-org-user.menu-icon","data-test":"admin-center-org-user.menu-icon",isUserDetailsPanelOpen:!0})]}))};var $$2=_export,$includes=arrayIncludes.includes,fails$5=fails$m,addToUnscopables=addToUnscopables$3,BROKEN_ON_SPARSE=fails$m(function(){return!Array(1).includes()}),anObject$2=($$2({target:"Array",proto:!0,forced:BROKEN_ON_SPARSE},{includes:function(e){return $includes(this,e,1<arguments.length?arguments[1]:void 0)}}),addToUnscopables("includes"),anObject$c),regexpFlags$1=function(){var e=anObject$2(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},fails$4=fails$m,global$3=global$m,$RegExp$2=global$m.RegExp,UNSUPPORTED_Y$1=fails$4(function(){var e=$RegExp$2("a","y");return e.lastIndex=2,null!==e.exec("abcd")}),MISSED_STICKY=UNSUPPORTED_Y$1||fails$4(function(){return!$RegExp$2("a","y").sticky}),BROKEN_CARET=UNSUPPORTED_Y$1||fails$4(function(){var e=$RegExp$2("^r","gy");return e.lastIndex=2,null!==e.exec("str")}),regexpStickyHelpers={BROKEN_CARET:BROKEN_CARET,MISSED_STICKY:MISSED_STICKY,UNSUPPORTED_Y:UNSUPPORTED_Y$1},fails$3=fails$m,global$2=global$m,$RegExp$1=global$m.RegExp,regexpUnsupportedDotAll=fails$3(function(){var e=$RegExp$1(".","s");return!(e.dotAll&&e.test("\n")&&"s"===e.flags)}),fails$2=fails$m,global$1=global$m,$RegExp=global$m.RegExp,regexpUnsupportedNcg=fails$2(function(){var e=$RegExp("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")}),call$3=functionCall,uncurryThis$4=functionUncurryThis,toString$3=toString$7,regexpFlags=regexpFlags$1,stickyHelpers=regexpStickyHelpers,shared=shared$4,create=objectCreate,getInternalState=internalState.get,UNSUPPORTED_DOT_ALL=regexpUnsupportedDotAll,UNSUPPORTED_NCG=regexpUnsupportedNcg,nativeReplace=shared("native-string-replace",String.prototype.replace),nativeExec=RegExp.prototype.exec,patchedExec=nativeExec,charAt$3=uncurryThis$4("".charAt),indexOf=uncurryThis$4("".indexOf),replace$1=uncurryThis$4("".replace),stringSlice$3=uncurryThis$4("".slice),UPDATES_LAST_INDEX_WRONG=function(){var e=/a/,t=/b*/g;return call$3(nativeExec,e,"a"),call$3(nativeExec,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),UNSUPPORTED_Y=stickyHelpers.BROKEN_CARET,NPCG_INCLUDED=void 0!==/()??/.exec("")[1],PATCH=UPDATES_LAST_INDEX_WRONG||NPCG_INCLUDED||UNSUPPORTED_Y||UNSUPPORTED_DOT_ALL||UNSUPPORTED_NCG,regexpExec$2=patchedExec=PATCH?function(e){var t,r,n,s,o,a,i=this,l=getInternalState(i),e=toString$3(e),c=l.raw;if(c)return c.lastIndex=i.lastIndex,d=call$3(patchedExec,c,e),i.lastIndex=c.lastIndex,d;var u=l.groups,c=UNSUPPORTED_Y&&i.sticky,d=call$3(regexpFlags,i),l=i.source,p=0,$=e;if(c&&(d=replace$1(d,"y",""),-1===indexOf(d,"g")&&(d+="g"),$=stringSlice$3(e,i.lastIndex),0<i.lastIndex&&(!i.multiline||i.multiline&&"\n"!==charAt$3(e,i.lastIndex-1))&&(l="(?: "+l+")",$=" "+$,p++),t=new RegExp("^(?:"+l+")",d)),NPCG_INCLUDED&&(t=new RegExp("^"+l+"$(?!\\s)",d)),UPDATES_LAST_INDEX_WRONG&&(r=i.lastIndex),n=call$3(nativeExec,c?t:i,$),c?n?(n.input=stringSlice$3(n.input,p),n[0]=stringSlice$3(n[0],p),n.index=i.lastIndex,i.lastIndex+=n[0].length):i.lastIndex=0:UPDATES_LAST_INDEX_WRONG&&n&&(i.lastIndex=i.global?n.index+n[0].length:r),NPCG_INCLUDED&&n&&1<n.length&&call$3(nativeReplace,n[0],t,function(){for(s=1;s<arguments.length-2;s++)void 0===arguments[s]&&(n[s]=void 0)}),n&&u)for(n.groups=o=create(null),s=0;s<u.length;s++)o[(a=u[s])[0]]=n[a[1]];return n}:patchedExec,$$1=_export,exec=regexpExec$2,isObject=(_export({target:"RegExp",proto:!0,forced:/./.exec!==exec},{exec:exec}),isObject$c),classof$1=classofRaw$2,wellKnownSymbol$3=wellKnownSymbol$j,MATCH$1=wellKnownSymbol$j("match"),isRegexp=function(e){var t;return isObject(e)&&(void 0!==(t=e[MATCH$1])?!!t:"RegExp"===classof$1(e))},isRegExp=isRegexp,$TypeError$1=TypeError,notARegexp=function(e){if(isRegExp(e))throw new $TypeError$1("The method doesn't accept regular expressions");return e},wellKnownSymbol$2=wellKnownSymbol$j,MATCH=wellKnownSymbol$j("match"),correctIsRegexpLogic=function(t){var r=/./;try{"/./"[t](r)}catch(e){try{return r[MATCH]=!1,"/./"[t](r)}catch(e){}}return!1},$=_export,uncurryThis$3=functionUncurryThis,notARegExp=notARegexp,requireObjectCoercible$2=requireObjectCoercible$7,toString$2=toString$7,correctIsRegExpLogic=correctIsRegexpLogic,stringIndexOf$1=functionUncurryThis("".indexOf),call$2=($({target:"String",proto:!0,forced:!correctIsRegExpLogic("includes")},{includes:function(e){return!!~stringIndexOf$1(toString$2(requireObjectCoercible$2(this)),toString$2(notARegExp(e)),1<arguments.length?arguments[1]:void 0)}}),functionCall),defineBuiltIn=defineBuiltIn$6,regexpExec$1=regexpExec$2,fails$1=fails$m,wellKnownSymbol$1=wellKnownSymbol$j,createNonEnumerableProperty=createNonEnumerableProperty$5,SPECIES=wellKnownSymbol$1("species"),RegExpPrototype=RegExp.prototype,fixRegexpWellKnownSymbolLogic=function(r,e,t,n){var a,s=wellKnownSymbol$1(r),i=!fails$1(function(){var e={};return e[s]=function(){return 7},7!==""[r](e)}),o=i&&!fails$1(function(){var e=!1,t=/a/;return"split"===r&&((t={constructor:{}}).constructor[SPECIES]=function(){return t},t.flags="",t[s]=/./[s]),t.exec=function(){return e=!0,null},t[s](""),!e});i&&o&&!t||(a=/./[s],o=e(s,""[r],function(e,t,r,n,s){var o=t.exec;return o===regexpExec$1||o===RegExpPrototype.exec?i&&!s?{done:!0,value:call$2(a,t,r,n)}:{done:!0,value:call$2(e,r,t,n)}:{done:!1}}),defineBuiltIn(String.prototype,r,o[0]),defineBuiltIn(RegExpPrototype,s,o[1])),n&&createNonEnumerableProperty(RegExpPrototype[s],"sham",!0)},uncurryThis$2=functionUncurryThis,toIntegerOrInfinity$1=toIntegerOrInfinity$5,toString$1=toString$7,requireObjectCoercible$1=requireObjectCoercible$7,charAt$2=uncurryThis$2("".charAt),charCodeAt=uncurryThis$2("".charCodeAt),stringSlice$2=uncurryThis$2("".slice),createMethod=function(s){return function(e,t){var r,e=toString$1(requireObjectCoercible$1(e)),t=toIntegerOrInfinity$1(t),n=e.length;return t<0||n<=t?s?"":void 0:(r=charCodeAt(e,t))<55296||56319<r||t+1===n||(n=charCodeAt(e,t+1))<56320||57343<n?s?charAt$2(e,t):r:s?stringSlice$2(e,t,t+2):n-56320+(r-55296<<10)+65536}},stringMultibyte={codeAt:createMethod(!1),charAt:createMethod(!0)},charAt$1=stringMultibyte.charAt,advanceStringIndex$1=function(e,t,r){return t+(r?charAt$1(e,t).length:1)},uncurryThis$1=functionUncurryThis,toObject=toObject$6,floor=Math.floor,charAt=uncurryThis$1("".charAt),replace=uncurryThis$1("".replace),stringSlice$1=uncurryThis$1("".slice),SUBSTITUTION_SYMBOLS=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,SUBSTITUTION_SYMBOLS_NO_NAMED=/\$([$&'`]|\d{1,2})/g,getSubstitution$1=function(o,a,i,l,c,e){var u=i+o.length,d=l.length,t=SUBSTITUTION_SYMBOLS_NO_NAMED;return void 0!==c&&(c=toObject(c),t=SUBSTITUTION_SYMBOLS),replace(e,t,function(e,t){var r;switch(charAt(t,0)){case"$":return"$";case"&":return o;case"`":return stringSlice$1(a,0,i);case"'":return stringSlice$1(a,u);case"<":r=c[stringSlice$1(t,1,-1)];break;default:var n,s=+t;if(0==s)return e;if(d<s)return 0!==(n=floor(s/10))&&n<=d?void 0===l[n-1]?charAt(t,1):l[n-1]+charAt(t,1):e;r=l[s-1]}return void 0===r?"":r})},call$1=functionCall,anObject$1=anObject$c,isCallable$1=isCallable$l,classof=classofRaw$2,regexpExec=regexpExec$2,$TypeError=TypeError,regexpExecAbstract=function(e,t){var r=e.exec;if(isCallable$1(r))return null!==(r=call$1(r,e,t))&&anObject$1(r),r;if("RegExp"===classof(e))return call$1(regexpExec,e,t);throw new $TypeError("RegExp#exec called on incompatible receiver")},apply=functionApply,call=functionCall,uncurryThis=functionUncurryThis,fixRegExpWellKnownSymbolLogic=fixRegexpWellKnownSymbolLogic,fails=fails$m,anObject=anObject$c,isCallable=isCallable$l,isNullOrUndefined=isNullOrUndefined$5,toIntegerOrInfinity=toIntegerOrInfinity$5,toLength=toLength$2,toString=toString$7,requireObjectCoercible=requireObjectCoercible$7,advanceStringIndex=advanceStringIndex$1,getMethod=getMethod$4,getSubstitution=getSubstitution$1,regExpExec=regexpExecAbstract,wellKnownSymbol=wellKnownSymbol$j,REPLACE=wellKnownSymbol$j("replace"),max=Math.max,min=Math.min,concat=uncurryThis([].concat),push=uncurryThis([].push),stringIndexOf=uncurryThis("".indexOf),stringSlice=uncurryThis("".slice),maybeToString=function(e){return void 0===e?e:String(e)},REPLACE_KEEPS_$0="$0"==="a".replace(/./,"$0"),REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE=!!/./[REPLACE]&&""===/./[REPLACE]("a","$0"),REPLACE_SUPPORTS_NAMED_GROUPS=!fails(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")});fixRegExpWellKnownSymbolLogic("replace",function(e,y,h){var S=REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE?"$":"$0";return[function(e,t){var r=requireObjectCoercible(this),n=isNullOrUndefined(e)?void 0:getMethod(e,REPLACE);return n?call(n,e,r,t):call(y,toString(r),e,t)},function(e,t){var r=anObject(this),n=toString(e);if("string"==typeof t&&-1===stringIndexOf(t,S)&&-1===stringIndexOf(t,"$<")){e=h(y,r,n,t);if(e.done)return e.value}for(var s,o=isCallable(t),a=(o||(t=toString(t)),r.global),i=(a&&(s=r.unicode,r.lastIndex=0),[]);null!==(d=regExpExec(r,n))&&(push(i,d),a);)""===toString(d[0])&&(r.lastIndex=advanceStringIndex(n,toLength(r.lastIndex),s));for(var l="",c=0,u=0;u<i.length;u++){for(var d,p=toString((d=i[u])[0]),$=max(min(toIntegerOrInfinity(d.index),n.length),0),g=[],m=1;m<d.length;m++)push(g,maybeToString(d[m]));var f=d.groups,b=o?(b=concat([p],g,$,n),void 0!==f&&push(b,f),toString(apply(t,void 0,b))):getSubstitution(p,n,$,g,f,t);c<=$&&(l+=stringSlice(n,c,$)+b,c=$+p.length)}return l+stringSlice(n,c)}]},!REPLACE_SUPPORTS_NAMED_GROUPS||!REPLACE_KEEPS_$0||REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);const LoaderSkeletonItem=()=>jsxRuntime.exports.jsxs(ListItem,Object.assign({alignItems:"center",sx:{height:"83px"}},{children:[jsxRuntime.exports.jsx(ListItemAvatar,{children:jsxRuntime.exports.jsx(Skeleton,{variant:"circular",width:40,height:40})}),jsxRuntime.exports.jsx(ListItemText,{children:jsxRuntime.exports.jsx(Skeleton,{variant:"text",width:150,height:30})}),jsxRuntime.exports.jsx(ListItemSecondaryAction,{children:jsxRuntime.exports.jsx(Skeleton,{variant:"text",width:87,height:35})})]})),LoaderSkeleton=()=>jsxRuntime.exports.jsxs(List,{children:[jsxRuntime.exports.jsx(LoaderSkeletonItem,{}),jsxRuntime.exports.jsx(Divider,{}),jsxRuntime.exports.jsx(LoaderSkeletonItem,{}),jsxRuntime.exports.jsx(Divider,{}),jsxRuntime.exports.jsx(LoaderSkeletonItem,{}),jsxRuntime.exports.jsx(Divider,{})]});let usedColors$1=[];const getAvatarColor$1=()=>{var e=Math.floor(Math.random()*avatarColors.length);return usedColors$1.includes(e)?getAvatarColor$1():((usedColors$1=usedColors$1.length>=avatarColors.length/2?[]:usedColors$1).push(e),avatarColors[e])},Applications=()=>{const n=useStyles()["classes"];var e=useSelector(selectUserApplicationRoles);return"loading"===useSelector(selectUserDetailPanelLoadingStatus)?jsxRuntime.exports.jsx(LoaderSkeleton,{}):jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[!e&&jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2",sx:{color:"#2A323C",mb:1}},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-user-details-applications-tab-no-applications",defaultMessage:"No applications assigned to this user.",description:"User details applications tab no applications"})})),e&&jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2",sx:{color:"#2A323C",mb:1}},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-user-details-applications-tab-description",defaultMessage:"View the Applications this user has access to.",description:"User details applications tab description"})})),e.map((e,t)=>{var r;return jsxRuntime.exports.jsxs("div",Object.assign({"data-testid":"os-ac-user-details-applications-list","data-test":"os-ac-user-details-applications-list"},{children:[jsxRuntime.exports.jsxs(Box,Object.assign({className:n.appContainer},{children:[jsxRuntime.exports.jsxs(Box,Object.assign({sx:{display:"flex",flexDirection:"row",width:"70%"}},{children:[jsxRuntime.exports.jsx(Avatar,Object.assign({className:n.orgAvatar,sx:{background:""+getAvatarColor$1()}},{children:null!=e&&e.appName?""+(null==(r=null==(r=null==e?void 0:e.appName)?void 0:r.charAt(0))?void 0:r.toUpperCase())+String(t)[0]:"--"})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1",sx:{fontWeight:400,display:"flex",alignItems:"center"},"data-testid":"ac-user-details-application-name","data-test":"ac-user-details-application-name"},{children:null!=e&&e.appName?e.appName.replace(/\b\w/g,e=>e.toUpperCase()):""}))]})),jsxRuntime.exports.jsxs(Box,Object.assign({className:n.roleBox},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2",sx:{color:"#5C6269",fontWeight:700}},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-user-details-applications-tab-roles-label",defaultMessage:"Role: ",description:"User details applications tab description role label"})}))," ",jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2",sx:{fontWeight:400},"data-testid":"ac-user-details.application-role","data-test":"ac-user-details.application-role"},{children:null!=e&&e.name?index.truncatedString(e.name.replace(/\b\w/g,e=>e.toUpperCase()),10):""}))]}))]}),e.id),jsxRuntime.exports.jsx(Divider,{})]}),e.id)})]})};let usedColors=[];const getAvatarColor=()=>{var e=Math.floor(Math.random()*avatarColors.length);return usedColors.includes(e)?getAvatarColor():((usedColors=usedColors.length>=avatarColors.length/2?[]:usedColors).push(e),avatarColors[e])},Organizations=()=>{const n=useStyles()["classes"];var e=useSelector(selectUserOrgs);return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2",sx:{color:"#2A323C",mb:1}},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-user-details-org-tab-description",defaultMessage:"View the Organizations that this user is currently a part of.",description:"User details org tab description"})})),0<(null==e?void 0:e.length)?jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment,{children:e.map((e,t)=>{var r;return jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[jsxRuntime.exports.jsxs(Box,Object.assign({sx:{display:"flex",flexDirection:"row",alignItems:"center",py:4}},{children:[null!=e&&e.imageUrl?jsxRuntime.exports.jsx(Avatar,{alt:""+(null==(r=null==(r=null==e?void 0:e.name)?void 0:r.charAt(0))?void 0:r.toUpperCase())+String(t+1)[0],src:null==e?void 0:e.imageUrl,className:n.orgAvatar,"data-testid":"ac-user-details-organization-image","data-test":"ac-user-details-organization-image"}):jsxRuntime.exports.jsx(Avatar,Object.assign({className:n.orgAvatar,sx:{background:""+getAvatarColor()},"data-testid":"ac-user-details-organization-fallback-image","data-test":"ac-user-details-organization-fallback-image"},{children:null!=e&&e.name?""+(null==(r=null==(r=null==e?void 0:e.name)?void 0:r.charAt(0))?void 0:r.toUpperCase())+String(t)[0]:"--"})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1",sx:{fontWeight:400},"data-testid":"ac-user-details-organization-tab-org-name","data-test":"ac-user-details-organization-tab-org-name"},{children:null!=e&&e.name?e.name:""}))]})),jsxRuntime.exports.jsx(Divider,{})]},"os-admin-center-org-row-"+e.id)})}):null]})},muiTabA11yProps=e=>({id:"user-details-tab-"+e,"aria-controls":"user-details-tabpanel-"+e}),UserDetailTabs=()=>{const r=useStyles()["classes"],[n,s]=react.exports.useState(0);var e=useSelector(selectIsSuperAdmin),e=[{label:"Applications",disabled:!1,id:"applications",component:jsxRuntime.exports.jsx(Box,Object.assign({sx:{p:6,height:"calc(100vh - 325px)",overflow:"auto"}},{children:jsxRuntime.exports.jsx(Applications,{})}))},...e?[{label:"Organizations",disabled:!1,id:"organizations",component:jsxRuntime.exports.jsx(Box,Object.assign({sx:{p:6}},{children:jsxRuntime.exports.jsx(Organizations,{})}))}]:[]];return jsxRuntime.exports.jsxs("div",Object.assign({className:r.tabsContainer,"data-testid":"ac-user-details-panel-tabs","data-test":"ac-user-details-panel-tabs"},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:r.tabsParent},{children:jsxRuntime.exports.jsx(Tabs,Object.assign({sx:{"& .Sdk-MuiTab-root.Sdk-Mui-selected":{color:"#000000!important"}},onChange:(e,t)=>{s(t)},value:n},{children:e.map((e,t)=>jsxRuntime.exports.jsx(Tab,Object.assign({label:e.label,disabled:e.disabled},muiTabA11yProps(t),{"data-testid":e.id+"-tab","data-test":e.id+"-tab"}),e.id))}))})),jsxRuntime.exports.jsx(Divider,{className:r.divider}),jsxRuntime.exports.jsx("div",{children:e.map((e,t)=>jsxRuntime.exports.jsx("div",Object.assign({className:r.secondBox},{children:jsxRuntime.exports.jsx(TabPanel,Object.assign({value:n,index:t},{children:e.component}))}),e.id))})]}))},{header:PanelHeader,container:PanelContainer,content:PanelContent}=panelComponents,MainLayout=({id:e,isPanelFullScreen:t})=>{const r=useDispatch();var n=useIntl(),n=userLabels(n)["panelHeader"],s=useSelector(selectUserDetailPanelLoadingStatus),o=useSelector(selectUserDetailPanelUserData),a="loading"===s,s="failure"===s;return react.exports.useEffect(()=>{e&&r(actions$1.fetchUserStart({userId:e}))},[r,e]),react.exports.useEffect(()=>()=>{r(actions$1.resetUserRoles())},[]),jsxRuntime.exports.jsxs(PanelContainer,Object.assign({panelId:PANEL_ID,isFullScreen:t},{children:[jsxRuntime.exports.jsx(PanelHeader,{title:n,testId:"ac-user-details.header-title",PanelActions:o&&jsxRuntime.exports.jsx(UserDetailHeaderActions,{userData:o}),onPanelClose:()=>{r(hidePanel(PANEL_ID))}}),jsxRuntime.exports.jsxs(PanelContent,Object.assign({isLoading:a,isErrored:s},{children:[o&&jsxRuntime.exports.jsx(UserDetailCard,{userData:o}),jsxRuntime.exports.jsx(UserDetailTabs,{})]}))]}))},UserDetailsPanel=e=>jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getAdminCenterUsersModule()]},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(AIWareCacheProvider,{children:jsxRuntime.exports.jsx(MainLayout,Object.assign({},e))})})}))}),TableSearchInputButton=tableSearchComponents["TableSearchInputButton"],UserTableSearchButton=()=>{const[e,t]=react.exports.useState(""),[r,n]=react.exports.useState(!1);var s=useSelector(selectSearchTerm),o=useSelector(selectIsSearching);const a=useDispatch(),i=react.exports.useRef(debounce_1(e=>{a(actions$1.setSearchTerm(e))},1e3)).current;return jsxRuntime.exports.jsx(TableSearchInputButton,{onChange:e=>{t(e.target.value),e.target.value?(a(actions$1.setIsSearching(!0)),i(e.target.value)):i("")},onClear:()=>{t(""),a(actions$1.setSearchTerm(""))},onToggleSearch:()=>{n(e=>!e)},testId:"admin-center-org-user-table-search",placeholderText:"Search by name",searchValue:s,inputValue:e,isSearchVisible:r,isSearching:o,searchItemTooltipText:"Users"})},UsersPanel=()=>{var e=useStyles$1()["classes"];const t=useDispatch();var r=useSelector(organizationInvites_selector.selectPendingOrgInvites);const n=useSelector(selectAdminCenterOrgId),s=useSelector(selectAdminCenterOrgGuid),o=useSelector(selectIsFullscreenEnabled);react.exports.useEffect(()=>{t(actions$2.organizationInvitesState.fetchPendingInvitesStart(n))},[t,n]);r=jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx("section",Object.assign({className:e.root},{children:jsxRuntime.exports.jsxs("header",Object.assign({className:e.header},{children:[jsxRuntime.exports.jsx(Box,Object.assign({sx:{mr:2,display:"flex",alignItems:"center","& h5":{lineHeight:"28px"}}},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h5","data-testid":"os-admin-center-panel.users.table.header","data-test":"os-admin-center-panel.users.table.header"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-panel.users.table.header",defaultMessage:"Users",description:"Users Header"})}))})),jsxRuntime.exports.jsx(Box,Object.assign({className:e.searchBox,sx:{maxWidth:o?"100%":"440px"}},{children:jsxRuntime.exports.jsx(UserTableSearchButton,{})})),jsxRuntime.exports.jsxs(Box,Object.assign({className:e.headerButtons},{children:[jsxRuntime.exports.jsxs(Button,Object.assign({variant:"outlined",onClick:()=>handleViewRequests(t,o),"data-test":"os-admin-center-panel.users.table.requests-button"},{children:[jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-panel.users.user-requests.btn",defaultMessage:"User Requests",description:"User Requests tab button"})," ","(",r.length,")"]})),jsxRuntime.exports.jsxs(Button,Object.assign({variant:"contained",sx:{ml:"13px"},className:e.addUserBtn,onClick:()=>handleClickInviteUsers(t,o,n,s),"data-test":"os-admin-center-panel.users.table.invite-button"},{children:[jsxRuntime.exports.jsx(AddUser,{}),jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-panel.users.invite-user.btn",defaultMessage:"Invite User",description:"Invite User tab button"})]}))]}))]}))})),jsxRuntime.exports.jsx("div",Object.assign({className:e.tableWrapper},{children:jsxRuntime.exports.jsx(UserTable,{})}))]});return o?jsxRuntime.exports.jsx(AIWareThemeProvider,{children:r}):r};export{UserDetailsPanel,UsersPanel,actions,getAdminCenterUsersModule,initialState,namespace,rootReducer};
|
package/js-core.esm71.js.gz
CHANGED
|
Binary file
|