aiware-js 2.15.0 → 2.16.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.
- package/index.esm.css +46 -46
- package/js-core.esm.js +20 -8
- package/js-core.esm13.js +1 -1
- package/js-core.esm14.js +1 -1
- package/js-core.esm15.js +1 -1
- package/js-core.esm16.js +1 -1
- package/js-core.esm17.js +1 -230
- package/js-core.esm18.js +222 -52
- package/js-core.esm19.js +60 -1
- package/js-core.esm20.js +1 -1
- package/js-core.esm21.js +1 -1
- package/js-core.esm22.js +1 -1
- package/js-core.esm23.js +1 -1
- package/js-core.esm24.js +1 -1
- package/js-core.esm25.js +1 -14
- package/js-core.esm26.js +1 -12
- package/js-core.esm27.js +7 -47
- package/js-core.esm28.js +12 -1
- package/js-core.esm29.js +54 -88
- package/js-core.esm30.js +1 -226
- package/js-core.esm31.js +80 -27
- package/js-core.esm32.js +211 -1
- package/js-core.esm33.js +35 -1
- package/js-core.esm34.js +1 -1
- package/js-core.esm35.js +1 -1
- package/js-core.esm36.js +1 -31
- package/js-core.esm37.js +1 -1
- package/js-core.esm38.js +31 -51
- package/js-core.esm39.js +1 -1
- package/js-core.esm4.js +1 -1
- package/js-core.esm40.js +48 -26
- package/js-core.esm41.js +1 -1
- package/js-core.esm42.js +29 -0
- package/js-core.esm43.js +73 -0
- package/js-core.esm5.js +3 -3
- package/js-core.esm7.js +3 -3
- package/js-core.umd.css +92 -92
- package/js-core.umd.js +176 -125
- package/lib/rate-limiter.d.ts +6 -0
- package/locales/en.json +1 -1
- package/locales/es.json +1 -1
- package/locales/fr.json +1 -1
- package/package.json +1 -1
package/js-core.esm41.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{H as createSlice,cf as combineReducers,cg as createSelector,O as rootApiSelector,R as graphEndpointSelector,Q as sessionTokenSelector,m as makeStyles,i as useDispatch,r as react,j as jsxRuntime,bx as CacheProvider,by as muiCache,ci as AIWareThemeProvider,K as lib,A as AIWareIntlProvider,k as useSelector,B as Box,bE as CircularProgress,fB as img$r,T as Typography$1,at as Button,a2 as all,F as FormattedMessage,a8 as Tooltip,a9 as IconButton,ge as AddUser,cu as MoreVert,cj as Close,bV as Hide,cv as Menu,aW as MenuItem,cy as Delete,b0 as Tabs,b1 as Tab,af as takeLatest$1,ai as select,ah as put,M as preferredLanguageSelector,cD as baseGraphQLApiWithError}from"./js-core.esm.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,get,has,STATE,LoadingStatus,ESourcePermission,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$b=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$b=function(e){try{return!!e()}catch(e){return!0}},fails$a=fails$b,descriptors=!fails$b(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),fails$9=fails$b,functionBindNative=!fails$b(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}),NATIVE_BIND$1=functionBindNative,call$6=Function.prototype.call,functionCall=NATIVE_BIND$1?call$6.bind(call$6):function(){return call$6.apply(call$6,arguments)},objectPropertyIsEnumerable={},$propertyIsEnumerable={}.propertyIsEnumerable,getOwnPropertyDescriptor$1=Object.getOwnPropertyDescriptor,NASHORN_BUG=getOwnPropertyDescriptor$1&&!$propertyIsEnumerable.call({1:2},1),createPropertyDescriptor$3=(objectPropertyIsEnumerable.f=NASHORN_BUG?function(e){e=getOwnPropertyDescriptor$1(this,e);return!!e&&e.enumerable}:$propertyIsEnumerable,function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}),NATIVE_BIND=functionBindNative,FunctionPrototype$1=Function.prototype,bind=FunctionPrototype$1.bind,call$5=FunctionPrototype$1.call,uncurryThis$b=NATIVE_BIND&&bind.bind(call$5,call$5),functionUncurryThis=NATIVE_BIND?function(e){return e&&uncurryThis$b(e)}:function(e){return e&&function(){return call$5.apply(e,arguments)}},uncurryThis$a=functionUncurryThis,toString$1=uncurryThis$a({}.toString),stringSlice=uncurryThis$a("".slice),classofRaw=function(e){return stringSlice(toString$1(e),8,-1)},uncurryThis$9=functionUncurryThis,fails$8=fails$b,classof=classofRaw,$Object$3=Object,split=functionUncurryThis("".split),indexedObject=fails$8(function(){return!$Object$3("z").propertyIsEnumerable(0)})?function(e){return"String"==classof(e)?split(e,""):$Object$3(e)}:$Object$3,$TypeError$6=TypeError,requireObjectCoercible$2=function(e){if(null==e)throw $TypeError$6("Can't call method on "+e);return e},IndexedObject$1=indexedObject,requireObjectCoercible$1=requireObjectCoercible$2,toIndexedObject$5=function(e){return IndexedObject$1(requireObjectCoercible$1(e))},isCallable$e=function(e){return"function"==typeof e},isCallable$d=isCallable$e,isObject$5=function(e){return"object"==typeof e?null!==e:isCallable$d(e)},global$a=global$b,isCallable$c=isCallable$e,aFunction=function(e){return isCallable$c(e)?e:void 0},getBuiltIn$4=function(e,t){return arguments.length<2?aFunction(global$a[e]):global$a[e]&&global$a[e][t]},uncurryThis$8=functionUncurryThis,objectIsPrototypeOf=functionUncurryThis({}.isPrototypeOf),getBuiltIn$3=getBuiltIn$4,engineUserAgent=getBuiltIn$4("navigator","userAgent")||"",global$9=global$b,userAgent=engineUserAgent,process$1=global$9.process,Deno=global$9.Deno,versions=process$1&&process$1.versions||Deno&&Deno.version,v8=versions&&versions.v8,engineV8Version=version=!(version=v8?0<(match=v8.split("."))[0]&&match[0]<4?1:+(match[0]+match[1]):version)&&userAgent&&(!(match=userAgent.match(/Edge\/(\d+)/))||74<=match[1])&&(match=userAgent.match(/Chrome\/(\d+)/))?+match[1]:version,V8_VERSION=version,fails$7=fails$b,nativeSymbol=!!Object.getOwnPropertySymbols&&!fails$7(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&V8_VERSION&&V8_VERSION<41}),NATIVE_SYMBOL$1=nativeSymbol,useSymbolAsUid=nativeSymbol&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,getBuiltIn$2=getBuiltIn$4,isCallable$b=isCallable$e,isPrototypeOf=objectIsPrototypeOf,USE_SYMBOL_AS_UID$1=useSymbolAsUid,$Object$2=Object,isSymbol$2=useSymbolAsUid?function(e){return"symbol"==typeof e}:function(e){var t=getBuiltIn$2("Symbol");return isCallable$b(t)&&isPrototypeOf(t.prototype,$Object$2(e))},$String$2=String,tryToString$1=function(e){try{return $String$2(e)}catch(e){return"Object"}},isCallable$a=isCallable$e,tryToString=tryToString$1,$TypeError$5=TypeError,aCallable$1=function(e){if(isCallable$a(e))return e;throw $TypeError$5(tryToString(e)+" is not a function")},aCallable=aCallable$1,getMethod$1=function(e,t){e=e[t];return null==e?void 0:aCallable(e)},call$4=functionCall,isCallable$9=isCallable$e,isObject$4=isObject$5,$TypeError$4=TypeError,ordinaryToPrimitive$1=function(e,t){var r,o;if("string"===t&&isCallable$9(r=e.toString)&&!isObject$4(o=call$4(r,e)))return o;if(isCallable$9(r=e.valueOf)&&!isObject$4(o=call$4(r,e)))return o;if("string"!==t&&isCallable$9(r=e.toString)&&!isObject$4(o=call$4(r,e)))return o;throw $TypeError$4("Can't convert object to primitive value")},shared$3={exports:{}},global$8=global$b,defineProperty$5=Object.defineProperty,defineGlobalProperty$3=function(t,r){try{defineProperty$5(global$8,t,{value:r,configurable:!0,writable:!0})}catch(e){global$8[t]=r}return r},global$7=global$b,defineGlobalProperty$2=defineGlobalProperty$3,SHARED="__core-js_shared__",store$3=global$b[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$1=Object,toObject$3=function(e){return $Object$1(requireObjectCoercible(e))},uncurryThis$7=functionUncurryThis,toObject$2=toObject$3,hasOwnProperty=functionUncurryThis({}.hasOwnProperty),hasOwnProperty_1=Object.hasOwn||function(e,t){return hasOwnProperty(toObject$2(e),t)},uncurryThis$6=functionUncurryThis,id=0,postfix=Math.random(),toString=uncurryThis$6(1..toString),uid$2=function(e){return"Symbol("+(void 0===e?"":e)+")_"+toString(++id+postfix,36)},global$6=global$b,shared$2=shared$3.exports,hasOwn$8=hasOwnProperty_1,uid$1=uid$2,NATIVE_SYMBOL=nativeSymbol,USE_SYMBOL_AS_UID=useSymbolAsUid,WellKnownSymbolsStore=shared$2("wks"),Symbol$1=global$6.Symbol,symbolFor=Symbol$1&&Symbol$1.for,createWellKnownSymbol=USE_SYMBOL_AS_UID?Symbol$1:Symbol$1&&Symbol$1.withoutSetter||uid$1,wellKnownSymbol$6=function(e){var t;return hasOwn$8(WellKnownSymbolsStore,e)&&(NATIVE_SYMBOL||"string"==typeof WellKnownSymbolsStore[e])||(t="Symbol."+e,NATIVE_SYMBOL&&hasOwn$8(Symbol$1,e)?WellKnownSymbolsStore[e]=Symbol$1[e]:WellKnownSymbolsStore[e]=(USE_SYMBOL_AS_UID&&symbolFor?symbolFor:createWellKnownSymbol)(t)),WellKnownSymbolsStore[e]},call$3=functionCall,isObject$3=isObject$5,isSymbol$1=isSymbol$2,getMethod=getMethod$1,ordinaryToPrimitive=ordinaryToPrimitive$1,wellKnownSymbol$5=wellKnownSymbol$6,$TypeError$3=TypeError,TO_PRIMITIVE=wellKnownSymbol$6("toPrimitive"),toPrimitive$1=function(e,t){if(!isObject$3(e)||isSymbol$1(e))return e;var r=getMethod(e,TO_PRIMITIVE);if(r){if(r=call$3(r,e,t=void 0===t?"default":t),!isObject$3(r)||isSymbol$1(r))return r;throw $TypeError$3("Can't convert object to primitive value")}return ordinaryToPrimitive(e,t=void 0===t?"number":t)},toPrimitive=toPrimitive$1,isSymbol=isSymbol$2,toPropertyKey$2=function(e){e=toPrimitive(e,"string");return isSymbol(e)?e:e+""},global$5=global$b,isObject$2=isObject$5,document$1=global$b.document,EXISTS$1=isObject$2(document$1)&&isObject$2(document$1.createElement),documentCreateElement$2=function(e){return EXISTS$1?document$1.createElement(e):{}},DESCRIPTORS$9=descriptors,fails$6=fails$b,createElement=documentCreateElement$2,ie8DomDefine=!descriptors&&!fails$b(function(){return 7!=Object.defineProperty(createElement("div"),"a",{get:function(){return 7}}).a}),DESCRIPTORS$8=descriptors,call$2=functionCall,propertyIsEnumerableModule$1=objectPropertyIsEnumerable,createPropertyDescriptor$2=createPropertyDescriptor$3,toIndexedObject$4=toIndexedObject$5,toPropertyKey$1=toPropertyKey$2,hasOwn$7=hasOwnProperty_1,IE8_DOM_DEFINE$1=ie8DomDefine,$getOwnPropertyDescriptor$1=Object.getOwnPropertyDescriptor,objectDefineProperty=(objectGetOwnPropertyDescriptor.f=DESCRIPTORS$8?$getOwnPropertyDescriptor$1:function(e,t){if(e=toIndexedObject$4(e),t=toPropertyKey$1(t),IE8_DOM_DEFINE$1)try{return $getOwnPropertyDescriptor$1(e,t)}catch(e){}if(hasOwn$7(e,t))return createPropertyDescriptor$2(!call$2(propertyIsEnumerableModule$1.f,e,t),e[t])},{}),DESCRIPTORS$7=descriptors,fails$5=fails$b,v8PrototypeDefineBug=descriptors&&fails$b(function(){return 42!=Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),isObject$1=isObject$5,$String$1=String,$TypeError$2=TypeError,anObject$5=function(e){if(isObject$1(e))return e;throw $TypeError$2($String$1(e)+" is not an object")},DESCRIPTORS$6=descriptors,IE8_DOM_DEFINE=ie8DomDefine,V8_PROTOTYPE_DEFINE_BUG$1=v8PrototypeDefineBug,anObject$4=anObject$5,toPropertyKey=toPropertyKey$2,$TypeError$1=TypeError,$defineProperty=Object.defineProperty,$getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,ENUMERABLE="enumerable",CONFIGURABLE$1="configurable",WRITABLE="writable",DESCRIPTORS$5=(objectDefineProperty.f=DESCRIPTORS$6?V8_PROTOTYPE_DEFINE_BUG$1?function(e,t,r){var o;return anObject$4(e),t=toPropertyKey(t),anObject$4(r),"function"==typeof e&&"prototype"===t&&"value"in r&&WRITABLE in r&&!r[WRITABLE]&&((o=$getOwnPropertyDescriptor(e,t))&&o[WRITABLE]&&(e[t]=r.value,r={configurable:(CONFIGURABLE$1 in r?r:o)[CONFIGURABLE$1],enumerable:(ENUMERABLE in r?r:o)[ENUMERABLE],writable:!1})),$defineProperty(e,t,r)}:$defineProperty:function(e,t,r){if(anObject$4(e),t=toPropertyKey(t),anObject$4(r),IE8_DOM_DEFINE)try{return $defineProperty(e,t,r)}catch(e){}if("get"in r||"set"in r)throw $TypeError$1("Accessors not supported");return"value"in r&&(e[t]=r.value),e},descriptors),definePropertyModule$3=objectDefineProperty,createPropertyDescriptor$1=createPropertyDescriptor$3,createNonEnumerableProperty$4=DESCRIPTORS$5?function(e,t,r){return definePropertyModule$3.f(e,t,createPropertyDescriptor$1(1,r))}:function(e,t,r){return e[t]=r,e},makeBuiltIn$2={exports:{}},DESCRIPTORS$4=descriptors,hasOwn$6=hasOwnProperty_1,FunctionPrototype=Function.prototype,getDescriptor=DESCRIPTORS$4&&Object.getOwnPropertyDescriptor,EXISTS=hasOwn$6(FunctionPrototype,"name"),PROPER=EXISTS&&"something"===function(){}.name,CONFIGURABLE=EXISTS&&(!DESCRIPTORS$4||getDescriptor(FunctionPrototype,"name").configurable),functionName={EXISTS:EXISTS,PROPER:PROPER,CONFIGURABLE:CONFIGURABLE},uncurryThis$5=functionUncurryThis,isCallable$8=isCallable$e,store$1=sharedStore,functionToString=functionUncurryThis(Function.toString),inspectSource$2=(isCallable$8(store$1.inspectSource)||(store$1.inspectSource=function(e){return functionToString(e)}),store$1.inspectSource),global$4=global$b,isCallable$7=isCallable$e,inspectSource$1=inspectSource$2,WeakMap$1=global$b.WeakMap,nativeWeakMap=isCallable$7(WeakMap$1)&&/native code/.test(inspectSource$1(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$3=global$b,uncurryThis$4=functionUncurryThis,isObject=isObject$5,createNonEnumerableProperty$3=createNonEnumerableProperty$4,hasOwn$5=hasOwnProperty_1,shared=sharedStore,sharedKey$2=sharedKey$3,hiddenKeys$3=hiddenKeys$4,OBJECT_ALREADY_INITIALIZED="Object already initialized",TypeError$1=global$3.TypeError,WeakMap=global$3.WeakMap,enforce=function(e){return has(e)?get(e):set(e,{})},getterFor=function(t){return function(e){if(isObject(e)&&(e=get(e)).type===t)return e;throw TypeError$1("Incompatible receiver, "+t+" required")}},internalState=(has=NATIVE_WEAK_MAP||shared.state?(store=shared.state||(shared.state=new WeakMap),wmget=uncurryThis$4(store.get),wmhas=uncurryThis$4(store.has),wmset=uncurryThis$4(store.set),set=function(e,t){if(wmhas(store,e))throw new TypeError$1(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=function(e,t){if(hasOwn$5(e,STATE))throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);return t.facade=e,createNonEnumerableProperty$3(e,STATE,t),t},get=function(e){return hasOwn$5(e,STATE)?e[STATE]:{}},function(e){return hasOwn$5(e,STATE)}),{set:set,get:get,has:has,enforce:enforce,getterFor:getterFor}),fails$4=fails$b,isCallable$6=isCallable$e,hasOwn$4=hasOwnProperty_1,DESCRIPTORS$3=descriptors,CONFIGURABLE_FUNCTION_NAME$1=functionName.CONFIGURABLE,inspectSource=inspectSource$2,InternalStateModule$1=internalState,enforceInternalState=InternalStateModule$1.enforce,getInternalState$1=InternalStateModule$1.get,defineProperty$4=Object.defineProperty,CONFIGURABLE_LENGTH=DESCRIPTORS$3&&!fails$4(function(){return 8!==defineProperty$4(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$4(e,"name")||CONFIGURABLE_FUNCTION_NAME$1&&e.name!==t)&&(DESCRIPTORS$3?defineProperty$4(e,"name",{value:t,configurable:!0}):e.name=t),CONFIGURABLE_LENGTH&&r&&hasOwn$4(r,"arity")&&e.length!==r.arity&&defineProperty$4(e,"length",{value:r.arity});try{r&&hasOwn$4(r,"constructor")&&r.constructor?DESCRIPTORS$3&&defineProperty$4(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}r=enforceInternalState(e);return hasOwn$4(r,"source")||(r.source=TEMPLATE.join("string"==typeof t?t:"")),e},isCallable$5=(Function.prototype.toString=makeBuiltIn$1(function(){return isCallable$6(this)&&getInternalState$1(this).source||inspectSource(this)},"toString"),isCallable$e),definePropertyModule$2=objectDefineProperty,makeBuiltIn=makeBuiltIn$2.exports,defineGlobalProperty$1=defineGlobalProperty$3,defineBuiltIn$3=function(e,t,r,o){var n=(o=o||{}).enumerable,s=void 0!==o.name?o.name:t;if(isCallable$5(r)&&makeBuiltIn(r,s,o),o.global)n?e[t]=r:defineGlobalProperty$1(t,r);else{try{o.unsafe?e[t]&&(n=!0):delete e[t]}catch(e){}n?e[t]=r:definePropertyModule$2.f(e,t,{value:r,enumerable:!1,configurable:!o.nonConfigurable,writable:!o.nonWritable})}return e},objectGetOwnPropertyNames={},ceil=Math.ceil,floor=Math.floor,mathTrunc=Math.trunc||function(e){e=+e;return(0<e?floor:ceil)(e)},trunc=mathTrunc,toIntegerOrInfinity$2=function(e){e=+e;return e!=e||0==e?0:trunc(e)},toIntegerOrInfinity$1=toIntegerOrInfinity$2,max=Math.max,min$1=Math.min,toAbsoluteIndex$1=function(e,t){e=toIntegerOrInfinity$1(e);return e<0?max(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$1=function(e){return toLength(e.length)},toIndexedObject$3=toIndexedObject$5,toAbsoluteIndex=toAbsoluteIndex$1,lengthOfArrayLike=lengthOfArrayLike$1,createMethod=function(a){return function(e,t,r){var o,n=toIndexedObject$3(e),s=lengthOfArrayLike(n),i=toAbsoluteIndex(r,s);if(a&&t!=t){for(;i<s;)if((o=n[i++])!=o)return!0}else for(;i<s;i++)if((a||i in n)&&n[i]===t)return a||i||0;return!a&&-1}},arrayIncludes={includes:createMethod(!0),indexOf:createMethod(!1)},uncurryThis$3=functionUncurryThis,hasOwn$3=hasOwnProperty_1,toIndexedObject$2=toIndexedObject$5,indexOf=arrayIncludes.indexOf,hiddenKeys$2=hiddenKeys$4,push=uncurryThis$3([].push),objectKeysInternal=function(e,t){var r,o=toIndexedObject$2(e),n=0,s=[];for(r in o)!hasOwn$3(hiddenKeys$2,r)&&hasOwn$3(o,r)&&push(s,r);for(;t.length>n;)!hasOwn$3(o,r=t[n++])||~indexOf(s,r)||push(s,r);return s},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$1=(objectGetOwnPropertySymbols.f=Object.getOwnPropertySymbols,getBuiltIn$4),uncurryThis$2=functionUncurryThis,getOwnPropertyNamesModule=objectGetOwnPropertyNames,getOwnPropertySymbolsModule$1=objectGetOwnPropertySymbols,anObject$3=anObject$5,concat$1=functionUncurryThis([].concat),ownKeys$1=getBuiltIn$1("Reflect","ownKeys")||function(e){var t=getOwnPropertyNamesModule.f(anObject$3(e)),r=getOwnPropertySymbolsModule$1.f;return r?concat$1(t,r(e)):t},hasOwn$2=hasOwnProperty_1,ownKeys=ownKeys$1,getOwnPropertyDescriptorModule=objectGetOwnPropertyDescriptor,definePropertyModule$1=objectDefineProperty,copyConstructorProperties$1=function(e,t,r){for(var o=ownKeys(t),n=definePropertyModule$1.f,s=getOwnPropertyDescriptorModule.f,i=0;i<o.length;i++){var a=o[i];hasOwn$2(e,a)||r&&hasOwn$2(r,a)||n(e,a,s(t,a))}},fails$3=fails$b,isCallable$4=isCallable$e,replacement=/#|\.prototype\./,isForced$1=function(e,t){e=data[normalize(e)];return e==POLYFILL||e!=NATIVE&&(isCallable$4(t)?fails$3(t):!!t)},normalize=isForced$1.normalize=function(e){return String(e).replace(replacement,".").toLowerCase()},data=isForced$1.data={},NATIVE=isForced$1.NATIVE="N",POLYFILL=isForced$1.POLYFILL="P",isForced_1=isForced$1,global$2=global$b,getOwnPropertyDescriptor=objectGetOwnPropertyDescriptor.f,createNonEnumerableProperty$2=createNonEnumerableProperty$4,defineBuiltIn$2=defineBuiltIn$3,defineGlobalProperty=defineGlobalProperty$3,copyConstructorProperties=copyConstructorProperties$1,isForced=isForced_1,_export=function(e,t){var r,o,n,s=e.target,i=e.global,a=e.stat,c=i?global$2:a?global$2[s]||defineGlobalProperty(s,{}):(global$2[s]||{}).prototype;if(c)for(r in t){if(o=t[r],n=e.dontCallGetSet?(n=getOwnPropertyDescriptor(c,r))&&n.value:c[r],!isForced(i?r:s+(a?".":"#")+r,e.forced)&&void 0!==n){if(typeof o==typeof n)continue;copyConstructorProperties(o,n)}(e.sham||n&&n.sham)&&createNonEnumerableProperty$2(o,"sham",!0),defineBuiltIn$2(c,r,o,e)}},internalObjectKeys=objectKeysInternal,enumBugKeys$1=enumBugKeys$3,objectKeys$2=Object.keys||function(e){return internalObjectKeys(e,enumBugKeys$1)},DESCRIPTORS$2=descriptors,uncurryThis$1=functionUncurryThis,call$1=functionCall,fails$2=fails$b,objectKeys$1=objectKeys$2,getOwnPropertySymbolsModule=objectGetOwnPropertySymbols,propertyIsEnumerableModule=objectPropertyIsEnumerable,toObject$1=toObject$3,IndexedObject=indexedObject,$assign=Object.assign,defineProperty$3=Object.defineProperty,concat=uncurryThis$1([].concat),objectAssign=!$assign||fails$2(function(){if(DESCRIPTORS$2&&1!==$assign({b:1},$assign(defineProperty$3({},"a",{enumerable:!0,get:function(){defineProperty$3(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol(),o="abcdefghijklmnopqrst";return e[r]=7,o.split("").forEach(function(e){t[e]=e}),7!=$assign({},e)[r]||objectKeys$1($assign({},t)).join("")!=o})?function(e,t){for(var r=toObject$1(e),o=arguments.length,n=1,s=getOwnPropertySymbolsModule.f,i=propertyIsEnumerableModule.f;n<o;)for(var a,c=IndexedObject(arguments[n++]),l=s?concat(objectKeys$1(c),s(c)):objectKeys$1(c),u=l.length,p=0;p<u;)a=l[p++],DESCRIPTORS$2&&!call$1(i,c,a)||(r[a]=c[a]);return r}:$assign,$$1=_export,assign=objectAssign;_export({target:"Object",stat:!0,arity:2,forced:Object.assign!==assign},{assign:assign});const SLICE_NAME="processingCenter",namespace$2=(!function(e){e.Failed="failed",e.Idle="idle",e.Pending="pending"}(LoadingStatus=LoadingStatus||{}),!function(e){e.Editor="editor",e.Viewer="viewer",e.Owner="owner"}(ESourcePermission=ESourcePermission||{}),"uiState"),initialState$1={status:LoadingStatus.Idle},slice$1=createSlice({name:SLICE_NAME+"/"+namespace$2,initialState:initialState$1,reducers:{init(e){e.status=LoadingStatus.Pending},initDone(e){e.status=LoadingStatus.Idle},initFailed(e){e.status=LoadingStatus.Failed}}}),actions$2=slice$1.actions;var uiState$1=slice$1.reducer;const namespace$1="sourceConfiguration",initialState={status:LoadingStatus.Pending,source:void 0},slice=createSlice({name:SLICE_NAME+"/"+namespace$1,initialState:initialState,reducers:{fetchSourceStart(e,t){e.status=LoadingStatus.Pending},fetchSourceSuccess(e,t){e.status=LoadingStatus.Idle,e.source=t.payload},fetchSourceFailed(e){e.status=LoadingStatus.Failed}}}),actions$1=slice.actions;var configuration_slice=slice.reducer;const namespace=SLICE_NAME,actions={[namespace$2]:actions$2,[namespace$1]:actions$1},rootReducer=combineReducers({[namespace$2]:uiState$1,[namespace$1]:configuration_slice}),selectUIStateStatus=e=>e[namespace].uiState.status;var uiState=Object.freeze({__proto__:null,selectUIStateStatus:selectUIStateStatus});const selectFetchSourceStatus=e=>{return null==(e=null==(e=e[namespace])?void 0:e.sourceConfiguration)?void 0:e.status},selectSource=e=>{return null==(e=null==(e=e[namespace])?void 0:e.sourceConfiguration)?void 0:e.source};var configuration_selectors=Object.freeze({__proto__:null,selectFetchSourceStatus:selectFetchSourceStatus,selectSource:selectSource});const selectApiConfigs$1=createSelector([rootApiSelector,graphEndpointSelector,sessionTokenSelector],(e,t,r)=>({apiRoot:e,graphQLEndpoint:t,token:r}));var selectors=Object.freeze({__proto__:null,selectApiConfigs:selectApiConfigs$1,uiState:uiState,source:configuration_selectors});function __rest(e,t){var r={};for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function __awaiter(e,i,a,c){return new(a=a||Promise)(function(r,t){function o(e){try{s(c.next(e))}catch(e){t(e)}}function n(e){try{s(c.throw(e))}catch(e){t(e)}}function s(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(o,n)}s((c=c.apply(e,i||[])).next())})}function fetchSource(t,r){return __awaiter(this,void 0,void 0,function*(){var e="fetchSource";return(yield baseGraphQLApiWithError(Object.assign({query:"\n query fetchSource($id: ID!){\n source(id: $id) {\n id\n sourceType { id }\n name\n details\n isPublic\n organizationId\n createdDateTime\n modifiedDateTime\n thumbnailUrl\n contentTemplates {\n id\n sourceId\n sdoId\n sdo { id data }\n schemaId\n data\n }\n permission\n state\n }\n }\n ",operationName:e,variables:{id:r}},t))).source})}function*fetchSourceSaga(e){try{var t=yield fetchSource(yield select(selectApiConfigs$1),e.payload);yield put(actions.sourceConfiguration.fetchSourceSuccess(t))}catch(e){yield put(actions.sourceConfiguration.fetchSourceFailed()),console.log("Problem fetching source",e)}}function*fetchSourceWatcher(){yield takeLatest$1(actions.sourceConfiguration.fetchSourceStart,fetchSourceSaga)}const selectApiConfigs=selectors["selectApiConfigs"];function*initProcessingCenter(){var e=yield select(selectUIStateStatus);yield select(preferredLanguageSelector),yield select(selectApiConfigs),e===LoadingStatus.Pending&&(yield put(actions.uiState.initDone()))}function*watchProcessingCenterInit(){yield takeLatest$1(actions.uiState.init.type,initProcessingCenter)}function*rootSaga(){yield all([watchProcessingCenterInit(),fetchSourceWatcher()])}function getProcessingCenterSourcesModule(){return{id:SLICE_NAME,reducerMap:{[SLICE_NAME]:rootReducer},sagas:[rootSaga],initialActions:[]}}const useStyles$3=makeStyles()(e=>({sourceContainer:{height:"100%",display:"flex",flexDirection:"column",justifyContent:"space-between"},emptyStateContainer:{display:"flex",flexDirection:"column",justifyContent:"flex-start",alignItems:"center",paddingTop:e.spacing(18),width:"100%"},emptyImage:{display:"flex",textAlign:"center",width:"235px",height:"235px",marginBottom:e.spacing(2)},message:{userSelect:"none",paddingBottom:e.spacing(2)}}));var activeXDocument,IteratorPrototype$2,PrototypeOfArrayIteratorPrototype,arrayIterator,objectDefineProperties={},DESCRIPTORS$1=descriptors,V8_PROTOTYPE_DEFINE_BUG=v8PrototypeDefineBug,definePropertyModule=objectDefineProperty,anObject$2=anObject$5,toIndexedObject$1=toIndexedObject$5,objectKeys=objectKeys$2,getBuiltIn=(objectDefineProperties.f=DESCRIPTORS$1&&!V8_PROTOTYPE_DEFINE_BUG?Object.defineProperties:function(e,t){anObject$2(e);for(var r,o=toIndexedObject$1(t),n=objectKeys(t),s=n.length,i=0;i<s;)definePropertyModule.f(e,r=n[i++],o[r]);return e},getBuiltIn$4),html$1=getBuiltIn$4("document","documentElement"),anObject$1=anObject$5,definePropertiesModule=objectDefineProperties,enumBugKeys=enumBugKeys$3,hiddenKeys=hiddenKeys$4,html=html$1,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.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$1(e),r=new EmptyConstructor,EmptyConstructor[PROTOTYPE]=null,r[IE_PROTO$1]=e):r=NullProtoObject(),void 0===t?r:definePropertiesModule.f(r,t)}),wellKnownSymbol$4=wellKnownSymbol$6,create$1=objectCreate,defineProperty$2=objectDefineProperty.f,UNSCOPABLES=wellKnownSymbol$4("unscopables"),ArrayPrototype=Array.prototype,addToUnscopables$1=(null==ArrayPrototype[UNSCOPABLES]&&defineProperty$2(ArrayPrototype,UNSCOPABLES,{configurable:!0,value:create$1(null)}),function(e){ArrayPrototype[UNSCOPABLES][e]=!0}),iterators={},fails$1=fails$b,correctPrototypeGetter=!fails$b(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),hasOwn$1=hasOwnProperty_1,isCallable$3=isCallable$e,toObject=toObject$3,sharedKey=sharedKey$3,CORRECT_PROTOTYPE_GETTER=correctPrototypeGetter,IE_PROTO=sharedKey$3("IE_PROTO"),$Object=Object,ObjectPrototype=$Object.prototype,objectGetPrototypeOf=CORRECT_PROTOTYPE_GETTER?$Object.getPrototypeOf:function(e){e=toObject(e);if(hasOwn$1(e,IE_PROTO))return e[IE_PROTO];var t=e.constructor;return isCallable$3(t)&&e instanceof t?t.prototype:e instanceof $Object?ObjectPrototype:null},fails=fails$b,isCallable$2=isCallable$e,getPrototypeOf$1=objectGetPrototypeOf,defineBuiltIn$1=defineBuiltIn$3,wellKnownSymbol$3=wellKnownSymbol$6,ITERATOR$2=wellKnownSymbol$6("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(function(){var e={};return IteratorPrototype$2[ITERATOR$2].call(e)!==e})),iteratorsCore=(isCallable$2((IteratorPrototype$2=NEW_ITERATOR_PROTOTYPE?{}:IteratorPrototype$2)[ITERATOR$2])||defineBuiltIn$1(IteratorPrototype$2,ITERATOR$2,function(){return this}),{IteratorPrototype:IteratorPrototype$2,BUGGY_SAFARI_ITERATORS:BUGGY_SAFARI_ITERATORS$1}),defineProperty$1=objectDefineProperty.f,hasOwn=hasOwnProperty_1,wellKnownSymbol$2=wellKnownSymbol$6,TO_STRING_TAG$1=wellKnownSymbol$6("toStringTag"),setToStringTag$2=function(e,t,r){(e=e&&!r?e.prototype:e)&&!hasOwn(e,TO_STRING_TAG$1)&&defineProperty$1(e,TO_STRING_TAG$1,{configurable:!0,value:t})},IteratorPrototype$1=iteratorsCore.IteratorPrototype,create=objectCreate,createPropertyDescriptor=createPropertyDescriptor$3,setToStringTag$1=setToStringTag$2,Iterators$2=iterators,returnThis$1=function(){return this},createIteratorConstructor$1=function(e,t,r,o){t+=" Iterator";return e.prototype=create(IteratorPrototype$1,{next:createPropertyDescriptor(+!o,r)}),setToStringTag$1(e,t,!1),Iterators$2[t]=returnThis$1,e},isCallable$1=isCallable$e,$String=String,$TypeError=TypeError,aPossiblePrototype$1=function(e){if("object"==typeof e||isCallable$1(e))return e;throw $TypeError("Can't set "+$String(e)+" as a prototype")},uncurryThis=functionUncurryThis,anObject=anObject$5,aPossiblePrototype=aPossiblePrototype$1,objectSetPrototypeOf=Object.setPrototypeOf||("__proto__"in{}?function(){var r,o=!1,e={};try{(r=uncurryThis(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(e,[]),o=e instanceof Array}catch(e){}return function(e,t){return anObject(e),aPossiblePrototype(t),o?r(e,t):e.__proto__=t,e}}():void 0),$=_export,call=functionCall,FunctionName=functionName,isCallable=isCallable$e,createIteratorConstructor=createIteratorConstructor$1,getPrototypeOf=objectGetPrototypeOf,setPrototypeOf=objectSetPrototypeOf,setToStringTag=setToStringTag$2,createNonEnumerableProperty$1=createNonEnumerableProperty$4,defineBuiltIn=defineBuiltIn$3,wellKnownSymbol$1=wellKnownSymbol$6,Iterators$1=iterators,IteratorsCore=iteratorsCore,PROPER_FUNCTION_NAME=FunctionName.PROPER,CONFIGURABLE_FUNCTION_NAME=FunctionName.CONFIGURABLE,IteratorPrototype=IteratorsCore.IteratorPrototype,BUGGY_SAFARI_ITERATORS=IteratorsCore.BUGGY_SAFARI_ITERATORS,ITERATOR$1=wellKnownSymbol$1("iterator"),KEYS="keys",VALUES="values",ENTRIES="entries",returnThis=function(){return this},defineIterator$1=function(e,t,r,o,n,s,i){createIteratorConstructor(r,t,o);function a(e){if(e===n&&y)return y;if(!BUGGY_SAFARI_ITERATORS&&e in p)return p[e];switch(e){case KEYS:case VALUES:case ENTRIES:return function(){return new r(this,e)}}return function(){return new r(this)}}var c,l,o=t+" Iterator",u=!1,p=e.prototype,d=p[ITERATOR$1]||p["@@iterator"]||n&&p[n],y=!BUGGY_SAFARI_ITERATORS&&d||a(n),b="Array"==t&&p.entries||d;if(b&&(b=getPrototypeOf(b.call(new e)))!==Object.prototype&&b.next&&(getPrototypeOf(b)!==IteratorPrototype&&(setPrototypeOf?setPrototypeOf(b,IteratorPrototype):isCallable(b[ITERATOR$1])||defineBuiltIn(b,ITERATOR$1,returnThis)),setToStringTag(b,o,!0)),PROPER_FUNCTION_NAME&&n==VALUES&&d&&d.name!==VALUES&&(CONFIGURABLE_FUNCTION_NAME?createNonEnumerableProperty$1(p,"name",VALUES):(u=!0,y=function(){return call(d,this)})),n)if(c={values:a(VALUES),keys:s?y:a(KEYS),entries:a(ENTRIES)},i)for(l in c)!BUGGY_SAFARI_ITERATORS&&!u&&l in p||defineBuiltIn(p,l,c[l]);else $({target:t,proto:!0,forced:BUGGY_SAFARI_ITERATORS||u},c);return p[ITERATOR$1]!==y&&defineBuiltIn(p,ITERATOR$1,y,{name:n}),Iterators$1[t]=y,c},toIndexedObject=toIndexedObject$5,addToUnscopables=addToUnscopables$1,Iterators=iterators,InternalStateModule=internalState,defineProperty=objectDefineProperty.f,defineIterator=defineIterator$1,DESCRIPTORS=descriptors,ARRAY_ITERATOR="Array Iterator",setInternalState=InternalStateModule.set,getInternalState=InternalStateModule.getterFor(ARRAY_ITERATOR),es_array_iterator=defineIterator(Array,"Array",function(e,t){setInternalState(this,{type:ARRAY_ITERATOR,target:toIndexedObject(e),index:0,kind:t})},function(){var e=getInternalState(this),t=e.target,r=e.kind,o=e.index++;return!t||o>=t.length?{value:e.target=void 0,done:!0}:"keys"==r?{value:o,done:!1}:"values"==r?{value:t[o],done:!1}:{value:[o,t[o]],done:!1}},"values"),values=Iterators.Arguments=Iterators.Array;if(addToUnscopables("keys"),addToUnscopables("values"),addToUnscopables("entries"),DESCRIPTORS&&"values"!==values.name)try{defineProperty(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$1=global$b,DOMIterables=domIterables,DOMTokenListPrototype=domTokenListPrototype,ArrayIteratorMethods=es_array_iterator,createNonEnumerableProperty=createNonEnumerableProperty$4,wellKnownSymbol=wellKnownSymbol$6,ITERATOR=wellKnownSymbol("iterator"),TO_STRING_TAG=wellKnownSymbol("toStringTag"),ArrayValues=ArrayIteratorMethods.values,handlePrototype=function(t,e){if(t){if(t[ITERATOR]!==ArrayValues)try{createNonEnumerableProperty(t,ITERATOR,ArrayValues)}catch(e){t[ITERATOR]=ArrayValues}if(t[TO_STRING_TAG]||createNonEnumerableProperty(t,TO_STRING_TAG,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$1[COLLECTION_NAME]&&global$1[COLLECTION_NAME].prototype,COLLECTION_NAME);handlePrototype(DOMTokenListPrototype,"DOMTokenList");const useStyles$2=makeStyles()(e=>({headerActionContainer:{alignItems:"center",display:"flex",flexGrow:1,height:"100%",justifyContent:"flex-end"},headerTitleRow:{alignItems:"center",display:"flex",justifyContent:"space-between",height:"54px",padding:e.spacing(0,0,0,6)},title:{color:"#2A323C"},headerSubtitleRow:{alignItems:"center",display:"flex",justifyContent:"flex-start",padding:e.spacing(0,0,1,6)},subtitle:{},menuList:{width:"auto"},menuItem:{borderRadius:4,padding:e.spacing(1),"& > svg":{marginRight:e.spacing(2)},textTransform:"none"},divider:{marginBottom:e.spacing(1.5),marginTop:e.spacing(1.5)}})),SHARED_TEXT={configurationLabel:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"processing-panel-sources.tabs.content-template",defaultMessage:"Configuration",description:"Configurations for source"}),contentTemplateLabel:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"processing-panel-sources.tabs.content-template",defaultMessage:"Content Templates",description:"Configurations for Content Templates"}),headerTitleSourceDetail:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"processing-panel-sources.header.source.detail.title",defaultMessage:"Source detail",description:"Title for Source Detail Panel"}),headerTitleSourceCreation:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"processing-panel-sources.header.source.creation.title",defaultMessage:"Source Creation",description:"Title for Source Creation Panel"}),headerSubTitleSourceDetail:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"processing-panel-sources.header.source.detail.subtitle",defaultMessage:"View and modify configurations and settings for this source.",description:"Subtitle for Source Detail Panel"}),headerSubTitleSourceCreation:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"processing-panel-sources.header.source.creation.subtitle",defaultMessage:"Follow the steps below to create a new source.",description:"subtitle for Source Creation Panel"}),headerPermissionsButton:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"processing-panel-sources.header.permissions",defaultMessage:"Permissions",description:"button for permissions"}),headerMoreActionsButton:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"processing-panel-sources.header.more.actions",defaultMessage:"More Actions",description:"button for more actions"}),headerCloseButton:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"processing-panel-sources.header.close.button",defaultMessage:"Close",description:"button for Close / Hide Panel"}),headerDeleteSourceButton:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"processing-panel-sources.header.delete.source.button",defaultMessage:"Delete",description:"button to delete source"}),sourceDetailsRetryButton:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"processing-panel-sources.source.details.try.button",defaultMessage:"Try Again",description:"button to try to reload source"}),sourceDetailsErrorMessage:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"processing-panel-sources.source.details.error.message",defaultMessage:"There was a problem loading the Source",description:"error message on source load"})},Header=({onPanelClose:e,sourceId:t})=>{var r=useStyles$2()["classes"];const[o,n]=react.exports.useState(null);var s=Boolean(o);return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:r.headerTitleRow,"data-testid":"-header-testid"},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h1","data-testid":"permissions-panel-header-title",className:r.title},{children:t?SHARED_TEXT.headerTitleSourceDetail():SHARED_TEXT.headerTitleSourceCreation()})),jsxRuntime.exports.jsxs("div",Object.assign({className:r.headerActionContainer},{children:[t&&jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Tooltip,Object.assign({title:SHARED_TEXT.headerPermissionsButton()},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:()=>console.log("clicked permissions"),"aria-labelledby":"permissions-button","data-testid":"source-details-permissions-button",size:"large"},{children:jsxRuntime.exports.jsx(AddUser,{})}))})),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:SHARED_TEXT.headerMoreActionsButton()},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:e=>{n(e.currentTarget),e.stopPropagation()},"aria-labelledby":"more-actions-button","data-testid":"source-details-more-actions-button",size:"large"},{children:jsxRuntime.exports.jsx(MoreVert,{})}))}))]}),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:SHARED_TEXT.headerCloseButton()},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:()=>e(),"aria-labelledby":"source-details-close-button","data-testid":"source-details-close-button",size:"large"},{children:t?jsxRuntime.exports.jsx(Close,{}):jsxRuntime.exports.jsx(Hide,{})}))}))]}))]})),jsxRuntime.exports.jsx("div",Object.assign({className:r.headerSubtitleRow},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2","data-testid":"permissions-panel-header-title",className:r.subtitle},{children:t?SHARED_TEXT.headerSubTitleSourceDetail():SHARED_TEXT.headerSubTitleSourceCreation()}))})),jsxRuntime.exports.jsx(Menu,Object.assign({onClick:e=>e.stopPropagation(),classes:{paper:r.menuList},"data-testid":"pc-sources-item-context-menu",open:s,anchorEl:o,onClose:()=>{n(null)}},{children:jsxRuntime.exports.jsxs(MenuItem,Object.assign({onClick:e=>{console.log("clicked delete "+t),e.stopPropagation()},className:r.menuItem,"data-testid":"pc-sources-context-menu-delete-option"},{children:[jsxRuntime.exports.jsx(Delete,{fontSize:"small"}),SHARED_TEXT.headerDeleteSourceButton()]}))}))]})},useStyles$1=makeStyles()(()=>({tabContainer:{"& .Sdk-Mui-selected":{color:"black"}}}));function TabPanel(e){var{children:t,value:r,index:o}=e,e=__rest(e,["children","value","index"]);return jsxRuntime.exports.jsx("div",Object.assign({role:"tabpanel",hidden:r!==o,id:"source-tabpanel-"+o,"aria-labelledby":"source-tab-"+o},e,{children:r===o&&jsxRuntime.exports.jsx(Box,Object.assign({sx:{p:6}},{children:t}))}))}function a11yProps(e){return{id:"source-tab-"+e,"aria-controls":"source-tabpanel-"+e}}const SourceTabs=({source:e})=>{const[t,r]=react.exports.useState(0);var o=useStyles$1()["classes"];return jsxRuntime.exports.jsxs(Box,Object.assign({sx:{width:"100%"}},{children:[jsxRuntime.exports.jsx(Box,Object.assign({sx:{paddingLeft:"15px",borderBottom:.5,borderColor:"#D5DFE9"},className:o.tabContainer},{children:jsxRuntime.exports.jsxs(Tabs,Object.assign({textColor:"primary",indicatorColor:"secondary",value:t,onChange:(e,t)=>{r(t)},"aria-label":"Source Tabs"},{children:[jsxRuntime.exports.jsx(Tab,Object.assign({label:SHARED_TEXT.configurationLabel()},a11yProps(0))),jsxRuntime.exports.jsx(Tab,Object.assign({label:SHARED_TEXT.contentTemplateLabel()},a11yProps(1)))]}))})),jsxRuntime.exports.jsx(TabPanel,Object.assign({value:t,index:0},{children:e&&jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx("div",{children:"Configuration Component Goes Here"}),jsxRuntime.exports.jsx("div",{children:"Source Data:"}),jsxRuntime.exports.jsx("div",{children:e?JSON.stringify(e):"No source found in redux"})]})})),jsxRuntime.exports.jsx(TabPanel,Object.assign({value:t,index:1},{children:"Content Template Component goes here!"}))]}))},SourceDetail=({hidePanel:e,sourceId:t})=>{var r=useStyles$3()["classes"],o=useSelector(selectFetchSourceStatus);const n=useDispatch();var s=useSelector(selectSource),i=react.exports.useCallback(()=>{e&&e()},[e]);return o===LoadingStatus.Pending?jsxRuntime.exports.jsxs("div",Object.assign({role:"presentation","data-test":"processing-center-sources-widget",className:r.sourceContainer},{children:[jsxRuntime.exports.jsx(Header,{sourceId:t,onPanelClose:i}),jsxRuntime.exports.jsx(Box,Object.assign({sx:{display:"flex"}},{children:jsxRuntime.exports.jsx(CircularProgress,{})}))]})):o===LoadingStatus.Failed?jsxRuntime.exports.jsxs("div",Object.assign({role:"presentation","data-test":"processing-center-sources-widget",className:r.sourceContainer},{children:[jsxRuntime.exports.jsx(Header,{sourceId:t,onPanelClose:i}),jsxRuntime.exports.jsxs("div",Object.assign({className:r.emptyStateContainer,"data-test":"empty-state-container"},{children:[jsxRuntime.exports.jsx("img",{"data-test":"empty-state-image",alt:"Empty Source",className:r.emptyImage,src:img$r}),jsxRuntime.exports.jsx(Typography$1,Object.assign({"data-test":"empty-state-title",className:r.message,variant:"h2",color:"textPrimary"},{children:SHARED_TEXT.sourceDetailsErrorMessage()})),jsxRuntime.exports.jsx(Button,Object.assign({variant:"contained",onClick:()=>{t&&n(actions.sourceConfiguration.fetchSourceStart(t))}},{children:SHARED_TEXT.sourceDetailsRetryButton()}))]}))]})):jsxRuntime.exports.jsxs("div",Object.assign({role:"presentation","data-test":"processing-center-sources-widget",className:r.sourceContainer},{children:[jsxRuntime.exports.jsx(Header,{sourceId:t,onPanelClose:i}),jsxRuntime.exports.jsx(SourceTabs,{source:s})]}))},useStyles=makeStyles()(()=>({createSourceContainer:{height:"100%",display:"flex",flexDirection:"column",justifyContent:"space-between"}})),SourceCreation=({hidePanel:e})=>{var t=useStyles()["classes"],r=react.exports.useCallback(()=>{e&&e()},[e]);return jsxRuntime.exports.jsxs("div",Object.assign({role:"presentation","data-test":"processing-center-sources-widget",className:t.createSourceContainer},{children:[jsxRuntime.exports.jsx(Header,{onPanelClose:r}),jsxRuntime.exports.jsx("h3",{children:"Source Creation stepper will go here!"})]}))},ProcessingCenterSources=e=>{const t=e["sourceId"],r=useDispatch();return react.exports.useEffect(()=>{t&&r(actions.sourceConfiguration.fetchSourceStart(t))},[r,t]),jsxRuntime.exports.jsx(CacheProvider,Object.assign({value:muiCache},{children:jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(lib.DynamicModuleLoader,Object.assign({modules:[getProcessingCenterSourcesModule()]},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:t?jsxRuntime.exports.jsx(SourceDetail,Object.assign({},e)):jsxRuntime.exports.jsx(SourceCreation,Object.assign({},e))})}))})}))};export{ProcessingCenterSources};
|
|
1
|
+
import{z as createSvgIcon,C as interopRequireDefault,j as jsxRuntime,m as makeStyles,H as createSlice,cf as combineReducers,cg as createSelector,O as rootApiSelector,R as graphEndpointSelector,Q as sessionTokenSelector,ci as AIWareThemeProvider,K as lib,fh as getLibraryModule,A as AIWareIntlProvider,bx as CacheProvider,by as muiCache,k as useSelector,r as react,i as useDispatch,F as FormattedMessage,T as Typography$1,a8 as Tooltip,a9 as IconButton,cj as Close,B as Box$1,q as Alert,at as Button$1,bE as CircularProgress$1,Y as Portal,eG as Badge,bI as Icon,fu as EngineCategoryIcons,aX as Snackbar,aY as default_1$2,f_ as ConfirmationModal,a2 as all,g8 as selectors$1,g9 as LibraryDropdown,bP as FormHelperText,ga as Remove,gb as Save,cG as Add,cy as Delete,cw as Edit,cs as mountPanel,x as classnames,af as takeLatest$1,v as FormControl,ai as select,M as preferredLanguageSelector,b4 as AIWareFormatMessage,ah as put,bW as showMessage,bX as MessageSeverity,ak as call,dQ as sdkEventManager,dR as SdkEvents,dS as SdkError,p as lodash,w as TextField,aV as Select,aW as MenuItem,gc as Input,cD as baseGraphQLApiWithError}from"./js-core.esm.js";import{selectors}from"./js-core.esm31.js";import{C as Chip$1}from"./js-core.esm25.js";import"./js-core.esm23.js";import"./js-core.esm32.js";import"./js-core.esm33.js";import"./js-core.esm8.js";import"./js-core.esm21.js";import"./js-core.esm34.js";import"./js-core.esm12.js";import"./js-core.esm16.js";import"./js-core.esm15.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$1,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$1,Object.assign({"data-test":"engine-category-name-"+s.name,variant:"h6",color:"textPrimary",className:i.name},{children:s.name})),jsxRuntime.exports.jsx(Typography$1,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$1,Object.assign({style:{width:"90%"},variant:"h4",noWrap:!0},{children:e})),jsxRuntime.exports.jsx(Typography$1,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$1,{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$1,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,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$1,Object.assign({variant:"h1",color:"secondary","data-test":"data-center-process-ai-panel-header-title"},{children:SHARED_TEXT.processAiHeaderTitle()})),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:SHARED_TEXT.closePanel()},{children:jsxRuntime.exports.jsx(IconButton,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$1,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$1,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$1,{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$1,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$1,{})})),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$1,Object.assign({"data-test":"engine-category-name-"+t,variant:"h6",color:"textPrimary",className:p.engineName},{children:t})),jsxRuntime.exports.jsx(Typography$1,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$1,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$1,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$1,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};
|
package/js-core.esm42.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import{a as generateUtilityClasses,g as generateUtilityClass,b as styled,_ as _extends$3,r as react,u as useThemeProps,e as _objectWithoutPropertiesLoose,T as Typography$1,j as jsxRuntime,f as clsx,h as composeClasses,z as createSvgIcon,C as interopRequireDefault,H as createSlice,p as lodash,cf as combineReducers,cg as createSelector,O as rootApiSelector,R as graphEndpointSelector,Q as sessionTokenSelector,ch as fork,dG as channel,m as makeStyles,ci as AIWareThemeProvider,K as lib,A as AIWareIntlProvider,bx as CacheProvider,by as muiCache,i as useDispatch,k as useSelector,G as Grid$1,F as FormattedMessage,a9 as IconButton,aY as default_1$1,v as FormControl,w as TextField,co as InputAdornment,bE as CircularProgress$1,cn as default_1$2,aq as FormControlLabel,ar as Checkbox,a7 as Divider,af as takeLatest$1,B as Box$1,cp as unmountPanel,cq as AvailableComponents,a8 as Tooltip,cj as Close,aW as MenuItem,bK as map_1,bL as keys_1,at as Button$1,bJ as get_1,aF as TableRow,fz as MoreHor,bZ as Radio,cr as delay,ah as put,ai as select,ak as call,bW as showMessage,bX as MessageSeverity,M as preferredLanguageSelector,a2 as all,dN as ProgressStepper,dg as toString_1,dM as toNumber_1,b4 as AIWareFormatMessage,dz as take,bM as RadioGroup,cB as img$1u,cD as baseGraphQLApiWithError,dQ as sdkEventManager,dR as SdkEvents,dS as SdkError,ap as FormGroup,an as FormLabel,S as Switch,x as classnames,bC as isEmpty_1,cs as mountPanel,dX as guid}from"./js-core.esm.js";import{s as set_1,c as InputText,e as InputSelect,f as InputCheckbox,g as InputRadioGroup,P as Picklist,N as Number$1,S as SchemaOrText,H as Heading,E as EntityTags,L as ListField,h as uploadFileToS3,i as getSignedWritableUrl,o as orderBy_1,l as lowerCase_1,j as includes_1}from"./js-core.esm19.js";import{u as useForm,F as FormProvider}from"./js-core.esm13.js";import{a as findIndex_1}from"./js-core.esm14.js";import{d as default_1$3}from"./js-core.esm8.js";import{f as filter_1}from"./js-core.esm23.js";import{S as Stack}from"./js-core.esm20.js";import{C as Card}from"./js-core.esm9.js";import{C as CardContent}from"./js-core.esm10.js";import{C as Chip$1}from"./js-core.esm25.js";import"./js-core.esm21.js";import"./js-core.esm24.js";function getCardHeaderUtilityClass(e){return generateUtilityClass("MuiCardHeader",e)}const cardHeaderClasses=generateUtilityClasses("MuiCardHeader",["root","avatar","action","content","title","subheader"]);var cardHeaderClasses$1=cardHeaderClasses;const _excluded=["action","avatar","className","component","disableTypography","subheader","subheaderTypographyProps","title","titleTypographyProps"],useUtilityClasses=e=>{e=e.classes;return composeClasses({root:["root"],avatar:["avatar"],action:["action"],content:["content"],title:["title"],subheader:["subheader"]},getCardHeaderUtilityClass,e)},CardHeaderRoot=styled("div",{name:"MuiCardHeader",slot:"Root",overridesResolver:(e,t)=>_extends$3({["& ."+cardHeaderClasses$1.title]:t.title,["& ."+cardHeaderClasses$1.subheader]:t.subheader},t.root)})({display:"flex",alignItems:"center",padding:16}),CardHeaderAvatar=styled("div",{name:"MuiCardHeader",slot:"Avatar",overridesResolver:(e,t)=>t.avatar})({display:"flex",flex:"0 0 auto",marginRight:16}),CardHeaderAction=styled("div",{name:"MuiCardHeader",slot:"Action",overridesResolver:(e,t)=>t.action})({flex:"0 0 auto",alignSelf:"flex-start",marginTop:-4,marginRight:-8,marginBottom:-4}),CardHeaderContent=styled("div",{name:"MuiCardHeader",slot:"Content",overridesResolver:(e,t)=>t.content})({flex:"1 1 auto"}),CardHeader=react.exports.forwardRef(function(e,t){var e=useThemeProps({props:e,name:"MuiCardHeader"}),{action:s,avatar:a,className:n,component:i="div",disableTypography:r=!1,subheader:o,subheaderTypographyProps:p,title:l,titleTypographyProps:c}=e,d=_objectWithoutPropertiesLoose(e,_excluded),e=_extends$3({},e,{component:i,disableTypography:r}),x=useUtilityClasses(e);let m=l,u=(null==m||m.type===Typography$1||r||(m=jsxRuntime.exports.jsx(Typography$1,_extends$3({variant:a?"body2":"h5",className:x.title,component:"span",display:"block"},c,{children:m}))),o);return null==u||u.type===Typography$1||r||(u=jsxRuntime.exports.jsx(Typography$1,_extends$3({variant:a?"body2":"body1",className:x.subheader,color:"text.secondary",component:"span",display:"block"},p,{children:u}))),jsxRuntime.exports.jsxs(CardHeaderRoot,_extends$3({className:clsx(x.root,n),as:i,ref:t,ownerState:e},d,{children:[a&&jsxRuntime.exports.jsx(CardHeaderAvatar,{className:x.avatar,ownerState:e,children:a}),jsxRuntime.exports.jsxs(CardHeaderContent,{className:x.content,ownerState:e,children:[m,u]}),s&&jsxRuntime.exports.jsx(CardHeaderAction,{className:x.action,ownerState:e,children:s})]}))});var LoadingStatus,ContextMenuExtensionType,UiInfo,FormStatus,FormValidations,AppFieldType,DeploymentModel,AppConfigType,AppConfigLevel,IconImportStatus,CardHeader$1=CardHeader,FilterList={},_interopRequireDefault=interopRequireDefault.exports,default_1=(Object.defineProperty(FilterList,"__esModule",{value:!0}),FilterList.default=void 0),_createSvgIcon=_interopRequireDefault(createSvgIcon),_jsxRuntime=jsxRuntime.exports,_default=(0,_createSvgIcon.default)((0,_jsxRuntime.jsx)("path",{d:"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"}),"FilterList"),default_1=FilterList.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 SLICE_NAME="appCenterNew",namespace$6=(!function(e){e.Failed="failed",e.Idle="idle",e.Pending="pending"}(LoadingStatus=LoadingStatus||{}),!function(e){e.mention="mention",e.watchlist="watchlist",e.collection="collection",e.tdo="tdo"}(ContextMenuExtensionType=ContextMenuExtensionType||{}),!function(e){e.PanelClosed="closed",e.PanelOpen="open"}(UiInfo=UiInfo||{}),!function(e){e[e.Pending=0]="Pending",e[e.Submitting=1]="Submitting",e[e.Success=2]="Success",e[e.Error=3]="Error"}(FormStatus=FormStatus||{}),!function(e){e.Pending="pending",e.EmptyFieldError="This field should not be empty",e.SpecialCharError="This field cannot contain special characters"}(FormValidations=FormValidations||{}),!function(e){e.Number="Number",e.Picklist="Picklist",e.MultiPicklist="MultiPicklist",e.Text="Text",e.SchemaSelection="SchemaSelection"}(AppFieldType=AppFieldType||{}),!function(e){e.FullyNetworkIsolated="FullyNetworkIsolated",e.MostlyNetworkIsolated="MostlyNetworkIsolated",e.NonNetworkIsolated="NonNetworkIsolated",e.HumanReview="HumanReview"}(DeploymentModel=DeploymentModel||{}),!function(e){e.Number="Integer64",e.Picklist="JSON",e.MultiPicklist="JSON",e.Text="String",e.SchemaSelection="JSON",e.Boolean="Boolean",e.Date="Date",e.Float="Float"}(AppConfigType=AppConfigType||{}),!function(e){e.Org="Organization",e.User="User"}(AppConfigLevel=AppConfigLevel||{}),!function(e){e.Idle="idle",e.Uploading="uploading",e.Uploaded="uploaded",e.Failed="failed",e.Aborted="aborted"}(IconImportStatus=IconImportStatus||{}),"uiState"),initialState$5={status:LoadingStatus.Idle},slice$5=createSlice({name:SLICE_NAME+"/"+namespace$6,initialState:initialState$5,reducers:{}}),actions$6=slice$5.actions;var uiState=slice$5.reducer;const namespace$5="appFormState",initialState$4={app:{configFields:[],name:"",description:"",iconPath:"",url:"",headerbarEnabled:!0,npmModules:[],flows:[],schemas:[],engines:[],entityTags:[]},step:[],isLoadingExistingAppData:!1,isEditForm:!1,formValidations:FormValidations.Pending,formStatus:FormStatus.Pending,uiInfo:UiInfo.PanelClosed,currentComponents:{engines:[],dataRegistries:[]}},slice$4=createSlice({name:SLICE_NAME+"/"+namespace$5,initialState:initialState$4,reducers:{createNewApp(e){e.formStatus=FormStatus.Submitting},editApp(e,t){e.formStatus=FormStatus.Submitting},createAppStart(e,t){e.formStatus=FormStatus.Submitting},updateAppStart(e,t){e.formStatus=FormStatus.Submitting},createAppSuccess(e,{payload:t}){e.formStatus=FormStatus.Success,lodash.exports.set(e.app,"id",t)},createAppFailed(e,t){e.formStatus=FormStatus.Error},stepper(e,t){e.step=t.payload},updateAppFormField(e,t){var{field:t,value:s}=t.payload;lodash.exports.set(e.app,t,s)},addConfigField(e,t){e.app.configFields=lodash.exports.concat(e.app.configFields,t.payload)},updateConfigField(e,t){var{configFields:t,index:s}=t.payload;lodash.exports.set(e,`app.configFields[${s}]`,t)},removeConfigField(e,t){e.app.configFields.splice(t.payload,1)},clearConfigFields(e){e.app.configFields=[]},addNpmModule(e,t){e.app.npmModules=lodash.exports.concat(e.app.npmModules,t.payload)},updateNpmModule(e,t){var{npmModules:t,index:s}=t.payload;lodash.exports.set(e,`app.npmModules[${s}]`,t)},removeNpmModule(e,t){e.app.npmModules.splice(t.payload,1)}}}),actions$5=slice$4.actions;var appFormState=slice$4.reducer;const namespace$4="flowLinkingPanelState",initialState$3={searchTerm:"",isLoadingSearchResults:!1,sortOrder:"asc",searchResults:[]},slice$3=createSlice({name:SLICE_NAME+"/"+namespace$4,initialState:initialState$3,reducers:{searchByTerm(e,t){set_1(e,"searchTerm",t.payload)},fetchingStart(e){set_1(e,"isLoadingSearchResults",!0)},fetchingDone(e){set_1(e,"isLoadingSearchResults",!1)},toggleSortOrder(e,t){set_1(e,"sortOrder",lodash.exports.isNil(t.payload)?"asc"===e.sortOrder?"desc":"asc":t.payload)},updateFlowLinkingPanelField(e,t){var{field:t,value:s}=t.payload;set_1(e,t,s)}}}),actions$4=slice$3.actions;var flowLinkingPanelState=slice$3.reducer;const namespace$3="schemaLinkingPanelState",initialState$2={searchTerm:"",isLoadingSearchResults:!1,sortOrder:"asc",searchResults:[]},slice$2=createSlice({name:SLICE_NAME+"/"+namespace$3,initialState:initialState$2,reducers:{searchByTerm(e,t){set_1(e,"searchTerm",t.payload)},fetchingStart(e){set_1(e,"isLoadingSearchResults",!0)},fetchingDone(e){set_1(e,"isLoadingSearchResults",!1)},toggleSortOrder(e,t){set_1(e,"sortOrder",lodash.exports.isNil(t.payload)?"asc"===e.sortOrder?"desc":"asc":t.payload)},updateSchemaLinkingPanelField(e,t){var{field:t,value:s}=t.payload;set_1(e,t,s)}}}),actions$3=slice$2.actions;var schemaLinkingPanelState=slice$2.reducer;const namespace$2="engineLinkingPanelState",initialState$1={searchTerm:"",isLoadingSearchResults:!1,sortOrder:"asc",searchResults:[]},slice$1=createSlice({name:SLICE_NAME+"/"+namespace$2,initialState:initialState$1,reducers:{searchByTerm(e,t){set_1(e,"searchTerm",t.payload)},fetchingStart(e){set_1(e,"isLoadingSearchResults",!0)},fetchingDone(e){set_1(e,"isLoadingSearchResults",!1)},toggleSortOrder(e,t){set_1(e,"sortOrder",lodash.exports.isNil(t.payload)?"asc"===e.sortOrder?"desc":"asc":t.payload)},updateEngineLinkingPanelField(e,t){var{field:t,value:s}=t.payload;set_1(e,t,s)}}}),actions$2=slice$1.actions;var engineLinkingPanelState=slice$1.reducer;const namespace$1="iconUploadState",initialState={file:null,status:IconImportStatus.Idle},slice=createSlice({name:SLICE_NAME+"/"+namespace$1,initialState:initialState,reducers:{uploadIconStart(e,{payload:t}){e.file=t.file,e.status=IconImportStatus.Uploading},updateIcon(e,{payload:t}){e.file=Object.assign(Object.assign({},e.file),t)},uploadIconSuccess(e){e.status=IconImportStatus.Uploaded},uploadIconFailed(e,{payload:t}){e.file=null,e.error=t,e.status=IconImportStatus.Failed},deleteLocalIcon(e){e.file=null}}}),actions$1=slice.actions;var iconUploadState=slice.reducer;const namespace=SLICE_NAME,actions={[namespace$6]:actions$6,[namespace$5]:actions$5,[namespace$4]:actions$4,[namespace$3]:actions$3,[namespace$2]:actions$2,[namespace$1]:actions$1},rootReducer=combineReducers({[namespace$6]:uiState,[namespace$5]:appFormState,[namespace$2]:engineLinkingPanelState,[namespace$4]:flowLinkingPanelState,[namespace$3]:schemaLinkingPanelState,[namespace$1]:iconUploadState}),selectApp=e=>e[namespace].appFormState.app,selectIsEditForm=e=>lodash.exports.pick(e[namespace].appFormState,"isEditForm"),selectIsLoadingExistingAppData=e=>lodash.exports.pick(e[namespace].appFormState,"isLoadingExistingAppData"),selectConfigFields=e=>e[namespace].appFormState.app.configFields,selectAppUrl=e=>e[namespace].appFormState.app.url,selectNpmModules=e=>e[namespace].appFormState.app.npmModules,selectFlowLinkingPanel=e=>e[namespace].flowLinkingPanelState,selectSchemaLinkingPanel=e=>e[namespace].schemaLinkingPanelState,selectEngineLinkingPanel=e=>e[namespace].engineLinkingPanelState,selectIcon=e=>e[namespace].iconUploadState.file,selectApiConfigs=createSelector([rootApiSelector,graphEndpointSelector,sessionTokenSelector],(e,t,s)=>({apiRoot:e,graphQLEndpoint:t,token:s}));function __awaiter(e,r,o,p){return new(o=o||Promise)(function(s,t){function a(e){try{i(p.next(e))}catch(e){t(e)}}function n(e){try{i(p.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?s(e.value):((t=e.value)instanceof o?t:new o(function(e){e(t)})).then(a,n)}i((p=p.apply(e,r||[])).next())})}const getEnginesByName=(s,a={name:""})=>__awaiter(void 0,void 0,void 0,function*(){var e={name:a.name},t="getEngines";return yield baseGraphQLApiWithError(Object.assign({query:"\n query getEngines($name:String){\n engines(\n name: $name,\n orderBy: {\n field: name,\n direction: asc\n }\n ) {\n records {\n id,\n name,\n modifiedDateTime,\n edgeVersion,\n iconPath\n description\n }\n }\n }\n ",variables:e,operationName:t},s))}),getFlowsByName=(s,a={name:""})=>__awaiter(void 0,void 0,void 0,function*(){var e={name:a.name},t="getFlows";return yield baseGraphQLApiWithError(Object.assign({query:'\n query getFlows($name:String){\n engines(\n name: $name,\n categoryId: "c5458876-43d2-41e8-a340-f734702df04a",\n orderBy: {\n field: name,\n direction: asc\n }\n ) {\n records {\n id,\n name,\n modifiedDateTime,\n edgeVersion\n }\n }\n }\n ',variables:e,operationName:t},s))}),createApplication=(t,s)=>__awaiter(void 0,void 0,void 0,function*(){var e="createApplication";return(yield baseGraphQLApiWithError(Object.assign({query:"\n mutation createApplication ($input: CreateApplication!) {\n createApplication (input: $input) {\n id\n }\n }\n ",variables:{input:s},operationName:e},t)))[e]}),updateAppComponents=(r,o)=>__awaiter(void 0,void 0,void 0,function*(){const{engines:t,dataRegistries:s,id:a}=o,n="updateApplicationComponent";let i="";lodash.exports.forEach(lodash.exports.keys(t),e=>{lodash.exports.isEmpty(t[e])||(i+=`
|
|
2
|
+
${e}Engines: ${n} (input: {
|
|
3
|
+
id: "${a}"
|
|
4
|
+
componentIds: [${lodash.exports.join(lodash.exports.map(t[e],e=>`"${e}"`),",")}]
|
|
5
|
+
type: engines
|
|
6
|
+
action: ${e}
|
|
7
|
+
}) {
|
|
8
|
+
engines {
|
|
9
|
+
records {
|
|
10
|
+
id
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
`)}),lodash.exports.forEach(lodash.exports.keys(s),e=>{lodash.exports.isEmpty(s[e])||(i+=`
|
|
15
|
+
${e}DataRegistries: ${n} (input: {
|
|
16
|
+
id: "${a}"
|
|
17
|
+
componentIds: [${lodash.exports.join(lodash.exports.map(s[e],e=>`"${e}"`),",")}]
|
|
18
|
+
type: dataRegistries
|
|
19
|
+
action: ${e}
|
|
20
|
+
}) {
|
|
21
|
+
dataRegistries {
|
|
22
|
+
records {
|
|
23
|
+
id
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
`)});var e=`mutation ${n} {
|
|
28
|
+
${i}
|
|
29
|
+
}`;return(yield baseGraphQLApiWithError(Object.assign({query:e,operationName:n},r)))[n]}),createAppConfig=(s,a,n)=>__awaiter(void 0,void 0,void 0,function*(){var e="applicationConfigDefinitionCreate",t=lodash.exports.map(n,e=>{const t={appId:a,configKey:e.name,configType:AppConfigType[e.type],configLevel:AppConfigLevel[e.configLevel],required:e.required,description:e.description,secured:!1};return lodash.exports.isNil(e.defaultValue)||(t.defaultValue=e.defaultValue),lodash.exports.isNil(e.options)||(t.defaultValueJSON={options:e.options},lodash.exports.isNil(e.defaultValues)||(t.defaultValueJSON.defaultSelected=e.defaultValues)),t});return(yield baseGraphQLApiWithError(Object.assign({query:"mutation applicationConfigDefinitionCreate ($input: [ApplicationConfigDefinitionCreate]) {\n applicationConfigDefinitionCreate (input: $input) {\n records {\n configKey\n }\n }\n }",variables:{input:t},operationName:e},s)))[e]}),getSchemasByName=(s,a={name:""})=>__awaiter(void 0,void 0,void 0,function*(){var e={name:a.name},t="getSchemasByDataRegistryName";return yield baseGraphQLApiWithError(Object.assign({query:"\n query getSchemasByDataRegistryName($name:String){\n dataRegistries(\n name: $name\n ){\n records {\n id\n name\n modifiedDateTime\n schemas {\n records {\n id\n dataRegistryId\n modifiedDateTime\n majorVersion\n minorVersion\n }\n }\n }\n }\n }\n ",variables:e,operationName:t},s))});function*searchFlows(e){yield delay(200),yield put(actions.flowLinkingPanelState.fetchingStart());var t=yield select(selectApiConfigs);try{var s=yield call(getFlowsByName,t,{name:e.payload});yield put(actions.flowLinkingPanelState.updateFlowLinkingPanelField({field:"searchResults",value:s.engines.records})),yield put(actions.flowLinkingPanelState.fetchingDone())}catch(e){console.log(e.message),yield put(showMessage({content:e.message,severity:MessageSeverity.Error})),yield put(actions.flowLinkingPanelState.fetchingDone())}}function*watchSearchFlows(){yield takeLatest$1(actions.flowLinkingPanelState.searchByTerm.type,searchFlows)}const flowsSagas=[fork(watchSearchFlows)];function*searchSchemas(e){yield delay(200),yield put(actions.schemaLinkingPanelState.fetchingStart());var t=yield select(selectApiConfigs);try{var s=yield call(getSchemasByName,t,{name:e.payload});yield put(actions.schemaLinkingPanelState.updateSchemaLinkingPanelField({field:"searchResults",value:lodash.exports.map(s.dataRegistries.records,e=>{var t=lodash.exports.reduce(e.schemas.records,(e,t)=>t.majorVersion>e.majorVersion||t.majorVersion==e.majorVersion&&t.minorVersion>e.minorVersion?t:e);return{id:t.id,dataRegistryId:t.dataRegistryId,name:e.name,modifiedDateTime:t.modifiedDateTime,version:`v${t.majorVersion}.`+t.minorVersion}})})),yield put(actions.schemaLinkingPanelState.fetchingDone())}catch(e){console.log(e.message),yield put(showMessage({content:e.message,severity:MessageSeverity.Error})),yield put(actions.schemaLinkingPanelState.fetchingDone())}}function*watchSearchSchemas(){yield takeLatest$1(actions.schemaLinkingPanelState.searchByTerm.type,searchSchemas)}const schemasSagas=[fork(watchSearchSchemas)];function*searchEngines(e){yield delay(200),yield put(actions.engineLinkingPanelState.fetchingStart());var t=yield select(selectApiConfigs);try{var s=yield call(getEnginesByName,t,{name:e.payload});yield put(actions.engineLinkingPanelState.updateEngineLinkingPanelField({field:"searchResults",value:s.engines.records})),yield put(actions.engineLinkingPanelState.fetchingDone())}catch(e){console.log(e.message),yield put(showMessage({content:e.message,severity:MessageSeverity.Error})),yield put(actions.engineLinkingPanelState.fetchingDone())}}function*watchSearchEngines(){yield takeLatest$1(actions.engineLinkingPanelState.searchByTerm.type,searchEngines)}const enginesSagas=[fork(watchSearchEngines)],supportedAppFields=["id","name","isPublic","key","category","description","iconUrl","iconSvg","url","oauth2RedirectUrls","checkPermissions","deploymentModel","contextMenuExtensions","eventEndpoint","entityTags","headerbarEnabled"],formatApp=t=>{const s={checkPermissions:t.checkPermissions||!1,name:t.name,key:lodash.exports.snakeCase(t.name)};return supportedAppFields.forEach(e=>{lodash.exports.isNil(t[e])||(s[e]=t[e])}),lodash.exports.isNil(t.iconPath)||(s.iconUrl=t.iconPath),s};function*createNewApplication(e){var t=yield select(preferredLanguageSelector);const s=AIWareFormatMessage(t||"en");t=e.payload.app;if(lodash.exports.isNil(t))throw new Error("Empty app not allowed!");e=yield select(selectApiConfigs);try{var a=formatApp(t),n=yield call(createApplication,e,a),{flows:i,engines:r,schemas:o}=t;if(!(lodash.exports.isEmpty(i)||lodash.exports.isEmpty(r)||lodash.exports.isEmpty(o))){const p={id:n.id};lodash.exports.isEmpty(i)||lodash.exports.isEmpty(r)||(p.engines={add:[...lodash.exports.map(i,e=>e.id),...lodash.exports.map(r,e=>e.id)],remove:[]}),lodash.exports.isEmpty(o)||(p.dataRegistries={add:lodash.exports.map(o,e=>e.dataRegistryId),remove:[]}),yield call(updateAppComponents,e,p)}lodash.exports.isEmpty(t.configFields)||(yield call(createAppConfig,e,n.id,t.configFields)),yield put(actions.appFormState.createAppSuccess(n.id)),yield put(showMessage({content:s({id:"os-app-center-new.snackbar.appCreateSuccess",defaultMessage:[{type:0,value:"Application successfully created"}]}),severity:MessageSeverity.Success})),yield put(unmountPanel("APP_CENTER_NEW"))}catch(e){yield put(actions.appFormState.createAppFailed(e.message)),yield put(showMessage({content:s({id:"os-app-center-new.snackbar.appOnboardingFailed",defaultMessage:[{type:0,value:"Application onboarding failed"}]}),severity:MessageSeverity.Error}))}}function*watchNewApplicationCreateStart(){yield takeLatest$1(actions.appFormState.createAppStart.type,createNewApplication)}const newApplicationSagas=[fork(watchNewApplicationCreateStart)],root="undefined"!=typeof window?window:global,fileUploadChannel=(root.xhrInstances={},channel());function*uploadIcon(e){const t=e.payload.file;e=yield select(preferredLanguageSelector);const s=AIWareFormatMessage(e);try{var a=yield call(getUrlBucket,t.name);const i=Object.assign(Object.assign({},t),{status:IconImportStatus.Uploading,percentComplete:0,expiresInSeconds:a.expiresInSeconds,getUrl:a.getUrl,key:a.key,unsignedUrl:a.unsignedUrl,url:a.url}),r=(yield put(actions.iconUploadState.updateIcon(i)),e=>{fileUploadChannel.put(actions.iconUploadState.updateIcon(Object.assign({id:t.id},e)))});var n=yield uploadFileToS3(a,t,{onProgress:e=>{r({percentComplete:e}),sdkEventManager.dispatch(SdkEvents.fileUploadProgress,null,e)},onAbort:e=>{r({status:IconImportStatus.Aborted}),sdkEventManager.dispatch(SdkEvents.fileUpload,new SdkError(e,"abort"),i)},onError:e=>{r({status:IconImportStatus.Failed}),sdkEventManager.dispatch(SdkEvents.fileUpload,new SdkError(e),i)},onUpload:e=>{r({status:IconImportStatus.Uploaded}),sdkEventManager.dispatch(SdkEvents.fileUpload,null,i)}});root.xhrInstances[t.id]=n,yield put(actions.iconUploadState.uploadIconSuccess()),yield put(actions.appFormState.updateAppFormField({field:"iconPath",value:i.getUrl}))}catch(e){yield put(actions.iconUploadState.uploadIconFailed(e.message)),yield put(showMessage({content:s({id:"os-engine-center-new.snackbar.iconUploadFail",defaultMessage:[{type:0,value:"Icon upload failed, please try again."}]}),severity:MessageSeverity.Error}))}}function*getUrlBucket(e){var t=yield select(selectApiConfigs);return yield call(getSignedWritableUrl,t,e)}function*watchUploadIconStart(){yield takeLatest$1(actions.iconUploadState.uploadIconStart.type,uploadIcon)}function*watchProgressChannel(){var e=yield take(fileUploadChannel);yield put(e)}function*rootSaga(){yield all([watchUploadIconStart(),watchProgressChannel(),...flowsSagas,...enginesSagas,...newApplicationSagas,...schemasSagas])}function getAppCenterNewModule(){return{id:SLICE_NAME,reducerMap:{[SLICE_NAME]:rootReducer},sagas:[rootSaga],initialActions:[]}}const formattedMessageIdPrefix$3="toggle-switch.",Toggle=e=>{var t=makeStyles()(e=>({switch:{padding:2,height:34,width:123,"& .Sdk-MuiSwitch-switchBase":{padding:3,borderRadius:16,transform:"translateX(57px)"},"& .Sdk-MuiSwitch-track":{borderRadius:13,height:30,width:119,backgroundColor:"#EEEEEF",opacity:1},"& .Sdk-MuiSwitch-switchBase.Mui-checked + .MuiSwitch-track":{backgroundColor:"#EEEEEF",opacity:1},"& .Sdk-MuiSwitch-thumb":{backgroundColor:"white",boxShadow:"none",width:57,height:26,borderRadius:13,margin:1},"& .Sdk-MuiSwitch-switchBase.Mui-checked":{transform:"translateX(0px)","& .Sdk-MuiSwitch-thumb":{backgroundColor:"white"}}},switchLabel:{zIndex:10,color:"#5C6269",pointerEvents:"none","&.Mui-focused":{color:"#2A323C"},"& *":{cursor:"pointer"}}}))()["classes"],{checked:s,onChange:a}=e;return jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"row",spacing:-8.5,marginX:4.25,alignItems:"center"},{children:[jsxRuntime.exports.jsx(FormLabel,Object.assign({color:"secondary",className:t.switchLabel,htmlFor:"toggle-aiware-headerbar"},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h6",sx:{color:s?null:"#5C6269"}},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:formattedMessageIdPrefix$3+"on",defaultMessage:"On",description:"On lable for aiware headerbar toggle switch"})}))})),jsxRuntime.exports.jsx(Switch,Object.assign({color:"secondary",id:"toggle-aiware-headerbar",className:classnames(t.switch,e.className),onChange:a},lodash.exports.omit(e,"className"))),jsxRuntime.exports.jsx(FormLabel,Object.assign({color:"secondary",className:t.switchLabel,htmlFor:"toggle-aiware-headerbar"},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h6",sx:{color:s?"#5C6269":null}},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:formattedMessageIdPrefix$3+"off",defaultMessage:"Off",description:"Off lable for aiware headerbar toggle switch"})}))}))]}))},formattedMessageIdPrefix$2="os-app-center-new.headerbar-step.headerbar-toggle.";var _path$2,_g$2,_path2$2,_path3$2,_tspan$2,_tspan2$2,_tspan3$2,_tspan4$2,_tspan5$2,_tspan6$2,_tspan7$2,_tspan8$2,_tspan9$2,_tspan10$2,_tspan11$2,_tspan12$2,_tspan13$2,_tspan14$2,_tspan15$2,_tspan16$2,_defs$2,AiWareHeaderbarToggle=({checked:e=!0,onChange:t})=>jsxRuntime.exports.jsxs(Box$1,Object.assign({width:"100%","data-test":formattedMessageIdPrefix$2+"container"},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h4"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:formattedMessageIdPrefix$2+"title",defaultMessage:"aiWARE Headerbar",description:"Title of the aiware headerbar toggle section"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:formattedMessageIdPrefix$2+"instructions",defaultMessage:"This allows the aiWARE header to wrap around your app, keeping it self contained.",description:"Instructions of the aiware headerbar toggle section"})})),jsxRuntime.exports.jsx(FormGroup,{children:jsxRuntime.exports.jsx(FormControl,{children:jsxRuntime.exports.jsx(Toggle,{checked:e,onChange:t,"data-test":formattedMessageIdPrefix$2+"toggle"})})})]}));function _extends$2(){return(_extends$2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s,a=arguments[t];for(s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e}).apply(this,arguments)}var SvgEditorDummy$1=function(e){return react.exports.createElement("svg",_extends$2({width:660,height:233,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),_path$2=_path$2||react.exports.createElement("path",{fill:"#E5E5E5",d:"M0 0h660v233H0z"}),_g$2=_g$2||react.exports.createElement("g",{filter:"url(#editorDummy_svg__a)"},react.exports.createElement("path",{fill:"#fff",d:"M-30-356h720V682H-30z"})),_path2$2=_path2$2||react.exports.createElement("path",{opacity:.4,d:"M0 4a4 4 0 0 1 4-4h652a4 4 0 0 1 4 4v225a4 4 0 0 1-4 4H4a4 4 0 0 1-4-4V4Z",fill:"#303841"}),_path3$2=_path3$2||react.exports.createElement("path",{opacity:.4,d:"M0 4a4 4 0 0 1 4-4h27v233H4a4 4 0 0 1-4-4V4Z",fill:"#242C35"}),react.exports.createElement("text",{opacity:.4,fill:"#fff",xmlSpace:"preserve",style:{whiteSpace:"pre"},fontFamily:"Nunito",fontSize:10,fontWeight:600,letterSpacing:0},_tspan$2=_tspan$2||react.exports.createElement("tspan",{x:13.004,y:33.29},"1"),_tspan2$2=_tspan2$2||react.exports.createElement("tspan",{x:13.004,y:59.29},"2"),_tspan3$2=_tspan3$2||react.exports.createElement("tspan",{x:13.004,y:85.29},"3"),_tspan4$2=_tspan4$2||react.exports.createElement("tspan",{x:13.004,y:111.29},"4"),_tspan5$2=_tspan5$2||react.exports.createElement("tspan",{x:13.004,y:137.29},"5"),_tspan6$2=_tspan6$2||react.exports.createElement("tspan",{x:13.004,y:163.29},"6"),_tspan7$2=_tspan7$2||react.exports.createElement("tspan",{x:13.004,y:189.29},"7"),_tspan8$2=_tspan8$2||react.exports.createElement("tspan",{x:13.004,y:215.29},"8")),react.exports.createElement("text",{opacity:.4,fill:"#fff",xmlSpace:"preserve",style:{whiteSpace:"pre"},fontFamily:"Nunito",fontSize:14,letterSpacing:0},_tspan9$2=_tspan9$2||react.exports.createElement("tspan",{x:46,y:33.606},"window.aiware.init("),_tspan10$2=_tspan10$2||react.exports.createElement("tspan",{x:46,y:59.606}," {"),_tspan11$2=_tspan11$2||react.exports.createElement("tspan",{x:46,y:85.606}," baseUrl: '<your-base-url>',"),_tspan12$2=_tspan12$2||react.exports.createElement("tspan",{x:46,y:111.606}," applicationId: '<your-application-id>'"),_tspan13$2=_tspan13$2||react.exports.createElement("tspan",{x:46,y:137.606}," knowledgeBaseUrl: '<your-knowledgebase-url>'"),_tspan14$2=_tspan14$2||react.exports.createElement("tspan",{x:46,y:163.606}," },"),_tspan15$2=_tspan15$2||react.exports.createElement("tspan",{x:46,y:189.606}," () => {"),_tspan16$2=_tspan16$2||react.exports.createElement("tspan",{x:46,y:215.606}," // code run by callback function")),_defs$2=_defs$2||react.exports.createElement("defs",null,react.exports.createElement("filter",{id:"editorDummy_svg__a",x:-44,y:-370,width:748,height:1066,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},react.exports.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),react.exports.createElement("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),react.exports.createElement("feOffset",null),react.exports.createElement("feGaussianBlur",{stdDeviation:7}),react.exports.createElement("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"}),react.exports.createElement("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_2227_22407"}),react.exports.createElement("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_2227_22407",result:"shape"}))))};const useStyles$a=makeStyles()(e=>({editorImg:{maxWidth:"100%",height:"auto"}})),formattedMessageIdPrefix$1="os-app-center-new.headerbar-step.customize-headerbar.";var _path$1,_g$1,_path2$1,_path3$1,_tspan$1,_tspan2$1,_tspan3$1,_tspan4$1,_tspan5$1,_tspan6$1,_tspan7$1,_tspan8$1,_tspan9$1,_tspan10$1,_tspan11$1,_tspan12$1,_tspan13$1,_tspan14$1,_tspan15$1,_tspan16$1,_tspan17$1,_tspan18$1,_tspan19,_tspan20,_tspan21,_tspan22,_tspan23,_tspan24,_tspan25,_tspan26,_defs$1,CustomizeAIWareHeaderbar=()=>(useStyles$a(),jsxRuntime.exports.jsxs(Stack,Object.assign({spacing:3,"data-test":formattedMessageIdPrefix$1+"container"},{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({sx:{opacity:.5}},{children:[jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"row",alignItems:"center",spacing:1},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h4"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:formattedMessageIdPrefix$1+"title",defaultMessage:"Customize the aiWARE Header",description:"Title of the Customize aiware headerbar section"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:formattedMessageIdPrefix$1+"optional",defaultMessage:"(Optional)",description:"Optional modifier for titles"})})),jsxRuntime.exports.jsx(Chip$1,{color:"primary",label:"Coming Soon"})]})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:formattedMessageIdPrefix$1+"instructions",defaultMessage:"Your JSON will be injected into the header to customize the user interface and functionality. View customizable options",description:"Instructions of the Customize aiware headerbar section"})}))]})),jsxRuntime.exports.jsx(Box$1,{children:jsxRuntime.exports.jsx(SvgEditorDummy$1,{})})]})));function _extends$1(){return(_extends$1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s,a=arguments[t];for(s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e}).apply(this,arguments)}var SvgEditorDummy=function(e){return react.exports.createElement("svg",_extends$1({width:660,height:233,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),_path$1=_path$1||react.exports.createElement("path",{fill:"#E5E5E5",d:"M0 0h660v233H0z"}),_g$1=_g$1||react.exports.createElement("g",{filter:"url(#editorDummy_svg__a)"},react.exports.createElement("path",{fill:"#fff",d:"M-30-690h720V348H-30z"})),_path2$1=_path2$1||react.exports.createElement("path",{opacity:.4,d:"M0 4a4 4 0 0 1 4-4h652a4 4 0 0 1 4 4v225a4 4 0 0 1-4 4H4a4 4 0 0 1-4-4V4Z",fill:"#303841"}),_path3$1=_path3$1||react.exports.createElement("path",{opacity:.4,d:"M0 4a4 4 0 0 1 4-4h27v233H4a4 4 0 0 1-4-4V4Z",fill:"#242C35"}),react.exports.createElement("text",{opacity:.4,fill:"#fff",xmlSpace:"preserve",style:{whiteSpace:"pre"},fontFamily:"Nunito Sans",fontSize:10,fontWeight:600,letterSpacing:0},_tspan$1=_tspan$1||react.exports.createElement("tspan",{x:13.004,y:33.29},"1"),_tspan2$1=_tspan2$1||react.exports.createElement("tspan",{x:13.004,y:59.29},"2"),_tspan3$1=_tspan3$1||react.exports.createElement("tspan",{x:13.004,y:85.29},"3"),_tspan4$1=_tspan4$1||react.exports.createElement("tspan",{x:13.004,y:111.29},"4"),_tspan5$1=_tspan5$1||react.exports.createElement("tspan",{x:13.004,y:137.29},"5"),_tspan6$1=_tspan6$1||react.exports.createElement("tspan",{x:13.004,y:163.29},"6"),_tspan7$1=_tspan7$1||react.exports.createElement("tspan",{x:13.004,y:189.29},"7"),_tspan8$1=_tspan8$1||react.exports.createElement("tspan",{x:13.004,y:215.29},"8")),react.exports.createElement("g",{opacity:.4,fontFamily:"Nunito Sans",fontSize:14,letterSpacing:0},react.exports.createElement("text",{fill:"#fff",xmlSpace:"preserve",style:{whiteSpace:"pre"}},_tspan9$1=_tspan9$1||react.exports.createElement("tspan",{x:62.352,y:58.606}," {"),_tspan10$1=_tspan10$1||react.exports.createElement("tspan",{x:46,y:84.606}),_tspan11$1=_tspan11$1||react.exports.createElement("tspan",{x:84.186,y:84.606},": blue;"),_tspan12$1=_tspan12$1||react.exports.createElement("tspan",{x:46,y:110.606}),_tspan13$1=_tspan13$1||react.exports.createElement("tspan",{x:164.098,y:110.606},": yellow;"),_tspan14$1=_tspan14$1||react.exports.createElement("tspan",{x:46,y:136.606}),_tspan15$1=_tspan15$1||react.exports.createElement("tspan",{x:94.699,y:136.606},": 1px solid black;"),_tspan16$1=_tspan16$1||react.exports.createElement("tspan",{x:46,y:162.606},"}"),_tspan17$1=_tspan17$1||react.exports.createElement("tspan",{x:54.162,y:188.606}," {"),_tspan18$1=_tspan18$1||react.exports.createElement("tspan",{x:46,y:214.606}),_tspan19=_tspan19||react.exports.createElement("tspan",{x:84.186,y:214.606},": red;")),react.exports.createElement("text",{fill:"#B39DDB",xmlSpace:"preserve",style:{whiteSpace:"pre"}},_tspan20=_tspan20||react.exports.createElement("tspan",{x:46,y:58.606},"h1"),_tspan21=_tspan21||react.exports.createElement("tspan",{x:46,y:188.606},"p")),react.exports.createElement("text",{fill:"#EF9A9A",xmlSpace:"preserve",style:{whiteSpace:"pre"}},_tspan22=_tspan22||react.exports.createElement("tspan",{x:53.191,y:84.606},"color"),_tspan23=_tspan23||react.exports.createElement("tspan",{x:53.191,y:110.606},"background-color"),_tspan24=_tspan24||react.exports.createElement("tspan",{x:53.191,y:136.606},"border"),_tspan25=_tspan25||react.exports.createElement("tspan",{x:53.191,y:214.606},"color")),react.exports.createElement("text",{fill:"#5C6269",xmlSpace:"preserve",style:{whiteSpace:"pre"}},_tspan26=_tspan26||react.exports.createElement("tspan",{x:46,y:32.606},"\x3c!-- Default CSS --\x3e"))),_defs$1=_defs$1||react.exports.createElement("defs",null,react.exports.createElement("filter",{id:"editorDummy_svg__a",x:-44,y:-704,width:748,height:1066,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},react.exports.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),react.exports.createElement("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),react.exports.createElement("feOffset",null),react.exports.createElement("feGaussianBlur",{stdDeviation:7}),react.exports.createElement("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"}),react.exports.createElement("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_2227_22407"}),react.exports.createElement("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_2227_22407",result:"shape"}))))};const formattedMessageIdPrefix="os-app-center-new.headerbar-step.customize-headerbar-styles.";var CustomizeAIWareHeaderbarStyles=()=>jsxRuntime.exports.jsxs(Stack,Object.assign({spacing:3,"data-test":formattedMessageIdPrefix+"container"},{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({sx:{opacity:.5}},{children:[jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"row",alignItems:"center",spacing:1},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h4"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:formattedMessageIdPrefix+"title",defaultMessage:"Customize the aiWARE Header Styles (CSS)",description:"Title of the Customize aiware headerbar styles section"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:formattedMessageIdPrefix+"optional",defaultMessage:"(Optional)",description:"Optional modifier for titles"})})),jsxRuntime.exports.jsx(Chip$1,{color:"primary",label:"Coming Soon"})]})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:formattedMessageIdPrefix+"instructions",defaultMessage:"Your JSON will be injected into the header to customize the user interface and functionality. View customizable options",description:"Instructions of the Customize aiware headerbar styles section"})}))]})),jsxRuntime.exports.jsxs(Stack,Object.assign({spacing:1,alignItems:"flex-start"},{children:[jsxRuntime.exports.jsx(SvgEditorDummy,{}),jsxRuntime.exports.jsx(Button$1,Object.assign({variant:"text",sx:{opacity:.5}},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:formattedMessageIdPrefix+"restore-default-css-button-label",defaultMessage:"Restore Default CSS",description:"Button label for the restore default css button on the headerbar styles page of app onboarding"})}))]}))]}));const useStyles$9=makeStyles()(e=>({container:{padding:e.spacing(6),maxWidth:"100%"},divider:{width:"60rem",margin:e.spacing(5,5,1,6)},list:{width:"60rem",padding:e.spacing(6,0),marginLeft:e.spacing(6)}}));var _path,_g,_tspan,_path2,_tspan2,_tspan3,_tspan4,_tspan5,_path3,_tspan6,_path4,_path5,_path6,_rect,_path7,_tspan7,_rect2,_tspan8,_path8,_tspan9,_tspan10,_tspan11,_tspan12,_path9,_tspan13,_path10,_tspan14,_path11,_tspan15,_path12,_path13,_path14,_rect3,_path15,_tspan16,_rect4,_rect5,_tspan17,_rect6,_rect7,_tspan18,_rect8,_defs,HeaderbarStep=()=>{const t=useDispatch();var e=useSelector(selectApp),s=useStyles$9()["classes"];return jsxRuntime.exports.jsxs(Grid$1,Object.assign({container:!0,flexDirection:"column",rowSpacing:5,columnSpacing:6,className:s.container,"data-test":"app-new-headerbar-step-container"},{children:[jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,flexShrink:0},{children:jsxRuntime.exports.jsx(AiWareHeaderbarToggle,{checked:e.headerbarEnabled,onChange:e=>{t(actions.appFormState.updateAppFormField({field:"headerbarEnabled",value:e.target.checked}))}})})),jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,flexShrink:0},{children:jsxRuntime.exports.jsx(CustomizeAIWareHeaderbar,{})})),jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,flexShrink:0},{children:jsxRuntime.exports.jsx(CustomizeAIWareHeaderbarStyles,{})}))]}))};function _extends(){return(_extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s,a=arguments[t];for(s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e}).apply(this,arguments)}var SvgDummy=function(e){return react.exports.createElement("svg",_extends({width:661,height:350,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),_path=_path||react.exports.createElement("path",{fill:"#E5E5E5",d:"M0 0h661v350H0z"}),_g=_g||react.exports.createElement("g",{filter:"url(#dummy_svg__a)"},react.exports.createElement("path",{fill:"#fff",d:"M-30-162h720v965H-30z"})),react.exports.createElement("g",{opacity:.4},react.exports.createElement("text",{fill:"#2A323C",xmlSpace:"preserve",style:{whiteSpace:"pre"},fontFamily:"Nunito",fontSize:14,fontWeight:600,letterSpacing:0},_tspan=_tspan||react.exports.createElement("tspan",{x:0,y:16.606},"aiWARE Event Handlers")),_path2=_path2||react.exports.createElement("path",{d:"M164.996 12.833c3.195 0 5.837-2.642 5.837-5.83 0-3.194-2.649-5.836-5.837-5.836-3.194 0-5.829 2.642-5.829 5.837 0 3.187 2.642 5.83 5.829 5.83Zm-.095-4.593c-.273 0-.427-.147-.427-.42v-.11c0-.574.302-.898.751-1.2.544-.382.787-.596.787-1.015 0-.471-.375-.803-.971-.803a.995.995 0 0 0-.95.633c-.162.207-.221.368-.523.368a.361.361 0 0 1-.368-.375c0-.096.015-.184.037-.28.147-.574.817-1.074 1.84-1.074 1.009 0 1.863.537 1.863 1.494 0 .692-.391 1.038-.979 1.443-.435.294-.633.507-.633.853v.103c0 .214-.155.383-.427.383Zm.022 1.708a.603.603 0 0 1-.604-.589c0-.331.287-.581.604-.581.316 0 .603.242.603.581a.598.598 0 0 1-.603.589Z",fill:"#555F7C"}),react.exports.createElement("text",{fill:"#5C6269",xmlSpace:"preserve",style:{whiteSpace:"pre"},fontFamily:"Nunito",fontSize:12,letterSpacing:0},_tspan2=_tspan2||react.exports.createElement("tspan",{x:0,y:37.948},"Webhooks (Events) allow external services to be notified when certain events happen in "),_tspan3=_tspan3||react.exports.createElement("tspan",{x:0,y:53.948},"aiWARE. When the specified events happen, we'll send a POST request to each of the URLs and "),_tspan4=_tspan4||react.exports.createElement("tspan",{x:0,y:69.948},"Flows you provide.")),react.exports.createElement("text",{fill:"#5C6269",xmlSpace:"preserve",style:{whiteSpace:"pre"},fontFamily:"Nunito",fontSize:12,letterSpacing:0},_tspan5=_tspan5||react.exports.createElement("tspan",{x:266,y:108.132},"Events")),_path3=_path3||react.exports.createElement("path",{d:"m310 103 3.75 3.75 3.75-3.75H310Z",fill:"#555F7C"}),react.exports.createElement("text",{fill:"#5C6269",xmlSpace:"preserve",style:{whiteSpace:"pre"},fontFamily:"Nunito",fontSize:12,letterSpacing:0},_tspan6=_tspan6||react.exports.createElement("tspan",{x:0,y:107.132},"Handler")),_path4=_path4||react.exports.createElement("path",{d:"m51 102 3.75 3.75L58.5 102H51Z",fill:"#555F7C"}),_path5=_path5||react.exports.createElement("path",{fill:"#FAFAFA",d:"M0 122h660v50H0z"}),_path6=_path6||react.exports.createElement("path",{opacity:.9,stroke:"#D5DFE9",strokeWidth:.5,d:"M0 171.75h660M0 121.75h660"}),_rect=_rect||react.exports.createElement("rect",{x:551.5,y:29.5,width:109,height:27,rx:3.5,fill:"#fff"}),_path7=_path7||react.exports.createElement("path",{d:"M573.25 43.75h-4.5v4.5h-1.5v-4.5h-4.5v-1.5h4.5v-4.5h1.5v4.5h4.5v1.5Z",fill:"#0C53B0"}),react.exports.createElement("text",{fill:"#0C53B0",xmlSpace:"preserve",style:{whiteSpace:"pre"},fontFamily:"Nunito",fontSize:12,fontWeight:600,letterSpacing:0},_tspan7=_tspan7||react.exports.createElement("tspan",{x:580,y:46.948},"Add Handler")),_rect2=_rect2||react.exports.createElement("rect",{x:551.5,y:29.5,width:109,height:27,rx:3.5,stroke:"#0C53B0"}),react.exports.createElement("text",{fill:"#2A323C",xmlSpace:"preserve",style:{whiteSpace:"pre"},fontFamily:"Nunito",fontSize:14,fontWeight:600,letterSpacing:0},_tspan8=_tspan8||react.exports.createElement("tspan",{x:0,y:210.606},"External Handlers (http webhooks)")),_path8=_path8||react.exports.createElement("path",{d:"M231.996 206.833c3.195 0 5.837-2.642 5.837-5.829 0-3.195-2.649-5.837-5.837-5.837-3.194 0-5.829 2.642-5.829 5.837 0 3.187 2.642 5.829 5.829 5.829Zm-.095-4.593c-.273 0-.427-.147-.427-.419v-.111c0-.574.302-.898.751-1.2.544-.382.787-.596.787-1.015 0-.471-.375-.803-.971-.803a.995.995 0 0 0-.95.633c-.162.207-.221.368-.523.368a.36.36 0 0 1-.368-.375c0-.096.015-.184.037-.28.147-.574.817-1.074 1.84-1.074 1.009 0 1.863.537 1.863 1.494 0 .692-.391 1.038-.979 1.443-.435.294-.633.507-.633.853v.103c0 .214-.155.383-.427.383Zm.022 1.708a.604.604 0 0 1-.604-.589c0-.331.287-.581.604-.581.316 0 .603.242.603.581a.598.598 0 0 1-.603.589Z",fill:"#555F7C"}),react.exports.createElement("text",{fill:"#5C6269",xmlSpace:"preserve",style:{whiteSpace:"pre"},fontFamily:"Nunito",fontSize:12,letterSpacing:0},_tspan9=_tspan9||react.exports.createElement("tspan",{x:0,y:231.948},"Webhooks (Events) allow your application to communicate with aiWARE through published "),_tspan10=_tspan10||react.exports.createElement("tspan",{x:0,y:247.948},"http messages to specified URIs. ")),react.exports.createElement("text",{fill:"#5C6269",xmlSpace:"preserve",style:{whiteSpace:"pre"},fontFamily:"Nunito",fontSize:12,letterSpacing:0},_tspan11=_tspan11||react.exports.createElement("tspan",{x:467,y:284.132},"Instructions")),react.exports.createElement("text",{fill:"#5C6269",xmlSpace:"preserve",style:{whiteSpace:"pre"},fontFamily:"Nunito",fontSize:12,letterSpacing:0},_tspan12=_tspan12||react.exports.createElement("tspan",{x:10,y:285.132},"Name")),_path9=_path9||react.exports.createElement("path",{d:"m49 280 3.75 3.75L56.5 280H49Z",fill:"#555F7C"}),react.exports.createElement("text",{fill:"#5C6269",xmlSpace:"preserve",style:{whiteSpace:"pre"},fontFamily:"Nunito",fontSize:12,letterSpacing:0},_tspan13=_tspan13||react.exports.createElement("tspan",{x:135,y:285.132},"Protocol")),_path10=_path10||react.exports.createElement("path",{d:"m187 280 3.75 3.75 3.75-3.75H187Z",fill:"#555F7C"}),react.exports.createElement("text",{fill:"#5C6269",xmlSpace:"preserve",style:{whiteSpace:"pre"},fontFamily:"Nunito",fontSize:12,letterSpacing:0},_tspan14=_tspan14||react.exports.createElement("tspan",{x:264,y:285.132},"Password")),_path11=_path11||react.exports.createElement("path",{d:"m325 280 3.75 3.75 3.75-3.75H325Z",fill:"#555F7C"}),react.exports.createElement("text",{fill:"#5C6269",xmlSpace:"preserve",style:{whiteSpace:"pre"},fontFamily:"Nunito",fontSize:12,letterSpacing:0},_tspan15=_tspan15||react.exports.createElement("tspan",{x:370,y:285.132},"Handler")),_path12=_path12||react.exports.createElement("path",{d:"m421 280 3.75 3.75 3.75-3.75H421Z",fill:"#555F7C"}),_path13=_path13||react.exports.createElement("path",{fill:"#FAFAFA",d:"M0 300h660v50H0z"}),_path14=_path14||react.exports.createElement("path",{opacity:.9,stroke:"#D5DFE9",strokeWidth:.5,d:"M0 345.75h660M0 299.75h660"}),_rect3=_rect3||react.exports.createElement("rect",{x:550.5,y:219.5,width:109,height:27,rx:3.5,fill:"#fff"}),_path15=_path15||react.exports.createElement("path",{d:"M572.25 233.75h-4.5v4.5h-1.5v-4.5h-4.5v-1.5h4.5v-4.5h1.5v4.5h4.5v1.5Z",fill:"#0C53B0"}),react.exports.createElement("text",{fill:"#0C53B0",xmlSpace:"preserve",style:{whiteSpace:"pre"},fontFamily:"Nunito",fontSize:12,fontWeight:600,letterSpacing:0},_tspan16=_tspan16||react.exports.createElement("tspan",{x:579,y:236.948},"Add Handler")),_rect4=_rect4||react.exports.createElement("rect",{x:550.5,y:219.5,width:109,height:27,rx:3.5,stroke:"#0C53B0"})),_rect5=_rect5||react.exports.createElement("rect",{x:183.25,y:4.25,width:80.5,height:15.5,rx:7.75,fill:"#335B89"}),react.exports.createElement("text",{fill:"#fff",xmlSpace:"preserve",style:{whiteSpace:"pre"},fontFamily:"Nunito",fontSize:10,fontWeight:600,letterSpacing:0},_tspan17=_tspan17||react.exports.createElement("tspan",{x:193.109,y:15.29},"Coming Soon")),_rect6=_rect6||react.exports.createElement("rect",{x:183.25,y:4.25,width:80.5,height:15.5,rx:7.75,stroke:"#214167",strokeWidth:.5}),_rect7=_rect7||react.exports.createElement("rect",{x:248.25,y:198.25,width:80.5,height:15.5,rx:7.75,fill:"#335B89"}),react.exports.createElement("text",{fill:"#fff",xmlSpace:"preserve",style:{whiteSpace:"pre"},fontFamily:"Nunito",fontSize:10,fontWeight:600,letterSpacing:0},_tspan18=_tspan18||react.exports.createElement("tspan",{x:258.109,y:209.29},"Coming Soon")),_rect8=_rect8||react.exports.createElement("rect",{x:248.25,y:198.25,width:80.5,height:15.5,rx:7.75,stroke:"#214167",strokeWidth:.5}),_defs=_defs||react.exports.createElement("defs",null,react.exports.createElement("filter",{id:"dummy_svg__a",x:-44,y:-176,width:748,height:993,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},react.exports.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),react.exports.createElement("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),react.exports.createElement("feOffset",null),react.exports.createElement("feGaussianBlur",{stdDeviation:7}),react.exports.createElement("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"}),react.exports.createElement("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_2227_22407"}),react.exports.createElement("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_2227_22407",result:"shape"}))))};const useStyles$8=makeStyles()(e=>({container:{padding:e.spacing(6),maxWidth:"100%"},divider:{width:"60rem",margin:e.spacing(5,5,1,6)},list:{width:"60rem",padding:e.spacing(6,0),marginLeft:e.spacing(6)},chip:{marginLeft:"10px"},inputContainer:{paddingTop:"10px"},root:{"&":{width:"100%"}},grayText:{color:"gray"}})),ConfigFields=()=>{const s=useDispatch(),t=useSelector(selectConfigFields),e=e=>lodash.exports.map(e,e=>({name:e.name,configLevel:e.configLevel,type:e.type,default:e.type!==AppFieldType.MultiPicklist||isEmpty_1(e.defaultValues)?e.defaultValue:lodash.exports.join(e.defaultValues,", ")})),[a,n]=react.exports.useState(e(t));react.exports.useEffect(()=>{n(e(t))},[t]);const i=(e=!1,t=-1)=>{e={name:"APP_CENTER_CONFIG_FIELDS_FORM",config:{name:"Custom Fields",isEdit:e,editIndex:t}};s(mountPanel({panelId:"APP_CENTER_CONFIG_FIELDS_FORM",microFrontend:e,panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:0,zIndex:1010}}))};return jsxRuntime.exports.jsx(ListField,{idPrefix:"aob-functionality-config-fields",heading:"Application Config Fields",description:"Does your application require config fields? If so, specify them here. Leave blank if not..",actionButtonLabel:"Add Config",items:a,columnNames:["Name","Config Level","Type","Default","",""],canEdit:!0,canDelete:!0,onActionClick:()=>i(),onEditClick:e=>{e=a[e],e=findIndex_1(t,{name:e.name,type:e.type});0<=e&&i(!0,e)},onDeleteClick:e=>{e=a[e],e=findIndex_1(t,{name:e.name,type:e.type});0<=e&&s(actions.appFormState.removeConfigField(e))},onRequestSort:(e,t)=>{n(orderBy_1(a,lowerCase_1(e),t))}})},urlRegex=/[(http(s)?):\/\/(www\.)?a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/,FunctionalityStep=({handleOnValidate:e})=>{var t=useStyles$8()["classes"];const s=useDispatch();var a=useSelector(selectAppUrl);const n=useForm({mode:"onChange",defaultValues:{url:a}});react.exports.useEffect(()=>{null!=e&&e(n.formState.isValid)},[n.formState.isValid]);a=e=>{var{name:e,value:t}=e.target;s(actions.appFormState.updateAppFormField({field:e,value:t}))};return jsxRuntime.exports.jsx(FormProvider,Object.assign({},n,{children:jsxRuntime.exports.jsxs(Grid$1,Object.assign({container:!0,rowSpacing:5,columnSpacing:6,className:t.container,"data-test":"os-app-center-new-functionality-step-container"},{children:[jsxRuntime.exports.jsxs(Grid$1,Object.assign({item:!0,xs:12},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h6",gutterBottom:!0,"data-test":"os-app-center-new.application-type-title"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-new.application-type-title-formattedMessage",defaultMessage:"Application Type",description:"Application Type title"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"caption","data-test":"os-app-center-new.application-type-description"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-new.application-type-description-formattedMessage",defaultMessage:"Please select the application type from the list below:",description:"Application Type description"})})),jsxRuntime.exports.jsx("div",Object.assign({className:t.inputContainer},{children:jsxRuntime.exports.jsxs(InputSelect,Object.assign({className:t.root,onChange:a,"data-test":"os-app-center-new.app-type-input",fullWidth:!0,value:"web",name:"app-type"},{children:[jsxRuntime.exports.jsxs(MenuItem,Object.assign({value:"web"},{children:[jsxRuntime.exports.jsx("b",{children:"Web Application"})," ",jsxRuntime.exports.jsx("span",Object.assign({className:t.grayText},{children:"(Accessible via Browser)"}))]})),jsxRuntime.exports.jsxs(MenuItem,Object.assign({disabled:!0},{children:[jsxRuntime.exports.jsx("b",{children:"Docker Application"})," (Run on aiWARE)"," ",jsxRuntime.exports.jsx(Chip$1,{color:"primary",className:t.chip,size:"small",label:"Coming Soon"})]})),jsxRuntime.exports.jsxs(MenuItem,Object.assign({disabled:!0},{children:[jsxRuntime.exports.jsx("b",{children:"Kubernetes"})," ",jsxRuntime.exports.jsx(Chip$1,{color:"primary",className:t.chip,size:"small",label:"Coming Soon"})]}))]}))}))]})),jsxRuntime.exports.jsxs(Grid$1,Object.assign({item:!0,xs:12},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h6",gutterBottom:!0,"data-test":"os-app-center-new.application-url-title"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-new.application-url-title-formattedMessage",defaultMessage:"Application URL",description:"Application url title"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"caption","data-test":"os-app-center-new.application-url-description"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-new.integration-description-formattedMessage",defaultMessage:"Provide the url to access your application. Include http or https.",description:"Application url description"})})),jsxRuntime.exports.jsx("div",Object.assign({className:t.inputContainer},{children:jsxRuntime.exports.jsx(InputText,{required:!0,type:"url","data-test":"os-app-center-new.url-input",rules:{required:!0,pattern:{value:urlRegex,message:"Must be a valid URL including protocol."}},onChange:a,placeholder:"URL",name:"url",fullWidth:!0})}))]})),jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:12},{children:jsxRuntime.exports.jsx(ConfigFields,{})}))]}))}))},useStyles$7=makeStyles()(e=>({container:{padding:e.spacing(6),maxWidth:"100%"},divider:{width:"60rem",margin:e.spacing(5,5,1,6)},list:{width:"60rem",padding:e.spacing(6,0),marginLeft:e.spacing(6)},chip:{marginLeft:"10px",marginTop:"9px",marginRight:"15px",background:"#214167"},inputContainer:{paddingTop:"10px"},root:{"&":{width:"100%"}},checked:{color:"#6098D1"}})),AuthenticationStep=({handleOnValidate:e})=>{var t=useStyles$7()["classes"];const s=useForm({mode:"onChange",defaultValues:{url:""}});return react.exports.useEffect(()=>{e&&e(!0)}),react.exports.useEffect(()=>{null!=e&&e(s.formState.isValid)},[s.formState.isValid]),jsxRuntime.exports.jsx(FormProvider,Object.assign({},s,{children:jsxRuntime.exports.jsx(Grid$1,Object.assign({container:!0,rowSpacing:5,columnSpacing:6,className:t.container,"data-test":"os-app-center-new-authentication-step-container"},{children:jsxRuntime.exports.jsxs(Grid$1,Object.assign({item:!0,xs:12},{children:[jsxRuntime.exports.jsx(Heading,{title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-new.authentication-title-formattedMessage",defaultMessage:"Authentication",description:"Authentication title"}),description:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-new.authentication-description-formattedMessage",defaultMessage:"Default authentication is None. OAuth and JWT authentication protocols coming soon",description:"authentication description"}),testName:"os-app-center-new.authentication"}),jsxRuntime.exports.jsx(Typography$1,{variant:"h6",gutterBottom:!0,"data-test":"os-app-center-new.authentication-title"}),jsxRuntime.exports.jsx(Typography$1,{variant:"caption","data-test":"os-app-center-new.authentication-description"}),jsxRuntime.exports.jsx("div",Object.assign({className:t.inputContainer},{children:jsxRuntime.exports.jsxs(RadioGroup,Object.assign({"data-test":"authentication-radio-group","aria-labelledby":"demo-radio-buttons-group-label",name:"radio-buttons-group",value:"none",defaultValue:"none",row:!0},{children:[jsxRuntime.exports.jsx(FormControlLabel,{value:"none",control:jsxRuntime.exports.jsx(Radio,{"data-test":"radio-none"}),label:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h6",color:"textSecondary"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-new.radio-None-formattedMessage",defaultMessage:"None",description:"None"})}))}),jsxRuntime.exports.jsx(Chip$1,{color:"primary",className:t.chip,size:"small",label:"Coming Soon"}),jsxRuntime.exports.jsx(FormControlLabel,{value:"oauth",disabled:!0,control:jsxRuntime.exports.jsx(Radio,{"data-test":"radio-oauth"}),label:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h6",style:{color:"lightgray"}},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-new.radio-OAuth-formattedMessage",defaultMessage:"OAuth",description:"OAuth"})}))}),jsxRuntime.exports.jsx(FormControlLabel,{value:"jwt",disabled:!0,control:jsxRuntime.exports.jsx(Radio,{"data-test":"radio-jwt"}),label:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h6",style:{color:"lightgray"}},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-new.radio-JWT-formattedMessage",defaultMessage:"JWT",description:"JWT"})}))})]}))}))]}))}))}))},useStyles$6=makeStyles()(e=>({container:{width:"100%",padding:"25px 30px"},subheading:{maxWidth:"100%",minWidth:"48.75rem",padding:"30px 0"},titleDesc:{width:"60%",display:"inline-block"},appLogo:{width:"40%",display:"inline-block"},text:{width:"39.5rem",padding:"14px 0",borderBottom:"0.5px solid #D5DFE9",fontWeight:400},textCollapsible:{width:"39.5rem",padding:"8px 0",borderBottom:"0.5px solid #D5DFE9",cursor:"pointer"},collapse:{width:"39.5rem"},collapseContent:{maxHeight:200,overflow:"auto"},pre:{whiteSpace:"pre-line"},asterisk:{color:"#D43060",margin:"0 2px"}})),useStyles$5=makeStyles()(e=>({root:{borderRadius:"50%",border:"1px solid #D5DFE9",display:"flex",justifyContent:"center",alignItems:"center",overflow:"hidden",width:e.spacing(8),height:e.spacing(8)},logo:{maxWidth:"100%",maxHeight:"100%"},veritoneLogo:{maxWidth:"100%",maxHeight:"100%"}})),AppLogo=({path:e})=>{var t=useStyles$5()["classes"];return jsxRuntime.exports.jsx("div",Object.assign({className:t.root},{children:jsxRuntime.exports.jsx("img",{className:t.logo+" "+(!e&&t.veritoneLogo),src:e||img$1u,alt:"app logo"})}))},Row=({label:e,value:t,style:s,testName:a,icon:n,asterisk:i,handleOpenCollapse:r,textTransformValue:o="capitalize"})=>jsxRuntime.exports.jsxs(Box$1,Object.assign({display:"flex",justifyContent:"space-between",alignItems:"center",textTransform:o,"data-test":a+"-container"},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h6","data-test":"label-"+a},{children:e})),jsxRuntime.exports.jsxs(Box$1,Object.assign({className:s,display:"flex",justifyContent:"space-between",alignItems:"center",onClick:r},{children:[jsxRuntime.exports.jsxs(Typography$1,Object.assign({variant:"h6",sx:{fontWeight:400}},{children:[t,i]})),jsxRuntime.exports.jsx(IconButton,Object.assign({"aria-label":"expand row",size:"small",onClick:r,"data-test":a+"-expand-action-trigger"},{children:n}))]}))]})),ConfirmationStep=()=>{var e=useStyles$6()["classes"],t=useSelector(selectApp);return jsxRuntime.exports.jsxs(Box$1,Object.assign({className:e.container,"data-test":"os-app-center-new-confirmation-step-container"},{children:[jsxRuntime.exports.jsxs(Grid$1,Object.assign({className:e.subheading},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:e.titleDesc},{children:[jsxRuntime.exports.jsx(Box$1,Object.assign({display:"flex",alignItems:"center",textTransform:"capitalize","data-test":"os-app-center-new-confirmation-step.app-name"},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h2"},{children:lodash.exports.isEmpty(t.name)?"-":t.name}))})),jsxRuntime.exports.jsx(Box$1,Object.assign({"data-test":"os-app-center-new-confirmation-step.app-description"},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"caption",color:"#2A323C"},{children:lodash.exports.isEmpty(t.description)?"-":t.description}))}))]})),jsxRuntime.exports.jsx("div",Object.assign({"data-test":"os-app-center-new-confirmation-step.app-logo",className:e.appLogo},{children:jsxRuntime.exports.jsx(AppLogo,{path:t.iconPath})}))]})),jsxRuntime.exports.jsxs(Box$1,Object.assign({sx:{width:"100%"},"data-test":"os-app-center-new-confirmation-step.row-container"},{children:[jsxRuntime.exports.jsx(Row,{label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-new-confirmation-step.app-url-formattedMessage",defaultMessage:"Application URL:",description:"application url"}),textTransformValue:"none",value:lodash.exports.isEmpty(t.url)?"-":t.url,style:e.text,testName:"os-app-center-new-confirmation-step.app-url"}),jsxRuntime.exports.jsx(Row,{label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-new-confirmation-step.custom-fields-formattedMessage",defaultMessage:"Custom Fields:",description:"Custom Fields"}),value:lodash.exports.isEmpty(t.configFields)?"-":lodash.exports.join(lodash.exports.map(t.configFields,e=>e.name),", "),style:e.text,testName:"os-app-center-new-confirmation-step.app-custom-fields"}),jsxRuntime.exports.jsx(Row,{label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-new-confirmation-step.app-headerbar-formattedMessage",defaultMessage:"Headerbar:",description:"headerbar"}),value:"On (Default)",style:e.text,testName:"os-app-center-new-confirmation-step.app-headerbar"}),jsxRuntime.exports.jsx(Row,{label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-new-confirmation-step.app-auth-formattedMessage",defaultMessage:"Authentication:",description:"auth"}),value:"None (Default)",style:e.text,testName:"os-app-center-new-confirmation-step.app-auth"}),jsxRuntime.exports.jsx(Row,{label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-new.confirmation-step-app-packages-formattedMessage",defaultMessage:"App Packages:",description:"app packages"}),value:lodash.exports.isEmpty(t.flows)&&lodash.exports.isEmpty(t.engines)&&lodash.exports.isEmpty(t.schemas)?"-":`Automate Flows (${t.flows.length}), Engines (${t.engines.length}), Schemas (${t.schemas.length})`,style:e.text,testName:"os-app-center-new-confirmation-step.app-packages"})]}))]}))},formatDate=e=>{if(!e)return"--/--/-- --:-- --";const t=new Date(e);return t.toLocaleDateString()+" "+t.toLocaleTimeString("en-US",{hour:"numeric",minute:"numeric",hour12:!0})};var EngineLinking=()=>{const e=useDispatch();var t=useSelector(selectApp)["engines"];const[s,a]=react.exports.useState(lodash.exports.map(t,e=>({name:e.name,edgeVersion:e.edgeVersion,modifiedDateTime:formatDate(e.modifiedDateTime)})));return jsxRuntime.exports.jsx(ListField,{idPrefix:"aob.engine-linking-list.engines",heading:"aiWARE Engines to Include with App Package",description:"Select engines that interface with your application to be included with your application package.",actionButtonLabel:"Add Engine",items:s,columnNames:["Name","Version","Last Updated"],canEdit:!1,canDelete:!1,onActionClick:()=>{e(mountPanel({panelId:"APP_CENTER_ADD_ENGINE_PANEL",microFrontend:{name:"APP_CENTER_ADD_ENGINE_PANEL",config:{name:"Add Engine"}},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:0,size:"large",zIndex:1001}}))},onRequestSort:(t,e)=>{a(lodash.exports.orderBy(s,[e=>lodash.exports.lowerCase(e[lodash.exports.camelCase(t)])],e))}})},FlowLinking=()=>{const e=useDispatch();var t=useSelector(selectApp)["flows"];const[s,a]=react.exports.useState(lodash.exports.map(t,e=>({name:e.name,version:e.edgeVersion,lastUpdated:formatDate(e.modifiedDateTime)})));return jsxRuntime.exports.jsx(ListField,{idPrefix:"aob.engine-linking-list.flows",heading:"Automate Flows to Include with App Package",description:"Select Automate flows that interface with your application to be included with your application package.",actionButtonLabel:"Add Flow",items:s,columnNames:["Name","Version","Last Updated"],canEdit:!1,canDelete:!1,onDeleteClick:lodash.exports.noop,onEditClick:lodash.exports.noop,onActionClick:()=>{e(mountPanel({panelId:"APP_CENTER_ADD_FLOW_PANEL",microFrontend:{name:"APP_CENTER_ADD_FLOW_PANEL",config:{name:"Add Flow"}},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:0,size:"large",zIndex:1001}}))},onRequestSort:(t,e)=>{a(lodash.exports.orderBy(s,[e=>lodash.exports.lowerCase(e[lodash.exports.camelCase(t)])],e))}})},Schema=()=>{const e=useDispatch();var t=useSelector(selectApp)["schemas"];const[s,a]=react.exports.useState(lodash.exports.map(t,e=>({name:e.name,version:e.version,lastUpdated:formatDate(e.modifiedDateTime)})));return jsxRuntime.exports.jsx(ListField,{idPrefix:"aob.engine-linking-list.schemas",heading:"aiWARE Data Schema to Include with App Package",description:"Select Data Schemas that interface with your application to be included with your application package.",actionButtonLabel:"Add Schema",items:s,columnNames:["Name","Version","Last Updated"],canEdit:!1,canDelete:!1,onEditClick:lodash.exports.noop,onDeleteClick:lodash.exports.noop,onActionClick:()=>{e(mountPanel({panelId:"APP_CENTER_ADD_SCHEMA_PANEL",microFrontend:{name:"APP_CENTER_ADD_SCHEMA_PANEL",config:{name:"Add Schema"}},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:0,size:"large",zIndex:1001}}))},onRequestSort:(t,e)=>{a(lodash.exports.orderBy(s,[e=>lodash.exports.lowerCase(e[lodash.exports.camelCase(t)])],e))}})},AppPackagesStep=()=>jsxRuntime.exports.jsxs(Stack,Object.assign({spacing:5,p:6,"data-test":"app-package"},{children:[jsxRuntime.exports.jsx(Box$1,{children:jsxRuntime.exports.jsx(FlowLinking,{})}),jsxRuntime.exports.jsx(Box$1,{children:jsxRuntime.exports.jsx(EngineLinking,{})}),jsxRuntime.exports.jsx(Box$1,{children:jsxRuntime.exports.jsx(Schema,{})})]}));const useBasicInfoStyles=makeStyles()(e=>({container:{padding:e.spacing(6),justifyContent:"space-around","& input, textarea":{fontWeight:400},"& fieldset":{borderColor:"#D5DFE9"}},textInput:{padding:26},labelRow:{display:"flex",gap:e.spacing(2),alignItems:"flex-end"},optional:{fontSize:10,marginBottom:e.spacing(1)},select:{"& > div":{fontWeight:400,width:"280px"}}})),useIconImporterStyles=makeStyles()(e=>({iconBox:{display:"flex",justifyContent:"center",alignItems:"center",width:200,height:200,padding:e.spacing(3),border:"1px dashed #D5DFE9",borderRadius:5,transition:"all .2s ease","&:hover":{border:"1px solid #dde6ee"}},innerBox:{position:"relative",background:"#F5F5F5",width:"100%",height:"100%",borderRadius:5,display:"flex",justifyContent:"center",alignItems:"center",transition:"all .2s ease","&:hover":{background:"#dde6ee"}},fileInput:{display:"none"},addIcon:{color:"#555F7C",height:42,width:42,"&:hover":{color:"#555F7C"}},iconPreview:{objectFit:"cover",borderRadius:5,width:"100%",maxHeight:"100%"},removeIcon:{position:"absolute",top:10,right:10}})),useDragAndDrop=({acceptedFileTypes:i})=>{const t=react.exports.useRef(),e=react.exports.useRef(),r=useDispatch();var s=useSelector(preferredLanguageSelector);const o=AIWareFormatMessage(s),a=react.exports.useCallback(e=>{var t,s,a,n;e&&(i.includes(e.type)?({name:t,size:s,type:a}=e,n=URL.createObjectURL(e),n={id:guid(),previewUrl:n,name:t,size:s,type:a},r(actions.iconUploadState.uploadIconStart({file:n}))):r(showMessage({content:o({id:"os-app-center-new.snackbar.unsupportedFileType",defaultMessage:[{type:1,value:"type"},{type:0,value:" is not a supported image type."}]},{type:e.type}),severity:MessageSeverity.Warning})))},[i,r]),n=react.exports.useCallback(e=>{e.preventDefault();e=e.dataTransfer.files[0];a(e)},[a]);const p=e=>{e.preventDefault()};return react.exports.useEffect(()=>{const e=t.current;return e.addEventListener("drop",n),()=>{e.removeEventListener("drop",n)}},[n]),react.exports.useEffect(()=>{const e=t.current;return e&&(e.addEventListener("dragover",p),e.addEventListener("dragleave",p)),()=>{e.removeEventListener("dragover",p),e.removeEventListener("dragleave",p)}},[]),{dropZoneRef:t,fileInputRef:e,handleRemoveFile:e=>{e.stopPropagation(),r(actions.iconUploadState.deleteLocalIcon()),r(actions.appFormState.updateAppFormField({field:"iconPath",value:""}))},handleOpenFilePicker:()=>{e.current.click()},handleIconSelect:e=>{e=e.target.files[0];a(e)}}},acceptedFileTypes=["image/jpeg","image/png","image/gif","image/svg+xml"],IconImporter=({iconPath:e})=>{var t=useSelector(selectIcon),s=useIconImporterStyles()["classes"],{dropZoneRef:a,fileInputRef:n,handleRemoveFile:i,handleIconSelect:r,handleOpenFilePicker:o}=useDragAndDrop({acceptedFileTypes:acceptedFileTypes});return jsxRuntime.exports.jsx("div",Object.assign({className:s.iconBox,ref:a,"data-test":"app-description-icon-dropzone"},{children:e||null!=t&&t.previewUrl?jsxRuntime.exports.jsxs("div",Object.assign({className:s.innerBox,style:{backgroundColor:"transparent"}},{children:[jsxRuntime.exports.jsx(IconButton,Object.assign({"data-test":"app-description-icon-remove",className:s.removeIcon,size:"small",onClick:i},{children:jsxRuntime.exports.jsx(default_1$1,{})})),jsxRuntime.exports.jsx("img",{src:(null==t?void 0:t.previewUrl)||e,alt:(null==t?void 0:t.name)||"Icon",className:s.iconPreview,"data-test":"app-description-icon-preview"})]})):jsxRuntime.exports.jsxs(Button$1,Object.assign({className:s.innerBox,onClick:o},{children:[jsxRuntime.exports.jsx("input",{type:"file",ref:n,className:s.fileInput,onChange:r}),jsxRuntime.exports.jsx(default_1$3,{className:s.addIcon})]}))}))},BasicInfo=({onValidate:e})=>{var t=useBasicInfoStyles()["classes"];const s=useDispatch();var a=useSelector(selectApp),n={name:a.name,description:a.description};const i=useForm({mode:"onChange",defaultValues:n});react.exports.useEffect(()=>{e(i.formState.isValid)},[i.formState.isValid]);n=e=>{var{name:e,value:t}=e.target;e=e,t=t,s(actions.appFormState.updateAppFormField({field:e,value:t}))};return jsxRuntime.exports.jsx(Box$1,Object.assign({"data-test":"basic-info"},{children:jsxRuntime.exports.jsx(FormProvider,Object.assign({},i,{children:jsxRuntime.exports.jsxs(Grid$1,Object.assign({className:t.container,container:!0,rowSpacing:4,columnSpacing:10,"data-test":"app-description"},{children:[jsxRuntime.exports.jsxs(Grid$1,Object.assign({container:!0,item:!0,xs:12,sm:8,rowSpacing:2,columnSpacing:6},{children:[jsxRuntime.exports.jsxs(Grid$1,Object.assign({item:!0,xs:12,sm:6},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h6",gutterBottom:!0},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-new.name-description-label",defaultMessage:"Name & Description",description:"Name & Description"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"caption",paragraph:!0},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-new.image-recommended-label",defaultMessage:"Provide a name and description to users know what your application does.",description:"application name and description caption"})}))]})),jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:12},{children:jsxRuntime.exports.jsx(InputText,{inputProps:{className:t.textInput},"data-test":"app-description-input-name",variant:"outlined",sx:{marginBottom:3},placeholder:"Application Name",name:"name",value:a.name,onChange:n,fullWidth:!0,rules:{required:!0,maxLength:100}})})),jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:12},{children:jsxRuntime.exports.jsx(InputText,{InputProps:{className:t.textInput},"data-test":"app-description-input-description",variant:"outlined",placeholder:"Description",name:"description",fullWidth:!0,multiline:!0,rows:10,value:a.description,onChange:n,rules:{required:!0,maxLength:250}})}))]})),jsxRuntime.exports.jsx(Grid$1,Object.assign({container:!0,item:!0,xs:12,sm:4,rowSpacing:4,columnSpacing:6},{children:jsxRuntime.exports.jsxs(Grid$1,Object.assign({item:!0,xs:12},{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({sx:{py:1}},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h6",gutterBottom:!0},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-new.icon-image-label",defaultMessage:"App Icon",description:"App Icon"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"caption",paragraph:!0},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-new.image-recommended-label",defaultMessage:"Recommended image size:{br}300x300 .png or .jpg",description:"Recommended image size:{br} 300x300 .png or .jpg",values:{br:jsxRuntime.exports.jsx("br",{})}})}))]})),jsxRuntime.exports.jsx(IconImporter,{iconPath:a.iconPath})]}))})),jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:12},{children:jsxRuntime.exports.jsx(EntityTags,{selectedTags:a.entityTags,setSelectedTags:e=>{s(actions.appFormState.updateAppFormField({field:"entityTags",value:e}))}})}))]}))}))}))},PaletteIntegration=()=>{const s=useDispatch(),t=useSelector(selectApp)["npmModules"];var e;const[a,n]=react.exports.useState((e=t,lodash.exports.map(e,e=>({name:e.name}))));const i=(e=!1,t=-1)=>{e={name:"APP_CENTER_AUTOMATE_PALETTE_INTEGRATION_PANEL",config:{name:"Add Module",isEdit:e,editIndex:t}};s(mountPanel({panelId:"APP_CENTER_AUTOMATE_PALETTE_INTEGRATION_PANEL",microFrontend:e,panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:0,size:"small",zIndex:1001}}))};return jsxRuntime.exports.jsx(Box$1,Object.assign({m:5,"data-test":"automate"},{children:jsxRuntime.exports.jsx(ListField,{idPrefix:"aob.automate-palette-integration",heading:"aiWARE Automate Palette Integration",description:"Please specify all the npm packages to install in Automate when this application is enabled in the organization.",actionButtonLabel:"Add Module",items:a,columnNames:["Palette","",""],canEdit:!0,canDelete:!0,onActionClick:()=>i(),onEditClick:e=>{e=a[e],e=lodash.exports.findIndex(t,{name:e.name});0<=e&&i(!0,e)},onDeleteClick:e=>{e=a[e],e=lodash.exports.findIndex(t,{name:e.name});0<=e&&s(actions.appFormState.removeNpmModule(e))},onRequestSort:(t,e)=>{n(lodash.exports.orderBy(a,[e=>lodash.exports.lowerCase(e[lodash.exports.camelCase(t)])],e))}})}))},AppOnboardingFlow=()=>{const t=useDispatch(),s=useSelector(selectApp),a=useSelector(selectIsEditForm)["isEditForm"],[e,n]=react.exports.useState(!1);var i=e=>n(e);var r=({handleOnValidate:e,children:t})=>(react.exports.useEffect(()=>{e(!0)},[]),t),r=[jsxRuntime.exports.jsx(BasicInfo,{onValidate:i}),jsxRuntime.exports.jsx(FunctionalityStep,{handleOnValidate:i}),jsxRuntime.exports.jsx(r,Object.assign({handleOnValidate:i},{children:jsxRuntime.exports.jsx(HeaderbarStep,{})})),jsxRuntime.exports.jsx(AuthenticationStep,{handleOnValidate:i}),jsxRuntime.exports.jsx(r,Object.assign({handleOnValidate:i},{children:jsxRuntime.exports.jsx(PaletteIntegration,{})})),jsxRuntime.exports.jsx(r,Object.assign({handleOnValidate:i},{children:jsxRuntime.exports.jsx(Box$1,Object.assign({m:5},{children:jsxRuntime.exports.jsx(SvgDummy,{"data-test":"app-events"})}))})),jsxRuntime.exports.jsx(r,Object.assign({handleOnValidate:i},{children:jsxRuntime.exports.jsx(Box$1,Object.assign({"data-test":"app-package"},{children:jsxRuntime.exports.jsx(AppPackagesStep,{})}))})),jsxRuntime.exports.jsx(ConfirmationStep,{})],i=[jsxRuntime.exports.jsx(Button$1,Object.assign({"data-test":"app-new-submit-app-button",variant:"contained",color:"primary",onClick:()=>{var[e=!1]=[];a?t(actions.appFormState.updateAppStart({app:s,openBuildPanel:e})):t(actions.appFormState.createAppStart({app:s,openBuildPanel:e}))}},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-new.{idPrefix}-app-button",defaultMessage:"{verb}",description:"{verb} app button text",values:{idPrefix:a?"update":"submit",verb:a?"Update":"Submit"}})}),"submit-app-button")];return jsxRuntime.exports.jsx(ProgressStepper,{steps:["Basic Info","Functionality","Headerbar","Authentication","Automate","App Events","App Package","Review"],stepContent:r,customFinalStepButtons:i,nextButtonDisabled:!e,idPrefix:"app-center-new-aob"})},appBarHeight$2=55,headerHeight=64,borderBottom$2=5,useStyles$4=makeStyles()(e=>({ecnPanel:{height:`calc(100vh - ${appBarHeight$2}px - ${headerHeight}px - ${borderBottom$2}px)`}})),MainLayout=({appId:e})=>{var t=useStyles$4()["classes"];const s=useDispatch();var a=useSelector(selectIsLoadingExistingAppData)["isLoadingExistingAppData"];return react.exports.useEffect(()=>{e?s(actions.appFormState.editApp(e)):s(actions.appFormState.createNewApp())},[]),jsxRuntime.exports.jsx("div",Object.assign({role:"presentation","data-test":"app-center-new-widget",className:t.ecnPanel},{children:a?jsxRuntime.exports.jsx(Box$1,Object.assign({sx:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"}},{children:jsxRuntime.exports.jsx(CircularProgress$1,{})})):jsxRuntime.exports.jsx(AppOnboardingFlow,{})}))},AppCenterNew=e=>jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(lib.DynamicModuleLoader,Object.assign({modules:[getAppCenterNewModule()]},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(CacheProvider,Object.assign({value:muiCache},{children:jsxRuntime.exports.jsx(MainLayout,Object.assign({},e))}))})}))}),AddFlowPanel=()=>{const a=useDispatch(),n=useSelector(selectApp),{searchTerm:e,searchResults:i,isLoadingSearchResults:t,sortOrder:s}=useSelector(selectFlowLinkingPanel);const r=e=>{var t=lodash.exports.findIndex(i,{id:e.target.value});const s=[...n.flows];lodash.exports.includes(lodash.exports.map(s,e=>e.id),i[t].id)?s.splice(lodash.exports.findIndex(s,{id:e.target.value}),1):s.unshift(Object.assign({},i[t])),a(actions.appFormState.updateAppFormField({field:"flows",value:s}))};const o="os-app-center-new.add-flow-panel.";return jsxRuntime.exports.jsxs(Grid$1,Object.assign({container:!0,spacing:3,p:6,"data-test":o+"container"},{children:[jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:12},{children:jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"row",alignItems:"center",justifyContent:"space-between"},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h1"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-new.add-flow-panel.title",description:"Add Flow Panel Title",defaultMessage:"Add Flow"})})),jsxRuntime.exports.jsx(IconButton,Object.assign({"data-test":o+"close",onClick:()=>{a(unmountPanel(AvailableComponents.APP_CENTER_ADD_FLOW_PANEL))}},{children:jsxRuntime.exports.jsx(default_1$1,{})}))]}))})),jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:6},{children:jsxRuntime.exports.jsx(FormControl,Object.assign({variant:"outlined",fullWidth:!0},{children:jsxRuntime.exports.jsx(TextField,{"data-test":o+"search",id:"search-input",placeholder:"Search",type:"search",value:e,onChange:e=>{a(actions.flowLinkingPanelState.searchByTerm(e.target.value))},size:"small",InputProps:{startAdornment:jsxRuntime.exports.jsx(InputAdornment,Object.assign({position:"start"},{children:t?jsxRuntime.exports.jsx(CircularProgress$1,{size:24}):jsxRuntime.exports.jsx(default_1$2,{})})),style:{borderRadius:100}}})}))})),jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({"data-test":o+"sort-toggle",onClick:e=>{a(actions.flowLinkingPanelState.toggleSortOrder())}},{children:jsxRuntime.exports.jsx(default_1,{})}))})),jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:12},{children:jsxRuntime.exports.jsx(FormControl,Object.assign({variant:"outlined"},{children:jsxRuntime.exports.jsx(FormControlLabel,{label:"Select All",control:jsxRuntime.exports.jsx(Checkbox,{"data-test":o+"select-all",onClick:e=>{var t=lodash.exports.isEmpty(lodash.exports.difference(lodash.exports.map(i,e=>e.id),lodash.exports.map(n.flows,e=>e.id)))?[]:lodash.exports.uniqBy([...n.flows,...i],"id");a(actions.appFormState.updateAppFormField({field:"flows",value:t}))},checked:!lodash.exports.isEmpty(n.flows),indeterminate:!lodash.exports.isEmpty(n.flows)&&!lodash.exports.isEmpty(lodash.exports.difference(lodash.exports.map(i,e=>e.id),lodash.exports.map(n.flows,e=>e.id)))})})}))})),jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:12},{children:jsxRuntime.exports.jsx(Divider,{})})),jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0},{children:jsxRuntime.exports.jsx(Stack,Object.assign({direction:"column"},{children:lodash.exports.map(lodash.exports.orderBy(i,"name",s),e=>jsxRuntime.exports.jsx(FormControl,Object.assign({variant:"outlined"},{children:jsxRuntime.exports.jsx(FormControlLabel,{label:e.name,control:jsxRuntime.exports.jsx(Checkbox,{"data-test":o+"flow",value:e.id,checked:lodash.exports.includes(lodash.exports.map(n.flows,e=>e.id),e.id),onChange:r})})}),e.id))}))}))]}))},AddSchemaPanel=()=>{const a=useDispatch(),n=useSelector(selectApp),{searchTerm:e,searchResults:i,isLoadingSearchResults:t,sortOrder:s}=useSelector(selectSchemaLinkingPanel);const r=e=>{var t=lodash.exports.findIndex(i,{id:e.target.value});const s=[...n.schemas];lodash.exports.includes(lodash.exports.map(s,e=>e.id),i[t].id)?s.splice(lodash.exports.findIndex(s,{id:e.target.value}),1):s.unshift(Object.assign({},i[t])),a(actions.appFormState.updateAppFormField({field:"schemas",value:s}))};const o="os-app-center-new.add-schema-panel.";return jsxRuntime.exports.jsxs(Grid$1,Object.assign({container:!0,spacing:3,p:6,"data-test":o+"container"},{children:[jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:12},{children:jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"row",alignItems:"center",justifyContent:"space-between"},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h1"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-new.add-schema-panel.title",description:"Add Schema Panel Title",defaultMessage:"Add Schema"})})),jsxRuntime.exports.jsx(IconButton,Object.assign({"data-test":o+"close",onClick:()=>{a(unmountPanel(AvailableComponents.APP_CENTER_ADD_SCHEMA_PANEL))}},{children:jsxRuntime.exports.jsx(default_1$1,{})}))]}))})),jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:6},{children:jsxRuntime.exports.jsx(FormControl,Object.assign({variant:"outlined",fullWidth:!0},{children:jsxRuntime.exports.jsx(TextField,{"data-test":o+"search",id:"search-input",placeholder:"Search",type:"search",value:e,onChange:e=>{a(actions.schemaLinkingPanelState.searchByTerm(e.target.value))},size:"small",InputProps:{startAdornment:jsxRuntime.exports.jsx(InputAdornment,Object.assign({position:"start"},{children:t?jsxRuntime.exports.jsx(CircularProgress$1,{size:24}):jsxRuntime.exports.jsx(default_1$2,{})})),style:{borderRadius:100}}})}))})),jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({"data-test":o+"sort-toggle",onClick:e=>{a(actions.schemaLinkingPanelState.toggleSortOrder())}},{children:jsxRuntime.exports.jsx(default_1,{})}))})),jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:12},{children:jsxRuntime.exports.jsx(FormControl,Object.assign({variant:"outlined"},{children:jsxRuntime.exports.jsx(FormControlLabel,{label:"Select All",control:jsxRuntime.exports.jsx(Checkbox,{"data-test":o+"select-all",onClick:e=>{var t=lodash.exports.isEmpty(lodash.exports.difference(lodash.exports.map(i,e=>e.id),lodash.exports.map(n.schemas,e=>e.id)))?[]:lodash.exports.uniqBy([...n.schemas,...i],"id");a(actions.appFormState.updateAppFormField({field:"schemas",value:t}))},checked:!lodash.exports.isEmpty(n.schemas),indeterminate:!lodash.exports.isEmpty(n.schemas)&&!lodash.exports.isEmpty(lodash.exports.difference(lodash.exports.map(i,e=>e.id),lodash.exports.map(n.schemas,e=>e.id)))})})}))})),jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:12},{children:jsxRuntime.exports.jsx(Divider,{})})),jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0},{children:jsxRuntime.exports.jsx(Stack,Object.assign({direction:"column"},{children:lodash.exports.map(lodash.exports.orderBy(i,"name",s),e=>jsxRuntime.exports.jsx(FormControl,Object.assign({variant:"outlined"},{children:jsxRuntime.exports.jsx(FormControlLabel,{label:e.name,control:jsxRuntime.exports.jsx(Checkbox,{"data-test":o+"schema",value:e.id,checked:lodash.exports.includes(lodash.exports.map(n.schemas,e=>e.id),e.id),onChange:r})})}),e.id))}))}))]}))},appBarHeight$1=55,borderBottom$1=5,mainHeight$1=`calc(100vh - ${appBarHeight$1+borderBottom$1}px)`,useStyles$3=makeStyles()(e=>({root:{display:"flex",flexFlow:"column",height:mainHeight$1},container:{padding:e.spacing(5),"& input, textarea":{fontWeight:400},"& fieldset":{borderColor:"#D5DFE9"}},"& fieldset":{borderColor:"#D5DFE9"},textInput:{padding:14.5},header:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",marginBottom:20},addButtonWrapper:{flexGrow:1,display:"flex",justifyContent:"flex-end",alignItems:"flex-end",padding:"0px 20px 20px 20px"},inputSelect:{width:"100%"},optional:{fontSize:12,marginBottom:e.spacing(1),marginLeft:e.spacing(1),color:"#9CA8B4"}})),ConfigFieldsForm=({hidePanel:n,isEdit:i=!1,editIndex:r=-1})=>{var e=useStyles$3()["classes"];const o=useDispatch(),a=useSelector(selectConfigFields);var t=()=>{if(i&&0<=r){var e;if(a[r].type===AppFieldType.Picklist)return e=get_1(a,`[${r}].options`),t=get_1(a,`[${r}].defaultValue`),e=findIndex_1(e,{value:t}),Object.assign(Object.assign({},a[r]),{defaultValue:-1===e?"":toString_1(e)});if(a[r].type!==AppFieldType.MultiPicklist)return a[r];{var t=get_1(a,`[${r}].options`);const s=get_1(a,`[${r}].defaultValues`);return Object.assign(Object.assign({},a[r]),{options:map_1(t,e=>({key:e.key,value:e.value,checked:includes_1(s,e.value)}))})}}return{name:"",configLevel:"Org",type:AppFieldType.Text,required:!1,defaultValue:""}},s=t();const p=useForm({mode:"onChange",defaultValues:s}),[l,c]=react.exports.useState(t().type),[d,x]=react.exports.useState(t().configLevel);t=e=>{let t;var s,a;t=e.type===AppFieldType.Picklist?Object.assign(Object.assign({},e),{defaultValue:get_1(e,`options[${e.defaultValue}].value`,"")}):e.type===AppFieldType.MultiPicklist?(s=map_1(filter_1(e.options,{checked:!0}),e=>e.value),a=map_1(e.options,e=>({key:e.key,value:e.value})),Object.assign(Object.assign({},e),{options:a,defaultValues:s})):e.type===AppFieldType.Number?Object.assign(Object.assign({},e),{min:toNumber_1(e.min),max:toNumber_1(e.max),step:toNumber_1(e.step)}):e,i?o(actions.appFormState.updateConfigField({configFields:t,index:r})):o(actions.appFormState.addConfigField(t)),n()};return jsxRuntime.exports.jsx(FormProvider,Object.assign({},p,{children:jsxRuntime.exports.jsxs("form",Object.assign({className:e.root,onSubmit:p.handleSubmit(t)},{children:[jsxRuntime.exports.jsxs(Grid$1,Object.assign({className:e.container,container:!0,spacing:5,"data-test":"app-new-config-fields-form-container"},{children:[jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:12},{children:jsxRuntime.exports.jsxs(Box$1,Object.assign({className:e.header},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h1",color:"secondary","data-test":"app-new-config-fields-header-title"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"app-center-new.config-fields.form-title",defaultMessage:"{label} Config Fields",description:"Form label for supported file types",values:{label:i?"Edit":"Add"}})})),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:jsxRuntime.exports.jsx(FormattedMessage,{id:"app-center-new.config-fields.form-title-close",defaultMessage:"Close",description:"Form label for close tooltip label"})},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:n,"aria-labelledby":"app-center-new-close-panel","data-test":"app-description-input-icon"},{children:jsxRuntime.exports.jsx(Close,{})}))}))]}))})),jsxRuntime.exports.jsxs(Grid$1,Object.assign({item:!0,xs:12},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h6",gutterBottom:!0,"data-test":"app-new-config-fields-header-name"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"app-center-new.config-fields.field-name",defaultMessage:"Name",description:"You can set a field name"})})),jsxRuntime.exports.jsx(InputText,{inputProps:{maxLength:50,className:e.textInput},variant:"outlined",type:"text",name:"name",fullWidth:!0,"data-test":"app-new-config-fields-name-content",rules:{required:!0,maxLength:50}})]})),jsxRuntime.exports.jsxs(Grid$1,Object.assign({item:!0,xs:12},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h6",gutterBottom:!0,"data-test":"app-new-config-fields-header-description"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"app-center-new.config-fields.field-description",defaultMessage:"Description",description:"You can set a field description"})})),jsxRuntime.exports.jsx(InputText,{variant:"outlined",name:"description",fullWidth:!0,multiline:!0,rows:5,"data-test":"app-new-config-fields-description-content",inputProps:{maxLength:250},InputProps:{className:e.textInput},rules:{maxLength:250}})]})),jsxRuntime.exports.jsxs(Grid$1,Object.assign({item:!0,xs:12},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h6",gutterBottom:!0,"data-test":"app-new-config-fields-header-config-level"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"app-center-new.config-fields.config-level",defaultMessage:"Config Level",description:"You can set a config level"})})),jsxRuntime.exports.jsxs(InputSelect,Object.assign({inputProps:{maxLength:50,className:e.textInput},className:e.inputSelect,type:"text",name:"configLevel",value:d,defaultValue:d,onChange:e=>{p.setValue("configLevel",e.target.value),x(e.target.value)},style:{minWidth:"100%"},"data-test":"app-new-config-level-content",rules:{required:!0}},{children:[jsxRuntime.exports.jsx(MenuItem,Object.assign({value:"Org"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"app-center-new.config-fields.menu-item-org",defaultMessage:"Org",description:"You can set a config level"})})),jsxRuntime.exports.jsx(MenuItem,Object.assign({value:"User"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"app-center-new.config-fields.menu-item-user",defaultMessage:"User",description:"You can set a config level"})}))]}))]})),jsxRuntime.exports.jsxs(Grid$1,Object.assign({item:!0,xs:12},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h6",gutterBottom:!0,"data-test":"app-new-config-fields-header-type"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"app-center-new.config-fields.field-type",defaultMessage:"Type",description:"You can set a field type"})})),jsxRuntime.exports.jsx(InputSelect,Object.assign({inputProps:{maxLength:50,className:e.textInput},className:e.inputSelect,type:"text",name:"type",value:l,onChange:e=>{p.resetField("defaultValue"),p.unregister("defaultValues"),p.unregister("min"),p.unregister("max"),p.unregister("step"),p.resetField("options"),p.unregister("options"),p.setValue("type",e.target.value),c(e.target.value)},style:{minWidth:"100%"},"data-test":"app-new-config-fields-type-content",rules:{required:!0}},{children:map_1(keys_1(AppFieldType),(e,t)=>jsxRuntime.exports.jsx(MenuItem,Object.assign({value:AppFieldType[e]},{children:AppFieldType[e]}),t))}))]})),jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:12},{children:(()=>{switch(l){case AppFieldType.Text:case AppFieldType.SchemaSelection:return jsxRuntime.exports.jsx(SchemaOrText,{});case AppFieldType.Number:return jsxRuntime.exports.jsx(Number$1,{});case AppFieldType.Picklist:return jsxRuntime.exports.jsx(Picklist,{isMulti:!1});case AppFieldType.MultiPicklist:return jsxRuntime.exports.jsx(Picklist,{isMulti:!0});default:return null}})()})),jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:12,style:{padding:"12.5px 0 0 25px"}},{children:jsxRuntime.exports.jsx(Box$1,Object.assign({display:"flex",justifyContent:"start",alignItems:"center"},{children:jsxRuntime.exports.jsx(InputCheckbox,{name:"required",defaultChecked:s.required,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"app-center-new.config-fields.required-checkbox",defaultMessage:"Make Required",description:"Required field checkbox"})})}))}))]})),jsxRuntime.exports.jsx(Box$1,Object.assign({className:e.addButtonWrapper},{children:jsxRuntime.exports.jsx(Button$1,Object.assign({type:"submit",disabled:!get_1(p,"formState.isValid"),onSubmit:t,variant:"contained",color:"primary","data-test":"app-new-config-fields-button-submit"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-new-config-fields.submit-button-label",defaultMessage:"{label}",description:"{label} Config Fields",values:{label:i?"Update":"Add"}})}))}))]}))}))},AppCenterConfigFieldsForm=e=>jsxRuntime.exports.jsx(CacheProvider,Object.assign({value:muiCache},{children:jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(ConfigFieldsForm,{hidePanel:e.hidePanel,isEdit:e.isEdit,editIndex:e.editIndex})})})})),useStyles$2=makeStyles()(e=>({header:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",marginBottom:e.spacing(4)},moreIcon:{width:"32px",height:e.spacing(3),background:"#E2E2E2",borderRadius:e.spacing(6),cursor:"pointer"},card:{width:360,background:"#465364",boxShadow:"0px 4px 10px rgba(0, 0, 0, 0.25)",borderRadius:"4px",color:"#FFFFFF"},hide:{display:"none"}})),useStyles$1=makeStyles()(e=>({root:{borderRadius:"50%",border:"1px solid #D5DFE9",display:"flex",justifyContent:"center",alignItems:"center",overflow:"hidden",width:e.spacing(6),height:e.spacing(6)},logo:{maxWidth:"100%",maxHeight:"100%"},veritoneLogo:{maxWidth:"75%",maxHeight:"75%"}})),EngineLogo=({path:e})=>{var t=useStyles$1()["classes"];return jsxRuntime.exports.jsx("div",Object.assign({className:t.root},{children:jsxRuntime.exports.jsx("img",{className:t.logo+" "+(!e&&t.veritoneLogo),src:e||img$1u,alt:"engine logo"})}))},TooltipCard=({engine:e,className:t})=>jsxRuntime.exports.jsxs(Card,Object.assign({className:t},{children:[jsxRuntime.exports.jsx(CardHeader$1,{sx:{paddingBottom:2},avatar:jsxRuntime.exports.jsx(EngineLogo,{path:e.iconPath}),title:e.name,subheader:jsxRuntime.exports.jsxs(Typography$1,Object.assign({fontSize:"10px",color:"#FFFFFF",lineHeight:"16px"},{children:["Version: ",e.edgeVersion," Modified: ",e.modifiedDateTime]}))}),jsxRuntime.exports.jsx(CardContent,Object.assign({sx:{marginLeft:9.5,paddingTop:0}},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",fontSize:"10px",color:"#FFFFFF",lineHeight:"16px"},{children:e.description}))}))]})),AddEngineForm=({hidePanel:e})=>{const t=useStyles$2()["classes"],a=useDispatch(),n=useSelector(selectApp),{searchTerm:s,searchResults:i,isLoadingSearchResults:r,sortOrder:o}=useSelector(selectEngineLinkingPanel),[p,l]=react.exports.useState(null);const c=e=>{var t=lodash.exports.findIndex(i,{id:e.target.value});const s=[...n.engines];lodash.exports.includes(lodash.exports.map(s,e=>e.id),i[t].id)?s.splice(lodash.exports.findIndex(s,{id:e.target.value}),1):s.unshift(i[t]),a(actions.appFormState.updateAppFormField({field:"engines",value:s}))};const d="os-app-center-new.add-engine-panel.";return jsxRuntime.exports.jsxs(Grid$1,Object.assign({container:!0,spacing:3,p:6,"data-test":d+"container"},{children:[jsxRuntime.exports.jsxs(Grid$1,Object.assign({xs:12,pl:5},{children:[jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:12,mb:4},{children:jsxRuntime.exports.jsxs(Box$1,Object.assign({className:t.header},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h1",color:"secondary","data-test":"engine-new-custom-fields-header-title"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"engine-center-new.custom-fields.form-title",defaultMessage:"Add Engine",description:"Form label for supported file types"})})),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:jsxRuntime.exports.jsx(FormattedMessage,{id:"engine-center-new.custom-fields.form-title-close",defaultMessage:"Close",description:"Form label for close tooltip label"})},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:e,"aria-labelledby":"engine-center-new-close-panel","data-test":"engine-description-input-icon"},{children:jsxRuntime.exports.jsx(Close,{})}))}))]}))})),jsxRuntime.exports.jsxs(Box$1,Object.assign({display:"flex"},{children:[jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:6,mb:4},{children:jsxRuntime.exports.jsx(FormControl,Object.assign({variant:"outlined",fullWidth:!0},{children:jsxRuntime.exports.jsx(TextField,{"data-test":d+"search",id:"search-input",placeholder:"Search",type:"search",value:s,onChange:e=>{a(actions.engineLinkingPanelState.searchByTerm(e.target.value))},size:"small",InputProps:{startAdornment:jsxRuntime.exports.jsx(InputAdornment,Object.assign({position:"start"},{children:r?jsxRuntime.exports.jsx(CircularProgress$1,{size:24}):jsxRuntime.exports.jsx(default_1$2,{})})),style:{borderRadius:100}}})}))})),jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,sx:{marginLeft:4}},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({"data-test":d+"sort-toggle",onClick:e=>{a(actions.engineLinkingPanelState.toggleSortOrder())}},{children:jsxRuntime.exports.jsx(default_1,{})}))}))]})),jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:12},{children:jsxRuntime.exports.jsx(FormControl,Object.assign({variant:"outlined"},{children:jsxRuntime.exports.jsx(FormControlLabel,{label:"Select All",control:jsxRuntime.exports.jsx(Checkbox,{"data-test":d+"select-all",onClick:e=>{var t=lodash.exports.isEmpty(lodash.exports.difference(lodash.exports.map(i,e=>e.id),lodash.exports.map(n.engines,e=>e.id)))?[]:lodash.exports.uniqBy([...n.engines,...i],"id");a(actions.appFormState.updateAppFormField({field:"engines",value:t}))},checked:!lodash.exports.isEmpty(n.engines),indeterminate:!lodash.exports.isEmpty(n.engines)&&!lodash.exports.isEmpty(lodash.exports.difference(lodash.exports.map(i,e=>e.id),lodash.exports.map(n.engines,e=>e.id)))})})}))})),jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:12,sx:{margin:"20px 0"}},{children:jsxRuntime.exports.jsx(Divider,{})}))]})),jsxRuntime.exports.jsx(Grid$1,Object.assign({xs:12},{children:jsxRuntime.exports.jsx(Stack,Object.assign({direction:"column"},{children:lodash.exports.map(lodash.exports.orderBy(i,"name",o),e=>jsxRuntime.exports.jsxs(TableRow,Object.assign({onMouseOver:()=>l(e.id),onMouseOut:()=>l(null),hover:!0,"data-test":"engines-list-table-row",sx:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"0 25px"}},{children:[jsxRuntime.exports.jsx(FormControl,Object.assign({variant:"outlined"},{children:jsxRuntime.exports.jsx(FormControlLabel,{label:e.name,control:jsxRuntime.exports.jsx(Checkbox,{"data-test":d+"engine",value:e.id,checked:lodash.exports.includes(lodash.exports.map(n.engines,e=>e.id),e.id),onChange:c})})}),e.id),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:jsxRuntime.exports.jsx(TooltipCard,{engine:e,className:e.id===p?t.card:t.hide}),placement:"left",componentsProps:{tooltip:{sx:{padding:0}}}},{children:jsxRuntime.exports.jsx(MoreHor,{className:e.id===p?t.moreIcon:t.hide})}))]}),e.id))}))}))]}))},AppCenterAddEnginePanel=e=>jsxRuntime.exports.jsx(CacheProvider,Object.assign({value:muiCache},{children:jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(AddEngineForm,{hidePanel:e.hidePanel})})})})),appBarHeight=55,borderBottom=5,mainHeight=`calc(100vh - ${appBarHeight+borderBottom}px)`,useStyles=makeStyles()(e=>({root:{display:"flex",flexFlow:"column",height:mainHeight},container:{padding:e.spacing(6),"& input, textarea":{fontWeight:400},"& fieldset":{borderColor:"#D5DFE9"}},"& fieldset":{borderColor:"#D5DFE9"},textInput:{padding:14.5},header:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",marginBottom:30},heading:{fontWeight:600,fontSize:"14px",lineHeight:"20px",letterSpacing:"-1.30385e-09px",color:"#2A323C"},description:{marginBottom:"5px",fontWeight:400,fontSize:"12px",lineHeight:"16px",color:"#5C6269"},label:{fontWeight:400,fontSize:"12px",lineHeight:"16px",color:"#2A323C"},addButtonWrapper:{display:"flex",justifyContent:"flex-end",padding:"0 30px"}})),APP_CENTER_NEW_TEXT={labelPublic:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"app-center-new.palette-integration-label.public",defaultMessage:"Public",description:"Label for palette integration public"}),labelToken:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"app-center-new.palette-integration-label.token",defaultMessage:"Token",description:"Label for palette integration token"}),tooltipTitle:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"app-center-new.palette-integration.form-title-close",defaultMessage:"Close",description:"Form label for close tooltip label"}),formControlLabelName:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"app-center-new.palette-integration.npm-npmjs-label",defaultMessage:"NPM Package stored on NPMJS.COM",description:"NPM Package stored on NPMJS.COM"}),formControlLabelUri:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"app-center-new.palette-integration.npm-uri-label",defaultMessage:"NPM Package stored at URI",description:"NPM Package stored at URI"})},PaletteIntegrationForm=({hidePanel:t,isEdit:s=!1,editIndex:a=-1})=>{var e=useStyles()["classes"];const n=useDispatch(),i=useSelector(selectNpmModules);var r=()=>s&&0<=a?i[a]:{stored:"npmjs.com",access:"public"},o=r();const[p,l]=react.exports.useState(r().stored),c=useForm({mode:"onChange",defaultValues:o});return jsxRuntime.exports.jsx(FormProvider,Object.assign({},c,{children:jsxRuntime.exports.jsxs("form",Object.assign({className:e.root,onSubmit:c.handleSubmit(e=>{void 0!==e.name&&void 0!==e.uri&&"uri"===e.stored?e.name=e.uri:void 0!==e.name&&void 0!==e.uri&&"npmjs.com"===e.stored?e.uri=e.name:"uri"===e.stored&&void 0===e.name?e.name=e.uri:"npmjs.com"===e.stored&&(e.uri="https://www.npmjs.com/package/"+e.name),s?n(actions.appFormState.updateNpmModule({npmModules:e,index:a})):n(actions.appFormState.addNpmModule(e)),t()})},{children:[jsxRuntime.exports.jsxs(Grid$1,Object.assign({className:e.container,container:!0,"data-test":"app-new-palette-integration-form-container"},{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({className:e.header},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h1",color:"secondary","data-test":"app-new-palette-integration-header-title"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"app-center-new.palette-integration.form-title",defaultMessage:"{label} Npm Module",description:"Form label for supported file types",values:{label:s?"Edit":"Add"}})})),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:APP_CENTER_NEW_TEXT.tooltipTitle()},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:t,"aria-labelledby":"app-center-new-close-panel","data-test":"app-description-input-icon"},{children:jsxRuntime.exports.jsx(Close,{})}))}))]})),jsxRuntime.exports.jsxs(Box$1,{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h6",gutterBottom:!0,className:e.heading,"data-test":"app-new-palette-integration-header-name"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"app-center-new.palette-integration-title.field-name",defaultMessage:"NPM Package or URI",description:"NPM Package/URI title"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({className:e.description},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"app-center-new.palette-integration-description.field-name",defaultMessage:"Please specify where the package is stored and choose the access level.",description:"NPM Package/URI description"})}))]}),jsxRuntime.exports.jsx(Box$1,Object.assign({py:4},{children:jsxRuntime.exports.jsxs(InputRadioGroup,Object.assign({name:"stored"},{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({mb:5},{children:[jsxRuntime.exports.jsx(FormControlLabel,{className:e.description,label:jsxRuntime.exports.jsx(Typography$1,Object.assign({className:e.label},{children:APP_CENTER_NEW_TEXT.formControlLabelName()})),control:jsxRuntime.exports.jsx(Radio,{"data-test":"os-app-center-new-palette-integration-radio.name"}),value:"npmjs.com",onChange:()=>l("npmjs.com")}),jsxRuntime.exports.jsx(InputText,{disabled:"npmjs.com"!==p,inputProps:{maxLength:50,className:e.textInput},variant:"outlined",type:"text",name:"name",placeholder:"Package name",fullWidth:!0,"data-test":"app-new-palette-integration-name-content",rules:{required:"npmjs.com"===p,maxLength:50}})]})),jsxRuntime.exports.jsx(FormControlLabel,{className:e.description,label:jsxRuntime.exports.jsx(Typography$1,Object.assign({className:e.label},{children:APP_CENTER_NEW_TEXT.formControlLabelUri()})),control:jsxRuntime.exports.jsx(Radio,{"data-test":"os-app-center-new-palette-integration-radio.uri"}),value:"uri",onChange:()=>l("uri")}),jsxRuntime.exports.jsx(InputText,{disabled:"uri"!==p,inputProps:{maxLength:50,className:e.textInput},variant:"outlined",type:"text",name:"uri",placeholder:"URI",fullWidth:!0,"data-test":"app-new-palette-integration-uri-content",rules:{required:"uri"===p,maxLength:50}})]}))})),jsxRuntime.exports.jsx(InputRadioGroup,Object.assign({name:"access"},{children:jsxRuntime.exports.jsxs(Box$1,{children:[jsxRuntime.exports.jsx(FormControlLabel,{label:jsxRuntime.exports.jsx(Typography$1,Object.assign({className:e.label},{children:APP_CENTER_NEW_TEXT.labelPublic()})),control:jsxRuntime.exports.jsx(Radio,{}),"data-test":"os-app-center-new-palette-integration-radio.public",value:"public"}),jsxRuntime.exports.jsx(FormControlLabel,{label:jsxRuntime.exports.jsx(Typography$1,Object.assign({className:e.label},{children:APP_CENTER_NEW_TEXT.labelToken()})),control:jsxRuntime.exports.jsx(Radio,{}),"data-test":"os-app-center-new-palette-integration-radio.token",value:"token"})]})}))]})),jsxRuntime.exports.jsx(Box$1,Object.assign({className:e.addButtonWrapper},{children:jsxRuntime.exports.jsx(Button$1,Object.assign({type:"submit",disabled:!get_1(c,"formState.isValid"),variant:"contained",color:"primary","data-test":"app-new-palette-integration-button-submit"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-new-palette-integration.submit-button-label",defaultMessage:"{label}",description:"{label} Config Fields",values:{label:s?"Update":"Add"}})}))}))]}))}))},AppCenterPaletteIntegrationPanel=e=>jsxRuntime.exports.jsx(CacheProvider,Object.assign({value:muiCache},{children:jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(PaletteIntegrationForm,{hidePanel:e.hidePanel,isEdit:e.isEdit,editIndex:e.editIndex})})})}));export{AppCenterAddEnginePanel,AddFlowPanel as AppCenterAddFlowPanel,AddSchemaPanel as AppCenterAddSchemaPanel,AppCenterConfigFieldsForm,AppCenterNew,AppCenterPaletteIntegrationPanel};
|