aiware-js 2.14.0 → 2.15.0

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.
Files changed (57) hide show
  1. package/index.esm.js +1 -1
  2. package/index.html +1 -1
  3. package/js-core.esm.js +230 -34
  4. package/js-core.esm10.js +1 -1
  5. package/js-core.esm11.js +1 -1
  6. package/js-core.esm12.js +1 -1
  7. package/js-core.esm13.js +1 -1
  8. package/js-core.esm14.js +1 -1
  9. package/js-core.esm15.js +1 -23
  10. package/js-core.esm16.js +1 -1
  11. package/js-core.esm17.js +201 -566
  12. package/js-core.esm18.js +60 -1
  13. package/js-core.esm19.js +1 -1
  14. package/js-core.esm2.js +1 -1
  15. package/js-core.esm20.js +1 -1
  16. package/js-core.esm21.js +1 -1
  17. package/js-core.esm22.js +1 -1
  18. package/js-core.esm23.js +1 -1
  19. package/js-core.esm24.js +1 -1
  20. package/js-core.esm25.js +14 -1
  21. package/js-core.esm26.js +12 -1
  22. package/js-core.esm27.js +54 -230
  23. package/js-core.esm28.js +1 -60
  24. package/js-core.esm29.js +88 -1
  25. package/js-core.esm30.js +226 -1
  26. package/js-core.esm31.js +35 -1
  27. package/js-core.esm32.js +1 -1
  28. package/js-core.esm33.js +1 -1
  29. package/js-core.esm34.js +1 -1
  30. package/js-core.esm35.js +1 -14
  31. package/js-core.esm36.js +31 -12
  32. package/js-core.esm37.js +1 -54
  33. package/js-core.esm38.js +51 -1
  34. package/js-core.esm39.js +1 -88
  35. package/js-core.esm4.js +1 -1
  36. package/js-core.esm40.js +23 -220
  37. package/js-core.esm41.js +1 -35
  38. package/js-core.esm5.js +23 -1
  39. package/js-core.esm6.js +1 -20
  40. package/js-core.esm7.js +568 -109
  41. package/js-core.esm8.js +1 -1
  42. package/js-core.esm9.js +1 -1
  43. package/js-core.umd.js +209 -117
  44. package/lib/widgetHandler.d.ts +17 -4
  45. package/locales/en.json +1 -1
  46. package/locales/es.json +1 -1
  47. package/locales/fr.json +1 -1
  48. package/package.json +4 -2
  49. package/js-core.esm42.js +0 -1
  50. package/js-core.esm43.js +0 -1
  51. package/js-core.esm44.js +0 -1
  52. package/js-core.esm45.js +0 -1
  53. package/js-core.esm46.js +0 -31
  54. package/js-core.esm47.js +0 -1
  55. package/js-core.esm48.js +0 -1
  56. package/js-core.esm49.js +0 -1
  57. package/js-core.esm50.js +0 -29
