aiware-js 1.0.0-master.43 → 1.0.0-master.430
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 +461 -158
- package/index.esm.css.gz +0 -0
- package/index.esm.js +1 -2418
- package/index.esm.js.gz +0 -0
- package/index.html +1 -1
- package/js-core.esm.js +1386 -0
- package/js-core.esm.js.gz +0 -0
- package/js-core.esm10.js +1 -0
- package/js-core.esm10.js.gz +0 -0
- package/js-core.esm11.js +1 -0
- package/js-core.esm11.js.gz +0 -0
- package/js-core.esm12.js +1 -0
- package/js-core.esm12.js.gz +0 -0
- package/js-core.esm13.js +1 -0
- package/js-core.esm13.js.gz +0 -0
- package/js-core.esm14.js +1 -0
- package/js-core.esm14.js.gz +0 -0
- package/js-core.esm15.js +1 -0
- package/js-core.esm15.js.gz +0 -0
- package/js-core.esm16.js +1 -0
- package/js-core.esm16.js.gz +0 -0
- package/js-core.esm17.js +240 -0
- package/js-core.esm17.js.gz +0 -0
- package/js-core.esm18.js +20 -0
- package/js-core.esm18.js.gz +0 -0
- package/js-core.esm19.js +1 -0
- package/js-core.esm19.js.gz +0 -0
- package/js-core.esm2.js +1 -0
- package/js-core.esm2.js.gz +0 -0
- package/js-core.esm20.js +1 -0
- package/js-core.esm20.js.gz +0 -0
- package/js-core.esm21.js +1 -0
- package/js-core.esm21.js.gz +0 -0
- package/js-core.esm22.js +1 -0
- package/js-core.esm22.js.gz +0 -0
- package/js-core.esm23.js +1 -0
- package/js-core.esm23.js.gz +0 -0
- package/js-core.esm24.js +1 -0
- package/js-core.esm24.js.gz +0 -0
- package/js-core.esm25.js +1 -0
- package/js-core.esm25.js.gz +0 -0
- package/js-core.esm26.js +1 -0
- package/js-core.esm26.js.gz +0 -0
- package/js-core.esm27.js +1 -0
- package/js-core.esm27.js.gz +0 -0
- package/js-core.esm28.js +1 -0
- package/js-core.esm28.js.gz +0 -0
- package/js-core.esm29.js +1 -0
- package/js-core.esm29.js.gz +0 -0
- package/js-core.esm3.js +1 -0
- package/js-core.esm3.js.gz +0 -0
- package/js-core.esm30.js +1 -0
- package/js-core.esm30.js.gz +0 -0
- package/js-core.esm31.js +1 -0
- package/js-core.esm31.js.gz +0 -0
- package/js-core.esm32.js +1 -0
- package/js-core.esm32.js.gz +0 -0
- package/js-core.esm33.js +1 -0
- package/js-core.esm33.js.gz +0 -0
- package/js-core.esm34.js +1 -0
- package/js-core.esm34.js.gz +0 -0
- package/js-core.esm35.js +1 -0
- package/js-core.esm35.js.gz +0 -0
- package/js-core.esm36.js +1 -0
- package/js-core.esm36.js.gz +0 -0
- package/js-core.esm37.js +14 -0
- package/js-core.esm37.js.gz +0 -0
- package/js-core.esm38.js +12 -0
- package/js-core.esm38.js.gz +0 -0
- package/js-core.esm39.js +54 -0
- package/js-core.esm39.js.gz +0 -0
- package/js-core.esm4.js +1 -0
- package/js-core.esm4.js.gz +0 -0
- package/js-core.esm40.js +1 -0
- package/js-core.esm40.js.gz +0 -0
- package/js-core.esm41.js +1 -0
- package/js-core.esm41.js.gz +0 -0
- package/js-core.esm42.js +108 -0
- package/js-core.esm42.js.gz +0 -0
- package/js-core.esm43.js +1 -0
- package/js-core.esm43.js.gz +0 -0
- package/js-core.esm44.js +214 -0
- package/js-core.esm44.js.gz +0 -0
- package/js-core.esm45.js +1 -0
- package/js-core.esm45.js.gz +0 -0
- package/js-core.esm46.js +1 -0
- package/js-core.esm46.js.gz +0 -0
- package/js-core.esm47.js +1 -0
- package/js-core.esm47.js.gz +0 -0
- package/js-core.esm48.js +1 -0
- package/js-core.esm48.js.gz +0 -0
- package/js-core.esm49.js +1 -0
- package/js-core.esm49.js.gz +0 -0
- package/js-core.esm5.js +56 -0
- package/js-core.esm5.js.gz +0 -0
- package/js-core.esm50.js +37 -0
- package/js-core.esm50.js.gz +0 -0
- package/js-core.esm51.js +1 -0
- package/js-core.esm51.js.gz +0 -0
- package/js-core.esm52.js +1 -0
- package/js-core.esm52.js.gz +0 -0
- package/js-core.esm53.js +1 -0
- package/js-core.esm53.js.gz +0 -0
- package/js-core.esm54.js +1 -0
- package/js-core.esm54.js.gz +0 -0
- package/js-core.esm55.js +1 -0
- package/js-core.esm55.js.gz +0 -0
- package/js-core.esm56.js +31 -0
- package/js-core.esm56.js.gz +0 -0
- package/js-core.esm57.js +32 -0
- package/js-core.esm57.js.gz +0 -0
- package/js-core.esm58.js +85 -0
- package/js-core.esm58.js.gz +0 -0
- package/js-core.esm59.js +1 -0
- package/js-core.esm59.js.gz +0 -0
- package/js-core.esm6.js +1 -0
- package/js-core.esm6.js.gz +0 -0
- package/js-core.esm60.js +56 -0
- package/js-core.esm60.js.gz +0 -0
- package/js-core.esm61.js +112 -0
- package/js-core.esm61.js.gz +0 -0
- package/js-core.esm62.js +167 -0
- package/js-core.esm62.js.gz +0 -0
- package/js-core.esm63.js +75 -0
- package/js-core.esm63.js.gz +0 -0
- package/js-core.esm64.js +13 -0
- package/js-core.esm64.js.gz +0 -0
- package/js-core.esm65.js +1 -0
- package/js-core.esm65.js.gz +0 -0
- package/js-core.esm66.js +1 -0
- package/js-core.esm66.js.gz +0 -0
- package/js-core.esm67.js +121 -0
- package/js-core.esm67.js.gz +0 -0
- package/js-core.esm68.js +30 -0
- package/js-core.esm68.js.gz +0 -0
- package/js-core.esm69.js +20 -0
- package/js-core.esm69.js.gz +0 -0
- package/js-core.esm7.js +595 -0
- package/js-core.esm7.js.gz +0 -0
- package/js-core.esm70.js +14 -0
- package/js-core.esm70.js.gz +0 -0
- package/js-core.esm71.js +1 -0
- package/js-core.esm71.js.gz +0 -0
- package/js-core.esm72.js +42 -0
- package/js-core.esm72.js.gz +0 -0
- package/js-core.esm73.js +1 -0
- package/js-core.esm73.js.gz +0 -0
- package/js-core.esm74.js +1 -0
- package/js-core.esm74.js.gz +0 -0
- package/js-core.esm75.js +1 -0
- package/js-core.esm75.js.gz +0 -0
- package/js-core.esm76.js +1 -0
- package/js-core.esm76.js.gz +0 -0
- package/js-core.esm77.js +1 -0
- package/js-core.esm77.js.gz +0 -0
- package/js-core.esm78.js +1 -0
- package/js-core.esm78.js.gz +0 -0
- package/js-core.esm79.js +1 -0
- package/js-core.esm79.js.gz +0 -0
- package/js-core.esm8.js +1 -0
- package/js-core.esm8.js.gz +0 -0
- package/js-core.esm80.js +1 -0
- package/js-core.esm80.js.gz +0 -0
- package/js-core.esm81.js +1 -0
- package/js-core.esm81.js.gz +0 -0
- package/js-core.esm9.js +1 -0
- package/js-core.esm9.js.gz +0 -0
- package/js-core.umd.css +599 -358
- package/js-core.umd.css.gz +0 -0
- package/js-core.umd.js +1586 -427
- package/js-core.umd.js.gz +0 -0
- package/lib/js.d.ts +5 -2
- package/lib/rate-limiter.d.ts +6 -0
- package/lib/registry.d.ts +2 -8
- package/lib/widgetHandler.d.ts +19 -3
- package/locales/en.json +1 -1
- package/locales/es.json +1 -1
- package/locales/fr.json +1 -1
- package/package.json +50 -22
- package/index.umd.css +0 -486
package/js-core.esm18.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import{cD as useTheme,cE as getThemeProps,r as react,cF as useEnhancedEffect,cG as React,cH as _arrayPush,cI as isArray_1,b_ as _baseIteratee,cJ as _baseToString,cK as _baseTrim,cL as _castSlice,cM as _stringToArray,cN as toString_1,bY as _createCompounder,m as makeStyles,j as jsxRuntime,G as Grid,ar as Button,cw as Add,H as createSlice,c2 as combineReducers,c3 as createSelector,O as rootApiSelector,R as graphEndpointSelector,Q as sessionTokenSelector,c4 as fork,T as Typography,F as FormattedMessage,cC as DynamicTable,ad as takeLatest$1,aG as TableRow,aH as TableCell,cO as EditList,co as Delete,cf as delay,ag as select,ai as call$7,af as put,p as lodash,bT as showMessage,bU as MessageSeverity,a9 as IconButton,cu as baseGraphQLApiWithError,i as useDispatch,k as useSelector,K as DynamicModuleLoader,w as TextField,bC as isNil_1,a2 as all$2,M as preferredLanguageSelector,b1 as AIWareFormatMessage,bf as React$1,cP as ReactIs,cQ as upperFirst_1,b$ as isArrayLike_1,cR as isString_1,c0 as toInteger_1,z as createSvgIcon,C as interopRequireDefault,bG as map_1,cS as _baseGet,cT as _baseSlice,cU as _castPath,cV as _toKey,cW as _isIndex,bF as get_1,cX as channel,cY as useIntl,v as FormControl,aS as Select,bM as FormHelperText$2,ao as FormControlLabel,ap as Checkbox,bI as RadioGroup,B as Box,b8 as InputUnstyled,bu as CacheProvider,bv as muiCache,c5 as AIWareThemeProvider,A as AIWareIntlProvider,bz as isEmpty_1,cZ as VideoCamera,c_ as Image,c$ as Sound,d0 as Description,bD as UpDown,bE as Icon,bH as keys_1,aw as CircularProgress,d1 as toNumber_1,a8 as Tooltip,c7 as Close,cd as unmountPanel,ch as mountPanel,d2 as ProgressStepper,bV as Radio,d3 as size_1,x as classNames,b as styled,aL as Popper,d4 as take,aT as MenuItem,a7 as Divider$1,d5 as CurlyBraces,d6 as UnknownDocument,b4 as useTheme$1,d7 as sdkEventManager,d8 as SdkEvents,d9 as SdkError,aV as default_1$6,bn as Bookmark,bo as EngineFlagIcons,da as EngineClassIcons,db as Mode2,dc as EngineModeIcons,dd as DeploymentModelIcons,aZ as Tabs,a_ as Tab,c8 as FullscreenExit,c9 as Fullscreen,ca as TabPanel,cr as img$1w,cz as Collapse,de as guid}from"./js-core.esm.js";import{_ as _baseFlatten}from"./js-core.esm32.js";import{_ as _copyArray,a as _baseRest,i as isArrayLikeObject_1,l as last_1,b as _baseOrderBy,s as sortBy_1}from"./js-core.esm27.js";import{_ as _baseSet,v as values_1,m as merge_1}from"./js-core.esm25.js";import{_ as _baseUniq,a as _baseIndexOf}from"./js-core.esm33.js";import{f as filter_1}from"./js-core.esm26.js";import{d as default_1$2}from"./js-core.esm8.js";import{d as default_1$1,P as PropTypes,a as useFormContext,C as Controller,b as useFieldArray,u as useForm,F as FormProvider,k as kebabCase_1}from"./js-core.esm12.js";import{h as has_1}from"./js-core.esm13.js";import{f as find_1,a as findIndex_1}from"./js-core.esm14.js";import{A as Autocomplete,a as autocompleteClasses,L as ListSubheader}from"./js-core.esm21.js";import{C as Chip$1}from"./js-core.esm31.js";import{d as default_1$4,a as default_1$5}from"./js-core.esm19.js";import{d as default_1$3}from"./js-core.esm28.js";import{V as VariableSizeList}from"./js-core.esm29.js";import{B as Box$1}from"./js-core.esm30.js";function useMediaQueryOld(i,e,r,t,n){const s="undefined"!=typeof window&&void 0!==window.matchMedia,[o,a]=react.exports.useState(()=>n&&s?r(i).matches:t?t(i).matches:e);return useEnhancedEffect(()=>{let e=!0;if(s){const t=r(i),n=()=>{e&&a(t.matches)};return n(),t.addListener(n),()=>{e=!1,t.removeListener(n)}}},[i,r,s]),o}const maybeReactUseSyncExternalStore=React.useSyncExternalStore;function useMediaQueryNew(n,e,i,t){const r=react.exports.useCallback(()=>e,[e]);var s=react.exports.useMemo(()=>{if(null===t)return r;{const e=t(n)["matches"];return()=>e}},[r,n,t]),[o,a]=react.exports.useMemo(()=>{if(null===i)return[r,()=>()=>{}];const t=i(n);return[()=>t.matches,e=>(t.addListener(e),()=>{t.removeListener(e)})]},[r,i,n]);return maybeReactUseSyncExternalStore(a,o,s)}function useMediaQuery(e,t={}){var n=useTheme(),i="undefined"!=typeof window&&void 0!==window.matchMedia,{defaultMatches:t=!1,matchMedia:i=i?window.matchMedia:null,ssrMatchMedia:r=null,noSsr:s}=getThemeProps({name:"MuiUseMediaQuery",props:t,theme:n});let o="function"==typeof e?e(n):e;o=o.replace(/^@media( ?)/m,"");const a=void 0!==maybeReactUseSyncExternalStore?useMediaQueryNew:useMediaQueryOld;return a(o,t,i,r,s)}var arrayPush=_arrayPush,baseFlatten$2=_baseFlatten,copyArray=_copyArray,isArray$2=isArray_1;function concat$2(){var e=arguments.length;if(!e)return[];for(var t=Array(e-1),n=arguments[0],i=e;i--;)t[i-1]=arguments[i];return arrayPush(isArray$2(n)?copyArray(n):[n],baseFlatten$2(t,1))}var concat_1=concat$2,baseSet=_baseSet;function set$1(e,t,n){return null==e?e:baseSet(e,t,n)}var set_1=set$1,baseFlatten$1=_baseFlatten,baseIteratee$1=_baseIteratee,baseRest=_baseRest,baseUniq=_baseUniq,isArrayLikeObject=isArrayLikeObject_1,last$1=last_1,unionBy=_baseRest(function(e){var t=last$1(e);return isArrayLikeObject(t)&&(t=void 0),baseUniq(baseFlatten$1(e,1,isArrayLikeObject,!0),baseIteratee$1(t))}),unionBy_1=unionBy,baseIndexOf$2=_baseIndexOf;function charsEndIndex$1(e,t){for(var n=e.length;n--&&-1<baseIndexOf$2(t,e[n],0););return n}var _charsEndIndex=charsEndIndex$1,baseIndexOf$1=_baseIndexOf;function charsStartIndex$1(e,t){for(var n=-1,i=e.length;++n<i&&-1<baseIndexOf$1(t,e[n],0););return n}var _charsStartIndex=charsStartIndex$1,baseToString=_baseToString,baseTrim=_baseTrim,castSlice=_castSlice,charsEndIndex=charsEndIndex$1,charsStartIndex=charsStartIndex$1,stringToArray=_stringToArray,toString$5=toString_1;function trim$1(e,t,n){if((e=toString$5(e))&&(n||void 0===t))return baseTrim(e);if(!e||!(t=baseToString(t)))return e;n=stringToArray(e),e=stringToArray(t),t=charsStartIndex(n,e),e=charsEndIndex(n,e)+1;return castSlice(n,t,e).join("")}var match,version,store,wmget,wmhas,wmset,set,get,has,STATE,EmptyStringDescriptionStore,SymbolWrapper,NATIVE_SYMBOL,symbolToString,symbolValueOf,regexp,replace,stringSlice,LoadingStatus$1,trim_1=trim$1,createCompounder$1=_createCompounder,lowerCase=_createCompounder(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),lowerCase_1=lowerCase,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$c=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$c=NATIVE_BIND&&bind.bind(call$5,call$5),functionUncurryThis=NATIVE_BIND?function(e){return e&&uncurryThis$c(e)}:function(e){return e&&function(){return call$5.apply(e,arguments)}},uncurryThis$b=functionUncurryThis,toString$3=uncurryThis$b({}.toString),stringSlice$1=uncurryThis$b("".slice),classofRaw$1=function(e){return stringSlice$1(toString$3(e),8,-1)},uncurryThis$a=functionUncurryThis,fails$8=fails$b,classof$2=classofRaw$1,$Object$4=Object,split=functionUncurryThis("".split),indexedObject=fails$8(function(){return!$Object$4("z").propertyIsEnumerable(0)})?function(e){return"String"==classof$2(e)?split(e,""):$Object$4(e)}:$Object$4,$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$g=function(e){return"function"==typeof e},isCallable$f=isCallable$g,isObject$5=function(e){return"object"==typeof e?null!==e:isCallable$f(e)},global$b=global$c,isCallable$e=isCallable$g,aFunction=function(e){return isCallable$e(e)?e:void 0},getBuiltIn$4=function(e,t){return arguments.length<2?aFunction(global$b[e]):global$b[e]&&global$b[e][t]},uncurryThis$9=functionUncurryThis,objectIsPrototypeOf=functionUncurryThis({}.isPrototypeOf),getBuiltIn$3=getBuiltIn$4,engineUserAgent=getBuiltIn$4("navigator","userAgent")||"",global$a=global$c,userAgent=engineUserAgent,process=global$a.process,Deno=global$a.Deno,versions=process&&process.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$2=nativeSymbol,useSymbolAsUid=nativeSymbol&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,getBuiltIn$2=getBuiltIn$4,isCallable$d=isCallable$g,isPrototypeOf$1=objectIsPrototypeOf,USE_SYMBOL_AS_UID$1=useSymbolAsUid,$Object$3=Object,isSymbol$2=useSymbolAsUid?function(e){return"symbol"==typeof e}:function(e){var t=getBuiltIn$2("Symbol");return isCallable$d(t)&&isPrototypeOf$1(t.prototype,$Object$3(e))},$String$3=String,tryToString$1=function(e){try{return $String$3(e)}catch(e){return"Object"}},isCallable$c=isCallable$g,tryToString=tryToString$1,$TypeError$5=TypeError,aCallable$1=function(e){if(isCallable$c(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$b=isCallable$g,isObject$4=isObject$5,$TypeError$4=TypeError,ordinaryToPrimitive$1=function(e,t){var n,i;if("string"===t&&isCallable$b(n=e.toString)&&!isObject$4(i=call$4(n,e)))return i;if(isCallable$b(n=e.valueOf)&&!isObject$4(i=call$4(n,e)))return i;if("string"!==t&&isCallable$b(n=e.toString)&&!isObject$4(i=call$4(n,e)))return i;throw $TypeError$4("Can't convert object to primitive value")},shared$3={exports:{}},global$9=global$c,defineProperty$6=Object.defineProperty,defineGlobalProperty$3=function(t,n){try{defineProperty$6(global$9,t,{value:n,configurable:!0,writable:!0})}catch(e){global$9[t]=n}return n},global$8=global$c,defineGlobalProperty$2=defineGlobalProperty$3,SHARED="__core-js_shared__",store$3=global$c[SHARED]||defineGlobalProperty$2(SHARED,{}),sharedStore=store$3,store$2=sharedStore,requireObjectCoercible=((shared$3.exports=function(e,t){return store$2[e]||(store$2[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.24.1",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.24.1/LICENSE",source:"https://github.com/zloirock/core-js"}),requireObjectCoercible$2),$Object$2=Object,toObject$3=function(e){return $Object$2(requireObjectCoercible(e))},uncurryThis$8=functionUncurryThis,toObject$2=toObject$3,hasOwnProperty$1=functionUncurryThis({}.hasOwnProperty),hasOwnProperty_1=Object.hasOwn||function(e,t){return hasOwnProperty$1(toObject$2(e),t)},uncurryThis$7=functionUncurryThis,id=0,postfix=Math.random(),toString$2$1=uncurryThis$7(1..toString),uid$2=function(e){return"Symbol("+(void 0===e?"":e)+")_"+toString$2$1(++id+postfix,36)},global$7=global$c,shared$2=shared$3.exports,hasOwn$9=hasOwnProperty_1,uid$1=uid$2,NATIVE_SYMBOL$1=nativeSymbol,USE_SYMBOL_AS_UID=useSymbolAsUid,WellKnownSymbolsStore=shared$2("wks"),Symbol$1=global$7.Symbol,symbolFor=Symbol$1&&Symbol$1.for,createWellKnownSymbol=USE_SYMBOL_AS_UID?Symbol$1:Symbol$1&&Symbol$1.withoutSetter||uid$1,wellKnownSymbol$8=function(e){var t;return hasOwn$9(WellKnownSymbolsStore,e)&&(NATIVE_SYMBOL$1||"string"==typeof WellKnownSymbolsStore[e])||(t="Symbol."+e,NATIVE_SYMBOL$1&&hasOwn$9(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$7=wellKnownSymbol$8,$TypeError$3=TypeError,TO_PRIMITIVE=wellKnownSymbol$8("toPrimitive"),toPrimitive$1=function(e,t){if(!isObject$3(e)||isSymbol$1(e))return e;var n=getMethod(e,TO_PRIMITIVE);if(n){if(n=call$3(n,e,t=void 0===t?"default":t),!isObject$3(n)||isSymbol$1(n))return n;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$6=global$c,isObject$2=isObject$5,document$1$1=global$c.document,EXISTS$1=isObject$2(document$1$1)&&isObject$2(document$1$1.createElement),documentCreateElement$2=function(e){return EXISTS$1?document$1$1.createElement(e):{}},DESCRIPTORS$a=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$9=descriptors,call$2=functionCall,propertyIsEnumerableModule$1=objectPropertyIsEnumerable,createPropertyDescriptor$2=createPropertyDescriptor$3,toIndexedObject$4=toIndexedObject$5,toPropertyKey$1=toPropertyKey$2,hasOwn$8=hasOwnProperty_1,IE8_DOM_DEFINE$1=ie8DomDefine,$getOwnPropertyDescriptor$1=Object.getOwnPropertyDescriptor,objectDefineProperty=(objectGetOwnPropertyDescriptor.f=DESCRIPTORS$9?$getOwnPropertyDescriptor$1:function(e,t){if(e=toIndexedObject$4(e),t=toPropertyKey$1(t),IE8_DOM_DEFINE$1)try{return $getOwnPropertyDescriptor$1(e,t)}catch(e){}if(hasOwn$8(e,t))return createPropertyDescriptor$2(!call$2(propertyIsEnumerableModule$1.f,e,t),e[t])},{}),DESCRIPTORS$8=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$2=String,$TypeError$2=TypeError,anObject$5=function(e){if(isObject$1(e))return e;throw $TypeError$2($String$2(e)+" is not an object")},DESCRIPTORS$7=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$6=(objectDefineProperty.f=DESCRIPTORS$7?V8_PROTOTYPE_DEFINE_BUG$1?function(e,t,n){var i;return anObject$4(e),t=toPropertyKey(t),anObject$4(n),"function"==typeof e&&"prototype"===t&&"value"in n&&WRITABLE in n&&!n[WRITABLE]&&((i=$getOwnPropertyDescriptor(e,t))&&i[WRITABLE]&&(e[t]=n.value,n={configurable:(CONFIGURABLE$1 in n?n:i)[CONFIGURABLE$1],enumerable:(ENUMERABLE in n?n:i)[ENUMERABLE],writable:!1})),$defineProperty(e,t,n)}:$defineProperty:function(e,t,n){if(anObject$4(e),t=toPropertyKey(t),anObject$4(n),IE8_DOM_DEFINE)try{return $defineProperty(e,t,n)}catch(e){}if("get"in n||"set"in n)throw $TypeError$1("Accessors not supported");return"value"in n&&(e[t]=n.value),e},descriptors),definePropertyModule$3=objectDefineProperty,createPropertyDescriptor$1=createPropertyDescriptor$3,createNonEnumerableProperty$4=DESCRIPTORS$6?function(e,t,n){return definePropertyModule$3.f(e,t,createPropertyDescriptor$1(1,n))}:function(e,t,n){return e[t]=n,e},makeBuiltIn$2={exports:{}},DESCRIPTORS$5=descriptors,hasOwn$7=hasOwnProperty_1,FunctionPrototype=Function.prototype,getDescriptor=DESCRIPTORS$5&&Object.getOwnPropertyDescriptor,EXISTS=hasOwn$7(FunctionPrototype,"name"),PROPER=EXISTS&&"something"===function(){}.name,CONFIGURABLE=EXISTS&&(!DESCRIPTORS$5||getDescriptor(FunctionPrototype,"name").configurable),functionName={EXISTS:EXISTS,PROPER:PROPER,CONFIGURABLE:CONFIGURABLE},uncurryThis$6=functionUncurryThis,isCallable$a=isCallable$g,store$1=sharedStore,functionToString=functionUncurryThis(Function.toString),inspectSource$2=(isCallable$a(store$1.inspectSource)||(store$1.inspectSource=function(e){return functionToString(e)}),store$1.inspectSource),global$5=global$c,isCallable$9=isCallable$g,inspectSource$1=inspectSource$2,WeakMap$1=global$c.WeakMap,nativeWeakMap=isCallable$9(WeakMap$1)&&/native code/.test(inspectSource$1(WeakMap$1)),shared$1=shared$3.exports,uid=uid$2,keys$1=shared$1("keys"),sharedKey$3=function(e){return keys$1[e]||(keys$1[e]=uid(e))},hiddenKeys$4={},NATIVE_WEAK_MAP=nativeWeakMap,global$4=global$c,uncurryThis$5=functionUncurryThis,isObject=isObject$5,createNonEnumerableProperty$3=createNonEnumerableProperty$4,hasOwn$6=hasOwnProperty_1,shared=sharedStore,sharedKey$2=sharedKey$3,hiddenKeys$3=hiddenKeys$4,OBJECT_ALREADY_INITIALIZED="Object already initialized",TypeError$1=global$4.TypeError,WeakMap=global$4.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$5(store.get),wmhas=uncurryThis$5(store.has),wmset=uncurryThis$5(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$6(e,STATE))throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);return t.facade=e,createNonEnumerableProperty$3(e,STATE,t),t},get=function(e){return hasOwn$6(e,STATE)?e[STATE]:{}},function(e){return hasOwn$6(e,STATE)}),{set:set,get:get,has:has,enforce:enforce,getterFor:getterFor}),fails$4=fails$b,isCallable$8=isCallable$g,hasOwn$5=hasOwnProperty_1,DESCRIPTORS$4=descriptors,CONFIGURABLE_FUNCTION_NAME$1=functionName.CONFIGURABLE,inspectSource=inspectSource$2,InternalStateModule$1=internalState,enforceInternalState=InternalStateModule$1.enforce,getInternalState$1=InternalStateModule$1.get,defineProperty$5=Object.defineProperty,CONFIGURABLE_LENGTH=DESCRIPTORS$4&&!fails$4(function(){return 8!==defineProperty$5(function(){},"length",{value:8}).length}),TEMPLATE=String(String).split("String"),makeBuiltIn$1=makeBuiltIn$2.exports=function(e,t,n){"Symbol("===String(t).slice(0,7)&&(t="["+String(t).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!hasOwn$5(e,"name")||CONFIGURABLE_FUNCTION_NAME$1&&e.name!==t)&&(DESCRIPTORS$4?defineProperty$5(e,"name",{value:t,configurable:!0}):e.name=t),CONFIGURABLE_LENGTH&&n&&hasOwn$5(n,"arity")&&e.length!==n.arity&&defineProperty$5(e,"length",{value:n.arity});try{n&&hasOwn$5(n,"constructor")&&n.constructor?DESCRIPTORS$4&&defineProperty$5(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}n=enforceInternalState(e);return hasOwn$5(n,"source")||(n.source=TEMPLATE.join("string"==typeof t?t:"")),e},isCallable$7=(Function.prototype.toString=makeBuiltIn$1(function(){return isCallable$8(this)&&getInternalState$1(this).source||inspectSource(this)},"toString"),isCallable$g),definePropertyModule$2=objectDefineProperty,makeBuiltIn=makeBuiltIn$2.exports,defineGlobalProperty$1=defineGlobalProperty$3,defineBuiltIn$3=function(e,t,n,i){var r=(i=i||{}).enumerable,s=void 0!==i.name?i.name:t;if(isCallable$7(n)&&makeBuiltIn(n,s,i),i.global)r?e[t]=n:defineGlobalProperty$1(t,n);else{try{i.unsafe?e[t]&&(r=!0):delete e[t]}catch(e){}r?e[t]=n:definePropertyModule$2.f(e,t,{value:n,enumerable:!1,configurable:!i.nonConfigurable,writable:!i.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,n){var i,r=toIndexedObject$3(e),s=lengthOfArrayLike(r),o=toAbsoluteIndex(n,s);if(a&&t!=t){for(;o<s;)if((i=r[o++])!=i)return!0}else for(;o<s;o++)if((a||o in r)&&r[o]===t)return a||o||0;return!a&&-1}},arrayIncludes={includes:createMethod(!0),indexOf:createMethod(!1)},uncurryThis$4=functionUncurryThis,hasOwn$4=hasOwnProperty_1,toIndexedObject$2=toIndexedObject$5,indexOf=arrayIncludes.indexOf,hiddenKeys$2=hiddenKeys$4,push$1=uncurryThis$4([].push),objectKeysInternal=function(e,t){var n,i=toIndexedObject$2(e),r=0,s=[];for(n in i)!hasOwn$4(hiddenKeys$2,n)&&hasOwn$4(i,n)&&push$1(s,n);for(;t.length>r;)!hasOwn$4(i,n=t[r++])||~indexOf(s,n)||push$1(s,n);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$3=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)),n=getOwnPropertySymbolsModule$1.f;return n?concat$1(t,n(e)):t},hasOwn$3=hasOwnProperty_1,ownKeys=ownKeys$1,getOwnPropertyDescriptorModule=objectGetOwnPropertyDescriptor,definePropertyModule$1=objectDefineProperty,copyConstructorProperties$2=function(e,t,n){for(var i=ownKeys(t),r=definePropertyModule$1.f,s=getOwnPropertyDescriptorModule.f,o=0;o<i.length;o++){var a=i[o];hasOwn$3(e,a)||n&&hasOwn$3(n,a)||r(e,a,s(t,a))}},fails$3=fails$b,isCallable$6=isCallable$g,replacement=/#|\.prototype\./,isForced$1=function(e,t){e=data[normalize$3(e)];return e==POLYFILL||e!=NATIVE&&(isCallable$6(t)?fails$3(t):!!t)},normalize$3=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$3=global$c,getOwnPropertyDescriptor=objectGetOwnPropertyDescriptor.f,createNonEnumerableProperty$2=createNonEnumerableProperty$4,defineBuiltIn$2=defineBuiltIn$3,defineGlobalProperty=defineGlobalProperty$3,copyConstructorProperties$1=copyConstructorProperties$2,isForced=isForced_1,_export=function(e,t){var n,i,r,s=e.target,o=e.global,a=e.stat,l=o?global$3:a?global$3[s]||defineGlobalProperty(s,{}):(global$3[s]||{}).prototype;if(l)for(n in t){if(i=t[n],r=e.dontCallGetSet?(r=getOwnPropertyDescriptor(l,n))&&r.value:l[n],!isForced(o?n:s+(a?".":"#")+n,e.forced)&&void 0!==r){if(typeof i==typeof r)continue;copyConstructorProperties$1(i,r)}(e.sham||r&&r.sham)&&createNonEnumerableProperty$2(i,"sham",!0),defineBuiltIn$2(l,n,i,e)}},wellKnownSymbol$6=wellKnownSymbol$8,TO_STRING_TAG$3=wellKnownSymbol$8("toStringTag"),test={},toStringTagSupport=(test[TO_STRING_TAG$3]="z","[object z]"===String(test)),TO_STRING_TAG_SUPPORT=toStringTagSupport,isCallable$5=isCallable$g,classofRaw=classofRaw$1,wellKnownSymbol$5=wellKnownSymbol$8,TO_STRING_TAG$2=wellKnownSymbol$8("toStringTag"),$Object$1=Object,CORRECT_ARGUMENTS="Arguments"==classofRaw(function(){return arguments}()),tryGet=function(e,t){try{return e[t]}catch(e){}},classof$1=TO_STRING_TAG_SUPPORT?classofRaw:function(e){var t;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(t=tryGet(e=$Object$1(e),TO_STRING_TAG$2))?t:CORRECT_ARGUMENTS?classofRaw(e):"Object"==(t=classofRaw(e))&&isCallable$5(e.callee)?"Arguments":t},classof=classof$1,$String$1=String,toString$1$1=function(e){if("Symbol"===classof(e))throw TypeError("Cannot convert a Symbol value to a string");return $String$1(e)},$$2=_export,DESCRIPTORS$3=descriptors,global$2=global$c,uncurryThis$2=functionUncurryThis,hasOwn$2=hasOwnProperty_1,isCallable$4=isCallable$g,isPrototypeOf=objectIsPrototypeOf,toString$4=toString$1$1,defineProperty$4=objectDefineProperty.f,copyConstructorProperties=copyConstructorProperties$2,NativeSymbol=global$2.Symbol,SymbolPrototype=NativeSymbol&&NativeSymbol.prototype,internalObjectKeys=(!DESCRIPTORS$3||!isCallable$4(NativeSymbol)||"description"in SymbolPrototype&&void 0===NativeSymbol().description||(EmptyStringDescriptionStore={},copyConstructorProperties(SymbolWrapper=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:toString$4(arguments[0]),t=isPrototypeOf(SymbolPrototype,this)?new NativeSymbol(e):void 0===e?NativeSymbol():NativeSymbol(e);return""===e&&(EmptyStringDescriptionStore[t]=!0),t},NativeSymbol),(SymbolWrapper.prototype=SymbolPrototype).constructor=SymbolWrapper,NATIVE_SYMBOL="Symbol(test)"==String(NativeSymbol("test")),symbolToString=uncurryThis$2(SymbolPrototype.toString),symbolValueOf=uncurryThis$2(SymbolPrototype.valueOf),regexp=/^Symbol\((.*)\)[^)]+$/,replace=uncurryThis$2("".replace),stringSlice=uncurryThis$2("".slice),defineProperty$4(SymbolPrototype,"description",{configurable:!0,get:function(){var e=symbolValueOf(this),t=symbolToString(e);if(hasOwn$2(EmptyStringDescriptionStore,e))return"";e=NATIVE_SYMBOL?stringSlice(t,7,-1):replace(t,regexp,"$1");return""===e?void 0:e}}),$$2({global:!0,constructor:!0,forced:!0},{Symbol:SymbolWrapper})),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={},n=Symbol(),i="abcdefghijklmnopqrst";return e[n]=7,i.split("").forEach(function(e){t[e]=e}),7!=$assign({},e)[n]||objectKeys$1($assign({},t)).join("")!=i})?function(e,t){for(var n=toObject$1(e),i=arguments.length,r=1,s=getOwnPropertySymbolsModule.f,o=propertyIsEnumerableModule.f;r<i;)for(var a,l=IndexedObject(arguments[r++]),c=s?concat(objectKeys$1(l),s(l)):objectKeys$1(l),u=c.length,p=0;p<u;)a=c[p++],DESCRIPTORS$2&&!call$1(o,l,a)||(n[a]=l[a]);return n}:$assign,$$1=_export,assign=objectAssign;_export({target:"Object",stat:!0,arity:2,forced:Object.assign!==assign},{assign:assign});const useListFieldStyles=makeStyles()(e=>({heading:{fontWeight:600,fontSize:"14px",lineHeight:"20px",letterSpacing:"-1.30385e-09px",color:"#2A323C"},description:{fontWeight:400,fontSize:"12px",lineHeight:"16px",color:"#5C6269"},button:{display:"flex",height:"35px",justifyContent:"center",alignItems:"center",padding:"8px 10px",background:"#FFFFFF",border:"1px solid #1871E8",boxSizing:"border-box",borderRadius:"4px",fontStyle:"normal",fontWeight:600,fontSize:"14px",lineHeight:"19px",letterSpacing:"-1.30385e-09px",color:"#1871E8","& span > span":{marginRight:e.spacing(1)},"& svg":{color:"#1871E8"}}})),useListTableStyles=makeStyles()((e,t,n)=>({tableRow:{background:"#FFFFFF",height:"50px",["& ."+n.iconButton]:{visibility:"hidden"},["&:hover ."+n.iconButton]:{visibility:"visible"}},tableCell:{padding:e.spacing(2),maxWidth:300},iconTableCell:{padding:e.spacing(1)},rowText:{fontFamily:"Nunito",fontStyle:"normal",fontWeight:400,fontSize:"14px!important",lineHeight:"20px!important",letterSpacing:"-1.30385e-09px!important",color:"#2A323C!important"},iconButton:{height:"30px",width:"30px"}})),ListFieldHeading=({idPrefix:e,heading:t,description:n})=>{var i=useListFieldStyles()["classes"];return jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:12},{children:jsxRuntime.exports.jsx(Typography,Object.assign({"data-test":e+"-list-field-heading",className:i.heading},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"${idPrefix}-list-field-heading",defaultMessage:"{heading}",description:"{heading}",values:{prefix:e,heading:t}})}))})),jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:12},{children:jsxRuntime.exports.jsx(Typography,Object.assign({"data-test":e+"-list-field-description",className:i.description},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"${idPrefix}-list-field-description",defaultMessage:"{description}",description:"{description}",values:{prefix:e,description:n}})}))}))]})},ActionTableCell=({dataTest:e,icon:t,onClick:n})=>{var i=useListTableStyles()["classes"];return jsxRuntime.exports.jsx(TableCell,Object.assign({className:i.iconTableCell},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({"data-test":e,className:i.iconButton,onClick:n,size:"large"},{children:t}))}))},useRows=(e,t,r,s,o)=>{const a=useListTableStyles()["classes"];return e.map((n,i)=>jsxRuntime.exports.jsxs(TableRow,Object.assign({"data-test":"ecn.list-table-row."+i,className:a.tableRow,hover:!0},{children:[Object.keys(n).map((e,t)=>jsxRuntime.exports.jsx(TableCell,Object.assign({className:a.tableCell},{children:jsxRuntime.exports.jsx(Typography,Object.assign({"data-test":`ecn.table-cell-${e}.`+i,className:a.rowText,noWrap:!0},{children:jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment,{children:"string"==typeof n[e]||n[e]instanceof String?jsxRuntime.exports.jsx(FormattedMessage,{id:"ecn.table-cell.{key}.{rowIndex}",defaultMessage:"{value}",description:"{value}",values:{key:e,rowIndex:i,value:n[e]}}):n[e]})}))}),e+" "+t)),t&&jsxRuntime.exports.jsx(ActionTableCell,{dataTest:"ecn.list-table-row-edit-button."+i,onClick:()=>s(i),icon:jsxRuntime.exports.jsx(EditList,{fontSize:"small"})}),r&&jsxRuntime.exports.jsx(ActionTableCell,{dataTest:"ecn.list-table-row-delete-button."+i,onClick:()=>o(i),icon:jsxRuntime.exports.jsx(Delete,{fontSize:"small"})})]}),find_1(n)+" "+i))},ListTable=({idPrefix:e,columnNames:t,items:n,canEdit:i=!1,canDelete:r=!1,onEditClick:s,onDeleteClick:o,onRequestSort:a})=>jsxRuntime.exports.jsx(DynamicTable,{idPrefix:e,columnNames:t,rows:useRows(n,i,r,s,o),onRequestSort:a}),ListField=({idPrefix:e,heading:t,description:n,actionButtonLabel:i,items:r,columnNames:s,canEdit:o=!1,canDelete:a=!1,onActionClick:l,onEditClick:c,onDeleteClick:u,onRequestSort:p})=>{var d=useListFieldStyles()["classes"];return jsxRuntime.exports.jsxs(Grid,Object.assign({container:!0,spacing:2},{children:[t||n?jsxRuntime.exports.jsx(Grid,Object.assign({container:!0,item:!0,direction:"row",xs:6,justifyContent:"flex-start"},{children:jsxRuntime.exports.jsx(ListFieldHeading,{idPrefix:e,heading:t,description:n})})):null,jsxRuntime.exports.jsx(Grid,Object.assign({container:!0,item:!0,xs:6,justifyContent:"flex-end"},{children:i?jsxRuntime.exports.jsx(Button,Object.assign({"data-test":e+"-list-field-action-button",className:d.button,startIcon:jsxRuntime.exports.jsx(Add,{}),onClick:l},{children:i})):null})),jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:12},{children:jsxRuntime.exports.jsx(ListTable,{idPrefix:e,columnNames:s,items:r,canEdit:o,canDelete:a,onEditClick:c,onDeleteClick:u,onRequestSort:p})}))]}))};function __rest$1(e,t){var n={};for(r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function __awaiter$1(e,o,a,l){return new(a=a||Promise)(function(n,t){function i(e){try{s(l.next(e))}catch(e){t(e)}}function r(e){try{s(l.throw(e))}catch(e){t(e)}}function s(e){var t;e.done?n(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(i,r)}s((l=l.apply(e,o||[])).next())})}const SLICE_NAME$1="developerShared",namespace$2$1=(!function(e){e.Failed="failed",e.Idle="idle",e.Pending="pending"}(LoadingStatus$1=LoadingStatus$1||{}),"uiState"),initialState$1$1={status:LoadingStatus$1.Idle},slice$1$1=createSlice({name:SLICE_NAME$1+"/"+namespace$2$1,initialState:initialState$1$1,reducers:{}}),actions$2$1=slice$1$1.actions;var uiState$1$1=slice$1$1.reducer;const namespace$1$1="matchedEntityTagsState",initialState$4={userTagInput:"",matchedEntityTags:[],status:LoadingStatus$1.Idle},slice$4=createSlice({name:SLICE_NAME$1+"/"+namespace$1$1,initialState:initialState$4,reducers:{setUserTagInput:(e,{payload:t})=>{e.userTagInput=t},matchEntityTagsStart(e,{}){e.matchedEntityTags=[]},matchEntityTagsSuccess(e,{payload:t}){e.matchedEntityTags=t},matchEntityTagsFailed(e){e.status=LoadingStatus$1.Failed},clearUserTagInput(e){e.userTagInput=""}}}),actions$1$1=slice$4.actions;var entityTagsState=slice$4.reducer;const namespace$5=SLICE_NAME$1,actions$5={[namespace$2$1]:actions$2$1,[namespace$1$1]:actions$1$1},rootReducer$1=combineReducers({[namespace$2$1]:uiState$1$1,[namespace$1$1]:entityTagsState});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 n,i=toIndexedObject$1(t),r=objectKeys(t),s=r.length,o=0;o<s;)definePropertyModule.f(e,n=r[o++],i[n]);return e},getBuiltIn$4),html$1$1=getBuiltIn$4("document","documentElement"),anObject$1=anObject$5,definePropertiesModule=objectDefineProperties,enumBugKeys=enumBugKeys$3,hiddenKeys=hiddenKeys$4,html$3=html$1$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$3.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 n;return null!==e?(EmptyConstructor[PROTOTYPE]=anObject$1(e),n=new EmptyConstructor,EmptyConstructor[PROTOTYPE]=null,n[IE_PROTO$1]=e):n=NullProtoObject(),void 0===t?n:definePropertiesModule.f(n,t)}),wellKnownSymbol$4=wellKnownSymbol$8,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$g,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$g,getPrototypeOf$1=objectGetPrototypeOf,defineBuiltIn$1=defineBuiltIn$3,wellKnownSymbol$3=wellKnownSymbol$8,ITERATOR$2=wellKnownSymbol$8("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$a=hasOwnProperty_1,wellKnownSymbol$2=wellKnownSymbol$8,TO_STRING_TAG$1=wellKnownSymbol$8("toStringTag"),setToStringTag$2=function(e,t,n){(e=e&&!n?e.prototype:e)&&!hasOwn$a(e,TO_STRING_TAG$1)&&defineProperty$1(e,TO_STRING_TAG$1,{configurable:!0,value:t})},IteratorPrototype$1=iteratorsCore.IteratorPrototype,create$2=objectCreate,createPropertyDescriptor=createPropertyDescriptor$3,setToStringTag$1=setToStringTag$2,Iterators$2=iterators,returnThis$1=function(){return this},createIteratorConstructor$1=function(e,t,n,i){t+=" Iterator";return e.prototype=create$2(IteratorPrototype$1,{next:createPropertyDescriptor(+!i,n)}),setToStringTag$1(e,t,!1),Iterators$2[t]=returnThis$1,e},isCallable$1=isCallable$g,$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 n,i=!1,e={};try{(n=uncurryThis(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(e,[]),i=e instanceof Array}catch(e){}return function(e,t){return anObject(e),aPossiblePrototype(t),i?n(e,t):e.__proto__=t,e}}():void 0),$=_export,call=functionCall,FunctionName=functionName,isCallable=isCallable$g,createIteratorConstructor=createIteratorConstructor$1,getPrototypeOf=objectGetPrototypeOf,setPrototypeOf=objectSetPrototypeOf,setToStringTag=setToStringTag$2,createNonEnumerableProperty$1=createNonEnumerableProperty$4,defineBuiltIn=defineBuiltIn$3,wellKnownSymbol$1=wellKnownSymbol$8,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,n,i,r,s,o){createIteratorConstructor(n,t,i);function a(e){if(e===r&&m)return m;if(!BUGGY_SAFARI_ITERATORS&&e in p)return p[e];switch(e){case KEYS:case VALUES:case ENTRIES:return function(){return new n(this,e)}}return function(){return new n(this)}}var l,c,i=t+" Iterator",u=!1,p=e.prototype,d=p[ITERATOR$1]||p["@@iterator"]||r&&p[r],m=!BUGGY_SAFARI_ITERATORS&&d||a(r),g="Array"==t&&p.entries||d;if(g&&(g=getPrototypeOf(g.call(new e)))!==Object.prototype&&g.next&&(getPrototypeOf(g)!==IteratorPrototype&&(setPrototypeOf?setPrototypeOf(g,IteratorPrototype):isCallable(g[ITERATOR$1])||defineBuiltIn(g,ITERATOR$1,returnThis)),setToStringTag(g,i,!0)),PROPER_FUNCTION_NAME&&r==VALUES&&d&&d.name!==VALUES&&(CONFIGURABLE_FUNCTION_NAME?createNonEnumerableProperty$1(p,"name",VALUES):(u=!0,m=function(){return call(d,this)})),r)if(l={values:a(VALUES),keys:s?m:a(KEYS),entries:a(ENTRIES)},o)for(c in l)!BUGGY_SAFARI_ITERATORS&&!u&&c in p||defineBuiltIn(p,c,l[c]);else $({target:t,proto:!0,forced:BUGGY_SAFARI_ITERATORS||u},l);return p[ITERATOR$1]!==m&&defineBuiltIn(p,ITERATOR$1,m,{name:r}),Iterators$1[t]=m,l},toIndexedObject=toIndexedObject$5,addToUnscopables=addToUnscopables$1,Iterators=iterators,InternalStateModule=internalState,defineProperty$7=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,n=e.kind,i=e.index++;return!t||i>=t.length?{value:e.target=void 0,done:!0}:"keys"==n?{value:i,done:!1}:"values"==n?{value:t[i],done:!1}:{value:[i,t[i]],done:!1}},"values"),values$1=Iterators.Arguments=Iterators.Array;if(addToUnscopables("keys"),addToUnscopables("values"),addToUnscopables("entries"),DESCRIPTORS&&"values"!==values$1.name)try{defineProperty$7(values$1,"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$c,DOMIterables=domIterables,DOMTokenListPrototype=domTokenListPrototype,ArrayIteratorMethods=es_array_iterator,createNonEnumerableProperty=createNonEnumerableProperty$4,wellKnownSymbol=wellKnownSymbol$8,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 n in ArrayIteratorMethods)if(t[n]!==ArrayIteratorMethods[n])try{createNonEnumerableProperty(t,n,ArrayIteratorMethods[n])}catch(e){t[n]=ArrayIteratorMethods[n]}}};for(COLLECTION_NAME in DOMIterables)handlePrototype(global$1[COLLECTION_NAME]&&global$1[COLLECTION_NAME].prototype,COLLECTION_NAME);handlePrototype(DOMTokenListPrototype,"DOMTokenList");const matchEntityTags$1=(r,s={page:1,limit:30,input:{}})=>__awaiter$1(void 0,void 0,void 0,function*(){var{page:e,limit:t,input:n}=s,i="getMatchedEntityTags";return yield baseGraphQLApiWithError(Object.assign({query:"\n query getMatchedEntityTags ($offset: Int, $limit: Int, $input: MatchEntityTagInput!) {\n matchEntityTags(offset: $offset, limit: $limit, input: $input) {\n records {\n tagKey\n }\n }\n }\n ",variables:{offset:(e-1)*t,limit:t,input:n},operationName:i},r))}),selectUIStateStatus$1=e=>e[namespace$5].uiState.status;var uiState$2=Object.freeze({__proto__:null,selectUIStateStatus:selectUIStateStatus$1});const selectMatchedEntityTags=e=>e[namespace$5]?e[namespace$5].matchedEntityTagsState.matchedEntityTags:[],selectUserTagInput=e=>e[namespace$5]?e[namespace$5].matchedEntityTagsState.userTagInput:"";var entityTags=Object.freeze({__proto__:null,selectMatchedEntityTags:selectMatchedEntityTags,selectUserTagInput:selectUserTagInput});const selectApiConfigs$1$1=createSelector([rootApiSelector,graphEndpointSelector,sessionTokenSelector],(e,t,n)=>({apiRoot:e,graphQLEndpoint:t,token:n}));var selectors$1=Object.freeze({__proto__:null,selectApiConfigs:selectApiConfigs$1$1,uiState:uiState$2,entityTagsState:entityTags});const selectApiConfigs$2=selectors$1["selectApiConfigs"];function*matchEntityTags({payload:e}){yield delay(350);var e={page:1,limit:15,input:{tagKey:e}},t=yield select(selectApiConfigs$2);try{var n=yield call$7(matchEntityTags$1,t,e);yield put(actions$5.matchedEntityTagsState.matchEntityTagsSuccess(lodash.exports.get(n,"matchEntityTags.records",[])))}catch(e){console.log(e.message),yield put(showMessage({content:e.message,severity:MessageSeverity.Error})),yield put(actions$5.matchedEntityTagsState.matchEntityTagsFailed())}}function*watchMatchEntityTags(){yield takeLatest$1([actions$5.matchedEntityTagsState.setUserTagInput],matchEntityTags)}const entityTagsSagas=[fork(watchMatchEntityTags)];function*rootSaga$1(){yield all$2([...entityTagsSagas])}function getDeveloperCenterSharedModule(){return{id:SLICE_NAME$1,reducerMap:{[SLICE_NAME$1]:rootReducer$1},sagas:[rootSaga$1],initialActions:[]}}const useStyles$b=makeStyles()(e=>({helperDescription:{fontSize:"14px",marginBottom:"20px"},icon:{textAlign:"center",height:"1rem !important",margin:"0 3px"}})),HelpDocs$1=({className:e,helpLink:t,sx:n})=>{const i=useDispatch();var r=useSelector(preferredLanguageSelector);const s=AIWareFormatMessage(r);return jsxRuntime.exports.jsx(default_1$1,{className:e,onClick:()=>{has_1(window,"aiware.helpCenter.openDocsPanel")?window.aiware.helpCenter.openDocsPanel(t,!1):i(showMessage({content:s({id:"os-developer-new.snackbar.helpCenterUnavailable",defaultMessage:[{type:0,value:"Help Center is not currently available."}]}),severity:MessageSeverity.Warning}))},sx:n,style:{cursor:"pointer"},color:"secondary"})},Heading$1=({testName:e,title:t,description:n,helpLink:i})=>{var r=useStyles$b()["classes"];return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs(Typography,Object.assign({"data-test":e+"-title",style:{fontWeight:"bold"},variant:"h5"},{children:[t,!isNil_1(i)&&jsxRuntime.exports.jsx(HelpDocs$1,{className:r.icon,helpLink:i})]})),jsxRuntime.exports.jsx(Typography,Object.assign({"data-test":e+"-description",className:r.helperDescription},{children:n}))]})},EntityTags=e=>{var{setSelectedTags:n,selectedTags:t,helpLink:i=null}=e,e=__rest$1(e,["setSelectedTags","selectedTags","helpLink"]);const r=useDispatch();var s=useSelector(selectMatchedEntityTags),o=useSelector(selectUserTagInput);return jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getDeveloperCenterSharedModule()]},{children:jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx(Heading$1,{testName:"os-engine-center-new.engine-keyword-tags",title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.engine-keyword-tags",defaultMessage:"Tags",description:"Form name for keyword tags"}),description:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.engine-keyword-tags-description",defaultMessage:"Provide a tag for grouping of applications.",description:"Description for keyword tags"}),helpLink:i}),jsxRuntime.exports.jsx(Autocomplete,Object.assign({},e,{"data-test":"developer-shared-entity-tags-autocomplete",multiple:!0,options:s,disabled:10<=(null==t?void 0:t.length),value:t,inputValue:o,onChange:(e,t)=>{t=t.map(e=>"string"==typeof e?{tagKey:e.toLowerCase()}:e);n(t)},onInputChange:(e,t)=>{r(actions$1$1.setUserTagInput(t))},freeSolo:!0,filterSelectedOptions:!0,isOptionEqualToValue:(e,t)=>"string"==typeof e?e.toLowerCase()===t.tagKey.toLowerCase():e.tagKey.toLowerCase()===t.tagKey.toLowerCase(),getOptionLabel:e=>e.tagKey.toLowerCase(),renderTags:(e,n)=>e.map((e,t)=>jsxRuntime.exports.jsx(Chip$1,Object.assign({variant:"filled",label:e.tagKey},n({index:t}),{disabled:!1}))),renderInput:e=>jsxRuntime.exports.jsx(TextField,Object.assign({},e,{variant:"outlined",placeholder:(null==t?void 0:t.length)<10&&"Add Tags (maximum of 10)"}))}))]})}))};var baseOrderBy=_baseOrderBy,isArray$1=isArray_1;function orderBy(e,t,n,i){return null==e?[]:(isArray$1(t)||(t=null==t?[]:[t]),isArray$1(n=i?void 0:n)||(n=null==n?[]:[n]),baseOrderBy(e,t,n))}var orderBy_1=orderBy,arrayProto$1=Array.prototype,nativeJoin=arrayProto$1.join;function join$2(e,t){return null==e?"":nativeJoin.call(e,t)}var join_1=join$2;const protocols=["http","https","mailto","tel"];function uriTransformer(e){const t=(e||"").trim();e=t.charAt(0);if("#"===e||"/"===e)return t;var n=t.indexOf(":");if(-1===n)return t;let i=-1;for(;++i<protocols.length;){var r=protocols[i];if(n===r.length&&t.slice(0,r.length).toLowerCase()===r)return t}return-1!==(i=t.indexOf("?"))&&n>i||-1!==(i=t.indexOf("#"))&&n>i?t:"javascript:void(0)"}var isBuffer=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)};function stringifyPosition$2(e){return e&&"object"==typeof e?"position"in e||"type"in e?position$2(e.position):"start"in e||"end"in e?position$2(e):"line"in e||"column"in e?point$3(e):"":""}function point$3(e){return index$3(e&&e.line)+":"+index$3(e&&e.column)}function position$2(e){return point$3(e&&e.start)+"-"+point$3(e&&e.end)}function index$3(e){return e&&"number"==typeof e?e:1}class VFileMessage$1 extends Error{constructor(e,t,n){const i=[null,null];let r={start:{line:null,column:null},end:{line:null,column:null}};var s;super(),"string"==typeof t&&(n=t,t=void 0),"string"==typeof n&&(-1===(s=n.indexOf(":"))?i[1]=n:(i[0]=n.slice(0,s),i[1]=n.slice(s+1))),t&&("type"in t||"position"in t?t.position&&(r=t.position):"start"in t||"end"in t?r=t:("line"in t||"column"in t)&&(r.start=t)),this.name=stringifyPosition$2(t)||"1:1",this.message="object"==typeof e?e.message:e,this.stack="object"==typeof e?e.stack:"",this.reason=this.message,this.fatal,this.line=r.start.line,this.column=r.start.column,this.source=i[0],this.ruleId=i[1],this.position=r,this.actual,this.expected,this.file,this.url,this.note}}VFileMessage$1.prototype.file="",VFileMessage$1.prototype.name="",VFileMessage$1.prototype.reason="",VFileMessage$1.prototype.message="",VFileMessage$1.prototype.stack="",VFileMessage$1.prototype.fatal=null,VFileMessage$1.prototype.column=null,VFileMessage$1.prototype.line=null,VFileMessage$1.prototype.source=null,VFileMessage$1.prototype.ruleId=null,VFileMessage$1.prototype.position=null;const path$1={basename:basename$1,dirname:dirname$1,extname:extname$1,join:join$1,sep:"/"};function basename$1(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');assertPath$3(e);let n=0,i=-1,r=e.length,s;if(void 0===t||0===t.length||t.length>e.length){for(;r--;)if(47===e.charCodeAt(r)){if(s){n=r+1;break}}else i<0&&(s=!0,i=r+1);return i<0?"":e.slice(n,i)}if(t===e)return"";let o=-1,a=t.length-1;for(;r--;)if(47===e.charCodeAt(r)){if(s){n=r+1;break}}else o<0&&(s=!0,o=r+1),-1<a&&(e.charCodeAt(r)===t.charCodeAt(a--)?a<0&&(i=r):(a=-1,i=o));return n===i?i=o:i<0&&(i=e.length),e.slice(n,i)}function dirname$1(e){if(assertPath$3(e),0===e.length)return".";let t=-1,n=e.length,i;for(;--n;)if(47===e.charCodeAt(n)){if(i){t=n;break}}else i=i||!0;return t<0?47===e.charCodeAt(0)?"/":".":1===t&&47===e.charCodeAt(0)?"//":e.slice(0,t)}function extname$1(e){assertPath$3(e);let t=e.length,n=-1,i=0,r=-1,s=0,o;for(;t--;){var a=e.charCodeAt(t);if(47===a){if(o){i=t+1;break}}else n<0&&(o=!0,n=t+1),46===a?r<0?r=t:1!==s&&(s=1):-1<r&&(s=-1)}return r<0||n<0||0===s||1===s&&r===n-1&&r===i+1?"":e.slice(r,n)}function join$1(...e){let t=-1,n;for(;++t<e.length;)assertPath$3(e[t]),e[t]&&(n=void 0===n?e[t]:n+"/"+e[t]);return void 0===n?".":normalize$2(n)}function normalize$2(e){assertPath$3(e);var t=47===e.charCodeAt(0);let n=normalizeString$1(e,!t);return 0<(n=0!==n.length||t?n:".").length&&47===e.charCodeAt(e.length-1)&&(n+="/"),t?"/"+n:n}function normalizeString$1(e,t){let n="",i=0,r=-1,s=0,o=-1,a;for(var l;++o<=e.length;){if(o<e.length)a=e.charCodeAt(o);else{if(47===a)break;a=47}if(47===a){if(r!==o-1&&1!==s)if(r!==o-1&&2===s){if(n.length<2||2!==i||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(2<n.length){if((l=n.lastIndexOf("/"))!==n.length-1){i=l<0?(n="",0):(n=n.slice(0,l)).length-1-n.lastIndexOf("/"),r=o,s=0;continue}}else if(0<n.length){n="",i=0,r=o,s=0;continue}t&&(n=0<n.length?n+"/..":"..",i=2)}else 0<n.length?n+="/"+e.slice(r+1,o):n=e.slice(r+1,o),i=o-r-1;r=o,s=0}else 46===a&&-1<s?s++:s=-1}return n}function assertPath$3(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const proc$1={cwd:cwd$1};function cwd$1(){return"/"}function isUrl$1(e){return null!==e&&"object"==typeof e&&e.href&&e.origin}function urlToPath$1(e){if("string"==typeof e)e=new URL(e);else if(!isUrl$1(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"===e.protocol)return getPathFromURLPosix$1(e);{const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}}function getPathFromURLPosix$1(e){if(""!==e.hostname){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(37===t.charCodeAt(n)&&50===t.charCodeAt(n+1)){var i=t.charCodeAt(n+2);if(70===i||102===i){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(t)}const order$1=["history","path","basename","stem","extname","dirname"];class VFile$1{constructor(e){let t,n=(t=e?"string"==typeof e||isBuffer(e)?{value:e}:isUrl$1(e)?{path:e}:e:{},this.data={},this.messages=[],this.history=[],this.cwd=proc$1.cwd(),this.value,this.stored,this.result,this.map,-1);for(;++n<order$1.length;){const i=order$1[n];i in t&&void 0!==t[i]&&(this[i]="history"===i?[...t[i]]:t[i])}let i;for(i in t)order$1.includes(i)||(this[i]=t[i])}get path(){return this.history[this.history.length-1]}set path(e){assertNonEmpty$1(e=isUrl$1(e)?urlToPath$1(e):e,"path"),this.path!==e&&this.history.push(e)}get dirname(){return"string"==typeof this.path?path$1.dirname(this.path):void 0}set dirname(e){assertPath$2(this.basename,"dirname"),this.path=path$1.join(e||"",this.basename)}get basename(){return"string"==typeof this.path?path$1.basename(this.path):void 0}set basename(e){assertNonEmpty$1(e,"basename"),assertPart$1(e,"basename"),this.path=path$1.join(this.dirname||"",e)}get extname(){return"string"==typeof this.path?path$1.extname(this.path):void 0}set extname(e){if(assertPart$1(e,"extname"),assertPath$2(this.dirname,"extname"),e){if(46!==e.charCodeAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=path$1.join(this.dirname,this.stem+(e||""))}get stem(){return"string"==typeof this.path?path$1.basename(this.path,this.extname):void 0}set stem(e){assertNonEmpty$1(e,"stem"),assertPart$1(e,"stem"),this.path=path$1.join(this.dirname||"",e+(this.extname||""))}toString(e){return(this.value||"").toString(e)}message(e,t,n){const i=new VFileMessage$1(e,t,n);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}info(e,t,n){const i=this.message(e,t,n);return i.fatal=null,i}fail(e,t,n){const i=this.message(e,t,n);throw i.fatal=!0,i}}function assertPart$1(e,t){if(e&&e.includes(path$1.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+path$1.sep+"`")}function assertNonEmpty$1(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function assertPath$2(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function bail(e){if(e)throw e}var hasOwn=Object.prototype.hasOwnProperty,toStr=Object.prototype.toString,defineProperty=Object.defineProperty,gOPD=Object.getOwnPropertyDescriptor,isArray=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===toStr.call(e)},isPlainObject$1=function(e){if(!e||"[object Object]"!==toStr.call(e))return!1;var t,n=hasOwn.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&hasOwn.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!i)return!1;for(t in e);return void 0===t||hasOwn.call(e,t)},setProperty=function(e,t){defineProperty&&"__proto__"===t.name?defineProperty(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},getProperty=function(e,t){if("__proto__"===t){if(!hasOwn.call(e,t))return;if(gOPD)return gOPD(e,t).value}return e[t]},extend=function e(){var t,n,i,r,s,o=arguments[0],a=1,l=arguments.length,c=!1;for("boolean"==typeof o&&(c=o,o=arguments[1]||{},a=2),(null==o||"object"!=typeof o&&"function"!=typeof o)&&(o={});a<l;++a)if(null!=(t=arguments[a]))for(n in t)s=getProperty(o,n),o!==(i=getProperty(t,n))&&(c&&i&&(isPlainObject$1(i)||(r=isArray(i)))?(s=r?(r=!1,s&&isArray(s)?s:[]):s&&isPlainObject$1(s)?s:{},setProperty(o,{name:n,newValue:e(c,s,i)})):void 0!==i&&setProperty(o,{name:n,newValue:i}));return o};function isPlainObject(e){if("object"!=typeof e||null===e)return!1;var t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function trough(){const l=[],t={run:function(...s){let o=-1;const a=s.pop();if("function"!=typeof a)throw new TypeError("Expected function as last argument, not "+a);!function e(t,...n){var i=l[++o];let r=-1;if(t)a(t);else{for(;++r<s.length;)null!==n[r]&&void 0!==n[r]||(n[r]=s[r]);s=n,i?wrap$1(i,e)(...n):a(null,...n)}}(null,...s)},use:function(e){if("function"==typeof e)return l.push(e),t;throw new TypeError("Expected `middelware` to be a function, not "+e)}};return t}function wrap$1(i,n){let r;return function(...t){var n=i.length>t.length;let e;n&&t.push(s);try{e=i.apply(this,t)}catch(e){t=e;if(n&&r)throw t;return s(t)}n||(e instanceof Promise?e.then(o,s):(e instanceof Error?s:o)(e))};function s(e,...t){r||(r=!0,n(e,...t))}function o(e){s(null,e)}}function stringifyPosition$1(e){return e&&"object"==typeof e?"position"in e||"type"in e?position$1(e.position):"start"in e||"end"in e?position$1(e):"line"in e||"column"in e?point$2(e):"":""}function point$2(e){return index$2(e&&e.line)+":"+index$2(e&&e.column)}function position$1(e){return point$2(e&&e.start)+"-"+point$2(e&&e.end)}function index$2(e){return e&&"number"==typeof e?e:1}class VFileMessage extends Error{constructor(e,t,n){const i=[null,null];let r={start:{line:null,column:null},end:{line:null,column:null}};var s;super(),"string"==typeof t&&(n=t,t=void 0),"string"==typeof n&&(-1===(s=n.indexOf(":"))?i[1]=n:(i[0]=n.slice(0,s),i[1]=n.slice(s+1))),t&&("type"in t||"position"in t?t.position&&(r=t.position):"start"in t||"end"in t?r=t:("line"in t||"column"in t)&&(r.start=t)),this.name=stringifyPosition$1(t)||"1:1",this.message="object"==typeof e?e.message:e,this.stack="object"==typeof e?e.stack:"",this.reason=this.message,this.fatal,this.line=r.start.line,this.column=r.start.column,this.source=i[0],this.ruleId=i[1],this.position=r,this.actual,this.expected,this.file,this.url,this.note}}VFileMessage.prototype.file="",VFileMessage.prototype.name="",VFileMessage.prototype.reason="",VFileMessage.prototype.message="",VFileMessage.prototype.stack="",VFileMessage.prototype.fatal=null,VFileMessage.prototype.column=null,VFileMessage.prototype.line=null,VFileMessage.prototype.source=null,VFileMessage.prototype.ruleId=null,VFileMessage.prototype.position=null;const path={basename:basename,dirname:dirname,extname:extname,join:join,sep:"/"};function basename(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');assertPath$1(e);let n=0,i=-1,r=e.length,s;if(void 0===t||0===t.length||t.length>e.length){for(;r--;)if(47===e.charCodeAt(r)){if(s){n=r+1;break}}else i<0&&(s=!0,i=r+1);return i<0?"":e.slice(n,i)}if(t===e)return"";let o=-1,a=t.length-1;for(;r--;)if(47===e.charCodeAt(r)){if(s){n=r+1;break}}else o<0&&(s=!0,o=r+1),-1<a&&(e.charCodeAt(r)===t.charCodeAt(a--)?a<0&&(i=r):(a=-1,i=o));return n===i?i=o:i<0&&(i=e.length),e.slice(n,i)}function dirname(e){if(assertPath$1(e),0===e.length)return".";let t=-1,n=e.length,i;for(;--n;)if(47===e.charCodeAt(n)){if(i){t=n;break}}else i=i||!0;return t<0?47===e.charCodeAt(0)?"/":".":1===t&&47===e.charCodeAt(0)?"//":e.slice(0,t)}function extname(e){assertPath$1(e);let t=e.length,n=-1,i=0,r=-1,s=0,o;for(;t--;){var a=e.charCodeAt(t);if(47===a){if(o){i=t+1;break}}else n<0&&(o=!0,n=t+1),46===a?r<0?r=t:1!==s&&(s=1):-1<r&&(s=-1)}return r<0||n<0||0===s||1===s&&r===n-1&&r===i+1?"":e.slice(r,n)}function join(...e){let t=-1,n;for(;++t<e.length;)assertPath$1(e[t]),e[t]&&(n=void 0===n?e[t]:n+"/"+e[t]);return void 0===n?".":normalize$1(n)}function normalize$1(e){assertPath$1(e);var t=47===e.charCodeAt(0);let n=normalizeString(e,!t);return 0<(n=0!==n.length||t?n:".").length&&47===e.charCodeAt(e.length-1)&&(n+="/"),t?"/"+n:n}function normalizeString(e,t){let n="",i=0,r=-1,s=0,o=-1,a;for(var l;++o<=e.length;){if(o<e.length)a=e.charCodeAt(o);else{if(47===a)break;a=47}if(47===a){if(r!==o-1&&1!==s)if(r!==o-1&&2===s){if(n.length<2||2!==i||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(2<n.length){if((l=n.lastIndexOf("/"))!==n.length-1){i=l<0?(n="",0):(n=n.slice(0,l)).length-1-n.lastIndexOf("/"),r=o,s=0;continue}}else if(0<n.length){n="",i=0,r=o,s=0;continue}t&&(n=0<n.length?n+"/..":"..",i=2)}else 0<n.length?n+="/"+e.slice(r+1,o):n=e.slice(r+1,o),i=o-r-1;r=o,s=0}else 46===a&&-1<s?s++:s=-1}return n}function assertPath$1(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const proc={cwd:cwd};function cwd(){return"/"}function isUrl(e){return null!==e&&"object"==typeof e&&e.href&&e.origin}function urlToPath(e){if("string"==typeof e)e=new URL(e);else if(!isUrl(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"===e.protocol)return getPathFromURLPosix(e);{const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}}function getPathFromURLPosix(e){if(""!==e.hostname){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(37===t.charCodeAt(n)&&50===t.charCodeAt(n+1)){var i=t.charCodeAt(n+2);if(70===i||102===i){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(t)}const order=["history","path","basename","stem","extname","dirname"];class VFile{constructor(e){let t,n=(t=e?"string"==typeof e||isBuffer(e)?{value:e}:isUrl(e)?{path:e}:e:{},this.data={},this.messages=[],this.history=[],this.cwd=proc.cwd(),this.value,this.stored,this.result,this.map,-1);for(;++n<order.length;){const i=order[n];i in t&&void 0!==t[i]&&(this[i]="history"===i?[...t[i]]:t[i])}let i;for(i in t)order.includes(i)||(this[i]=t[i])}get path(){return this.history[this.history.length-1]}set path(e){assertNonEmpty(e=isUrl(e)?urlToPath(e):e,"path"),this.path!==e&&this.history.push(e)}get dirname(){return"string"==typeof this.path?path.dirname(this.path):void 0}set dirname(e){assertPath(this.basename,"dirname"),this.path=path.join(e||"",this.basename)}get basename(){return"string"==typeof this.path?path.basename(this.path):void 0}set basename(e){assertNonEmpty(e,"basename"),assertPart(e,"basename"),this.path=path.join(this.dirname||"",e)}get extname(){return"string"==typeof this.path?path.extname(this.path):void 0}set extname(e){if(assertPart(e,"extname"),assertPath(this.dirname,"extname"),e){if(46!==e.charCodeAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=path.join(this.dirname,this.stem+(e||""))}get stem(){return"string"==typeof this.path?path.basename(this.path,this.extname):void 0}set stem(e){assertNonEmpty(e,"stem"),assertPart(e,"stem"),this.path=path.join(this.dirname||"",e+(this.extname||""))}toString(e){return(this.value||"").toString(e)}message(e,t,n){const i=new VFileMessage(e,t,n);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}info(e,t,n){const i=this.message(e,t,n);return i.fatal=null,i}fail(e,t,n){const i=this.message(e,t,n);throw i.fatal=!0,i}}function assertPart(e,t){if(e&&e.includes(path.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+path.sep+"`")}function assertNonEmpty(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function assertPath(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const unified=base().freeze(),own$7={}.hasOwnProperty;function base(){const a=trough(),r=[];let s={},l,i=-1;return c.data=function(e,t){if("string"==typeof e)return 2===arguments.length?(assertUnfrozen("data",l),s[e]=t,c):own$7.call(s,e)&&s[e]||null;if(e)return assertUnfrozen("data",l),s=e,c;return s},c.Parser=void 0,c.Compiler=void 0,c.freeze=function(){if(l)return c;for(;++i<r.length;){const[t,...n]=r[i];var e;!1!==n[0]&&(!0===n[0]&&(n[0]=void 0),"function"==typeof(e=t.call(c,...n))&&a.use(e))}return l=!0,i=Number.POSITIVE_INFINITY,c},c.attachers=r,c.use=function(e,...t){let n;if(assertUnfrozen("use",l),null!=e)if("function"==typeof e)a(e,...t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");(Array.isArray(e)?i:o)(e)}n&&(s.settings=Object.assign(s.settings||{},n));return c;function o(e){i(e.plugins),e.settings&&(n=Object.assign(n||{},e.settings))}function i(e){let t=-1;if(null!=e){if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;){var n,i,r=e[t],s=(i=n=s=void 0,r);if("function"==typeof s)a(s);else{if("object"!=typeof s)throw new TypeError("Expected usable value, not `"+s+"`");Array.isArray(s)?([n,...i]=s,a(n,...i)):o(s)}}}}function a(e,t){let n=-1,i;for(;++n<r.length;)if(r[n][0]===e){i=r[n];break}i?(isPlainObject(i[1])&&isPlainObject(t)&&(t=extend(!0,i[1],t)),i[1]=t):r.push([...arguments])}},c.parse=function(e){c.freeze();const t=vfile(e),n=c.Parser;if(assertParser("parse",n),newable(n,"parse"))return new n(String(t),t).parse();return n(String(t),t)},c.stringify=function(e,t){c.freeze();const n=vfile(t),i=c.Compiler;if(assertCompiler("stringify",i),assertNode(e),newable(i,"compile"))return new i(e,n).compile();return i(e,n)},c.run=function(s,e,o){assertNode(s),c.freeze(),o||"function"!=typeof e||(o=e,e=void 0);if(!o)return new Promise(t);function t(i,r){a.run(s,vfile(e),function(e,t,n){t=t||s,e?r(e):i?i(t):o(null,t,n)})}t(null,o)},c.runSync=function(e,t){let n,i;return c.run(e,t,function(e,t){bail(e),n=t,i=!0}),assertDone("runSync","run",i),n},c.process=function(t,s){if(c.freeze(),assertParser("process",c.Parser),assertCompiler("process",c.Compiler),!s)return new Promise(e);function e(n,i){var e=vfile(t);function r(e,t){e||!t?i(e):n?n(t):s(null,t)}c.run(c.parse(e),e,(e,t,n)=>{!e&&t&&n?(null!=(t=c.stringify(t,n))&&(looksLikeAVFileValue(t)?n.value=t:n.result=t),r(e,n)):r(e)})}e(null,s)},c.processSync=function(e){let t;c.freeze(),assertParser("processSync",c.Parser),assertCompiler("processSync",c.Compiler);e=vfile(e);return c.process(e,function(e){t=!0,bail(e)}),assertDone("processSync","process",t),e},c;function c(){const e=base();let t=-1;for(;++t<r.length;)e.use(...r[t]);return e.data(extend(!0,{},s)),e}}function newable(e,t){return"function"==typeof e&&e.prototype&&(keys(e.prototype)||t in e.prototype)}function keys(e){let t;for(t in e)if(own$7.call(e,t))return!0;return!1}function assertParser(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `Parser`")}function assertCompiler(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `Compiler`")}function assertUnfrozen(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function assertNode(e){if(!isPlainObject(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function assertDone(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function vfile(e){return looksLikeAVFile(e)?e:new VFile(e)}function looksLikeAVFile(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}function looksLikeAVFileValue(e){return"string"==typeof e||isBuffer(e)}function toString$2(e,t){var{includeImageAlt:t=!0}=t||{};return one$1(e,t)}function one$1(e,t){return e&&"object"==typeof e&&(e.value||(t?e.alt:"")||"children"in e&&all$1(e.children,t)||Array.isArray(e)&&all$1(e,t))||""}function all$1(e,t){for(var n=[],i=-1;++i<e.length;)n[i]=one$1(e[i],t);return n.join("")}function splice$1(e,t,n,i){var r=e.length;let s=0,o;if(t=t<0?r<-t?0:r+t:r<t?r:t,n=0<n?n:0,i.length<1e4)(o=Array.from(i)).unshift(t,n),[].splice.apply(e,o);else for(n&&[].splice.apply(e,[t,n]);s<i.length;)(o=i.slice(s,s+1e4)).unshift(t,0),[].splice.apply(e,o),s+=1e4,t+=1e4}function push(e,t){return 0<e.length?(splice$1(e,e.length,0,t),e):t}const hasOwnProperty={}.hasOwnProperty;function combineExtensions(e){var t={};let n=-1;for(;++n<e.length;)syntaxExtension(t,e[n]);return t}function syntaxExtension(t,n){let i;for(i in n){const o=(hasOwnProperty.call(t,i)?t[i]:void 0)||(t[i]={});var r=n[i];let e;for(e in r){hasOwnProperty.call(o,e)||(o[e]=[]);var s=r[e];constructs(o[e],Array.isArray(s)?s:s?[s]:[])}}}function constructs(e,t){let n=-1;const i=[];for(;++n<t.length;)("after"===t[n].add?e:i).push(t[n]);splice$1(e,0,0,i)}const unicodePunctuationRegex=/[!-/:-@[-`{-~\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,asciiAlpha=regexCheck(/[A-Za-z]/),asciiDigit=regexCheck(/\d/),asciiHexDigit=regexCheck(/[\dA-Fa-f]/),asciiAlphanumeric=regexCheck(/[\dA-Za-z]/),asciiPunctuation=regexCheck(/[!-/:-@[-`{-~]/),asciiAtext=regexCheck(/[#-'*+\--9=?A-Z^-~]/);function asciiControl(e){return null!==e&&(e<32||127===e)}function markdownLineEndingOrSpace(e){return null!==e&&(e<0||32===e)}function markdownLineEnding(e){return null!==e&&e<-2}function markdownSpace(e){return-2===e||-1===e||32===e}const unicodeWhitespace=regexCheck(/\s/),unicodePunctuation=regexCheck(unicodePunctuationRegex);function regexCheck(t){return function(e){return null!==e&&t.test(String.fromCharCode(e))}}function factorySpace(t,n,i,e){const r=e?e-1:Number.POSITIVE_INFINITY;let s=0;return function(e){if(markdownSpace(e))return t.enter(i),o(e);return n(e)};function o(e){return markdownSpace(e)&&s++<r?(t.consume(e),o):(t.exit(i),n(e))}}const content$1={tokenize:initializeContent};function initializeContent(n){const t=n.attempt(this.parser.constructs.contentInitial,function(e){if(null!==e)return n.enter("lineEnding"),n.consume(e),n.exit("lineEnding"),factorySpace(n,t,"linePrefix");n.consume(e)},function(e){return n.enter("paragraph"),r(e)});let i;return t;function r(e){var t=n.enter("chunkText",{contentType:"text",previous:i});return i&&(i.next=t),i=t,s(e)}function s(e){return null===e?(n.exit("chunkText"),n.exit("paragraph"),void n.consume(e)):markdownLineEnding(e)?(n.consume(e),n.exit("chunkText"),r):(n.consume(e),s)}}const document$2={tokenize:initializeDocument},containerConstruct={tokenize:tokenizeContainer};function initializeDocument(i){const s=this,r=[];let o=0,a,n,l;return t;function t(e){var t;return o<r.length?(t=r[o],s.containerState=t[1],i.attempt(t[0].continuation,c,u)(e)):u(e)}function c(i){if(o++,s.containerState._closeFlow){s.containerState._closeFlow=void 0,a&&b();var r=s.events.length;let e=r,t;for(;e--;)if("exit"===s.events[e][0]&&"chunkFlow"===s.events[e][1].type){t=s.events[e][1].end;break}y(o);let n=r;for(;n<s.events.length;)s.events[n][1].end=Object.assign({},t),n++;return splice$1(s.events,e+1,0,s.events.slice(r)),s.events.length=n,u(i)}return t(i)}function u(e){if(o===r.length){if(!a)return m(e);if(a.currentConstruct&&a.currentConstruct.concrete)return f(e);s.interrupt=Boolean(a.currentConstruct&&!a._gfmTableDynamicInterruptHack)}return s.containerState={},i.check(containerConstruct,p,d)(e)}function p(e){return a&&b(),y(o),m(e)}function d(e){return s.parser.lazy[s.now().line]=o!==r.length,l=s.now().offset,f(e)}function m(e){return s.containerState={},i.attempt(containerConstruct,g,f)(e)}function g(e){return o++,r.push([s.currentConstruct,s.containerState]),m(e)}function f(e){return null===e?(a&&b(),y(0),void i.consume(e)):(a=a||s.parser.flow(s.now()),i.enter("chunkFlow",{contentType:"flow",previous:n,_tokenizer:a}),h(e))}function h(e){return null===e?(x(i.exit("chunkFlow"),!0),y(0),void i.consume(e)):markdownLineEnding(e)?(i.consume(e),x(i.exit("chunkFlow")),o=0,s.interrupt=void 0,t):(i.consume(e),h)}function x(e,r){const t=s.sliceStream(e);if(r&&t.push(null),(e.previous=n)&&(n.next=e),n=e,a.defineSkip(e.start),a.write(t),s.parser.lazy[e.start.line]){let e=a.events.length;for(;e--;)if(a.events[e][1].start.offset<l&&(!a.events[e][1].end||a.events[e][1].end.offset>l))return;r=s.events.length;let t=r,n,i;for(;t--;)if("exit"===s.events[t][0]&&"chunkFlow"===s.events[t][1].type){if(n){i=s.events[t][1].end;break}n=!0}for(y(o),e=r;e<s.events.length;)s.events[e][1].end=Object.assign({},i),e++;splice$1(s.events,t+1,0,s.events.slice(r)),s.events.length=e}}function y(e){let t=r.length;for(;t-- >e;){const n=r[t];s.containerState=n[1],n[0].exit.call(s,i)}r.length=e}function b(){a.write([null]),n=void 0,a=void 0,s.containerState._closeFlow=void 0}}function tokenizeContainer(e,t,n){return factorySpace(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function classifyCharacter(e){return null===e||markdownLineEndingOrSpace(e)||unicodeWhitespace(e)?1:unicodePunctuation(e)?2:void 0}function resolveAll(e,t,n){const i=[];let r=-1;for(;++r<e.length;){const s=e[r].resolveAll;s&&!i.includes(s)&&(t=s(t,n),i.push(s))}return t}const attention={name:"attention",tokenize:tokenizeAttention,resolveAll:resolveAllAttention};function resolveAllAttention(e,t){let n=-1,i;var r;let s,o;for(;++n<e.length;)if("enter"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._close)for(i=n;i--;)if("exit"===e[i][0]&&"attentionSequence"===e[i][1].type&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)&&(!((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3)||(e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3)){var a=1<e[i][1].end.offset-e[i][1].start.offset&&1<e[n][1].end.offset-e[n][1].start.offset?2:1,l=Object.assign({},e[i][1].end),c=Object.assign({},e[n][1].start);movePoint(l,-a),movePoint(c,a),l={type:1<a?"strongSequence":"emphasisSequence",start:l,end:Object.assign({},e[i][1].end)},c={type:1<a?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:c},r={type:1<a?"strongText":"emphasisText",start:Object.assign({},e[i][1].end),end:Object.assign({},e[n][1].start)},a={type:1<a?"strong":"emphasis",start:Object.assign({},l.start),end:Object.assign({},c.end)},e[i][1].end=Object.assign({},l.start),e[n][1].start=Object.assign({},c.end),s=[],e[i][1].end.offset-e[i][1].start.offset&&(s=push(s,[["enter",e[i][1],t],["exit",e[i][1],t]])),s=push(s,[["enter",a,t],["enter",l,t],["exit",l,t],["enter",r,t]]),s=push(s,resolveAll(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),s=push(s,[["exit",r,t],["enter",c,t],["exit",c,t],["exit",a,t]]),e[n][1].end.offset-e[n][1].start.offset?(o=2,s=push(s,[["enter",e[n][1],t],["exit",e[n][1],t]])):o=0,splice$1(e,i-1,n-i+3,s),n=i+s.length-o-2;break}for(n=-1;++n<e.length;)"attentionSequence"===e[n][1].type&&(e[n][1].type="data");return e}function tokenizeAttention(s,o){const a=this.parser.constructs.attentionMarkers.null,l=this.previous,c=classifyCharacter(l);let u;return function(e){return s.enter("attentionSequence"),p(u=e)};function p(e){if(e===u)return s.consume(e),p;const t=s.exit("attentionSequence");var n=classifyCharacter(e),i=!n||2===n&&c||a.includes(e),r=!c||2===c&&n||a.includes(l);return t._open=Boolean(42===u?i:i&&(c||!r)),t._close=Boolean(42===u?r:r&&(n||!i)),o(e)}}function movePoint(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const autolink={name:"autolink",tokenize:tokenizeAutolink};function tokenizeAutolink(t,n,i){let r=1;return function(e){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(e),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),s};function s(e){return asciiAlpha(e)?(t.consume(e),o):(asciiAtext(e)?c:i)(e)}function o(e){return(43===e||45===e||46===e||asciiAlphanumeric(e)?a:c)(e)}function a(e){return 58===e?(t.consume(e),l):(43===e||45===e||46===e||asciiAlphanumeric(e))&&r++<32?(t.consume(e),a):c(e)}function l(e){return 62===e?(t.exit("autolinkProtocol"),m(e)):null===e||32===e||60===e||asciiControl(e)?i(e):(t.consume(e),l)}function c(e){return 64===e?(t.consume(e),r=0,u):asciiAtext(e)?(t.consume(e),c):i(e)}function u(e){return(asciiAlphanumeric(e)?p:i)(e)}function p(e){return 46===e?(t.consume(e),r=0,u):62===e?(t.exit("autolinkProtocol").type="autolinkEmail",m(e)):d(e)}function d(e){return(45===e||asciiAlphanumeric(e))&&r++<63?(t.consume(e),45===e?d:p):i(e)}function m(e){return t.enter("autolinkMarker"),t.consume(e),t.exit("autolinkMarker"),t.exit("autolink"),n}}const blankLine={tokenize:tokenizeBlankLine,partial:!0};function tokenizeBlankLine(e,t,n){return factorySpace(e,function(e){return(null===e||markdownLineEnding(e)?t:n)(e)},"linePrefix")}const blockQuote={name:"blockQuote",tokenize:tokenizeBlockQuoteStart,continuation:{tokenize:tokenizeBlockQuoteContinuation},exit:exit};function tokenizeBlockQuoteStart(n,t,i){const r=this;return function(e){if(62!==e)return i(e);{const t=r.containerState;return t.open||(n.enter("blockQuote",{_container:!0}),t.open=!0),n.enter("blockQuotePrefix"),n.enter("blockQuoteMarker"),n.consume(e),n.exit("blockQuoteMarker"),s}};function s(e){return markdownSpace(e)?(n.enter("blockQuotePrefixWhitespace"),n.consume(e),n.exit("blockQuotePrefixWhitespace"),n.exit("blockQuotePrefix"),t):(n.exit("blockQuotePrefix"),t(e))}}function tokenizeBlockQuoteContinuation(e,t,n){return factorySpace(e,e.attempt(blockQuote,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function exit(e){e.exit("blockQuote")}const characterEscape={name:"characterEscape",tokenize:tokenizeCharacterEscape};function tokenizeCharacterEscape(t,n,i){return function(e){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(e),t.exit("escapeMarker"),r};function r(e){return asciiPunctuation(e)?(t.enter("characterEscapeValue"),t.consume(e),t.exit("characterEscapeValue"),t.exit("characterEscape"),n):i(e)}}const element=document.createElement("i");function decodeNamedCharacterReference(e){var t="&"+e+";";element.innerHTML=t;const n=element.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&(n!==t&&n)}const characterReference={name:"characterReference",tokenize:tokenizeCharacterReference};function tokenizeCharacterReference(n,i,r){const s=this;let o=0,a,l;return function(e){return n.enter("characterReference"),n.enter("characterReferenceMarker"),n.consume(e),n.exit("characterReferenceMarker"),t};function t(e){return 35===e?(n.enter("characterReferenceMarkerNumeric"),n.consume(e),n.exit("characterReferenceMarkerNumeric"),c):(n.enter("characterReferenceValue"),a=31,l=asciiAlphanumeric,u(e))}function c(e){return 88===e||120===e?(n.enter("characterReferenceMarkerHexadecimal"),n.consume(e),n.exit("characterReferenceMarkerHexadecimal"),n.enter("characterReferenceValue"),a=6,l=asciiHexDigit,u):(n.enter("characterReferenceValue"),a=7,l=asciiDigit,u(e))}function u(e){var t;return 59===e&&o?(t=n.exit("characterReferenceValue"),l!==asciiAlphanumeric||decodeNamedCharacterReference(s.sliceSerialize(t))?(n.enter("characterReferenceMarker"),n.consume(e),n.exit("characterReferenceMarker"),n.exit("characterReference"),i):r(e)):l(e)&&o++<a?(n.consume(e),u):r(e)}}const codeFenced={name:"codeFenced",tokenize:tokenizeCodeFenced,concrete:!0};function tokenizeCodeFenced(t,n,i){const r=this,s={tokenize:function(t,n,i){let r=0;return factorySpace(t,function(e){return t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),s(e)},"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function s(e){return e===c?(t.consume(e),r++,s):r<l?i(e):(t.exit("codeFencedFenceSequence"),factorySpace(t,o,"whitespace")(e))}function o(e){return null===e||markdownLineEnding(e)?(t.exit("codeFencedFence"),n(e)):i(e)}},partial:!0},o={tokenize:function(t,n,i){const r=this;return function(e){return t.enter("lineEnding"),t.consume(e),t.exit("lineEnding"),s};function s(e){return(r.parser.lazy[r.now().line]?i:n)(e)}},partial:!0},e=this.events[this.events.length-1],a=e&&"linePrefix"===e[1].type?e[2].sliceSerialize(e[1],!0).length:0;let l=0,c;return function(e){return t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),u(c=e)};function u(e){return e===c?(t.consume(e),l++,u):(t.exit("codeFencedFenceSequence"),(l<3?i:factorySpace(t,p,"whitespace"))(e))}function p(e){return null===e||markdownLineEnding(e)?f(e):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),d(e))}function d(e){return null===e||markdownLineEndingOrSpace(e)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),factorySpace(t,m,"whitespace")(e)):96===e&&e===c?i(e):(t.consume(e),d)}function m(e){return null===e||markdownLineEnding(e)?f(e):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),g(e))}function g(e){return null===e||markdownLineEnding(e)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),f(e)):96===e&&e===c?i(e):(t.consume(e),g)}function f(e){return t.exit("codeFencedFence"),(r.interrupt?n:h)(e)}function h(e){return null===e?y(e):markdownLineEnding(e)?t.attempt(o,t.attempt(s,y,a?factorySpace(t,h,"linePrefix",a+1):h),y)(e):(t.enter("codeFlowValue"),x(e))}function x(e){return null===e||markdownLineEnding(e)?(t.exit("codeFlowValue"),h(e)):(t.consume(e),x)}function y(e){return t.exit("codeFenced"),n(e)}}const codeIndented={name:"codeIndented",tokenize:tokenizeCodeIndented},indentedContent={tokenize:tokenizeIndentedContent,partial:!0};function tokenizeCodeIndented(t,n,i){const r=this;return function(e){return t.enter("codeIndented"),factorySpace(t,s,"linePrefix",5)(e)};function s(e){const t=r.events[r.events.length-1];return(t&&"linePrefix"===t[1].type&&4<=t[2].sliceSerialize(t[1],!0).length?o:i)(e)}function o(e){return null===e?l(e):markdownLineEnding(e)?t.attempt(indentedContent,o,l)(e):(t.enter("codeFlowValue"),a(e))}function a(e){return null===e||markdownLineEnding(e)?(t.exit("codeFlowValue"),o(e)):(t.consume(e),a)}function l(e){return t.exit("codeIndented"),n(e)}}function tokenizeIndentedContent(t,n,i){const r=this;return s;function s(e){return r.parser.lazy[r.now().line]?i(e):markdownLineEnding(e)?(t.enter("lineEnding"),t.consume(e),t.exit("lineEnding"),s):factorySpace(t,o,"linePrefix",5)(e)}function o(e){const t=r.events[r.events.length-1];return(t&&"linePrefix"===t[1].type&&4<=t[2].sliceSerialize(t[1],!0).length?n:markdownLineEnding(e)?s:i)(e)}}const codeText={name:"codeText",tokenize:tokenizeCodeText,resolve:resolveCodeText,previous:previous};function resolveCodeText(e){let t=e.length-4,n=3,i,r;if(!("lineEnding"!==e[n][1].type&&"space"!==e[n][1].type||"lineEnding"!==e[t][1].type&&"space"!==e[t][1].type))for(i=n;++i<t;)if("codeTextData"===e[i][1].type){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}for(i=n-1,t++;++i<=t;)void 0===r?i!==t&&"lineEnding"!==e[i][1].type&&(r=i):i!==t&&"lineEnding"!==e[i][1].type||(e[r][1].type="codeTextData",i!==r+2&&(e[r][1].end=e[i-1][1].end,e.splice(r+2,i-r-2),t-=i-r-2,i=r+2),r=void 0);return e}function previous(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type}function tokenizeCodeText(t,n,i){let r=0,s,o;return function(e){return t.enter("codeText"),t.enter("codeTextSequence"),a(e)};function a(e){return 96===e?(t.consume(e),r++,a):(t.exit("codeTextSequence"),l(e))}function l(e){return null===e?i(e):96===e?(o=t.enter("codeTextSequence"),s=0,u(e)):32===e?(t.enter("space"),t.consume(e),t.exit("space"),l):markdownLineEnding(e)?(t.enter("lineEnding"),t.consume(e),t.exit("lineEnding"),l):(t.enter("codeTextData"),c(e))}function c(e){return null===e||32===e||96===e||markdownLineEnding(e)?(t.exit("codeTextData"),l(e)):(t.consume(e),c)}function u(e){return 96===e?(t.consume(e),s++,u):s===r?(t.exit("codeTextSequence"),t.exit("codeText"),n(e)):(o.type="codeTextData",c(e))}}function subtokenize(e){var t={};let n=-1,i,r,s,o,a,l,c;for(;++n<e.length;){for(;n in t;)n=t[n];if(i=e[n],n&&"chunkFlow"===i[1].type&&"listItemPrefix"===e[n-1][1].type&&(l=i[1]._tokenizer.events,(s=0)<l.length&&"lineEndingBlank"===l[s][1].type&&(s+=2),s<l.length&&"content"===l[s][1].type))for(;++s<l.length&&"content"!==l[s][1].type;)"chunkText"===l[s][1].type&&(l[s][1]._isInFirstContentOfListItem=!0,s++);if("enter"===i[0])i[1].contentType&&(Object.assign(t,subcontent(e,n)),n=t[n],c=!0);else if(i[1]._container){for(s=n,r=void 0;s--&&("lineEnding"===(o=e[s])[1].type||"lineEndingBlank"===o[1].type);)"enter"===o[0]&&(r&&(e[r][1].type="lineEndingBlank"),o[1].type="lineEnding",r=s);r&&(i[1].end=Object.assign({},e[r][1].start),(a=e.slice(r,n)).unshift(i),splice$1(e,r,n-r+1,a))}}return!c}function subcontent(e,t){var n=e[t][1];const i=e[t][2];let r=t-1;const s=[],o=n._tokenizer||i.parser[n.contentType](n.start),a=o.events,l=[],c={};let u,p,d=-1,m=n,g=0,f=0;const h=[f];for(;m;){for(;e[++r][1]!==m;);s.push(r),m._tokenizer||(u=i.sliceStream(m),m.next||u.push(null),p&&o.defineSkip(m.start),m._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),m._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),m=(p=m).next}for(m=n;++d<a.length;)"exit"===a[d][0]&&"enter"===a[d-1][0]&&a[d][1].type===a[d-1][1].type&&a[d][1].start.line!==a[d][1].end.line&&(f=d+1,h.push(f),m._tokenizer=void 0,m.previous=void 0,m=m.next);for(o.events=[],m?(m._tokenizer=void 0,m.previous=void 0):h.pop(),d=h.length;d--;){var x=a.slice(h[d],h[d+1]);const f=s.pop();l.unshift([f,f+x.length-1]),splice$1(e,f,2,x)}for(d=-1;++d<l.length;)c[g+l[d][0]]=g+l[d][1],g+=l[d][1]-l[d][0]-1;return c}const content={tokenize:tokenizeContent,resolve:resolveContent},continuationConstruct={tokenize:tokenizeContinuation,partial:!0};function resolveContent(e){return subtokenize(e),e}function tokenizeContent(t,n){let i;return function(e){return t.enter("content"),i=t.enter("chunkContent",{contentType:"content"}),r(e)};function r(e){return null===e?s(e):markdownLineEnding(e)?t.check(continuationConstruct,o,s)(e):(t.consume(e),r)}function s(e){return t.exit("chunkContent"),t.exit("content"),n(e)}function o(e){return t.consume(e),t.exit("chunkContent"),i.next=t.enter("chunkContent",{contentType:"content",previous:i}),i=i.next,r}}function tokenizeContinuation(n,i,r){const s=this;return function(e){return n.exit("chunkContent"),n.enter("lineEnding"),n.consume(e),n.exit("lineEnding"),factorySpace(n,t,"linePrefix")};function t(e){if(null===e||markdownLineEnding(e))return r(e);const t=s.events[s.events.length-1];return(!s.parser.constructs.disable.null.includes("codeIndented")&&t&&"linePrefix"===t[1].type&&4<=t[2].sliceSerialize(t[1],!0).length?i:n.interrupt(s.parser.constructs.flow,r,i))(e)}}function factoryDestination(t,n,i,r,s,o,a,l,e){const c=e||Number.POSITIVE_INFINITY;let u=0;return function(e){if(60===e)return t.enter(r),t.enter(s),t.enter(o),t.consume(e),t.exit(o),p;if(null===e||41===e||asciiControl(e))return i(e);return t.enter(r),t.enter(a),t.enter(l),t.enter("chunkString",{contentType:"string"}),g(e)};function p(e){return 62===e?(t.enter(o),t.consume(e),t.exit(o),t.exit(s),t.exit(r),n):(t.enter(l),t.enter("chunkString",{contentType:"string"}),d(e))}function d(e){return 62===e?(t.exit("chunkString"),t.exit(l),p(e)):null===e||60===e||markdownLineEnding(e)?i(e):(t.consume(e),92===e?m:d)}function m(e){return 60===e||62===e||92===e?(t.consume(e),d):d(e)}function g(e){return 40===e?++u>c?i(e):(t.consume(e),g):41===e?u--?(t.consume(e),g):(t.exit("chunkString"),t.exit(l),t.exit(a),t.exit(r),n(e)):null===e||markdownLineEndingOrSpace(e)?u?i(e):(t.exit("chunkString"),t.exit(l),t.exit(a),t.exit(r),n(e)):asciiControl(e)?i(e):(t.consume(e),92===e?f:g)}function f(e){return 40===e||41===e||92===e?(t.consume(e),g):g(e)}}function factoryLabel(t,n,i,r,s,o){const a=this;let l=0,c;return function(e){return t.enter(r),t.enter(s),t.consume(e),t.exit(s),t.enter(o),u};function u(e){return null===e||91===e||93===e&&!c||94===e&&!l&&"_hiddenFootnoteSupport"in a.parser.constructs||999<l?i(e):93===e?(t.exit(o),t.enter(s),t.consume(e),t.exit(s),t.exit(r),n):markdownLineEnding(e)?(t.enter("lineEnding"),t.consume(e),t.exit("lineEnding"),u):(t.enter("chunkString",{contentType:"string"}),p(e))}function p(e){return null===e||91===e||93===e||markdownLineEnding(e)||999<l++?(t.exit("chunkString"),u(e)):(t.consume(e),c=c||!markdownSpace(e),92===e?d:p)}function d(e){return 91===e||92===e||93===e?(t.consume(e),l++,p):p(e)}}function factoryTitle(t,n,i,r,s,o){let a;return function(e){return t.enter(r),t.enter(s),t.consume(e),t.exit(s),a=40===e?41:e,l};function l(e){return e===a?(t.enter(s),t.consume(e),t.exit(s),t.exit(r),n):(t.enter(o),c(e))}function c(e){return e===a?(t.exit(o),l(a)):null===e?i(e):markdownLineEnding(e)?(t.enter("lineEnding"),t.consume(e),t.exit("lineEnding"),factorySpace(t,c,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),u(e))}function u(e){return e===a||null===e||markdownLineEnding(e)?(t.exit("chunkString"),c(e)):(t.consume(e),92===e?p:u)}function p(e){return e===a||92===e?(t.consume(e),u):u(e)}}function factoryWhitespace(n,i){let r;return function e(t){if(markdownLineEnding(t))return n.enter("lineEnding"),n.consume(t),n.exit("lineEnding"),r=!0,e;if(markdownSpace(t))return factorySpace(n,e,r?"linePrefix":"lineSuffix")(t);return i(t)}}function normalizeIdentifier(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const definition={name:"definition",tokenize:tokenizeDefinition},titleConstruct={tokenize:tokenizeTitle,partial:!0};function tokenizeDefinition(t,n,i){const r=this;let s;return function(e){return t.enter("definition"),factoryLabel.call(r,t,o,i,"definitionLabel","definitionLabelMarker","definitionLabelString")(e)};function o(e){return s=normalizeIdentifier(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),58===e?(t.enter("definitionMarker"),t.consume(e),t.exit("definitionMarker"),factoryWhitespace(t,factoryDestination(t,t.attempt(titleConstruct,factorySpace(t,a,"whitespace"),factorySpace(t,a,"whitespace")),i,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString"))):i(e)}function a(e){return null===e||markdownLineEnding(e)?(t.exit("definition"),r.parser.defined.includes(s)||r.parser.defined.push(s),n(e)):i(e)}}function tokenizeTitle(t,n,i){return function(e){return(markdownLineEndingOrSpace(e)?factoryWhitespace(t,r):i)(e)};function r(e){return(34===e||39===e||40===e?factoryTitle(t,factorySpace(t,s,"whitespace"),i,"definitionTitle","definitionTitleMarker","definitionTitleString"):i)(e)}function s(e){return(null===e||markdownLineEnding(e)?n:i)(e)}}const hardBreakEscape={name:"hardBreakEscape",tokenize:tokenizeHardBreakEscape};function tokenizeHardBreakEscape(t,n,i){return function(e){return t.enter("hardBreakEscape"),t.enter("escapeMarker"),t.consume(e),r};function r(e){return markdownLineEnding(e)?(t.exit("escapeMarker"),t.exit("hardBreakEscape"),n(e)):i(e)}}const headingAtx={name:"headingAtx",tokenize:tokenizeHeadingAtx,resolve:resolveHeadingAtx};function resolveHeadingAtx(e,t){let n=e.length-2,i=3;var r,s;return"whitespace"===e[i][1].type&&(i+=2),n-2>i&&"whitespace"===e[n][1].type&&(n-=2),"atxHeadingSequence"===e[n][1].type&&(i===n-1||n-4>i&&"whitespace"===e[n-2][1].type)&&(n-=i+1===n?2:4),n>i&&(r={type:"atxHeadingText",start:e[i][1].start,end:e[n][1].end},s={type:"chunkText",start:e[i][1].start,end:e[n][1].end,contentType:"text"},splice$1(e,i,n-i+1,[["enter",r,t],["enter",s,t],["exit",s,t],["exit",r,t]])),e}function tokenizeHeadingAtx(t,n,i){const r=this;let s=0;return function(e){return t.enter("atxHeading"),t.enter("atxHeadingSequence"),o(e)};function o(e){return 35===e&&s++<6?(t.consume(e),o):null===e||markdownLineEndingOrSpace(e)?(t.exit("atxHeadingSequence"),(r.interrupt?n:a)(e)):i(e)}function a(e){return 35===e?(t.enter("atxHeadingSequence"),l(e)):null===e||markdownLineEnding(e)?(t.exit("atxHeading"),n(e)):markdownSpace(e)?factorySpace(t,a,"whitespace")(e):(t.enter("atxHeadingText"),c(e))}function l(e){return 35===e?(t.consume(e),l):(t.exit("atxHeadingSequence"),a(e))}function c(e){return null===e||35===e||markdownLineEndingOrSpace(e)?(t.exit("atxHeadingText"),a(e)):(t.consume(e),c)}}const htmlBlockNames=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],htmlRawNames=["pre","script","style","textarea"],htmlFlow={name:"htmlFlow",tokenize:tokenizeHtmlFlow,resolveTo:resolveToHtmlFlow,concrete:!0},nextBlankConstruct={tokenize:tokenizeNextBlank,partial:!0};function resolveToHtmlFlow(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););return 1<t&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function tokenizeHtmlFlow(t,n,i){const s=this;let r,o,a,l,c;return function(e){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(e),u};function u(e){return 33===e?(t.consume(e),p):47===e?(t.consume(e),g):63===e?(t.consume(e),r=3,s.interrupt?n:M):asciiAlpha(e)?(t.consume(e),a=String.fromCharCode(e),o=!0,f):i(e)}function p(e){return 45===e?(t.consume(e),r=2,d):91===e?(t.consume(e),r=5,a="CDATA[",l=0,m):asciiAlpha(e)?(t.consume(e),r=4,s.interrupt?n:M):i(e)}function d(e){return 45===e?(t.consume(e),s.interrupt?n:M):i(e)}function m(e){return e===a.charCodeAt(l++)?(t.consume(e),l===a.length?s.interrupt?n:$:m):i(e)}function g(e){return asciiAlpha(e)?(t.consume(e),a=String.fromCharCode(e),f):i(e)}function f(e){return null===e||47===e||62===e||markdownLineEndingOrSpace(e)?47!==e&&o&&htmlRawNames.includes(a.toLowerCase())?(r=1,(s.interrupt?n:$)(e)):htmlBlockNames.includes(a.toLowerCase())?(r=6,47===e?(t.consume(e),h):(s.interrupt?n:$)(e)):(r=7,(s.interrupt&&!s.parser.lazy[s.now().line]?i:o?y:x)(e)):45===e||asciiAlphanumeric(e)?(t.consume(e),a+=String.fromCharCode(e),f):i(e)}function h(e){return 62===e?(t.consume(e),s.interrupt?n:$):i(e)}function x(e){return markdownSpace(e)?(t.consume(e),x):T(e)}function y(e){return 47===e?(t.consume(e),T):58===e||95===e||asciiAlpha(e)?(t.consume(e),b):markdownSpace(e)?(t.consume(e),y):T(e)}function b(e){return 45===e||46===e||58===e||95===e||asciiAlphanumeric(e)?(t.consume(e),b):j(e)}function j(e){return 61===e?(t.consume(e),S):markdownSpace(e)?(t.consume(e),j):y(e)}function S(e){return null===e||60===e||61===e||62===e||96===e?i(e):34===e||39===e?(t.consume(e),c=e,v):markdownSpace(e)?(t.consume(e),S):(c=null,E(e))}function v(e){return null===e||markdownLineEnding(e)?i(e):e===c?(t.consume(e),w):(t.consume(e),v)}function E(e){return null===e||34===e||39===e||60===e||61===e||62===e||96===e||markdownLineEndingOrSpace(e)?j(e):(t.consume(e),E)}function w(e){return(47===e||62===e||markdownSpace(e)?y:i)(e)}function T(e){return 62===e?(t.consume(e),R):i(e)}function R(e){return markdownSpace(e)?(t.consume(e),R):(null===e||markdownLineEnding(e)?$:i)(e)}function $(e){return 45===e&&2===r?(t.consume(e),C):60===e&&1===r?(t.consume(e),F):62===e&&4===r?(t.consume(e),A):63===e&&3===r?(t.consume(e),M):93===e&&5===r?(t.consume(e),N):!markdownLineEnding(e)||6!==r&&7!==r?null===e||markdownLineEnding(e)?k(e):(t.consume(e),$):t.check(nextBlankConstruct,A,k)(e)}function k(e){return t.exit("htmlFlowData"),I(e)}function I(e){return null===e?_(e):markdownLineEnding(e)?t.attempt({tokenize:O,partial:!0},I,_)(e):(t.enter("htmlFlowData"),$(e))}function O(t,n,i){return function(e){return t.enter("lineEnding"),t.consume(e),t.exit("lineEnding"),r};function r(e){return(s.parser.lazy[s.now().line]?i:n)(e)}}function C(e){return 45===e?(t.consume(e),M):$(e)}function F(e){return 47===e?(t.consume(e),a="",P):$(e)}function P(e){return 62===e&&htmlRawNames.includes(a.toLowerCase())?(t.consume(e),A):asciiAlpha(e)&&a.length<8?(t.consume(e),a+=String.fromCharCode(e),P):$(e)}function N(e){return 93===e?(t.consume(e),M):$(e)}function M(e){return 62===e?(t.consume(e),A):45===e&&2===r?(t.consume(e),M):$(e)}function A(e){return null===e||markdownLineEnding(e)?(t.exit("htmlFlowData"),_(e)):(t.consume(e),A)}function _(e){return t.exit("htmlFlow"),n(e)}}function tokenizeNextBlank(t,n,i){return function(e){return t.exit("htmlFlowData"),t.enter("lineEndingBlank"),t.consume(e),t.exit("lineEndingBlank"),t.attempt(blankLine,n,i)}}const htmlText={name:"htmlText",tokenize:tokenizeHtmlText};function tokenizeHtmlText(t,n,i){const r=this;let s,o,a,l;return function(e){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(e),c};function c(e){return 33===e?(t.consume(e),u):47===e?(t.consume(e),E):63===e?(t.consume(e),S):asciiAlpha(e)?(t.consume(e),R):i(e)}function u(e){return 45===e?(t.consume(e),p):91===e?(t.consume(e),o="CDATA[",a=0,h):asciiAlpha(e)?(t.consume(e),j):i(e)}function p(e){return 45===e?(t.consume(e),d):i(e)}function d(e){return null===e||62===e?i(e):45===e?(t.consume(e),m):g(e)}function m(e){return(null===e||62===e?i:g)(e)}function g(e){return null===e?i(e):45===e?(t.consume(e),f):markdownLineEnding(e)?(l=g,M(e)):(t.consume(e),g)}function f(e){return 45===e?(t.consume(e),_):g(e)}function h(e){return e===o.charCodeAt(a++)?(t.consume(e),a===o.length?x:h):i(e)}function x(e){return null===e?i(e):93===e?(t.consume(e),y):markdownLineEnding(e)?(l=x,M(e)):(t.consume(e),x)}function y(e){return 93===e?(t.consume(e),b):x(e)}function b(e){return 62===e?_(e):93===e?(t.consume(e),b):x(e)}function j(e){return null===e||62===e?_(e):markdownLineEnding(e)?(l=j,M(e)):(t.consume(e),j)}function S(e){return null===e?i(e):63===e?(t.consume(e),v):markdownLineEnding(e)?(l=S,M(e)):(t.consume(e),S)}function v(e){return(62===e?_:S)(e)}function E(e){return asciiAlpha(e)?(t.consume(e),w):i(e)}function w(e){return 45===e||asciiAlphanumeric(e)?(t.consume(e),w):T(e)}function T(e){return markdownLineEnding(e)?(l=T,M(e)):markdownSpace(e)?(t.consume(e),T):_(e)}function R(e){return 45===e||asciiAlphanumeric(e)?(t.consume(e),R):(47===e||62===e||markdownLineEndingOrSpace(e)?$:i)(e)}function $(e){return 47===e?(t.consume(e),_):58===e||95===e||asciiAlpha(e)?(t.consume(e),k):markdownLineEnding(e)?(l=$,M(e)):markdownSpace(e)?(t.consume(e),$):_(e)}function k(e){return 45===e||46===e||58===e||95===e||asciiAlphanumeric(e)?(t.consume(e),k):I(e)}function I(e){return 61===e?(t.consume(e),O):markdownLineEnding(e)?(l=I,M(e)):markdownSpace(e)?(t.consume(e),I):$(e)}function O(e){return null===e||60===e||61===e||62===e||96===e?i(e):34===e||39===e?(t.consume(e),s=e,C):markdownLineEnding(e)?(l=O,M(e)):markdownSpace(e)?(t.consume(e),O):(t.consume(e),s=void 0,P)}function C(e){return e===s?(t.consume(e),F):null===e?i(e):markdownLineEnding(e)?(l=C,M(e)):(t.consume(e),C)}function F(e){return(62===e||47===e||markdownLineEndingOrSpace(e)?$:i)(e)}function P(e){return null===e||34===e||39===e||60===e||61===e||96===e?i(e):62===e||markdownLineEndingOrSpace(e)?$(e):(t.consume(e),P)}function M(e){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(e),t.exit("lineEnding"),factorySpace(t,A,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function A(e){return t.enter("htmlTextData"),l(e)}function _(e){return 62===e?(t.consume(e),t.exit("htmlTextData"),t.exit("htmlText"),n):i(e)}}const labelEnd={name:"labelEnd",tokenize:tokenizeLabelEnd,resolveTo:resolveToLabelEnd,resolveAll:resolveAllLabelEnd},resourceConstruct={tokenize:tokenizeResource},fullReferenceConstruct={tokenize:tokenizeFullReference},collapsedReferenceConstruct={tokenize:tokenizeCollapsedReference};function resolveAllLabelEnd(e){let t=-1,n;for(;++t<e.length;)"labelImage"!==(n=e[t][1]).type&&"labelLink"!==n.type&&"labelEnd"!==n.type||(e.splice(t+1,"labelImage"===n.type?4:2),n.type="data",t++);return e}function resolveToLabelEnd(e,t){let n=e.length,i=0,r,s,o;for(;n--;)if(r=e[n][1],s){if("link"===r.type||"labelLink"===r.type&&r._inactive)break;"enter"===e[n][0]&&"labelLink"===r.type&&(r._inactive=!0)}else if(o){if("enter"===e[n][0]&&("labelImage"===r.type||"labelLink"===r.type)&&!r._balanced&&(s=n,"labelLink"!==r.type)){i=2;break}}else"labelEnd"===r.type&&(o=n);var a,l={type:"labelLink"===e[s][1].type?"link":"image",start:Object.assign({},e[s][1].start),end:Object.assign({},e[e.length-1][1].end)},c={type:"label",start:Object.assign({},e[s][1].start),end:Object.assign({},e[o][1].end)},u={type:"labelText",start:Object.assign({},e[s+i+2][1].end),end:Object.assign({},e[o-2][1].start)};return a=push([["enter",l,t],["enter",c,t]],e.slice(s+1,s+i+3)),a=push(a,[["enter",u,t]]),a=push(a,resolveAll(t.parser.constructs.insideSpan.null,e.slice(s+i+4,o-3),t)),a=push(a,[["exit",u,t],e[o-2],e[o-1],["exit",c,t]]),a=push(a,e.slice(o+1)),a=push(a,[["exit",l,t]]),splice$1(e,s,e.length,a),e}function tokenizeLabelEnd(t,n,i){const r=this;let e=r.events.length,s,o;for(;e--;)if(("labelImage"===r.events[e][1].type||"labelLink"===r.events[e][1].type)&&!r.events[e][1]._balanced){s=r.events[e][1];break}return function(e){return s?s._inactive?l(e):(o=r.parser.defined.includes(normalizeIdentifier(r.sliceSerialize({start:s.end,end:r.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(e),t.exit("labelMarker"),t.exit("labelEnd"),a):i(e)};function a(e){return(40===e?t.attempt(resourceConstruct,n,o?n:l):91===e?t.attempt(fullReferenceConstruct,n,o?t.attempt(collapsedReferenceConstruct,n,l):l):o?n:l)(e)}function l(e){return s._balanced=!0,i(e)}}function tokenizeResource(t,n,i){return function(e){return t.enter("resource"),t.enter("resourceMarker"),t.consume(e),t.exit("resourceMarker"),factoryWhitespace(t,r)};function r(e){return(41===e?a:factoryDestination(t,s,i,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32))(e)}function s(e){return(markdownLineEndingOrSpace(e)?factoryWhitespace(t,o):a)(e)}function o(e){return(34===e||39===e||40===e?factoryTitle(t,factoryWhitespace(t,a),i,"resourceTitle","resourceTitleMarker","resourceTitleString"):a)(e)}function a(e){return 41===e?(t.enter("resourceMarker"),t.consume(e),t.exit("resourceMarker"),t.exit("resource"),n):i(e)}}function tokenizeFullReference(t,n,i){const r=this;return function(e){return factoryLabel.call(r,t,s,i,"reference","referenceMarker","referenceString")(e)};function s(e){return(r.parser.defined.includes(normalizeIdentifier(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?n:i)(e)}}function tokenizeCollapsedReference(t,n,i){return function(e){return t.enter("reference"),t.enter("referenceMarker"),t.consume(e),t.exit("referenceMarker"),r};function r(e){return 93===e?(t.enter("referenceMarker"),t.consume(e),t.exit("referenceMarker"),t.exit("reference"),n):i(e)}}const labelStartImage={name:"labelStartImage",tokenize:tokenizeLabelStartImage,resolveAll:labelEnd.resolveAll};function tokenizeLabelStartImage(t,n,i){const r=this;return function(e){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(e),t.exit("labelImageMarker"),s};function s(e){return 91===e?(t.enter("labelMarker"),t.consume(e),t.exit("labelMarker"),t.exit("labelImage"),o):i(e)}function o(e){return(94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?i:n)(e)}}const labelStartLink={name:"labelStartLink",tokenize:tokenizeLabelStartLink,resolveAll:labelEnd.resolveAll};function tokenizeLabelStartLink(t,n,i){const r=this;return function(e){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(e),t.exit("labelMarker"),t.exit("labelLink"),s};function s(e){return(94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?i:n)(e)}}const lineEnding={name:"lineEnding",tokenize:tokenizeLineEnding};function tokenizeLineEnding(t,n){return function(e){return t.enter("lineEnding"),t.consume(e),t.exit("lineEnding"),factorySpace(t,n,"linePrefix")}}const thematicBreak$1={name:"thematicBreak",tokenize:tokenizeThematicBreak};function tokenizeThematicBreak(t,n,i){let r=0,s;return function(e){return t.enter("thematicBreak"),o(s=e)};function o(e){return e===s?(t.enter("thematicBreakSequence"),a(e)):markdownSpace(e)?factorySpace(t,o,"whitespace")(e):r<3||null!==e&&!markdownLineEnding(e)?i(e):(t.exit("thematicBreak"),n(e))}function a(e){return e===s?(t.consume(e),r++,a):(t.exit("thematicBreakSequence"),o(e))}}const list$1={name:"list",tokenize:tokenizeListStart,continuation:{tokenize:tokenizeListContinuation},exit:tokenizeListEnd},listItemPrefixWhitespaceConstruct={tokenize:tokenizeListItemPrefixWhitespace,partial:!0},indentConstruct={tokenize:tokenizeIndent,partial:!0};function tokenizeListStart(n,t,i){const r=this,e=r.events[r.events.length-1];let s=e&&"linePrefix"===e[1].type?e[2].sliceSerialize(e[1],!0).length:0,o=0;return function(e){var t=r.containerState.type||(42===e||43===e||45===e?"listUnordered":"listOrdered");if("listUnordered"===t?!r.containerState.marker||e===r.containerState.marker:asciiDigit(e)){if(r.containerState.type||(r.containerState.type=t,n.enter(t,{_container:!0})),"listUnordered"===t)return n.enter("listItemPrefix"),(42===e||45===e?n.check(thematicBreak$1,i,l):l)(e);if(!r.interrupt||49===e)return n.enter("listItemPrefix"),n.enter("listItemValue"),a(e)}return i(e)};function a(e){return asciiDigit(e)&&++o<10?(n.consume(e),a):(!r.interrupt||o<2)&&(r.containerState.marker?e===r.containerState.marker:41===e||46===e)?(n.exit("listItemValue"),l(e)):i(e)}function l(e){return n.enter("listItemMarker"),n.consume(e),n.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||e,n.check(blankLine,r.interrupt?i:c,n.attempt(listItemPrefixWhitespaceConstruct,p,u))}function c(e){return r.containerState.initialBlankLine=!0,s++,p(e)}function u(e){return markdownSpace(e)?(n.enter("listItemPrefixWhitespace"),n.consume(e),n.exit("listItemPrefixWhitespace"),p):i(e)}function p(e){return r.containerState.size=s+r.sliceSerialize(n.exit("listItemPrefix"),!0).length,t(e)}}function tokenizeListContinuation(t,n,i){const r=this;return r.containerState._closeFlow=void 0,t.check(blankLine,function(e){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,factorySpace(t,n,"listItemIndent",r.containerState.size+1)(e)},function(e){return!r.containerState.furtherBlankLines&&markdownSpace(e)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,t.attempt(indentConstruct,n,s)(e)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(e))});function s(e){return r.containerState._closeFlow=!0,r.interrupt=void 0,factorySpace(t,t.attempt(list$1,n,i),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(e)}}function tokenizeIndent(e,n,i){const r=this;return factorySpace(e,function(e){const t=r.events[r.events.length-1];return(t&&"listItemIndent"===t[1].type&&t[2].sliceSerialize(t[1],!0).length===r.containerState.size?n:i)(e)},"listItemIndent",r.containerState.size+1)}function tokenizeListEnd(e){e.exit(this.containerState.type)}function tokenizeListItemPrefixWhitespace(e,n,i){const r=this;return factorySpace(e,function(e){var t=r.events[r.events.length-1];return(!markdownSpace(e)&&t&&"listItemPrefixWhitespace"===t[1].type?n:i)(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}const setextUnderline={name:"setextUnderline",tokenize:tokenizeSetextUnderline,resolveTo:resolveToSetextUnderline};function resolveToSetextUnderline(e,t){let n=e.length,i,r,s;for(;n--;)if("enter"===e[n][0]){if("content"===e[n][1].type){i=n;break}"paragraph"===e[n][1].type&&(r=n)}else"content"===e[n][1].type&&e.splice(n,1),s||"definition"!==e[n][1].type||(s=n);var o={type:"setextHeading",start:Object.assign({},e[r][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[r][1].type="setextHeadingText",s?(e.splice(r,0,["enter",o,t]),e.splice(s+1,0,["exit",e[i][1],t]),e[i][1].end=Object.assign({},e[s][1].end)):e[i][1]=o,e.push(["exit",o,t]),e}function tokenizeSetextUnderline(t,n,i){const r=this;let e=r.events.length,s,o;for(;e--;)if("lineEnding"!==r.events[e][1].type&&"linePrefix"!==r.events[e][1].type&&"content"!==r.events[e][1].type){o="paragraph"===r.events[e][1].type;break}return function(e){return r.parser.lazy[r.now().line]||!r.interrupt&&!o?i(e):(t.enter("setextHeadingLine"),t.enter("setextHeadingLineSequence"),a(s=e))};function a(e){return e===s?(t.consume(e),a):(t.exit("setextHeadingLineSequence"),factorySpace(t,l,"lineSuffix")(e))}function l(e){return null===e||markdownLineEnding(e)?(t.exit("setextHeadingLine"),n(e)):i(e)}}const flow$1={tokenize:initializeFlow};function initializeFlow(t){const n=this,i=t.attempt(blankLine,function(e){if(null!==e)return t.enter("lineEndingBlank"),t.consume(e),t.exit("lineEndingBlank"),n.currentConstruct=void 0,i;t.consume(e)},t.attempt(this.parser.constructs.flowInitial,e,factorySpace(t,t.attempt(this.parser.constructs.flow,e,t.attempt(content,e)),"linePrefix")));return i;function e(e){if(null!==e)return t.enter("lineEnding"),t.consume(e),t.exit("lineEnding"),n.currentConstruct=void 0,i;t.consume(e)}}const resolver={resolveAll:createResolver()},string$1=initializeFactory("string"),text$2=initializeFactory("text");function initializeFactory(l){return{tokenize:function(t){const r=this,s=this.parser.constructs[l],n=t.attempt(s,e,i);return e;function e(e){return(a(e)?n:i)(e)}function i(e){if(null!==e)return t.enter("data"),t.consume(e),o;t.consume(e)}function o(e){return a(e)?(t.exit("data"),n(e)):(t.consume(e),o)}function a(e){if(null===e)return 1;var t=s[e];let n=-1;if(t)for(;++n<t.length;){const i=t[n];if(!i.previous||i.previous.call(r,r.previous))return 1}}},resolveAll:createResolver("text"===l?resolveAllLineSuffixes:void 0)}}function createResolver(r){return function(e,t){let n=-1,i;for(;++n<=e.length;)void 0===i?e[n]&&"data"===e[n][1].type&&(i=n,n++):e[n]&&"data"===e[n][1].type||(n!==i+2&&(e[i][1].end=e[n-1][1].end,e.splice(i+2,n-i-2),n=i+2),i=void 0);return r?r(e,t):e}}function resolveAllLineSuffixes(r,s){let o=0;for(;++o<=r.length;)if((o===r.length||"lineEnding"===r[o][1].type)&&"data"===r[o-1][1].type){const c=r[o-1][1];var a,l=s.sliceStream(c);let e=l.length,t=-1,n=0,i;for(;e--;){const u=l[e];if("string"==typeof u){for(t=u.length;32===u.charCodeAt(t-1);)n++,t--;if(t)break;t=-1}else if(-2===u)i=!0,n++;else if(-1!==u){e++;break}}n&&(a={type:o===r.length||i||n<2?"lineSuffix":"hardBreakTrailing",start:{line:c.end.line,column:c.end.column-n,offset:c.end.offset-n,_index:c.start._index+e,_bufferIndex:e?t:c.start._bufferIndex+t},end:Object.assign({},c.end)},c.end=Object.assign({},a.start),c.start.offset===c.end.offset?Object.assign(c,a):(r.splice(o,0,["enter",a,s],["exit",a,s]),o+=2)),o++}return r}function createTokenizer(e,i,t){let m=Object.assign(t?Object.assign({},t):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const n={},r=[];let s=[],g=[];const f={consume:function(e){markdownLineEnding(e)?(m.line++,m.column=1,m.offset+=-3===e?2:1,y()):-1!==e&&(m.column++,m.offset++);m._bufferIndex<0?m._index++:(m._bufferIndex++,m._bufferIndex===s[m._index].length&&(m._bufferIndex=-1,m._index++));h.previous=e},enter:function(e,t){const n=t||{};return n.type=e,n.start=x(),h.events.push(["enter",n,h]),g.push(n),n},exit:function(e){const t=g.pop();return t.end=x(),h.events.push(["exit",t,h]),t},attempt:u(function(e,t){p(e,t.from)}),check:u(c),interrupt:u(c,{interrupt:!0})},h={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:a,sliceSerialize:function(e,t){return serializeChunks(a(e),t)},now:x,defineSkip:function(e){n[e.line]=e.column,y()},write:function(e){var t;for(s=push(s,e);m._index<s.length;){const n=s[m._index];if("string"==typeof n)for(t=m._index,m._bufferIndex<0&&(m._bufferIndex=0);m._index===t&&m._bufferIndex<n.length;)l(n.charCodeAt(m._bufferIndex));else l(n)}return null===s[s.length-1]?(p(i,0),h.events=resolveAll(r,h.events,h),h.events):[]}};let o=i.tokenize.call(h,f);return i.resolveAll&&r.push(i),h;function a(e){return sliceChunks(s,e)}function x(){return Object.assign({},m)}function l(e){o=o(e)}function c(e,t){t.restore()}function u(p,d){return function(e,t,n){let i,r,s,o;return Array.isArray(e)?a(e):"tokenize"in e?a([e]):function(i){return function(e){var t=null!==e&&i[e],n=null!==e&&i.null,t=[...Array.isArray(t)?t:t?[t]:[],...Array.isArray(n)?n:n?[n]:[]];return a(t)(e)}}(e);function a(e){return i=e,(r=0)===e.length?n:l(e[r])}function l(t){return function(e){o=function(){const e=x(),t=h.previous,n=h.currentConstruct,i=h.events.length,r=Array.from(g);return{restore:function(){m=e,h.previous=t,h.currentConstruct=n,h.events.length=i,g=r,y()},from:i}}(),(s=t).partial||(h.currentConstruct=t);if(t.name&&h.parser.constructs.disable.null.includes(t.name))return u();return t.tokenize.call(d?Object.assign(Object.create(h),d):h,f,c,u)(e)}}function c(e){return p(s,o),t}function u(e){return o.restore(),++r<i.length?l(i[r]):n}}}function p(e,t){e.resolveAll&&!r.includes(e)&&r.push(e),e.resolve&&splice$1(h.events,t,h.events.length-t,e.resolve(h.events.slice(t),h)),e.resolveTo&&(h.events=e.resolveTo(h.events,h))}function y(){m.line in n&&m.column<2&&(m.column=n[m.line],m.offset+=n[m.line]-1)}}function sliceChunks(e,t){var n=t.start._index,i=t.start._bufferIndex,r=t.end._index,t=t.end._bufferIndex;let s;return n===r?s=[e[n].slice(i,t)]:(s=e.slice(n,r),-1<i&&(s[0]=s[0].slice(i)),0<t&&s.push(e[r].slice(0,t))),s}function serializeChunks(t,n){let i=-1;const r=[];let s;for(;++i<t.length;){var o=t[i];let e;if("string"==typeof o)e=o;else switch(o){case-5:e="\r";break;case-4:e="\n";break;case-3:e="\r\n";break;case-2:e=n?" ":"\t";break;case-1:if(!n&&s)continue;e=" ";break;default:e=String.fromCharCode(o)}s=-2===o,r.push(e)}return r.join("")}const document$1={[42]:list$1,43:list$1,45:list$1,48:list$1,49:list$1,50:list$1,51:list$1,52:list$1,53:list$1,54:list$1,55:list$1,56:list$1,57:list$1,62:blockQuote},contentInitial={[91]:definition},flowInitial={"-2":codeIndented,"-1":codeIndented,[32]:codeIndented},flow={[35]:headingAtx,42:thematicBreak$1,45:[setextUnderline,thematicBreak$1],60:htmlFlow,61:setextUnderline,95:thematicBreak$1,96:codeFenced,126:codeFenced},string={[38]:characterReference,92:characterEscape},text$1={"-5":lineEnding,"-4":lineEnding,"-3":lineEnding,[33]:labelStartImage,38:characterReference,42:attention,60:[autolink,htmlText],91:labelStartLink,92:[hardBreakEscape,characterEscape],93:labelEnd,95:attention,96:codeText},insideSpan={null:[attention,resolver]},attentionMarkers={null:[42,95]},disable={null:[]};var defaultConstructs=Object.freeze({__proto__:null,document:document$1,contentInitial:contentInitial,flowInitial:flowInitial,flow:flow,string:string,text:text$1,insideSpan:insideSpan,attentionMarkers:attentionMarkers,disable:disable});function parse$1(e={}){const n={defined:[],lazy:{},constructs:combineExtensions([defaultConstructs].concat(e.extensions||[])),content:t(content$1),document:t(document$2),flow:t(flow$1),string:t(string$1),text:t(text$2)};return n;function t(t){return function(e){return createTokenizer(n,t,e)}}}const search=/[\0\t\n\r]/g;function preprocess(){let c=1,u="",p=!0,d;return function(e,t,n){const i=[];let r,s,o,a,l;e=u+e.toString(t),o=0,u="",p&&(65279===e.charCodeAt(0)&&o++,p=void 0);for(;o<e.length;){if(search.lastIndex=o,r=search.exec(e),a=r&&void 0!==r.index?r.index:e.length,l=e.charCodeAt(a),!r){u=e.slice(o);break}if(10===l&&o===a&&d)i.push(-3),d=void 0;else switch(d&&(i.push(-5),d=void 0),o<a&&(i.push(e.slice(o,a)),c+=a-o),l){case 0:i.push(65533),c++;break;case 9:for(s=4*Math.ceil(c/4),i.push(-2);c++<s;)i.push(-1);break;case 10:i.push(-4),c=1;break;default:d=!0,c=1}o=a+1}n&&(d&&i.push(-5),u&&i.push(u),i.push(null));return i}}function postprocess(e){for(;!subtokenize(e););return e}function decodeNumericCharacterReference(e,t){e=Number.parseInt(e,t);return e<9||11===e||13<e&&e<32||126<e&&e<160||55295<e&&e<57344||64975<e&&e<65008||65535==(65535&e)||65534==(65535&e)||1114111<e?"�":String.fromCharCode(e)}const characterEscapeOrReference=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function decodeString(e){return e.replace(characterEscapeOrReference,decode)}function decode(e,t,n){if(t)return t;const i=n.charCodeAt(0);if(35!==i)return decodeNamedCharacterReference(n)||e;{const i=n.charCodeAt(1);t=120===i||88===i;return decodeNumericCharacterReference(n.slice(t?2:1),t?16:10)}}function stringifyPosition(e){return e&&"object"==typeof e?"position"in e||"type"in e?position(e.position):"start"in e||"end"in e?position(e):"line"in e||"column"in e?point$1(e):"":""}function point$1(e){return index$1(e&&e.line)+":"+index$1(e&&e.column)}function position(e){return point$1(e&&e.start)+"-"+point$1(e&&e.end)}function index$1(e){return e&&"number"==typeof e?e:1}const own$6={}.hasOwnProperty,fromMarkdown=function(e,t,n){return"string"!=typeof t&&(n=t,t=void 0),compiler(n)(postprocess(parse$1(n).document().write(preprocess()(e,t,!0))))};function compiler(e={}){const p=configure({transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:t(j),autolinkProtocol:i,autolinkEmail:i,atxHeading:t(c),blockQuote:t(function(){return{type:"blockquote",children:[]}}),characterEscape:i,characterReference:i,codeFenced:t(l),codeFencedFenceInfo:f,codeFencedFenceMeta:f,codeIndented:t(l,f),codeText:t(function(){return{type:"inlineCode",value:""}},f),codeTextData:i,data:i,codeFlowValue:i,definition:t(function(){return{type:"definition",identifier:"",label:null,title:null,url:""}}),definitionDestinationString:f,definitionLabelString:f,definitionTitleString:f,emphasis:t(function(){return{type:"emphasis",children:[]}}),hardBreakEscape:t(u),hardBreakTrailing:t(u),htmlFlow:t(b,f),htmlFlowData:i,htmlText:t(b,f),htmlTextData:i,image:t(function(){return{type:"image",title:null,url:"",alt:null}}),label:f,link:t(j),listItem:t(function(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}),listItemValue:function(e){if(s.expectingFirstListItemValue){const t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),d("expectingFirstListItemValue")}},listOrdered:t(S,function(){d("expectingFirstListItemValue",!0)}),listUnordered:t(S),paragraph:t(function(){return{type:"paragraph",children:[]}}),reference:function(){d("referenceType","collapsed")},referenceString:f,resourceDestinationString:f,resourceTitleString:f,setextHeading:t(c),strong:t(function(){return{type:"strong",children:[]}}),thematicBreak:t(function(){return{type:"thematicBreak"}})},exit:{atxHeading:n(),atxHeadingSequence:function(e){const t=this.stack[this.stack.length-1];t.depth||(e=this.sliceSerialize(e).length,t.depth=e)},autolink:n(),autolinkEmail:function(e){r.call(this,e);const t=this.stack[this.stack.length-1];t.url="mailto:"+this.sliceSerialize(e)},autolinkProtocol:function(e){r.call(this,e);const t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)},blockQuote:n(),characterEscapeValue:r,characterReferenceMarkerHexadecimal:a,characterReferenceMarkerNumeric:a,characterReferenceValue:function(e){var t=this.sliceSerialize(e),n=s.characterReferenceType;let i;n?(i=decodeNumericCharacterReference(t,"characterReferenceMarkerNumeric"===n?10:16),d("characterReferenceType")):i=decodeNamedCharacterReference(t);const r=this.stack.pop();r.value+=i,r.position.end=g(e.end)},codeFenced:n(function(){const e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),d("flowCodeInside")}),codeFencedFence:function(){s.flowCodeInside||(this.buffer(),d("flowCodeInside",!0))},codeFencedFenceInfo:function(){const e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e},codeFencedFenceMeta:function(){const e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e},codeFlowValue:r,codeIndented:n(function(){const e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,"")}),codeText:n(function(){const e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}),codeTextData:r,data:r,definition:n(),definitionDestinationString:function(){const e=this.resume(),t=this.stack[this.stack.length-1];t.url=e},definitionLabelString:function(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=normalizeIdentifier(this.sliceSerialize(e)).toLowerCase()},definitionTitleString:function(){const e=this.resume(),t=this.stack[this.stack.length-1];t.title=e},emphasis:n(),hardBreakEscape:n(o),hardBreakTrailing:n(o),htmlFlow:n(function(){const e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}),htmlFlowData:r,htmlText:n(function(){const e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}),htmlTextData:r,image:n(function(){const e=this.stack[this.stack.length-1];s.inReference?(e.type+="Reference",e.referenceType=s.referenceType||"shortcut",delete e.url,delete e.title):(delete e.identifier,delete e.label);d("referenceType")}),label:function(){const e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];d("inReference",!0),"link"===n.type?n.children=e.children:n.alt=t},labelText:function(e){const t=this.stack[this.stack.length-2],n=this.sliceSerialize(e);t.label=decodeString(n),t.identifier=normalizeIdentifier(n).toLowerCase()},lineEnding:function(e){var t=this.stack[this.stack.length-1];if(s.atHardBreak){const n=t.children[t.children.length-1];n.position.end=g(e.end),d("atHardBreak")}else!s.setextHeadingSlurpLineEnding&&p.canContainEols.includes(t.type)&&(i.call(this,e),r.call(this,e))},link:n(function(){const e=this.stack[this.stack.length-1];s.inReference?(e.type+="Reference",e.referenceType=s.referenceType||"shortcut",delete e.url,delete e.title):(delete e.identifier,delete e.label);d("referenceType")}),listItem:n(),listOrdered:n(),listUnordered:n(),paragraph:n(),referenceString:function(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=normalizeIdentifier(this.sliceSerialize(e)).toLowerCase(),d("referenceType","full")},resourceDestinationString:function(){const e=this.resume(),t=this.stack[this.stack.length-1];t.url=e},resourceTitleString:function(){const e=this.resume(),t=this.stack[this.stack.length-1];t.title=e},resource:function(){d("inReference")},setextHeading:n(function(){d("setextHeadingSlurpLineEnding")}),setextHeadingLineSequence:function(e){const t=this.stack[this.stack.length-1];t.depth=61===this.sliceSerialize(e).charCodeAt(0)?1:2},setextHeadingText:function(){d("setextHeadingSlurpLineEnding",!0)},strong:n(),thematicBreak:n()}},e.mdastExtensions||[]),s={};return function(e){let t={type:"root",children:[]};const n=[t],i=[],r=[],s={stack:n,tokenStack:i,config:p,enter:h,exit:x,buffer:f,resume:y,setData:d,getData:m};let o=-1;for(;++o<e.length;){var a;"listOrdered"!==e[o][1].type&&"listUnordered"!==e[o][1].type||("enter"===e[o][0]?r.push(o):(a=r.pop(),o=function(t,e,n){let i=e-1,r=-1,s=!1,o,a,l,c;for(;++i<=n;){var u=t[i];if("listUnordered"===u[1].type||"listOrdered"===u[1].type||"blockQuote"===u[1].type?("enter"===u[0]?r++:r--,c=void 0):"lineEndingBlank"===u[1].type?"enter"===u[0]&&(!o||c||r||l||(l=i),c=void 0):"linePrefix"!==u[1].type&&"listItemValue"!==u[1].type&&"listItemMarker"!==u[1].type&&"listItemPrefix"!==u[1].type&&"listItemPrefixWhitespace"!==u[1].type&&(c=void 0),!r&&"enter"===u[0]&&"listItemPrefix"===u[1].type||-1===r&&"exit"===u[0]&&("listUnordered"===u[1].type||"listOrdered"===u[1].type)){if(o){let e=i;for(a=void 0;e--;){const p=t[e];if("lineEnding"===p[1].type||"lineEndingBlank"===p[1].type)"exit"!==p[0]&&(a&&(t[a][1].type="lineEndingBlank",s=!0),p[1].type="lineEnding",a=e);else if("linePrefix"!==p[1].type&&"blockQuotePrefix"!==p[1].type&&"blockQuotePrefixWhitespace"!==p[1].type&&"blockQuoteMarker"!==p[1].type&&"listItemIndent"!==p[1].type)break}l&&(!a||l<a)&&(o._spread=!0),o.end=Object.assign({},a?t[a][1].start:u[1].end),t.splice(a||i,0,["exit",o,u[2]]),i++,n++}"listItemPrefix"===u[1].type&&(o={type:"listItem",_spread:!1,start:Object.assign({},u[1].start)},t.splice(i,0,["enter",o,u[2]]),i++,n++,l=void 0,c=!0)}}return t[e][1]._spread=s,n}(e,a,o)))}o=-1;for(;++o<e.length;){const c=p[e[o][0]];own$6.call(c,e[o][1].type)&&c[e[o][1].type].call(Object.assign({sliceSerialize:e[o][2].sliceSerialize},s),e[o][1])}if(0<i.length){var l=i[i.length-1];const u=l[1]||defaultOnError;u.call(s,void 0,l[0])}t.position={start:g(0<e.length?e[0][1].start:{line:1,column:1,offset:0}),end:g(0<e.length?e[e.length-2][1].end:{line:1,column:1,offset:0})},o=-1;for(;++o<p.transforms.length;)t=p.transforms[o](t)||t;return t};function d(e,t){s[e]=t}function m(e){return s[e]}function g(e){return{line:e.line,column:e.column,offset:e.offset}}function t(t,n){return function(e){h.call(this,t(e),e),n&&n.call(this,e)}}function f(){this.stack.push({type:"fragment",children:[]})}function h(e,t,n){const i=this.stack[this.stack.length-1];return i.children.push(e),this.stack.push(e),this.tokenStack.push([t,n]),e.position={start:g(t.start)},e}function n(t){return function(e){t&&t.call(this,e);x.call(this,e)}}function x(e,t){const n=this.stack.pop();var i=this.tokenStack.pop();if(!i)throw new Error("Cannot close `"+e.type+"` ("+stringifyPosition({start:e.start,end:e.end})+"): it’s not open");if(i[0].type!==e.type)if(t)t.call(this,e,i[0]);else{const r=i[1]||defaultOnError;r.call(this,e,i[0])}return n.position.end=g(e.end),n}function y(){return toString$2(this.stack.pop())}function i(e){const t=this.stack[this.stack.length-1];let n=t.children[t.children.length-1];n&&"text"===n.type||((n={type:"text",value:""}).position={start:g(e.start)},t.children.push(n)),this.stack.push(n)}function r(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=g(e.end)}function o(){d("atHardBreak",!0)}function a(e){d("characterReferenceType",e.type)}function l(){return{type:"code",lang:null,meta:null,value:""}}function c(){return{type:"heading",depth:void 0,children:[]}}function u(){return{type:"break"}}function b(){return{type:"html",value:""}}function j(){return{type:"link",title:null,url:"",children:[]}}function S(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}}function configure(e,t){let n=-1;for(;++n<t.length;){var i=t[n];(Array.isArray(i)?configure:extension)(e,i)}return e}function extension(e,t){let n;for(n in t){var i,r,s;own$6.call(t,n)&&(i="canContainEols"===n||"transforms"===n,r=(own$6.call(e,n)?e[n]:void 0)||(e[n]=i?[]:{}),(s=t[n])&&(i?e[n]=[...r,...s]:Object.assign(r,s)))}}function defaultOnError(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+stringifyPosition({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+stringifyPosition({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+stringifyPosition({start:t.start,end:t.end})+") is still open")}function remarkParse(n){Object.assign(this,{Parser:e=>{var t=this.data("settings");return fromMarkdown(e,Object.assign({},t,n,{extensions:this.data("micromarkExtensions")||[],mdastExtensions:this.data("fromMarkdownExtensions")||[]}))}})}var u=function(e,t,n){e={type:String(e)};return null!=n||"string"!=typeof t&&!Array.isArray(t)?Object.assign(e,t):n=t,Array.isArray(n)?e.children=n:null!=n&&(e.value=String(n)),e};const own$5={}.hasOwnProperty;function unknown(e,t){var n=t.data||{};return"value"in t&&!(own$5.call(n,"hName")||own$5.call(n,"hProperties")||own$5.call(n,"hChildren"))?e.augment(t,u("text",t.value)):e(t,"div",all(e,t))}function one(e,t,n){var i=t&&t.type;let r;if(i)return("function"==typeof(r=own$5.call(e.handlers,i)?e.handlers[i]:e.passThrough&&e.passThrough.includes(i)?returnNode:e.unknownHandler)?r:unknown)(e,t,n);throw new Error("Expected node, got `"+t+"`")}function returnNode(e,t){return"children"in t?{...t,children:all(e,t)}:t}function all(t,n){const i=[];if("children"in n){var r=n.children;let e=-1;for(;++e<r.length;){const s=one(t,r[e],n);if(s){if(e&&"break"===r[e-1].type&&(Array.isArray(s)||"text"!==s.type||(s.value=s.value.replace(/^\s+/,"")),!Array.isArray(s)&&"element"===s.type)){const o=s.children[0];o&&"text"===o.type&&(o.value=o.value.replace(/^\s+/,""))}Array.isArray(s)?i.push(...s):i.push(s)}}}return i}const convert$1=function(e){if(null==e)return ok$1;if("string"==typeof e)return typeFactory$1(e);if("object"==typeof e)return(Array.isArray(e)?anyFactory$1:propsFactory$1)(e);if("function"==typeof e)return castFactory$1(e);throw new Error("Expected function, string, or object as test")};function anyFactory$1(e){const n=[];let t=-1;for(;++t<e.length;)n[t]=convert$1(e[t]);return castFactory$1(function(...e){let t=-1;for(;++t<n.length;)if(n[t].call(this,...e))return!0;return!1})}function propsFactory$1(n){return castFactory$1(function(e){let t;for(t in n)if(e[t]!==n[t])return!1;return!0})}function typeFactory$1(t){return castFactory$1(function(e){return e&&e.type===t})}function castFactory$1(t){return function(...e){return Boolean(t.call(this,...e))}}function ok$1(){return!0}function color$1(e){return e}const CONTINUE$1=!0,SKIP$1="skip",EXIT$1=!1,visitParents$1=function(e,l,c,u){"function"==typeof l&&"function"!=typeof c&&(u=c,c=l,l=null);const p=convert$1(l),d=u?-1:1;!function r(s,o,a){const e="object"==typeof s&&null!==s?s:{};let t;"string"==typeof e.type&&(t="string"==typeof e.tagName?e.tagName:"string"==typeof e.name?e.name:void 0,Object.defineProperty(n,"name",{value:"node ("+color$1(e.type+(t?"<"+t+">":""))+")"}));return n;function n(){let e=[],t,n,i;if((!l||p(s,o,a[a.length-1]||null))&&(e=toResult$1(c(s,a)))[0]===EXIT$1)return e;if(s.children&&e[0]!==SKIP$1)for(n=(u?s.children.length:-1)+d,i=a.concat(s);-1<n&&n<s.children.length;){if((t=r(s.children[n],n,i)())[0]===EXIT$1)return t;n="number"==typeof t[1]?t[1]:n+d}return e}}(e,null,[])()};function toResult$1(e){return Array.isArray(e)?e:"number"==typeof e?[CONTINUE$1,e]:[e]}const visit$1=function(e,t,i,n){"function"==typeof t&&"function"!=typeof i&&(n=i,i=t,t=null),visitParents$1(e,t,function(e,t){const n=t[t.length-1];return i(e,n?n.children.indexOf(e):null,n)},n)},pointStart=point("start"),pointEnd=point("end");function point(t){return function(e){e=e&&e.position&&e.position[t]||{};return{line:e.line||null,column:e.column||null,offset:-1<e.offset?e.offset:null}}}function generated(e){return!(e&&e.position&&e.position.start&&e.position.start.line&&e.position.start.column&&e.position.end&&e.position.end.line&&e.position.end.column)}const own$4={}.hasOwnProperty;function definitions(e){const n=Object.create(null);if(e&&e.type)return visit$1(e,"definition",e=>{var t=clean(e.identifier);t&&!own$4.call(n,t)&&(n[t]=e)}),function(e){e=clean(e);return e&&own$4.call(n,e)?n[e]:null};throw new Error("mdast-util-definitions expected node")}function clean(e){return String(e||"").toUpperCase()}function thematicBreak(e,t){return e(t,"hr")}function wrap(e,t){const n=[];let i=-1;for(t&&n.push(u("text","\n"));++i<e.length;)i&&n.push(u("text","\n")),n.push(e[i]);return t&&0<e.length&&n.push(u("text","\n")),n}function list(e,t){const n={};var i=t.ordered?"ol":"ul",r=all(e,t);let s=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++s<r.length;){const o=r[s];if("element"===o.type&&"li"===o.tagName&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}return e(t,i,n,wrap(r,!0))}function footer(e){var t=e.footnoteById;const n=e.footnoteOrder;let i=-1;const r=[];for(;++i<n.length;){var s=t[n[i].toUpperCase()];if(s){var o=String(i+1);const l=[...s.children];var a={type:"link",url:"#fnref"+o,data:{hProperties:{className:["footnote-back"],role:"doc-backlink"}},children:[{type:"text",value:"↩"}]};const c=l[l.length-1];(c&&"paragraph"===c.type?c.children:l).push(a),r.push({type:"listItem",data:{hProperties:{id:"fn"+o,role:"doc-endnote"}},children:l,position:s.position})}}return 0===r.length?null:e(null,"section",{className:["footnotes"],role:"doc-endnotes"},wrap([thematicBreak(e),list(e,{type:"list",ordered:!0,children:r})],!0))}function blockquote(e,t){return e(t,"blockquote",wrap(all(e,t),!0))}function hardBreak(e,t){return[e(t,"br"),u("text","\n")]}function code(e,t){var n=t.value?t.value+"\n":"",i=t.lang&&t.lang.match(/^[^ \t]+(?=[ \t]|$)/);const r={},s=(i&&(r.className=["language-"+i]),e(t,"code",r,[u("text",n)]));return t.meta&&(s.data={meta:t.meta}),e(t.position,"pre",[s])}function strikethrough(e,t){return e(t,"del",all(e,t))}function emphasis(e,t){return e(t,"em",all(e,t))}function footnoteReference(e,t){const n=e.footnoteOrder;var i=String(t.identifier),r=n.indexOf(i),i=String(-1===r?n.push(i):r+1);return e(t,"a",{href:"#fn"+i,className:["footnote-ref"],id:"fnref"+i,role:"doc-noteref"},[e(t.position,"sup",[u("text",i)])])}function footnote(e,t){const n=e.footnoteById,i=e.footnoteOrder;let r=1;for(;r in n;)r++;var s=String(r);return i.push(s),n[s]={type:"footnoteDefinition",identifier:s,children:[{type:"paragraph",children:t.children}],position:t.position},footnoteReference(e,{type:"footnoteReference",identifier:s,position:t.position})}function heading(e,t){return e(t,"h"+t.depth,all(e,t))}function html$2(e,t){return e.dangerous?e.augment(t,u("raw",t.value)):null}var encodeCache={};function getEncodeCache(e){var t,n,i=encodeCache[e];if(i)return i;for(i=encodeCache[e]=[],t=0;t<128;t++)n=String.fromCharCode(t),/^[0-9a-z]$/i.test(n)?i.push(n):i.push("%"+("0"+t.toString(16).toUpperCase()).slice(-2));for(t=0;t<e.length;t++)i[e.charCodeAt(t)]=e[t];return i}function encode(e,t,n){var i,r,s,o,a="";for("string"!=typeof t&&(n=t,t=encode.defaultChars),void 0===n&&(n=!0),o=getEncodeCache(t),i=0,r=e.length;i<r;i++)s=e.charCodeAt(i),n&&37===s&&i+2<r&&/^[0-9a-f]{2}$/i.test(e.slice(i+1,i+3))?(a+=e.slice(i,i+3),i+=2):s<128?a+=o[s]:55296<=s&&s<=57343?55296<=s&&s<=56319&&i+1<r&&56320<=(s=e.charCodeAt(i+1))&&s<=57343?(a+=encodeURIComponent(e[i]+e[i+1]),i++):a+="%EF%BF%BD":a+=encodeURIComponent(e[i]);return a}encode.defaultChars=";/?:@&=+$,-_.!~*'()#",encode.componentChars="-_.!~*'()";var encode_1=encode;function revert(e,t){var n=t.referenceType;let i="]";if("collapsed"===n?i+="[]":"full"===n&&(i+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return u("text","!["+t.alt+i);const r=all(e,t),s=r[0],o=(s&&"text"===s.type?s.value="["+s.value:r.unshift(u("text","[")),r[r.length-1]);return o&&"text"===o.type?o.value+=i:r.push(u("text",i)),r}function imageReference(e,t){var n=e.definition(t.identifier);if(!n)return revert(e,t);const i={src:encode_1(n.url||""),alt:t.alt};return null!==n.title&&void 0!==n.title&&(i.title=n.title),e(t,"img",i)}function image(e,t){const n={src:encode_1(t.url),alt:t.alt};return null!==t.title&&void 0!==t.title&&(n.title=t.title),e(t,"img",n)}function inlineCode(e,t){return e(t,"code",[u("text",t.value.replace(/\r?\n|\r/g," "))])}function linkReference(e,t){var n=e.definition(t.identifier);if(!n)return revert(e,t);const i={href:encode_1(n.url||"")};return null!==n.title&&void 0!==n.title&&(i.title=n.title),e(t,"a",i,all(e,t))}function link(e,t){const n={href:encode_1(t.url)};return null!==t.title&&void 0!==t.title&&(n.title=t.title),e(t,"a",n,all(e,t))}function listItem(t,n,e){const i=all(t,n);var r=e?listLoose(e):listItemLoose(n);const s={},o=[];if("boolean"==typeof n.checked){let e;i[0]&&"element"===i[0].type&&"p"===i[0].tagName?e=i[0]:(e=t(null,"p",[]),i.unshift(e)),0<e.children.length&&e.children.unshift(u("text"," ")),e.children.unshift(t(null,"input",{type:"checkbox",checked:n.checked,disabled:!0})),s.className=["task-list-item"]}let a=-1;for(;++a<i.length;){var l=i[a];!r&&0===a&&"element"===l.type&&"p"===l.tagName||o.push(u("text","\n")),"element"!==l.type||"p"!==l.tagName||r?o.push(l):o.push(...l.children)}e=i[i.length-1];return!e||!r&&"tagName"in e&&"p"===e.tagName||o.push(u("text","\n")),t(n,"li",s,o)}function listLoose(e){let t=e.spread;var n=e.children;let i=-1;for(;!t&&++i<n.length;)t=listItemLoose(n[i]);return Boolean(t)}function listItemLoose(e){var t=e.spread;return null==t?1<e.children.length:t}function paragraph(e,t){return e(t,"p",all(e,t))}function root$1(e,t){return e.augment(t,u("root",wrap(all(e,t))))}function strong(e,t){return e(t,"strong",all(e,t))}function table(t,n){var i=n.children;let r=-1;var s=n.align||[];const o=[];for(;++r<i.length;){var a=i[r].children,l=0===r?"th":"td";let e=(n.align?s:a).length;const u=[];for(;e--;){var c=a[e];u[e]=t(c,l,{align:s[e]},c?all(t,c):[])}o[r]=t(i[r],"tr",wrap(u,!0))}return t(n,"table",wrap([t(o[0].position,"thead",wrap([o[0]],!0))].concat(o[1]?t({start:pointStart(o[1]),end:pointEnd(o[o.length-1])},"tbody",wrap(o.slice(1),!0)):[]),!0))}function text(e,t){return e.augment(t,u("text",String(t.value).replace(/[ \t]*(\r?\n|\r)[ \t]*/g,"$1")))}const handlers={blockquote:blockquote,break:hardBreak,code:code,delete:strikethrough,emphasis:emphasis,footnoteReference:footnoteReference,footnote:footnote,heading:heading,html:html$2,imageReference:imageReference,image:image,inlineCode:inlineCode,linkReference:linkReference,link:link,listItem:listItem,list:list,paragraph:paragraph,root:root$1,strong:strong,table:table,text:text,thematicBreak:thematicBreak,toml:ignore,yaml:ignore,definition:ignore,footnoteDefinition:ignore};function ignore(){return null}const own$3={}.hasOwnProperty;function factory(e,t){var t=t||{},n=t.allowDangerousHtml||!1;const i={};return s.dangerous=n,s.definition=definitions(e),s.footnoteById=i,s.footnoteOrder=[],s.augment=r,s.handlers={...handlers,...t.handlers},s.unknownHandler=t.unknownHandler,s.passThrough=t.passThrough,visit$1(e,"footnoteDefinition",e=>{var t=String(e.identifier).toUpperCase();own$3.call(i,t)||(i[t]=e)}),s;function r(e,t){var n;return e&&"data"in e&&e.data&&((n=e.data).hName&&((t="element"!==t.type?{type:"element",tagName:"",properties:{},children:[]}:t).tagName=n.hName),"element"===t.type&&n.hProperties&&(t.properties={...t.properties,...n.hProperties}),"children"in t&&t.children&&n.hChildren&&(t.children=n.hChildren)),e&&!generated(n="type"in e?e:{position:e})&&(t.position={start:pointStart(n),end:pointEnd(n)}),t}function s(e,t,n,i){return Array.isArray(n)&&(i=n,n={}),r(e,{type:"element",tagName:t,properties:n||{},children:i||[]})}}function toHast(e,t){t=factory(e,t);const n=one(t,e,null);e=footer(t);return e&&n.children.push(u("text","\n"),e),Array.isArray(n)?{type:"root",children:n}:n}const remarkRehype=function(e,t){return e&&"run"in e?bridge(e,t):mutate(e)};var remarkRehype$1=remarkRehype;function bridge(i,r){return(e,t,n)=>{i.run(toHast(e,r),t,e=>{n(e)})}}function mutate(t){return e=>toHast(e,t)}class Schema{constructor(e,t,n){this.property=e,this.normal=t,n&&(this.space=n)}}function merge(e,t){var n={},i={};let r=-1;for(;++r<e.length;)Object.assign(n,e[r].property),Object.assign(i,e[r].normal);return new Schema(n,i,t)}function normalize(e){return e.toLowerCase()}Schema.prototype.property={},Schema.prototype.normal={},Schema.prototype.space=null;class Info{constructor(e,t){this.property=e,this.attribute=t}}Info.prototype.space=null,Info.prototype.boolean=!1,Info.prototype.booleanish=!1,Info.prototype.overloadedBoolean=!1,Info.prototype.number=!1,Info.prototype.commaSeparated=!1,Info.prototype.spaceSeparated=!1,Info.prototype.commaOrSpaceSeparated=!1,Info.prototype.mustUseProperty=!1,Info.prototype.defined=!1;let powers=0;const boolean=increment(),booleanish=increment(),overloadedBoolean=increment(),number=increment(),spaceSeparated=increment(),commaSeparated=increment(),commaOrSpaceSeparated=increment();function increment(){return 2**++powers}var types=Object.freeze({__proto__:null,boolean:boolean,booleanish:booleanish,overloadedBoolean:overloadedBoolean,number:number,spaceSeparated:spaceSeparated,commaSeparated:commaSeparated,commaOrSpaceSeparated:commaOrSpaceSeparated});const checks=Object.keys(types);class DefinedInfo extends Info{constructor(e,t,n,i){let r=-1;if(super(e,t),mark(this,"space",i),"number"==typeof n)for(;++r<checks.length;){var s=checks[r];mark(this,checks[r],(n&types[s])===types[s])}}}function mark(e,t,n){n&&(e[t]=n)}DefinedInfo.prototype.defined=!0;const own$2={}.hasOwnProperty;function create(e){const t={},n={};let i;for(i in e.properties)if(own$2.call(e.properties,i)){var r=e.properties[i];const s=new DefinedInfo(i,e.transform(e.attributes||{},i),r,e.space);e.mustUseProperty&&e.mustUseProperty.includes(i)&&(s.mustUseProperty=!0),t[i]=s,n[normalize(i)]=i,n[normalize(s.attribute)]=i}return new Schema(t,n,e.space)}const xlink=create({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),xml=create({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function caseSensitiveTransform(e,t){return t in e?e[t]:t}function caseInsensitiveTransform(e,t){return caseSensitiveTransform(e,t.toLowerCase())}const xmlns=create({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:caseInsensitiveTransform,properties:{xmlns:null,xmlnsXLink:null}}),aria=create({transform(e,t){return"role"===t?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:booleanish,ariaAutoComplete:null,ariaBusy:booleanish,ariaChecked:booleanish,ariaColCount:number,ariaColIndex:number,ariaColSpan:number,ariaControls:spaceSeparated,ariaCurrent:null,ariaDescribedBy:spaceSeparated,ariaDetails:null,ariaDisabled:booleanish,ariaDropEffect:spaceSeparated,ariaErrorMessage:null,ariaExpanded:booleanish,ariaFlowTo:spaceSeparated,ariaGrabbed:booleanish,ariaHasPopup:null,ariaHidden:booleanish,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:spaceSeparated,ariaLevel:number,ariaLive:null,ariaModal:booleanish,ariaMultiLine:booleanish,ariaMultiSelectable:booleanish,ariaOrientation:null,ariaOwns:spaceSeparated,ariaPlaceholder:null,ariaPosInSet:number,ariaPressed:booleanish,ariaReadOnly:booleanish,ariaRelevant:null,ariaRequired:booleanish,ariaRoleDescription:spaceSeparated,ariaRowCount:number,ariaRowIndex:number,ariaRowSpan:number,ariaSelected:booleanish,ariaSetSize:number,ariaSort:null,ariaValueMax:number,ariaValueMin:number,ariaValueNow:number,ariaValueText:null,role:null}}),html$1=create({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:caseInsensitiveTransform,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:commaSeparated,acceptCharset:spaceSeparated,accessKey:spaceSeparated,action:null,allow:null,allowFullScreen:boolean,allowPaymentRequest:boolean,allowUserMedia:boolean,alt:null,as:null,async:boolean,autoCapitalize:null,autoComplete:spaceSeparated,autoFocus:boolean,autoPlay:boolean,capture:boolean,charSet:null,checked:boolean,cite:null,className:spaceSeparated,cols:number,colSpan:null,content:null,contentEditable:booleanish,controls:boolean,controlsList:spaceSeparated,coords:number|commaSeparated,crossOrigin:null,data:null,dateTime:null,decoding:null,default:boolean,defer:boolean,dir:null,dirName:null,disabled:boolean,download:overloadedBoolean,draggable:booleanish,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:boolean,formTarget:null,headers:spaceSeparated,height:number,hidden:boolean,high:number,href:null,hrefLang:null,htmlFor:spaceSeparated,httpEquiv:spaceSeparated,id:null,imageSizes:null,imageSrcSet:null,inputMode:null,integrity:null,is:null,isMap:boolean,itemId:null,itemProp:spaceSeparated,itemRef:spaceSeparated,itemScope:boolean,itemType:spaceSeparated,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:boolean,low:number,manifest:null,max:null,maxLength:number,media:null,method:null,min:null,minLength:number,multiple:boolean,muted:boolean,name:null,nonce:null,noModule:boolean,noValidate:boolean,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforePrint:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:boolean,optimum:number,pattern:null,ping:spaceSeparated,placeholder:null,playsInline:boolean,poster:null,preload:null,readOnly:boolean,referrerPolicy:null,rel:spaceSeparated,required:boolean,reversed:boolean,rows:number,rowSpan:number,sandbox:spaceSeparated,scope:null,scoped:boolean,seamless:boolean,selected:boolean,shape:null,size:number,sizes:null,slot:null,span:number,spellCheck:booleanish,src:null,srcDoc:null,srcLang:null,srcSet:null,start:number,step:null,style:null,tabIndex:number,target:null,title:null,translate:null,type:null,typeMustMatch:boolean,useMap:null,value:booleanish,width:number,wrap:null,align:null,aLink:null,archive:spaceSeparated,axis:null,background:null,bgColor:null,border:number,borderColor:null,bottomMargin:number,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:boolean,declare:boolean,event:null,face:null,frame:null,frameBorder:null,hSpace:number,leftMargin:number,link:null,longDesc:null,lowSrc:null,marginHeight:number,marginWidth:number,noResize:boolean,noHref:boolean,noShade:boolean,noWrap:boolean,object:null,profile:null,prompt:null,rev:null,rightMargin:number,rules:null,scheme:null,scrolling:booleanish,standby:null,summary:null,text:null,topMargin:number,valueType:null,version:null,vAlign:null,vLink:null,vSpace:number,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:boolean,disableRemotePlayback:boolean,prefix:null,property:null,results:number,security:null,unselectable:null}}),svg$1=create({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:caseSensitiveTransform,properties:{about:commaOrSpaceSeparated,accentHeight:number,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:number,amplitude:number,arabicForm:null,ascent:number,attributeName:null,attributeType:null,azimuth:number,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:number,by:null,calcMode:null,capHeight:number,className:spaceSeparated,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:number,diffuseConstant:number,direction:null,display:null,dur:null,divisor:number,dominantBaseline:null,download:boolean,dx:null,dy:null,edgeMode:null,editable:null,elevation:number,enableBackground:null,end:null,event:null,exponent:number,externalResourcesRequired:null,fill:null,fillOpacity:number,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:commaSeparated,g2:commaSeparated,glyphName:commaSeparated,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:number,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:number,horizOriginX:number,horizOriginY:number,id:null,ideographic:number,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:number,k:number,k1:number,k2:number,k3:number,k4:number,kernelMatrix:commaOrSpaceSeparated,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:number,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:number,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:number,overlineThickness:number,paintOrder:null,panose1:null,path:null,pathLength:number,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:spaceSeparated,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:number,pointsAtY:number,pointsAtZ:number,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:commaOrSpaceSeparated,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:commaOrSpaceSeparated,rev:commaOrSpaceSeparated,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:commaOrSpaceSeparated,requiredFeatures:commaOrSpaceSeparated,requiredFonts:commaOrSpaceSeparated,requiredFormats:commaOrSpaceSeparated,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:number,specularExponent:number,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:number,strikethroughThickness:number,string:null,stroke:null,strokeDashArray:commaOrSpaceSeparated,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:number,strokeOpacity:number,strokeWidth:null,style:null,surfaceScale:number,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:commaOrSpaceSeparated,tabIndex:number,tableValues:null,target:null,targetX:number,targetY:number,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:commaOrSpaceSeparated,to:null,transform:null,u1:null,u2:null,underlinePosition:number,underlineThickness:number,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:number,values:null,vAlphabetic:number,vMathematical:number,vectorEffect:null,vHanging:number,vIdeographic:number,version:null,vertAdvY:number,vertOriginX:number,vertOriginY:number,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:number,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),valid=/^data[-\w.:]+$/i,dash=/-[a-z]/g,cap=/[A-Z]/g;function find(e,t){const n=normalize(t);let i=t,r=Info;if(n in e.normal)return e.property[e.normal[n]];if(4<n.length&&"data"===n.slice(0,4)&&valid.test(t)){if("-"===t.charAt(4)){const s=t.slice(5).replace(dash,camelcase);i="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const o=t.slice(4);if(!dash.test(o)){let e=o.replace(cap,kebab);t="data"+(e="-"!==e.charAt(0)?"-"+e:e)}}r=DefinedInfo}return new r(i,t)}function kebab(e){return"-"+e.toLowerCase()}function camelcase(e){return e.charAt(1).toUpperCase()}const hastToReact={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},html=merge([xml,xlink,xmlns,aria,html$1],"html"),svg=merge([xml,xlink,xmlns,aria,svg$1],"svg"),convert=function(e){if(null==e)return ok;if("string"==typeof e)return typeFactory(e);if("object"==typeof e)return(Array.isArray(e)?anyFactory:propsFactory)(e);if("function"==typeof e)return castFactory(e);throw new Error("Expected function, string, or object as test")};function anyFactory(e){const n=[];let t=-1;for(;++t<e.length;)n[t]=convert(e[t]);return castFactory(function(...e){let t=-1;for(;++t<n.length;)if(n[t].call(this,...e))return!0;return!1})}function propsFactory(n){return castFactory(function(e){let t;for(t in n)if(e[t]!==n[t])return!1;return!0})}function typeFactory(t){return castFactory(function(e){return e&&e.type===t})}function castFactory(t){return function(...e){return Boolean(t.call(this,...e))}}function ok(){return!0}function color(e){return e}const CONTINUE=!0,SKIP="skip",EXIT=!1,visitParents=function(e,l,c,u){"function"==typeof l&&"function"!=typeof c&&(u=c,c=l,l=null);const p=convert(l),d=u?-1:1;!function r(s,o,a){const e="object"==typeof s&&null!==s?s:{};let t;"string"==typeof e.type&&(t="string"==typeof e.tagName?e.tagName:"string"==typeof e.name?e.name:void 0,Object.defineProperty(n,"name",{value:"node ("+color(e.type+(t?"<"+t+">":""))+")"}));return n;function n(){let e=[],t,n,i;if((!l||p(s,o,a[a.length-1]||null))&&(e=toResult(c(s,a)))[0]===EXIT)return e;if(s.children&&e[0]!==SKIP)for(n=(u?s.children.length:-1)+d,i=a.concat(s);-1<n&&n<s.children.length;){if((t=r(s.children[n],n,i)())[0]===EXIT)return t;n="number"==typeof t[1]?t[1]:n+d}return e}}(e,null,[])()};function toResult(e){return Array.isArray(e)?e:"number"==typeof e?[CONTINUE,e]:[e]}const visit=function(e,t,i,n){"function"==typeof t&&"function"!=typeof i&&(n=i,i=t,t=null),visitParents(e,t,function(e,t){const n=t[t.length-1];return i(e,n?n.children.indexOf(e):null,n)},n)};function rehypeFilter(s){if(s.allowedElements&&s.disallowedElements)throw new TypeError("Only one of `allowedElements` and `disallowedElements` should be defined");if(s.allowedElements||s.disallowedElements||s.allowElement)return e=>{visit(e,"element",(e,t,n)=>{const i=n;let r;if(s.allowedElements?r=!s.allowedElements.includes(e.tagName):s.disallowedElements&&(r=s.disallowedElements.includes(e.tagName)),(r=!r&&s.allowElement&&"number"==typeof t?!s.allowElement(e,t,i):r)&&"number"==typeof t)return s.unwrapDisallowed&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t})}}function whitespace(e){e=e&&"object"==typeof e&&"text"===e.type?e.value||"":e;return"string"==typeof e&&""===e.replace(/[ \t\n\f\r]/g,"")}function stringify$1(e){return e.join(" ").trim()}function stringify(e,t){t=t||{};return(e=""===e[e.length-1]?e.concat(""):e).join((t.padRight?" ":"")+","+(!1===t.padLeft?"":" ")).trim()}var COMMENT_REGEX=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,NEWLINE_REGEX=/\n/g,WHITESPACE_REGEX=/^\s*/,PROPERTY_REGEX=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,COLON_REGEX=/^:\s*/,VALUE_REGEX=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,SEMICOLON_REGEX=/^[;\s]*/,TRIM_REGEX=/^\s+|\s+$/g,NEWLINE="\n",FORWARD_SLASH="/",ASTERISK="*",EMPTY_STRING="",TYPE_COMMENT="comment",TYPE_DECLARATION="declaration",inlineStyleParser=function(i,n){if("string"!=typeof i)throw new TypeError("First argument must be a string");if(!i)return[];n=n||{};var r=1,s=1;function o(e){var t=e.match(NEWLINE_REGEX),t=(t&&(r+=t.length),e.lastIndexOf(NEWLINE));s=~t?e.length-t:s+e.length}function a(){var t={line:r,column:s};return function(e){return e.position=new l(t),p(),e}}function l(e){this.start=e,this.end={line:r,column:s},this.source=n.source}function c(e){var t=new Error(n.source+":"+r+":"+s+": "+e);if(t.reason=e,t.filename=n.source,t.line=r,t.column=s,t.source=i,!n.silent)throw t}function u(e){var t,e=e.exec(i);if(e)return t=e[0],o(t),i=i.slice(t.length),e}function p(){u(WHITESPACE_REGEX)}function e(e){var t;for(e=e||[];t=d();)!1!==t&&e.push(t)}function d(){var e=a();if(FORWARD_SLASH==i.charAt(0)&&ASTERISK==i.charAt(1)){for(var t=2;EMPTY_STRING!=i.charAt(t)&&(ASTERISK!=i.charAt(t)||FORWARD_SLASH!=i.charAt(t+1));)++t;if(EMPTY_STRING===i.charAt((t+=2)-1))return c("End of comment missing");var n=i.slice(2,t-2);return s+=2,o(n),i=i.slice(t),s+=2,e({type:TYPE_COMMENT,comment:n})}}l.prototype.content=i,p();var t,m=[];for(e(m);t=function(){var e=a(),t=u(PROPERTY_REGEX);if(t){if(d(),!u(COLON_REGEX))return c("property missing ':'");var n=u(VALUE_REGEX),e=e({type:TYPE_DECLARATION,property:trim(t[0].replace(COMMENT_REGEX,EMPTY_STRING)),value:n?trim(n[0].replace(COMMENT_REGEX,EMPTY_STRING)):EMPTY_STRING});return u(SEMICOLON_REGEX),e}}();)!1!==t&&(m.push(t),e(m));return m};function trim(e){return e?e.replace(TRIM_REGEX,EMPTY_STRING):EMPTY_STRING}var parse=inlineStyleParser;function StyleToObject(e,t){var n,i=null;if(!e||"string"!=typeof e)return i;for(var r,s,o=parse(e),a="function"==typeof t,l=0,c=o.length;l<c;l++)r=(n=o[l]).property,s=n.value,a?t(r,s,n):s&&((i=i||{})[r]=s);return i}var styleToObject=StyleToObject;const own$1={}.hasOwnProperty,tableElements=new Set(["table","thead","tbody","tfoot","tr"]);function childrenToReact(e,t){const n=[];let i=-1;for(var r;++i<t.children.length;)"element"===(r=t.children[i]).type?n.push(toReact(e,r,i,t)):"text"===r.type?"element"===t.type&&tableElements.has(t.tagName)&&whitespace(r)||n.push(r.value):"raw"!==r.type||e.options.skipHtml||n.push(r.value);return n}function toReact(e,t,n,i){const r=e.options;var s=e.schema;const o=t.tagName,a={};let l;if("html"===s.space&&"svg"===o&&(c=svg,e.schema=c),t.properties)for(l in t.properties)own$1.call(t.properties,l)&&addProperty(a,l,t.properties[l],e);"ol"!==o&&"ul"!==o||e.listDepth++;var c=childrenToReact(e,t);"ol"!==o&&"ul"!==o||e.listDepth--,e.schema=s;const u=t.position||{start:{line:null,column:null,offset:null},end:{line:null,column:null,offset:null}};var s=r.components&&own$1.call(r.components,o)?r.components[o]:o,p="string"==typeof s||s===React$1.Fragment;if(ReactIs.isValidElementType(s))return a.key=[o,u.start.line,u.start.column,n].join("-"),"a"===o&&r.linkTarget&&(a.target="function"==typeof r.linkTarget?r.linkTarget(String(a.href||""),t.children,"string"==typeof a.title?a.title:null):r.linkTarget),"a"===o&&r.transformLinkUri&&(a.href=r.transformLinkUri(String(a.href||""),t.children,"string"==typeof a.title?a.title:null)),p||"code"!==o||"element"!==i.type||"pre"===i.tagName||(a.inline=!0),p||"h1"!==o&&"h2"!==o&&"h3"!==o&&"h4"!==o&&"h5"!==o&&"h6"!==o||(a.level=Number.parseInt(o.charAt(1),10)),"img"===o&&r.transformImageUri&&(a.src=r.transformImageUri(String(a.src||""),String(a.alt||""),"string"==typeof a.title?a.title:null)),p||"li"!==o||"element"!==i.type||(n=getInputElement(t),a.checked=n&&n.properties?Boolean(n.properties.checked):null,a.index=getElementsBeforeCount(i,t),a.ordered="ol"===i.tagName),p||"ol"!==o&&"ul"!==o||(a.ordered="ol"===o,a.depth=e.listDepth),"td"!==o&&"th"!==o||(a.align&&(a.style||(a.style={}),a.style.textAlign=a.align,delete a.align),p||(a.isHeader="th"===o)),p||"tr"!==o||"element"!==i.type||(a.isHeader=Boolean("thead"===i.tagName)),r.sourcePos&&(a["data-sourcepos"]=flattenPosition(u)),!p&&r.rawSourcePos&&(a.sourcePosition=t.position),!p&&r.includeElementIndex&&(a.index=getElementsBeforeCount(i,t),a.siblingCount=getElementsBeforeCount(i)),p||(a.node=t),0<c.length?React$1.createElement(s,a,c):React$1.createElement(s,a);throw new TypeError(`Component for name \`${o}\` not defined or is not renderable`)}function getInputElement(e){let t=-1;for(;++t<e.children.length;){var n=e.children[t];if("element"===n.type&&"input"===n.tagName)return n}return null}function getElementsBeforeCount(e,t){let n=-1,i=0;for(;++n<e.children.length&&e.children[n]!==t;)"element"===e.children[n].type&&i++;return i}function addProperty(e,t,n,i){i=find(i.schema,t);let r=n;null!==r&&void 0!==r&&r==r&&(Array.isArray(r)&&(r=(i.commaSeparated?stringify:stringify$1)(r)),"style"===i.property&&"string"==typeof r&&(r=parseStyle(r)),i.space&&i.property?e[own$1.call(hastToReact,i.property)?hastToReact[i.property]:i.property]=r:i.attribute&&(e[i.attribute]=r))}function parseStyle(e){const i={};try{styleToObject(e,function(e,t){const n="-ms-"===e.slice(0,4)?"ms-"+e.slice(4):e;i[n.replace(/-([a-z])/g,styleReplacer)]=t})}catch{}return i}function styleReplacer(e,t){return t.toUpperCase()}function flattenPosition(e){return[e.start.line,":",e.start.column,"-",e.end.line,":",e.end.column].map(e=>String(e)).join("")}const own={}.hasOwnProperty,changelog="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",deprecated={renderers:{to:"components",id:"change-renderers-to-components"},astPlugins:{id:"remove-buggy-html-in-markdown-parser"},allowDangerousHtml:{id:"remove-buggy-html-in-markdown-parser"},escapeHtml:{id:"remove-buggy-html-in-markdown-parser"},source:{to:"children",id:"change-source-to-children"},allowNode:{to:"allowElement",id:"replace-allownode-allowedtypes-and-disallowedtypes"},allowedTypes:{to:"allowedElements",id:"replace-allownode-allowedtypes-and-disallowedtypes"},disallowedTypes:{to:"disallowedElements",id:"replace-allownode-allowedtypes-and-disallowedtypes"},includeNodeIndex:{to:"includeElementIndex",id:"change-includenodeindex-to-includeelementindex"}};function ReactMarkdown(e){for(const o in deprecated){var t;own.call(deprecated,o)&&own.call(e,o)&&(t=deprecated[o],console.warn(`[react-markdown] Warning: please ${t.to?`use \`${t.to}\` instead of`:"remove"} \`${o}\` (see <${changelog}#${t.id}> for more info)`),delete deprecated[o])}const n=unified().use(remarkParse).use(e.remarkPlugins||e.plugins||[]).use(remarkRehype$1,{allowDangerousHtml:!0}).use(e.rehypePlugins||[]).use(rehypeFilter,e),i=new VFile$1;"string"==typeof e.children?i.value=e.children:void 0!==e.children&&null!==e.children&&console.warn(`[react-markdown] Warning: please pass a string as \`children\` (not: \`${e.children}\`)`);var r=n.runSync(n.parse(i),i);if("root"!==r.type)throw new TypeError("Expected a `root` node");let s=React$1.createElement(React$1.Fragment,{},childrenToReact({options:e,schema:html,listDepth:0},r));return s=e.className?React$1.createElement("div",{className:e.className},s):s}ReactMarkdown.defaultProps={transformLinkUri:uriTransformer},ReactMarkdown.propTypes={children:PropTypes.string,className:PropTypes.string,allowElement:PropTypes.func,allowedElements:PropTypes.arrayOf(PropTypes.string),disallowedElements:PropTypes.arrayOf(PropTypes.string),unwrapDisallowed:PropTypes.bool,remarkPlugins:PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.object,PropTypes.func,PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.object,PropTypes.func]))])),rehypePlugins:PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.object,PropTypes.func,PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.object,PropTypes.func]))])),sourcePos:PropTypes.bool,rawSourcePos:PropTypes.bool,skipHtml:PropTypes.bool,includeElementIndex:PropTypes.bool,transformLinkUri:PropTypes.oneOfType([PropTypes.func,PropTypes.bool]),linkTarget:PropTypes.oneOfType([PropTypes.func,PropTypes.string]),transformImageUri:PropTypes.func,components:PropTypes.object};var toString$1=toString_1,upperFirst=upperFirst_1;function capitalize$1(e){return upperFirst(toString$1(e).toLowerCase())}var capitalize_1=capitalize$1,capitalize=capitalize_1,createCompounder=_createCompounder,camelCase=_createCompounder(function(e,t,n){return t=t.toLowerCase(),e+(n?capitalize(t):t)}),camelCase_1=camelCase,baseIndexOf=_baseIndexOf,isArrayLike=isArrayLike_1,isString=isString_1,toInteger=toInteger_1,values=values_1,nativeMax=Math.max;function includes(e,t,n,i){e=isArrayLike(e)?e:values(e),n=n&&!i?toInteger(n):0;i=e.length;return n<0&&(n=nativeMax(i+n,0)),isString(e)?n<=i&&-1<e.indexOf(t,n):!!i&&-1<baseIndexOf(e,t,n)}var includes_1=includes,toString=toString_1;function toUpper(e){return toString(e).toUpperCase()}var toUpper_1=toUpper,LibraryAddCheck={},_interopRequireDefault=interopRequireDefault.exports,default_1=(Object.defineProperty(LibraryAddCheck,"__esModule",{value:!0}),LibraryAddCheck.default=void 0),_createSvgIcon=_interopRequireDefault(createSvgIcon),_jsxRuntime=jsxRuntime.exports,_default=(0,_createSvgIcon.default)((0,_jsxRuntime.jsx)("path",{d:"M20 2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7.53 12L9 10.5l1.4-1.41 2.07 2.08L17.6 6 19 7.41 12.47 14zM4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6z"}),"LibraryAddCheck"),default_1=LibraryAddCheck.default=_default,baseFlatten=_baseFlatten,map=map_1;function flatMap(e,t){return baseFlatten(map(e,t),1)}var flatMap_1=flatMap,baseGet=_baseGet,baseSlice=_baseSlice;function parent$1(e,t){return t.length<2?e:baseGet(e,baseSlice(t,0,-1))}var _parent=parent$1,castPath=_castPath,last=last_1,parent=parent$1,toKey=_toKey;function baseUnset$1(e,t){return t=castPath(t,e),null==(e=parent(e,t))||delete e[toKey(last(t))]}var _baseUnset=baseUnset$1,baseUnset=baseUnset$1,isIndex=_isIndex,arrayProto=Array.prototype,splice=arrayProto.splice;function basePullAt$1(e,t){for(var n=e?t.length:0,i=n-1;n--;){var r,s=t[n];n!=i&&s===r||(isIndex(r=s)?splice.call(e,s,1):baseUnset(e,s))}return e}var _basePullAt=basePullAt$1,baseIteratee=_baseIteratee,basePullAt=basePullAt$1;function remove(e,t){var n=[];if(!e||!e.length)return n;var i=-1,r=[],s=e.length;for(t=baseIteratee(t);++i<s;){var o=e[i];t(o,i,e)&&(n.push(o),r.push(i))}return basePullAt(e,r),n}var SchemaIO,LoadingStatus,FormStatus,FormValidations,UiInfo,IconImportStatus,DistributionType,MimeType,FileItemTypeNames,EngineDeploymentModel,EngineFieldType,GPUSupported,remove_1=remove;const SLICE_NAME="engineCenterNew",DEFAULT_ACCEPTABLE_FILE_TYPES=(!function(e){e.Input="input",e.Output="output",e.Both="both"}(SchemaIO=SchemaIO||{}),!function(e){e.Failed="failed",e.Idle="idle",e.Pending="pending"}(LoadingStatus=LoadingStatus||{}),!function(e){e.Pending="pending",e.Loading="loading",e.Submitting="submitting",e.Success="success",e.Error="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.PanelClosed="closed",e.PanelOpen="open"}(UiInfo=UiInfo||{}),!function(e){e.Idle="idle",e.Uploading="uploading",e.Uploaded="uploaded",e.Failed="failed",e.Aborted="aborted"}(IconImportStatus=IconImportStatus||{}),!function(e){e.Private="private",e.OrgLocked="org_locked",e.Sharable="sharable",e.Public="public",e.Marketplace="marketplace",e.InstanceLocked="instance_locked"}(DistributionType=DistributionType||{}),!function(e){e.ApplicationJson="application/json",e.ApplicationMsWord="application/msword",e.ApplicationPdf="application/pdf",e.ApplicationRtf="application/rtf",e.ApplicationSmil="application/smil+xml",e.ApplicationTtml="application/ttml+xml",e.ApplicationVeritoneAion="application/vnd.veritone.aion+json",e.ApplicationMsOutlook="application/vnd.ms-outlook",e.ApplicationMsPowerpoint="application/vnd.ms-powerpoint",e.ApplicationDocument="application/vnd.openxmlformats-officedocument.wordprocessingml.document",e.ApplicationSpreadsheet="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",e.ApplicationPresentation="application/vnd.openxmlformats-officedocument.presentationml.presentation",e.ApplicationOasisDoc="application/vnd.oasis.opendocument.text",e.ApplicationOasisSpreadsheet="application/vnd.oasis.opendocument.spreadsheet",e.ApplicationXFlv="application/x-flv",e.ApplicationXml="application/xml",e.ApplicationFormUrlEncoded="application/x-www-form-urlencoded",e.ImageJpeg="image/jpeg",e.ImagePng="image/png",e.ImageTiff="image/tiff",e.ImageGig="image/gif",e.TextPlain="text/plain",e.TextHtml="text/html",e.TextCsv="text/csv",e.TextPlainCharset="text/plain; charset=utf-8",e.AudioAac="audio/aac",e.AudioFlac="audio/flac",e.AudioMidi="audio/midi",e.AudioMp4="audio/mp4",e.AudioMpeg="audio/mpeg",e.AudioWav="audio/wav",e.AudioXWav="audio/x-wav",e.AudioWebm="audio/webm",e.VideoMp4="video/mp4",e.VideoMpeg="video/mpeg",e.VideoOgg="video/ogg",e.VideoQuicktime="video/quicktime",e.VideoWebm="video/webm",e.VideoM4v="video/x-m4v",e.VideoMsWmv="video/x-ms-wmv",e.VideoMsvideo="video/x-msvideo",e.Message="message/rfc822"}(MimeType=MimeType||{}),!function(e){e.Image="image",e.Video="video",e.Audio="audio",e.Text="text"}(FileItemTypeNames=FileItemTypeNames||{}),[{name:"Image",type:FileItemTypeNames.Image,extensions:[MimeType.ImageJpeg,MimeType.ImagePng,MimeType.ImageTiff,MimeType.ImageGig]},{name:"Video",type:FileItemTypeNames.Video,extensions:[MimeType.VideoMp4,MimeType.VideoMpeg,MimeType.VideoOgg,MimeType.VideoQuicktime,MimeType.VideoWebm,MimeType.VideoM4v,MimeType.VideoMsWmv,MimeType.VideoMsvideo]},{name:"Audio",type:FileItemTypeNames.Audio,extensions:[MimeType.AudioAac,MimeType.AudioFlac,MimeType.AudioMidi,MimeType.AudioMp4,MimeType.AudioMpeg,MimeType.AudioWav,MimeType.AudioXWav,MimeType.AudioWebm]},{name:"Documents",type:FileItemTypeNames.Text,extensions:[MimeType.TextPlain,MimeType.TextHtml,MimeType.TextCsv,MimeType.TextPlainCharset,MimeType.ApplicationJson,MimeType.ApplicationMsWord,MimeType.ApplicationPdf,MimeType.ApplicationRtf,MimeType.ApplicationSmil,MimeType.ApplicationTtml,MimeType.ApplicationVeritoneAion,MimeType.ApplicationMsOutlook,MimeType.ApplicationMsPowerpoint,MimeType.ApplicationDocument,MimeType.ApplicationSpreadsheet,MimeType.ApplicationPresentation,MimeType.ApplicationOasisDoc,MimeType.ApplicationOasisSpreadsheet,MimeType.ApplicationXFlv,MimeType.ApplicationXml,MimeType.ApplicationFormUrlEncoded,MimeType.Message]}]);function isEngineDeploymentModel(e){return lodash.exports.includes(EngineDeploymentModel,e)}!function(e){e.FullyNetworkIsolated="FullyNetworkIsolated",e.MostlyNetworkIsolated="MostlyNetworkIsolated",e.NonNetworkIsolated="NonNetworkIsolated",e.HumanReview="HumanReview"}(EngineDeploymentModel=EngineDeploymentModel||{}),function(e){e.Number="Number",e.Picklist="Picklist",e.MultiPicklist="MultiPicklist",e.Text="Text",e.SchemaSelection="SchemaSelection"}(EngineFieldType=EngineFieldType||{}),function(e){e.NONE="none",e.AWS_P2="aws_p2",e.AWS_P3="aws_p3"}(GPUSupported=GPUSupported||{});var index=Object.freeze({__proto__:null,SLICE_NAME:SLICE_NAME,get SchemaIO(){return SchemaIO},get LoadingStatus(){return LoadingStatus},get FormStatus(){return FormStatus},get FormValidations(){return FormValidations},get UiInfo(){return UiInfo},get IconImportStatus(){return IconImportStatus},get DistributionType(){return DistributionType},get MimeType(){return MimeType},get FileItemTypeNames(){return FileItemTypeNames},DEFAULT_ACCEPTABLE_FILE_TYPES:DEFAULT_ACCEPTABLE_FILE_TYPES,isEngineDeploymentModel:isEngineDeploymentModel,get EngineDeploymentModel(){return EngineDeploymentModel},get EngineFieldType(){return EngineFieldType},get GPUSupported(){return GPUSupported}});const namespace$4="uiState",initialState$3={status:LoadingStatus.Idle},slice$3=createSlice({name:SLICE_NAME+"/"+namespace$4,initialState:initialState$3,reducers:{}}),actions$4=slice$3.actions;var uiState$1=slice$3.reducer;const namespace$3="engineFormState",initialState$2={engine:{id:"",name:"",description:"",website:"",iconPath:"",gpuSupported:GPUSupported.NONE,cpuResourceMcpu:1024,isPublic:!1,distributionType:DistributionType.Private,class:"",capability:{id:"",name:""},mode:"",deploymentModel:"",inputTypes:[],customFields:[],inputSchemas:[],outputSchemas:[],isTrainable:!1,supportedInputTypes:[],supportedLibraryTypes:[],includedLibraries:[],models:[],markdown:"",standaloneJobTemplates:{upload:"",reprocess:""},entityTags:[]},step:[],isLoadingExistingEngineData:!1,isFetchingDataRegistries:!1,isEditForm:!1,isResumeSession:!1,formValidations:FormValidations.Pending,formStatus:FormStatus.Pending,uiInfo:UiInfo.PanelClosed,iconImportStatus:IconImportStatus.Idle,dataRegistries:[]},slice$2=createSlice({name:SLICE_NAME+"/"+namespace$3,initialState:initialState$2,reducers:{createEngineStart(e,t){e.formStatus=FormStatus.Submitting},updateEngineStart(e,t){e.formStatus=FormStatus.Submitting},createEngineSuccess(e,{payload:t}){e.formStatus=FormStatus.Success,set_1(e.engine,"id",t)},createEngineFailed(e,t){e.formStatus=FormStatus.Error},stepper(e,t){e.step=t.payload},updateEngineFormField(e,t){var{field:t,value:n}=t.payload;set_1(e.engine,t,n)},updateCapability(e,t){const n=t.payload["payload"];e.engine.capability.id=n.split(",")[0],e.engine.capability.name=n.split(",")[1]},addCustomField(e,t){e.engine.customFields=concat_1(e.engine.customFields,t.payload)},updateCustomField(e,t){var{customField:t,index:n}=t.payload;set_1(e,`engine.customFields[${n}]`,t)},removeCustomField(e,t){e.engine.customFields.splice(t.payload,1)},clearCustomFields(e){e.engine.customFields=[]},createNewEngine(e){e.isLoadingExistingEngineData=!1,e.isEditForm=!1},editEngine(e,t){e.isLoadingExistingEngineData=!0,e.isEditForm=!0},setEditEngineExistingData(e,t){e.isLoadingExistingEngineData=!1,merge_1(e.engine,t.payload)},fetchDataRegistries(e){e.isFetchingDataRegistries=!0},fetchDataRegistriesSucceeded(e,t){e.isFetchingDataRegistries=!1;t=t.payload.dataRegistries;set_1(e,"dataRegistries",t)},fetchDataRegistriesFailed(e){e.isFetchingDataRegistries=!1},addSchemas(e,t){var{schemas:t,schemaType:n}=t.payload;e.engine[n+"Schemas"]=unionBy_1(e.engine[n+"Schemas"],t,"id")},updateSchemas(e,t){const{updatedSchemas:n,schemaType:i,dataRegistryId:r}=t.payload;t=get_1(e,`engine.${i}Schemas`),t=filter_1(t,e=>e.dataRegistryId!==r);set_1(e,`engine.${i}Schemas`,[...t,...n])},removeSchema(e,t){var{schemaType:t,index:n}=t.payload;e.engine[t+"Schemas"].splice(n,1)},clearSchemas(e,t){t=t.payload.schemaType;e.engine[t+"Schemas"]=[]},resumeSession(e,{payload:t}){set_1(e,"engine",t),set_1(e,"isResumeSession",!0)},clearSession(e){localStorage.removeItem("engineOnboardingSession"),set_1(e,"engine",initialState$2.engine)}}}),actions$3=slice$2.actions;var engineFormState$1=slice$2.reducer;const namespace$2="iconUploadState",initialState$1={file:null,status:IconImportStatus.Idle},slice$1=createSlice({name:SLICE_NAME+"/"+namespace$2,initialState:initialState$1,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$2=slice$1.actions;var iconUploadState=slice$1.reducer;const namespace$1="engineClassesState",initialState={status:FormStatus.Pending,engineClasses:{}},slice=createSlice({name:SLICE_NAME+"/"+namespace$1,initialState:initialState,reducers:{getEngineClassesStart(e,t){e.status=FormStatus.Loading},getEngineClassesSuccess(e,{payload:t}){e.engineClasses=t,e.status=FormStatus.Success},getEngineClassesFailed(e,{payload:t}){e.error=t,e.status=FormStatus.Error}}}),actions$1=slice.actions;var engineClassesState=slice.reducer;const namespace=SLICE_NAME,actions={[namespace$4]:actions$4,[namespace$3]:actions$3,[namespace$2]:actions$2,[namespace$1]:actions$1},rootReducer=combineReducers({[namespace$4]:uiState$1,[namespace$3]:engineFormState$1,[namespace$2]:iconUploadState,[namespace$1]:engineClassesState});function __rest(e,t){var n={};for(r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function __awaiter(e,o,a,l){return new(a=a||Promise)(function(n,t){function i(e){try{s(l.next(e))}catch(e){t(e)}}function r(e){try{s(l.throw(e))}catch(e){t(e)}}function s(e){var t;e.done?n(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(i,r)}s((l=l.apply(e,o||[])).next())})}const getClasses=(e,t)=>__awaiter(void 0,void 0,void 0,function*(){return yield baseGraphQLApiWithError(Object.assign({query:`query($type: String) {
|
|
2
|
+
engineCategories(type: $type, limit: 999) {
|
|
3
|
+
records {
|
|
4
|
+
id
|
|
5
|
+
name
|
|
6
|
+
type {
|
|
7
|
+
name
|
|
8
|
+
description
|
|
9
|
+
}
|
|
10
|
+
iconClass
|
|
11
|
+
libraryEntityIdentifierTypeIds
|
|
12
|
+
description
|
|
13
|
+
class {
|
|
14
|
+
name
|
|
15
|
+
description
|
|
16
|
+
iconClass
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}`,variables:{type:t}},e))}),createEngine=(t,n)=>__awaiter(void 0,void 0,void 0,function*(){var e="createEngine";return(yield baseGraphQLApiWithError(Object.assign({query:"\n mutation createEngine ($input: CreateEngine!) {\n createEngine (input: $input) {\n id\n }\n }\n ",variables:{input:n},operationName:e},t)))[e]}),updateEngine$1=(t,n)=>__awaiter(void 0,void 0,void 0,function*(){var e="updateEngine";return(yield baseGraphQLApiWithError(Object.assign({query:"\n mutation updateEngine ($input: UpdateEngine!) {\n updateEngine (input: $input) {\n id\n }\n }\n ",variables:{input:n},operationName:e},t)))[e]}),getEngineDetails=(t,n)=>__awaiter(void 0,void 0,void 0,function*(){var e="getEngineDetails";return(yield baseGraphQLApiWithError(Object.assign({query:"\n query getEngineDetails ($id: ID!) {\n engine (id: $id){\n id,\n name,\n category {\n id,\n name,\n class {\n id,\n name\n }\n },\n deploymentModel,\n isPublic,\n description,\n price,\n edgeVersion,\n fields {\n max,\n min,\n step,\n type,\n info,\n name,\n label,\n options {\n key,\n value\n },\n defaultValue,\n defaultValues,\n required\n },\n inputSchemas {\n records {\n id\n dataRegistryId\n dataRegistry {\n name\n }\n majorVersion\n minorVersion\n }\n }\n outputSchemas {\n records {\n id\n dataRegistryId\n dataRegistry {\n name\n }\n majorVersion\n minorVersion\n }\n }\n iconPath,\n logoPath,\n libraryRequired,\n createsTDO,\n useCases,\n industries,\n manifest,\n testingDetails {\n email,\n mediaFileUri,\n customFields,\n isCertified,\n buildIdCertified,\n dataCertified\n },\n jwtRights,\n standaloneJobTemplates {\n type,\n template,\n }\n distributionType\n website\n gpuSupported\n cpuResourceMcpu\n entityTags {\n tagKey\n }\n }\n }\n ",variables:{id:n},operationName:e},t))).engine});function getSignedWritableUrl(t,n){return __awaiter(this,void 0,void 0,function*(){var e="getSignedWritableUrl";return(yield baseGraphQLApiWithError(Object.assign({query:"query getSignedWritableUrl($name: String!) {\n getSignedWritableUrl(key: $name) {\n bucket,\n expiresInSeconds,\n getUrl,\n key,\n unsignedUrl,\n url,\n }\n }",variables:{name:n},operationName:e},t)))[e]})}function uploadFileToS3(i,r,{onProgress:s,onError:o,onAbort:a,onUpload:l}){return __awaiter(this,void 0,void 0,function*(){const e=new XMLHttpRequest,t=(e.upload.onload=()=>{l&&l(`The upload is completed: ${e.status} `+e.response)},e.upload.onerror=()=>{o&&o("Upload failed.")},e.upload.onabort=()=>{a&&a("Upload cancelled.")},e.upload.onprogress=e=>{s&&s(e.loaded/e.total*100)},e.open("PUT",i.url,!0),e.setRequestHeader("Content-Type",r.type),yield fetch(r.previewUrl));var n=yield t.blob();return e.send(n),e})}const getDataRegistries=(t,n)=>__awaiter(void 0,void 0,void 0,function*(){var e="getDataRegistries";return yield baseGraphQLApiWithError(Object.assign({query:"query getDataRegistries ($name: String) {\n dataRegistries(name: $name, limit: 9999) {\n records {\n id\n name\n schemas {\n records {\n id\n dataRegistryId\n majorVersion\n minorVersion\n }\n }\n }\n }\n }",variables:{name:n},operationName:e},t))}),selectUIStateStatus=e=>e[namespace].uiState.status;var uiState=Object.freeze({__proto__:null,selectUIStateStatus:selectUIStateStatus});const selectEngine=e=>e[namespace].engineFormState.engine,selectCustomFields=e=>e[namespace].engineFormState.engine.customFields,selectStep=e=>e[namespace].engineFormState.step,selectFormValidations=e=>e[namespace].engineFormState.formValidations,selectFormStatus=e=>e[namespace].engineFormState.formStatus,selectEngineCapability=e=>e[namespace].engineFormState.engine.capability,selectEngineClass=e=>e[namespace].engineFormState.engine.class,selectEngineMode=e=>e[namespace].engineFormState.engine.mode,selectEngineFlag=e=>e[namespace].engineFormState.engine.distributionType,selectDeploymentModel=e=>e[namespace].engineFormState.engine.deploymentModel,selectEntityTags=e=>e[namespace].engineFormState.engine.entityTags,selectUiInfo=e=>e[namespace].engineFormState.uiInfo,selectStandaloneJobTemplates=e=>e[namespace].engineFormState.engine.standaloneJobTemplates,selectIsLoadingExistingEngineData=e=>lodash.exports.pick(e[namespace].engineFormState,"isLoadingExistingEngineData"),selectIsEditForm=e=>lodash.exports.pick(e[namespace].engineFormState,"isEditForm"),selectIsResumeSession=e=>lodash.exports.get(e[namespace].engineFormState,"isResumeSession"),selectInputSchemas=e=>e[namespace].engineFormState.engine.inputSchemas,selectOutputSchemas=e=>e[namespace].engineFormState.engine.outputSchemas,selectDataRegistries=e=>e[namespace].engineFormState.dataRegistries,selectIsFetchingDataRegistries=e=>e[namespace].engineFormState.isFetchingDataRegistries;var engineFormState=Object.freeze({__proto__:null,selectEngine:selectEngine,selectCustomFields:selectCustomFields,selectStep:selectStep,selectFormValidations:selectFormValidations,selectFormStatus:selectFormStatus,selectEngineCapability:selectEngineCapability,selectEngineClass:selectEngineClass,selectEngineMode:selectEngineMode,selectEngineFlag:selectEngineFlag,selectDeploymentModel:selectDeploymentModel,selectEntityTags:selectEntityTags,selectUiInfo:selectUiInfo,selectStandaloneJobTemplates:selectStandaloneJobTemplates,selectIsLoadingExistingEngineData:selectIsLoadingExistingEngineData,selectIsEditForm:selectIsEditForm,selectIsResumeSession:selectIsResumeSession,selectInputSchemas:selectInputSchemas,selectOutputSchemas:selectOutputSchemas,selectDataRegistries:selectDataRegistries,selectIsFetchingDataRegistries:selectIsFetchingDataRegistries});const selectIcon=e=>e[namespace].iconUploadState.file;var icon=Object.freeze({__proto__:null,selectIcon:selectIcon});const selectEngineClasses=e=>e[namespace].engineClassesState.engineClasses;var classes=Object.freeze({__proto__:null,selectEngineClasses:selectEngineClasses});const selectApiConfigs$1=createSelector([rootApiSelector,graphEndpointSelector,sessionTokenSelector],(e,t,n)=>({apiRoot:e,graphQLEndpoint:t,token:n}));var TAB_CAPTURE_MODE,selectors=Object.freeze({__proto__:null,selectApiConfigs:selectApiConfigs$1,uiState:uiState,engineFormState:engineFormState,iconUploadState:icon,engineClassesState:classes});const supportedEngineFields=["id","name","categoryId","deploymentModel","isPublic","description","distributionType","price","edgeVersion","fields","iconPath","logoPath","libraryRequired","createsTDO","useCases","industries","manifest","testingDetails","jwtRights","standaloneJobTemplates","cpuResourceMcpu","gpuSupported","website"],formatEngine=t=>{var e;if(!isEngineDeploymentModel(t.deploymentModel))throw new Error("Empty deployment model not allowed!");const n={name:t.name,isPublic:t.isPublic,libraryRequired:t.libraryRequired||!1,createsTDO:t.createsTDO||!1,industries:t.industries||[],categoryId:t.capability.id,deploymentModel:t.deploymentModel,distributionType:t.distributionType,edgeVersion:t.edgeVersion||3,standaloneJobTemplates:[],manifest:{engineMode:t.mode,supportedInputTypes:lodash.exports.map(t.supportedInputTypes,e=>e.mimeType)},fields:[],useCases:[t.markdown],schemas:[],entityTags:t.entityTags||[]};supportedEngineFields.forEach(e=>{"standaloneJobTemplates"===e||lodash.exports.isNil(t[e])||(n[e]=t[e])}),t.customFields&&(n.fields=t.customFields),null!=(e=t.capability)&&e.id&&(n.categoryId=t.capability.id),t.standaloneJobTemplates.upload&&n.standaloneJobTemplates.push({type:"Upload",template:t.standaloneJobTemplates.upload,templateLanguage:"Handlebars"}),t.standaloneJobTemplates.reprocess&&n.standaloneJobTemplates.push({type:"Reprocess",template:t.standaloneJobTemplates.reprocess,templateLanguage:"Handlebars"});let i=[],r=[...t.outputSchemas];return lodash.exports.isEmpty(t.inputSchemas)||(i=lodash.exports.map(t.inputSchemas,e=>{var t=lodash.exports.findIndex(r,{id:e.id});return 0<=t?(lodash.exports.pullAt(r,t),{schemaId:e.id,ioType:SchemaIO.Both}):{schemaId:e.id,ioType:SchemaIO.Input}})),lodash.exports.isEmpty(r)||(r=lodash.exports.map(r,e=>({schemaId:e.id,ioType:SchemaIO.Output})),i=lodash.exports.concat(i,r)),n.schemas=i,n};function*createNewEngine(e){var t=yield select(preferredLanguageSelector);const n=AIWareFormatMessage(t||"en");var{engine:t,openBuildPanel:e=!1}=e.payload,i=yield select(selectApiConfigs$1);try{var r=formatEngine(t),s=yield call$7(createEngine,i,r),o=(yield put(actions.engineFormState.createEngineSuccess(s.id)),localStorage.removeItem("engineOnboardingSession"),yield put(showMessage({content:n({id:"os-engine-center-new.snackbar.engineCreateSuccess",defaultMessage:[{type:0,value:"Engine successfully created"}]}),severity:MessageSeverity.Success})),e?"ENGINE_CENTER_NEW_BUILD":"ENGINE_CENTER_DETAILS"),a={name:o,config:{engineId:s.id}};yield put(mountPanel({panelId:o,microFrontend:a,panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:0,size:"xlarge"}})),yield put(unmountPanel("ENGINE_CENTER_NEW"))}catch(e){yield put(actions.engineFormState.createEngineFailed(e.message)),yield put(showMessage({content:n({id:"os-engine-center-new.snackbar.engineOnboardingFailed",defaultMessage:[{type:0,value:"Engine onboarding failed"}]}),severity:MessageSeverity.Error}))}}function*watchNewEngineCreateStart(){yield takeLatest$1(actions.engineFormState.createEngineStart.type,createNewEngine)}const newEngineSagas=[fork(watchNewEngineCreateStart)],root="undefined"!=typeof window?window:global,fileUploadChannel=(root.xhrInstances={},channel());function*uploadIcon(e){const t=e.payload.file;e=yield select(preferredLanguageSelector);const n=AIWareFormatMessage(e);try{var i=yield call$7(getUrlBucket,t.name);const s=Object.assign(Object.assign({},t),{status:IconImportStatus.Uploading,percentComplete:0,expiresInSeconds:i.expiresInSeconds,getUrl:i.getUrl,key:i.key,unsignedUrl:i.unsignedUrl,url:i.url}),o=(yield put(actions.iconUploadState.updateIcon(s)),e=>{fileUploadChannel.put(actions.iconUploadState.updateIcon(Object.assign({id:t.id},e)))});var r=yield uploadFileToS3(i,t,{onProgress:e=>{o({percentComplete:e}),sdkEventManager.dispatch(SdkEvents.fileUploadProgress,null,e)},onAbort:e=>{o({status:IconImportStatus.Aborted}),sdkEventManager.dispatch(SdkEvents.fileUpload,new SdkError(e,"abort"),s)},onError:e=>{o({status:IconImportStatus.Failed}),sdkEventManager.dispatch(SdkEvents.fileUpload,new SdkError(e),s)},onUpload:e=>{o({status:IconImportStatus.Uploaded}),sdkEventManager.dispatch(SdkEvents.fileUpload,null,s)}});root.xhrInstances[t.id]=r,yield put(actions.iconUploadState.uploadIconSuccess()),yield put(actions.engineFormState.updateEngineFormField({field:"iconPath",value:s.getUrl}))}catch(e){yield put(actions.iconUploadState.uploadIconFailed(e.message)),yield put(showMessage({content:n({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$1);return yield call$7(getSignedWritableUrl,t,e)}function*watchUploadIconStart(){yield takeLatest$1(actions.iconUploadState.uploadIconStart.type,uploadIcon)}function*watchProgressChannel(){var e=yield take(fileUploadChannel);yield put(e)}const selectApiConfigs=selectors["selectApiConfigs"];function sortEngineClasses(e){const t=lodash.exports.get(e,"engineCategories.records"),n=t.reduce((e,t)=>(t.class&&(e[t.class.name]?e[t.class.name].capabilities.push(t):e[t.class.name]=Object.assign(Object.assign({},t.class),{capabilities:[t]})),e),{}),i={};return Object.keys(n).sort().forEach(e=>{i[e]=n[e],n[e].formName="class",n[e].shortDescription=n[e].description.toString().split(".")[0]}),i}function*getEngineClassesSaga(e){var t=yield select(selectApiConfigs),e=e.payload,n=yield select(preferredLanguageSelector);const i=AIWareFormatMessage(n);try{var r=sortEngineClasses(yield call$7(getClasses,t,e));yield put(actions.engineClassesState.getEngineClassesSuccess(r))}catch(e){yield put(actions.engineClassesState.getEngineClassesFailed(e.message)),yield put(showMessage({content:i({id:"os-engine-center-new.engine-classes.getEnginesClassesFail",defaultMessage:[{type:0,value:"Getting engine classes failed."}]}),severity:MessageSeverity.Error}))}}function*watchGetEngineClasses(){yield takeLatest$1(actions.engineClassesState.getEngineClassesStart.type,getEngineClassesSaga)}const decodeEngine=e=>({id:e.id,name:e.name,distributionType:e.distributionType,description:e.description,class:e.category.class.name,deploymentModel:e.deploymentModel,isPublic:e.isPublic,libraryRequired:e.libraryRequired,createsTDO:e.createsTDO,industries:e.industries,edgeVersion:e.edgeVersion,iconPath:e.iconPath,website:e.website,customFields:e.fields,inputTypes:[],isTrainable:!1,standaloneJobTemplates:lodash.exports.fromPairs(lodash.exports.map(e.standaloneJobTemplates,e=>[e.type.toLowerCase(),e.template.template])),capability:{name:e.category.name,id:e.category.id},mode:e.manifest.engineMode,supportedInputTypes:lodash.exports.map(e.manifest.supportedInputTypes,t=>{var e=lodash.exports.find(DEFAULT_ACCEPTABLE_FILE_TYPES,e=>lodash.exports.includes(e.extensions,t));return{name:e.name,type:e.type,mimeType:t}}),markdown:lodash.exports.isEmpty(e.useCases)?"":e.useCases[0],inputSchemas:lodash.exports.map(lodash.exports.get(e.inputSchemas,"records"),e=>({id:e.id,dataRegistryId:e.dataRegistryId,dataRegistryName:lodash.exports.get(e,"dataRegistry.name"),majorVersion:e.majorVersion,minorVersion:e.minorVersion})),outputSchemas:lodash.exports.map(lodash.exports.get(e.outputSchemas,"records"),e=>({id:e.id,dataRegistryId:e.dataRegistryId,dataRegistryName:lodash.exports.get(e,"dataRegistry.name"),majorVersion:e.majorVersion,minorVersion:e.minorVersion})),cpuResourceMcpu:e.cpuResourceMcpu,gpuSupported:e.gpuSupported,entityTags:e.entityTags});function*editEngine(e){e=yield queryEngineDetails(e.payload);yield put(actions.engineFormState.setEditEngineExistingData(decodeEngine(e)))}function*queryEngineDetails(e){var t=yield select(selectApiConfigs$1);return yield call$7(getEngineDetails,t,e)}function*updateEngine(e){var t=yield select(preferredLanguageSelector);const n=AIWareFormatMessage(t||"en");var{engine:t,openBuildPanel:e=!1}=e.payload,i=yield select(selectApiConfigs$1);try{var r=lodash.exports.omit(formatEngine(t),"createsTDO"),s=yield call$7(updateEngine$1,i,r),o=(yield put(actions.engineFormState.createEngineSuccess(s.id)),localStorage.removeItem("engineOnboardingSession"),yield put(showMessage({content:n({id:"os-engine-center-new.snackbar.engineUpdateSuccess",defaultMessage:[{type:0,value:"Engine successfully updated"}]}),severity:MessageSeverity.Success})),e?"ENGINE_CENTER_NEW_BUILD":"ENGINE_CENTER_DETAILS"),a={name:o,config:{engineId:s.id}};yield put(mountPanel({panelId:o,microFrontend:a,panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:0,size:"xlarge"}})),yield put(unmountPanel("ENGINE_CENTER_NEW"))}catch(e){yield put(actions.engineFormState.createEngineFailed(e.message)),yield put(showMessage({content:n({id:"os-engine-center-new.snackbar.engineOnboardingFailed",defaultMessage:[{type:0,value:"Engine onboarding failed"}]}),severity:MessageSeverity.Error}))}}function*watchEditEngine(){yield takeLatest$1(actions.engineFormState.editEngine.type,editEngine)}function*watchUpdateEngineStart(){yield takeLatest$1(actions.engineFormState.updateEngineStart.type,updateEngine)}const editEngineSagas=[fork(watchEditEngine),fork(watchUpdateEngineStart)];function*updateLocalStorage(){var e=engineFormState["selectEngine"],e=yield select(e);window.localStorage.setItem("engineOnboardingSession",JSON.stringify(e))}function*watchEngineForm(){var e=actions["engineFormState"],e=[e.updateEngineFormField.type,e.updateCapability.type,e.addCustomField.type,e.updateCustomField.type,e.removeCustomField.type,e.clearCustomFields.type,e.addSchemas.type,e.removeSchema.type,e.updateSchemas.type,e.clearSchemas.type];yield takeLatest$1(e,updateLocalStorage)}const updateEngineFormSagas=[fork(watchEngineForm)];function*fetchDataRegistries(){var e=yield select(selectApiConfigs$1);try{var t=yield call$7(getDataRegistries,e),n=get_1(t,"dataRegistries.records",[]),i=map_1(n,e=>Object.assign(Object.assign({},e),{name:trim_1(e.name)})),r=sortBy_1(i,[e=>lowerCase_1(e.name)]);yield put(actions.engineFormState.fetchDataRegistriesSucceeded({dataRegistries:r}))}catch(e){console.log(e.message),yield put(showMessage({content:e.message,severity:MessageSeverity.Error})),yield put(actions.engineFormState.fetchDataRegistriesFailed())}}function*watchFetchDataRegistries(){yield takeLatest$1([actions.engineFormState.fetchDataRegistries],fetchDataRegistries)}const dataRegistriesSagas=[fork(watchFetchDataRegistries)];function*rootSaga(){yield all$2([watchUploadIconStart(),watchProgressChannel(),watchGetEngineClasses(),...editEngineSagas,...updateEngineFormSagas,...newEngineSagas,...dataRegistriesSagas])}function getEngineCenterNewModule(){return{id:SLICE_NAME,reducerMap:{[SLICE_NAME]:rootReducer},sagas:[rootSaga],initialActions:[]}}const useEngineDescriptionStyles=makeStyles()(e=>({container:{padding:e.spacing(6),justifyContent:"space-around","& input, textarea":{fontWeight:400},"& fieldset":{borderColor:"#D5DFE9"}},textInput:{padding:14.5},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:s})=>{const t=react.exports.useRef(),e=react.exports.useRef(),o=useIntl(),a=useDispatch();var n=useSelector(preferredLanguageSelector);const l=AIWareFormatMessage(n),i=react.exports.useCallback(e=>{var t,n,i,r;e&&(s.includes(e.type)?5e6<=e.size?a(showMessage({content:o.formatMessage({id:"os-engine-center-new.snackbar.unsupportedFileSize",defaultMessage:[{type:0,value:"File file size must be less than 5 MB"}]}),severity:MessageSeverity.Warning})):({name:t,size:n,type:i}=e,r=URL.createObjectURL(e),r={id:guid(),previewUrl:r,name:t,size:n,type:i},a(actions.iconUploadState.uploadIconStart({file:r}))):a(showMessage({content:l({id:"os-engine-center-new.snackbar.unsupportedFileType",defaultMessage:[{type:1,value:"type"},{type:0,value:" is not a supported image type."}]},{type:e.type}),severity:MessageSeverity.Warning})))},[s,a]),r=react.exports.useCallback(e=>{e.preventDefault();e=e.dataTransfer.files[0];i(e)},[i]);const c=e=>{e.preventDefault()};return react.exports.useEffect(()=>{const e=t.current;return e.addEventListener("drop",r),()=>{e.removeEventListener("drop",r)}},[r]),react.exports.useEffect(()=>{const e=t.current;return e&&(e.addEventListener("dragover",c),e.addEventListener("dragleave",c)),()=>{e.removeEventListener("dragover",c),e.removeEventListener("dragleave",c)}},[]),{dropZoneRef:t,fileInputRef:e,handleRemoveFile:e=>{e.stopPropagation(),a(actions.iconUploadState.deleteLocalIcon()),a(actions.engineFormState.updateEngineFormField({field:"iconPath",value:""}))},handleOpenFilePicker:()=>{e.current.click()},handleIconSelect:e=>{e=e.target.files[0];i(e)}}},acceptedFileTypes=["image/jpeg","image/png","image/gif","image/svg+xml"],IconImporter=({iconPath:e})=>{var t=useSelector(selectIcon),n=useIconImporterStyles()["classes"],{dropZoneRef:i,fileInputRef:r,handleRemoveFile:s,handleIconSelect:o,handleOpenFilePicker:a}=useDragAndDrop({acceptedFileTypes:acceptedFileTypes});return jsxRuntime.exports.jsx("div",Object.assign({className:n.iconBox,ref:i,"data-test":"engine-description-icon-dropzone"},{children:e||null!=t&&t.previewUrl?jsxRuntime.exports.jsxs("div",Object.assign({className:n.innerBox,style:{backgroundColor:"transparent"}},{children:[jsxRuntime.exports.jsx(IconButton,Object.assign({"data-test":"engine-description-icon-remove",className:n.removeIcon,size:"small",onClick:s},{children:jsxRuntime.exports.jsx(default_1$6,{})})),jsxRuntime.exports.jsx("img",{src:(null==t?void 0:t.previewUrl)||e,alt:(null==t?void 0:t.name)||"Icon",className:n.iconPreview,"data-test":"engine-description-icon-preview"})]})):jsxRuntime.exports.jsxs(Button,Object.assign({className:n.innerBox,onClick:a},{children:[jsxRuntime.exports.jsx("input",{type:"file",ref:r,className:n.fileInput,onChange:o}),jsxRuntime.exports.jsx(default_1$2,{className:n.addIcon})]}))}))},renderErrorMessage=(e,{type:t,message:n})=>{let i="There is an error with this field";if(isEmpty_1(n))switch(t){case"required":i="This field is required";break;case"min":i="This field must be at least "+e.min;break;case"max":i="This field must be at most "+e.max;break;case"minLength":i=`This field must be at least ${e.minLength} characters`;break;case"maxLength":i=`This field must be at most ${e.maxLength} characters`;break;case"pattern":i="This field must match the pattern "+e.pattern}else i=n;return jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.errorMessage",defaultMessage:"{errorMessage}",description:"Error message",values:{errorMessage:i}})},InputText=react.exports.forwardRef((e,n)=>{var{name:t,label:i,placeholder:r,rules:s,callFieldOnChange:o=!0,onChange:a}=e,l=__rest(e,["name","label","placeholder","rules","callFieldOnChange","onChange"]),e=useFormContext()["control"];const c=useIntl();return jsxRuntime.exports.jsx(Controller,{name:t,control:e,rules:s,render:({field:t,fieldState:{error:e}})=>jsxRuntime.exports.jsx(TextField,Object.assign({},t,{inputRef:n,label:isNil_1(i)?"":c.formatMessage({id:"/runner/_work/aiware-apps/aiware-apps/libs/os/engine-center/new/src/helpers/FormComponents/.cDzoLl",defaultMessage:[{type:1,value:"label"}]},{label:i}),error:!isNil_1(e),helperText:e?renderErrorMessage(s,e):null,onChange:e=>{o&&t.onChange(e),null!=a&&a(e)},placeholder:isNil_1(r)?"":c.formatMessage({id:"/runner/_work/aiware-apps/aiware-apps/libs/os/engine-center/new/src/helpers/FormComponents/.BYW0j2",defaultMessage:[{type:1,value:"placeholder"}]},{placeholder:r})},l))})}),InputSelect=e=>{var{disabled:n,name:t,rules:i,variant:r="outlined",children:s,className:o,callFieldOnChange:a=!0,onChange:l,fullWidth:c=!1}=e,u=__rest(e,["disabled","name","rules","variant","children","className","callFieldOnChange","onChange","fullWidth"]),e=useFormContext()["control"];return jsxRuntime.exports.jsx(Controller,{control:e,name:t,rules:i,render:({field:t,fieldState:{error:e}})=>jsxRuntime.exports.jsxs(FormControl,Object.assign({disabled:n,className:o,variant:r,error:!isNil_1(e),fullWidth:c},{children:[jsxRuntime.exports.jsx(Select,Object.assign({},t,u,{onChange:e=>{a&&t.onChange(e),null!=l&&l(e)}},{children:s})),e&&i&&jsxRuntime.exports.jsx(FormHelperText$2,{children:renderErrorMessage(i,e)})]}))})},InputCheckbox=e=>{var{name:t,label:n,value:i,rules:r,callFieldOnChange:s=!0,onChange:o}=e,a=__rest(e,["name","label","value","rules","callFieldOnChange","onChange"]),{control:e,formState:{errors:l}}=useFormContext();return jsxRuntime.exports.jsxs(FormControl,Object.assign({error:has_1(l,t)},{children:[jsxRuntime.exports.jsx(FormControlLabel,{label:n,control:jsxRuntime.exports.jsx(Controller,{name:t,control:e,rules:r,render:({field:t})=>jsxRuntime.exports.jsx(Checkbox,Object.assign({},t,{value:i,onChange:e=>{s&&t.onChange(e),null!=o&&o(e)},checked:t.value},a))})}),has_1(l,t)&&r&&jsxRuntime.exports.jsx(FormHelperText$2,{children:renderErrorMessage(r,null==l?void 0:l[t])})]}))},InputRadioGroup=react.exports.forwardRef(e=>{var{name:t,rules:n,children:i,callFieldOnChange:r=!0,onChange:s}=e,o=__rest(e,["name","rules","children","callFieldOnChange","onChange"]),e=useFormContext()["control"];return jsxRuntime.exports.jsx(Controller,{name:t,control:e,rules:n,render:({field:t,fieldState:{error:e}})=>jsxRuntime.exports.jsxs(FormControl,Object.assign({error:!isNil_1(e)},{children:[jsxRuntime.exports.jsx(RadioGroup,Object.assign({},t,o,{onChange:e=>{r&&t.onChange(e),null!=s&&s(e)}},{children:i})),e&&n&&jsxRuntime.exports.jsx(FormHelperText$2,{children:renderErrorMessage(n,e)})]}))})}),useStyles$a=makeStyles()(e=>({checked:{color:"#6098D1"},rootSelectedForm:{padding:"0px !important"},rootSelectForm:{padding:"10px !important","&:hover":{background:"#F7F7F7"}},iconStyle:{marginRight:"5px"},iconComponent:{top:"20px"},iconBackground:{display:"inline-block",height:"32px",borderRadius:"32px",width:"32px",background:"#F2F5F9",marginRight:"15px",paddingLeft:"8px",paddingTop:"6px",marginLeft:"5px"},itemIcons:{verticalAlign:"middle"},itemIconsRow:{position:"absolute",top:"0px"},iconBackgroundSelected:{display:"inline-block",height:"25px",borderRadius:"25px",width:"25px",minHeight:"25px",minWidth:"25px",background:e.palette.primary.main,marginRight:"15px",paddingLeft:"7px",paddingTop:"7px",marginLeft:"15px"},helperDescription:{fontSize:"14px",marginBottom:"20px"},menuItem:{width:"958px",padding:"10px",whiteSpace:"initial",height:"fit-content",borderBottom:"0.5px solid "+e.palette.divider,borderRadius:"0px"},optionName:{marginLeft:"0px",textAlign:"left",verticalAlign:"top"},optionNameRow:{marginLeft:"50px"},summary:{fontSize:11,textTransform:"none",width:"900px"},selectForm:{width:"250px",fontWeight:"bold",fontSize:"18px"},selectedForm:{background:"#FAFAFA",width:"960px !important",fontWeight:"bold",fontSize:"18px"},selectedName:{textTransform:"capitalize",background:"#EEF3F9",width:"auto",height:"56px",lineHeight:"56px",fontWeight:"bold"},ul:{listStyle:"none"},selectedDescription:{fontSize:"12px",marginBottom:"10px"},classSelectedBox:{padding:"20px 32px",textOverflow:"wrap",fontSize:"12px",whiteSpace:"initial",wordWrap:"break-word",border:"1px solid "+e.palette.divider,borderTop:"none",lineHeight:"16px"},inputSelectCaption:{fontSize:"12px",fontWeight:600,marginTop:"16px",marginBottom:"11px"},inputSelect:{width:"228px",fontWeight:400,fontSize:"14px"},textInput:{paddingLeft:"15px",paddingTop:"12px",paddingBottom:"12px",fontWeight:400,fontSize:"14px"},selectionName:{marginLeft:"20px"},selectionDescription:{paddingLeft:"60px",marginTop:"-10px",fontSize:"12px"},icon:{textAlign:"center",height:"1rem !important",margin:"0 3px"}})),HelpDocs=({className:e,helpLink:t,sx:n})=>{const i=useDispatch();var r=useSelector(preferredLanguageSelector);const s=AIWareFormatMessage(r);return jsxRuntime.exports.jsx(default_1$1,{className:e,onClick:()=>{has_1(window,"aiware.helpCenter.openDocsPanel")?(window.aiware.helpCenter.openDocsPanel(t,!1),setTimeout(()=>{window.aiware.helpCenter.openDocsPanel(t,!1)},0)):i(showMessage({content:s({id:"os-engine-center-new.snackbar.helpCenterUnavailable",defaultMessage:[{type:0,value:"Help Center is not currently available."}]}),severity:MessageSeverity.Warning}))},sx:n,style:{cursor:"pointer"},color:"secondary"})},Heading=({testName:e,title:t,description:n,helpLink:i})=>{var r=useStyles$a()["classes"];return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs(Typography,Object.assign({"data-test":e+"-title",style:{fontWeight:"bold"},variant:"h5"},{children:[t,!isNil_1(i)&&jsxRuntime.exports.jsx(HelpDocs,{className:r.icon,helpLink:i})]})),jsxRuntime.exports.jsx(Typography,Object.assign({"data-test":e+"-description",className:r.helperDescription},{children:n}))]})},Dropdown=({disabled:e,menuItemRow:t,selectFormWidth:n,testName:i,handleSubSelectFormValue:r,handleSelectFormValue:s,selectionItems:o,iconMap:a,iconType:l,selectPlaceholder:c,selectIcon:u,selectedItem:p,selectedSubItem:d,selectFormName:m})=>{const g=useStyles$a()["classes"],f=useFormContext();return jsxRuntime.exports.jsx("div",Object.assign({style:{width:n},className:p?g.selectedForm:g.selectForm},{children:jsxRuntime.exports.jsxs(FormControl,Object.assign({disabled:e,fullWidth:!0,variant:"outlined"},{children:[jsxRuntime.exports.jsx(InputSelect,Object.assign({disabled:e,name:m,rules:{required:!0},displayEmpty:!0,"data-test":i+"-select-form",IconComponent:()=>jsxRuntime.exports.jsx(UpDown,{className:g.iconStyle}),classes:p?{select:g.rootSelectedForm,icon:g.iconComponent}:{select:g.rootSelectForm},defaultValue:(n=isEmpty_1(p)?"":p,f.setValue(m,n),n),onChange:e=>{var t,e=e.target["value"],e=o[e];isEmpty_1(get_1(e,"capabilities"))||(t=e.capabilities[0].id+","+e.capabilities[0].name,null!=r&&r(t)),f.setValue(m,e),f.trigger(m),null!=s&&s(e)},onClick:()=>f.trigger(m),renderValue:e=>e?jsxRuntime.exports.jsxs("div",Object.assign({className:g.selectedName},{children:[jsxRuntime.exports.jsx(Icon,{classes:{root:g.iconBackgroundSelected},className:g.itemIcons,component:get_1(p,"selectedIconName")?l[p.selectedIconName]:get_1(p,"name")?l[a[p.name]+"White"]:null}),get_1(p,"formattedName")||get_1(p,"name")]})):jsxRuntime.exports.jsxs(Typography,Object.assign({variant:"h6"},{children:[jsxRuntime.exports.jsx(Icon,{classes:{root:g.iconBackground},className:g.itemIcons,component:u}),c]}))},{children:o&&map_1(keys_1(o),e=>jsxRuntime.exports.jsxs(MenuItem,Object.assign({disabled:"marketplace"===e,className:g.menuItem,"data-test":o[e].value||e,value:o[e].value||e},{children:[jsxRuntime.exports.jsx(Icon,{classes:{root:g.iconBackground},className:t?g.itemIconsRow:g.itemIcons,component:o[e].iconName?l[o[e].iconName]:l[a[e]]}),jsxRuntime.exports.jsxs(Grid,Object.assign({className:t?g.optionNameRow:g.optionName,xs:2},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h6"},{children:o[e].formattedName||o[e].name})),t&&jsxRuntime.exports.jsx(Typography,Object.assign({className:g.summary},{children:o[e].description}))]})),!t&&jsxRuntime.exports.jsx(Grid,Object.assign({xs:9},{children:jsxRuntime.exports.jsx(Typography,Object.assign({className:g.summary,style:{whiteSpace:"initial"}},{children:o[e].shortDescription}))}))]}),o[e].value||e))})),!isEmpty_1(p)&&!isEmpty_1(p.capabilities)&&jsxRuntime.exports.jsxs(Box$1,Object.assign({className:g.classSelectedBox},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({className:g.selectedDescription},{children:!isEmpty_1(p)&&p.description})),jsxRuntime.exports.jsx(Typography,Object.assign({className:g.inputSelectCaption},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"engine-center-new.custom-dropdown.engine-category",defaultMessage:"Engine Category",description:"Engine Category"})})),jsxRuntime.exports.jsx(InputSelect,Object.assign({inputProps:{maxLength:50,className:g.textInput},className:g.inputSelect,type:"text",name:"type",disabled:1==p.capabilities.length,value:d,onChange:e=>{e=e.target.value;null!=r&&r(e)},style:{minWidth:"100%"},"data-test":i+"-sub-select-form",rules:{required:!0}},{children:map_1(p.capabilities,({id:e,name:t})=>jsxRuntime.exports.jsx(MenuItem,Object.assign({value:e+","+t,color:"textSecondary","data-test":i+"-sub-select-form-"+kebabCase_1(t)},{children:t}),e))}))]}))]}))}))},GenericSelect=({disabled:e,title:t,description:n,selections:i,iconType:r,selectIcon:s,selectPlaceholder:o,testName:a,selectFormWidth:l,menuItemRow:c,iconMap:u,handleSubSelectFormValue:p,handleSelectFormValue:d,helpLink:m,selectedItem:g,selectedSubItem:f,selectFormName:h})=>jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Heading,{title:t,description:n,testName:a,helpLink:m}),jsxRuntime.exports.jsx(Dropdown,{disabled:e,selectFormName:h,selectionItems:i,iconType:r,selectIcon:s,selectPlaceholder:o,testName:a,selectFormWidth:l,menuItemRow:c,iconMap:u,handleSubSelectFormValue:p,handleSelectFormValue:d,selectedItem:g,selectedSubItem:f})]}),DistributionFlags=({engineFlags:e,handleEngineFlag:t})=>{const n=useSelector(selectEngineFlag);return jsxRuntime.exports.jsx(GenericSelect,{title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.distribution-flag-generic-select-title",defaultMessage:"Distribution Flags",description:"Form label for distribution flags"}),description:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.distribution-flag-generic-select-description",defaultMessage:"Add Distribution Flags for Engines | Hub.",description:"Add Distribution Flags for Engines | Hub"}),selectPlaceholder:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.distribution-flag-generic-select-placeholder",defaultMessage:"Instance Locked",description:"Placeholder for engine flag"}),selectIcon:Bookmark,iconType:EngineFlagIcons,selections:e,handleSelectFormValue:t,testName:"os-engine-center-new.engine-flag",selectedItem:isEmpty_1(n)?null:find_1(e,{value:n}),selectFormName:"engineFlag"})},engineFlags={private:{formName:"distributionType",name:"Private",formattedName:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.distribution-type-formatted-name-private",defaultMessage:"Private",description:"label for sharable"}),iconName:"Private",selectedIconName:"PrivateWhite",shortDescription:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.distribution-type-short-description-private",defaultMessage:"Your engine will not be distributed and is private to your instance.",description:"short desc for private"}),description:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.distribution-type-description-private",defaultMessage:"Your engine will not be distributed and is private to your instance.",description:"desc for private"}),value:"private",link:""},org_locked:{formName:"distributionType",name:"Org Locked",formattedName:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.distribution-type-formatted-name-org-locked",defaultMessage:"Org Locked",description:"label for Org Locked"}),iconName:"OrgLocked",selectedIconName:"OrgLockedWhite",shortDescription:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.distribution-type-short-description-org-locked",defaultMessage:"Your engine will only be distributed to instances within your organization.",description:"short desc for Org Locked"}),description:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.distribution-type-description-org-locked",defaultMessage:"Your engine will only be distributed to instances within your organization.",description:"desc for org locked"}),value:"org_locked",link:""},sharable:{formName:"distributionType",name:"Sharable",formattedName:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.distribution-type-formatted-name-sharable",defaultMessage:"Sharable",description:"label for sharable"}),iconName:"Sharable",selectedIconName:"SharableWhite",shortDescription:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.distribution-type-short-description-sharable",defaultMessage:"Your engine can be distributed to other organizations on any instance.",description:"short desc for sharable"}),description:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.distribution-type-description-sharable",defaultMessage:"Your engine can be distributed to other organizations on any instance.",description:"desc for sharable"}),value:"sharable",link:""},public:{formName:"distributionType",name:"Public",formattedName:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.distribution-type-message-name-public",defaultMessage:"Public",description:"label for public"}),iconName:"Public",selectedIconName:"PublicWhite",shortDescription:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.distribution-type-short-description-public",defaultMessage:"Your engine will be distributed to all instances in and outside of your organization.",description:"short desc for public"}),description:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.distribution-type-description-public",defaultMessage:"Your engine will be distributed to all instances in and outside of your organization.",description:"desc for public"}),value:"public",link:""},instance_locked:{formName:"distributionType",name:"Instance locked",formattedName:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.distribution-type-formatted-message-instance-locked",defaultMessage:"Instance locked",description:"label for Instance locked"}),iconName:"InstanceLocked",selectedIconName:"InstanceLockedWhite",shortDescription:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.distribution-type-short-description-instance-locked",defaultMessage:"Your engine will be sharable to other organizations on your instance only.",description:"short desc for Instance locked"}),description:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.distribution-type-description-instance-locked",defaultMessage:"Your engine will be sharable to other organizations on your instance only.",description:"desc for instance locked"}),value:"instance_locked",link:""},marketplace:{formName:"distributionType",name:"Marketplace",formattedName:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.distribution-type-formatted-name-marketplace",defaultMessage:"Marketplace",description:"label for marketplace"}),iconName:"Marketplace",selectedIconName:"MarketplaceWhite",shortDescription:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.distribution-type-short-description-marketplace",defaultMessage:"Coming soon...",description:"short desc for marketplace"}),description:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.distribution-type-description-marketplace",defaultMessage:"Coming soon...",description:"desc for marketplace"}),value:"marketplace",link:""}},urlRegex=/^https?:\/\/[(www\.)?a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/,EngineDescription=({onValidate:e})=>{var t=useEngineDescriptionStyles()["classes"];const n=useDispatch(),i=useSelector(selectEngine),r=useSelector(selectIsResumeSession);var s={name:i.name,description:i.description,website:i.website,cpuResourceMcpu:i.cpuResourceMcpu,gpuSupported:i.gpuSupported,distributionType:i.distributionType};const o=useForm({mode:"onChange",defaultValues:s});react.exports.useEffect(()=>{e(o.formState.isValid)},[o.formState.isValid]),react.exports.useEffect(()=>{__awaiter(void 0,void 0,void 0,function*(){r&&(o.reset(i),setTimeout(()=>__awaiter(void 0,void 0,void 0,function*(){yield o.trigger()}),500))})},[r]);const a=(e,t)=>{n(actions.engineFormState.updateEngineFormField({field:e,value:t}))};var s=e=>{var{name:e,value:t}=e.target;a(e,t)},l=e=>{var{name:e,value:t}=e.target;o.setValue(e,t),o.trigger(e),a(e,t)};return jsxRuntime.exports.jsx(FormProvider,Object.assign({},o,{children:jsxRuntime.exports.jsxs(Grid,Object.assign({className:t.container,container:!0,rowSpacing:4,columnSpacing:10,"data-test":"engine-description"},{children:[jsxRuntime.exports.jsxs(Grid,Object.assign({container:!0,item:!0,xs:12,sm:8,rowSpacing:4,columnSpacing:6},{children:[jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:12,sm:6},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h6",gutterBottom:!0},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.name-description-label",defaultMessage:"Name & Description",description:"Name & Description"})}))})),jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:12,sm:8},{children:jsxRuntime.exports.jsx(InputText,{inputProps:{className:t.textInput},"data-test":"engine-description-input-name",variant:"outlined",sx:{marginBottom:3},placeholder:"Engine Name",name:"name",value:i.name,onChange:s,fullWidth:!0,rules:{required:!0,maxLength:100}})})),jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:12},{children:jsxRuntime.exports.jsx(InputText,{InputProps:{className:t.textInput},"data-test":"engine-description-input-description",variant:"outlined",placeholder:"Description",name:"description",fullWidth:!0,multiline:!0,rows:10,value:i.description,onChange:s,rules:{required:!0,maxLength:250}})})),jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:12},{children:[jsxRuntime.exports.jsxs(Box,Object.assign({className:t.labelRow,mb:2},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h6",gutterBottom:!0},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.url-website-label",defaultMessage:"URL to Website",description:"URL to Website"})})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption",className:t.optional},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.Uq235r",defaultMessage:" (optional)",description:" (optional)"})}))]})),jsxRuntime.exports.jsx(InputText,{inputProps:{className:t.textInput},"data-test":"engine-description-input-website",variant:"outlined",placeholder:"Website URL",name:"website",fullWidth:!0,value:i.website,onChange:s,type:"url",rules:{pattern:{value:urlRegex,message:"Must be a valid URL including protocol."},maxLength:1e3}})]}))]})),jsxRuntime.exports.jsxs(Grid,Object.assign({container:!0,item:!0,xs:12,sm:4,rowSpacing:4,columnSpacing:6},{children:[jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:12},{children:[jsxRuntime.exports.jsxs(Box,Object.assign({className:t.labelRow},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h6",gutterBottom:!0},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.icon-image-label",defaultMessage:"Icon",description:"Icon"})})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption",className:t.optional,component:"small"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.optional-image-label",defaultMessage:" (optional)",description:" (optional)"})}))]})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption",paragraph:!0},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-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:i.iconPath})]})),jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:12},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h6"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.cpu-resource-label",defaultMessage:"CPU Requirements",description:"CPU Requirements"})})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption",paragraph:!0},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.cpu-requirements-label",defaultMessage:"In milli-cpu's",description:"Explanation of cpu measurement"})})),jsxRuntime.exports.jsxs(InputSelect,Object.assign({inputProps:{className:t.textInput},"data-test":"engine-description-input-cpuResourceMcpu",className:t.select,variant:"outlined",value:i.cpuResourceMcpu,defaultValue:i.cpuResourceMcpu,onChange:l,onClick:()=>o.trigger("cpuResourceMcpu"),name:"cpuResourceMcpu",fullWidth:!0,rules:{required:!0}},{children:[jsxRuntime.exports.jsx(MenuItem,Object.assign({value:512},{children:"512"})),jsxRuntime.exports.jsx(MenuItem,Object.assign({value:1024},{children:"1024"})),jsxRuntime.exports.jsx(MenuItem,Object.assign({value:2048,"data-test":"2048"},{children:"2048"})),jsxRuntime.exports.jsx(MenuItem,Object.assign({value:4096},{children:"4096"})),jsxRuntime.exports.jsx(MenuItem,Object.assign({value:8192},{children:"8192"}))]}))]})),jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:12},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h6",paragraph:!0},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.gpu-requirements-label",defaultMessage:"GPU Requirements",description:"GPU Requirements"})})),jsxRuntime.exports.jsxs(InputSelect,Object.assign({inputProps:{className:t.textInput},"data-test":"engine-description-input-gpuSupported",className:t.select,variant:"outlined",value:i.gpuSupported,onChange:l,onClick:()=>o.trigger("gpuSupported"),name:"gpuSupported",fullWidth:!0,displayEmpty:!0},{children:[jsxRuntime.exports.jsx(MenuItem,Object.assign({value:"none"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.input-gpu-none",defaultMessage:"None",description:"label for None"})})),jsxRuntime.exports.jsx(MenuItem,Object.assign({value:"aws_p2"},{children:"AWS P2"})),jsxRuntime.exports.jsx(MenuItem,Object.assign({value:"aws_p3"},{children:"AWS P3"}))]}))]}))]})),jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:12},{children:jsxRuntime.exports.jsx(DistributionFlags,{engineFlags:engineFlags,handleEngineFlag:({value:e})=>{n(actions.engineFormState.updateEngineFormField({field:"distributionType",value:e}))}})}))]}))}))},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)}})),engineClassHelpLink="https://docs.veritone.com/#/developer/engines/cognitive/classes/",engineModeHelpLink="https://docs.veritone.com/#/applications/aiware-applications/developer/processing-modes",deploymentModelHelpLink="https://docs.veritone.com/#/applications/aiware-applications/developer/deployment-models",iconMap={audio:"Audio",biometrics:"Biometrics",data:"Data",speech:"Speech",text:"Text",transformation:"Transformation",vision:"Vision"},EngineClass=({engineClasses:e,handleEngineClassType:t,handleEngineCategoryType:n})=>{const i=useSelector(selectEngineClass),r=useSelector(selectEngineCapability);var s=useSelector(selectIsEditForm)["isEditForm"];return jsxRuntime.exports.jsx(GenericSelect,{disabled:s,title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.z3sfba",defaultMessage:"Engine Class",description:"Form label for engine class"}),description:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.xXLLoZ",defaultMessage:"Engines are categorized based on the type of data they analyze. The major classes are provided here.",description:"Form description for engine class"}),selectPlaceholder:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.IPwLZo",defaultMessage:"Select a Class",description:"Placeholder for engine class"}),selectIcon:Bookmark,iconType:EngineClassIcons,selections:e,handleSelectFormValue:t,handleSubSelectFormValue:n,iconMap:iconMap,testName:"os-engine-center-new.engine-class",helpLink:engineClassHelpLink,selectedItem:isEmpty_1(i)?null:find_1(e,{name:i}),selectedSubItem:isEmpty_1(r)?null:r.id+","+r.name,selectFormName:"engineClass"})},EngineMode=({engineModes:e,handleEngineModeType:t})=>{const n=useSelector(selectEngineMode);var i=useSelector(selectIsEditForm)["isEditForm"];return jsxRuntime.exports.jsx(GenericSelect,{disabled:i,title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.G52MSw",defaultMessage:"Engine Mode",description:"Form label for engine mode"}),description:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.qVtbCX",defaultMessage:"Engines will generally be designed to run in one of three modes on aiWARE: Segment, Stream, or Batch.",description:"Form description for engine mode"}),selectPlaceholder:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.VvyxXY",defaultMessage:"Choose a mode",description:"Placeholder for engine mode"}),selectIcon:Mode2,iconType:EngineModeIcons,selections:e,handleSelectFormValue:t,testName:"os-engine-center-new.engine-mode",helpLink:engineModeHelpLink,selectedItem:isEmpty_1(n)?null:find_1(e,{value:n}),selectFormName:"engineMode"})},DeploymentModel=({deploymentModels:e,handleDeploymentModelType:t})=>{const n=useSelector(selectDeploymentModel);var i=useSelector(selectIsEditForm)["isEditForm"];return jsxRuntime.exports.jsx(GenericSelect,{disabled:i,title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.kpw4rJ",defaultMessage:"Deployment Model",description:"Form label for Deployment Model"}),description:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.NHOoQV",defaultMessage:"The engine deployment model tells what type of network access the engine requires. Some engines require access to resources outside the Docker runtime environment. Others do not (and thus are considered Network Isolated).",description:"Form description for Deployment Model"}),selectPlaceholder:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.Sr2aUm",defaultMessage:"Choose a Deployment Model",description:"Placeholder for Deployment Model"}),selectIcon:Mode2,iconType:DeploymentModelIcons,selections:e,handleSelectFormValue:t,testName:"os-engine-center-new.deployment-model",selectFormWidth:"320px",menuItemRow:!0,helpLink:deploymentModelHelpLink,selectedItem:isEmpty_1(n)?null:find_1(e,{value:n}),selectFormName:"deploymentModel"})},CustomFieldsList=()=>{const n=useDispatch(),t=useSelector(selectCustomFields),e=e=>e.map(e=>({name:e.name,type:e.type,default:e.type!==EngineFieldType.MultiPicklist||isEmpty_1(e.defaultValues)?e.defaultValue:join_1(e.defaultValues,", ")})),[i,r]=react.exports.useState(e(t));react.exports.useEffect(()=>{r(e(t))},[t]);const s=(e=!1,t=-1)=>{e={name:"ENGINE_CENTER_CUSTOM_FIELDS_FORM",config:{name:"Custom Fields",isEdit:e,editIndex:t}};n(mountPanel({panelId:"ENGINE_CENTER_CUSTOM_FIELDS_FORM",microFrontend:e,panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:0,zIndex:1010}}))};return jsxRuntime.exports.jsx(ListField,{idPrefix:"ecn.custom-fields",heading:"Custom Fields",description:"Does your engine require custom fields? If so, specify them here. Leave blank if not.",actionButtonLabel:"Custom Field",items:i,columnNames:["Name","Type","Default","",""],canEdit:!0,canDelete:!0,onActionClick:()=>{s()},onEditClick:e=>{e=i[e],e=findIndex_1(t,{name:e.name,type:e.type});0<=e&&s(!0,e)},onDeleteClick:e=>{e=i[e],e=findIndex_1(t,{name:e.name,type:e.type});0<=e&&n(actions.engineFormState.removeCustomField(e))},onRequestSort:(e,t)=>{r(orderBy_1(i,lowerCase_1(e),t))}})},InputTypeViewListControled=({supportedInputTypes:e,handleDeleteSupportedInputType:t,onAddInputType:n})=>{const[i,r]=react.exports.useState("name"),[s,o]=react.exports.useState("asc"),a=React$1.useMemo(()=>lodash.exports.orderBy(e,i,s),[e,i,s]);return jsxRuntime.exports.jsx(ListField,{canDelete:!0,idPrefix:"ecn.inputTypeViewList",heading:"Supported Input Types",description:"Please specify ALL input types your engine supports. You will be able to update this in the manifest later.",actionButtonLabel:"Input Type",items:lodash.exports.map(a,e=>lodash.exports.omit(e,"type")),columnNames:["Name","Type",""],onActionClick:n,onDeleteClick:e=>t(lodash.exports.nth(a,e)),onRequestSort:(e,t)=>{e=lodash.exports.lowerCase(e);r("type"===e?"mimeType":e),o(t)}})},InputTypeViewList=()=>{const e=useDispatch(),n=useSelector(selectEngine);return jsxRuntime.exports.jsx(InputTypeViewListControled,{supportedInputTypes:n.supportedInputTypes,handleDeleteSupportedInputType:t=>{e(actions.engineFormState.updateEngineFormField({field:"supportedInputTypes",value:lodash.exports.reject(n.supportedInputTypes,e=>e===t)}))},onAddInputType:()=>{e(mountPanel({panelId:"ENGINE_CENTER_INPUT_TYPE_FLYOUT",microFrontend:{name:"ENGINE_CENTER_INPUT_TYPE_FLYOUT",config:{name:"Supported Input Types"}},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:0,zIndex:1010}}))}})},engineModes={chunk:{formName:"mode",name:"Chunk",formattedName:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.uJB1gu",defaultMessage:"Chunk",description:"label for Chunk"}),iconName:"Chunk",selectedIconName:"ChunkWhite",shortDescription:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.AHskfr",defaultMessage:"In Segment mode, an engine will process data in small, discrete chunks, which arise from segmentation of the input data into messages.",description:"short desc for Chunk"}),description:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.5qrKxx",defaultMessage:"In Segment mode, an engine will process data in small, discrete chunks, which arise from segmentation of the input data into messages. The engine pulls chunks from a stateless queue, which means the engine can process each discrete bit of content without having any knowledge of the content that came before or after the current chunk.",description:"desc for Chunk"}),value:"chunk",link:"https://docs.veritone.com/#/developer/engines/processing-modes/segment-processing/"},stream:{formName:"mode",name:"Stream",formattedName:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.+hPNys",defaultMessage:"Stream",description:"label for Stream"}),iconName:"Stream",selectedIconName:"StreamWhite",shortDescription:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.t9JU60",defaultMessage:"Stream-based engines process data in streams, using a stateful queue, where the order of the data does matter.",description:"short desc for stream"}),description:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.dzszV5",defaultMessage:"Stream-based engines process data in streams, using a stateful queue, where the order of the data does matter. Because they store state, stream engines can use results from earlier cognition to inform later stages of processing. Generally, the engine needs to take care of decoding the raw input itself.",description:"desc for stream"}),value:"stream",link:"https://docs.veritone.com/#/developer/engines/processing-modes/stream-processing/"},batch:{formName:"mode",name:"Batch",formattedName:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.JldfAk",defaultMessage:"Batch",description:"label for Batch"}),iconName:"Batch",selectedIconName:"BatchWhite",shortDescription:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.VBCYgQ",defaultMessage:"Batch engines are designed to process an entire file in one task (process) invocation and communicate directly with the Veritone aiWARE GraphQL API.",description:"short desc for batch"}),description:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.etiD+m",defaultMessage:"Batch engines are designed to process an entire file in one task (process) invocation and communicate directly with the Veritone aiWARE GraphQL API. Because Batch engines simply execute all of the logic defined in the engine this engine mode is ideal for handling business logic like app integrations and other utility use-cases.",description:"desc for batch"}),value:"batch",link:""}},networkIsolatedModelHelpLink="https://docs.veritone.com/#/developer/engines/deployment-model/?id=network-isolated",externalAccessModelHelpLink=" https://docs.veritone.com/#/developer/engines/deployment-model/?id=external-access",externalProcessingModelHelpLink="https://docs.veritone.com/#/developer/engines/deployment-model/?id=external-processing",humanReviewModelHelpLink="https://docs.veritone.com/#/developer/engines/deployment-model/?id=human-review",deploymentModels={MostlyNetworkIsolated:{formName:"deploymentModel",name:"External Access",formattedName:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.52BnJK",defaultMessage:"External Access",description:"label for External Access"}),iconName:"MostlyNetworkIsolated",selectedIconName:"MostlyNetworkIsolatedWhite",shortDescription:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.2YbY12",defaultMessage:"The engine requires internet access for tasks like license checks to an external server, or downloading reference data, but does not send user data outside the container.",description:"short desc for External Access"}),description:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.6dfPvn",defaultMessage:"The engine requires internet access for tasks like license checks to an external server, or downloading reference data, but does not send user data outside the container.",description:"desc for External Access"}),value:"MostlyNetworkIsolated",link:externalAccessModelHelpLink},FullyNetworkIsolated:{formName:"deploymentModel",name:"Network Isolated",formattedName:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.0cXuDd",defaultMessage:"Network Isolated",description:"label for Network Isolated"}),iconName:"FullyNetworkIsolated",selectedIconName:"FullyNetworkIsolatedWhite",shortDescription:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.kjYyU2",defaultMessage:"The engine does all processing entirely within its container (ie. itself), running solely within Veritone's infrastructure.",description:"short desc for Network Isolated"}),description:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.iFKCNO",defaultMessage:"The engine does all processing entirely within its container (ie. itself), running solely within Veritone's infrastructure. There is no internet access, and no external calls are made to the outside world ever. This is the most secure deployment model, which makes 'network-isolated deployment' a requirement for most Government agencies and Legal & Compliance customers. This deployment is also highly requested by Media & Entertainment customers, since network-isolated engines may be deployed on-premises.",description:"desc for Network Isolated"}),value:"FullyNetworkIsolated",link:networkIsolatedModelHelpLink},NonNetworkIsolated:{formName:"deploymentModel",name:"External Processing",formattedName:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.IBPpVI",defaultMessage:"External Processing",description:"label for External Processing"}),iconName:"NonNetworkIsolated",selectedIconName:"NonNetworkIsolatedWhite",shortDescription:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.vMyLbx",defaultMessage:"The engine does some or all of its processing outside its container and therefore requires internet access.",description:"short desc for External Processing"}),description:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.qMDz39",defaultMessage:"The engine does some or all of its processing outside its container and therefore requires internet access. For example, user data may need to be sent to external services (such as a cloud API) for processing.",description:"desc for External Processing"}),value:"NonNetworkIsolated",link:externalProcessingModelHelpLink},HumanReview:{formName:"deploymentModel",name:"Human Review",formattedName:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.NpSCxi",defaultMessage:"Human Review",description:"label for Human Review"}),iconName:"HumanReview",selectedIconName:"HumanReviewWhite",shortDescription:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.1GxLEU",defaultMessage:"The engine requires human intervention to complete its processing, and therefore needs network access.",description:"short desc for Human Review"}),description:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.MoW0r5",defaultMessage:"The engine requires human intervention to complete its processing, and therefore needs network access.",description:"desc for Human Review"}),value:"HumanReview",link:humanReviewModelHelpLink}},FunctionalityStep=({onValidate:e})=>{var t=useStyles$9()["classes"];const n=useDispatch(),{apiRoot:i,graphQLEndpoint:r,token:s}=useSelector(selectApiConfigs$1);var o=useSelector(selectEngineClasses);const a=useSelector(selectEngineClass),l=useSelector(selectEngineMode),c=useSelector(selectDeploymentModel);var u=useSelector(selectEntityTags),p={engineMode:l,engineClass:a,deploymentModel:c,entityTags:u};const d=useForm({mode:"onChange",defaultValues:p});react.exports.useEffect(()=>{lodash.exports.isEmpty(a)||lodash.exports.isEmpty(c)||lodash.exports.isEmpty(l)||e(!0)}),react.exports.useEffect(()=>{i&&r&&s&&n(actions.engineClassesState.getEngineClassesStart("Cognition"))},[i,r,s,n]),react.exports.useEffect(()=>{null!=e&&e(d.formState.isValid)},[d.formState.isValid]);p=e=>{n(actions.engineFormState.updateEngineFormField({field:e.formName,value:e.value||e.name}))};return jsxRuntime.exports.jsx(FormProvider,Object.assign({},d,{children:jsxRuntime.exports.jsxs(Grid,Object.assign({container:!0,rowSpacing:5,columnSpacing:6,className:t.container,"data-test":"engine-new-functionality-step-container"},{children:[jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,"data-test":"engine-new-functionality-step-engine-class"},{children:jsxRuntime.exports.jsx(EngineClass,{engineClasses:o,handleEngineClassType:p,handleEngineCategoryType:e=>{n(actions.engineFormState.updateCapability({payload:e}))}})})),jsxRuntime.exports.jsx(Divider$1,{className:t.divider}),jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,"data-test":"engine-new-functionality-step-engine-mode"},{children:jsxRuntime.exports.jsx(EngineMode,{engineModes:engineModes,handleEngineModeType:p})})),jsxRuntime.exports.jsx(Divider$1,{className:t.divider}),jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,"data-test":"engine-new-functionality-step-engine-tags"},{children:jsxRuntime.exports.jsx(EntityTags,{setSelectedTags:e=>{n(actions.engineFormState.updateEngineFormField({field:"entityTags",value:e}))},selectedTags:u})})),jsxRuntime.exports.jsx(Divider$1,{className:t.divider}),jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,"data-test":"engine-new-functionality-step-engine-deployment-model"},{children:jsxRuntime.exports.jsx(DeploymentModel,{deploymentModels:deploymentModels,handleDeploymentModelType:p})})),jsxRuntime.exports.jsx(Divider$1,{className:t.divider}),jsxRuntime.exports.jsx(Box,Object.assign({className:t.list,"data-test":"engine-new-functionality-step-engine-input-view-list"},{children:jsxRuntime.exports.jsx(InputTypeViewList,{})})),jsxRuntime.exports.jsx(Box,Object.assign({className:t.list,"data-test":"engine-new-functionality-step-engine-custom-field-list"},{children:jsxRuntime.exports.jsx(CustomFieldsList,{})}))]}))}))},useStyles$8=makeStyles()(e=>({backButton:{background:"none",color:"black",marginRight:"20px",":hover":{background:"#D3D3D3"}},root:{width:1020,position:"relative"},panel:{backgroundColor:e.palette.background.paper,boxShadow:"0px 0px 12px rgba(0, 0, 0, 0.25)",height:"100%"},container:{display:"flex",flexDirection:"column",height:"100%"},expand:{marginTop:"-20px"},fullScreen:{position:"fixed",width:"100%",height:"100vh",overflow:"auto",top:0,left:0,right:0,bottom:0,zIndex:1004},fullScreenButton:{marginTop:"-50px"},tabs:{"& .Sdk-MuiTabs-indicator":{backgroundColor:"black",color:"black"},"& .Sdk-Mui-selected":{color:"black"}},bottomButtons:{marginTop:"20px"},markdown:{height:"100%",background:"#303841"},previewMarkdown:{height:"100%",position:"relative",padding:"20px",background:"#303841"},previewMarkdownContent:{background:"white",padding:"15px",borderRadius:"3px"}}));function useTabCapturing({inputRef:s,onChange:o}){const[a,l]=react.exports.useState(TAB_CAPTURE_MODE.NON_CAPTURE_MODE);return[e=>{var t=e["key"];if(!lodash.exports.isNil(s.current)){const{value:n,selectionStart:i,selectionEnd:r}=s.current;switch(t){case"Tab":return void(a===TAB_CAPTURE_MODE.CAPTURING_MODE&&(e.preventDefault(),s.current.value=n.slice(0,i)+"\t"+n.slice(r),s.current.setSelectionRange(i+1,i+1),o(e)));case"Escape":return void l(TAB_CAPTURE_MODE.NON_CAPTURE_MODE);case"m":return void(e.ctrlKey&&l(a===TAB_CAPTURE_MODE.CAPTURING_MODE?TAB_CAPTURE_MODE.NON_CAPTURE_MODE:TAB_CAPTURE_MODE.CAPTURING_MODE));case"Shift":return;default:l(TAB_CAPTURE_MODE.CAPTURING_MODE)}}},e=>{l(TAB_CAPTURE_MODE.CAPTURING_MODE)}]}function useLineNumbers(n){return react.exports.useMemo(()=>{var e=lodash.exports.size(lodash.exports.split(n,"\n"));const t=lodash.exports.map(new Array(e),(e,t)=>t+1);return t.join("\n")},[n])}!function(e){e[e.CAPTURING_MODE=0]="CAPTURING_MODE",e[e.NON_CAPTURE_MODE=1]="NON_CAPTURE_MODE"}(TAB_CAPTURE_MODE=TAB_CAPTURE_MODE||{});const editorStyles={margin:"0",padding:"10px 0",borderRadius:"0",resize:"none",fontSize:"1em",fontFamily:"Nunito, lucida console, courier new, courier, monospace",lineHeight:"1.6em",outline:"none",boxSizing:"border-box",whiteSpace:"nowrap","&:focus-visible":{outline:"none"},"& textarea":{lineHeight:"2em",whiteSpace:"pre"}},useStyles$7=makeStyles()(e=>({codeEditor:lodash.exports.merge(lodash.exports.cloneDeep(editorStyles),{paddingLeft:"calc(3rem + 10px)",width:"100%",backgroundColor:"#303841",borderColor:"#303841",color:"#ffffff",caretColor:"#FFBB0A"}),lineCounter:lodash.exports.merge(lodash.exports.cloneDeep(editorStyles),{display:"block",borderColor:"#4F565E",overflowY:"hidden",boxShadow:"none",color:"#9CA8B4",backgroundColor:"#4F565E",position:"absolute",width:"3rem",paddingRight:".625rem",top:0,left:0,bottom:0,minHeight:"100%",pointerEvents:"none","& textarea":{textAlign:"right",fontWeight:"600"}})})),InputTypeMarkdown$1=({value:e,name:t,onChange:n})=>{const i=react.exports.useRef();var r=react.exports.useRef(),s=react.exports.useRef(),o=useStyles$7()["classes"],a=useLineNumbers(e),[l,c]=useTabCapturing({inputRef:s,onChange:n});return jsxRuntime.exports.jsxs(Box,Object.assign({position:"relative",padding:0,margin:0,width:"100%"},{children:[jsxRuntime.exports.jsx(InputUnstyled,{"data-test":"input-type-markdown-code-editor",name:t,ref:r,inputRef:s,className:o.codeEditor,onScroll:e=>{lodash.exports.isNil(i.current)||(i.current.scrollTop=e.currentTarget.scrollTop,i.current.scrollLeft=e.currentTarget.scrollLeft)},onKeyDown:l,onChange:e=>{n(e)},onClick:c,spellCheck:!1,value:e,multiline:!0}),jsxRuntime.exports.jsx(InputUnstyled,{"data-test":"input-type-markdown-line-numbers",ref:i,className:o.lineCounter,spellCheck:!1,value:a,multiline:!0,readOnly:!0})]}))},InputTypeMarkdown=()=>{const t=useDispatch();var e=useSelector(selectEngine);return jsxRuntime.exports.jsx(InputTypeMarkdown$1,{value:e.markdown,onChange:e=>{t(actions.engineFormState.updateEngineFormField({field:"markdown",value:e.target.value}))}})},PreviewMarkdown=()=>{var e=useSelector(selectEngine);return jsxRuntime.exports.jsx(ReactMarkdown,{children:e.markdown})},UseCasesStep=({onValidate:e})=>{const t=useStyles$8()["classes"],[n,i]=react.exports.useState(0),[r,s]=react.exports.useState(!1),o=useSelector(selectEngine),a=(react.exports.useEffect(()=>{null!=e&&e(!0)},[]),(e,t)=>{i(Number(t))}),l=()=>{s(!r)};return jsxRuntime.exports.jsx("div",Object.assign({"data-test":"os-engine-center-new.use-cases-step-parent-container",className:r&&classNames(t.root,t.panel,t.fullScreen),style:{height:"100%"}},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:t.container,"data-test":"os-engine-center-new.use-cases-container"},{children:[jsxRuntime.exports.jsx(Box,Object.assign({padding:5,paddingBottom:0},{children:jsxRuntime.exports.jsx(Heading,{title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.use-cases-title",defaultMessage:"Use Case Creator",description:"label for use case title"}),description:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.use-cases-description",defaultMessage:"Give examples of typical scenarios in which your engine would be used.",description:"label for use case description"}),testName:"os-engine-center-new.use-cases"})})),jsxRuntime.exports.jsxs(Box,Object.assign({"data-test":"engine-details-tabs-list",padding:4,paddingTop:0,paddingBottom:1},{children:[jsxRuntime.exports.jsxs(Tabs,Object.assign({className:t.tabs,value:n,onChange:a,"aria-label":"icon label tabs example"},{children:[jsxRuntime.exports.jsx(Tab,{"data-test":"os-engine-center-new.use-cases-step-markdown-tab",label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.use-cases-step-markdown-tab-label",defaultMessage:"Markdown",description:"tab label: Markdown"})}),jsxRuntime.exports.jsx(Tab,{"data-test":"os-engine-center-new.use-cases-step-preview-tab",label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.use-cases-step-preview-tab-label",defaultMessage:"Preview",description:"tab label: Preview"})})]})),jsxRuntime.exports.jsx(Box,Object.assign({display:"flex",justifyContent:"flex-end"},{children:jsxRuntime.exports.jsx(Tooltip,Object.assign({title:r?jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new-use-cases-exit-fullscreen",defaultMessage:"Exit Fullscreen",description:"Exit Fullscreen"}):jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new-use-cases-enter-fullscreen",defaultMessage:"Enter Fullscreen",description:"Enter Fullscreen"})},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:l,className:t.fullScreenButton,"aria-labelledby":"engine-center-new.use-cases-step-toggle-fullscreen","data-test":"engine-center-new.use-cases-step-fullscreen-toggle",size:"large"},{children:r?jsxRuntime.exports.jsx(FullscreenExit,{}):jsxRuntime.exports.jsx(Fullscreen,{})}))}))}))]})),jsxRuntime.exports.jsxs(Box,Object.assign({flexGrow:1},{children:[jsxRuntime.exports.jsx(TabPanel,Object.assign({value:n,index:0},{children:jsxRuntime.exports.jsx("div",Object.assign({className:t.markdown},{children:jsxRuntime.exports.jsx(InputTypeMarkdown,{})}))})),jsxRuntime.exports.jsx(TabPanel,Object.assign({value:n,index:1},{children:jsxRuntime.exports.jsx("div",Object.assign({className:t.previewMarkdown},{children:jsxRuntime.exports.jsx("div",Object.assign({className:!o.markdown||o.markdown.length<=0?"":t.previewMarkdownContent},{children:jsxRuntime.exports.jsx(PreviewMarkdown,{})}))}))}))]}))]}))}))},SchemaList=({schemaType:n})=>{const t=useSelector(n===SchemaIO.Input?selectInputSchemas:selectOutputSchemas),i=(useSelector(selectDataRegistries),useDispatch()),r=(e=!1,t="")=>{e={name:"ENGINE_CENTER_SCHEMAS_FORM_PANEL",config:{name:`${e?"Edit":"Add"} ${capitalize_1(n)} Schemas`,isEdit:e,editId:t,schemaType:n}};i(mountPanel({panelId:"ENGINE_CENTER_SCHEMAS_FORM_PANEL",microFrontend:e,panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:0,zIndex:1010}}))},e=()=>{var e=map_1(t,e=>({dataRegistry:e.dataRegistryName,schemaVersion:`Version ${e.majorVersion}.`+e.minorVersion,schemaId:e.id}));return orderBy_1(e,[e=>lowerCase_1(e.dataRegistry)],"asc")},[s,o]=react.exports.useState(e());react.exports.useEffect(()=>{o(e())},[t]);return jsxRuntime.exports.jsx(ListField,{idPrefix:"ecn.schema-list."+n,heading:capitalize_1(n)+" Schemas",description:`Add or remove existing ${n} schemas from your engine, if necessary.`,actionButtonLabel:capitalize_1(n)+" Schemas",items:s,columnNames:["Data Registry","Schema Version","Schema ID","",""],canEdit:!0,canDelete:!0,onActionClick:()=>r(),onRequestSort:(t,e)=>{o(orderBy_1(s,[e=>lowerCase_1(e[camelCase_1(t)])],e))},onEditClick:e=>{e=s[e],e=findIndex_1(t,{id:e.schemaId}),e=t[e].dataRegistryId;r(!0,e)},onDeleteClick:e=>{e=s[e],e=findIndex_1(t,{id:e.schemaId});0<=e&&i(actions.engineFormState.removeSchema({schemaType:n,index:e}))}})},errorMessageProps={sx:{position:"absolute",right:0,bottom:-20}},useStyles$6=makeStyles()(e=>({curlyBracesIconContainer:{"& path":{stroke:e.palette.text.primary,strokeWidth:2}}})),IntegrationStep=({onValidate:r})=>{var e=useStyles$6()["classes"],t=useForm();const{getValues:s,setValue:o,setError:a,clearErrors:l}=t,c=useDispatch();var n=react.exports.useRef(null),i=react.exports.useRef(null);const u=e=>{if(!e)return!0;try{JSON.parse(e)}catch(e){return!1}return!0};var p,d=e=>{var t,{name:e,value:n}=e.target,i=(o(e,n),l(e),t=s("newJobTemplate"),i=s("reprocessingJobTemplate"),t=u(t)&&u(i),r(t),"newJobTemplate"===e?"upload":"reprocess");c(actions.engineFormState.updateEngineFormField({field:"standaloneJobTemplates."+i,value:n}))},[m,g]=useTabCapturing({inputRef:n,onChange:d}),[f,h]=useTabCapturing({inputRef:i,onChange:d}),{upload:x,reprocess:y}=useSelector(selectStandaloneJobTemplates);let b;(p=b=b||{}).New="newJobTemplate",p.Reprocessing="reprocessingJobTemplate";const j=t=>{var e=s(t);if(e)try{var n=JSON.stringify(JSON.parse(e),null,8),i=(o(t,n),l(t),"newJobTemplate"===t?"upload":"reprocess");c(actions.engineFormState.updateEngineFormField({field:"standaloneJobTemplates."+i,value:n}))}catch(e){a(t,{type:"custom",message:"Invalid JSON syntax."})}};return jsxRuntime.exports.jsx(FormProvider,Object.assign({},t,{children:jsxRuntime.exports.jsxs(Grid,Object.assign({container:!0,spacing:6,padding:6,"data-test":"engine-new-integration-step"},{children:[jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:12},{children:jsxRuntime.exports.jsx(SchemaList,{schemaType:SchemaIO.Input})})),jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:12,"data-test":"engine-new-input-schemas"},{children:jsxRuntime.exports.jsx(Divider$1,{sx:{width:"60rem",margin:"5, 5, 1, 5"}})})),jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:12,"data-test":"engine-new-output-schemas"},{children:jsxRuntime.exports.jsx(SchemaList,{schemaType:SchemaIO.Output})})),jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:12},{children:jsxRuntime.exports.jsx(Divider$1,{sx:{width:"60rem",margin:"5, 5, 1, 5"}})})),jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:12},{children:[jsxRuntime.exports.jsxs(Typography,Object.assign({variant:"h6",gutterBottom:!0,"data-test":"engine-new-integration-title"},{children:[jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.integration-title",defaultMessage:"Engine Processing Flow",description:"Integration step title"}),jsxRuntime.exports.jsx(HelpDocs,{helpLink:"https://docs.veritone.com/#/aiware/aiWARE-in-depth/single-engine-jobs?id=creating-your-own-single-engine-job-template",sx:{fontSize:15,marginLeft:2}})]})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption","data-test":"engine-new-integration-description"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.integration-description",defaultMessage:"Provide the job mutations to run your engine for both new Temporal Data Object (TDO) and reprocessing jobs.",description:"Integration step description"})}))]})),jsxRuntime.exports.jsxs(Grid,Object.assign({container:!0,item:!0,spacing:5},{children:[jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:12,sm:6},{children:[jsxRuntime.exports.jsx(InputText,{ref:n,placeholder:"New TDO Job Mutation",type:"textarea",name:"newJobTemplate",value:x,onChange:d,inputProps:{onKeyDown:m},onClick:g,"data-test":"engine-new-new-tdo-job-mutation",multiline:!0,spellCheck:!1,rows:20,style:{width:"100%"},FormHelperTextProps:errorMessageProps,InputProps:{endAdornment:jsxRuntime.exports.jsx(Tooltip,Object.assign({title:"Format JSON"},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({className:e.curlyBracesIconContainer,onClick:()=>j(b.New),style:{alignSelf:"end"},"data-test":"engine-new-new-tdo-job-mutation-format-json"},{children:jsxRuntime.exports.jsx(CurlyBraces,{})}))}))}}),jsxRuntime.exports.jsxs(Typography,Object.assign({variant:"caption"},{children:[jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.new-tdo-job-mutation-language",defaultMessage:"Template Language: ",description:"New TDO Job Mutation language"}),jsxRuntime.exports.jsx("a",Object.assign({href:"https://handlebarsjs.com/",target:"_blank",rel:"noreferrer",style:{textDecoration:"none"}},{children:"Handlebars"}))]}))]})),jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:12,sm:6},{children:[jsxRuntime.exports.jsx(InputText,{ref:i,placeholder:"Reprocessing Job Mutation",type:"textarea",name:"reprocessingJobTemplate",value:y,onChange:d,inputProps:{onKeyDown:f},onClick:h,"data-test":"engine-new-reprocessing-tdo-job-mutation",multiline:!0,spellCheck:!1,rows:20,style:{width:"100%"},FormHelperTextProps:errorMessageProps,InputProps:{endAdornment:jsxRuntime.exports.jsx(Tooltip,Object.assign({title:"Format JSON"},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({className:e.curlyBracesIconContainer,onClick:()=>j(b.Reprocessing),style:{alignSelf:"end"},"data-test":"engine-new-reprocessing-tdo-job-mutation-format-json"},{children:jsxRuntime.exports.jsx(CurlyBraces,{})}))}))}}),jsxRuntime.exports.jsxs(Typography,Object.assign({variant:"caption"},{children:[jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.new-tdo-job-mutation-language",defaultMessage:"Template Language: ",description:"New TDO Job Mutation language"}),jsxRuntime.exports.jsx("a",Object.assign({href:"https://handlebarsjs.com/",target:"_blank",rel:"noreferrer",style:{textDecoration:"none"}},{children:"Handlebars"}))]}))]}))]}))]}))}))},useStyles$5=makeStyles()(e=>({container:{width:"100%",padding:"25px 30px"},subheading:{minWidth:"48.75rem",padding:"30px 0"},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$4=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:"75%",maxHeight:"75%"}})),EngineLogo=({path:e})=>{var t=useStyles$4()["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$1w,alt:"engine logo"})}))},Row=({label:e,value:t,style:n,testName:i,icon:r,asterisk:s,handleOpenCollapse:o})=>jsxRuntime.exports.jsxs(Box,Object.assign({display:"flex",justifyContent:"space-between",alignItems:"center",textTransform:"capitalize","data-test":i+"-container"},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h6","data-test":"label-"+i},{children:e})),jsxRuntime.exports.jsxs(Box,Object.assign({className:n,display:"flex",justifyContent:"space-between",alignItems:"center",onClick:o},{children:[jsxRuntime.exports.jsxs(Typography,Object.assign({variant:"h6",sx:{fontWeight:400}},{children:[t,s]})),jsxRuntime.exports.jsx(IconButton,Object.assign({"aria-label":"expand row",size:"small",onClick:o,"data-test":i+"-expand-action-trigger"},{children:r}))]}))]})),CollapseComponent=({open:e,content:t,testName:n,dataType:i})=>{var r=useStyles$5()["classes"];return jsxRuntime.exports.jsx(Box,Object.assign({display:"flex",justifyContent:"end","data-test":n},{children:jsxRuntime.exports.jsx(Collapse,Object.assign({className:r.collapse,in:e,timeout:"auto",unmountOnExit:!0},{children:jsxRuntime.exports.jsx(Box,Object.assign({className:r.collapseContent},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h6",sx:{fontWeight:400,lineHeight:1.5}},{children:jsxRuntime.exports.jsx("pre",Object.assign({className:"markdown"===i?r.pre:""},{children:t}))}))}))}))}))},ENGINE_CENTER_NEW_TEXT={markdownValue:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.confirmation-step-use-cases-value",defaultMessage:"Markdown",description:"Markdown"}),tdoValue:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.confirmation-step-new-tdo-value",defaultMessage:"New TDO",description:"New TDO"}),reprocessingValue:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.confirmation-step-job-mutation-value",defaultMessage:"Reprocessing",description:"Reprocessing"})},ConfirmationStep=()=>{var e=useStyles$5()["classes"];const[t,n]=react.exports.useState(!1),[i,r]=react.exports.useState(!1),[s,o]=react.exports.useState(!1),[a,l]=react.exports.useState(!1),[c,u]=react.exports.useState(!1),p=useSelector(selectEngine);var d=useSelector(selectIsEditForm)["isEditForm"],m=e=>{e=lodash.exports.sortBy(e,[e=>lodash.exports.toLower(e.dataRegistryName)]),e=lodash.exports.map(e,e=>`• ${e.dataRegistryName}: Version ${e.majorVersion}.`+e.minorVersion);return lodash.exports.join(e,"\n")};return jsxRuntime.exports.jsxs(Box,Object.assign({className:e.container,"data-test":"engine-new-confirmation-step"},{children:[jsxRuntime.exports.jsxs(Grid,{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h2",gutterBottom:!0,color:"#000000"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.confirmation-step-title",defaultMessage:"Engine Summary",description:"Engine Summary"})})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption",fontSize:"14px","data-test":"engine-new-confirmation-step-header-description"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.confirmation-step-header-description-{idSuffix}",defaultMessage:"Review the summary of your engines attributes before {verb} its profile",description:"Review the summary of your engines attributes before {verb} its profile.",values:{idSuffix:d?"edit":"new",verb:d?"updating":"creating"}})}))]}),jsxRuntime.exports.jsxs(Grid,Object.assign({className:e.subheading},{children:[jsxRuntime.exports.jsxs(Box,Object.assign({display:"flex",alignItems:"center",textTransform:"capitalize","data-test":"engine-new-confirmation-step-engine-name"},{children:[jsxRuntime.exports.jsx(EngineLogo,{path:p.iconPath}),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h2",ml:3},{children:lodash.exports.isEmpty(p.name)?"-":p.name}))]})),jsxRuntime.exports.jsx(Box,Object.assign({ml:11,"data-test":"engine-new-confirmation-step-engine-description"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption",color:"#2A323C"},{children:lodash.exports.isEmpty(p.description)?"-":p.description}))}))]})),jsxRuntime.exports.jsxs(Box,Object.assign({sx:{width:"100%",pl:11},"data-test":"engine-new-confirmation-step-row-container"},{children:[jsxRuntime.exports.jsx(Row,{label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.confirmation-step-deployment-model",defaultMessage:"Deployment Model:",description:"Deployment model"}),value:lodash.exports.isEmpty(p.deploymentModel)?"-":lodash.exports.startCase(p.deploymentModel),style:e.text,asterisk:jsxRuntime.exports.jsx("span",Object.assign({className:e.asterisk},{children:"*"})),testName:"engine-new-confirmation-step-row-deployment-model"}),jsxRuntime.exports.jsx(Row,{label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.confirmation-step-engine-class",defaultMessage:"Engine Class:",description:"Engine Class"}),value:lodash.exports.isEmpty(p.class)?"-":lodash.exports.startCase(p.class),style:e.text,asterisk:jsxRuntime.exports.jsx("span",Object.assign({className:e.asterisk},{children:"*"})),testName:"engine-new-confirmation-step-row-engine-class"}),jsxRuntime.exports.jsx(Row,{label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.confirmation-step-engine-capability",defaultMessage:"Engine Capability:",description:"Engine Capability"}),value:lodash.exports.isEmpty(p.capability.name)?"-":lodash.exports.startCase(p.capability.name),style:e.text,asterisk:jsxRuntime.exports.jsx("span",Object.assign({className:e.asterisk},{children:"*"})),testName:"engine-new-confirmation-step-row-engine-capability"}),jsxRuntime.exports.jsx(Row,{label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.confirmation-step-engine-mode",defaultMessage:"Engine Mode:",description:"Engine Mode"}),value:lodash.exports.isEmpty(p.mode)?"-":lodash.exports.startCase(p.mode),style:e.text,asterisk:jsxRuntime.exports.jsx("span",Object.assign({className:e.asterisk},{children:"*"})),testName:"engine-new-confirmation-step-row-engine-mode"}),jsxRuntime.exports.jsx(Row,{label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.confirmation-step-use-cases",defaultMessage:"Use Cases:",description:"Use Cases"}),value:lodash.exports.isEmpty(p.markdown)?"-":ENGINE_CENTER_NEW_TEXT.markdownValue(),handleOpenCollapse:()=>n(!t),icon:t?jsxRuntime.exports.jsx(default_1$4,{}):jsxRuntime.exports.jsx(default_1$5,{}),style:e.textCollapsible,testName:"engine-new-confirmation-step-row-use-cases"}),jsxRuntime.exports.jsx(CollapseComponent,{open:t,content:lodash.exports.isEmpty(p.markdown)?"-":p.markdown,testName:"engine-new-use-cases-collapse-container",dataType:"markdown"}),jsxRuntime.exports.jsx(Row,{label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.confirmation-step-custom-fields",defaultMessage:"Custom Fields:",description:"Custom Fields"}),value:lodash.exports.isEmpty(p.customFields)?"-":lodash.exports.join(lodash.exports.map(p.customFields,e=>e.name),", "),style:e.text,testName:"engine-new-confirmation-step-row-custom-fields"}),jsxRuntime.exports.jsx(Row,{label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.confirmation-step-input-schemas-label",defaultMessage:"Input Schemas:",description:"Input Schemas"}),style:e.textCollapsible,value:lodash.exports.isEmpty(p.inputSchemas)?"-":jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.confirmation-step-input-schemas-value",defaultMessage:"Selected schemas...",description:"Input Schemas dropdown label"}),handleOpenCollapse:()=>l(!a),icon:a?jsxRuntime.exports.jsx(default_1$4,{}):jsxRuntime.exports.jsx(default_1$5,{}),testName:"engine-new-confirmation-step-row-input-schemas"}),jsxRuntime.exports.jsx(CollapseComponent,{open:a,content:lodash.exports.isEmpty(p.inputSchemas)?"-":m(p.inputSchemas),testName:"engine-new-input-schemas-collapse-container"}),jsxRuntime.exports.jsx(Row,{label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.confirmation-step-output-schemas-label",defaultMessage:"Output Schemas:",description:"Output Schemas"}),style:e.textCollapsible,value:lodash.exports.isEmpty(p.outputSchemas)?"-":jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.confirmation-step-output-schemas-value",defaultMessage:"Selected schemas...",description:"Output Schemas dropdown label"}),handleOpenCollapse:()=>u(!c),icon:c?jsxRuntime.exports.jsx(default_1$4,{}):jsxRuntime.exports.jsx(default_1$5,{}),testName:"engine-new-confirmation-step-row-output-schemas"}),jsxRuntime.exports.jsx(CollapseComponent,{open:c,content:lodash.exports.isEmpty(p.outputSchemas)?"-":m(p.outputSchemas),testName:"engine-new-output-schemas-collapse-container"}),jsxRuntime.exports.jsx(Row,{label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.confirmation-step-new-tdo",defaultMessage:"New TDO Mutation:",description:"New TDO mutation"}),style:e.textCollapsible,value:lodash.exports.isEmpty(p.standaloneJobTemplates.upload)?"-":ENGINE_CENTER_NEW_TEXT.tdoValue(),handleOpenCollapse:()=>r(!i),icon:i?jsxRuntime.exports.jsx(default_1$4,{}):jsxRuntime.exports.jsx(default_1$5,{}),testName:"engine-new-confirmation-step-row-new-tdo"}),jsxRuntime.exports.jsx(CollapseComponent,{open:i,content:p.standaloneJobTemplates.upload?(()=>{try{return JSON.stringify(JSON.parse(p.standaloneJobTemplates.upload),null,2)}catch(e){return p.standaloneJobTemplates.upload}})():"-",testName:"engine-new-new-tdo-collapse-container"}),jsxRuntime.exports.jsx(Row,{label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.confirmation-step-job-mutation",defaultMessage:"Reprocessing Job Mutation:",description:"Reprocessing Job mutation"}),style:e.textCollapsible,value:lodash.exports.isEmpty(p.standaloneJobTemplates.reprocess)?"-":ENGINE_CENTER_NEW_TEXT.reprocessingValue(),handleOpenCollapse:()=>o(!s),icon:s?jsxRuntime.exports.jsx(default_1$4,{}):jsxRuntime.exports.jsx(default_1$5,{}),testName:"engine-new-confirmation-step-row-job-mutation"}),jsxRuntime.exports.jsx(CollapseComponent,{open:s,content:p.standaloneJobTemplates.reprocess?(()=>{try{return JSON.stringify(JSON.parse(p.standaloneJobTemplates.reprocess),null,2)}catch(e){return p.standaloneJobTemplates.reprocess}})():"-",testName:"engine-new-job-mutation-collapse-container"}),jsxRuntime.exports.jsx(Box,Object.assign({mt:5},{children:jsxRuntime.exports.jsxs(Typography,Object.assign({variant:"caption",color:"#2A323C"},{children:[jsxRuntime.exports.jsx("span",Object.assign({className:e.asterisk},{children:"*"})),jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.confirmation-step-bottom-caption",defaultMessage:"Cannot be changed once the engine profile is created.",description:"Cannot be changed once the engine profile is created."})]}))}))]}))]}))},EngineOnboardingFlow=()=>{const t=useDispatch(),n=useSelector(selectEngine),i=useSelector(selectIsEditForm)["isEditForm"],[e,r]=react.exports.useState(!1);var s=e=>r(e);const o=(e=!1)=>{i?t(actions.engineFormState.updateEngineStart({engine:n,openBuildPanel:e})):t(actions.engineFormState.createEngineStart({engine:n,openBuildPanel:e}))};var s=[jsxRuntime.exports.jsx(EngineDescription,{onValidate:s}),jsxRuntime.exports.jsx(FunctionalityStep,{onValidate:s}),jsxRuntime.exports.jsx(UseCasesStep,{onValidate:s}),jsxRuntime.exports.jsx(IntegrationStep,{onValidate:s}),jsxRuntime.exports.jsx(ConfirmationStep,{})],a=[jsxRuntime.exports.jsx(Button,Object.assign({"data-test":"engine-new-docker-image-button",variant:"text",color:"secondary",onClick:()=>o(!0),startIcon:jsxRuntime.exports.jsx(Add,{})},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.docker-image-button",defaultMessage:"Docker Image",description:"Docker Image button text"})}),"docker-image-button"),jsxRuntime.exports.jsx(Button,Object.assign({"data-test":"engine-new-create-engine-button",variant:"contained",color:"primary",onClick:()=>o()},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new.{idPrefix}-engine-button",defaultMessage:"{verb}",description:"{verb} engine button text",values:{idPrefix:i?"update":"create",verb:i?"Update":"Create"}})}),"create-engine-button")];return jsxRuntime.exports.jsx(ProgressStepper,{panelName:"ENGINE_CENTER_NEW",sessionKey:"engineOnboardingSession",entityId:n.id,onResumeSession:e=>{t(actions.engineFormState.resumeSession(e))},steps:["General","Functionality","Use Cases","Integration","Confirmation"],stepContent:s,customFinalStepButtons:a,nextButtonDisabled:!e,idPrefix:"engine-center-new-eob"})},appBarHeight$2=55,headerHeight=64,borderBottom$2=5,useStyles$3=makeStyles()(e=>({ecnPanel:{height:`calc(100vh - ${appBarHeight$2}px - ${headerHeight}px - ${borderBottom$2}px)`}})),MainLayout=({engineId:e})=>{var t=useStyles$3()["classes"];const n=useDispatch();var i=useSelector(selectIsLoadingExistingEngineData)["isLoadingExistingEngineData"];return react.exports.useEffect(()=>{e?n(actions.engineFormState.editEngine(e)):n(actions.engineFormState.createNewEngine())},[]),jsxRuntime.exports.jsx("div",Object.assign({role:"presentation","data-test":"engine-center-new-widget",className:t.ecnPanel},{children:i?jsxRuntime.exports.jsx(Box,Object.assign({sx:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"}},{children:jsxRuntime.exports.jsx(CircularProgress,{})})):jsxRuntime.exports.jsx(EngineOnboardingFlow,{})}))},EngineCenterNew=e=>jsxRuntime.exports.jsx(CacheProvider,Object.assign({value:muiCache},{children:jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getEngineCenterNewModule()]},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(MainLayout,Object.assign({},e))})}))})})),appBarHeight$1=55,borderBottom$1=5,mainHeight=`calc(100vh - ${appBarHeight$1+borderBottom$1}px)`,useStyles$2=makeStyles()(e=>({root:{display:"flex",flexFlow:"column",height:mainHeight},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"}})),SchemaOrText=()=>{var e=useStyles$2()["classes"];return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs(Box,Object.assign({display:"flex"},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h6",gutterBottom:!0},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"engine-center-new.text-schema.default",defaultMessage:"Default Value",description:"You can set a default value for either text or schema selection"})})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h6",gutterBottom:!0,className:e.optional,id:"engine-center-new.text-schema.default.optional"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"engine-center-new.text-schema.default.optional",defaultMessage:"(Optional)",description:"Set the optional default value for the number field"})}))]})),jsxRuntime.exports.jsx(InputText,{inputProps:{className:e.textInput},"data-test":"engine-new-custom-text-schema-default",variant:"outlined",type:"text",name:"defaultValue",fullWidth:!0,rules:{maxLength:2048}})]})},Number$1=()=>{var e=useStyles$2()["classes"];const{getValues:n,trigger:t}=useFormContext();return jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,container:!0,xs:12,spacing:2,"data-test":"engine-new-custom-number-container"},{children:[jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:3},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h6",gutterBottom:!0,"data-test":"engine-new-custom-number-label-min"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"engine-center-new.number-field.min",defaultMessage:"Min",description:"Set the minimum value for the number field"})})),jsxRuntime.exports.jsx(InputText,{inputProps:{className:e.textInput},"data-test":"engine-new-custom-number-min",variant:"outlined",type:"number",name:"min",fullWidth:!0,onChange:()=>{isEmpty_1(n("max"))||t("max"),isEmpty_1(n("defaultValue"))||t("defaultValue")},rules:{required:!0,min:-99999,max:99999,validate:{lessThanMax:e=>((e,t)=>e<=toNumber_1(n("max"))||(!!isEmpty_1(n("max"))||t))(e,"Should be less than or equal to Max")}}})]})),jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:3},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h6",gutterBottom:!0,"data-test":"engine-new-custom-number-label-max"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"engine-center-new.number-field.max",defaultMessage:"Max",description:"Set the maximum value for the number field"})})),jsxRuntime.exports.jsx(InputText,{inputProps:{className:e.textInput},"data-test":"engine-new-custom-number-max",variant:"outlined",type:"number",name:"max",fullWidth:!0,onChange:()=>{isEmpty_1(n("min"))||t("min"),isEmpty_1(n("defaultValue"))||t("defaultValue")},rules:{required:!0,min:-99999,max:99999,validate:{greaterThanMin:e=>((e,t)=>e>=toNumber_1(n("min"))||(!!isEmpty_1(n("min"))||t))(e,"Should be greater than or equal to Min")}}})]})),jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:3},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h6",gutterBottom:!0,"data-test":"engine-new-custom-number-label-step"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"engine-center-new.number-field.step",defaultMessage:"Step",description:"Set the incrementing step value for the number field"})})),jsxRuntime.exports.jsx(InputText,{inputProps:{className:e.textInput},"data-test":"engine-new-custom-number-step",variant:"outlined",type:"number",name:"step",fullWidth:!0,rules:{required:!0,min:-99999,max:99999}})]})),jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:3},{children:[jsxRuntime.exports.jsxs(Box,Object.assign({display:"flex"},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h6",gutterBottom:!0,"data-test":"engine-new-custom-number-label-default"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"engine-center-new.number-field.default",defaultMessage:"Default",description:"Set the default value for the number field"})})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h6",gutterBottom:!0,className:e.optional,"data-test":"engine-new-custom-number-label-optional"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"engine-center-new.number-field.optional",defaultMessage:"(Optional)",description:"Set the optional default value for the number field"})}))]})),jsxRuntime.exports.jsx(InputText,{inputProps:{className:e.textInput},"data-test":"engine-new-custom-number-default",variant:"outlined",type:"number",name:"defaultValue",fullWidth:!0,rules:{min:-99999,max:99999,validate:{betweenMinAndMax:e=>((e,t)=>!!isEmpty_1(e)||(toNumber_1(n("min"))<=e&&e<=toNumber_1(n("max"))||(!(!isEmpty_1(n("min"))||!isEmpty_1(n("max")))||(!!(isEmpty_1(n("min"))&&e<=toNumber_1(n("max")))||(!!(isEmpty_1(n("max"))&&e>=toNumber_1(n("min")))||t)))))(e,"Should be between Min and Max")}}})]}))]}))},useStyles$1=makeStyles()(e=>({input:{marginBottom:"10px"},radio:{"&:checked":{color:"red"}}})),PicklistInput=({handleRemoveItem:e,isMulti:t,handleAddItem:n,index:i})=>{const r=useFormContext()["getValues"];var s=useStyles$1()["classes"];const o=(t,n,e)=>{var i=r("options");return!(1<filter_1(i,e=>e[t]===n).length)||e};return jsxRuntime.exports.jsxs(Grid,Object.assign({className:s.input,container:!0,spacing:4},{children:[jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:2},{children:jsxRuntime.exports.jsx(Box,Object.assign({display:"flex",justifyContent:"center",alignItems:"center"},{children:t?jsxRuntime.exports.jsx(InputCheckbox,{label:"",name:`options.${i}.checked`,"data-test":"os-engine-center-new-picklist.checkbox-"+i}):jsxRuntime.exports.jsx(FormControlLabel,{label:"",control:jsxRuntime.exports.jsx(Radio,{classes:{root:s.radio}}),"data-test":"os-engine-center-new-picklist.radio-"+i,value:""+i})}))})),jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:4},{children:jsxRuntime.exports.jsx(InputText,{"data-test":"os-engine-center-new-picklist.textfield-key-"+i,variant:"outlined",type:"text",name:`options.${i}.key`,fullWidth:!0,rules:{required:!0,validate:{unique:e=>o("key",e,"This key already exists")}}})})),jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:4},{children:jsxRuntime.exports.jsx(InputText,{"data-test":"os-engine-center-new-picklist.textfield-value-"+i,variant:"outlined",type:"text",name:`options.${i}.value`,fullWidth:!0,rules:{required:!0,validate:{unique:e=>o("value",e,"This value already exists")}}})})),jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:2},{children:size_1(r("options"))-1===i?jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:n,"data-test":"os-engine-center-new-picklist.add-button-"+i,size:"large"},{children:jsxRuntime.exports.jsx(default_1$2,{})})):jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:()=>e(i),"data-test":"os-engine-center-new-picklist.remove-button-"+i,size:"large"},{children:jsxRuntime.exports.jsx(default_1$3,{})}))}))]}))},Picklist=({isMulti:n})=>{const{control:e,getValues:t,setValue:i}=useFormContext(),{fields:r,append:s,remove:o}=useFieldArray({control:e,name:"options"}),a={key:"",value:""},l={key:"",value:"",checked:!1},c=()=>{s(n?l:a)},u=e=>{0<=e&&(e===toNumber_1(t("defaultValue"))&&i("defaultValue",""),o(e))};var p=()=>(0===r.length&&s(n?l:a),r.map((e,t)=>jsxRuntime.exports.jsx(Box,{children:jsxRuntime.exports.jsx(PicklistInput,{handleAddItem:c,handleRemoveItem:u,isMulti:n,index:t})},e.id)));return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs(Grid,Object.assign({container:!0,spacing:4},{children:[jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:2},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h6","data-test":"os-engine-center-new-picklist.default-header",gutterBottom:!0},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new-picklist.default-label",defaultMessage:"Default",description:"label for default column"})}))})),jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:4},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h6","data-test":"os-engine-center-new-picklist.key-header",gutterBottom:!0},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new-picklist.key-label",defaultMessage:"Key",description:"label for key column"})}))})),jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:4},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h6","data-test":"os-engine-center-new-picklist.value-header",gutterBottom:!0},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new-picklist.value-label",defaultMessage:"Value",description:"label for value column"})}))})),jsxRuntime.exports.jsx(Grid,{item:!0,xs:2})]})),!n&&jsxRuntime.exports.jsx(InputRadioGroup,Object.assign({name:"defaultValue"},{children:p()})),n&&p()]})},CustomFieldsForm=({hidePanel:r,isEdit:s=!1,editIndex:o=-1})=>{var e=useStyles$2()["classes"];const a=useDispatch(),i=useSelector(selectCustomFields);var t=()=>{if(s&&0<=o){var e;if(i[o].type===EngineFieldType.Picklist)return e=get_1(i,`[${o}].options`),t=get_1(i,`[${o}].defaultValue`),e=findIndex_1(e,{value:t}),Object.assign(Object.assign({},i[o]),{defaultValue:-1===e?"":toString_1(e)});if(i[o].type!==EngineFieldType.MultiPicklist)return i[o];{var t=get_1(i,`[${o}].options`);const n=get_1(i,`[${o}].defaultValues`);return Object.assign(Object.assign({},i[o]),{options:map_1(t,e=>({key:e.key,value:e.value,checked:includes_1(n,e.value)}))})}}return{name:"",type:EngineFieldType.Text,required:!1,defaultValue:""}},n=t();const l=useForm({mode:"onChange",defaultValues:n}),[c,u]=react.exports.useState(t().type);t=e=>{let t;var n,i;t=e.type===EngineFieldType.Picklist?Object.assign(Object.assign({},e),{defaultValue:get_1(e,`options[${e.defaultValue}].value`,"")}):e.type===EngineFieldType.MultiPicklist?(n=map_1(filter_1(e.options,{checked:!0}),e=>e.value),i=map_1(e.options,e=>({key:e.key,value:e.value})),Object.assign(Object.assign({},e),{options:i,defaultValues:n})):e.type===EngineFieldType.Number?Object.assign(Object.assign({},e),{min:toNumber_1(e.min),max:toNumber_1(e.max),step:toNumber_1(e.step)}):e,s?a(actions.engineFormState.updateCustomField({customField:t,index:o})):a(actions.engineFormState.addCustomField(t)),r()};return jsxRuntime.exports.jsx(FormProvider,Object.assign({},l,{children:jsxRuntime.exports.jsxs("form",Object.assign({className:e.root,onSubmit:l.handleSubmit(t)},{children:[jsxRuntime.exports.jsxs(Grid,Object.assign({className:e.container,container:!0,spacing:5,"data-test":"engine-new-custom-fields-form-container"},{children:[jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:12},{children:jsxRuntime.exports.jsxs(Box,Object.assign({className:e.header},{children:[jsxRuntime.exports.jsx(Typography,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:"{label} Custom Fields",description:"Form label for supported file types",values:{label:s?"Edit":"Add"}})})),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:r,"aria-labelledby":"engine-center-new-close-panel","data-test":"engine-description-input-icon"},{children:jsxRuntime.exports.jsx(Close,{})}))}))]}))})),jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:12},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h6",gutterBottom:!0,"data-test":"engine-new-custom-fields-header-name"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"engine-center-new.custom-fields.field-name",defaultMessage:"Field 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":"engine-new-custom-fields-name-content",rules:{required:!0,maxLength:50}})]})),jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:12},{children:[jsxRuntime.exports.jsx(Box,Object.assign({display:"flex"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h6",gutterBottom:!0,"data-test":"engine-new-custom-fields-header-label"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"engine-center-new.custom-fields.field-label",defaultMessage:"Field Label",description:"You can set a field label"})}))})),jsxRuntime.exports.jsx(InputText,{variant:"outlined",type:"text",name:"label",fullWidth:!0,"data-test":"engine-new-custom-fields-label-content",inputProps:{maxLength:50,className:e.textInput},rules:{required:!0,maxLength:50}})]})),jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:12},{children:[jsxRuntime.exports.jsxs(Box,Object.assign({display:"flex"},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h6",gutterBottom:!0,"data-test":"engine-new-custom-fields-header-information"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"engine-center-new.custom-fields.field-information",defaultMessage:"Field Information",description:"You can set a field information"})})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h6",gutterBottom:!0,className:e.optional,"data-test":"engine-new-custom-fields-header-information-optional"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"engine-center-new.information.optional",defaultMessage:"(Optional)",description:"Set the optional default value for the number field"})}))]})),jsxRuntime.exports.jsx(InputText,{variant:"outlined",name:"info",fullWidth:!0,multiline:!0,rows:5,"data-test":"engine-new-custom-fields-information-content",inputProps:{maxLength:250},InputProps:{className:e.textInput},rules:{maxLength:250}})]})),jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:12},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h6",gutterBottom:!0,"data-test":"engine-new-custom-fields-header-type"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"engine-center-new.custom-fields.field-type",defaultMessage:"Field 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:c,onChange:e=>{l.resetField("defaultValue"),l.unregister("defaultValues"),l.unregister("min"),l.unregister("max"),l.unregister("step"),l.resetField("options"),l.unregister("options"),l.setValue("type",e.target.value),u(e.target.value)},style:{minWidth:"100%"},"data-test":"engine-new-custom-fields-type-content",rules:{required:!0}},{children:map_1(keys_1(EngineFieldType),(e,t)=>jsxRuntime.exports.jsx(MenuItem,Object.assign({value:EngineFieldType[e]},{children:EngineFieldType[e]}),t))}))]})),jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:12,style:{padding:"5px 0 0 25px"}},{children:jsxRuntime.exports.jsx(Box,Object.assign({display:"flex",justifyContent:"start",alignItems:"center"},{children:jsxRuntime.exports.jsx(InputCheckbox,{name:"required",defaultChecked:n.required,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"engine-center-new.custom-fields.required-checkbox",defaultMessage:"Required Field",description:"Required field checkbox"})})}))})),jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:12},{children:(()=>{switch(c){case EngineFieldType.Text:case EngineFieldType.SchemaSelection:return jsxRuntime.exports.jsx(SchemaOrText,{});case EngineFieldType.Number:return jsxRuntime.exports.jsx(Number$1,{});case EngineFieldType.Picklist:return jsxRuntime.exports.jsx(Picklist,{isMulti:!1});case EngineFieldType.MultiPicklist:return jsxRuntime.exports.jsx(Picklist,{isMulti:!0});default:return null}})()}))]})),jsxRuntime.exports.jsx(Box,Object.assign({className:e.addButtonWrapper},{children:jsxRuntime.exports.jsx(Button,Object.assign({type:"submit",disabled:!get_1(l,"formState.isValid"),onSubmit:t,variant:"contained",color:"primary","data-test":"engine-new-custom-fields-button-submit"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new-custom-fields.submit-button-label",defaultMessage:"{label}",description:"{label} Custom Fields",values:{label:s?"Update":"Add"}})}))}))]}))}))},EngineCenterCustomFieldsForm=e=>jsxRuntime.exports.jsx(CacheProvider,Object.assign({value:muiCache},{children:jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(CustomFieldsForm,{hidePanel:e.hidePanel,isEdit:e.isEdit,editIndex:e.editIndex})})})})),useStyles=makeStyles()(e=>({applyButtonWrapper:{padding:"0px 20px 20px 20px"},supportedFilesTypeHeader:{display:"flex",alignItems:"center",flexDirection:"row",justifyContent:"space-between",padding:"0px 10px",marginBottom:20},supportedFilesTypeWrapper:{padding:"8px 20px 20px 20px"},fileTypeItem:{border:"1px solid #D5DFE9",borderRadius:5,marginBottom:20,overflow:"hidden"},fileTypeItemHeader:{padding:18,borderBottom:"1px solid #D5DFE9",background:"#FAFAFA",display:"flex",alignItems:"center"},fileTypeItemHeaderRow:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%"},fileTypeHeaderRowItem:{display:"flex",alignItems:"center"},fileTypeItemBody:{display:"flex",alignItems:"center",padding:"26px 0",flexWrap:"wrap"},fileTypeItemExtension:{width:"50%",padding:"4px 0 4px 54px"},fileTypeItemExtensionFullWidth:{width:"100%"},fileItemTypeName:{marginLeft:12}})),icons={video:jsxRuntime.exports.jsx(VideoCamera,{}),image:jsxRuntime.exports.jsx(Image,{}),audio:jsxRuntime.exports.jsx(Sound,{}),text:jsxRuntime.exports.jsx(Description,{}),application:jsxRuntime.exports.jsx(Description,{})},FileItemIcon=({filetype:e})=>{var[e]=e.split("/");return e&&icons[e]?icons[e]:jsxRuntime.exports.jsx(UnknownDocument,{})},InputType=({fileItemType:n,currentTypes:e,handleInputTypes:i,handleSelectAll:t})=>{var r;const s=useStyles()["classes"];return jsxRuntime.exports.jsxs("div",Object.assign({className:s.fileTypeItem,"data-test":"engine-center-new-supported-file-item","data-testtype":"engine-center-new-input-type-container."+n.name},{children:[jsxRuntime.exports.jsx("header",Object.assign({className:s.fileTypeItemHeader},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:s.fileTypeItemHeaderRow},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:s.fileTypeHeaderRowItem},{children:[jsxRuntime.exports.jsx("span",Object.assign({"data-test":"engine-center-new-file-item-icon"},{children:jsxRuntime.exports.jsx(FileItemIcon,{filetype:n.type})})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h2",className:s.fileItemTypeName,"data-test":"engine-center-new-file-type-name"},{children:n.name}))]})),jsxRuntime.exports.jsxs("div",Object.assign({className:s.fileTypeHeaderRowItem,"data-test":"engine-center-new-input-type-name-checkbox.select-all-container."+n.name},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1","data-test":"engine-center-new-file-type-select-all"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new-input-type-flyout.select-all-label",defaultMessage:"Select All",description:"Select all mimetypes of a file type"})})),jsxRuntime.exports.jsx(Checkbox,{"data-test":"engine-center-new-input-type-name-checkbox.select-all."+n.name,checked:n.extensions.every(t=>lodash.exports.some(e,e=>e.mimeType===t)),onChange:e=>t(e.target.checked,n.name)})]}))]}))})),jsxRuntime.exports.jsx("div",Object.assign({className:s.fileTypeItemBody,"data-test":"engine-center-new-extension-list"},{children:null==(r=null==n?void 0:n.extensions)?void 0:r.map(t=>jsxRuntime.exports.jsxs(Typography,Object.assign({variant:"body2","data-test":"engine-center-new-input-type-name",color:"textPrimary",className:classNames(s.fileTypeItemExtension,{[s.fileTypeItemExtensionFullWidth]:n.type===FileItemTypeNames.Text})},{children:[jsxRuntime.exports.jsx(Checkbox,{"data-test":"engine-center-new-input-type-name-checkbox."+t,checked:lodash.exports.some(e,e=>e.mimeType===t),value:t,onChange:(n=>e=>{var{value:e,checked:t}=e.target;i&&i({inputType:n,value:e,checked:t})})({name:n.name,type:n.type,mimeType:t})}),".",t]}),t))}))]}))},InputTypeFlyout$1=({fileTypes:e,hidePanel:t,savedInputTypes:n=[],handleInput:i,handleSelectAll:r})=>{var s=useStyles()["classes"];return jsxRuntime.exports.jsxs("div",Object.assign({className:s.supportedFilesTypeWrapper},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:s.supportedFilesTypeHeader},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h1",color:"secondary","data-test":"engine-center-new-supported-files-title"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new-input-type-flyout.panel-header",defaultMessage:"Supported File Types",description:"Form label for supported file types"})})),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new-input-type-flyout.close-button-tooltip",defaultMessage:"Close",description:"Close panel"})},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:t,"aria-labelledby":"engine-center-new-close-panel","data-test":"engine-center-new-close-panel",size:"large"},{children:jsxRuntime.exports.jsx(Close,{})}))}))]})),e.map(t=>jsxRuntime.exports.jsx(InputType,{currentTypes:lodash.exports.filter(n,e=>e.type===t.type),handleInputTypes:i,fileItemType:t,handleSelectAll:r},t.name))]}))},InputTypeFlyout=()=>{const e=useDispatch(),t=useSelector(selectEngine);const n=()=>{e(unmountPanel("ENGINE_CENTER_INPUT_TYPE_FLYOUT"))},[i,r]=react.exports.useState(t.supportedInputTypes),s=react.exports.useRef(t.supportedInputTypes);react.exports.useEffect(()=>{lodash.exports.isEqual(s,t.supportedInputTypes)||(s.current=t.supportedInputTypes,r(t.supportedInputTypes))},[t.supportedInputTypes]);var o=useStyles()["classes"];return jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsxs(CacheProvider,Object.assign({value:muiCache},{children:[jsxRuntime.exports.jsx(InputTypeFlyout$1,{fileTypes:DEFAULT_ACCEPTABLE_FILE_TYPES,handleInput:({inputType:t,checked:e})=>{r(e?lodash.exports.unionBy(i,[t],"mimeType"):lodash.exports.reject(i,e=>e.mimeType===t.mimeType))},hidePanel:n,savedInputTypes:i,handleSelectAll:(e,t)=>{if(e){const n=DEFAULT_ACCEPTABLE_FILE_TYPES.find(e=>e.name===t);e=n.extensions,e=lodash.exports.map(e,e=>({name:t,mimeType:e,type:n.type}));r(lodash.exports.unionBy(i,e,"mimeType"))}else r(lodash.exports.reject(i,e=>e.name===t))}}),jsxRuntime.exports.jsx(Box,Object.assign({className:o.applyButtonWrapper,display:"flex",justifyContent:"flex-end"},{children:jsxRuntime.exports.jsx(Button,Object.assign({onClick:()=>{e(actions.engineFormState.updateEngineFormField({field:"supportedInputTypes",value:i})),n()},variant:"contained",color:"primary"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new-input-type-flyout.apply-button-label",defaultMessage:"Apply",description:"Save changes"})}))}))]}))})})},LISTBOX_PADDING=8;function renderRow(e){var{data:e,index:t,style:n}=e,e=e[t],t=Object.assign(Object.assign({},n),{top:n.top+LISTBOX_PADDING});return has_1(e,"group")?jsxRuntime.exports.jsx(ListSubheader,Object.assign({sx:{backgroundColor:"#F2F5F9"},component:"div",style:t},{children:e.group}),e.key):jsxRuntime.exports.jsx(Typography,Object.assign({component:"li"},e[0],{noWrap:!0,style:t},{children:e[1]}))}const OuterElementContext=react.exports.createContext({}),OuterElementType=react.exports.forwardRef((e,t)=>{var n=react.exports.useContext(OuterElementContext);return jsxRuntime.exports.jsx("div",Object.assign({ref:t},e,n))});function useResetCache(e){const t=react.exports.useRef(null);return react.exports.useEffect(()=>{null!=t.current&&t.current.resetAfterIndex(0,!0)},[e]),t}const ListboxAdapter=react.exports.forwardRef(function(e,t){const n=e["children"],i=__rest(e,["children"]),r=[],s=(n.forEach(e=>{r.push(e),r.push(...e.children||[])}),useTheme$1());e=useMediaQuery(s.breakpoints.up("sm"),{noSsr:!0});const o=r.length,a=e?36:48,l=e=>has_1(e,"group")?48:a;e=useResetCache(o);return jsxRuntime.exports.jsx("div",Object.assign({ref:t},{children:jsxRuntime.exports.jsx(OuterElementContext.Provider,Object.assign({value:i},{children:jsxRuntime.exports.jsx(VariableSizeList,Object.assign({itemData:r,height:(8<o?8*a:r.map(l).reduce((e,t)=>e+t,0))+2*LISTBOX_PADDING,width:"100%",ref:e,outerElementType:OuterElementType,innerElementType:"ul",itemSize:e=>l(r[e]),overscanCount:5,itemCount:o},{children:renderRow}))}))}))}),SchemaAutocomplete=({ref:e,disabled:t,options:n,value:i,inputValue:r,onChange:s,onInputChange:o})=>{const a=useSelector(selectIsFetchingDataRegistries);var l=styled(Popper)({["& ."+autocompleteClasses.listbox]:{boxSizing:"border-box","& ul":{padding:0,margin:0}}});return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Box,Object.assign({display:"flex"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h6",gutterBottom:!0,"data-test":"engine-center-new-schemas-select-schema"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"engine-center-new.schemas.select-schema",defaultMessage:"Schema",description:"Select schema dropdown label"})}))})),jsxRuntime.exports.jsx(Autocomplete,{"data-test":"engine-center-new-schemas-select-schema-autocomplete",ref:e,disabled:t,options:n,disableListWrap:!0,value:i,inputValue:r,PopperComponent:l,ListboxComponent:ListboxAdapter,loading:a,loadingText:jsxRuntime.exports.jsx(FormattedMessage,{id:"engine-center-new.schemas.loading-text",defaultMessage:"Loading...",description:"Loading text for fetching data registries"}),renderInput:e=>jsxRuntime.exports.jsx(TextField,Object.assign({},e,{variant:"outlined",fullWidth:!0,InputProps:Object.assign(Object.assign({},e.InputProps),{placeholder:"Select a Schema...",endAdornment:jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[a?jsxRuntime.exports.jsx(CircularProgress,{color:"inherit",size:20}):null,e.InputProps.endAdornment]})})})),renderOption:(e,t)=>[e,t.label],groupBy:e=>toUpper_1(get_1(e,"label[0]")),renderGroup:e=>e,onChange:s,onInputChange:o})]})},styles={container:{border:"1px solid #D5DFE9",borderRadius:"5px",marginBottom:"20px",overflow:"hidden"},header:{padding:"18px",borderBottom:"1px solid #D5DFE9",background:"#FAFAFA",display:"flex",alignItems:"center",verticalAlign:"middle !important"},headerText:{marginLeft:"12px"},body:{display:"flex",alignItems:"center",padding:"26px 0",flexWrap:"wrap"}},GroupBox=({heading:e,headingIcon:t,children:n})=>jsxRuntime.exports.jsxs(Box,Object.assign({sx:styles.container},{children:[jsxRuntime.exports.jsxs(Box,Object.assign({sx:styles.header},{children:[t,jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h2",sx:styles.headerText},{children:e}))]})),jsxRuntime.exports.jsx(Box,Object.assign({sx:styles.body},{children:n}))]})),SchemaVersions=({schemaVersions:e,selectedVersionIndexes:n,onCheck:i})=>jsxRuntime.exports.jsx(GroupBox,Object.assign({heading:"Versions",headingIcon:jsxRuntime.exports.jsx(default_1,{sx:{verticalAlign:"middle",paddingBottom:"3px"}})},{children:map_1(e,(e,t)=>jsxRuntime.exports.jsx(FormControlLabel,{"data-test":"engine-center-new.schemas.version-option-label-"+t,sx:{width:"100%",padding:"4px 0 4px 54px",alignItems:"center"},control:jsxRuntime.exports.jsx(Checkbox,{"data-test":"engine-center-new.schemas.version-option-checkbox-"+t,checked:includes_1(n,t),name:e.id,value:t,onChange:i}),label:jsxRuntime.exports.jsx(FormattedMessage,{id:"engine-center-new.schemas.version-label.{idPostfix}",defaultMessage:"{label}",description:"Version option label",values:{label:`Version ${e.majorVersion}.`+e.minorVersion,idPostfix:e.majorVersion+"."+e.minorVersion}})},e.id))})),headerStyles={display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%"},SchemaFormHeader=({name:e,hidePanel:t})=>jsxRuntime.exports.jsxs(Box,Object.assign({sx:headerStyles},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h1",color:"secondary","data-test":"engine-center-new-schemas-header-title"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"engine-center-new.schemas.form-title",defaultMessage:"{label}",description:"Label for title of the form",values:{label:e}})})),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:jsxRuntime.exports.jsx(FormattedMessage,{id:"engine-center-new.schemas.form-title-close",defaultMessage:"Close",description:"Form label for close tooltip label"})},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:t,"aria-labelledby":"engine-center-new-close-panel","data-test":"engine-description-input-icon"},{children:jsxRuntime.exports.jsx(Close,{})}))}))]})),appBarHeight=55,borderBottom=5,containerStyles={justifyContent:"space-between",flexDirection:"column",height:`calc(100vh - ${appBarHeight}px - ${borderBottom}px)`,display:"flex"},addButtonStyles={flexGrow:1,display:"flex",justifyContent:"flex-end",alignItems:"flex-end",padding:"0px 20px 20px 20px"},SchemasForm=({hidePanel:n,name:e,isEdit:i,editId:r,schemaType:s})=>{const o=useDispatch(),a=react.exports.useRef(null);var t=useSelector(preferredLanguageSelector);const l=AIWareFormatMessage(t),c=useSelector(selectIsFetchingDataRegistries),u=useSelector(selectDataRegistries),p=useSelector(s===SchemaIO.Input?selectInputSchemas:selectOutputSchemas),[d,m]=react.exports.useState([]),[g,f]=react.exports.useState(null),[h,x]=react.exports.useState([]),[y,b]=react.exports.useState([]),[j,S]=react.exports.useState(-1),[v,E]=react.exports.useState(""),[w,T]=react.exports.useState(null),R=(react.exports.useEffect(()=>{!c&&isEmpty_1(u)&&o(actions.engineFormState.fetchDataRegistries())},[]),react.exports.useEffect(()=>{var e=map_1(u,(e,t)=>{t={label:get_1(e,"name",""),index:t};return e.id===r&&f(t),t});m(e)},[u]),react.exports.useEffect(()=>{isEmpty_1(g)||(E(g.label),T(g),S(g.index))},[d]),()=>{b([]),x([]),b([]),S(-1),T(null)});react.exports.useEffect(()=>{if(0<=j){var e=get_1(u,`[${j}].schemas.records`,[]);if(x(e),i){let t=0;const n=map_1(p,e=>e.id);e=flatMap_1(e,e=>includes_1(n,e.id)?[t++]:(t++,[]));b(e)}else b([0])}else R()},[j]);return jsxRuntime.exports.jsxs(Box,Object.assign({sx:containerStyles},{children:[jsxRuntime.exports.jsxs(Grid,Object.assign({container:!0,padding:5,spacing:5,justifyContent:"flex-start",alignItems:"flex-start","data-test":"engine-center-new-schemas-form-container"},{children:[jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:12},{children:jsxRuntime.exports.jsx(SchemaFormHeader,{name:e,hidePanel:n})})),jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:12},{children:jsxRuntime.exports.jsx(SchemaAutocomplete,{ref:a,disabled:i,options:d,value:w,inputValue:v,onChange:(e,t)=>{var n=get_1(t,"index",-1);S(n),T(t)},onInputChange:(e,t)=>{E(t)}})})),0<=j&&jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:12,"data-test":"engine-center-new-schema-versions"},{children:jsxRuntime.exports.jsx(SchemaVersions,{schemaVersions:h,selectedVersionIndexes:y,onCheck:e=>{const t=toNumber_1(e.target.value);includes_1(y,t)?(e=y,remove_1(e,e=>e===t),b([...e])):(e=[...y,t],b(e))}})}))]})),jsxRuntime.exports.jsx(Box,Object.assign({sx:addButtonStyles},{children:jsxRuntime.exports.jsx(Button,Object.assign({disabled:isEmpty_1(y)||j<0,variant:"contained",color:"primary","data-test":"engine-center-new-schemas-button-submit",onClick:()=>{var e=map_1(y,e=>{e=get_1(u,`[${j}].schemas.records[${e}]`);return{id:e.id,dataRegistryId:e.dataRegistryId,dataRegistryName:u[j].name,majorVersion:e.majorVersion,minorVersion:e.minorVersion}});if(o(actions.engineFormState.addSchemas({schemas:e,schemaType:s})),i)o(actions.engineFormState.updateSchemas({updatedSchemas:e,schemaType:s,dataRegistryId:u[j].id})),n();else{o(showMessage({content:l({id:"engine-center-new.snackbar.addSchemaSuccess",defaultMessage:[{type:0,value:"Added schema to engine successfully."}]}),severity:MessageSeverity.Info})),R();const t=a.current.getElementsByClassName("MuiAutocomplete-clearIndicator")[0];t&&t.click()}}},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-engine-center-new-schemas.submit-button-label",defaultMessage:"{label}",description:"Submit Schemas",values:{label:i?"Update":"Add"}})}))}))]}))},SchemasFormPanel=e=>jsxRuntime.exports.jsx(CacheProvider,Object.assign({value:muiCache},{children:jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(SchemasForm,{name:e.name,hidePanel:e.hidePanel,isEdit:e.isEdit,editId:e.editId,schemaType:e.schemaType})})})}));var index_esm=Object.freeze({__proto__:null,EngineCenterCustomFieldsForm:EngineCenterCustomFieldsForm,EngineCenterNew:EngineCenterNew,GenericSelect:GenericSelect,Heading:Heading,InputCheckbox:InputCheckbox,InputRadioGroup:InputRadioGroup,InputSelect:InputSelect,InputText:InputText,InputTypeFlyout:InputTypeFlyout,InputTypeMarkdown:InputTypeMarkdown$1,InputTypeMarkdownControlled:InputTypeMarkdown$1,Number:Number$1,Picklist:Picklist,PreviewMarkdown:PreviewMarkdown,SchemaOrText:SchemaOrText,SchemasFormPanel:SchemasFormPanel,actions:actions,getSignedWritableUrl:getSignedWritableUrl,types:index,uploadFileToS3:uploadFileToS3,useUseCaseStyles:useStyles$8,ListField:ListField});export{EntityTags as E,Heading as H,InputTypeMarkdown$1 as I,ListField as L,ReactMarkdown as R,SchemaOrText as S,actions as a,InputText as b,InputSelect as c,InputCheckbox as d,InputRadioGroup as e,uploadFileToS3 as f,getSignedWritableUrl as g,index_esm as h,index as i,join_1 as j,lowerCase_1 as l,orderBy_1 as o,set_1 as s,useStyles$8 as u};
|