package/js-core.esm48.js DELETED
@@ -1 +0,0 @@
1
- import{bO as createSlice,aX as createSelector,bT as rootApiSelector,aF as graphEndpointSelector,a9 as sessionTokenSelector,dB as combineReducers,j as jsxRuntime,F as FormattedMessage,m as makeStyles,bh as Box,T as Typography,H as useSelector,G as useDispatch,r as react,c4 as Skeleton$1,a6 as Divider,gM as ErrorState,X as Tooltip$1,V as IconButton$1,dl as Hide,O as AIWareThemeProvider,Q as lib,A as AIWareIntlProvider,d1 as CacheProvider,d2 as muiCache,as as all,gL as selectIsUserAdmin,cP as React,dN as CustomTabs,dF as TabPanel,ar as Button$1,av as hidePanel,a3 as List,aw as takeEvery$1,dO as useBackupImg,w as img$1u,bK as Grid,gK as selectOrgId,a4 as ListItem,bk as ListItemAvatar,Z as Avatar,a5 as ListItemText,h1 as green,g$ as Lock,fT as ListItemSecondaryAction,L as mountPanel,aE as select,az as put,aB as call$g,dP as baseGraphQLApiWithError}from"./js-core.esm.js";import{C as Container}from"./js-core.esm31.js";import{S as Stack}from"./js-core.esm29.js";import{C as Chip$1}from"./js-core.esm33.js";!function(){var e={};try{if(process)return process.env=Object.assign({},process.env),Object.assign(process.env,e)}catch(e){}globalThis.process={env:e}}();var match,version,store,wmget,wmhas,wmset,set$1,get,has,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$k=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof commonjsGlobal&&commonjsGlobal)||function(){return this}()||Function("return this")(),objectGetOwnPropertyDescriptor={},fails$g=function(e){try{return!!e()}catch(e){return!0}},fails$f=fails$g,descriptors=!fails$g(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),fails$e=fails$g,functionBindNative=!fails$g(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}),NATIVE_BIND$3=functionBindNative,call$f=Function.prototype.call,functionCall=NATIVE_BIND$3?call$f.bind(call$f):function(){return call$f.apply(call$f,arguments)},objectPropertyIsEnumerable={},$propertyIsEnumerable={}.propertyIsEnumerable,getOwnPropertyDescriptor$2=Object.getOwnPropertyDescriptor,NASHORN_BUG=getOwnPropertyDescriptor$2&&!$propertyIsEnumerable.call({1:2},1),createPropertyDescriptor$4=(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,bind$5=FunctionPrototype$2.bind,call$e=FunctionPrototype$2.call,uncurryThis$g=NATIVE_BIND$2&&bind$5.bind(call$e,call$e),functionUncurryThis=NATIVE_BIND$2?function(e){return e&&uncurryThis$g(e)}:function(e){return e&&function(){return call$e.apply(e,arguments)}},uncurryThis$f=functionUncurryThis,toString$4=uncurryThis$f({}.toString),stringSlice$1=uncurryThis$f("".slice),classofRaw$1=function(e){return stringSlice$1(toString$4(e),8,-1)},uncurryThis$e=functionUncurryThis,fails$d=fails$g,classof$5=classofRaw$1,$Object$4=Object,split=functionUncurryThis("".split),indexedObject=fails$d(function(){return!$Object$4("z").propertyIsEnumerable(0)})?function(e){return"String"==classof$5(e)?split(e,""):$Object$4(e)}:$Object$4,$TypeError$d=TypeError,requireObjectCoercible$2=function(e){if(null==e)throw $TypeError$d("Can't call method on "+e);return e},IndexedObject$2=indexedObject,requireObjectCoercible$1=requireObjectCoercible$2,toIndexedObject$5=function(e){return IndexedObject$2(requireObjectCoercible$1(e))},isCallable$l=function(e){return"function"==typeof e},isCallable$k=isCallable$l,isObject$7=function(e){return"object"==typeof e?null!==e:isCallable$k(e)},global$j=global$k,isCallable$j=isCallable$l,aFunction=function(e){return isCallable$j(e)?e:void 0},getBuiltIn$8=function(e,t){return arguments.length<2?aFunction(global$j[e]):global$j[e]&&global$j[e][t]},uncurryThis$d=functionUncurryThis,objectIsPrototypeOf=functionUncurryThis({}.isPrototypeOf),getBuiltIn$7=getBuiltIn$8,engineUserAgent=getBuiltIn$8("navigator","userAgent")||"",global$i=global$k,userAgent$5=engineUserAgent,process$4=global$i.process,Deno$1=global$i.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$c=fails$g,nativeSymbol=!!Object.getOwnPropertySymbols&&!fails$c(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&V8_VERSION$1&&V8_VERSION$1<41}),NATIVE_SYMBOL$2=nativeSymbol,useSymbolAsUid=nativeSymbol&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,getBuiltIn$6=getBuiltIn$8,isCallable$i=isCallable$l,isPrototypeOf$4=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$4(t.prototype,$Object$3(e))},$String$3=String,tryToString$5=function(e){try{return $String$3(e)}catch(e){return"Object"}},isCallable$h=isCallable$l,tryToString$4=tryToString$5,$TypeError$c=TypeError,aCallable$9=function(e){if(isCallable$h(e))return e;throw $TypeError$c(tryToString$4(e)+" is not a function")},aCallable$8=aCallable$9,getMethod$3=function(e,t){e=e[t];return null==e?void 0:aCallable$8(e)},call$d=functionCall,isCallable$g=isCallable$l,isObject$6=isObject$7,$TypeError$b=TypeError,ordinaryToPrimitive$1=function(e,t){var r,n;if("string"===t&&isCallable$g(r=e.toString)&&!isObject$6(n=call$d(r,e)))return n;if(isCallable$g(r=e.valueOf)&&!isObject$6(n=call$d(r,e)))return n;if("string"!==t&&isCallable$g(r=e.toString)&&!isObject$6(n=call$d(r,e)))return n;throw $TypeError$b("Can't convert object to primitive value")},shared$3={exports:{}},global$h=global$k,defineProperty$6=Object.defineProperty,defineGlobalProperty$3=function(t,r){try{defineProperty$6(global$h,t,{value:r,configurable:!0,writable:!0})}catch(e){global$h[t]=r}return r},global$g=global$k,defineGlobalProperty$2=defineGlobalProperty$3,SHARED="__core-js_shared__",store$3=global$k[SHARED]||defineGlobalProperty$2(SHARED,{}),sharedStore=store$3,store$2=sharedStore,requireObjectCoercible=((shared$3.exports=function(e,t){return store$2[e]||(store$2[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.24.1",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.24.1/LICENSE",source:"https://github.com/zloirock/core-js"}),requireObjectCoercible$2),$Object$2=Object,toObject$5=function(e){return $Object$2(requireObjectCoercible(e))},uncurryThis$c=functionUncurryThis,toObject$4=toObject$5,hasOwnProperty=functionUncurryThis({}.hasOwnProperty),hasOwnProperty_1=Object.hasOwn||function(e,t){return hasOwnProperty(toObject$4(e),t)},uncurryThis$b=functionUncurryThis,id=0,postfix=Math.random(),toString$3=uncurryThis$b(1..toString),uid$2=function(e){return"Symbol("+(void 0===e?"":e)+")_"+toString$3(++id+postfix,36)},global$f=global$k,shared$2=shared$3.exports,hasOwn$b=hasOwnProperty_1,uid$1=uid$2,NATIVE_SYMBOL$1=nativeSymbol,USE_SYMBOL_AS_UID=useSymbolAsUid,WellKnownSymbolsStore=shared$2("wks"),Symbol$1=global$f.Symbol,symbolFor=Symbol$1&&Symbol$1.for,createWellKnownSymbol=USE_SYMBOL_AS_UID?Symbol$1:Symbol$1&&Symbol$1.withoutSetter||uid$1,wellKnownSymbol$e=function(e){var t;return hasOwn$b(WellKnownSymbolsStore,e)&&(NATIVE_SYMBOL$1||"string"==typeof WellKnownSymbolsStore[e])||(t="Symbol."+e,NATIVE_SYMBOL$1&&hasOwn$b(Symbol$1,e)?WellKnownSymbolsStore[e]=Symbol$1[e]:WellKnownSymbolsStore[e]=(USE_SYMBOL_AS_UID&&symbolFor?symbolFor:createWellKnownSymbol)(t)),WellKnownSymbolsStore[e]},call$c=functionCall,isObject$5=isObject$7,isSymbol$1=isSymbol$2,getMethod$2=getMethod$3,ordinaryToPrimitive=ordinaryToPrimitive$1,wellKnownSymbol$d=wellKnownSymbol$e,$TypeError$a=TypeError,TO_PRIMITIVE=wellKnownSymbol$e("toPrimitive"),toPrimitive$1=function(e,t){if(!isObject$5(e)||isSymbol$1(e))return e;var r=getMethod$2(e,TO_PRIMITIVE);if(r){if(r=call$c(r,e,t=void 0===t?"default":t),!isObject$5(r)||isSymbol$1(r))return r;throw $TypeError$a("Can't convert object to primitive value")}return ordinaryToPrimitive(e,t=void 0===t?"number":t)},toPrimitive=toPrimitive$1,isSymbol=isSymbol$2,toPropertyKey$3=function(e){e=toPrimitive(e,"string");return isSymbol(e)?e:e+""},global$e=global$k,isObject$4=isObject$7,document$3=global$k.document,EXISTS$1=isObject$4(document$3)&&isObject$4(document$3.createElement),documentCreateElement$2=function(e){return EXISTS$1?document$3.createElement(e):{}},DESCRIPTORS$b=descriptors,fails$b=fails$g,createElement$1=documentCreateElement$2,ie8DomDefine=!descriptors&&!fails$g(function(){return 7!=Object.defineProperty(createElement$1("div"),"a",{get:function(){return 7}}).a}),DESCRIPTORS$a=descriptors,call$b=functionCall,propertyIsEnumerableModule$1=objectPropertyIsEnumerable,createPropertyDescriptor$3=createPropertyDescriptor$4,toIndexedObject$4=toIndexedObject$5,toPropertyKey$2=toPropertyKey$3,hasOwn$a=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$2(t),IE8_DOM_DEFINE$1)try{return $getOwnPropertyDescriptor$1(e,t)}catch(e){}if(hasOwn$a(e,t))return createPropertyDescriptor$3(!call$b(propertyIsEnumerableModule$1.f,e,t),e[t])},{}),DESCRIPTORS$9=descriptors,fails$a=fails$g,v8PrototypeDefineBug=descriptors&&fails$g(function(){return 42!=Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),isObject$3=isObject$7,$String$2=String,$TypeError$9=TypeError,anObject$c=function(e){if(isObject$3(e))return e;throw $TypeError$9($String$2(e)+" is not an object")},DESCRIPTORS$8=descriptors,IE8_DOM_DEFINE=ie8DomDefine,V8_PROTOTYPE_DEFINE_BUG$1=v8PrototypeDefineBug,anObject$b=anObject$c,toPropertyKey$1=toPropertyKey$3,$TypeError$8=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$1(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$1(t),anObject$b(r),IE8_DOM_DEFINE)try{return $defineProperty(e,t,r)}catch(e){}if("get"in r||"set"in r)throw $TypeError$8("Accessors not supported");return"value"in r&&(e[t]=r.value),e},descriptors),definePropertyModule$5=objectDefineProperty,createPropertyDescriptor$2=createPropertyDescriptor$4,createNonEnumerableProperty$4=DESCRIPTORS$7?function(e,t,r){return definePropertyModule$5.f(e,t,createPropertyDescriptor$2(1,r))}:function(e,t,r){return e[t]=r,e},makeBuiltIn$2={exports:{}},DESCRIPTORS$6=descriptors,hasOwn$9=hasOwnProperty_1,FunctionPrototype$1=Function.prototype,getDescriptor=DESCRIPTORS$6&&Object.getOwnPropertyDescriptor,EXISTS=hasOwn$9(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$a=functionUncurryThis,isCallable$f=isCallable$l,store$1=sharedStore,functionToString=functionUncurryThis(Function.toString),inspectSource$4=(isCallable$f(store$1.inspectSource)||(store$1.inspectSource=function(e){return functionToString(e)}),store$1.inspectSource),global$d=global$k,isCallable$e=isCallable$l,inspectSource$3=inspectSource$4,WeakMap$1=global$k.WeakMap,nativeWeakMap=isCallable$e(WeakMap$1)&&/native code/.test(inspectSource$3(WeakMap$1)),shared$1=shared$3.exports,uid=uid$2,keys=shared$1("keys"),sharedKey$3=function(e){return keys[e]||(keys[e]=uid(e))},hiddenKeys$4={},NATIVE_WEAK_MAP=nativeWeakMap,global$c=global$k,uncurryThis$9=functionUncurryThis,isObject$2=isObject$7,createNonEnumerableProperty$3=createNonEnumerableProperty$4,hasOwn$8=hasOwnProperty_1,shared=sharedStore,sharedKey$2=sharedKey$3,hiddenKeys$3=hiddenKeys$4,OBJECT_ALREADY_INITIALIZED="Object already initialized",TypeError$2=global$c.TypeError,WeakMap=global$c.WeakMap,enforce=function(e){return has(e)?get(e):set$1(e,{})},getterFor=function(t){return function(e){if(isObject$2(e)&&(e=get(e)).type===t)return e;throw TypeError$2("Incompatible receiver, "+t+" required")}},internalState=(has=NATIVE_WEAK_MAP||shared.state?(store=shared.state||(shared.state=new WeakMap),wmget=uncurryThis$9(store.get),wmhas=uncurryThis$9(store.has),wmset=uncurryThis$9(store.set),set$1=function(e,t){if(wmhas(store,e))throw new TypeError$2(OBJECT_ALREADY_INITIALIZED);return t.facade=e,wmset(store,e,t),t},get=function(e){return wmget(store,e)||{}},function(e){return wmhas(store,e)}):(STATE=sharedKey$2("state"),hiddenKeys$3[STATE]=!0,set$1=function(e,t){if(hasOwn$8(e,STATE))throw new TypeError$2(OBJECT_ALREADY_INITIALIZED);return t.facade=e,createNonEnumerableProperty$3(e,STATE,t),t},get=function(e){return hasOwn$8(e,STATE)?e[STATE]:{}},function(e){return hasOwn$8(e,STATE)}),{set:set$1,get:get,has:has,enforce:enforce,getterFor:getterFor}),fails$9=fails$g,isCallable$d=isCallable$l,hasOwn$7=hasOwnProperty_1,DESCRIPTORS$5=descriptors,CONFIGURABLE_FUNCTION_NAME$1=functionName.CONFIGURABLE,inspectSource$2=inspectSource$4,InternalStateModule$2=internalState,enforceInternalState=InternalStateModule$2.enforce,getInternalState$1=InternalStateModule$2.get,defineProperty$5=Object.defineProperty,CONFIGURABLE_LENGTH=DESCRIPTORS$5&&!fails$9(function(){return 8!==defineProperty$5(function(){},"length",{value:8}).length}),TEMPLATE=String(String).split("String"),makeBuiltIn$1=makeBuiltIn$2.exports=function(e,t,r){"Symbol("===String(t).slice(0,7)&&(t="["+String(t).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!hasOwn$7(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$7(r,"arity")&&e.length!==r.arity&&defineProperty$5(e,"length",{value:r.arity});try{r&&hasOwn$7(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$7(r,"source")||(r.source=TEMPLATE.join("string"==typeof t?t:"")),e},isCallable$c=(Function.prototype.toString=makeBuiltIn$1(function(){return isCallable$d(this)&&getInternalState$1(this).source||inspectSource$2(this)},"toString"),isCallable$l),definePropertyModule$4=objectDefineProperty,makeBuiltIn=makeBuiltIn$2.exports,defineGlobalProperty$1=defineGlobalProperty$3,defineBuiltIn$6=function(e,t,r,n){var o=(n=n||{}).enumerable,i=void 0!==n.name?n.name:t;if(isCallable$c(r)&&makeBuiltIn(r,i,n),n.global)o?e[t]=r:defineGlobalProperty$1(t,r);else{try{n.unsafe?e[t]&&(o=!0):delete e[t]}catch(e){}o?e[t]=r:definePropertyModule$4.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$2=function(e){e=+e;return e!=e||0==e?0:trunc(e)},toIntegerOrInfinity$1=toIntegerOrInfinity$2,max$1=Math.max,min$1=Math.min,toAbsoluteIndex$2=function(e,t){e=toIntegerOrInfinity$1(e);return e<0?max$1(e+t,0):min$1(e,t)},toIntegerOrInfinity=toIntegerOrInfinity$2,min=Math.min,toLength$1=function(e){return 0<e?min(toIntegerOrInfinity(e),9007199254740991):0},toLength=toLength$1,lengthOfArrayLike$5=function(e){return toLength(e.length)},toIndexedObject$3=toIndexedObject$5,toAbsoluteIndex$1=toAbsoluteIndex$2,lengthOfArrayLike$4=lengthOfArrayLike$5,createMethod$1=function(s){return function(e,t,r){var n,o=toIndexedObject$3(e),i=lengthOfArrayLike$4(o),a=toAbsoluteIndex$1(r,i);if(s&&t!=t){for(;a<i;)if((n=o[a++])!=n)return!0}else for(;a<i;a++)if((s||a in o)&&o[a]===t)return s||a||0;return!s&&-1}},arrayIncludes={includes:createMethod$1(!0),indexOf:createMethod$1(!1)},uncurryThis$8=functionUncurryThis,hasOwn$6=hasOwnProperty_1,toIndexedObject$2=toIndexedObject$5,indexOf=arrayIncludes.indexOf,hiddenKeys$2=hiddenKeys$4,push$1=uncurryThis$8([].push),objectKeysInternal=function(e,t){var r,n=toIndexedObject$2(e),o=0,i=[];for(r in n)!hasOwn$6(hiddenKeys$2,r)&&hasOwn$6(n,r)&&push$1(i,r);for(;t.length>o;)!hasOwn$6(n,r=t[o++])||~indexOf(i,r)||push$1(i,r);return i},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$8),uncurryThis$7=functionUncurryThis,getOwnPropertyNamesModule=objectGetOwnPropertyNames,getOwnPropertySymbolsModule$1=objectGetOwnPropertySymbols,anObject$a=anObject$c,concat$1=functionUncurryThis([].concat),ownKeys$1=getBuiltIn$5("Reflect","ownKeys")||function(e){var t=getOwnPropertyNamesModule.f(anObject$a(e)),r=getOwnPropertySymbolsModule$1.f;return r?concat$1(t,r(e)):t},hasOwn$5=hasOwnProperty_1,ownKeys=ownKeys$1,getOwnPropertyDescriptorModule=objectGetOwnPropertyDescriptor,definePropertyModule$3=objectDefineProperty,copyConstructorProperties$2=function(e,t,r){for(var n=ownKeys(t),o=definePropertyModule$3.f,i=getOwnPropertyDescriptorModule.f,a=0;a<n.length;a++){var s=n[a];hasOwn$5(e,s)||r&&hasOwn$5(r,s)||o(e,s,i(t,s))}},fails$8=fails$g,isCallable$b=isCallable$l,replacement=/#|\.prototype\./,isForced$2=function(e,t){e=data[normalize(e)];return e==POLYFILL||e!=NATIVE&&(isCallable$b(t)?fails$8(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$b=global$k,getOwnPropertyDescriptor$1=objectGetOwnPropertyDescriptor.f,createNonEnumerableProperty$2=createNonEnumerableProperty$4,defineBuiltIn$5=defineBuiltIn$6,defineGlobalProperty=defineGlobalProperty$3,copyConstructorProperties$1=copyConstructorProperties$2,isForced$1=isForced_1,_export=function(e,t){var r,n,o,i=e.target,a=e.global,s=e.stat,l=a?global$b:s?global$b[i]||defineGlobalProperty(i,{}):(global$b[i]||{}).prototype;if(l)for(r in t){if(n=t[r],o=e.dontCallGetSet?(o=getOwnPropertyDescriptor$1(l,r))&&o.value:l[r],!isForced$1(a?r:i+(s?".":"#")+r,e.forced)&&void 0!==o){if(typeof n==typeof o)continue;copyConstructorProperties$1(n,o)}(e.sham||o&&o.sham)&&createNonEnumerableProperty$2(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$6=functionUncurryThis,call$a=functionCall,fails$7=fails$g,objectKeys$1=objectKeys$2,getOwnPropertySymbolsModule=objectGetOwnPropertySymbols,propertyIsEnumerableModule=objectPropertyIsEnumerable,toObject$3=toObject$5,IndexedObject$1=indexedObject,$assign=Object.assign,defineProperty$4=Object.defineProperty,concat=uncurryThis$6([].concat),objectAssign=!$assign||fails$7(function(){if(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)return!0;var e={},t={},r=Symbol(),n="abcdefghijklmnopqrst";return e[r]=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,o=1,i=getOwnPropertySymbolsModule.f,a=propertyIsEnumerableModule.f;o<n;)for(var s,l=IndexedObject$1(arguments[o++]),c=i?concat(objectKeys$1(l),i(l)):objectKeys$1(l),p=c.length,u=0;u<p;)s=c[u++],DESCRIPTORS$4&&!call$a(a,l,s)||(r[s]=l[s]);return r}:$assign,$$a=_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$2=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),o=objectKeys(t),i=o.length,a=0;a<i;)definePropertyModule$2.f(e,r=o[a++],n[r]);return e},getBuiltIn$8),html$2=getBuiltIn$8("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$c=wellKnownSymbol$e,create$1=objectCreate,defineProperty$3=objectDefineProperty.f,UNSCOPABLES=wellKnownSymbol$c("unscopables"),ArrayPrototype$1=Array.prototype,addToUnscopables$1=(null==ArrayPrototype$1[UNSCOPABLES]&&defineProperty$3(ArrayPrototype$1,UNSCOPABLES,{configurable:!0,value:create$1(null)}),function(e){ArrayPrototype$1[UNSCOPABLES][e]=!0}),iterators={},fails$6=fails$g,correctPrototypeGetter=!fails$g(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),hasOwn$4=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){e=toObject$2(e);if(hasOwn$4(e,IE_PROTO))return e[IE_PROTO];var t=e.constructor;return isCallable$a(t)&&e instanceof t?t.prototype:e instanceof $Object$1?ObjectPrototype:null},fails$5=fails$g,isCallable$9=isCallable$l,getPrototypeOf$1=objectGetPrototypeOf,defineBuiltIn$4=defineBuiltIn$6,wellKnownSymbol$b=wellKnownSymbol$e,ITERATOR$5=wellKnownSymbol$e("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),null==IteratorPrototype$2||fails$5(function(){var e={};return IteratorPrototype$2[ITERATOR$5].call(e)!==e})),iteratorsCore=(isCallable$9((IteratorPrototype$2=NEW_ITERATOR_PROTOTYPE?{}:IteratorPrototype$2)[ITERATOR$5])||defineBuiltIn$4(IteratorPrototype$2,ITERATOR$5,function(){return this}),{IteratorPrototype:IteratorPrototype$2,BUGGY_SAFARI_ITERATORS:BUGGY_SAFARI_ITERATORS$1}),defineProperty$2=objectDefineProperty.f,hasOwn$3=hasOwnProperty_1,wellKnownSymbol$a=wellKnownSymbol$e,TO_STRING_TAG$3=wellKnownSymbol$e("toStringTag"),setToStringTag$3=function(e,t,r){(e=e&&!r?e.prototype:e)&&!hasOwn$3(e,TO_STRING_TAG$3)&&defineProperty$2(e,TO_STRING_TAG$3,{configurable:!0,value:t})},IteratorPrototype$1=iteratorsCore.IteratorPrototype,create=objectCreate,createPropertyDescriptor$1=createPropertyDescriptor$4,setToStringTag$2=setToStringTag$3,Iterators$4=iterators,returnThis$1=function(){return this},createIteratorConstructor$1=function(e,t,r,n){t+=" Iterator";return e.prototype=create(IteratorPrototype$1,{next:createPropertyDescriptor$1(+!n,r)}),setToStringTag$2(e,t,!1),Iterators$4[t]=returnThis$1,e},isCallable$8=isCallable$l,$String$1=String,$TypeError$7=TypeError,aPossiblePrototype$1=function(e){if("object"==typeof e||isCallable$8(e))return e;throw $TypeError$7("Can't set "+$String$1(e)+" as a prototype")},uncurryThis$5=functionUncurryThis,anObject$7=anObject$c,aPossiblePrototype=aPossiblePrototype$1,objectSetPrototypeOf=Object.setPrototypeOf||("__proto__"in{}?function(){var r,n=!1,e={};try{(r=uncurryThis$5(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(e,[]),n=e instanceof Array}catch(e){}return function(e,t){return anObject$7(e),aPossiblePrototype(t),n?r(e,t):e.__proto__=t,e}}():void 0),$$9=_export,call$9=functionCall,FunctionName=functionName,isCallable$7=isCallable$l,createIteratorConstructor=createIteratorConstructor$1,getPrototypeOf=objectGetPrototypeOf,setPrototypeOf$1=objectSetPrototypeOf,setToStringTag$1=setToStringTag$3,createNonEnumerableProperty$1=createNonEnumerableProperty$4,defineBuiltIn$3=defineBuiltIn$6,wellKnownSymbol$9=wellKnownSymbol$e,Iterators$3=iterators,IteratorsCore=iteratorsCore,PROPER_FUNCTION_NAME$1=FunctionName.PROPER,CONFIGURABLE_FUNCTION_NAME=FunctionName.CONFIGURABLE,IteratorPrototype=IteratorsCore.IteratorPrototype,BUGGY_SAFARI_ITERATORS=IteratorsCore.BUGGY_SAFARI_ITERATORS,ITERATOR$4=wellKnownSymbol$9("iterator"),KEYS="keys",VALUES="values",ENTRIES="entries",returnThis=function(){return this},defineIterator$1=function(e,t,r,n,o,i,a){createIteratorConstructor(r,t,n);function s(e){if(e===o&&d)return d;if(!BUGGY_SAFARI_ITERATORS&&e in u)return u[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",p=!1,u=e.prototype,$=u[ITERATOR$4]||u["@@iterator"]||o&&u[o],d=!BUGGY_SAFARI_ITERATORS&&$||s(o),y="Array"==t&&u.entries||$;if(y&&(y=getPrototypeOf(y.call(new e)))!==Object.prototype&&y.next&&(getPrototypeOf(y)!==IteratorPrototype&&(setPrototypeOf$1?setPrototypeOf$1(y,IteratorPrototype):isCallable$7(y[ITERATOR$4])||defineBuiltIn$3(y,ITERATOR$4,returnThis)),setToStringTag$1(y,n,!0)),PROPER_FUNCTION_NAME$1&&o==VALUES&&$&&$.name!==VALUES&&(CONFIGURABLE_FUNCTION_NAME?createNonEnumerableProperty$1(u,"name",VALUES):(p=!0,d=function(){return call$9($,this)})),o)if(l={values:s(VALUES),keys:i?d:s(KEYS),entries:s(ENTRIES)},a)for(c in l)!BUGGY_SAFARI_ITERATORS&&!p&&c in u||defineBuiltIn$3(u,c,l[c]);else $$9({target:t,proto:!0,forced:BUGGY_SAFARI_ITERATORS||p},l);return u[ITERATOR$4]!==d&&defineBuiltIn$3(u,ITERATOR$4,d,{name:o}),Iterators$3[t]=d,l},toIndexedObject=toIndexedObject$5,addToUnscopables=addToUnscopables$1,Iterators$2=iterators,InternalStateModule$1=internalState,defineProperty$1=objectDefineProperty.f,defineIterator=defineIterator$1,DESCRIPTORS$2=descriptors,ARRAY_ITERATOR="Array Iterator",setInternalState$1=InternalStateModule$1.set,getInternalState=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(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?{value:e.target=void 0,done:!0}:"keys"==r?{value:n,done:!1}:"values"==r?{value:t[n],done:!1}:{value:[n,t[n]],done:!1}},"values"),values=Iterators$2.Arguments=Iterators$2.Array;if(addToUnscopables("keys"),addToUnscopables("values"),addToUnscopables("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$a=global$k,DOMIterables=domIterables,DOMTokenListPrototype=domTokenListPrototype,ArrayIteratorMethods=es_array_iterator,createNonEnumerableProperty=createNonEnumerableProperty$4,wellKnownSymbol$8=wellKnownSymbol$e,ITERATOR$3=wellKnownSymbol$8("iterator"),TO_STRING_TAG$2=wellKnownSymbol$8("toStringTag"),ArrayValues=ArrayIteratorMethods.values,handlePrototype=function(t,e){if(t){if(t[ITERATOR$3]!==ArrayValues)try{createNonEnumerableProperty(t,ITERATOR$3,ArrayValues)}catch(e){t[ITERATOR$3]=ArrayValues}if(t[TO_STRING_TAG$2]||createNonEnumerableProperty(t,TO_STRING_TAG$2,e),DOMIterables[e])for(var r in ArrayIteratorMethods)if(t[r]!==ArrayIteratorMethods[r])try{createNonEnumerableProperty(t,r,ArrayIteratorMethods[r])}catch(e){t[r]=ArrayIteratorMethods[r]}}};for(COLLECTION_NAME in DOMIterables)handlePrototype(global$a[COLLECTION_NAME]&&global$a[COLLECTION_NAME].prototype,COLLECTION_NAME);handlePrototype(DOMTokenListPrototype,"DOMTokenList");var EmptyStringDescriptionStore,SymbolWrapper,NATIVE_SYMBOL,symbolToString,symbolValueOf,regexp,replace,stringSlice,wellKnownSymbol$7=wellKnownSymbol$e,TO_STRING_TAG$1=wellKnownSymbol$e("toStringTag"),test$1={},toStringTagSupport=(test$1[TO_STRING_TAG$1]="z","[object z]"===String(test$1)),TO_STRING_TAG_SUPPORT=toStringTagSupport,isCallable$6=isCallable$l,classofRaw=classofRaw$1,wellKnownSymbol$6=wellKnownSymbol$e,TO_STRING_TAG=wellKnownSymbol$e("toStringTag"),$Object=Object,CORRECT_ARGUMENTS="Arguments"==classofRaw(function(){return arguments}()),tryGet=function(e,t){try{return e[t]}catch(e){}},classof$4=TO_STRING_TAG_SUPPORT?classofRaw: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(e):"Object"==(t=classofRaw(e))&&isCallable$6(e.callee)?"Arguments":t},classof$3=classof$4,$String=String,toString$2=function(e){if("Symbol"===classof$3(e))throw TypeError("Cannot convert a Symbol value to a string");return $String(e)},$$8=_export,DESCRIPTORS$1=descriptors,global$9=global$k,uncurryThis$4=functionUncurryThis,hasOwn$2=hasOwnProperty_1,isCallable$5=isCallable$l,isPrototypeOf$3=objectIsPrototypeOf,toString$1=toString$2,defineProperty=objectDefineProperty.f,copyConstructorProperties=copyConstructorProperties$2,NativeSymbol=global$9.Symbol,SymbolPrototype=NativeSymbol&&NativeSymbol.prototype,anObject$6=(!DESCRIPTORS$1||!isCallable$5(NativeSymbol)||"description"in SymbolPrototype&&void 0===NativeSymbol().description||(EmptyStringDescriptionStore={},copyConstructorProperties(SymbolWrapper=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:toString$1(arguments[0]),t=isPrototypeOf$3(SymbolPrototype,this)?new NativeSymbol(e):void 0===e?NativeSymbol():NativeSymbol(e);return""===e&&(EmptyStringDescriptionStore[t]=!0),t},NativeSymbol),(SymbolWrapper.prototype=SymbolPrototype).constructor=SymbolWrapper,NATIVE_SYMBOL="Symbol(test)"==String(NativeSymbol("test")),symbolToString=uncurryThis$4(SymbolPrototype.toString),symbolValueOf=uncurryThis$4(SymbolPrototype.valueOf),regexp=/^Symbol\((.*)\)[^)]+$/,replace=uncurryThis$4("".replace),stringSlice=uncurryThis$4("".slice),defineProperty(SymbolPrototype,"description",{configurable:!0,get:function(){var e=symbolValueOf(this),t=symbolToString(e);if(hasOwn$2(EmptyStringDescriptionStore,e))return"";e=NATIVE_SYMBOL?stringSlice(t,7,-1):replace(t,regexp,"$1");return""===e?void 0:e}}),$$8({global:!0,constructor:!0,forced:!0},{Symbol:SymbolWrapper})),anObject$c),regexpFlags=function(){var e=anObject$6(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},call$8=functionCall,hasOwn$1=hasOwnProperty_1,isPrototypeOf$2=objectIsPrototypeOf,regExpFlags=regexpFlags,RegExpPrototype$1=RegExp.prototype,regexpGetFlags=function(e){var t=e.flags;return void 0!==t||"flags"in RegExpPrototype$1||hasOwn$1(e,"flags")||!isPrototypeOf$2(RegExpPrototype$1,e)?t:call$8(regExpFlags,e)},PROPER_FUNCTION_NAME=functionName.PROPER,defineBuiltIn$2=defineBuiltIn$6,anObject$5=anObject$c,$toString=toString$2,fails$4=fails$g,getRegExpFlags=regexpGetFlags,TO_STRING="toString",RegExpPrototype=RegExp.prototype,n$ToString=RegExpPrototype[TO_STRING],NOT_GENERIC=fails$4(function(){return"/a/b"!=n$ToString.call({source:"a",flags:"b"})}),INCORRECT_NAME=PROPER_FUNCTION_NAME&&n$ToString.name!=TO_STRING;(NOT_GENERIC||INCORRECT_NAME)&&defineBuiltIn$2(RegExp.prototype,TO_STRING,function(){var e=anObject$5(this);return"/"+$toString(e.source)+"/"+$toString(getRegExpFlags(e))},{unsafe:!0});const ApplicationListItem=({app:e,onOpenApplicationDetailPanel:t,showInstalledChip:r=!1,isAppInstalled:n})=>{const{name:o,description:i,iconUrl:a,id:s,ownerOrganizationId:l}=e,c=useSelector(selectOrgId);var e=c&&l&&l.toString()===c.toString(),p={height:"18px",borderRadius:"30px",mb:1},u={fontWeight:"800",fontSize:"9px",lineHeight:"12px",textTransform:"uppercase"};return jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[jsxRuntime.exports.jsxs(ListItem,Object.assign({alignItems:"center",sx:{minHeight:"134px",p:4}},{children:[jsxRuntime.exports.jsx(ListItemAvatar,Object.assign({sx:{alignSelf:"flex-start"}},{children:jsxRuntime.exports.jsx(Avatar,Object.assign({src:a,alt:o},{children:jsxRuntime.exports.jsx(Avatar,{children:o[0]})}))})),jsxRuntime.exports.jsx(ListItemText,{sx:{display:"inline",maxWidth:"390px",alignSelf:"flex-start",m:0},primary:jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2",sx:{color:"#2A323C",fontWeight:"400"}},{children:o})),jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"row",spacing:1},{children:[r&&n&&n(s)&&jsxRuntime.exports.jsx(Chip$1,{label:jsxRuntime.exports.jsx(Typography,Object.assign({sx:Object.assign({color:green[700]},u)},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"admin-center-applications-installed-badge-123132",defaultMessage:"Installed",description:"installed application badge"})})),color:"success",size:"small",sx:Object.assign({background:"rgba(27, 94, 32, 0.2)",width:"70px"},p)}),e&&jsxRuntime.exports.jsx(Chip$1,{icon:jsxRuntime.exports.jsx(Lock,{style:{height:"12px",width:"12px"}}),label:jsxRuntime.exports.jsx(Typography,Object.assign({sx:Object.assign({color:"#4F5863"},u)},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"admin-center-applications-org-owned-badge-123112",defaultMessage:"org owned",description:"org owned application badge"})})),variant:"outlined",size:"small",sx:Object.assign({width:"90px"},p)})]}))]}),secondary:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2",sx:{mt:1}},{children:i}))}),jsxRuntime.exports.jsx(ListItemSecondaryAction,{children:jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:t,variant:"outlined",color:"primary"},{children:"View Details"}))})]})),jsxRuntime.exports.jsx(Divider,{})]})},LoaderSkeletonItem=()=>jsxRuntime.exports.jsxs(ListItem,Object.assign({alignItems:"center",sx:{height:"134px"}},{children:[jsxRuntime.exports.jsx(ListItemAvatar,{children:jsxRuntime.exports.jsx(Skeleton$1,{variant:"circular",width:40,height:40})}),jsxRuntime.exports.jsx(ListItemText,{children:jsxRuntime.exports.jsx(Skeleton$1,{variant:"text",width:150,height:30})}),jsxRuntime.exports.jsx(ListItemSecondaryAction,{children:jsxRuntime.exports.jsx(Skeleton$1,{variant:"rectangular",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,{})]}),ApplicationList=({apps:e,uiStatus:t,onRetry:r,showInstalledChip:n=!1,isAppInstalled:o})=>{const i=useDispatch();return"loading"===t?jsxRuntime.exports.jsx(LoaderSkeleton,{}):"failure"===t?jsxRuntime.exports.jsx(ErrorState,{onRetry:r,errorMessage:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.error-message",defaultMessage:"Something went wrong while loading applications.",description:"admin center applications error state"})}):jsxRuntime.exports.jsx(List,Object.assign({sx:{maxHeight:"95%",overflowY:"auto"}},{children:e.map(e=>jsxRuntime.exports.jsx(ApplicationListItem,{app:e,onOpenApplicationDetailPanel:(e=>()=>{i(mountPanel({panelId:"APPLICATION_DETAILS_PANEL",microFrontend:{name:"APPLICATION_DETAILS_PANEL",config:{applicationId:e.id,initValue:e}},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:80,size:"large",zIndex:1002,parentPanelId:"ADMIN_CENTER_BROWSE",dimmed:0,dimmedStatus:"dimParent"}}))})(e),showInstalledChip:n,isAppInstalled:o}))}))},SLICE_NAME$1="adminCenterApplication",namespace$2="adminCenterApplications",initialState$2={allApplications:[],installedApplications:[],allAppStatus:"idle",installedAppStatus:"idle"},adminCenterApplicationSlice=createSlice({name:SLICE_NAME$1+"/"+namespace$2,initialState:initialState$2,reducers:{fetchAllApplicationsStart(e){e.allAppStatus="loading"},fetchAllApplicationsSuccess(e,t){e.allAppStatus="success",e.allApplications=t.payload},fetchAllApplicationsFailure(e){e.allAppStatus="failure"},fetchInstalledApplicationsStart(e){e.installedAppStatus="loading"},fetchInstalledApplicationsSuccess(e,t){e.installedAppStatus="success",e.installedApplications=t.payload},fetchInstalledApplicationsFailure(e){e.installedAppStatus="failure"}}}),actions$2=adminCenterApplicationSlice.actions;var adminCenterApplications_state=adminCenterApplicationSlice.reducer;const selectInstalledApps=e=>{return null==(e=null==(e=null==e?void 0:e[SLICE_NAME$1])?void 0:e[namespace$2])?void 0:e.installedApplications},selectAllApps=e=>{return null==(e=null==(e=null==e?void 0:e[SLICE_NAME$1])?void 0:e[namespace$2])?void 0:e.allApplications},selectAllAppsUiStatus=e=>{return null==(e=null==(e=null==e?void 0:e[SLICE_NAME$1])?void 0:e[namespace$2])?void 0:e.allAppStatus},selectInstalledAppsUiStatus=e=>{return null==(e=null==(e=null==e?void 0:e[SLICE_NAME$1])?void 0:e[namespace$2])?void 0:e.installedAppStatus},selectApiConfigs=createSelector([rootApiSelector,graphEndpointSelector,sessionTokenSelector],(e,t,r)=>({apiRoot:e,graphQLEndpoint:t,token:r})),namespace$1=SLICE_NAME$1,initialState$1={[namespace$2]:initialState$2},actions$1={[namespace$2]:actions$2},rootReducer=combineReducers({[namespace$2]:adminCenterApplications_state});var location,defer,channel,port,tryToString$3=tryToString$5,$TypeError$6=TypeError,deletePropertyOrThrow$1=function(e,t){if(!delete e[t])throw $TypeError$6("Cannot delete property "+tryToString$3(t)+" of "+tryToString$3(e))},toPropertyKey=toPropertyKey$3,definePropertyModule$1=objectDefineProperty,createPropertyDescriptor=createPropertyDescriptor$4,createProperty$1=function(e,t,r){t=toPropertyKey(t);t in e?definePropertyModule$1.f(e,t,createPropertyDescriptor(0,r)):e[t]=r},toAbsoluteIndex=toAbsoluteIndex$2,lengthOfArrayLike$3=lengthOfArrayLike$5,createProperty=createProperty$1,$Array=Array,max=Math.max,arraySliceSimple=function(e,t,r){for(var n=lengthOfArrayLike$3(e),o=toAbsoluteIndex(t,n),i=toAbsoluteIndex(void 0===r?n:r,n),a=$Array(max(i-o,0)),s=0;o<i;o++,s++)createProperty(a,s,e[o]);return a.length=s,a},arraySlice$2=arraySliceSimple,floor=Math.floor,mergeSort=function(e,t){var r=e.length,n=floor(r/2);return r<8?insertionSort(e,t):merge(e,mergeSort(arraySlice$2(e,0,n),t),mergeSort(arraySlice$2(e,n),t),t)},insertionSort=function(e,t){for(var r,n,o=e.length,i=1;i<o;){for(r=e[n=i];n&&0<t(e[n-1],r);)e[n]=e[--n];n!==i++&&(e[n]=r)}return e},merge=function(e,t,r,n){for(var o=t.length,i=r.length,a=0,s=0;a<o||s<i;)e[a+s]=a<o&&s<i?n(t[a],r[s])<=0?t[a++]:r[s++]:a<o?t[a++]:r[s++];return e},arraySort=mergeSort,fails$3=fails$g,arrayMethodIsStrict$2=function(e,t){var r=[][e];return!!r&&fails$3(function(){r.call(null,t||function(){return 1},1)})},userAgent$4=engineUserAgent,firefox=engineUserAgent.match(/firefox\/(\d+)/i),engineFfVersion=!!firefox&&+firefox[1],UA=engineUserAgent,engineIsIeOrEdge=/MSIE|Trident/.test(UA),userAgent$3=engineUserAgent,webkit=engineUserAgent.match(/AppleWebKit\/(\d+)\./),engineWebkitVersion=!!webkit&&+webkit[1],$$7=_export,uncurryThis$3=functionUncurryThis,aCallable$7=aCallable$9,toObject$1=toObject$5,lengthOfArrayLike$2=lengthOfArrayLike$5,deletePropertyOrThrow=deletePropertyOrThrow$1,toString=toString$2,fails$2=fails$g,internalSort=arraySort,arrayMethodIsStrict$1=arrayMethodIsStrict$2,FF=engineFfVersion,IE_OR_EDGE=engineIsIeOrEdge,V8=engineV8Version,WEBKIT=engineWebkitVersion,test=[],un$Sort=uncurryThis$3(test.sort),push=uncurryThis$3(test.push),FAILS_ON_UNDEFINED=fails$2(function(){test.sort(void 0)}),FAILS_ON_NULL=fails$2(function(){test.sort(null)}),STRICT_METHOD$1=arrayMethodIsStrict$1("sort"),STABLE_SORT=!fails$2(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="",o=65;o<76;o++){switch(e=String.fromCharCode(o),o){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$1||!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(e)>toString(t)?1:-1}},classof$2=($$7({target:"Array",proto:!0,forced:FORCED},{sort:function(e){void 0!==e&&aCallable$7(e);var t=toObject$1(this);if(STABLE_SORT)return void 0===e?un$Sort(t):un$Sort(t,e);for(var r,n=[],o=lengthOfArrayLike$2(t),i=0;i<o;i++)i in t&&push(n,t[i]);for(internalSort(n,getSortCompare(e)),r=n.length,i=0;i<r;)t[i]=n[i++];for(;i<o;)deletePropertyOrThrow(t,i++);return t}}),classofRaw$1),global$8=global$k,engineIsNode="process"==classofRaw$1(global$k.process),getBuiltIn$3=getBuiltIn$8,definePropertyModule=objectDefineProperty,wellKnownSymbol$5=wellKnownSymbol$e,DESCRIPTORS=descriptors,SPECIES$2=wellKnownSymbol$e("species"),setSpecies$1=function(e){var e=getBuiltIn$3(e),t=definePropertyModule.f;DESCRIPTORS&&e&&!e[SPECIES$2]&&t(e,SPECIES$2,{configurable:!0,get:function(){return this}})},isPrototypeOf$1=objectIsPrototypeOf,$TypeError$5=TypeError,anInstance$1=function(e,t){if(isPrototypeOf$1(t,e))return e;throw $TypeError$5("Incorrect invocation")},uncurryThis$2=functionUncurryThis,fails$1=fails$g,isCallable$4=isCallable$l,classof$1=classof$4,getBuiltIn$2=getBuiltIn$8,inspectSource$1=inspectSource$4,noop=function(){},empty=[],construct=getBuiltIn$8("Reflect","construct"),constructorRegExp=/^\s*(?:class|function)\b/,exec=uncurryThis$2(constructorRegExp.exec),INCORRECT_TO_STRING=!constructorRegExp.exec(noop),isConstructorModern=function(e){if(!isCallable$4(e))return!1;try{return construct(noop,empty,e),!0}catch(e){return!1}},isConstructorLegacy=function(e){if(!isCallable$4(e))return!1;switch(classof$1(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return INCORRECT_TO_STRING||!!exec(constructorRegExp,inspectSource$1(e))}catch(e){return!0}},isConstructor$1=(isConstructorLegacy.sham=!0,!construct||fails$1(function(){var e;return isConstructorModern(isConstructorModern.call)||!isConstructorModern(Object)||!isConstructorModern(function(){e=!0})||e})?isConstructorLegacy:isConstructorModern),isConstructor=isConstructor$1,tryToString$2=tryToString$5,$TypeError$4=TypeError,aConstructor$1=function(e){if(isConstructor(e))return e;throw $TypeError$4(tryToString$2(e)+" is not a constructor")},anObject$4=anObject$c,aConstructor=aConstructor$1,wellKnownSymbol$4=wellKnownSymbol$e,SPECIES$1=wellKnownSymbol$e("species"),speciesConstructor$1=function(e,t){var e=anObject$4(e).constructor;return void 0===e||null==(e=anObject$4(e)[SPECIES$1])?t:aConstructor(e)},NATIVE_BIND$1=functionBindNative,FunctionPrototype=Function.prototype,apply$1=FunctionPrototype.apply,call$7=FunctionPrototype.call,functionApply="object"==typeof Reflect&&Reflect.apply||(NATIVE_BIND$1?call$7.bind(apply$1):function(){return call$7.apply(apply$1,arguments)}),uncurryThis$1=functionUncurryThis,aCallable$6=aCallable$9,NATIVE_BIND=functionBindNative,bind$4=functionUncurryThis(functionUncurryThis.bind),functionBindContext=function(e,t){return aCallable$6(e),void 0===t?e:NATIVE_BIND?bind$4(e,t):function(){return e.apply(t,arguments)}},uncurryThis=functionUncurryThis,arraySlice$1=functionUncurryThis([].slice),$TypeError$3=TypeError,validateArgumentsLength$1=function(e,t){if(e<t)throw $TypeError$3("Not enough arguments");return e},userAgent$2=engineUserAgent,engineIsIos=/(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$2),global$7=global$k,apply=functionApply,bind$3=functionBindContext,isCallable$3=isCallable$l,hasOwn=hasOwnProperty_1,fails=fails$g,html=html$2,arraySlice=arraySlice$1,createElement=documentCreateElement$2,validateArgumentsLength=validateArgumentsLength$1,IS_IOS$1=engineIsIos,IS_NODE$4=engineIsNode,set=global$7.setImmediate,clear=global$7.clearImmediate,process$3=global$7.process,Dispatch=global$7.Dispatch,Function$1=global$7.Function,MessageChannel=global$7.MessageChannel,String$1=global$7.String,counter=0,queue$1={},ONREADYSTATECHANGE="onreadystatechange";try{location=global$7.location}catch(e){}var flush,head,last,notify$1,toggle,node,promise,then,Internal,OwnPromiseCapability,PromiseWrapper,nativeThen,run=function(e){var t;hasOwn(queue$1,e)&&(t=queue$1[e],delete queue$1[e],t())},runner=function(e){return function(){run(e)}},listener=function(e){run(e.data)},post=function(e){global$7.postMessage(String$1(e),location.protocol+"//"+location.host)},task$1=(set&&clear||(set=function(e){validateArgumentsLength(arguments.length,1);var t=isCallable$3(e)?e:Function$1(e),r=arraySlice(arguments,1);return queue$1[++counter]=function(){apply(t,void 0,r)},defer(counter),counter},clear=function(e){delete queue$1[e]},IS_NODE$4?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=listener,defer=bind$3(port.postMessage,port)):global$7.addEventListener&&isCallable$3(global$7.postMessage)&&!global$7.importScripts&&location&&"file:"!==location.protocol&&!fails(post)?(defer=post,global$7.addEventListener("message",listener,!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}),userAgent$1=engineUserAgent,global$6=global$k,engineIsIosPebble=/ipad|iphone|ipod/i.test(userAgent$1)&&void 0!==global$6.Pebble,userAgent=engineUserAgent,engineIsWebosWebkit=/web0s(?!.*chrome)/i.test(userAgent),global$5=global$k,bind$2=functionBindContext,getOwnPropertyDescriptor=objectGetOwnPropertyDescriptor.f,macrotask=task$1.set,IS_IOS=engineIsIos,IS_IOS_PEBBLE=engineIsIosPebble,IS_WEBOS_WEBKIT=engineIsWebosWebkit,IS_NODE$3=engineIsNode,MutationObserver=global$5.MutationObserver||global$5.WebKitMutationObserver,document$2=global$5.document,process$2=global$5.process,Promise$1=global$5.Promise,queueMicrotaskDescriptor=getOwnPropertyDescriptor(global$5,"queueMicrotask"),queueMicrotask=queueMicrotaskDescriptor&&queueMicrotaskDescriptor.value,microtask$1=(queueMicrotask||(flush=function(){var e,t;for(IS_NODE$3&&(e=process$2.domain)&&e.exit();head;){t=head.fn,head=head.next;try{t()}catch(e){throw head?notify$1():last=void 0,e}}last=void 0,e&&e.enter()},notify$1=IS_IOS||IS_NODE$3||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$3?function(){process$2.nextTick(flush)}:(macrotask=bind$2(macrotask,global$5),function(){macrotask(flush)}):(toggle=!0,node=document$2.createTextNode(""),new MutationObserver(flush).observe(node,{characterData:!0}),function(){node.data=toggle=!toggle})),queueMicrotask||function(e){e={fn:e,next:void 0};last&&(last.next=e),head||(head=e,notify$1()),last=e}),global$4=global$k,hostReportErrors$1=function(e,t){var r=global$4.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))},perform$3=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},Queue$1=function(){this.head=null,this.tail=null},queue=(Queue$1.prototype={add:function(e){e={item:e,next:null};this.head?this.tail.next=e:this.head=e,this.tail=e},get:function(){var e=this.head;if(e)return this.head=e.next,this.tail===e&&(this.tail=null),e.item}},Queue$1),global$3=global$k,promiseNativeConstructor=global$k.Promise,engineIsDeno="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,IS_DENO$1=engineIsDeno,IS_NODE$2=engineIsNode,engineIsBrowser=!engineIsDeno&&!engineIsNode&&"object"==typeof window&&"object"==typeof document,global$2=global$k,NativePromiseConstructor$3=promiseNativeConstructor,isCallable$2=isCallable$l,isForced=isForced_1,inspectSource=inspectSource$4,wellKnownSymbol$3=wellKnownSymbol$e,IS_BROWSER=engineIsBrowser,IS_DENO=engineIsDeno,V8_VERSION=engineV8Version,SPECIES=(NativePromiseConstructor$3&&NativePromiseConstructor$3.prototype,wellKnownSymbol$3("species")),SUBCLASSING=!1,NATIVE_PROMISE_REJECTION_EVENT$1=isCallable$2(global$2.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]=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,PromiseCapability=function(e){var r,n;this.promise=new e(function(e,t){if(void 0!==r||void 0!==n)throw TypeError("Bad Promise constructor");r=e,n=t}),this.resolve=aCallable$5(r),this.reject=aCallable$5(n)},$$6=(newPromiseCapability$2.f=function(e){return new PromiseCapability(e)},_export),IS_NODE$1=engineIsNode,global$1=global$k,call$6=functionCall,defineBuiltIn$1=defineBuiltIn$6,setPrototypeOf=objectSetPrototypeOf,setToStringTag=setToStringTag$3,setSpecies=setSpecies$1,aCallable$4=aCallable$9,isCallable$1=isCallable$l,isObject$1=isObject$7,anInstance=anInstance$1,speciesConstructor=speciesConstructor$1,task=task$1.set,microtask=microtask$1,hostReportErrors=hostReportErrors$1,perform$2=perform$3,Queue=queue,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$1.TypeError,document$1=global$1.document,process$1=global$1.process,newPromiseCapability$1=newPromiseCapabilityModule$3.f,newGenericPromiseCapability=newPromiseCapability$1,DISPATCH_EVENT=!!(document$1&&document$1.createEvent&&global$1.dispatchEvent),UNHANDLED_REJECTION="unhandledrejection",REJECTION_HANDLED="rejectionhandled",PENDING=0,FULFILLED=1,REJECTED=2,HANDLED=1,UNHANDLED=2,isThenable=function(e){var t;return!(!isObject$1(e)||!isCallable$1(t=e.then))&&t},callReaction=function(e,t){var r,n,o,i=t.value,a=t.state==FULFILLED,s=a?e.ok:e.fail,l=e.resolve,c=e.reject,p=e.domain;try{s?(a||(t.rejection===UNHANDLED&&onHandleUnhandled(t),t.rejection=HANDLED),!0===s?r=i:(p&&p.enter(),r=s(i),p&&(p.exit(),o=!0)),r===e.promise?c(TypeError$1("Promise-chain cycle")):(n=isThenable(r))?call$6(n,r,l,c):l(r)):c(i)}catch(e){p&&!o&&p.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$1.dispatchEvent(n)):n={promise:t,reason:r},!NATIVE_PROMISE_REJECTION_EVENT&&(t=global$1["on"+e])?t(n):e===UNHANDLED_REJECTION&&hostReportErrors("Unhandled promise rejection",r)},onUnhandled=function(n){call$6(task,global$1,function(){var e=n.facade,t=n.value,r=isUnhandled(n);if(r&&(r=perform$2(function(){IS_NODE$1?process$1.emit("unhandledRejection",t,e):dispatchEvent(UNHANDLED_REJECTION,e,t)}),n.rejection=IS_NODE$1||isUnhandled(n)?UNHANDLED:HANDLED,r.error))throw r.value})},isUnhandled=function(e){return e.rejection!==HANDLED&&!e.parent},onHandleUnhandled=function(t){call$6(task,global$1,function(){var e=t.facade;IS_NODE$1?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 TypeError$1("Promise can't be resolved itself");var n=isThenable(e);n?microtask(function(){var t={done:!1};try{call$6(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$6(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$1(PromisePrototype,"then",function(e,t){var r=getInternalPromiseState(this),n=newPromiseCapability$1(speciesConstructor(this,PromiseConstructor));return r.parent=!0,n.ok=!isCallable$1(e)||e,n.fail=isCallable$1(t)&&t,n.domain=IS_NODE$1?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$1(NativePromiseConstructor$2)&&NativePromisePrototype$1!==Object.prototype)){nativeThen=NativePromisePrototype$1.then,NATIVE_PROMISE_SUBCLASSING||defineBuiltIn$1(NativePromisePrototype$1,"then",function(e,t){var r=this;return new PromiseConstructor(function(e,t){call$6(nativeThen,r,e,t)}).then(e,t)},{unsafe:!0});try{delete NativePromisePrototype$1.constructor}catch(e){}setPrototypeOf&&setPrototypeOf(NativePromisePrototype$1,PromisePrototype)}$$6({global:!0,constructor:!0,wrap:!0,forced:FORCED_PROMISE_CONSTRUCTOR$4},{Promise:PromiseConstructor}),setToStringTag(PromiseConstructor,PROMISE,!1),setSpecies(PROMISE);var wellKnownSymbol$2=wellKnownSymbol$e,Iterators$1=iterators,ITERATOR$2=wellKnownSymbol$e("iterator"),ArrayPrototype=Array.prototype,isArrayIteratorMethod$1=function(e){return void 0!==e&&(Iterators$1.Array===e||ArrayPrototype[ITERATOR$2]===e)},classof=classof$4,getMethod$1=getMethod$3,Iterators=iterators,wellKnownSymbol$1=wellKnownSymbol$e,ITERATOR$1=wellKnownSymbol$e("iterator"),getIteratorMethod$2=function(e){if(null!=e)return getMethod$1(e,ITERATOR$1)||getMethod$1(e,"@@iterator")||Iterators[classof(e)]},call$5=functionCall,aCallable$3=aCallable$9,anObject$3=anObject$c,tryToString$1=tryToString$5,getIteratorMethod$1=getIteratorMethod$2,$TypeError$2=TypeError,getIterator$1=function(e,t){var r=arguments.length<2?getIteratorMethod$1(e):t;if(aCallable$3(r))return anObject$3(call$5(r,e));throw $TypeError$2(tryToString$1(e)+" is not iterable")},call$4=functionCall,anObject$2=anObject$c,getMethod=getMethod$3,iteratorClose$1=function(e,t,r){var n,o;anObject$2(e);try{if(!(n=getMethod(e,"return"))){if("throw"===t)throw r;return r}n=call$4(n,e)}catch(e){o=!0,n=e}if("throw"===t)throw r;if(o)throw n;return anObject$2(n),r},bind=functionBindContext,call$3=functionCall,anObject$1=anObject$c,tryToString=tryToString$5,isArrayIteratorMethod=isArrayIteratorMethod$1,lengthOfArrayLike$1=lengthOfArrayLike$5,isPrototypeOf=objectIsPrototypeOf,getIterator=getIterator$1,getIteratorMethod=getIteratorMethod$2,iteratorClose=iteratorClose$1,$TypeError$1=TypeError,Result=function(e,t){this.stopped=e,this.result=t},ResultPrototype=Result.prototype,iterate$2=function(e,t,r){function n(e){return i&&iteratorClose(i,"normal",e),new Result(!0,e)}function o(e){return $?(anObject$1(e),f?g(e[0],e[1],n):g(e[0],e[1])):f?g(e,n):g(e)}var i,a,s,l,c,p,u=r&&r.that,$=!(!r||!r.AS_ENTRIES),d=!(!r||!r.IS_RECORD),y=!(!r||!r.IS_ITERATOR),f=!(!r||!r.INTERRUPTED),g=bind(t,u);if(d)i=e.iterator;else if(y)i=e;else{if(!(r=getIteratorMethod(e)))throw $TypeError$1(tryToString(e)+" is not iterable");if(isArrayIteratorMethod(r)){for(a=0,s=lengthOfArrayLike$1(e);a<s;a++)if((l=o(e[a]))&&isPrototypeOf(ResultPrototype,l))return l;return new Result(!1)}i=getIterator(e,r)}for(c=(d?e:i).next;!(p=call$3(c,i)).done;){try{l=o(p.value)}catch(e){iteratorClose(i,"throw",e)}if("object"==typeof l&&l&&isPrototypeOf(ResultPrototype,l))return l}return new Result(!1)},wellKnownSymbol=wellKnownSymbol$e,ITERATOR=wellKnownSymbol$e("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,Status,checkCorrectnessOfIteration$1=function(e,t){if(!t&&!SAFE_CLOSING)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(){})}),$$5=_export,call$2=functionCall,aCallable$2=aCallable$9,newPromiseCapabilityModule$2=newPromiseCapability$2,perform$1=perform$3,iterate$1=iterate$2,PROMISE_STATICS_INCORRECT_ITERATION$1=promiseStaticsIncorrectIteration,$$4=(_export({target:"Promise",stat:!0,forced:promiseStaticsIncorrectIteration},{all:function(e){var s=this,t=newPromiseCapabilityModule$2.f(s),l=t.resolve,c=t.reject,r=perform$1(function(){var n=aCallable$2(s.resolve),o=[],i=0,a=1;iterate$1(e,function(e){var t=i++,r=!1;a++,call$2(n,s,e).then(function(e){r||(r=!0,o[t]=e,--a||l(o))},c)}),--a||l(o)});return r.error&&c(r.value),t.promise}}),_export),FORCED_PROMISE_CONSTRUCTOR$2=promiseConstructorDetection.CONSTRUCTOR,NativePromiseConstructor=promiseNativeConstructor,getBuiltIn$1=getBuiltIn$8,isCallable=isCallable$l,defineBuiltIn=defineBuiltIn$6,NativePromisePrototype=NativePromiseConstructor&&NativePromiseConstructor.prototype,$$3=($$4({target:"Promise",proto:!0,forced:FORCED_PROMISE_CONSTRUCTOR$2,real:!0},{catch:function(e){return this.then(void 0,e)}}),isCallable(NativePromiseConstructor)&&(method=getBuiltIn$1("Promise").prototype.catch,NativePromisePrototype.catch!==method&&defineBuiltIn(NativePromisePrototype,"catch",method,{unsafe:!0})),_export),call$1=functionCall,aCallable$1=aCallable$9,newPromiseCapabilityModule$1=newPromiseCapability$2,perform=perform$3,iterate=iterate$2,PROMISE_STATICS_INCORRECT_ITERATION=promiseStaticsIncorrectIteration,$$2=(_export({target:"Promise",stat:!0,forced:promiseStaticsIncorrectIteration},{race:function(e){var r=this,n=newPromiseCapabilityModule$1.f(r),o=n.reject,t=perform(function(){var t=aCallable$1(r.resolve);iterate(e,function(e){call$1(t,r,e).then(n.resolve,o)})});return t.error&&o(t.value),n.promise}}),_export),call=functionCall,newPromiseCapabilityModule=newPromiseCapability$2,FORCED_PROMISE_CONSTRUCTOR$1=promiseConstructorDetection.CONSTRUCTOR,anObject=($$2({target:"Promise",stat:!0,forced:FORCED_PROMISE_CONSTRUCTOR$1},{reject:function(e){var t=newPromiseCapabilityModule.f(this);return call(t.reject,void 0,e),t.promise}}),anObject$c),isObject=isObject$7,newPromiseCapability=newPromiseCapability$2,promiseResolve$1=function(e,t){if(anObject(e),isObject(t)&&t.constructor===e)return t;e=newPromiseCapability.f(e);return(0,e.resolve)(t),e.promise},$$1=_export,getBuiltIn=getBuiltIn$8,FORCED_PROMISE_CONSTRUCTOR=promiseConstructorDetection.CONSTRUCTOR,promiseResolve=promiseResolve$1;function __rest(e,t){var r={};for(o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r}function __awaiter(e,a,s,l){return new(s=s||Promise)(function(r,t){function n(e){try{i(l.next(e))}catch(e){t(e)}}function o(e){try{i(l.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(n,o)}i((l=l.apply(e,a||[])).next())})}function fetchInstalledApplications(r){return __awaiter(this,void 0,void 0,function*(){var e="fetchInstalledApplications",t="applications";return(yield baseGraphQLApiWithError(Object.assign({query:"\n query fetchInstalledApplications {\n applications (\n owned: false,\n limit: 100,\n status: active\n ) {\n records {\n id\n name\n description\n iconUrl\n isPublic\n ownerOrganizationId\n }\n }\n }\n ",operationName:e},r)))[t]})}getBuiltIn("Promise"),$$1({target:"Promise",stat:!0,forced:FORCED_PROMISE_CONSTRUCTOR},{resolve:function(e){return promiseResolve(this,e)}});const fetchAllApplications=(r,n)=>__awaiter(void 0,void 0,void 0,function*(){try{const e=yield fetch(r+"/v1/admin/applications?allActive=true&limit=99999&offset=0",{method:"GET",headers:Object.assign({"Content-Type":"application/json"},n&&{Authorization:"Bearer "+n}),credentials:"include"}),t=yield e.json();return t.records=t.results.map(e=>Object.assign({name:e.applicationName,iconUrl:e.applicationIconUrl,id:e.applicationId,isPublic:e.public,description:e.applicationDescription},e)),t}catch(e){throw console.error(e),new Error("Something went wrong while loading apps")}});function*fetchInstalledAppsSaga(){try{const e=yield fetchInstalledApplications(yield select(selectApiConfigs));e.records=e.records.sort((e,t)=>e.name.localeCompare(t.name)),yield put(actions$1.adminCenterApplications.fetchInstalledApplicationsSuccess(e.records))}catch(e){yield put(actions$1.adminCenterApplications.fetchInstalledApplicationsFailure()),console.log(e)}}function*fetchAllAppsSaga(){try{var e=yield select(selectApiConfigs),t=yield fetchAllApplications(e.apiRoot,e.token);yield put(actions$1.adminCenterApplications.fetchAllApplicationsSuccess(t.records))}catch(e){yield put(actions$1.adminCenterApplications.fetchAllApplicationsFailure()),console.log(e)}}function*getInstalledAppsWatcher(){yield takeEvery$1(actions$1.adminCenterApplications.fetchInstalledApplicationsStart.type,fetchInstalledAppsSaga)}function*getAllAppsWatcher(){yield takeEvery$1(actions$1.adminCenterApplications.fetchAllApplicationsStart.type,fetchAllAppsSaga)}function*rootSaga(){yield all([getInstalledAppsWatcher(),getAllAppsWatcher()])}const SLICE_NAME="applications",namespace=(!function(e){e.idle="idle",e.loading="loading",e.success="success",e.failure="failure"}(Status=Status||{}),"applicationDetail"),initialState={status:"idle",application:{},ownerOrganization:{name:""}},applicationDetailSlice=createSlice({name:SLICE_NAME+"/"+namespace,initialState:initialState,reducers:{setInitialApplicationValue(e,t){var r=t.payload,n=r["ownerOrganization"],r=__rest(r,["ownerOrganization"]);e.initValue=t.payload,e.application=r,e.ownerOrganization=n,e.status=Status.success},fetchApplicationStart(e,t){var r,{applicationId:t,initValue:n}=t.payload;e.applicationId=t,n?(t=n["ownerOrganization"],r=__rest(n,["ownerOrganization"]),e.initValue=n,e.application=r,e.ownerOrganization=t,e.status=Status.success):e.status=Status.loading},fetchApplicationSuccess(e,t){var{application:t,organization:r}=t.payload;e.application=t,e.ownerOrganization=r,e.status=Status.success},fetchApplicationError(e,t){e.status=Status.failure},setStatus(e,t){e.status=t.payload}}}),actions=applicationDetailSlice.actions;var applicationDetailsPanelReducer=applicationDetailSlice.reducer;function getApplicationById(n,o){return __awaiter(this,void 0,void 0,function*(){var e="getApplicationById",t="applications",r={id:o};try{return(yield baseGraphQLApiWithError(Object.assign({query:"\n query getApplicationById ($id: ID!){\n applications (owned: false, id: $id) {\n records {\n id\n name\n description\n iconUrl\n isPublic\n entityTags {\n tagKey\n tagValue\n }\n ownerOrganizationId\n }\n }\n }\n ",operationName:e,variables:r},n)))[t]}catch(e){throw console.log(e),new Error("Something went wrong while loading app details")}})}function getOrganizationName(r,n){return __awaiter(this,void 0,void 0,function*(){var e="getOrganizationName",t={id:n};try{return yield baseGraphQLApiWithError(Object.assign({query:"\n query getOrganizationName ($id: ID!){\n organization (id: $id) {\n id\n name\n }\n }\n ",operationName:e,variables:t},r))}catch(e){console.log(e)}})}function*fetchOwnerOrganization(e,t){let r={};try{var n=(yield call$g(getOrganizationName,e,t))["organization"];r=n}catch(e){r={id:t,name:" "},console.log(e)}return r}function*fetchApplicationDetailsSaga(e){try{var t=yield select(selectApiConfigs),[r]=(yield call$g(getApplicationById,t,e.payload.applicationId)).records,n=yield call$g(fetchOwnerOrganization,t,r.ownerOrganizationId);yield put(actions.fetchApplicationSuccess({application:r,organization:n}))}catch(e){yield put(actions.fetchApplicationError()),console.log(e)}}function*getApplicationDetailsWatcher(){yield takeEvery$1(actions.fetchApplicationStart.type,fetchApplicationDetailsSaga)}function*applicationDetailsPanelRootSaga(){yield all([getApplicationDetailsWatcher()])}function getAdminCenterApplicationsModule(){return{id:SLICE_NAME$1,reducerMap:{[SLICE_NAME$1]:rootReducer},sagas:[rootSaga],initialActions:[]}}function getApplicationDetailsPanelModule(){return{id:SLICE_NAME,reducerMap:{[SLICE_NAME]:applicationDetailsPanelReducer},sagas:[applicationDetailsPanelRootSaga],initialActions:[]}}const tabsList$1=[{label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.lpZXMd",defaultMessage:"All Applications",description:"Admin center all applications label"}),disabled:!1,id:"All Applications"},{label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.lpZXMy",defaultMessage:"Installed Applications",description:"Admin center installed applications label"}),disabled:!1,id:"Installed Applications"}],ApplicationsTable=()=>{const[e,t]=react.exports.useState(0),r=useSelector(selectIsUserAdmin),n=useSelector(selectInstalledApps);var o=useSelector(selectAllApps),i=useSelector(selectInstalledAppsUiStatus),a=useSelector(selectAllAppsUiStatus);const s=useDispatch();react.exports.useEffect(()=>{s(actions$1.adminCenterApplications.fetchInstalledApplicationsStart()),r&&s(actions$1.adminCenterApplications.fetchAllApplicationsStart())},[s]);return jsxRuntime.exports.jsxs(React.Fragment,{children:[jsxRuntime.exports.jsx(Box,Object.assign({sx:{borderBottom:"1px solid #e8e8e8"}},{children:jsxRuntime.exports.jsx(Box,Object.assign({sx:{"& .Sdk-MuiTab-root.Mui-selected":{color:"text.primary",fontWeight:600},width:r?"350px":"170px"}},{children:jsxRuntime.exports.jsx(CustomTabs,{selectedId:e,onChangeTab:e=>{t(e)},tabsList:r?tabsList$1:[tabsList$1[1]]})}))})),jsxRuntime.exports.jsx(TabPanel,Object.assign({value:e,index:0},{children:r?jsxRuntime.exports.jsx(ApplicationList,{apps:o,uiStatus:a,onRetry:()=>s(actions$1.adminCenterApplications.fetchAllApplicationsStart()),showInstalledChip:!0,isAppInstalled:t=>-1!==n.findIndex(e=>e.id===t)}):jsxRuntime.exports.jsx(ApplicationList,{apps:n,uiStatus:i,onRetry:()=>s(actions$1.adminCenterApplications.fetchInstalledApplicationsStart())})})),jsxRuntime.exports.jsx(TabPanel,Object.assign({value:e,index:1},{children:jsxRuntime.exports.jsx(ApplicationList,{apps:n,uiStatus:i,onRetry:()=>s(actions$1.adminCenterApplications.fetchInstalledApplicationsStart())})}))]})},useStyles$2=makeStyles()(e=>({root:{display:"flex",flexDirection:"column",height:"100%"},header:{display:"flex",justifyContent:"space-between",padding:e.spacing(4),borderBottom:"0.5px solid "+e.palette.divider},tableWrapper:{overflow:"hidden"},toolbar:{alignItems:"baseline","& button svg":{marginRight:"5px"},display:"flex",justifyContent:"center"}}));function ApplicationsTab({}){var e=useStyles$2()["classes"];return jsxRuntime.exports.jsxs("section",Object.assign({className:e.root},{children:[jsxRuntime.exports.jsx("header",Object.assign({className:e.header},{children:jsxRuntime.exports.jsxs(Box,Object.assign({sx:{mr:15}},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h5","data-testid":"org-applications.header"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-panel.applications.table.header",defaultMessage:"Applications",description:"Application Header"})})),jsxRuntime.exports.jsx(Typography,Object.assign({sx:{mt:1},variant:"subtitle1","data-testid":"org-applications.description"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-panel.applications.table.description",defaultMessage:"Browse and manage the applications that are enabled for this Organization and its users.",description:"Applications Tab Description"})}))]}))})),jsxRuntime.exports.jsx("div",Object.assign({className:e.tableWrapper},{children:jsxRuntime.exports.jsx(ApplicationsTable,{})}))]}))}var aCallable=aCallable$9,toObject=toObject$5,IndexedObject=indexedObject,lengthOfArrayLike=lengthOfArrayLike$5,$TypeError=TypeError,createMethod=function(c){return function(e,t,r,n){aCallable(t);var o=toObject(e),i=IndexedObject(o),a=lengthOfArrayLike(o),s=c?a-1:0,l=c?-1:1;if(r<2)for(;;){if(s in i){n=i[s],s+=l;break}if(s+=l,c?s<0:a<=s)throw $TypeError("Reduce of empty array with no initial value")}for(;c?0<=s:s<a;s+=l)s in i&&(n=t(n,i[s],s,o));return n}},arrayReduce={left:createMethod(!1),right:createMethod(!0)},$=_export,$reduce=arrayReduce.left,arrayMethodIsStrict=arrayMethodIsStrict$2,CHROME_VERSION=engineV8Version,IS_NODE=engineIsNode,STRICT_METHOD=arrayMethodIsStrict$2("reduce"),CHROME_BUG=!IS_NODE&&79<CHROME_VERSION&&CHROME_VERSION<83;$({target:"Array",proto:!0,forced:!STRICT_METHOD||CHROME_BUG},{reduce:function(e){var t=arguments.length;return $reduce(this,e,t,1<t?arguments[1]:void 0)}});const useStyles$1=makeStyles()(e=>({panelRoot:{width:"100%"},panelLoading:{height:300},panelContainer:{display:"flex",flexDirection:"column",width:"100%",padding:e.spacing(2)},panelHeader:{display:"flex",justifyContent:"space-between",alignItems:"center",paddingLeft:e.spacing(1),marginBottom:e.spacing(1),"&.with-secondary-title":{alignItems:"flex-start"}},panelHeaderLine:{minHeight:"16px"},panelContent:{width:"100%"},panelBody:{display:"flex",flexGrow:1},divider:{marginBottom:e.spacing(2)},engineHeader:{minHeight:"120px"},headerInfo:{paddingLeft:e.spacing(4),flexGrow:1},headerOwner:{color:"#0c53b0",minHeight:"16px"},detailInfo:{paddingTop:e.spacing(6)},detailInfoBody:{paddingLeft:e.spacing(4),paddingTop:e.spacing(3)},detailOverview:{paddingTop:e.spacing(6),paddingBottom:e.spacing(6),minHeight:"120px"},sectionTitle:{paddingBottom:e.spacing(3)},textContent:{fontStyle:"normal",fontWeight:400,fontSize:14,lineHeight:20},titleInline:{fontWeight:600,marginRight:e.spacing(1)},contentRow:{paddingBottom:e.spacing(3)},engineDescription:{paddingTop:e.spacing(2),paddingBottom:e.spacing(2)},engineVersion:{paddingLeft:e.spacing(3)},mainLayout:{paddingTop:e.spacing(2)},tabPanels:{width:"100%"},detailHeaderContainer:{paddingLeft:e.spacing(3),paddingTop:e.spacing(2),alignItems:"center"},taskTabPanels:{marginTop:e.spacing(2),paddingLeft:e.spacing(2),paddingRight:e.spacing(2),width:"100%",maxHeight:"160px",maxWidth:"660px",overflow:"auto",background:"#F4F4F4",border:"1px solid #D5DFE9","box-sizing":"border-box","border-radius":"4px"},metricsList:{paddingTop:e.spacing(6)},taskFitlerContainer:{marginTop:e.spacing(4),marginBottom:e.spacing(2),height:"40px",lineHeight:"40px",display:"flex","flex-wrap":"wrap","flex-direction":"row","justify-content":"flex-end"},taskFitlerItem:{marginRight:e.spacing(2)}})),selectStatus=e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e.status},selectApplication=e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e.application},selectOwnerOrganization=e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e.ownerOrganization},useStyles=makeStyles()(e=>({root:{borderRadius:"50%",border:"2px solid #D5DFE9",display:"flex",justifyContent:"center",alignItems:"center",overflow:"hidden"},small:{width:e.spacing(6),height:e.spacing(6)},medium:{width:e.spacing(9),height:e.spacing(9)},large:{width:e.spacing(12),height:e.spacing(12)},xlarge:{width:e.spacing(16),height:e.spacing(16)},logo:{maxWidth:"100%",maxHeight:"100%"},veritoneLogo:{maxWidth:"75%",maxHeight:"75%"}})),Logo=({size:e="xlarge",path:t="",altText:r})=>{var n=useStyles()["classes"],[t,o]=useBackupImg(t,img$1u);return jsxRuntime.exports.jsx("div",Object.assign({className:n.root+" "+n[e]},{children:jsxRuntime.exports.jsx("img",{className:n.logo+" "+(t===img$1u&&n.veritoneLogo),src:t,alt:r,onError:o})}))},getSignedUriPath=r=>{const e=["iconUrl"].map(e=>e);return e.reduce((e,t)=>r[t]||e,void 0)},DetailHeader=()=>{var e=useSelector(selectApplication),t=useSelector(selectOwnerOrganization),r=useStyles$1()["classes"],n=null==(n=e.entityTags)?void 0:n.map(e=>e.tagKey).join(", "),o=getSignedUriPath(e);return jsxRuntime.exports.jsxs(Box,Object.assign({display:"flex",flexDirection:"row",className:r.detailHeaderContainer,"data-testid":"application-details-header"},{children:[jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(Logo,{path:o,altText:e.name+" Logo"})}),jsxRuntime.exports.jsxs("div",Object.assign({className:r.headerInfo},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h1","data-testid":"application-details-header-name"},{children:e.name})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption",className:r.headerOwner,"data-testid":"application-details-header-owner"},{children:null==t?void 0:t.name})),jsxRuntime.exports.jsx(Box,Object.assign({display:"flex",flexDirection:"row",className:r.panelHeaderLine},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:n}))}))]})),jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(Button$1,Object.assign({color:"primary",variant:"contained"},{children:"Install App"}))})]}))},InfoItem=({dataTest:e,title:t,value:r})=>jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:6},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption","data-test":`application-details-panel-detail-info-${e}-caption`},{children:t})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h5","data-test":"application-details-panel-detail-info-"+e},{children:r}))]})),BasicInfo=()=>{var e=useSelector(selectApplication),t=useStyles$1()["classes"];return jsxRuntime.exports.jsxs(Box,Object.assign({"data-test":"application-details-panel-basic-info-content"},{children:[jsxRuntime.exports.jsxs(Box,Object.assign({className:t.detailOverview,"data-test":"application-details-panel-overview"},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h3",className:t.sectionTitle},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.application-detail-panel-overview-title",defaultMessage:"Overview",description:"title of the Overview section on the application details panel"})})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h5"},{children:e.description}))]})),jsxRuntime.exports.jsx(Divider,{}),jsxRuntime.exports.jsxs(Box,Object.assign({className:t.detailInfo,"data-test":"application-details-panel-basic-info-details"},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h3",className:t.sectionTitle},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.application-detail-panel-basic-info-details-title",defaultMessage:"Information",description:"The title of the Information section in the application details panel basic info"})})),jsxRuntime.exports.jsxs(Grid,Object.assign({container:!0,spacing:4,className:t.detailInfoBody},{children:[jsxRuntime.exports.jsx(InfoItem,{dataTest:"name",title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.application-detail-panel-info-name-title",defaultMessage:"Name",description:"The title of the name field in the application details panel basic info"}),value:e.name}),jsxRuntime.exports.jsx(InfoItem,{dataTest:"app-id",title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.application-detail-panel-info-app-id-title",defaultMessage:"App ID",description:"The title of the app id field in the application details panel basic info"}),value:e.id}),jsxRuntime.exports.jsx(InfoItem,{dataTest:"tags",title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.application-detail-panel-info-tags-title",defaultMessage:"Tags",description:"The title of the tags field in the application details panel basic info"}),value:null==(t=e.entityTags)?void 0:t.map(e=>e.tagKey).join(", ")})]}))]}))]}))},tabsList=[{label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.application-detail-basic-info",defaultMessage:"Basic Info",description:"the title of the Basic Info tab on the application details panel"}),disabled:!1,id:"application-details-tab-label-basic-info"}],MainLayout=()=>{var e=useStyles$1()["classes"];return jsxRuntime.exports.jsxs(Box,Object.assign({className:e.mainLayout},{children:[jsxRuntime.exports.jsx(Box,Object.assign({"data-testid":"application-details-panel-tabs-list"},{children:jsxRuntime.exports.jsx(CustomTabs,{selectedId:0,onChangeTab:()=>{},tabsList:tabsList})})),jsxRuntime.exports.jsx(Box,Object.assign({className:e.tabPanels},{children:jsxRuntime.exports.jsx(TabPanel,Object.assign({value:0,index:0},{children:jsxRuntime.exports.jsx(BasicInfo,{})}))}))]}))},Content=({applicationId:e,initValue:t})=>{var r=useSelector(selectStatus);const n=useDispatch();var o=useStyles$1()["classes"];react.exports.useEffect(()=>{e?n(actions.fetchApplicationStart({applicationId:e,initValue:t})):t&&n(actions.setInitialApplicationValue(t))},[n,e,t]);return r===Status.loading&&jsxRuntime.exports.jsxs(Container,Object.assign({className:o.panelLoading},{children:[jsxRuntime.exports.jsx(Skeleton$1,{variant:"rectangular",animation:"wave",width:400,height:200}),jsxRuntime.exports.jsx(Divider,{sx:{my:2}}),jsxRuntime.exports.jsx(Skeleton$1,{variant:"rectangular",animation:"wave",width:960,height:300})]}))||r===Status.success&&jsxRuntime.exports.jsxs(Container,Object.assign({className:o.panelContent},{children:[jsxRuntime.exports.jsx(DetailHeader,{}),jsxRuntime.exports.jsx(MainLayout,{})]}))||r===Status.failure&&jsxRuntime.exports.jsx(Container,{children:jsxRuntime.exports.jsx(ErrorState,{onRetry:()=>{n(actions.fetchApplicationStart({applicationId:e,initValue:t}))},errorMessage:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.application-details-panel-error-message",defaultMessage:"Something went wrong while loading your application details.",description:"error message shown when the application details panel encounters a load error"})})})||jsxRuntime.exports.jsx(Container,{children:"Please wait..."})},PanelContainer=({children:e})=>{const t=useDispatch();var r=useStyles$1()["classes"];return jsxRuntime.exports.jsx("div",Object.assign({className:r.panelRoot,"data-testid":"application-details-panel"},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:r.panelContainer},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:r.panelHeader},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({"data-testid":"application-details-panel-title",variant:"h1"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.detail-panel-title",defaultMessage:"Application Details",description:"The title of the Application Details panel"})})),jsxRuntime.exports.jsx(Tooltip$1,Object.assign({title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.detail-panel-close",defaultMessage:"Close Panel",description:"The title of the Application Details panel close button"})},{children:jsxRuntime.exports.jsx(IconButton$1,Object.assign({onClick:()=>{t(hidePanel("APPLICATION_DETAILS_PANEL"))},"aria-labelledby":"group-details-close-panel","data-testid":"group-details-close-panel",size:"large"},{children:jsxRuntime.exports.jsx(Hide,{})}))}))]})),jsxRuntime.exports.jsx("div",Object.assign({className:r.panelBody},{children:e}))]}))}))},ApplicationDetailsPanel=({applicationId:e,initValue:t})=>jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(lib.DynamicModuleLoader,Object.assign({modules:[getApplicationDetailsPanelModule()]},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(CacheProvider,Object.assign({value:muiCache},{children:jsxRuntime.exports.jsx(PanelContainer,{children:jsxRuntime.exports.jsx(Content,{applicationId:e,initValue:t})})}))})}))});export{ApplicationDetailsPanel,ApplicationsTab,Content,PanelContainer,actions$1 as actions,getAdminCenterApplicationsModule,getApplicationDetailsPanelModule,initialState$1 as initialState,namespace$1 as namespace,rootReducer};
package/js-core.esm49.js DELETED
@@ -1 +0,0 @@
1
- import{p as createSvgIcon,q as interopRequireDefault,j as jsxRuntime,m as makeStyles,bO as createSlice,dB as combineReducers,aX as createSelector,bT as rootApiSelector,aF as graphEndpointSelector,a9 as sessionTokenSelector,O as AIWareThemeProvider,Q as lib,gd as getLibraryModule,A as AIWareIntlProvider,d1 as CacheProvider,d2 as muiCache,H as useSelector,r as react,G as useDispatch,F as FormattedMessage,T as Typography,X as Tooltip$1,V as IconButton$1,dC as Close,bh as Box,bI as Alert,ar as Button$1,bb as CircularProgress,bY as Portal,Y as Badge,bu as Icon,go as EngineCategoryIcons,cv as Snackbar,gV as ConfirmationModal,as as all,h2 as selectors$1,h3 as LibraryDropdown,df as FormHelperText,h4 as Remove,h5 as Save,dS as Add,dM as Delete,dK as Edit,L as mountPanel,W as classnames,au as takeLatest$1,bg as FormControl,aE as select,bR as preferredLanguageSelector,cD as AIWareFormatMessage,az as put,dm as showMessage,dn as MessageSeverity,aB as call,f1 as sdkEventManager,f2 as SdkEvents,f3 as SdkError,bH as lodash,bL as TextField,ct as Select,cu as MenuItem,h6 as Input,dP as baseGraphQLApiWithError}from"./js-core.esm.js";import{selectors}from"./js-core.esm39.js";import{d as default_1$2}from"./js-core.esm8.js";import{C as Chip$1}from"./js-core.esm33.js";import"./js-core.esm32.js";import"./js-core.esm40.js";import"./js-core.esm41.js";import"./js-core.esm18.js";import"./js-core.esm30.js";import"./js-core.esm42.js";import"./js-core.esm11.js";import"./js-core.esm12.js";import"./js-core.esm5.js";import"./js-core.esm22.js";import"./js-core.esm25.js";import"./js-core.esm24.js";import"./js-core.esm9.js";var LoadingStatus,ProcessAIView,CheckCircle={},_interopRequireDefault$1=interopRequireDefault.exports,default_1$1=(Object.defineProperty(CheckCircle,"__esModule",{value:!0}),CheckCircle.default=void 0),_createSvgIcon$1=_interopRequireDefault$1(createSvgIcon),_jsxRuntime$1=jsxRuntime.exports,_default$1=(0,_createSvgIcon$1.default)((0,_jsxRuntime$1.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckCircle"),default_1$1=CheckCircle.default=_default$1,Info={},_interopRequireDefault=interopRequireDefault.exports,default_1=(Object.defineProperty(Info,"__esModule",{value:!0}),Info.default=void 0),_createSvgIcon=_interopRequireDefault(createSvgIcon),_jsxRuntime=jsxRuntime.exports,_default=(0,_createSvgIcon.default)((0,_jsxRuntime.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"}),"Info"),default_1=Info.default=_default;!function(){var e={};try{if(process)return process.env=Object.assign({},process.env),Object.assign(process.env,e)}catch(e){}globalThis.process={env:e}}();const SHARED_TEXT={processAiHeaderTitle:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.eA9TAY",defaultMessage:"AI PROCESSING",description:"Title of AI categories list"}),closePanel:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.kOsSpC",defaultMessage:"Close Panel",description:"Close Panel"}),processAiHeaderDescription:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.p3BcDi",defaultMessage:"Select from a list of AI capabilities to apply available AI processing to your selected files.",description:"Detailed text below the process AI header title"}),processAiEngineUnavailable:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.PwcA3J",defaultMessage:"This engine does not specify a default single job template.",description:"Detailed text if an engine is not available to use"}),processAiFailedStatus:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.UBu61T",defaultMessage:"An error happened while fetching the engine capabilities.",description:"Error message for process ai failures"}),processAiNoEngineCapability:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.IC5L+j",defaultMessage:"No available engine found for this file.",description:"Warning message when no engine found"}),processAiRetryBtn:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.8U+Kek",defaultMessage:"Retry",description:"Retry button text"}),cancel:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.6PdOcy",defaultMessage:"Cancel",description:"Cancel"}),processAiAddEngines:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.e5+f7H",defaultMessage:"Save Changes",description:"Add engines button text"}),engineSettings:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.3Phobj",defaultMessage:"Engine Settings",description:"The label for the engine settings component"}),saveSettings:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.UOkssC",defaultMessage:"Save Settings",description:"The label for the engine settings savings"}),engineSelected:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.Ki+AeV",defaultMessage:"Selected & Configured",description:"The label for the selected engine"}),removeEngine:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.eZW4Lt",defaultMessage:"Remove Engine",description:"The button to deselected a selected engine"}),editConfigurations:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.GSlIPA",defaultMessage:"Edit Configurations",description:"The button to edit the engine configurations"}),useThisEngine:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai-use-engine",defaultMessage:"Use this Engine",description:"The label for the use engine button when no engine has not been selected yet"})},useStyles$5=makeStyles()(e=>({aiProcessingWrapper:{padding:"8px 20px 20px 20px",display:"flex",flexDirection:"column",height:"100%",position:"absolute",top:"0",bottom:"0"},processAiHeader:{display:"flex",alignItems:"center",flexDirection:"row",justifyContent:"space-between",marginBottom:10},loaderIcon:{display:"flex",alignItems:"center",justifyContent:"center",marginTop:20}})),SLICE_NAME="dataCenterProcessAI",namespace$3=(!function(e){e.failed="failed",e.idle="idle",e.pending="pending",e.success="success"}(LoadingStatus=LoadingStatus||{}),!function(e){e.aiCapabilities="aiCapabilities",e.engineSelection="engineSelection",e.engineConfiguration="engineConfiguration"}(ProcessAIView=ProcessAIView||{}),"capabilitiesState"),initialState$3={status:LoadingStatus.idle,capabilities:[],engines:{}},capabilitiesSlice=createSlice({name:SLICE_NAME+"/"+namespace$3,initialState:initialState$3,reducers:{capabilitiesFetchStart(e,t){e.status=LoadingStatus.pending},capabilitiesFetchSucceed(e){e.status=LoadingStatus.idle},capabilitiesFetchFailed(e){e.status=LoadingStatus.failed},setCapabilities:(e,t)=>{e.capabilities=t.payload},setEngines:(e,t)=>{e.engines=t.payload}}}),actions$4=capabilitiesSlice.actions;var capabilities_state=capabilitiesSlice.reducer;const namespace$2="processAiConfig",initialState$2={status:LoadingStatus.idle,selectedEngines:{}},configurationSlice=createSlice({name:SLICE_NAME+"/"+namespace$2,initialState:initialState$2,reducers:{setConfigurations(e,t){var{capabilityId:t,selectedEngines:s}=t.payload;e.selectedEngines[t]=s},updateSingleJobStatus(e,t){const{engineId:s,status:n}=t.payload;for(const a in e.selectedEngines){var i=e.selectedEngines[a].findIndex(e=>e.id===s);if(-1!==i){e.selectedEngines[a][i].status=n;break}}}}}),actions$3=configurationSlice.actions;var configuration_state=configurationSlice.reducer;const namespace$1="uiState",initialState$1={status:LoadingStatus.idle,currentView:ProcessAIView.aiCapabilities},uiSlice=createSlice({name:SLICE_NAME+"/"+namespace$1,initialState:initialState$1,reducers:{setCurrentView:(e,t)=>{e.currentView=t.payload},setStatus:(e,t)=>{e.status=t.payload}}}),actions$2=uiSlice.actions;var ui_state=uiSlice.reducer;const namespace="job",initialState={status:LoadingStatus.idle},jobSlice=createSlice({name:SLICE_NAME+"/"+namespace,initialState:initialState,reducers:{launchJobStart(e,t){e.status=LoadingStatus.pending},launchJobSucceed(e){e.status=LoadingStatus.success},launchJobFailed(e){e.status=LoadingStatus.failed}}}),actions$1=jobSlice.actions;var EngineFieldType,job_state=jobSlice.reducer;const actions={[namespace$1]:actions$2,[namespace$3]:actions$4,[namespace$2]:actions$3,[namespace]:actions$1},rootReducer=combineReducers({[namespace$1]:ui_state,[namespace$3]:capabilities_state,[namespace$2]:configuration_state,[namespace]:job_state}),selectCapabilitiesStatus=e=>{return null==(e=null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace$3])?void 0:e.status},selectCapabilities=e=>{return null==(e=null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace$3])?void 0:e.capabilities},selectEnginesByCapabilityId=t=>e=>{return null==(e=null==(e=null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace$3])?void 0:e.engines)?void 0:e[t]},selectSelectedEnginesByCapabilityId=t=>e=>{return null==(e=null==(e=null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace$2])?void 0:e.selectedEngines)?void 0:e[t]},selectSelectedEngines=e=>{e=null==(e=null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace$2])?void 0:e.selectedEngines;return Object.values(e).reduce((e,t)=>e.concat(t),[])},selectSelectedEnginesObj=e=>{return null==(e=null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace$2])?void 0:e.selectedEngines},selectJobStatus=e=>{return null==(e=null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace])?void 0:e.status},selectApiConfigs=createSelector([rootApiSelector,graphEndpointSelector,sessionTokenSelector],(e,t,s)=>({apiRoot:e,graphQLEndpoint:t,token:s})),useStyles$4=makeStyles()(e=>({processingContainer:{marginTop:25,flex:1,overflowY:"scroll"},instructions:{marginBottom:"30px"},name:{fontSize:"14px",fontWeight:400,lineHeight:"19.1px"},description:{fontSize:"14px",fontWeight:400,maxWidth:"276px",lineHeight:"16.37px",overflow:"hidden",textOverflow:"ellipsis"},iconBackground:{display:"flex",justifyContent:"center",alignItems:"center",height:"40px",borderRadius:"25px",width:"40px",minHeight:"40px",minWidth:"40px",background:"#F2F5F9",marginRight:"15px"},processingRow:{padding:"20px 0",display:"flex",flexDirection:"row",height:"auto",borderBottom:"0.5px solid #D5DFE9",cursor:"pointer"},processingColumn:{display:"flex",flexDirection:"column",maxHeight:"auto"},engineIcons:{verticalAlign:"middle"},badge:{backgroundColor:"#D43060",left:e.spacing(1),top:e.spacing(1)},badgeContent:{fontSize:"11px",fontWeight:600,lineHeight:0}})),AICategories=({categories:e,closeSnackbar:n})=>{const i=useStyles$4()["classes"],a=useDispatch(),o=useSelector(selectSelectedEnginesObj),r=useSelector(selectors.uiState.selectIsFullScreen),l=useSelector(selectors.uiState.selectIsMdpFullScreen);return jsxRuntime.exports.jsx("div",Object.assign({className:i.processingContainer},{children:e.map(s=>{var e,t=s.name.replace(/[^a-zA-Z]/g,"");return jsxRuntime.exports.jsxs("div",Object.assign({"data-test":"engine-category-row",className:i.processingRow,onClick:()=>{var e=s,e=(n(),{name:"DATA_CENTER_ENGINE_SELECTION",config:{name:"DATA CENTER ENGINE SELECTION",capability:e}}),t={type:"APP_BAR_PANEL_TEMPLATE",marginTop:r||l?0:55,marginStart:r||l?380:460,size:"small",zIndex:r||l?1007:1001,parentPanelId:"DATA_CENTER_PROCESS_AI",dimmed:0,dimmedStatus:"dimParent"};a(mountPanel({panelId:"DATA_CENTER_ENGINE_SELECTION",microFrontend:e,panelConfig:t}))}},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:i.iconBackground},{children:jsxRuntime.exports.jsx(Badge,Object.assign({"data-test":"engine-category-badge-"+t,badgeContent:null!=(e=o[s.id])&&e.length?jsxRuntime.exports.jsx(Typography,Object.assign({variant:"overline",className:i.badgeContent},{children:o[s.id].length})):0,color:"secondary",classes:{badge:i.badge},anchorOrigin:{vertical:"bottom",horizontal:"right"}},{children:jsxRuntime.exports.jsx(Icon,{"data-test":"engine-category-icon-"+t,className:i.engineIcons,component:EngineCategoryIcons[t],color:"secondary",fontSize:"small"})}))})),jsxRuntime.exports.jsxs("div",Object.assign({className:i.processingColumn},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({"data-test":"engine-category-name-"+s.name,variant:"h6",color:"textPrimary",className:i.name},{children:s.name})),jsxRuntime.exports.jsx(Typography,Object.assign({"data-test":"engine-category-description-"+s.name,variant:"body2",color:"textSecondary",className:i.description},{children:s.description}))]}))]}),t)})}))},useStyles$3=makeStyles()(e=>({jobLaunchSnackbarContainer:{backgroundColor:e.palette.common.white,padding:"6px 16px",borderRadius:"4px",width:"440px",boxShadow:"rgba(0, 0, 0, 0.2) 0px 3px 3px -2px, rgba(0, 0, 0, 0.14) 0px 3px 4px 0px, rgba(0, 0, 0, 0.12) 0px 1px 8px 0px"},jobLaunchSnackbarTitle:{display:"flex",justifyContent:"space-between",padding:"10px 4px"},jobLaunchItemList:{maxHeight:"80vh",overflowY:"scroll",width:"102%"},jobLaunchItem:{transition:"all 0.5s ease-in-out",display:"flex",flexDirection:"row",padding:"6px 0px 5px 16px",borderRadius:"4px",marginBottom:"10px",marginTop:"5px"},jobLaunchItemMessage:{display:"flex",flexDirection:"column",width:"80%"},jobLaunchItemFeedback:{display:"flex",justifyContent:"center",alignItems:"center",width:"20%"},jobLaunchItemLoading:{color:"rgb(13, 60, 97)",backgroundColor:"rgb(232, 244, 253)"},jobLaunchItemSuccess:{backgroundColor:"rgb(237, 247, 237)",color:"rgb(30, 70, 32)"},jobLaunchItemFail:{backgroundColor:"rgb(253, 236, 234)",color:"rgb(97, 26, 21)"}})),JobLaunchItem=({name:e,status:t,onRetry:s,limitAnimation:n=!1})=>{const[i,a]=react.exports.useState(!0);react.exports.useEffect(()=>{setTimeout(()=>{a(!1)},500*Math.random()+700)});var o=useStyles$3()["classes"];return jsxRuntime.exports.jsxs("div",Object.assign({className:classnames(o.jobLaunchItem,{[o.jobLaunchItemLoading]:t===LoadingStatus.pending||i,[o.jobLaunchItemSuccess]:t===LoadingStatus.success,[o.jobLaunchItemFail]:t===LoadingStatus.failed})},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:o.jobLaunchItemMessage},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({style:{width:"90%"},variant:"h4",noWrap:!0},{children:e})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:t===LoadingStatus.pending||i?jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.dSA4RS",defaultMessage:"Launching AI Processing...",description:"Job Launch item description loading job"}):t===LoadingStatus.success?jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.b+iNpN",defaultMessage:"This processing job started successfully.",description:"Job Launch item description success"}):t===LoadingStatus.failed?jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.50UABM",defaultMessage:"Unable to start processing job.",description:"Job Launch item description failed"}):void 0}))]})),jsxRuntime.exports.jsx("div",Object.assign({className:o.jobLaunchItemFeedback},{children:t===LoadingStatus.pending||i?jsxRuntime.exports.jsx(CircularProgress,{size:20,disableShrink:n}):t===LoadingStatus.success?jsxRuntime.exports.jsx(default_1$1,{style:{color:"#4caf50"}}):t===LoadingStatus.failed?jsxRuntime.exports.jsx(Button$1,Object.assign({color:"inherit",onClick:s},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.BnINsu",defaultMessage:"RETRY",description:"Button label to retry the failed job"})})):void 0}))]}))},JobLaunchSnackbar=({open:e,onClose:s,jobLaunchItems:t,onRetry:n,hidePanel:i})=>{var a=(e,t)=>{"clickaway"!==t&&s()},o=useStyles$3()["classes"];const r=10<t.length;var l=()=>{for(const e of t)if(e.status===LoadingStatus.failed||e.status===LoadingStatus.pending)return null;return 2500};return jsxRuntime.exports.jsx(Snackbar,Object.assign({anchorOrigin:{vertical:"bottom",horizontal:"right"},open:e,autoHideDuration:l(),onClose:a,TransitionProps:{onExited:l()&&i}},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:"aiware-el "+o.jobLaunchSnackbarContainer},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:o.jobLaunchSnackbarTitle},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h3"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.HJnKOv",defaultMessage:"AI Processing",description:"AI Processing snackbar title"})})),jsxRuntime.exports.jsx(IconButton$1,Object.assign({"aria-label":"close",color:"inherit",size:"small",onClick:a},{children:jsxRuntime.exports.jsx(default_1$2,{fontSize:"inherit"})}))]})),jsxRuntime.exports.jsx("div",Object.assign({className:o.jobLaunchItemList},{children:t.map((e,t)=>jsxRuntime.exports.jsx(JobLaunchItem,{name:e.name,status:e.status,onRetry:()=>n(e),limitAnimation:r},t))}))]}))}))},useStyles$2=makeStyles()(e=>({root:{display:"flex",justifyContent:"end",marginTop:"25px"},cancelButton:{marginRight:e.spacing(2),textTransform:"none",color:e.palette.text.primary},actionButton:{textTransform:"none"}})),ActionsFooter=({title:e,actionButton:t,cancelButton:s,confirmationOnCancel:n=!1,children:i=null})=>{const[a,o]=react.exports.useState(!1);var r=useStyles$2()["classes"];const l=e=>{o(!1),e&&e()};return jsxRuntime.exports.jsxs("div",Object.assign({className:r.root,"data-test":"data-center-action-footer"},{children:[e,i,jsxRuntime.exports.jsx(ConfirmationModal,{showConfirmationModal:a,closeConfirmationModal:l,onClosePanel:()=>l(s.action)}),jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:()=>{n&&!t.disabled?o(!0):s.action()},disabled:s.disabled,"data-test":s.dataTest,className:r.cancelButton},{children:s.label})),jsxRuntime.exports.jsx(Button$1,Object.assign({variant:"contained",color:"primary",onClick:t.action,disabled:t.disabled,"data-test":t.dataTest,className:r.actionButton},{children:t.label}))]}))},ProcessAIManager=t=>{var e=useStyles$5()["classes"];const{apiRoot:s,graphQLEndpoint:n,token:i}=useSelector(selectApiConfigs),a=useSelector(selectJobStatus),[o,r]=react.exports.useState(!1);var l=useSelector(selectCapabilitiesStatus);const c=useSelector(selectSelectedEngines);var d=useSelector(selectCapabilities);const u=useDispatch(),p=()=>{u(actions.capabilitiesState.capabilitiesFetchStart(t.tdoId))};if(react.exports.useEffect(()=>{[LoadingStatus.pending,LoadingStatus.success,LoadingStatus.failed].includes(a)&&r(!0)},[a]),react.exports.useEffect(()=>{s&&n&&i&&p()},[s,n,i,u,t.tdoId]),!(s&&n&&i&&t.panelRendered))return null;var g={label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.J0sEvH",defaultMessage:"Process with AI",description:"action button label"}),action:()=>{u(actions.job.launchJobStart({tdoId:t.tdoId,selectedEngines:c}))},disabled:!c.length,dataTest:"data-center-process-ai-action-btn"},x={label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.uT5L4h",defaultMessage:"Cancel",description:"cancel button label"}),action:()=>null==t?void 0:t.hidePanel(),disabled:!1,dataTest:"data-center-process-ai-cancel-btn"};return jsxRuntime.exports.jsxs("div",Object.assign({className:e.aiProcessingWrapper},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:e.processAiHeader},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h1",color:"secondary","data-test":"data-center-process-ai-panel-header-title"},{children:SHARED_TEXT.processAiHeaderTitle()})),jsxRuntime.exports.jsx(Tooltip$1,Object.assign({title:SHARED_TEXT.closePanel()},{children:jsxRuntime.exports.jsx(IconButton$1,Object.assign({onClick:null==t?void 0:t.hidePanel,"aria-labelledby":"data-center-process-ai-close-panel","data-test":"data-center-process-ai-close-panel",size:"large"},{children:jsxRuntime.exports.jsx(Close,{})}))}))]})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2",color:"textSecondary","data-test":"data-center-process-ai-supported-files-title"},{children:SHARED_TEXT.processAiHeaderDescription()})),l===LoadingStatus.failed&&jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx("br",{}),jsxRuntime.exports.jsx(Box,Object.assign({mt:4},{children:jsxRuntime.exports.jsxs(Alert,Object.assign({variant:"outlined",severity:"error"},{children:[jsxRuntime.exports.jsx("span",Object.assign({"data-test":"data-center-process-ai-failed-text"},{children:SHARED_TEXT.processAiFailedStatus()})),jsxRuntime.exports.jsx(Box,{children:jsxRuntime.exports.jsx(Button$1,Object.assign({"data-test":"data-center-process-ai-failed-retry-button",onClick:p},{children:SHARED_TEXT.processAiRetryBtn()}))})]}))}))]}),l===LoadingStatus.idle&&!(null!=d&&d.length)&&jsxRuntime.exports.jsx(Box,Object.assign({mt:4},{children:jsxRuntime.exports.jsx(Alert,Object.assign({variant:"outlined",severity:"info"},{children:SHARED_TEXT.processAiNoEngineCapability()}))})),l===LoadingStatus.pending&&jsxRuntime.exports.jsx("div",Object.assign({className:e.loaderIcon},{children:jsxRuntime.exports.jsx(CircularProgress,{})})),l===LoadingStatus.idle&&jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(AICategories,{categories:d,closeSnackbar:()=>r(!1)}),jsxRuntime.exports.jsx(ActionsFooter,{confirmationOnCancel:!0,actionButton:g,cancelButton:x})]}),jsxRuntime.exports.jsx(Portal,{children:jsxRuntime.exports.jsx(JobLaunchSnackbar,{open:o,onClose:()=>r(!1),jobLaunchItems:c,onRetry:e=>{u(actions.job.launchJobStart({tdoId:t.tdoId,selectedEngines:[e]}))},hidePanel:null==t?void 0:t.hidePanel})})]}))};function __awaiter(e,o,r,l){return new(r=r||Promise)(function(s,t){function n(e){try{a(l.next(e))}catch(e){t(e)}}function i(e){try{a(l.throw(e))}catch(e){t(e)}}function a(e){var t;e.done?s(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(n,i)}a((l=l.apply(e,o||[])).next())})}function fetchEngineCapabilities(s,n,i){return __awaiter(this,void 0,void 0,function*(){var e="fetchEngineCapabilities",t="engineCategories";return(yield baseGraphQLApiWithError(Object.assign({query:"\n query fetchEngineCapabilities($limit: Int, $format: String!) {\n engineCategories(limit: $limit) {\n count\n offset\n limit\n records {\n name\n iconClass\n description\n name\n id\n engines(\n limit: $limit\n filter: {\n supportedInputFormats: [$format],\n state: active\n }\n ) {\n count\n offset\n limit\n records {\n id\n description\n name\n state\n signedIconPath\n edgeVersion\n fields {\n name\n type\n defaultValue\n defaultValues\n required\n max\n min\n options {\n __typename\n key\n value\n }\n }\n standaloneJobTemplates {\n type\n }\n libraryRequired\n supportedInputFormats\n }\n }\n }\n }\n }\n ",variables:{format:n,limit:i},operationName:e},s)))[t]})}function getTdoContentType(s,n){var i;return __awaiter(this,void 0,void 0,function*(){var e="getTdoContentType",t="temporalDataObject",e=yield baseGraphQLApiWithError(Object.assign({query:'\n query getTdoContentType($tdoId: ID!) {\n temporalDataObject(id: $tdoId) {\n primaryAsset(assetType: "media") {\n contentType\n }\n }\n }\n ',variables:{tdoId:n},operationName:e},s));return null==(i=null==(i=e[t])?void 0:i.primaryAsset)?void 0:i.contentType})}function launchSingleEngineJob(n,i,a,o,r){var l;return __awaiter(this,void 0,void 0,function*(){var e="launchSingleEngineJob",t="launchSingleEngineJob",s=null==o?void 0:o.filter(e=>null!==e.fieldValue),s={input:Object.assign(Object.assign(Object.assign({engineId:i},r&&{uploadUrl:r}),a&&{targetId:a}),(null==s?void 0:s.length)&&{fields:s})},s=yield baseGraphQLApiWithError(Object.assign({query:"\n mutation launchSingleEngineJob($input: SingleEngineJobInput!) {\n launchSingleEngineJob(input: $input) {\n id\n }\n }\n ",variables:s,operationName:e},n));return null==(l=s[t])?void 0:l.id})}function*fetchCapabilitiesHandler(e){try{var t=yield select(selectApiConfigs),s=yield select(preferredLanguageSelector),n=yield getTdoContentType(t,e.payload);const i=AIWareFormatMessage(s);if(!n)return yield put(showMessage({content:i({id:"os-data-center-process-ai.snackbar.processAiEngineError",defaultMessage:[{type:0,value:"This file can not be processed through any AI engines!"}]}),severity:MessageSeverity.Info})),void(yield put(actions.capabilitiesState.capabilitiesFetchSucceed()));const a=yield fetchEngineCapabilities(t,n,200),o=[],r={};null!==a&&void 0!==a&&a.records.forEach(e=>{0<e.engines.count&&(o.push({iconClass:e.iconClass,id:e.id,name:e.name,description:e.description}),r[e.id]=e.engines.records)}),yield put(actions.capabilitiesState.setCapabilities(o)),yield put(actions.capabilitiesState.setEngines(r)),yield put(actions.capabilitiesState.capabilitiesFetchSucceed())}catch(e){yield put(actions.capabilitiesState.capabilitiesFetchFailed()),console.log(e)}}function*getCapabilitiesWatcher(){yield takeLatest$1(actions.capabilitiesState.capabilitiesFetchStart.type,fetchCapabilitiesHandler)}function*launchSingleEngineJobSaga(e){try{const t=yield select(selectApiConfigs),{tdoId:s,selectedEngines:n}=e.payload;yield all(n.map(e=>launchSingleEngine(t,e.id,s,e.fields))),yield put(actions.job.launchJobSucceed())}catch(e){yield put(actions.job.launchJobFailed()),console.log(e)}}function*launchSingleEngine(e,t,s,n){try{yield put(actions.processAiConfig.updateSingleJobStatus({engineId:t,status:LoadingStatus.pending}));var i=yield call(launchSingleEngineJob,e,t,s,n);i||(yield put(actions.processAiConfig.updateSingleJobStatus({engineId:t,status:LoadingStatus.failed})),sdkEventManager.dispatch(SdkEvents.jobCreated,new SdkError("Job could not be created!"),{tdoId:s,engineId:t})),yield put(actions.processAiConfig.updateSingleJobStatus({engineId:t,status:LoadingStatus.success})),sdkEventManager.dispatch(SdkEvents.jobCreated,null,{jobId:i,engineId:t,tdoId:s})}catch(e){yield put(actions.processAiConfig.updateSingleJobStatus({engineId:t,status:LoadingStatus.failed})),sdkEventManager.dispatch(SdkEvents.jobCreated,new SdkError("Job could not be created!"),{tdoId:s,engineId:t}),console.log(e)}}function*getJobWatcher(){yield takeLatest$1(actions.job.launchJobStart.type,launchSingleEngineJobSaga)}function*rootSaga(){yield all([getCapabilitiesWatcher(),getJobWatcher()])}function getDataCenterProcessAIModule(){return{id:SLICE_NAME,reducerMap:{[SLICE_NAME]:rootReducer},sagas:[rootSaga],initialActions:[]}}const DataCenterProcessAI=e=>jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(lib.DynamicModuleLoader,Object.assign({modules:[getDataCenterProcessAIModule(),getLibraryModule()]},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(CacheProvider,Object.assign({value:muiCache},{children:jsxRuntime.exports.jsx(ProcessAIManager,Object.assign({},e))}))})}))}),formatLabel=(!function(e){e.Number="Number",e.Picklist="Picklist",e.MultiPicklist="MultiPicklist",e.Text="Text",e.SchemaSelection="SchemaSelection"}(EngineFieldType=EngineFieldType||{}),(e="")=>lodash.exports.startCase(e)),getFieldErrorMessage=e=>{const{required:t,value:s,min:n,max:i,type:a,values:o}=e;if(lodash.exports.isEmpty(a===EngineFieldType.MultiPicklist?o:s))return t?"This field can't be blank!":"";if(a===EngineFieldType.Number){if(lodash.exports.isNumber(n)&&Number(s)<n)return"The value can't be lower than "+n.toFixed(2);if(lodash.exports.isNumber(i)&&Number(s)>i)return"The value can't be higher than "+i.toFixed(2)}return""},checkFieldsValidation=(e,o)=>e.every(e=>{let t=!0;var{required:e,type:s,min:n,max:i,name:a}=e,a=o[a];return e&&lodash.exports.isEmpty(a)&&(t=!1),t=s===EngineFieldType.Number&&(lodash.exports.isNumber(n)&&Number(a)<n||lodash.exports.isNumber(i)&&Number(a)>i)?!1:t}),useStyles$1=makeStyles()(e=>({engineOuterContainer:{position:"relative",overflow:"hidden",borderRadius:"4px",marginTop:10},engineContainer:{border:"0.5px solid #D5DFE9",borderRadius:"4px",transition:"border-color 250ms"},engineUnavailable:{opacity:.5},engineUnavailableWarningContainer:{top:"0",left:"0",width:"100%",height:"100%",opacity:"1",position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",transition:"all 500ms ease-in-out",borderRadius:"4px",boxSizing:"border-box"},engineUnavailableWarning:{color:"rgb(13, 60, 97)",width:"80%",display:"flex",padding:"13px 6px",paddingTop:"8px",textAlign:"center",alignItems:"center",borderRadius:"7px",backgroundColor:"rgb(232, 244, 253)",boxShadow:"rgb(0 0 0 / 7%) 0px 3px 5px -1px, rgb(0 0 0 / 4%) 0px 6px 10px 0px, rgb(0 0 0 / 3%) 0px 1px 18px 0px"},engineUnavailableWarningIcon:{marginRight:"5px"},engineContainerActive:{borderColor:"#187600"},engineHeader:{display:"flex",flexDirection:"row",padding:"20px"},libraryWrapper:{marginTop:12,"& > div":{width:"100%"}},iconBackground:{display:"flex",justifyContent:"center",alignItems:"center",height:"40px",borderRadius:"25px",width:"40px",minHeight:"40px",minWidth:"40px",background:"#F2F5F9",marginRight:"15px"},engineImgIcon:{width:"30px",height:"30px"},engineInfoContainer:{position:"relative",flex:1},engineName:{fontSize:"14px",fontWeight:400,lineHeight:"19.1px"},engineDescription:{fontSize:"12px",fontWeight:400,lineHeight:"16.37px",overflow:"hidden",textOverflow:"ellipsis"},engineEstimatedCost:{color:"#1B1D1F",marginTop:"10px",fontSize:"12px"},engineContent:{overflowX:"hidden",overflowY:"auto",height:"auto",boxSizing:"border-box",width:"100%",padding:"16px 20px 20px 20px",display:"none"},engineSettingsLabel:{fontSize:14,fontWeight:600,color:"#1B1D1F"},footerActionBtn:{width:"100%",backgroundColor:"#FAFAFA",color:e.palette.text.primary,fontSize:"12px",padding:"10px"},isExpanded:{height:"auto",display:"flex",borderTop:"0.5px solid #D5DFE9",flexDirection:"column"},savedAndConfiguredBtn:{backgroundColor:"#ECFAE4",color:"#187600",width:"100%",fontSize:"12px",padding:"10px",pointerEvents:"none",cursor:"default","&:hover":{backgroundColor:"#ECFAE4",color:"#187600"}},icon:{fontSize:"15px",marginRight:"13px"},savedAndConfiguredBtnIcon:{color:"#187600"},deselectBtn:{fontSize:"8px",position:"absolute",right:"-20px",top:"-20px"},field:{width:"100%"},footerBtnContainer:{display:"flex",alignItems:"center",flex:1,padding:4,backgroundColor:"#fafafa",borderBottomLeftRadius:4,borderBottomRightRadius:4,border:"1px solid #FFF","& button":{flex:1,fontSize:12}},footerBtnContainerActive:{backgroundColor:"#ECFAE4","& .btnContBorder":{background:"#187600"},"& button":{color:"#187600"}},btnContBorder:{margin:"0 4px",height:18,width:1,background:"#555f7c"},formControlWrapper:{marginTop:15},inputLabel:{fontFamily:"Nunito",fontWeight:300,display:"block",fontSize:14,color:"#5C6269",marginBottom:6},inputLabelError:{color:e.palette.error.main}})),TxtField=({id:e,required:t,type:s,value:n,onChange:i,error:a=!1})=>{var o=useStyles$1()["classes"];return jsxRuntime.exports.jsx(TextField,{id:e,InputLabelProps:{shrink:!0},autoComplete:"off",required:t,value:n,type:s||"",className:o.field,onChange:i,size:"small",error:a})},SelectList=({id:e,value:t,required:s,options:n,onChange:i,error:a=!1})=>{var o=useStyles$1()["classes"];return jsxRuntime.exports.jsx(Select,Object.assign({id:e,required:s,value:void 0!==t?t:null,className:o.field,onChange:i,variant:"outlined",style:{width:"100%"},error:a,inputProps:{name:e,id:e}},{children:null==n?void 0:n.map(e=>jsxRuntime.exports.jsx(MenuItem,Object.assign({value:null==e?void 0:e.value},{children:null==e?void 0:e.key})))}))},MultiSelectList=({id:e,values:t,required:s,options:n,onChange:i,error:a=!1})=>{var o={PaperProps:{style:{maxHeight:224,width:250}}};return jsxRuntime.exports.jsx(Select,Object.assign({id:e,required:s,value:t,multiple:!0,onChange:i,variant:"outlined",error:a,input:jsxRuntime.exports.jsx(Input,{id:"select-multiple-chip-"+e}),renderValue:e=>jsxRuntime.exports.jsx("div",{children:null==e?void 0:e.map(e=>jsxRuntime.exports.jsx(Chip$1,{style:{marginRight:6},label:e},e))}),MenuProps:o},{children:null==n?void 0:n.map(e=>jsxRuntime.exports.jsx(MenuItem,Object.assign({value:null==e?void 0:e.value},{children:null==e?void 0:e.key})))}))},ComponentLoader=({fields:e,onChange:r,showErrors:l=!1})=>{const c=useStyles$1()["classes"];return jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment,{children:null==(e=e)?void 0:e.map((t,e)=>{var s=formatLabel((null==t?void 0:t.name)||""),n=`engine-configuration-input--${null==t?void 0:t.name}-idx-`+e,i=e=>{r({fieldName:null==t?void 0:t.name,fieldValue:e.target.value})};let a;var o=!!getFieldErrorMessage(t)&&l;switch(null==t?void 0:t.type){case EngineFieldType.Picklist:a=jsxRuntime.exports.jsx(SelectList,{id:n,label:s,required:null==t?void 0:t.required,options:null==t?void 0:t.options,value:null==t?void 0:t.value,onChange:i,error:o});break;case EngineFieldType.Text:a=jsxRuntime.exports.jsx(TxtField,{id:n,label:s,required:null==t?void 0:t.required,value:null==t?void 0:t.value,onChange:i,error:o});break;case EngineFieldType.Number:a=jsxRuntime.exports.jsx(TxtField,{id:n,label:s,required:null==t?void 0:t.required,value:null==t?void 0:t.value,type:"number",onChange:i,error:o});break;case EngineFieldType.MultiPicklist:a=jsxRuntime.exports.jsx(MultiSelectList,{id:n,label:null==t?void 0:t.name,required:null==t?void 0:t.required,options:null==t?void 0:t.options,values:(null==t?void 0:t.values)||[],onChange:i,error:o});break;default:return null}return jsxRuntime.exports.jsxs(FormControl,Object.assign({error:o,size:"small",className:c.formControlWrapper},{children:[jsxRuntime.exports.jsx("label",Object.assign({htmlFor:n,className:c.inputLabel+" "+(o&&c.inputLabelError)},{children:s})),a,o&&jsxRuntime.exports.jsx(FormHelperText,{children:getFieldErrorMessage(t)})]}))})})},Engine=({id:e,name:t,description:s,saved:n,libraryRequired:i,fields:a,onSave:o,onDeselect:r,iconName:l,defaultConfiguration:c,isEngineAvailable:d=!0,signedIconPath:u})=>{const p=useStyles$1()["classes"];var g=useSelector(selectors$1.selectLoadingStatus);const[x,m]=react.exports.useState(!1),[j,b]=react.exports.useState({}),[h,f]=react.exports.useState(!1),[S,v]=react.exports.useState(!1),[y,C]=react.exports.useState(!1),[R,E]=react.exports.useState(null),[I,A]=react.exports.useState(null);g=i&&"pending"===g;const T=t=>{b(e=>Object.assign(Object.assign({},e),{[t.fieldName]:t.fieldValue}))};const L=()=>checkFieldsValidation(a,j)?i&&!j.libraryId?v(!0):(o&&o({id:e,name:t,fields:Object.keys(j).map(e=>({fieldName:e,fieldValue:j[e]}))}),void m(!1)):f(!0);const M=()=>{const s={};c?c.forEach(e=>s[e.fieldName]=e.fieldValue):(i&&(s.libraryId=""),null!=a&&a.length&&a.forEach(e=>{var t=e.type===EngineFieldType.MultiPicklist?e.defaultValues:e.defaultValue;s[e.name]=t})),b(s)};react.exports.useEffect(()=>{M()},[]);var N=null==a?void 0:a.map(e=>{const t=Object.assign({},e);var s=e.type===EngineFieldType.MultiPicklist?"values":"value";return t[s]=j[e.name],t});return jsxRuntime.exports.jsxs("div",Object.assign({onMouseEnter:()=>{var e;d||(e=setTimeout(()=>{C(!0)},500),E(e))},onMouseLeave:()=>{d||(C(!1),clearTimeout(R))},className:p.engineOuterContainer},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:`${p.engineContainer} ${n&&p.engineContainerActive} `+(!d&&p.engineUnavailable)},{children:[jsxRuntime.exports.jsxs("header",Object.assign({className:p.engineHeader},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:p.iconBackground},{children:u&&!1!==I?jsxRuntime.exports.jsx("img",{alt:"Engine Logo",className:p.engineImgIcon,src:u,onLoad:e=>{A(!0)},onError:e=>{A(!1)}}):jsxRuntime.exports.jsx(Icon,{color:"secondary",fontSize:"small",component:EngineCategoryIcons[l]})})),jsxRuntime.exports.jsxs("div",Object.assign({className:p.engineInfoContainer},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({"data-test":"engine-category-name-"+t,variant:"h6",color:"textPrimary",className:p.engineName},{children:t})),jsxRuntime.exports.jsx(Typography,Object.assign({"data-test":"engine-category-description-"+t,variant:"body2",color:"textSecondary",className:p.engineDescription},{children:s}))]}))]})),jsxRuntime.exports.jsxs("main",Object.assign({id:"engine-main-content-"+e,className:p.engineContent+" "+(x?p.isExpanded:"")},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"subtitle2",color:"textSecondary",className:p.engineSettingsLabel},{children:SHARED_TEXT.engineSettings()})),i&&jsxRuntime.exports.jsxs("div",Object.assign({className:p.libraryWrapper},{children:[jsxRuntime.exports.jsx("label",Object.assign({className:p.inputLabel},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.ro5ll8",defaultMessage:"Libraries",description:"The label for the library selection"})})),jsxRuntime.exports.jsx(LibraryDropdown,{engineId:e,defaultSelected:j.libraryId,onSelectedLibraryId:e=>{T({fieldName:"libraryId",fieldValue:e})}}),S&&jsxRuntime.exports.jsx(FormHelperText,Object.assign({error:!0},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.ro4mn3",defaultMessage:"Please select a library.",description:"Missing library message"})}))]})),jsxRuntime.exports.jsx(ComponentLoader,{showErrors:h,fields:N,onChange:T})]})),jsxRuntime.exports.jsxs("footer",{children:[x&&jsxRuntime.exports.jsxs("div",Object.assign({className:p.footerBtnContainer},{children:[jsxRuntime.exports.jsxs(Button$1,Object.assign({id:"selected-engine-cancel-btn-"+e,className:p.footerActionBtn,onClick:()=>{m(!1),M()}},{children:[jsxRuntime.exports.jsx(Icon,{component:Remove,color:"secondary",fontSize:"small",className:""+p.icon}),SHARED_TEXT.cancel()]})),(0<(null==a?void 0:a.length)||i)&&jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx("span",{className:p.btnContBorder}),jsxRuntime.exports.jsxs(Button$1,Object.assign({id:"engine-save-settings-btn-"+e,className:p.footerActionBtn,onClick:L,disabled:g},{children:[jsxRuntime.exports.jsx(Icon,{component:Save,color:"secondary",fontSize:"small",className:p.icon}),SHARED_TEXT.saveSettings()]}))]})]})),!n&&!x&&jsxRuntime.exports.jsxs(Button$1,Object.assign({id:"engine-use-engine-btn-"+e,className:p.footerActionBtn,onClick:()=>{null!=a&&a.length||i?m(e=>!e):L()},disabled:!d},{children:[jsxRuntime.exports.jsx(Icon,{component:Add,color:"secondary",fontSize:"small",className:p.icon}),SHARED_TEXT.useThisEngine()]})),n&&!x&&jsxRuntime.exports.jsxs("div",Object.assign({className:p.footerBtnContainer+" "+p.footerBtnContainerActive},{children:[jsxRuntime.exports.jsxs(Button$1,Object.assign({id:"selected-engine-remove-btn-"+e,onClick:()=>{r&&r(e),M()}},{children:[jsxRuntime.exports.jsx(Icon,{component:Delete,color:"secondary",fontSize:"small",className:p.icon+" "+p.savedAndConfiguredBtnIcon}),SHARED_TEXT.removeEngine()]})),(0<(null==a?void 0:a.length)||i)&&jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx("span",{className:p.btnContBorder}),jsxRuntime.exports.jsxs(Button$1,Object.assign({id:"selected-engine-edit-configration-btn-"+e,onClick:()=>m(!0)},{children:[jsxRuntime.exports.jsx(Icon,{component:Edit,color:"secondary",className:p.icon+" "+p.savedAndConfiguredBtnIcon}),SHARED_TEXT.editConfigurations()]}))]})]}))]})]})),!d&&y&&jsxRuntime.exports.jsx("div",Object.assign({className:p.engineUnavailableWarningContainer},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:p.engineUnavailableWarning},{children:[jsxRuntime.exports.jsx(default_1,{className:p.engineUnavailableWarningIcon,style:{color:"#2196f3"}})," ",jsxRuntime.exports.jsx(Typography,Object.assign({variant:"subtitle2"},{children:SHARED_TEXT.processAiEngineUnavailable()}))]}))}))]}))},useStyles=makeStyles()(e=>({engineSelectionWrapper:{padding:20,display:"flex",flexDirection:"column",height:"calc(100vh - 60px)"},enginSelectionHeader:{display:"flex",alignItems:"center",flexDirection:"row",justifyContent:"space-between",marginBottom:20},loaderIcon:{display:"flex",alignItems:"center",justifyContent:"center",marginTop:20},engineListWrapper:{flex:1,overflowY:"scroll"},footerActionButtons:{display:"flex",alignItems:"center",justifyContent:"flex-end",marginTop:25,"& > *":{marginLeft:e.spacing(2)}}})),EngineSelection=({capability:e,hidePanel:t})=>{var s=useStyles()["classes"];const n=useDispatch(),i=useSelector(selectEnginesByCapabilityId(e.id)),a=useSelector(selectSelectedEnginesByCapabilityId(e.id)),[o,r]=react.exports.useState([]),l=e.name.replace(/[^a-zA-Z]/g,""),c=t=>{r(e=>e.filter(e=>e.id!==t))},d=t=>{r(e=>[...e.filter(e=>e.id!==t.id),t])};return react.exports.useEffect(()=>{a&&r(a)},[]),jsxRuntime.exports.jsxs("div",Object.assign({className:s.engineSelectionWrapper},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:s.enginSelectionHeader},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h1",color:"secondary","data-test":"data-center-engine-selection-panel-header-title"},{children:e.name}))})),jsxRuntime.exports.jsx("div",Object.assign({className:s.engineListWrapper},{children:i.map(e=>{var t,s,n;return jsxRuntime.exports.jsx(Engine,{id:e.id,name:e.name,description:e.description,estimatedCost:"4.00",fields:(null==e?void 0:e.fields)||[],saved:(n=e.id,null===o||void 0===o?void 0:o.some(e=>e.id===n)),onSave:d,onDeselect:c,iconName:l,signedIconPath:null==e?void 0:e.signedIconPath,defaultConfiguration:(t=e.id,null==(s=null===a||void 0===a?void 0:a.find(e=>e.id===t))?void 0:s.fields),libraryRequired:e.libraryRequired,isEngineAvailable:0<(null==(s=e.standaloneJobTemplates)?void 0:s.length)})})})),jsxRuntime.exports.jsxs("div",Object.assign({className:s.footerActionButtons},{children:[jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:t},{children:SHARED_TEXT.cancel()})),jsxRuntime.exports.jsx(Button$1,Object.assign({variant:"contained",color:"primary",onClick:()=>{n(actions.processAiConfig.setConfigurations({capabilityId:e.id,selectedEngines:o})),null!=t&&t()},disabled:!(null!==a&&void 0!==a&&a.length||null!==o&&void 0!==o&&o.length)},{children:SHARED_TEXT.processAiAddEngines()}))]}))]}))},DataCenterEngineSelection=e=>jsxRuntime.exports.jsx(CacheProvider,Object.assign({value:muiCache},{children:jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(lib.DynamicModuleLoader,Object.assign({modules:[getDataCenterProcessAIModule()]},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(EngineSelection,Object.assign({},e))})}))})}));export{DataCenterEngineSelection,DataCenterProcessAI};