@finsemble/finsemble-core 9.9.0 → 9.9.1
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/dist/cli/cli-api/iocd.cjs +4 -2
- package/dist/cli/cli-api/iocd.cjs.map +1 -1
- package/dist/cli/cli-api/iocd.d.cts.map +1 -1
- package/dist/cli/tsconfig.cli.tsbuildinfo +1 -1
- package/dist/lib/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/lib/tsconfig.noglobals.tsbuildinfo +1 -1
- package/dist/lib/ui/components/toolbar/advancedAppLauncher/iocdAdvancedAppLauncher/AdvancedAppLauncher.d.ts.map +1 -1
- package/dist/lib/ui/components/toolbar/advancedAppLauncher/iocdAdvancedAppLauncher/AdvancedAppLauncher.js +9 -10
- package/dist/lib/ui/components/toolbar/advancedAppLauncher/iocdAdvancedAppLauncher/AdvancedAppLauncher.js.map +1 -1
- package/dist/platform/configs/core/config.json +2 -2
- package/dist/polyfill/bootstrapper/index.umd.js.map +1 -1
- package/dist/polyfill/finsemble-javascript-adapter.js.map +1 -1
- package/dist/polyfill/fsbl-polyfill.umd.js +1 -1
- package/dist/polyfill/fsbl-polyfill.umd.js.map +1 -1
- package/dist/polyfill/fsbl-service/index.umd.js +1 -1
- package/dist/polyfill/fsbl-service/index.umd.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! For license information please see index.umd.js.LICENSE.txt */
|
|
2
|
-
(()=>{var e={89:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=89,e.exports=t},575:()=>{},2543:function(e,t,i){var n;e=i.nmd(e),function(){var o,r="Expected a function",a="__lodash_hash_undefined__",s="__lodash_placeholder__",l=32,c=128,d=1/0,p=9007199254740991,u=NaN,h=4294967295,f=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",l],["partialRight",64],["rearg",256]],g="[object Arguments]",m="[object Array]",v="[object Boolean]",w="[object Date]",y="[object Error]",b="[object Function]",S="[object GeneratorFunction]",k="[object Map]",T="[object Number]",C="[object Object]",A="[object Promise]",I="[object RegExp]",_="[object Set]",F="[object String]",P="[object Symbol]",x="[object WeakMap]",R="[object ArrayBuffer]",L="[object DataView]",W="[object Float32Array]",j="[object Float64Array]",O="[object Int8Array]",D="[object Int16Array]",M="[object Int32Array]",$="[object Uint8Array]",E="[object Uint8ClampedArray]",U="[object Uint16Array]",z="[object Uint32Array]",N=/\b__p \+= '';/g,B=/\b(__p \+=) '' \+/g,H=/(__e\(.*?\)|\b__t\)) \+\n'';/g,q=/&(?:amp|lt|gt|quot|#39);/g,G=/[&<>"']/g,V=RegExp(q.source),Z=RegExp(G.source),J=/<%-([\s\S]+?)%>/g,K=/<%([\s\S]+?)%>/g,Y=/<%=([\s\S]+?)%>/g,Q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,X=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,ie=RegExp(te.source),ne=/^\s+/,oe=/\s/,re=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ae=/\{\n\/\* \[wrapped with (.+)\] \*/,se=/,? & /,le=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ce=/[()=,{}\[\]\/\s]/,de=/\\(\\)?/g,pe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ue=/\w*$/,he=/^[-+]0x[0-9a-f]+$/i,fe=/^0b[01]+$/i,ge=/^\[object .+?Constructor\]$/,me=/^0o[0-7]+$/i,ve=/^(?:0|[1-9]\d*)$/,we=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ye=/($^)/,be=/['\n\r\u2028\u2029\\]/g,Se="\\ud800-\\udfff",ke="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Te="\\u2700-\\u27bf",Ce="a-z\\xdf-\\xf6\\xf8-\\xff",Ae="A-Z\\xc0-\\xd6\\xd8-\\xde",Ie="\\ufe0e\\ufe0f",_e="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Fe="["+Se+"]",Pe="["+_e+"]",xe="["+ke+"]",Re="\\d+",Le="["+Te+"]",We="["+Ce+"]",je="[^"+Se+_e+Re+Te+Ce+Ae+"]",Oe="\\ud83c[\\udffb-\\udfff]",De="[^"+Se+"]",Me="(?:\\ud83c[\\udde6-\\uddff]){2}",$e="[\\ud800-\\udbff][\\udc00-\\udfff]",Ee="["+Ae+"]",Ue="\\u200d",ze="(?:"+We+"|"+je+")",Ne="(?:"+Ee+"|"+je+")",Be="(?:['’](?:d|ll|m|re|s|t|ve))?",He="(?:['’](?:D|LL|M|RE|S|T|VE))?",qe="(?:"+xe+"|"+Oe+")?",Ge="["+Ie+"]?",Ve=Ge+qe+"(?:"+Ue+"(?:"+[De,Me,$e].join("|")+")"+Ge+qe+")*",Ze="(?:"+[Le,Me,$e].join("|")+")"+Ve,Je="(?:"+[De+xe+"?",xe,Me,$e,Fe].join("|")+")",Ke=RegExp("['’]","g"),Ye=RegExp(xe,"g"),Qe=RegExp(Oe+"(?="+Oe+")|"+Je+Ve,"g"),Xe=RegExp([Ee+"?"+We+"+"+Be+"(?="+[Pe,Ee,"$"].join("|")+")",Ne+"+"+He+"(?="+[Pe,Ee+ze,"$"].join("|")+")",Ee+"?"+ze+"+"+Be,Ee+"+"+He,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Re,Ze].join("|"),"g"),et=RegExp("["+Ue+Se+ke+Ie+"]"),tt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,it=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],nt=-1,ot={};ot[W]=ot[j]=ot[O]=ot[D]=ot[M]=ot[$]=ot[E]=ot[U]=ot[z]=!0,ot[g]=ot[m]=ot[R]=ot[v]=ot[L]=ot[w]=ot[y]=ot[b]=ot[k]=ot[T]=ot[C]=ot[I]=ot[_]=ot[F]=ot[x]=!1;var rt={};rt[g]=rt[m]=rt[R]=rt[L]=rt[v]=rt[w]=rt[W]=rt[j]=rt[O]=rt[D]=rt[M]=rt[k]=rt[T]=rt[C]=rt[I]=rt[_]=rt[F]=rt[P]=rt[$]=rt[E]=rt[U]=rt[z]=!0,rt[y]=rt[b]=rt[x]=!1;var at={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},st=parseFloat,lt=parseInt,ct="object"==typeof i.g&&i.g&&i.g.Object===Object&&i.g,dt="object"==typeof self&&self&&self.Object===Object&&self,pt=ct||dt||Function("return this")(),ut=t&&!t.nodeType&&t,ht=ut&&e&&!e.nodeType&&e,ft=ht&&ht.exports===ut,gt=ft&&ct.process,mt=function(){try{return ht&&ht.require&&ht.require("util").types||gt&>.binding&>.binding("util")}catch(e){}}(),vt=mt&&mt.isArrayBuffer,wt=mt&&mt.isDate,yt=mt&&mt.isMap,bt=mt&&mt.isRegExp,St=mt&&mt.isSet,kt=mt&&mt.isTypedArray;function Tt(e,t,i){switch(i.length){case 0:return e.call(t);case 1:return e.call(t,i[0]);case 2:return e.call(t,i[0],i[1]);case 3:return e.call(t,i[0],i[1],i[2])}return e.apply(t,i)}function Ct(e,t,i,n){for(var o=-1,r=null==e?0:e.length;++o<r;){var a=e[o];t(n,a,i(a),e)}return n}function At(e,t){for(var i=-1,n=null==e?0:e.length;++i<n&&!1!==t(e[i],i,e););return e}function It(e,t){for(var i=null==e?0:e.length;i--&&!1!==t(e[i],i,e););return e}function _t(e,t){for(var i=-1,n=null==e?0:e.length;++i<n;)if(!t(e[i],i,e))return!1;return!0}function Ft(e,t){for(var i=-1,n=null==e?0:e.length,o=0,r=[];++i<n;){var a=e[i];t(a,i,e)&&(r[o++]=a)}return r}function Pt(e,t){return!(null==e||!e.length)&&Et(e,t,0)>-1}function xt(e,t,i){for(var n=-1,o=null==e?0:e.length;++n<o;)if(i(t,e[n]))return!0;return!1}function Rt(e,t){for(var i=-1,n=null==e?0:e.length,o=Array(n);++i<n;)o[i]=t(e[i],i,e);return o}function Lt(e,t){for(var i=-1,n=t.length,o=e.length;++i<n;)e[o+i]=t[i];return e}function Wt(e,t,i,n){var o=-1,r=null==e?0:e.length;for(n&&r&&(i=e[++o]);++o<r;)i=t(i,e[o],o,e);return i}function jt(e,t,i,n){var o=null==e?0:e.length;for(n&&o&&(i=e[--o]);o--;)i=t(i,e[o],o,e);return i}function Ot(e,t){for(var i=-1,n=null==e?0:e.length;++i<n;)if(t(e[i],i,e))return!0;return!1}var Dt=Bt("length");function Mt(e,t,i){var n;return i(e,function(e,i,o){if(t(e,i,o))return n=i,!1}),n}function $t(e,t,i,n){for(var o=e.length,r=i+(n?1:-1);n?r--:++r<o;)if(t(e[r],r,e))return r;return-1}function Et(e,t,i){return t==t?function(e,t,i){for(var n=i-1,o=e.length;++n<o;)if(e[n]===t)return n;return-1}(e,t,i):$t(e,zt,i)}function Ut(e,t,i,n){for(var o=i-1,r=e.length;++o<r;)if(n(e[o],t))return o;return-1}function zt(e){return e!=e}function Nt(e,t){var i=null==e?0:e.length;return i?Gt(e,t)/i:u}function Bt(e){return function(t){return null==t?o:t[e]}}function Ht(e){return function(t){return null==e?o:e[t]}}function qt(e,t,i,n,o){return o(e,function(e,o,r){i=n?(n=!1,e):t(i,e,o,r)}),i}function Gt(e,t){for(var i,n=-1,r=e.length;++n<r;){var a=t(e[n]);a!==o&&(i=i===o?a:i+a)}return i}function Vt(e,t){for(var i=-1,n=Array(e);++i<e;)n[i]=t(i);return n}function Zt(e){return e?e.slice(0,pi(e)+1).replace(ne,""):e}function Jt(e){return function(t){return e(t)}}function Kt(e,t){return Rt(t,function(t){return e[t]})}function Yt(e,t){return e.has(t)}function Qt(e,t){for(var i=-1,n=e.length;++i<n&&Et(t,e[i],0)>-1;);return i}function Xt(e,t){for(var i=e.length;i--&&Et(t,e[i],0)>-1;);return i}var ei=Ht({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),ti=Ht({"&":"&","<":"<",">":">",'"':""","'":"'"});function ii(e){return"\\"+at[e]}function ni(e){return et.test(e)}function oi(e){var t=-1,i=Array(e.size);return e.forEach(function(e,n){i[++t]=[n,e]}),i}function ri(e,t){return function(i){return e(t(i))}}function ai(e,t){for(var i=-1,n=e.length,o=0,r=[];++i<n;){var a=e[i];a!==t&&a!==s||(e[i]=s,r[o++]=i)}return r}function si(e){var t=-1,i=Array(e.size);return e.forEach(function(e){i[++t]=e}),i}function li(e){var t=-1,i=Array(e.size);return e.forEach(function(e){i[++t]=[e,e]}),i}function ci(e){return ni(e)?function(e){for(var t=Qe.lastIndex=0;Qe.test(e);)++t;return t}(e):Dt(e)}function di(e){return ni(e)?function(e){return e.match(Qe)||[]}(e):function(e){return e.split("")}(e)}function pi(e){for(var t=e.length;t--&&oe.test(e.charAt(t)););return t}var ui=Ht({"&":"&","<":"<",">":">",""":'"',"'":"'"}),hi=function e(t){var i,n=(t=null==t?pt:hi.defaults(pt.Object(),t,hi.pick(pt,it))).Array,oe=t.Date,Se=t.Error,ke=t.Function,Te=t.Math,Ce=t.Object,Ae=t.RegExp,Ie=t.String,_e=t.TypeError,Fe=n.prototype,Pe=ke.prototype,xe=Ce.prototype,Re=t["__core-js_shared__"],Le=Pe.toString,We=xe.hasOwnProperty,je=0,Oe=(i=/[^.]+$/.exec(Re&&Re.keys&&Re.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"",De=xe.toString,Me=Le.call(Ce),$e=pt._,Ee=Ae("^"+Le.call(We).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ue=ft?t.Buffer:o,ze=t.Symbol,Ne=t.Uint8Array,Be=Ue?Ue.allocUnsafe:o,He=ri(Ce.getPrototypeOf,Ce),qe=Ce.create,Ge=xe.propertyIsEnumerable,Ve=Fe.splice,Ze=ze?ze.isConcatSpreadable:o,Je=ze?ze.iterator:o,Qe=ze?ze.toStringTag:o,et=function(){try{var e=cr(Ce,"defineProperty");return e({},"",{}),e}catch(e){}}(),at=t.clearTimeout!==pt.clearTimeout&&t.clearTimeout,ct=oe&&oe.now!==pt.Date.now&&oe.now,dt=t.setTimeout!==pt.setTimeout&&t.setTimeout,ut=Te.ceil,ht=Te.floor,gt=Ce.getOwnPropertySymbols,mt=Ue?Ue.isBuffer:o,Dt=t.isFinite,Ht=Fe.join,fi=ri(Ce.keys,Ce),gi=Te.max,mi=Te.min,vi=oe.now,wi=t.parseInt,yi=Te.random,bi=Fe.reverse,Si=cr(t,"DataView"),ki=cr(t,"Map"),Ti=cr(t,"Promise"),Ci=cr(t,"Set"),Ai=cr(t,"WeakMap"),Ii=cr(Ce,"create"),_i=Ai&&new Ai,Fi={},Pi=Mr(Si),xi=Mr(ki),Ri=Mr(Ti),Li=Mr(Ci),Wi=Mr(Ai),ji=ze?ze.prototype:o,Oi=ji?ji.valueOf:o,Di=ji?ji.toString:o;function Mi(e){if(es(e)&&!Ba(e)&&!(e instanceof zi)){if(e instanceof Ui)return e;if(We.call(e,"__wrapped__"))return $r(e)}return new Ui(e)}var $i=function(){function e(){}return function(t){if(!Xa(t))return{};if(qe)return qe(t);e.prototype=t;var i=new e;return e.prototype=o,i}}();function Ei(){}function Ui(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=o}function zi(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=h,this.__views__=[]}function Ni(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}function Bi(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}function Hi(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}function qi(e){var t=-1,i=null==e?0:e.length;for(this.__data__=new Hi;++t<i;)this.add(e[t])}function Gi(e){var t=this.__data__=new Bi(e);this.size=t.size}function Vi(e,t){var i=Ba(e),n=!i&&Na(e),o=!i&&!n&&Va(e),r=!i&&!n&&!o&&ls(e),a=i||n||o||r,s=a?Vt(e.length,Ie):[],l=s.length;for(var c in e)!t&&!We.call(e,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||r&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||mr(c,l))||s.push(c);return s}function Zi(e){var t=e.length;return t?e[qn(0,t-1)]:o}function Ji(e,t){return Lr(_o(e),rn(t,0,e.length))}function Ki(e){return Lr(_o(e))}function Yi(e,t,i){(i!==o&&!Ea(e[t],i)||i===o&&!(t in e))&&nn(e,t,i)}function Qi(e,t,i){var n=e[t];We.call(e,t)&&Ea(n,i)&&(i!==o||t in e)||nn(e,t,i)}function Xi(e,t){for(var i=e.length;i--;)if(Ea(e[i][0],t))return i;return-1}function en(e,t,i,n){return dn(e,function(e,o,r){t(n,e,i(e),r)}),n}function tn(e,t){return e&&Fo(t,xs(t),e)}function nn(e,t,i){"__proto__"==t&&et?et(e,t,{configurable:!0,enumerable:!0,value:i,writable:!0}):e[t]=i}function on(e,t){for(var i=-1,r=t.length,a=n(r),s=null==e;++i<r;)a[i]=s?o:As(e,t[i]);return a}function rn(e,t,i){return e==e&&(i!==o&&(e=e<=i?e:i),t!==o&&(e=e>=t?e:t)),e}function an(e,t,i,n,r,a){var s,l=1&t,c=2&t,d=4&t;if(i&&(s=r?i(e,n,r,a):i(e)),s!==o)return s;if(!Xa(e))return e;var p=Ba(e);if(p){if(s=function(e){var t=e.length,i=new e.constructor(t);return t&&"string"==typeof e[0]&&We.call(e,"index")&&(i.index=e.index,i.input=e.input),i}(e),!l)return _o(e,s)}else{var u=ur(e),h=u==b||u==S;if(Va(e))return So(e,l);if(u==C||u==g||h&&!r){if(s=c||h?{}:fr(e),!l)return c?function(e,t){return Fo(e,pr(e),t)}(e,function(e,t){return e&&Fo(t,Rs(t),e)}(s,e)):function(e,t){return Fo(e,dr(e),t)}(e,tn(s,e))}else{if(!rt[u])return r?e:{};s=function(e,t,i){var n,o=e.constructor;switch(t){case R:return ko(e);case v:case w:return new o(+e);case L:return function(e,t){var i=t?ko(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.byteLength)}(e,i);case W:case j:case O:case D:case M:case $:case E:case U:case z:return To(e,i);case k:return new o;case T:case F:return new o(e);case I:return function(e){var t=new e.constructor(e.source,ue.exec(e));return t.lastIndex=e.lastIndex,t}(e);case _:return new o;case P:return n=e,Oi?Ce(Oi.call(n)):{}}}(e,u,l)}}a||(a=new Gi);var f=a.get(e);if(f)return f;a.set(e,s),rs(e)?e.forEach(function(n){s.add(an(n,t,i,n,e,a))}):ts(e)&&e.forEach(function(n,o){s.set(o,an(n,t,i,o,e,a))});var m=p?o:(d?c?ir:tr:c?Rs:xs)(e);return At(m||e,function(n,o){m&&(n=e[o=n]),Qi(s,o,an(n,t,i,o,e,a))}),s}function sn(e,t,i){var n=i.length;if(null==e)return!n;for(e=Ce(e);n--;){var r=i[n],a=t[r],s=e[r];if(s===o&&!(r in e)||!a(s))return!1}return!0}function ln(e,t,i){if("function"!=typeof e)throw new _e(r);return Fr(function(){e.apply(o,i)},t)}function cn(e,t,i,n){var o=-1,r=Pt,a=!0,s=e.length,l=[],c=t.length;if(!s)return l;i&&(t=Rt(t,Jt(i))),n?(r=xt,a=!1):t.length>=200&&(r=Yt,a=!1,t=new qi(t));e:for(;++o<s;){var d=e[o],p=null==i?d:i(d);if(d=n||0!==d?d:0,a&&p==p){for(var u=c;u--;)if(t[u]===p)continue e;l.push(d)}else r(t,p,n)||l.push(d)}return l}Mi.templateSettings={escape:J,evaluate:K,interpolate:Y,variable:"",imports:{_:Mi}},Mi.prototype=Ei.prototype,Mi.prototype.constructor=Mi,Ui.prototype=$i(Ei.prototype),Ui.prototype.constructor=Ui,zi.prototype=$i(Ei.prototype),zi.prototype.constructor=zi,Ni.prototype.clear=function(){this.__data__=Ii?Ii(null):{},this.size=0},Ni.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Ni.prototype.get=function(e){var t=this.__data__;if(Ii){var i=t[e];return i===a?o:i}return We.call(t,e)?t[e]:o},Ni.prototype.has=function(e){var t=this.__data__;return Ii?t[e]!==o:We.call(t,e)},Ni.prototype.set=function(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=Ii&&t===o?a:t,this},Bi.prototype.clear=function(){this.__data__=[],this.size=0},Bi.prototype.delete=function(e){var t=this.__data__,i=Xi(t,e);return!(i<0||(i==t.length-1?t.pop():Ve.call(t,i,1),--this.size,0))},Bi.prototype.get=function(e){var t=this.__data__,i=Xi(t,e);return i<0?o:t[i][1]},Bi.prototype.has=function(e){return Xi(this.__data__,e)>-1},Bi.prototype.set=function(e,t){var i=this.__data__,n=Xi(i,e);return n<0?(++this.size,i.push([e,t])):i[n][1]=t,this},Hi.prototype.clear=function(){this.size=0,this.__data__={hash:new Ni,map:new(ki||Bi),string:new Ni}},Hi.prototype.delete=function(e){var t=sr(this,e).delete(e);return this.size-=t?1:0,t},Hi.prototype.get=function(e){return sr(this,e).get(e)},Hi.prototype.has=function(e){return sr(this,e).has(e)},Hi.prototype.set=function(e,t){var i=sr(this,e),n=i.size;return i.set(e,t),this.size+=i.size==n?0:1,this},qi.prototype.add=qi.prototype.push=function(e){return this.__data__.set(e,a),this},qi.prototype.has=function(e){return this.__data__.has(e)},Gi.prototype.clear=function(){this.__data__=new Bi,this.size=0},Gi.prototype.delete=function(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i},Gi.prototype.get=function(e){return this.__data__.get(e)},Gi.prototype.has=function(e){return this.__data__.has(e)},Gi.prototype.set=function(e,t){var i=this.__data__;if(i instanceof Bi){var n=i.__data__;if(!ki||n.length<199)return n.push([e,t]),this.size=++i.size,this;i=this.__data__=new Hi(n)}return i.set(e,t),this.size=i.size,this};var dn=Ro(wn),pn=Ro(yn,!0);function un(e,t){var i=!0;return dn(e,function(e,n,o){return i=!!t(e,n,o)}),i}function hn(e,t,i){for(var n=-1,r=e.length;++n<r;){var a=e[n],s=t(a);if(null!=s&&(l===o?s==s&&!ss(s):i(s,l)))var l=s,c=a}return c}function fn(e,t){var i=[];return dn(e,function(e,n,o){t(e,n,o)&&i.push(e)}),i}function gn(e,t,i,n,o){var r=-1,a=e.length;for(i||(i=gr),o||(o=[]);++r<a;){var s=e[r];t>0&&i(s)?t>1?gn(s,t-1,i,n,o):Lt(o,s):n||(o[o.length]=s)}return o}var mn=Lo(),vn=Lo(!0);function wn(e,t){return e&&mn(e,t,xs)}function yn(e,t){return e&&vn(e,t,xs)}function bn(e,t){return Ft(t,function(t){return Ka(e[t])})}function Sn(e,t){for(var i=0,n=(t=vo(t,e)).length;null!=e&&i<n;)e=e[Dr(t[i++])];return i&&i==n?e:o}function kn(e,t,i){var n=t(e);return Ba(e)?n:Lt(n,i(e))}function Tn(e){return null==e?e===o?"[object Undefined]":"[object Null]":Qe&&Qe in Ce(e)?function(e){var t=We.call(e,Qe),i=e[Qe];try{e[Qe]=o;var n=!0}catch(e){}var r=De.call(e);return n&&(t?e[Qe]=i:delete e[Qe]),r}(e):function(e){return De.call(e)}(e)}function Cn(e,t){return e>t}function An(e,t){return null!=e&&We.call(e,t)}function In(e,t){return null!=e&&t in Ce(e)}function _n(e,t,i){for(var r=i?xt:Pt,a=e[0].length,s=e.length,l=s,c=n(s),d=1/0,p=[];l--;){var u=e[l];l&&t&&(u=Rt(u,Jt(t))),d=mi(u.length,d),c[l]=!i&&(t||a>=120&&u.length>=120)?new qi(l&&u):o}u=e[0];var h=-1,f=c[0];e:for(;++h<a&&p.length<d;){var g=u[h],m=t?t(g):g;if(g=i||0!==g?g:0,!(f?Yt(f,m):r(p,m,i))){for(l=s;--l;){var v=c[l];if(!(v?Yt(v,m):r(e[l],m,i)))continue e}f&&f.push(m),p.push(g)}}return p}function Fn(e,t,i){var n=null==(e=Ar(e,t=vo(t,e)))?e:e[Dr(Jr(t))];return null==n?o:Tt(n,e,i)}function Pn(e){return es(e)&&Tn(e)==g}function xn(e,t,i,n,r){return e===t||(null==e||null==t||!es(e)&&!es(t)?e!=e&&t!=t:function(e,t,i,n,r,a){var s=Ba(e),l=Ba(t),c=s?m:ur(e),d=l?m:ur(t),p=(c=c==g?C:c)==C,u=(d=d==g?C:d)==C,h=c==d;if(h&&Va(e)){if(!Va(t))return!1;s=!0,p=!1}if(h&&!p)return a||(a=new Gi),s||ls(e)?Xo(e,t,i,n,r,a):function(e,t,i,n,o,r,a){switch(i){case L:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case R:return!(e.byteLength!=t.byteLength||!r(new Ne(e),new Ne(t)));case v:case w:case T:return Ea(+e,+t);case y:return e.name==t.name&&e.message==t.message;case I:case F:return e==t+"";case k:var s=oi;case _:var l=1&n;if(s||(s=si),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;n|=2,a.set(e,t);var d=Xo(s(e),s(t),n,o,r,a);return a.delete(e),d;case P:if(Oi)return Oi.call(e)==Oi.call(t)}return!1}(e,t,c,i,n,r,a);if(!(1&i)){var f=p&&We.call(e,"__wrapped__"),b=u&&We.call(t,"__wrapped__");if(f||b){var S=f?e.value():e,A=b?t.value():t;return a||(a=new Gi),r(S,A,i,n,a)}}return!!h&&(a||(a=new Gi),function(e,t,i,n,r,a){var s=1&i,l=tr(e),c=l.length;if(c!=tr(t).length&&!s)return!1;for(var d=c;d--;){var p=l[d];if(!(s?p in t:We.call(t,p)))return!1}var u=a.get(e),h=a.get(t);if(u&&h)return u==t&&h==e;var f=!0;a.set(e,t),a.set(t,e);for(var g=s;++d<c;){var m=e[p=l[d]],v=t[p];if(n)var w=s?n(v,m,p,t,e,a):n(m,v,p,e,t,a);if(!(w===o?m===v||r(m,v,i,n,a):w)){f=!1;break}g||(g="constructor"==p)}if(f&&!g){var y=e.constructor,b=t.constructor;y==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b||(f=!1)}return a.delete(e),a.delete(t),f}(e,t,i,n,r,a))}(e,t,i,n,xn,r))}function Rn(e,t,i,n){var r=i.length,a=r,s=!n;if(null==e)return!a;for(e=Ce(e);r--;){var l=i[r];if(s&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++r<a;){var c=(l=i[r])[0],d=e[c],p=l[1];if(s&&l[2]){if(d===o&&!(c in e))return!1}else{var u=new Gi;if(n)var h=n(d,p,c,e,t,u);if(!(h===o?xn(p,d,3,n,u):h))return!1}}return!0}function Ln(e){return!(!Xa(e)||(t=e,Oe&&Oe in t))&&(Ka(e)?Ee:ge).test(Mr(e));var t}function Wn(e){return"function"==typeof e?e:null==e?il:"object"==typeof e?Ba(e)?$n(e[0],e[1]):Mn(e):pl(e)}function jn(e){if(!Sr(e))return fi(e);var t=[];for(var i in Ce(e))We.call(e,i)&&"constructor"!=i&&t.push(i);return t}function On(e,t){return e<t}function Dn(e,t){var i=-1,o=qa(e)?n(e.length):[];return dn(e,function(e,n,r){o[++i]=t(e,n,r)}),o}function Mn(e){var t=lr(e);return 1==t.length&&t[0][2]?Tr(t[0][0],t[0][1]):function(i){return i===e||Rn(i,e,t)}}function $n(e,t){return wr(e)&&kr(t)?Tr(Dr(e),t):function(i){var n=As(i,e);return n===o&&n===t?Is(i,e):xn(t,n,3)}}function En(e,t,i,n,r){e!==t&&mn(t,function(a,s){if(r||(r=new Gi),Xa(a))!function(e,t,i,n,r,a,s){var l=Ir(e,i),c=Ir(t,i),d=s.get(c);if(d)Yi(e,i,d);else{var p=a?a(l,c,i+"",e,t,s):o,u=p===o;if(u){var h=Ba(c),f=!h&&Va(c),g=!h&&!f&&ls(c);p=c,h||f||g?Ba(l)?p=l:Ga(l)?p=_o(l):f?(u=!1,p=So(c,!0)):g?(u=!1,p=To(c,!0)):p=[]:ns(c)||Na(c)?(p=l,Na(l)?p=ms(l):Xa(l)&&!Ka(l)||(p=fr(c))):u=!1}u&&(s.set(c,p),r(p,c,n,a,s),s.delete(c)),Yi(e,i,p)}}(e,t,s,i,En,n,r);else{var l=n?n(Ir(e,s),a,s+"",e,t,r):o;l===o&&(l=a),Yi(e,s,l)}},Rs)}function Un(e,t){var i=e.length;if(i)return mr(t+=t<0?i:0,i)?e[t]:o}function zn(e,t,i){t=t.length?Rt(t,function(e){return Ba(e)?function(t){return Sn(t,1===e.length?e[0]:e)}:e}):[il];var n=-1;t=Rt(t,Jt(ar()));var o=Dn(e,function(e,i,o){var r=Rt(t,function(t){return t(e)});return{criteria:r,index:++n,value:e}});return function(e){var t=e.length;for(e.sort(function(e,t){return function(e,t,i){for(var n=-1,o=e.criteria,r=t.criteria,a=o.length,s=i.length;++n<a;){var l=Co(o[n],r[n]);if(l)return n>=s?l:l*("desc"==i[n]?-1:1)}return e.index-t.index}(e,t,i)});t--;)e[t]=e[t].value;return e}(o)}function Nn(e,t,i){for(var n=-1,o=t.length,r={};++n<o;){var a=t[n],s=Sn(e,a);i(s,a)&&Kn(r,vo(a,e),s)}return r}function Bn(e,t,i,n){var o=n?Ut:Et,r=-1,a=t.length,s=e;for(e===t&&(t=_o(t)),i&&(s=Rt(e,Jt(i)));++r<a;)for(var l=0,c=t[r],d=i?i(c):c;(l=o(s,d,l,n))>-1;)s!==e&&Ve.call(s,l,1),Ve.call(e,l,1);return e}function Hn(e,t){for(var i=e?t.length:0,n=i-1;i--;){var o=t[i];if(i==n||o!==r){var r=o;mr(o)?Ve.call(e,o,1):lo(e,o)}}return e}function qn(e,t){return e+ht(yi()*(t-e+1))}function Gn(e,t){var i="";if(!e||t<1||t>p)return i;do{t%2&&(i+=e),(t=ht(t/2))&&(e+=e)}while(t);return i}function Vn(e,t){return Pr(Cr(e,t,il),e+"")}function Zn(e){return Zi(Es(e))}function Jn(e,t){var i=Es(e);return Lr(i,rn(t,0,i.length))}function Kn(e,t,i,n){if(!Xa(e))return e;for(var r=-1,a=(t=vo(t,e)).length,s=a-1,l=e;null!=l&&++r<a;){var c=Dr(t[r]),d=i;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(r!=s){var p=l[c];(d=n?n(p,c,l):o)===o&&(d=Xa(p)?p:mr(t[r+1])?[]:{})}Qi(l,c,d),l=l[c]}return e}var Yn=_i?function(e,t){return _i.set(e,t),e}:il,Qn=et?function(e,t){return et(e,"toString",{configurable:!0,enumerable:!1,value:Xs(t),writable:!0})}:il;function Xn(e){return Lr(Es(e))}function eo(e,t,i){var o=-1,r=e.length;t<0&&(t=-t>r?0:r+t),(i=i>r?r:i)<0&&(i+=r),r=t>i?0:i-t>>>0,t>>>=0;for(var a=n(r);++o<r;)a[o]=e[o+t];return a}function to(e,t){var i;return dn(e,function(e,n,o){return!(i=t(e,n,o))}),!!i}function io(e,t,i){var n=0,o=null==e?n:e.length;if("number"==typeof t&&t==t&&o<=2147483647){for(;n<o;){var r=n+o>>>1,a=e[r];null!==a&&!ss(a)&&(i?a<=t:a<t)?n=r+1:o=r}return o}return no(e,t,il,i)}function no(e,t,i,n){var r=0,a=null==e?0:e.length;if(0===a)return 0;for(var s=(t=i(t))!=t,l=null===t,c=ss(t),d=t===o;r<a;){var p=ht((r+a)/2),u=i(e[p]),h=u!==o,f=null===u,g=u==u,m=ss(u);if(s)var v=n||g;else v=d?g&&(n||h):l?g&&h&&(n||!f):c?g&&h&&!f&&(n||!m):!f&&!m&&(n?u<=t:u<t);v?r=p+1:a=p}return mi(a,4294967294)}function oo(e,t){for(var i=-1,n=e.length,o=0,r=[];++i<n;){var a=e[i],s=t?t(a):a;if(!i||!Ea(s,l)){var l=s;r[o++]=0===a?0:a}}return r}function ro(e){return"number"==typeof e?e:ss(e)?u:+e}function ao(e){if("string"==typeof e)return e;if(Ba(e))return Rt(e,ao)+"";if(ss(e))return Di?Di.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function so(e,t,i){var n=-1,o=Pt,r=e.length,a=!0,s=[],l=s;if(i)a=!1,o=xt;else if(r>=200){var c=t?null:Vo(e);if(c)return si(c);a=!1,o=Yt,l=new qi}else l=t?[]:s;e:for(;++n<r;){var d=e[n],p=t?t(d):d;if(d=i||0!==d?d:0,a&&p==p){for(var u=l.length;u--;)if(l[u]===p)continue e;t&&l.push(p),s.push(d)}else o(l,p,i)||(l!==s&&l.push(p),s.push(d))}return s}function lo(e,t){return null==(e=Ar(e,t=vo(t,e)))||delete e[Dr(Jr(t))]}function co(e,t,i,n){return Kn(e,t,i(Sn(e,t)),n)}function po(e,t,i,n){for(var o=e.length,r=n?o:-1;(n?r--:++r<o)&&t(e[r],r,e););return i?eo(e,n?0:r,n?r+1:o):eo(e,n?r+1:0,n?o:r)}function uo(e,t){var i=e;return i instanceof zi&&(i=i.value()),Wt(t,function(e,t){return t.func.apply(t.thisArg,Lt([e],t.args))},i)}function ho(e,t,i){var o=e.length;if(o<2)return o?so(e[0]):[];for(var r=-1,a=n(o);++r<o;)for(var s=e[r],l=-1;++l<o;)l!=r&&(a[r]=cn(a[r]||s,e[l],t,i));return so(gn(a,1),t,i)}function fo(e,t,i){for(var n=-1,r=e.length,a=t.length,s={};++n<r;){var l=n<a?t[n]:o;i(s,e[n],l)}return s}function go(e){return Ga(e)?e:[]}function mo(e){return"function"==typeof e?e:il}function vo(e,t){return Ba(e)?e:wr(e,t)?[e]:Or(vs(e))}var wo=Vn;function yo(e,t,i){var n=e.length;return i=i===o?n:i,!t&&i>=n?e:eo(e,t,i)}var bo=at||function(e){return pt.clearTimeout(e)};function So(e,t){if(t)return e.slice();var i=e.length,n=Be?Be(i):new e.constructor(i);return e.copy(n),n}function ko(e){var t=new e.constructor(e.byteLength);return new Ne(t).set(new Ne(e)),t}function To(e,t){var i=t?ko(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.length)}function Co(e,t){if(e!==t){var i=e!==o,n=null===e,r=e==e,a=ss(e),s=t!==o,l=null===t,c=t==t,d=ss(t);if(!l&&!d&&!a&&e>t||a&&s&&c&&!l&&!d||n&&s&&c||!i&&c||!r)return 1;if(!n&&!a&&!d&&e<t||d&&i&&r&&!n&&!a||l&&i&&r||!s&&r||!c)return-1}return 0}function Ao(e,t,i,o){for(var r=-1,a=e.length,s=i.length,l=-1,c=t.length,d=gi(a-s,0),p=n(c+d),u=!o;++l<c;)p[l]=t[l];for(;++r<s;)(u||r<a)&&(p[i[r]]=e[r]);for(;d--;)p[l++]=e[r++];return p}function Io(e,t,i,o){for(var r=-1,a=e.length,s=-1,l=i.length,c=-1,d=t.length,p=gi(a-l,0),u=n(p+d),h=!o;++r<p;)u[r]=e[r];for(var f=r;++c<d;)u[f+c]=t[c];for(;++s<l;)(h||r<a)&&(u[f+i[s]]=e[r++]);return u}function _o(e,t){var i=-1,o=e.length;for(t||(t=n(o));++i<o;)t[i]=e[i];return t}function Fo(e,t,i,n){var r=!i;i||(i={});for(var a=-1,s=t.length;++a<s;){var l=t[a],c=n?n(i[l],e[l],l,i,e):o;c===o&&(c=e[l]),r?nn(i,l,c):Qi(i,l,c)}return i}function Po(e,t){return function(i,n){var o=Ba(i)?Ct:en,r=t?t():{};return o(i,e,ar(n,2),r)}}function xo(e){return Vn(function(t,i){var n=-1,r=i.length,a=r>1?i[r-1]:o,s=r>2?i[2]:o;for(a=e.length>3&&"function"==typeof a?(r--,a):o,s&&vr(i[0],i[1],s)&&(a=r<3?o:a,r=1),t=Ce(t);++n<r;){var l=i[n];l&&e(t,l,n,a)}return t})}function Ro(e,t){return function(i,n){if(null==i)return i;if(!qa(i))return e(i,n);for(var o=i.length,r=t?o:-1,a=Ce(i);(t?r--:++r<o)&&!1!==n(a[r],r,a););return i}}function Lo(e){return function(t,i,n){for(var o=-1,r=Ce(t),a=n(t),s=a.length;s--;){var l=a[e?s:++o];if(!1===i(r[l],l,r))break}return t}}function Wo(e){return function(t){var i=ni(t=vs(t))?di(t):o,n=i?i[0]:t.charAt(0),r=i?yo(i,1).join(""):t.slice(1);return n[e]()+r}}function jo(e){return function(t){return Wt(Ks(Ns(t).replace(Ke,"")),e,"")}}function Oo(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var i=$i(e.prototype),n=e.apply(i,t);return Xa(n)?n:i}}function Do(e){return function(t,i,n){var r=Ce(t);if(!qa(t)){var a=ar(i,3);t=xs(t),i=function(e){return a(r[e],e,r)}}var s=e(t,i,n);return s>-1?r[a?t[s]:s]:o}}function Mo(e){return er(function(t){var i=t.length,n=i,a=Ui.prototype.thru;for(e&&t.reverse();n--;){var s=t[n];if("function"!=typeof s)throw new _e(r);if(a&&!l&&"wrapper"==or(s))var l=new Ui([],!0)}for(n=l?n:i;++n<i;){var c=or(s=t[n]),d="wrapper"==c?nr(s):o;l=d&&yr(d[0])&&424==d[1]&&!d[4].length&&1==d[9]?l[or(d[0])].apply(l,d[3]):1==s.length&&yr(s)?l[c]():l.thru(s)}return function(){var e=arguments,n=e[0];if(l&&1==e.length&&Ba(n))return l.plant(n).value();for(var o=0,r=i?t[o].apply(this,e):n;++o<i;)r=t[o].call(this,r);return r}})}function $o(e,t,i,r,a,s,l,d,p,u){var h=t&c,f=1&t,g=2&t,m=24&t,v=512&t,w=g?o:Oo(e);return function c(){for(var y=arguments.length,b=n(y),S=y;S--;)b[S]=arguments[S];if(m)var k=rr(c),T=function(e,t){for(var i=e.length,n=0;i--;)e[i]===t&&++n;return n}(b,k);if(r&&(b=Ao(b,r,a,m)),s&&(b=Io(b,s,l,m)),y-=T,m&&y<u){var C=ai(b,k);return qo(e,t,$o,c.placeholder,i,b,C,d,p,u-y)}var A=f?i:this,I=g?A[e]:e;return y=b.length,d?b=function(e,t){for(var i=e.length,n=mi(t.length,i),r=_o(e);n--;){var a=t[n];e[n]=mr(a,i)?r[a]:o}return e}(b,d):v&&y>1&&b.reverse(),h&&p<y&&(b.length=p),this&&this!==pt&&this instanceof c&&(I=w||Oo(I)),I.apply(A,b)}}function Eo(e,t){return function(i,n){return function(e,t,i,n){return wn(e,function(e,o,r){t(n,i(e),o,r)}),n}(i,e,t(n),{})}}function Uo(e,t){return function(i,n){var r;if(i===o&&n===o)return t;if(i!==o&&(r=i),n!==o){if(r===o)return n;"string"==typeof i||"string"==typeof n?(i=ao(i),n=ao(n)):(i=ro(i),n=ro(n)),r=e(i,n)}return r}}function zo(e){return er(function(t){return t=Rt(t,Jt(ar())),Vn(function(i){var n=this;return e(t,function(e){return Tt(e,n,i)})})})}function No(e,t){var i=(t=t===o?" ":ao(t)).length;if(i<2)return i?Gn(t,e):t;var n=Gn(t,ut(e/ci(t)));return ni(t)?yo(di(n),0,e).join(""):n.slice(0,e)}function Bo(e){return function(t,i,r){return r&&"number"!=typeof r&&vr(t,i,r)&&(i=r=o),t=us(t),i===o?(i=t,t=0):i=us(i),function(e,t,i,o){for(var r=-1,a=gi(ut((t-e)/(i||1)),0),s=n(a);a--;)s[o?a:++r]=e,e+=i;return s}(t,i,r=r===o?t<i?1:-1:us(r),e)}}function Ho(e){return function(t,i){return"string"==typeof t&&"string"==typeof i||(t=gs(t),i=gs(i)),e(t,i)}}function qo(e,t,i,n,r,a,s,c,d,p){var u=8&t;t|=u?l:64,4&(t&=~(u?64:l))||(t&=-4);var h=[e,t,r,u?a:o,u?s:o,u?o:a,u?o:s,c,d,p],f=i.apply(o,h);return yr(e)&&_r(f,h),f.placeholder=n,xr(f,e,t)}function Go(e){var t=Te[e];return function(e,i){if(e=gs(e),(i=null==i?0:mi(hs(i),292))&&Dt(e)){var n=(vs(e)+"e").split("e");return+((n=(vs(t(n[0]+"e"+(+n[1]+i)))+"e").split("e"))[0]+"e"+(+n[1]-i))}return t(e)}}var Vo=Ci&&1/si(new Ci([,-0]))[1]==d?function(e){return new Ci(e)}:sl;function Zo(e){return function(t){var i=ur(t);return i==k?oi(t):i==_?li(t):function(e,t){return Rt(t,function(t){return[t,e[t]]})}(t,e(t))}}function Jo(e,t,i,a,d,p,u,h){var f=2&t;if(!f&&"function"!=typeof e)throw new _e(r);var g=a?a.length:0;if(g||(t&=-97,a=d=o),u=u===o?u:gi(hs(u),0),h=h===o?h:hs(h),g-=d?d.length:0,64&t){var m=a,v=d;a=d=o}var w=f?o:nr(e),y=[e,t,i,a,d,m,v,p,u,h];if(w&&function(e,t){var i=e[1],n=t[1],o=i|n,r=o<131,a=n==c&&8==i||n==c&&256==i&&e[7].length<=t[8]||384==n&&t[7].length<=t[8]&&8==i;if(!r&&!a)return e;1&n&&(e[2]=t[2],o|=1&i?0:4);var l=t[3];if(l){var d=e[3];e[3]=d?Ao(d,l,t[4]):l,e[4]=d?ai(e[3],s):t[4]}(l=t[5])&&(d=e[5],e[5]=d?Io(d,l,t[6]):l,e[6]=d?ai(e[5],s):t[6]),(l=t[7])&&(e[7]=l),n&c&&(e[8]=null==e[8]?t[8]:mi(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=o}(y,w),e=y[0],t=y[1],i=y[2],a=y[3],d=y[4],!(h=y[9]=y[9]===o?f?0:e.length:gi(y[9]-g,0))&&24&t&&(t&=-25),t&&1!=t)b=8==t||16==t?function(e,t,i){var r=Oo(e);return function a(){for(var s=arguments.length,l=n(s),c=s,d=rr(a);c--;)l[c]=arguments[c];var p=s<3&&l[0]!==d&&l[s-1]!==d?[]:ai(l,d);return(s-=p.length)<i?qo(e,t,$o,a.placeholder,o,l,p,o,o,i-s):Tt(this&&this!==pt&&this instanceof a?r:e,this,l)}}(e,t,h):t!=l&&33!=t||d.length?$o.apply(o,y):function(e,t,i,o){var r=1&t,a=Oo(e);return function t(){for(var s=-1,l=arguments.length,c=-1,d=o.length,p=n(d+l),u=this&&this!==pt&&this instanceof t?a:e;++c<d;)p[c]=o[c];for(;l--;)p[c++]=arguments[++s];return Tt(u,r?i:this,p)}}(e,t,i,a);else var b=function(e,t,i){var n=1&t,o=Oo(e);return function t(){return(this&&this!==pt&&this instanceof t?o:e).apply(n?i:this,arguments)}}(e,t,i);return xr((w?Yn:_r)(b,y),e,t)}function Ko(e,t,i,n){return e===o||Ea(e,xe[i])&&!We.call(n,i)?t:e}function Yo(e,t,i,n,r,a){return Xa(e)&&Xa(t)&&(a.set(t,e),En(e,t,o,Yo,a),a.delete(t)),e}function Qo(e){return ns(e)?o:e}function Xo(e,t,i,n,r,a){var s=1&i,l=e.length,c=t.length;if(l!=c&&!(s&&c>l))return!1;var d=a.get(e),p=a.get(t);if(d&&p)return d==t&&p==e;var u=-1,h=!0,f=2&i?new qi:o;for(a.set(e,t),a.set(t,e);++u<l;){var g=e[u],m=t[u];if(n)var v=s?n(m,g,u,t,e,a):n(g,m,u,e,t,a);if(v!==o){if(v)continue;h=!1;break}if(f){if(!Ot(t,function(e,t){if(!Yt(f,t)&&(g===e||r(g,e,i,n,a)))return f.push(t)})){h=!1;break}}else if(g!==m&&!r(g,m,i,n,a)){h=!1;break}}return a.delete(e),a.delete(t),h}function er(e){return Pr(Cr(e,o,Hr),e+"")}function tr(e){return kn(e,xs,dr)}function ir(e){return kn(e,Rs,pr)}var nr=_i?function(e){return _i.get(e)}:sl;function or(e){for(var t=e.name+"",i=Fi[t],n=We.call(Fi,t)?i.length:0;n--;){var o=i[n],r=o.func;if(null==r||r==e)return o.name}return t}function rr(e){return(We.call(Mi,"placeholder")?Mi:e).placeholder}function ar(){var e=Mi.iteratee||nl;return e=e===nl?Wn:e,arguments.length?e(arguments[0],arguments[1]):e}function sr(e,t){var i,n,o=e.__data__;return("string"==(n=typeof(i=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==i:null===i)?o["string"==typeof t?"string":"hash"]:o.map}function lr(e){for(var t=xs(e),i=t.length;i--;){var n=t[i],o=e[n];t[i]=[n,o,kr(o)]}return t}function cr(e,t){var i=function(e,t){return null==e?o:e[t]}(e,t);return Ln(i)?i:o}var dr=gt?function(e){return null==e?[]:(e=Ce(e),Ft(gt(e),function(t){return Ge.call(e,t)}))}:fl,pr=gt?function(e){for(var t=[];e;)Lt(t,dr(e)),e=He(e);return t}:fl,ur=Tn;function hr(e,t,i){for(var n=-1,o=(t=vo(t,e)).length,r=!1;++n<o;){var a=Dr(t[n]);if(!(r=null!=e&&i(e,a)))break;e=e[a]}return r||++n!=o?r:!!(o=null==e?0:e.length)&&Qa(o)&&mr(a,o)&&(Ba(e)||Na(e))}function fr(e){return"function"!=typeof e.constructor||Sr(e)?{}:$i(He(e))}function gr(e){return Ba(e)||Na(e)||!!(Ze&&e&&e[Ze])}function mr(e,t){var i=typeof e;return!!(t=null==t?p:t)&&("number"==i||"symbol"!=i&&ve.test(e))&&e>-1&&e%1==0&&e<t}function vr(e,t,i){if(!Xa(i))return!1;var n=typeof t;return!!("number"==n?qa(i)&&mr(t,i.length):"string"==n&&t in i)&&Ea(i[t],e)}function wr(e,t){if(Ba(e))return!1;var i=typeof e;return!("number"!=i&&"symbol"!=i&&"boolean"!=i&&null!=e&&!ss(e))||X.test(e)||!Q.test(e)||null!=t&&e in Ce(t)}function yr(e){var t=or(e),i=Mi[t];if("function"!=typeof i||!(t in zi.prototype))return!1;if(e===i)return!0;var n=nr(i);return!!n&&e===n[0]}(Si&&ur(new Si(new ArrayBuffer(1)))!=L||ki&&ur(new ki)!=k||Ti&&ur(Ti.resolve())!=A||Ci&&ur(new Ci)!=_||Ai&&ur(new Ai)!=x)&&(ur=function(e){var t=Tn(e),i=t==C?e.constructor:o,n=i?Mr(i):"";if(n)switch(n){case Pi:return L;case xi:return k;case Ri:return A;case Li:return _;case Wi:return x}return t});var br=Re?Ka:gl;function Sr(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||xe)}function kr(e){return e==e&&!Xa(e)}function Tr(e,t){return function(i){return null!=i&&i[e]===t&&(t!==o||e in Ce(i))}}function Cr(e,t,i){return t=gi(t===o?e.length-1:t,0),function(){for(var o=arguments,r=-1,a=gi(o.length-t,0),s=n(a);++r<a;)s[r]=o[t+r];r=-1;for(var l=n(t+1);++r<t;)l[r]=o[r];return l[t]=i(s),Tt(e,this,l)}}function Ar(e,t){return t.length<2?e:Sn(e,eo(t,0,-1))}function Ir(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var _r=Rr(Yn),Fr=dt||function(e,t){return pt.setTimeout(e,t)},Pr=Rr(Qn);function xr(e,t,i){var n=t+"";return Pr(e,function(e,t){var i=t.length;if(!i)return e;var n=i-1;return t[n]=(i>1?"& ":"")+t[n],t=t.join(i>2?", ":" "),e.replace(re,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){return At(f,function(i){var n="_."+i[0];t&i[1]&&!Pt(e,n)&&e.push(n)}),e.sort()}(function(e){var t=e.match(ae);return t?t[1].split(se):[]}(n),i)))}function Rr(e){var t=0,i=0;return function(){var n=vi(),r=16-(n-i);if(i=n,r>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(o,arguments)}}function Lr(e,t){var i=-1,n=e.length,r=n-1;for(t=t===o?n:t;++i<t;){var a=qn(i,r),s=e[a];e[a]=e[i],e[i]=s}return e.length=t,e}var Wr,jr,Or=(Wr=Wa(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,function(e,i,n,o){t.push(n?o.replace(de,"$1"):i||e)}),t},function(e){return 500===jr.size&&jr.clear(),e}),jr=Wr.cache,Wr);function Dr(e){if("string"==typeof e||ss(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Mr(e){if(null!=e){try{return Le.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function $r(e){if(e instanceof zi)return e.clone();var t=new Ui(e.__wrapped__,e.__chain__);return t.__actions__=_o(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Er=Vn(function(e,t){return Ga(e)?cn(e,gn(t,1,Ga,!0)):[]}),Ur=Vn(function(e,t){var i=Jr(t);return Ga(i)&&(i=o),Ga(e)?cn(e,gn(t,1,Ga,!0),ar(i,2)):[]}),zr=Vn(function(e,t){var i=Jr(t);return Ga(i)&&(i=o),Ga(e)?cn(e,gn(t,1,Ga,!0),o,i):[]});function Nr(e,t,i){var n=null==e?0:e.length;if(!n)return-1;var o=null==i?0:hs(i);return o<0&&(o=gi(n+o,0)),$t(e,ar(t,3),o)}function Br(e,t,i){var n=null==e?0:e.length;if(!n)return-1;var r=n-1;return i!==o&&(r=hs(i),r=i<0?gi(n+r,0):mi(r,n-1)),$t(e,ar(t,3),r,!0)}function Hr(e){return null!=e&&e.length?gn(e,1):[]}function qr(e){return e&&e.length?e[0]:o}var Gr=Vn(function(e){var t=Rt(e,go);return t.length&&t[0]===e[0]?_n(t):[]}),Vr=Vn(function(e){var t=Jr(e),i=Rt(e,go);return t===Jr(i)?t=o:i.pop(),i.length&&i[0]===e[0]?_n(i,ar(t,2)):[]}),Zr=Vn(function(e){var t=Jr(e),i=Rt(e,go);return(t="function"==typeof t?t:o)&&i.pop(),i.length&&i[0]===e[0]?_n(i,o,t):[]});function Jr(e){var t=null==e?0:e.length;return t?e[t-1]:o}var Kr=Vn(Yr);function Yr(e,t){return e&&e.length&&t&&t.length?Bn(e,t):e}var Qr=er(function(e,t){var i=null==e?0:e.length,n=on(e,t);return Hn(e,Rt(t,function(e){return mr(e,i)?+e:e}).sort(Co)),n});function Xr(e){return null==e?e:bi.call(e)}var ea=Vn(function(e){return so(gn(e,1,Ga,!0))}),ta=Vn(function(e){var t=Jr(e);return Ga(t)&&(t=o),so(gn(e,1,Ga,!0),ar(t,2))}),ia=Vn(function(e){var t=Jr(e);return t="function"==typeof t?t:o,so(gn(e,1,Ga,!0),o,t)});function na(e){if(!e||!e.length)return[];var t=0;return e=Ft(e,function(e){if(Ga(e))return t=gi(e.length,t),!0}),Vt(t,function(t){return Rt(e,Bt(t))})}function oa(e,t){if(!e||!e.length)return[];var i=na(e);return null==t?i:Rt(i,function(e){return Tt(t,o,e)})}var ra=Vn(function(e,t){return Ga(e)?cn(e,t):[]}),aa=Vn(function(e){return ho(Ft(e,Ga))}),sa=Vn(function(e){var t=Jr(e);return Ga(t)&&(t=o),ho(Ft(e,Ga),ar(t,2))}),la=Vn(function(e){var t=Jr(e);return t="function"==typeof t?t:o,ho(Ft(e,Ga),o,t)}),ca=Vn(na),da=Vn(function(e){var t=e.length,i=t>1?e[t-1]:o;return i="function"==typeof i?(e.pop(),i):o,oa(e,i)});function pa(e){var t=Mi(e);return t.__chain__=!0,t}function ua(e,t){return t(e)}var ha=er(function(e){var t=e.length,i=t?e[0]:0,n=this.__wrapped__,r=function(t){return on(t,e)};return!(t>1||this.__actions__.length)&&n instanceof zi&&mr(i)?((n=n.slice(i,+i+(t?1:0))).__actions__.push({func:ua,args:[r],thisArg:o}),new Ui(n,this.__chain__).thru(function(e){return t&&!e.length&&e.push(o),e})):this.thru(r)}),fa=Po(function(e,t,i){We.call(e,i)?++e[i]:nn(e,i,1)}),ga=Do(Nr),ma=Do(Br);function va(e,t){return(Ba(e)?At:dn)(e,ar(t,3))}function wa(e,t){return(Ba(e)?It:pn)(e,ar(t,3))}var ya=Po(function(e,t,i){We.call(e,i)?e[i].push(t):nn(e,i,[t])}),ba=Vn(function(e,t,i){var o=-1,r="function"==typeof t,a=qa(e)?n(e.length):[];return dn(e,function(e){a[++o]=r?Tt(t,e,i):Fn(e,t,i)}),a}),Sa=Po(function(e,t,i){nn(e,i,t)});function ka(e,t){return(Ba(e)?Rt:Dn)(e,ar(t,3))}var Ta=Po(function(e,t,i){e[i?0:1].push(t)},function(){return[[],[]]}),Ca=Vn(function(e,t){if(null==e)return[];var i=t.length;return i>1&&vr(e,t[0],t[1])?t=[]:i>2&&vr(t[0],t[1],t[2])&&(t=[t[0]]),zn(e,gn(t,1),[])}),Aa=ct||function(){return pt.Date.now()};function Ia(e,t,i){return t=i?o:t,t=e&&null==t?e.length:t,Jo(e,c,o,o,o,o,t)}function _a(e,t){var i;if("function"!=typeof t)throw new _e(r);return e=hs(e),function(){return--e>0&&(i=t.apply(this,arguments)),e<=1&&(t=o),i}}var Fa=Vn(function(e,t,i){var n=1;if(i.length){var o=ai(i,rr(Fa));n|=l}return Jo(e,n,t,i,o)}),Pa=Vn(function(e,t,i){var n=3;if(i.length){var o=ai(i,rr(Pa));n|=l}return Jo(t,n,e,i,o)});function xa(e,t,i){var n,a,s,l,c,d,p=0,u=!1,h=!1,f=!0;if("function"!=typeof e)throw new _e(r);function g(t){var i=n,r=a;return n=a=o,p=t,l=e.apply(r,i)}function m(e){var i=e-d;return d===o||i>=t||i<0||h&&e-p>=s}function v(){var e=Aa();if(m(e))return w(e);c=Fr(v,function(e){var i=t-(e-d);return h?mi(i,s-(e-p)):i}(e))}function w(e){return c=o,f&&n?g(e):(n=a=o,l)}function y(){var e=Aa(),i=m(e);if(n=arguments,a=this,d=e,i){if(c===o)return function(e){return p=e,c=Fr(v,t),u?g(e):l}(d);if(h)return bo(c),c=Fr(v,t),g(d)}return c===o&&(c=Fr(v,t)),l}return t=gs(t)||0,Xa(i)&&(u=!!i.leading,s=(h="maxWait"in i)?gi(gs(i.maxWait)||0,t):s,f="trailing"in i?!!i.trailing:f),y.cancel=function(){c!==o&&bo(c),p=0,n=d=a=c=o},y.flush=function(){return c===o?l:w(Aa())},y}var Ra=Vn(function(e,t){return ln(e,1,t)}),La=Vn(function(e,t,i){return ln(e,gs(t)||0,i)});function Wa(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new _e(r);var i=function(){var n=arguments,o=t?t.apply(this,n):n[0],r=i.cache;if(r.has(o))return r.get(o);var a=e.apply(this,n);return i.cache=r.set(o,a)||r,a};return i.cache=new(Wa.Cache||Hi),i}function ja(e){if("function"!=typeof e)throw new _e(r);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Wa.Cache=Hi;var Oa=wo(function(e,t){var i=(t=1==t.length&&Ba(t[0])?Rt(t[0],Jt(ar())):Rt(gn(t,1),Jt(ar()))).length;return Vn(function(n){for(var o=-1,r=mi(n.length,i);++o<r;)n[o]=t[o].call(this,n[o]);return Tt(e,this,n)})}),Da=Vn(function(e,t){var i=ai(t,rr(Da));return Jo(e,l,o,t,i)}),Ma=Vn(function(e,t){var i=ai(t,rr(Ma));return Jo(e,64,o,t,i)}),$a=er(function(e,t){return Jo(e,256,o,o,o,t)});function Ea(e,t){return e===t||e!=e&&t!=t}var Ua=Ho(Cn),za=Ho(function(e,t){return e>=t}),Na=Pn(function(){return arguments}())?Pn:function(e){return es(e)&&We.call(e,"callee")&&!Ge.call(e,"callee")},Ba=n.isArray,Ha=vt?Jt(vt):function(e){return es(e)&&Tn(e)==R};function qa(e){return null!=e&&Qa(e.length)&&!Ka(e)}function Ga(e){return es(e)&&qa(e)}var Va=mt||gl,Za=wt?Jt(wt):function(e){return es(e)&&Tn(e)==w};function Ja(e){if(!es(e))return!1;var t=Tn(e);return t==y||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!ns(e)}function Ka(e){if(!Xa(e))return!1;var t=Tn(e);return t==b||t==S||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ya(e){return"number"==typeof e&&e==hs(e)}function Qa(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=p}function Xa(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function es(e){return null!=e&&"object"==typeof e}var ts=yt?Jt(yt):function(e){return es(e)&&ur(e)==k};function is(e){return"number"==typeof e||es(e)&&Tn(e)==T}function ns(e){if(!es(e)||Tn(e)!=C)return!1;var t=He(e);if(null===t)return!0;var i=We.call(t,"constructor")&&t.constructor;return"function"==typeof i&&i instanceof i&&Le.call(i)==Me}var os=bt?Jt(bt):function(e){return es(e)&&Tn(e)==I},rs=St?Jt(St):function(e){return es(e)&&ur(e)==_};function as(e){return"string"==typeof e||!Ba(e)&&es(e)&&Tn(e)==F}function ss(e){return"symbol"==typeof e||es(e)&&Tn(e)==P}var ls=kt?Jt(kt):function(e){return es(e)&&Qa(e.length)&&!!ot[Tn(e)]},cs=Ho(On),ds=Ho(function(e,t){return e<=t});function ps(e){if(!e)return[];if(qa(e))return as(e)?di(e):_o(e);if(Je&&e[Je])return function(e){for(var t,i=[];!(t=e.next()).done;)i.push(t.value);return i}(e[Je]());var t=ur(e);return(t==k?oi:t==_?si:Es)(e)}function us(e){return e?(e=gs(e))===d||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function hs(e){var t=us(e),i=t%1;return t==t?i?t-i:t:0}function fs(e){return e?rn(hs(e),0,h):0}function gs(e){if("number"==typeof e)return e;if(ss(e))return u;if(Xa(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Xa(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Zt(e);var i=fe.test(e);return i||me.test(e)?lt(e.slice(2),i?2:8):he.test(e)?u:+e}function ms(e){return Fo(e,Rs(e))}function vs(e){return null==e?"":ao(e)}var ws=xo(function(e,t){if(Sr(t)||qa(t))Fo(t,xs(t),e);else for(var i in t)We.call(t,i)&&Qi(e,i,t[i])}),ys=xo(function(e,t){Fo(t,Rs(t),e)}),bs=xo(function(e,t,i,n){Fo(t,Rs(t),e,n)}),Ss=xo(function(e,t,i,n){Fo(t,xs(t),e,n)}),ks=er(on),Ts=Vn(function(e,t){e=Ce(e);var i=-1,n=t.length,r=n>2?t[2]:o;for(r&&vr(t[0],t[1],r)&&(n=1);++i<n;)for(var a=t[i],s=Rs(a),l=-1,c=s.length;++l<c;){var d=s[l],p=e[d];(p===o||Ea(p,xe[d])&&!We.call(e,d))&&(e[d]=a[d])}return e}),Cs=Vn(function(e){return e.push(o,Yo),Tt(Ws,o,e)});function As(e,t,i){var n=null==e?o:Sn(e,t);return n===o?i:n}function Is(e,t){return null!=e&&hr(e,t,In)}var _s=Eo(function(e,t,i){null!=t&&"function"!=typeof t.toString&&(t=De.call(t)),e[t]=i},Xs(il)),Fs=Eo(function(e,t,i){null!=t&&"function"!=typeof t.toString&&(t=De.call(t)),We.call(e,t)?e[t].push(i):e[t]=[i]},ar),Ps=Vn(Fn);function xs(e){return qa(e)?Vi(e):jn(e)}function Rs(e){return qa(e)?Vi(e,!0):function(e){if(!Xa(e))return function(e){var t=[];if(null!=e)for(var i in Ce(e))t.push(i);return t}(e);var t=Sr(e),i=[];for(var n in e)("constructor"!=n||!t&&We.call(e,n))&&i.push(n);return i}(e)}var Ls=xo(function(e,t,i){En(e,t,i)}),Ws=xo(function(e,t,i,n){En(e,t,i,n)}),js=er(function(e,t){var i={};if(null==e)return i;var n=!1;t=Rt(t,function(t){return t=vo(t,e),n||(n=t.length>1),t}),Fo(e,ir(e),i),n&&(i=an(i,7,Qo));for(var o=t.length;o--;)lo(i,t[o]);return i}),Os=er(function(e,t){return null==e?{}:function(e,t){return Nn(e,t,function(t,i){return Is(e,i)})}(e,t)});function Ds(e,t){if(null==e)return{};var i=Rt(ir(e),function(e){return[e]});return t=ar(t),Nn(e,i,function(e,i){return t(e,i[0])})}var Ms=Zo(xs),$s=Zo(Rs);function Es(e){return null==e?[]:Kt(e,xs(e))}var Us=jo(function(e,t,i){return t=t.toLowerCase(),e+(i?zs(t):t)});function zs(e){return Js(vs(e).toLowerCase())}function Ns(e){return(e=vs(e))&&e.replace(we,ei).replace(Ye,"")}var Bs=jo(function(e,t,i){return e+(i?"-":"")+t.toLowerCase()}),Hs=jo(function(e,t,i){return e+(i?" ":"")+t.toLowerCase()}),qs=Wo("toLowerCase"),Gs=jo(function(e,t,i){return e+(i?"_":"")+t.toLowerCase()}),Vs=jo(function(e,t,i){return e+(i?" ":"")+Js(t)}),Zs=jo(function(e,t,i){return e+(i?" ":"")+t.toUpperCase()}),Js=Wo("toUpperCase");function Ks(e,t,i){return e=vs(e),(t=i?o:t)===o?function(e){return tt.test(e)}(e)?function(e){return e.match(Xe)||[]}(e):function(e){return e.match(le)||[]}(e):e.match(t)||[]}var Ys=Vn(function(e,t){try{return Tt(e,o,t)}catch(e){return Ja(e)?e:new Se(e)}}),Qs=er(function(e,t){return At(t,function(t){t=Dr(t),nn(e,t,Fa(e[t],e))}),e});function Xs(e){return function(){return e}}var el=Mo(),tl=Mo(!0);function il(e){return e}function nl(e){return Wn("function"==typeof e?e:an(e,1))}var ol=Vn(function(e,t){return function(i){return Fn(i,e,t)}}),rl=Vn(function(e,t){return function(i){return Fn(e,i,t)}});function al(e,t,i){var n=xs(t),o=bn(t,n);null!=i||Xa(t)&&(o.length||!n.length)||(i=t,t=e,e=this,o=bn(t,xs(t)));var r=!(Xa(i)&&"chain"in i&&!i.chain),a=Ka(e);return At(o,function(i){var n=t[i];e[i]=n,a&&(e.prototype[i]=function(){var t=this.__chain__;if(r||t){var i=e(this.__wrapped__);return(i.__actions__=_o(this.__actions__)).push({func:n,args:arguments,thisArg:e}),i.__chain__=t,i}return n.apply(e,Lt([this.value()],arguments))})}),e}function sl(){}var ll=zo(Rt),cl=zo(_t),dl=zo(Ot);function pl(e){return wr(e)?Bt(Dr(e)):function(e){return function(t){return Sn(t,e)}}(e)}var ul=Bo(),hl=Bo(!0);function fl(){return[]}function gl(){return!1}var ml,vl=Uo(function(e,t){return e+t},0),wl=Go("ceil"),yl=Uo(function(e,t){return e/t},1),bl=Go("floor"),Sl=Uo(function(e,t){return e*t},1),kl=Go("round"),Tl=Uo(function(e,t){return e-t},0);return Mi.after=function(e,t){if("function"!=typeof t)throw new _e(r);return e=hs(e),function(){if(--e<1)return t.apply(this,arguments)}},Mi.ary=Ia,Mi.assign=ws,Mi.assignIn=ys,Mi.assignInWith=bs,Mi.assignWith=Ss,Mi.at=ks,Mi.before=_a,Mi.bind=Fa,Mi.bindAll=Qs,Mi.bindKey=Pa,Mi.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ba(e)?e:[e]},Mi.chain=pa,Mi.chunk=function(e,t,i){t=(i?vr(e,t,i):t===o)?1:gi(hs(t),0);var r=null==e?0:e.length;if(!r||t<1)return[];for(var a=0,s=0,l=n(ut(r/t));a<r;)l[s++]=eo(e,a,a+=t);return l},Mi.compact=function(e){for(var t=-1,i=null==e?0:e.length,n=0,o=[];++t<i;){var r=e[t];r&&(o[n++]=r)}return o},Mi.concat=function(){var e=arguments.length;if(!e)return[];for(var t=n(e-1),i=arguments[0],o=e;o--;)t[o-1]=arguments[o];return Lt(Ba(i)?_o(i):[i],gn(t,1))},Mi.cond=function(e){var t=null==e?0:e.length,i=ar();return e=t?Rt(e,function(e){if("function"!=typeof e[1])throw new _e(r);return[i(e[0]),e[1]]}):[],Vn(function(i){for(var n=-1;++n<t;){var o=e[n];if(Tt(o[0],this,i))return Tt(o[1],this,i)}})},Mi.conforms=function(e){return function(e){var t=xs(e);return function(i){return sn(i,e,t)}}(an(e,1))},Mi.constant=Xs,Mi.countBy=fa,Mi.create=function(e,t){var i=$i(e);return null==t?i:tn(i,t)},Mi.curry=function e(t,i,n){var r=Jo(t,8,o,o,o,o,o,i=n?o:i);return r.placeholder=e.placeholder,r},Mi.curryRight=function e(t,i,n){var r=Jo(t,16,o,o,o,o,o,i=n?o:i);return r.placeholder=e.placeholder,r},Mi.debounce=xa,Mi.defaults=Ts,Mi.defaultsDeep=Cs,Mi.defer=Ra,Mi.delay=La,Mi.difference=Er,Mi.differenceBy=Ur,Mi.differenceWith=zr,Mi.drop=function(e,t,i){var n=null==e?0:e.length;return n?eo(e,(t=i||t===o?1:hs(t))<0?0:t,n):[]},Mi.dropRight=function(e,t,i){var n=null==e?0:e.length;return n?eo(e,0,(t=n-(t=i||t===o?1:hs(t)))<0?0:t):[]},Mi.dropRightWhile=function(e,t){return e&&e.length?po(e,ar(t,3),!0,!0):[]},Mi.dropWhile=function(e,t){return e&&e.length?po(e,ar(t,3),!0):[]},Mi.fill=function(e,t,i,n){var r=null==e?0:e.length;return r?(i&&"number"!=typeof i&&vr(e,t,i)&&(i=0,n=r),function(e,t,i,n){var r=e.length;for((i=hs(i))<0&&(i=-i>r?0:r+i),(n=n===o||n>r?r:hs(n))<0&&(n+=r),n=i>n?0:fs(n);i<n;)e[i++]=t;return e}(e,t,i,n)):[]},Mi.filter=function(e,t){return(Ba(e)?Ft:fn)(e,ar(t,3))},Mi.flatMap=function(e,t){return gn(ka(e,t),1)},Mi.flatMapDeep=function(e,t){return gn(ka(e,t),d)},Mi.flatMapDepth=function(e,t,i){return i=i===o?1:hs(i),gn(ka(e,t),i)},Mi.flatten=Hr,Mi.flattenDeep=function(e){return null!=e&&e.length?gn(e,d):[]},Mi.flattenDepth=function(e,t){return null!=e&&e.length?gn(e,t=t===o?1:hs(t)):[]},Mi.flip=function(e){return Jo(e,512)},Mi.flow=el,Mi.flowRight=tl,Mi.fromPairs=function(e){for(var t=-1,i=null==e?0:e.length,n={};++t<i;){var o=e[t];n[o[0]]=o[1]}return n},Mi.functions=function(e){return null==e?[]:bn(e,xs(e))},Mi.functionsIn=function(e){return null==e?[]:bn(e,Rs(e))},Mi.groupBy=ya,Mi.initial=function(e){return null!=e&&e.length?eo(e,0,-1):[]},Mi.intersection=Gr,Mi.intersectionBy=Vr,Mi.intersectionWith=Zr,Mi.invert=_s,Mi.invertBy=Fs,Mi.invokeMap=ba,Mi.iteratee=nl,Mi.keyBy=Sa,Mi.keys=xs,Mi.keysIn=Rs,Mi.map=ka,Mi.mapKeys=function(e,t){var i={};return t=ar(t,3),wn(e,function(e,n,o){nn(i,t(e,n,o),e)}),i},Mi.mapValues=function(e,t){var i={};return t=ar(t,3),wn(e,function(e,n,o){nn(i,n,t(e,n,o))}),i},Mi.matches=function(e){return Mn(an(e,1))},Mi.matchesProperty=function(e,t){return $n(e,an(t,1))},Mi.memoize=Wa,Mi.merge=Ls,Mi.mergeWith=Ws,Mi.method=ol,Mi.methodOf=rl,Mi.mixin=al,Mi.negate=ja,Mi.nthArg=function(e){return e=hs(e),Vn(function(t){return Un(t,e)})},Mi.omit=js,Mi.omitBy=function(e,t){return Ds(e,ja(ar(t)))},Mi.once=function(e){return _a(2,e)},Mi.orderBy=function(e,t,i,n){return null==e?[]:(Ba(t)||(t=null==t?[]:[t]),Ba(i=n?o:i)||(i=null==i?[]:[i]),zn(e,t,i))},Mi.over=ll,Mi.overArgs=Oa,Mi.overEvery=cl,Mi.overSome=dl,Mi.partial=Da,Mi.partialRight=Ma,Mi.partition=Ta,Mi.pick=Os,Mi.pickBy=Ds,Mi.property=pl,Mi.propertyOf=function(e){return function(t){return null==e?o:Sn(e,t)}},Mi.pull=Kr,Mi.pullAll=Yr,Mi.pullAllBy=function(e,t,i){return e&&e.length&&t&&t.length?Bn(e,t,ar(i,2)):e},Mi.pullAllWith=function(e,t,i){return e&&e.length&&t&&t.length?Bn(e,t,o,i):e},Mi.pullAt=Qr,Mi.range=ul,Mi.rangeRight=hl,Mi.rearg=$a,Mi.reject=function(e,t){return(Ba(e)?Ft:fn)(e,ja(ar(t,3)))},Mi.remove=function(e,t){var i=[];if(!e||!e.length)return i;var n=-1,o=[],r=e.length;for(t=ar(t,3);++n<r;){var a=e[n];t(a,n,e)&&(i.push(a),o.push(n))}return Hn(e,o),i},Mi.rest=function(e,t){if("function"!=typeof e)throw new _e(r);return Vn(e,t=t===o?t:hs(t))},Mi.reverse=Xr,Mi.sampleSize=function(e,t,i){return t=(i?vr(e,t,i):t===o)?1:hs(t),(Ba(e)?Ji:Jn)(e,t)},Mi.set=function(e,t,i){return null==e?e:Kn(e,t,i)},Mi.setWith=function(e,t,i,n){return n="function"==typeof n?n:o,null==e?e:Kn(e,t,i,n)},Mi.shuffle=function(e){return(Ba(e)?Ki:Xn)(e)},Mi.slice=function(e,t,i){var n=null==e?0:e.length;return n?(i&&"number"!=typeof i&&vr(e,t,i)?(t=0,i=n):(t=null==t?0:hs(t),i=i===o?n:hs(i)),eo(e,t,i)):[]},Mi.sortBy=Ca,Mi.sortedUniq=function(e){return e&&e.length?oo(e):[]},Mi.sortedUniqBy=function(e,t){return e&&e.length?oo(e,ar(t,2)):[]},Mi.split=function(e,t,i){return i&&"number"!=typeof i&&vr(e,t,i)&&(t=i=o),(i=i===o?h:i>>>0)?(e=vs(e))&&("string"==typeof t||null!=t&&!os(t))&&!(t=ao(t))&&ni(e)?yo(di(e),0,i):e.split(t,i):[]},Mi.spread=function(e,t){if("function"!=typeof e)throw new _e(r);return t=null==t?0:gi(hs(t),0),Vn(function(i){var n=i[t],o=yo(i,0,t);return n&&Lt(o,n),Tt(e,this,o)})},Mi.tail=function(e){var t=null==e?0:e.length;return t?eo(e,1,t):[]},Mi.take=function(e,t,i){return e&&e.length?eo(e,0,(t=i||t===o?1:hs(t))<0?0:t):[]},Mi.takeRight=function(e,t,i){var n=null==e?0:e.length;return n?eo(e,(t=n-(t=i||t===o?1:hs(t)))<0?0:t,n):[]},Mi.takeRightWhile=function(e,t){return e&&e.length?po(e,ar(t,3),!1,!0):[]},Mi.takeWhile=function(e,t){return e&&e.length?po(e,ar(t,3)):[]},Mi.tap=function(e,t){return t(e),e},Mi.throttle=function(e,t,i){var n=!0,o=!0;if("function"!=typeof e)throw new _e(r);return Xa(i)&&(n="leading"in i?!!i.leading:n,o="trailing"in i?!!i.trailing:o),xa(e,t,{leading:n,maxWait:t,trailing:o})},Mi.thru=ua,Mi.toArray=ps,Mi.toPairs=Ms,Mi.toPairsIn=$s,Mi.toPath=function(e){return Ba(e)?Rt(e,Dr):ss(e)?[e]:_o(Or(vs(e)))},Mi.toPlainObject=ms,Mi.transform=function(e,t,i){var n=Ba(e),o=n||Va(e)||ls(e);if(t=ar(t,4),null==i){var r=e&&e.constructor;i=o?n?new r:[]:Xa(e)&&Ka(r)?$i(He(e)):{}}return(o?At:wn)(e,function(e,n,o){return t(i,e,n,o)}),i},Mi.unary=function(e){return Ia(e,1)},Mi.union=ea,Mi.unionBy=ta,Mi.unionWith=ia,Mi.uniq=function(e){return e&&e.length?so(e):[]},Mi.uniqBy=function(e,t){return e&&e.length?so(e,ar(t,2)):[]},Mi.uniqWith=function(e,t){return t="function"==typeof t?t:o,e&&e.length?so(e,o,t):[]},Mi.unset=function(e,t){return null==e||lo(e,t)},Mi.unzip=na,Mi.unzipWith=oa,Mi.update=function(e,t,i){return null==e?e:co(e,t,mo(i))},Mi.updateWith=function(e,t,i,n){return n="function"==typeof n?n:o,null==e?e:co(e,t,mo(i),n)},Mi.values=Es,Mi.valuesIn=function(e){return null==e?[]:Kt(e,Rs(e))},Mi.without=ra,Mi.words=Ks,Mi.wrap=function(e,t){return Da(mo(t),e)},Mi.xor=aa,Mi.xorBy=sa,Mi.xorWith=la,Mi.zip=ca,Mi.zipObject=function(e,t){return fo(e||[],t||[],Qi)},Mi.zipObjectDeep=function(e,t){return fo(e||[],t||[],Kn)},Mi.zipWith=da,Mi.entries=Ms,Mi.entriesIn=$s,Mi.extend=ys,Mi.extendWith=bs,al(Mi,Mi),Mi.add=vl,Mi.attempt=Ys,Mi.camelCase=Us,Mi.capitalize=zs,Mi.ceil=wl,Mi.clamp=function(e,t,i){return i===o&&(i=t,t=o),i!==o&&(i=(i=gs(i))==i?i:0),t!==o&&(t=(t=gs(t))==t?t:0),rn(gs(e),t,i)},Mi.clone=function(e){return an(e,4)},Mi.cloneDeep=function(e){return an(e,5)},Mi.cloneDeepWith=function(e,t){return an(e,5,t="function"==typeof t?t:o)},Mi.cloneWith=function(e,t){return an(e,4,t="function"==typeof t?t:o)},Mi.conformsTo=function(e,t){return null==t||sn(e,t,xs(t))},Mi.deburr=Ns,Mi.defaultTo=function(e,t){return null==e||e!=e?t:e},Mi.divide=yl,Mi.endsWith=function(e,t,i){e=vs(e),t=ao(t);var n=e.length,r=i=i===o?n:rn(hs(i),0,n);return(i-=t.length)>=0&&e.slice(i,r)==t},Mi.eq=Ea,Mi.escape=function(e){return(e=vs(e))&&Z.test(e)?e.replace(G,ti):e},Mi.escapeRegExp=function(e){return(e=vs(e))&&ie.test(e)?e.replace(te,"\\$&"):e},Mi.every=function(e,t,i){var n=Ba(e)?_t:un;return i&&vr(e,t,i)&&(t=o),n(e,ar(t,3))},Mi.find=ga,Mi.findIndex=Nr,Mi.findKey=function(e,t){return Mt(e,ar(t,3),wn)},Mi.findLast=ma,Mi.findLastIndex=Br,Mi.findLastKey=function(e,t){return Mt(e,ar(t,3),yn)},Mi.floor=bl,Mi.forEach=va,Mi.forEachRight=wa,Mi.forIn=function(e,t){return null==e?e:mn(e,ar(t,3),Rs)},Mi.forInRight=function(e,t){return null==e?e:vn(e,ar(t,3),Rs)},Mi.forOwn=function(e,t){return e&&wn(e,ar(t,3))},Mi.forOwnRight=function(e,t){return e&&yn(e,ar(t,3))},Mi.get=As,Mi.gt=Ua,Mi.gte=za,Mi.has=function(e,t){return null!=e&&hr(e,t,An)},Mi.hasIn=Is,Mi.head=qr,Mi.identity=il,Mi.includes=function(e,t,i,n){e=qa(e)?e:Es(e),i=i&&!n?hs(i):0;var o=e.length;return i<0&&(i=gi(o+i,0)),as(e)?i<=o&&e.indexOf(t,i)>-1:!!o&&Et(e,t,i)>-1},Mi.indexOf=function(e,t,i){var n=null==e?0:e.length;if(!n)return-1;var o=null==i?0:hs(i);return o<0&&(o=gi(n+o,0)),Et(e,t,o)},Mi.inRange=function(e,t,i){return t=us(t),i===o?(i=t,t=0):i=us(i),function(e,t,i){return e>=mi(t,i)&&e<gi(t,i)}(e=gs(e),t,i)},Mi.invoke=Ps,Mi.isArguments=Na,Mi.isArray=Ba,Mi.isArrayBuffer=Ha,Mi.isArrayLike=qa,Mi.isArrayLikeObject=Ga,Mi.isBoolean=function(e){return!0===e||!1===e||es(e)&&Tn(e)==v},Mi.isBuffer=Va,Mi.isDate=Za,Mi.isElement=function(e){return es(e)&&1===e.nodeType&&!ns(e)},Mi.isEmpty=function(e){if(null==e)return!0;if(qa(e)&&(Ba(e)||"string"==typeof e||"function"==typeof e.splice||Va(e)||ls(e)||Na(e)))return!e.length;var t=ur(e);if(t==k||t==_)return!e.size;if(Sr(e))return!jn(e).length;for(var i in e)if(We.call(e,i))return!1;return!0},Mi.isEqual=function(e,t){return xn(e,t)},Mi.isEqualWith=function(e,t,i){var n=(i="function"==typeof i?i:o)?i(e,t):o;return n===o?xn(e,t,o,i):!!n},Mi.isError=Ja,Mi.isFinite=function(e){return"number"==typeof e&&Dt(e)},Mi.isFunction=Ka,Mi.isInteger=Ya,Mi.isLength=Qa,Mi.isMap=ts,Mi.isMatch=function(e,t){return e===t||Rn(e,t,lr(t))},Mi.isMatchWith=function(e,t,i){return i="function"==typeof i?i:o,Rn(e,t,lr(t),i)},Mi.isNaN=function(e){return is(e)&&e!=+e},Mi.isNative=function(e){if(br(e))throw new Se("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Ln(e)},Mi.isNil=function(e){return null==e},Mi.isNull=function(e){return null===e},Mi.isNumber=is,Mi.isObject=Xa,Mi.isObjectLike=es,Mi.isPlainObject=ns,Mi.isRegExp=os,Mi.isSafeInteger=function(e){return Ya(e)&&e>=-9007199254740991&&e<=p},Mi.isSet=rs,Mi.isString=as,Mi.isSymbol=ss,Mi.isTypedArray=ls,Mi.isUndefined=function(e){return e===o},Mi.isWeakMap=function(e){return es(e)&&ur(e)==x},Mi.isWeakSet=function(e){return es(e)&&"[object WeakSet]"==Tn(e)},Mi.join=function(e,t){return null==e?"":Ht.call(e,t)},Mi.kebabCase=Bs,Mi.last=Jr,Mi.lastIndexOf=function(e,t,i){var n=null==e?0:e.length;if(!n)return-1;var r=n;return i!==o&&(r=(r=hs(i))<0?gi(n+r,0):mi(r,n-1)),t==t?function(e,t,i){for(var n=i+1;n--;)if(e[n]===t)return n;return n}(e,t,r):$t(e,zt,r,!0)},Mi.lowerCase=Hs,Mi.lowerFirst=qs,Mi.lt=cs,Mi.lte=ds,Mi.max=function(e){return e&&e.length?hn(e,il,Cn):o},Mi.maxBy=function(e,t){return e&&e.length?hn(e,ar(t,2),Cn):o},Mi.mean=function(e){return Nt(e,il)},Mi.meanBy=function(e,t){return Nt(e,ar(t,2))},Mi.min=function(e){return e&&e.length?hn(e,il,On):o},Mi.minBy=function(e,t){return e&&e.length?hn(e,ar(t,2),On):o},Mi.stubArray=fl,Mi.stubFalse=gl,Mi.stubObject=function(){return{}},Mi.stubString=function(){return""},Mi.stubTrue=function(){return!0},Mi.multiply=Sl,Mi.nth=function(e,t){return e&&e.length?Un(e,hs(t)):o},Mi.noConflict=function(){return pt._===this&&(pt._=$e),this},Mi.noop=sl,Mi.now=Aa,Mi.pad=function(e,t,i){e=vs(e);var n=(t=hs(t))?ci(e):0;if(!t||n>=t)return e;var o=(t-n)/2;return No(ht(o),i)+e+No(ut(o),i)},Mi.padEnd=function(e,t,i){e=vs(e);var n=(t=hs(t))?ci(e):0;return t&&n<t?e+No(t-n,i):e},Mi.padStart=function(e,t,i){e=vs(e);var n=(t=hs(t))?ci(e):0;return t&&n<t?No(t-n,i)+e:e},Mi.parseInt=function(e,t,i){return i||null==t?t=0:t&&(t=+t),wi(vs(e).replace(ne,""),t||0)},Mi.random=function(e,t,i){if(i&&"boolean"!=typeof i&&vr(e,t,i)&&(t=i=o),i===o&&("boolean"==typeof t?(i=t,t=o):"boolean"==typeof e&&(i=e,e=o)),e===o&&t===o?(e=0,t=1):(e=us(e),t===o?(t=e,e=0):t=us(t)),e>t){var n=e;e=t,t=n}if(i||e%1||t%1){var r=yi();return mi(e+r*(t-e+st("1e-"+((r+"").length-1))),t)}return qn(e,t)},Mi.reduce=function(e,t,i){var n=Ba(e)?Wt:qt,o=arguments.length<3;return n(e,ar(t,4),i,o,dn)},Mi.reduceRight=function(e,t,i){var n=Ba(e)?jt:qt,o=arguments.length<3;return n(e,ar(t,4),i,o,pn)},Mi.repeat=function(e,t,i){return t=(i?vr(e,t,i):t===o)?1:hs(t),Gn(vs(e),t)},Mi.replace=function(){var e=arguments,t=vs(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Mi.result=function(e,t,i){var n=-1,r=(t=vo(t,e)).length;for(r||(r=1,e=o);++n<r;){var a=null==e?o:e[Dr(t[n])];a===o&&(n=r,a=i),e=Ka(a)?a.call(e):a}return e},Mi.round=kl,Mi.runInContext=e,Mi.sample=function(e){return(Ba(e)?Zi:Zn)(e)},Mi.size=function(e){if(null==e)return 0;if(qa(e))return as(e)?ci(e):e.length;var t=ur(e);return t==k||t==_?e.size:jn(e).length},Mi.snakeCase=Gs,Mi.some=function(e,t,i){var n=Ba(e)?Ot:to;return i&&vr(e,t,i)&&(t=o),n(e,ar(t,3))},Mi.sortedIndex=function(e,t){return io(e,t)},Mi.sortedIndexBy=function(e,t,i){return no(e,t,ar(i,2))},Mi.sortedIndexOf=function(e,t){var i=null==e?0:e.length;if(i){var n=io(e,t);if(n<i&&Ea(e[n],t))return n}return-1},Mi.sortedLastIndex=function(e,t){return io(e,t,!0)},Mi.sortedLastIndexBy=function(e,t,i){return no(e,t,ar(i,2),!0)},Mi.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var i=io(e,t,!0)-1;if(Ea(e[i],t))return i}return-1},Mi.startCase=Vs,Mi.startsWith=function(e,t,i){return e=vs(e),i=null==i?0:rn(hs(i),0,e.length),t=ao(t),e.slice(i,i+t.length)==t},Mi.subtract=Tl,Mi.sum=function(e){return e&&e.length?Gt(e,il):0},Mi.sumBy=function(e,t){return e&&e.length?Gt(e,ar(t,2)):0},Mi.template=function(e,t,i){var n=Mi.templateSettings;i&&vr(e,t,i)&&(t=o),e=vs(e),t=bs({},t,n,Ko);var r,a,s=bs({},t.imports,n.imports,Ko),l=xs(s),c=Kt(s,l),d=0,p=t.interpolate||ye,u="__p += '",h=Ae((t.escape||ye).source+"|"+p.source+"|"+(p===Y?pe:ye).source+"|"+(t.evaluate||ye).source+"|$","g"),f="//# sourceURL="+(We.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++nt+"]")+"\n";e.replace(h,function(t,i,n,o,s,l){return n||(n=o),u+=e.slice(d,l).replace(be,ii),i&&(r=!0,u+="' +\n__e("+i+") +\n'"),s&&(a=!0,u+="';\n"+s+";\n__p += '"),n&&(u+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),d=l+t.length,t}),u+="';\n";var g=We.call(t,"variable")&&t.variable;if(g){if(ce.test(g))throw new Se("Invalid `variable` option passed into `_.template`")}else u="with (obj) {\n"+u+"\n}\n";u=(a?u.replace(N,""):u).replace(B,"$1").replace(H,"$1;"),u="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(r?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+u+"return __p\n}";var m=Ys(function(){return ke(l,f+"return "+u).apply(o,c)});if(m.source=u,Ja(m))throw m;return m},Mi.times=function(e,t){if((e=hs(e))<1||e>p)return[];var i=h,n=mi(e,h);t=ar(t),e-=h;for(var o=Vt(n,t);++i<e;)t(i);return o},Mi.toFinite=us,Mi.toInteger=hs,Mi.toLength=fs,Mi.toLower=function(e){return vs(e).toLowerCase()},Mi.toNumber=gs,Mi.toSafeInteger=function(e){return e?rn(hs(e),-9007199254740991,p):0===e?e:0},Mi.toString=vs,Mi.toUpper=function(e){return vs(e).toUpperCase()},Mi.trim=function(e,t,i){if((e=vs(e))&&(i||t===o))return Zt(e);if(!e||!(t=ao(t)))return e;var n=di(e),r=di(t);return yo(n,Qt(n,r),Xt(n,r)+1).join("")},Mi.trimEnd=function(e,t,i){if((e=vs(e))&&(i||t===o))return e.slice(0,pi(e)+1);if(!e||!(t=ao(t)))return e;var n=di(e);return yo(n,0,Xt(n,di(t))+1).join("")},Mi.trimStart=function(e,t,i){if((e=vs(e))&&(i||t===o))return e.replace(ne,"");if(!e||!(t=ao(t)))return e;var n=di(e);return yo(n,Qt(n,di(t))).join("")},Mi.truncate=function(e,t){var i=30,n="...";if(Xa(t)){var r="separator"in t?t.separator:r;i="length"in t?hs(t.length):i,n="omission"in t?ao(t.omission):n}var a=(e=vs(e)).length;if(ni(e)){var s=di(e);a=s.length}if(i>=a)return e;var l=i-ci(n);if(l<1)return n;var c=s?yo(s,0,l).join(""):e.slice(0,l);if(r===o)return c+n;if(s&&(l+=c.length-l),os(r)){if(e.slice(l).search(r)){var d,p=c;for(r.global||(r=Ae(r.source,vs(ue.exec(r))+"g")),r.lastIndex=0;d=r.exec(p);)var u=d.index;c=c.slice(0,u===o?l:u)}}else if(e.indexOf(ao(r),l)!=l){var h=c.lastIndexOf(r);h>-1&&(c=c.slice(0,h))}return c+n},Mi.unescape=function(e){return(e=vs(e))&&V.test(e)?e.replace(q,ui):e},Mi.uniqueId=function(e){var t=++je;return vs(e)+t},Mi.upperCase=Zs,Mi.upperFirst=Js,Mi.each=va,Mi.eachRight=wa,Mi.first=qr,al(Mi,(ml={},wn(Mi,function(e,t){We.call(Mi.prototype,t)||(ml[t]=e)}),ml),{chain:!1}),Mi.VERSION="4.17.21",At(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){Mi[e].placeholder=Mi}),At(["drop","take"],function(e,t){zi.prototype[e]=function(i){i=i===o?1:gi(hs(i),0);var n=this.__filtered__&&!t?new zi(this):this.clone();return n.__filtered__?n.__takeCount__=mi(i,n.__takeCount__):n.__views__.push({size:mi(i,h),type:e+(n.__dir__<0?"Right":"")}),n},zi.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),At(["filter","map","takeWhile"],function(e,t){var i=t+1,n=1==i||3==i;zi.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ar(e,3),type:i}),t.__filtered__=t.__filtered__||n,t}}),At(["head","last"],function(e,t){var i="take"+(t?"Right":"");zi.prototype[e]=function(){return this[i](1).value()[0]}}),At(["initial","tail"],function(e,t){var i="drop"+(t?"":"Right");zi.prototype[e]=function(){return this.__filtered__?new zi(this):this[i](1)}}),zi.prototype.compact=function(){return this.filter(il)},zi.prototype.find=function(e){return this.filter(e).head()},zi.prototype.findLast=function(e){return this.reverse().find(e)},zi.prototype.invokeMap=Vn(function(e,t){return"function"==typeof e?new zi(this):this.map(function(i){return Fn(i,e,t)})}),zi.prototype.reject=function(e){return this.filter(ja(ar(e)))},zi.prototype.slice=function(e,t){e=hs(e);var i=this;return i.__filtered__&&(e>0||t<0)?new zi(i):(e<0?i=i.takeRight(-e):e&&(i=i.drop(e)),t!==o&&(i=(t=hs(t))<0?i.dropRight(-t):i.take(t-e)),i)},zi.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},zi.prototype.toArray=function(){return this.take(h)},wn(zi.prototype,function(e,t){var i=/^(?:filter|find|map|reject)|While$/.test(t),n=/^(?:head|last)$/.test(t),r=Mi[n?"take"+("last"==t?"Right":""):t],a=n||/^find/.test(t);r&&(Mi.prototype[t]=function(){var t=this.__wrapped__,s=n?[1]:arguments,l=t instanceof zi,c=s[0],d=l||Ba(t),p=function(e){var t=r.apply(Mi,Lt([e],s));return n&&u?t[0]:t};d&&i&&"function"==typeof c&&1!=c.length&&(l=d=!1);var u=this.__chain__,h=!!this.__actions__.length,f=a&&!u,g=l&&!h;if(!a&&d){t=g?t:new zi(this);var m=e.apply(t,s);return m.__actions__.push({func:ua,args:[p],thisArg:o}),new Ui(m,u)}return f&&g?e.apply(this,s):(m=this.thru(p),f?n?m.value()[0]:m.value():m)})}),At(["pop","push","shift","sort","splice","unshift"],function(e){var t=Fe[e],i=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);Mi.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var o=this.value();return t.apply(Ba(o)?o:[],e)}return this[i](function(i){return t.apply(Ba(i)?i:[],e)})}}),wn(zi.prototype,function(e,t){var i=Mi[t];if(i){var n=i.name+"";We.call(Fi,n)||(Fi[n]=[]),Fi[n].push({name:t,func:i})}}),Fi[$o(o,2).name]=[{name:"wrapper",func:o}],zi.prototype.clone=function(){var e=new zi(this.__wrapped__);return e.__actions__=_o(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=_o(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=_o(this.__views__),e},zi.prototype.reverse=function(){if(this.__filtered__){var e=new zi(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},zi.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,i=Ba(e),n=t<0,o=i?e.length:0,r=function(e,t,i){for(var n=-1,o=i.length;++n<o;){var r=i[n],a=r.size;switch(r.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=mi(t,e+a);break;case"takeRight":e=gi(e,t-a)}}return{start:e,end:t}}(0,o,this.__views__),a=r.start,s=r.end,l=s-a,c=n?s:a-1,d=this.__iteratees__,p=d.length,u=0,h=mi(l,this.__takeCount__);if(!i||!n&&o==l&&h==l)return uo(e,this.__actions__);var f=[];e:for(;l--&&u<h;){for(var g=-1,m=e[c+=t];++g<p;){var v=d[g],w=v.iteratee,y=v.type,b=w(m);if(2==y)m=b;else if(!b){if(1==y)continue e;break e}}f[u++]=m}return f},Mi.prototype.at=ha,Mi.prototype.chain=function(){return pa(this)},Mi.prototype.commit=function(){return new Ui(this.value(),this.__chain__)},Mi.prototype.next=function(){this.__values__===o&&(this.__values__=ps(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?o:this.__values__[this.__index__++]}},Mi.prototype.plant=function(e){for(var t,i=this;i instanceof Ei;){var n=$r(i);n.__index__=0,n.__values__=o,t?r.__wrapped__=n:t=n;var r=n;i=i.__wrapped__}return r.__wrapped__=e,t},Mi.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof zi){var t=e;return this.__actions__.length&&(t=new zi(this)),(t=t.reverse()).__actions__.push({func:ua,args:[Xr],thisArg:o}),new Ui(t,this.__chain__)}return this.thru(Xr)},Mi.prototype.toJSON=Mi.prototype.valueOf=Mi.prototype.value=function(){return uo(this.__wrapped__,this.__actions__)},Mi.prototype.first=Mi.prototype.head,Je&&(Mi.prototype[Je]=function(){return this}),Mi}();pt._=hi,(n=function(){return hi}.call(t,i,t,e))===o||(e.exports=n)}.call(this)},4342:(e,t,i)=>{"use strict";!function(){var t,n,o,r=0,a=[];for(n=0;n<256;n++)a[n]=(n+256).toString(16).substr(1);function s(){var e=((!t||r+16>l.BUFFER_SIZE)&&(r=0,t=l.randomBytes(l.BUFFER_SIZE)),t.slice(r,r+=16));return e[6]=15&e[6]|64,e[8]=63&e[8]|128,e}function l(){var e=s();return a[e[0]]+a[e[1]]+a[e[2]]+a[e[3]]+"-"+a[e[4]]+a[e[5]]+"-"+a[e[6]]+a[e[7]]+"-"+a[e[8]]+a[e[9]]+"-"+a[e[10]]+a[e[11]]+a[e[12]]+a[e[13]]+a[e[14]]+a[e[15]]}l.BUFFER_SIZE=4096,l.bin=s,l.clearBuffer=function(){t=null,r=0},l.test=function(e){return"string"==typeof e&&/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e)},"undefined"!=typeof crypto?o=crypto:"undefined"!=typeof window&&void 0!==window.msCrypto&&(o=window.msCrypto),o=o||i(575),e.exports=l,l.randomBytes=function(){if(o){if(o.randomBytes)return o.randomBytes;if(o.getRandomValues)return"function"!=typeof Uint8Array.prototype.slice?function(e){var t=new Uint8Array(e);return o.getRandomValues(t),Array.from(t)}:function(e){var t=new Uint8Array(e);return o.getRandomValues(t),t}}return function(e){var t,i=[];for(t=0;t<e;t++)i.push(Math.floor(256*Math.random()));return i}}()}()},4744:e=>{"use strict";var t=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===i}(e)}(e)},i="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?s((i=e,Array.isArray(i)?[]:{}),e,t):e;var i}function o(e,t,i){return e.concat(t).map(function(e){return n(e,i)})}function r(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}(e))}function a(e,t){try{return t in e}catch(e){return!1}}function s(e,i,l){(l=l||{}).arrayMerge=l.arrayMerge||o,l.isMergeableObject=l.isMergeableObject||t,l.cloneUnlessOtherwiseSpecified=n;var c=Array.isArray(i);return c===Array.isArray(e)?c?l.arrayMerge(e,i,l):function(e,t,i){var o={};return i.isMergeableObject(e)&&r(e).forEach(function(t){o[t]=n(e[t],i)}),r(t).forEach(function(r){(function(e,t){return a(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,r)||(a(e,r)&&i.isMergeableObject(t[r])?o[r]=function(e,t){if(!t.customMerge)return s;var i=t.customMerge(e);return"function"==typeof i?i:s}(r,i)(e[r],t[r],i):o[r]=n(t[r],i))}),o}(e,i,l):n(i,l)}s.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,i){return s(e,i,t)},{})};var l=s;e.exports=l}},t={};function i(n){var o=t[n];if(void 0!==o)return o.exports;var r=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(r.exports,r,r.exports,i),r.loaded=!0,r.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{"use strict";class e{static delay(e){return new Promise(t=>setTimeout(t,e))}get ended(){return this.rejected||this.resolved}constructor(){this.rejected=!1,this.resolved=!1,this.promise=new Promise((e,t)=>{this.resolve=t=>{this.resolved||this.rejected||(this.resolved=!0,e(t))},this.reject=e=>{this.resolved||this.rejected||(this.rejected=!0,t(e))}})}setTimeout(e,t){return setTimeout(()=>{this.reject(null!=t?t:"PromiseWrapper timed out")},e)}}var t=i(4342),n=i.n(t),o=i(4744),r=i.n(o),a=i(2543);let s=Promise;const l=()=>s,c="$FINSEMBLECONFIG";class d{constructor(){this.gatePromises=[]}async runOldest(){var e;const t=this.gatePromises[this.gatePromises.length-1],i=await t.func();this.gatePromises=this.gatePromises.filter(e=>e!==t),null===(e=t.resolve)||void 0===e||e.call(t,i),this.gatePromises.length&&this.runOldest()}async wait(e){const t={func:e};return t.gatePromise=new Promise(e=>{t.resolve=e}),this.gatePromises=this.gatePromises.concat(t),1===this.gatePromises.length&&this.runOldest(),t.gatePromise}}const p=(e,t)=>(i,n)=>{try{const o=e(i,n);return(null==o?void 0:o.catch)&&o.catch(e=>{(null!=t?t:console).error("Unhandled exception or rejection in interop.register handler",e)}),o}catch(e){throw(null!=t?t:console).error("Unhandled exception in interop.register handler",e),e}},u=async(e,t)=>{const i=e.map(e=>t(e)),n=await l().allSettled(i),o=n.filter(e=>"rejected"===e.status);if(o.length)throw o.map(e=>e.reason);return n.flatMap(e=>"fulfilled"===e.status?e.value:[])},h=async(e,t)=>{const i=e.map(e=>t(e)),n=await Promise.allSettled(i),o=n.filter(e=>"rejected"===e.status);if(o.length)throw o.map(e=>e.reason);return n},f=(e,t)=>Object.fromEntries(Object.entries(e).flatMap(([e,i])=>t(e,i))),g=e=>!1===e||!0!==e&&(null!=e?e:void 0),m=async(e,t)=>{var i;try{const i=await e();return null==t||t(null,i),{err:null,data:i}}catch(e){const n=e instanceof Error?e.toString():null!==(i=e.message)&&void 0!==i?i:JSON.stringify(e);return null==t||t(n),{err:n}}},v=async(e,t)=>{var i,n;const{err:o,data:r}=await m(e);if(o||!r)return null==t||t(o),{err:o};const a=r.all_errors?r.all_errors.join(" "):null;if(a)return null==t||t(a),{err:a};const s=r.returned;return Object.prototype.hasOwnProperty.call(s,"err")||Object.prototype.hasOwnProperty.call(s,"data")?(null==t||t(null!==(i=s.err)&&void 0!==i?i:null,s.data),{err:null!==(n=s.err)&&void 0!==n?n:null,data:s.data}):(null==t||t(null,s),{data:s,invocationResult:r})},w=e=>null!=e,y=e=>(Object.keys(e).forEach(t=>{null!==e[t]&&void 0!==e[t]||delete e[t]}),e),b=(e,t,i,n)=>{var o,r,a,s,l,c,d,p,u,h,f,g,m,v,w,b,S,T,C,A,I,_,F,P;if(null==(null!==(c=null!==(l=null!==(s=null!==(a=null!==(r=null!==(o=null==t?void 0:t.left)&&void 0!==o?o:null==t?void 0:t.right)&&void 0!==r?r:null==t?void 0:t.top)&&void 0!==a?a:null==t?void 0:t.bottom)&&void 0!==s?s:null==t?void 0:t.width)&&void 0!==l?l:null==t?void 0:t.height)&&void 0!==c?c:null==t?void 0:t.monitor))return;const x=null!==(d=null==t?void 0:t.left)&&void 0!==d?d:null===(p=null==t?void 0:t.options)||void 0===p?void 0:p.left,R=null!==(u=null==t?void 0:t.top)&&void 0!==u?u:null===(h=null==t?void 0:t.options)||void 0===h?void 0:h.top,L=null!==(f=null==t?void 0:t.right)&&void 0!==f?f:null===(g=null==t?void 0:t.options)||void 0===g?void 0:g.right,W=null!==(m=null==t?void 0:t.bottom)&&void 0!==m?m:null===(v=null==t?void 0:t.options)||void 0===v?void 0:v.bottom,j=null!==(w=null==t?void 0:t.width)&&void 0!==w?w:null===(b=null==t?void 0:t.options)||void 0===b?void 0:b.width,O=null!==(S=null==t?void 0:t.height)&&void 0!==S?S:null===(T=null==t?void 0:t.options)||void 0===T?void 0:T.height,D={snapped:null!==(I=null===(A=null===(C=null==n?void 0:n.details)||void 0===C?void 0:C.placement)||void 0===A?void 0:A.snapped)&&void 0!==I&&I,left:x,top:R,right:L,bottom:W,width:j,height:O,display:null!=i?i:null===(F=null===(_=null==n?void 0:n.details)||void 0===_?void 0:_.placement)||void 0===F?void 0:F.display};return k(D,t,null===(P=null==n?void 0:n.details)||void 0===P?void 0:P.placement),""===D.width&&delete D.width,""===D.height&&delete D.height,0!==D.height&&"0"!==D.height||(D.height=1),0!==D.width&&"0"!==D.width||(D.width=1),y(D)},S=e=>{const t=null==e?void 0:e.staggerPixels;return{enabled:!0,offset:null!=t?t:50}},k=(e,t,i)=>{var n,o,r;"center"===e.top&&(e.verticalAlignment="center"),"center"===e.left&&(e.horizontalAlignment="center"),(null==t?void 0:t.dockable)&&(null==t?void 0:t.docked)&&t.dockable.some(e=>e===t.docked)&&(e.snapped=!0,e.height=null!==(n=t.dockedHeight)&&void 0!==n?n:e.height,e.verticalAlignment="bottom"===t.docked?"bottom":"top",e.horizontalAlignment="stretch"),!e.horizontalAlignment&&w(e.right)&&(e.horizontalAlignment="right"),!e.horizontalAlignment&&w(e.left)&&(e.horizontalAlignment="left"),!e.verticalAlignment&&w(e.bottom)&&(e.verticalAlignment="bottom"),!e.verticalAlignment&&w(e.top)&&(e.verticalAlignment="top"),e.horizontalAlignment||(e.horizontalAlignment=null!==(o=null==i?void 0:i.horizontalAlignment)&&void 0!==o?o:"left"),e.verticalAlignment||(e.verticalAlignment=null!==(r=null==i?void 0:i.verticalAlignment)&&void 0!==r?r:"top")},T=e=>"number"==typeof e?(e+1).toString():"main",C=(e,t)=>{var i,n,o,r,a,s,l,c,d,p,u;const h="adjacent",f={};return(null!==(i=null==t?void 0:t.left)&&void 0!==i?i:null===(n=null==t?void 0:t.options)||void 0===n?void 0:n.left)===h&&(f.relativeDirection="right"),(null!==(o=null==t?void 0:t.top)&&void 0!==o?o:null===(r=null==t?void 0:t.options)||void 0===r?void 0:r.top)===h&&(f.relativeDirection="bottom"),(null!==(a=null==t?void 0:t.right)&&void 0!==a?a:null===(s=null==t?void 0:t.options)||void 0===s?void 0:s.right)===h&&(f.relativeDirection="left"),(null!==(l=null==t?void 0:t.bottom)&&void 0!==l?l:null===(c=null==t?void 0:t.options)||void 0===c?void 0:c.bottom)===h&&(f.relativeDirection="top"),Object.keys(f).length>0&&(f.relativeTo=null!==(p=null===(d=null==t?void 0:t.relativeWindow)||void 0===d?void 0:d.windowName)&&void 0!==p?p:null===(u=e.windows.my())||void 0===u?void 0:u.id),f},A=(e,t)=>e.concat(` "componentType=${null!=t?t:"Unknown"}"`,` "iocdGatewayAddress=${globalThis.glue42gd.gwURL}"`," hostType=iocd"),I={},_=new d,F=async(e,t,i)=>{var n,o,a,s,l,d,p,u,h,f,m,v,y,k,I,_,F,P,x,R,L,W,j,O,D,M,$,E,U,z,N,B,H,q,G,V,Z,J,K,Y,Q,X,ee,te,ie,ne,oe,re,ae,se,le,ce,de,pe,ue,he,fe,ge,me,ve;const we=null!=t?t:{},ye=null===(n=e.windows.my())||void 0===n?void 0:n.tabGroupId,be={ignoreSavedLayout:!0},Se=await(async(e,t)=>{var i,n;if(!t||"mine"===t){const t=null===(i=e.windows.my())||void 0===i?void 0:i.id,o=t?await e.displays.getByWindowId(t):void 0;return null===(n=null==o?void 0:o.isPrimary)||void 0===n||n?"main":null==o?void 0:o.index.toString()}return T(t)})(e,null==t?void 0:t.monitor);let ke=b(0,we,Se,i);ke&&(ke=await(async(e,t,i,n)=>{var o,r,a,s;if("absolute"===n||"virtual"===n)return t;const l=i?e.windows.findById(i):e.windows.my(),c=await(null==l?void 0:l.getDisplay());if(!l||!c)return t;if("monitor"===n||!n)return(t=null!=t?t:{snapped:!1}).display=c.index+1,t;const d={relative:l.bounds,available:c.workArea};if(Object.hasOwnProperty.call(d,n)&&t){const{left:e,top:i,height:l,width:c}=d[n];(Number.isInteger(t.left)||Number.isInteger(t.top))&&(t.left=(null!==(o=t.left)&&void 0!==o?o:0)+e,t.top=(null!==(r=t.top)&&void 0!==r?r:0)+i),(null===(a=t.height)||void 0===a?void 0:a.toString().includes("%"))&&(t.height=parseFloat(t.height)/100*l),(null===(s=t.width)||void 0===s?void 0:s.toString().includes("%"))&&(t.width=parseFloat(t.width)/100*c),t.horizontalAlignment="left",t.verticalAlignment="top"}return t})(e,ke,null===(o=we.relativeWindow)||void 0===o?void 0:o.windowName,null==t?void 0:t.position)),be.placement=ke,be.cascade=S(we);const Te=C(e,we);we.ephemeral&&(be.showInTaskbar=we.ephemeral,be.onTop=!0,be.hasSizeAreas=!1,be.isSticky=!1);const Ce=null===(l=null===(s=null===(a=null==i?void 0:i.customProperties)||void 0===a?void 0:a.appd)||void 0===s?void 0:s.hostManifests)||void 0===l?void 0:l.Finsemble,Ae=null!==(h=null===(u=null===(p=null===(d=null==Ce?void 0:Ce.foreign)||void 0===d?void 0:d.services)||void 0===p?void 0:p.windowService)||void 0===u?void 0:u.addToWorkspace)&&void 0!==h?h:null===(f=null==Ce?void 0:Ce.window)||void 0===f?void 0:f.addToWorkspace,Ie=null!==(m=null!=Ae?Ae:we.addToWorkspace)&&void 0!==m&&m;if(be.ignoreFromLayouts=g(Ie),w(Te.relativeTo)&&(be.relativeTo=Te.relativeTo),w(Te.relativeDirection)&&(be.relativeDirection=Te.relativeDirection),w(we.canGroup)&&(be.isSticky=null!==(v=we.canGroup)&&void 0!==v?v:void 0),w(null===(y=we.options)||void 0===y?void 0:y.showTaskbarIcon)&&(be.showInTaskbar=null===(k=we.options)||void 0===k?void 0:k.showTaskbarIcon),w(null===(I=we.options)||void 0===I?void 0:I.resizable)&&(be.hasSizeAreas=null===(_=we.options)||void 0===_?void 0:_.resizable),w(null===(F=we.options)||void 0===F?void 0:F.alwaysOnTop)&&(be.onTop=null===(P=we.options)||void 0===P?void 0:P.alwaysOnTop),w(null===(x=we.options)||void 0===x?void 0:x.autoShow)&&(be.hidden=null!==(L=g(null===(R=we.options)||void 0===R?void 0:R.autoShow))&&void 0!==L?L:void 0),w(we.minWidth)&&(be.minWidth=we.minWidth),w(we.minHeight)&&(be.minHeight=we.minHeight),w(we.maxWidth)&&(be.maxWidth=we.maxWidth),w(we.maxHeight)&&(be.maxHeight=we.maxHeight),w(we.slave)&&(be.isChild=we.slave),w(null===(W=we.options)||void 0===W?void 0:W.windowState)&&(be.windowState=null===(j=we.options)||void 0===j?void 0:j.windowState),w(we.frame)&&(be.showTitleBar=null!==(O=g(we.frame))&&void 0!==O?O:void 0),we.addToTabCollection&&(be.tabGroupId="string"==typeof we.addToTabCollection?we.addToTabCollection:ye),(null===(D=we.options)||void 0===D?void 0:D.preloadScripts)&&(be.preloadScripts=we.options.preloadScripts),!1===we.autoFocus&&(be.focus=!1),we.url&&(be.url=we.url),we.path){const e=we.path.split(/[\\/]/),t=e.pop(),i=e.join("/");be.command=t,be.path=i}w(null===(M=we.options)||void 0===M?void 0:M.windowSpawnTimeout)&&(be.timeout=null===($=we.options)||void 0===$?void 0:$.windowSpawnTimeout);const _e=null!==(E=we.argumentsAsQueryString)&&void 0!==E?E:null===(H=null===(B=null===(N=null===(z=null===(U=i.customProperties)||void 0===U?void 0:U.appd)||void 0===z?void 0:z.hostManifests)||void 0===N?void 0:N.Finsemble)||void 0===B?void 0:B.window)||void 0===H?void 0:H.argumentsAsQueryString;if(w(we.arguments)&&(_e?be.urlLoadOptions={queryString:we.arguments}:be.parameters=we.arguments),w(we.env)&&(be.env=we.env),"exe"===i.type||"assimilation"===(null===(J=null===(Z=null===(V=null===(G=null===(q=null==i?void 0:i.customProperties)||void 0===q?void 0:q.appd)||void 0===G?void 0:G.hostManifests)||void 0===V?void 0:V.Finsemble)||void 0===Z?void 0:Z.window)||void 0===J?void 0:J.windowType)){let t=null!==(ae=null!==(ee=null!==(K=be.parameters)&&void 0!==K?K:null===(X=null===(Q=null===(Y=null==i?void 0:i.customProperties)||void 0===Y?void 0:Y.appd)||void 0===Q?void 0:Q.details)||void 0===X?void 0:X.arguments)&&void 0!==ee?ee:null===(re=null===(oe=null===(ne=null===(ie=null===(te=null==i?void 0:i.customProperties)||void 0===te?void 0:te.appd)||void 0===ie?void 0:ie.hostManifests)||void 0===ne?void 0:ne.Finsemble)||void 0===oe?void 0:oe.window)||void 0===re?void 0:re.arguments)&&void 0!==ae?ae:"";if("exe"===i.type&&"assimilation"!==(null===(pe=null===(de=null===(ce=null===(le=null===(se=null==i?void 0:i.customProperties)||void 0===se?void 0:se.appd)||void 0===le?void 0:le.hostManifests)||void 0===ce?void 0:ce.Finsemble)||void 0===de?void 0:de.window)||void 0===pe?void 0:pe.windowType)&&"external"!==(null===(me=null===(ge=null===(fe=null===(he=null===(ue=null==i?void 0:i.customProperties)||void 0===ue?void 0:ue.appd)||void 0===he?void 0:he.hostManifests)||void 0===fe?void 0:fe.Finsemble)||void 0===ge?void 0:ge.window)||void 0===me?void 0:me.windowType)&&(t=A(t,i.name),!t.includes("apiToLogFile"))){const i=await e.contexts.get(c);!0===(null===(ve=null==i?void 0:i.iocd)||void 0===ve?void 0:ve.apiToLogFile)&&(t=t.concat(" apiToLogFile=true"))}be.parameters=t}return be.ignoreFromLayouts&&(be.isSticky=!1,"tab"!==be.mode&&"tab"!==i.details.mode||(be.mode="flat")),w(be.iocd)?r()(be,be.iocd):be},P=(e,t,i=[])=>{e&&"object"==typeof e&&Object.entries(e).forEach(n=>{const[o,r]=n,a=i.concat([o]);"object"==typeof r?P(r,t,a):t({_path:a,obj:e,key:o,value:r})})};class x{constructor(){this.promises=[]}addConstructor(){const t=new e;return this.promises.push(t.promise),t}finishConstructor(e){e.resolve()}async ready(){await l().allSettled(this.promises)}}const R=(e,t,i)=>i.indexOf(e)===t,L=(e,t,i)=>i.filter(t=>t===e).length>1,W=(e,t)=>{var i;const n=null===(i=e.windowData)||void 0===i?void 0:i.filter(e=>"StackedWindow"===e.windowType),o=null==n?void 0:n.find(e=>{var i;return null===(i=e.childWindowIdentifiers)||void 0===i?void 0:i.some(e=>e.windowName===t.name)});return null!=o?o:null},j=(e,t,i)=>{var o;const r=(null!==(o=t.windowData)&&void 0!==o?o:[]).flatMap(e=>{var i,o,r,a,s,l,c;if("StackedWindow"===e.windowType)return[];const d=O(((e,t)=>{var i,n,o,r;return null!==(r=null===(o=null===(n=null===(i=null==e?void 0:e.componentStates)||void 0===i?void 0:i[t.name])||void 0===n?void 0:n["Interop-#Linker-linkedChannels"])||void 0===o?void 0:o.channels)&&void 0!==r?r:[]})(t,e)),p=(e=>0===e?{windowState:"Normal",restoreState:"Normal"}:1===e?{windowState:"Minimized",restoreState:"Normal"}:3===e?{windowState:"Minimized",restoreState:"Maximized"}:2===e?{windowState:"Maximized",restoreState:"Normal"}:{windowState:"Normal",restoreState:"Normal"})(e.windowState),u=null===(i=W(t,e))||void 0===i?void 0:i.name,h=((e,t)=>{var i,n;const o=null!==(n=null===(i=e.componentStates)||void 0===i?void 0:i[t])&&void 0!==n?n:{},r={};return Object.keys(o).forEach(e=>{if("#finsemble-windowName"!==e&&"#finsemble-spawnData"!==e)if("Interop-#Linker-linkedChannels"!==e){if("Interop-#Workspace-contexts"===e){const t=o[e];return Object.entries(t).forEach(([e,t])=>{o[`#finsemble-persistedContext-${e}`]=t}),void delete o[e]}r[e]=o[e],delete o[e]}else delete o[e]}),o["#finsemble-componentState"]=r,o})(t,e.name),f=null!==(r=null===(o=t.componentStates)||void 0===o?void 0:o[e.name])&&void 0!==r?r:{},g={channels:Object.entries(null!==(a=f["customFDC3-channels"])&&void 0!==a?a:{}).flatMap(([e,t])=>"Both"===t?[{name:e,read:!0,write:!0}]:"Broadcast"===t?[{name:e,read:!1,write:!0}]:"Listen"===t?[{name:e,read:!0,write:!1}]:[])},m={application:e.componentType,type:null!==(s=e.type)&&void 0!==s?s:"window",componentType:"application",state:{context:h,isCollapsed:!1,windowState:p.windowState,channelSelector:{enabled:!0},channelRestrictions:g,mode:"tab",channelId:d,restoreState:p.restoreState,bounds:{left:e.left,top:e.top,width:e.width,height:e.height},isSticky:!0,instanceId:e.name}},{workspaces:v}=e;v&&(m.state.workspaces=v);const y=null!==(l=f.persistedTitle)&&void 0!==l?l:null;y&&(m.state.userTitle=y);const b=((e,t)=>{var i,n,o;const r=W(e,t),a=null!==(n=null===(i=null==r?void 0:r.childWindowIdentifiers)||void 0===i?void 0:i.findIndex(e=>e.windowName===t.name))&&void 0!==n?n:0,s=(null===(o=null==r?void 0:r.visibleWindowIdentifier)||void 0===o?void 0:o.windowName)===t.name;return(a+1)*(!r||s?-1:1)})(t,e),S=null!==(c=((e,t)=>{const i=W(e,t);return null==i?void 0:i.name})(t,e))&&void 0!==c?c:n()(),k=((e,t,i)=>{var n;const[o]=null!==(n=Object.entries(e.groups).find(([e,n])=>(e=>{let n=!1;return e.isMovable&&(n=e.windowNames.includes(t.name)||e.windowNames.includes(null!=i?i:""),n||e.windowNames.forEach(e=>{t.name.endsWith(e)&&(n=!0)})),n})(n)))&&void 0!==n?n:[null];return o})(t,e,u);return w(b)&&(m.state.tabIndex=b),m.state.tabGroupId=S,("exe"!==e.type||k)&&(m.state.restoreSettings={groupId:null!=k?k:`${S}-1`,groupZOrder:0}),[m]}),a={"iop#position":i};return t.id&&(a.id=t.id),{name:e,type:"Global",components:r,context:{},metadata:a,version:2}},O=e=>e.join("+++"),D=e=>""!==e&&e?e.split("+++"):[],M=e=>{var t;const i=(e=>{const t=e.map(e=>{var t,i;return null===(i=null===(t=e.state)||void 0===t?void 0:t.restoreSettings)||void 0===i?void 0:i.groupId}).filter(w).filter(R).map(t=>[t,{isMovable:!0,isAlwaysOnTop:!1,windowNames:e.flatMap(e=>{var i,n;return(null===(n=null===(i=e.state)||void 0===i?void 0:i.restoreSettings)||void 0===n?void 0:n.groupId)===t?[e.state.instanceId]:[]})}]).filter(e=>e[1].windowNames.length>1);return Object.fromEntries(t)})(e.components),{windowData:n,stacks:o}=(e=>{const t=e.map(e=>{var t,i,n,o,r,a,s,l,c,d,p,u,h,f,g,m,v,w,y,b;const S=e.application;return{componentType:S,name:`${S}${e.state.instanceId}`,opacity:1,windowState:(k=e.state.windowState,T=e.state.restoreState,"Normal"===k?0:"Minimized"===k&&"Normal"===T?1:"Minimized"===k&&"Maximized"===T?3:"Maximized"===k?2:0),left:null===(i=null===(t=e.state)||void 0===t?void 0:t.bounds)||void 0===i?void 0:i.left,top:null===(o=null===(n=e.state)||void 0===n?void 0:n.bounds)||void 0===o?void 0:o.top,width:null===(a=null===(r=e.state)||void 0===r?void 0:r.bounds)||void 0===a?void 0:a.width,height:null===(l=null===(s=e.state)||void 0===s?void 0:s.bounds)||void 0===l?void 0:l.height,right:null===(d=null===(c=e.state)||void 0===c?void 0:c.bounds)||void 0===d?void 0:d.right,bottom:null===(u=null===(p=e.state)||void 0===p?void 0:p.bounds)||void 0===u?void 0:u.bottom,defaultLeft:null===(f=null===(h=e.state)||void 0===h?void 0:h.bounds)||void 0===f?void 0:f.left,defaultTop:null===(m=null===(g=e.state)||void 0===g?void 0:g.bounds)||void 0===m?void 0:m.top,defaultWidth:null===(w=null===(v=e.state)||void 0===v?void 0:v.bounds)||void 0===w?void 0:w.width,defaultHeight:null===(b=null===(y=e.state)||void 0===y?void 0:y.bounds)||void 0===b?void 0:b.height,workspaces:e.state.workspaces,type:e.type};var k,T}),i=e.map(e=>e.state.tabGroupId).filter(w).filter(L).filter(R),n=(e,t)=>Math.abs(e.state.tabIndex)>Math.abs(t.state.tabIndex)?1:Math.abs(e.state.tabIndex)<Math.abs(t.state.tabIndex)?-1:0,o=i.map(t=>{const i=e.find(e=>e.state.tabGroupId===t&&e.state.tabIndex<0),o=e.filter(e=>e.state.tabGroupId===t).sort(n).map(e=>({windowName:`${e.application}${e.state.instanceId}`}));return{name:t,windowType:"StackedWindow",componentType:"StackedWindow",visibleWindowIdentifier:{windowName:i?`${i.application}${i.state.instanceId}`:void 0},childWindowIdentifiers:o,left:null==i?void 0:i.state.bounds.left,top:null==i?void 0:i.state.bounds.top,width:null==i?void 0:i.state.bounds.width,height:null==i?void 0:i.state.bounds.height,bounds:{left:null==i?void 0:i.state.bounds.left,top:null==i?void 0:i.state.bounds.top,width:null==i?void 0:i.state.bounds.width,height:null==i?void 0:i.state.bounds.height}}});return{windowData:t.concat(o),stacks:o}})(e.components),r=(e=>{const t=e.map(e=>{var t,i,n,o,r,a;const s=`${e.application}${e.state.instanceId}`,l=D(e.state.channelId),c=e.state.channelId?{"Interop-#Linker-linkedChannels":{channels:l}}:{},d={...null!==(i=null===(t=e.state)||void 0===t?void 0:t.context)&&void 0!==i?i:{},...null===(o=null===(n=e.state)||void 0===n?void 0:n.context)||void 0===o?void 0:o["#finsemble-componentState"],...c};delete d["#finsemble-componentState"];const p=null!==(a=null===(r=e.state.channelRestrictions)||void 0===r?void 0:r.channels)&&void 0!==a?a:[];return d["customFDC3-channels"]=Object.fromEntries(l.map(e=>{const t=p.find(t=>t.name===e);return t&&!t.read?[e,"Broadcast"]:t&&!t.write?[e,"Listen"]:[e,"Both"]})),e.state.userTitle&&(d.persistedTitle=e.state.userTitle),(e=>{const t={};Object.keys(e).forEach(i=>{const n=i.split("#finsemble-persistedContext-")[1];n&&(t[n]=e[i],delete e[i])}),e["Interop-#Workspace-contexts"]=t})(d),[s,d]});return Object.fromEntries(t)})(e.components);o.forEach(e=>r[e.name]={});const a=n.map(e=>e.name),s={version:"1.0.0",name:e.name,type:"workspace",groups:i,windows:a,componentStates:r,custom:{},windowData:n,tabCollections:[]};return(null===(t=e.metadata)||void 0===t?void 0:t.id)&&(s.id=e.metadata.id),s},$=async e=>e.sort((e,t)=>{var i,n;const o=null===(i=e.metadata)||void 0===i?void 0:i["iop#position"],r=null===(n=t.metadata)||void 0===n?void 0:n["iop#position"];return void 0===o&&void 0!==r?1:void 0!==o&&void 0===r?-1:void 0===o&&void 0===r?e.name<t.name?-1:e.name>t.name?1:0:o<r?-1:o>r?1:0}),E=e=>{var t;if(!(null==e?void 0:e.workArea)||!(null==e?void 0:e.scaleFactor)||!e.bounds)return null;const{availableRect:i,monitorRect:n}=(e=>{var t;if(!(null==e?void 0:e.workArea)||!(null==e?void 0:e.scaleFactor)||!e.bounds)return;const i={left:(null===(t=e.workArea)||void 0===t?void 0:t.left)*(null==e?void 0:e.scaleFactor),top:e.workArea.top*e.scaleFactor,width:e.workArea.width,height:e.workArea.height};i.right=i.left+i.width,i.bottom=i.top+i.height;const n={left:e.bounds.left*e.scaleFactor,top:e.bounds.top*e.scaleFactor,width:e.bounds.width,height:e.bounds.height};return n.right=n.left+n.width,n.bottom=n.top+n.height,{availableRect:i,monitorRect:n}})(e);return{monitor:{dipRect:i,scaledRect:i},availableRect:i,monitorRect:n,name:`device${e.index}`,deviceId:Number(null!==(t=e.id)&&void 0!==t?t:0).toString(),deviceScaleFactor:1/e.scaleFactor,displayDeviceActive:!0,position:e.index,whichMonitor:e.isPrimary?"primary":e.index}},U=(e,t)=>{if(t.includes("%")){const i=parseFloat(t)/100;return Math.abs(e*i)}return parseInt(t)},z=(e,t)=>{const i="string"==typeof t.top?U(e.height,t.top):t.top,n="string"==typeof t.left?U(e.width,t.left):t.left,o="string"==typeof t.height?U(e.height,t.height):t.height;return{top:i,left:n,width:"string"==typeof t.width?U(e.width,t.width):t.width,height:o}},N=async(e,t,i)=>{var n,o,r,a,s,l,c;const d=null!==(n=t.title)&&void 0!==n?n:"Group",p=null!==(o=null==i?void 0:i.toSpawn)&&void 0!==o?o:null===(s=null===(a=null===(r=t.hostManifests)||void 0===r?void 0:r.Finsemble)||void 0===a?void 0:a.window)||void 0===s?void 0:s.toSpawn;if(!p||!Array.isArray(p))return{err:`convertFinsembleLaunchGroupAppd2GlueGroupOptions: Unexpected value in appd hostManifests.Finsemble.window.toSpawn property. Expected array, received: ${p}`};let u=e.windows.my();u||(u=e.windows.find("Toolbar"));const h=await(null==u?void 0:u.getDisplay());if(!h)return{err:"convertFinsembleLaunchGroupAppd2GlueGroupOptions: Can't get display"};const f=await z(null==h?void 0:h.bounds,null===(c=null===(l=t.hostManifests)||void 0===l?void 0:l.Finsemble)||void 0===c?void 0:c.window),g=p.map(e=>{var t;const{top:i,left:n,height:o,width:r}=null!==(t=e.spawnOptions)&&void 0!==t?t:{},a=z(f,{top:i,left:n,height:o,width:r});return"components"in e?{mode:"tab",bounds:a,applications:e.components.map(({componentType:e})=>({name:e}))}:{mode:"tab",bounds:a,applications:[{name:e.componentType}]}});return{data:{context:{},groups:[{title:d,frames:g}]}}},B=async(e,t)=>{const i=`FSBL.SearchProvider.${t.name}`,n=`${i}.ActionHandler`,o=await e.search.registerProvider({name:i});return await m(()=>e.interop.register(n,async e=>{console.debug("Action handler received",o.id,e);const i=t.itemActionCallback;i?i(e):console.warn("Action provider not found for",o.id,e)})),o.onQuery(e=>{t.searchCallback({text:e.search},(t,i)=>{const o=Array.isArray(i)?i:[i];t?e.error(t):(o.forEach(t=>{const{name:i,type:o,description:r,actions:a=[],...s}=t,l=a.map(e=>({name:e.name,method:n}));e.sendResult({type:{name:o},description:r,displayName:i,action:l.shift(),secondaryActions:l,metadata:{...s}})}),e.done())})}),{name:t.name,provider:o}},H=async(e,t,i)=>{const{err:n,data:o}=await v(()=>e.interop.invoke("FSBL.Clients.WorkspaceClient.triggerEventHandlers",{event:t,workspaceName:i}));return{err:n,data:o}},q=async(e,t,i)=>{var n,o,r,s,l,c,d,p,u,h,f,g,v,w,y,b,S,k,T,C;const A=await e.appManager.getConfigurations([t]),{didSpawn:P,error:x,instance:R,launchGroupWindows:L}=await(async(e,t,i)=>{var n,o,r,a,s,l;if(!i)return{didSpawn:!1};if("launchGroup"!==(null===(s=null===(a=null===(r=null===(o=null===(n=i.customProperties)||void 0===n?void 0:n.appd)||void 0===o?void 0:o.hostManifests)||void 0===r?void 0:r.Finsemble)||void 0===a?void 0:a.window)||void 0===s?void 0:s.windowType))return{didSpawn:!1};const{err:c,data:d}=await N(e,null===(l=i.customProperties)||void 0===l?void 0:l.appd,t);if(!d)return{didSpawn:!1};const{err:p,data:u}=await m(()=>e.windows.groups.create(d));if(p||!u)return{didSpawn:!1,error:null!=p?p:"No data returned"};const h=u[0];return{didSpawn:!0,error:p,instance:h,launchGroupWindows:h.windows.map(({id:e})=>e)}})(e,null!=i?i:{},null!==(n=A[0])&&void 0!==n?n:{});if(P)return{error:x,data:R,launchGroupWindows:L};const{err:W,data:j}=await m(()=>e.appManager.application(t));if(W||!j){const e=`AppsClient.spawn:application ${W}`;return console.log(e),{error:e,data:void 0}}const O=await F(e,i,null!==(o=A[0])&&void 0!==o?o:{});O.awaitInterop=!1;const{data:D}=null!==(r=await m(()=>(async e=>await _.wait(async()=>{var t;if(!(null===(t=null==e?void 0:e.application)||void 0===t?void 0:t.name))return;if(I[e.application.name])return I[e.application.name];const i=await e.application.getConfiguration();return i&&(I[e.application.name]=i),i}))(e.windows.my())))&&void 0!==r?r:{},M=(null!==(u=null===(p=null===(d=null===(c=null===(l=null===(s=null==D?void 0:D.customProperties)||void 0===s?void 0:s.appd)||void 0===l?void 0:l.hostManifests)||void 0===c?void 0:c.Finsemble)||void 0===d?void 0:d.interop)||void 0===p?void 0:p.selectConnect)&&void 0!==u?u:[]).find(e=>e.autoAssociate);if(M){const i=await e.channels.current();(M.autoAssociate.allChildren||(null===(h=M.autoAssociate.selectChildren)||void 0===h?void 0:h.includes(t)))&&(O.channelId=i)}const $=(0,a.merge)(null!==(S=null===(b=null===(y=null===(w=null===(v=null===(g=null===(f=A[0])||void 0===f?void 0:f.customProperties)||void 0===g?void 0:g.appd)||void 0===v?void 0:v.hostManifests)||void 0===w?void 0:w.Finsemble)||void 0===y?void 0:y.window)||void 0===b?void 0:b.data)&&void 0!==S?S:{},null!==(C=null!==(k=null==i?void 0:i.data)&&void 0!==k?k:null===(T=null==i?void 0:i.options)||void 0===T?void 0:T.customData)&&void 0!==C?C:{}),E=null==i?void 0:i.componentState,U=$?{"#finsemble-spawnData":$}:{};E&&(U["#finsemble-componentState"]=E),(null==i?void 0:i.name)&&(U["#finsemble-windowName"]=i.name);const{err:z,data:B}=await m(()=>j.start(U,O));return{error:z,data:B}};class G{constructor(e,t,i){this.glue=e,this.logger=t,this.router=i}async loadUserDefinedApps(){var e;const{data:t}=await m(()=>this.glue.prefs.get("IO.Global.UserDefinedApps")),i=Object.values(null!==(e=null==t?void 0:t.data)&&void 0!==e?e:{}).map(e=>({type:"window",name:e.name,title:e.name,details:{url:e.url},customProperties:{isUserDefined:!0}}));i.length&&this.logger.debug("app-service - Adding user defined apps",null==t?void 0:t.data);const{err:n}=await m(()=>this.glue.appManager.inMemory.import(i,"merge"));n&&this.logger.error("app-service - Error adding userDefinedApps",null==t?void 0:t.data,n)}async appUpdateListener(){const e=(0,a.debounce)(async()=>{this.logger.debug("app-service - updateApps from either onAppAdded or onAppRemoved");const{err:e,data:t}=await(async e=>{const{err:t,data:i}=await m(()=>e.appManager.getConfigurations());if(t||!i)return{err:`getComponentList:getConfigurations ${t}`};const n=i.flatMap(e=>{var t,i,n,o,a,s;const l=null!==(i=null===(t=null==e?void 0:e.customProperties)||void 0===t?void 0:t.component)&&void 0!==i?i:null===(a=null===(o=null===(n=null==e?void 0:e.customProperties)||void 0===n?void 0:n.appd)||void 0===o?void 0:o.hostManifests)||void 0===a?void 0:a.Finsemble,c=r()(null!=l?l:{},(e=>{var t,i;const n=e.icon&&""!==e.icon?{imageType:"url",path:e.icon}:void 0;return{window:{},component:{displayName:e.title,type:e.name,isUserDefined:!!(null===(t=e.customProperties)||void 0===t?void 0:t.isUserDefined)},foreign:{components:{"App Launcher":{launchableByUser:null===(i=g(e.hidden))||void 0===i||i}}},icons:{toolbarIcon:n,taskbarIcon:n,titleBarIcon:n}}})(e));return[r()(c,{appConfig:null===(s=null==e?void 0:e.customProperties)||void 0===s?void 0:s.appd})]});return{err:null,data:Object.fromEntries(n.map(e=>{var t,i;return[null!==(i=null===(t=null==e?void 0:e.component)||void 0===t?void 0:t.type)&&void 0!==i?i:"Unknown Component",e]}))}})(this.glue);!e&&t&&(this.logger.debug("app-service - Launcher.update",Object.keys(t)),this.router.publish("Launcher.update",{componentList:t}))},1500);this.glue.appManager.onAppAdded(()=>{e()}),this.glue.appManager.onAppRemoved(()=>{e()})}async spawnLaunchGroup(e){var t;const{appd:i}=e,{err:n,data:o}=await N(this.glue,i);if(n||!o)return{error:"Invalid launch group configuration. Check logs."};const{err:r,data:a}=await m(()=>this.glue.windows.groups.create(o));return{error:r,data:null===(t=null==a?void 0:a[0])||void 0===t?void 0:t.id}}async addListeners(){await this.glue.interop.register("FSBL.Clients.AppsClient.spawnLaunchGroup",p(async e=>await this.spawnLaunchGroup(e),this.logger))}async start(){await this.addListeners(),await this.appUpdateListener()}}const V=e=>{var t,i;const n=null!==(i=null!==(t=e.src)&&void 0!==t?t:e.url)&&void 0!==i?i:e.icon;return null!=n?n:""},Z=(e,t)=>{var i,n,o,r,a;if(!e)return e;const s=null!==(n=null===(i=null==t?void 0:t.details)||void 0===i?void 0:i.url)&&void 0!==n?n:null===(a=null===(r=null===(o=null==t?void 0:t.hostManifests)||void 0===o?void 0:o.Finsemble)||void 0===r?void 0:r.window)||void 0===a?void 0:a.url;if(!s)return e;if(e.includes("http://")||e.includes("https://"))return e;try{return new URL(e,s).href}catch(t){return e}},J=(e,t)=>{var i;const n=null!==(i=null==e?void 0:e.icons)&&void 0!==i?i:[];if(!n)return;const o=n.filter(e=>!("taskbar"!==t||!(e=>{if(!(null==e?void 0:e.src))return!1;const t=e.src.toLowerCase();return t.endsWith(".png")||t.endsWith(".jpg")||t.endsWith(".jpeg")||t.endsWith(".ico")})(e))||"web"===t&&(e=>{if(!(null==e?void 0:e.src))return!0;if(null==e?void 0:e.type)return t=e.type,["image/webp","image/svg+xml","image/tiff","image/svg+xml","image/png","image/jpeg","image/jpg"].includes(t);var t;const i=e.src.toLowerCase();try{const e=new URL(i);return e.search?!e.search.includes(".ico")&&!e.search.includes(".icns"):!i.endsWith(".ico")&&!i.endsWith(".icns")}catch(e){return!1}})(e));return 0!==o.length?1===o.length?{imageType:"url",path:Z(V(o[0]),e)}:(e=>{const t=e.sort((e,t)=>{if(e.sizes&&t.sizes){const i=parseInt(e.sizes,10)-16,n=parseInt(t.sizes,10)-16;return Math.abs(i)-Math.abs(n)}return e.sizes&&!t.sizes?-1:t.sizes&&!e.sizes?1:0})[0];return{imageType:"url",path:V(t)}})(o):void 0},K=e=>(e=>{var t,i,n,o,r,a,s,l,c;const d=null!==(a=null!==(r=null!==(t=null==e?void 0:e.title)&&void 0!==t?t:null===(o=null===(n=null===(i=null==e?void 0:e.hostManifests)||void 0===i?void 0:i.Finsemble)||void 0===n?void 0:n.component)||void 0===o?void 0:o.displayName)&&void 0!==r?r:null==e?void 0:e.name)&&void 0!==a?a:null==e?void 0:e.appId,p={imageType:"initials",name:null!=d?d:""},u=J(e,"web"),h=J(e,"taskbar"),f=(e=>{var t,i,n,o;const r=null===(o=null===(n=null===(i=null===(t=null==e?void 0:e.hostManifests)||void 0===t?void 0:t.Finsemble)||void 0===i?void 0:i.foreign)||void 0===n?void 0:n.components)||void 0===o?void 0:o.Toolbar;return(null==r?void 0:r.iconURL)?{imageType:"url",path:r.iconURL}:void 0})(e),g=null!==(s=null!=f?f:u)&&void 0!==s?s:p,m=null!==(l=null!=f?f:u)&&void 0!==l?l:p;var v;return{taskbarIcon:null!==(c="url"===(null==(v=f)?void 0:v.imageType)?v:void 0)&&void 0!==c?c:h,toolbarIcon:g,titleBarIcon:m}})(e),Y=["assimilation","assimilated","native","NativeWindow","FinsembleNativeWindow","external"],Q=e=>{const t=(null!=e?e:[]).map(({src:e,url:t})=>({src:null!=e?e:t}));if(t.length>0)return t},X=e=>{const t=(null!=e?e:[]).map(({src:e,url:t})=>({src:null!=e?e:t}));if(t.length>0)return t};function ee({appId:e,name:t,interop:i,manifest:n,version:o,title:r,tooltip:a,description:s,images:l,icons:c,contactEmail:d,supportEmail:p,publisher:u,intents:h,tags:f}){var g,m,v,w,y,b,S,k,T,C,A,I,_,F,P,x,R;const L={appId:e,name:t,type:"web",interop:i,title:null!==(v=null!==(m=null!=r?r:null===(g=null==n?void 0:n.component)||void 0===g?void 0:g.displayName)&&void 0!==m?m:t)&&void 0!==v?v:e,description:s,version:o,tooltip:a,contactEmail:d,supportEmail:p,publisher:u,icons:Q(c),screenshots:X(l),hostManifests:{Finsemble:n},categories:f};return(null===(w=null==n?void 0:n.window)||void 0===w?void 0:w.url)?(Y.includes(null!==(b=null===(y=null==n?void 0:n.window)||void 0===y?void 0:y.windowType)&&void 0!==b?b:"")?L.type="onlineNative":L.type="web",L.details={url:null===(S=null==n?void 0:n.window)||void 0===S?void 0:S.url}):(null===(k=null==n?void 0:n.window)||void 0===k?void 0:k.path)?(L.type="native",L.details={path:null===(T=n.window)||void 0===T?void 0:T.path,arguments:null===(C=n.window)||void 0===C?void 0:C.arguments}):"Citrix"===(null===(A=null==n?void 0:n.window)||void 0===A?void 0:A.windowType)?(L.type="citrix",L.details={alias:null===(I=n.window)||void 0===I?void 0:I.alias,arguments:null===(_=n.window)||void 0===_?void 0:_.arguments}):(null===(F=null==n?void 0:n.window)||void 0===F?void 0:F.alias)||(null===(P=null==n?void 0:n.window)||void 0===P?void 0:P.arguments)?(L.type="native",L.details={alias:null===(x=n.window)||void 0===x?void 0:x.alias,arguments:null===(R=n.window)||void 0===R?void 0:R.arguments}):(L.type="other",L.details={}),h&&(null==h?void 0:h.length)>0&&(L.interop={intents:{listensFor:Object.fromEntries(null==h?void 0:h.map(({name:e,displayName:t,contexts:i})=>[e,{displayName:t,contexts:i}]))}}),L}const te={spacebar:"space",bs:"Backspace",bksp:"Backspace",shift:"Shift",shft:"Shift",lshift:"Shift",lshft:"Shift","left shift":"Shift",leftshift:"Shift",rshift:"Shift",rshft:"Shift","right shift":"Shift",rightshift:"Shift",commandorcontrol:"CommandOrControl",alternate:"Alt","space bar":"space",pgup:"PageUp","pg up":"PageUp","page down":"PageDown",pgdn:"PageDown","pg dn":"PageDown",pgdown:"PageDown","left arrow":"Left",left:"Left","up arrow":"Up",up:"Up","right arrow":"Right",right:"Right","down arrow":"Down",down:"Down",print:"PrintScreen",prnt:"PrintScreen","print screen":"PrintScreen",printscreen:"PrintScreen","print scrn":"PrintScreen",printscrn:"PrintScreen","prnt scrn":"PrintScreen",prntscrn:"PrintScreen","prt scrn":"PrintScreen",prtscrn:"PrintScreen","prt scn":"PrintScreen",prtscn:"PrintScreen","prt scr":"PrintScreen",prtscr:"PrintScreen","prt sc":"PrintScreen",prtsc:"PrintScreen","pr sc":"PrintScreen",prsc:"PrintScreen",insert:"Insert",ins:"Insert",delete:"Delete",del:"Delete",0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",a:"A",b:"B",c:"C",d:"D",e:"E",f:"F",g:"G",h:"H",i:"I",j:"J",k:"K",l:"L",m:"M",n:"N",o:"O",p:"P",q:"Q",r:"R",s:"S",t:"T",u:"U",v:"V",w:"W",x:"X",y:"Y",z:"Z",windows:"Super","left windows":"Super","right windows":"Super","numpad 0":"num0","numpad 1":"num1","numpad 2":"num2","numpad 3":"num3","numpad 4":"num4","numpad 5":"num5","numpad 6":"num6","numpad 7":"num7","numpad 8":"num8","numpad 9":"num9",f1:"F1",fn1:"F1","function 1":"F1",f2:"F2",fn2:"F2","function 2":"F2",f3:"F3",fn3:"F3","function 3":"F3",f4:"F4",fn4:"F4","function 4":"F4",f5:"F5",fn5:"F5","function 5":"F5",f6:"F6",fn6:"F6","function 6":"F6",f7:"F7",fn7:"F7","function 7":"F7",f8:"F8",fn8:"F8","function 8":"F8",f9:"F9",fn9:"F9","function 9":"F9",f10:"F10",fn10:"F10","function 10":"F10",f11:"F11",fn11:"F11","function 11":"F11",f12:"F12",fn12:"F12","function 12":"F12",f13:"F13",fn:"F13","function 13":"F13",f14:"F14",fn14:"F14","function 14":"F14",f15:"F15",fn15:"F15","function 15":"F15",f16:"F16",fn16:"F16","function 16":"F16","num lock":"Numlock",numlock:"Numlock","number lock":"Numlock","numeric lock":"Numlock","scroll lock":"Scrolllock",sclk:"Scrolllock",scrlk:"Scrolllock",slk:"Scrolllock","*":"*","+":"+","-":"-","/":"/",";":";","=":"=",",":",",".":".","`":"`","[":"[","]":"]","'":"'"},ie=e=>e.map(e=>{var t;return null!==(t=te[e.toString().toLowerCase()])&&void 0!==t?t:e}).join("+").replace(/windows/i,"super").replace(/spacebar/i,"space"),ne={trace:console.trace,debug:console.debug,info:console.info,warn:console.warn,error:console.error},oe=e=>{if(null===e)return"null";if(void 0===e)return"undefined";if(!Array.isArray(e)&&"object"!=typeof e)return e.toString();try{return JSON.stringify(e,null," ")}catch(e){return e.toString()}},re={window:{addToWorkspace:!1,affinity:"systemComponents",options:{autoShow:!1,resizable:!1,showTaskbarIcon:!1,alwaysOnTop:!0}},component:{category:"system"},foreign:{services:{windowService:{shouldRegister:!1}},components:{"App Launcher":{launchableByUser:!1},"Window Manager":{FSBLHeader:!1,persistWindowState:!1}}}},ae={hostManifests:{Finsemble:{bootParams:{autoStart:!0,stage:"preuser"},window:{options:{autoShow:!1},frame:!0},component:{singleton:!0,spawnOnStartup:!0},foreign:{components:{"Window Manager":{FSBLHeader:!1},WindowService:{manageWindowMovement:!1},"App Launcher":{launchableByUser:!1}}}}}},se=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),le=e=>{const t="string"==typeof e?[e]:e,i=t.map(e=>`((http|https)\\:\\/\\/([a-zA-Z0-9_-]*\\.)*${se(e)}(\\/)+.*)`),n=t.map(e=>`(${se(e)}(\\/)+.*)`),o=i.concat(n).join("|");return t.length?{allowed:`^${o}$`}:{}},ce={microkernel:["core",2e3],kernel:["core",1e3],"pre-authentication":["pre-sso",1e3],authentication:["sso",1e3],"appd-retrieval":["post-sso",7e3],"system-preuser":["post-sso",6e3],preuser:["post-sso",5e3],preuser2:["post-sso",4e3],preuser3:["post-sso",3e3],preuser4:["post-sso",2e3],"system-earlyuser":["post-sso",1500],earlyuser:["post-sso",1e3],user:["user",1e3]},de=(e,t,i)=>{var n,o,r,a;return((e,t,i)=>{var n,o,r,a,s,l,c,d;if(e.runPriority)return e;if(!t)return e;if(null===(n=t.bootParams)||void 0===n?void 0:n.stage){const n=null!==(o=t.bootParams.stage)&&void 0!==o?o:"user",p=null!==(r=ce[n])&&void 0!==r?r:["post-sso",9e3];e.runPriority={stage:p[0],priority:p[1],waitForInitialization:t.waitForInitialization,timeout:null!==(d=null!==(a=t.bootParams.timeout)&&void 0!==a?a:null===(c=null===(l=null===(s=i.finsemble)||void 0===s?void 0:s.bootConfig)||void 0===l?void 0:l.defaults)||void 0===c?void 0:c.startServiceTimeout)&&void 0!==d?d:12e4}}else e.autoStart&&(e.runPriority={stage:"post-sso",priority:2});return e})({autoStart:null!==(a=null!==(o=null===(n=null==t?void 0:t.component)||void 0===n?void 0:n.spawnOnStartup)&&void 0!==o?o:null===(r=null==t?void 0:t.bootParams)||void 0===r?void 0:r.autoStart)&&void 0!==a&&a},t,i)},pe=(e,t)=>{var i,n,o;(null===(o=null===(n=null===(i=null==e?void 0:e.finsemble)||void 0===i?void 0:i.authentication)||void 0===n?void 0:n.startup)||void 0===o?void 0:o.component)===t.name&&(t.name="sso-application",t.details.mode="html",t.details.allowClose=!0)},ue=(e,t,i,n,o)=>{var a,s,l,c,d,p,u,h,f,m;t.info(`config - Converting component config ${i} to iocd`,o);const{err:v,data:w}=me(e,t,n,o);if(v||!w)return{err:v};const{details:y}=w;y.mode=null!==(c=null===(l=null===(s=null===(a=o.foreign)||void 0===a?void 0:a.components)||void 0===s?void 0:s["Window Manager"])||void 0===l?void 0:l.FSBLHeader)&&void 0!==c&&c?y.mode:"frameless","UserPreferences"===i&&(y.downloadSettings={autoSave:!1}),y.allowEnvVars=!0,y.allowClearingCache=!0,y.disableTransitions=!0,y.transparent=!1,y.nativeWindowOpenOptions={allowChannels:!1,allowFeedback:!1,allowClose:!1,showInTaskbar:!1,allowMinimize:!1,allowMaximize:!1,allowClearingCache:!0,allowEnvVariables:!0,minWidth:0,maxWidth:1e6,minHeight:0,maxHeight:1e6,disableTransitions:!0,hasSizeAreas:!1,hidden:!0,ignoreFromLayouts:!0};const b={...de(0,o,n),type:"window",details:y,ignoreSavedLayout:"Toolbar"!==i,ignoreFromLayouts:!0,allowAutoArrange:!1,allowLogging:!0,allowCapture:!0,allowCLAAccess:!0,name:i,hidden:null!==(h=g(null===(u=null===(p=null===(d=null==o?void 0:o.foreign)||void 0===d?void 0:d.components)||void 0===p?void 0:p["App Launcher"])||void 0===u?void 0:u.launchableByUser))&&void 0!==h&&h,customProperties:{component:o}};"Toolbar"===i&&(b.shell=!0,b.runPriority={stage:"post-sso",priority:1501,waitForInitialization:!0,timeout:12e4}),"SystemTrayComponent"===i&&(b.name="custom-tray",b.details.showInTaskbar=!1,b.details.width=b.details.placement.width,b.details.height=b.details.placement.height,delete b.details.placement,b.runPriority={stage:"post-sso",priority:1e3}),pe(n,b);const S=null!==(m=null!==(f=o["io.Connect"])&&void 0!==f?f:o["IO.Connect"])&&void 0!==m?m:o.iocd;return{data:r()(b,null!=S?S:{})}},he=(e,t,i,n)=>{var o,a,s,l,c,d,p,u,h,f,m,v,w,b,S,k,T,C,A,I,_,F,P,x,R,L,W,j,O,D,M,$,E,U;const z=null!==(d=null!==(l=null!==(a=null===(o=i.hostManifests)||void 0===o?void 0:o["Glue 42"])&&void 0!==a?a:null===(s=i.hostManifests)||void 0===s?void 0:s["io.Connect"])&&void 0!==l?l:null===(c=i.hostManifests)||void 0===c?void 0:c["IO.Connect"])&&void 0!==d?d:null===(p=i.hostManifests)||void 0===p?void 0:p.iocd;if(z&&!(null===(u=i.hostManifests)||void 0===u?void 0:u.Finsemble))return{data:z};const N=null===(h=i.hostManifests)||void 0===h?void 0:h.Finsemble,B=ge(null==n?void 0:n.finsemble,N),H=K(i),{err:q,data:G}=ve(e,t,n,i);if(q||!G)return{err:q};const{details:V,asset:Z,type:J}=G,Y=y({...de(0,N,n),type:J,details:V,allowLogging:!0,name:i.appId,version:i.version,allowCapture:!0,allowCLAAccess:!0,title:null!==(w=null!==(v=null!==(f=i.title)&&void 0!==f?f:null===(m=null==N?void 0:N.component)||void 0===m?void 0:m.displayName)&&void 0!==v?v:i.name)&&void 0!==w?w:i.appId,caption:i.description,tooltip:i.tooltip,ignoreSavedLayout:!0,hidden:null!==(T=g(null===(k=null===(S=null===(b=null==N?void 0:N.foreign)||void 0===b?void 0:b.components)||void 0===S?void 0:S["App Launcher"])||void 0===k?void 0:k.launchableByUser))&&void 0!==T&&T,ignoreFromLayouts:null!==(P=g(null!==(_=null===(I=null===(A=null===(C=null==N?void 0:N.foreign)||void 0===C?void 0:C.services)||void 0===A?void 0:A.windowService)||void 0===I?void 0:I.addToWorkspace)&&void 0!==_?_:null===(F=null==N?void 0:N.window)||void 0===F?void 0:F.addToWorkspace))&&void 0!==P&&P,allowAutoArrange:B.allowAutoArrange,intents:we(null===(x=i.interop)||void 0===x?void 0:x.intents),reuseInLayouts:null!==(W=null===(L=null===(R=null==N?void 0:N.window)||void 0===R?void 0:R.options)||void 0===L?void 0:L.isEvergreen)&&void 0!==W&&W,supportEmails:i.supportEmail?[i.supportEmail]:void 0,keywords:null!==(j=i.categories)&&void 0!==j?j:i.tags,allowMultiple:g(null===(M=null===(D=null===(O=i.hostManifests)||void 0===O?void 0:O.Finsemble)||void 0===D?void 0:D.component)||void 0===M?void 0:M.singleton),icon:null!==(E=null===($=H.taskbarIcon)||void 0===$?void 0:$.path)&&void 0!==E?E:null===(U=H.toolbarIcon)||void 0===U?void 0:U.path,customProperties:{appd:i}});return Y.ignoreFromLayouts&&(Y.details.isSticky=!1,"tab"===Y.details.mode&&(Y.details.mode="flat")),Z&&(Y.asset=Z),pe(n,Y),{data:r()(Y,null!=z?z:{})}},fe=(e,t,i)=>{var n,o,r,a,s,l,c,d,p,u,h,f,m,v,w,y,b,S,k,T,C,A,I,_,F,P;const x=null==t?void 0:t.window,R=null==t?void 0:t.foreign,L=null!==(o=null===(n=null==R?void 0:R.services)||void 0===n?void 0:n.windowService)&&void 0!==o?o:null===(r=null==R?void 0:R.services)||void 0===r?void 0:r.dockingService,W=null===(a=null==R?void 0:R.components)||void 0===a?void 0:a["Window Manager"],j=null==e?void 0:e["Window Manager"],O=null==W?void 0:W.FSBLHeader;if("boolean"!=typeof O){if("close"===i)return null===(s=g(null==O?void 0:O.hideClose))||void 0===s||s;if("maximize"===i)return null===(c=null!==(l=null==L?void 0:L.allowMaximize)&&void 0!==l?l:g(null==O?void 0:O.hideMaximize))||void 0===c||c;if("minimize"===i)return null===(p=null!==(d=null==L?void 0:L.allowMinimize)&&void 0!==d?d:g(null==O?void 0:O.hideMinimize))||void 0===p||p;if("alwaysOnTop"===i)return null!==(h=null!==(u=null==W?void 0:W.alwaysOnTopIcon)&&void 0!==u?u:null==j?void 0:j.alwaysOnTopIcon)&&void 0!==h&&h}else{if("close"===i||"maximize"===i||"minimize"===i)return!1!==O;if("alwaysOnTop"===i)return!1}const D=null==e?void 0:e.servicesConfig,M=null==D?void 0:D.docking,$=null!==(m=null!==(f=null==D?void 0:D.windowService)&&void 0!==f?f:null==D?void 0:D.dockingService)&&void 0!==m?m:M;return"grouping"===i?(null===(w=null!==(v=null==L?void 0:L.manageWindowMovement)&&void 0!==v?v:null==M?void 0:M.enabled)||void 0===w||w)&&(null===(b=null!==(y=null==L?void 0:L.allowGrouping)&&void 0!==y?y:null==x?void 0:x.canDock)||void 0===b||b):"tabbing"===i&&(null===(A=null!==(T=null!==(S=null==L?void 0:L.manageWindowMovement)&&void 0!==S?S:null===(k=null==$?void 0:$.tabbing)||void 0===k?void 0:k.enabled)&&void 0!==T?T:null===(C=null==M?void 0:M.tabbing)||void 0===C?void 0:C.enabled)||void 0===A||A)&&(null===(P=null!==(F=null!==(_=null!==(I=null==L?void 0:L.allowTabbing)&&void 0!==I?I:null==W?void 0:W.showTabs)&&void 0!==_?_:null==j?void 0:j.showTabs)&&void 0!==F?F:g(null==L?void 0:L.ignoreTilingAndTabbingRequests))||void 0===P||P)},ge=(e,t)=>{var i,n,o,r,a,s,l,c,d,p,u,h,f,g,m,v,w,y,b,S,k,T,C,A,I,_,F,P,x,R,L,W,j,O,D,M,$,E,U,z,N,B,H,q,G,V,Z,J,K,Y,Q;const X=null===(n=null===(i=null==t?void 0:t.foreign)||void 0===i?void 0:i.services)||void 0===n?void 0:n.windowService,ee=(null==(te=X)?void 0:te.allowSnapping)||(null==te?void 0:te.allowGrouping)||(null==te?void 0:te.allowAutoArrange)||(null==te?void 0:te.allowTabbing)||(null==te?void 0:te.allowTiling)||(null==te?void 0:te.allowMinimize)||(null==te?void 0:te.allowMaximize);var te;const ie=!!(null===(o=null==t?void 0:t.window)||void 0===o?void 0:o.dockable),ne=null===(s=null===(a=null===(r=null==t?void 0:t.foreign)||void 0===r?void 0:r.components)||void 0===a?void 0:a["Window Manager"])||void 0===s?void 0:s.FSBLHeader;if(!(ee||ie||ne||!0===(null==X?void 0:X.manageWindowMovement))||!1===(null==X?void 0:X.manageWindowMovement))return{allowAutoArrange:!1,snapping:!1,tiling:!1,tabbing:!1,grouping:!1,canMinimize:!0,canMaximize:!0,overwriteStartDocked:!1,maxWidth:-1===(null===(l=null==t?void 0:t.window)||void 0===l?void 0:l.maxWidth)?null:null!==(d=null===(c=null==t?void 0:t.window)||void 0===c?void 0:c.maxWidth)&&void 0!==d?d:null,maxHeight:-1===(null===(p=null==t?void 0:t.window)||void 0===p?void 0:p.maxHeight)?null:null!==(h=null===(u=null==t?void 0:t.window)||void 0===u?void 0:u.maxHeight)&&void 0!==h?h:null,minWidth:-1===(null===(f=null==t?void 0:t.window)||void 0===f?void 0:f.minWidth)?null:null!==(m=null===(g=null==t?void 0:t.window)||void 0===g?void 0:g.minWidth)&&void 0!==m?m:null,minHeight:-1===(null===(v=null==t?void 0:t.window)||void 0===v?void 0:v.minHeight)?null:null!==(y=null===(w=null==t?void 0:t.window)||void 0===w?void 0:w.minHeight)&&void 0!==y?y:null,showTaskbarIcon:null!==(k=null===(S=null===(b=null==t?void 0:t.window)||void 0===b?void 0:b.options)||void 0===S?void 0:S.showTaskbarIcon)&&void 0!==k?k:null,minimizeButton:fe(e,t,"minimize"),maximizeButton:fe(e,t,"maximize"),alwaysOnTopButton:fe(e,t,"alwaysOnTop"),closeButton:fe(e,t,"close")};const oe=!!(null!==(T=null==X?void 0:X.manageWindowMovement)&&void 0!==T?T:ne||ie);return{allowAutoArrange:null!==(C=null==X?void 0:X.allowAutoArrange)&&void 0!==C?C:oe,snapping:!(null===(A=null==t?void 0:t.window)||void 0===A?void 0:A.ephemeral)&&(null!==(I=null==X?void 0:X.allowSnapping)&&void 0!==I?I:oe),tiling:null!==(_=null==X?void 0:X.allowTiling)&&void 0!==_?_:oe,tabbing:fe(e,t,"tabbing"),grouping:fe(e,t,"grouping"),canMinimize:null!==(x=null!==(F=null==X?void 0:X.allowMinimize)&&void 0!==F?F:null===(P=null==t?void 0:t.component)||void 0===P?void 0:P.canMinimize)&&void 0!==x?x:oe,canMaximize:null!==(W=null!==(R=null==X?void 0:X.allowMaximize)&&void 0!==R?R:null===(L=null==t?void 0:t.component)||void 0===L?void 0:L.canMaximize)&&void 0!==W?W:oe,overwriteStartDocked:null!==(M=null===(D=null===(O=null===(j=null==t?void 0:t.foreign)||void 0===j?void 0:j.services)||void 0===O?void 0:O.workspaceService)||void 0===D?void 0:D.global)&&void 0!==M&&M,maxWidth:-1===(null===($=null==t?void 0:t.window)||void 0===$?void 0:$.maxWidth)?null:null!==(U=null===(E=null==t?void 0:t.window)||void 0===E?void 0:E.maxWidth)&&void 0!==U?U:null,maxHeight:-1===(null===(z=null==t?void 0:t.window)||void 0===z?void 0:z.maxHeight)?null:null!==(B=null===(N=null==t?void 0:t.window)||void 0===N?void 0:N.maxHeight)&&void 0!==B?B:null,minWidth:-1===(null===(H=null==t?void 0:t.window)||void 0===H?void 0:H.minWidth)?null:null!==(G=null===(q=null==t?void 0:t.window)||void 0===q?void 0:q.minWidth)&&void 0!==G?G:null,minHeight:-1===(null===(V=null==t?void 0:t.window)||void 0===V?void 0:V.minHeight)?null:null!==(J=null===(Z=null==t?void 0:t.window)||void 0===Z?void 0:Z.minHeight)&&void 0!==J?J:null,showTaskbarIcon:null!==(Q=null===(Y=null===(K=null==t?void 0:t.window)||void 0===K?void 0:K.options)||void 0===Y?void 0:Y.showTaskbarIcon)&&void 0!==Q?Q:null,minimizeButton:fe(e,t,"minimize"),maximizeButton:fe(e,t,"maximize"),alwaysOnTopButton:fe(e,t,"alwaysOnTop"),closeButton:fe(e,t,"close")}},me=(e,t,i,n,o)=>{var r,a,s,l,c,d,p,u,h,f,m,v,w,k,I,_,F,P,x,R,L,W,j,O,D,M,$,E,U,z,N,B,H,q,G,V,Z,J,Y,Q,X,ee,te,ie,ne,oe,re,ae,se,ce,de,pe,ue,he,me,ve,we,ye,be,Se,ke,Te,Ce,Ae,Ie,_e,Fe,Pe,xe,Re,Le,We,je,Oe,De,Me,$e,Ee,Ue,ze,Ne,Be,He,qe,Ge,Ve,Ze,Je;const Ke=ge(null==i?void 0:i.finsemble,n),Ye={appId:null!==(r=null==o?void 0:o.appId)&&void 0!==r?r:"UI Component",type:"web",...o},Qe=K(Ye),Xe=null==n?void 0:n.window,et=T(null===(a=null==n?void 0:n.window)||void 0===a?void 0:a.monitor),tt=b(0,Xe,et),it=C(e,Xe),nt=null!==(c=null!==(s=null==Xe?void 0:Xe.ephemeral)&&void 0!==s?s:null===(l=null==Xe?void 0:Xe.options)||void 0===l?void 0:l.alwaysOnTop)&&void 0!==c&&c,{asset:ot,details:rt}=((e,t,i)=>{var n,o,r,a,s,l;const c=null!==(a=null===(r=null===(o=null===(n=null==t?void 0:t.hostManifests)||void 0===n?void 0:n.Finsemble)||void 0===o?void 0:o.window)||void 0===r?void 0:r.alias)&&void 0!==a?a:null===(s=null==t?void 0:t.details)||void 0===s?void 0:s.alias;if(!c)return{};const d=(null!==(l=e.appAssets)&&void 0!==l?l:[]).find(e=>e.alias===c);return d?{asset:{src:d.src},details:{path:"$ASSET_LOCATION$",command:d.target}}:(i.warn(`config - Assets entry for ${c} could not be found. Check manifest-local.json's "manifest" section.`),{})})(i,o,t);if((null==rt?void 0:rt.command)&&["AssimilationMain.exe","BloombergBridge.exe"].includes(rt.command))return t.warn(`config - appAsset for deprecated target ${rt.command} not loaded. Skipping app entry ${Ye.appId}`),{err:null};const at=null!==(u=null!==(p=null===(d=null==Ye?void 0:Ye.details)||void 0===d?void 0:d.url)&&void 0!==p?p:null==Xe?void 0:Xe.url)&&void 0!==u?u:null==Xe?void 0:Xe.path,st=null==at?void 0:at.includes(null===(h=null==i?void 0:i.finsemble)||void 0===h?void 0:h.documentRoot),lt=(null!==(m=null===(f=null==Xe?void 0:Xe.options)||void 0===f?void 0:f.securityPolicy)&&void 0!==m?m:st)?"trusted":"untrusted",ct="trusted"===lt,dt="trusted"===lt,pt="trusted"===lt,ut=!1!==(null===(k=null===(w=null===(v=null==n?void 0:n.foreign)||void 0===v?void 0:v.components)||void 0===w?void 0:w["Window Manager"])||void 0===k?void 0:k.FSBLHeader)&&void 0,ht=null===(P=null!==(F=null!==(I=g(null==Xe?void 0:Xe.ephemeral))&&void 0!==I?I:null===(_=null==Xe?void 0:Xe.options)||void 0===_?void 0:_.showTaskbarIcon)&&void 0!==F?F:ut)||void 0===P||P,ft=y({placement:tt,title:null!==(W=null!==(L=null!==(x=null==o?void 0:o.title)&&void 0!==x?x:null===(R=null==n?void 0:n.component)||void 0===R?void 0:R.displayName)&&void 0!==L?L:null==o?void 0:o.name)&&void 0!==W?W:null==o?void 0:o.appId,isSticky:null===(z=null!==(M=null===(D=null===(O=null===(j=null==n?void 0:n.foreign)||void 0===j?void 0:j.services)||void 0===O?void 0:O.windowService)||void 0===D?void 0:D.allowGrouping)&&void 0!==M?M:null===(U=null===(E=null===($=null==n?void 0:n.foreign)||void 0===$?void 0:$.services)||void 0===E?void 0:E.windowService)||void 0===U?void 0:U.shouldRegister)||void 0===z||z,channelSelector:null!==(B=null===(N=i.iocd)||void 0===N?void 0:N.channelSelector)&&void 0!==B?B:{enabled:!1!==(null===(H=null==n?void 0:n.interop)||void 0===H?void 0:H.useLinker)},allowClose:Ke.closeButton,allowMinimize:Ke.canMinimize,allowMaximize:Ke.canMaximize,allowEnvVars:ct,allowClearingCache:dt,allowOSInfo:pt,showCloneButton:null===(V=null===(G=null===(q=null==n?void 0:n.foreign)||void 0===q?void 0:q.components)||void 0===G?void 0:G["Window Manager"])||void 0===V?void 0:V.cloneIcon,backgroundThrottling:null!==(J=null===(Z=null==Xe?void 0:Xe.options)||void 0===Z?void 0:Z.backgroundThrottling)&&void 0!==J&&J,contextMenuEnabled:null===(Q=null===(Y=null==Xe?void 0:Xe.options)||void 0===Y?void 0:Y.contextMenu)||void 0===Q||Q,hasSizeAreas:null===(te=null!==(X=g(null==Xe?void 0:Xe.ephemeral))&&void 0!==X?X:null===(ee=null==Xe?void 0:Xe.options)||void 0===ee?void 0:ee.resizable)||void 0===te||te,hidden:null!==(oe=g(null!==(ie=null==Xe?void 0:Xe.autoShow)&&void 0!==ie?ie:null===(ne=null==Xe?void 0:Xe.options)||void 0===ne?void 0:ne.autoShow))&&void 0!==oe&&oe,maxHeight:Ke.maxHeight,maxWidth:Ke.maxWidth,minHeight:Ke.minHeight,minWidth:Ke.minWidth,saveCurrentUrlInLayout:null!==(ce=null===(se=null===(ae=null===(re=null==n?void 0:n.foreign)||void 0===re?void 0:re.services)||void 0===ae?void 0:ae.workspaceService)||void 0===se?void 0:se.persistURL)&&void 0!==ce&&ce,onTop:!!nt&&"always",showInTaskbar:ht,relativeTo:it.relativeTo,relativeDirection:it.relativeDirection,cascade:S(Xe),urlLoadOptions:null===(de=null==Xe?void 0:Xe.options)||void 0===de?void 0:de.userAgentString,devToolsEnable:!!(null===(pe=null==i?void 0:i["finsemble-electron-adapter"])||void 0===pe?void 0:pe.toggleInspectorHotkey),taskbar:{iconPath:null===(ue=Qe.taskbarIcon)||void 0===ue?void 0:ue.path,combineIcons:"sameIcon",allowPin:!1}});((null===(he=null==n?void 0:n.component)||void 0===he?void 0:he.maxReloadAttempts)||(null===(me=null==n?void 0:n.component)||void 0===me?void 0:me.reloadTimeout))&&(ft.reloadOptions={timeout:null!==(we=null===(ve=null==n?void 0:n.component)||void 0===ve?void 0:ve.reloadTimeout)&&void 0!==we?we:6e4,maxAttempts:null!==(be=null===(ye=null==n?void 0:n.component)||void 0===ye?void 0:ye.maxReloadAttempts)&&void 0!==be?be:1}),(null===(Se=null==n?void 0:n.window)||void 0===Se?void 0:Se.data)&&(ft.context={"#finsemble-spawnData":null===(ke=null==n?void 0:n.window)||void 0===ke?void 0:ke.data}),(null===(Te=null==n?void 0:n.window)||void 0===Te?void 0:Te.dockable)&&((e,t,i)=>{var n,o,r,a,s,l,c,d;const p=!1!==(null===(a=null===(r=null===(o=null===(n=t.finsemble)||void 0===n?void 0:n.servicesConfig)||void 0===o?void 0:o.docking)||void 0===r?void 0:r.claimSpace)||void 0===a?void 0:a.enabled)&&!1!==(null===(d=null===(c=null===(l=null===(s=t.finsemble)||void 0===s?void 0:s.servicesConfig)||void 0===l?void 0:l.window)||void 0===c?void 0:c.claimSpace)||void 0===d?void 0:d.enabled),{dockedHeight:u,dockable:h,docked:f,width:g}=i;e.docking={enabled:!0,claimScreenArea:p,initialPosition:f,allowedPositions:h,height:u},g&&(e.docking.width=g),delete e.placement})(ft,i,n.window);const gt=null!==(Ae=null===(Ce=null==o?void 0:o.details)||void 0===Ce?void 0:Ce.arguments)&&void 0!==Ae?Ae:null==Xe?void 0:Xe.arguments;let mt="string"==typeof gt?gt:(null!=gt?gt:[]).join(" ");"native"===Ye.type&&"assimilation"!==(null===(Ie=null==n?void 0:n.window)||void 0===Ie?void 0:Ie.windowType)&&(mt=A(mt,null==o?void 0:o.appId),!0!==(null===(_e=i.iocd)||void 0===_e?void 0:_e.apiToLogFile)||mt.includes("apiToLogFile")||(mt=mt.concat(" apiToLogFile=true")));const{command:vt,path:wt}=((e,t)=>{if(e)return e;if(!t)return{};const i=t.split(/[\\/]/);return{command:i.pop(),path:i.join("/")}})(rt,null===(Fe=Ye.details)||void 0===Fe?void 0:Fe.path),yt=null==vt?void 0:vt.endsWith(".bat"),bt=y({...ft,command:vt,path:wt,useShellExecute:yt,parameters:mt,saveInLayout:{command:null!==(Le=null===(Re=null===(xe=null===(Pe=null==n?void 0:n.foreign)||void 0===Pe?void 0:Pe.services)||void 0===xe?void 0:xe.workspaceService)||void 0===Re?void 0:Re.persistPath)&&void 0!==Le&&Le,parameters:null===(De=null===(Oe=null===(je=null===(We=null==n?void 0:n.foreign)||void 0===We?void 0:We.services)||void 0===je?void 0:je.workspaceService)||void 0===Oe?void 0:Oe.persistArguments)||void 0===De||De},startingContextMode:"assimilation"===(null===(Me=null==n?void 0:n.window)||void 0===Me?void 0:Me.windowType)?"none":"interop",trackingType:"assimilation"===(null===($e=null==n?void 0:n.window)||void 0===$e?void 0:$e.windowType)?"Process":"AGM"}),St=["BloombergBridgePreload","BloombergBridgeClient"],kt=((e,t)=>{var i,n,o,r,a,s,l,c,d,p,u,h;const f=null!==(n=null===(i=null==t?void 0:t.component)||void 0===i?void 0:i.preload)&&void 0!==n?n:[];let g=[];const m=null===(o=null==e?void 0:e.finsemble)||void 0===o?void 0:o.extensions,v=null===(s=null===(a=null===(r=null==e?void 0:e.finsemble)||void 0===r?void 0:r.servicesConfig)||void 0===a?void 0:a.launcher)||void 0===s?void 0:s.defaultPreloads;if(m){const e=Object.values(null!==(l=null==m?void 0:m.preloads)&&void 0!==l?l:{}),i=e=>{var i,n,o,r;return"all"===e.autoload||"launchable"===e.autoload&&null!==(r=null===(o=null===(n=null===(i=null==t?void 0:t.foreign)||void 0===i?void 0:i.components)||void 0===n?void 0:n["App Launcher"])||void 0===o?void 0:o.launchableByUser)&&void 0!==r&&r};g=g.concat(e.flatMap(e=>i(e)?[e.url]:[]))}if(v&&(g=g.concat(null!==(c=v.allComponents)&&void 0!==c?c:[]),(null===(u=null===(p=null===(d=null==t?void 0:t.foreign)||void 0===d?void 0:d.components)||void 0===p?void 0:p["App Launcher"])||void 0===u?void 0:u.launchableByUser)&&g.concat(null!==(h=v.launchableComponents)&&void 0!==h?h:[])),Array.isArray(f))g=g.concat(f);else if("string"==typeof f)g.push(f);else if(!1===f)return[];return g})(i,n).filter(e=>!St.some(t=>e.includes(t))),Tt=!1===(null===(ze=null===(Ue=null===(Ee=null==n?void 0:n.foreign)||void 0===Ee?void 0:Ee.components)||void 0===Ue?void 0:Ue["Window Manager"])||void 0===ze?void 0:ze.FSBLHeader)?"frameless":fe(i.finsemble,n,"tabbing")?"tab":"flat",Ct=y({...ft,onTop:(null===(Ne=null==Xe?void 0:Xe.options)||void 0===Ne?void 0:Ne.alwaysOnTop)?"always":null,contextMenuEnabled:null===(He=null===(Be=null==Xe?void 0:Xe.options)||void 0===Be?void 0:Be.contextMenu)||void 0===He||He,preloadScripts:{scripts:kt,useBase64PreloadScripts:!1},url:null!=at?at:"http://about",icon:null===(qe=Qe.taskbarIcon)||void 0===qe?void 0:qe.path,mode:Tt,logging:{networkRequestErrors:{enabled:!0}}});(null===(Ge=null==Xe?void 0:Xe.options)||void 0===Ge?void 0:Ge.allowedNavigationUrls)&&(Ct.navigation=le(null===(Ve=null==Xe?void 0:Xe.options)||void 0===Ve?void 0:Ve.allowedNavigationUrls)),(null===(Ze=null==Xe?void 0:Xe.options)||void 0===Ze?void 0:Ze.allowedWindowOpenUrls)&&(Ct.windowOpen=le(null===(Je=null==Xe?void 0:Xe.options)||void 0===Je?void 0:Je.allowedWindowOpenUrls));const At=y({...ft});switch(Ye.type){case"native":case"FinsembleNativeWindow":case"assimilation":case"external":return at&&(It=at,new RegExp("^(.+)://(.*)$","i").test(It))?{data:{details:Ct,asset:ot,type:"window"}}:{data:{details:bt,asset:ot,type:"exe"}};case"citrix":return{data:{details:At,asset:ot,type:"citrix"}};default:return{data:{details:Ct,asset:ot,type:"window"}}}var It},ve=(e,t,i,n)=>{var o;const r=null===(o=n.hostManifests)||void 0===o?void 0:o.Finsemble;return me(e,t,i,r,n)},we=e=>{var t;return e?Object.entries(null!==(t=e.listensFor)&&void 0!==t?t:{}).map(e=>{const[t,i]=e;return y({name:t,displayName:i.displayName,contexts:i.contexts,resultType:i.resultType})}):[]};class ye{constructor(e,t,i){this.glue=e,this.logger=t,this.router=i,this.startupTimes={stageTimes:[],cumulativeTimes:0},this.currentStage="",this.currentStageStartTime=0,this.stageWhenToChannelsMap={},this.executedStages={}}async waitForBootStageHandler(e){var t,i;const n=`${null!==(t=ce[e.stage][0])&&void 0!==t?t:e.stage}:${e.when}`;if(this.logger.debug("boot-sequence - bootService.waitForBootStageHandler",e,"converted to",n),this.executedStages[n]){const{err:t}=await v(()=>this.glue.interop.invoke(e.channel,{}));t&&this.logger.error("boot-sequence - Error calling waitForBootStage remote channel",e,t)}else this.stageWhenToChannelsMap[n]=(null!==(i=this.stageWhenToChannelsMap[n])&&void 0!==i?i:[]).concat(e.channel)}async signal(e,t){var i;if(this.logger.debug("boot-sequence - bootService:systemManager.boot.stage",e,t),"stageEntered"===t)this.currentStage=e,this.currentStageStartTime=performance.now();else{this.router.publish("systemManager.boot.stage",{stage:e});const t=Math.round(100*(performance.now()-this.currentStageStartTime+Number.EPSILON))/100;this.startupTimes.stageTimes.push({[this.currentStage]:t}),this.startupTimes.cumulativeTimes=this.startupTimes.cumulativeTimes+t}const n=`${e}:${t}`;await(async(e,t)=>{const i=e.map(e=>t(e)),n=await l().allSettled(i),o=n.filter(e=>"rejected"===e.status);if(o.length)throw o.map(e=>e.reason);return n.flatMap(e=>"fulfilled"===e.status?[e.value]:[])})(null!==(i=this.stageWhenToChannelsMap[n])&&void 0!==i?i:[],async e=>{this.logger.debug("boot-sequence - bootService.signal",n,e),await v(()=>this.glue.interop.invoke(e,{})).catch(t=>{this.logger.error("boot-sequence - Error signaling waitForBooStage",n,e,t)})}),delete this.stageWhenToChannelsMap[n],this.executedStages[n]=!0}async updateBootStage({stage:e,when:t}){this.logger.debug("boot-sequence - bootService.updateBootStage",e,t);const i=Object.keys(ce).flatMap(e=>[`${e}:stageEntered`,`${e}:stageCompleted`]),n=`${e}:${t}`;let o=[];for(let e=0;e<i.length;e++){const t=i[e];if(this.executedStages[t]||o.push(t),t===n){"earlyuser:stageCompleted"===n&&(o.push("user:stageEntered"),setTimeout(()=>{this.updateBootStage({stage:"user",when:"stageCompleted"})},5e3));break}}await(async(e,t)=>{const i=[];for(let n=0;n<e.length;n++)try{const o=await t(e[n]);i.push({status:"fulfilled",value:o})}catch(e){i.push({status:"rejected",reason:e.toString()})}return i.flatMap(e=>"fulfilled"===e.status?[e.value]:[])})(o,async e=>{const t=e.split(":");await this.signal(t[0],t[1])})}async onShuttingDown(e){return new Promise(async t=>{e.restarting?await this.router.transmit("Application.restart",{}):await this.router.transmit("Application.shutdown",{}),setTimeout(()=>{t({prevent:!1})},3e3)})}async receiveAutoStart(e){h(Object.entries(ce),async([t,i])=>{i[0]===e.stage&&i[1]===e.runPriority&&await this.updateBootStage({stage:t,when:"stageStarting"===e.phase?"stageEntered":"stageCompleted"})})}async start(){await this.glue.interop.register("T42.AppManager.AutoStart.Stage",e=>this.receiveAutoStart(e)),await this.glue.interop.register("FSBL.SystemManagerClient.waitForBootStage",p(async(e,t)=>this.waitForBootStageHandler(e),this.logger)),await this.glue.appManager.onShuttingDown(e=>this.onShuttingDown(e)),await this.router.addResponder("finsemble.startuptimes",(e,t)=>{null==t||t.sendQueryResponse(null,this.startupTimes)})}}const be=JSON.parse('{"$schema":"../schemas/fileBasedSchemas/coreConfigFile.schema.json","bootTasks":{"initializeDeepLinkingTask":{"bootParams":{"stage":"microkernel"}},"initializeRouterTask":{"bootParams":{"stage":"microkernel","dependencies":["initializeDeepLinkingTask"]}},"initializeFinsemblePubsubTask":{"bootParams":{"stage":"microkernel","dependencies":["initializeRouterTask"]}},"initializeSystemStateHandersTask":{"bootParams":{"stage":"microkernel","dependencies":["initializeRouterTask"]}},"updateServiceLauncherConfigTask":{"bootParams":{"stage":"microkernel","dependencies":["configService"]}},"waitForUpdateDownloadTask":{"bootParams":{"stage":"kernel","dependencies":["configService"],"timeout":60000,"stopOnFailure":false}},"addAppDefinitionsToDesktopAgentTask":{"bootParams":{"stage":"kernel","dependencies":["interopService"],"stopOnFailure":false}},"waitForAuthenticatedTask":{"bootParams":{"stage":"authentication","dependencies":["authenticationService"],"timeout":2147483647}},"initializeSystemManagerAPITask":{"bootParams":{"stage":"microkernel","dependencies":["initializeRouterTask"]}},"startLoggerTask":{"bootParams":{"stage":"microkernel","dependencies":["loggerService"]}},"loadUserDefinedComponentsTask":{"bootParams":{"stage":"preuser","stopOnFailure":false,"autoStart":true,"dependencies":["assimilationService"]}},"loadAppDInstalledComponentsTask":{"bootParams":{"stage":"kernel","stopOnFailure":false,"autoStart":true,"dependencies":["interopService"]}},"loadSystemTrayIconTask":{"bootParams":{"stage":"user","stopOnFailure":false,"autoStart":true}},"registerHotkeysTask":{"bootParams":{"stage":"user","stopOnFailure":false,"autoStart":true}},"setupSearchLauncherTask":{"bootParams":{"stage":"user","stopOnFailure":false,"autoStart":true}},"checkForScheduledRestartTask":{"bootParams":{"stage":"user","stopOnFailure":false,"autoStart":true}},"checkForScheduledShutdownTask":{"bootParams":{"stage":"user","stopOnFailure":false,"autoStart":true}},"hideSplashScreenTask":{"bootParams":{"stage":"user","stopOnFailure":false,"autoStart":true}},"fetchAppsFromAppDServersTask":{"bootParams":{"stage":"appd-retrieval","stopOnFailure":false,"autoStart":true,"dependencies":["configService"]}},"setupInitialWorkspaceTask":{"bootParams":{"stage":"system-earlyuser","stopOnFailure":false,"autoStart":true}}},"system":{"FSBLVersion":"APP_VERSION","gitHash":"GIT_HASH","finsembleLibraryPath":"$moduleRoot/FSBL.js","premiumRoot":"$moduleRoot","addFSBLWrappers":false,"saveLogToFileOnShutDown":false,"scheduledRestart":false,"scheduledShutdown":false,"isolateCrossDomainComponents":true,"requiredServicesConfig":{"routerService":{"bootParams":{"stage":"microkernel","autoStart":false},"spawnAs":"process","frame":true,"name":"routerService","html":"$servicesRoot/router/router.html","file":"$servicesRoot/router/routerService.js"},"loggerService":{"bootParams":{"stage":"microkernel","dependencies":["initializeSystemStateHandersTask"]},"spawnAs":"process","frame":true,"window":{"defaultWidth":1400,"defaultHeight":900,"contextMenu":false},"name":"loggerService","html":"$servicesRoot/logger/logger.html","file":"$servicesRoot/logger/loggerService.js","showWarningForLogStates":["Info","Debug","Verbose"],"defaultClientLogLevels":{"Error":true,"Warn":true,"Info":false,"Log":true,"Debug":false,"Verbose":false,"LocalOnly":false}},"dataStoreService":{"bootParams":{"stage":"microkernel","dependencies":["loggerService"]},"spawnAs":"window","frame":true,"name":"dataStoreService","html":"$servicesRoot/distributedStore/distributedStore.html","file":"$servicesRoot/distributedStore/distributedStoreService.js"},"configService":{"bootParams":{"stage":"microkernel","dependencies":["dataStoreService"]},"spawnAs":"window","frame":true,"changeApplicationStateBeforeLoad":"configuring","changeApplicationStateAfterLoad":"initializing","name":"configService","html":"$servicesRoot/config/config.html","file":"$servicesRoot/config/configService.js"}}},"servicesRoot":"$moduleRoot/services","thirdPartyRoot":"$moduleRoot/thirdParty","configVersion":"5.0.0","workspaceTemplates":{"Blank Template":{"name":"Blank Template","description":"Empty workspace template.","windows":[],"groups":{},"windowData":[]}},"betaFeatures":{},"deprecatedConfig":[{"versionDeprecated":"8.1","operation":"migrateAppDFDC320","description":"Migrating Finsemble\'s AppD config to FDC3 2.0 format.","userMessage":"Migrating Finsemble\'s AppD config to FDC3 2.0 format.","userMessageType":"warn"},{"versionDeprecated":"8.6","property":"finsemble-electron-adapter.useDOMBasedMovement","operation":"logMessage","description":"Setting useDOMBasedMovement is deprecated due to poor interactions between Electron/Window\'s handling of -webkeit-app-region: drag, window\'s aero-shake and the fact it swallows mouseevents on the relevant region.","userMessage":"Setting finsemble-electron-adapter.useDOMBasedMovement in your manifest file is deprecated and should be removed.","userMessageType":"warn"}],"importConfig":["$moduleRoot/configs/core/services.json","$moduleRoot/configs/core/securityPolicies.json","$moduleRoot/configs/core/UIComponents.json","$moduleRoot/configs/core/workspaces.json"]}'),Se=JSON.parse('{"$schema":"../schemas/fileBasedSchemas/uiComponentsFile.schema.json","components":{"Authentication":{"//":"Dummy component for internal testing of Authentication","uiComponent":true,"window":{"url":"$moduleRoot/ui-components/Authentication/index.html","top":"center","left":"center","width":358,"height":460,"ephemeral":true,"options":{"autoShow":true}}},"NonConfiguredComponent":{"//":"A component that is displayed in lieu of any attempt to open a non-existent app or component","window":{"url":"$moduleRoot/ui-components/NonConfiguredComponent/index.html","affinity":"systemComponents"},"component":{"category":"system"}},"FDC3Resolver":{"uiComponent":true,"bootParams":{"stage":"preuser"},"window":{"url":"$moduleRoot/ui-components/FDC3Resolver/index.html","top":"center","left":"center","width":512,"height":525,"options":{"showTaskbarIcon":false,"contextMenu":false,"alwaysOnTop":true}},"component":{"spawnOnStartup":true,"singleton":true},"foreign":{"services":{"windowService":{"allowTabbing":false}},"components":{"Window Manager":{"FSBLHeader":{"hideMinimize":true,"hideMaximize":true,"hideClose":true},"titlebarType":"injected","alwaysOnTopIcon":false}}}},"LinkerWindow":{"uiComponent":true,"bootParams":{"stage":"earlyuser","dependencies":["Toolbar"]},"window":{"url":"$moduleRoot/ui-components/Linker/index.html","width":132,"height":265},"component":{"spawnOnStartup":true}},"QuickComponentForm":{"uiComponent":true,"window":{"url":"$moduleRoot/ui-components/QuickComponentForm/index.html","width":550,"height":175,"position":"absolute","top":"center","left":"center"}},"DockingGroupMask":{"uiComponent":true,"window":{"url":"$moduleRoot/ui-components/DockingGroupMask/index.html","options":{"opacity":0.7}}},"YesNoDialog":{"uiComponent":true,"bootParams":{"stage":"earlyuser","dependencies":["Toolbar"]},"window":{"url":"$moduleRoot/ui-components/YesNoDialog/index.html","width":500,"height":223,"position":"absolute","top":"center","left":"center"},"component":{"spawnOnStartup":true},"foreign":{"clients":{"dialogManager":{"isDialog":true}}}},"SingleInputDialog":{"uiComponent":true,"bootParams":{"stage":"earlyuser","dependencies":["Toolbar"]},"window":{"url":"$moduleRoot/ui-components/SingleInputDialog/index.html","width":480,"height":154,"position":"absolute","top":"center","left":"center"},"component":{"spawnOnStartup":true},"foreign":{"clients":{"dialogManager":{"isDialog":true}}}},"Toolbar":{"uiComponent":true,"bootParams":{"stage":"earlyuser","checkpoints":{"initialize":{"postStartupCompletion":true}}},"window":{"id":"launcher","url":"$moduleRoot/ui-components/Toolbar/index.html","width":600,"height":39,"dockedHeight":39,"top":0,"left":0,"right":0,"position":"available","dockable":["top","bottom"],"maxHeight":39,"minHeight":39,"minWidth":300,"docked":"top","options":{"autoShow":true,"contextMenu":false,"showTaskbarIcon":true,"alwaysOnTop":false,"resizable":true,"cornerRounding":false}},"component":{"spawnOnStartup":true,"canMinimize":false,"canMaximize":false},"foreign":{"services":{"workspaceService":{"global":true},"windowService":{"allowGrouping":false}}},"childWindowOptions":{"window":{"addToWorkspace":false,"maxHeight":null,"minHeight":null,"dockable":false,"show":false,"options":{"resizable":false,"autoShow":false}},"foreign":{"components":{"Window Manager":{"FSBLHeader":false}},"services":{"windowService":{"manageWindowMovement":false}}}}},"UserPreferences":{"uiComponent":true,"bootParams":{"stage":"earlyuser","dependencies":["Toolbar"]},"window":{"url":"$moduleRoot/ui-components/UserPreferences/index.html","top":"center","left":"center","width":800,"height":600},"component":{"spawnOnStartup":true}},"ProcessMonitor":{"//":"Process monitor is configured to behave like an app except it is not added to workspaces (and therefore also cannot be tabbed)","window":{"url":"$moduleRoot/ui-components/ProcessMonitor/index.html","affinity":"systemComponents","width":785,"height":700},"component":{"category":"system"},"foreign":{"services":{"windowService":{"allowAutoArrange":true,"allowTabbing":false}},"components":{"App Launcher":{"launchableByUser":false},"Window Manager":{"FSBLHeader":true,"persistWindowState":true,"title":"Process Monitor","titlebarType":"injected"}}}},"Download Manager":{"window":{"url":"$moduleRoot/ui-components/DownloadManager/index.html","affinity":"systemComponents","width":600,"height":700,"options":{"resizable":false,"showTaskbarIcon":true}},"component":{"category":"system","spawnOnStartup":false,"singleton":true,"canMaximize":false},"foreign":{"services":{"windowService":{"allowAutoArrange":false,"allowTabbing":false,"allowTiling":false,"allowSnapping":false}},"components":{"canMaximize":false,"Window Manager":{"FSBLHeader":{"hideMaximize":true},"persistWindowState":true,"showTabs":false,"title":"Download Manager","titlebarType":"injected"}}}},"AppCatalog":{"uiComponent":true,"window":{"url":"$moduleRoot/ui-components/AppCatalog/index.html","width":600,"height":700,"options":{"autoShow":true,"showTaskbarIcon":true}},"component":{"spawnOnStartup":false,"canMaximize":false},"foreign":{"components":{"Window Manager":{"FSBLHeader":{"hideMaximize":true},"persistWindowState":true,"showTabs":false,"title":"App Catalog"}}}},"SystemTrayComponent":{"uiComponent":true,"bootParams":{"stage":"earlyuser","dependencies":["Toolbar"]},"window":{"url":"$moduleRoot/ui-components/SystemTrayComponent/index.html","width":150,"height":40},"component":{"spawnOnStartup":true}},"NotificationsCenter":{"uiComponent":true,"bootParams":{"stage":"earlyuser","dependencies":["Toolbar"]},"window":{"url":"$moduleRoot/ui-components/NotificationsCenter/index.html","forceOntoMonitor":true,"top":0,"right":0,"width":428,"maxWidth":428,"minWidth":428,"height":"100%","position":"available","monitor":"primary","options":{"resizable":true},"data":{"notifications":{"applyMuteFilters":false,"notificationsHistory":true}}},"component":{"spawnOnStartup":true,"singleton":true,"canMaximize":false},"foreign":{"services":{"windowService":{"allowAutoArrange":false,"allowTabbing":false,"allowTiling":false,"allowSnapping":false}},"components":{"Window Manager":{"FSBLHeader":{"hideMaximize":true,"hideClose":false,"hideMinimize":true,"hackScrollbar":false},"titlebarType":"injected"},"Toolbar":{"iconClass":"notification-center"}}}},"NotificationsToasts":{"uiComponent":true,"bootParams":{"stage":"earlyuser","dependencies":["Toolbar"]},"window":{"name":"notifications-toasts","url":"$moduleRoot/ui-components/NotificationsToasts/index.html","forceOntoMonitor":true,"top":0,"right":0,"width":428,"height":"100%","position":"available","data":{"notifications":{"applyMuteFilters":true}}},"component":{"spawnOnStartup":true,"singleton":true}},"HighlightScrim":{"uiComponent":true,"window":{"url":"$moduleRoot/ui-components/HighlightScrim/index.html","options":{"alwaysOnTop":false,"opacity":0.5}},"component":{"spawnOnStartup":true,"singleton":true}}}}'),ke=JSON.parse('{"$schema":"../schemas/fileBasedSchemas/securityPoliciesFile.schema.json","securityPolicies":{"//trusted":"By default, the trusted policy allows access to every API endpoint.","trusted":{},"untrusted":{"System":{"clearCache":false,"deleteAssets":false,"exit":false,"launchExternalProcess":false,"getHostSpecs":false,"getProcessList":false,"logToDisk":false,"getEnvironmentVariable":false},"Window":{"executeJavaScript":false,"webPreferences":{"preload":false}}}},"securityPolicyRules":{"crossDomain":"untrusted","sameDomain":"trusted"}}'),Te=JSON.parse('{"$schema":"../schemas/fileBasedSchemas/servicesFile.schema.json","services":{"workspaceService":{"bootParams":{"stage":"system-preuser","stopOnFailure":false},"spawnAs":"window","name":"workspaceService","html":"$servicesRoot/workspace/workspace.html","file":"$servicesRoot/workspace/workspaceService.js","category":"system","window":{"frame":true}},"storageService":{"bootParams":{"stage":"kernel"},"spawnAs":"window","name":"storageService","html":"$servicesRoot/storage/storage.html","file":"$servicesRoot/storage/storageService.js","category":"system","window":{"frame":true}},"linkerService":{"bootParams":{"stage":"kernel","dependencies":["windowService","storageService"],"stopOnFailure":false},"spawnAs":"window","name":"linkerService","html":"$servicesRoot/linker/linker.html","file":"$servicesRoot/linker/linkerService.js","category":"system","window":{"frame":true},"channels":[{"name":"group1","color":"#8781BD","border":"#797381"},{"name":"group2","color":"#D8BE2A","border":"#FFD803"},{"name":"group3","color":"#6BA703","border":"#71CE47"},{"name":"group4","color":"#FE6262","border":"#F83B3B"},{"name":"group5","color":"#2DACFF","border":"#039BFF"},{"name":"group6","color":"#FFA200","border":"#F29A01"}]},"interopService":{"bootParams":{"stage":"kernel","stopOnFailure":true,"dependencies":["assimilationService"]},"spawnAs":"window","visible":false,"name":"interopService","html":"$servicesRoot/Interop/Interop.html","file":"$servicesRoot/Interop/InteropService.js","category":"system","window":{"frame":true,"hideOnClose":true}},"searchService":{"bootParams":{"stage":"kernel","dependencies":["windowService"],"stopOnFailure":false},"spawnAs":"window","name":"searchService","html":"$servicesRoot/search/search.html","file":"$servicesRoot/search/searchService.js","category":"system","window":{"frame":true}},"windowService":{"bootParams":{"stage":"kernel","dependencies":[]},"spawnAs":"window","name":"windowService","html":"$servicesRoot/window/windowService.html","file":"$servicesRoot/window/windowService.js","config":{"BUFFER_SIZE":20,"RESIZE_EVENT_THROTTLE_PERIOD":0,"MINIMUM_WIDTH":98,"MINIMUM_HEIGHT":28,"GROUP_MODE":{"enabled":true,"behavior":"explicit"},"DEBUG":true,"ALLOW_GROUPS_TO_SNAP":true,"SNAPPING_OPACITY":0.8,"groupTileBuffer":30,"headerHeight":32,"heartbeatResponseTimeoutDefaults":{"min":5000,"max":1800000,"crashed":90000,"possiblyCrashed":60000,"notResponding":60000},"tabbing":{"enabled":true},"tiling":{"enabled":true},"claimSpace":{"enabled":true,"alwaysOnTop":false},"preventOverlapClaimSpace":true},"category":"system","window":{"frame":true}},"authenticationService":{"bootParams":{"stage":"authentication","timeout":2147483647},"spawnAs":"window","name":"authenticationService","html":"$servicesRoot/authentication/authentication.html","file":"$servicesRoot/authentication/authenticationService.js","category":"system","window":{"frame":true}},"assimilationService":{"bootParams":{"stage":"kernel","dependencies":["windowService","storageService"],"stopOnFailure":false},"spawnAs":"window","name":"assimilationService","html":"$servicesRoot/assimilation/assimilation.html","file":"$servicesRoot/assimilation/assimilationService.js","category":"system","window":{"frame":true},"config":{"enabled":true,"port":8392,"useFeaSpawn":false,"throttle":15,"blacklist":[],"whitelist":[],"onlySpawned":true,"focusDelay":30,"eventIgnore":50,"hotkeyTimeout":60000,"hideTitleBars":false}},"hotkeysService":{"bootParams":{"stage":"kernel","dependencies":["assimilationService"],"stopOnFailure":false},"spawnAs":"window","name":"hotkeysService","html":"$servicesRoot/hotkeys/hotkeys.html","file":"$servicesRoot/hotkeys/hotkeysService.js","category":"system","window":{"frame":true}},"notificationsService":{"bootParams":{"stage":"system-preuser","stopOnFailure":false,"dependencies":["configService","storageService"]},"spawnAs":"window","name":"notificationsService","html":"$servicesRoot/notification/notification.html","file":"$servicesRoot/notification/notificationService.js","category":"system","window":{"frame":true}}}}'),Ce=JSON.parse('{"comment":"config to define default workspace on first run","$schema":"../schemas/fileBasedSchemas/workspacesFile.schema.json","workspaces":[{"version":"1.0.0","name":"Default Workspace","type":"workspace","groups":{},"windows":[]}]}'),Ae=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","finsemble:docs":{"$comment":"PLEASE READ THE DOCUMENTATION THOROUGHLY BEFORE EDITING THIS FILE!!!!! --\x3e https://docs.google.com/document/d/1AAXkVPIC5eObZy4zcl55ia7-wtzCJvSVkO7VHjTNUg0. Do not make $ref references more than one level deep because the configReferenceGenerator is not capable of following those paths. `finsemble:docs` entries will override schema entries when generating docs. The `finsemble:docs.halt` directive will cause the documentation generation to not follow the entire path for that item. "},"$ref":"#/definitions/ManifestSubschema","definitions":{"ManifestFileSubschema":{"description":"Subschema corresponding to a file containing the manifest config, to support VSCode Intellisense.. ","type":"object","properties":{"$schema":{"type":"string"},"iocd":{"$ref":"#/definitions/iocd"},"comment":{"type":"string"},"devtools_port":{"description":"Deprecated. This property is no longer supported and will likely go away in the future. Use the remote-debugging-port chromium flag within project.json instead.","type":"number","deprecated":true},"startup_app":{"$ref":"#/definitions/manifestStartupApp"},"splashScreenImage":{"$ref":"#/definitions/splashScreenImage"},"splashScreenOptions":{"$ref":"#/definitions/splashScreenOptions"},"splashScreenTimeout":{"$ref":"#/definitions/splashScreenTimeout"},"removePathInSpawnExternalApps":{"description":"Set to false to allow spawning by path","type":"boolean"},"disableWMICalls":{"$ref":"#/definitions/disableWMICalls"},"appAssets":{"$ref":"#/definitions/appAssets"},"affinitySurrogateUrl":{"type":"string"},"finsemble":{"title":"finsemble","description":"Copy of Finsemble object to verify the manifest file","type":"object","properties":{"applicationRoot":{"type":"string"},"documentRoot":{"type":"string"},"moduleRoot":{"type":"string"},"configRoot":{"type":"string"},"apps":{"$ref":"#/definitions/apps"},"appd":{"$ref":"#/definitions/appd"},"fdc3AppDServers":{"$ref":"#/definitions/fdc3AppDServers"},"servicesRoot":{"type":"string"},"configSchemaURL":{"type":"string"},"notificationURL":{"type":"string","deprecated":true,"description":"The notificationURL is no longer used by toasts or UserNotification and will likely go away in the future."},"availableDashbarItems":{"$ref":"#/definitions/availableDashbarItems"},"bootConfig":{"$ref":"#/definitions/boot_config"},"router":{"$ref":"#/definitions/router"},"logger":{"$ref":"#/definitions/logger"},"importConfig":{"$ref":"#/definitions/importConfig"},"importThirdPartyConfig":{"$ref":"#/definitions/importThirdPartyConfig"},"shutdownTimeout":{"description":"Amount of time (in milliseconds) to give services to shut down before forcibly quitting the application. Components get 2 seconds less than services.","type":"number","minimum":10000,"default":30000},"systemTrayIcon":{"description":"Sets the location of the system tray icon (lower right corner of the terminal)","type":"string","default":"../../assets/img/Finsemble_SystemTray_Icon.png"},"autoSignOn":{"description":"Provides configuration and credentials for automatically signing a user into specified web applications","type":"object","deprecated":true,"properties":{"hardcoded":{"type":"object"}}},"toolbarMenus":{"$ref":"#/definitions/toolbarMenus"},"citrix":{"description":"Configuration for connecting to Citrix windows","type":"object","properties":{"selfServiceLocation":{"type":"string","default":"C:/Program Files (x86)/Citrix/ICA Client/SelfServicePlugin/SelfService.exe"}}},"trustedPreloads":{"$ref":"#/definitions/trustedPreloads"},"extensions":{"$ref":"#/definitions/extensions"},"windowTitleBarUrl":{"$ref":"#/definitions/windowTitleBarUrl"},"decoratorWindowUrl":{"type":"string"},"custom":{}},"required":["bootConfig"]},"finsemble-electron-adapter":{"$ref":"#/definitions/electronAdapter"},"allowEvalInPreload":{"description":"Set to `true` to delete `unsafe-eval` and `script-src directives` from the content security policy.","type":"boolean","default":false},"Content-Security-Policy":{"$ref":"#/definitions/contentSecurityPolicy"},"custom":{}},"required":["finsemble"],"additionalProperties":false},"AppsFileSubschema":{"description":"Subschema corresponding to a file containing UI component config, to support VSCode Intellisense.. ","type":"object","properties":{"$schema":{"type":"string"},"comment":{},"apps":{"$ref":"#/definitions/apps"}},"additionalProperties":false},"AppDFileSubschema":{"description":"Subschema corresponding to a file containing UI component config, to support VSCode Intellisense.. ","type":"object","properties":{"$schema":{"type":"string"},"comment":{},"appd":{"$ref":"#/definitions/appd"}},"additionalProperties":false},"UIComponentsFileSubschema":{"description":"Subschema corresponding to a file containing UI component config, to support VSCode Intellisense.. ","type":"object","properties":{"$schema":{"type":"string"},"comment":{},"components":{"$ref":"#/definitions/components"}},"additionalProperties":false},"ComponentsFileSubschema":{"description":"Subschema corresponding to a file containing component config, to support VSCode Intellisense.. ","type":"object","properties":{"$schema":{"type":"string"},"comment":{},"components":{"description":"config for components","type":"object","additionalProperties":{"$ref":"#/definitions/component"}}},"additionalProperties":false},"ServicesFileSubschema":{"description":"Subschema corresponding to a file containing service config, to support VSCode Intellisense.. ","type":"object","properties":{"$schema":{"type":"string"},"comment":{"type":"string"},"services":{"description":"config for components","type":"object","additionalProperties":{"$ref":"#/definitions/service"}}},"additionalProperties":false},"SecurityPolicyFileSubschema":{"description":"Subschema corresponding to the security policies file, to support VSCode Intellisense.. ","type":"object","properties":{"$schema":{},"comment":{"type":"string"},"securityPolicies":{"$ref":"#/definitions/securityPolicies"},"securityPolicyRules":{"$ref":"#/definitions/securityPolicyRules"}},"required":["securityPolicies","securityPolicyRules"],"additionalProperties":false},"WorkspacesFileSubschema":{"description":"Subschema corresponding to the security policies file, to support VSCode Intellisense.. ","type":"object","properties":{"$schema":{},"comment":{"type":"string"},"workspaces":{"$ref":"#/definitions/workspacesArray"}},"required":["workspaces"],"additionalProperties":false},"CoreConfigFileSubschema":{"description":"Subschema corresponding to a file containing the manifest config, to support VSCode Intellisense.. ","type":"object","properties":{"$schema":{"type":"string"},"comment":{"type":"string"},"bootTasks":{"$ref":"#/definitions/bootTasks"},"system":{"$ref":"#/definitions/system"},"servicesRoot":{"type":"string"},"thirdPartyRoot":{"type":"string"},"configVersion":{"type":"string"},"workspaceTemplates":{"$ref":"#/definitions/blankWorkspaceTemplate"},"betaFeatures":{"deprecated":true,"private":true,"type":"object"},"importConfig":{"$ref":"#/definitions/importConfig"},"deprecatedConfig":{"$ref":"#/definitions/deprecatedConfig"},"components":{"$ref":"#/definitions/components"}},"required":["bootTasks","system","servicesRoot","thirdPartyRoot","configVersion","betaFeatures","importConfig"],"additionalProperties":false},"DashbarFileSubschema":{"description":"Subschema corresponding to a file containing the Dashbar items configuration, to support VSCode Intellisense.. ","type":"object","properties":{"$schema":{"type":"string"},"comment":{"type":"string"},"availableDashbarItems":{"$ref":"#/definitions/availableDashbarItems"}}},"ManifestSubschema":{"comment":"Used by Finsemble for run-time verification","description":"The highest level manifest object, which includes \\"finsemble\\" configuration.","finsemble:docs":{"rightnav":true},"type":"object","properties":{"$schema":{"type":"string"},"iocd":{"$ref":"#/definitions/iocd"},"comment":{"type":"string"},"devtools_port":{"deprecated":true,"description":"This property is no longer supported and will likely go away in the future.","replaceWith":"the remote-debugging-port chromium flag within project.json.","type":"number","default":9090},"startup_app":{"$ref":"#/definitions/manifestStartupApp"},"splashScreenImage":{"$ref":"#/definitions/splashScreenImage"},"splashScreenOptions":{"$ref":"#/definitions/splashScreenOptions"},"splashScreenTimeout":{"$ref":"#/definitions/splashScreenTimeout"},"removePathInSpawnExternalApps":{"description":"Set to false to allow spawning by path","type":"boolean"},"disableWMICalls":{"$ref":"#/definitions/disableWMICalls"},"appAssets":{"$ref":"#/definitions/appAssets"},"finsemble":{"$ref":"#/definitions/FinsembleSubschema"},"finsemble-electron-adapter":{"$ref":"#/definitions/electronAdapter"},"affinitySurrogateUrl":{"type":"string"},"custom":{},"allowEvalInPreload":{"description":"Set to `true` to delete `unsafe-eval` and `script-src directives` from the content security policy.","type":"boolean","default":false},"Content-Security-Policy":{"$ref":"#/definitions/contentSecurityPolicy"}},"required":["startup_app","finsemble"],"additionalProperties":false},"BootManifestSubschema":{"comment":"Used by Finsemble for run-time verification","description":"The boot subschema, including manifest and partial finsemble","type":"object","properties":{"$schema":{"type":"string"},"iocd":{"$ref":"#/definitions/iocd"},"comment":{"type":"string"},"devtools_port":{"deprecated":true,"description":"This property is no longer supported and will likely go away in the future. Use the remote-debugging-port chromium flag within project.json instead.","type":"number"},"startup_app":{"$ref":"#/definitions/manifestStartupApp"},"splashScreenImage":{"$ref":"#/definitions/splashScreenImage"},"splashScreenOptions":{"$ref":"#/definitions/splashScreenOptions"},"splashScreenTimeout":{"$ref":"#/definitions/splashScreenTimeout"},"removePathInSpawnExternalApps":{"description":"Set to false to allow spawning by path","type":"boolean"},"disableWMICalls":{"$ref":"#/definitions/disableWMICalls"},"affinitySurrogateUrl":{"type":"string"},"appAssets":{"title":"appAssets","description":"Manifest array of external assets to be automatically loading by FEA. ","type":"array","items":{"type":"object","properties":{"src":{"type":"string"},"version":{"type":"string"},"alias":{"type":"string"},"target":{"type":"string"}}}},"finsemble":{"title":"finsemble","description":"Subschema for config required to boot Finsemble.","type":"object","properties":{"applicationRoot":{"type":"string"},"documentRoot":{"type":"string"},"moduleRoot":{"type":"string"},"configRoot":{"type":"string"},"apps":{"$ref":"#/definitions/apps"},"appd":{"$ref":"#/definitions/appd"},"fdc3AppDServers":{"$ref":"#/definitions/fdc3AppDServers"},"servicesRoot":{"type":"string"},"thirdPartyRoot":{"type":"string"},"configVersion":{"type":"string"},"configSchemaURL":{"type":"string"},"notificationURL":{"type":"string","deprecated":true,"description":"The notificationURL is no longer used by toasts or UserNotification and will likely go away in the future."},"bootConfig":{"$ref":"#/definitions/boot_config"},"router":{"$ref":"#/definitions/router"},"bootTasks":{"$ref":"#/definitions/bootTasks"},"system":{"$ref":"#/definitions/system"},"shutdownTimeout":{"description":"Amount of time (in milliseconds) to give services to shut down before forcibly quitting the application. Components get 2 seconds less than services.","type":"number","minimum":10000,"default":30000},"deprecatedConfig":{"$ref":"#/definitions/deprecatedConfig"},"trustedPreloads":{"$ref":"#/definitions/trustedPreloads"}},"required":["applicationRoot","moduleRoot","servicesRoot","thirdPartyRoot","configVersion","bootConfig","bootTasks","system"],"additionalProperties":true},"finsemble-electron-adapter":{"$ref":"#/definitions/electronAdapter"},"allowEvalInPreload":{"description":"Set to `true` to delete `unsafe-eval` and `script-src directives` from the content security policy.","type":"boolean","default":false},"Content-Security-Policy":{"$ref":"#/definitions/contentSecurityPolicy"},"custom":{}},"required":["startup_app","finsemble"],"additionalProperties":false},"FinsembleSubschema":{"comment":"Used by Finsemble for run-time verification","title":"finsemble","finsemble:docs":{"rightnav":true},"description":"Finsemble\'s root runtime config. This can be found in \\"manifest-local.html\\".","type":"object","properties":{"$schema":{"type":"string"},"applicationRoot":{"description":"Point this property to the root of your application. Finsemble uses it to build URLs internally.","type":"string","default":"https://localhost:3375"},"documentRoot":{"type":"string"},"authentication":{"$ref":"#/definitions/authentication"},"moduleRoot":{"description":"The location from which you are serving the Finsemble core library. This is important for resolving URLs internally.","type":"string","default":"https://localhost:3375/finsemble"},"configRoot":{"type":"string"},"fdc3AppDServers":{"$ref":"#/definitions/fdc3AppDServers"},"apps":{"$ref":"#/definitions/apps"},"appd":{"$ref":"#/definitions/appd"},"servicesRoot":{"private":true,"description":"Default location of core services. ","type":"string"},"notificationURL":{"type":"string","deprecated":true,"description":"The notificationURL is no longer used by toasts or UserNotification. It will likely go away in the future."},"availableDashbarItems":{"$ref":"#/definitions/availableDashbarItems"},"bootConfig":{"$ref":"#/definitions/boot_config"},"router":{"$ref":"#/definitions/router"},"logger":{"$ref":"#/definitions/logger"},"bootTasks":{"$ref":"#/definitions/bootTasks"},"system":{"$ref":"#/definitions/system"},"thirdPartyRoot":{"deprecated":true,"private":true,"description":"Required location of third-party services. This property is no longer supported and will likely go away in the future.","type":"string"},"workspaceTemplates":{"$ref":"#/definitions/blankWorkspaceTemplate"},"configVersion":{"description":"Version of this schema. ","type":"string"},"configSchemaURL":{"description":"URL of this schema. Used for run-time verification of configuration. ","type":"string"},"importConfig":{"$ref":"#/definitions/importConfig"},"importThirdPartyConfig":{"$ref":"#/definitions/importThirdPartyConfig"},"securityPolicies":{"$ref":"#/definitions/securityPolicies"},"securityPolicyRules":{"$ref":"#/definitions/securityPolicyRules"},"accessibleLinker":{"deprecated":true,"default":true,"type":"boolean"},"servicesConfig":{"$ref":"#/definitions/servicesConfig"},"preferences":{"$ref":"#/definitions/preferences"},"//systemTrayIcon":{"type":"string"},"systemTrayIcon":{"description":"Sets the location of the system tray icon (lower right corner of the terminal).","type":"string"},"systemTrayClickOption":{"description":"Sets the default click option to toggle the system tray menu. The opposite mouse click will bring Finsemble to the front. Default is right mouse click to toggle the menu and left to bring Finsemble to the front.","type":"string","default":"right","enum":["right","left"]},"systemTrayComponent":{"type":"string"},"waitForUpdate":{"type":"boolean","default":false,"description":"When set to true, Finsemble waits for updates, if available, to download and install before continuing to start up the application."},"Window Manager":{"finsemble:docs":{"halt":true,"type":"object","description":"Global options for the window title bar. <i>See \\"Window Manager\\" under app config hostsManifest.Finsemble for options...</i>"},"$ref":"#/definitions/windowManager"},"betaFeatures":{"private":true,"deprecated":true,"type":"object"},"//appDirectoryEndpoint":{"private":true,"type":"string"},"appDirectoryEndpoint":{"type":"string"},"globalHotkeys":{"type":"object"},"workspaces":{"$ref":"#/definitions/workspacesArray"},"components":{"description":"Used to configure Finsemble\'s \\"UI components\\". Entries are generated when running \\"yarn template\\". Use \\"appd\\" to register any other type of app.","$ref":"#/definitions/components"},"services":{"$ref":"#/definitions/services"},"feaURLWhitelist":{"description":"A regex pattern that represents a URL whitelist. If set, components can navigate **only** to URLs that match the regex pattern.","type":"string"},"cssOverridePath":{"deprecated":true,"private":true,"type":"string"},"debugServiceDelay":{"private":true,"deprecated":true,"type":"number"},"failedComponentCloseNotification":{"description":"If true, throw a notification when a component fails to close within the time limit specified in `finsemble[\\"Window Manager\\"].componentCloseTimeout`","type":"boolean","default":false},"initialWorkspace":{"description":"The workspace name specified by this config will be the first one presented to an end user the very first time they start the smart desktop. This overrides the default behavior set by the config: finsemble.workspaces. After the very first instance of the smart desktop, Finsemble loads the last workspace loaded or any workspace specified by user preferences.","type":["string","null"]},"isAuthEnabled":{"private":true,"deprecated":true,"type":"boolean","default":false},"shutdownTimeout":{"description":"Amount of time (in milliseconds) to give services to shutdown before forcibly quitting the application. Components get 2 seconds less than services.","type":"number","minimum":10000,"default":30000},"scheduledRestart":{"$ref":"#/definitions/scheduledRestart"},"scheduledShutdown":{"$ref":"#/definitions/scheduledShutdown"},"scheduledCloseDiscardUnsavedChanges":{"$ref":"#/definitions/scheduledCloseDiscardUnsavedChanges"},"downloads":{"$ref":"#/definitions/downloads"},"stackedWindow":{"$ref":"#/definitions/stackedWindow"},"menus":{"description":"Legacy config to configure menus. Still used in some configuration examples.","$ref":"#/definitions/menus"},"configSetDone":{"type":"boolean"},"comment":{"private":true,"deprecated":true,"description":"Comment string inserted into config. This property is no longer supported and will likely go away in the future.","type":"string"},"//":{"private":true,"deprecated":true,"description":"Comment string inserted into config. This property is no longer supported and will likely go away in the future.","type":"string"},"deprecatedConfig":{"$ref":"#/definitions/deprecatedConfig"},"toolbarMenus":{"$ref":"#/definitions/toolbarMenus"},"preloads":{"$ref":"#/definitions/preloads"},"trustedPreloads":{"$ref":"#/definitions/trustedPreloads"},"extensions":{"$ref":"#/definitions/extensions"},"windowTitleBarUrl":{"$ref":"#/definitions/windowTitleBarUrl"},"decoratorWindowUrl":{"type":"string"},"custom":{}},"additionalProperties":false},"iocd":{"description":"Properties that control how Finsemble behaves when running on the io.Connect Desktop platform","type":"object","properties":{"enableLegacyLoggerRecipe":{"type":"boolean","description":"Set to true to enable the logger recipe that listens on \'logger.service.logMessages\'"},"iocdDialogs":{"type":"boolean","description":"When true, io.Connect Desktop\'s default dialogs will be used instead of Finsemble\'s"},"getActiveWorkspaceWithoutChanges":{"type":"boolean","description":"When true, calls to getActiveWorkspace() will default to _not_ including unsaved changes in the current layout"},"alphabetizeApps":{"type":"boolean","description":"When true, apps will automatically be alphabetized. This is a temporary config until the re-ordering bug is fixed in @interopio/core"},"persistFDC3Context":{"type":"boolean","description":"If set, will determine whether FDC3 contexts are automatically persisted in layouts. This value can also be set in app config\'s \'customProperties\' field"},"timeout":{"type":"number","description":"Set to the number of milliseconds before the fsbl-service pops up with a timeout error. Default is 40000."},"data":{"type":"object","description":"Determines the iocd migration strategy for various categories of Finsemble end user data","properties":{"advancedAppLauncher":{"description":"The migration strategy for user advanced app launcher","$ref":"#/definitions/iocdDataMigrationSetting"},"preferences":{"description":"The migration strategy for user preferences","$ref":"#/definitions/iocdDataMigrationSetting"},"workspaces":{"description":"The migration strategy for workspaces","$ref":"#/definitions/iocdDataMigrationSetting"}}},"apiToLogFile":{"type":"boolean","description":"Set to true to redirect internal logging from IOCD .net client to Finsemble.dll log file","default":false}}},"iocdDataMigrationSetting":{"type":"object","description":"Migration strategy for a Finsemble end user data category","properties":{"load":{"type":"string","description":"Specifies where to load data at boot. `storageAdapter` loads from the storage adapter. `iocd` loads from the relevant iocd store. `oneTimeConversion` loads from storageAdapter only once, thereafter loads from iocd store.","default":"storageAdapter","enum":["storageAdapter","oneTimeConversion","iocd"]},"saveToStorageAdapter":{"type":"boolean","description":"Specifies whether to save data back to the storageAdapter. (Data is always saved to the relevant iocd store.)","default":false}}},"manifestStartupApp":{"description":"Manifest property for the initial startup app, which reference Finsemble\'s System Manager.","type":"object","properties":{"name":{"type":"string","description":"Defaults to the name of the application as specified in project.json. This is used for certain dialogs and in the Central Logger. The name must consist of alphanumeric characters and spaces only.","pattern":"^[A-Za-z0-9\\\\s]*$"},"url":{"type":"string"},"uuid":{"type":"string","description":"Uniquely differentiates environmental instances of the same application (see project.json) to avoid storage conflicts. The uuid must consist of alphanumeric characters only. Do not use spaces. The uuid is available for use in storage keys, such as those generated by the IndexedDBStorageAdapter.","pattern":"^[A-Za-z0-9\\\\s\\\\-]*$","default":"Finsemble"},"requireHandshake":{"type":"boolean","description":"Value indicating whether a notification should be shown if a handshake from the System Manager is not received within 30 seconds.","default":false},"applicationIcon":{"type":"string","description":"The default taskbar icon.","default":"../../assets/img/Finsemble_Taskbar_Icon.png"},"defaultTop":{"type":"number","deprecated":true},"defaultLeft":{"type":"number","deprecated":true},"defaultHeight":{"type":"number","deprecated":true},"defaultWidth":{"type":"number","deprecated":true},"showTaskbarIcon":{"type":"boolean","deprecated":true},"autoShow":{"type":"boolean","deprecated":true},"frame":{"type":"boolean","deprecated":true},"resizable":{"type":"boolean","deprecated":true},"maximizable":{"type":"boolean","deprecated":true},"delay_connection":{"type":"boolean","deprecated":true},"contextMenu":{"type":"boolean","deprecated":true},"cornerRounding":{"$ref":"#/definitions/cornerRounding","deprecated":true},"alwaysOnTop":{"type":"boolean","deprecated":true}},"required":[],"examples":[{"startup_app":{"name":"My App","uuid":"MyAppAndOrEnvironment","requireHandshake":true,"applicationIcon":"../../assets/img/Finsemble_Taskbar_Icon.png"}}]},"appAssets":{"title":"appAssets","finsemble:docs":{"rightnav":true,"indented":true},"description":"Manifest array of external assets to be automatically downloaded by FEA (as Zip files) and unpacked for use as native applications.","type":"array","items":{"type":"object","properties":{"src":{"description":"URI from which to download a Zip file containing the asset.","type":"string","format":"uri-reference"},"version":{"deprecated":true,"description":"AppAsset versions are deprecated and will likely go away in the future. If supplied, FEA will only download an asset if it has not already downloaded a copy of the asset with the specified version number and `src` properties. If omitted, FEA relies on ETag response headers to determine a caching strategy.","type":"string"},"alias":{"description":"The downloaded asset is referred to in application configurations by alias. Replace the window.path field of a native application with window.alias to use the appAsset","type":"string"},"target":{"description":"The path within the appAsset Zip file that Finsemble uses to launch the application. This is usually a path to a .exe, .jar, or .bat file.","type":"string"}}}},"windowManager":{"title":"Window Manager","description":"Configurations specific to an app\'s window title bar.","type":"object","properties":{"alwaysOnTopIcon":{"description":"When set to `true`, all windows can be pinned so that they are always on top (like a sticky note). You can override this setting for specific components in their configs.","type":"boolean","default":false},"cloneIcon":{"description":"When set to `true`, a clone icon will be added to the window titlebar that can be used to clone the window.","type":"boolean","default":false},"disableBrowserView":{"description":"This property is no longer supported and will likely go away in the future. When set to `true`, the window titlebar is injected directly into the window\'s content pane, rather than separated out into a separate browserview within the window.","replaceWith":"[titlebarType](/docs/reference/ConfigReference#finsemble-components---foreign-components-Window%20Manager-titlebarType)","type":"boolean","default":false,"deprecated":true},"titlebarType":{"type":"string","description":"Determines how the window title bar is added to web windows. The default \'browserview\' separates the title bar and content pane into separate browserviews and can resolve rare display issues with the injected title bar, at the cost of disabling process grouping via affinity for the content pane. Setting \'injected\' causes the title bar and its styles to be inserted directly into your web page\'s DOM and its layout to be lightly adjusted to accommodate.","enum":["browserview","injected"],"default":"browserview"},"title":{"type":"string","description":"Sets the title in the window title bar."},"FSBLHeader":{"description":"This config controls the Finsemble window title bar UI component. FSBLHeader can be true, false or an object. If true then the window title bar will be injected into the component and the maximize, minimize, and close buttons will be displayed. If false, the title bar will not be displayed. If an object, you can tweak several details as to whether buttons are shown or how content is loaded under the title bar.","type":["boolean","object"],"default":true,"properties":{"hideMaximize":{"description":"When set to true, the Maximize icon is hidden from the component\'s title bar.","type":"boolean","default":false},"hideMinimize":{"description":"When set to true, the Minimize icon will be hidden from the component\'s title bar.","type":"boolean","default":false},"hideClose":{"description":"Value indicating whether the Close button is hidden in the component title bar.","type":"boolean","default":false},"title":{"deprecated":true,"description":"Sets the title in the window title bar. This property is no longer supported and will likely go away in the future.","replaceWith":"<a href=\\"/docs/reference/ConfigReference#finsemble-appd---manifest-foreign-components-Window%20Manager-title\\">finsemble.componentName.manifest.foreign.components.WindowManager.title</a> or set the title in your HTML and Finsemble will pick it up.","type":"boolean","default":false},"persistWindowState":{"private":true,"deprecated":true,"description":"If the component is a part of the workspace, this tells Finsemble whether it should persist the position of the window when it moves but windowClient saves and loads window dimensions through updateOptions. For internal use. This property is no longer supported and will likely go away in the future.","type":"boolean","default":false},"zoomDefault":{"description":"Default zoom level to set for the component when using the zoom.js sample preload.","type":"number"},"showLinker":{"private":true,"deprecated":true,"description":"Set this to true only when using [deprecated linkerClient](/docs/deprecated/Linking). The linker will now automatically display when the FDC3 Interop client is activated with an API call. `showLinker: false` will override, preventing the linker from being displayed if you have a use case where you don\'t want to display the linker. This property is no longer supported and will likely go away in the future.","type":"boolean","default":false},"hackScrollbar":{"description":"When set to true, a window\'s vertical scrollbar is positioned underneath the Finsemble window title bar using html{ overflow-y: none} and body{ overflow-y: auto}","type":"boolean","default":false},"adjustContentHeights":{"description":"When set to true, the height of content sized to fit the window is adjusted to fit within the adjusted bounds of the window when the Finsemble window title bar is injected into the DOM.","type":"boolean","default":true},"bumpElements":{"type":"object","$ref":"#/definitions/bumpElements"}},"additionalProperties":false},"floatingTitlebarComponent":{"type":"string","description":"This config sets which component Finsemble will use as a title bar for native application components. By default, the only value is \\"FloatingTitlebar.\\" This config allows you to customize this behavior with a customized title bar component and created a configuration for it in <i>appd.json</i>"},"deliveryMechanism":{"description":"Specify the delivery method to use for scripts (e.g., FSBL, title bar, etc.) - Valid values are:\\r\\n\\"injection\\" - Injects the code into the window.","type":"string","enum":["injection","preload"],"default":"injection"},"zoom":{"description":"Configuration for the zoom.js preload.","type":"object","properties":{"ignoreSelector":{"description":"A css selector instructing the zoom.js preload which elements should not be zoomed","type":"string","examples":["#element-id"],"default":""},"zoomSelector":{"description":"A css selector instructing the zoom.js preload which additional elements should get zoomed. The zoom preload will automatically attempt to detect which elements should get zoom.","type":"string","examples":["#my-element, .my-class"],"default":""},"timeout":{"description":"Time, in milliseconds, to display the zoom pop up before hiding it.","type":"number","default":3000},"step":{"description":"How much the zoom increases or decreases when zooming in or out.","type":"number","default":0.1},"max":{"description":"The maximum allowed zoom level.","type":"number","default":5},"min":{"description":"The minimum allowed zoom level.","type":"number","default":0.2}},"additionalProperties":false},"componentCloseTimeout":{"type":"number","default":5000,"description":"Time, in milliseconds, to wait for the component to close. If the component hasn\'t closed within this limit, it will be force closed."}}},"bumpElements":{"description":"Optional settings that adjust the height and position of absolute/fixed positioned elements when the window title bar is injected. Use it to mitigate rare display issues that can occur due to the injected title bar. Set this field to `false` to bypass all bumping logic.","type":"object","properties":{"absolute":{"description":"Either none, \\"all\\" or \\"0Positioned\\". If all, all fixed elements are moved. 0Positioned only moves elements that have top 0. Only applies to children of the document.body.","enum":["none","all","0Positioned"]},"bumpBy":{"description":"Sets the amount to bump elements by (e.g. \\"25px\\").","type":"string","pattern":"[0-9]+px"},"fixed":{"description":"Either none, \\"all\\" or \\"0Positioned\\". If all, all fixed elements are moved. 0Positioned only moves elements that have top 0.","enum":["none","all","0Positioned"]},"monitorFixedAdditions":{"description":"When set to true, mutations to the DOM are observed and fixed positioned elements with a top style of \'0px\' are bumped by the title bar height. Setting this to false disables the MutationObserver that is otherwise turned on for pages with injected title bars.","type":"boolean"}}},"authentication":{"title":"authentication config","description":"Contains authentication profiles. Finsemble runs the special \\"startup\\" profile when your smart desktop launches.","type":"object","properties":{"startup":{"description":"If set, the \\"startup\\" profile runs during the \\"authentication\\" boot phase, pausing Finsemble until authentication has been completed.","$ref":"#/definitions/authenticationProfile"}},"additionalProperties":{"$ref":"#/definitions/authenticationProfile"}},"authenticationProfile":{"title":"authentication profile name","description":"Declare an authentication profile that uses simple password collection or any other type of custom authentication process.","finsemble:docs":{"rightnav":true},"type":"object","properties":{"adapter":{"type":"string","description":"The authentication \\"adapter\\" (module) for this authentication profile. See <a href=\\"/docs/add-apps/freestanding/StaticAuthentication/\\">Authenticating apps</a>.","enum":["PASSWORD","OAUTH2"]},"scope":{"type":["string","null"],"description":"When used with OAUTH2 adapter, the \\"scope\\" as specified by your Identity Provider (IP)."},"client_id":{"type":"string","description":"When used with OAUTH2 adapter, the \\"client ID\\" provided by your Identity Provider (IP)."},"authorization_endpoint":{"type":"string","description":"When used with OAUTH2 adapter, the authorization endpoint for your Identity Provider (IP)."},"backchannel_endpoint":{"type":"string","description":"When used with OAUTH2 adapter, your backchannel endpoint URL."},"redirect_url":{"type":"string","description":"The component to handle the response from your Identity Provider. If you don\'t provide this, Finsemble uses <i>$moduleRoot/ui-components/oauthResponse/index.html</i>."},"component":{"type":"string","description":"The UI component to use for this authentication profile. Typically this is \\"authentication.html\\" used by the \\"PASSWORD\\" adapter to display a user/login form."}},"required":["adapter"]},"blankWorkspaceTemplate":{"description":"Workspace templates are no longer a supported feature. They will likely go away in the future.","title":"workspaceTemplates","private":true,"deprecated":true,"type":"object","additionalProperties":true},"preferences":{"title":"preferences","deprecated":true,"description":"Configurations used as user preferences can be found in the finsemble.servicesConfig section. This property is no longer supported and will likely go away in the future.","replaceWith":"[finsemble.servicesConfig](/docs/reference/ConfigReference#finsemble-servicesConfi)","type":"object","default":{},"properties":{"workspaceService":{"type":"object","properties":{"promptUserOnDirtyWorkspace":{"deprecated":true,"replaceWith":"[finsemble.servicesConfig.workspace](/docs/reference/ConfigReference#finsemble-servicesConfig-workspace-promptUserOnDirtyWorkspace)","type":"boolean"}}}}},"servicesConfig":{"title":"servicesConfig","finsemble:docs":{"rightnav":true},"description":"Configurations that override the defaults for Finsemble\'s built-in services. (Defaults are stored in \\"finsemble.services\\" and you cannot directly override them.","type":"object","properties":{"distributedStore":{"title":"distributedStore","type":"object","description":"Distributed Store configuration","properties":{"affinity":{"description":"Only applicable for `spawnAs: \\"window\\"`. When set, the service window gets process affinity based on the string passed in. This allows aggregation of services to a specific browser process. Set to false to disable render process grouping via affinity.","type":["string","boolean"]},"visible":{"description":"Set this to `true` in order to reveal the hidden service window. Useful for debugging services.","type":"boolean","default":false},"initialStores":{"title":"initialStores","description":"Foundations for any stores that should be seeded on startup.","type":"array","items":{"type":"object","description":"Config for each individual store.","properties":{"name":{"type":"string","description":"The name of the store to seed."},"foundation":{"title":"foundation","description":"The data to seed into the store.","type":"object","properties":{"appFolders":{"title":"appFolders","description":"Individual folders that appear in the Advanced app launcher.","type":"object","properties":{"list":{"type":"array","items":{"type":"string"}},"folders":{"title":"folders","type":"object","properties":{"Advanced App Launcher":{"$ref":"#/definitions/foldersAppDefinition"},"Favorites":{"$ref":"#/definitions/foldersAppDefinition"}}}}},"appDefinitions":{"type":"object"}}},"default":{"title":"default","type":"object","properties":{"activeLauncherTags":{"type":"array"},"filterText":{"type":"string"},"filterTags":{"type":"array"},"activeTags":{"type":"array"},"filteredApps":{"type":"array"},"activeFolder":{"type":"string"},"sortBy":{"type":"string"}}}}}}},"required":["initialStores"],"additionalProperties":false},"docking":{"title":"docking","description":"Configs specific to the docking service","type":"object","properties":{"alwaysOnTopLevel":{"type":"string","description":"The always on top level when setting components `alwaysOnTop` to true. See the <a href=\\"https://www.electronjs.org/docs/api/browser-window#winsetalwaysontopflag-level-relativelevel\\">Electron alwaysOnTop documentation</a> for valid values."},"visible":{"description":"Set this to `true` to reveal the hidden service window. Useful for debugging services.","type":"boolean","default":false},"enabled":{"type":"boolean"},"headerHeight":{"description":"The height of the window title bar.","type":"number","default":32},"headerWidth":{"description":"The width of the window title bar.","type":"number","default":32},"MINIMUM_HEIGHT":{"description":"The smallest height a window can shrink to on resize.","type":"number","default":28},"MINIMUM_WIDTH":{"description":"The smallest width a window can shrink to on resize.","type":"number","default":98},"requireRectangularityForGroupResize":{"description":" If a group of windows forms a rectangle, it can be resized. By turning this to `false`, the user can resize any shaped group by grabbing a corner that is not on another window\'s edge.","type":"boolean","default":true},"undockDisbandsEntireGroup":{"description":"By default, when a user clicks the \\"Undock\\" button in the title bar, the window leaves the group without destroying that group. Set this value to `true` if you want to dismantle the group when the user clicks the \\"Undock\\" button.","type":"boolean","default":false},"fillHolesOnUndock":{"description":"If set to `true`, a rectangular group maintains its shape when windows leave the group.","type":"boolean","default":true},"tabbing":{"description":"Properties relating to window tabbing (combining multiple windows into a tabbed group).","type":"object","properties":{"enabled":{"description":"Allows windows to tab onto each other.","type":"boolean","default":false},"allowEditing":{"deprecated":true,"replaceWith":"[servicesConfig.window.allowWindowTitleRenaming](/docs/reference/ConfigReference#finsemble-servicesConfig-window-allowWindowTitleRenaming)","type":"boolean","default":true},"tabMinWidth":{"description":"Sets the min width of the individual tabs. (Default 72px)","type":"number","default":72}},"additionalProperties":false},"tiling":{"description":"Properties relating to window tiling (combining windows into group of tiles attached to each other that behave as a single window)","type":"object","properties":{"enabled":{"description":"Allows windows to tile onto each other.","type":"boolean","default":false}},"additionalProperties":false},"ALLOW_GROUPS_TO_SNAP":{"description":"Allows groups to snap to one another.","type":"boolean","default":true},"BUFFER_SIZE":{"description":"The size of the zone, in pixels, around a window that causes it to snap to other windows.","type":"number","default":20},"enableWindowsAeroSnap":{"description":"If `true`, windows Aero Snap keyboard shortcuts (WINDOWS KEY + UP, RIGHT, DOWN, or LEFT arrow key) move the current window when pressed. Windows move the window and Finsemble respond by updating bounds within the Window Service. If `false` (default), Finsemble cancels these actions.","type":"boolean","default":false},"fillHolesOnUndock ":{"description":"If set to `true`, a rectangular group maintains its shape when windows leave the group.","default":true},"GROUP_MODE":{"type":"object","properties":{"enabled":{"description":"Specifies whether to allow windows to group to one another.","type":"boolean","default":true},"behavior ":{"type":"string","enum":["explicit","implicit"],"default":"explicit"}},"additionalProperties":false},"groupTileBuffer":{"type":"number","default":30,"description":"The size of the buffer, in pixels, wherein a dragged window will trigger a tile operation."},"RESIZE_EVENT_THROTTLE_PERIOD":{"description":"Time, in milliseconds, to throttle resize events. If there are too many resize events and they collectively cause poor performance, tweak this value until you are happy with the performance.","type":"number","default":0},"SNAPPING_OPACITY":{"description":"The opacity windows change to when other windows encroach on their buffer zone.","type":"number","default":0.8},"claimSpace":{"description":"Settings for claiming space on desktop at the operating system level. Windows only.","type":"object","properties":{"enabled":{"description":"If true, docked windows behave like the Windows Taskbar and claim space on the screen.","type":"boolean","default":true},"alwaysOnTop":{"description":"If true, docked windows that claim space are always on top when docked.","type":"boolean","default":false}}},"preventOverlapClaimSpace":{"description":"If a user moves a window so that its top edge overlaps the space claimed by the operating system (e.g. the toolbar area on MS Windows), the window is automatically repositioned below or above the claimed space unless this value is set to `false`.","type":"boolean","default":true},"allowAppropriatedWindowsToGroup":{"description":"Allow Appropriated Windows (freestanding applications and windows opened with window.open) to group.","type":"boolean","default":false}},"required":["enabled","groupTileBuffer","headerHeight","MINIMUM_WIDTH","requireRectangularityForGroupResize","undockDisbandsEntireGroup","fillHolesOnUndock","tiling"],"additionalProperties":false},"interop":{"title":"interop","type":"object","description":"Interop Service config options","properties":{"affinity":{"description":"Only applicable for `spawnAs: \\"window\\"`. When set, the service window is given process affinity based on the string passed in. This allows aggregation of services to a specific browser process. Set to false to disable render process grouping via affinity.","type":["string","boolean"]},"allowResolverToRemember":{"type":"boolean","default":true,"description":"Set to false to disable the \'remember your choice\' check box on the FDC3 resolver UI. When true, the resolver remembers the particular intent resolutions that the user specified."},"spawnAs":{"$ref":"#/definitions/spawnAs"},"visible":{"description":"Set to `true` to display the Interop Service\'s window, which provides a set of Redux devtools that you can use to debug problems with FDC3 interactions.","type":"boolean","default":false},"showDevConsoleOnVisible":{"type":"boolean","default":true,"description":"Automatically spawns a dev console when visible is true. Note that if a service is set to type \\"script\\", you shouldn\'t use this but instead debug serviceManager.html."},"bootParams":{"$ref":"#/definitions/bootParamsProperties"},"addIntentListenerMaxInitializationTimeout":{"description":"Sets the maximum time that the interop service waits for an application that was started to resolve an intent to invoke `fdc3.addIntentListener()`.","type":"number","default":15000},"joinMultipleChannels":{"type":"boolean","description":"If explicitly set to false, no FDC3 apps can join multiple user channels. So when an app that is already on a channel joins another channel, it automatically leaves the channel it was on."},"fdc3_1_2_compatibility":{"type":"boolean","description":"If true then Finsemble desktop agent conforms to FDC3 1.2 (as opposed to 2.0)."},"fdc3BridgingEnabled":{"type":"boolean","default":false,"description":"(Experimental) if true then the Finsemble FDC3 desktop agent will enable bridging and attempt to connect the bridging server specified at `fdc3BridgingServerAddress`."},"fdc3BridgingServerAddress":{"type":"string","default":"ws://127.0.0.1:3333","description":"(Experimental) The socket address of the FDC3 bridging server. Only used when `fdc3BridgingEnabled` is true."}},"additionalProperties":false},"launcher":{"title":"launcher","type":"object","description":"Launcher Service config options.","properties":{"spawnAs":{"$ref":"#/definitions/spawnAs"},"defaultComponentAffinity":{"description":"Global default render process affinity for all non-service components and applications. Set it to false to disable grouping of render processes via affinity. This setting can be overridden by component level config.","type":["string","boolean"],"default":"WorkspaceComponents"},"defaultServiceAffinity":{"description":"Global default render process affinity for all services excluding the four micro-kernel services (System Manager, Router, Logger and Config) which cannot access the config. Set it to false to disable grouping of render processes for services via affinity. This setting can be overridden by service level config.","type":["string","boolean"],"default":"Finsemble"},"affinity":{"description":"Only applicable for `spawnAs: \\"window\\"`. When set, the service window is given process affinity based on the string passed in. This allows aggregation of services to a specific browser process. Set it to false to disable render process grouping via affinity.","type":["string","boolean"]},"visible":{"description":"Set this to `true` to reveal the hidden service window. Useful for debugging services.","type":"boolean","default":false},"concurrentSpawnLimit":{"description":"Specifies the number of components that can be spawned concurrently during Workspace load. The default is machine\'s number of logical processor cores divided minus 1 or a minimum of 4.","type":"number","minimum":1},"staggerPixels":{"type":"number","default":40,"description":"Set the amount of \\"stagger\\" pixels when components are launched on top of another. Staggering is like laying out cards on a table."},"unknownComponent":{"type":"string","default":"nonConfiguredComponent","description":"This corresponds to a component\'s key in one of your component JSON files. Our default is the \\"nonConfiguredComponent\\". The unknown component serves as a placeholder for a component that a user loses permissions to. The unknown component shows up as a substitute to an existing component when Finsemble cannot find this component\'s configuration (e.g., the user no longer has access to this component). This unknown component is saved to the workspace so that the original component returns in the future if Finsemble can find it."},"search":{"description":"Allows you to control the component search built into finsemble.","type":"object","properties":{"enabled":{"description":"Set to false to disable component search.","type":"boolean","default":true},"options":{"type":"object","description":"An object containing fuse.js configuration options.","properties":{}}},"additionalProperties":false},"defaultPreloads":{"type":"object","deprecated":true,"replaceWith":"[finsemble.extensions.preloads](/docs/reference/ConfigReference#finsemble-extensions-preloads)","properties":{"allComponents":{"type":"array","default":[],"description":"An array of URLs to preload into all components.","items":{"type":"string","description":"The URL of a preload."}},"launchableComponents":{"type":"array","default":[],"description":"An array of URLs to preload into components that are launchable by the user.","items":{"type":"string","description":"The URL of a preload."}}}}},"required":["staggerPixels","unknownComponent"]},"linker":{"title":"linker","type":"object","description":"Linker config options","properties":{"spawnAs":{"$ref":"#/definitions/spawnAs"},"enabled":{"description":"Set this to `true` to use Linker Client on client side. Otherwise Finsemble uses the FDC3 client.","type":"boolean","default":false}}},"logger":{"title":"logger","type":"object","description":"Central Logger config options","properties":{"spawnAs":{"$ref":"#/definitions/spawnAs"},"affinity":{"description":"Only applicable for `spawnAs: \\"window\\"`. When set, the service window is given process affinity based on the string passed in. This allows aggregation of services to a specific browser process. Set to false to disable render process grouping via affinity.","type":["string","boolean"]},"visible":{"description":"Set this to `true` to reveal the hidden service window. Useful for debugging services.","type":"boolean","default":false},"hotkeyShowCentralLogger":{"description":"Sets the hotkey for showing the Central Logger. Leave this config as an empty array in order to disable the hotkey.","type":"array","items":{"type":"string"},"default":["ctrl","shift","L"]},"defaultClientLogLevels":{"$ref":"#/definitions/loggerClientLogLevels"},"skipLargeObjects":{"$comment":"Not documented to allow for changing the default behavior at a later date (discoverable via IntelliSense)","type":"boolean","default":true,"private":true},"maxLogMessageSize":{"type":"integer","default":5000,"description":"The maximum allowable size for a log message in bytes","private":true}},"additionalProperties":false},"storage":{"title":"storage","type":"object","description":"Storage Service config options.","properties":{"spawnAs":{"$ref":"#/definitions/spawnAs"},"adapterOperationTimeout":{"description":"The timeout, in milliseconds, of each storageAdapter operation.","default":10000,"type":"number"},"affinity":{"description":"Only applicable for `spawnAs: \\"window\\"`. When set, the service window is given process affinity based on the string passed in. This allows aggregation of services to a specific browser process. Set to false to disable render process grouping via affinity","type":["string","boolean"]},"visible":{"description":"Set this to `true` to reveal the hidden service window. This can be useful for debugging services.","type":"boolean","default":false},"defaultStorage":{"description":"The default storage model to use when saving and loading data.","type":"string","default":"IndexedDBAdapter"},"dataStoreAdapters":{"title":"dataStoreAdapters","description":"Storage adapters that the storage service loads and that can be mapped to storage topics. Each entry specifies the path (which can contain manifest macros) to built a storage adapter javascript file. See <a href=\\"/docs/productivity/API-tutorials-and-refs/storage/storingData/\\">Storing data</a> for details on how to build a custom adapter.","type":"object","properties":{},"additionalProperties":{"$ref":"#/definitions/dataStoreAdaptersEntry"},"examples":[{"LocalStorageAdapter":"$applicationRoot/adapters/localStorageAdapter.js","IndexedDBAdapter":"$applicationRoot/adapters/indexedDBAdapter.js"}]},"topicToDataStoreAdapters":{"title":"topicToDataStoreAdapters","type":"object","description":"Mapping of storage topic to the name of storage adapter.","properties":{"finsemble":{"description":"Specifies the storage adapter to use when persisting non-workspace-related information.","type":"string","default":"IndexedDBAdapter"},"finsemble.workspace":{"description":"Specifies the storage adapter to use when persisting workspace-related information.","type":"string","default":"IndexedDBAdapter"},"finsemble.workspace.cache":{"description":"Specifies the storage adapter to use when caching workspace-related information.","type":"string","default":"IndexedDBAdapter"},"finsemble.notifications":{"description":"Sets the storage adapter for notification persistence.","type":"string","default":"IndexedDBAdapter"}},"required":["finsemble","finsemble.workspace","finsemble.workspace.cache"]}},"required":["defaultStorage","dataStoreAdapters","topicToDataStoreAdapters"]},"workspace":{"type":"object","description":"Configurations related to the workspace service.","properties":{"spawnAs":{"$ref":"#/definitions/spawnAs"},"affinity":{"description":"Only applicable for `spawnAs: \\"window\\"`. When set, the service window is given process affinity based on the string passed in. This allows aggregation of services to a specific browser process. Set to false to disable render process grouping via affinity.","type":["string","boolean"]},"visible":{"description":"Set this to `true` to reveal the hidden service window. Useful for debugging services.","type":"boolean","default":false},"persistURL":{"description":"A global config for component URL persistence. When true, components automatically save their last URL instead of using the one in the config. The component config will overwrite the global config.","default":false},"persistPath":{"type":"boolean","default":false,"description":"A global config for component URL persistence. When true, the application automatically persists its path through restarts and workspace reloads, even when the path changes in the config. Path is used for \\"native\\" (aka \\"assimilation\\") windows. The component config overwrites the global config."},"closeWorkspaceTimeout":{"description":"Number of milliseconds the workspace service should wait for all of the windows to close when switching to another workspace. Workspaces are locked until a close action completes or times out. If this timeout value is exceeded, Finsemble notifies the user and loads an empty workspace. Set to null for no timeout.","type":"number","default":30000},"closeFailureNotificationMessage":{"description":"Override the default notification message that appears to the end user when closeWorkspaceTimeout is triggered. Set to \\"\\" to stop a message from being sent.","type":"string"},"disableDirtyShutdownCheck":{"description":"Disable the check for dirty shutdown when Workspace Service starts that causes the last active workspace to be used.","type":"boolean"},"emptyWorkspaceName":{"type":"string","default":"Empty Workspace","description":"Allows you to set the name of the empty workspace created when the user has no workspaces and no default workspace is configured, or when a workspace switch fails."},"loadFailureNotificationMessage":{"type":"string","description":"Override the default message that appears to users in a pop-up notification when a workspace fails to load."},"search":{"description":"Allows you to control the workspace search built into Finsemble.","type":"object","properties":{"enabled":{"description":"Set to false to disable workspace search.","type":"boolean","default":true},"options":{"type":"object","description":"An object containing fuse.js configuration options.","properties":{}}},"additionalProperties":false},"promptUserOnDirtyWorkspace":{"description":"When set to `false`, the user\'s workspace automatically saves to the last configuration when switching workspaces or closing Finsemble. When set to `true`, the user is prompted to save the current workspace configuration if there are unsaved changes.","type":"boolean","default":true},"workspaceAsPercent":{"description":"(experimental) When set to `true`, window position will be converted to percent when a workspace is saved and used to restore workspaces, allowing them to adapt to different sized monitors.","type":"boolean","default":false},"permanentWorkspaces":{"description":"Allows you to declare what workspaces a user can\'t rename or delete.","type":"array","items":{"type":"string"}},"discardUnsavedChanges":{"description":"When set to `true`, unsaved workspace changes are discarded automatically. This setting is ignored if you set promptUserOnDirtyWorkspace to true.","type":"boolean","default":false}},"additionalProperties":false},"assimilation":{"$ref":"#/definitions/serviceAssimilationConfig"},"notifications":{"description":"Configs specific to the notifications service.","type":"object","properties":{"spawnAs":{"$ref":"#/definitions/spawnAs"},"notificationsCenterComponentType":{"description":"(Experimental) This value tells the notification service which component to use as the Notification Center. This component should spawn, hide and show when a user clicks the notification bell.","type":"string","default":"NotificationsCenter"},"defaultSnoozePeriodSeconds":{"description":"The default snooze period for notifications.","type":"number","default":300},"newNotificationHaloPeriodSeconds":{"description":"The default period for new notifications halo.","type":"number","default":180},"maxNotificationsToRetain":{"description":"The maximum number of notifications the service stores in memory.","type":"number","default":250},"disableDotOnToolbarIcon":{"type":"boolean","default":false,"description":"Disables the dot on the toolbar notifications icon when there are unread notifications."},"showDotOnToolbarIconForMutedNotifications":{"type":"boolean","default":false,"description":"Shows the new notification dot on the toolbar for muted notifications (if disableDotOnToolbarIcon is false)."},"toastTimeoutOnActionableNotifications":{"type":"boolean","default":true,"description":"If set to false, Actionable Notification Toasts stay on screen until a user manually removes them."},"maxNotificationRetentionPeriodSeconds":{"description":"The maximum amount of time, in seconds, to retain notifications.","type":"number","default":604800},"informationalNotificationToastPeriodSeconds":{"description":"The number of seconds a toast appears for informational notifications (that is, any notifications without actions).","type":"number","default":45},"proxyToWebApiFilter":{"description":"Broadcast any notifications that match this filter to the Notification Web API to appear in the OS.","type":["object","boolean"],"properties":{"include":{"type":["array","boolean"],"items":{"$ref":"#/definitions/notification"}},"exclude":{"type":["array","boolean"],"items":{"$ref":"#/definitions/notification"}}}},"defaultDismissButtonText":{"description":"If the service needs to add the dismiss actions to the button, the text defaults to the value set here as a last resort. There is a hardcoded value if this not set.","type":"string","default":"Dismiss"},"types":{"description":"\'types\' provide a way of setting default values on notifications based on the INotification.type","type":"object","properties":{"default":{"description":"\'default\' is a reserved name. If there any notifications with notification.type that don\'t match any of the keys in the config, the values in default is applied.","$ref":"#/definitions/notificationType"}},"additionalProperties":{"$ref":"#/definitions/notificationType"}},"applyNotificationOverrides":{"description":"The applyNotificationOverrides enables Finsemble to display notifications triggered by a browser view.","type":"boolean","default":false},"demoMode":{"type":"boolean","$comment":"When true, it disables devOnly notifications, even in dev mode. This enables demoing dev mode without getting distracted with overly technical notifications.","default":false},"userPreferences":{"deprecated":true,"type":"object"},"mute":{"description":"List of mute filters. All notifications that match the filter will have the mute flag set to true.","type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"source":{"type":"string"}}}}},"additionalProperties":false},"window":{"title":"window","type":"object","description":"Window Service config options.","properties":{"spawnAs":{"$ref":"#/definitions/spawnAs"},"additionalWorkspaceFields":{"description":"Additional fields for window data that you can store in the Workspace","type":"array","items":{"type":"string"}},"heartbeatResponseTimeout":{"description":"Sets the heartbeat timeouts for crash detection","type":"object","private":true,"properties":{"min":{"type":"number"},"max":{"type":"number"},"crashed":{"type":"number"},"possiblyCrashed":{"type":"number"},"notResponding":{"type":"number"}}},"ignoreFieldsForDirtyingWorkspace":{"description":"Changes in these fields do not cause workspaces to be dirty.","type":"array","items":{"type":"string"}},"allowWindowTitleRenaming ":{"description":"Set to false to disable user editable tabs (rename by double-clicking on a window title or tab).","type":"boolean","default":true}}},"search":{"type":"object","description":"Search service config options.","properties":{"spawnAs":{"$ref":"#/definitions/spawnAs"}}},"hotkeys":{"type":"object","description":"Hotkeys service config options.","properties":{"spawnAs":{"$ref":"#/definitions/spawnAs"}}},"authentication":{"type":"object","description":"Authentication service config options.","properties":{"spawnAs":{"$ref":"#/definitions/spawnAs"}}}},"additionalProperties":false},"importConfig":{"finsemble:docs":{"rightnav":true},"description":"Defines an array of JSON URLs to be imported into the top-level finsemble object. This overwrites any existing config settings, with two exceptions: New services defined under finsemble.services is added to the list of existing services (as opposed to replacing the existing list of services). New components defined under finsemble.components are added to the list of existing components (as opposed to replacing the list of existing components).","type":"array","items":{"type":"string"},"examples":[["$applicationRoot/configs/application/config.json","$applicationRoot/configs/application/appd.json"]]},"importThirdPartyConfig":{"description":"This import is essentially the same as importConfig with one notable difference: the imported configuration settings cannot overwrite any existing settings. In this case, the settings for any potential overwrite are discarded with a warning message written to the Config Service\'s log.","type":"array","items":[{"type":"string"}],"additionalItems":false},"router":{"title":"router","description":"Configurations for Router\'s communication mechanism.","type":"object","properties":{"crossDomainTransport":{"description":"The interface for communicating between cross-domain components - When set to `IPCBus`, the default, all cross-domain components use IPC to communicate. When set to `FinsembleTransport`, cross-domain components use IAC. You might switch the `crossDomainTransport` if you are having connection issues involving firewalls, your CSP, etc. Available values are \'IPCBus\' and \'FinsembleTransport\'.","type":"string","enum":["IPCBus","SharedWorker","FinsembleTransport"],"default":"IPCBus"},"sameDomainTransport":{"description":"The transport for components and services with Finsemble\'s domain. ","type":"string","enum":["IPCBus","SharedWorker","FinsembleTransport"],"default":"SharedWorker"},"transportSettings":{"title":"transportSettings","description":"The specific setting for certain transports.","type":"object","properties":{"FinsembleTransport":{"title":"FinsembleTransport","description":" Configuration for the FinsembleTransport (IAC) if chosen as the communication mechanism for cross-domain components. IAC uses WebSocket as its communication protocol.","type":"object","properties":{"serverAddress":{"description":"URI for the WebSocket server. To use a secure connection, use \'wss://localhost.chartiq.com:3376\'.","type":"string","default":"ws://127.0.0.1:3376"}},"required":["serverAddress"]}},"required":["FinsembleTransport"],"default":{}},"promptBeforeAllowingExternalApps":{"title":"promptBeforeAllowingExternalApps","deprecated":true,"description":"We deprecated this capability to support freestanding apps.","type":"boolean","default":false},"trafficSnapshotMilliseconds":{"description":"Defines how often to take the traffic snapshot for diagnostics.","type":"number"},"trafficSnapMinCountSize":{"description":"If you enable the traffic snapshot, Finsemble waits until the message count reaches this minimum before outputting these messages.","type":"number"}},"additionalProperties":false,"examples":[{"router":{"crossDomainTransport":"IPCBus","sameDomainTransport":"SharedWorker","transportSettings":{"FinsembleTransport":{"serverAddress":"ws://127.0.0.1:3376"}}}}]},"system":{"title":"system","private":true,"description":"Core configuration for system. Much of this is boot config.","type":"object","properties":{"FSBLVersion":{"type":"string"},"gitHash":{"type":"string"},"finsembleLibraryPath":{"type":"string"},"premiumRoot":{"type":"string"},"addFSBLWrappers":{"type":"boolean"},"saveLogToFileOnShutDown":{"type":"boolean"},"scheduledRestart":{"$ref":"#/definitions/scheduledRestart"},"scheduledShutdown":{"$ref":"#/definitions/scheduledShutdown"},"isolateCrossDomainComponents":{"type":"boolean"},"requiredServicesConfig":{"title":"requiredServicesConfig","description":"Core System Configuration that is users typically never modify. ","type":"object","properties":{"routerService":{"type":"object","properties":{"bootParams":{"$ref":"#/definitions/bootParamsProperties"},"spawnAs":{"type":"string"},"name":{"type":"string"},"visible":{"type":"boolean"},"html":{"type":"string"},"file":{"type":"string"}}},"loggerService":{"type":"object","properties":{"bootParams":{"$ref":"#/definitions/bootParamsProperties"},"spawnAs":{"type":"string"},"name":{"type":"string"},"visible":{"type":"boolean"},"html":{"type":"string"},"file":{"type":"string"}}},"dataStoreService":{"type":"object","properties":{"bootParams":{"$ref":"#/definitions/bootParamsProperties"},"spawnAs":{"type":"string"},"name":{"type":"string"},"visible":{"type":"boolean"},"html":{"type":"string"},"file":{"type":"string"},"frame":{"type":"boolean"}},"additionalProperties":false},"configService":{"type":"object","properties":{"bootParams":{"$ref":"#/definitions/bootParamsProperties"},"spawnAs":{"type":"string"},"name":{"type":"string"},"visible":{"type":"boolean"},"html":{"type":"string"},"file":{"type":"string"},"changeApplicationStateBeforeLoad":{"type":"string"},"changeApplicationStateAfterLoad":{"type":"string"},"frame":{"type":"boolean"}},"additionalProperties":false}},"required":["routerService","loggerService","dataStoreService","configService"],"additionalProperties":false}},"required":["FSBLVersion","gitHash","finsembleLibraryPath","premiumRoot","addFSBLWrappers","saveLogToFileOnShutDown","scheduledRestart","scheduledShutdown","isolateCrossDomainComponents","requiredServicesConfig"],"additionalProperties":false},"bootTasks":{"title":"bootTasks","private":true,"description":"Startup configuration of internal boot tasks. ","type":"object","properties":{"initializeDeepLinkingTask":{"$ref":"#/definitions/bootParams"},"initializeRouterTask":{"$ref":"#/definitions/bootParams"},"initializeFinsemblePubsubTask":{"$ref":"#/definitions/bootParams"},"initializeSystemStateHandersTask":{"$ref":"#/definitions/bootParams"},"updateServiceLauncherConfigTask":{"$ref":"#/definitions/bootParams"},"waitForAuthenticatedTask":{"$ref":"#/definitions/bootParams"},"initializeSystemManagerAPITask":{"$ref":"#/definitions/bootParams"},"startLoggerTask":{"$ref":"#/definitions/bootParams"},"loadUserDefinedComponentsTask":{"$ref":"#/definitions/bootParams"},"loadAppDInstalledComponentsTask":{"$ref":"#/definitions/bootParams"},"loadSystemTrayIconTask":{"$ref":"#/definitions/bootParams"},"registerHotkeysTask":{"$ref":"#/definitions/bootParams"},"setupSearchLauncherTask":{"$ref":"#/definitions/bootParams"},"checkForScheduledRestartTask":{"$ref":"#/definitions/bootParams"},"checkForScheduledShutdownTask":{"$ref":"#/definitions/bootParams"}},"additionalProperties":{"$ref":"#/definitions/bootParams"}},"boot_config":{"title":"bootConfig","finsemble:docs":{"rightnav":true},"description":"Boot/startup configuration parameters for the System Manager.","type":"object","properties":{"onErrorMakeSystemManagerVisible":{"type":"boolean","default":true},"defaults":{"title":"defaults","type":"object","description":"Default startup-up properties for System Manager","properties":{"startServiceTimeout":{"description":"Default timeout value, in milliseconds, for services.","type":"number","minimum":0,"maximum":999999,"default":30000},"startComponentTimeout":{"description":"Default timeout value, in milliseconds, for components.","type":"number","minimum":0,"default":15000},"startTaskTimeout":{"type":"number","minimum":0,"maximum":999999,"default":15000}},"additionalProperties":false}},"additionalProperties":false,"examples":[{"bootConfig":{"defaults":{"startServiceTimeout":10000,"startComponentTimeout":15000}}}]},"bootParams":{"description":"Startup boot parameters for services, components, and boot tasks.","type":"object","properties":{"bootParams":{"$ref":"#/definitions/bootParamsProperties"}},"additionalProperties":false},"bootParamsProperties":{"title":"bootParams","description":"Boot parameter properties","type":"object","properties":{"stage":{"description":"Specifies at which stage the app is launched.","type":"string","enum":["microkernel","kernel","pre-authentication","authentication","appd-retrieval","system-preuser","preuser","preuser2","preuser3","preuser4","system-earlyuser","earlyuser","user"]},"stopOnFailure":{"description":"Specifies whether the app should stop if one or more of its dependencies fail to start. Only relevant to apps with dependencies. Set to false if you want the app to continue startup even if its dependencies fail.","default":true,"type":"boolean"},"autoStart":{"description":"Specifies whether to automatically start during the system manager\'s startup phase.","default":true,"type":"boolean"},"customFailureMessage":{"description":"The custom message to output to the system log if the app fails to start.","type":"string"},"timeout":{"description":"The maximum time, in milliseconds, that the app can take to start up. If the startup doesn\'t complete in this time, it\'s marked as a failure. If you don\'t specify this property, Finsemble uses the default timeout value under the manifest\'s \'bootConfig.startComponentTimeout\' property.","type":"number"},"dependencies":{"description":"Specifies other services this service relies on.","type":"array","items":{"type":"string"}},"checkpoints":{"title":"checkpoints","type":"object"}},"additionalProperties":false},"availableDashbarItems":{"type":"object","description":"Available dashbar items to list in dashbar user preferences.","additionalProperties":{"$ref":"#/definitions/dashbarItem"}},"dashbarItem":{"title":"dashbarItem","description":"Dashbar item properties","type":"object","properties":{"title":{"description":"The text to display in the title bar of the dashbar item.","type":"string"},"url":{"description":"The URL path of the content of the dashbar item.","type":"string"},"width":{"description":"(optional) width of the dashbar item","type":"integer"},"disablePointerEvents":{"description":"Set to true to disable the user\'s ability to interact with the dashbar item.","type":"boolean"}},"required":["title","url"]},"dataStoreAdaptersEntry":{"title":"dataStoreAdaptersEntry","type":"string"},"apps":{"title":"apps","finsemble:docs":{"rightnav":true},"description":"Contains Finsemble\'s app configurations that are derived from the <a href=\\"https://fdc3.finos.org/docs/app-directory/spec\\">FDC3 2.0 App Directory Standard</a>. App config is the primary way that Finsemble learns about apps. Finsemble uses this to create its launcher menus and for driving data integration (interop).","type":"array","items":{"$ref":"#/definitions/AppEntry2.0"}},"AppEntry2.0":{"description":"An array of AppD entries where each describes an app or app service, using the <a href=\\"https://fdc3.finos.org/schemas/2.0/app-directory#tag/Application/paths/~1v2~1apps~1%7BappId%7D/get\\">FDC3 2.0 AppD record format</a>).","type":"object","properties":{"appId":{"type":"string","description":"A unique identifier for the app that is used programmatically. It must follow <a href=\\"https://fdc3.finos.org/docs/1.0/appd-discovery#application-id-namespace-syntax-host-resolution\\">the AppD specification for fully qualified naming</a>."},"contactEmail":{"type":"string","description":"Email address to contact for information about the app. (Used when apps are picked out of a third party app catalog.)"},"description":{"type":"string","description":"Textual description of the app."},"categories":{"type":"array","description":"An array of string categories that describe the application. These are hints to catalogs or stores listing FDC3-enabled apps. The app creator should find appropriate categories (or category) under which to list the app. AppD record authors should use lower-case and, where possible, to select categories from the list defined in the <a href=\\"https://fdc3.finos.org/schemas/2.0/app-directory#tag/Application/paths/~1v2~1apps~1%7BappId%7D/get\\">AppD Standard</a>.","items":{"type":"string"}},"icons":{"type":"array","description":"Set of icons for the app. Finsemble tries to pick the best matching icon but we recommend a single png size 64x64 with a transparent background.","items":{"$ref":"#/definitions/screenshotElement"}},"screenshots":{"type":"array","description":"Array of images to show the user when they are looking at app description. Each image can have an optional label.","items":{"$ref":"#/definitions/screenshotElement"}},"interop":{"$ref":"#/definitions/fdc3Interop"},"hostManifests":{"type":"object","description":"A mapping from host name to a manifest Object containing proprietary settings for running the application in that host. Use <code>\\"Finsemble\\"</code> for properties relating to Finsemble. All other host name keys are ignored.","additionalProperties":true,"properties":{"Finsemble":{"$ref":"#/definitions/component"},"io.Connect":{"$ref":"https://docs.interop.io/desktop/assets/configuration/application.json#/definitions/application"}}},"details":{"type":"object","description":"The type specific launch details of the application.","properties":{"url":{"type":"string","description":"Application start URL. Required for <code>type: \\"web\\"</code> or <code>type: \\"onlineNative\\"</code>."},"path":{"type":"string","description":"The path on disk from which the application is launched. Required for <code>type: \\"native\\"</code>."},"alias":{"type":"string","description":"The name of the virtual app. Required for <code>type: \\"citrix\\"</code>."},"arguments":{"type":"string","description":"Arguments that you must pass on the command line to launch the app in the expected configuration. Optional for <code>type: \\"native\\"</code>, <code>type: \\"onlineNative\\"</code> or <code>type: \\"citrix\\"</code>."}}},"name":{"type":"string","description":"The legacy name property, which was used in earlier versions of FDC3 to refer to applications through the API. As name is non-unique within or across app directories its use in the FDC3 Desktop Agent API is deprecated in favour of using an <code>AppIdentifier</code> with an <code>appId</code> property."},"publisher":{"type":"string","description":"The name of the organization that publishes the app. Ued when picking apps out of third party catalogs."},"type":{"type":"string","description":"The technology type that is used to launch and run the application. Each application <code>type</code> implies a particular set of launch <code>details</code>. The supported types include:<ul><li><b>web</b>: Web applications launched via a URL</li><li><b>native</b>: Native applications pre-installed on a device and launch via a filesystem path</li><li><b>citrix</b>: Apps virtualized via Citrix</li><li><b>onlineNative</b>: Native apps that have an online launcher, e.g. online ClickOnce app deployments.</li><li><b>other</b>: Used to represent apps that don\'t conform to or cannot be launched via the other types, and are likely to be defined solely by a hostManifest.</li></ul>","enum":["web","native","citrix","onlineNative","other"]},"supportEmail":{"type":"string","description":"An email address to contact for support with this app."},"tooltip":{"type":"string","private":true,"description":"The tooltip that displays when hovering over the app in a launcher. Currently not used."},"title":{"type":"string","description":"A human-readable name that describes the app. The app appears in the launcher menu under this title."},"lang":{"type":"string","description":"A language tag that specifies the primary language of both the application and its AppD entry, as defined by IETF RFC 5646. For example, \\"fr\\" for French or \\"en-CA\\" for Canadian English."},"version":{"type":"string","description":"The version of the app. This should follow semantic versioning rules."},"moreInfo":{"description":"Optional URL that provides more information about the application. For use in an app directory catalog UI.","type":"string"},"localizedVersions":{"$ref":"#/definitions/LocalizedVersions"},"metadata":{"type":"object","description":"Optional metadata that you can use to manage updates of this appD record.","additionalProperties":false,"properties":{"autoUpdate":{"type":"boolean","description":"If explicitly true and an appDUrl is set, Finsemble automatically updates the appD record during startup."},"appDUrl":{"type":"string","description":"The appDUrl must be a valid URL to retrieve an updated copy of this appD record."},"retrievedAt":{"type":"string","description":"The ISO formatted date and time string at which the appD record was last retrieved from the appDUrl. Finsemble sets this automatically."}}}},"required":["appId","type","details"],"title":"FDC3 Application"},"LocalizedVersions":{"type":"object","additionalProperties":true,"title":"LocalizedVersions","description":"Provides localized alternatives to any field of the AppD record, which may also refer to an alternative version of the application that is also localized (e.g. by providing customConfig or an alternative URL). The keys to this object should be language tags as defined by IETF RFC 5646, e.g. en, en-GB or fr-FR. Not currently used in Finsemble."},"fdc3AppDServers":{"title":"FDC3 Application Directory Servers","description":"List of AppD servers to retrieve application definitions from on startup.","type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"description":{"type":"string"}},"required":["url"]}},"appd":{"title":"appd","deprecated":true,"finsemble:docs":{"rightnav":false},"description":"Contains Finsemble\'s app configurations aligning with FDC3 1.2. App config is the primary way that Finsemble learns about apps. Finsemble uses this to create its launcher menus and for driving data integration (interop). This property is deprecated and will likely go away in the future.","replaceWith":"[finsemble.apps](/docs/reference/ConfigReference#finsemble-apps)","type":"object","properties":{},"additionalProperties":{"$ref":"#/definitions/AppEntry1.2"}},"AppEntry1.2":{"title":"AppD entry","deprecated":true,"description":"AppD entries that describe apps. This format follows the FDC3 AppD specification. It is deprecated and will likely go away in the future.","type":"object","properties":{"appId":{"type":"string","description":"A unique identifier for the app that is used programmatically. It must follow the AppD specification for fully qualified naming: https://fdc3.finos.org/docs/app-directory/overview#application-identifiers."},"contactEmail":{"type":"string","description":"Email address to contact for information about the app. Used when apps are picked out of a third party app catalog."},"description":{"type":"string","description":"Textual description of the app."},"interop":{"$ref":"#/definitions/fdc3Interop"},"icons":{"type":"array","description":"Set of icons for the app. Finsemble tries to pick the best matching icon but the best practice is to use a single png size 64x64 with a transparent background.","items":{"type":"object","properties":{"src":{"type":"string","description":"The url path for the icon image."},"sizes":{"type":"string","description":"The size of the icon in the form 32x32. You can have multiple sizes for different image types. This follows the Web Manifest specification."},"type":{"type":"string","description":"Image or icon expected MIME type, such as \'image/png\'."},"url":{"type":"string","private":true,"description":"Inadvertently used in some components though it\'s not legal."},"icon":{"type":"string","deprecated":true,"description":"FDC3 1.0 - 1.2 version of \'src\' field."}}}},"images":{"type":"array","description":"Set of \\"screenshots\\" that describe the app. Used when picking apps out of an app catalog.","items":{"type":"object","properties":{"url":{"type":"string"},"tooltip":{"type":"string"}},"required":["url"]}},"intents":{"type":"array","description":"The set of intents that this app is listening for. See <a href=\\"/docs/connect-apps/interop/\\">Interop</a>.","items":{"$ref":"#/definitions/intent"}},"manifest":{"$ref":"#/definitions/component"},"manifestType":{"type":"string","description":"The type of manifest. This is always equivalent to \\"finsemble\\" and can be omitted."},"name":{"type":"string","description":"The name of the app."},"publisher":{"type":"string","description":"The name of the organization that publishes the app. Used when picking apps out of third party catalogs."},"releaseNotes":{"type":"string","description":"Release notes for this version of the app."},"supportEmail":{"type":"string","description":"An email address to contact for support with this app."},"tags":{"type":"array","description":"A set of searchable tags. Used when picking apps out of an app catalog.","items":{"type":"string"}},"title":{"type":"string","description":"A human-readable name that describes the app. The app appears in the launcher menu under this title."},"tooltip":{"type":"string","private":true,"description":"The tooltip that displays when hovering over the app in a launcher. Currently not used."},"lang":{"type":"string","description":"A language tag that specifies the primary language of both the application and its AppD entry, as defined by IETF RFC 5646. For example, \\"fr\\" for French or \\"en-CA\\" for Canadian English."},"version":{"type":"string","description":"The version of the app. This should follow semantic versioning rules."}},"required":["appId","name","manifest"]},"fdc3Interop":{"type":"object","description":"Metadata that describes how the application uses FDC3 APIs. This metadata serves multiple purposes:<ul><li>It supports intent resolution by a desktop agent, by declaring what intents an app listens for.</li><li>It can be used, for example in an app catalog UI, to find apps that \'interoperate with\' other apps.</li><li>It provides a standard location to document how the app interacts with user channels, app channels, and intents, for use by other app developers and desktop assemblers.</li></ul>","properties":{"intents":{"$ref":"#/definitions/fdc320intent"},"userChannels":{"description":"Describes the application\'s use of context types on User Channels.<br />This metadata is not currently used by the desktop agent, but is provided to help find apps that will interoperate with this app and to document API interactions for use by other app developers.","properties":{"broadcasts":{"type":"array","description":"Context type names that are broadcast by the application.","items":{"type":"string"}},"listensFor":{"type":"array","description":"Context type names that the application listens for.","items":{"type":"string"}}}},"appChannels":{"type":"array","description":"Describes the application\'s use of App Channels.<br />This metadata is not currently used by the desktop agent, but is provided to help find apps that will interoperate with this app and to document API interactions for use by other app developers.","items":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the App Channel."},"description":{"type":"string","description":"A description of how the channel is used."},"broadcasts":{"type":"array","description":"An array that contains the names of context types that the app broadcasts on the channel.","items":{"type":"string"}},"listensFor":{"type":"array","description":"An array that contains the names of context types that the application listens for on the channel.","items":{"type":"string"}}}}}}},"fdc320intent":{"type":"object","description":"Describes the app\'s interactions with intents.","properties":{"listensFor":{"type":"object","description":"A mapping of Intents names that an app listens for via <code>fdc3.addIntentListener()</code> to their configuration.<br />Used to support intent resolution by desktop agents. Replaces the <code>intents</code> element used in appD records prior to FDC3 2.0.","properties":{},"additionalProperties":{"type":"object","properties":{"contexts":{"type":"array","description":"A filter stating that this app handles only intents for *these* context types. Note that intents can have one or more context types.","items":{"type":"string"}},"displayName":{"type":"string","deprecated":true,"description":"Optional friendly printable name for the intent. To be deprecated in FDC3 2.1 as it is problematic for apps to configure different display names for the same Intent."},"resultType":{"type":"string","description":"An optional type for output returned by the application, if any, when resolving this intent. Might indicate a context type by type name (e.g. <code>\\"fdc3.instrument\\"</code>), a channel (e.g. <code>\\"channel\\"</code>) or a combination that indicates a channel that returns a particular context type (e.g. <code>\\"channel<fdc3.instrument>\\"</code>)."}}}},"raises":{"type":"object","description":"A mapping of Intent names that an app raises (via <code>fdc3.raiseIntent</code>) to an array of context type names that it can be raised with.<br />Use the intent name <code>\\"any\\"</code> to represent use of the <code>fdc3.raiseIntentForContext</code> and <code>fdc3.findIntentForContext</code> functions, which allow the user to select from intents available for a specified context type.<br />This metadata is not currently used by the desktop agent, but is provided to help find apps that will interoperate with this app and to document API interactions for use by other app developers.","properties":{},"additionalProperties":{"type":"array","description":"Context type names that the intent may be raised with.","items":{"type":"string"}}}}},"intent":{"type":"object","description":"An intent (following the FDC3 format)","properties":{"contexts":{"type":"array","description":"A filter stating that this app handles only intents for *these* context types. Note that intents can have one or more context types.)","items":{"type":"string"}},"displayName":{"type":"string","description":"Friendly printable name for the intent. Whenever there is more than one possible resolution, this name appears in the FDC3 Intent Resolver when an end user is asked to decide which app to send the intent to."},"name":{"type":"string","description":"The official name of the intent. This name is referenced in interop config."}},"required":["name","contexts"]},"screenshotElement":{"type":"object","additionalProperties":false,"properties":{"src":{"description":"App Image URL.","type":"string"},"size":{"description":"Image dimension formatted as <code><height>x<width></code>","type":"string"},"type":{"description":"Image media type. If not present, Finsemble can use the src file extension.","type":"string"},"label":{"description":"Optional caption for the image.","type":"string"}},"title":"screenshotElement"},"components":{"title":"components","description":"Set of component configurations. Used internally by Finsemble to register \\"UI Components\\".","type":"object","properties":{},"additionalProperties":{"$ref":"#/definitions/component"}},"component":{"description":"The name of the component you are configuring.","title":"component name","finsemble:docs":{"rightnav":true,"indented":true},"type":"object","forceDefaults":false,"properties":{"//":{"type":"string","description":"Optional comment describing the component."},"io.Connect":{"$ref":"https://docs.interop.io/desktop/assets/configuration/application.json#/definitions/application"},"bootParams":{"$ref":"#/definitions/bootParamsProperties"},"signatureKey":{"type":"object","description":"Public authentication key to decrypt static AuthenticationTokens within interopService. Necessary config for Freestanding applications connecting to Finsemble from outside.","additionalProperties":true,"properties":{"alg":{"type":"string","description":"The algorithm used to generate the keys, for example, \\"RS256\\"."},"ext":{"type":"boolean","private":true,"description":"Short of \'extractable\'. This is an extension of the JWK format, supported by the WebCrypto API.","default":true},"key_ops":{"type":"array","private":true,"description":"The operations that the key is intended to be used for. One of these items must be \'sign\'.","items":{"type":"string"}},"kty":{"type":"string","private":true,"description":"The key type, such as \'RSA\' or \'EC\'."},"n":{"type":"string","private":true,"description":"The modulus of an RSA key."},"e":{"type":"string","private":true,"description":"The exponent of an RSA key."}}},"signatureKeyURL":{"type":"string","default":false,"description":"URL specifying the location of the signature key - an alternative to providing the `signatureKey` with the Finsemble configuration."},"isAnApp":{"type":"boolean","default":false,"private":true,"description":"Finsemble\'s config service dynamically adds this field to indicate that the app came from AppD rather than from component.json. It is generally used in the code to distinguish between apps and UI components. It should never be set in json but is required in the schema to avoid phantom schema validation errors."},"uiComponent":{"type":"boolean","default":false},"appService":{"type":"boolean","default":false,"description":"When true, the app is treated as an app service."},"appConfig":{"type":"object","private":true,"description":"Never set this in raw json. Internally, Finsemble\'s config service converts appd entries to component entries which then contain this field. This field must exist in the schema to avoid phantom schema validation errors."},"waitForInitialization":{"type":"boolean","default":false,"description":"When true, startup waits for the app to explicitly signal it is ready."},"interop":{"description":"Interop (data integration) related config for this app","finsemble:docs":{"rightnav":true,"indented":true},"type":"object","properties":{"launchable":{"type":"boolean","description":"If explicitly set to false, an app is not launchable from the FDC3 UI resolver for handling an intent. This property is independent from the launchableByUser property affecting the App Launcher menu."},"joinMultipleChannels":{"type":"boolean","description":"If explicitly set to false, an app cannot join multiple user channels. So when an app that is already on a channel joins another channel, it automatically leaves the channel it was on."},"fdc3_1_2_compatibility":{"type":"boolean","description":"If true, Finsemble desktop agent conforms to FDC3 1.2 (as opposed to 2.0)."},"showWhenIntentReceived":{"type":"boolean","description":"If explicitly set to `false`, do not automatically show (i.e. bring to front or restore) an app instance receiving an FDC3 intent. If explicitly set to `true`, then always try to show it. Otherwise, the default is to show the application when an intent is received if the app window is normally shown (i.e. its `autoShow` property is `true`)."},"useLinker":{"type":"boolean","description":"The linker is turned on by default for any app that uses FDC3. Set this flag to false if you want to turn off the linker for this app, for example, if your app only uses App Channels (i.e. \'well known\' named channels)."},"autoConnect":{"type":"boolean","default":false,"description":"If set to true, the app automatically connects to the Interop service. In most cases, this causes the linker to display. If set to false (the default), the app connects on the first call to any `fdc` function. "},"selectConnect":{"type":"array","description":"Interop messaging rules to support no-code integration of modules. It allows you to specify precisely which modules can communicate and in what way.","items":{"type":"object","description":"A specific selectConnect rule that consists of one or more properties.","properties":{"authorize":{"type":"array","items":{"type":"object","description":"When set, messages are restricted to apps that meet the authorization criteria. Note: Using \'authorize\' is the same as using both \'to\' and \'from\'.","properties":{"name":{"type":"string","description":"When set, messages are delivered to or received from apps with this name only. Finsemble verifies the app name."}}}},"to":{"type":"array","items":{"type":"object","description":"When set, messages re sent only to apps that meet the authorization criteria.","properties":{"name":{"type":"string","description":"When set, messages are sent only to apps with this name. Finsemble verifies the app name."}}}},"from":{"type":"array","items":{"type":"object","description":"When set, messages can be received only from apps that meet the authorization criteria.","properties":{"name":{"type":"string","description":"When set, messages can be received only from apps with this name. Finsemble verifies the app name."}}}},"cc":{"type":"string","description":"The name of a valid selectConnect module. When cc is set, that module receives a copy of the message. cc works on both outgoing and incoming traffic."},"contextType":{"type":"string","description":"Apply this rule only to this specific context type. (Optional)."},"fwd":{"type":"string","description":"The name of a valid selectConnect module. When you set fwd, that module receives the message *instead* of the original description. fwd is intended primarily for outgoing traffic but also works on incoming traffic."},"autoAssociate":{"type":"object","description":"Define app’s autoAssociate property","properties":{"allChildren":{"type":"boolean","description":"if true, all apps spawned or opened by this app are automatically associated (i.e. auto-joined to common channel)."},"selectChildren":{"type":"array","description":"Any app in this list when spawned or opened by this app is automatically associated.","items":{"type":"string","description":"appId of child app."}},"usingConnectId":{"type":"string","description":"Specifies a fixed association (as opposed to dynamic) using the specified connectId -- all apps with this connectId are automatically associated."}}}}}}}},"window":{"title":"window","finsemble:docs":{"rightnav":true,"indented":true},"type":"object","description":"Configurations that manage placement of the application\'s window on the screen. <i><a href=\\"/docs/reference/typedocs/modules/LauncherClient#spawn\\">Configuration settings in this section can also be passed as parameters to `LauncherClient.spawn()`.</a></i>","properties":{"//":{"type":"string","private":true},"addToWorkspace":{"type":"boolean","default":false,"description":"Specifies whether to add the new component to the workspace. The value set in the component manifest takes priority over any value passed as a parameter to `LauncherClient.spawn` or related functions. Set it to `false` to prevent tabbing and grouping for the component."},"affinity":{"type":["string","boolean"],"description":"Process affinity allows you to control how render processes for web windows, served from the same \'site\' (registered domain and protocol) are grouped together, reducing their memory footprint, at the cost of increasing CPU resource contention (because a render thread can only process one window at a time). As most user interface components are only active while the user is interacting with them, process grouping via affinity is an effective way to reduce memory footprint. Conversely, you might want to disable or customize the affinity setting for CPU intensive applications that are driven by outside events (for example a ticking blotter or chart driven by an external data source). In this way, you can strike a balance between performance and memory footprint. Group applications together thoughtfully by setting them to the same string value or disable render process group by setting affinity to false. See the <a href=\\"/docs/how-finsemble-works/processManagement\\">Process Management tutorial</a> for more information."},"alias":{"type":"string","description":"Used with native applications (that is, when windowType is \\"native\\" or \\"assimilation\\") instead of `path`. Specifies the alias of a bundled asset to launch."},"alwaysOnTop":{"type":"boolean","deprecated":true},"arguments":{"type":"string","description":"Specifies the arguments to be sent to a native application (that is, when windowType is \\"native\\" or \\"assimilation\\") on launch. Separate the arguments by spaces: `--arg1 foo --arg2 bar` except when `params.argumentsAsQueryString` is true, in which case set this parameter to be single string in URI format: `arg=1&arg=2`."},"argumentsAsQueryString":{"type":"boolean","description":"For native applications (i.e. when windowType is \\"native\\" or \\"assimilation\\"), causes the generated arguments (the automatically generated arguments and any supplied as the \\"arguments\\" parameter) to be encoded as a query string and appended to the URI. Useful for applications launched via a protocol handler or online ClickOnce deployment, where the path parameter is a URI."},"autoShow":{"type":"boolean","deprecated":true},"bottom":{"type":["string","number","null"],"description":"A pixel value that represents the distance from the bottom edge of the viewport as defined by \\"position\\". For non-absolute positions, you can also use the percentage value, which represents the percentage distance from the bottom edge of the viewport relative to the viewport\'s height."},"canGroup":{"type":"boolean","replaceWith":"[foreign.services.windowService.allowGrouping](/docs/reference/ConfigReference#finsemble-appd---manifest-foreign-services-windowService-allowGrouping)","deprecated":true},"claimMonitorSpace":{"type":"boolean","description":"For use with permanent toolbars. The available space for other components is reduced by the amount of space covered by the newly spawned component. Users can\'t move windows to a position that covers the claimed space."},"closeComponentsTogether":{"type":"boolean","default":false,"description":"Whether to close all components within a launchGroup at the same time."},"component":{"description":"Type of component to spawn."},"data":{"type":["array","boolean","integer","null","number","object","string"],"description":"Optional data to pass to the opening window. If set, then the spawned window can use WindowClient.getSpawnData to retrieve the data."},"defaultHeight":{"type":"number"},"dockable":{"description":"Parts of the monitor that the component can dock to. Valid values are `top` and `bottom`. The `[]` value is equal `false`. The `true` value is equal `[\'top\', \'bottom\']`.","type":["array","boolean"],"items":{"type":"string"},"enum":[true,false,[],["top"],["bottom"],["top","bottom"]]},"docked":{"type":"string","description":"Specifies the part of the monitor that the component docks to on spawn. Only valid if combined with the `dockable` property.","enum":["top","bottom"]},"dockedHeight":{"type":"number"},"dockOnSpawn":{"type":"boolean","deprecated":true,"description":"If true, automatically docks the window with the \\"relative\\" window (dock to the parent window unless specified in params.relativeWindow). Note that you must also position the window in a valid position for docking, for example, by setting the \\"left\\" or \\"top\\" parameters to \\"adjacent\\".","replaceWith":"[groupOnSpawn](/docs/reference/ConfigReference#finsemble-apps---hostManifests-Finsemble-window-groupOnSpawn)"},"ephemeral":{"type":"boolean","description":"Indicates that this window is ephemeral. An ephemeral window is a dialog, menu, or other window that is temporarily displayed but usually hidden. Ephemeral windows automatically have these settings assigned: resizable: false, showTaskbarIcon: false, alwaysOnTop: true. Use `options:{autoShow: false}` to prevent an ephemeral window from showing automatically."},"env":{"description":"Sets environment variables for a spawned native application. Create a map (JSON) object of names to values. This is only available when running Assimilation."},"forceOntoMonitor":{"type":["boolean","string"],"enum":[true,false,"availableRect","monitorRect"],"description":"If true, tries to make the window have no edges outside the monitor boundary."},"frame":{"type":"boolean"},"groupOnSpawn":{"type":"boolean","description":"Groups the window to the `relativeWindow` based on their adjacent position."},"height":{"type":["number","string"],"description":"A pixel or percentage value."},"id":{"type":"string"},"left":{"type":["string","number","null"],"description":"A pixel value representing the distance from the left edge of the viewport as defined by \\"position\\". For non-absolute positions, you can also use the percentage value, which represents the percentage distance from the left edge of the viewport relative to the viewport\'s width.<br/><b>\\"adjacent\\"</b> will snap to the right edge of the spawning or relative window.<br/><b>\\"center\\"</b> will center the window. If neither left nor right are provided, then the default will be to stagger the window based on the last spawned window."},"maxHeight":{"type":["number","boolean","null"],"description":"Maximum height window can be resized to."},"maxWidth":{"type":["number","boolean","null"],"description":"Maximum width window can be resized to."},"minHeight":{"type":["number","boolean","null"],"description":"Minimum height window can be resized to."},"minWidth":{"type":["number","boolean","null"],"description":"Minimum width window can be resized to."},"monitor":{"type":["number","string"],"description":"Specifies on which monitor to place the new window.<br/><b>\\"mine\\"</b> - Place the window on the same monitor as the calling window.<br/>Integer value from 0-n (0 being the primary monitor).<br/><b>\\"primary\\"</b> indicates the user\'s primary monitor.<br/><b>\\"all\\"</b> - Put a copy of the component on all monitors."},"name":{"type":"string","description":"Window name to apply to the application. The name is not normally specified, allowing Finsemble to generate a random one from the component type. If specified in the configuration, only a single copy of the component can exist at a time."},"options":{"title":"options","description":"Low level window behavior options. Note that you can\'t pass `options` as arguments to `LauncherClient.spawn` and related API calls","type":"object","properties":{"autoShow":{"type":"boolean","default":true,"description":"When set to true, the window is visible when it is spawned. When set to false, the window is spawned to be invisible."},"backgroundThrottling":{"description":"Specifies whether to throttle animations and timers when the page becomes backgrounded. This also affects the Page Visibility API. Defaults to true","type":"boolean"},"contextMenu":{"type":"boolean","description":"A flag to show the context menu when right-clicking on a window. Gives access to the Developer Console for the Window.","default":true},"Content-Security-Policy":{"description":"Custom content security policy (CSP) that overrides the manifest CSP and the CSP received from this app\'s HTTP server. This can be a string or an array of strings. See <a href=\\"https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP\\">MDN docs on CSP</a>","type":["array","string"],"items":{"type":"string"},"examples":[["script-src *;"]]},"permissions":{"type":"object","description":"Change an application\'s individual permissions to be different than from those in its security policy by adding configs under this config. See the <a href=\\"/docs/how-finsemble-works/SecurityPolicies#customized-security-policies\\">Security Policies tutorial</a> for more information.","properties":{}},"securityPolicy":{"type":"string","description":"Set an application\'s security policy by name, for example to the default \\"trusted\\" or \\"untrusted\\" policies or to a custom policy. See the <a href=\\"/docs/how-finsemble-works/SecurityPolicies#changing-a-security-policy\\">Security Policies tutorial</a> for more information."},"showTaskbarIcon":{"type":"boolean","description":"Specifies whether the application should be displayed in the Windows taskbar."},"smallWindow":{"type":"boolean","deprecated":true},"maximizable":{"type":"boolean","deprecated":true},"cornerRounding":{"$ref":"#/definitions/cornerRounding"},"opacity":{"type":"number","default":1,"description":"Sets the opacity of the window."},"openLinksInExternalBrowser":{"type":"boolean","default":false,"description":"When set to true, links (anchor tags) will be open in the OS default browser. See \'navigation\' property for restricting navigation."},"allowedNavigationUrls":{"description":"Controls whether the app can navigate to other urls. If unspecified, the default is to allow all urls. This will change in a future version to allowing only same-origin urls, those with the same domain, protocol, and port as the window itself. An empty array indicates no navigation is allowed, even to the origin domain. To allow specific domains, add those domains to the array. The origin domain must also be added.","type":"array","items":{"type":"string","description":"A list of domains to which this app is allowed to navigate or open pop-up windows. If a domain is not fully qualified, it is treated as a wildcard, \'*.domain.com\'"}},"allowedWindowOpenUrls":{"description":"Controls whether the app can programmatically open a window with `window.open()` based on the url. If unspecified, the default is to allow all urls. This will change in a future version to allowing only same-origin urls, those with the same domain, protocol, and port as the window itself. An empty array indicates no navigation is allowed, even to the origin domain. To allow specific domains, add those domains to the array. The origin domain must also be added.","type":"array","items":{"type":"string","description":"A list of domains to which this app is allowed to navigate or open pop-up windows. If a domain is not fully qualified, it is treated as a wildcard, \'*.domain.com\'"}},"resizable":{"type":"boolean","default":true,"description":"When set to false, the user can\'t resize the window\'s edges and won\'t the window participate in Windows Aero Snap."},"alwaysOnTop":{"type":"boolean","default":false,"description":"When set to true, the window is always on top (like a sticky note) of any window with alwaysOnTop set to false."},"isEvergreen":{"type":"boolean","default":false,"description":"When set to true, the window hides and shows when switching between workspaces rather than opening and closing. The same <b>singleton</b> instance of the window is used across multiple workspaces. <b>Note</b>: Tabbing and tiling is set to false for Evergreen components. If you\'re using set/getComponentState, the state is different per workspace. Listen for the \'component-state-changed\' event on the window to update your application accordingly. Or fetch the new state in the Workspace \'load-complete\' event in the case of a native application."},"windowSpawnTimeout":{"type":"number","default":30,"description":"Number of seconds before a native application component spawn times out."},"windowTitleBarUrl":{"type":"string","description":"When specified, overrides the default Finsemble window titlebar. See finsemble.windowTitleBarUrl for more info."},"transparent":{"type":"boolean","description":"When set to true, the window is transparent. This works only if you haven\'t set any background color on the window, including through css tags. Dynamically removing background color styles does _not_ work on Mac (there must be no initial css styles for background or background-color)."},"userAgentString":{"type":"string","description":"Sets the userAgent for a web window, allowing for spoofing the of the userAgent."}}},"path":{"type":"string","description":"Specifies the path to a native application (i.e. when windowType is \\"native\\" or \\"assimilation\\"). The path can be: <ul><li>The name of an exe that is on the system path (e.g., notepad.exe).</li><li>The full path to an executable on the user\'s machine (e.g., C:\\\\Program Files\\\\app.exe).</li><li>A system installed URI (e.g., myuri://advancedapplauncher).</li></ul>When windowType is \\"native\\", additional arguments are automatically appended to the path or the URI. The native app can capture these arguments to tie it to Finsemble\'s window tracking. When building an application with finsemble.dll, this is handled automatically. Those arguments are:<ul><li><b>uuid</b> - A generated UUID that uniquely identifies this window.</li><li><b>left</b> - The x coordinate of the new window</li><li><b>top</b> - The y coordinate of the new window</li><li><b>width</b> - The width of the new window</li><li><b>height</b> - The height of the new window</li><li><b>finsembleWindowName</b> - The name of the window in the Finsemble config</li><li><b>componentType</b> - The component type in the Finsemble config</li><li><b>appName</b> - The name of the application in the Finsemble appd.</li></ul> A common problem occurs when a native application needs to be launched from an intermediary application (such as a launcher or batch script) or a window needs to be created by a multi-process. multi-window application. The intermediary application or process can pass these parameters along to the final application or thread, which uses them to connect back to Finsemble."},"position":{"type":"string","enum":["available","monitor","relative","virtual","absolute"],"description":"Defines a \\"viewport\\" for the spawn, with one of the Position Types:<ul><li><b>available</b> - Positioned according to the coordinates available on the monitor itself, less space claimed by the operating system (such as the windows toolbar). For example, `bottom:0` places the new component with its bottom flush against the windows toolbar.</li><li><b>monitor</b> - Positioned according to the absolute size of the monitor. For example, `top:0` places the component overlapping the toolbar.</li><li><b>relative</b> - Positioned relative to the relativeWindow. For example, `left:0;top:0` joins the top left corner of the new component with the top left corner of the relative window.</li><li><b>virtual</b> - Deprecated. Positioned against coordinates on the virtual screen. The virtual screen is the full viewing area of all monitors combined into a single theoretical monitor.</li><li><b>absolute</b> - Positioned using native operating system coordinates. Absolute positions require numeric top/right/left/bottom arguments.</li></ul>."},"relativeWindow":{"description":"The window to use when calculating any relative launches. If not set, the window from which spawn() was called. Primarily used as an argument to `LauncherClient.spawn()` and related functions."},"resizable":{"type":"boolean","deprecated":true},"right":{"type":["string","number","null"],"description":"A pixel value representing the distance from the right edge of the viewport as defined by \\"position\\". For non-absolute positions, you can also use the percentage value, which represents the percentage distance from the right edge of the viewport relative to the viewport\'s width."},"setBoundsOnly":{"type":"boolean","description":"If true, visibility of window is not changed. In other words, a hidden window won\'t be made visible. Primarily used as an argument to `LauncherClient.showWindow()` and related functions."},"show":{"type":"boolean"},"showTaskbarIcon":{"type":"boolean","deprecated":true},"slave":{"type":"boolean","description":"If true, the new window acts as a slave to the relativeWindow (or the launching window if relativeWindow is not specified). Slave windows automatically close when their parent windows close."},"staggerPixels":{"type":"number","description":"Number of pixels to stagger (default when neither left, right, top or bottom are set)."},"top":{"type":["string","number","null"],"description":"A pixel value that represents the distance from the bottom edge of the viewport as defined by \\"position\\". For non-absolute positions, you can also use the percentage value, which represents the percentage distance from the top edge of the viewport relative to the viewport\'s height."},"toSpawn":{"type":"array","description":"An array of objects defining the components to spawn. Each entry can either represent a single component in the form `{componentType, spawnOptions}` or a tabbed window of components in the form `{components, spawnOptions}`, where `components` is an array of single component definitions (again in the form `{componentType, spawnOptions}`). Most arguments that are normally passed to `LauncherClient.spawn` are supported, although positioning is interpreted as relative to the group\'s coordinates and dimensions for single components and ignored for tabbed components (as these use the position specified in the group\'s spawnOptions). Note - This param is taken into account only if the \\"windowType\\" param is \\"launchGroup\\".","items":{"type":"object","properties":{"components":{"type":"array","description":"An array of components to spawn as a tabbed group within the launchGroup.","items":{"componentType":{"type":"string","description":"The name of the component to spawn."},"spawnOptions":{"$ref":"#/definitions/spawnOptions"}},"spawnOptions":{"$ref":"#/definitions/spawnOptions"}},"componentType":{"type":"string","description":"The name of a component to spawn"},"spawnOptions":{"$ref":"#/definitions/spawnOptions"}}},"examples":[[{"componentType":"Welcome Component","spawnOptions":{"top":0,"left":0,"height":250,"width":600,"data":{}}},{"components":[{"componentType":"Welcome Component","spawnOptions":{"data":{}}},{"componentType":"ProcessMonitor","spawnOptions":{"data":{}}}],"spawnOptions":{"top":250,"left":0,"height":250,"width":600}},{"componentType":"Welcome Component","spawnOptions":{"top":500,"left":0,"height":200,"width":600,"data":{}}},{"componentType":"ProcessMonitor","spawnOptions":{"top":0,"left":600,"height":700,"width":300,"data":{}}}]]},"url":{"type":"string","description":"The URL to load for a web application (i.e. when `windowType` is `undefined`, \'WebWindow\' or \'application\')."},"width":{"type":["number","string"],"description":"A pixel or percentage value."},"windowTitleBlackList":{"type":["string","null"],"default":null,"description":"A regular expression-based string specifying window title to exclude from integration, such as splash screens or transient dialogs. Is used only for assimilation window type.","examples":["Opening.*"]},"windowTitleWhiteList":{"type":["string","null"],"default":null,"description":"A regular expression-based string specifying window title to include (finsemblize) in the integration. Is used only for assimilation window type.","examples":[".*(Outlook|Today).*"]},"windowType":{"type":"string","description":"Describes which type of component to spawn.<ul><li><b>WebWindow</b> - A normal HTML window. Requires \\"url\\" to be specified.</li><li><b>assimilation</b> - A window that is managed by the Finsemble assimilation process (usually a native window without source code access). Requires \\"path\\" or \\"alias\\" to be specified.</li><li><b>native</b> - A native window that has implemented finsemble.dll. Requires \\"path\\" or \\"alias\\" to be specified.</li><li><b>WebApplication</b> - (DEPRECATED) Use WebWindow instead. Requires \\"url\\" to be specified.</li><li><b>launchGroup</b> - A component made of other components, usually grouped together. See toSpawn property.</li><li><b>Citrix</b> - (EXPERIMENTAL) A virtual app available in your Citrix Workspace app launcher. Requires \\"alias\\" to be specified.</li></ul>","enum":["WebWindow","assimilation","native","WebApplication","launchGroup","Citrix","external"]}},"additionalProperties":true},"component":{"type":"object","finsemble:docs":{"rightnav":true,"indented":true},"description":"Properties associated with how Finsemble manages this application.","properties":{"category":{"type":"string","description":"During dynamic configuration, Finsemble can overwrite components already in the configuration. To prevent this from happening, set this value to \\"system\\". This setting is used, for example, to prevent system UI components from being dropped out of the config."},"mode":{"type":"string"},"advertiseReceivers":{"type":["array","string"],"items":{"type":"string"}},"spawnOnStartup":{"type":"boolean","default":false,"description":"When true, Finsemble automatically launches this application when the application starts."},"spawnOnAllMonitors":{"type":"boolean"},"canMinimize":{"deprecated":true,"replaceWith":"[foreign.services.windowService.allowMinimize](/docs/reference/ConfigReference#finsemble-apps---hostManifests-Finsemble-foreign-services-windowService-allowMinimize)","type":"boolean"},"canMaximize":{"deprecated":true,"replaceWith":"[foreign.services.windowService.allowMaximize](/docs/reference/ConfigReference#finsemble-apps---hostManifests-Finsemble-foreign-services-windowService-allowMaximize)","type":"boolean"},"useAppCatalog":{"deprecationMessage":"AppCatalog is deprecated and will be removed in a future release.","type":"boolean"},"singleton":{"type":"boolean","default":false,"description":"If set to `true`, the application behaves as a singleton; only a single instance can be launched. If the application has already been launched, if a user tries to launch it again, Finsemble brings it to front instead."},"showDevConsoleOnVisible":{"type":"boolean","default":false,"description":"If set to `true`, a Chrome developer console spawns along with the application to assist with debugging."},"allowQuickComponent":{"type":"string"},"neededClients":{"deprecated":true,"description":"Clients no longer need to be specified for initialization.","type":"array","items":{"type":"string"}},"displayName":{"type":"string","description":"Changes the applications\'s name in the launcher and its label in the pinned item section."},"centralLoggerNamePrefix":{"type":"string","description":"Prefixes the windowDisplayName for the entry in the Central logger."},"preload":{"type":["boolean","string","array"],"description":"A preload is a JavaScript file that is inserted into browser page and runs before any other content. Specify a full path for your preloads. You can specify a list of files to be included. Learn more about preloads in <a href=\\"/docs/add-apps/native/IntegratingNativeApps\\">Integrating HTML Applications</a>.","items":{"type":"string"}},"inject":{"type":["boolean","string"],"private":true,"deprecated":true},"spawnOnHotkey":{"description":"The application is launched when the user activates this global hotkey combination. Example: [\\"ctrl\\",\\"alt\\",\\"a\\"]","type":"array","items":{"type":"string"}},"enableGrpc":{"deprecated":true,"description":"Enables GRPC. Can be used from BrowserView based applications. grpc is a global variable available at window.grpc or at fin.grpc. Note: Sandbox is disabled for these applications.","type":"boolean"},"reloadTimeout":{"description":"Reload timeout for the component\'s WebContents.","type":"number","minimum":0,"maximum":999999,"default":60000},"maxReloadAttempts":{"description":"Number of maximum reload attempts that should be executed if the component\'s WebContents fails to load.","type":"number","minimum":0,"maximum":60,"default":0},"isUserDefined":{"description":"Property added when an app is added using addUserDefinedComponent.","type":"boolean","private":true},"expectOverwrite":{"private":"true","type":"boolean","default":false,"description":"Indicates that the component config expects to be overwritten by addApps."},"custom":{}},"additionalProperties":false},"foreign":{"title":"foreign","finsemble:docs":{"rightnav":true,"indented":true},"description":"This section contains configurations that other applications and services read when they interact with this component.","type":"object","properties":{"agentLabel":{"type":"string"},"clients":{"title":"clients","type":"object","private":true,"deprecated":true,"properties":{"dialogManager":{"title":"dialogManager","type":"object","properties":{"isDialog":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"services":{"type":"object","description":"Configurations for services that will interact with this application.","properties":{"windowService":{"type":"object","description":"Configurations that the window service will apply to this app.","properties":{"global":{"type":"boolean"},"allowSnapping":{"type":"boolean","default":true,"description":"If `true`, this window can be snapped. If `false`, this window cannot benefit from snapping."},"isArrangable":{"type":"boolean","deprecated":true,"description":"Deprecated as of 3.6"},"allowGrouping":{"type":"boolean","default":true,"description":"If `true`, the window can form groups with other windows. If `false`, this window cannot be placed into a group. Note: Grouping windows by manually dragging can be difficult or impossible if allowSnapping is disabled."},"allowAutoArrange":{"type":"boolean","default":true,"description":"If `true`, the window can be auto arranged. If `false`, will disable the window\'s ability to be auto arranged by the Window Service."},"allowTabbing":{"type":"boolean","default":false,"description":"If `true`, the window\'s titlebar will include a tab header that can be dragged or have other tabs dropped onto it. If `false`, tabbing will be disabled for this window."},"allowTiling":{"type":"boolean","default":false,"description":"If `true`, the window can be tiled on by other windows by dragging tab headers onto its body (below the titlebar). If `false`, tiling is disabled for this window. Tiling is not possible if a window is not resizable or if tabbing is disabled."},"allowMinimize":{"type":"boolean","default":true,"description":"If `true`, the window can be minimized to the taskbar. If `false`, the window cannot be minimized."},"allowMaximize":{"type":"boolean","default":true,"description":"If `true`, the window can be maximized. If `false`, the window cannot be maximized."},"shouldRegister":{"type":"boolean"},"manageWindowMovement":{"type":"boolean","default":true,"description":"If `true`, the Window Service manages the window\'s movement. Unless otherwise specified by the following params, this means the Window Service can perform actions on this window: move, group, snap, minimize, maximize, etc. When this parameter is `false` it could be overwritten by `allowSnapping`, `allowGrouping`, `allowAutoArrange`, `allowTabbing`, `allowTiling`, `allowMinimize`, `allowMaximize`, `window.dockable`, `FSBLHeader` if any from them is `true`"}}},"workspaceService":{"type":"object","description":"Configurations related to the workspace service.","properties":{"persistURL":{"type":"boolean","description":"A config that specifies whether Finsemble should persist the application URL. When true, the app or component automatically saves its last URL instead of using the one in the config. The application config overrides the global config.","default":false},"persistPath":{"type":"boolean","default":false,"description":"When true, the application automatically persists its path through restarts and workspace reloads, even when the path changes in the config. Path is used for \\"native\\" (aka \\"assimilation\\") windows."},"persistArguments":{"type":"boolean","default":true,"description":"When false, the application does not automatically persist its arguments through restarts and workspace reloads, even when the arguments change in the config. Arguments are used for \\"native\\" (aka \\"assimilation\\") windows."}}},"dockingService":{"type":"object","private":true,"deprecated":true,"properties":{"canGroup":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"components":{"type":"object","description":"Configurations specific to other applications that wish to interact with this app.","properties":{"App Launcher":{"type":"object","description":"App launcher is a drop down menu that launches other application.","properties":{"launchableByUser":{"type":"boolean","description":"If true, an App Launcher menu can include this application.","default":false}},"default":{}},"Toolbar":{"type":"object","description":"Configurations related to the global toolbar (at the top of the monitor).","properties":{"iconURL":{"type":"string","replaceWith":"the [\'icons\'](/docs/reference/ConfigReference#finsemble-apps---icons) array at the top level of the AppD entry.","deprecated":true,"examples":[{"iconURL":"$applicationRoot/assets/img/Finsemble_Taskbar_Icon.png"}]},"iconClass":{"type":"string","description":"A CSS class character to display when this application is pinned in the toolbar. See \\"fin-font\\" or use font-awesome or similar. This setting will override AppD icons.","examples":[{"iconClass":"ff-ungrid"}]}}},"Window Manager":{"$ref":"#/definitions/windowManager"}},"default":{}},"custom":{}},"additionalProperties":false,"default":{}},"childWindowOptions":{"finsemble:docs":{"halt":true,"type":"object","description":"Configuration for all child windows created via window.open for this app. Child windows can\'t join workspaces, group, tab, or tile. <i>childWindowOptions supports the same properties as component...</i>"},"$ref":"#/definitions/component"},"custom":{"type":"object","description":"This area is free-form and can support any custom elements associated with the app.","properties":{},"additionalProperties":true}},"additionalProperties":false},"services":{"private":true,"description":"The set of service configurations. These are defined internally for Finsemble and can be overridden by equivalent entries in servicesConfig.","type":"object","additionalProperties":{"$ref":"#/definitions/service"}},"service":{"description":"<b>[service name]</b> The name of the service you are configuring","type":"object","properties":{"bootParams":{"$ref":"#/definitions/bootParamsProperties"},"name":{"description":"name of service","type":"string"},"spawnAs":{"$ref":"#/definitions/spawnAs"},"affinity":{"type":["string","boolean"],"description":"Only applicable for `spawnAs: \\"window\\"`. When set, the service window are given process affinity based on the string passed in. This allows aggregation of services to a specific browser process. Set to false to disable render process grouping via affinity."},"visible":{"description":"Set this to `true`to reveal the hidden service window. Useful for debugging services.","type":"boolean","default":false},"html":{"type":"string","description":"The location of the services code.","examples":[{"html":"$servicesRoot/workspace/workspace.html"}]},"file":{"type":"string"},"category":{"type":"string","enum":["system"]},"showDevConsoleOnVisible":{"type":"boolean","default":true,"description":"Automatically spawns a dev console when visible is true. If a service is set to type \\"script\\", don\'t use this but instead debug serviceManager.html."},"debugServiceDelay":{"type":"integer","private":true,"deprecated":true},"window":{"title":"window","description":"Logger service\'s window config.","type":"object","properties":{"defaultWidth":{"type":"number"},"defaultHeight":{"type":"number"},"contextMenu":{"type":"boolean"}}},"config":{"anyOf":[{"title":"windowServiceConfig","description":"Service config specific to window service.","type":"object","properties":{"BUFFER_SIZE":{"type":"number"},"RESIZE_EVENT_THROTTLE_PERIOD":{"type":"number"},"MINIMUM_WIDTH":{"type":"number"},"MINIMUM_HEIGHT":{"type":"number"},"GROUP_MODE":{"title":"GROUP_MODE","type":"object","properties":{"enabled":{"type":"boolean"},"behavior":{"type":"string"}}},"DEBUG":{"type":"boolean"},"ALLOW_GROUPS_TO_SNAP":{"type":"boolean"},"SNAPPING_OPACITY":{"type":"number"},"groupTileBuffer":{"type":"number"},"headerHeight":{"type":"number"},"heartbeatResponseTimeoutDefaults":{"title":"heartbeatResponseTimeoutDefaults","type":"object","properties":{"min":{"type":"number"},"max":{"type":"number"},"crashed":{"type":"number"},"possiblyCrashed":{"type":"number"},"notResponding":{"type":"number"}}},"tabbing":{"type":"object","properties":{"enabled":{"type":"boolean","default":true}}},"tiling":{"type":"object","properties":{"enabled":{"type":"boolean","default":true}}}}},{"$ref":"#/definitions/serviceAssimilationConfig"}]},"channels":{"deprecated":true,"description":"Only used in Linker Service.","type":"array","items":{"type":"object"}},"custom":{}},"required":["html"],"additionalProperties":false},"scheduledRestart":{"finsemble:docs":{"rightnav":true},"description":"Set Finsemble to automatically restart at the specified time. We use the 24-hour clock, and the time is measured according to the user\'s local machine. The user can override these values through user preferences.","type":["boolean","object"],"default":false,"$ref":"#/definitions/WeeklyRecurringTime"},"scheduledShutdown":{"description":"Set Finsemble to automatically shut down. A user can override these values through user preferences.<br/>Additional property: <b>dialogTimeout</b> 10000 - When it is time to shut down, the user is presented with a dialog to confirm or cancel. Because shutdown typically occurs at night while the machine is unattended, most often the dialog times out and Finsemble shuts down. The `dialogTimeout` specifies how long to wait for a user response in milliseconds.","type":["boolean","object"],"default":false,"$ref":"#/definitions/WeeklyRecurringTime"},"WeeklyRecurringTime":{"type":["boolean","object"],"properties":{"dayOfWeek":{"description":"The day of the week to run the task. Sunday - Saturday: 0 - 6. If set to false, the task runs weekly","type":["number","boolean"],"maximum":6,"minimum":0},"hour":{"description":"0 - 23. the hour when Finsemble runs the task.","type":"number","maximum":23,"minimum":0},"minute":{"description":"0 - 59. the minute when Finsemble runs the task","type":"number","maximum":59,"minimum":0}}},"scheduledCloseDiscardUnsavedChanges":{"description":"If true AND Finsemble has a scheduled restart configured, it discards any unsaved workspace changes when Finsemble closes.","type":"boolean","default":false},"downloads":{"type":"object","properties":{"downloadLocation":{"description":"Location from which to download files without prompting. The default is to show a dialog to choose a location.","type":"string"},"previousLocations":{"private":true,"description":"List of last three locations selected by the user.","type":"array"}}},"serviceAssimilationConfig":{"title":"assimilationConfig","description":"Assimilation of native windows. This only works on Windows operating systems.","type":"object","properties":{"spawnAs":{"$ref":"#/definitions/spawnAs"},"affinity":{"description":"Only applicable for `spawnAs: \\"window\\"`. When set, the service window is given process affinity based on the string passed in. This allows aggregation of services to a specific browser process. Set to false to disable render process grouping via affinity","type":["string","boolean"]},"visible":{"description":"Set this to `true` to reveal the hidden service window. Useful for debugging services.","type":"boolean","default":false},"enabled":{"description":"Set to true to turn on Assimilation.","type":"boolean","default":true},"port":{"description":"Assimilation communicates with Finsemble\'s HTML services via a WebSocket. Set the port here.","type":"number","default":8392},"useFeaSpawn":{"type":"boolean"},"throttle":{"description":"Windows sends dozens of events per second when a window is moved. This value tells the application how often to collect those events. You might see performance degradations if you set the throttle below 5.","type":"number","default":15},"blacklist":{"type":"array"},"whitelist":{"type":"array"},"onlySpawned":{"description":"This Boolean tells assimilation whether it should restrict its scope to external applications spawned by Finsemble. If true, only applications launched from Finsemble will be controlled. If false, it will try to control the movements of all windows on the desktop.","type":"boolean","default":true},"focusDelay":{"description":"Sets the delay (in milliseconds) between the focus event being received and the actual focusing of the window. This is necessary because the focus event is called simultaneously with minimize/restore events, which causes issues with docking groups.","type":"number","default":30},"eventIgnore":{"description":"Sets the threshold (in milliseconds) from the previous event before which focus/restore events are dropped. Certain sequences of minimize/restore/focus events can create an unwanted loop of events; therefore, restore and focus events are throttled with this property.","type":"number","default":50},"hotkeyTimeout":{"type":"number"},"hideTitleBars":{"description":" Set to true to hide all Finsemble title bars for native applications.","type":"boolean"}}},"workspacesArray":{"title":"workspaces","finsemble:docs":{"rightnav":true},"description":"An array of workspaces to be presented to the user the first time they start Finsemble. By default, the first workspace listed in the array is the one first presented to an end user the first time they load their smart desktop. See <a href=\\"/docs/productivity/Workspaces/\\">instructions on generating default workspaces.</a>","type":"array","items":{"$ref":"#/definitions/workspaceTemplate"}},"workspaceTemplate":{"title":"Workspace Template","description":"Template for config specified workspace","type":"object","properties":{"name":{"type":"string","description":"Name of workspace. This appears in the workspaces menu."},"type":{"private":true,"deprecated":true,"description":"always equals `workspace`","type":"string"},"version":{"private":true,"deprecated":true,"type":"string"},"description":{"private":true,"deprecated":true,"type":"string"},"groups":{"description":"Contains groupings: of snapped windows and also of grouped windows.","$comment":"This format matches the docking system\'s internal store.","type":"object","additionalProperties":{"$ref":"#/definitions/workspaceGroup"}},"windowData":{"$comment":"This is only used when importing or loading a workspace from config. In storage, this data is stored in a separate key for each window.","description":"Launching and positioning data for each window.","type":"array","items":{"$ref":"#/definitions/workspaceWindowData"}},"permanent":{"description":"If set to true, users can\'t delete or rename this workspace.","type":"boolean"},"default":{"description":"If set to true, this workspace is the default that is loaded the first time the app is run","type":"boolean"},"windows":{"description":"The names of the windows in this workspace.","title":"windows","type":"array","items":{"type":"string"}},"components":{"private":true,"deprecated":true,"description":"use windowData","type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"options":{"type":"object","properties":{"top":{"type":"number"},"bottom":{"type":"number"},"left":{"type":"number"},"right":{"type":"number"}}}}}},"componentState":{"private":true,"deprecated":true,"description":"use componentStates","type":"array","items":{"type":"object"}},"guid":{"private":true,"deprecated":true,"type":"string"},"componentStates":{"$comment":"This is only used when importing or loading a workspace from config. In storage, this data is stored in a separate key for each window.","description":"Context state for each window, such as from calls to setComponentState()","type":"object","additionalProperties":{"$ref":"#/definitions/workspaceWindowState"}},"custom":{"description":"Optional field for proprietary data to be associated with this workspace","type":"object","additionalProperties":true}},"required":["name"],"additionalProperties":false},"workspaceGroup":{"description":"Can be either a snapped or grouped collection of windows. For a grouped collection, there is always also a snapped collection that is equivalent or a superset of it (as grouped windows are also snapped together). See each field for distinctions.","type":"object","properties":{"windowNames":{"description":"The names of the windows in this group.","type":"array","items":{"type":"string"}},"isMovable":{"description":"true if a grouped collection, false if a snapped collection.","type":"boolean"},"isAlwaysOnTop":{"description":"true if any window in the collection has aot set to true.","type":"boolean"},"topRightWindow":{"description":"The name of the window in the top right corner. This is used to determine whether to display a minimize button.","type":"string"},"isARectangle":{"description":"true if the windows form a perfect rectangle. Used only if docking is restricted to rectangular collections.","type":"boolean"},"ungroupedAlwaysOnTopState":{"description":"Specifies whether the aot flag is set for each individual window in the collection","additionalProperties":{"type":"boolean"}}}},"workspaceWindowData":{"description":"Launch and position data for a window. This is equivalent to the spawn parameters sent to LauncherClient.spawn(). Note that the defaultLeft, defaultTop, defaultHeight and defaultWidth must all be specified otherwise left, top, height and width will be used. Tab collections will show up as a virtual \'StackedWindow\'.","type":"object","properties":{"componentType":{"description":"The AppId of the window\'s app entry. This will be equal to `StackedWindow` for tab collections.","type":"string"},"windowType":{"description":"The window type. \'WebWindow\', \'NativeWindow\', \'NativeFinsembleWindow\' or \'StackedWindow\' when a tab collection","type":"string"},"name":{"description":"The window name","type":"string"},"alwaysOnTop":{"description":"True if aot is set.","type":"boolean"},"autoShow":{"description":"True if the window should be shown when launched.","type":"boolean"},"minWidth":{"description":"Minimum width (zero if none)","type":"number"},"minHeight":{"description":"Minimum height (zero if none)","type":"number"},"maxWidth":{"description":"Maximum width (8000 if none)","type":"number"},"maxHeight":{"description":"Maximum height (8000 if none)","type":"number"},"resizable":{"description":"True if the window can be resized","type":"boolean"},"maximizable":{"description":"True if the window can be maximized","type":"boolean"},"minimizable":{"description":"True if the window can be minimized","type":"boolean"},"opacity":{"description":"Opacity value (0-1)","type":"number"},"windowState":{"description":"0 - normal, 1 - minimized from normal, 2 - maximized, 3 - minimized from maximized, 4 - transitioning (?). Windows are never saved in maximized state.","type":"number"},"defaultLeft":{"description":"Left position of window in pixels.","type":"number"},"defaultTop":{"description":"Top position of window in pixels relative to the _physical monitor_ (does not consider space claimed by toolbar).","type":"number"},"defaultWidth":{"description":"Width of window in pixels.","type":"number"},"defaultHeight":{"description":"Height of window in pixels.","type":"number"},"left":{"private":true,"description":"Left position of window in pixels.","type":"number"},"top":{"private":true,"description":"Top position of window in pixels relative to available space less the toolbar.","type":"number"},"width":{"private":true,"description":"Width of window in pixels.","type":"number"},"height":{"private":true,"description":"Height of window in pixels.","type":"number"},"right":{"private":true,"description":"Right pixels from monitor edge.","type":"number"},"bottom":{"private":true,"description":"Bottom pixels from monitor edge relative to available space less the toolbar.","type":"number"},"monitorInfo":{"description":"The monitor number on which to place the window.","type":"number"},"showTaskbarIcon":{"description":"True if the windows task bar icon should be displayed. If the window is in a tab collection (stack), only the top window has this set to true.","type":"boolean"},"allowAutoArrange":{"description":"True if the window is allowed to be auto-arranged.","type":"boolean"},"url":{"description":"The url of the window. This can change if the user navigates the page. No required if native window or tab collection.","type":"string"},"transparent":{"description":"True if the window is transparent","type":"boolean"},"affinity":{"description":"The affinity group to which this window belongs.","type":"string"},"path":{"description":"Path of native component to spawn. Can be empty string if no path.","type":"string"},"alias":{"description":"Alias name of native app to spawn, which maps to an entry in the manifest\'s `appAssets` array.","type":"string"},"isWPF":{"description":"True if a native app and is wpf.","type":"boolean"},"childWindowIdentifiers":{"description":"Tab collections only. Contains references to all the windows in the stack.","type":"array","items":{"$ref":"#/definitions/workspaceStackWindowIdentifier"}},"visibleWindowIdentifier":{"description":"Tab collections only. A reference to the visible window in the stack.","$ref":"#/definitions/workspaceStackWindowIdentifier"},"bounds":{"description":"Tab collections only. The bounds of the stack (duplicate of information in windowData).","type":"object","properties":{"top":{"type":"number"},"left":{"type":"number"},"width":{"type":"number"},"height":{"type":"number"},"bottom":{"type":"number"},"right":{"type":"number"},"persistBounds":{"description":"Unused","type":"boolean"}}}}},"workspaceWindowState":{"description":"Stored context for each window in a workspace.","additionalProperties":{"description":"A map of contexts associated with this window. The contexts can be of any form.","type":"object","additionalProperties":true}},"workspaceStackWindowIdentifier":{"description":"An object defining a window inside of a tabbed collection (stack).","type":"object","properties":{"name":{"description":"The name of the window.","type":"string"},"windowName":{"description":"The name of the window.","type":"string"},"windowType":{"description":"Always WebWindow.","type":"string"},"title":{"description":"The title to display in the window. This can come from a user edit.","type":"string"},"alwaysOnTop":{"type":"boolean"}}},"cornerRounding":{"description":"Specifies corner rounding for a window.","type":["boolean","object"],"default":true,"properties":{"width":{"type":"number","default":0},"height":{"type":"number","default":0}}},"foldersAppDefinition":{"description":"Definition for AdvanceAppLauncher application folder.","type":"object","properties":{"icon":{"type":"string"},"type":{"type":"string"},"canDelete":{"type":"boolean"},"apps":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"appID":{"type":"string"}}}}}},"menus":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"align":{"type":"string"},"label":{"type":"string"},"menuType":{"type":"string"},"customData":{"type":"object","properties":{"mode":{"type":"string"},"list":{"type":"array","items:":{"type":"string"}}}},"fontIcon":{"type":"string"},"icon":{"type":"string"}}}},"notification":{"type":"object","description":"For any values on a notification not already set, these default values are set on the Notification object. All fields in here must match those in the INotification interface.","properties":{"type":{"type":"string"},"source":{"type":"string"},"timeout":{"type":"number"},"headerLogo":{"type":"string"},"contentLogo":{"type":"string"},"cssClassName":{"type":"string"},"meta":{"type":"object","additionalProperties":true}},"additionalProperties":false},"notificationType":{"description":"object Type. The values inside this object are applied only to notifications with the property \'type\' set to the key value.","type":"object","properties":{"defaultDismissButtonText":{"description":"Add a dismiss action to the Notification if one is not already set.","type":"string","default":"Dismiss"},"showDismissAction":{"description":"Add a dismiss action to the notification if one does not exists. Default set to false.","type":"boolean","default":false},"defaults":{"$ref":"#/definitions/notification"}},"additionalProperties":false},"stackedWindow":{"description":"Configuration for tabbed and tiled windows.","type":"object","properties":{"addReadyTimeout":{"description":"Sets the time, in milliseconds, for a tabbed/tiled windows to become ready.","type":"number","default":6500}},"additionalProperties":false},"spawnAs":{"type":"string","description":"Valid values are:<br/> \\"window\\" - Spawns the service as a child window of the Service Manager.<br/> \\"process\\" - Spawns the service in its own browser process (a.k.a. application). This gives the service dedicated CPU to maximize concurrency.<br/> \\"script\\" - Spawns the service as a script running in the Service Manager window. This minimizes memory footprint. This setting can only be used with the following services: assimilation, storage, hotkeys, linker, search and workspace.<br />","enum":["window","process","script"]},"securityPolicies":{"title":"securityPolicies","private":true,"description":"FEA security policy","type":"object","properties":{"//trusted":{"type":"string","description":"(deprecated). Comment fields are superseded by json schema comments and will be removed in a future version. See \'trusted\' parameter."},"trusted":{"type":"object","description":"Use Finsemble\'s default \\"trusted\\" policy for apps that are on a trusted domain. By default, the trusted policy allows access to every API endpoint."},"untrusted":{"title":"untrusted","description":"Use Finsemble\'s default \\"untrusted\\" policy for apps that are on external domains.","type":"object","properties":{"System":{"title":"System","type":"object","properties":{"clearCache":{"type":"boolean"},"exit":{"type":"boolean"},"launchExternalProcess":{"type":"boolean"}}},"Window":{"title":"Window","type":"object","properties":{"executeJavaScript":{"type":"boolean"},"webPreferences":{}}}}}}},"securityPolicyRules":{"title":"securityPolicyRules","private":true,"description":"Contains a rule to be applied to a security policy.","type":"object","properties":{"crossDomain":{"type":"string"},"sameDomain":{"type":"string"}}},"contentSecurityPolicy":{"description":"Overwrite the default content security policy for all components. This setting can be superseded by the application level \\"Content-Security-Policy\\" config. See <a href=\\"https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP\\">MDN documentation on CSPs</a>.","type":["array","string"],"items":{"type":"string"},"examples":[["script-src *"]]},"electronAdapter":{"description":"Finsemble\'s Electron Adapter config, dynamically added to manifest.","finsemble:docs":{"rightnav":true},"title":"finsemble-electron-adapter","type":"object","properties":{"manifests":{"description":"Allow the ability to specify manifest environments at run time by adding entries for each environment.","type":"object","examples":[{"manifests":{"dev":"http://localhost:3375/configs/application/manifest-local-dev.json","qa":"http://localhost:3375/configs/application/manifest-local-qa.json"}}]},"logHTTPErrors":{"description":"Set to false to prevent FEA logging of load failures in the 400-599 range.","type":"boolean","default":true},"useDOMBasedMovement":{"deprecated":true,"description":"Set to false to use native window movement with Electron - which is deprecated due to issues it causes with window Aero Shake and mouse events in draggable regions of windows.","type":"boolean"},"contextIsolation":{"private":true,"description":"When set to true, contextIsolation is turned on for e2o.ts preloads.","type":"boolean","default":false},"allowedManifestDomains":{"description":"Allow the ability to specify manifest urls at run time by setting the allowed domains where the hostname matches one of the entries. Every subdomain needs an entry. Wildcards are not allowed.","type":"array","items":{"type":"string"},"examples":[{"allowedManifestDomains":["finsemble.com","cosaic.io"]}]},"allowedBrowserProtocols":{"description":"(experimental) When calling System.openUrlWithBrowser, only URLs with `http:` and `https:` protocols are permitted for system security. Others that are needed can be added here. A `file:` protocol is a security risk and you should not add it.","type":"array","items":{"type":"string"},"examples":[["http:","https:","fsbl:","mailto:"]]},"reloadWindowHotkey":{"description":"(experimental) Allow a user to disable or override the hotkey for window reload. Set to false to disable or to an [Electron Accelerator string](https://www.electronjs.org/docs/latest/api/accelerator) to override.","type":["boolean","string"]},"reloadWindowIgnoringCacheHotkey":{"description":"(experimental) Allow a user to disable or override the hotkey for forcing window reload. Set to false to disable or to an [Electron Accelerator string](https://www.electronjs.org/docs/latest/api/accelerator) to override.","type":["boolean","string"]},"toggleInspectorHotkey":{"description":"(experimental) Allow a user to disable or override the hotkey to toggle the developer tools window. Set to false to disable or to an [Electron Accelerator string](https://www.electronjs.org/docs/latest/api/accelerator) to override.","type":["boolean","string"]},"logger":{"type":"object","description":"Configuration for logging of low-level events, such as window creation or network requests, from the Finsemble Electron Adapter. Log messages can be written to a rotated file at %AppData%/Roaming/Electron/logs, or output to the console. They can also be transmitted to the Finsemble Central Logger allowing them to be reviewed alongside logging from Finsemble and applications running in Finsemble.","properties":{"logLevel":{"type":"string","default":"debug","description":"The lowest level at which the logger pushes messages to a file. Available log levels from highest to lowest are: \'error\', \'warn\', \'log\',\'info\', \'debug\', and \'verbose\'. Note: This level is set after the manifest is read by the Electron Adapter. As a result, you might see some debug messages before the log level is set.","enum":["error","warn","log","info","debug","verbose"]},"logToDiskLevels":{"ref":"#/definitions/logToDiskLevels"},"transports":{"type":"object","description":"Transport level configuration.","properties":{"console":{"type":"object","description":"The console transport controls where logs are output.","properties":{"enable":{"type":"boolean","default":false,"description":"When set to true, logs are output to a terminal. When set to false, logs are output to file. See `logger` above."}}}}},"transmitToCentralLogger":{"description":"Set to \'false\' to disable sending Electron Adapters logs in the Central Logger. The log levels transmitted are managed in the central logger UI and are independent of the log levels configured for logging to file.","type":"boolean","default":true},"resourceUsageLogInterval":{"description":"Interval. in milliseconds, to log MainSystem.GetProcessList(). Useful for performance troubleshooting. Set to any negative number to disable logging.","type":"number","default":60000}}},"downloadUpdatesViaElectron":{"type":"boolean","default":true,"description":"Downloads the Electron/Squirrel autoUpdate packages to the local machine before checking for and performing updates. The files are downloaded using the same proxy and headers Electron uses."},"ignoreCertificateErrorHosts":{"description":"Certificate errors (SSL/TLS) are ignored for these hosts or URLs. Useful when using self-signed TLS certificates.","type":"array","items":{"type":"string"},"examples":[{"ignoreCertificateErrorHosts":["https://github.com:80/ChartIQ","self-signed.badssl.com"]}]},"env-allowlist":{"description":"Adds ability to specify Finsemble manifest macros based on environment variables.","type":"array","items":{"type":"string"},"examples":[{"env-allowlist":["TESTVAR","ANOTHERVAR"]}]},"forceCloseGone":{"description":"If true, force closes windows when the \\"render-process-gone\\" event triggers.","type":"boolean","default":false},"forceCloseUnresponsive":{"description":"If true, force closes windows when the \\"unresponsive\\" event triggers.","type":"boolean","default":false}}},"logToDiskLevels":{"description":"Specifies which logger levels should be sent from central logger to the FEA log. Helpful in debugging. You must configure this value in your manifest (that is, manifest-local.json, not in config.json).","type":"array","items":{"type":"string","enum":["error","warn","info","log","debug","verbose"]}},"loggerClientLogLevels":{"description":"Sets the default logging state of each client in the Central Logger if no previous state is found.","type":"object","properties":{"Error":{"description":"Set to \'true\' to see \'Error\' as a default client logging level.","type":"boolean","default":true},"Warn":{"description":"Set \'true\' to see \'Warn\' as a default client logging level.","type":"boolean","default":true},"Info":{"description":"Set to \'true\' to see \'Info\' as a default client logging level.","type":"boolean","default":false},"Log":{"description":"Set to \'true\' to see \'Log\' as a default client logging level.","type":"boolean","default":true},"Debug":{"description":"Set to \'true\' to see \'Debug\' as a default client logging level.","type":"boolean","default":false},"Verbose":{"description":"Set to \'true\' to see \'Verbose\' as a default client logging level","type":"boolean","default":false},"LocalOnly":{"description":"Set to \'true\' to see \'LocalOnly\' as a default client logging level.","type":"boolean","default":false}}},"logger":{"title":"Logger configuration","type":"object","properties":{"defaultClientLogLevels":{"ref":"#/definitions/loggerClientLogLevels"},"logToDiskLevels":{"deprecated":true,"replaceWith":"finsemble-electron-adapter.logger.logToDiskLevels","ref":"#/definitions/logToDiskLevels"},"allowNativeErrorNotifications":{"description":"Set to \'true\' to allow electron.Notifications for FEA errors.","type":"boolean","default":false}}},"deprecatedConfig":{"finsemble:docs":{"halt":true},"type":"array","private":true,"description":"Contains operations to handle deprecated config.","examples":[[{"versionDeprecated":"5.1","operation":"logMessage","description":"Example of only logging message for deprecated config.","property":"finsemble.logger.defaultClientLogLevels.Info","userMessage":"Please upgrade property to new config schema.","userMessageType":"error"},{"versionDeprecated":"5.1","operation":"removeProperty","description":"Example of removing a deprecated property.","property":"finsemble.testXYZ","userMessageType":"error"},{"versionDeprecated":"5.1","operation":"setValue","description":"Example of updating a specific value to a new specific value.","property":"finsemble.unknownComponent","ifOldValue":"nonConfiguredComponent","newValue":"unknownComponent","userMessage":"Upgrade to new config schema.","userMessageType":"warn"},{"versionDeprecated":"5.1","operation":"moveProperty","description":"Renames a leave property.","oldProperty":"finsemble.servicesConfig.launcher.staggerPixels","newProperty":"finsemble.servicesConfig.launcher.windowStaggerOffset","userMessage":"Upgrade to new config schema."},{"versionDeprecated":"5.1","operation":"moveProperty","oldProperty":"finsemble.components.*.window.url","newProperty":"finsemble.components.*.window.uri","description":"A set of object properties can be referenced with wildcards.","removeOld":false,"userMessageType":"error"},{"versionDeprecated":"5.1","operation":"moveProperty","oldProperty":"finsemble.components.*.foreign.services.*.allowAutoArrange","newProperty":"finsemble.components.*.foreign.services.*.autoArrangeEnabled","description":"You can use multiple wildcards.","removeOld":false,"userMessageType":"error","when":{"bootConfig":false,"mainConfig":true,"dynamicConfig":false}}]],"items":{"type":"object","description":"List of run-time operations to migrate deprecated config.","required":["versionDeprecated","operation"],"properties":{"versionDeprecated":{"type":"string","description":"The Finsemble version the property was deprecated under."},"operation":{"type":"string","enum":["logMessage","setValue","removeProperty","moveProperty","migrateAppDFDC320"],"title":"The operation schema","description":"the operation to perform."},"description":{"type":"string","description":"For additional info to describe the deprecated-config operation."},"property":{"type":"string","description":"For logMessage, setValue, and removeProperty this contains the property path to operate on."},"oldProperty":{"type":"string","description":"For moveProperty, this contains the source path of the deprecatedProperty to move. Wildcards within the path."},"newProperty":{"type":"string","description":"For moveProperty, this contains the target path that oldProperty will be moved to."},"removeOld":{"type":"boolean","description":"For moveProperty, if true, remove oldProperty after moving to new. Use false if customer code references old config location (which should be rare).","default":true},"clone":{"type":"boolean","description":"For moveProperty, if true, clone oldProperty before moving to new. Only set to false if removeOld is false and value change dynamically.","default":false},"userMessage":{"type":"string","description":"Additional log message to explain the handling of this deprecated config."},"userMessageType":{"type":"string","enum":["error","warn","log"],"description":"The log type to use when logging this operation.","default":"warn"},"when":{"type":"object","description":"When within Finsemble the operation should be invoked.","required":["bootConfig","mainConfig","dynamicConfig"],"properties":{"bootConfig":{"type":"boolean","description":"If true, invoke before bootConfig is validated in the System Manager.","default":true},"mainConfig":{"type":"boolean","description":"If true, invoke before full config is validated in the Config Service.","default":true},"dynamicConfig":{"type":"boolean","description":"if true, invoke after dynamical config is added within the Config Service, but before revalidation.","default":true}}}}}},"disableWMICalls":{"deprecated":true,"description":"When set to true, Finsemble will not make calls that require Windows Management Instrumentation Command-line (WMIC). This option fills GPU information for the getHostSpecs method and will be removed in a future version.","type":"boolean","default":true},"splashScreenTimeout":{"$comment":"DO NOT REMOVE THIS UNTIL 7.x is no longer in production because it will cause JSON validation errors during boot","title":"Splash screen timeout","deprecated":true,"description":"Amount of time, in milliseconds, to show the splash screen. The default value 0 causes the splash screen to hide in the `user` stage. This is after the UI Components have loaded and the same time that Workspace components start loading. If you set it to a negative number, you must call `FSBL.System.hideSplashScreen()` in a component when you want to hide the splash screen.","type":"number"},"splashScreenImage":{"title":"Splash screen image","description":"URL of the splash screen when starting Finsemble. The URL can point to either an HTML page or to an SVG file. Both HTML and SVG splash screens support transparency. Use an HTML splash screen if you want to use a .PNG image with transparent background or want more flexibility in styling or animating your splash screen. This image will remain on the screen until the user phase, unless an auth component is spawned or unless you call FSBL.System.hideSplashScreen() manually.","type":"string","default":"http://localhost:3375/assets/img/FinsembleSplash.svg"},"splashScreenOptions":{"title":"Splash screen options","description":"Splash screen options properties options that can be used to customize its UI. It can take any BrowserWindowConstructorOptions properties.","type":"object"},"spawnOptions":{"title":"Spawn Options","description":"Minimal definition for component spawn options","type":"object","properties":{"top":{"type":["number","string"]},"left":{"type":["number","string"]},"height":{"type":["number","string"]},"width":{"type":["number","string"]},"data":{"type":"object"}}},"toolbarMenus":{"type":"object","description":"Optional configuration for custom launcher menus on the Finsemble Toolbar","finsemble:docs":{"rightnav":true},"properties":{},"additionalProperties":{"$ref":"#/definitions/toolbarMenu"}},"toolbarMenu":{"type":"object","description":"Toolbar menu entries provide configuration for an individual menu","properties":{"displayName":{"type":"string","description":"The name of the menu, to be displayed on the toolbar"},"applications":{"type":"array","items":{"type":"string","description":"An array of application names, as defined in the appD configuration, to include in the menu."}},"position":{"type":"number","description":"Used to sort menus into order on the Toolbar (higher position values are displayed further to the right)."}}},"preloads":{"type":"array","items":{"type":"object","properties":{"alias":{"type":"string"},"url":{"type":"string"}}}},"extensions":{"description":"Register preload extensions for Finsemble apps.","type":"object","properties":{"preloads":{"description":"Registered aliases and details for preloads.","type":"object","additionalProperties":{"description":"Preload alias","type":"object","properties":{"url":{"description":"The URL of the hosted preload.","type":"string"},"autoload":{"description":"Specifies whether to automatically apply the preload to all or all launchable apps.","enum":["all","launchable","none"],"default":"none"}}},"examples":[{"zoom":{"url":"https://assets.finsemble.com/preloads/zoom.js","autoload":"launchable"}}]}}},"trustedPreloads":{"type":"array","items":{"type":"string"}},"windowTitleBarUrl":{"description":"Set to the location of the transpiled window title bar code (.js and .html files) based on Finsemble\'s WindowTitlebar template. That code is injected (js file) or used to create a titlebar window shell (html file) depending on titlebar configurations for each app. Leave this field undefined to use Finsemble\'s built-in titlebar. When creating a custom titlebar, point this to the directory containing your custom title bar. Your directory should include an \'index.js\' and \'index.html\' file. This is done automatically in most cases.","type":"string"}}}'),Ie=e=>{return`${e.minute} ${e.hour} * * ${t=e.dayOfWeek,!1===t||void 0===t?"*":t.toString()}`;var t},_e={splashScreenImage:"$documentRoot/assets/img/FinsembleSplash.png",finsemble:{documentRoot:"../../",applicationRoot:"$documentRoot/build",configRoot:"$documentRoot/configs",moduleRoot:"$applicationRoot/finsemble",servicesRoot:"$moduleRoot/services",configSchemaURL:"$moduleRoot/configs/schemas/finsemble.schema.json",systemTrayIcon:"$documentRoot/assets/img/Finsemble_SystemTray_Icon.png"},startup_app:{applicationIcon:"$documentRoot/assets/img/Finsemble_Taskbar_Icon.png"}},Fe=(e,t,i)=>{if(1!==e.length)if("*"===e[0])Object.keys(t).forEach(n=>{Fe(e.slice(1),t[n],i)});else{if(t[e[0]]||(t[e[0]]={}),Array.isArray(t[e[0]]))return void Object.values(t[e[0]]).forEach(t=>{Fe(e.slice(1),t,i)});if("object"!=typeof t[e[0]])return;Fe(e.slice(1),t[e[0]],i)}else{if("*"===e[0])return;if("object"!=typeof t)return;void 0===t[e[0]]&&(t[e[0]]=i)}},Pe=(e,t,i)=>{if(!e)return t;let n=t;if("string"==typeof t&&(null==t?void 0:t.length)&&"$"!==t.charAt(0))try{n=new URL(t,e).href,n=n.replace(/([^:]\/)\/+/g,"$1"),"/"===n.slice(-1)[0]&&(n=n.slice(0,-1))}catch(e){return i.error(e),t}return n},xe=(e,t)=>{if(!e)return e;const i=(e=>{var t;try{const i=new URL(e).pathname.replace(/^.*[\\/]/,""),n=null!==(t=i.split(".").pop())&&void 0!==t?t:null;return n===i?null:n}catch(e){return null}})(e);return i?`${e.substr(0,e.lastIndexOf("."))}.${t}`:`${e.replace(/\/?$/,"/")}index.${t}`};class Re{constructor(e,t,i){this.glue=e,this.logger=t,this.finsembleServiceContext=i,this.schema=r()({},Ae),this.config={},this.macros={},this.gate=new d}async updateContext(){var e,t,i,n;const o={...this.config,finsemble:{...this.config.finsemble}};delete o.finsemble.apps,delete o.finsemble.components,await this.glue.contexts.set(c,o),await this.glue.contexts.set("$FINSEMBLECONFIGAPPS",{finsemble:{apps:null===(t=null===(e=this.config)||void 0===e?void 0:e.finsemble)||void 0===t?void 0:t.apps,components:null===(n=null===(i=this.config)||void 0===i?void 0:i.finsemble)||void 0===n?void 0:n.components}})}normalizeSchema(){P(this.schema,({obj:e,key:t,value:i})=>{if("$ref"===t){const n=i.split("#/definitions/").pop();delete e[t],this.schema.definitions[n]&&Object.entries(this.schema.definitions[n]).forEach(t=>{e[t[0]]=t[1]})}}),delete this.schema.definitions}async recursiveLoadImport(e,t,i){if(this.logger.debug("config - recursiveLoadImport"),!e)return[];let n=[];const{err:o,data:a}=await(async(e,t)=>{let i,n=null;try{const t=await globalThis.fetch(e,{credentials:"same-origin",cache:"no-cache"});200!==t.status?n=`config - HTTP get error for ${e}: ${t.status} ${t.statusText}`:i=await t.json()}catch(i){n=`config - Failure fetching config from ${e} ${i.toString()}`,t.error(n,i)}return{err:n,data:i}})(e,i);return!o&&a?(this.config=r()(this.config,t?a:{finsemble:a},{customMerge:e=>{if("workspaces"===e)return(e,t)=>t}}),n=await this.processConfig(i,this.finsembleServiceContext.manifestURL)):o&&n.push(o.toString()),n}dupAppsToComponents(){var e;this.config.finsemble.components=null!==(e=this.config.finsemble.components)&&void 0!==e?e:{},this.config.finsemble.apps.forEach(e=>{var t,i;this.config.finsemble.components[e.appId]=null!==(i=null===(t=e.hostManifests)||void 0===t?void 0:t.Finsemble)&&void 0!==i?i:{}})}async processConfig(e,t){var i,n,o,a;this.macros=((e,t,i)=>{t.debug("config - computeManifestMacros");let n={};return(()=>{var o,a;n={};const s=r().all([{},null==e?void 0:e.finsemble,null!==(a=null===(o=null==e?void 0:e.finsemble)||void 0===o?void 0:o.custom)&&void 0!==a?a:{}]);Object.entries(s).forEach(e=>{const[o,r]=e;var a;"string"==typeof r&&"$schema"!==r&&("about:blank"===(a=r)||new RegExp("^(https?:\\/\\/)((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.?)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?)?([;&a-z\\d\\/#\\?%_.~+=-]*)?","i").test(a)?n[`$${o}`]=Pe(i,r,t):n[`$${o}`]=r)})})(),(()=>{var t,i;const o=globalThis;(null!==(i=null===(t=e["finsemble-electron-adapter"])||void 0===t?void 0:t["env-allowlist"])&&void 0!==i?i:[]).forEach(e=>{var t;return n[`$${e}`]=null===(t=o.glue42gd)||void 0===t?void 0:t.env[e]})})(),t.debug("config - computeManifestMacros=",n),n})(this.config,e,t),this.config=((e,t,i=ne)=>{i.debug("config - processManifestMacros");const n=t=>{let i=t;if("string"==typeof t){const t=Object.entries(e).length;for(let n=0;n<t;n++){let t=!1;if(Object.entries(e).forEach(e=>{const[n,o]=e;i.includes(n)&&(i=i.replace(n,o),t=!0)}),!t)break}}return i};return P(t,({obj:e,key:t,value:i})=>{if("string"==typeof i){const o=n(i);e[t]=o}else Array.isArray(i)&&(e[t]=i.map(e=>n(e)))}),t})(this.macros,this.config,e);const s=null!==(o=null===(n=null===(i=this.config.finsemble)||void 0===i?void 0:i.importConfig)||void 0===n?void 0:n.map(i=>this.recursiveLoadImport(Pe(t,i,e),!1,e)))&&void 0!==o?o:[];return null===(a=this.config.finsemble)||void 0===a||delete a.importConfig,(await Promise.allSettled(s)).flatMap(e=>"fulfilled"===e.status?e.value:e.reason)}async finalProcessingPass({appIds:e,additionalApps:t=[]}){var i,n;this.config.finsemble.apps=null!==(i=this.config.finsemble.apps)&&void 0!==i?i:[],this.logger.debug("config - Apps to be converted (from Finsemble apps.json format)",this.config.finsemble.apps),this.logger.debug("config - finalProcessingPass: filterUnusedComponents"),(e=>{var t;const i=["bloombergBridgeService","LinkerWindow","QuickComponentForm","NonConfiguredComponent","DockingGroupMask","ProcessMonitor","Download Manager","AppCatalog","HighlightScrim","FDC3Resolver","NotificationsCenter","NotificationsToasts"];(null===(t=null==e?void 0:e.finsemble)||void 0===t?void 0:t.components)&&(e.finsemble.components=f(e.finsemble.components,(e,t)=>i.includes(e)?[]:[[e,t]]))})(this.config),this.logger.debug("config - finalProcessingPass: expandConfig"),(e=>{var t,i,n,o,a,s,l,c;e&&(Object.entries(null!==(i=null===(t=null==e?void 0:e.finsemble)||void 0===t?void 0:t.appd)&&void 0!==i?i:{}).forEach(t=>{var i;const n=t[1];e.finsemble.apps=(null!==(i=e.finsemble.apps)&&void 0!==i?i:[]).concat(n)}),null===(n=null==e?void 0:e.finsemble)||void 0===n||delete n.appd,Object.entries(null!==(a=null===(o=null==e?void 0:e.finsemble)||void 0===o?void 0:o.components)&&void 0!==a?a:{}).forEach(t=>{const[i,n]=t;e.finsemble.components[i]=r()(re,n)}),null===(c=null!==(l=null===(s=null==e?void 0:e.finsemble)||void 0===s?void 0:s.apps)&&void 0!==l?l:[])||void 0===c||c.forEach((t,i)=>{var n,o;t.manifest&&(t=e.finsemble.apps[i]=ee(t)),(null===(o=null===(n=t.hostManifests)||void 0===n?void 0:n.Finsemble)||void 0===o?void 0:o.appService)&&(e.finsemble.apps[i]=r()(ae,t))}))})(this.config),this.logger.debug("config - finalProcessingPass: applyDefaults"),((e,t)=>{if(!t)return;const i=(e,n,o,r)=>{var a;n.has(o)||(n.add(o),o.default&&r&&Fe(e,t,o.default),o.properties&&Object.entries(o.properties).forEach(t=>{var a;const[s,l]=t;i(e.concat(s),new Set(n),l,null!==(a=o.forceDefaults)&&void 0!==a?a:r)}),"object"==typeof o.additionalProperties&&Object.entries(null!==(a=o.additionalProperties.properties)&&void 0!==a?a:{}).forEach(t=>{var a;const[,s]=t;i(e.concat("*"),new Set(n),s,null!==(a=o.additionalProperties.forceDefaults)&&void 0!==a?a:r)}))};i([],new Set,e,!0)})(this.schema,this.config),this.logger.debug("config - finalProcessingPass: configToGlue",e);const o=((e,t,i,n)=>{var o,r,a,s,l;if(!i)return[];const c=n?(null!==(r=null===(o=i.finsemble)||void 0===o?void 0:o.apps)&&void 0!==r?r:[]).filter(e=>n.includes(e.appId)):null===(a=i.finsemble)||void 0===a?void 0:a.apps,d=((e,t,i,n)=>{if(!n)return[];const o=[];for(const[r,a]of Object.entries(n)){const{data:n}=ue(e,t,r,i,a);n&&o.push(n)}return o})(e,t,i,n?f(null===(s=i.finsemble)||void 0===s?void 0:s.components,e=>n.includes(e.name)?[e.name]:[]):null===(l=i.finsemble)||void 0===l?void 0:l.components),p=((e,t,i,n)=>{if(!n)return[];const o=[];for(const r of n){const{data:n}=he(e,t,r,i);n&&o.push(n)}return(e=>{e.forEach(t=>{const{name:i}=t;e.some(e=>{var t,n,o,r,a,s;return(null!==(s=null===(a=null===(r=null===(o=null===(n=null===(t=e.customProperties)||void 0===t?void 0:t.appd)||void 0===n?void 0:n.hostManifests)||void 0===o?void 0:o.Finsemble)||void 0===r?void 0:r.bootParams)||void 0===a?void 0:a.dependencies)&&void 0!==s?s:[]).includes(i)})&&"object"==typeof t.runPriority&&t.runPriority.priority&&t.runPriority.priority++})})(o),o})(e,t,i,c),u=d.concat(p);return(async(e,t,i)=>{i.forEach(async i=>{var n,o,r,a,s;const l=null===(s=null===(a=null===(r=null===(o=null===(n=i.customProperties)||void 0===n?void 0:n.appd)||void 0===o?void 0:o.hostManifests)||void 0===r?void 0:r.Finsemble)||void 0===a?void 0:a.component)||void 0===s?void 0:s.spawnOnHotkey;if(l){const{name:n}=i,o=ie(l);t.debug(`config - Adding spawnOnHotkey ${o} = ${n}`),e.hotkeys.register(o,async()=>{const i=e.appManager.application(n);if(i){const{err:e}=await m(()=>i.start());e&&t.error(`config - Error spawning ${n} from hotkey ${o}`,e)}})}})})(e,t,u),u})(this.glue,this.logger,this.config,e).concat(t);this.logger.debug("config - Apps added by config service",o);const{err:a,data:s}=await m(()=>this.glue.appManager.inMemory.import(o,"merge"));this.logger.debug("config - Finished inMemory import");const l=a?[a]:null!==(n=null==s?void 0:s.errors.map(e=>e.app+" : "+e.error))&&void 0!==n?n:[];this.logger.debug("config - finalProcessingPass: dupAppsToComponents"),this.dupAppsToComponents(),this.updateContext(),this.glue.contexts.set("$FINSEMBLEMACROS",this.macros);const c=l.length?l.join("\n"):null;return c&&this.logger.error("config - finalProcessingPath error from configToGlue",l),{err:c}}async additionalIOCDApps(){var e;const t=null===(e=this.config.finsemble)||void 0===e?void 0:e.decoratorWindowUrl,i={name:"web-group-application",title:"Web group native implementation",type:"webGroup",disabled:!1,hidden:!0,captureErrors:!0,details:{url:xe(t,"html")}};i.details.url||delete i.details.url;const n={title:"Enter PostSSO Stage",type:"window",name:"EnterPostSSOStage",hidden:!0,ignoreSavedLayout:!0,ignoreFromLayouts:!0,service:!1,autoStart:!0,runPriority:{stage:"post-sso",priority:8e3,waitForInitialization:!0},details:{url:new URL("../enterBootStage/index.html",window.location.href).href,isSticky:!1,height:200,width:200,left:200,top:200,hidden:!0,mode:"html",channelSelector:{enabled:!1},allowFeedback:!1,allowClose:!1,allowMinimize:!1,allowMaximize:!1,context:{stage:"post-sso"}}},o=[n,{...n,title:"Enter User Stage",name:"EnterUserStage",runPriority:{stage:"post-sso",priority:1,waitForInitialization:!0},details:{...n.details,left:600,context:{stage:"user"}}}];return t&&o.push(i),this.logger.debug("config - additionalIOCDApps",o),{data:o}}async loadConfigAtBoot(e){var t;const i=e=>e.endsWith("/")?e.slice(0,-1):e,{manifestURL:n}=this.finsembleServiceContext,{documentRoot:o=i(new URL("../..",n).href)}=this.finsembleServiceContext;this.logger.debug("config - documentRoot",o);const a={finsemble:r().all([be,Se,Ce,ke,Te])};this.config=r().all([_e,a]),delete this.config.finsemble.importConfig,this.config.finsemble.documentRoot=o,e.info(`config - Loading manifest from ${this.finsembleServiceContext.manifestURL}`);const s=await this.recursiveLoadImport(this.finsembleServiceContext.manifestURL,!0,e),{err:l,data:c}=await this.additionalIOCDApps(),{err:d}=await this.finalProcessingPass({additionalApps:c});return{err:(null!==(t=null!=d?d:l)&&void 0!==t?t:s.length)?s.join("\n"):null}}processMacros(e){const t=e=>(Object.keys(this.macros).forEach(t=>{e=e.replace(t,this.macros[t])}),e),i=e=>{if(Array.isArray(e))return e.map(e=>i(e));if("object"==typeof e){const t=y(e);return f(t,(e,t)=>[[e,i(t)]])}return"string"==typeof e?t(e):e},n=i(e);Object.keys(n).forEach(t=>{e[t]=n[t]})}listenForAddApp(){this.glue.interop.register("FSBL.Clients.AppsClient.addApps",p(async(e,t)=>{this.logger.debug("config - FSBL.Clients.AppsClient.addApps start. Waiting at gate."),await this.gate.wait(async()=>{this.logger.debug("config - FSBL.Clients.AppsClient.addApps through gate"),e.apps.forEach(e=>{var t;this.processMacros(e),this.config.finsemble.apps=(null!==(t=this.config.finsemble.apps)&&void 0!==t?t:[]).filter(t=>t.appId!==e.appId).concat(e)}),await this.finalProcessingPass({appIds:e.apps.map(e=>e.appId)}),this.logger.debug("config - FSBL.Clients.AppsClient.addApps end")})},this.logger))}listenForRemoveApp(){this.glue.interop.register("FSBL.Clients.AppsClient.removeApps",p(async(e,t)=>{this.logger.debug("config - FSBL.Clients.AppsClient.removeApps start"),this.config.finsemble.apps=this.config.finsemble.apps.filter(t=>!e.appIds.some(e=>e===t.appId)),e.appIds.forEach(e=>{var t;null===(t=this.config.finsemble.components)||void 0===t||delete t[e]}),await this.updateContext(),this.logger.debug("config - FSBL.Clients.AppsClient.removeApps end")},this.logger))}listenForProcessAndSet(){this.glue.interop.register("FSBL.Clients.ConfigClient.processAndSet",p(async(e,t)=>{var i,n,o;this.logger.debug("config - FSBL.Clients.AppsClient.processAndSet start"),console.debug("config - Received processAndSet",e);const{newConfig:a,replace:s,overwrite:l}=e,{manifestURL:c}=await(null===(i=this.glue.windows.my())||void 0===i?void 0:i.getContext());if(a.appd){const e=(e=>{const t=[];return Object.values(e).forEach(e=>{t.push(ee(e))}),t})(a.appd);delete a.appd,a.apps=[...null!==(n=a.apps)&&void 0!==n?n:[],...e]}const d=(null!==(o=a.apps)&&void 0!==o?o:[]).map(e=>e.appId);if(s){const e=await this.glue.appManager.getConfigurations();await h(e,async e=>{var t,i,n;if((null===(t=e.customProperties)||void 0===t?void 0:t.appd)&&!(null===(n=null===(i=e.customProperties.appd.hostManifests)||void 0===i?void 0:i.finsemble)||void 0===n?void 0:n.appService)){const{appId:t}=e.customProperties.appd,{err:i}=await m(()=>this.glue.appManager.inMemory.remove(t));i&&this.logger.error("listenForProcessAndSet",i),this.config.finsemble.apps=this.config.finsemble.apps.filter(e=>e.appId!==t)}})}else if(l)await h(d,async e=>{const{err:t}=await m(()=>this.glue.appManager.inMemory.remove(e));t&&this.logger.error("listenForProcessAndSet",t),this.config.finsemble.apps=this.config.finsemble.apps.filter(t=>t.appId!==e)});else if(this.config.finsemble.apps.some(e=>d.includes(e.appId)))return{err:"processAndSet() contains duplicate app entries but overwrite and replace flags are both false"};console.debug("config - processAndSet: config after removals",this.config),this.config.finsemble=r()(this.config.finsemble,a,{arrayMerge:(e,t,i)=>(null!=e?e:[]).concat(t)}),console.debug("config - processAndSet: config after deepmerge",this.config);const p=await this.processConfig(this.logger,c),{err:u}=await this.finalProcessingPass({appIds:d});return this.logger.debug("config - processAndSet: apps after final processing pass (see devtools for more debugging)",this.config.finsemble.apps.map(e=>e.appId)),console.debug("config - processAndSet: config after final processing pass",this.config),this.logger.debug("config - FSBL.Clients.AppsClient.processAndSet end"),{err:(null!=u?u:p.length)?p.join("\n"):null,data:this.config.finsemble}},this.logger))}async maybeSetScheduledShutdownAndRestart(){const e=await(async e=>{var t,i,n,o,r,a,s,l,d;const p=null!==(t=await e.contexts.get(c))&&void 0!==t?t:{},{data:u}=await m(()=>e.prefs.get("IO.Global.FinsemblePreferences")),h=null!==(i=null==u?void 0:u.data)&&void 0!==i?i:{};return null===(d=null!==(r=null!==(n=null==h?void 0:h["finsemble.scheduledCloseDiscardUnsavedChanges"])&&void 0!==n?n:null===(o=null==p?void 0:p.finsemble)||void 0===o?void 0:o.scheduledCloseDiscardUnsavedChanges)&&void 0!==r?r:null===(l=null===(s=null===(a=null==p?void 0:p.finsemble)||void 0===a?void 0:a.servicesConfig)||void 0===s?void 0:s.workspace)||void 0===l?void 0:l.discardUnsavedChanges)||void 0===d||d})(this.glue);await(async(e,t,i)=>{const n=await(async e=>{var t,i,n,o,r,a;const s=null!==(t=await e.contexts.get(c))&&void 0!==t?t:{},{data:l}=await m(()=>e.prefs.get("IO.Global.FinsemblePreferences")),d=null!==(i=null==l?void 0:l.data)&&void 0!==i?i:{},p=null!==(n=null==d?void 0:d["finsemble.scheduledShutdown"])&&void 0!==n?n:null===(o=null==s?void 0:s.finsemble)||void 0===o?void 0:o.scheduledShutdown,u=null!==(r=null==d?void 0:d["finsemble.scheduledRestart"])&&void 0!==r?r:null===(a=null==s?void 0:s.finsemble)||void 0===a?void 0:a.scheduledRestart;return{shutdown:p?Ie(p):void 0,restart:u?Ie(u):void 0}})(e);if(n.shutdown){const o=n.shutdown;i("scheduledCloseDiscardUnsavedChanges","start",{command:"shutdown",cronTime:o,discardUnsavedLayoutChanges:t});const{err:r}=await v(()=>e.interop.invoke("T42.GD.Execute",{command:"schedule-shutdown",args:{cronTime:o,title:"shutdown",message:"Are you sure you want to shutdown?",timerDuration:60,discardUnsavedLayoutChanges:t}}));r&&i("scheduledCloseDiscardUnsavedChanges","error",r.toString())}if(n.restart){const o=n.restart;i("scheduledCloseDiscardUnsavedChanges","start",{command:"restart",cronTime:o,discardUnsavedLayoutChanges:t});const{err:r}=await v(()=>e.interop.invoke("T42.GD.Execute",{command:"schedule-restart",args:{cronTime:o,title:"restart",message:"Are you sure you want to restart?",timerDuration:60,discardUnsavedLayoutChanges:t}}));r&&i("scheduledCloseDiscardUnsavedChanges","error",r.toString())}})(this.glue,e,(...e)=>this.logger.info(...e))}async start(){this.normalizeSchema();const{err:e}=await this.loadConfigAtBoot(this.logger);this.logger.debug("config - Initial set of apps loaded from Finsemble config"),e&&this.logger.error("config - Error starting config service: ",e.toString()),this.listenForProcessAndSet(),this.listenForAddApp(),this.listenForRemoveApp()}}class Le{constructor(e,t,i){this.glue=e,this.logger=t,this.router=i,this.eventHandlers={}}async triggerEventHandlers({event:e,workspaceName:t},i){var n,o,r;const a=[];if(!this.eventHandlers[e])return{data:a};const s=this.glue.interop.methods();this.eventHandlers[e]=this.eventHandlers[e].filter(e=>s.some(t=>t.name===e));for(const s of this.eventHandlers[e]){this.logger.debug(`workspaces - WorkspaceClient.triggerEventHandlers ${e} ${t}`,`From ${i}`,s);const{data:l}=await m(()=>this.glue.layouts.get(t,"Global")),c=l?M(l):{name:t,version:"1.0.0",type:"workspace",groups:{},windows:[]},{err:d,data:p,invocationResult:u}=await v(()=>this.glue.interop.invoke(s,c));if(d||!p)return this.logger.error("workspaces - WorkspaceClient.triggerEventHandlers error",null==d?void 0:d.toString()),{err:d};this.logger.debug(`workspaces - WorkspaceClient.triggerEventHandlers ${e} ${t}`,`Handled by ${null===(n=null==u?void 0:u.executed_by)||void 0===n?void 0:n.applicationName}`,p);const h=(null==p?void 0:p.newData)?j(t,p.newData,null!==(r=null===(o=null==l?void 0:l.metadata)||void 0===o?void 0:o["iop#position"])&&void 0!==r?r:0):null;h&&this.logger.debug(`workspaces - WorkspaceClient.triggerEventHandlers ${e} ${t} modified layout=`,h),a.push({action:null==p?void 0:p.action,newData:h})}return{data:a}}async workspaceEventRelay(){await this.glue.interop.register("FSBL.Clients.WorkspaceClient.addEventListener",p(({event:e,uuid:t},i)=>{this.logger.debug(`workspaces - WorkspaceClient.addEventListener ${e}`,i.applicationName,t),this.eventHandlers[e]||(this.eventHandlers[e]=[]),this.eventHandlers[e].push(t)},this.logger)),await this.glue.interop.register("FSBL.Clients.WorkspaceClient.removeEventListener",p(({event:e,uuid:t},i)=>{var n;if(this.logger.debug(`workspaces - WorkspaceClient.removeEventListener ${this.eventHandlers[e]}`,i.applicationName,e),(null===(n=this.eventHandlers[e])||void 0===n?void 0:n.length)>0){const i=this.eventHandlers[e].indexOf(t);i>=0&&this.eventHandlers[e].splice(i,1)}0===this.eventHandlers[e].length&&delete this.eventHandlers[e]},this.logger)),await this.glue.interop.register("FSBL.Clients.WorkspaceClient.triggerEventHandlers",p(async(e,t)=>await this.triggerEventHandlers(e,t.applicationName),this.logger))}async broadcastUpdate(e){const t=await this.glue.layouts.getCurrentLayout();if(!t)return;const i=await this.glue.layouts.getAll("Global"),n=await $(i),o={activeWorkspace:M(t),workspaces:n.map(e=>e.name),workspacesConfig:await u(n,async e=>{const t=await this.glue.layouts.get(e.name,"Global");return t?[M(t)]:[]}),reason:e};this.logger.debug("workspaces - Layouts updated (see console for full state)"),console.debug("Layouts updated",o),this.router.publish("Finsemble.WorkspaceService.update",o)}async loadInitialWorkspace(e,t){var i;const{data:n}=await m(()=>this.glue.layouts.getAll("Global"));if(this.logger.debug("workspaces - workspaces - Trying to load initial layout",e),null==n?void 0:n.some(t=>t.name===e))await m(()=>this.glue.layouts.get(e,"Global"));else if(null==n?void 0:n.length)this.logger.debug(`workspaces - Initial layout "${e}" not found. Selecting first available layout: "${n[0].name}".`),e=n[0].name;else{const t={version:"1.0.0",name:"Empty Workspace",type:"workspace",groups:{},windows:[]};this.logger.debug(`workspaces - Initial layout "${e}" not found. Creating "Empty Workspace".`),e=t.name;const i=j(t.name,t,0),{err:n}=await m(()=>this.glue.layouts.import([i],"merge"));n&&this.logger.error('workspaces - Error creating "Empty Workspace" layout',i,n)}const{data:o}=null!==(i=await this.triggerEventHandlers({event:"load-requested",workspaceName:e},"fsbl-service"))&&void 0!==i?i:{data:null};if(o){const e=[];o.forEach(t=>{e.push(t.newData)}),await m(()=>this.glue.layouts.import(e,"merge"))}this.logger.debug(`workspaces - Restoring initial layout ${e}`);const{err:r}=await m(()=>this.glue.layouts.restore({name:e}));await this.triggerEventHandlers({event:"load-complete",workspaceName:e},"fsbl-service"),r?this.logger.error(`workspaces - Error restoring initial layout ${e}`,r):this.logger.debug("workspaces - Restored initial layout",e),await m(()=>this.glue.prefs.setFor("IO.Global.FinsembleLastWorkspace",{name:e}))}async maybeLoadInitialWorkspace(e){var t,i,n,o,r,a,s,l,c;const d=await this.glue.prefs.get("IO.Global.FinsemblePreferences"),p=await this.glue.prefs.get("IO.Global.FinsembleLastWorkspace"),u=null!==(a=null!==(o=null!==(i=null===(t=null==d?void 0:d.data)||void 0===t?void 0:t["finsemble.initialWorkspace"])&&void 0!==i?i:null===(n=null==e?void 0:e.finsemble)||void 0===n?void 0:n.initialWorkspace)&&void 0!==o?o:null===(r=null==p?void 0:p.data)||void 0===r?void 0:r.name)&&void 0!==a?a:null===(c=null===(l=null===(s=null==e?void 0:e.finsemble)||void 0===s?void 0:s.workspaces)||void 0===l?void 0:l[0])||void 0===c?void 0:c.name;this.logger.debug(`workspaces - initialWorkspace "${u}" is being loaded`),await this.loadInitialWorkspace(u,e)}async maybeSetUpDefaultWorkspaces(e){var t,i;const n=null!==(i=null===(t=e.finsemble)||void 0===t?void 0:t.workspaces)&&void 0!==i?i:[],{data:o=[]}=await m(()=>this.glue.layouts.getAll("Global"));await h(n,async e=>{if(!o.find(t=>t.name===e.name)){this.logger.debug(`workspaces - Adding layout ${e.name} from workspaces.json`);const t=j(e.name,e,0),{err:i}=await m(()=>this.glue.layouts.import([t],"merge"));i&&this.logger.error(`workspaces - Error creating ${e.name} layout`,t,i)}})}async loadWorkspacesPostSSO(e){await m(()=>this.glue.layouts.clearDefaultGlobal()),await this.maybeSetUpDefaultWorkspaces(e),await this.maybeLoadInitialWorkspace(e),this.broadcastUpdate("Finsemble.Workspace.GetActiveWorkspace")}async start(){await this.workspaceEventRelay(),await new Promise(e=>setTimeout(e,5)),this.glue.layouts.onAdded(()=>{this.broadcastUpdate("Finsemble.Workspace.NewWorkspace")}),this.glue.layouts.onChanged(()=>{this.broadcastUpdate("Finsemble.Workspace.Save")}),this.glue.layouts.onRemoved(()=>{this.broadcastUpdate("Finsemble.Workspace.Remove")}),this.glue.layouts.onRenamed(()=>{this.broadcastUpdate("Finsemble.Workspace.Rename")}),this.glue.layouts.onRestored(()=>{this.broadcastUpdate("Finsemble.Workspace.SwitchTo")})}}class We{constructor(e,t,i){this.glue=e,this.logger=t,this.router=i,this.heartbeats={}}async getMonitorInfo(e,t){let i=null;if(e.windowId){const t=this.glue.windows.findById(e.windowId),n=await(null==t?void 0:t.getDisplay());i=n?E(n):null}else i=(await this.glue.displays.all()).map(e=>E(e));return{data:i}}onWindowAdded(e){e.onClose(()=>{this.logger.debug("window-service - Window closed",{uuid:"uuid",name:e.id}),this.router.transmit("LauncherService.WindowClosed",{uuid:"uuid",name:e.id})})}async startHeartbeatMonitor(e){var t,i,n,o;const a=r()({min:5e3,max:18e5,crashed:9e4,possiblyCrashed:6e4,notResponding:6e4},null!==(o=null===(n=null===(i=null===(t=null==e?void 0:e.finsemble)||void 0===t?void 0:t.servicesConfig)||void 0===i?void 0:i.window)||void 0===n?void 0:n.heartbeatResponseTimeout)&&void 0!==o?o:{});await this.glue.windows.onWindowRemoved(e=>{const t=`${e.name}:${e.id}`;delete this.heartbeats[t]}),await this.glue.interop.register("Finsemble.heartbeat",e=>{var t;const i=null!==(t=this.heartbeats[e.windowName])&&void 0!==t?t:{errorSent:!1,notRespondingSent:!1,warningSent:!1};this.heartbeats[e.windowName]={...i,lastHeartbeat:Date.now()}});const s=e=>Math.min(a.max,Math.max(e,a.min)),l=s(a.crashed),c=s(a.possiblyCrashed),d=s(a.notResponding),p=(e,t)=>this.router.transmit("Finsemble.WindowService.HeartbeatTimeout",{type:t,window:e});setInterval(()=>{const e=Date.now();Object.entries(this.heartbeats).forEach(([t,i])=>{const n=e-i.lastHeartbeat>l&&!i.errorSent,o=e-i.lastHeartbeat>c&&!i.warningSent,r=e-i.lastHeartbeat>d&&!i.notRespondingSent,a=e-i.lastHeartbeat<=d&&(i.errorSent||i.warningSent||i.notRespondingSent);n?setTimeout((e=>()=>{Date.now()-e.lastHeartbeat>l&&!e.errorSent&&(e.errorSent=!0,p(t,"crashed"),this.logger.error("heartbeats - Heartbeat Status: Crashed Window",t))})(i),50):o?(i.warningSent=!0,p(t,"possiblyCrashed"),this.logger.warn("heartbeats - Heartbeat Status: Possibly Crashed Window",t)):r?(i.notRespondingSent=!0,p(t,"notResponding"),this.logger.warn("heartbeats - Heartbeat Status: Unresponsive Window",t)):a&&(this.logger.info("heartbeats - Heartbeat Status: Window has returned to a responsive state",t),p(t,"nowResponding"),i.warningSent=!1,i.errorSent=!1,i.notRespondingSent=!1)})},1e3)}async start({manifest:e}){await new Promise(e=>setTimeout(e,5)),await this.startHeartbeatMonitor(e),await this.router.publish("DockingService.AutoArrangeStatus",{isAutoArranged:{device0:!1}}),await this.glue.windows.onWindowAdded(e=>this.onWindowAdded(e)),await this.glue.interop.register("FSBL.Clients.WindowClient.getMonitorInfo",p(async(e,t)=>this.getMonitorInfo(e,t),this.logger)),this.router.addListener("DockingService.dockWindow",()=>{const e=this.glue.windows.find("Toolbar");e&&e.dock({position:"top",claimScreenArea:!0})})}}class je{getAdapterForTopic(e){var t;return null!==(t=this.adapterMap[e])&&void 0!==t?t:this.defaultAdapter}constructor(e,t){this.glue=e,this.logger=t,this.adapterMap={},this.defaultAdapter=null,this.user="defaultUser",this.uuid="Finsemble",this.pwMap={},this.adapterToTopicStash={}}async clearCache({topic:e}){return new Promise(t=>{const i=this.getAdapterForTopic(e);if(!i){const i=`StorageService: No adapter found for topic "${e}"`;return this.logger.warn(`storage - clearCache(): ${i}`),void t({err:i})}i.clearCache?null==i||i.clearCache({topic:e,key:""},(e,i)=>{t({err:e,data:i})}):t({err:`clearCache() not implemented in storage adapter ${i.baseName}`})})}async get({key:e,topic:t}){return new Promise(i=>{const n=this.getAdapterForTopic(t);if(!n){const e=`StorageService: No adapter found for topic "${t}"`;return this.logger.warn(`storage - get(): ${e}`),void i({err:e})}null==n||n.get({topic:t,key:e},(e,t)=>{i({err:e,data:t})})})}async keys({topic:e,keyPrefix:t}){return new Promise(i=>{const n=this.getAdapterForTopic(e);if(!n){const t=`StorageService: No adapter found for topic "${e}"`;return this.logger.warn(`storage - keys(): ${t}`),void i({err:t})}const o={topic:e,key:""};t&&(o.keyPrefix=t),n.keys?null==n||n.keys(o,(e,t)=>{i({err:e,data:t})}):i({err:`keys() not implemented in storage adapter ${n.baseName}`})})}async remove({key:e,topic:t}){return new Promise(i=>{const n=this.getAdapterForTopic(t);if(!n){const e=`StorageService: No adapter found for topic "${t}"`;return this.logger.warn(`storage - remove(): ${e}`),void i({err:e})}null==n||n.delete({topic:t,key:e},(e,t)=>{i({err:e,data:t})})})}async save({key:e,topic:t,value:i}){return new Promise(n=>{const o=this.getAdapterForTopic(t);if(!o){const e=`StorageService: No adapter found for topic "${t}"`;return this.logger.warn(`storage - save(): ${e}`),void n({err:e})}null==o||o.save({topic:t,key:e,value:i},(e,t)=>{n({err:e,data:t})})})}async setUser({user:e}){this.user=e,this.logger.debug("storage - Storage service setUser() called directly (probably because auth completed)");const t=(this.defaultAdapter?[this.defaultAdapter]:[]).concat(Object.values(this.adapterMap));return await h(t,async t=>{await t.setUser(e)}),this.logger.debug("storage - Storage service setUser() finished"),{err:null}}adapterIsLoaded(e,t){var i;this.logger.info(`storage - Storage service adapter ${e} asynchronously loaded successfully`);const n=this.adapterToTopicStash[e];null==n||n.forEach(e=>{"*"===e?this.defaultAdapter=t:this.adapterMap[e]=t}),null===(i=this.pwMap[e])||void 0===i||i.resolve(),this.pwMap[e]=!0}async loadAdapter(t,n){return new Promise(o=>{if(this.logger.debug(`storage - Storage service loading adapter ${n}`),globalThis.window){const i=document.createElement("script");i.onload=async()=>{if(this.logger.debug(`storage - Storage service adapter ${n} script tag loaded successfully, waiting for adapter to call "adapterReceiver.loaded()"`),this.pwMap[t])this.logger.info(`storage - Storage service adapter ${t} synchronously loaded successfully`);else{const i=new e;i.setTimeout(15e3,`Storage adapter ${t} did not call adapterReceiver.loaded() within 15 seconds`),this.pwMap[t]=i,await i.promise}o()},i.type="text/javascript",i.src=n,document.body.append(i)}else{try{i(89)(n)}catch(e){this.logger.error(e)}o()}})}async loadAdaptersFromConfig(e){var t,i,n;const o=null===(i=null===(t=e.finsemble)||void 0===t?void 0:t.servicesConfig)||void 0===i?void 0:i.storage;if(!o){const e="storage - No servicesConfig.storage entry found in config";return this.logger.warn(e),e}const{defaultStorage:r="IndexedDBAdapter",topicToDataStoreAdapters:a={},dataStoreAdapters:s={}}=o,l={...a,"*":r};this.logger.debug("storage - Storage service initializing",l),this.adapterToTopicStash=(e=>{const t=t=>Object.keys(e).filter(i=>e[i]===t),i=Object.values(e).filter(R);return Object.fromEntries(i.map(e=>[e,t(e)]))})(l),await h(Object.entries(s),([e,t])=>this.loadAdapter(e,t));const c=Object.values(this.adapterMap).concat(null!==(n=this.defaultAdapter)&&void 0!==n?n:[]).filter(R);return await h(c,async e=>{await e.setBaseName(this.uuid),await e.setUser(this.user)}),null}async start({uuid:e,manifest:t}){globalThis.adapterReceiver={loaded:(e,t)=>{this.adapterIsLoaded(e,t)}},this.uuid=e,await this.loadAdaptersFromConfig(t),await this.glue.interop.register("FSBL.Clients.StorageClient.get",p(async e=>this.get(e),this.logger)),await this.glue.interop.register("FSBL.Clients.StorageClient.remove",p(async e=>this.remove(e),this.logger)),await this.glue.interop.register("FSBL.Clients.StorageClient.save",p(async e=>this.save(e),this.logger)),await this.glue.interop.register("FSBL.Clients.StorageClient.clearCache",p(async e=>this.clearCache(e),this.logger)),await this.glue.interop.register("FSBL.Clients.StorageClient.keys",p(async e=>this.keys(e),this.logger)),await this.glue.interop.register("FSBL.Clients.StorageClient.setUser",p(async e=>this.setUser(e),this.logger))}}const Oe=()=>{let e=(new Date).getTime().toString(36);return e+=Math.floor(Math.random()*Math.pow(36,2)).toString(36),e.toUpperCase()};class De{constructor(e){this.moduleRoot=e,this.csfrTokens={}}setSearchParams(e,t,i){const{searchParams:n}=e;return n.set("client_id",i.client_id),n.set("response_type",i.backchannel_endpoint?"code":"token"),n.set("redirect_uri",i.redirect_uri),n.set("state",t),i.nonce&&n.set("nonce",Oe()),i.scope&&n.set("scope",i.scope),n.toString()}validateConfiguration(e){return e.authorization_endpoint?e.client_id?e.pkce&&!e.backchannel_endpoint?"backchannel_endpoint must be configured when using PKCE. Set it to the endpoint for your provider's token url":null:"Missing required field client_id":"Missing required field authorization_endpoint"}async getWindowCreateOptionsFromConfig(e,t){var i;if(!t)return{};try{const n=await e.appManager.application(t);return null!==(i=null==n?void 0:n.windowSettings)&&void 0!==i?i:{}}catch(e){return{}}}async authenticate(e,t,i,o,r,s,l,c){var d,p;const u=this.validateConfiguration(o);if(u)return c.error(`authentication - OAuth.authenticate() error ${u}`,o),void s(u);const h=window.btoa(n()()),f=await(async e=>{const t=(new TextEncoder).encode(e),i=await crypto.subtle.digest("SHA-256",t),n=new Uint8Array(i),o=String.fromCharCode(...n);return window.btoa(o).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")})(h),g={...o,code_challenge:f,code_challenge_method:"S256",grant_type:null!==(d=o.grant_type)&&void 0!==d?d:"authorization_code",redirect_uri:null!==(p=o.redirect_uri)&&void 0!==p?p:`${this.moduleRoot}/ui-components/oauthResponse/index.html`},v=Oe();this.csfrTokens[v]={config:g,cb:s,handler:l,profileName:t,codeVerifier:h};try{const t=new URL(g.authorization_endpoint);t.search=this.setSearchParams(t,v,g);const o={autoSnap:!1,isSticky:!1,placement:{snapped:!1,verticalAlignment:"center",horizontalAlignment:"center",height:600,width:480}},l=await this.getWindowCreateOptionsFromConfig(e,g.component),d=await F(e,r,{}),p={url:t.toString(),mode:"flat",channelSelector:{enabled:!1},context:{OAuthState:v,authorizationUrl:t.toString()},preloadScripts:i},u=(0,a.merge)(o,l,d,p);c.debug("authentication - Oauth.authenticate() windowCreateOptions",u);const{err:h,data:f}=await m(()=>e.windows.open(n()(),t.toString(),u));if(h||!f)return c.error("authentication - Oauth.authenticate() Failed to spawn pop up",h),void s(h);c.info("authentication - Authentication pop-up window spawned")}catch(e){const t=`authentication - OAUTH2 failed: ${e.message}`;c.error(t),s(t)}}async responseFromAuthorizationEndpoint(e,t,i){i.debug("authentication - OAuth.responseFromAuthorizationEndpoint() received from completeOAuth() call =",t);const{state:n,code:o}=t,r=this.csfrTokens[n];i.debug("authentication - OAuth.responseFromAuthorizationEndpoint() transaction =",r,"state=",n);const a=((t,i)=>{var n;return null!==(n=null!=e?e:t?null:"No state returned from endpoint")&&void 0!==n?n:i?null:`Cannot find OAUTH state ${t}`})(n,r);if(a){if(r){const{cb:e}=r;e(a),delete this.csfrTokens[n]}return{err:a}}const{config:s,cb:l}=r,{err:c,data:d}=s.backchannel_endpoint?await this.retrieveAccessToken(n,o,i):{err:null,data:t};return c?delete this.csfrTokens[n]:(this.csfrTokens[n].credentials=d,this.setupTokenExpirationOrRefresh(d,i)),null==l||l(c,{data:d}),{err:c,data:d}}async retrieveAccessToken(e,t,i){const n=this.csfrTokens[e],{config:o,profileName:r,codeVerifier:a}=n;if(!o.backchannel_endpoint)return{err:"No backchannel_endpoint available"};const{client_id:s,redirect_uri:l,grant_type:c,scope:d}=o,p={client_id:s,code:t,redirect_uri:l,state:e};c&&(p.grant_type=c),d&&(p.scope=d),a&&(p.code_verifier=a),o.client_secret&&(p.client_secret=o.client_secret);const u=new URLSearchParams(p).toString();i.debug("authentication - OAuth.retrieveAccessToken() fetching token",o.backchannel_endpoint,u,e,r);const{err:h,data:f}=await this.fetchAccessToken(o.backchannel_endpoint,u,r,i);if(o.userProfile_endpoint&&(null==f?void 0:f.access_token)){const{err:e,data:t}=await this.fetchUserData(o.userProfile_endpoint,null==f?void 0:f.access_token,i);return{err:e,data:{...f,...t}}}return{err:h,data:f}}async fetchAccessToken(e,t,i,n){try{const o=await fetch(e,{mode:"cors",method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:t}),r=await o.json();if(void 0!==r.error){const e=r.error+(r.error_description?" - "+r.error_description:"");return n.warn("authentication - OAuth.fetchAccessToken()",e),{err:e}}const s=r.id_token?(e=>{const t=e.split(".")[1].replace("-","+").replace("_","/");return JSON.parse(window.atob(t))})(r.id_token):{},l=(0,a.merge)({name:i,profileName:i},r,s);return n.debug("authentication - OAuth.fetchAccessToken() successful token fetch",l),{err:null,data:l}}catch(e){return n.warn("authentication - OAuth.fetchAccessToken()",e.message),{err:e.message}}}async fetchUserData(e,t,i){try{const n=await fetch(e,{method:"GET",headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/json"}}),o=await n.json();return i.debug("authentication - OAuth.fetchUserData() successful user data fetch",o),{err:null,data:o}}catch(e){return i.warn("authentication - OAuth.fetchUserId()",e.message),{err:e.message}}}async refreshToken(e,t){var i,n;const{state:o,code:r}=e,a=this.csfrTokens[o],{config:s}=a,l=null!==(i=s.refreshRetries)&&void 0!==i?i:3,c=null!==(n=s.refreshRetryDelaySeconds)&&void 0!==n?n:60;for(let e=0;e<l;e++){const{err:i,data:n}=await this.retrieveAccessToken(o,r,t);if(!i)return{err:null,data:n};t.info(`authentication - Retrying Access token refresh (retry ${e} of ${l}) in ${c} seconds`),await new Promise(e=>setTimeout(e,1e3*c))}return{err:"Access token refresh retries exhausted. The access token was NOT refreshed."}}setupTokenExpirationOrRefresh(e,t){var i;const{state:n}=e,o=this.csfrTokens[n],{config:r,handler:a,credentials:s}=o,l=(e,t)=>{e&&delete this.csfrTokens[n],a(e,{data:t})};if(!s||!s.expires_in){const e=`authentication - Access token for ${o.profileName} does not contain expires_in. Expiring immediately.`;return t.warn(e),delete this.csfrTokens[n],void a(null,{data:s,remove:!0})}const c=null!==(i=r.refreshPreemptExpirySeconds)&&void 0!==i?i:300,d=s.refresh_token&&(r.refreshAccessToken||null==r.refreshAccessToken),p=s.expires_in-d?c:0;t.info(`authentication - Access token expires in ${s.expires_in} seconds, setting up automated refresh in ${p} seconds`),setTimeout(async()=>{if(d){const{err:i,data:o}=await this.refreshToken(e,t);this.csfrTokens[n].credentials={...this.csfrTokens[n].credentials,...o},this.setupTokenExpirationOrRefresh(e,t),l(i,o)}else l(`Token expired for ${o.profileName}`)},1e3*p)}}class Me{constructor(e,t,i,n){this.glue=e,this.logger=t,this.configService=i,this.activeProfiles={},this.oauth=new De(n)}async beginAuthentication({preloadScripts:e,profile:t,spawnParams:i,handlerName:n}){return new Promise(o=>{var r,a;const s=this.configService.config.authentication,l=t&&s?{...s[t],name:t}:{},c=this.activeProfiles[t];if(null==c?void 0:c.credentials)return this.logger.debug(`authentication - beginAuthentication(): Authentication operation for ${t} returned credentials without a new transaction`),c.handlerNames.push(n),v(()=>this.glue.interop.invoke(n,{err:null,data:c.credentials})),void o({err:null,data:c.credentials});const d=!!c&&c.inFlightCallbacks.length>0;this.activeProfiles[t]={inFlightCallbacks:(null!==(r=null==c?void 0:c.inFlightCallbacks)&&void 0!==r?r:[]).concat(o),handlerNames:(null!==(a=null==c?void 0:c.handlerNames)&&void 0!==a?a:[]).concat(n)};const p=(e,i)=>{const{data:n,remove:o}=null!=i?i:{data:null,remove:!1},r=this.activeProfiles[t];r&&(r.handlerNames.forEach(t=>{v(()=>this.glue.interop.invoke(t,{err:e,data:n}))}),e||o?(this.logger.info(`authentication - Removing active profile ${t}`,e),delete this.activeProfiles[t]):(this.logger.debug(`authentication - Saving credentials to active profile ${t}`),r.credentials=n))};d?this.logger.debug(`authentication - beginAuthentication(): In flight operation for ${t} at ${Date.now()}`):(this.logger.debug(`authentication - beginAuthentication(): Authentication operation for ${t} started at ${Date.now()}`),this.oauth.authenticate(this.glue,t,e,l,i,(e,i)=>{const{data:n}=null!=i?i:{data:null},o=this.activeProfiles[t];o&&(o.inFlightCallbacks.forEach(t=>t({err:e,data:n})),o.inFlightCallbacks=[]),p(e,i)},p,this.logger))})}async completeOAUTH({err:e,data:t}){return this.oauth.responseFromAuthorizationEndpoint(e,t,this.logger)}async publishAuthorization(e){this.logger.debug("authentication - Received publishAuthorization credentials. Relaying to sso-application.");const{err:t}=await v(()=>this.glue.interop.invoke("Finsemble.Clients.AuthenticationClient.publishAuthorization.backChannel",e));t&&this.logger.error("Error invoking publishAuthentication",t)}async start(e){const t=[e];await this.glue.interop.register("FSBL.Clients.AuthenticationClient.beginAuthentication",p(async e=>this.beginAuthentication({preloadScripts:t,...e}),this.logger)),await this.glue.interop.register("FSBL.Clients.AuthenticationClient.completeOAUTH",p(async e=>this.completeOAUTH(e),this.logger)),await this.glue.interop.register("FSBL.Clients.AuthenticationClient.publishAuthorization",p(async e=>this.publishAuthorization(e),this.logger))}}class $e{constructor(e,t){this.glue=e,this.logger=t,this.storesInitialized={}}async start(){this.glue.interop.register("FSBL.Clients.DistributedStoreClient.init",p(async e=>{const{store:t,value:i}=e;if(this.storesInitialized[t])return;this.storesInitialized[t]=!0;const{err:n}=await m(()=>this.glue.contexts.update(t,i));n&&this.logger.error("distribute-store-service - failed to update context",t,n)},this.logger))}}class Ee{constructor(t,i,n){this.glue=t,this.logger=i,this.router=n,this.notifications=[],this.lastIssuedAt={},this.currentLastIssued=0,this.ready=new e}async updateLastIssued(e,t){var i;let n=!1;const o=new Date(1e3*t).getTime();e&&o>(null!==(i=this.lastIssuedAt[e])&&void 0!==i?i:0)&&(n=!0,this.lastIssuedAt[e]=o),o>this.currentLastIssued&&(n=!0,this.currentLastIssued=o),n&&await this.glue.prefs.setFor("IO.Global.NotificationsLastIssued",{currentLastIssued:o,lastIssuedAt:this.lastIssuedAt})}async startPersistence(){var e,t;this.logger.debug("notifications - loading persisted notifications (see console for more data)");const i=await this.glue.prefs.get("IO.Global.PersistedNotifications");if(this.notifications=null!==(t=null===(e=null==i?void 0:i.data)||void 0===e?void 0:e.notifications)&&void 0!==t?t:[],console.debug("notifications - loading persisted notifications (will filter out any with state 'Closed')",this.notifications),this.notifications=this.notifications.filter(e=>"Closed"!==e.state),this.notifications.length)try{await this.glue.notifications.import(this.notifications.map(e=>({...e})))}catch(e){console.warn("notifications - failed to load persisted notifications",e,this.notifications)}await this.glue.notifications.onRaised(async e=>{var t,i,n;if(this.notifications.some(t=>t.id===e.id))return;if(this.logger.debug("notifications - received onRaised",e),null===(t=e.data)||void 0===t?void 0:t.issuedAt){const t=new Date(null===(i=e.data)||void 0===i?void 0:i.issuedAt);e.timestamp=Math.round(t.getTime()/1e3)}e.timestamp&&this.updateLastIssued(null!==(n=e.source)&&void 0!==n?n:e.appTitle,e.timestamp),this.notifications.push(e);const o=new Date;for(this.notifications=this.notifications.flatMap(e=>{const t=e.timestamp?new Date(1e3*e.timestamp):new Date;return o.getTime()-t.getTime()>6048e5?[]:[e]});this.notifications.length>1e3;)this.notifications.shift();await this.glue.prefs.setFor("IO.Global.PersistedNotifications",{notifications:this.notifications}),this.logger.debug("notifications - notifications persisted onRaised (see console for more data)"),console.debug("notifications - notifications persisted onRaised",this.notifications)}),await this.glue.notifications.onClosed(async e=>{this.logger.debug("notifications - received onClosed (see console for full state)",e),this.notifications=this.notifications.filter(t=>t.id!==e.id),await this.glue.prefs.setFor("IO.Global.PersistedNotifications",{notifications:this.notifications}),console.debug("notifications - notifications persisted onClosed",this.notifications)}),await this.glue.notifications.onStateChanged(async(e,t)=>{this.logger.debug("notifications - received onStateChanged (see console for full state)",e,t),"Closed"!==t&&(this.notifications.forEach(i=>{i.id===e.id&&(i.state=t)}),await this.glue.prefs.setFor("IO.Global.PersistedNotifications",{notifications:this.notifications}),console.debug("notifications - notifications persisted onStateChanged",this.notifications))})}async getLastIssuedAt(e){var t;return(null==e?void 0:e.source)?{lastIssuedAt:new Date(null!==(t=this.lastIssuedAt[e.source])&&void 0!==t?t:0).toISOString()}:{lastIssuedAt:new Date(this.currentLastIssued).toISOString()}}async performAction(e){this.logger.debug("notifications - NotificationService.performAction",e);const{id:t,milliseconds:i,channel:n,payload:o,component:r,spawnParams:a}=e;switch(e.type){case"TRANSMIT":this.router.transmit(n,o);break;case"PUBLISH":this.router.publish(n,o);break;case"QUERY":this.router.query(n,o);break;case"SPAWN":const e=this.glue.appManager.application(r),s=await F(this.glue,a,{});try{await(null==e?void 0:e.start(void 0,s))}catch(e){this.logger.error(e)}break;case"SNOOZE":await this.glue.notifications.snooze(t,null!=i?i:3e4);break;case"DISMISS":await this.glue.notifications.clear(t)}}async registerHandlers(){this.logger.debug("notifications - FSBL.NotificationClient registering handlers"),this.glue.interop.methods({name:"HandleNotificationActionTypeSPAWN"}).length>0&&this.logger.error("notifications - Error: Went to register glue handlers for the NotificationService, but they've already been registered."),await this.glue.interop.register("FSBL.Clients.NotificationClient.performAction",p(e=>this.performAction(e),this.logger)),await this.glue.interop.register("FSBL.Clients.NotificationClient.getLastIssuedAt",p(e=>this.getLastIssuedAt(e),this.logger)),await this.router.subscribe("notification-ui",(e,t)=>{var i;const{showCenter:n}=null!==(i=t.data)&&void 0!==i?i:{};n?this.glue.notifications.panel.show():this.glue.notifications.panel.hide()}),this.logger.debug("notifications - FSBL.NotificationClient finished initializing"),this.ready.resolve()}async initialize(){var e;const t=await this.glue.prefs.get("IO.Global.NotificationsLastIssued");(null==t?void 0:t.data)&&(this.currentLastIssued=null!==(e=t.data.currentLastIssued)&&void 0!==e?e:0,this.lastIssuedAt=t.data.lastIssuedAt),await this.startPersistence()}async start(){await this.router.onReady(),await this.registerHandlers()}}class Ue{constructor(e,t){this.glue=e,this.logger=t,this.hotKeyToWindowMap={}}async maybeRemove(e,t){const i=this.hotKeyToWindowMap[e];if(!i)return;this.logger.debug("hotkeys - Removing global hotkey",e,t.applicationName,t.instance);const n=i.filter(e=>e.windowId!==t.windowId);n.length?this.hotKeyToWindowMap[e]=n:(await this.glue.hotkeys.unregister(e),delete this.hotKeyToWindowMap[e])}async addGlobalHotkey(e,t){const i=ie(e.keyArr),n=this.hotKeyToWindowMap[i];n?n.push(t):(this.hotKeyToWindowMap[i]=[t],this.logger.debug("hotkeys - Adding global hotkey",i,t.applicationName,t.instance),await this.glue.hotkeys.register(i,async()=>{var t;const n=null!==(t=this.hotKeyToWindowMap[i])&&void 0!==t?t:[];await h(n,async t=>{const{err:n}=await m(()=>this.glue.interop.invoke("FSBL.Clients.HotkeyClient.Triggered",{keyArr:e.keyArr},t));n&&await this.maybeRemove(i,t)})}))}async removeAllHotkeysForWindow(e,t){this.logger.debug("hotkeys - Removing all hotkeys for window",t.applicationName,t.instance),await h(Object.entries(this.hotKeyToWindowMap),async([e,i])=>{i.map(e=>e.windowId).includes(t.windowId)&&await this.maybeRemove(e,t)})}async removeGlobalHotkey(e,t){const i=ie(e.keyArr);await this.maybeRemove(i,t)}async maybeAddFinsembleSpecificHotkeys(e){var t,i,n;const o=null===(n=null===(i=null===(t=e.finsemble)||void 0===t?void 0:t.servicesConfig)||void 0===i?void 0:i.logger)||void 0===n?void 0:n.hotkeyShowCentralLogger;if(o){const e=ie(o);this.logger.debug("hotkeys - HotkeyService adding hotkey hotkeyShowCentralLogger",e),await this.glue.hotkeys.register(e,async()=>{const e=this.glue.windows.find("central-logger");e&&(e.show(),e.focus())})}}async start(e){await this.glue.interop.register("FSBL.Clients.HotkeyClient.addGlobalHotkey",p(async(e,t)=>this.addGlobalHotkey(e,t),this.logger)),await this.glue.interop.register("FSBL.Clients.HotkeyClient.removeAllHotkeysForWindow",p(async(e,t)=>this.removeAllHotkeysForWindow(e,t),this.logger)),await this.glue.interop.register("FSBL.Clients.HotkeyClient.removeGlobalHotkey",p(async(e,t)=>this.removeGlobalHotkey(e,t),this.logger)),await this.maybeAddFinsembleSpecificHotkeys(e)}}class ze{constructor(t,i,n){this.glue=t,this.logger=i,this.router=n,this.ready=new e}async maybeSetLogToDisk(e){var t,i;const n=null===(i=null===(t=null==e?void 0:e["finsemble-electron-adapter"])||void 0===t?void 0:t.logger)||void 0===i?void 0:i.logToDiskLevels;if(Array.isArray(n)){this.logger.debug("Setting central-logger logToDiskLevels",n);const{err:e}=await v(()=>this.glue.interop.invoke("central-logger-set-logToDisk",{logToDiskLevels:n}));e&&this.logger.error("Error setting logToDiskLevels",e)}}async start(){await this.router.onReady(),await this.register_handlers()}maybeStartRecipe(e){var t;(null===(t=null==e?void 0:e.iocd)||void 0===t?void 0:t.enableLegacyLoggerRecipe)&&this.glue.interop.register("finsemble-appender-log-message",async e=>{var t;null===(t=this.router)||void 0===t||t.transmit("logger.service.logMessages",[{category:"system",logClientName:"iocd",logType:e.level,logData:e.message,logTimestamp:new Date}])})}async register_handlers(){this.router.addListener("CentralConsole-Show",async(e,{data:t})=>{var i;if(t){const e=this.glue.windows.list().find(e=>"central-logger"===e.name);e?(await e.show(),await e.focus()):null===(i=this.glue.appManager.application("central-logger"))||void 0===i||i.start()}}),this.ready.resolve()}}class Ne{constructor(e,t){this.glue=e,this.logger=t}getLayouts(e){var t;const i=this.glue.layouts.list().filter(e=>"Global"===e.type);return(null!==(t=null==i?void 0:i.map(e=>e.name.toLowerCase()))&&void 0!==t?t:[]).filter(t=>t.includes(e))}async registerWorkspaceProvider(){B(this.glue,{name:"Installed Workspaces",searchCallback:({text:e},t)=>{var i,n;null===(i=this.logger.loggerClient)||void 0===i||i.debug("SearchService - Workspace provider - search request",e);const o=this.getLayouts(e.toLowerCase()).map(e=>({name:e,displayName:e,type:"Workspace",score:1,description:e,actions:[{name:"Switch"}],tags:[]}));null===(n=this.logger.loggerClient)||void 0===n||n.debug("SearchService - Workspace provider - search result",o),t(null,o)},itemActionCallback:e=>{var t;null===(t=this.logger.loggerClient)||void 0===t||t.debug("SearchService - Workspace provider - invoke item action",e),e.action&&e.item&&(async(e,t)=>{const{data:i}=await m(()=>e.layouts.getCurrentLayout());(null==i?void 0:i.name)&&await H(e,"close-requested",i.name);const{data:n}=await H(e,"load-requested",t);if(null==n?void 0:n.some(e=>"cancel"===(null==e?void 0:e.action)))return{err:null};let o=null;if(null==n?void 0:n.length){const t=[];n.forEach(e=>{e.newData&&t.push(e.newData)});const{err:i}=await m(()=>e.layouts.import(t,"merge"));i&&(o=i)}const{data:r=[]}=await m(()=>e.channels.all());await h(r,async t=>m(()=>e.channels.clearChannelData(t)));const{err:a}=await m(()=>e.layouts.restore({name:t}));if(a)(null==i?void 0:i.name)&&H(e,"close-failed",i.name),H(e,"load-failed",t);else{(null==i?void 0:i.name)&&H(e,"close-complete",i.name),H(e,"load-complete",t);const{data:n}=await m(()=>e.layouts.getCurrentLayout());await m(()=>e.layouts.save({name:t,type:"Global",metadata:null==n?void 0:n.metadata})),await m(()=>e.prefs.setFor("IO.Global.FinsembleLastWorkspace",{name:t}))}v(()=>e.interop.invoke("FSBL.Clients.WorkspaceClient.switchTo",{}))})(this.glue,e.item.name)}})}async registerLauncherProvider(){B(this.glue,{name:"Installed Components",searchCallback:({text:e},t)=>{var i,n;null===(i=this.logger.loggerClient)||void 0===i||i.debug("SearchService - Launcher provider - search request",e);const o=this.glue.appManager.applications();if(!o)return void t(null,[]);const r=e.toLowerCase(),a=o.filter(e=>{var t,i;return!e.hidden&&((null===(t=e.title)||void 0===t?void 0:t.toLowerCase().includes(r))||(null===(i=e.name)||void 0===i?void 0:i.toLowerCase().includes(r)))}).map(e=>{var t;const i=e.icon&&""!==e.icon?{imageType:"url",path:e.icon}:void 0;return{name:e.name,displayName:null!==(t=e.title)&&void 0!==t?t:e.name,score:1,icon:i,type:"Application",description:e.name,actions:[{name:"Spawn"}],tags:[]}});null===(n=this.logger.loggerClient)||void 0===n||n.debug("SearchService - Launcher provider - search result",a),t(null,a)},itemActionCallback:(e,t)=>{var i;null===(i=this.logger.loggerClient)||void 0===i||i.debug("SearchService - Launcher provider - invoke item action",e,t),e.action&&e.item&&q(this.glue,e.item.name,{addToWorkspace:!0,monitor:"mine",relativeWindow:{windowName:null!=t?t:""}})}})}async start(e){var t,i,n,o,r,a,s,l,c,d;(null!==(o=null===(n=null===(i=null===(t=null==e?void 0:e.finsemble)||void 0===t?void 0:t.servicesConfig)||void 0===i?void 0:i.workspace)||void 0===n?void 0:n.search)&&void 0!==o?o:{}).enabled&&(null===(r=this.logger.loggerClient)||void 0===r||r.log("SearchService - register workspace provider"),this.registerWorkspaceProvider()),!1!==(null===(c=(null!==(l=null===(s=null===(a=null==e?void 0:e.finsemble)||void 0===a?void 0:a.servicesConfig)||void 0===s?void 0:s.launcher)&&void 0!==l?l:{}).search)||void 0===c?void 0:c.enabled)&&(null===(d=this.logger.loggerClient)||void 0===d||d.log("SearchService - register app launcher provider"),this.registerLauncherProvider())}}class Be{constructor(e,t){this.glue=e,this.logger=t,this.listeners=new Set,this.mostRecentEvent={command:"",config:{}}}async processProtocolHandlerEvent(e,t){return this.logger.debug("protocol-handler - Received protocol handler event",e,"distributing to",this.listeners),this.mostRecentEvent=e,await h(Array.from(this.listeners),async t=>{const{err:i}=await v(()=>this.glue.interop.invoke(t,e));i&&this.logger.error("Error invoking protocol handler function",i)}),{handled:!0}}async getProtocolString(e,t){return this.mostRecentEvent}async registerProtocolHandlerTriggered(e,t){this.logger.debug("protocol-handler - Registering protocol-handler-triggered listener",null==e?void 0:e.invoker),this.listeners.add(e.invoker)}async unregisterProtocolHandlerTriggered(e,t){this.listeners.delete(e.invoker)}async start(){await this.glue.interop.register("FSBL.iocd-protocol-event",p(async(e,t)=>this.processProtocolHandlerEvent(e,t),this.logger)),await this.glue.interop.register("FSBL.System.getProtocolString",p(async(e,t)=>this.getProtocolString(e,t),this.logger)),await this.glue.interop.register("FSBL.Event.add.protocol-handler-triggered",p(async(e,t)=>this.registerProtocolHandlerTriggered(e,t),this.logger)),await this.glue.interop.register("FSBL.Event.remove.protocol-handler-triggered",p(async(e,t)=>this.unregisterProtocolHandlerTriggered(e,t),this.logger))}}const He=(e,t,{api:i,method:n,type:o,data:r})=>{if("start"===o&&(null==t||t.metrics.featureMetric("finsemble-polyfill",i,n)),"deprecated"===o)return null==t||t.metrics.featureMetric("finsemble-polyfill-deprecated",i,n),void e.error("DEPRECATED FUNCTION CALLED",`${i}.${n}()`,o,r);e[o]?e[o](`${i}.${n}()`,r):e.debug(`${i}.${n}()`,o,r)};class qe{constructor(e,t,i){this.gluePromise=e,this.asyncConstructors=t,this.loggerClient=i;const n=this.asyncConstructors.addConstructor();e.then(e=>{this.glue=e,this.asyncConstructors.finishConstructor(n)})}logStatus(e,t,i){He(this.loggerClient,this.glue,{api:"StorageClient",method:e,type:t,data:i})}async clearCache(e,t){this.logStatus("clearCache","start",t),await this.asyncConstructors.ready();const{err:i}=await v(()=>this.glue.interop.invoke("FSBL.Clients.StorageClient.clearCache",{...t}),e);return i&&this.logStatus("remove","error",i),this.logStatus("clearCache","return"),{err:i}}async remove(e,t){this.logStatus("remove","start",e),await this.asyncConstructors.ready();const{err:i}=await v(()=>this.glue.interop.invoke("FSBL.Clients.StorageClient.remove",e),t);return i&&this.logStatus("remove","error",i),this.logStatus("remove","return"),{err:i}}async keys(e,t){this.logStatus("keys","start",e),await this.asyncConstructors.ready();const{err:i,data:n}=await v(()=>this.glue.interop.invoke("FSBL.Clients.StorageClient.keys",e),t);return i&&this.logStatus("keys","error",i),this.logStatus("keys","return",n),{err:i,data:n}}async getStandardized(e,t){this.logStatus("getStandardized","start",e),await this.asyncConstructors.ready();const{err:i,data:n}=await v(()=>this.glue.interop.invoke("FSBL.Clients.StorageClient.get",e),t);return i&&this.logStatus("getStandardized","error",i),this.logStatus("getStandardized","return",n),{err:i,data:n}}async getMultiple(e,t){return this.logStatus("getMultiple","deprecated","Not Implemented"),{err:"get multiple is not implemented"}}async save(e,t){this.logStatus("save","start",e),await this.asyncConstructors.ready();const{err:i}=await v(()=>{var t;return this.glue.interop.invoke("FSBL.Clients.StorageClient.save",{key:null!==(t=e.key)&&void 0!==t?t:e.field,value:e.value,topic:e.topic})},t);return i&&this.logStatus("save","error",i),this.logStatus("save","return"),{err:i}}async setUser(e,t){this.logStatus("setUser","start",e),await this.asyncConstructors.ready();const{err:i}=await v(()=>this.glue.interop.invoke("FSBL.Clients.StorageClient.setUser",e),t);return i&&this.logStatus("setUser","error",i),this.logStatus("setUser","return"),{err:i}}async get(e,t){this.logStatus("get","start",e);const i=await this.getStandardized(e,t);return this.logStatus("get","return",i),i.data}}function Ge(...e){let t="";for(let i=0;i<e.length;i++)t=`${t} ${e[i]}`;return t.replace(/\s(.)/g,e=>e.toUpperCase()).replace(/\s/g,"").replace(/^(.)/,e=>e.toLowerCase())}class Ve{constructor(e,t,i){this.glue=e,this.manifest=t,this.logger=i,this.storageClient=null}async fillInWindowData(e,t){var i;const n=await u(null!==(i=null==t?void 0:t.windows)&&void 0!==i?i:[],async i=>{const n=Ge(t.name,i),o=Ge(t.name,i,i),{data:r}=await e.getStandardized({key:n,topic:"finsemble.workspace"}),{data:a}=await e.getStandardized({key:o,topic:"finsemble.workspace"});return[{windowName:i,windowData:r,componentStates:a}]});t.componentStates=Object.fromEntries(n.map(e=>[e.windowName,e.componentStates])),t.windowData=n.map(e=>({...e.windowData}))}async migrateWorkspaces(){const e=this.storageClient,{err:t,data:i}=await e.getStandardized({key:"finsemble.allWorkspaces",topic:"finsemble.workspace"});this.logger.debug("data-migration - workspaceNames=",i,t);const n=(null!=i?i:[]).flatMap(e=>e?[Ge(e)]:[]),o=await u(n,async t=>{const{data:i}=await e.getStandardized({key:t,topic:"finsemble.workspace"});return i?[i]:[]});await h(o,async t=>{await this.fillInWindowData(e,t)}),this.logger.debug("data-migration - workspaces from storage adapter",o);const r=await this.glue.layouts.getAll("Global");this.logger.debug("data-migration - removing existing iocd layouts",r.map(e=>e.name));for(let e=0;e<r.length;e++)await m(()=>this.glue.layouts.remove("Global",r[e].name));const a=(await $(r)).reduce((e,t,i)=>(e[t.name]=i,e),{}),s=o.map((e,t)=>{var i;return j(e.name,e,null!==(i=a[e.name])&&void 0!==i?i:t)});this.logger.debug("data-migration - converted layouts",s);const{err:l,data:c}=await m(()=>this.glue.layouts.import(s,"merge"));if(l||!c){const e=`data-migration - Error importing converted layouts ${l}`;this.logger.error(e)}const{data:d}=await e.getStandardized({key:"finsemble.lastUsedWorkspace.name",topic:"finsemble.workspace"});d&&(this.logger.debug("data-migration - setting current workspace from lastUsedWorkspace.name",d),await m(()=>this.glue.prefs.setFor("IO.Global.FinsembleLastWorkspace",{name:d})))}async migratePreferences(){const e=this.storageClient,{data:t}=await e.getStandardized({key:"userPreferences",topic:"finsemble"});this.logger.debug("data-migration - Preferences from Finsemble storage adapter",t);const{err:i}=await m(()=>this.glue.prefs.clearFor("IO.Global.FinsemblePreferences"));if(i&&this.logger.error("data-migration - error clearing preferences IO.Global.FinsemblePreferences",i),t){const{err:e}=await m(()=>this.glue.prefs.updateFor("IO.Global.FinsemblePreferences",t));e&&this.logger.error("data-migration - error saving preferences IO.Global.FinsemblePreferences",e)}else this.logger.debug("data-migration - No user preferences found in Finsemble storage adapter. IO.Global.FinsemblePreferences will be empty.")}async migrateAdvancedAppLauncher(){const e=this.storageClient,{data:t}=await e.getStandardized({key:"distributedStore-Finsemble-AppLauncher-Store",topic:"finsemble"}),i=null==t?void 0:t.values;if(!i)return;this.logger.debug("data-migration - advanced app launcher settings from Finsemble storage adapter",i);const n={activeFolder:i.activeFolder,activeTags:i.activeTags,dragDisabled:["Advanced App Launcher","Favorites"],folders:i.appFolders.folders,foldersList:i.appFolders.list,sortBy:i.sortBy};await this.glue.prefs.clearFor("IO.Global.UserDefinedApps");const o=f(i.appDefinitions,(e,t)=>[[e,{name:e,url:t.url}]]);await this.glue.prefs.setFor("IO.Global.UserDefinedApps",o),await this.glue.prefs.setFor("IO.Global.Launcher",n)}async maybeMigrateWorkspaces(e,t){"iocd"===e?this.logger.debug("data-migration - Skipping data migration of workspaces"):"oneTimeConversion"===e?!0!==(null==t?void 0:t.workspaces)?(this.logger.debug(`data-migration - Migrating workspaces ${e}`),await this.migrateWorkspaces(),await this.glue.prefs.updateFor("IO.Global.FinsembleOneTimeConversion",{workspaces:!0}),localStorage.setItem("oneTimeConversion:workspaces","true")):this.logger.debug("data-migration - Skipping data migration of workspaces, already one-time-converted"):(this.logger.debug(`data-migration - Migrating workspaces ${e}`),await this.migrateWorkspaces())}async maybeMigratePreferences(e,t){"iocd"===e?this.logger.debug("data-migration - Skipping data migration of preferences"):"oneTimeConversion"===e?!0!==(null==t?void 0:t.preferences)?(this.logger.debug(`data-migration - Migrating preferences ${e}`),await this.migratePreferences(),await this.glue.prefs.updateFor("IO.Global.FinsembleOneTimeConversion",{preferences:!0})):this.logger.debug("data-migration - Skipping data migration of preferences, already one-time-converted"):(this.logger.debug(`data-migration - Migrating preferences ${e}`),await this.migratePreferences())}async maybeMigrateAdvancedAppLauncher(e,t){"iocd"===e?this.logger.debug("data-migration - Skipping data migration of advanced app launcher"):"oneTimeConversion"===e?!0!==(null==t?void 0:t.advancedAppLauncher)?(this.logger.debug(`data-migration - Migrating preferences ${e}`),await this.migrateAdvancedAppLauncher(),await this.glue.prefs.updateFor("IO.Global.FinsembleOneTimeConversion",{advancedAppLauncher:!0})):this.logger.debug("data-migration - Skipping data migration of advanced app launcher, already one-time-converted"):(this.logger.debug(`data-migration - Migrating advancedAppLauncher ${e}`),await this.migrateAdvancedAppLauncher())}async setLastUsedWorkspaceName(){const e=this.storageClient,t=await this.glue.layouts.getCurrentLayout();t&&await e.save({key:"finsemble.lastUsedWorkspace.name",topic:"finsemble.workspace",value:t.name})}async saveToStorageAdapter(e){const t=this.storageClient;this.logger.debug("data-migration - Saving workspaces to storage adapter",e),await this.removeFromStorageAdapter(e),await h(e,async e=>{const i=await this.glue.layouts.get(e,"Global");if(!i)return void this.logger.warn(`data-migration - saveToStorageAdapter couldn't find layout "${e}"`);const n=M(i);this.logger.debug("data-migration - Saving workspace to storage adapter (see console for full workspace)",n.name),console.debug("Saving workspace to storage adapter",n);const{windowData:o,componentStates:r}=n;delete n.windowData,delete n.componentStates,await t.save({key:Ge(n.name),topic:"finsemble.workspace",value:n}),await h(o,async e=>{const i=Ge(n.name,e.name);await t.save({key:i,topic:"finsemble.workspace",value:e})}),await h(Object.entries(r),async([e,i])=>{const o=Ge(n.name,e,e);await t.save({key:o,topic:"finsemble.workspace",value:i})})});const{data:i=[]}=await t.getStandardized({key:"finsemble.allWorkspaces",topic:"finsemble.workspace"}),n=i.concat(e).filter(R);await t.save({key:"finsemble.allWorkspaces",topic:"finsemble.workspace",value:n}),await this.setLastUsedWorkspaceName()}async removeFromStorageAdapter(e){const t=this.storageClient;this.logger.debug("data-migration - Removing workspaces from storage adapter",e),await h(e,async e=>{var i;const{data:n}=await t.getStandardized({key:Ge(e),topic:"finsemble.workspace"});await h(null!==(i=null==n?void 0:n.windows)&&void 0!==i?i:[],async i=>{const n=Ge(e,i),o=Ge(e,i,i);await t.remove({key:n,topic:"finsemble.workspace"}),await t.remove({key:o,topic:"finsemble.workspace"})}),await t.remove({key:Ge(e),topic:"finsemble.workspace"})});const{data:i=[]}=await t.getStandardized({key:"finsemble.allWorkspaces",topic:"finsemble.workspace"}),n=i.filter(t=>!e.includes(t));await t.save({key:"finsemble.allWorkspaces",topic:"finsemble.workspace",value:n}),await this.setLastUsedWorkspaceName()}async setOrderInStorageAdapter(e){const t=this.storageClient;this.logger.debug("data-migration - Setting workspace order in storage adapter",e),await t.save({key:"finsemble.allWorkspaces",topic:"finsemble.workspace",value:e})}async renameInStorageAdapter(e,t){var i;const n=this.storageClient;this.logger.debug(`data-migration - Renaming workspace "${e}" to "${t}" in storage adapter`);const{data:o}=await n.getStandardized({key:Ge(e),topic:"finsemble.workspace"});await h(null!==(i=null==o?void 0:o.windows)&&void 0!==i?i:[],async i=>{const o=Ge(e,i),r=Ge(e,i,i),{data:a}=await n.getStandardized({key:o,topic:"finsemble.workspace"}),{data:s}=await n.getStandardized({key:r,topic:"finsemble.workspace"});await n.remove({key:o,topic:"finsemble.workspace"}),await n.remove({key:r,topic:"finsemble.workspace"});const l=Ge(t,i),c=Ge(t,i,i);await n.save({key:l,topic:"finsemble.workspace",value:a}),await n.save({key:c,topic:"finsemble.workspace",value:s})}),await n.remove({key:Ge(e),topic:"finsemble.workspace"}),o.name=t,await n.save({key:Ge(t),topic:"finsemble.workspace",value:o});const{data:r=[]}=await n.getStandardized({key:"finsemble.allWorkspaces",topic:"finsemble.workspace"}),a=r.map(i=>i===e?t:i);await n.save({key:"finsemble.allWorkspaces",topic:"finsemble.workspace",value:a}),await this.setLastUsedWorkspaceName()}async setPreferences(e){const t=this.storageClient;this.logger.debug("data-migration - setting preferences in storage adapter",e),await t.save({key:"userPreferences",topic:"finsemble",value:e})}async setAdvancedAppLauncher(e){const t=this.storageClient;this.logger.debug("data-migration - setting advanced app launcher in storage adapter",e);const i={global:!0,persist:!0,name:"Finsemble-AppLauncher-Store",values:{activeFolder:e.activeFolder,activeTags:e.activeTags,appFolders:{folders:e.folders,list:e.foldersList},sortBy:e.sortBy,dragDisabled:[],appDefinitions:{}}};await t.save({key:"distributedStore-Finsemble-AppLauncher-Store",topic:"finsemble",value:i})}async addUserDefinedComponent(e,t){const i=this.storageClient,{data:n}=await i.getStandardized({key:"distributedStore-Finsemble-AppLauncher-Store",topic:"finsemble"});n&&(this.logger.debug("data-migration - saving user defined component to AAL",e,t),n.values.appDefinitions[e]={appId:e,canDelete:!0,tags:[],type:"Component",url:t},await i.save({key:"distributedStore-Finsemble-AppLauncher-Store",topic:"finsemble",value:n}))}async removeUserDefinedComponent(e){const t=this.storageClient,{data:i}=await t.getStandardized({key:"distributedStore-Finsemble-AppLauncher-Store",topic:"finsemble"});i&&(this.logger.debug("data-migration - removing user defined component to AAL",e),delete i.values.appDefinitions[e],await t.save({key:"distributedStore-Finsemble-AppLauncher-Store",topic:"finsemble",value:i}))}async storageAdapterPersistence(e,t,i){let n=!1,o=!1;e&&this.logger.debug("data-migration - Saving back to storage adapter is enabled at iocd.data.workspaces.saveToStorageAdapter"),await this.glue.interop.register("FSBL.Clients.WorkspaceClient.storageAdapter.save",p(async({workspaces:t},i)=>{e&&await this.saveToStorageAdapter(t)},this.logger)),await this.glue.interop.register("FSBL.Clients.WorkspaceClient.storageAdapter.remove",p(async({workspaces:t},i)=>{e&&await this.removeFromStorageAdapter(t)},this.logger)),await this.glue.interop.register("FSBL.Clients.WorkspaceClient.storageAdapter.order",p(async({workspaces:t},i)=>{e&&await this.setOrderInStorageAdapter(t)},this.logger)),await this.glue.interop.register("FSBL.Clients.WorkspaceClient.storageAdapter.rename",p(async({oldName:t,newName:i},n)=>{e&&await this.renameInStorageAdapter(t,i)},this.logger)),await this.glue.interop.register("FSBL.Clients.AppsClient.addUserDefinedComponent",p(async({name:t,url:n},o)=>{e&&i&&await this.addUserDefinedComponent(t,n)},this.logger)),await this.glue.interop.register("FSBL.Clients.AppsClient.removeUserDefinedComponent",p(async({name:t},n)=>{e&&i&&await this.removeUserDefinedComponent(t)},this.logger)),setTimeout(()=>{this.glue.prefs.subscribeFor("IO.Global.FinsemblePreferences",async e=>{this.logger.debug("data-migration - Updated IO.Global.FinsemblePreferences received",e),n?t&&await this.setPreferences(e.data):n=!0}),this.glue.prefs.subscribeFor("IO.Global.Launcher",async e=>{this.logger.debug("data-migration - Updated IO.Global.Launcher received",e),o?i&&await this.setAdvancedAppLauncher(e.data):o=!0})},2e3)}async run(){var e,t,i,n,o,r,a,s,l,c,d,p,u,h,f,g;this.logger.debug("data-migration - Data migration start");const m=null===(e=this.manifest.iocd)||void 0===e?void 0:e.data;this.logger.debug("data-migration - Migrating config",m);const v=null!==(i=null===(t=null==m?void 0:m.workspaces)||void 0===t?void 0:t.load)&&void 0!==i?i:"storageAdapter",w=null===(o=null===(n=null==m?void 0:m.workspaces)||void 0===n?void 0:n.saveToStorageAdapter)||void 0===o||o,y=null!==(a=null===(r=null==m?void 0:m.preferences)||void 0===r?void 0:r.load)&&void 0!==a?a:"storageAdapter",b=null!==(l=null===(s=null==m?void 0:m.advancedAppLauncher)||void 0===s?void 0:s.load)&&void 0!==l?l:"storageAdapter",S=null===(d=null===(c=null==m?void 0:m.preferences)||void 0===c?void 0:c.saveToStorageAdapter)||void 0===d||d,k=null===(u=null===(p=null==m?void 0:m.advancedAppLauncher)||void 0===p?void 0:p.saveToStorageAdapter)||void 0===u||u,T=new x;this.storageClient=new qe(new Promise(e=>{e(this.glue)}),T,this.logger.loggerClient);const C=await this.glue.prefs.get("IO.Global.FinsembleOneTimeConversion");await this.maybeMigrateWorkspaces(v,null!==(h=null==C?void 0:C.data)&&void 0!==h?h:{}),await this.maybeMigratePreferences(y,null!==(f=null==C?void 0:C.data)&&void 0!==f?f:{}),await this.maybeMigrateAdvancedAppLauncher(b,null!==(g=null==C?void 0:C.data)&&void 0!==g?g:{}),await this.storageAdapterPersistence(w,S,k),this.logger.debug("data-migration - Data migration end")}}class Ze{constructor(e,t,i){this.asyncConstructors=t,this.loggerClient=i,this.subscriptions={};const n=t.addConstructor();e.then(e=>{this.glue=e,t.finishConstructor(n)})}logStatus(e,t,i){He(this.loggerClient,this.glue,{api:"Router.transmit",method:e,type:t,data:i})}addListener(e,t){this.logStatus("addListener","start",{channel:e});let i=null;return(async()=>{var n;await this.asyncConstructors.ready(),i=await this.glue.bus.subscribe(e,(i,n,o)=>{const{peerId:r="Unknown peer"}=o,a={data:i._data,originatedHere:()=>o.peerId===this.glue.interop.instance.peerId,options:{suppressWarnings:!1},header:{type:"transmit",channel:e,incomingTransportInfo:{lastClient:r,origin:r,transportID:"FinsembleTransport"},lastClient:r,origin:r,originMetadata:{routerConnectionId:"",transportInfo:{transportID:"FinsembleTransport"},windowName:"",appId:"",webContentsName:""}}};t(null,a)}),this.subscriptions[e]=(null!==(n=this.subscriptions[e])&&void 0!==n?n:[]).concat({iocdSubscription:i,eventHandler:t})})(),this.logStatus("addListener","return"),()=>{var t;i&&(this.subscriptions[e]=(null!==(t=this.subscriptions.channel)&&void 0!==t?t:[]).filter(e=>e.iocdSubscription!==i),this.subscriptions[e].length||delete this.subscriptions[e],i.unsubscribe())}}removeListener(e,t){this.logStatus("removeListener","start",{channel:e}),(async()=>{var i,n;await this.asyncConstructors.ready(),(null!==(i=this.subscriptions[e])&&void 0!==i?i:[]).forEach(i=>{t&&i.eventHandler!==t||(i.iocdSubscription.unsubscribe(),this.subscriptions[e]=this.subscriptions[e].filter(e=>e!==i))}),(null===(n=this.subscriptions[e])||void 0===n?void 0:n.length)||delete this.subscriptions[e]})(),this.logStatus("removeListener","return")}async transmit(e,t,i){this.logStatus("transmit","start",{toChannel:e}),await this.asyncConstructors.ready();try{await this.glue.bus.publish(e,{_data:t})}catch(e){console.error("Router transmit() error calling invoke",e)}this.logStatus("transmit","return")}}class Je{constructor(e,t,i){this.gluePromise=e,this.asyncConstructors=t,this.loggerClient=i,this.lastSubId=0,this.unsubscribeFunctions={},this.catalogue={},this.gate=new d,this.alreadyRegisteredWithIOCD=!1,this.responders=[];const n=t.addConstructor();e.then(e=>{this.glue=e,this.initialize(),t.finishConstructor(n)})}logStatus(e,t,i){He(this.loggerClient,this.glue,{api:"Router.pubsub",method:e,type:t,data:i})}async initialize(){await this.glue.contexts.subscribe("finsemble-pubsub-catalogue",e=>{this.catalogue=e})}getLocalResponder(e){const t=this.responders.find(t=>t.topic===e),i=this.responders.find(t=>new RegExp(t.topic).test(e));return null!=t?t:i}handleIncomingPublish(e,t,i){var n;e.publishCallback?e.publishCallback(null,{data:t.data,header:t.header,options:t.options,originatedHere:()=>i.peerId===this.glue.interop.instance.peerId,sendNotifyToAllSubscribers:(i,n)=>{var o;i||null===(o=e.updateCallback)||void 0===o||o.call(e,t.topic,n)}}):null===(n=e.updateCallback)||void 0===n||n.call(e,t.topic,t.data)}handleIncomingSubscribe(t,i,n){var o;const r=new e;return t.subscribeCallback?(t.subscribeCallback(null,{data:i.data,header:i.header,options:i.options,originatedHere:()=>n.peerId===t.peerId,sendNotifyToSubscriber:(e,i)=>{r.resolve({error:e||void 0,data:i?{data:i}:void 0,initialData:t.initialState})}}),r.promise):Promise.resolve({data:void 0,initialData:null!==(o=t.initialState)&&void 0!==o?o:{}})}handleIncomingUnsubscribe(t,i,n){var o;const r=new e;return t.unsubscribeCallback?(t.unsubscribeCallback(null,{data:i.data,header:i.header,options:i.options,originatedHere:()=>n.peerId===t.peerId,removeSubscriber:()=>{var e;r.resolve({data:void 0,initialData:null!==(e=t.initialState)&&void 0!==e?e:{}})}}),r.promise):Promise.resolve({data:void 0,initialData:null!==(o=t.initialState)&&void 0!==o?o:{}})}async registerResponder(e,t,i){var n,o,r;const a=e instanceof RegExp?e.source:e;if(this.responders.find(e=>a===e.topic))throw new Error(`Router:registerResponder(): A local responder for topic already exists:'${a}'`);if(this.responders.push({topic:a,initialState:i,updateCallback:(e,t)=>{const i=`finsemble-pubsub-topic-${e}`;this.glue.contexts.set(i,t)},subscribeCallback:null==t?void 0:t.subscribeCallback,unsubscribeCallback:null==t?void 0:t.unsubscribeCallback,publishCallback:null==t?void 0:t.publishCallback,peerId:null!==(n=this.glue.interop.instance.peerId)&&void 0!==n?n:"Unknown peer"}),!this.alreadyRegisteredWithIOCD){const{err:e}=await m(()=>this.glue.interop.register("finsemble-pubsub-responder",p(async(e,t)=>{const i=this.getLocalResponder(e.topic);if(i)if("publish"===e.action)this.handleIncomingPublish(i,e,t);else{if("subscribe"===e.action)return this.handleIncomingSubscribe(i,e,t);if("unsubscribe"===e.action)return this.handleIncomingUnsubscribe(i,e,t)}})));if(e)return{err:e};this.alreadyRegisteredWithIOCD=!0}const s=null!==(o=this.glue.interop.instance.peerId)&&void 0!==o?o:"Unknown peer",l=(null!==(r=this.catalogue[s])&&void 0!==r?r:[]).concat({topic:a,isRegex:e instanceof RegExp,peerId:s}),{err:c}=await m(()=>this.glue.contexts.update("finsemble-pubsub-catalogue",{[s]:l}));return{err:c}}findRemoteResponder(e){const t=e=>this.glue.interop.servers().find(t=>t.peerId===e),i=Object.keys(this.catalogue).filter(e=>!t(e));if(i){let e={};i.forEach(t=>{e[t]=null,delete this.catalogue[t]}),this.glue.contexts.update("finsemble-pubsub-catalogue",e)}const n=Object.keys(this.catalogue).find(t=>this.catalogue[t].find(t=>!t.isRegex&&t.topic===e)),o=Object.keys(this.catalogue).find(t=>this.catalogue[t].find(t=>t.isRegex&&new RegExp(t.topic).test(e)));return null!=n?n:o}subscribe(t,i){this.logStatus("subscribe","start",{topic:t});const n=""+this.lastSubId++;return(async()=>{var o,r,a,s,l,c;await this.asyncConstructors.ready();const d=this.findRemoteResponder(t),p=`finsemble-pubsub-topic-${t}`;let u=!1;const h=await this.glue.contexts.subscribe(p,(e,n,o,r,a)=>{var s;if(!u)return;const l={data:null!==(s=null==e?void 0:e.envelope)&&void 0!==s?s:e,header:{topic:t,type:"",origin:"",subscribeID:""},originatedHere:()=>!a.updateId};i(void 0,l)}),f=async()=>{h();const{err:e}=await v(()=>this.glue.interop.invoke("finsemble-pubsub-responder",{action:"unsubscribe",topic:t,options:{},header:{}},{peerId:d},{waitTimeoutMs:3e4}));e&&this.logStatus("unsubscribe","error",e)};let g=null;if(d){const{err:e,data:n}=await v(()=>this.glue.interop.invoke("finsemble-pubsub-responder",{action:"subscribe",topic:t,options:{},header:{}},{peerId:d},{waitTimeoutMs:3e4}));if(g=null!=n?n:null,e)return f(),void i(e,{})}this.unsubscribeFunctions[n]=f;let m=await this.glue.contexts.get(p);0===Object.keys(m).length&&(m=void 0);const w=this.getLocalResponder(t);let y=null;if(null==w?void 0:w.subscribeCallback){const i=new e;w.subscribeCallback(null,{data:{topic:t},header:{},options:{suppressWarnings:!1},originatedHere:()=>!0,sendNotifyToSubscriber:(e,t)=>{i.resolve(t)}}),y=await i.promise}const b=null!==(s=null!==(a=null!==(r=null!==(o=null==g?void 0:g.data)&&void 0!==o?o:m)&&void 0!==r?r:null==g?void 0:g.initialData)&&void 0!==a?a:y)&&void 0!==s?s:null==w?void 0:w.initialState;i(void 0,{data:null!==(c=null!==(l=null==b?void 0:b.envelope)&&void 0!==l?l:b)&&void 0!==c?c:{},header:{topic:t,type:"",origin:"",subscribeID:""},originatedHere:()=>!1}),u=!0})(),this.logStatus("subscribe","return"),{subscribeID:n,topic:t}}unsubscribe(e){this.logStatus("unsubscribe","start",{subscribeIDStruct:e});const t=this.unsubscribeFunctions[e.subscribeID];t?t():setTimeout(()=>{this.unsubscribe(e)},100),this.logStatus("unsubscribe","return")}async publish(e,t){this.logStatus("publish","start",{topic:e}),await this.asyncConstructors.ready(),await this.gate.wait(async()=>{let i=this.findRemoteResponder(e);const o={envelope:t,transactionID:n()()};if(i){const{err:t}=await v(()=>this.glue.interop.invoke("finsemble-pubsub-responder",{data:o,action:"publish",topic:e,options:{},header:{}},{peerId:i}));t&&this.logStatus("publish","error",t)}else{const t=`finsemble-pubsub-topic-${e}`;this.glue.contexts.set(t,o)}}),this.logStatus("publish","return")}addPubSubResponder(e,t,i,n){return this.logStatus("addPubSubResponder","start",{topic:e}),(async()=>{await this.asyncConstructors.ready();const{err:o}=await this.registerResponder(e,null!=i?i:{},{envelope:t});o&&this.logStatus("addPubSubResponder","error",{topic:e,err:o}),null==n||n(null!=o?o:void 0,o?void 0:"success"),this.logStatus("addPubSubResponder","return")})()}async removePubSubResponder(e){var t,i;this.logStatus("removePubSubResponder","start",{topic:e}),this.responders=this.responders.filter(t=>t.topic!==e);const n=await this.glue.contexts.get("finsemble-pubsub-catalogue"),o=null!==(t=this.glue.interop.instance.peerId)&&void 0!==t?t:"Unknown peer",r=(null!==(i=n[o])&&void 0!==i?i:[]).filter(t=>t.topic!==e),{err:a}=await m(()=>this.glue.contexts.update("finsemble-pubsub-catalogue",{[o]:r}));a&&this.logStatus("removePubSubResponder","error",{err:a}),this.logStatus("removePubSubResponder","return")}trustedMessage(e){return!0}async disconnectAll(){var e;this.logStatus("disconnectAll","start"),await this.asyncConstructors.ready(),Object.values(this.unsubscribeFunctions).forEach(e=>e()),this.unsubscribeFunctions={};const t=null!==(e=this.glue.interop.instance.peerId)&&void 0!==e?e:"Unknown peer";await m(()=>this.glue.contexts.update("finsemble-pubsub-catalogue",{[t]:null})),await m(()=>this.glue.interop.unregister("finsemble-pubsub-responder")),this.responders=[],this.logStatus("disconnectAll","return")}calibrateTimeWithRouterService(e){e(0)}}class Ke{constructor(e,t,i){this.gluePromise=e,this.asyncConstructors=t,this.loggerClient=i;const n=t.addConstructor();e.then(e=>{this.glue=e,t.finishConstructor(n)})}logStatus(e,t,i){He(this.loggerClient,this.glue,{api:"Router.queries",method:e,type:t,data:i})}isInteropEndpointRegistered(e){return this.glue.interop.methods().some(t=>t.name===e)}async addResponder(t,i){if(this.logStatus("addResponder","start",{channel:t}),await this.asyncConstructors.ready(),this.isInteropEndpointRegistered(t)){const e=`addResponder failed because responder already added to ${t}`;throw this.logStatus("addResponder","error",e),new Error(e)}await this.glue.interop.register(t,p(async(n,o)=>{var r,a,s;const l=new e,c={origin:null!==(r=o.instance)&&void 0!==r?r:"Unknown origin",type:"query",queryID:"",channel:t,logWhenNoResponder:!1,error:null,subscribeID:t,lastClient:"",incomingTransportInfo:{lastClient:"",origin:null!==(a=o.instance)&&void 0!==a?a:"",transportID:"FinsembleTransport"}},d={data:null!==(s=null==n?void 0:n["#primitives-wrapper"])&&void 0!==s?s:n,header:c,options:{suppressWarnings:!1},sendQueryResponse:(e,t)=>{const i="object"!=typeof t||Array.isArray(t)?{"#primitives-wrapper":t}:t;l.resolve({err:e,data:i})},originatedHere:()=>{var e,t;return o.windowId===(null!==(t=null===(e=this.glue.windows.my())||void 0===e?void 0:e.id)&&void 0!==t?t:"Unknown or incompatible window type")}};return i(null,d),this.logStatus("addResponder","return"),await l.promise}))}removeResponder(e){this.logStatus("removeResponder","start",{responderChannel:e}),this.glue.interop.unregister(e),this.logStatus("removeResponder","return")}async query(e,t,i,n){var o;this.logStatus("query","start",{channel:e}),await this.asyncConstructors.ready();const r="function"==typeof i?i:n,a="object"!=typeof t||Array.isArray(t)?{"#primitives-wrapper":t}:t,s=null==i?void 0:i.timeout,l=s?{methodResponseTimeoutMs:s}:void 0,c={channel:e,topic:e,type:"",origin:"",subscribeID:e,lastClient:"",incomingTransportInfo:{lastClient:"",origin:"",transportID:"FinsembleTransport"},originMetadata:{routerConnectionId:"",transportInfo:{transportID:"FinsembleTransport"},windowName:"",appId:"",webContentsName:""}};if(!this.isInteropEndpointRegistered(e)){const t=`query failed since no responder on ${e}`;return this.logStatus("query","error",t),null==r||r(t,{header:c}),{err:t,response:{header:c}}}const{err:d,data:p}=await v(()=>this.glue.interop.invoke(e,a,void 0,l)),u={data:null!==(o=null==p?void 0:p["#primitives-wrapper"])&&void 0!==o?o:p,header:c};return this.logStatus("query","return"),null==r||r(d,u),{err:d,response:u}}}class Ye{constructor(e,t,i){this.asyncConstructors=t,this.loggerClient=i,this.transmitter=new Ze(e,this.asyncConstructors,i),this.pubSub=new Je(e,this.asyncConstructors,i),this.queries=new Ke(e,this.asyncConstructors,i)}async onReady(e){await this.asyncConstructors.ready(),null==e||e()}async onFailure(e){}addListener(e,t){return this.transmitter.addListener(e,t)}removeListener(e,t){return this.transmitter.removeListener(e,t)}transmit(e,t,i){return this.transmitter.transmit(e,t,i)}addResponder(e,t){this.queries.addResponder(e,t)}removeResponder(e){this.queries.removeResponder(e)}query(e,t,i,n){return this.queries.query(e,t,i,n)}subscribe(e,t){return this.pubSub.subscribe(e,t)}publish(e,t){return this.pubSub.publish(e,t)}addPubSubResponder(e,t,i,n){return this.pubSub.addPubSubResponder(e,t,i,n)}removePubSubResponder(e){return this.pubSub.removePubSubResponder(e)}unsubscribe(e){this.pubSub.unsubscribe(e)}trustedMessage(e){return this.pubSub.trustedMessage(e)}disconnectAll(){var e;null===(e=this.pubSub)||void 0===e||e.disconnectAll()}}class Qe{warn(...e){globalThis.console.warn(...e)}info(...e){globalThis.console.info(...e)}log(...e){globalThis.console.log(...e)}debug(...e){globalThis.console.debug(...e)}error(...e){globalThis.console.error(...e)}verbose(...e){globalThis.console.debug(...e)}deprecated(...e){globalThis.console.error(...e)}}class Xe{constructor(e,t){this.asyncConstructors=t,this.queue=[],this.logState={Error:!0,Warn:!0,Log:!0,Info:!1,Debug:!1,Verbose:!1,Console:!1},this.componentSelected=!1,this.centralLoggerReady=!1,this.enableLegacyLoggerRecipe=!1,this.routerClient=null;const i=t.addConstructor();e.then(async e=>{var n,o,r,a;this.glue=e;const s=null!==(r=null===(o=null===(n=this.glue.windows)||void 0===n?void 0:n.my())||void 0===o?void 0:o.name)&&void 0!==r?r:"unknown window";await this.glue.contexts.subscribe("central-logger-component-states",({componentLogState:e,componentFilterState:t})=>{s in e&&s in t&&(this.logState=e[s],this.componentSelected=t[s],this.centralLoggerReady=!0,this.processQueue())});const l=await e.contexts.get(c);this.enableLegacyLoggerRecipe=null===(a=l.iocd)||void 0===a?void 0:a.enableLegacyLoggerRecipe,t.finishConstructor(i)}),this.system={warn:(...e)=>{this.logIt("system","Warn",e)},info:(...e)=>{this.logIt("system","Info",e)},log:(...e)=>{this.logIt("system","Log",e)},error:(...e)=>{this.logIt("system","Error",e)},debug:(...e)=>{this.logIt("system","Debug",e)},verbose:(...e)=>{this.logIt("system","Verbose",e)},deprecated:(...e)=>{this.logIt("system","Error",e)}},this.perf={warn:(...e)=>{this.logIt("perf","Warn",e)},info:(...e)=>{this.logIt("perf","Info",e)},log:(...e)=>{this.logIt("perf","Log",e)},error:(...e)=>{this.logIt("perf","Error",e)},debug:(...e)=>{this.logIt("perf","Debug",e)},verbose:(...e)=>{this.logIt("perf","Verbose",e)},deprecated:(...e)=>{this.logIt("perf","Error",e)}},this.console=new Qe}logIt(e,t,i){var n,o,r,a;const s={category:e,logType:t,logClientName:null!==(a=null===(r=null===(o=null===(n=this.glue)||void 0===n?void 0:n.windows)||void 0===o?void 0:o.my())||void 0===r?void 0:r.name)&&void 0!==a?a:"",logData:i,logTimestamp:(new Date).valueOf()};this.queue.push(s),this.processQueue()}async processQueue(){var e;if(!this.centralLoggerReady||0===this.queue.length)return;await this.asyncConstructors.ready();const t=this.queue.slice(0);if(this.queue=[],!this.componentSelected)return;const i=t.filter(e=>this.logState[e.logType]);if(i.length){i.forEach(e=>{var t,i,n,o;e.logClientName=null!==(o=null===(n=null===(i=null===(t=this.glue)||void 0===t?void 0:t.windows)||void 0===i?void 0:i.my())||void 0===n?void 0:n.name)&&void 0!==o?o:""});const t=e=>({Error:"error",Log:"log",Debug:"debug",Info:"info",Warn:"warn",Verbose:"debug",Console:"log"}[e]);this.logState.Console&&i.forEach(e=>this.console[t(e.logType)](...e.logData)),await v(()=>this.glue.interop.invoke("fsbl-logger-service-log-messages",{data:i}));const n=i.filter(e=>"Error"===e.logType||"Warn"===e.logType);this.enableLegacyLoggerRecipe&&n.length&&(null===(e=this.routerClient)||void 0===e||e.transmit("logger.service.logMessages",n.map(e=>({...e,logData:JSON.stringify(e.logData)}))))}}warn(...e){this.logIt("dev","Warn",e)}info(...e){this.logIt("dev","Info",e)}log(...e){this.logIt("dev","Log",e)}debug(...e){this.logIt("dev","Debug",e)}error(...e){this.logIt("dev","Error",e)}verbose(...e){this.logIt("dev","Verbose",e)}deprecated(...e){this.logIt("dev","Error",e)}initialize(e){this.routerClient=e}}const et=async({glue:t,logger:i,workspaceService:n,storageService:o,appService:r,configService:a,notificationService:s,manifest:l})=>{const c=new e,d=new e;await t.interop.register("FSBL.enterBootStage",p(async e=>(async e=>{"post-sso"===e?await(async()=>{i.debug("boot-sequence - runPostSSOStage: Received post-sso boot stage signal."),await t.contexts.set("IO.Global.InUserStage",{inUserStage:!0});const e=await globalThis.glue42gd.getAuth(),{user:n}=null!=e?e:{};n&&await o.setUser({user:n}),i.debug("boot-sequence - runPostSSOStage: Running data migration()");const d=new Ve(t,l,i);await d.run(),i.debug("boot-sequence - runPostSSOStage: Calling appService.loadUserDefinedApps()"),await r.loadUserDefinedApps(),await a.maybeSetScheduledShutdownAndRestart(),await s.initialize(),c.resolve(),i.debug("boot-sequence - runPostSSOStage: Returning response to EnterBootStage app")})():"user"===e?await(async()=>{i.debug("boot-sequence - runUserStage: Received user boot stage signal."),i.debug("boot-sequence - runUserStage: Calling workspaceService.loadWorkspacesPostSSO()"),await n.loadWorkspacesPostSSO(l),i.debug("boot-sequence - runUserStage: Setting context IO.Global.InUserStage to release FSBL preferences API"),d.resolve(),i.debug("boot-sequence - runUserStage: Returning response to EnterBootStage app")})():i.error(`boot-sequence - Received FSBL.enterBootStage for unknown stage "${e}"`)})(null==e?void 0:e.stage),i)),await c.promise,await d.promise};if(globalThis.glue42gd){const e=globalThis.Glue;null==e||e({appManager:"full",bus:!0,layouts:"full"}).then(e=>{(async e=>{var t,i;null===(t=e.windows.my())||void 0===t||t.onClosing(async t=>{var i;t(),null===(i=e.windows.my())||void 0===i||i.hide()}),e.interop.invoke("fsbl-service-started",{});const n=await(null===(i=e.windows.my())||void 0===i?void 0:i.getContext()),o=new x,r=new Xe(new Promise(t=>{t(e)}),o),a=((e,t,i="debug")=>{const n=e.logger.subLogger("fsbl-service");return n.publishLevel(i),{loggerClient:t,trace:(...e)=>{console.trace(...e),n.trace(e.map(e=>oe(e)).join("\n")),null==t||t.verbose(...e)},debug:(...e)=>{console.debug(...e),n.debug(e.map(e=>oe(e)).join("\n")),null==t||t.debug(...e)},info:(...e)=>{console.info(...e),n.info(e.map(e=>oe(e)).join("\n")),null==t||t.info(...e)},warn:(...e)=>{console.warn(...e),n.warn(e.map(e=>oe(e)).join("\n")),null==t||t.warn(...e)},error:(...e)=>{var i;console.error(...e),(null===(i=null==e?void 0:e[1])||void 0===i?void 0:i.stack)?(n.error(`${e[0]}\n${e[1].stack}`),null==t||t.error(e[0],e[1].stack.split("\n"))):(n.warn(e.map(e=>oe(e)).join("\n")),null==t||t.warn(...e))}}})(e,r);if(n){a.debug("boot-sequence - finsembleServiceContext from fsbl-service.details.context",n),await e.contexts.set("$FINSEMBLESERVICECONTEXT",n);try{await(async(e,t,i,n)=>{var o,r,a,s,l,d,p,u;let h=!0;const f=null!==(o=null==t?void 0:t.timeout)&&void 0!==o?o:4e4,g=setInterval(()=>{var t;if(e.windows.list().map(e=>e.name).includes("sso-application"))return void i.info(`boot-sequence - sso-application is running so timeout has been reset another ${f} milliseconds.`);clearInterval(g),h?null===(t=e.windows.my())||void 0===t||t.show():e.notifications.raise({title:"A system error has occurred during startup. Please check fsbl-service console for errors."});const n=`boot-sequence - fsbl-service is taking over ${f} milliseconds to start. Check for dev console errors or increase timeout in manifest under "iocd.timeout".`;i.error(n),console.error(n),document.getElementById("errorMessage").innerText=n},f);i.debug("boot-sequence - Entering pre-sso initialization");const m=new URL("../fsbl-polyfill.umd.js",document.location.href).href;i.debug("Preload url is",m);const w=new Ye(new Promise(t=>{t(e)}),n,i.loggerClient),y=new ze(e,i,w),b=new ye(e,i,w),S=new Re(e,i,t),k=new je(e,i),T=new Le(e,i,w),C=new We(e,i,w),A=new Me(e,i,S,null===(a=null===(r=S.config)||void 0===r?void 0:r.finsemble)||void 0===a?void 0:a.moduleRoot),I=new $e(e,i),_=new Ee(e,i,w),F=new Ue(e,i),P=new Be(e,i),x=new G(e,i,w),R=new Ne(e,i);await y.start(),await b.start(),await P.start(),await S.start();const L=await e.contexts.get(c);y.maybeStartRecipe(L),i.debug("boot-sequence - MANIFEST",L);const W=null!==(l=null===(s=null==L?void 0:L.startup_app)||void 0===s?void 0:s.uuid)&&void 0!==l?l:"Finsemble";h=null===(u=null===(p=null===(d=L.finsemble)||void 0===d?void 0:d.bootConfig)||void 0===p?void 0:p.onErrorMakeSystemManagerVisible)||void 0===u||u,i.debug("boot-sequence - distributedStoreService start"),await I.start(),i.debug("boot-sequence - storageService start"),await k.start({uuid:W,manifest:L}),i.debug("boot-sequence - windowService start"),await C.start({manifest:L}),i.debug("boot-sequence - workspaceService start"),await T.start(),i.debug("boot-sequence - authenticationService start"),await A.start(m),i.debug("boot-sequence - appService start"),await x.start(),i.debug("boot-sequence - notificationService start"),await _.start(),i.debug("boot-sequence - hotkeyService start"),await F.start(L),i.debug("boot-sequence - maybeSetLogToDisk"),await y.maybeSetLogToDisk(L),i.debug("boot-sequence - searchService start"),await R.start(L);const{err:j}=await v(()=>e.interop.invoke("fsbl-service-ready-for-user-stage",{}));j&&i.error("boot-sequence - Error calling fsbl-service-ready-for-user-stage",j),i.debug("boot-sequence - pre-sso initialization complete. Now waiting to enter post-sso boot stage."),await et({glue:e,logger:i,configService:S,workspaceService:T,storageService:k,appService:x,notificationService:_,manifest:L}),i.debug("boot-sequence - post-sso initialization complete. fsbl-service is now fully operational."),clearInterval(g)})(e,n,a,o)}catch(e){throw a.error("boot-sequence - Unhandled exception in service startup",e.toString(),e.stack),e}}else a.error("boot-sequence - No initial context found for fsbl-service. Stopping boot. Ensure that the fsbl-service entry in systemAppStore contains a valid context entry of type FinsembleServiceContext.")})(e),globalThis.iop=e})}})()})();
|
|
2
|
+
(()=>{var e={89:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=89,e.exports=t},575:()=>{},2543:function(e,t,i){var n;e=i.nmd(e),function(){var o,r="Expected a function",a="__lodash_hash_undefined__",s="__lodash_placeholder__",l=32,c=128,d=1/0,p=9007199254740991,u=NaN,h=4294967295,f=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",l],["partialRight",64],["rearg",256]],g="[object Arguments]",m="[object Array]",v="[object Boolean]",w="[object Date]",y="[object Error]",b="[object Function]",S="[object GeneratorFunction]",k="[object Map]",T="[object Number]",A="[object Object]",C="[object Promise]",I="[object RegExp]",_="[object Set]",F="[object String]",P="[object Symbol]",x="[object WeakMap]",R="[object ArrayBuffer]",L="[object DataView]",W="[object Float32Array]",j="[object Float64Array]",O="[object Int8Array]",D="[object Int16Array]",M="[object Int32Array]",$="[object Uint8Array]",E="[object Uint8ClampedArray]",U="[object Uint16Array]",z="[object Uint32Array]",N=/\b__p \+= '';/g,B=/\b(__p \+=) '' \+/g,H=/(__e\(.*?\)|\b__t\)) \+\n'';/g,q=/&(?:amp|lt|gt|quot|#39);/g,G=/[&<>"']/g,V=RegExp(q.source),Z=RegExp(G.source),J=/<%-([\s\S]+?)%>/g,K=/<%([\s\S]+?)%>/g,Y=/<%=([\s\S]+?)%>/g,Q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,X=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,ie=RegExp(te.source),ne=/^\s+/,oe=/\s/,re=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ae=/\{\n\/\* \[wrapped with (.+)\] \*/,se=/,? & /,le=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ce=/[()=,{}\[\]\/\s]/,de=/\\(\\)?/g,pe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ue=/\w*$/,he=/^[-+]0x[0-9a-f]+$/i,fe=/^0b[01]+$/i,ge=/^\[object .+?Constructor\]$/,me=/^0o[0-7]+$/i,ve=/^(?:0|[1-9]\d*)$/,we=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ye=/($^)/,be=/['\n\r\u2028\u2029\\]/g,Se="\\ud800-\\udfff",ke="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Te="\\u2700-\\u27bf",Ae="a-z\\xdf-\\xf6\\xf8-\\xff",Ce="A-Z\\xc0-\\xd6\\xd8-\\xde",Ie="\\ufe0e\\ufe0f",_e="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Fe="["+Se+"]",Pe="["+_e+"]",xe="["+ke+"]",Re="\\d+",Le="["+Te+"]",We="["+Ae+"]",je="[^"+Se+_e+Re+Te+Ae+Ce+"]",Oe="\\ud83c[\\udffb-\\udfff]",De="[^"+Se+"]",Me="(?:\\ud83c[\\udde6-\\uddff]){2}",$e="[\\ud800-\\udbff][\\udc00-\\udfff]",Ee="["+Ce+"]",Ue="\\u200d",ze="(?:"+We+"|"+je+")",Ne="(?:"+Ee+"|"+je+")",Be="(?:['’](?:d|ll|m|re|s|t|ve))?",He="(?:['’](?:D|LL|M|RE|S|T|VE))?",qe="(?:"+xe+"|"+Oe+")?",Ge="["+Ie+"]?",Ve=Ge+qe+"(?:"+Ue+"(?:"+[De,Me,$e].join("|")+")"+Ge+qe+")*",Ze="(?:"+[Le,Me,$e].join("|")+")"+Ve,Je="(?:"+[De+xe+"?",xe,Me,$e,Fe].join("|")+")",Ke=RegExp("['’]","g"),Ye=RegExp(xe,"g"),Qe=RegExp(Oe+"(?="+Oe+")|"+Je+Ve,"g"),Xe=RegExp([Ee+"?"+We+"+"+Be+"(?="+[Pe,Ee,"$"].join("|")+")",Ne+"+"+He+"(?="+[Pe,Ee+ze,"$"].join("|")+")",Ee+"?"+ze+"+"+Be,Ee+"+"+He,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Re,Ze].join("|"),"g"),et=RegExp("["+Ue+Se+ke+Ie+"]"),tt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,it=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],nt=-1,ot={};ot[W]=ot[j]=ot[O]=ot[D]=ot[M]=ot[$]=ot[E]=ot[U]=ot[z]=!0,ot[g]=ot[m]=ot[R]=ot[v]=ot[L]=ot[w]=ot[y]=ot[b]=ot[k]=ot[T]=ot[A]=ot[I]=ot[_]=ot[F]=ot[x]=!1;var rt={};rt[g]=rt[m]=rt[R]=rt[L]=rt[v]=rt[w]=rt[W]=rt[j]=rt[O]=rt[D]=rt[M]=rt[k]=rt[T]=rt[A]=rt[I]=rt[_]=rt[F]=rt[P]=rt[$]=rt[E]=rt[U]=rt[z]=!0,rt[y]=rt[b]=rt[x]=!1;var at={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},st=parseFloat,lt=parseInt,ct="object"==typeof i.g&&i.g&&i.g.Object===Object&&i.g,dt="object"==typeof self&&self&&self.Object===Object&&self,pt=ct||dt||Function("return this")(),ut=t&&!t.nodeType&&t,ht=ut&&e&&!e.nodeType&&e,ft=ht&&ht.exports===ut,gt=ft&&ct.process,mt=function(){try{return ht&&ht.require&&ht.require("util").types||gt&>.binding&>.binding("util")}catch(e){}}(),vt=mt&&mt.isArrayBuffer,wt=mt&&mt.isDate,yt=mt&&mt.isMap,bt=mt&&mt.isRegExp,St=mt&&mt.isSet,kt=mt&&mt.isTypedArray;function Tt(e,t,i){switch(i.length){case 0:return e.call(t);case 1:return e.call(t,i[0]);case 2:return e.call(t,i[0],i[1]);case 3:return e.call(t,i[0],i[1],i[2])}return e.apply(t,i)}function At(e,t,i,n){for(var o=-1,r=null==e?0:e.length;++o<r;){var a=e[o];t(n,a,i(a),e)}return n}function Ct(e,t){for(var i=-1,n=null==e?0:e.length;++i<n&&!1!==t(e[i],i,e););return e}function It(e,t){for(var i=null==e?0:e.length;i--&&!1!==t(e[i],i,e););return e}function _t(e,t){for(var i=-1,n=null==e?0:e.length;++i<n;)if(!t(e[i],i,e))return!1;return!0}function Ft(e,t){for(var i=-1,n=null==e?0:e.length,o=0,r=[];++i<n;){var a=e[i];t(a,i,e)&&(r[o++]=a)}return r}function Pt(e,t){return!(null==e||!e.length)&&Et(e,t,0)>-1}function xt(e,t,i){for(var n=-1,o=null==e?0:e.length;++n<o;)if(i(t,e[n]))return!0;return!1}function Rt(e,t){for(var i=-1,n=null==e?0:e.length,o=Array(n);++i<n;)o[i]=t(e[i],i,e);return o}function Lt(e,t){for(var i=-1,n=t.length,o=e.length;++i<n;)e[o+i]=t[i];return e}function Wt(e,t,i,n){var o=-1,r=null==e?0:e.length;for(n&&r&&(i=e[++o]);++o<r;)i=t(i,e[o],o,e);return i}function jt(e,t,i,n){var o=null==e?0:e.length;for(n&&o&&(i=e[--o]);o--;)i=t(i,e[o],o,e);return i}function Ot(e,t){for(var i=-1,n=null==e?0:e.length;++i<n;)if(t(e[i],i,e))return!0;return!1}var Dt=Bt("length");function Mt(e,t,i){var n;return i(e,function(e,i,o){if(t(e,i,o))return n=i,!1}),n}function $t(e,t,i,n){for(var o=e.length,r=i+(n?1:-1);n?r--:++r<o;)if(t(e[r],r,e))return r;return-1}function Et(e,t,i){return t==t?function(e,t,i){for(var n=i-1,o=e.length;++n<o;)if(e[n]===t)return n;return-1}(e,t,i):$t(e,zt,i)}function Ut(e,t,i,n){for(var o=i-1,r=e.length;++o<r;)if(n(e[o],t))return o;return-1}function zt(e){return e!=e}function Nt(e,t){var i=null==e?0:e.length;return i?Gt(e,t)/i:u}function Bt(e){return function(t){return null==t?o:t[e]}}function Ht(e){return function(t){return null==e?o:e[t]}}function qt(e,t,i,n,o){return o(e,function(e,o,r){i=n?(n=!1,e):t(i,e,o,r)}),i}function Gt(e,t){for(var i,n=-1,r=e.length;++n<r;){var a=t(e[n]);a!==o&&(i=i===o?a:i+a)}return i}function Vt(e,t){for(var i=-1,n=Array(e);++i<e;)n[i]=t(i);return n}function Zt(e){return e?e.slice(0,pi(e)+1).replace(ne,""):e}function Jt(e){return function(t){return e(t)}}function Kt(e,t){return Rt(t,function(t){return e[t]})}function Yt(e,t){return e.has(t)}function Qt(e,t){for(var i=-1,n=e.length;++i<n&&Et(t,e[i],0)>-1;);return i}function Xt(e,t){for(var i=e.length;i--&&Et(t,e[i],0)>-1;);return i}var ei=Ht({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),ti=Ht({"&":"&","<":"<",">":">",'"':""","'":"'"});function ii(e){return"\\"+at[e]}function ni(e){return et.test(e)}function oi(e){var t=-1,i=Array(e.size);return e.forEach(function(e,n){i[++t]=[n,e]}),i}function ri(e,t){return function(i){return e(t(i))}}function ai(e,t){for(var i=-1,n=e.length,o=0,r=[];++i<n;){var a=e[i];a!==t&&a!==s||(e[i]=s,r[o++]=i)}return r}function si(e){var t=-1,i=Array(e.size);return e.forEach(function(e){i[++t]=e}),i}function li(e){var t=-1,i=Array(e.size);return e.forEach(function(e){i[++t]=[e,e]}),i}function ci(e){return ni(e)?function(e){for(var t=Qe.lastIndex=0;Qe.test(e);)++t;return t}(e):Dt(e)}function di(e){return ni(e)?function(e){return e.match(Qe)||[]}(e):function(e){return e.split("")}(e)}function pi(e){for(var t=e.length;t--&&oe.test(e.charAt(t)););return t}var ui=Ht({"&":"&","<":"<",">":">",""":'"',"'":"'"}),hi=function e(t){var i,n=(t=null==t?pt:hi.defaults(pt.Object(),t,hi.pick(pt,it))).Array,oe=t.Date,Se=t.Error,ke=t.Function,Te=t.Math,Ae=t.Object,Ce=t.RegExp,Ie=t.String,_e=t.TypeError,Fe=n.prototype,Pe=ke.prototype,xe=Ae.prototype,Re=t["__core-js_shared__"],Le=Pe.toString,We=xe.hasOwnProperty,je=0,Oe=(i=/[^.]+$/.exec(Re&&Re.keys&&Re.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"",De=xe.toString,Me=Le.call(Ae),$e=pt._,Ee=Ce("^"+Le.call(We).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ue=ft?t.Buffer:o,ze=t.Symbol,Ne=t.Uint8Array,Be=Ue?Ue.allocUnsafe:o,He=ri(Ae.getPrototypeOf,Ae),qe=Ae.create,Ge=xe.propertyIsEnumerable,Ve=Fe.splice,Ze=ze?ze.isConcatSpreadable:o,Je=ze?ze.iterator:o,Qe=ze?ze.toStringTag:o,et=function(){try{var e=cr(Ae,"defineProperty");return e({},"",{}),e}catch(e){}}(),at=t.clearTimeout!==pt.clearTimeout&&t.clearTimeout,ct=oe&&oe.now!==pt.Date.now&&oe.now,dt=t.setTimeout!==pt.setTimeout&&t.setTimeout,ut=Te.ceil,ht=Te.floor,gt=Ae.getOwnPropertySymbols,mt=Ue?Ue.isBuffer:o,Dt=t.isFinite,Ht=Fe.join,fi=ri(Ae.keys,Ae),gi=Te.max,mi=Te.min,vi=oe.now,wi=t.parseInt,yi=Te.random,bi=Fe.reverse,Si=cr(t,"DataView"),ki=cr(t,"Map"),Ti=cr(t,"Promise"),Ai=cr(t,"Set"),Ci=cr(t,"WeakMap"),Ii=cr(Ae,"create"),_i=Ci&&new Ci,Fi={},Pi=Mr(Si),xi=Mr(ki),Ri=Mr(Ti),Li=Mr(Ai),Wi=Mr(Ci),ji=ze?ze.prototype:o,Oi=ji?ji.valueOf:o,Di=ji?ji.toString:o;function Mi(e){if(es(e)&&!Ba(e)&&!(e instanceof zi)){if(e instanceof Ui)return e;if(We.call(e,"__wrapped__"))return $r(e)}return new Ui(e)}var $i=function(){function e(){}return function(t){if(!Xa(t))return{};if(qe)return qe(t);e.prototype=t;var i=new e;return e.prototype=o,i}}();function Ei(){}function Ui(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=o}function zi(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=h,this.__views__=[]}function Ni(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}function Bi(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}function Hi(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}function qi(e){var t=-1,i=null==e?0:e.length;for(this.__data__=new Hi;++t<i;)this.add(e[t])}function Gi(e){var t=this.__data__=new Bi(e);this.size=t.size}function Vi(e,t){var i=Ba(e),n=!i&&Na(e),o=!i&&!n&&Va(e),r=!i&&!n&&!o&&ls(e),a=i||n||o||r,s=a?Vt(e.length,Ie):[],l=s.length;for(var c in e)!t&&!We.call(e,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||r&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||mr(c,l))||s.push(c);return s}function Zi(e){var t=e.length;return t?e[qn(0,t-1)]:o}function Ji(e,t){return Lr(_o(e),rn(t,0,e.length))}function Ki(e){return Lr(_o(e))}function Yi(e,t,i){(i!==o&&!Ea(e[t],i)||i===o&&!(t in e))&&nn(e,t,i)}function Qi(e,t,i){var n=e[t];We.call(e,t)&&Ea(n,i)&&(i!==o||t in e)||nn(e,t,i)}function Xi(e,t){for(var i=e.length;i--;)if(Ea(e[i][0],t))return i;return-1}function en(e,t,i,n){return dn(e,function(e,o,r){t(n,e,i(e),r)}),n}function tn(e,t){return e&&Fo(t,xs(t),e)}function nn(e,t,i){"__proto__"==t&&et?et(e,t,{configurable:!0,enumerable:!0,value:i,writable:!0}):e[t]=i}function on(e,t){for(var i=-1,r=t.length,a=n(r),s=null==e;++i<r;)a[i]=s?o:Cs(e,t[i]);return a}function rn(e,t,i){return e==e&&(i!==o&&(e=e<=i?e:i),t!==o&&(e=e>=t?e:t)),e}function an(e,t,i,n,r,a){var s,l=1&t,c=2&t,d=4&t;if(i&&(s=r?i(e,n,r,a):i(e)),s!==o)return s;if(!Xa(e))return e;var p=Ba(e);if(p){if(s=function(e){var t=e.length,i=new e.constructor(t);return t&&"string"==typeof e[0]&&We.call(e,"index")&&(i.index=e.index,i.input=e.input),i}(e),!l)return _o(e,s)}else{var u=ur(e),h=u==b||u==S;if(Va(e))return So(e,l);if(u==A||u==g||h&&!r){if(s=c||h?{}:fr(e),!l)return c?function(e,t){return Fo(e,pr(e),t)}(e,function(e,t){return e&&Fo(t,Rs(t),e)}(s,e)):function(e,t){return Fo(e,dr(e),t)}(e,tn(s,e))}else{if(!rt[u])return r?e:{};s=function(e,t,i){var n,o=e.constructor;switch(t){case R:return ko(e);case v:case w:return new o(+e);case L:return function(e,t){var i=t?ko(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.byteLength)}(e,i);case W:case j:case O:case D:case M:case $:case E:case U:case z:return To(e,i);case k:return new o;case T:case F:return new o(e);case I:return function(e){var t=new e.constructor(e.source,ue.exec(e));return t.lastIndex=e.lastIndex,t}(e);case _:return new o;case P:return n=e,Oi?Ae(Oi.call(n)):{}}}(e,u,l)}}a||(a=new Gi);var f=a.get(e);if(f)return f;a.set(e,s),rs(e)?e.forEach(function(n){s.add(an(n,t,i,n,e,a))}):ts(e)&&e.forEach(function(n,o){s.set(o,an(n,t,i,o,e,a))});var m=p?o:(d?c?ir:tr:c?Rs:xs)(e);return Ct(m||e,function(n,o){m&&(n=e[o=n]),Qi(s,o,an(n,t,i,o,e,a))}),s}function sn(e,t,i){var n=i.length;if(null==e)return!n;for(e=Ae(e);n--;){var r=i[n],a=t[r],s=e[r];if(s===o&&!(r in e)||!a(s))return!1}return!0}function ln(e,t,i){if("function"!=typeof e)throw new _e(r);return Fr(function(){e.apply(o,i)},t)}function cn(e,t,i,n){var o=-1,r=Pt,a=!0,s=e.length,l=[],c=t.length;if(!s)return l;i&&(t=Rt(t,Jt(i))),n?(r=xt,a=!1):t.length>=200&&(r=Yt,a=!1,t=new qi(t));e:for(;++o<s;){var d=e[o],p=null==i?d:i(d);if(d=n||0!==d?d:0,a&&p==p){for(var u=c;u--;)if(t[u]===p)continue e;l.push(d)}else r(t,p,n)||l.push(d)}return l}Mi.templateSettings={escape:J,evaluate:K,interpolate:Y,variable:"",imports:{_:Mi}},Mi.prototype=Ei.prototype,Mi.prototype.constructor=Mi,Ui.prototype=$i(Ei.prototype),Ui.prototype.constructor=Ui,zi.prototype=$i(Ei.prototype),zi.prototype.constructor=zi,Ni.prototype.clear=function(){this.__data__=Ii?Ii(null):{},this.size=0},Ni.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Ni.prototype.get=function(e){var t=this.__data__;if(Ii){var i=t[e];return i===a?o:i}return We.call(t,e)?t[e]:o},Ni.prototype.has=function(e){var t=this.__data__;return Ii?t[e]!==o:We.call(t,e)},Ni.prototype.set=function(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=Ii&&t===o?a:t,this},Bi.prototype.clear=function(){this.__data__=[],this.size=0},Bi.prototype.delete=function(e){var t=this.__data__,i=Xi(t,e);return!(i<0||(i==t.length-1?t.pop():Ve.call(t,i,1),--this.size,0))},Bi.prototype.get=function(e){var t=this.__data__,i=Xi(t,e);return i<0?o:t[i][1]},Bi.prototype.has=function(e){return Xi(this.__data__,e)>-1},Bi.prototype.set=function(e,t){var i=this.__data__,n=Xi(i,e);return n<0?(++this.size,i.push([e,t])):i[n][1]=t,this},Hi.prototype.clear=function(){this.size=0,this.__data__={hash:new Ni,map:new(ki||Bi),string:new Ni}},Hi.prototype.delete=function(e){var t=sr(this,e).delete(e);return this.size-=t?1:0,t},Hi.prototype.get=function(e){return sr(this,e).get(e)},Hi.prototype.has=function(e){return sr(this,e).has(e)},Hi.prototype.set=function(e,t){var i=sr(this,e),n=i.size;return i.set(e,t),this.size+=i.size==n?0:1,this},qi.prototype.add=qi.prototype.push=function(e){return this.__data__.set(e,a),this},qi.prototype.has=function(e){return this.__data__.has(e)},Gi.prototype.clear=function(){this.__data__=new Bi,this.size=0},Gi.prototype.delete=function(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i},Gi.prototype.get=function(e){return this.__data__.get(e)},Gi.prototype.has=function(e){return this.__data__.has(e)},Gi.prototype.set=function(e,t){var i=this.__data__;if(i instanceof Bi){var n=i.__data__;if(!ki||n.length<199)return n.push([e,t]),this.size=++i.size,this;i=this.__data__=new Hi(n)}return i.set(e,t),this.size=i.size,this};var dn=Ro(wn),pn=Ro(yn,!0);function un(e,t){var i=!0;return dn(e,function(e,n,o){return i=!!t(e,n,o)}),i}function hn(e,t,i){for(var n=-1,r=e.length;++n<r;){var a=e[n],s=t(a);if(null!=s&&(l===o?s==s&&!ss(s):i(s,l)))var l=s,c=a}return c}function fn(e,t){var i=[];return dn(e,function(e,n,o){t(e,n,o)&&i.push(e)}),i}function gn(e,t,i,n,o){var r=-1,a=e.length;for(i||(i=gr),o||(o=[]);++r<a;){var s=e[r];t>0&&i(s)?t>1?gn(s,t-1,i,n,o):Lt(o,s):n||(o[o.length]=s)}return o}var mn=Lo(),vn=Lo(!0);function wn(e,t){return e&&mn(e,t,xs)}function yn(e,t){return e&&vn(e,t,xs)}function bn(e,t){return Ft(t,function(t){return Ka(e[t])})}function Sn(e,t){for(var i=0,n=(t=vo(t,e)).length;null!=e&&i<n;)e=e[Dr(t[i++])];return i&&i==n?e:o}function kn(e,t,i){var n=t(e);return Ba(e)?n:Lt(n,i(e))}function Tn(e){return null==e?e===o?"[object Undefined]":"[object Null]":Qe&&Qe in Ae(e)?function(e){var t=We.call(e,Qe),i=e[Qe];try{e[Qe]=o;var n=!0}catch(e){}var r=De.call(e);return n&&(t?e[Qe]=i:delete e[Qe]),r}(e):function(e){return De.call(e)}(e)}function An(e,t){return e>t}function Cn(e,t){return null!=e&&We.call(e,t)}function In(e,t){return null!=e&&t in Ae(e)}function _n(e,t,i){for(var r=i?xt:Pt,a=e[0].length,s=e.length,l=s,c=n(s),d=1/0,p=[];l--;){var u=e[l];l&&t&&(u=Rt(u,Jt(t))),d=mi(u.length,d),c[l]=!i&&(t||a>=120&&u.length>=120)?new qi(l&&u):o}u=e[0];var h=-1,f=c[0];e:for(;++h<a&&p.length<d;){var g=u[h],m=t?t(g):g;if(g=i||0!==g?g:0,!(f?Yt(f,m):r(p,m,i))){for(l=s;--l;){var v=c[l];if(!(v?Yt(v,m):r(e[l],m,i)))continue e}f&&f.push(m),p.push(g)}}return p}function Fn(e,t,i){var n=null==(e=Cr(e,t=vo(t,e)))?e:e[Dr(Jr(t))];return null==n?o:Tt(n,e,i)}function Pn(e){return es(e)&&Tn(e)==g}function xn(e,t,i,n,r){return e===t||(null==e||null==t||!es(e)&&!es(t)?e!=e&&t!=t:function(e,t,i,n,r,a){var s=Ba(e),l=Ba(t),c=s?m:ur(e),d=l?m:ur(t),p=(c=c==g?A:c)==A,u=(d=d==g?A:d)==A,h=c==d;if(h&&Va(e)){if(!Va(t))return!1;s=!0,p=!1}if(h&&!p)return a||(a=new Gi),s||ls(e)?Xo(e,t,i,n,r,a):function(e,t,i,n,o,r,a){switch(i){case L:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case R:return!(e.byteLength!=t.byteLength||!r(new Ne(e),new Ne(t)));case v:case w:case T:return Ea(+e,+t);case y:return e.name==t.name&&e.message==t.message;case I:case F:return e==t+"";case k:var s=oi;case _:var l=1&n;if(s||(s=si),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;n|=2,a.set(e,t);var d=Xo(s(e),s(t),n,o,r,a);return a.delete(e),d;case P:if(Oi)return Oi.call(e)==Oi.call(t)}return!1}(e,t,c,i,n,r,a);if(!(1&i)){var f=p&&We.call(e,"__wrapped__"),b=u&&We.call(t,"__wrapped__");if(f||b){var S=f?e.value():e,C=b?t.value():t;return a||(a=new Gi),r(S,C,i,n,a)}}return!!h&&(a||(a=new Gi),function(e,t,i,n,r,a){var s=1&i,l=tr(e),c=l.length;if(c!=tr(t).length&&!s)return!1;for(var d=c;d--;){var p=l[d];if(!(s?p in t:We.call(t,p)))return!1}var u=a.get(e),h=a.get(t);if(u&&h)return u==t&&h==e;var f=!0;a.set(e,t),a.set(t,e);for(var g=s;++d<c;){var m=e[p=l[d]],v=t[p];if(n)var w=s?n(v,m,p,t,e,a):n(m,v,p,e,t,a);if(!(w===o?m===v||r(m,v,i,n,a):w)){f=!1;break}g||(g="constructor"==p)}if(f&&!g){var y=e.constructor,b=t.constructor;y==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b||(f=!1)}return a.delete(e),a.delete(t),f}(e,t,i,n,r,a))}(e,t,i,n,xn,r))}function Rn(e,t,i,n){var r=i.length,a=r,s=!n;if(null==e)return!a;for(e=Ae(e);r--;){var l=i[r];if(s&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++r<a;){var c=(l=i[r])[0],d=e[c],p=l[1];if(s&&l[2]){if(d===o&&!(c in e))return!1}else{var u=new Gi;if(n)var h=n(d,p,c,e,t,u);if(!(h===o?xn(p,d,3,n,u):h))return!1}}return!0}function Ln(e){return!(!Xa(e)||(t=e,Oe&&Oe in t))&&(Ka(e)?Ee:ge).test(Mr(e));var t}function Wn(e){return"function"==typeof e?e:null==e?il:"object"==typeof e?Ba(e)?$n(e[0],e[1]):Mn(e):pl(e)}function jn(e){if(!Sr(e))return fi(e);var t=[];for(var i in Ae(e))We.call(e,i)&&"constructor"!=i&&t.push(i);return t}function On(e,t){return e<t}function Dn(e,t){var i=-1,o=qa(e)?n(e.length):[];return dn(e,function(e,n,r){o[++i]=t(e,n,r)}),o}function Mn(e){var t=lr(e);return 1==t.length&&t[0][2]?Tr(t[0][0],t[0][1]):function(i){return i===e||Rn(i,e,t)}}function $n(e,t){return wr(e)&&kr(t)?Tr(Dr(e),t):function(i){var n=Cs(i,e);return n===o&&n===t?Is(i,e):xn(t,n,3)}}function En(e,t,i,n,r){e!==t&&mn(t,function(a,s){if(r||(r=new Gi),Xa(a))!function(e,t,i,n,r,a,s){var l=Ir(e,i),c=Ir(t,i),d=s.get(c);if(d)Yi(e,i,d);else{var p=a?a(l,c,i+"",e,t,s):o,u=p===o;if(u){var h=Ba(c),f=!h&&Va(c),g=!h&&!f&&ls(c);p=c,h||f||g?Ba(l)?p=l:Ga(l)?p=_o(l):f?(u=!1,p=So(c,!0)):g?(u=!1,p=To(c,!0)):p=[]:ns(c)||Na(c)?(p=l,Na(l)?p=ms(l):Xa(l)&&!Ka(l)||(p=fr(c))):u=!1}u&&(s.set(c,p),r(p,c,n,a,s),s.delete(c)),Yi(e,i,p)}}(e,t,s,i,En,n,r);else{var l=n?n(Ir(e,s),a,s+"",e,t,r):o;l===o&&(l=a),Yi(e,s,l)}},Rs)}function Un(e,t){var i=e.length;if(i)return mr(t+=t<0?i:0,i)?e[t]:o}function zn(e,t,i){t=t.length?Rt(t,function(e){return Ba(e)?function(t){return Sn(t,1===e.length?e[0]:e)}:e}):[il];var n=-1;t=Rt(t,Jt(ar()));var o=Dn(e,function(e,i,o){var r=Rt(t,function(t){return t(e)});return{criteria:r,index:++n,value:e}});return function(e){var t=e.length;for(e.sort(function(e,t){return function(e,t,i){for(var n=-1,o=e.criteria,r=t.criteria,a=o.length,s=i.length;++n<a;){var l=Ao(o[n],r[n]);if(l)return n>=s?l:l*("desc"==i[n]?-1:1)}return e.index-t.index}(e,t,i)});t--;)e[t]=e[t].value;return e}(o)}function Nn(e,t,i){for(var n=-1,o=t.length,r={};++n<o;){var a=t[n],s=Sn(e,a);i(s,a)&&Kn(r,vo(a,e),s)}return r}function Bn(e,t,i,n){var o=n?Ut:Et,r=-1,a=t.length,s=e;for(e===t&&(t=_o(t)),i&&(s=Rt(e,Jt(i)));++r<a;)for(var l=0,c=t[r],d=i?i(c):c;(l=o(s,d,l,n))>-1;)s!==e&&Ve.call(s,l,1),Ve.call(e,l,1);return e}function Hn(e,t){for(var i=e?t.length:0,n=i-1;i--;){var o=t[i];if(i==n||o!==r){var r=o;mr(o)?Ve.call(e,o,1):lo(e,o)}}return e}function qn(e,t){return e+ht(yi()*(t-e+1))}function Gn(e,t){var i="";if(!e||t<1||t>p)return i;do{t%2&&(i+=e),(t=ht(t/2))&&(e+=e)}while(t);return i}function Vn(e,t){return Pr(Ar(e,t,il),e+"")}function Zn(e){return Zi(Es(e))}function Jn(e,t){var i=Es(e);return Lr(i,rn(t,0,i.length))}function Kn(e,t,i,n){if(!Xa(e))return e;for(var r=-1,a=(t=vo(t,e)).length,s=a-1,l=e;null!=l&&++r<a;){var c=Dr(t[r]),d=i;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(r!=s){var p=l[c];(d=n?n(p,c,l):o)===o&&(d=Xa(p)?p:mr(t[r+1])?[]:{})}Qi(l,c,d),l=l[c]}return e}var Yn=_i?function(e,t){return _i.set(e,t),e}:il,Qn=et?function(e,t){return et(e,"toString",{configurable:!0,enumerable:!1,value:Xs(t),writable:!0})}:il;function Xn(e){return Lr(Es(e))}function eo(e,t,i){var o=-1,r=e.length;t<0&&(t=-t>r?0:r+t),(i=i>r?r:i)<0&&(i+=r),r=t>i?0:i-t>>>0,t>>>=0;for(var a=n(r);++o<r;)a[o]=e[o+t];return a}function to(e,t){var i;return dn(e,function(e,n,o){return!(i=t(e,n,o))}),!!i}function io(e,t,i){var n=0,o=null==e?n:e.length;if("number"==typeof t&&t==t&&o<=2147483647){for(;n<o;){var r=n+o>>>1,a=e[r];null!==a&&!ss(a)&&(i?a<=t:a<t)?n=r+1:o=r}return o}return no(e,t,il,i)}function no(e,t,i,n){var r=0,a=null==e?0:e.length;if(0===a)return 0;for(var s=(t=i(t))!=t,l=null===t,c=ss(t),d=t===o;r<a;){var p=ht((r+a)/2),u=i(e[p]),h=u!==o,f=null===u,g=u==u,m=ss(u);if(s)var v=n||g;else v=d?g&&(n||h):l?g&&h&&(n||!f):c?g&&h&&!f&&(n||!m):!f&&!m&&(n?u<=t:u<t);v?r=p+1:a=p}return mi(a,4294967294)}function oo(e,t){for(var i=-1,n=e.length,o=0,r=[];++i<n;){var a=e[i],s=t?t(a):a;if(!i||!Ea(s,l)){var l=s;r[o++]=0===a?0:a}}return r}function ro(e){return"number"==typeof e?e:ss(e)?u:+e}function ao(e){if("string"==typeof e)return e;if(Ba(e))return Rt(e,ao)+"";if(ss(e))return Di?Di.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function so(e,t,i){var n=-1,o=Pt,r=e.length,a=!0,s=[],l=s;if(i)a=!1,o=xt;else if(r>=200){var c=t?null:Vo(e);if(c)return si(c);a=!1,o=Yt,l=new qi}else l=t?[]:s;e:for(;++n<r;){var d=e[n],p=t?t(d):d;if(d=i||0!==d?d:0,a&&p==p){for(var u=l.length;u--;)if(l[u]===p)continue e;t&&l.push(p),s.push(d)}else o(l,p,i)||(l!==s&&l.push(p),s.push(d))}return s}function lo(e,t){return null==(e=Cr(e,t=vo(t,e)))||delete e[Dr(Jr(t))]}function co(e,t,i,n){return Kn(e,t,i(Sn(e,t)),n)}function po(e,t,i,n){for(var o=e.length,r=n?o:-1;(n?r--:++r<o)&&t(e[r],r,e););return i?eo(e,n?0:r,n?r+1:o):eo(e,n?r+1:0,n?o:r)}function uo(e,t){var i=e;return i instanceof zi&&(i=i.value()),Wt(t,function(e,t){return t.func.apply(t.thisArg,Lt([e],t.args))},i)}function ho(e,t,i){var o=e.length;if(o<2)return o?so(e[0]):[];for(var r=-1,a=n(o);++r<o;)for(var s=e[r],l=-1;++l<o;)l!=r&&(a[r]=cn(a[r]||s,e[l],t,i));return so(gn(a,1),t,i)}function fo(e,t,i){for(var n=-1,r=e.length,a=t.length,s={};++n<r;){var l=n<a?t[n]:o;i(s,e[n],l)}return s}function go(e){return Ga(e)?e:[]}function mo(e){return"function"==typeof e?e:il}function vo(e,t){return Ba(e)?e:wr(e,t)?[e]:Or(vs(e))}var wo=Vn;function yo(e,t,i){var n=e.length;return i=i===o?n:i,!t&&i>=n?e:eo(e,t,i)}var bo=at||function(e){return pt.clearTimeout(e)};function So(e,t){if(t)return e.slice();var i=e.length,n=Be?Be(i):new e.constructor(i);return e.copy(n),n}function ko(e){var t=new e.constructor(e.byteLength);return new Ne(t).set(new Ne(e)),t}function To(e,t){var i=t?ko(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.length)}function Ao(e,t){if(e!==t){var i=e!==o,n=null===e,r=e==e,a=ss(e),s=t!==o,l=null===t,c=t==t,d=ss(t);if(!l&&!d&&!a&&e>t||a&&s&&c&&!l&&!d||n&&s&&c||!i&&c||!r)return 1;if(!n&&!a&&!d&&e<t||d&&i&&r&&!n&&!a||l&&i&&r||!s&&r||!c)return-1}return 0}function Co(e,t,i,o){for(var r=-1,a=e.length,s=i.length,l=-1,c=t.length,d=gi(a-s,0),p=n(c+d),u=!o;++l<c;)p[l]=t[l];for(;++r<s;)(u||r<a)&&(p[i[r]]=e[r]);for(;d--;)p[l++]=e[r++];return p}function Io(e,t,i,o){for(var r=-1,a=e.length,s=-1,l=i.length,c=-1,d=t.length,p=gi(a-l,0),u=n(p+d),h=!o;++r<p;)u[r]=e[r];for(var f=r;++c<d;)u[f+c]=t[c];for(;++s<l;)(h||r<a)&&(u[f+i[s]]=e[r++]);return u}function _o(e,t){var i=-1,o=e.length;for(t||(t=n(o));++i<o;)t[i]=e[i];return t}function Fo(e,t,i,n){var r=!i;i||(i={});for(var a=-1,s=t.length;++a<s;){var l=t[a],c=n?n(i[l],e[l],l,i,e):o;c===o&&(c=e[l]),r?nn(i,l,c):Qi(i,l,c)}return i}function Po(e,t){return function(i,n){var o=Ba(i)?At:en,r=t?t():{};return o(i,e,ar(n,2),r)}}function xo(e){return Vn(function(t,i){var n=-1,r=i.length,a=r>1?i[r-1]:o,s=r>2?i[2]:o;for(a=e.length>3&&"function"==typeof a?(r--,a):o,s&&vr(i[0],i[1],s)&&(a=r<3?o:a,r=1),t=Ae(t);++n<r;){var l=i[n];l&&e(t,l,n,a)}return t})}function Ro(e,t){return function(i,n){if(null==i)return i;if(!qa(i))return e(i,n);for(var o=i.length,r=t?o:-1,a=Ae(i);(t?r--:++r<o)&&!1!==n(a[r],r,a););return i}}function Lo(e){return function(t,i,n){for(var o=-1,r=Ae(t),a=n(t),s=a.length;s--;){var l=a[e?s:++o];if(!1===i(r[l],l,r))break}return t}}function Wo(e){return function(t){var i=ni(t=vs(t))?di(t):o,n=i?i[0]:t.charAt(0),r=i?yo(i,1).join(""):t.slice(1);return n[e]()+r}}function jo(e){return function(t){return Wt(Ks(Ns(t).replace(Ke,"")),e,"")}}function Oo(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var i=$i(e.prototype),n=e.apply(i,t);return Xa(n)?n:i}}function Do(e){return function(t,i,n){var r=Ae(t);if(!qa(t)){var a=ar(i,3);t=xs(t),i=function(e){return a(r[e],e,r)}}var s=e(t,i,n);return s>-1?r[a?t[s]:s]:o}}function Mo(e){return er(function(t){var i=t.length,n=i,a=Ui.prototype.thru;for(e&&t.reverse();n--;){var s=t[n];if("function"!=typeof s)throw new _e(r);if(a&&!l&&"wrapper"==or(s))var l=new Ui([],!0)}for(n=l?n:i;++n<i;){var c=or(s=t[n]),d="wrapper"==c?nr(s):o;l=d&&yr(d[0])&&424==d[1]&&!d[4].length&&1==d[9]?l[or(d[0])].apply(l,d[3]):1==s.length&&yr(s)?l[c]():l.thru(s)}return function(){var e=arguments,n=e[0];if(l&&1==e.length&&Ba(n))return l.plant(n).value();for(var o=0,r=i?t[o].apply(this,e):n;++o<i;)r=t[o].call(this,r);return r}})}function $o(e,t,i,r,a,s,l,d,p,u){var h=t&c,f=1&t,g=2&t,m=24&t,v=512&t,w=g?o:Oo(e);return function c(){for(var y=arguments.length,b=n(y),S=y;S--;)b[S]=arguments[S];if(m)var k=rr(c),T=function(e,t){for(var i=e.length,n=0;i--;)e[i]===t&&++n;return n}(b,k);if(r&&(b=Co(b,r,a,m)),s&&(b=Io(b,s,l,m)),y-=T,m&&y<u){var A=ai(b,k);return qo(e,t,$o,c.placeholder,i,b,A,d,p,u-y)}var C=f?i:this,I=g?C[e]:e;return y=b.length,d?b=function(e,t){for(var i=e.length,n=mi(t.length,i),r=_o(e);n--;){var a=t[n];e[n]=mr(a,i)?r[a]:o}return e}(b,d):v&&y>1&&b.reverse(),h&&p<y&&(b.length=p),this&&this!==pt&&this instanceof c&&(I=w||Oo(I)),I.apply(C,b)}}function Eo(e,t){return function(i,n){return function(e,t,i,n){return wn(e,function(e,o,r){t(n,i(e),o,r)}),n}(i,e,t(n),{})}}function Uo(e,t){return function(i,n){var r;if(i===o&&n===o)return t;if(i!==o&&(r=i),n!==o){if(r===o)return n;"string"==typeof i||"string"==typeof n?(i=ao(i),n=ao(n)):(i=ro(i),n=ro(n)),r=e(i,n)}return r}}function zo(e){return er(function(t){return t=Rt(t,Jt(ar())),Vn(function(i){var n=this;return e(t,function(e){return Tt(e,n,i)})})})}function No(e,t){var i=(t=t===o?" ":ao(t)).length;if(i<2)return i?Gn(t,e):t;var n=Gn(t,ut(e/ci(t)));return ni(t)?yo(di(n),0,e).join(""):n.slice(0,e)}function Bo(e){return function(t,i,r){return r&&"number"!=typeof r&&vr(t,i,r)&&(i=r=o),t=us(t),i===o?(i=t,t=0):i=us(i),function(e,t,i,o){for(var r=-1,a=gi(ut((t-e)/(i||1)),0),s=n(a);a--;)s[o?a:++r]=e,e+=i;return s}(t,i,r=r===o?t<i?1:-1:us(r),e)}}function Ho(e){return function(t,i){return"string"==typeof t&&"string"==typeof i||(t=gs(t),i=gs(i)),e(t,i)}}function qo(e,t,i,n,r,a,s,c,d,p){var u=8&t;t|=u?l:64,4&(t&=~(u?64:l))||(t&=-4);var h=[e,t,r,u?a:o,u?s:o,u?o:a,u?o:s,c,d,p],f=i.apply(o,h);return yr(e)&&_r(f,h),f.placeholder=n,xr(f,e,t)}function Go(e){var t=Te[e];return function(e,i){if(e=gs(e),(i=null==i?0:mi(hs(i),292))&&Dt(e)){var n=(vs(e)+"e").split("e");return+((n=(vs(t(n[0]+"e"+(+n[1]+i)))+"e").split("e"))[0]+"e"+(+n[1]-i))}return t(e)}}var Vo=Ai&&1/si(new Ai([,-0]))[1]==d?function(e){return new Ai(e)}:sl;function Zo(e){return function(t){var i=ur(t);return i==k?oi(t):i==_?li(t):function(e,t){return Rt(t,function(t){return[t,e[t]]})}(t,e(t))}}function Jo(e,t,i,a,d,p,u,h){var f=2&t;if(!f&&"function"!=typeof e)throw new _e(r);var g=a?a.length:0;if(g||(t&=-97,a=d=o),u=u===o?u:gi(hs(u),0),h=h===o?h:hs(h),g-=d?d.length:0,64&t){var m=a,v=d;a=d=o}var w=f?o:nr(e),y=[e,t,i,a,d,m,v,p,u,h];if(w&&function(e,t){var i=e[1],n=t[1],o=i|n,r=o<131,a=n==c&&8==i||n==c&&256==i&&e[7].length<=t[8]||384==n&&t[7].length<=t[8]&&8==i;if(!r&&!a)return e;1&n&&(e[2]=t[2],o|=1&i?0:4);var l=t[3];if(l){var d=e[3];e[3]=d?Co(d,l,t[4]):l,e[4]=d?ai(e[3],s):t[4]}(l=t[5])&&(d=e[5],e[5]=d?Io(d,l,t[6]):l,e[6]=d?ai(e[5],s):t[6]),(l=t[7])&&(e[7]=l),n&c&&(e[8]=null==e[8]?t[8]:mi(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=o}(y,w),e=y[0],t=y[1],i=y[2],a=y[3],d=y[4],!(h=y[9]=y[9]===o?f?0:e.length:gi(y[9]-g,0))&&24&t&&(t&=-25),t&&1!=t)b=8==t||16==t?function(e,t,i){var r=Oo(e);return function a(){for(var s=arguments.length,l=n(s),c=s,d=rr(a);c--;)l[c]=arguments[c];var p=s<3&&l[0]!==d&&l[s-1]!==d?[]:ai(l,d);return(s-=p.length)<i?qo(e,t,$o,a.placeholder,o,l,p,o,o,i-s):Tt(this&&this!==pt&&this instanceof a?r:e,this,l)}}(e,t,h):t!=l&&33!=t||d.length?$o.apply(o,y):function(e,t,i,o){var r=1&t,a=Oo(e);return function t(){for(var s=-1,l=arguments.length,c=-1,d=o.length,p=n(d+l),u=this&&this!==pt&&this instanceof t?a:e;++c<d;)p[c]=o[c];for(;l--;)p[c++]=arguments[++s];return Tt(u,r?i:this,p)}}(e,t,i,a);else var b=function(e,t,i){var n=1&t,o=Oo(e);return function t(){return(this&&this!==pt&&this instanceof t?o:e).apply(n?i:this,arguments)}}(e,t,i);return xr((w?Yn:_r)(b,y),e,t)}function Ko(e,t,i,n){return e===o||Ea(e,xe[i])&&!We.call(n,i)?t:e}function Yo(e,t,i,n,r,a){return Xa(e)&&Xa(t)&&(a.set(t,e),En(e,t,o,Yo,a),a.delete(t)),e}function Qo(e){return ns(e)?o:e}function Xo(e,t,i,n,r,a){var s=1&i,l=e.length,c=t.length;if(l!=c&&!(s&&c>l))return!1;var d=a.get(e),p=a.get(t);if(d&&p)return d==t&&p==e;var u=-1,h=!0,f=2&i?new qi:o;for(a.set(e,t),a.set(t,e);++u<l;){var g=e[u],m=t[u];if(n)var v=s?n(m,g,u,t,e,a):n(g,m,u,e,t,a);if(v!==o){if(v)continue;h=!1;break}if(f){if(!Ot(t,function(e,t){if(!Yt(f,t)&&(g===e||r(g,e,i,n,a)))return f.push(t)})){h=!1;break}}else if(g!==m&&!r(g,m,i,n,a)){h=!1;break}}return a.delete(e),a.delete(t),h}function er(e){return Pr(Ar(e,o,Hr),e+"")}function tr(e){return kn(e,xs,dr)}function ir(e){return kn(e,Rs,pr)}var nr=_i?function(e){return _i.get(e)}:sl;function or(e){for(var t=e.name+"",i=Fi[t],n=We.call(Fi,t)?i.length:0;n--;){var o=i[n],r=o.func;if(null==r||r==e)return o.name}return t}function rr(e){return(We.call(Mi,"placeholder")?Mi:e).placeholder}function ar(){var e=Mi.iteratee||nl;return e=e===nl?Wn:e,arguments.length?e(arguments[0],arguments[1]):e}function sr(e,t){var i,n,o=e.__data__;return("string"==(n=typeof(i=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==i:null===i)?o["string"==typeof t?"string":"hash"]:o.map}function lr(e){for(var t=xs(e),i=t.length;i--;){var n=t[i],o=e[n];t[i]=[n,o,kr(o)]}return t}function cr(e,t){var i=function(e,t){return null==e?o:e[t]}(e,t);return Ln(i)?i:o}var dr=gt?function(e){return null==e?[]:(e=Ae(e),Ft(gt(e),function(t){return Ge.call(e,t)}))}:fl,pr=gt?function(e){for(var t=[];e;)Lt(t,dr(e)),e=He(e);return t}:fl,ur=Tn;function hr(e,t,i){for(var n=-1,o=(t=vo(t,e)).length,r=!1;++n<o;){var a=Dr(t[n]);if(!(r=null!=e&&i(e,a)))break;e=e[a]}return r||++n!=o?r:!!(o=null==e?0:e.length)&&Qa(o)&&mr(a,o)&&(Ba(e)||Na(e))}function fr(e){return"function"!=typeof e.constructor||Sr(e)?{}:$i(He(e))}function gr(e){return Ba(e)||Na(e)||!!(Ze&&e&&e[Ze])}function mr(e,t){var i=typeof e;return!!(t=null==t?p:t)&&("number"==i||"symbol"!=i&&ve.test(e))&&e>-1&&e%1==0&&e<t}function vr(e,t,i){if(!Xa(i))return!1;var n=typeof t;return!!("number"==n?qa(i)&&mr(t,i.length):"string"==n&&t in i)&&Ea(i[t],e)}function wr(e,t){if(Ba(e))return!1;var i=typeof e;return!("number"!=i&&"symbol"!=i&&"boolean"!=i&&null!=e&&!ss(e))||X.test(e)||!Q.test(e)||null!=t&&e in Ae(t)}function yr(e){var t=or(e),i=Mi[t];if("function"!=typeof i||!(t in zi.prototype))return!1;if(e===i)return!0;var n=nr(i);return!!n&&e===n[0]}(Si&&ur(new Si(new ArrayBuffer(1)))!=L||ki&&ur(new ki)!=k||Ti&&ur(Ti.resolve())!=C||Ai&&ur(new Ai)!=_||Ci&&ur(new Ci)!=x)&&(ur=function(e){var t=Tn(e),i=t==A?e.constructor:o,n=i?Mr(i):"";if(n)switch(n){case Pi:return L;case xi:return k;case Ri:return C;case Li:return _;case Wi:return x}return t});var br=Re?Ka:gl;function Sr(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||xe)}function kr(e){return e==e&&!Xa(e)}function Tr(e,t){return function(i){return null!=i&&i[e]===t&&(t!==o||e in Ae(i))}}function Ar(e,t,i){return t=gi(t===o?e.length-1:t,0),function(){for(var o=arguments,r=-1,a=gi(o.length-t,0),s=n(a);++r<a;)s[r]=o[t+r];r=-1;for(var l=n(t+1);++r<t;)l[r]=o[r];return l[t]=i(s),Tt(e,this,l)}}function Cr(e,t){return t.length<2?e:Sn(e,eo(t,0,-1))}function Ir(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var _r=Rr(Yn),Fr=dt||function(e,t){return pt.setTimeout(e,t)},Pr=Rr(Qn);function xr(e,t,i){var n=t+"";return Pr(e,function(e,t){var i=t.length;if(!i)return e;var n=i-1;return t[n]=(i>1?"& ":"")+t[n],t=t.join(i>2?", ":" "),e.replace(re,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){return Ct(f,function(i){var n="_."+i[0];t&i[1]&&!Pt(e,n)&&e.push(n)}),e.sort()}(function(e){var t=e.match(ae);return t?t[1].split(se):[]}(n),i)))}function Rr(e){var t=0,i=0;return function(){var n=vi(),r=16-(n-i);if(i=n,r>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(o,arguments)}}function Lr(e,t){var i=-1,n=e.length,r=n-1;for(t=t===o?n:t;++i<t;){var a=qn(i,r),s=e[a];e[a]=e[i],e[i]=s}return e.length=t,e}var Wr,jr,Or=(Wr=Wa(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,function(e,i,n,o){t.push(n?o.replace(de,"$1"):i||e)}),t},function(e){return 500===jr.size&&jr.clear(),e}),jr=Wr.cache,Wr);function Dr(e){if("string"==typeof e||ss(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Mr(e){if(null!=e){try{return Le.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function $r(e){if(e instanceof zi)return e.clone();var t=new Ui(e.__wrapped__,e.__chain__);return t.__actions__=_o(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Er=Vn(function(e,t){return Ga(e)?cn(e,gn(t,1,Ga,!0)):[]}),Ur=Vn(function(e,t){var i=Jr(t);return Ga(i)&&(i=o),Ga(e)?cn(e,gn(t,1,Ga,!0),ar(i,2)):[]}),zr=Vn(function(e,t){var i=Jr(t);return Ga(i)&&(i=o),Ga(e)?cn(e,gn(t,1,Ga,!0),o,i):[]});function Nr(e,t,i){var n=null==e?0:e.length;if(!n)return-1;var o=null==i?0:hs(i);return o<0&&(o=gi(n+o,0)),$t(e,ar(t,3),o)}function Br(e,t,i){var n=null==e?0:e.length;if(!n)return-1;var r=n-1;return i!==o&&(r=hs(i),r=i<0?gi(n+r,0):mi(r,n-1)),$t(e,ar(t,3),r,!0)}function Hr(e){return null!=e&&e.length?gn(e,1):[]}function qr(e){return e&&e.length?e[0]:o}var Gr=Vn(function(e){var t=Rt(e,go);return t.length&&t[0]===e[0]?_n(t):[]}),Vr=Vn(function(e){var t=Jr(e),i=Rt(e,go);return t===Jr(i)?t=o:i.pop(),i.length&&i[0]===e[0]?_n(i,ar(t,2)):[]}),Zr=Vn(function(e){var t=Jr(e),i=Rt(e,go);return(t="function"==typeof t?t:o)&&i.pop(),i.length&&i[0]===e[0]?_n(i,o,t):[]});function Jr(e){var t=null==e?0:e.length;return t?e[t-1]:o}var Kr=Vn(Yr);function Yr(e,t){return e&&e.length&&t&&t.length?Bn(e,t):e}var Qr=er(function(e,t){var i=null==e?0:e.length,n=on(e,t);return Hn(e,Rt(t,function(e){return mr(e,i)?+e:e}).sort(Ao)),n});function Xr(e){return null==e?e:bi.call(e)}var ea=Vn(function(e){return so(gn(e,1,Ga,!0))}),ta=Vn(function(e){var t=Jr(e);return Ga(t)&&(t=o),so(gn(e,1,Ga,!0),ar(t,2))}),ia=Vn(function(e){var t=Jr(e);return t="function"==typeof t?t:o,so(gn(e,1,Ga,!0),o,t)});function na(e){if(!e||!e.length)return[];var t=0;return e=Ft(e,function(e){if(Ga(e))return t=gi(e.length,t),!0}),Vt(t,function(t){return Rt(e,Bt(t))})}function oa(e,t){if(!e||!e.length)return[];var i=na(e);return null==t?i:Rt(i,function(e){return Tt(t,o,e)})}var ra=Vn(function(e,t){return Ga(e)?cn(e,t):[]}),aa=Vn(function(e){return ho(Ft(e,Ga))}),sa=Vn(function(e){var t=Jr(e);return Ga(t)&&(t=o),ho(Ft(e,Ga),ar(t,2))}),la=Vn(function(e){var t=Jr(e);return t="function"==typeof t?t:o,ho(Ft(e,Ga),o,t)}),ca=Vn(na),da=Vn(function(e){var t=e.length,i=t>1?e[t-1]:o;return i="function"==typeof i?(e.pop(),i):o,oa(e,i)});function pa(e){var t=Mi(e);return t.__chain__=!0,t}function ua(e,t){return t(e)}var ha=er(function(e){var t=e.length,i=t?e[0]:0,n=this.__wrapped__,r=function(t){return on(t,e)};return!(t>1||this.__actions__.length)&&n instanceof zi&&mr(i)?((n=n.slice(i,+i+(t?1:0))).__actions__.push({func:ua,args:[r],thisArg:o}),new Ui(n,this.__chain__).thru(function(e){return t&&!e.length&&e.push(o),e})):this.thru(r)}),fa=Po(function(e,t,i){We.call(e,i)?++e[i]:nn(e,i,1)}),ga=Do(Nr),ma=Do(Br);function va(e,t){return(Ba(e)?Ct:dn)(e,ar(t,3))}function wa(e,t){return(Ba(e)?It:pn)(e,ar(t,3))}var ya=Po(function(e,t,i){We.call(e,i)?e[i].push(t):nn(e,i,[t])}),ba=Vn(function(e,t,i){var o=-1,r="function"==typeof t,a=qa(e)?n(e.length):[];return dn(e,function(e){a[++o]=r?Tt(t,e,i):Fn(e,t,i)}),a}),Sa=Po(function(e,t,i){nn(e,i,t)});function ka(e,t){return(Ba(e)?Rt:Dn)(e,ar(t,3))}var Ta=Po(function(e,t,i){e[i?0:1].push(t)},function(){return[[],[]]}),Aa=Vn(function(e,t){if(null==e)return[];var i=t.length;return i>1&&vr(e,t[0],t[1])?t=[]:i>2&&vr(t[0],t[1],t[2])&&(t=[t[0]]),zn(e,gn(t,1),[])}),Ca=ct||function(){return pt.Date.now()};function Ia(e,t,i){return t=i?o:t,t=e&&null==t?e.length:t,Jo(e,c,o,o,o,o,t)}function _a(e,t){var i;if("function"!=typeof t)throw new _e(r);return e=hs(e),function(){return--e>0&&(i=t.apply(this,arguments)),e<=1&&(t=o),i}}var Fa=Vn(function(e,t,i){var n=1;if(i.length){var o=ai(i,rr(Fa));n|=l}return Jo(e,n,t,i,o)}),Pa=Vn(function(e,t,i){var n=3;if(i.length){var o=ai(i,rr(Pa));n|=l}return Jo(t,n,e,i,o)});function xa(e,t,i){var n,a,s,l,c,d,p=0,u=!1,h=!1,f=!0;if("function"!=typeof e)throw new _e(r);function g(t){var i=n,r=a;return n=a=o,p=t,l=e.apply(r,i)}function m(e){var i=e-d;return d===o||i>=t||i<0||h&&e-p>=s}function v(){var e=Ca();if(m(e))return w(e);c=Fr(v,function(e){var i=t-(e-d);return h?mi(i,s-(e-p)):i}(e))}function w(e){return c=o,f&&n?g(e):(n=a=o,l)}function y(){var e=Ca(),i=m(e);if(n=arguments,a=this,d=e,i){if(c===o)return function(e){return p=e,c=Fr(v,t),u?g(e):l}(d);if(h)return bo(c),c=Fr(v,t),g(d)}return c===o&&(c=Fr(v,t)),l}return t=gs(t)||0,Xa(i)&&(u=!!i.leading,s=(h="maxWait"in i)?gi(gs(i.maxWait)||0,t):s,f="trailing"in i?!!i.trailing:f),y.cancel=function(){c!==o&&bo(c),p=0,n=d=a=c=o},y.flush=function(){return c===o?l:w(Ca())},y}var Ra=Vn(function(e,t){return ln(e,1,t)}),La=Vn(function(e,t,i){return ln(e,gs(t)||0,i)});function Wa(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new _e(r);var i=function(){var n=arguments,o=t?t.apply(this,n):n[0],r=i.cache;if(r.has(o))return r.get(o);var a=e.apply(this,n);return i.cache=r.set(o,a)||r,a};return i.cache=new(Wa.Cache||Hi),i}function ja(e){if("function"!=typeof e)throw new _e(r);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Wa.Cache=Hi;var Oa=wo(function(e,t){var i=(t=1==t.length&&Ba(t[0])?Rt(t[0],Jt(ar())):Rt(gn(t,1),Jt(ar()))).length;return Vn(function(n){for(var o=-1,r=mi(n.length,i);++o<r;)n[o]=t[o].call(this,n[o]);return Tt(e,this,n)})}),Da=Vn(function(e,t){var i=ai(t,rr(Da));return Jo(e,l,o,t,i)}),Ma=Vn(function(e,t){var i=ai(t,rr(Ma));return Jo(e,64,o,t,i)}),$a=er(function(e,t){return Jo(e,256,o,o,o,t)});function Ea(e,t){return e===t||e!=e&&t!=t}var Ua=Ho(An),za=Ho(function(e,t){return e>=t}),Na=Pn(function(){return arguments}())?Pn:function(e){return es(e)&&We.call(e,"callee")&&!Ge.call(e,"callee")},Ba=n.isArray,Ha=vt?Jt(vt):function(e){return es(e)&&Tn(e)==R};function qa(e){return null!=e&&Qa(e.length)&&!Ka(e)}function Ga(e){return es(e)&&qa(e)}var Va=mt||gl,Za=wt?Jt(wt):function(e){return es(e)&&Tn(e)==w};function Ja(e){if(!es(e))return!1;var t=Tn(e);return t==y||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!ns(e)}function Ka(e){if(!Xa(e))return!1;var t=Tn(e);return t==b||t==S||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ya(e){return"number"==typeof e&&e==hs(e)}function Qa(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=p}function Xa(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function es(e){return null!=e&&"object"==typeof e}var ts=yt?Jt(yt):function(e){return es(e)&&ur(e)==k};function is(e){return"number"==typeof e||es(e)&&Tn(e)==T}function ns(e){if(!es(e)||Tn(e)!=A)return!1;var t=He(e);if(null===t)return!0;var i=We.call(t,"constructor")&&t.constructor;return"function"==typeof i&&i instanceof i&&Le.call(i)==Me}var os=bt?Jt(bt):function(e){return es(e)&&Tn(e)==I},rs=St?Jt(St):function(e){return es(e)&&ur(e)==_};function as(e){return"string"==typeof e||!Ba(e)&&es(e)&&Tn(e)==F}function ss(e){return"symbol"==typeof e||es(e)&&Tn(e)==P}var ls=kt?Jt(kt):function(e){return es(e)&&Qa(e.length)&&!!ot[Tn(e)]},cs=Ho(On),ds=Ho(function(e,t){return e<=t});function ps(e){if(!e)return[];if(qa(e))return as(e)?di(e):_o(e);if(Je&&e[Je])return function(e){for(var t,i=[];!(t=e.next()).done;)i.push(t.value);return i}(e[Je]());var t=ur(e);return(t==k?oi:t==_?si:Es)(e)}function us(e){return e?(e=gs(e))===d||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function hs(e){var t=us(e),i=t%1;return t==t?i?t-i:t:0}function fs(e){return e?rn(hs(e),0,h):0}function gs(e){if("number"==typeof e)return e;if(ss(e))return u;if(Xa(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Xa(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Zt(e);var i=fe.test(e);return i||me.test(e)?lt(e.slice(2),i?2:8):he.test(e)?u:+e}function ms(e){return Fo(e,Rs(e))}function vs(e){return null==e?"":ao(e)}var ws=xo(function(e,t){if(Sr(t)||qa(t))Fo(t,xs(t),e);else for(var i in t)We.call(t,i)&&Qi(e,i,t[i])}),ys=xo(function(e,t){Fo(t,Rs(t),e)}),bs=xo(function(e,t,i,n){Fo(t,Rs(t),e,n)}),Ss=xo(function(e,t,i,n){Fo(t,xs(t),e,n)}),ks=er(on),Ts=Vn(function(e,t){e=Ae(e);var i=-1,n=t.length,r=n>2?t[2]:o;for(r&&vr(t[0],t[1],r)&&(n=1);++i<n;)for(var a=t[i],s=Rs(a),l=-1,c=s.length;++l<c;){var d=s[l],p=e[d];(p===o||Ea(p,xe[d])&&!We.call(e,d))&&(e[d]=a[d])}return e}),As=Vn(function(e){return e.push(o,Yo),Tt(Ws,o,e)});function Cs(e,t,i){var n=null==e?o:Sn(e,t);return n===o?i:n}function Is(e,t){return null!=e&&hr(e,t,In)}var _s=Eo(function(e,t,i){null!=t&&"function"!=typeof t.toString&&(t=De.call(t)),e[t]=i},Xs(il)),Fs=Eo(function(e,t,i){null!=t&&"function"!=typeof t.toString&&(t=De.call(t)),We.call(e,t)?e[t].push(i):e[t]=[i]},ar),Ps=Vn(Fn);function xs(e){return qa(e)?Vi(e):jn(e)}function Rs(e){return qa(e)?Vi(e,!0):function(e){if(!Xa(e))return function(e){var t=[];if(null!=e)for(var i in Ae(e))t.push(i);return t}(e);var t=Sr(e),i=[];for(var n in e)("constructor"!=n||!t&&We.call(e,n))&&i.push(n);return i}(e)}var Ls=xo(function(e,t,i){En(e,t,i)}),Ws=xo(function(e,t,i,n){En(e,t,i,n)}),js=er(function(e,t){var i={};if(null==e)return i;var n=!1;t=Rt(t,function(t){return t=vo(t,e),n||(n=t.length>1),t}),Fo(e,ir(e),i),n&&(i=an(i,7,Qo));for(var o=t.length;o--;)lo(i,t[o]);return i}),Os=er(function(e,t){return null==e?{}:function(e,t){return Nn(e,t,function(t,i){return Is(e,i)})}(e,t)});function Ds(e,t){if(null==e)return{};var i=Rt(ir(e),function(e){return[e]});return t=ar(t),Nn(e,i,function(e,i){return t(e,i[0])})}var Ms=Zo(xs),$s=Zo(Rs);function Es(e){return null==e?[]:Kt(e,xs(e))}var Us=jo(function(e,t,i){return t=t.toLowerCase(),e+(i?zs(t):t)});function zs(e){return Js(vs(e).toLowerCase())}function Ns(e){return(e=vs(e))&&e.replace(we,ei).replace(Ye,"")}var Bs=jo(function(e,t,i){return e+(i?"-":"")+t.toLowerCase()}),Hs=jo(function(e,t,i){return e+(i?" ":"")+t.toLowerCase()}),qs=Wo("toLowerCase"),Gs=jo(function(e,t,i){return e+(i?"_":"")+t.toLowerCase()}),Vs=jo(function(e,t,i){return e+(i?" ":"")+Js(t)}),Zs=jo(function(e,t,i){return e+(i?" ":"")+t.toUpperCase()}),Js=Wo("toUpperCase");function Ks(e,t,i){return e=vs(e),(t=i?o:t)===o?function(e){return tt.test(e)}(e)?function(e){return e.match(Xe)||[]}(e):function(e){return e.match(le)||[]}(e):e.match(t)||[]}var Ys=Vn(function(e,t){try{return Tt(e,o,t)}catch(e){return Ja(e)?e:new Se(e)}}),Qs=er(function(e,t){return Ct(t,function(t){t=Dr(t),nn(e,t,Fa(e[t],e))}),e});function Xs(e){return function(){return e}}var el=Mo(),tl=Mo(!0);function il(e){return e}function nl(e){return Wn("function"==typeof e?e:an(e,1))}var ol=Vn(function(e,t){return function(i){return Fn(i,e,t)}}),rl=Vn(function(e,t){return function(i){return Fn(e,i,t)}});function al(e,t,i){var n=xs(t),o=bn(t,n);null!=i||Xa(t)&&(o.length||!n.length)||(i=t,t=e,e=this,o=bn(t,xs(t)));var r=!(Xa(i)&&"chain"in i&&!i.chain),a=Ka(e);return Ct(o,function(i){var n=t[i];e[i]=n,a&&(e.prototype[i]=function(){var t=this.__chain__;if(r||t){var i=e(this.__wrapped__);return(i.__actions__=_o(this.__actions__)).push({func:n,args:arguments,thisArg:e}),i.__chain__=t,i}return n.apply(e,Lt([this.value()],arguments))})}),e}function sl(){}var ll=zo(Rt),cl=zo(_t),dl=zo(Ot);function pl(e){return wr(e)?Bt(Dr(e)):function(e){return function(t){return Sn(t,e)}}(e)}var ul=Bo(),hl=Bo(!0);function fl(){return[]}function gl(){return!1}var ml,vl=Uo(function(e,t){return e+t},0),wl=Go("ceil"),yl=Uo(function(e,t){return e/t},1),bl=Go("floor"),Sl=Uo(function(e,t){return e*t},1),kl=Go("round"),Tl=Uo(function(e,t){return e-t},0);return Mi.after=function(e,t){if("function"!=typeof t)throw new _e(r);return e=hs(e),function(){if(--e<1)return t.apply(this,arguments)}},Mi.ary=Ia,Mi.assign=ws,Mi.assignIn=ys,Mi.assignInWith=bs,Mi.assignWith=Ss,Mi.at=ks,Mi.before=_a,Mi.bind=Fa,Mi.bindAll=Qs,Mi.bindKey=Pa,Mi.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ba(e)?e:[e]},Mi.chain=pa,Mi.chunk=function(e,t,i){t=(i?vr(e,t,i):t===o)?1:gi(hs(t),0);var r=null==e?0:e.length;if(!r||t<1)return[];for(var a=0,s=0,l=n(ut(r/t));a<r;)l[s++]=eo(e,a,a+=t);return l},Mi.compact=function(e){for(var t=-1,i=null==e?0:e.length,n=0,o=[];++t<i;){var r=e[t];r&&(o[n++]=r)}return o},Mi.concat=function(){var e=arguments.length;if(!e)return[];for(var t=n(e-1),i=arguments[0],o=e;o--;)t[o-1]=arguments[o];return Lt(Ba(i)?_o(i):[i],gn(t,1))},Mi.cond=function(e){var t=null==e?0:e.length,i=ar();return e=t?Rt(e,function(e){if("function"!=typeof e[1])throw new _e(r);return[i(e[0]),e[1]]}):[],Vn(function(i){for(var n=-1;++n<t;){var o=e[n];if(Tt(o[0],this,i))return Tt(o[1],this,i)}})},Mi.conforms=function(e){return function(e){var t=xs(e);return function(i){return sn(i,e,t)}}(an(e,1))},Mi.constant=Xs,Mi.countBy=fa,Mi.create=function(e,t){var i=$i(e);return null==t?i:tn(i,t)},Mi.curry=function e(t,i,n){var r=Jo(t,8,o,o,o,o,o,i=n?o:i);return r.placeholder=e.placeholder,r},Mi.curryRight=function e(t,i,n){var r=Jo(t,16,o,o,o,o,o,i=n?o:i);return r.placeholder=e.placeholder,r},Mi.debounce=xa,Mi.defaults=Ts,Mi.defaultsDeep=As,Mi.defer=Ra,Mi.delay=La,Mi.difference=Er,Mi.differenceBy=Ur,Mi.differenceWith=zr,Mi.drop=function(e,t,i){var n=null==e?0:e.length;return n?eo(e,(t=i||t===o?1:hs(t))<0?0:t,n):[]},Mi.dropRight=function(e,t,i){var n=null==e?0:e.length;return n?eo(e,0,(t=n-(t=i||t===o?1:hs(t)))<0?0:t):[]},Mi.dropRightWhile=function(e,t){return e&&e.length?po(e,ar(t,3),!0,!0):[]},Mi.dropWhile=function(e,t){return e&&e.length?po(e,ar(t,3),!0):[]},Mi.fill=function(e,t,i,n){var r=null==e?0:e.length;return r?(i&&"number"!=typeof i&&vr(e,t,i)&&(i=0,n=r),function(e,t,i,n){var r=e.length;for((i=hs(i))<0&&(i=-i>r?0:r+i),(n=n===o||n>r?r:hs(n))<0&&(n+=r),n=i>n?0:fs(n);i<n;)e[i++]=t;return e}(e,t,i,n)):[]},Mi.filter=function(e,t){return(Ba(e)?Ft:fn)(e,ar(t,3))},Mi.flatMap=function(e,t){return gn(ka(e,t),1)},Mi.flatMapDeep=function(e,t){return gn(ka(e,t),d)},Mi.flatMapDepth=function(e,t,i){return i=i===o?1:hs(i),gn(ka(e,t),i)},Mi.flatten=Hr,Mi.flattenDeep=function(e){return null!=e&&e.length?gn(e,d):[]},Mi.flattenDepth=function(e,t){return null!=e&&e.length?gn(e,t=t===o?1:hs(t)):[]},Mi.flip=function(e){return Jo(e,512)},Mi.flow=el,Mi.flowRight=tl,Mi.fromPairs=function(e){for(var t=-1,i=null==e?0:e.length,n={};++t<i;){var o=e[t];n[o[0]]=o[1]}return n},Mi.functions=function(e){return null==e?[]:bn(e,xs(e))},Mi.functionsIn=function(e){return null==e?[]:bn(e,Rs(e))},Mi.groupBy=ya,Mi.initial=function(e){return null!=e&&e.length?eo(e,0,-1):[]},Mi.intersection=Gr,Mi.intersectionBy=Vr,Mi.intersectionWith=Zr,Mi.invert=_s,Mi.invertBy=Fs,Mi.invokeMap=ba,Mi.iteratee=nl,Mi.keyBy=Sa,Mi.keys=xs,Mi.keysIn=Rs,Mi.map=ka,Mi.mapKeys=function(e,t){var i={};return t=ar(t,3),wn(e,function(e,n,o){nn(i,t(e,n,o),e)}),i},Mi.mapValues=function(e,t){var i={};return t=ar(t,3),wn(e,function(e,n,o){nn(i,n,t(e,n,o))}),i},Mi.matches=function(e){return Mn(an(e,1))},Mi.matchesProperty=function(e,t){return $n(e,an(t,1))},Mi.memoize=Wa,Mi.merge=Ls,Mi.mergeWith=Ws,Mi.method=ol,Mi.methodOf=rl,Mi.mixin=al,Mi.negate=ja,Mi.nthArg=function(e){return e=hs(e),Vn(function(t){return Un(t,e)})},Mi.omit=js,Mi.omitBy=function(e,t){return Ds(e,ja(ar(t)))},Mi.once=function(e){return _a(2,e)},Mi.orderBy=function(e,t,i,n){return null==e?[]:(Ba(t)||(t=null==t?[]:[t]),Ba(i=n?o:i)||(i=null==i?[]:[i]),zn(e,t,i))},Mi.over=ll,Mi.overArgs=Oa,Mi.overEvery=cl,Mi.overSome=dl,Mi.partial=Da,Mi.partialRight=Ma,Mi.partition=Ta,Mi.pick=Os,Mi.pickBy=Ds,Mi.property=pl,Mi.propertyOf=function(e){return function(t){return null==e?o:Sn(e,t)}},Mi.pull=Kr,Mi.pullAll=Yr,Mi.pullAllBy=function(e,t,i){return e&&e.length&&t&&t.length?Bn(e,t,ar(i,2)):e},Mi.pullAllWith=function(e,t,i){return e&&e.length&&t&&t.length?Bn(e,t,o,i):e},Mi.pullAt=Qr,Mi.range=ul,Mi.rangeRight=hl,Mi.rearg=$a,Mi.reject=function(e,t){return(Ba(e)?Ft:fn)(e,ja(ar(t,3)))},Mi.remove=function(e,t){var i=[];if(!e||!e.length)return i;var n=-1,o=[],r=e.length;for(t=ar(t,3);++n<r;){var a=e[n];t(a,n,e)&&(i.push(a),o.push(n))}return Hn(e,o),i},Mi.rest=function(e,t){if("function"!=typeof e)throw new _e(r);return Vn(e,t=t===o?t:hs(t))},Mi.reverse=Xr,Mi.sampleSize=function(e,t,i){return t=(i?vr(e,t,i):t===o)?1:hs(t),(Ba(e)?Ji:Jn)(e,t)},Mi.set=function(e,t,i){return null==e?e:Kn(e,t,i)},Mi.setWith=function(e,t,i,n){return n="function"==typeof n?n:o,null==e?e:Kn(e,t,i,n)},Mi.shuffle=function(e){return(Ba(e)?Ki:Xn)(e)},Mi.slice=function(e,t,i){var n=null==e?0:e.length;return n?(i&&"number"!=typeof i&&vr(e,t,i)?(t=0,i=n):(t=null==t?0:hs(t),i=i===o?n:hs(i)),eo(e,t,i)):[]},Mi.sortBy=Aa,Mi.sortedUniq=function(e){return e&&e.length?oo(e):[]},Mi.sortedUniqBy=function(e,t){return e&&e.length?oo(e,ar(t,2)):[]},Mi.split=function(e,t,i){return i&&"number"!=typeof i&&vr(e,t,i)&&(t=i=o),(i=i===o?h:i>>>0)?(e=vs(e))&&("string"==typeof t||null!=t&&!os(t))&&!(t=ao(t))&&ni(e)?yo(di(e),0,i):e.split(t,i):[]},Mi.spread=function(e,t){if("function"!=typeof e)throw new _e(r);return t=null==t?0:gi(hs(t),0),Vn(function(i){var n=i[t],o=yo(i,0,t);return n&&Lt(o,n),Tt(e,this,o)})},Mi.tail=function(e){var t=null==e?0:e.length;return t?eo(e,1,t):[]},Mi.take=function(e,t,i){return e&&e.length?eo(e,0,(t=i||t===o?1:hs(t))<0?0:t):[]},Mi.takeRight=function(e,t,i){var n=null==e?0:e.length;return n?eo(e,(t=n-(t=i||t===o?1:hs(t)))<0?0:t,n):[]},Mi.takeRightWhile=function(e,t){return e&&e.length?po(e,ar(t,3),!1,!0):[]},Mi.takeWhile=function(e,t){return e&&e.length?po(e,ar(t,3)):[]},Mi.tap=function(e,t){return t(e),e},Mi.throttle=function(e,t,i){var n=!0,o=!0;if("function"!=typeof e)throw new _e(r);return Xa(i)&&(n="leading"in i?!!i.leading:n,o="trailing"in i?!!i.trailing:o),xa(e,t,{leading:n,maxWait:t,trailing:o})},Mi.thru=ua,Mi.toArray=ps,Mi.toPairs=Ms,Mi.toPairsIn=$s,Mi.toPath=function(e){return Ba(e)?Rt(e,Dr):ss(e)?[e]:_o(Or(vs(e)))},Mi.toPlainObject=ms,Mi.transform=function(e,t,i){var n=Ba(e),o=n||Va(e)||ls(e);if(t=ar(t,4),null==i){var r=e&&e.constructor;i=o?n?new r:[]:Xa(e)&&Ka(r)?$i(He(e)):{}}return(o?Ct:wn)(e,function(e,n,o){return t(i,e,n,o)}),i},Mi.unary=function(e){return Ia(e,1)},Mi.union=ea,Mi.unionBy=ta,Mi.unionWith=ia,Mi.uniq=function(e){return e&&e.length?so(e):[]},Mi.uniqBy=function(e,t){return e&&e.length?so(e,ar(t,2)):[]},Mi.uniqWith=function(e,t){return t="function"==typeof t?t:o,e&&e.length?so(e,o,t):[]},Mi.unset=function(e,t){return null==e||lo(e,t)},Mi.unzip=na,Mi.unzipWith=oa,Mi.update=function(e,t,i){return null==e?e:co(e,t,mo(i))},Mi.updateWith=function(e,t,i,n){return n="function"==typeof n?n:o,null==e?e:co(e,t,mo(i),n)},Mi.values=Es,Mi.valuesIn=function(e){return null==e?[]:Kt(e,Rs(e))},Mi.without=ra,Mi.words=Ks,Mi.wrap=function(e,t){return Da(mo(t),e)},Mi.xor=aa,Mi.xorBy=sa,Mi.xorWith=la,Mi.zip=ca,Mi.zipObject=function(e,t){return fo(e||[],t||[],Qi)},Mi.zipObjectDeep=function(e,t){return fo(e||[],t||[],Kn)},Mi.zipWith=da,Mi.entries=Ms,Mi.entriesIn=$s,Mi.extend=ys,Mi.extendWith=bs,al(Mi,Mi),Mi.add=vl,Mi.attempt=Ys,Mi.camelCase=Us,Mi.capitalize=zs,Mi.ceil=wl,Mi.clamp=function(e,t,i){return i===o&&(i=t,t=o),i!==o&&(i=(i=gs(i))==i?i:0),t!==o&&(t=(t=gs(t))==t?t:0),rn(gs(e),t,i)},Mi.clone=function(e){return an(e,4)},Mi.cloneDeep=function(e){return an(e,5)},Mi.cloneDeepWith=function(e,t){return an(e,5,t="function"==typeof t?t:o)},Mi.cloneWith=function(e,t){return an(e,4,t="function"==typeof t?t:o)},Mi.conformsTo=function(e,t){return null==t||sn(e,t,xs(t))},Mi.deburr=Ns,Mi.defaultTo=function(e,t){return null==e||e!=e?t:e},Mi.divide=yl,Mi.endsWith=function(e,t,i){e=vs(e),t=ao(t);var n=e.length,r=i=i===o?n:rn(hs(i),0,n);return(i-=t.length)>=0&&e.slice(i,r)==t},Mi.eq=Ea,Mi.escape=function(e){return(e=vs(e))&&Z.test(e)?e.replace(G,ti):e},Mi.escapeRegExp=function(e){return(e=vs(e))&&ie.test(e)?e.replace(te,"\\$&"):e},Mi.every=function(e,t,i){var n=Ba(e)?_t:un;return i&&vr(e,t,i)&&(t=o),n(e,ar(t,3))},Mi.find=ga,Mi.findIndex=Nr,Mi.findKey=function(e,t){return Mt(e,ar(t,3),wn)},Mi.findLast=ma,Mi.findLastIndex=Br,Mi.findLastKey=function(e,t){return Mt(e,ar(t,3),yn)},Mi.floor=bl,Mi.forEach=va,Mi.forEachRight=wa,Mi.forIn=function(e,t){return null==e?e:mn(e,ar(t,3),Rs)},Mi.forInRight=function(e,t){return null==e?e:vn(e,ar(t,3),Rs)},Mi.forOwn=function(e,t){return e&&wn(e,ar(t,3))},Mi.forOwnRight=function(e,t){return e&&yn(e,ar(t,3))},Mi.get=Cs,Mi.gt=Ua,Mi.gte=za,Mi.has=function(e,t){return null!=e&&hr(e,t,Cn)},Mi.hasIn=Is,Mi.head=qr,Mi.identity=il,Mi.includes=function(e,t,i,n){e=qa(e)?e:Es(e),i=i&&!n?hs(i):0;var o=e.length;return i<0&&(i=gi(o+i,0)),as(e)?i<=o&&e.indexOf(t,i)>-1:!!o&&Et(e,t,i)>-1},Mi.indexOf=function(e,t,i){var n=null==e?0:e.length;if(!n)return-1;var o=null==i?0:hs(i);return o<0&&(o=gi(n+o,0)),Et(e,t,o)},Mi.inRange=function(e,t,i){return t=us(t),i===o?(i=t,t=0):i=us(i),function(e,t,i){return e>=mi(t,i)&&e<gi(t,i)}(e=gs(e),t,i)},Mi.invoke=Ps,Mi.isArguments=Na,Mi.isArray=Ba,Mi.isArrayBuffer=Ha,Mi.isArrayLike=qa,Mi.isArrayLikeObject=Ga,Mi.isBoolean=function(e){return!0===e||!1===e||es(e)&&Tn(e)==v},Mi.isBuffer=Va,Mi.isDate=Za,Mi.isElement=function(e){return es(e)&&1===e.nodeType&&!ns(e)},Mi.isEmpty=function(e){if(null==e)return!0;if(qa(e)&&(Ba(e)||"string"==typeof e||"function"==typeof e.splice||Va(e)||ls(e)||Na(e)))return!e.length;var t=ur(e);if(t==k||t==_)return!e.size;if(Sr(e))return!jn(e).length;for(var i in e)if(We.call(e,i))return!1;return!0},Mi.isEqual=function(e,t){return xn(e,t)},Mi.isEqualWith=function(e,t,i){var n=(i="function"==typeof i?i:o)?i(e,t):o;return n===o?xn(e,t,o,i):!!n},Mi.isError=Ja,Mi.isFinite=function(e){return"number"==typeof e&&Dt(e)},Mi.isFunction=Ka,Mi.isInteger=Ya,Mi.isLength=Qa,Mi.isMap=ts,Mi.isMatch=function(e,t){return e===t||Rn(e,t,lr(t))},Mi.isMatchWith=function(e,t,i){return i="function"==typeof i?i:o,Rn(e,t,lr(t),i)},Mi.isNaN=function(e){return is(e)&&e!=+e},Mi.isNative=function(e){if(br(e))throw new Se("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Ln(e)},Mi.isNil=function(e){return null==e},Mi.isNull=function(e){return null===e},Mi.isNumber=is,Mi.isObject=Xa,Mi.isObjectLike=es,Mi.isPlainObject=ns,Mi.isRegExp=os,Mi.isSafeInteger=function(e){return Ya(e)&&e>=-9007199254740991&&e<=p},Mi.isSet=rs,Mi.isString=as,Mi.isSymbol=ss,Mi.isTypedArray=ls,Mi.isUndefined=function(e){return e===o},Mi.isWeakMap=function(e){return es(e)&&ur(e)==x},Mi.isWeakSet=function(e){return es(e)&&"[object WeakSet]"==Tn(e)},Mi.join=function(e,t){return null==e?"":Ht.call(e,t)},Mi.kebabCase=Bs,Mi.last=Jr,Mi.lastIndexOf=function(e,t,i){var n=null==e?0:e.length;if(!n)return-1;var r=n;return i!==o&&(r=(r=hs(i))<0?gi(n+r,0):mi(r,n-1)),t==t?function(e,t,i){for(var n=i+1;n--;)if(e[n]===t)return n;return n}(e,t,r):$t(e,zt,r,!0)},Mi.lowerCase=Hs,Mi.lowerFirst=qs,Mi.lt=cs,Mi.lte=ds,Mi.max=function(e){return e&&e.length?hn(e,il,An):o},Mi.maxBy=function(e,t){return e&&e.length?hn(e,ar(t,2),An):o},Mi.mean=function(e){return Nt(e,il)},Mi.meanBy=function(e,t){return Nt(e,ar(t,2))},Mi.min=function(e){return e&&e.length?hn(e,il,On):o},Mi.minBy=function(e,t){return e&&e.length?hn(e,ar(t,2),On):o},Mi.stubArray=fl,Mi.stubFalse=gl,Mi.stubObject=function(){return{}},Mi.stubString=function(){return""},Mi.stubTrue=function(){return!0},Mi.multiply=Sl,Mi.nth=function(e,t){return e&&e.length?Un(e,hs(t)):o},Mi.noConflict=function(){return pt._===this&&(pt._=$e),this},Mi.noop=sl,Mi.now=Ca,Mi.pad=function(e,t,i){e=vs(e);var n=(t=hs(t))?ci(e):0;if(!t||n>=t)return e;var o=(t-n)/2;return No(ht(o),i)+e+No(ut(o),i)},Mi.padEnd=function(e,t,i){e=vs(e);var n=(t=hs(t))?ci(e):0;return t&&n<t?e+No(t-n,i):e},Mi.padStart=function(e,t,i){e=vs(e);var n=(t=hs(t))?ci(e):0;return t&&n<t?No(t-n,i)+e:e},Mi.parseInt=function(e,t,i){return i||null==t?t=0:t&&(t=+t),wi(vs(e).replace(ne,""),t||0)},Mi.random=function(e,t,i){if(i&&"boolean"!=typeof i&&vr(e,t,i)&&(t=i=o),i===o&&("boolean"==typeof t?(i=t,t=o):"boolean"==typeof e&&(i=e,e=o)),e===o&&t===o?(e=0,t=1):(e=us(e),t===o?(t=e,e=0):t=us(t)),e>t){var n=e;e=t,t=n}if(i||e%1||t%1){var r=yi();return mi(e+r*(t-e+st("1e-"+((r+"").length-1))),t)}return qn(e,t)},Mi.reduce=function(e,t,i){var n=Ba(e)?Wt:qt,o=arguments.length<3;return n(e,ar(t,4),i,o,dn)},Mi.reduceRight=function(e,t,i){var n=Ba(e)?jt:qt,o=arguments.length<3;return n(e,ar(t,4),i,o,pn)},Mi.repeat=function(e,t,i){return t=(i?vr(e,t,i):t===o)?1:hs(t),Gn(vs(e),t)},Mi.replace=function(){var e=arguments,t=vs(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Mi.result=function(e,t,i){var n=-1,r=(t=vo(t,e)).length;for(r||(r=1,e=o);++n<r;){var a=null==e?o:e[Dr(t[n])];a===o&&(n=r,a=i),e=Ka(a)?a.call(e):a}return e},Mi.round=kl,Mi.runInContext=e,Mi.sample=function(e){return(Ba(e)?Zi:Zn)(e)},Mi.size=function(e){if(null==e)return 0;if(qa(e))return as(e)?ci(e):e.length;var t=ur(e);return t==k||t==_?e.size:jn(e).length},Mi.snakeCase=Gs,Mi.some=function(e,t,i){var n=Ba(e)?Ot:to;return i&&vr(e,t,i)&&(t=o),n(e,ar(t,3))},Mi.sortedIndex=function(e,t){return io(e,t)},Mi.sortedIndexBy=function(e,t,i){return no(e,t,ar(i,2))},Mi.sortedIndexOf=function(e,t){var i=null==e?0:e.length;if(i){var n=io(e,t);if(n<i&&Ea(e[n],t))return n}return-1},Mi.sortedLastIndex=function(e,t){return io(e,t,!0)},Mi.sortedLastIndexBy=function(e,t,i){return no(e,t,ar(i,2),!0)},Mi.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var i=io(e,t,!0)-1;if(Ea(e[i],t))return i}return-1},Mi.startCase=Vs,Mi.startsWith=function(e,t,i){return e=vs(e),i=null==i?0:rn(hs(i),0,e.length),t=ao(t),e.slice(i,i+t.length)==t},Mi.subtract=Tl,Mi.sum=function(e){return e&&e.length?Gt(e,il):0},Mi.sumBy=function(e,t){return e&&e.length?Gt(e,ar(t,2)):0},Mi.template=function(e,t,i){var n=Mi.templateSettings;i&&vr(e,t,i)&&(t=o),e=vs(e),t=bs({},t,n,Ko);var r,a,s=bs({},t.imports,n.imports,Ko),l=xs(s),c=Kt(s,l),d=0,p=t.interpolate||ye,u="__p += '",h=Ce((t.escape||ye).source+"|"+p.source+"|"+(p===Y?pe:ye).source+"|"+(t.evaluate||ye).source+"|$","g"),f="//# sourceURL="+(We.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++nt+"]")+"\n";e.replace(h,function(t,i,n,o,s,l){return n||(n=o),u+=e.slice(d,l).replace(be,ii),i&&(r=!0,u+="' +\n__e("+i+") +\n'"),s&&(a=!0,u+="';\n"+s+";\n__p += '"),n&&(u+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),d=l+t.length,t}),u+="';\n";var g=We.call(t,"variable")&&t.variable;if(g){if(ce.test(g))throw new Se("Invalid `variable` option passed into `_.template`")}else u="with (obj) {\n"+u+"\n}\n";u=(a?u.replace(N,""):u).replace(B,"$1").replace(H,"$1;"),u="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(r?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+u+"return __p\n}";var m=Ys(function(){return ke(l,f+"return "+u).apply(o,c)});if(m.source=u,Ja(m))throw m;return m},Mi.times=function(e,t){if((e=hs(e))<1||e>p)return[];var i=h,n=mi(e,h);t=ar(t),e-=h;for(var o=Vt(n,t);++i<e;)t(i);return o},Mi.toFinite=us,Mi.toInteger=hs,Mi.toLength=fs,Mi.toLower=function(e){return vs(e).toLowerCase()},Mi.toNumber=gs,Mi.toSafeInteger=function(e){return e?rn(hs(e),-9007199254740991,p):0===e?e:0},Mi.toString=vs,Mi.toUpper=function(e){return vs(e).toUpperCase()},Mi.trim=function(e,t,i){if((e=vs(e))&&(i||t===o))return Zt(e);if(!e||!(t=ao(t)))return e;var n=di(e),r=di(t);return yo(n,Qt(n,r),Xt(n,r)+1).join("")},Mi.trimEnd=function(e,t,i){if((e=vs(e))&&(i||t===o))return e.slice(0,pi(e)+1);if(!e||!(t=ao(t)))return e;var n=di(e);return yo(n,0,Xt(n,di(t))+1).join("")},Mi.trimStart=function(e,t,i){if((e=vs(e))&&(i||t===o))return e.replace(ne,"");if(!e||!(t=ao(t)))return e;var n=di(e);return yo(n,Qt(n,di(t))).join("")},Mi.truncate=function(e,t){var i=30,n="...";if(Xa(t)){var r="separator"in t?t.separator:r;i="length"in t?hs(t.length):i,n="omission"in t?ao(t.omission):n}var a=(e=vs(e)).length;if(ni(e)){var s=di(e);a=s.length}if(i>=a)return e;var l=i-ci(n);if(l<1)return n;var c=s?yo(s,0,l).join(""):e.slice(0,l);if(r===o)return c+n;if(s&&(l+=c.length-l),os(r)){if(e.slice(l).search(r)){var d,p=c;for(r.global||(r=Ce(r.source,vs(ue.exec(r))+"g")),r.lastIndex=0;d=r.exec(p);)var u=d.index;c=c.slice(0,u===o?l:u)}}else if(e.indexOf(ao(r),l)!=l){var h=c.lastIndexOf(r);h>-1&&(c=c.slice(0,h))}return c+n},Mi.unescape=function(e){return(e=vs(e))&&V.test(e)?e.replace(q,ui):e},Mi.uniqueId=function(e){var t=++je;return vs(e)+t},Mi.upperCase=Zs,Mi.upperFirst=Js,Mi.each=va,Mi.eachRight=wa,Mi.first=qr,al(Mi,(ml={},wn(Mi,function(e,t){We.call(Mi.prototype,t)||(ml[t]=e)}),ml),{chain:!1}),Mi.VERSION="4.17.21",Ct(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){Mi[e].placeholder=Mi}),Ct(["drop","take"],function(e,t){zi.prototype[e]=function(i){i=i===o?1:gi(hs(i),0);var n=this.__filtered__&&!t?new zi(this):this.clone();return n.__filtered__?n.__takeCount__=mi(i,n.__takeCount__):n.__views__.push({size:mi(i,h),type:e+(n.__dir__<0?"Right":"")}),n},zi.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),Ct(["filter","map","takeWhile"],function(e,t){var i=t+1,n=1==i||3==i;zi.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ar(e,3),type:i}),t.__filtered__=t.__filtered__||n,t}}),Ct(["head","last"],function(e,t){var i="take"+(t?"Right":"");zi.prototype[e]=function(){return this[i](1).value()[0]}}),Ct(["initial","tail"],function(e,t){var i="drop"+(t?"":"Right");zi.prototype[e]=function(){return this.__filtered__?new zi(this):this[i](1)}}),zi.prototype.compact=function(){return this.filter(il)},zi.prototype.find=function(e){return this.filter(e).head()},zi.prototype.findLast=function(e){return this.reverse().find(e)},zi.prototype.invokeMap=Vn(function(e,t){return"function"==typeof e?new zi(this):this.map(function(i){return Fn(i,e,t)})}),zi.prototype.reject=function(e){return this.filter(ja(ar(e)))},zi.prototype.slice=function(e,t){e=hs(e);var i=this;return i.__filtered__&&(e>0||t<0)?new zi(i):(e<0?i=i.takeRight(-e):e&&(i=i.drop(e)),t!==o&&(i=(t=hs(t))<0?i.dropRight(-t):i.take(t-e)),i)},zi.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},zi.prototype.toArray=function(){return this.take(h)},wn(zi.prototype,function(e,t){var i=/^(?:filter|find|map|reject)|While$/.test(t),n=/^(?:head|last)$/.test(t),r=Mi[n?"take"+("last"==t?"Right":""):t],a=n||/^find/.test(t);r&&(Mi.prototype[t]=function(){var t=this.__wrapped__,s=n?[1]:arguments,l=t instanceof zi,c=s[0],d=l||Ba(t),p=function(e){var t=r.apply(Mi,Lt([e],s));return n&&u?t[0]:t};d&&i&&"function"==typeof c&&1!=c.length&&(l=d=!1);var u=this.__chain__,h=!!this.__actions__.length,f=a&&!u,g=l&&!h;if(!a&&d){t=g?t:new zi(this);var m=e.apply(t,s);return m.__actions__.push({func:ua,args:[p],thisArg:o}),new Ui(m,u)}return f&&g?e.apply(this,s):(m=this.thru(p),f?n?m.value()[0]:m.value():m)})}),Ct(["pop","push","shift","sort","splice","unshift"],function(e){var t=Fe[e],i=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);Mi.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var o=this.value();return t.apply(Ba(o)?o:[],e)}return this[i](function(i){return t.apply(Ba(i)?i:[],e)})}}),wn(zi.prototype,function(e,t){var i=Mi[t];if(i){var n=i.name+"";We.call(Fi,n)||(Fi[n]=[]),Fi[n].push({name:t,func:i})}}),Fi[$o(o,2).name]=[{name:"wrapper",func:o}],zi.prototype.clone=function(){var e=new zi(this.__wrapped__);return e.__actions__=_o(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=_o(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=_o(this.__views__),e},zi.prototype.reverse=function(){if(this.__filtered__){var e=new zi(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},zi.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,i=Ba(e),n=t<0,o=i?e.length:0,r=function(e,t,i){for(var n=-1,o=i.length;++n<o;){var r=i[n],a=r.size;switch(r.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=mi(t,e+a);break;case"takeRight":e=gi(e,t-a)}}return{start:e,end:t}}(0,o,this.__views__),a=r.start,s=r.end,l=s-a,c=n?s:a-1,d=this.__iteratees__,p=d.length,u=0,h=mi(l,this.__takeCount__);if(!i||!n&&o==l&&h==l)return uo(e,this.__actions__);var f=[];e:for(;l--&&u<h;){for(var g=-1,m=e[c+=t];++g<p;){var v=d[g],w=v.iteratee,y=v.type,b=w(m);if(2==y)m=b;else if(!b){if(1==y)continue e;break e}}f[u++]=m}return f},Mi.prototype.at=ha,Mi.prototype.chain=function(){return pa(this)},Mi.prototype.commit=function(){return new Ui(this.value(),this.__chain__)},Mi.prototype.next=function(){this.__values__===o&&(this.__values__=ps(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?o:this.__values__[this.__index__++]}},Mi.prototype.plant=function(e){for(var t,i=this;i instanceof Ei;){var n=$r(i);n.__index__=0,n.__values__=o,t?r.__wrapped__=n:t=n;var r=n;i=i.__wrapped__}return r.__wrapped__=e,t},Mi.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof zi){var t=e;return this.__actions__.length&&(t=new zi(this)),(t=t.reverse()).__actions__.push({func:ua,args:[Xr],thisArg:o}),new Ui(t,this.__chain__)}return this.thru(Xr)},Mi.prototype.toJSON=Mi.prototype.valueOf=Mi.prototype.value=function(){return uo(this.__wrapped__,this.__actions__)},Mi.prototype.first=Mi.prototype.head,Je&&(Mi.prototype[Je]=function(){return this}),Mi}();pt._=hi,(n=function(){return hi}.call(t,i,t,e))===o||(e.exports=n)}.call(this)},4342:(e,t,i)=>{"use strict";!function(){var t,n,o,r=0,a=[];for(n=0;n<256;n++)a[n]=(n+256).toString(16).substr(1);function s(){var e=((!t||r+16>l.BUFFER_SIZE)&&(r=0,t=l.randomBytes(l.BUFFER_SIZE)),t.slice(r,r+=16));return e[6]=15&e[6]|64,e[8]=63&e[8]|128,e}function l(){var e=s();return a[e[0]]+a[e[1]]+a[e[2]]+a[e[3]]+"-"+a[e[4]]+a[e[5]]+"-"+a[e[6]]+a[e[7]]+"-"+a[e[8]]+a[e[9]]+"-"+a[e[10]]+a[e[11]]+a[e[12]]+a[e[13]]+a[e[14]]+a[e[15]]}l.BUFFER_SIZE=4096,l.bin=s,l.clearBuffer=function(){t=null,r=0},l.test=function(e){return"string"==typeof e&&/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e)},"undefined"!=typeof crypto?o=crypto:"undefined"!=typeof window&&void 0!==window.msCrypto&&(o=window.msCrypto),o=o||i(575),e.exports=l,l.randomBytes=function(){if(o){if(o.randomBytes)return o.randomBytes;if(o.getRandomValues)return"function"!=typeof Uint8Array.prototype.slice?function(e){var t=new Uint8Array(e);return o.getRandomValues(t),Array.from(t)}:function(e){var t=new Uint8Array(e);return o.getRandomValues(t),t}}return function(e){var t,i=[];for(t=0;t<e;t++)i.push(Math.floor(256*Math.random()));return i}}()}()},4744:e=>{"use strict";var t=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===i}(e)}(e)},i="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?s((i=e,Array.isArray(i)?[]:{}),e,t):e;var i}function o(e,t,i){return e.concat(t).map(function(e){return n(e,i)})}function r(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}(e))}function a(e,t){try{return t in e}catch(e){return!1}}function s(e,i,l){(l=l||{}).arrayMerge=l.arrayMerge||o,l.isMergeableObject=l.isMergeableObject||t,l.cloneUnlessOtherwiseSpecified=n;var c=Array.isArray(i);return c===Array.isArray(e)?c?l.arrayMerge(e,i,l):function(e,t,i){var o={};return i.isMergeableObject(e)&&r(e).forEach(function(t){o[t]=n(e[t],i)}),r(t).forEach(function(r){(function(e,t){return a(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,r)||(a(e,r)&&i.isMergeableObject(t[r])?o[r]=function(e,t){if(!t.customMerge)return s;var i=t.customMerge(e);return"function"==typeof i?i:s}(r,i)(e[r],t[r],i):o[r]=n(t[r],i))}),o}(e,i,l):n(i,l)}s.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,i){return s(e,i,t)},{})};var l=s;e.exports=l}},t={};function i(n){var o=t[n];if(void 0!==o)return o.exports;var r=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(r.exports,r,r.exports,i),r.loaded=!0,r.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{"use strict";class e{static delay(e){return new Promise(t=>setTimeout(t,e))}get ended(){return this.rejected||this.resolved}constructor(){this.rejected=!1,this.resolved=!1,this.promise=new Promise((e,t)=>{this.resolve=t=>{this.resolved||this.rejected||(this.resolved=!0,e(t))},this.reject=e=>{this.resolved||this.rejected||(this.rejected=!0,t(e))}})}setTimeout(e,t){return setTimeout(()=>{this.reject(null!=t?t:"PromiseWrapper timed out")},e)}}var t=i(4342),n=i.n(t),o=i(4744),r=i.n(o),a=i(2543);let s=Promise;const l=()=>s,c="$FINSEMBLECONFIG";class d{constructor(){this.gatePromises=[]}async runOldest(){var e;const t=this.gatePromises[this.gatePromises.length-1],i=await t.func();this.gatePromises=this.gatePromises.filter(e=>e!==t),null===(e=t.resolve)||void 0===e||e.call(t,i),this.gatePromises.length&&this.runOldest()}async wait(e){const t={func:e};return t.gatePromise=new Promise(e=>{t.resolve=e}),this.gatePromises=this.gatePromises.concat(t),1===this.gatePromises.length&&this.runOldest(),t.gatePromise}}const p=(e,t)=>(i,n)=>{try{const o=e(i,n);return(null==o?void 0:o.catch)&&o.catch(e=>{(null!=t?t:console).error("Unhandled exception or rejection in interop.register handler",e)}),o}catch(e){throw(null!=t?t:console).error("Unhandled exception in interop.register handler",e),e}},u=async(e,t)=>{const i=e.map(e=>t(e)),n=await l().allSettled(i),o=n.filter(e=>"rejected"===e.status);if(o.length)throw o.map(e=>e.reason);return n.flatMap(e=>"fulfilled"===e.status?e.value:[])},h=async(e,t)=>{const i=e.map(e=>t(e)),n=await Promise.allSettled(i),o=n.filter(e=>"rejected"===e.status);if(o.length)throw o.map(e=>e.reason);return n},f=(e,t)=>Object.fromEntries(Object.entries(e).flatMap(([e,i])=>t(e,i))),g=e=>!1===e||!0!==e&&(null!=e?e:void 0),m=async(e,t)=>{var i;try{const i=await e();return null==t||t(null,i),{err:null,data:i}}catch(e){const n=e instanceof Error?e.toString():null!==(i=e.message)&&void 0!==i?i:JSON.stringify(e);return null==t||t(n),{err:n}}},v=async(e,t)=>{var i,n;const{err:o,data:r}=await m(e);if(o||!r)return null==t||t(o),{err:o};const a=r.all_errors?r.all_errors.join(" "):null;if(a)return null==t||t(a),{err:a};const s=r.returned;return Object.prototype.hasOwnProperty.call(s,"err")||Object.prototype.hasOwnProperty.call(s,"data")?(null==t||t(null!==(i=s.err)&&void 0!==i?i:null,s.data),{err:null!==(n=s.err)&&void 0!==n?n:null,data:s.data}):(null==t||t(null,s),{data:s,invocationResult:r})},w=e=>null!=e,y=e=>(Object.keys(e).forEach(t=>{null!==e[t]&&void 0!==e[t]||delete e[t]}),e),b=(e,t,i,n)=>{var o,r,a,s,l,c,d,p,u,h,f,g,m,v,w,b,S,T,A,C,I,_,F,P;if(null==(null!==(c=null!==(l=null!==(s=null!==(a=null!==(r=null!==(o=null==t?void 0:t.left)&&void 0!==o?o:null==t?void 0:t.right)&&void 0!==r?r:null==t?void 0:t.top)&&void 0!==a?a:null==t?void 0:t.bottom)&&void 0!==s?s:null==t?void 0:t.width)&&void 0!==l?l:null==t?void 0:t.height)&&void 0!==c?c:null==t?void 0:t.monitor))return;const x=null!==(d=null==t?void 0:t.left)&&void 0!==d?d:null===(p=null==t?void 0:t.options)||void 0===p?void 0:p.left,R=null!==(u=null==t?void 0:t.top)&&void 0!==u?u:null===(h=null==t?void 0:t.options)||void 0===h?void 0:h.top,L=null!==(f=null==t?void 0:t.right)&&void 0!==f?f:null===(g=null==t?void 0:t.options)||void 0===g?void 0:g.right,W=null!==(m=null==t?void 0:t.bottom)&&void 0!==m?m:null===(v=null==t?void 0:t.options)||void 0===v?void 0:v.bottom,j=null!==(w=null==t?void 0:t.width)&&void 0!==w?w:null===(b=null==t?void 0:t.options)||void 0===b?void 0:b.width,O=null!==(S=null==t?void 0:t.height)&&void 0!==S?S:null===(T=null==t?void 0:t.options)||void 0===T?void 0:T.height,D={snapped:null!==(I=null===(C=null===(A=null==n?void 0:n.details)||void 0===A?void 0:A.placement)||void 0===C?void 0:C.snapped)&&void 0!==I&&I,left:x,top:R,right:L,bottom:W,width:j,height:O,display:null!=i?i:null===(F=null===(_=null==n?void 0:n.details)||void 0===_?void 0:_.placement)||void 0===F?void 0:F.display};return k(D,t,null===(P=null==n?void 0:n.details)||void 0===P?void 0:P.placement),""===D.width&&delete D.width,""===D.height&&delete D.height,0!==D.height&&"0"!==D.height||(D.height=1),0!==D.width&&"0"!==D.width||(D.width=1),y(D)},S=e=>{const t=null==e?void 0:e.staggerPixels;return{enabled:!0,offset:null!=t?t:50}},k=(e,t,i)=>{var n,o,r;"center"===e.top&&(e.verticalAlignment="center"),"center"===e.left&&(e.horizontalAlignment="center"),(null==t?void 0:t.dockable)&&(null==t?void 0:t.docked)&&t.dockable.some(e=>e===t.docked)&&(e.snapped=!0,e.height=null!==(n=t.dockedHeight)&&void 0!==n?n:e.height,e.verticalAlignment="bottom"===t.docked?"bottom":"top",e.horizontalAlignment="stretch"),!e.horizontalAlignment&&w(e.right)&&(e.horizontalAlignment="right"),!e.horizontalAlignment&&w(e.left)&&(e.horizontalAlignment="left"),!e.verticalAlignment&&w(e.bottom)&&(e.verticalAlignment="bottom"),!e.verticalAlignment&&w(e.top)&&(e.verticalAlignment="top"),e.horizontalAlignment||(e.horizontalAlignment=null!==(o=null==i?void 0:i.horizontalAlignment)&&void 0!==o?o:"left"),e.verticalAlignment||(e.verticalAlignment=null!==(r=null==i?void 0:i.verticalAlignment)&&void 0!==r?r:"top")},T=e=>"number"==typeof e?(e+1).toString():"main",A=(e,t)=>{var i,n,o,r,a,s,l,c,d,p,u;const h="adjacent",f={};return(null!==(i=null==t?void 0:t.left)&&void 0!==i?i:null===(n=null==t?void 0:t.options)||void 0===n?void 0:n.left)===h&&(f.relativeDirection="right"),(null!==(o=null==t?void 0:t.top)&&void 0!==o?o:null===(r=null==t?void 0:t.options)||void 0===r?void 0:r.top)===h&&(f.relativeDirection="bottom"),(null!==(a=null==t?void 0:t.right)&&void 0!==a?a:null===(s=null==t?void 0:t.options)||void 0===s?void 0:s.right)===h&&(f.relativeDirection="left"),(null!==(l=null==t?void 0:t.bottom)&&void 0!==l?l:null===(c=null==t?void 0:t.options)||void 0===c?void 0:c.bottom)===h&&(f.relativeDirection="top"),Object.keys(f).length>0&&(f.relativeTo=null!==(p=null===(d=null==t?void 0:t.relativeWindow)||void 0===d?void 0:d.windowName)&&void 0!==p?p:null===(u=e.windows.my())||void 0===u?void 0:u.id),f},C={},I=new d,_=(e,t,i,n)=>{const o=(r=t,new Map([["componentType",null!=r?r:"Unknown"],["iocdGatewayAddress",null!==(s=null===(a=null===globalThis||void 0===globalThis?void 0:globalThis.glue42gd)||void 0===a?void 0:a.gwURL)&&void 0!==s?s:"ws://127.0.0.1:8385/"],["hostType","iocd"]]));var r,a,s;i&&!e.includes("apiToLogFile")&&o.set("apiToLogFile","true");let l=e;if(n){l.includes("?")||(l=`${l}?`);let t="";o.forEach((i,n)=>{e.includes(n)||(t=`${t}&${n}=${i}`)}),l.endsWith("?")&&(t=t.slice(1)),l=`${l}${t}`}else o.forEach((t,i)=>{e.includes(i)||(l=`${l} "${i}=${t}"`)}),""===e&&(l=l.slice(1));return l},F=async(e,t,i)=>{var n,o,a,s,l,d,p,u,h,f,m,v,y,k,C,I,F,P,x,R,L,W,j,O,D,M,$,E,U,z,N,B,H,q,G,V,Z,J,K,Y,Q,X,ee,te,ie,ne,oe,re,ae,se,le,ce,de,pe,ue,he,fe,ge,me,ve,we;const ye=null!=t?t:{},be=null===(n=e.windows.my())||void 0===n?void 0:n.tabGroupId,Se={ignoreSavedLayout:!0},ke=await(async(e,t)=>{var i,n;if(!t||"mine"===t){const t=null===(i=e.windows.my())||void 0===i?void 0:i.id,o=t?await e.displays.getByWindowId(t):void 0;return null===(n=null==o?void 0:o.isPrimary)||void 0===n||n?"main":null==o?void 0:o.index.toString()}return T(t)})(e,null==t?void 0:t.monitor);let Te=b(0,ye,ke,i);Te&&(Te=await(async(e,t,i,n)=>{var o,r,a,s;if("absolute"===n||"virtual"===n)return t;const l=i?e.windows.findById(i):e.windows.my(),c=await(null==l?void 0:l.getDisplay());if(!l||!c)return t;if("monitor"===n||!n)return(t=null!=t?t:{snapped:!1}).display=c.index+1,t;const d={relative:l.bounds,available:c.workArea};if(Object.hasOwnProperty.call(d,n)&&t){const{left:e,top:i,height:l,width:c}=d[n];(Number.isInteger(t.left)||Number.isInteger(t.top))&&(t.left=(null!==(o=t.left)&&void 0!==o?o:0)+e,t.top=(null!==(r=t.top)&&void 0!==r?r:0)+i),(null===(a=t.height)||void 0===a?void 0:a.toString().includes("%"))&&(t.height=parseFloat(t.height)/100*l),(null===(s=t.width)||void 0===s?void 0:s.toString().includes("%"))&&(t.width=parseFloat(t.width)/100*c),t.horizontalAlignment="left",t.verticalAlignment="top"}return t})(e,Te,null===(o=ye.relativeWindow)||void 0===o?void 0:o.windowName,null==t?void 0:t.position)),Se.placement=Te,Se.cascade=S(ye);const Ae=A(e,ye);ye.ephemeral&&(Se.showInTaskbar=ye.ephemeral,Se.onTop=!0,Se.hasSizeAreas=!1,Se.isSticky=!1);const Ce=null===(l=null===(s=null===(a=null==i?void 0:i.customProperties)||void 0===a?void 0:a.appd)||void 0===s?void 0:s.hostManifests)||void 0===l?void 0:l.Finsemble,Ie=null!==(h=null===(u=null===(p=null===(d=null==Ce?void 0:Ce.foreign)||void 0===d?void 0:d.services)||void 0===p?void 0:p.windowService)||void 0===u?void 0:u.addToWorkspace)&&void 0!==h?h:null===(f=null==Ce?void 0:Ce.window)||void 0===f?void 0:f.addToWorkspace,_e=null!==(m=null!=Ie?Ie:ye.addToWorkspace)&&void 0!==m&&m;if(Se.ignoreFromLayouts=g(_e),w(Ae.relativeTo)&&(Se.relativeTo=Ae.relativeTo),w(Ae.relativeDirection)&&(Se.relativeDirection=Ae.relativeDirection),w(ye.canGroup)&&(Se.isSticky=null!==(v=ye.canGroup)&&void 0!==v?v:void 0),w(null===(y=ye.options)||void 0===y?void 0:y.showTaskbarIcon)&&(Se.showInTaskbar=null===(k=ye.options)||void 0===k?void 0:k.showTaskbarIcon),w(null===(C=ye.options)||void 0===C?void 0:C.resizable)&&(Se.hasSizeAreas=null===(I=ye.options)||void 0===I?void 0:I.resizable),w(null===(F=ye.options)||void 0===F?void 0:F.alwaysOnTop)&&(Se.onTop=null===(P=ye.options)||void 0===P?void 0:P.alwaysOnTop),w(null===(x=ye.options)||void 0===x?void 0:x.autoShow)&&(Se.hidden=null!==(L=g(null===(R=ye.options)||void 0===R?void 0:R.autoShow))&&void 0!==L?L:void 0),w(ye.minWidth)&&(Se.minWidth=ye.minWidth),w(ye.minHeight)&&(Se.minHeight=ye.minHeight),w(ye.maxWidth)&&(Se.maxWidth=ye.maxWidth),w(ye.maxHeight)&&(Se.maxHeight=ye.maxHeight),w(ye.slave)&&(Se.isChild=ye.slave),w(null===(W=ye.options)||void 0===W?void 0:W.windowState)&&(Se.windowState=null===(j=ye.options)||void 0===j?void 0:j.windowState),w(ye.frame)&&(Se.showTitleBar=null!==(O=g(ye.frame))&&void 0!==O?O:void 0),ye.addToTabCollection&&(Se.tabGroupId="string"==typeof ye.addToTabCollection?ye.addToTabCollection:be),(null===(D=ye.options)||void 0===D?void 0:D.preloadScripts)&&(Se.preloadScripts=ye.options.preloadScripts),!1===ye.autoFocus&&(Se.focus=!1),ye.url&&(Se.url=ye.url),ye.path){const e=ye.path.split(/[\\/]/),t=e.pop(),i=e.join("/");Se.command=t,Se.path=i}w(null===(M=ye.options)||void 0===M?void 0:M.windowSpawnTimeout)&&(Se.timeout=null===($=ye.options)||void 0===$?void 0:$.windowSpawnTimeout);const Fe=null!==(E=ye.argumentsAsQueryString)&&void 0!==E?E:null===(H=null===(B=null===(N=null===(z=null===(U=i.customProperties)||void 0===U?void 0:U.appd)||void 0===z?void 0:z.hostManifests)||void 0===N?void 0:N.Finsemble)||void 0===B?void 0:B.window)||void 0===H?void 0:H.argumentsAsQueryString;if(w(ye.arguments)&&(Fe?Se.urlLoadOptions={queryString:ye.arguments}:Se.parameters=ye.arguments),w(ye.env)&&(Se.env=ye.env),"exe"===i.type||"assimilation"===(null===(J=null===(Z=null===(V=null===(G=null===(q=null==i?void 0:i.customProperties)||void 0===q?void 0:q.appd)||void 0===G?void 0:G.hostManifests)||void 0===V?void 0:V.Finsemble)||void 0===Z?void 0:Z.window)||void 0===J?void 0:J.windowType)){let t=null!==(se=null!==(te=null!==(Y=null!==(K=Se.parameters)&&void 0!==K?K:i.details.parameters)&&void 0!==Y?Y:null===(ee=null===(X=null===(Q=null==i?void 0:i.customProperties)||void 0===Q?void 0:Q.appd)||void 0===X?void 0:X.details)||void 0===ee?void 0:ee.arguments)&&void 0!==te?te:null===(ae=null===(re=null===(oe=null===(ne=null===(ie=null==i?void 0:i.customProperties)||void 0===ie?void 0:ie.appd)||void 0===ne?void 0:ne.hostManifests)||void 0===oe?void 0:oe.Finsemble)||void 0===re?void 0:re.window)||void 0===ae?void 0:ae.arguments)&&void 0!==se?se:"";if("exe"===i.type&&"assimilation"!==(null===(ue=null===(pe=null===(de=null===(ce=null===(le=null==i?void 0:i.customProperties)||void 0===le?void 0:le.appd)||void 0===ce?void 0:ce.hostManifests)||void 0===de?void 0:de.Finsemble)||void 0===pe?void 0:pe.window)||void 0===ue?void 0:ue.windowType)&&"external"!==(null===(ve=null===(me=null===(ge=null===(fe=null===(he=null==i?void 0:i.customProperties)||void 0===he?void 0:he.appd)||void 0===fe?void 0:fe.hostManifests)||void 0===ge?void 0:ge.Finsemble)||void 0===me?void 0:me.window)||void 0===ve?void 0:ve.windowType)){let n=!1;if(!t.includes("apiToLogFile")){const t=await e.contexts.get(c);!0===(null===(we=null==t?void 0:t.iocd)||void 0===we?void 0:we.apiToLogFile)&&(n=!0)}t=_(t,i.name,n,Fe)}Se.parameters=t}return Se.ignoreFromLayouts&&(Se.isSticky=!1,"tab"!==Se.mode&&"tab"!==i.details.mode||(Se.mode="flat")),w(Se.iocd)?r()(Se,Se.iocd):Se},P=(e,t,i=[])=>{e&&"object"==typeof e&&Object.entries(e).forEach(n=>{const[o,r]=n,a=i.concat([o]);"object"==typeof r?P(r,t,a):t({_path:a,obj:e,key:o,value:r})})};class x{constructor(){this.promises=[]}addConstructor(){const t=new e;return this.promises.push(t.promise),t}finishConstructor(e){e.resolve()}async ready(){await l().allSettled(this.promises)}}const R=(e,t,i)=>i.indexOf(e)===t,L=(e,t,i)=>i.filter(t=>t===e).length>1,W=(e,t)=>{var i;const n=null===(i=e.windowData)||void 0===i?void 0:i.filter(e=>"StackedWindow"===e.windowType),o=null==n?void 0:n.find(e=>{var i;return null===(i=e.childWindowIdentifiers)||void 0===i?void 0:i.some(e=>e.windowName===t.name)});return null!=o?o:null},j=(e,t,i)=>{var o;const r=(null!==(o=t.windowData)&&void 0!==o?o:[]).flatMap(e=>{var i,o,r,a,s,l,c;if("StackedWindow"===e.windowType)return[];const d=O(((e,t)=>{var i,n,o,r;return null!==(r=null===(o=null===(n=null===(i=null==e?void 0:e.componentStates)||void 0===i?void 0:i[t.name])||void 0===n?void 0:n["Interop-#Linker-linkedChannels"])||void 0===o?void 0:o.channels)&&void 0!==r?r:[]})(t,e)),p=(e=>0===e?{windowState:"Normal",restoreState:"Normal"}:1===e?{windowState:"Minimized",restoreState:"Normal"}:3===e?{windowState:"Minimized",restoreState:"Maximized"}:2===e?{windowState:"Maximized",restoreState:"Normal"}:{windowState:"Normal",restoreState:"Normal"})(e.windowState),u=null===(i=W(t,e))||void 0===i?void 0:i.name,h=((e,t)=>{var i,n;const o=null!==(n=null===(i=e.componentStates)||void 0===i?void 0:i[t])&&void 0!==n?n:{},r={};return Object.keys(o).forEach(e=>{if("#finsemble-windowName"!==e&&"#finsemble-spawnData"!==e)if("Interop-#Linker-linkedChannels"!==e){if("Interop-#Workspace-contexts"===e){const t=o[e];return Object.entries(t).forEach(([e,t])=>{o[`#finsemble-persistedContext-${e}`]=t}),void delete o[e]}r[e]=o[e],delete o[e]}else delete o[e]}),o["#finsemble-componentState"]=r,o})(t,e.name),f=null!==(r=null===(o=t.componentStates)||void 0===o?void 0:o[e.name])&&void 0!==r?r:{},g={channels:Object.entries(null!==(a=f["customFDC3-channels"])&&void 0!==a?a:{}).flatMap(([e,t])=>"Both"===t?[{name:e,read:!0,write:!0}]:"Broadcast"===t?[{name:e,read:!1,write:!0}]:"Listen"===t?[{name:e,read:!0,write:!1}]:[])},m={application:e.componentType,type:null!==(s=e.type)&&void 0!==s?s:"window",componentType:"application",state:{context:h,isCollapsed:!1,windowState:p.windowState,channelSelector:{enabled:!0},channelRestrictions:g,mode:"tab",channelId:d,restoreState:p.restoreState,bounds:{left:e.left,top:e.top,width:e.width,height:e.height},isSticky:!0,instanceId:e.name}},{workspaces:v}=e;v&&(m.state.workspaces=v);const y=null!==(l=f.persistedTitle)&&void 0!==l?l:null;y&&(m.state.userTitle=y);const b=((e,t)=>{var i,n,o;const r=W(e,t),a=null!==(n=null===(i=null==r?void 0:r.childWindowIdentifiers)||void 0===i?void 0:i.findIndex(e=>e.windowName===t.name))&&void 0!==n?n:0,s=(null===(o=null==r?void 0:r.visibleWindowIdentifier)||void 0===o?void 0:o.windowName)===t.name;return(a+1)*(!r||s?-1:1)})(t,e),S=null!==(c=((e,t)=>{const i=W(e,t);return null==i?void 0:i.name})(t,e))&&void 0!==c?c:n()(),k=((e,t,i)=>{var n;const[o]=null!==(n=Object.entries(e.groups).find(([e,n])=>(e=>{let n=!1;return e.isMovable&&(n=e.windowNames.includes(t.name)||e.windowNames.includes(null!=i?i:""),n||e.windowNames.forEach(e=>{t.name.endsWith(e)&&(n=!0)})),n})(n)))&&void 0!==n?n:[null];return o})(t,e,u);return w(b)&&(m.state.tabIndex=b),m.state.tabGroupId=S,("exe"!==e.type||k)&&(m.state.restoreSettings={groupId:null!=k?k:`${S}-1`,groupZOrder:0}),[m]}),a={"iop#position":i};return t.id&&(a.id=t.id),{name:e,type:"Global",components:r,context:{},metadata:a,version:2}},O=e=>e.join("+++"),D=e=>""!==e&&e?e.split("+++"):[],M=e=>{var t;const i=(e=>{const t=e.map(e=>{var t,i;return null===(i=null===(t=e.state)||void 0===t?void 0:t.restoreSettings)||void 0===i?void 0:i.groupId}).filter(w).filter(R).map(t=>[t,{isMovable:!0,isAlwaysOnTop:!1,windowNames:e.flatMap(e=>{var i,n;return(null===(n=null===(i=e.state)||void 0===i?void 0:i.restoreSettings)||void 0===n?void 0:n.groupId)===t?[e.state.instanceId]:[]})}]).filter(e=>e[1].windowNames.length>1);return Object.fromEntries(t)})(e.components),{windowData:n,stacks:o}=(e=>{const t=e.map(e=>{var t,i,n,o,r,a,s,l,c,d,p,u,h,f,g,m,v,w,y,b;const S=e.application;return{componentType:S,name:`${S}${e.state.instanceId}`,opacity:1,windowState:(k=e.state.windowState,T=e.state.restoreState,"Normal"===k?0:"Minimized"===k&&"Normal"===T?1:"Minimized"===k&&"Maximized"===T?3:"Maximized"===k?2:0),left:null===(i=null===(t=e.state)||void 0===t?void 0:t.bounds)||void 0===i?void 0:i.left,top:null===(o=null===(n=e.state)||void 0===n?void 0:n.bounds)||void 0===o?void 0:o.top,width:null===(a=null===(r=e.state)||void 0===r?void 0:r.bounds)||void 0===a?void 0:a.width,height:null===(l=null===(s=e.state)||void 0===s?void 0:s.bounds)||void 0===l?void 0:l.height,right:null===(d=null===(c=e.state)||void 0===c?void 0:c.bounds)||void 0===d?void 0:d.right,bottom:null===(u=null===(p=e.state)||void 0===p?void 0:p.bounds)||void 0===u?void 0:u.bottom,defaultLeft:null===(f=null===(h=e.state)||void 0===h?void 0:h.bounds)||void 0===f?void 0:f.left,defaultTop:null===(m=null===(g=e.state)||void 0===g?void 0:g.bounds)||void 0===m?void 0:m.top,defaultWidth:null===(w=null===(v=e.state)||void 0===v?void 0:v.bounds)||void 0===w?void 0:w.width,defaultHeight:null===(b=null===(y=e.state)||void 0===y?void 0:y.bounds)||void 0===b?void 0:b.height,workspaces:e.state.workspaces,type:e.type};var k,T}),i=e.map(e=>e.state.tabGroupId).filter(w).filter(L).filter(R),n=(e,t)=>Math.abs(e.state.tabIndex)>Math.abs(t.state.tabIndex)?1:Math.abs(e.state.tabIndex)<Math.abs(t.state.tabIndex)?-1:0,o=i.map(t=>{const i=e.find(e=>e.state.tabGroupId===t&&e.state.tabIndex<0),o=e.filter(e=>e.state.tabGroupId===t).sort(n).map(e=>({windowName:`${e.application}${e.state.instanceId}`}));return{name:t,windowType:"StackedWindow",componentType:"StackedWindow",visibleWindowIdentifier:{windowName:i?`${i.application}${i.state.instanceId}`:void 0},childWindowIdentifiers:o,left:null==i?void 0:i.state.bounds.left,top:null==i?void 0:i.state.bounds.top,width:null==i?void 0:i.state.bounds.width,height:null==i?void 0:i.state.bounds.height,bounds:{left:null==i?void 0:i.state.bounds.left,top:null==i?void 0:i.state.bounds.top,width:null==i?void 0:i.state.bounds.width,height:null==i?void 0:i.state.bounds.height}}});return{windowData:t.concat(o),stacks:o}})(e.components),r=(e=>{const t=e.map(e=>{var t,i,n,o,r,a;const s=`${e.application}${e.state.instanceId}`,l=D(e.state.channelId),c=e.state.channelId?{"Interop-#Linker-linkedChannels":{channels:l}}:{},d={...null!==(i=null===(t=e.state)||void 0===t?void 0:t.context)&&void 0!==i?i:{},...null===(o=null===(n=e.state)||void 0===n?void 0:n.context)||void 0===o?void 0:o["#finsemble-componentState"],...c};delete d["#finsemble-componentState"];const p=null!==(a=null===(r=e.state.channelRestrictions)||void 0===r?void 0:r.channels)&&void 0!==a?a:[];return d["customFDC3-channels"]=Object.fromEntries(l.map(e=>{const t=p.find(t=>t.name===e);return t&&!t.read?[e,"Broadcast"]:t&&!t.write?[e,"Listen"]:[e,"Both"]})),e.state.userTitle&&(d.persistedTitle=e.state.userTitle),(e=>{const t={};Object.keys(e).forEach(i=>{const n=i.split("#finsemble-persistedContext-")[1];n&&(t[n]=e[i],delete e[i])}),e["Interop-#Workspace-contexts"]=t})(d),[s,d]});return Object.fromEntries(t)})(e.components);o.forEach(e=>r[e.name]={});const a=n.map(e=>e.name),s={version:"1.0.0",name:e.name,type:"workspace",groups:i,windows:a,componentStates:r,custom:{},windowData:n,tabCollections:[]};return(null===(t=e.metadata)||void 0===t?void 0:t.id)&&(s.id=e.metadata.id),s},$=async e=>e.sort((e,t)=>{var i,n;const o=null===(i=e.metadata)||void 0===i?void 0:i["iop#position"],r=null===(n=t.metadata)||void 0===n?void 0:n["iop#position"];return void 0===o&&void 0!==r?1:void 0!==o&&void 0===r?-1:void 0===o&&void 0===r?e.name<t.name?-1:e.name>t.name?1:0:o<r?-1:o>r?1:0}),E=e=>{var t;if(!(null==e?void 0:e.workArea)||!(null==e?void 0:e.scaleFactor)||!e.bounds)return null;const{availableRect:i,monitorRect:n}=(e=>{var t;if(!(null==e?void 0:e.workArea)||!(null==e?void 0:e.scaleFactor)||!e.bounds)return;const i={left:(null===(t=e.workArea)||void 0===t?void 0:t.left)*(null==e?void 0:e.scaleFactor),top:e.workArea.top*e.scaleFactor,width:e.workArea.width,height:e.workArea.height};i.right=i.left+i.width,i.bottom=i.top+i.height;const n={left:e.bounds.left*e.scaleFactor,top:e.bounds.top*e.scaleFactor,width:e.bounds.width,height:e.bounds.height};return n.right=n.left+n.width,n.bottom=n.top+n.height,{availableRect:i,monitorRect:n}})(e);return{monitor:{dipRect:i,scaledRect:i},availableRect:i,monitorRect:n,name:`device${e.index}`,deviceId:Number(null!==(t=e.id)&&void 0!==t?t:0).toString(),deviceScaleFactor:1/e.scaleFactor,displayDeviceActive:!0,position:e.index,whichMonitor:e.isPrimary?"primary":e.index}},U=(e,t)=>{if(t.includes("%")){const i=parseFloat(t)/100;return Math.abs(e*i)}return parseInt(t)},z=(e,t)=>{const i="string"==typeof t.top?U(e.height,t.top):t.top,n="string"==typeof t.left?U(e.width,t.left):t.left,o="string"==typeof t.height?U(e.height,t.height):t.height;return{top:i,left:n,width:"string"==typeof t.width?U(e.width,t.width):t.width,height:o}},N=async(e,t,i)=>{var n,o,r,a,s,l,c;const d=null!==(n=t.title)&&void 0!==n?n:"Group",p=null!==(o=null==i?void 0:i.toSpawn)&&void 0!==o?o:null===(s=null===(a=null===(r=t.hostManifests)||void 0===r?void 0:r.Finsemble)||void 0===a?void 0:a.window)||void 0===s?void 0:s.toSpawn;if(!p||!Array.isArray(p))return{err:`convertFinsembleLaunchGroupAppd2GlueGroupOptions: Unexpected value in appd hostManifests.Finsemble.window.toSpawn property. Expected array, received: ${p}`};let u=e.windows.my();u||(u=e.windows.find("Toolbar"));const h=await(null==u?void 0:u.getDisplay());if(!h)return{err:"convertFinsembleLaunchGroupAppd2GlueGroupOptions: Can't get display"};const f=await z(null==h?void 0:h.bounds,null===(c=null===(l=t.hostManifests)||void 0===l?void 0:l.Finsemble)||void 0===c?void 0:c.window),g=p.map(e=>{var t;const{top:i,left:n,height:o,width:r}=null!==(t=e.spawnOptions)&&void 0!==t?t:{},a=z(f,{top:i,left:n,height:o,width:r});return"components"in e?{mode:"tab",bounds:a,applications:e.components.map(({componentType:e})=>({name:e}))}:{mode:"tab",bounds:a,applications:[{name:e.componentType}]}});return{data:{context:{},groups:[{title:d,frames:g}]}}},B=async(e,t)=>{const i=`FSBL.SearchProvider.${t.name}`,n=`${i}.ActionHandler`,o=await e.search.registerProvider({name:i});return await m(()=>e.interop.register(n,async e=>{console.debug("Action handler received",o.id,e);const i=t.itemActionCallback;i?i(e):console.warn("Action provider not found for",o.id,e)})),o.onQuery(e=>{t.searchCallback({text:e.search},(t,i)=>{const o=Array.isArray(i)?i:[i];t?e.error(t):(o.forEach(t=>{const{name:i,type:o,description:r,actions:a=[],...s}=t,l=a.map(e=>({name:e.name,method:n}));e.sendResult({type:{name:o},description:r,displayName:i,action:l.shift(),secondaryActions:l,metadata:{...s}})}),e.done())})}),{name:t.name,provider:o}},H=async(e,t,i)=>{const{err:n,data:o}=await v(()=>e.interop.invoke("FSBL.Clients.WorkspaceClient.triggerEventHandlers",{event:t,workspaceName:i}));return{err:n,data:o}},q=async(e,t,i)=>{var n,o,r,s,l,c,d,p,u,h,f,g,v,w,y,b,S,k,T,A;const _=await e.appManager.getConfigurations([t]),{didSpawn:P,error:x,instance:R,launchGroupWindows:L}=await(async(e,t,i)=>{var n,o,r,a,s,l;if(!i)return{didSpawn:!1};if("launchGroup"!==(null===(s=null===(a=null===(r=null===(o=null===(n=i.customProperties)||void 0===n?void 0:n.appd)||void 0===o?void 0:o.hostManifests)||void 0===r?void 0:r.Finsemble)||void 0===a?void 0:a.window)||void 0===s?void 0:s.windowType))return{didSpawn:!1};const{err:c,data:d}=await N(e,null===(l=i.customProperties)||void 0===l?void 0:l.appd,t);if(!d)return{didSpawn:!1};const{err:p,data:u}=await m(()=>e.windows.groups.create(d));if(p||!u)return{didSpawn:!1,error:null!=p?p:"No data returned"};const h=u[0];return{didSpawn:!0,error:p,instance:h,launchGroupWindows:h.windows.map(({id:e})=>e)}})(e,null!=i?i:{},null!==(n=_[0])&&void 0!==n?n:{});if(P)return{error:x,data:R,launchGroupWindows:L};const{err:W,data:j}=await m(()=>e.appManager.application(t));if(W||!j){const e=`AppsClient.spawn:application ${W}`;return console.log(e),{error:e,data:void 0}}const O=await F(e,i,null!==(o=_[0])&&void 0!==o?o:{});O.awaitInterop=!1;const{data:D}=null!==(r=await m(()=>(async e=>await I.wait(async()=>{var t;if(!(null===(t=null==e?void 0:e.application)||void 0===t?void 0:t.name))return;if(C[e.application.name])return C[e.application.name];const i=await e.application.getConfiguration();return i&&(C[e.application.name]=i),i}))(e.windows.my())))&&void 0!==r?r:{},M=(null!==(u=null===(p=null===(d=null===(c=null===(l=null===(s=null==D?void 0:D.customProperties)||void 0===s?void 0:s.appd)||void 0===l?void 0:l.hostManifests)||void 0===c?void 0:c.Finsemble)||void 0===d?void 0:d.interop)||void 0===p?void 0:p.selectConnect)&&void 0!==u?u:[]).find(e=>e.autoAssociate);if(M){const i=await e.channels.current();(M.autoAssociate.allChildren||(null===(h=M.autoAssociate.selectChildren)||void 0===h?void 0:h.includes(t)))&&(O.channelId=i)}const $=(0,a.merge)(null!==(S=null===(b=null===(y=null===(w=null===(v=null===(g=null===(f=_[0])||void 0===f?void 0:f.customProperties)||void 0===g?void 0:g.appd)||void 0===v?void 0:v.hostManifests)||void 0===w?void 0:w.Finsemble)||void 0===y?void 0:y.window)||void 0===b?void 0:b.data)&&void 0!==S?S:{},null!==(A=null!==(k=null==i?void 0:i.data)&&void 0!==k?k:null===(T=null==i?void 0:i.options)||void 0===T?void 0:T.customData)&&void 0!==A?A:{}),E=null==i?void 0:i.componentState,U=$?{"#finsemble-spawnData":$}:{};E&&(U["#finsemble-componentState"]=E),(null==i?void 0:i.name)&&(U["#finsemble-windowName"]=i.name);const{err:z,data:B}=await m(()=>j.start(U,O));return{error:z,data:B}};class G{constructor(e,t,i){this.glue=e,this.logger=t,this.router=i}async loadUserDefinedApps(){var e;const{data:t}=await m(()=>this.glue.prefs.get("IO.Global.UserDefinedApps")),i=Object.values(null!==(e=null==t?void 0:t.data)&&void 0!==e?e:{}).map(e=>({type:"window",name:e.name,title:e.name,details:{url:e.url},customProperties:{isUserDefined:!0}}));i.length&&this.logger.debug("app-service - Adding user defined apps",null==t?void 0:t.data);const{err:n}=await m(()=>this.glue.appManager.inMemory.import(i,"merge"));n&&this.logger.error("app-service - Error adding userDefinedApps",null==t?void 0:t.data,n)}async appUpdateListener(){const e=(0,a.debounce)(async()=>{this.logger.debug("app-service - updateApps from either onAppAdded or onAppRemoved");const{err:e,data:t}=await(async e=>{const{err:t,data:i}=await m(()=>e.appManager.getConfigurations());if(t||!i)return{err:`getComponentList:getConfigurations ${t}`};const n=i.flatMap(e=>{var t,i,n,o,a,s;const l=null!==(i=null===(t=null==e?void 0:e.customProperties)||void 0===t?void 0:t.component)&&void 0!==i?i:null===(a=null===(o=null===(n=null==e?void 0:e.customProperties)||void 0===n?void 0:n.appd)||void 0===o?void 0:o.hostManifests)||void 0===a?void 0:a.Finsemble,c=r()(null!=l?l:{},(e=>{var t,i;const n=e.icon&&""!==e.icon?{imageType:"url",path:e.icon}:void 0;return{window:{},component:{displayName:e.title,type:e.name,isUserDefined:!!(null===(t=e.customProperties)||void 0===t?void 0:t.isUserDefined)},foreign:{components:{"App Launcher":{launchableByUser:null===(i=g(e.hidden))||void 0===i||i}}},icons:{toolbarIcon:n,taskbarIcon:n,titleBarIcon:n}}})(e));return[r()(c,{appConfig:null===(s=null==e?void 0:e.customProperties)||void 0===s?void 0:s.appd})]});return{err:null,data:Object.fromEntries(n.map(e=>{var t,i;return[null!==(i=null===(t=null==e?void 0:e.component)||void 0===t?void 0:t.type)&&void 0!==i?i:"Unknown Component",e]}))}})(this.glue);!e&&t&&(this.logger.debug("app-service - Launcher.update",Object.keys(t)),this.router.publish("Launcher.update",{componentList:t}))},1500);this.glue.appManager.onAppAdded(()=>{e()}),this.glue.appManager.onAppRemoved(()=>{e()})}async spawnLaunchGroup(e){var t;const{appd:i}=e,{err:n,data:o}=await N(this.glue,i);if(n||!o)return{error:"Invalid launch group configuration. Check logs."};const{err:r,data:a}=await m(()=>this.glue.windows.groups.create(o));return{error:r,data:null===(t=null==a?void 0:a[0])||void 0===t?void 0:t.id}}async addListeners(){await this.glue.interop.register("FSBL.Clients.AppsClient.spawnLaunchGroup",p(async e=>await this.spawnLaunchGroup(e),this.logger))}async start(){await this.addListeners(),await this.appUpdateListener()}}const V=e=>{var t,i;const n=null!==(i=null!==(t=e.src)&&void 0!==t?t:e.url)&&void 0!==i?i:e.icon;return null!=n?n:""},Z=(e,t)=>{var i,n,o,r,a;if(!e)return e;const s=null!==(n=null===(i=null==t?void 0:t.details)||void 0===i?void 0:i.url)&&void 0!==n?n:null===(a=null===(r=null===(o=null==t?void 0:t.hostManifests)||void 0===o?void 0:o.Finsemble)||void 0===r?void 0:r.window)||void 0===a?void 0:a.url;if(!s)return e;if(e.includes("http://")||e.includes("https://"))return e;try{return new URL(e,s).href}catch(t){return e}},J=(e,t)=>{var i;const n=null!==(i=null==e?void 0:e.icons)&&void 0!==i?i:[];if(!n)return;const o=n.filter(e=>!("taskbar"!==t||!(e=>{if(!(null==e?void 0:e.src))return!1;const t=e.src.toLowerCase();return t.endsWith(".png")||t.endsWith(".jpg")||t.endsWith(".jpeg")||t.endsWith(".ico")})(e))||"web"===t&&(e=>{if(!(null==e?void 0:e.src))return!0;if(null==e?void 0:e.type)return t=e.type,["image/webp","image/svg+xml","image/tiff","image/svg+xml","image/png","image/jpeg","image/jpg"].includes(t);var t;const i=e.src.toLowerCase();try{const e=new URL(i);return e.search?!e.search.includes(".ico")&&!e.search.includes(".icns"):!i.endsWith(".ico")&&!i.endsWith(".icns")}catch(e){return!1}})(e));return 0!==o.length?1===o.length?{imageType:"url",path:Z(V(o[0]),e)}:(e=>{const t=e.sort((e,t)=>{if(e.sizes&&t.sizes){const i=parseInt(e.sizes,10)-16,n=parseInt(t.sizes,10)-16;return Math.abs(i)-Math.abs(n)}return e.sizes&&!t.sizes?-1:t.sizes&&!e.sizes?1:0})[0];return{imageType:"url",path:V(t)}})(o):void 0},K=e=>(e=>{var t,i,n,o,r,a,s,l,c;const d=null!==(a=null!==(r=null!==(t=null==e?void 0:e.title)&&void 0!==t?t:null===(o=null===(n=null===(i=null==e?void 0:e.hostManifests)||void 0===i?void 0:i.Finsemble)||void 0===n?void 0:n.component)||void 0===o?void 0:o.displayName)&&void 0!==r?r:null==e?void 0:e.name)&&void 0!==a?a:null==e?void 0:e.appId,p={imageType:"initials",name:null!=d?d:""},u=J(e,"web"),h=J(e,"taskbar"),f=(e=>{var t,i,n,o;const r=null===(o=null===(n=null===(i=null===(t=null==e?void 0:e.hostManifests)||void 0===t?void 0:t.Finsemble)||void 0===i?void 0:i.foreign)||void 0===n?void 0:n.components)||void 0===o?void 0:o.Toolbar;return(null==r?void 0:r.iconURL)?{imageType:"url",path:r.iconURL}:void 0})(e),g=null!==(s=null!=f?f:u)&&void 0!==s?s:p,m=null!==(l=null!=f?f:u)&&void 0!==l?l:p;var v;return{taskbarIcon:null!==(c="url"===(null==(v=f)?void 0:v.imageType)?v:void 0)&&void 0!==c?c:h,toolbarIcon:g,titleBarIcon:m}})(e),Y=["assimilation","assimilated","native","NativeWindow","FinsembleNativeWindow","external"],Q=e=>{const t=(null!=e?e:[]).map(({src:e,url:t})=>({src:null!=e?e:t}));if(t.length>0)return t},X=e=>{const t=(null!=e?e:[]).map(({src:e,url:t})=>({src:null!=e?e:t}));if(t.length>0)return t};function ee({appId:e,name:t,interop:i,manifest:n,version:o,title:r,tooltip:a,description:s,images:l,icons:c,contactEmail:d,supportEmail:p,publisher:u,intents:h,tags:f}){var g,m,v,w,y,b,S,k,T,A,C,I,_,F,P,x,R;const L={appId:e,name:t,type:"web",interop:i,title:null!==(v=null!==(m=null!=r?r:null===(g=null==n?void 0:n.component)||void 0===g?void 0:g.displayName)&&void 0!==m?m:t)&&void 0!==v?v:e,description:s,version:o,tooltip:a,contactEmail:d,supportEmail:p,publisher:u,icons:Q(c),screenshots:X(l),hostManifests:{Finsemble:n},categories:f};return(null===(w=null==n?void 0:n.window)||void 0===w?void 0:w.url)?(Y.includes(null!==(b=null===(y=null==n?void 0:n.window)||void 0===y?void 0:y.windowType)&&void 0!==b?b:"")?L.type="onlineNative":L.type="web",L.details={url:null===(S=null==n?void 0:n.window)||void 0===S?void 0:S.url}):(null===(k=null==n?void 0:n.window)||void 0===k?void 0:k.path)?(L.type="native",L.details={path:null===(T=n.window)||void 0===T?void 0:T.path,arguments:null===(A=n.window)||void 0===A?void 0:A.arguments}):"Citrix"===(null===(C=null==n?void 0:n.window)||void 0===C?void 0:C.windowType)?(L.type="citrix",L.details={alias:null===(I=n.window)||void 0===I?void 0:I.alias,arguments:null===(_=n.window)||void 0===_?void 0:_.arguments}):(null===(F=null==n?void 0:n.window)||void 0===F?void 0:F.alias)||(null===(P=null==n?void 0:n.window)||void 0===P?void 0:P.arguments)?(L.type="native",L.details={alias:null===(x=n.window)||void 0===x?void 0:x.alias,arguments:null===(R=n.window)||void 0===R?void 0:R.arguments}):(L.type="other",L.details={}),h&&(null==h?void 0:h.length)>0&&(L.interop={intents:{listensFor:Object.fromEntries(null==h?void 0:h.map(({name:e,displayName:t,contexts:i})=>[e,{displayName:t,contexts:i}]))}}),L}const te={spacebar:"space",bs:"Backspace",bksp:"Backspace",shift:"Shift",shft:"Shift",lshift:"Shift",lshft:"Shift","left shift":"Shift",leftshift:"Shift",rshift:"Shift",rshft:"Shift","right shift":"Shift",rightshift:"Shift",commandorcontrol:"CommandOrControl",alternate:"Alt","space bar":"space",pgup:"PageUp","pg up":"PageUp","page down":"PageDown",pgdn:"PageDown","pg dn":"PageDown",pgdown:"PageDown","left arrow":"Left",left:"Left","up arrow":"Up",up:"Up","right arrow":"Right",right:"Right","down arrow":"Down",down:"Down",print:"PrintScreen",prnt:"PrintScreen","print screen":"PrintScreen",printscreen:"PrintScreen","print scrn":"PrintScreen",printscrn:"PrintScreen","prnt scrn":"PrintScreen",prntscrn:"PrintScreen","prt scrn":"PrintScreen",prtscrn:"PrintScreen","prt scn":"PrintScreen",prtscn:"PrintScreen","prt scr":"PrintScreen",prtscr:"PrintScreen","prt sc":"PrintScreen",prtsc:"PrintScreen","pr sc":"PrintScreen",prsc:"PrintScreen",insert:"Insert",ins:"Insert",delete:"Delete",del:"Delete",0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",a:"A",b:"B",c:"C",d:"D",e:"E",f:"F",g:"G",h:"H",i:"I",j:"J",k:"K",l:"L",m:"M",n:"N",o:"O",p:"P",q:"Q",r:"R",s:"S",t:"T",u:"U",v:"V",w:"W",x:"X",y:"Y",z:"Z",windows:"Super","left windows":"Super","right windows":"Super","numpad 0":"num0","numpad 1":"num1","numpad 2":"num2","numpad 3":"num3","numpad 4":"num4","numpad 5":"num5","numpad 6":"num6","numpad 7":"num7","numpad 8":"num8","numpad 9":"num9",f1:"F1",fn1:"F1","function 1":"F1",f2:"F2",fn2:"F2","function 2":"F2",f3:"F3",fn3:"F3","function 3":"F3",f4:"F4",fn4:"F4","function 4":"F4",f5:"F5",fn5:"F5","function 5":"F5",f6:"F6",fn6:"F6","function 6":"F6",f7:"F7",fn7:"F7","function 7":"F7",f8:"F8",fn8:"F8","function 8":"F8",f9:"F9",fn9:"F9","function 9":"F9",f10:"F10",fn10:"F10","function 10":"F10",f11:"F11",fn11:"F11","function 11":"F11",f12:"F12",fn12:"F12","function 12":"F12",f13:"F13",fn:"F13","function 13":"F13",f14:"F14",fn14:"F14","function 14":"F14",f15:"F15",fn15:"F15","function 15":"F15",f16:"F16",fn16:"F16","function 16":"F16","num lock":"Numlock",numlock:"Numlock","number lock":"Numlock","numeric lock":"Numlock","scroll lock":"Scrolllock",sclk:"Scrolllock",scrlk:"Scrolllock",slk:"Scrolllock","*":"*","+":"+","-":"-","/":"/",";":";","=":"=",",":",",".":".","`":"`","[":"[","]":"]","'":"'"},ie=e=>e.map(e=>{var t;return null!==(t=te[e.toString().toLowerCase()])&&void 0!==t?t:e}).join("+").replace(/windows/i,"super").replace(/spacebar/i,"space"),ne={trace:console.trace,debug:console.debug,info:console.info,warn:console.warn,error:console.error},oe=e=>{if(null===e)return"null";if(void 0===e)return"undefined";if(!Array.isArray(e)&&"object"!=typeof e)return e.toString();try{return JSON.stringify(e,null," ")}catch(e){return e.toString()}},re={window:{addToWorkspace:!1,affinity:"systemComponents",options:{autoShow:!1,resizable:!1,showTaskbarIcon:!1,alwaysOnTop:!0}},component:{category:"system"},foreign:{services:{windowService:{shouldRegister:!1}},components:{"App Launcher":{launchableByUser:!1},"Window Manager":{FSBLHeader:!1,persistWindowState:!1}}}},ae={hostManifests:{Finsemble:{bootParams:{autoStart:!0,stage:"preuser"},window:{options:{autoShow:!1},frame:!0},component:{singleton:!0,spawnOnStartup:!0},foreign:{components:{"Window Manager":{FSBLHeader:!1},WindowService:{manageWindowMovement:!1},"App Launcher":{launchableByUser:!1}}}}}},se=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),le=e=>{const t="string"==typeof e?[e]:e,i=t.map(e=>`((http|https)\\:\\/\\/([a-zA-Z0-9_-]*\\.)*${se(e)}(\\/)+.*)`),n=t.map(e=>`(${se(e)}(\\/)+.*)`),o=i.concat(n).join("|");return t.length?{allowed:`^${o}$`}:{}},ce={microkernel:["core",2e3],kernel:["core",1e3],"pre-authentication":["pre-sso",1e3],authentication:["sso",1e3],"appd-retrieval":["post-sso",7e3],"system-preuser":["post-sso",6e3],preuser:["post-sso",5e3],preuser2:["post-sso",4e3],preuser3:["post-sso",3e3],preuser4:["post-sso",2e3],"system-earlyuser":["post-sso",1500],earlyuser:["post-sso",1e3],user:["user",1e3]},de=(e,t,i)=>{var n,o,r,a;return((e,t,i)=>{var n,o,r,a,s,l,c,d;if(e.runPriority)return e;if(!t)return e;if(null===(n=t.bootParams)||void 0===n?void 0:n.stage){const n=null!==(o=t.bootParams.stage)&&void 0!==o?o:"user",p=null!==(r=ce[n])&&void 0!==r?r:["post-sso",9e3];e.runPriority={stage:p[0],priority:p[1],waitForInitialization:t.waitForInitialization,timeout:null!==(d=null!==(a=t.bootParams.timeout)&&void 0!==a?a:null===(c=null===(l=null===(s=i.finsemble)||void 0===s?void 0:s.bootConfig)||void 0===l?void 0:l.defaults)||void 0===c?void 0:c.startServiceTimeout)&&void 0!==d?d:12e4}}else e.autoStart&&(e.runPriority={stage:"post-sso",priority:2});return e})({autoStart:null!==(a=null!==(o=null===(n=null==t?void 0:t.component)||void 0===n?void 0:n.spawnOnStartup)&&void 0!==o?o:null===(r=null==t?void 0:t.bootParams)||void 0===r?void 0:r.autoStart)&&void 0!==a&&a},t,i)},pe=(e,t)=>{var i,n,o;(null===(o=null===(n=null===(i=null==e?void 0:e.finsemble)||void 0===i?void 0:i.authentication)||void 0===n?void 0:n.startup)||void 0===o?void 0:o.component)===t.name&&(t.name="sso-application",t.details.mode="html",t.details.allowClose=!0)},ue=(e,t,i,n,o)=>{var a,s,l,c,d,p,u,h,f,m;t.info(`config - Converting component config ${i} to iocd`,o);const{err:v,data:w}=me(e,t,n,o);if(v||!w)return{err:v};const{details:y}=w;y.mode=null!==(c=null===(l=null===(s=null===(a=o.foreign)||void 0===a?void 0:a.components)||void 0===s?void 0:s["Window Manager"])||void 0===l?void 0:l.FSBLHeader)&&void 0!==c&&c?y.mode:"frameless","UserPreferences"===i&&(y.downloadSettings={autoSave:!1}),y.allowEnvVars=!0,y.allowClearingCache=!0,y.disableTransitions=!0,y.transparent=!1,y.nativeWindowOpenOptions={allowChannels:!1,allowFeedback:!1,allowClose:!1,showInTaskbar:!1,allowMinimize:!1,allowMaximize:!1,allowClearingCache:!0,allowEnvVariables:!0,minWidth:0,maxWidth:1e6,minHeight:0,maxHeight:1e6,disableTransitions:!0,hasSizeAreas:!1,hidden:!0,ignoreFromLayouts:!0};const b={...de(0,o,n),type:"window",details:y,ignoreSavedLayout:"Toolbar"!==i,ignoreFromLayouts:!0,allowAutoArrange:!1,allowLogging:!0,allowCapture:!0,allowCLAAccess:!0,name:i,hidden:null!==(h=g(null===(u=null===(p=null===(d=null==o?void 0:o.foreign)||void 0===d?void 0:d.components)||void 0===p?void 0:p["App Launcher"])||void 0===u?void 0:u.launchableByUser))&&void 0!==h&&h,customProperties:{component:o}};"Toolbar"===i&&(b.shell=!0,b.runPriority={stage:"post-sso",priority:1501,waitForInitialization:!0,timeout:12e4}),"SystemTrayComponent"===i&&(b.name="custom-tray",b.details.showInTaskbar=!1,b.details.width=b.details.placement.width,b.details.height=b.details.placement.height,delete b.details.placement,b.runPriority={stage:"post-sso",priority:1e3}),pe(n,b);const S=null!==(m=null!==(f=o["io.Connect"])&&void 0!==f?f:o["IO.Connect"])&&void 0!==m?m:o.iocd;return{data:r()(b,null!=S?S:{})}},he=(e,t,i,n)=>{var o,a,s,l,c,d,p,u,h,f,m,v,w,b,S,k,T,A,C,I,_,F,P,x,R,L,W,j,O,D,M,$,E,U;const z=null!==(d=null!==(l=null!==(a=null===(o=i.hostManifests)||void 0===o?void 0:o["Glue 42"])&&void 0!==a?a:null===(s=i.hostManifests)||void 0===s?void 0:s["io.Connect"])&&void 0!==l?l:null===(c=i.hostManifests)||void 0===c?void 0:c["IO.Connect"])&&void 0!==d?d:null===(p=i.hostManifests)||void 0===p?void 0:p.iocd;if(z&&!(null===(u=i.hostManifests)||void 0===u?void 0:u.Finsemble))return{data:z};const N=null===(h=i.hostManifests)||void 0===h?void 0:h.Finsemble,B=ge(null==n?void 0:n.finsemble,N),H=K(i),{err:q,data:G}=ve(e,t,n,i);if(q||!G)return{err:q};const{details:V,asset:Z,type:J}=G,Y=y({...de(0,N,n),type:J,details:V,allowLogging:!0,name:i.appId,version:i.version,allowCapture:!0,allowCLAAccess:!0,title:null!==(w=null!==(v=null!==(f=i.title)&&void 0!==f?f:null===(m=null==N?void 0:N.component)||void 0===m?void 0:m.displayName)&&void 0!==v?v:i.name)&&void 0!==w?w:i.appId,caption:i.description,tooltip:i.tooltip,ignoreSavedLayout:!0,hidden:null!==(T=g(null===(k=null===(S=null===(b=null==N?void 0:N.foreign)||void 0===b?void 0:b.components)||void 0===S?void 0:S["App Launcher"])||void 0===k?void 0:k.launchableByUser))&&void 0!==T&&T,ignoreFromLayouts:null!==(P=g(null!==(_=null===(I=null===(C=null===(A=null==N?void 0:N.foreign)||void 0===A?void 0:A.services)||void 0===C?void 0:C.windowService)||void 0===I?void 0:I.addToWorkspace)&&void 0!==_?_:null===(F=null==N?void 0:N.window)||void 0===F?void 0:F.addToWorkspace))&&void 0!==P&&P,allowAutoArrange:B.allowAutoArrange,intents:we(null===(x=i.interop)||void 0===x?void 0:x.intents),reuseInLayouts:null!==(W=null===(L=null===(R=null==N?void 0:N.window)||void 0===R?void 0:R.options)||void 0===L?void 0:L.isEvergreen)&&void 0!==W&&W,supportEmails:i.supportEmail?[i.supportEmail]:void 0,keywords:null!==(j=i.categories)&&void 0!==j?j:i.tags,allowMultiple:g(null===(M=null===(D=null===(O=i.hostManifests)||void 0===O?void 0:O.Finsemble)||void 0===D?void 0:D.component)||void 0===M?void 0:M.singleton),icon:null!==(E=null===($=H.taskbarIcon)||void 0===$?void 0:$.path)&&void 0!==E?E:null===(U=H.toolbarIcon)||void 0===U?void 0:U.path,customProperties:{appd:i}});return Y.ignoreFromLayouts&&(Y.details.isSticky=!1,"tab"===Y.details.mode&&(Y.details.mode="flat")),Z&&(Y.asset=Z),pe(n,Y),{data:r()(Y,null!=z?z:{})}},fe=(e,t,i)=>{var n,o,r,a,s,l,c,d,p,u,h,f,m,v,w,y,b,S,k,T,A,C,I,_,F,P;const x=null==t?void 0:t.window,R=null==t?void 0:t.foreign,L=null!==(o=null===(n=null==R?void 0:R.services)||void 0===n?void 0:n.windowService)&&void 0!==o?o:null===(r=null==R?void 0:R.services)||void 0===r?void 0:r.dockingService,W=null===(a=null==R?void 0:R.components)||void 0===a?void 0:a["Window Manager"],j=null==e?void 0:e["Window Manager"],O=null==W?void 0:W.FSBLHeader;if("boolean"!=typeof O){if("close"===i)return null===(s=g(null==O?void 0:O.hideClose))||void 0===s||s;if("maximize"===i)return null===(c=null!==(l=null==L?void 0:L.allowMaximize)&&void 0!==l?l:g(null==O?void 0:O.hideMaximize))||void 0===c||c;if("minimize"===i)return null===(p=null!==(d=null==L?void 0:L.allowMinimize)&&void 0!==d?d:g(null==O?void 0:O.hideMinimize))||void 0===p||p;if("alwaysOnTop"===i)return null!==(h=null!==(u=null==W?void 0:W.alwaysOnTopIcon)&&void 0!==u?u:null==j?void 0:j.alwaysOnTopIcon)&&void 0!==h&&h}else{if("close"===i||"maximize"===i||"minimize"===i)return!1!==O;if("alwaysOnTop"===i)return!1}const D=null==e?void 0:e.servicesConfig,M=null==D?void 0:D.docking,$=null!==(m=null!==(f=null==D?void 0:D.windowService)&&void 0!==f?f:null==D?void 0:D.dockingService)&&void 0!==m?m:M;return"grouping"===i?(null===(w=null!==(v=null==L?void 0:L.manageWindowMovement)&&void 0!==v?v:null==M?void 0:M.enabled)||void 0===w||w)&&(null===(b=null!==(y=null==L?void 0:L.allowGrouping)&&void 0!==y?y:null==x?void 0:x.canDock)||void 0===b||b):"tabbing"===i&&(null===(C=null!==(T=null!==(S=null==L?void 0:L.manageWindowMovement)&&void 0!==S?S:null===(k=null==$?void 0:$.tabbing)||void 0===k?void 0:k.enabled)&&void 0!==T?T:null===(A=null==M?void 0:M.tabbing)||void 0===A?void 0:A.enabled)||void 0===C||C)&&(null===(P=null!==(F=null!==(_=null!==(I=null==L?void 0:L.allowTabbing)&&void 0!==I?I:null==W?void 0:W.showTabs)&&void 0!==_?_:null==j?void 0:j.showTabs)&&void 0!==F?F:g(null==L?void 0:L.ignoreTilingAndTabbingRequests))||void 0===P||P)},ge=(e,t)=>{var i,n,o,r,a,s,l,c,d,p,u,h,f,g,m,v,w,y,b,S,k,T,A,C,I,_,F,P,x,R,L,W,j,O,D,M,$,E,U,z,N,B,H,q,G,V,Z,J,K,Y,Q;const X=null===(n=null===(i=null==t?void 0:t.foreign)||void 0===i?void 0:i.services)||void 0===n?void 0:n.windowService,ee=(null==(te=X)?void 0:te.allowSnapping)||(null==te?void 0:te.allowGrouping)||(null==te?void 0:te.allowAutoArrange)||(null==te?void 0:te.allowTabbing)||(null==te?void 0:te.allowTiling)||(null==te?void 0:te.allowMinimize)||(null==te?void 0:te.allowMaximize);var te;const ie=!!(null===(o=null==t?void 0:t.window)||void 0===o?void 0:o.dockable),ne=null===(s=null===(a=null===(r=null==t?void 0:t.foreign)||void 0===r?void 0:r.components)||void 0===a?void 0:a["Window Manager"])||void 0===s?void 0:s.FSBLHeader;if(!(ee||ie||ne||!0===(null==X?void 0:X.manageWindowMovement))||!1===(null==X?void 0:X.manageWindowMovement))return{allowAutoArrange:!1,snapping:!1,tiling:!1,tabbing:!1,grouping:!1,canMinimize:!0,canMaximize:!0,overwriteStartDocked:!1,maxWidth:-1===(null===(l=null==t?void 0:t.window)||void 0===l?void 0:l.maxWidth)?null:null!==(d=null===(c=null==t?void 0:t.window)||void 0===c?void 0:c.maxWidth)&&void 0!==d?d:null,maxHeight:-1===(null===(p=null==t?void 0:t.window)||void 0===p?void 0:p.maxHeight)?null:null!==(h=null===(u=null==t?void 0:t.window)||void 0===u?void 0:u.maxHeight)&&void 0!==h?h:null,minWidth:-1===(null===(f=null==t?void 0:t.window)||void 0===f?void 0:f.minWidth)?null:null!==(m=null===(g=null==t?void 0:t.window)||void 0===g?void 0:g.minWidth)&&void 0!==m?m:null,minHeight:-1===(null===(v=null==t?void 0:t.window)||void 0===v?void 0:v.minHeight)?null:null!==(y=null===(w=null==t?void 0:t.window)||void 0===w?void 0:w.minHeight)&&void 0!==y?y:null,showTaskbarIcon:null!==(k=null===(S=null===(b=null==t?void 0:t.window)||void 0===b?void 0:b.options)||void 0===S?void 0:S.showTaskbarIcon)&&void 0!==k?k:null,minimizeButton:fe(e,t,"minimize"),maximizeButton:fe(e,t,"maximize"),alwaysOnTopButton:fe(e,t,"alwaysOnTop"),closeButton:fe(e,t,"close")};const oe=!!(null!==(T=null==X?void 0:X.manageWindowMovement)&&void 0!==T?T:ne||ie);return{allowAutoArrange:null!==(A=null==X?void 0:X.allowAutoArrange)&&void 0!==A?A:oe,snapping:!(null===(C=null==t?void 0:t.window)||void 0===C?void 0:C.ephemeral)&&(null!==(I=null==X?void 0:X.allowSnapping)&&void 0!==I?I:oe),tiling:null!==(_=null==X?void 0:X.allowTiling)&&void 0!==_?_:oe,tabbing:fe(e,t,"tabbing"),grouping:fe(e,t,"grouping"),canMinimize:null!==(x=null!==(F=null==X?void 0:X.allowMinimize)&&void 0!==F?F:null===(P=null==t?void 0:t.component)||void 0===P?void 0:P.canMinimize)&&void 0!==x?x:oe,canMaximize:null!==(W=null!==(R=null==X?void 0:X.allowMaximize)&&void 0!==R?R:null===(L=null==t?void 0:t.component)||void 0===L?void 0:L.canMaximize)&&void 0!==W?W:oe,overwriteStartDocked:null!==(M=null===(D=null===(O=null===(j=null==t?void 0:t.foreign)||void 0===j?void 0:j.services)||void 0===O?void 0:O.workspaceService)||void 0===D?void 0:D.global)&&void 0!==M&&M,maxWidth:-1===(null===($=null==t?void 0:t.window)||void 0===$?void 0:$.maxWidth)?null:null!==(U=null===(E=null==t?void 0:t.window)||void 0===E?void 0:E.maxWidth)&&void 0!==U?U:null,maxHeight:-1===(null===(z=null==t?void 0:t.window)||void 0===z?void 0:z.maxHeight)?null:null!==(B=null===(N=null==t?void 0:t.window)||void 0===N?void 0:N.maxHeight)&&void 0!==B?B:null,minWidth:-1===(null===(H=null==t?void 0:t.window)||void 0===H?void 0:H.minWidth)?null:null!==(G=null===(q=null==t?void 0:t.window)||void 0===q?void 0:q.minWidth)&&void 0!==G?G:null,minHeight:-1===(null===(V=null==t?void 0:t.window)||void 0===V?void 0:V.minHeight)?null:null!==(J=null===(Z=null==t?void 0:t.window)||void 0===Z?void 0:Z.minHeight)&&void 0!==J?J:null,showTaskbarIcon:null!==(Q=null===(Y=null===(K=null==t?void 0:t.window)||void 0===K?void 0:K.options)||void 0===Y?void 0:Y.showTaskbarIcon)&&void 0!==Q?Q:null,minimizeButton:fe(e,t,"minimize"),maximizeButton:fe(e,t,"maximize"),alwaysOnTopButton:fe(e,t,"alwaysOnTop"),closeButton:fe(e,t,"close")}},me=(e,t,i,n,o)=>{var r,a,s,l,c,d,p,u,h,f,m,v,w,k,C,I,F,P,x,R,L,W,j,O,D,M,$,E,U,z,N,B,H,q,G,V,Z,J,Y,Q,X,ee,te,ie,ne,oe,re,ae,se,ce,de,pe,ue,he,me,ve,we,ye,be,Se,ke,Te,Ae,Ce,Ie,_e,Fe,Pe,xe,Re,Le,We,je,Oe,De,Me,$e,Ee,Ue,ze,Ne,Be,He,qe,Ge,Ve,Ze,Je,Ke,Ye,Qe,Xe;const et=ge(null==i?void 0:i.finsemble,n),tt={appId:null!==(r=null==o?void 0:o.appId)&&void 0!==r?r:"UI Component",type:"web",...o},it=K(tt),nt=null==n?void 0:n.window,ot=T(null===(a=null==n?void 0:n.window)||void 0===a?void 0:a.monitor),rt=b(0,nt,ot),at=A(e,nt),st=null!==(c=null!==(s=null==nt?void 0:nt.ephemeral)&&void 0!==s?s:null===(l=null==nt?void 0:nt.options)||void 0===l?void 0:l.alwaysOnTop)&&void 0!==c&&c,{asset:lt,details:ct}=((e,t,i)=>{var n,o,r,a,s,l;const c=null!==(a=null===(r=null===(o=null===(n=null==t?void 0:t.hostManifests)||void 0===n?void 0:n.Finsemble)||void 0===o?void 0:o.window)||void 0===r?void 0:r.alias)&&void 0!==a?a:null===(s=null==t?void 0:t.details)||void 0===s?void 0:s.alias;if(!c)return{};const d=(null!==(l=e.appAssets)&&void 0!==l?l:[]).find(e=>e.alias===c);return d?{asset:{src:d.src},details:{path:"$ASSET_LOCATION$",command:d.target}}:(i.warn(`config - Assets entry for ${c} could not be found. Check manifest-local.json's "manifest" section.`),{})})(i,o,t);if((null==ct?void 0:ct.command)&&["AssimilationMain.exe","BloombergBridge.exe"].includes(ct.command))return t.warn(`config - appAsset for deprecated target ${ct.command} not loaded. Skipping app entry ${tt.appId}`),{err:null};const dt=null!==(u=null!==(p=null===(d=null==tt?void 0:tt.details)||void 0===d?void 0:d.url)&&void 0!==p?p:null==nt?void 0:nt.url)&&void 0!==u?u:null==nt?void 0:nt.path,pt=null==dt?void 0:dt.includes(null===(h=null==i?void 0:i.finsemble)||void 0===h?void 0:h.documentRoot),ut=(null!==(m=null===(f=null==nt?void 0:nt.options)||void 0===f?void 0:f.securityPolicy)&&void 0!==m?m:pt)?"trusted":"untrusted",ht="trusted"===ut,ft="trusted"===ut,gt="trusted"===ut,mt=!1!==(null===(k=null===(w=null===(v=null==n?void 0:n.foreign)||void 0===v?void 0:v.components)||void 0===w?void 0:w["Window Manager"])||void 0===k?void 0:k.FSBLHeader)&&void 0,vt=null===(P=null!==(F=null!==(C=g(null==nt?void 0:nt.ephemeral))&&void 0!==C?C:null===(I=null==nt?void 0:nt.options)||void 0===I?void 0:I.showTaskbarIcon)&&void 0!==F?F:mt)||void 0===P||P,wt=y({placement:rt,title:null!==(W=null!==(L=null!==(x=null==o?void 0:o.title)&&void 0!==x?x:null===(R=null==n?void 0:n.component)||void 0===R?void 0:R.displayName)&&void 0!==L?L:null==o?void 0:o.name)&&void 0!==W?W:null==o?void 0:o.appId,isSticky:null===(z=null!==(M=null===(D=null===(O=null===(j=null==n?void 0:n.foreign)||void 0===j?void 0:j.services)||void 0===O?void 0:O.windowService)||void 0===D?void 0:D.allowGrouping)&&void 0!==M?M:null===(U=null===(E=null===($=null==n?void 0:n.foreign)||void 0===$?void 0:$.services)||void 0===E?void 0:E.windowService)||void 0===U?void 0:U.shouldRegister)||void 0===z||z,channelSelector:null!==(B=null===(N=i.iocd)||void 0===N?void 0:N.channelSelector)&&void 0!==B?B:{enabled:!1!==(null===(H=null==n?void 0:n.interop)||void 0===H?void 0:H.useLinker)},allowClose:et.closeButton,allowMinimize:et.canMinimize,allowMaximize:et.canMaximize,allowEnvVars:ht,allowClearingCache:ft,allowOSInfo:gt,showCloneButton:null===(V=null===(G=null===(q=null==n?void 0:n.foreign)||void 0===q?void 0:q.components)||void 0===G?void 0:G["Window Manager"])||void 0===V?void 0:V.cloneIcon,backgroundThrottling:null!==(J=null===(Z=null==nt?void 0:nt.options)||void 0===Z?void 0:Z.backgroundThrottling)&&void 0!==J&&J,contextMenuEnabled:null===(Q=null===(Y=null==nt?void 0:nt.options)||void 0===Y?void 0:Y.contextMenu)||void 0===Q||Q,hasSizeAreas:null===(te=null!==(X=g(null==nt?void 0:nt.ephemeral))&&void 0!==X?X:null===(ee=null==nt?void 0:nt.options)||void 0===ee?void 0:ee.resizable)||void 0===te||te,hidden:null!==(oe=g(null!==(ie=null==nt?void 0:nt.autoShow)&&void 0!==ie?ie:null===(ne=null==nt?void 0:nt.options)||void 0===ne?void 0:ne.autoShow))&&void 0!==oe&&oe,maxHeight:et.maxHeight,maxWidth:et.maxWidth,minHeight:et.minHeight,minWidth:et.minWidth,saveCurrentUrlInLayout:null!==(ce=null===(se=null===(ae=null===(re=null==n?void 0:n.foreign)||void 0===re?void 0:re.services)||void 0===ae?void 0:ae.workspaceService)||void 0===se?void 0:se.persistURL)&&void 0!==ce&&ce,onTop:!!st&&"always",showInTaskbar:vt,relativeTo:at.relativeTo,relativeDirection:at.relativeDirection,cascade:S(nt),urlLoadOptions:null===(de=null==nt?void 0:nt.options)||void 0===de?void 0:de.userAgentString,devToolsEnable:!!(null===(pe=null==i?void 0:i["finsemble-electron-adapter"])||void 0===pe?void 0:pe.toggleInspectorHotkey),taskbar:{iconPath:null===(ue=it.taskbarIcon)||void 0===ue?void 0:ue.path,combineIcons:"sameIcon",allowPin:!1}});((null===(he=null==n?void 0:n.component)||void 0===he?void 0:he.maxReloadAttempts)||(null===(me=null==n?void 0:n.component)||void 0===me?void 0:me.reloadTimeout))&&(wt.reloadOptions={timeout:null!==(we=null===(ve=null==n?void 0:n.component)||void 0===ve?void 0:ve.reloadTimeout)&&void 0!==we?we:6e4,maxAttempts:null!==(be=null===(ye=null==n?void 0:n.component)||void 0===ye?void 0:ye.maxReloadAttempts)&&void 0!==be?be:1}),(null===(Se=null==n?void 0:n.window)||void 0===Se?void 0:Se.data)&&(wt.context={"#finsemble-spawnData":null===(ke=null==n?void 0:n.window)||void 0===ke?void 0:ke.data}),(null===(Te=null==n?void 0:n.window)||void 0===Te?void 0:Te.dockable)&&((e,t,i)=>{var n,o,r,a,s,l,c,d;const p=!1!==(null===(a=null===(r=null===(o=null===(n=t.finsemble)||void 0===n?void 0:n.servicesConfig)||void 0===o?void 0:o.docking)||void 0===r?void 0:r.claimSpace)||void 0===a?void 0:a.enabled)&&!1!==(null===(d=null===(c=null===(l=null===(s=t.finsemble)||void 0===s?void 0:s.servicesConfig)||void 0===l?void 0:l.window)||void 0===c?void 0:c.claimSpace)||void 0===d?void 0:d.enabled),{dockedHeight:u,dockable:h,docked:f,width:g}=i;e.docking={enabled:!0,claimScreenArea:p,initialPosition:f,allowedPositions:h,height:u},g&&(e.docking.width=g),delete e.placement})(wt,i,n.window);const yt=null!==(Ce=null===(Ae=null==o?void 0:o.details)||void 0===Ae?void 0:Ae.arguments)&&void 0!==Ce?Ce:null==nt?void 0:nt.arguments;let bt="string"==typeof yt?yt:(null!=yt?yt:[]).join(" ");if("native"===tt.type&&"assimilation"!==(null===(Ie=null==n?void 0:n.window)||void 0===Ie?void 0:Ie.windowType)){const e=!0===(null===(_e=i.iocd)||void 0===_e?void 0:_e.apiToLogFile),t=null!==(Re=null===(xe=null===(Pe=null===(Fe=null==o?void 0:o.hostManifests)||void 0===Fe?void 0:Fe.Finsemble)||void 0===Pe?void 0:Pe.window)||void 0===xe?void 0:xe.argumentsAsQueryString)&&void 0!==Re&ℜbt=_(bt,null==o?void 0:o.appId,e,t)}const{command:St,path:kt}=((e,t)=>{if(e)return e;if(!t)return{};const i=t.split(/[\\/]/);return{command:i.pop(),path:i.join("/")}})(ct,null===(Le=tt.details)||void 0===Le?void 0:Le.path),Tt=null==St?void 0:St.endsWith(".bat"),At=y({...wt,command:St,path:kt,useShellExecute:Tt,parameters:bt,saveInLayout:{command:null!==(De=null===(Oe=null===(je=null===(We=null==n?void 0:n.foreign)||void 0===We?void 0:We.services)||void 0===je?void 0:je.workspaceService)||void 0===Oe?void 0:Oe.persistPath)&&void 0!==De&&De,parameters:null===(Ue=null===(Ee=null===($e=null===(Me=null==n?void 0:n.foreign)||void 0===Me?void 0:Me.services)||void 0===$e?void 0:$e.workspaceService)||void 0===Ee?void 0:Ee.persistArguments)||void 0===Ue||Ue},startingContextMode:"assimilation"===(null===(ze=null==n?void 0:n.window)||void 0===ze?void 0:ze.windowType)?"none":"interop",trackingType:"assimilation"===(null===(Ne=null==n?void 0:n.window)||void 0===Ne?void 0:Ne.windowType)?"Process":"AGM"}),Ct=["BloombergBridgePreload","BloombergBridgeClient"],It=((e,t)=>{var i,n,o,r,a,s,l,c,d,p,u,h;const f=null!==(n=null===(i=null==t?void 0:t.component)||void 0===i?void 0:i.preload)&&void 0!==n?n:[];let g=[];const m=null===(o=null==e?void 0:e.finsemble)||void 0===o?void 0:o.extensions,v=null===(s=null===(a=null===(r=null==e?void 0:e.finsemble)||void 0===r?void 0:r.servicesConfig)||void 0===a?void 0:a.launcher)||void 0===s?void 0:s.defaultPreloads;if(m){const e=Object.values(null!==(l=null==m?void 0:m.preloads)&&void 0!==l?l:{}),i=e=>{var i,n,o,r;return"all"===e.autoload||"launchable"===e.autoload&&null!==(r=null===(o=null===(n=null===(i=null==t?void 0:t.foreign)||void 0===i?void 0:i.components)||void 0===n?void 0:n["App Launcher"])||void 0===o?void 0:o.launchableByUser)&&void 0!==r&&r};g=g.concat(e.flatMap(e=>i(e)?[e.url]:[]))}if(v&&(g=g.concat(null!==(c=v.allComponents)&&void 0!==c?c:[]),(null===(u=null===(p=null===(d=null==t?void 0:t.foreign)||void 0===d?void 0:d.components)||void 0===p?void 0:p["App Launcher"])||void 0===u?void 0:u.launchableByUser)&&g.concat(null!==(h=v.launchableComponents)&&void 0!==h?h:[])),Array.isArray(f))g=g.concat(f);else if("string"==typeof f)g.push(f);else if(!1===f)return[];return g})(i,n).filter(e=>!Ct.some(t=>e.includes(t))),_t=!1===(null===(qe=null===(He=null===(Be=null==n?void 0:n.foreign)||void 0===Be?void 0:Be.components)||void 0===He?void 0:He["Window Manager"])||void 0===qe?void 0:qe.FSBLHeader)?"frameless":fe(i.finsemble,n,"tabbing")?"tab":"flat",Ft=y({...wt,onTop:(null===(Ge=null==nt?void 0:nt.options)||void 0===Ge?void 0:Ge.alwaysOnTop)?"always":null,contextMenuEnabled:null===(Ze=null===(Ve=null==nt?void 0:nt.options)||void 0===Ve?void 0:Ve.contextMenu)||void 0===Ze||Ze,preloadScripts:{scripts:It,useBase64PreloadScripts:!1},url:null!=dt?dt:"http://about",icon:null===(Je=it.taskbarIcon)||void 0===Je?void 0:Je.path,mode:_t,logging:{networkRequestErrors:{enabled:!0}}});(null===(Ke=null==nt?void 0:nt.options)||void 0===Ke?void 0:Ke.allowedNavigationUrls)&&(Ft.navigation=le(null===(Ye=null==nt?void 0:nt.options)||void 0===Ye?void 0:Ye.allowedNavigationUrls)),(null===(Qe=null==nt?void 0:nt.options)||void 0===Qe?void 0:Qe.allowedWindowOpenUrls)&&(Ft.windowOpen=le(null===(Xe=null==nt?void 0:nt.options)||void 0===Xe?void 0:Xe.allowedWindowOpenUrls));const Pt=y({...wt});switch(tt.type){case"native":case"FinsembleNativeWindow":case"assimilation":case"external":if(dt&&(xt=dt,new RegExp("^(.+)://(.*)$","i").test(xt))){const e=((e,t,i,n,o)=>{var r,a;const s=structuredClone(i);try{const l=new URL(t);[...null!==(a=null===(r=e["finsemble-electron-adapter"])||void 0===r?void 0:r.allowedBrowserProtocols)&&void 0!==a?a:[],"http","https","mailto"].map(e=>e.endsWith(":")?e:`${e}:`).includes(l.protocol)?["http:","https:","mailto:"].includes(l.protocol)||(o.debug(`convertAppDToGlueDefinition - converting ${n} to exe for protocol handler ${l.protocol}.`),s.command="cmd",s.parameters=`/c start "" "${t}${i.parameters}"`,s.logging=!0,s.trackingType="Process",s.startingContextMode="none",delete s.path):o.warn(`convertAppDToGlueDefinition - URL for ${n} not updated because of unsupported protocol ${l.protocol}. See allowedBrowserProtocols configuration`)}catch(e){o.error(`convertAppDToGlueDefinition - URL for app ${n} not a URL`,e)}return s})(i,dt,At,tt.appId,t);return{data:{details:e,asset:lt,type:"exe"}}}return{data:{details:At,asset:lt,type:"exe"}};case"citrix":return{data:{details:Pt,asset:lt,type:"citrix"}};default:return{data:{details:Ft,asset:lt,type:"window"}}}var xt},ve=(e,t,i,n)=>{var o;const r=null===(o=n.hostManifests)||void 0===o?void 0:o.Finsemble;return me(e,t,i,r,n)},we=e=>{var t;return e?Object.entries(null!==(t=e.listensFor)&&void 0!==t?t:{}).map(e=>{const[t,i]=e;return y({name:t,displayName:i.displayName,contexts:i.contexts,resultType:i.resultType})}):[]};class ye{constructor(e,t,i){this.glue=e,this.logger=t,this.router=i,this.startupTimes={stageTimes:[],cumulativeTimes:0},this.currentStage="",this.currentStageStartTime=0,this.stageWhenToChannelsMap={},this.executedStages={}}async waitForBootStageHandler(e){var t,i;const n=`${null!==(t=ce[e.stage][0])&&void 0!==t?t:e.stage}:${e.when}`;if(this.logger.debug("boot-sequence - bootService.waitForBootStageHandler",e,"converted to",n),this.executedStages[n]){const{err:t}=await v(()=>this.glue.interop.invoke(e.channel,{}));t&&this.logger.error("boot-sequence - Error calling waitForBootStage remote channel",e,t)}else this.stageWhenToChannelsMap[n]=(null!==(i=this.stageWhenToChannelsMap[n])&&void 0!==i?i:[]).concat(e.channel)}async signal(e,t){var i;if(this.logger.debug("boot-sequence - bootService:systemManager.boot.stage",e,t),"stageEntered"===t)this.currentStage=e,this.currentStageStartTime=performance.now();else{this.router.publish("systemManager.boot.stage",{stage:e});const t=Math.round(100*(performance.now()-this.currentStageStartTime+Number.EPSILON))/100;this.startupTimes.stageTimes.push({[this.currentStage]:t}),this.startupTimes.cumulativeTimes=this.startupTimes.cumulativeTimes+t}const n=`${e}:${t}`;await(async(e,t)=>{const i=e.map(e=>t(e)),n=await l().allSettled(i),o=n.filter(e=>"rejected"===e.status);if(o.length)throw o.map(e=>e.reason);return n.flatMap(e=>"fulfilled"===e.status?[e.value]:[])})(null!==(i=this.stageWhenToChannelsMap[n])&&void 0!==i?i:[],async e=>{this.logger.debug("boot-sequence - bootService.signal",n,e),await v(()=>this.glue.interop.invoke(e,{})).catch(t=>{this.logger.error("boot-sequence - Error signaling waitForBooStage",n,e,t)})}),delete this.stageWhenToChannelsMap[n],this.executedStages[n]=!0}async updateBootStage({stage:e,when:t}){this.logger.debug("boot-sequence - bootService.updateBootStage",e,t);const i=Object.keys(ce).flatMap(e=>[`${e}:stageEntered`,`${e}:stageCompleted`]),n=`${e}:${t}`;let o=[];for(let e=0;e<i.length;e++){const t=i[e];if(this.executedStages[t]||o.push(t),t===n){"earlyuser:stageCompleted"===n&&(o.push("user:stageEntered"),setTimeout(()=>{this.updateBootStage({stage:"user",when:"stageCompleted"})},5e3));break}}await(async(e,t)=>{const i=[];for(let n=0;n<e.length;n++)try{const o=await t(e[n]);i.push({status:"fulfilled",value:o})}catch(e){i.push({status:"rejected",reason:e.toString()})}return i.flatMap(e=>"fulfilled"===e.status?[e.value]:[])})(o,async e=>{const t=e.split(":");await this.signal(t[0],t[1])})}async onShuttingDown(e){return new Promise(async t=>{e.restarting?await this.router.transmit("Application.restart",{}):await this.router.transmit("Application.shutdown",{}),setTimeout(()=>{t({prevent:!1})},3e3)})}async receiveAutoStart(e){h(Object.entries(ce),async([t,i])=>{i[0]===e.stage&&i[1]===e.runPriority&&await this.updateBootStage({stage:t,when:"stageStarting"===e.phase?"stageEntered":"stageCompleted"})})}async start(){await this.glue.interop.register("T42.AppManager.AutoStart.Stage",e=>this.receiveAutoStart(e)),await this.glue.interop.register("FSBL.SystemManagerClient.waitForBootStage",p(async(e,t)=>this.waitForBootStageHandler(e),this.logger)),await this.glue.appManager.onShuttingDown(e=>this.onShuttingDown(e)),await this.router.addResponder("finsemble.startuptimes",(e,t)=>{null==t||t.sendQueryResponse(null,this.startupTimes)})}}const be=JSON.parse('{"$schema":"../schemas/fileBasedSchemas/coreConfigFile.schema.json","bootTasks":{"initializeDeepLinkingTask":{"bootParams":{"stage":"microkernel"}},"initializeRouterTask":{"bootParams":{"stage":"microkernel","dependencies":["initializeDeepLinkingTask"]}},"initializeFinsemblePubsubTask":{"bootParams":{"stage":"microkernel","dependencies":["initializeRouterTask"]}},"initializeSystemStateHandersTask":{"bootParams":{"stage":"microkernel","dependencies":["initializeRouterTask"]}},"updateServiceLauncherConfigTask":{"bootParams":{"stage":"microkernel","dependencies":["configService"]}},"waitForUpdateDownloadTask":{"bootParams":{"stage":"kernel","dependencies":["configService"],"timeout":60000,"stopOnFailure":false}},"addAppDefinitionsToDesktopAgentTask":{"bootParams":{"stage":"kernel","dependencies":["interopService"],"stopOnFailure":false}},"waitForAuthenticatedTask":{"bootParams":{"stage":"authentication","dependencies":["authenticationService"],"timeout":2147483647}},"initializeSystemManagerAPITask":{"bootParams":{"stage":"microkernel","dependencies":["initializeRouterTask"]}},"startLoggerTask":{"bootParams":{"stage":"microkernel","dependencies":["loggerService"]}},"loadUserDefinedComponentsTask":{"bootParams":{"stage":"preuser","stopOnFailure":false,"autoStart":true,"dependencies":["assimilationService"]}},"loadAppDInstalledComponentsTask":{"bootParams":{"stage":"kernel","stopOnFailure":false,"autoStart":true,"dependencies":["interopService"]}},"loadSystemTrayIconTask":{"bootParams":{"stage":"user","stopOnFailure":false,"autoStart":true}},"registerHotkeysTask":{"bootParams":{"stage":"user","stopOnFailure":false,"autoStart":true}},"setupSearchLauncherTask":{"bootParams":{"stage":"user","stopOnFailure":false,"autoStart":true}},"checkForScheduledRestartTask":{"bootParams":{"stage":"user","stopOnFailure":false,"autoStart":true}},"checkForScheduledShutdownTask":{"bootParams":{"stage":"user","stopOnFailure":false,"autoStart":true}},"hideSplashScreenTask":{"bootParams":{"stage":"user","stopOnFailure":false,"autoStart":true}},"fetchAppsFromAppDServersTask":{"bootParams":{"stage":"appd-retrieval","stopOnFailure":false,"autoStart":true,"dependencies":["configService"]}},"setupInitialWorkspaceTask":{"bootParams":{"stage":"system-earlyuser","stopOnFailure":false,"autoStart":true}}},"system":{"FSBLVersion":"APP_VERSION","gitHash":"GIT_HASH","finsembleLibraryPath":"$moduleRoot/FSBL.js","premiumRoot":"$moduleRoot","addFSBLWrappers":false,"saveLogToFileOnShutDown":false,"scheduledRestart":false,"scheduledShutdown":false,"isolateCrossDomainComponents":true,"requiredServicesConfig":{"routerService":{"bootParams":{"stage":"microkernel","autoStart":false},"spawnAs":"process","frame":true,"name":"routerService","html":"$servicesRoot/router/router.html","file":"$servicesRoot/router/routerService.js"},"loggerService":{"bootParams":{"stage":"microkernel","dependencies":["initializeSystemStateHandersTask"]},"spawnAs":"process","frame":true,"window":{"defaultWidth":1400,"defaultHeight":900,"contextMenu":false},"name":"loggerService","html":"$servicesRoot/logger/logger.html","file":"$servicesRoot/logger/loggerService.js","showWarningForLogStates":["Info","Debug","Verbose"],"defaultClientLogLevels":{"Error":true,"Warn":true,"Info":false,"Log":true,"Debug":false,"Verbose":false,"LocalOnly":false}},"dataStoreService":{"bootParams":{"stage":"microkernel","dependencies":["loggerService"]},"spawnAs":"window","frame":true,"name":"dataStoreService","html":"$servicesRoot/distributedStore/distributedStore.html","file":"$servicesRoot/distributedStore/distributedStoreService.js"},"configService":{"bootParams":{"stage":"microkernel","dependencies":["dataStoreService"]},"spawnAs":"window","frame":true,"changeApplicationStateBeforeLoad":"configuring","changeApplicationStateAfterLoad":"initializing","name":"configService","html":"$servicesRoot/config/config.html","file":"$servicesRoot/config/configService.js"}}},"servicesRoot":"$moduleRoot/services","thirdPartyRoot":"$moduleRoot/thirdParty","configVersion":"5.0.0","workspaceTemplates":{"Blank Template":{"name":"Blank Template","description":"Empty workspace template.","windows":[],"groups":{},"windowData":[]}},"betaFeatures":{},"deprecatedConfig":[{"versionDeprecated":"8.1","operation":"migrateAppDFDC320","description":"Migrating Finsemble\'s AppD config to FDC3 2.0 format.","userMessage":"Migrating Finsemble\'s AppD config to FDC3 2.0 format.","userMessageType":"warn"},{"versionDeprecated":"8.6","property":"finsemble-electron-adapter.useDOMBasedMovement","operation":"logMessage","description":"Setting useDOMBasedMovement is deprecated due to poor interactions between Electron/Window\'s handling of -webkeit-app-region: drag, window\'s aero-shake and the fact it swallows mouseevents on the relevant region.","userMessage":"Setting finsemble-electron-adapter.useDOMBasedMovement in your manifest file is deprecated and should be removed.","userMessageType":"warn"}],"importConfig":["$moduleRoot/configs/core/services.json","$moduleRoot/configs/core/securityPolicies.json","$moduleRoot/configs/core/UIComponents.json","$moduleRoot/configs/core/workspaces.json"]}'),Se=JSON.parse('{"$schema":"../schemas/fileBasedSchemas/uiComponentsFile.schema.json","components":{"Authentication":{"//":"Dummy component for internal testing of Authentication","uiComponent":true,"window":{"url":"$moduleRoot/ui-components/Authentication/index.html","top":"center","left":"center","width":358,"height":460,"ephemeral":true,"options":{"autoShow":true}}},"NonConfiguredComponent":{"//":"A component that is displayed in lieu of any attempt to open a non-existent app or component","window":{"url":"$moduleRoot/ui-components/NonConfiguredComponent/index.html","affinity":"systemComponents"},"component":{"category":"system"}},"FDC3Resolver":{"uiComponent":true,"bootParams":{"stage":"preuser"},"window":{"url":"$moduleRoot/ui-components/FDC3Resolver/index.html","top":"center","left":"center","width":512,"height":525,"options":{"showTaskbarIcon":false,"contextMenu":false,"alwaysOnTop":true}},"component":{"spawnOnStartup":true,"singleton":true},"foreign":{"services":{"windowService":{"allowTabbing":false}},"components":{"Window Manager":{"FSBLHeader":{"hideMinimize":true,"hideMaximize":true,"hideClose":true},"titlebarType":"injected","alwaysOnTopIcon":false}}}},"LinkerWindow":{"uiComponent":true,"bootParams":{"stage":"earlyuser","dependencies":["Toolbar"]},"window":{"url":"$moduleRoot/ui-components/Linker/index.html","width":132,"height":265},"component":{"spawnOnStartup":true}},"QuickComponentForm":{"uiComponent":true,"window":{"url":"$moduleRoot/ui-components/QuickComponentForm/index.html","width":550,"height":175,"position":"absolute","top":"center","left":"center"}},"DockingGroupMask":{"uiComponent":true,"window":{"url":"$moduleRoot/ui-components/DockingGroupMask/index.html","options":{"opacity":0.7}}},"YesNoDialog":{"uiComponent":true,"bootParams":{"stage":"earlyuser","dependencies":["Toolbar"]},"window":{"url":"$moduleRoot/ui-components/YesNoDialog/index.html","width":500,"height":223,"position":"absolute","top":"center","left":"center"},"component":{"spawnOnStartup":true},"foreign":{"clients":{"dialogManager":{"isDialog":true}}}},"SingleInputDialog":{"uiComponent":true,"bootParams":{"stage":"earlyuser","dependencies":["Toolbar"]},"window":{"url":"$moduleRoot/ui-components/SingleInputDialog/index.html","width":480,"height":154,"position":"absolute","top":"center","left":"center"},"component":{"spawnOnStartup":true},"foreign":{"clients":{"dialogManager":{"isDialog":true}}}},"Toolbar":{"uiComponent":true,"bootParams":{"stage":"earlyuser","checkpoints":{"initialize":{"postStartupCompletion":true}}},"window":{"id":"launcher","url":"$moduleRoot/ui-components/Toolbar/index.html","width":600,"height":39,"dockedHeight":39,"top":0,"left":0,"right":0,"position":"available","dockable":["top","bottom"],"maxHeight":39,"minHeight":39,"minWidth":300,"docked":"top","options":{"autoShow":true,"contextMenu":false,"showTaskbarIcon":true,"alwaysOnTop":false,"resizable":true,"cornerRounding":false}},"component":{"spawnOnStartup":true,"canMinimize":false,"canMaximize":false},"foreign":{"services":{"workspaceService":{"global":true},"windowService":{"allowGrouping":false}}},"childWindowOptions":{"window":{"addToWorkspace":false,"maxHeight":null,"minHeight":null,"dockable":false,"show":false,"options":{"resizable":false,"autoShow":false}},"foreign":{"components":{"Window Manager":{"FSBLHeader":false}},"services":{"windowService":{"manageWindowMovement":false}}}}},"UserPreferences":{"uiComponent":true,"bootParams":{"stage":"earlyuser","dependencies":["Toolbar"]},"window":{"url":"$moduleRoot/ui-components/UserPreferences/index.html","top":"center","left":"center","width":800,"height":600},"component":{"spawnOnStartup":true}},"ProcessMonitor":{"//":"Process monitor is configured to behave like an app except it is not added to workspaces (and therefore also cannot be tabbed)","window":{"url":"$moduleRoot/ui-components/ProcessMonitor/index.html","affinity":"systemComponents","width":785,"height":700},"component":{"category":"system"},"foreign":{"services":{"windowService":{"allowAutoArrange":true,"allowTabbing":false}},"components":{"App Launcher":{"launchableByUser":false},"Window Manager":{"FSBLHeader":true,"persistWindowState":true,"title":"Process Monitor","titlebarType":"injected"}}}},"Download Manager":{"window":{"url":"$moduleRoot/ui-components/DownloadManager/index.html","affinity":"systemComponents","width":600,"height":700,"options":{"resizable":false,"showTaskbarIcon":true}},"component":{"category":"system","spawnOnStartup":false,"singleton":true,"canMaximize":false},"foreign":{"services":{"windowService":{"allowAutoArrange":false,"allowTabbing":false,"allowTiling":false,"allowSnapping":false}},"components":{"canMaximize":false,"Window Manager":{"FSBLHeader":{"hideMaximize":true},"persistWindowState":true,"showTabs":false,"title":"Download Manager","titlebarType":"injected"}}}},"AppCatalog":{"uiComponent":true,"window":{"url":"$moduleRoot/ui-components/AppCatalog/index.html","width":600,"height":700,"options":{"autoShow":true,"showTaskbarIcon":true}},"component":{"spawnOnStartup":false,"canMaximize":false},"foreign":{"components":{"Window Manager":{"FSBLHeader":{"hideMaximize":true},"persistWindowState":true,"showTabs":false,"title":"App Catalog"}}}},"SystemTrayComponent":{"uiComponent":true,"bootParams":{"stage":"earlyuser","dependencies":["Toolbar"]},"window":{"url":"$moduleRoot/ui-components/SystemTrayComponent/index.html","width":150,"height":40},"component":{"spawnOnStartup":true}},"NotificationsCenter":{"uiComponent":true,"bootParams":{"stage":"earlyuser","dependencies":["Toolbar"]},"window":{"url":"$moduleRoot/ui-components/NotificationsCenter/index.html","forceOntoMonitor":true,"top":0,"right":0,"width":428,"maxWidth":428,"minWidth":428,"height":"100%","position":"available","monitor":"primary","options":{"resizable":true},"data":{"notifications":{"applyMuteFilters":false,"notificationsHistory":true}}},"component":{"spawnOnStartup":true,"singleton":true,"canMaximize":false},"foreign":{"services":{"windowService":{"allowAutoArrange":false,"allowTabbing":false,"allowTiling":false,"allowSnapping":false}},"components":{"Window Manager":{"FSBLHeader":{"hideMaximize":true,"hideClose":false,"hideMinimize":true,"hackScrollbar":false},"titlebarType":"injected"},"Toolbar":{"iconClass":"notification-center"}}}},"NotificationsToasts":{"uiComponent":true,"bootParams":{"stage":"earlyuser","dependencies":["Toolbar"]},"window":{"name":"notifications-toasts","url":"$moduleRoot/ui-components/NotificationsToasts/index.html","forceOntoMonitor":true,"top":0,"right":0,"width":428,"height":"100%","position":"available","data":{"notifications":{"applyMuteFilters":true}}},"component":{"spawnOnStartup":true,"singleton":true}},"HighlightScrim":{"uiComponent":true,"window":{"url":"$moduleRoot/ui-components/HighlightScrim/index.html","options":{"alwaysOnTop":false,"opacity":0.5}},"component":{"spawnOnStartup":true,"singleton":true}}}}'),ke=JSON.parse('{"$schema":"../schemas/fileBasedSchemas/securityPoliciesFile.schema.json","securityPolicies":{"//trusted":"By default, the trusted policy allows access to every API endpoint.","trusted":{},"untrusted":{"System":{"clearCache":false,"deleteAssets":false,"exit":false,"launchExternalProcess":false,"getHostSpecs":false,"getProcessList":false,"logToDisk":false,"getEnvironmentVariable":false},"Window":{"executeJavaScript":false,"webPreferences":{"preload":false}}}},"securityPolicyRules":{"crossDomain":"untrusted","sameDomain":"trusted"}}'),Te=JSON.parse('{"$schema":"../schemas/fileBasedSchemas/servicesFile.schema.json","services":{"workspaceService":{"bootParams":{"stage":"system-preuser","stopOnFailure":false},"spawnAs":"window","name":"workspaceService","html":"$servicesRoot/workspace/workspace.html","file":"$servicesRoot/workspace/workspaceService.js","category":"system","window":{"frame":true}},"storageService":{"bootParams":{"stage":"kernel"},"spawnAs":"window","name":"storageService","html":"$servicesRoot/storage/storage.html","file":"$servicesRoot/storage/storageService.js","category":"system","window":{"frame":true}},"linkerService":{"bootParams":{"stage":"kernel","dependencies":["windowService","storageService"],"stopOnFailure":false},"spawnAs":"window","name":"linkerService","html":"$servicesRoot/linker/linker.html","file":"$servicesRoot/linker/linkerService.js","category":"system","window":{"frame":true},"channels":[{"name":"group1","color":"#8781BD","border":"#797381"},{"name":"group2","color":"#D8BE2A","border":"#FFD803"},{"name":"group3","color":"#6BA703","border":"#71CE47"},{"name":"group4","color":"#FE6262","border":"#F83B3B"},{"name":"group5","color":"#2DACFF","border":"#039BFF"},{"name":"group6","color":"#FFA200","border":"#F29A01"}]},"interopService":{"bootParams":{"stage":"kernel","stopOnFailure":true,"dependencies":["assimilationService"]},"spawnAs":"window","visible":false,"name":"interopService","html":"$servicesRoot/Interop/Interop.html","file":"$servicesRoot/Interop/InteropService.js","category":"system","window":{"frame":true,"hideOnClose":true}},"searchService":{"bootParams":{"stage":"kernel","dependencies":["windowService"],"stopOnFailure":false},"spawnAs":"window","name":"searchService","html":"$servicesRoot/search/search.html","file":"$servicesRoot/search/searchService.js","category":"system","window":{"frame":true}},"windowService":{"bootParams":{"stage":"kernel","dependencies":[]},"spawnAs":"window","name":"windowService","html":"$servicesRoot/window/windowService.html","file":"$servicesRoot/window/windowService.js","config":{"BUFFER_SIZE":20,"RESIZE_EVENT_THROTTLE_PERIOD":0,"MINIMUM_WIDTH":98,"MINIMUM_HEIGHT":28,"GROUP_MODE":{"enabled":true,"behavior":"explicit"},"DEBUG":true,"ALLOW_GROUPS_TO_SNAP":true,"SNAPPING_OPACITY":0.8,"groupTileBuffer":30,"headerHeight":32,"heartbeatResponseTimeoutDefaults":{"min":5000,"max":1800000,"crashed":90000,"possiblyCrashed":60000,"notResponding":60000},"tabbing":{"enabled":true},"tiling":{"enabled":true},"claimSpace":{"enabled":true,"alwaysOnTop":false},"preventOverlapClaimSpace":true},"category":"system","window":{"frame":true}},"authenticationService":{"bootParams":{"stage":"authentication","timeout":2147483647},"spawnAs":"window","name":"authenticationService","html":"$servicesRoot/authentication/authentication.html","file":"$servicesRoot/authentication/authenticationService.js","category":"system","window":{"frame":true}},"assimilationService":{"bootParams":{"stage":"kernel","dependencies":["windowService","storageService"],"stopOnFailure":false},"spawnAs":"window","name":"assimilationService","html":"$servicesRoot/assimilation/assimilation.html","file":"$servicesRoot/assimilation/assimilationService.js","category":"system","window":{"frame":true},"config":{"enabled":true,"port":8392,"useFeaSpawn":false,"throttle":15,"blacklist":[],"whitelist":[],"onlySpawned":true,"focusDelay":30,"eventIgnore":50,"hotkeyTimeout":60000,"hideTitleBars":false}},"hotkeysService":{"bootParams":{"stage":"kernel","dependencies":["assimilationService"],"stopOnFailure":false},"spawnAs":"window","name":"hotkeysService","html":"$servicesRoot/hotkeys/hotkeys.html","file":"$servicesRoot/hotkeys/hotkeysService.js","category":"system","window":{"frame":true}},"notificationsService":{"bootParams":{"stage":"system-preuser","stopOnFailure":false,"dependencies":["configService","storageService"]},"spawnAs":"window","name":"notificationsService","html":"$servicesRoot/notification/notification.html","file":"$servicesRoot/notification/notificationService.js","category":"system","window":{"frame":true}}}}'),Ae=JSON.parse('{"comment":"config to define default workspace on first run","$schema":"../schemas/fileBasedSchemas/workspacesFile.schema.json","workspaces":[{"version":"1.0.0","name":"Default Workspace","type":"workspace","groups":{},"windows":[]}]}'),Ce=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","finsemble:docs":{"$comment":"PLEASE READ THE DOCUMENTATION THOROUGHLY BEFORE EDITING THIS FILE!!!!! --\x3e https://docs.google.com/document/d/1AAXkVPIC5eObZy4zcl55ia7-wtzCJvSVkO7VHjTNUg0. Do not make $ref references more than one level deep because the configReferenceGenerator is not capable of following those paths. `finsemble:docs` entries will override schema entries when generating docs. The `finsemble:docs.halt` directive will cause the documentation generation to not follow the entire path for that item. "},"$ref":"#/definitions/ManifestSubschema","definitions":{"ManifestFileSubschema":{"description":"Subschema corresponding to a file containing the manifest config, to support VSCode Intellisense.. ","type":"object","properties":{"$schema":{"type":"string"},"iocd":{"$ref":"#/definitions/iocd"},"comment":{"type":"string"},"devtools_port":{"description":"Deprecated. This property is no longer supported and will likely go away in the future. Use the remote-debugging-port chromium flag within project.json instead.","type":"number","deprecated":true},"startup_app":{"$ref":"#/definitions/manifestStartupApp"},"splashScreenImage":{"$ref":"#/definitions/splashScreenImage"},"splashScreenOptions":{"$ref":"#/definitions/splashScreenOptions"},"splashScreenTimeout":{"$ref":"#/definitions/splashScreenTimeout"},"removePathInSpawnExternalApps":{"description":"Set to false to allow spawning by path","type":"boolean"},"disableWMICalls":{"$ref":"#/definitions/disableWMICalls"},"appAssets":{"$ref":"#/definitions/appAssets"},"affinitySurrogateUrl":{"type":"string"},"finsemble":{"title":"finsemble","description":"Copy of Finsemble object to verify the manifest file","type":"object","properties":{"applicationRoot":{"type":"string"},"documentRoot":{"type":"string"},"moduleRoot":{"type":"string"},"configRoot":{"type":"string"},"apps":{"$ref":"#/definitions/apps"},"appd":{"$ref":"#/definitions/appd"},"fdc3AppDServers":{"$ref":"#/definitions/fdc3AppDServers"},"servicesRoot":{"type":"string"},"configSchemaURL":{"type":"string"},"notificationURL":{"type":"string","deprecated":true,"description":"The notificationURL is no longer used by toasts or UserNotification and will likely go away in the future."},"availableDashbarItems":{"$ref":"#/definitions/availableDashbarItems"},"bootConfig":{"$ref":"#/definitions/boot_config"},"router":{"$ref":"#/definitions/router"},"logger":{"$ref":"#/definitions/logger"},"importConfig":{"$ref":"#/definitions/importConfig"},"importThirdPartyConfig":{"$ref":"#/definitions/importThirdPartyConfig"},"shutdownTimeout":{"description":"Amount of time (in milliseconds) to give services to shut down before forcibly quitting the application. Components get 2 seconds less than services.","type":"number","minimum":10000,"default":30000},"systemTrayIcon":{"description":"Sets the location of the system tray icon (lower right corner of the terminal)","type":"string","default":"../../assets/img/Finsemble_SystemTray_Icon.png"},"autoSignOn":{"description":"Provides configuration and credentials for automatically signing a user into specified web applications","type":"object","deprecated":true,"properties":{"hardcoded":{"type":"object"}}},"toolbarMenus":{"$ref":"#/definitions/toolbarMenus"},"citrix":{"description":"Configuration for connecting to Citrix windows","type":"object","properties":{"selfServiceLocation":{"type":"string","default":"C:/Program Files (x86)/Citrix/ICA Client/SelfServicePlugin/SelfService.exe"}}},"trustedPreloads":{"$ref":"#/definitions/trustedPreloads"},"extensions":{"$ref":"#/definitions/extensions"},"windowTitleBarUrl":{"$ref":"#/definitions/windowTitleBarUrl"},"decoratorWindowUrl":{"type":"string"},"custom":{}},"required":["bootConfig"]},"finsemble-electron-adapter":{"$ref":"#/definitions/electronAdapter"},"allowEvalInPreload":{"description":"Set to `true` to delete `unsafe-eval` and `script-src directives` from the content security policy.","type":"boolean","default":false},"Content-Security-Policy":{"$ref":"#/definitions/contentSecurityPolicy"},"custom":{}},"required":["finsemble"],"additionalProperties":false},"AppsFileSubschema":{"description":"Subschema corresponding to a file containing UI component config, to support VSCode Intellisense.. ","type":"object","properties":{"$schema":{"type":"string"},"comment":{},"apps":{"$ref":"#/definitions/apps"}},"additionalProperties":false},"AppDFileSubschema":{"description":"Subschema corresponding to a file containing UI component config, to support VSCode Intellisense.. ","type":"object","properties":{"$schema":{"type":"string"},"comment":{},"appd":{"$ref":"#/definitions/appd"}},"additionalProperties":false},"UIComponentsFileSubschema":{"description":"Subschema corresponding to a file containing UI component config, to support VSCode Intellisense.. ","type":"object","properties":{"$schema":{"type":"string"},"comment":{},"components":{"$ref":"#/definitions/components"}},"additionalProperties":false},"ComponentsFileSubschema":{"description":"Subschema corresponding to a file containing component config, to support VSCode Intellisense.. ","type":"object","properties":{"$schema":{"type":"string"},"comment":{},"components":{"description":"config for components","type":"object","additionalProperties":{"$ref":"#/definitions/component"}}},"additionalProperties":false},"ServicesFileSubschema":{"description":"Subschema corresponding to a file containing service config, to support VSCode Intellisense.. ","type":"object","properties":{"$schema":{"type":"string"},"comment":{"type":"string"},"services":{"description":"config for components","type":"object","additionalProperties":{"$ref":"#/definitions/service"}}},"additionalProperties":false},"SecurityPolicyFileSubschema":{"description":"Subschema corresponding to the security policies file, to support VSCode Intellisense.. ","type":"object","properties":{"$schema":{},"comment":{"type":"string"},"securityPolicies":{"$ref":"#/definitions/securityPolicies"},"securityPolicyRules":{"$ref":"#/definitions/securityPolicyRules"}},"required":["securityPolicies","securityPolicyRules"],"additionalProperties":false},"WorkspacesFileSubschema":{"description":"Subschema corresponding to the security policies file, to support VSCode Intellisense.. ","type":"object","properties":{"$schema":{},"comment":{"type":"string"},"workspaces":{"$ref":"#/definitions/workspacesArray"}},"required":["workspaces"],"additionalProperties":false},"CoreConfigFileSubschema":{"description":"Subschema corresponding to a file containing the manifest config, to support VSCode Intellisense.. ","type":"object","properties":{"$schema":{"type":"string"},"comment":{"type":"string"},"bootTasks":{"$ref":"#/definitions/bootTasks"},"system":{"$ref":"#/definitions/system"},"servicesRoot":{"type":"string"},"thirdPartyRoot":{"type":"string"},"configVersion":{"type":"string"},"workspaceTemplates":{"$ref":"#/definitions/blankWorkspaceTemplate"},"betaFeatures":{"deprecated":true,"private":true,"type":"object"},"importConfig":{"$ref":"#/definitions/importConfig"},"deprecatedConfig":{"$ref":"#/definitions/deprecatedConfig"},"components":{"$ref":"#/definitions/components"}},"required":["bootTasks","system","servicesRoot","thirdPartyRoot","configVersion","betaFeatures","importConfig"],"additionalProperties":false},"DashbarFileSubschema":{"description":"Subschema corresponding to a file containing the Dashbar items configuration, to support VSCode Intellisense.. ","type":"object","properties":{"$schema":{"type":"string"},"comment":{"type":"string"},"availableDashbarItems":{"$ref":"#/definitions/availableDashbarItems"}}},"ManifestSubschema":{"comment":"Used by Finsemble for run-time verification","description":"The highest level manifest object, which includes \\"finsemble\\" configuration.","finsemble:docs":{"rightnav":true},"type":"object","properties":{"$schema":{"type":"string"},"iocd":{"$ref":"#/definitions/iocd"},"comment":{"type":"string"},"devtools_port":{"deprecated":true,"description":"This property is no longer supported and will likely go away in the future.","replaceWith":"the remote-debugging-port chromium flag within project.json.","type":"number","default":9090},"startup_app":{"$ref":"#/definitions/manifestStartupApp"},"splashScreenImage":{"$ref":"#/definitions/splashScreenImage"},"splashScreenOptions":{"$ref":"#/definitions/splashScreenOptions"},"splashScreenTimeout":{"$ref":"#/definitions/splashScreenTimeout"},"removePathInSpawnExternalApps":{"description":"Set to false to allow spawning by path","type":"boolean"},"disableWMICalls":{"$ref":"#/definitions/disableWMICalls"},"appAssets":{"$ref":"#/definitions/appAssets"},"finsemble":{"$ref":"#/definitions/FinsembleSubschema"},"finsemble-electron-adapter":{"$ref":"#/definitions/electronAdapter"},"affinitySurrogateUrl":{"type":"string"},"custom":{},"allowEvalInPreload":{"description":"Set to `true` to delete `unsafe-eval` and `script-src directives` from the content security policy.","type":"boolean","default":false},"Content-Security-Policy":{"$ref":"#/definitions/contentSecurityPolicy"}},"required":["startup_app","finsemble"],"additionalProperties":false},"BootManifestSubschema":{"comment":"Used by Finsemble for run-time verification","description":"The boot subschema, including manifest and partial finsemble","type":"object","properties":{"$schema":{"type":"string"},"iocd":{"$ref":"#/definitions/iocd"},"comment":{"type":"string"},"devtools_port":{"deprecated":true,"description":"This property is no longer supported and will likely go away in the future. Use the remote-debugging-port chromium flag within project.json instead.","type":"number"},"startup_app":{"$ref":"#/definitions/manifestStartupApp"},"splashScreenImage":{"$ref":"#/definitions/splashScreenImage"},"splashScreenOptions":{"$ref":"#/definitions/splashScreenOptions"},"splashScreenTimeout":{"$ref":"#/definitions/splashScreenTimeout"},"removePathInSpawnExternalApps":{"description":"Set to false to allow spawning by path","type":"boolean"},"disableWMICalls":{"$ref":"#/definitions/disableWMICalls"},"affinitySurrogateUrl":{"type":"string"},"appAssets":{"title":"appAssets","description":"Manifest array of external assets to be automatically loading by FEA. ","type":"array","items":{"type":"object","properties":{"src":{"type":"string"},"version":{"type":"string"},"alias":{"type":"string"},"target":{"type":"string"}}}},"finsemble":{"title":"finsemble","description":"Subschema for config required to boot Finsemble.","type":"object","properties":{"applicationRoot":{"type":"string"},"documentRoot":{"type":"string"},"moduleRoot":{"type":"string"},"configRoot":{"type":"string"},"apps":{"$ref":"#/definitions/apps"},"appd":{"$ref":"#/definitions/appd"},"fdc3AppDServers":{"$ref":"#/definitions/fdc3AppDServers"},"servicesRoot":{"type":"string"},"thirdPartyRoot":{"type":"string"},"configVersion":{"type":"string"},"configSchemaURL":{"type":"string"},"notificationURL":{"type":"string","deprecated":true,"description":"The notificationURL is no longer used by toasts or UserNotification and will likely go away in the future."},"bootConfig":{"$ref":"#/definitions/boot_config"},"router":{"$ref":"#/definitions/router"},"bootTasks":{"$ref":"#/definitions/bootTasks"},"system":{"$ref":"#/definitions/system"},"shutdownTimeout":{"description":"Amount of time (in milliseconds) to give services to shut down before forcibly quitting the application. Components get 2 seconds less than services.","type":"number","minimum":10000,"default":30000},"deprecatedConfig":{"$ref":"#/definitions/deprecatedConfig"},"trustedPreloads":{"$ref":"#/definitions/trustedPreloads"}},"required":["applicationRoot","moduleRoot","servicesRoot","thirdPartyRoot","configVersion","bootConfig","bootTasks","system"],"additionalProperties":true},"finsemble-electron-adapter":{"$ref":"#/definitions/electronAdapter"},"allowEvalInPreload":{"description":"Set to `true` to delete `unsafe-eval` and `script-src directives` from the content security policy.","type":"boolean","default":false},"Content-Security-Policy":{"$ref":"#/definitions/contentSecurityPolicy"},"custom":{}},"required":["startup_app","finsemble"],"additionalProperties":false},"FinsembleSubschema":{"comment":"Used by Finsemble for run-time verification","title":"finsemble","finsemble:docs":{"rightnav":true},"description":"Finsemble\'s root runtime config. This can be found in \\"manifest-local.html\\".","type":"object","properties":{"$schema":{"type":"string"},"applicationRoot":{"description":"Point this property to the root of your application. Finsemble uses it to build URLs internally.","type":"string","default":"https://localhost:3375"},"documentRoot":{"type":"string"},"authentication":{"$ref":"#/definitions/authentication"},"moduleRoot":{"description":"The location from which you are serving the Finsemble core library. This is important for resolving URLs internally.","type":"string","default":"https://localhost:3375/finsemble"},"configRoot":{"type":"string"},"fdc3AppDServers":{"$ref":"#/definitions/fdc3AppDServers"},"apps":{"$ref":"#/definitions/apps"},"appd":{"$ref":"#/definitions/appd"},"servicesRoot":{"private":true,"description":"Default location of core services. ","type":"string"},"notificationURL":{"type":"string","deprecated":true,"description":"The notificationURL is no longer used by toasts or UserNotification. It will likely go away in the future."},"availableDashbarItems":{"$ref":"#/definitions/availableDashbarItems"},"bootConfig":{"$ref":"#/definitions/boot_config"},"router":{"$ref":"#/definitions/router"},"logger":{"$ref":"#/definitions/logger"},"bootTasks":{"$ref":"#/definitions/bootTasks"},"system":{"$ref":"#/definitions/system"},"thirdPartyRoot":{"deprecated":true,"private":true,"description":"Required location of third-party services. This property is no longer supported and will likely go away in the future.","type":"string"},"workspaceTemplates":{"$ref":"#/definitions/blankWorkspaceTemplate"},"configVersion":{"description":"Version of this schema. ","type":"string"},"configSchemaURL":{"description":"URL of this schema. Used for run-time verification of configuration. ","type":"string"},"importConfig":{"$ref":"#/definitions/importConfig"},"importThirdPartyConfig":{"$ref":"#/definitions/importThirdPartyConfig"},"securityPolicies":{"$ref":"#/definitions/securityPolicies"},"securityPolicyRules":{"$ref":"#/definitions/securityPolicyRules"},"accessibleLinker":{"deprecated":true,"default":true,"type":"boolean"},"servicesConfig":{"$ref":"#/definitions/servicesConfig"},"preferences":{"$ref":"#/definitions/preferences"},"//systemTrayIcon":{"type":"string"},"systemTrayIcon":{"description":"Sets the location of the system tray icon (lower right corner of the terminal).","type":"string"},"systemTrayClickOption":{"description":"Sets the default click option to toggle the system tray menu. The opposite mouse click will bring Finsemble to the front. Default is right mouse click to toggle the menu and left to bring Finsemble to the front.","type":"string","default":"right","enum":["right","left"]},"systemTrayComponent":{"type":"string"},"waitForUpdate":{"type":"boolean","default":false,"description":"When set to true, Finsemble waits for updates, if available, to download and install before continuing to start up the application."},"Window Manager":{"finsemble:docs":{"halt":true,"type":"object","description":"Global options for the window title bar. <i>See \\"Window Manager\\" under app config hostsManifest.Finsemble for options...</i>"},"$ref":"#/definitions/windowManager"},"betaFeatures":{"private":true,"deprecated":true,"type":"object"},"//appDirectoryEndpoint":{"private":true,"type":"string"},"appDirectoryEndpoint":{"type":"string"},"globalHotkeys":{"type":"object"},"workspaces":{"$ref":"#/definitions/workspacesArray"},"components":{"description":"Used to configure Finsemble\'s \\"UI components\\". Entries are generated when running \\"yarn template\\". Use \\"appd\\" to register any other type of app.","$ref":"#/definitions/components"},"services":{"$ref":"#/definitions/services"},"feaURLWhitelist":{"description":"A regex pattern that represents a URL whitelist. If set, components can navigate **only** to URLs that match the regex pattern.","type":"string"},"cssOverridePath":{"deprecated":true,"private":true,"type":"string"},"debugServiceDelay":{"private":true,"deprecated":true,"type":"number"},"failedComponentCloseNotification":{"description":"If true, throw a notification when a component fails to close within the time limit specified in `finsemble[\\"Window Manager\\"].componentCloseTimeout`","type":"boolean","default":false},"initialWorkspace":{"description":"The workspace name specified by this config will be the first one presented to an end user the very first time they start the smart desktop. This overrides the default behavior set by the config: finsemble.workspaces. After the very first instance of the smart desktop, Finsemble loads the last workspace loaded or any workspace specified by user preferences.","type":["string","null"]},"isAuthEnabled":{"private":true,"deprecated":true,"type":"boolean","default":false},"shutdownTimeout":{"description":"Amount of time (in milliseconds) to give services to shutdown before forcibly quitting the application. Components get 2 seconds less than services.","type":"number","minimum":10000,"default":30000},"scheduledRestart":{"$ref":"#/definitions/scheduledRestart"},"scheduledShutdown":{"$ref":"#/definitions/scheduledShutdown"},"scheduledCloseDiscardUnsavedChanges":{"$ref":"#/definitions/scheduledCloseDiscardUnsavedChanges"},"downloads":{"$ref":"#/definitions/downloads"},"stackedWindow":{"$ref":"#/definitions/stackedWindow"},"menus":{"description":"Legacy config to configure menus. Still used in some configuration examples.","$ref":"#/definitions/menus"},"configSetDone":{"type":"boolean"},"comment":{"private":true,"deprecated":true,"description":"Comment string inserted into config. This property is no longer supported and will likely go away in the future.","type":"string"},"//":{"private":true,"deprecated":true,"description":"Comment string inserted into config. This property is no longer supported and will likely go away in the future.","type":"string"},"deprecatedConfig":{"$ref":"#/definitions/deprecatedConfig"},"toolbarMenus":{"$ref":"#/definitions/toolbarMenus"},"preloads":{"$ref":"#/definitions/preloads"},"trustedPreloads":{"$ref":"#/definitions/trustedPreloads"},"extensions":{"$ref":"#/definitions/extensions"},"windowTitleBarUrl":{"$ref":"#/definitions/windowTitleBarUrl"},"decoratorWindowUrl":{"type":"string"},"custom":{}},"additionalProperties":false},"iocd":{"description":"Properties that control how Finsemble behaves when running on the io.Connect Desktop platform","type":"object","properties":{"enableLegacyLoggerRecipe":{"type":"boolean","description":"Set to true to enable the logger recipe that listens on \'logger.service.logMessages\'"},"iocdDialogs":{"type":"boolean","description":"When true, io.Connect Desktop\'s default dialogs will be used instead of Finsemble\'s"},"getActiveWorkspaceWithoutChanges":{"type":"boolean","description":"When true, calls to getActiveWorkspace() will default to _not_ including unsaved changes in the current layout"},"alphabetizeApps":{"type":"boolean","description":"When true, apps will automatically be alphabetized. This is a temporary config until the re-ordering bug is fixed in @interopio/core"},"persistFDC3Context":{"type":"boolean","description":"If set, will determine whether FDC3 contexts are automatically persisted in layouts. This value can also be set in app config\'s \'customProperties\' field"},"timeout":{"type":"number","description":"Set to the number of milliseconds before the fsbl-service pops up with a timeout error. Default is 40000."},"data":{"type":"object","description":"Determines the iocd migration strategy for various categories of Finsemble end user data","properties":{"advancedAppLauncher":{"description":"The migration strategy for user advanced app launcher","$ref":"#/definitions/iocdDataMigrationSetting"},"preferences":{"description":"The migration strategy for user preferences","$ref":"#/definitions/iocdDataMigrationSetting"},"workspaces":{"description":"The migration strategy for workspaces","$ref":"#/definitions/iocdDataMigrationSetting"}}},"apiToLogFile":{"type":"boolean","description":"Set to true to redirect internal logging from IOCD .net client to Finsemble.dll log file","default":false}}},"iocdDataMigrationSetting":{"type":"object","description":"Migration strategy for a Finsemble end user data category","properties":{"load":{"type":"string","description":"Specifies where to load data at boot. `storageAdapter` loads from the storage adapter. `iocd` loads from the relevant iocd store. `oneTimeConversion` loads from storageAdapter only once, thereafter loads from iocd store.","default":"storageAdapter","enum":["storageAdapter","oneTimeConversion","iocd"]},"saveToStorageAdapter":{"type":"boolean","description":"Specifies whether to save data back to the storageAdapter. (Data is always saved to the relevant iocd store.)","default":false}}},"manifestStartupApp":{"description":"Manifest property for the initial startup app, which reference Finsemble\'s System Manager.","type":"object","properties":{"name":{"type":"string","description":"Defaults to the name of the application as specified in project.json. This is used for certain dialogs and in the Central Logger. The name must consist of alphanumeric characters and spaces only.","pattern":"^[A-Za-z0-9\\\\s]*$"},"url":{"type":"string"},"uuid":{"type":"string","description":"Uniquely differentiates environmental instances of the same application (see project.json) to avoid storage conflicts. The uuid must consist of alphanumeric characters only. Do not use spaces. The uuid is available for use in storage keys, such as those generated by the IndexedDBStorageAdapter.","pattern":"^[A-Za-z0-9\\\\s\\\\-]*$","default":"Finsemble"},"requireHandshake":{"type":"boolean","description":"Value indicating whether a notification should be shown if a handshake from the System Manager is not received within 30 seconds.","default":false},"applicationIcon":{"type":"string","description":"The default taskbar icon.","default":"../../assets/img/Finsemble_Taskbar_Icon.png"},"defaultTop":{"type":"number","deprecated":true},"defaultLeft":{"type":"number","deprecated":true},"defaultHeight":{"type":"number","deprecated":true},"defaultWidth":{"type":"number","deprecated":true},"showTaskbarIcon":{"type":"boolean","deprecated":true},"autoShow":{"type":"boolean","deprecated":true},"frame":{"type":"boolean","deprecated":true},"resizable":{"type":"boolean","deprecated":true},"maximizable":{"type":"boolean","deprecated":true},"delay_connection":{"type":"boolean","deprecated":true},"contextMenu":{"type":"boolean","deprecated":true},"cornerRounding":{"$ref":"#/definitions/cornerRounding","deprecated":true},"alwaysOnTop":{"type":"boolean","deprecated":true}},"required":[],"examples":[{"startup_app":{"name":"My App","uuid":"MyAppAndOrEnvironment","requireHandshake":true,"applicationIcon":"../../assets/img/Finsemble_Taskbar_Icon.png"}}]},"appAssets":{"title":"appAssets","finsemble:docs":{"rightnav":true,"indented":true},"description":"Manifest array of external assets to be automatically downloaded by FEA (as Zip files) and unpacked for use as native applications.","type":"array","items":{"type":"object","properties":{"src":{"description":"URI from which to download a Zip file containing the asset.","type":"string","format":"uri-reference"},"version":{"deprecated":true,"description":"AppAsset versions are deprecated and will likely go away in the future. If supplied, FEA will only download an asset if it has not already downloaded a copy of the asset with the specified version number and `src` properties. If omitted, FEA relies on ETag response headers to determine a caching strategy.","type":"string"},"alias":{"description":"The downloaded asset is referred to in application configurations by alias. Replace the window.path field of a native application with window.alias to use the appAsset","type":"string"},"target":{"description":"The path within the appAsset Zip file that Finsemble uses to launch the application. This is usually a path to a .exe, .jar, or .bat file.","type":"string"}}}},"windowManager":{"title":"Window Manager","description":"Configurations specific to an app\'s window title bar.","type":"object","properties":{"alwaysOnTopIcon":{"description":"When set to `true`, all windows can be pinned so that they are always on top (like a sticky note). You can override this setting for specific components in their configs.","type":"boolean","default":false},"cloneIcon":{"description":"When set to `true`, a clone icon will be added to the window titlebar that can be used to clone the window.","type":"boolean","default":false},"disableBrowserView":{"description":"This property is no longer supported and will likely go away in the future. When set to `true`, the window titlebar is injected directly into the window\'s content pane, rather than separated out into a separate browserview within the window.","replaceWith":"[titlebarType](/docs/reference/ConfigReference#finsemble-components---foreign-components-Window%20Manager-titlebarType)","type":"boolean","default":false,"deprecated":true},"titlebarType":{"type":"string","description":"Determines how the window title bar is added to web windows. The default \'browserview\' separates the title bar and content pane into separate browserviews and can resolve rare display issues with the injected title bar, at the cost of disabling process grouping via affinity for the content pane. Setting \'injected\' causes the title bar and its styles to be inserted directly into your web page\'s DOM and its layout to be lightly adjusted to accommodate.","enum":["browserview","injected"],"default":"browserview"},"title":{"type":"string","description":"Sets the title in the window title bar."},"FSBLHeader":{"description":"This config controls the Finsemble window title bar UI component. FSBLHeader can be true, false or an object. If true then the window title bar will be injected into the component and the maximize, minimize, and close buttons will be displayed. If false, the title bar will not be displayed. If an object, you can tweak several details as to whether buttons are shown or how content is loaded under the title bar.","type":["boolean","object"],"default":true,"properties":{"hideMaximize":{"description":"When set to true, the Maximize icon is hidden from the component\'s title bar.","type":"boolean","default":false},"hideMinimize":{"description":"When set to true, the Minimize icon will be hidden from the component\'s title bar.","type":"boolean","default":false},"hideClose":{"description":"Value indicating whether the Close button is hidden in the component title bar.","type":"boolean","default":false},"title":{"deprecated":true,"description":"Sets the title in the window title bar. This property is no longer supported and will likely go away in the future.","replaceWith":"<a href=\\"/docs/reference/ConfigReference#finsemble-appd---manifest-foreign-components-Window%20Manager-title\\">finsemble.componentName.manifest.foreign.components.WindowManager.title</a> or set the title in your HTML and Finsemble will pick it up.","type":"boolean","default":false},"persistWindowState":{"private":true,"deprecated":true,"description":"If the component is a part of the workspace, this tells Finsemble whether it should persist the position of the window when it moves but windowClient saves and loads window dimensions through updateOptions. For internal use. This property is no longer supported and will likely go away in the future.","type":"boolean","default":false},"zoomDefault":{"description":"Default zoom level to set for the component when using the zoom.js sample preload.","type":"number"},"showLinker":{"private":true,"deprecated":true,"description":"Set this to true only when using [deprecated linkerClient](/docs/deprecated/Linking). The linker will now automatically display when the FDC3 Interop client is activated with an API call. `showLinker: false` will override, preventing the linker from being displayed if you have a use case where you don\'t want to display the linker. This property is no longer supported and will likely go away in the future.","type":"boolean","default":false},"hackScrollbar":{"description":"When set to true, a window\'s vertical scrollbar is positioned underneath the Finsemble window title bar using html{ overflow-y: none} and body{ overflow-y: auto}","type":"boolean","default":false},"adjustContentHeights":{"description":"When set to true, the height of content sized to fit the window is adjusted to fit within the adjusted bounds of the window when the Finsemble window title bar is injected into the DOM.","type":"boolean","default":true},"bumpElements":{"type":"object","$ref":"#/definitions/bumpElements"}},"additionalProperties":false},"floatingTitlebarComponent":{"type":"string","description":"This config sets which component Finsemble will use as a title bar for native application components. By default, the only value is \\"FloatingTitlebar.\\" This config allows you to customize this behavior with a customized title bar component and created a configuration for it in <i>appd.json</i>"},"deliveryMechanism":{"description":"Specify the delivery method to use for scripts (e.g., FSBL, title bar, etc.) - Valid values are:\\r\\n\\"injection\\" - Injects the code into the window.","type":"string","enum":["injection","preload"],"default":"injection"},"zoom":{"description":"Configuration for the zoom.js preload.","type":"object","properties":{"ignoreSelector":{"description":"A css selector instructing the zoom.js preload which elements should not be zoomed","type":"string","examples":["#element-id"],"default":""},"zoomSelector":{"description":"A css selector instructing the zoom.js preload which additional elements should get zoomed. The zoom preload will automatically attempt to detect which elements should get zoom.","type":"string","examples":["#my-element, .my-class"],"default":""},"timeout":{"description":"Time, in milliseconds, to display the zoom pop up before hiding it.","type":"number","default":3000},"step":{"description":"How much the zoom increases or decreases when zooming in or out.","type":"number","default":0.1},"max":{"description":"The maximum allowed zoom level.","type":"number","default":5},"min":{"description":"The minimum allowed zoom level.","type":"number","default":0.2}},"additionalProperties":false},"componentCloseTimeout":{"type":"number","default":5000,"description":"Time, in milliseconds, to wait for the component to close. If the component hasn\'t closed within this limit, it will be force closed."}}},"bumpElements":{"description":"Optional settings that adjust the height and position of absolute/fixed positioned elements when the window title bar is injected. Use it to mitigate rare display issues that can occur due to the injected title bar. Set this field to `false` to bypass all bumping logic.","type":"object","properties":{"absolute":{"description":"Either none, \\"all\\" or \\"0Positioned\\". If all, all fixed elements are moved. 0Positioned only moves elements that have top 0. Only applies to children of the document.body.","enum":["none","all","0Positioned"]},"bumpBy":{"description":"Sets the amount to bump elements by (e.g. \\"25px\\").","type":"string","pattern":"[0-9]+px"},"fixed":{"description":"Either none, \\"all\\" or \\"0Positioned\\". If all, all fixed elements are moved. 0Positioned only moves elements that have top 0.","enum":["none","all","0Positioned"]},"monitorFixedAdditions":{"description":"When set to true, mutations to the DOM are observed and fixed positioned elements with a top style of \'0px\' are bumped by the title bar height. Setting this to false disables the MutationObserver that is otherwise turned on for pages with injected title bars.","type":"boolean"}}},"authentication":{"title":"authentication config","description":"Contains authentication profiles. Finsemble runs the special \\"startup\\" profile when your smart desktop launches.","type":"object","properties":{"startup":{"description":"If set, the \\"startup\\" profile runs during the \\"authentication\\" boot phase, pausing Finsemble until authentication has been completed.","$ref":"#/definitions/authenticationProfile"}},"additionalProperties":{"$ref":"#/definitions/authenticationProfile"}},"authenticationProfile":{"title":"authentication profile name","description":"Declare an authentication profile that uses simple password collection or any other type of custom authentication process.","finsemble:docs":{"rightnav":true},"type":"object","properties":{"adapter":{"type":"string","description":"The authentication \\"adapter\\" (module) for this authentication profile. See <a href=\\"/docs/add-apps/freestanding/StaticAuthentication/\\">Authenticating apps</a>.","enum":["PASSWORD","OAUTH2"]},"scope":{"type":["string","null"],"description":"When used with OAUTH2 adapter, the \\"scope\\" as specified by your Identity Provider (IP)."},"client_id":{"type":"string","description":"When used with OAUTH2 adapter, the \\"client ID\\" provided by your Identity Provider (IP)."},"authorization_endpoint":{"type":"string","description":"When used with OAUTH2 adapter, the authorization endpoint for your Identity Provider (IP)."},"backchannel_endpoint":{"type":"string","description":"When used with OAUTH2 adapter, your backchannel endpoint URL."},"redirect_url":{"type":"string","description":"The component to handle the response from your Identity Provider. If you don\'t provide this, Finsemble uses <i>$moduleRoot/ui-components/oauthResponse/index.html</i>."},"component":{"type":"string","description":"The UI component to use for this authentication profile. Typically this is \\"authentication.html\\" used by the \\"PASSWORD\\" adapter to display a user/login form."}},"required":["adapter"]},"blankWorkspaceTemplate":{"description":"Workspace templates are no longer a supported feature. They will likely go away in the future.","title":"workspaceTemplates","private":true,"deprecated":true,"type":"object","additionalProperties":true},"preferences":{"title":"preferences","deprecated":true,"description":"Configurations used as user preferences can be found in the finsemble.servicesConfig section. This property is no longer supported and will likely go away in the future.","replaceWith":"[finsemble.servicesConfig](/docs/reference/ConfigReference#finsemble-servicesConfi)","type":"object","default":{},"properties":{"workspaceService":{"type":"object","properties":{"promptUserOnDirtyWorkspace":{"deprecated":true,"replaceWith":"[finsemble.servicesConfig.workspace](/docs/reference/ConfigReference#finsemble-servicesConfig-workspace-promptUserOnDirtyWorkspace)","type":"boolean"}}}}},"servicesConfig":{"title":"servicesConfig","finsemble:docs":{"rightnav":true},"description":"Configurations that override the defaults for Finsemble\'s built-in services. (Defaults are stored in \\"finsemble.services\\" and you cannot directly override them.","type":"object","properties":{"distributedStore":{"title":"distributedStore","type":"object","description":"Distributed Store configuration","properties":{"affinity":{"description":"Only applicable for `spawnAs: \\"window\\"`. When set, the service window gets process affinity based on the string passed in. This allows aggregation of services to a specific browser process. Set to false to disable render process grouping via affinity.","type":["string","boolean"]},"visible":{"description":"Set this to `true` in order to reveal the hidden service window. Useful for debugging services.","type":"boolean","default":false},"initialStores":{"title":"initialStores","description":"Foundations for any stores that should be seeded on startup.","type":"array","items":{"type":"object","description":"Config for each individual store.","properties":{"name":{"type":"string","description":"The name of the store to seed."},"foundation":{"title":"foundation","description":"The data to seed into the store.","type":"object","properties":{"appFolders":{"title":"appFolders","description":"Individual folders that appear in the Advanced app launcher.","type":"object","properties":{"list":{"type":"array","items":{"type":"string"}},"folders":{"title":"folders","type":"object","properties":{"Advanced App Launcher":{"$ref":"#/definitions/foldersAppDefinition"},"Favorites":{"$ref":"#/definitions/foldersAppDefinition"}}}}},"appDefinitions":{"type":"object"}}},"default":{"title":"default","type":"object","properties":{"activeLauncherTags":{"type":"array"},"filterText":{"type":"string"},"filterTags":{"type":"array"},"activeTags":{"type":"array"},"filteredApps":{"type":"array"},"activeFolder":{"type":"string"},"sortBy":{"type":"string"}}}}}}},"required":["initialStores"],"additionalProperties":false},"docking":{"title":"docking","description":"Configs specific to the docking service","type":"object","properties":{"alwaysOnTopLevel":{"type":"string","description":"The always on top level when setting components `alwaysOnTop` to true. See the <a href=\\"https://www.electronjs.org/docs/api/browser-window#winsetalwaysontopflag-level-relativelevel\\">Electron alwaysOnTop documentation</a> for valid values."},"visible":{"description":"Set this to `true` to reveal the hidden service window. Useful for debugging services.","type":"boolean","default":false},"enabled":{"type":"boolean"},"headerHeight":{"description":"The height of the window title bar.","type":"number","default":32},"headerWidth":{"description":"The width of the window title bar.","type":"number","default":32},"MINIMUM_HEIGHT":{"description":"The smallest height a window can shrink to on resize.","type":"number","default":28},"MINIMUM_WIDTH":{"description":"The smallest width a window can shrink to on resize.","type":"number","default":98},"requireRectangularityForGroupResize":{"description":" If a group of windows forms a rectangle, it can be resized. By turning this to `false`, the user can resize any shaped group by grabbing a corner that is not on another window\'s edge.","type":"boolean","default":true},"undockDisbandsEntireGroup":{"description":"By default, when a user clicks the \\"Undock\\" button in the title bar, the window leaves the group without destroying that group. Set this value to `true` if you want to dismantle the group when the user clicks the \\"Undock\\" button.","type":"boolean","default":false},"fillHolesOnUndock":{"description":"If set to `true`, a rectangular group maintains its shape when windows leave the group.","type":"boolean","default":true},"tabbing":{"description":"Properties relating to window tabbing (combining multiple windows into a tabbed group).","type":"object","properties":{"enabled":{"description":"Allows windows to tab onto each other.","type":"boolean","default":false},"allowEditing":{"deprecated":true,"replaceWith":"[servicesConfig.window.allowWindowTitleRenaming](/docs/reference/ConfigReference#finsemble-servicesConfig-window-allowWindowTitleRenaming)","type":"boolean","default":true},"tabMinWidth":{"description":"Sets the min width of the individual tabs. (Default 72px)","type":"number","default":72}},"additionalProperties":false},"tiling":{"description":"Properties relating to window tiling (combining windows into group of tiles attached to each other that behave as a single window)","type":"object","properties":{"enabled":{"description":"Allows windows to tile onto each other.","type":"boolean","default":false}},"additionalProperties":false},"ALLOW_GROUPS_TO_SNAP":{"description":"Allows groups to snap to one another.","type":"boolean","default":true},"BUFFER_SIZE":{"description":"The size of the zone, in pixels, around a window that causes it to snap to other windows.","type":"number","default":20},"enableWindowsAeroSnap":{"description":"If `true`, windows Aero Snap keyboard shortcuts (WINDOWS KEY + UP, RIGHT, DOWN, or LEFT arrow key) move the current window when pressed. Windows move the window and Finsemble respond by updating bounds within the Window Service. If `false` (default), Finsemble cancels these actions.","type":"boolean","default":false},"fillHolesOnUndock ":{"description":"If set to `true`, a rectangular group maintains its shape when windows leave the group.","default":true},"GROUP_MODE":{"type":"object","properties":{"enabled":{"description":"Specifies whether to allow windows to group to one another.","type":"boolean","default":true},"behavior ":{"type":"string","enum":["explicit","implicit"],"default":"explicit"}},"additionalProperties":false},"groupTileBuffer":{"type":"number","default":30,"description":"The size of the buffer, in pixels, wherein a dragged window will trigger a tile operation."},"RESIZE_EVENT_THROTTLE_PERIOD":{"description":"Time, in milliseconds, to throttle resize events. If there are too many resize events and they collectively cause poor performance, tweak this value until you are happy with the performance.","type":"number","default":0},"SNAPPING_OPACITY":{"description":"The opacity windows change to when other windows encroach on their buffer zone.","type":"number","default":0.8},"claimSpace":{"description":"Settings for claiming space on desktop at the operating system level. Windows only.","type":"object","properties":{"enabled":{"description":"If true, docked windows behave like the Windows Taskbar and claim space on the screen.","type":"boolean","default":true},"alwaysOnTop":{"description":"If true, docked windows that claim space are always on top when docked.","type":"boolean","default":false}}},"preventOverlapClaimSpace":{"description":"If a user moves a window so that its top edge overlaps the space claimed by the operating system (e.g. the toolbar area on MS Windows), the window is automatically repositioned below or above the claimed space unless this value is set to `false`.","type":"boolean","default":true},"allowAppropriatedWindowsToGroup":{"description":"Allow Appropriated Windows (freestanding applications and windows opened with window.open) to group.","type":"boolean","default":false}},"required":["enabled","groupTileBuffer","headerHeight","MINIMUM_WIDTH","requireRectangularityForGroupResize","undockDisbandsEntireGroup","fillHolesOnUndock","tiling"],"additionalProperties":false},"interop":{"title":"interop","type":"object","description":"Interop Service config options","properties":{"affinity":{"description":"Only applicable for `spawnAs: \\"window\\"`. When set, the service window is given process affinity based on the string passed in. This allows aggregation of services to a specific browser process. Set to false to disable render process grouping via affinity.","type":["string","boolean"]},"allowResolverToRemember":{"type":"boolean","default":true,"description":"Set to false to disable the \'remember your choice\' check box on the FDC3 resolver UI. When true, the resolver remembers the particular intent resolutions that the user specified."},"spawnAs":{"$ref":"#/definitions/spawnAs"},"visible":{"description":"Set to `true` to display the Interop Service\'s window, which provides a set of Redux devtools that you can use to debug problems with FDC3 interactions.","type":"boolean","default":false},"showDevConsoleOnVisible":{"type":"boolean","default":true,"description":"Automatically spawns a dev console when visible is true. Note that if a service is set to type \\"script\\", you shouldn\'t use this but instead debug serviceManager.html."},"bootParams":{"$ref":"#/definitions/bootParamsProperties"},"addIntentListenerMaxInitializationTimeout":{"description":"Sets the maximum time that the interop service waits for an application that was started to resolve an intent to invoke `fdc3.addIntentListener()`.","type":"number","default":15000},"joinMultipleChannels":{"type":"boolean","description":"If explicitly set to false, no FDC3 apps can join multiple user channels. So when an app that is already on a channel joins another channel, it automatically leaves the channel it was on."},"fdc3_1_2_compatibility":{"type":"boolean","description":"If true then Finsemble desktop agent conforms to FDC3 1.2 (as opposed to 2.0)."},"fdc3BridgingEnabled":{"type":"boolean","default":false,"description":"(Experimental) if true then the Finsemble FDC3 desktop agent will enable bridging and attempt to connect the bridging server specified at `fdc3BridgingServerAddress`."},"fdc3BridgingServerAddress":{"type":"string","default":"ws://127.0.0.1:3333","description":"(Experimental) The socket address of the FDC3 bridging server. Only used when `fdc3BridgingEnabled` is true."}},"additionalProperties":false},"launcher":{"title":"launcher","type":"object","description":"Launcher Service config options.","properties":{"spawnAs":{"$ref":"#/definitions/spawnAs"},"defaultComponentAffinity":{"description":"Global default render process affinity for all non-service components and applications. Set it to false to disable grouping of render processes via affinity. This setting can be overridden by component level config.","type":["string","boolean"],"default":"WorkspaceComponents"},"defaultServiceAffinity":{"description":"Global default render process affinity for all services excluding the four micro-kernel services (System Manager, Router, Logger and Config) which cannot access the config. Set it to false to disable grouping of render processes for services via affinity. This setting can be overridden by service level config.","type":["string","boolean"],"default":"Finsemble"},"affinity":{"description":"Only applicable for `spawnAs: \\"window\\"`. When set, the service window is given process affinity based on the string passed in. This allows aggregation of services to a specific browser process. Set it to false to disable render process grouping via affinity.","type":["string","boolean"]},"visible":{"description":"Set this to `true` to reveal the hidden service window. Useful for debugging services.","type":"boolean","default":false},"concurrentSpawnLimit":{"description":"Specifies the number of components that can be spawned concurrently during Workspace load. The default is machine\'s number of logical processor cores divided minus 1 or a minimum of 4.","type":"number","minimum":1},"staggerPixels":{"type":"number","default":40,"description":"Set the amount of \\"stagger\\" pixels when components are launched on top of another. Staggering is like laying out cards on a table."},"unknownComponent":{"type":"string","default":"nonConfiguredComponent","description":"This corresponds to a component\'s key in one of your component JSON files. Our default is the \\"nonConfiguredComponent\\". The unknown component serves as a placeholder for a component that a user loses permissions to. The unknown component shows up as a substitute to an existing component when Finsemble cannot find this component\'s configuration (e.g., the user no longer has access to this component). This unknown component is saved to the workspace so that the original component returns in the future if Finsemble can find it."},"search":{"description":"Allows you to control the component search built into finsemble.","type":"object","properties":{"enabled":{"description":"Set to false to disable component search.","type":"boolean","default":true},"options":{"type":"object","description":"An object containing fuse.js configuration options.","properties":{}}},"additionalProperties":false},"defaultPreloads":{"type":"object","deprecated":true,"replaceWith":"[finsemble.extensions.preloads](/docs/reference/ConfigReference#finsemble-extensions-preloads)","properties":{"allComponents":{"type":"array","default":[],"description":"An array of URLs to preload into all components.","items":{"type":"string","description":"The URL of a preload."}},"launchableComponents":{"type":"array","default":[],"description":"An array of URLs to preload into components that are launchable by the user.","items":{"type":"string","description":"The URL of a preload."}}}}},"required":["staggerPixels","unknownComponent"]},"linker":{"title":"linker","type":"object","description":"Linker config options","properties":{"spawnAs":{"$ref":"#/definitions/spawnAs"},"enabled":{"description":"Set this to `true` to use Linker Client on client side. Otherwise Finsemble uses the FDC3 client.","type":"boolean","default":false}}},"logger":{"title":"logger","type":"object","description":"Central Logger config options","properties":{"spawnAs":{"$ref":"#/definitions/spawnAs"},"affinity":{"description":"Only applicable for `spawnAs: \\"window\\"`. When set, the service window is given process affinity based on the string passed in. This allows aggregation of services to a specific browser process. Set to false to disable render process grouping via affinity.","type":["string","boolean"]},"visible":{"description":"Set this to `true` to reveal the hidden service window. Useful for debugging services.","type":"boolean","default":false},"hotkeyShowCentralLogger":{"description":"Sets the hotkey for showing the Central Logger. Leave this config as an empty array in order to disable the hotkey.","type":"array","items":{"type":"string"},"default":["ctrl","shift","L"]},"defaultClientLogLevels":{"$ref":"#/definitions/loggerClientLogLevels"},"skipLargeObjects":{"$comment":"Not documented to allow for changing the default behavior at a later date (discoverable via IntelliSense)","type":"boolean","default":true,"private":true},"maxLogMessageSize":{"type":"integer","default":5000,"description":"The maximum allowable size for a log message in bytes","private":true}},"additionalProperties":false},"storage":{"title":"storage","type":"object","description":"Storage Service config options.","properties":{"spawnAs":{"$ref":"#/definitions/spawnAs"},"adapterOperationTimeout":{"description":"The timeout, in milliseconds, of each storageAdapter operation.","default":10000,"type":"number"},"affinity":{"description":"Only applicable for `spawnAs: \\"window\\"`. When set, the service window is given process affinity based on the string passed in. This allows aggregation of services to a specific browser process. Set to false to disable render process grouping via affinity","type":["string","boolean"]},"visible":{"description":"Set this to `true` to reveal the hidden service window. This can be useful for debugging services.","type":"boolean","default":false},"defaultStorage":{"description":"The default storage model to use when saving and loading data.","type":"string","default":"IndexedDBAdapter"},"dataStoreAdapters":{"title":"dataStoreAdapters","description":"Storage adapters that the storage service loads and that can be mapped to storage topics. Each entry specifies the path (which can contain manifest macros) to built a storage adapter javascript file. See <a href=\\"/docs/productivity/API-tutorials-and-refs/storage/storingData/\\">Storing data</a> for details on how to build a custom adapter.","type":"object","properties":{},"additionalProperties":{"$ref":"#/definitions/dataStoreAdaptersEntry"},"examples":[{"LocalStorageAdapter":"$applicationRoot/adapters/localStorageAdapter.js","IndexedDBAdapter":"$applicationRoot/adapters/indexedDBAdapter.js"}]},"topicToDataStoreAdapters":{"title":"topicToDataStoreAdapters","type":"object","description":"Mapping of storage topic to the name of storage adapter.","properties":{"finsemble":{"description":"Specifies the storage adapter to use when persisting non-workspace-related information.","type":"string","default":"IndexedDBAdapter"},"finsemble.workspace":{"description":"Specifies the storage adapter to use when persisting workspace-related information.","type":"string","default":"IndexedDBAdapter"},"finsemble.workspace.cache":{"description":"Specifies the storage adapter to use when caching workspace-related information.","type":"string","default":"IndexedDBAdapter"},"finsemble.notifications":{"description":"Sets the storage adapter for notification persistence.","type":"string","default":"IndexedDBAdapter"}},"required":["finsemble","finsemble.workspace","finsemble.workspace.cache"]}},"required":["defaultStorage","dataStoreAdapters","topicToDataStoreAdapters"]},"workspace":{"type":"object","description":"Configurations related to the workspace service.","properties":{"spawnAs":{"$ref":"#/definitions/spawnAs"},"affinity":{"description":"Only applicable for `spawnAs: \\"window\\"`. When set, the service window is given process affinity based on the string passed in. This allows aggregation of services to a specific browser process. Set to false to disable render process grouping via affinity.","type":["string","boolean"]},"visible":{"description":"Set this to `true` to reveal the hidden service window. Useful for debugging services.","type":"boolean","default":false},"persistURL":{"description":"A global config for component URL persistence. When true, components automatically save their last URL instead of using the one in the config. The component config will overwrite the global config.","default":false},"persistPath":{"type":"boolean","default":false,"description":"A global config for component URL persistence. When true, the application automatically persists its path through restarts and workspace reloads, even when the path changes in the config. Path is used for \\"native\\" (aka \\"assimilation\\") windows. The component config overwrites the global config."},"closeWorkspaceTimeout":{"description":"Number of milliseconds the workspace service should wait for all of the windows to close when switching to another workspace. Workspaces are locked until a close action completes or times out. If this timeout value is exceeded, Finsemble notifies the user and loads an empty workspace. Set to null for no timeout.","type":"number","default":30000},"closeFailureNotificationMessage":{"description":"Override the default notification message that appears to the end user when closeWorkspaceTimeout is triggered. Set to \\"\\" to stop a message from being sent.","type":"string"},"disableDirtyShutdownCheck":{"description":"Disable the check for dirty shutdown when Workspace Service starts that causes the last active workspace to be used.","type":"boolean"},"emptyWorkspaceName":{"type":"string","default":"Empty Workspace","description":"Allows you to set the name of the empty workspace created when the user has no workspaces and no default workspace is configured, or when a workspace switch fails."},"loadFailureNotificationMessage":{"type":"string","description":"Override the default message that appears to users in a pop-up notification when a workspace fails to load."},"search":{"description":"Allows you to control the workspace search built into Finsemble.","type":"object","properties":{"enabled":{"description":"Set to false to disable workspace search.","type":"boolean","default":true},"options":{"type":"object","description":"An object containing fuse.js configuration options.","properties":{}}},"additionalProperties":false},"promptUserOnDirtyWorkspace":{"description":"When set to `false`, the user\'s workspace automatically saves to the last configuration when switching workspaces or closing Finsemble. When set to `true`, the user is prompted to save the current workspace configuration if there are unsaved changes.","type":"boolean","default":true},"workspaceAsPercent":{"description":"(experimental) When set to `true`, window position will be converted to percent when a workspace is saved and used to restore workspaces, allowing them to adapt to different sized monitors.","type":"boolean","default":false},"permanentWorkspaces":{"description":"Allows you to declare what workspaces a user can\'t rename or delete.","type":"array","items":{"type":"string"}},"discardUnsavedChanges":{"description":"When set to `true`, unsaved workspace changes are discarded automatically. This setting is ignored if you set promptUserOnDirtyWorkspace to true.","type":"boolean","default":false}},"additionalProperties":false},"assimilation":{"$ref":"#/definitions/serviceAssimilationConfig"},"notifications":{"description":"Configs specific to the notifications service.","type":"object","properties":{"spawnAs":{"$ref":"#/definitions/spawnAs"},"notificationsCenterComponentType":{"description":"(Experimental) This value tells the notification service which component to use as the Notification Center. This component should spawn, hide and show when a user clicks the notification bell.","type":"string","default":"NotificationsCenter"},"defaultSnoozePeriodSeconds":{"description":"The default snooze period for notifications.","type":"number","default":300},"newNotificationHaloPeriodSeconds":{"description":"The default period for new notifications halo.","type":"number","default":180},"maxNotificationsToRetain":{"description":"The maximum number of notifications the service stores in memory.","type":"number","default":250},"disableDotOnToolbarIcon":{"type":"boolean","default":false,"description":"Disables the dot on the toolbar notifications icon when there are unread notifications."},"showDotOnToolbarIconForMutedNotifications":{"type":"boolean","default":false,"description":"Shows the new notification dot on the toolbar for muted notifications (if disableDotOnToolbarIcon is false)."},"toastTimeoutOnActionableNotifications":{"type":"boolean","default":true,"description":"If set to false, Actionable Notification Toasts stay on screen until a user manually removes them."},"maxNotificationRetentionPeriodSeconds":{"description":"The maximum amount of time, in seconds, to retain notifications.","type":"number","default":604800},"informationalNotificationToastPeriodSeconds":{"description":"The number of seconds a toast appears for informational notifications (that is, any notifications without actions).","type":"number","default":45},"proxyToWebApiFilter":{"description":"Broadcast any notifications that match this filter to the Notification Web API to appear in the OS.","type":["object","boolean"],"properties":{"include":{"type":["array","boolean"],"items":{"$ref":"#/definitions/notification"}},"exclude":{"type":["array","boolean"],"items":{"$ref":"#/definitions/notification"}}}},"defaultDismissButtonText":{"description":"If the service needs to add the dismiss actions to the button, the text defaults to the value set here as a last resort. There is a hardcoded value if this not set.","type":"string","default":"Dismiss"},"types":{"description":"\'types\' provide a way of setting default values on notifications based on the INotification.type","type":"object","properties":{"default":{"description":"\'default\' is a reserved name. If there any notifications with notification.type that don\'t match any of the keys in the config, the values in default is applied.","$ref":"#/definitions/notificationType"}},"additionalProperties":{"$ref":"#/definitions/notificationType"}},"applyNotificationOverrides":{"description":"The applyNotificationOverrides enables Finsemble to display notifications triggered by a browser view.","type":"boolean","default":false},"demoMode":{"type":"boolean","$comment":"When true, it disables devOnly notifications, even in dev mode. This enables demoing dev mode without getting distracted with overly technical notifications.","default":false},"userPreferences":{"deprecated":true,"type":"object"},"mute":{"description":"List of mute filters. All notifications that match the filter will have the mute flag set to true.","type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"source":{"type":"string"}}}}},"additionalProperties":false},"window":{"title":"window","type":"object","description":"Window Service config options.","properties":{"spawnAs":{"$ref":"#/definitions/spawnAs"},"additionalWorkspaceFields":{"description":"Additional fields for window data that you can store in the Workspace","type":"array","items":{"type":"string"}},"heartbeatResponseTimeout":{"description":"Sets the heartbeat timeouts for crash detection","type":"object","private":true,"properties":{"min":{"type":"number"},"max":{"type":"number"},"crashed":{"type":"number"},"possiblyCrashed":{"type":"number"},"notResponding":{"type":"number"}}},"ignoreFieldsForDirtyingWorkspace":{"description":"Changes in these fields do not cause workspaces to be dirty.","type":"array","items":{"type":"string"}},"allowWindowTitleRenaming ":{"description":"Set to false to disable user editable tabs (rename by double-clicking on a window title or tab).","type":"boolean","default":true}}},"search":{"type":"object","description":"Search service config options.","properties":{"spawnAs":{"$ref":"#/definitions/spawnAs"}}},"hotkeys":{"type":"object","description":"Hotkeys service config options.","properties":{"spawnAs":{"$ref":"#/definitions/spawnAs"}}},"authentication":{"type":"object","description":"Authentication service config options.","properties":{"spawnAs":{"$ref":"#/definitions/spawnAs"}}}},"additionalProperties":false},"importConfig":{"finsemble:docs":{"rightnav":true},"description":"Defines an array of JSON URLs to be imported into the top-level finsemble object. This overwrites any existing config settings, with two exceptions: New services defined under finsemble.services is added to the list of existing services (as opposed to replacing the existing list of services). New components defined under finsemble.components are added to the list of existing components (as opposed to replacing the list of existing components).","type":"array","items":{"type":"string"},"examples":[["$applicationRoot/configs/application/config.json","$applicationRoot/configs/application/appd.json"]]},"importThirdPartyConfig":{"description":"This import is essentially the same as importConfig with one notable difference: the imported configuration settings cannot overwrite any existing settings. In this case, the settings for any potential overwrite are discarded with a warning message written to the Config Service\'s log.","type":"array","items":[{"type":"string"}],"additionalItems":false},"router":{"title":"router","description":"Configurations for Router\'s communication mechanism.","type":"object","properties":{"crossDomainTransport":{"description":"The interface for communicating between cross-domain components - When set to `IPCBus`, the default, all cross-domain components use IPC to communicate. When set to `FinsembleTransport`, cross-domain components use IAC. You might switch the `crossDomainTransport` if you are having connection issues involving firewalls, your CSP, etc. Available values are \'IPCBus\' and \'FinsembleTransport\'.","type":"string","enum":["IPCBus","SharedWorker","FinsembleTransport"],"default":"IPCBus"},"sameDomainTransport":{"description":"The transport for components and services with Finsemble\'s domain. ","type":"string","enum":["IPCBus","SharedWorker","FinsembleTransport"],"default":"SharedWorker"},"transportSettings":{"title":"transportSettings","description":"The specific setting for certain transports.","type":"object","properties":{"FinsembleTransport":{"title":"FinsembleTransport","description":" Configuration for the FinsembleTransport (IAC) if chosen as the communication mechanism for cross-domain components. IAC uses WebSocket as its communication protocol.","type":"object","properties":{"serverAddress":{"description":"URI for the WebSocket server. To use a secure connection, use \'wss://localhost.chartiq.com:3376\'.","type":"string","default":"ws://127.0.0.1:3376"}},"required":["serverAddress"]}},"required":["FinsembleTransport"],"default":{}},"promptBeforeAllowingExternalApps":{"title":"promptBeforeAllowingExternalApps","deprecated":true,"description":"We deprecated this capability to support freestanding apps.","type":"boolean","default":false},"trafficSnapshotMilliseconds":{"description":"Defines how often to take the traffic snapshot for diagnostics.","type":"number"},"trafficSnapMinCountSize":{"description":"If you enable the traffic snapshot, Finsemble waits until the message count reaches this minimum before outputting these messages.","type":"number"}},"additionalProperties":false,"examples":[{"router":{"crossDomainTransport":"IPCBus","sameDomainTransport":"SharedWorker","transportSettings":{"FinsembleTransport":{"serverAddress":"ws://127.0.0.1:3376"}}}}]},"system":{"title":"system","private":true,"description":"Core configuration for system. Much of this is boot config.","type":"object","properties":{"FSBLVersion":{"type":"string"},"gitHash":{"type":"string"},"finsembleLibraryPath":{"type":"string"},"premiumRoot":{"type":"string"},"addFSBLWrappers":{"type":"boolean"},"saveLogToFileOnShutDown":{"type":"boolean"},"scheduledRestart":{"$ref":"#/definitions/scheduledRestart"},"scheduledShutdown":{"$ref":"#/definitions/scheduledShutdown"},"isolateCrossDomainComponents":{"type":"boolean"},"requiredServicesConfig":{"title":"requiredServicesConfig","description":"Core System Configuration that is users typically never modify. ","type":"object","properties":{"routerService":{"type":"object","properties":{"bootParams":{"$ref":"#/definitions/bootParamsProperties"},"spawnAs":{"type":"string"},"name":{"type":"string"},"visible":{"type":"boolean"},"html":{"type":"string"},"file":{"type":"string"}}},"loggerService":{"type":"object","properties":{"bootParams":{"$ref":"#/definitions/bootParamsProperties"},"spawnAs":{"type":"string"},"name":{"type":"string"},"visible":{"type":"boolean"},"html":{"type":"string"},"file":{"type":"string"}}},"dataStoreService":{"type":"object","properties":{"bootParams":{"$ref":"#/definitions/bootParamsProperties"},"spawnAs":{"type":"string"},"name":{"type":"string"},"visible":{"type":"boolean"},"html":{"type":"string"},"file":{"type":"string"},"frame":{"type":"boolean"}},"additionalProperties":false},"configService":{"type":"object","properties":{"bootParams":{"$ref":"#/definitions/bootParamsProperties"},"spawnAs":{"type":"string"},"name":{"type":"string"},"visible":{"type":"boolean"},"html":{"type":"string"},"file":{"type":"string"},"changeApplicationStateBeforeLoad":{"type":"string"},"changeApplicationStateAfterLoad":{"type":"string"},"frame":{"type":"boolean"}},"additionalProperties":false}},"required":["routerService","loggerService","dataStoreService","configService"],"additionalProperties":false}},"required":["FSBLVersion","gitHash","finsembleLibraryPath","premiumRoot","addFSBLWrappers","saveLogToFileOnShutDown","scheduledRestart","scheduledShutdown","isolateCrossDomainComponents","requiredServicesConfig"],"additionalProperties":false},"bootTasks":{"title":"bootTasks","private":true,"description":"Startup configuration of internal boot tasks. ","type":"object","properties":{"initializeDeepLinkingTask":{"$ref":"#/definitions/bootParams"},"initializeRouterTask":{"$ref":"#/definitions/bootParams"},"initializeFinsemblePubsubTask":{"$ref":"#/definitions/bootParams"},"initializeSystemStateHandersTask":{"$ref":"#/definitions/bootParams"},"updateServiceLauncherConfigTask":{"$ref":"#/definitions/bootParams"},"waitForAuthenticatedTask":{"$ref":"#/definitions/bootParams"},"initializeSystemManagerAPITask":{"$ref":"#/definitions/bootParams"},"startLoggerTask":{"$ref":"#/definitions/bootParams"},"loadUserDefinedComponentsTask":{"$ref":"#/definitions/bootParams"},"loadAppDInstalledComponentsTask":{"$ref":"#/definitions/bootParams"},"loadSystemTrayIconTask":{"$ref":"#/definitions/bootParams"},"registerHotkeysTask":{"$ref":"#/definitions/bootParams"},"setupSearchLauncherTask":{"$ref":"#/definitions/bootParams"},"checkForScheduledRestartTask":{"$ref":"#/definitions/bootParams"},"checkForScheduledShutdownTask":{"$ref":"#/definitions/bootParams"}},"additionalProperties":{"$ref":"#/definitions/bootParams"}},"boot_config":{"title":"bootConfig","finsemble:docs":{"rightnav":true},"description":"Boot/startup configuration parameters for the System Manager.","type":"object","properties":{"onErrorMakeSystemManagerVisible":{"type":"boolean","default":true},"defaults":{"title":"defaults","type":"object","description":"Default startup-up properties for System Manager","properties":{"startServiceTimeout":{"description":"Default timeout value, in milliseconds, for services.","type":"number","minimum":0,"maximum":999999,"default":30000},"startComponentTimeout":{"description":"Default timeout value, in milliseconds, for components.","type":"number","minimum":0,"default":15000},"startTaskTimeout":{"type":"number","minimum":0,"maximum":999999,"default":15000}},"additionalProperties":false}},"additionalProperties":false,"examples":[{"bootConfig":{"defaults":{"startServiceTimeout":10000,"startComponentTimeout":15000}}}]},"bootParams":{"description":"Startup boot parameters for services, components, and boot tasks.","type":"object","properties":{"bootParams":{"$ref":"#/definitions/bootParamsProperties"}},"additionalProperties":false},"bootParamsProperties":{"title":"bootParams","description":"Boot parameter properties","type":"object","properties":{"stage":{"description":"Specifies at which stage the app is launched.","type":"string","enum":["microkernel","kernel","pre-authentication","authentication","appd-retrieval","system-preuser","preuser","preuser2","preuser3","preuser4","system-earlyuser","earlyuser","user"]},"stopOnFailure":{"description":"Specifies whether the app should stop if one or more of its dependencies fail to start. Only relevant to apps with dependencies. Set to false if you want the app to continue startup even if its dependencies fail.","default":true,"type":"boolean"},"autoStart":{"description":"Specifies whether to automatically start during the system manager\'s startup phase.","default":true,"type":"boolean"},"customFailureMessage":{"description":"The custom message to output to the system log if the app fails to start.","type":"string"},"timeout":{"description":"The maximum time, in milliseconds, that the app can take to start up. If the startup doesn\'t complete in this time, it\'s marked as a failure. If you don\'t specify this property, Finsemble uses the default timeout value under the manifest\'s \'bootConfig.startComponentTimeout\' property.","type":"number"},"dependencies":{"description":"Specifies other services this service relies on.","type":"array","items":{"type":"string"}},"checkpoints":{"title":"checkpoints","type":"object"}},"additionalProperties":false},"availableDashbarItems":{"type":"object","description":"Available dashbar items to list in dashbar user preferences.","additionalProperties":{"$ref":"#/definitions/dashbarItem"}},"dashbarItem":{"title":"dashbarItem","description":"Dashbar item properties","type":"object","properties":{"title":{"description":"The text to display in the title bar of the dashbar item.","type":"string"},"url":{"description":"The URL path of the content of the dashbar item.","type":"string"},"width":{"description":"(optional) width of the dashbar item","type":"integer"},"disablePointerEvents":{"description":"Set to true to disable the user\'s ability to interact with the dashbar item.","type":"boolean"}},"required":["title","url"]},"dataStoreAdaptersEntry":{"title":"dataStoreAdaptersEntry","type":"string"},"apps":{"title":"apps","finsemble:docs":{"rightnav":true},"description":"Contains Finsemble\'s app configurations that are derived from the <a href=\\"https://fdc3.finos.org/docs/app-directory/spec\\">FDC3 2.0 App Directory Standard</a>. App config is the primary way that Finsemble learns about apps. Finsemble uses this to create its launcher menus and for driving data integration (interop).","type":"array","items":{"$ref":"#/definitions/AppEntry2.0"}},"AppEntry2.0":{"description":"An array of AppD entries where each describes an app or app service, using the <a href=\\"https://fdc3.finos.org/schemas/2.0/app-directory#tag/Application/paths/~1v2~1apps~1%7BappId%7D/get\\">FDC3 2.0 AppD record format</a>).","type":"object","properties":{"appId":{"type":"string","description":"A unique identifier for the app that is used programmatically. It must follow <a href=\\"https://fdc3.finos.org/docs/1.0/appd-discovery#application-id-namespace-syntax-host-resolution\\">the AppD specification for fully qualified naming</a>."},"contactEmail":{"type":"string","description":"Email address to contact for information about the app. (Used when apps are picked out of a third party app catalog.)"},"description":{"type":"string","description":"Textual description of the app."},"categories":{"type":"array","description":"An array of string categories that describe the application. These are hints to catalogs or stores listing FDC3-enabled apps. The app creator should find appropriate categories (or category) under which to list the app. AppD record authors should use lower-case and, where possible, to select categories from the list defined in the <a href=\\"https://fdc3.finos.org/schemas/2.0/app-directory#tag/Application/paths/~1v2~1apps~1%7BappId%7D/get\\">AppD Standard</a>.","items":{"type":"string"}},"icons":{"type":"array","description":"Set of icons for the app. Finsemble tries to pick the best matching icon but we recommend a single png size 64x64 with a transparent background.","items":{"$ref":"#/definitions/screenshotElement"}},"screenshots":{"type":"array","description":"Array of images to show the user when they are looking at app description. Each image can have an optional label.","items":{"$ref":"#/definitions/screenshotElement"}},"interop":{"$ref":"#/definitions/fdc3Interop"},"hostManifests":{"type":"object","description":"A mapping from host name to a manifest Object containing proprietary settings for running the application in that host. Use <code>\\"Finsemble\\"</code> for properties relating to Finsemble. All other host name keys are ignored.","additionalProperties":true,"properties":{"Finsemble":{"$ref":"#/definitions/component"},"io.Connect":{"$ref":"https://docs.interop.io/desktop/assets/configuration/application.json#/definitions/application"}}},"details":{"type":"object","description":"The type specific launch details of the application.","properties":{"url":{"type":"string","description":"Application start URL. Required for <code>type: \\"web\\"</code> or <code>type: \\"onlineNative\\"</code>."},"path":{"type":"string","description":"The path on disk from which the application is launched. Required for <code>type: \\"native\\"</code>."},"alias":{"type":"string","description":"The name of the virtual app. Required for <code>type: \\"citrix\\"</code>."},"arguments":{"type":"string","description":"Arguments that you must pass on the command line to launch the app in the expected configuration. Optional for <code>type: \\"native\\"</code>, <code>type: \\"onlineNative\\"</code> or <code>type: \\"citrix\\"</code>."}}},"name":{"type":"string","description":"The legacy name property, which was used in earlier versions of FDC3 to refer to applications through the API. As name is non-unique within or across app directories its use in the FDC3 Desktop Agent API is deprecated in favour of using an <code>AppIdentifier</code> with an <code>appId</code> property."},"publisher":{"type":"string","description":"The name of the organization that publishes the app. Ued when picking apps out of third party catalogs."},"type":{"type":"string","description":"The technology type that is used to launch and run the application. Each application <code>type</code> implies a particular set of launch <code>details</code>. The supported types include:<ul><li><b>web</b>: Web applications launched via a URL</li><li><b>native</b>: Native applications pre-installed on a device and launch via a filesystem path</li><li><b>citrix</b>: Apps virtualized via Citrix</li><li><b>onlineNative</b>: Native apps that have an online launcher, e.g. online ClickOnce app deployments.</li><li><b>other</b>: Used to represent apps that don\'t conform to or cannot be launched via the other types, and are likely to be defined solely by a hostManifest.</li></ul>","enum":["web","native","citrix","onlineNative","other"]},"supportEmail":{"type":"string","description":"An email address to contact for support with this app."},"tooltip":{"type":"string","private":true,"description":"The tooltip that displays when hovering over the app in a launcher. Currently not used."},"title":{"type":"string","description":"A human-readable name that describes the app. The app appears in the launcher menu under this title."},"lang":{"type":"string","description":"A language tag that specifies the primary language of both the application and its AppD entry, as defined by IETF RFC 5646. For example, \\"fr\\" for French or \\"en-CA\\" for Canadian English."},"version":{"type":"string","description":"The version of the app. This should follow semantic versioning rules."},"moreInfo":{"description":"Optional URL that provides more information about the application. For use in an app directory catalog UI.","type":"string"},"localizedVersions":{"$ref":"#/definitions/LocalizedVersions"},"metadata":{"type":"object","description":"Optional metadata that you can use to manage updates of this appD record.","additionalProperties":false,"properties":{"autoUpdate":{"type":"boolean","description":"If explicitly true and an appDUrl is set, Finsemble automatically updates the appD record during startup."},"appDUrl":{"type":"string","description":"The appDUrl must be a valid URL to retrieve an updated copy of this appD record."},"retrievedAt":{"type":"string","description":"The ISO formatted date and time string at which the appD record was last retrieved from the appDUrl. Finsemble sets this automatically."}}}},"required":["appId","type","details"],"title":"FDC3 Application"},"LocalizedVersions":{"type":"object","additionalProperties":true,"title":"LocalizedVersions","description":"Provides localized alternatives to any field of the AppD record, which may also refer to an alternative version of the application that is also localized (e.g. by providing customConfig or an alternative URL). The keys to this object should be language tags as defined by IETF RFC 5646, e.g. en, en-GB or fr-FR. Not currently used in Finsemble."},"fdc3AppDServers":{"title":"FDC3 Application Directory Servers","description":"List of AppD servers to retrieve application definitions from on startup.","type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"description":{"type":"string"}},"required":["url"]}},"appd":{"title":"appd","deprecated":true,"finsemble:docs":{"rightnav":false},"description":"Contains Finsemble\'s app configurations aligning with FDC3 1.2. App config is the primary way that Finsemble learns about apps. Finsemble uses this to create its launcher menus and for driving data integration (interop). This property is deprecated and will likely go away in the future.","replaceWith":"[finsemble.apps](/docs/reference/ConfigReference#finsemble-apps)","type":"object","properties":{},"additionalProperties":{"$ref":"#/definitions/AppEntry1.2"}},"AppEntry1.2":{"title":"AppD entry","deprecated":true,"description":"AppD entries that describe apps. This format follows the FDC3 AppD specification. It is deprecated and will likely go away in the future.","type":"object","properties":{"appId":{"type":"string","description":"A unique identifier for the app that is used programmatically. It must follow the AppD specification for fully qualified naming: https://fdc3.finos.org/docs/app-directory/overview#application-identifiers."},"contactEmail":{"type":"string","description":"Email address to contact for information about the app. Used when apps are picked out of a third party app catalog."},"description":{"type":"string","description":"Textual description of the app."},"interop":{"$ref":"#/definitions/fdc3Interop"},"icons":{"type":"array","description":"Set of icons for the app. Finsemble tries to pick the best matching icon but the best practice is to use a single png size 64x64 with a transparent background.","items":{"type":"object","properties":{"src":{"type":"string","description":"The url path for the icon image."},"sizes":{"type":"string","description":"The size of the icon in the form 32x32. You can have multiple sizes for different image types. This follows the Web Manifest specification."},"type":{"type":"string","description":"Image or icon expected MIME type, such as \'image/png\'."},"url":{"type":"string","private":true,"description":"Inadvertently used in some components though it\'s not legal."},"icon":{"type":"string","deprecated":true,"description":"FDC3 1.0 - 1.2 version of \'src\' field."}}}},"images":{"type":"array","description":"Set of \\"screenshots\\" that describe the app. Used when picking apps out of an app catalog.","items":{"type":"object","properties":{"url":{"type":"string"},"tooltip":{"type":"string"}},"required":["url"]}},"intents":{"type":"array","description":"The set of intents that this app is listening for. See <a href=\\"/docs/connect-apps/interop/\\">Interop</a>.","items":{"$ref":"#/definitions/intent"}},"manifest":{"$ref":"#/definitions/component"},"manifestType":{"type":"string","description":"The type of manifest. This is always equivalent to \\"finsemble\\" and can be omitted."},"name":{"type":"string","description":"The name of the app."},"publisher":{"type":"string","description":"The name of the organization that publishes the app. Used when picking apps out of third party catalogs."},"releaseNotes":{"type":"string","description":"Release notes for this version of the app."},"supportEmail":{"type":"string","description":"An email address to contact for support with this app."},"tags":{"type":"array","description":"A set of searchable tags. Used when picking apps out of an app catalog.","items":{"type":"string"}},"title":{"type":"string","description":"A human-readable name that describes the app. The app appears in the launcher menu under this title."},"tooltip":{"type":"string","private":true,"description":"The tooltip that displays when hovering over the app in a launcher. Currently not used."},"lang":{"type":"string","description":"A language tag that specifies the primary language of both the application and its AppD entry, as defined by IETF RFC 5646. For example, \\"fr\\" for French or \\"en-CA\\" for Canadian English."},"version":{"type":"string","description":"The version of the app. This should follow semantic versioning rules."}},"required":["appId","name","manifest"]},"fdc3Interop":{"type":"object","description":"Metadata that describes how the application uses FDC3 APIs. This metadata serves multiple purposes:<ul><li>It supports intent resolution by a desktop agent, by declaring what intents an app listens for.</li><li>It can be used, for example in an app catalog UI, to find apps that \'interoperate with\' other apps.</li><li>It provides a standard location to document how the app interacts with user channels, app channels, and intents, for use by other app developers and desktop assemblers.</li></ul>","properties":{"intents":{"$ref":"#/definitions/fdc320intent"},"userChannels":{"description":"Describes the application\'s use of context types on User Channels.<br />This metadata is not currently used by the desktop agent, but is provided to help find apps that will interoperate with this app and to document API interactions for use by other app developers.","properties":{"broadcasts":{"type":"array","description":"Context type names that are broadcast by the application.","items":{"type":"string"}},"listensFor":{"type":"array","description":"Context type names that the application listens for.","items":{"type":"string"}}}},"appChannels":{"type":"array","description":"Describes the application\'s use of App Channels.<br />This metadata is not currently used by the desktop agent, but is provided to help find apps that will interoperate with this app and to document API interactions for use by other app developers.","items":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the App Channel."},"description":{"type":"string","description":"A description of how the channel is used."},"broadcasts":{"type":"array","description":"An array that contains the names of context types that the app broadcasts on the channel.","items":{"type":"string"}},"listensFor":{"type":"array","description":"An array that contains the names of context types that the application listens for on the channel.","items":{"type":"string"}}}}}}},"fdc320intent":{"type":"object","description":"Describes the app\'s interactions with intents.","properties":{"listensFor":{"type":"object","description":"A mapping of Intents names that an app listens for via <code>fdc3.addIntentListener()</code> to their configuration.<br />Used to support intent resolution by desktop agents. Replaces the <code>intents</code> element used in appD records prior to FDC3 2.0.","properties":{},"additionalProperties":{"type":"object","properties":{"contexts":{"type":"array","description":"A filter stating that this app handles only intents for *these* context types. Note that intents can have one or more context types.","items":{"type":"string"}},"displayName":{"type":"string","deprecated":true,"description":"Optional friendly printable name for the intent. To be deprecated in FDC3 2.1 as it is problematic for apps to configure different display names for the same Intent."},"resultType":{"type":"string","description":"An optional type for output returned by the application, if any, when resolving this intent. Might indicate a context type by type name (e.g. <code>\\"fdc3.instrument\\"</code>), a channel (e.g. <code>\\"channel\\"</code>) or a combination that indicates a channel that returns a particular context type (e.g. <code>\\"channel<fdc3.instrument>\\"</code>)."}}}},"raises":{"type":"object","description":"A mapping of Intent names that an app raises (via <code>fdc3.raiseIntent</code>) to an array of context type names that it can be raised with.<br />Use the intent name <code>\\"any\\"</code> to represent use of the <code>fdc3.raiseIntentForContext</code> and <code>fdc3.findIntentForContext</code> functions, which allow the user to select from intents available for a specified context type.<br />This metadata is not currently used by the desktop agent, but is provided to help find apps that will interoperate with this app and to document API interactions for use by other app developers.","properties":{},"additionalProperties":{"type":"array","description":"Context type names that the intent may be raised with.","items":{"type":"string"}}}}},"intent":{"type":"object","description":"An intent (following the FDC3 format)","properties":{"contexts":{"type":"array","description":"A filter stating that this app handles only intents for *these* context types. Note that intents can have one or more context types.)","items":{"type":"string"}},"displayName":{"type":"string","description":"Friendly printable name for the intent. Whenever there is more than one possible resolution, this name appears in the FDC3 Intent Resolver when an end user is asked to decide which app to send the intent to."},"name":{"type":"string","description":"The official name of the intent. This name is referenced in interop config."}},"required":["name","contexts"]},"screenshotElement":{"type":"object","additionalProperties":false,"properties":{"src":{"description":"App Image URL.","type":"string"},"size":{"description":"Image dimension formatted as <code><height>x<width></code>","type":"string"},"type":{"description":"Image media type. If not present, Finsemble can use the src file extension.","type":"string"},"label":{"description":"Optional caption for the image.","type":"string"}},"title":"screenshotElement"},"components":{"title":"components","description":"Set of component configurations. Used internally by Finsemble to register \\"UI Components\\".","type":"object","properties":{},"additionalProperties":{"$ref":"#/definitions/component"}},"component":{"description":"The name of the component you are configuring.","title":"component name","finsemble:docs":{"rightnav":true,"indented":true},"type":"object","forceDefaults":false,"properties":{"//":{"type":"string","description":"Optional comment describing the component."},"io.Connect":{"$ref":"https://docs.interop.io/desktop/assets/configuration/application.json#/definitions/application"},"bootParams":{"$ref":"#/definitions/bootParamsProperties"},"signatureKey":{"type":"object","description":"Public authentication key to decrypt static AuthenticationTokens within interopService. Necessary config for Freestanding applications connecting to Finsemble from outside.","additionalProperties":true,"properties":{"alg":{"type":"string","description":"The algorithm used to generate the keys, for example, \\"RS256\\"."},"ext":{"type":"boolean","private":true,"description":"Short of \'extractable\'. This is an extension of the JWK format, supported by the WebCrypto API.","default":true},"key_ops":{"type":"array","private":true,"description":"The operations that the key is intended to be used for. One of these items must be \'sign\'.","items":{"type":"string"}},"kty":{"type":"string","private":true,"description":"The key type, such as \'RSA\' or \'EC\'."},"n":{"type":"string","private":true,"description":"The modulus of an RSA key."},"e":{"type":"string","private":true,"description":"The exponent of an RSA key."}}},"signatureKeyURL":{"type":"string","default":false,"description":"URL specifying the location of the signature key - an alternative to providing the `signatureKey` with the Finsemble configuration."},"isAnApp":{"type":"boolean","default":false,"private":true,"description":"Finsemble\'s config service dynamically adds this field to indicate that the app came from AppD rather than from component.json. It is generally used in the code to distinguish between apps and UI components. It should never be set in json but is required in the schema to avoid phantom schema validation errors."},"uiComponent":{"type":"boolean","default":false},"appService":{"type":"boolean","default":false,"description":"When true, the app is treated as an app service."},"appConfig":{"type":"object","private":true,"description":"Never set this in raw json. Internally, Finsemble\'s config service converts appd entries to component entries which then contain this field. This field must exist in the schema to avoid phantom schema validation errors."},"waitForInitialization":{"type":"boolean","default":false,"description":"When true, startup waits for the app to explicitly signal it is ready."},"interop":{"description":"Interop (data integration) related config for this app","finsemble:docs":{"rightnav":true,"indented":true},"type":"object","properties":{"launchable":{"type":"boolean","description":"If explicitly set to false, an app is not launchable from the FDC3 UI resolver for handling an intent. This property is independent from the launchableByUser property affecting the App Launcher menu."},"joinMultipleChannels":{"type":"boolean","description":"If explicitly set to false, an app cannot join multiple user channels. So when an app that is already on a channel joins another channel, it automatically leaves the channel it was on."},"fdc3_1_2_compatibility":{"type":"boolean","description":"If true, Finsemble desktop agent conforms to FDC3 1.2 (as opposed to 2.0)."},"showWhenIntentReceived":{"type":"boolean","description":"If explicitly set to `false`, do not automatically show (i.e. bring to front or restore) an app instance receiving an FDC3 intent. If explicitly set to `true`, then always try to show it. Otherwise, the default is to show the application when an intent is received if the app window is normally shown (i.e. its `autoShow` property is `true`)."},"useLinker":{"type":"boolean","description":"The linker is turned on by default for any app that uses FDC3. Set this flag to false if you want to turn off the linker for this app, for example, if your app only uses App Channels (i.e. \'well known\' named channels)."},"autoConnect":{"type":"boolean","default":false,"description":"If set to true, the app automatically connects to the Interop service. In most cases, this causes the linker to display. If set to false (the default), the app connects on the first call to any `fdc` function. "},"selectConnect":{"type":"array","description":"Interop messaging rules to support no-code integration of modules. It allows you to specify precisely which modules can communicate and in what way.","items":{"type":"object","description":"A specific selectConnect rule that consists of one or more properties.","properties":{"authorize":{"type":"array","items":{"type":"object","description":"When set, messages are restricted to apps that meet the authorization criteria. Note: Using \'authorize\' is the same as using both \'to\' and \'from\'.","properties":{"name":{"type":"string","description":"When set, messages are delivered to or received from apps with this name only. Finsemble verifies the app name."}}}},"to":{"type":"array","items":{"type":"object","description":"When set, messages re sent only to apps that meet the authorization criteria.","properties":{"name":{"type":"string","description":"When set, messages are sent only to apps with this name. Finsemble verifies the app name."}}}},"from":{"type":"array","items":{"type":"object","description":"When set, messages can be received only from apps that meet the authorization criteria.","properties":{"name":{"type":"string","description":"When set, messages can be received only from apps with this name. Finsemble verifies the app name."}}}},"cc":{"type":"string","description":"The name of a valid selectConnect module. When cc is set, that module receives a copy of the message. cc works on both outgoing and incoming traffic."},"contextType":{"type":"string","description":"Apply this rule only to this specific context type. (Optional)."},"fwd":{"type":"string","description":"The name of a valid selectConnect module. When you set fwd, that module receives the message *instead* of the original description. fwd is intended primarily for outgoing traffic but also works on incoming traffic."},"autoAssociate":{"type":"object","description":"Define app’s autoAssociate property","properties":{"allChildren":{"type":"boolean","description":"if true, all apps spawned or opened by this app are automatically associated (i.e. auto-joined to common channel)."},"selectChildren":{"type":"array","description":"Any app in this list when spawned or opened by this app is automatically associated.","items":{"type":"string","description":"appId of child app."}},"usingConnectId":{"type":"string","description":"Specifies a fixed association (as opposed to dynamic) using the specified connectId -- all apps with this connectId are automatically associated."}}}}}}}},"window":{"title":"window","finsemble:docs":{"rightnav":true,"indented":true},"type":"object","description":"Configurations that manage placement of the application\'s window on the screen. <i><a href=\\"/docs/reference/typedocs/modules/LauncherClient#spawn\\">Configuration settings in this section can also be passed as parameters to `LauncherClient.spawn()`.</a></i>","properties":{"//":{"type":"string","private":true},"addToWorkspace":{"type":"boolean","default":false,"description":"Specifies whether to add the new component to the workspace. The value set in the component manifest takes priority over any value passed as a parameter to `LauncherClient.spawn` or related functions. Set it to `false` to prevent tabbing and grouping for the component."},"affinity":{"type":["string","boolean"],"description":"Process affinity allows you to control how render processes for web windows, served from the same \'site\' (registered domain and protocol) are grouped together, reducing their memory footprint, at the cost of increasing CPU resource contention (because a render thread can only process one window at a time). As most user interface components are only active while the user is interacting with them, process grouping via affinity is an effective way to reduce memory footprint. Conversely, you might want to disable or customize the affinity setting for CPU intensive applications that are driven by outside events (for example a ticking blotter or chart driven by an external data source). In this way, you can strike a balance between performance and memory footprint. Group applications together thoughtfully by setting them to the same string value or disable render process group by setting affinity to false. See the <a href=\\"/docs/how-finsemble-works/processManagement\\">Process Management tutorial</a> for more information."},"alias":{"type":"string","description":"Used with native applications (that is, when windowType is \\"native\\" or \\"assimilation\\") instead of `path`. Specifies the alias of a bundled asset to launch."},"alwaysOnTop":{"type":"boolean","deprecated":true},"arguments":{"type":"string","description":"Specifies the arguments to be sent to a native application (that is, when windowType is \\"native\\" or \\"assimilation\\") on launch. Separate the arguments by spaces: `--arg1 foo --arg2 bar` except when `params.argumentsAsQueryString` is true, in which case set this parameter to be single string in URI format: `arg=1&arg=2`."},"argumentsAsQueryString":{"type":"boolean","description":"For native applications (i.e. when windowType is \\"native\\" or \\"assimilation\\"), causes the generated arguments (the automatically generated arguments and any supplied as the \\"arguments\\" parameter) to be encoded as a query string and appended to the URI. Useful for applications launched via a protocol handler or online ClickOnce deployment, where the path parameter is a URI."},"autoShow":{"type":"boolean","deprecated":true},"bottom":{"type":["string","number","null"],"description":"A pixel value that represents the distance from the bottom edge of the viewport as defined by \\"position\\". For non-absolute positions, you can also use the percentage value, which represents the percentage distance from the bottom edge of the viewport relative to the viewport\'s height."},"canGroup":{"type":"boolean","replaceWith":"[foreign.services.windowService.allowGrouping](/docs/reference/ConfigReference#finsemble-appd---manifest-foreign-services-windowService-allowGrouping)","deprecated":true},"claimMonitorSpace":{"type":"boolean","description":"For use with permanent toolbars. The available space for other components is reduced by the amount of space covered by the newly spawned component. Users can\'t move windows to a position that covers the claimed space."},"closeComponentsTogether":{"type":"boolean","default":false,"description":"Whether to close all components within a launchGroup at the same time."},"component":{"description":"Type of component to spawn."},"data":{"type":["array","boolean","integer","null","number","object","string"],"description":"Optional data to pass to the opening window. If set, then the spawned window can use WindowClient.getSpawnData to retrieve the data."},"defaultHeight":{"type":"number"},"dockable":{"description":"Parts of the monitor that the component can dock to. Valid values are `top` and `bottom`. The `[]` value is equal `false`. The `true` value is equal `[\'top\', \'bottom\']`.","type":["array","boolean"],"items":{"type":"string"},"enum":[true,false,[],["top"],["bottom"],["top","bottom"]]},"docked":{"type":"string","description":"Specifies the part of the monitor that the component docks to on spawn. Only valid if combined with the `dockable` property.","enum":["top","bottom"]},"dockedHeight":{"type":"number"},"dockOnSpawn":{"type":"boolean","deprecated":true,"description":"If true, automatically docks the window with the \\"relative\\" window (dock to the parent window unless specified in params.relativeWindow). Note that you must also position the window in a valid position for docking, for example, by setting the \\"left\\" or \\"top\\" parameters to \\"adjacent\\".","replaceWith":"[groupOnSpawn](/docs/reference/ConfigReference#finsemble-apps---hostManifests-Finsemble-window-groupOnSpawn)"},"ephemeral":{"type":"boolean","description":"Indicates that this window is ephemeral. An ephemeral window is a dialog, menu, or other window that is temporarily displayed but usually hidden. Ephemeral windows automatically have these settings assigned: resizable: false, showTaskbarIcon: false, alwaysOnTop: true. Use `options:{autoShow: false}` to prevent an ephemeral window from showing automatically."},"env":{"description":"Sets environment variables for a spawned native application. Create a map (JSON) object of names to values. This is only available when running Assimilation."},"forceOntoMonitor":{"type":["boolean","string"],"enum":[true,false,"availableRect","monitorRect"],"description":"If true, tries to make the window have no edges outside the monitor boundary."},"frame":{"type":"boolean"},"groupOnSpawn":{"type":"boolean","description":"Groups the window to the `relativeWindow` based on their adjacent position."},"height":{"type":["number","string"],"description":"A pixel or percentage value."},"id":{"type":"string"},"left":{"type":["string","number","null"],"description":"A pixel value representing the distance from the left edge of the viewport as defined by \\"position\\". For non-absolute positions, you can also use the percentage value, which represents the percentage distance from the left edge of the viewport relative to the viewport\'s width.<br/><b>\\"adjacent\\"</b> will snap to the right edge of the spawning or relative window.<br/><b>\\"center\\"</b> will center the window. If neither left nor right are provided, then the default will be to stagger the window based on the last spawned window."},"maxHeight":{"type":["number","boolean","null"],"description":"Maximum height window can be resized to."},"maxWidth":{"type":["number","boolean","null"],"description":"Maximum width window can be resized to."},"minHeight":{"type":["number","boolean","null"],"description":"Minimum height window can be resized to."},"minWidth":{"type":["number","boolean","null"],"description":"Minimum width window can be resized to."},"monitor":{"type":["number","string"],"description":"Specifies on which monitor to place the new window.<br/><b>\\"mine\\"</b> - Place the window on the same monitor as the calling window.<br/>Integer value from 0-n (0 being the primary monitor).<br/><b>\\"primary\\"</b> indicates the user\'s primary monitor.<br/><b>\\"all\\"</b> - Put a copy of the component on all monitors."},"name":{"type":"string","description":"Window name to apply to the application. The name is not normally specified, allowing Finsemble to generate a random one from the component type. If specified in the configuration, only a single copy of the component can exist at a time."},"options":{"title":"options","description":"Low level window behavior options. Note that you can\'t pass `options` as arguments to `LauncherClient.spawn` and related API calls","type":"object","properties":{"autoShow":{"type":"boolean","default":true,"description":"When set to true, the window is visible when it is spawned. When set to false, the window is spawned to be invisible."},"backgroundThrottling":{"description":"Specifies whether to throttle animations and timers when the page becomes backgrounded. This also affects the Page Visibility API. Defaults to true","type":"boolean"},"contextMenu":{"type":"boolean","description":"A flag to show the context menu when right-clicking on a window. Gives access to the Developer Console for the Window.","default":true},"Content-Security-Policy":{"description":"Custom content security policy (CSP) that overrides the manifest CSP and the CSP received from this app\'s HTTP server. This can be a string or an array of strings. See <a href=\\"https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP\\">MDN docs on CSP</a>","type":["array","string"],"items":{"type":"string"},"examples":[["script-src *;"]]},"permissions":{"type":"object","description":"Change an application\'s individual permissions to be different than from those in its security policy by adding configs under this config. See the <a href=\\"/docs/how-finsemble-works/SecurityPolicies#customized-security-policies\\">Security Policies tutorial</a> for more information.","properties":{}},"securityPolicy":{"type":"string","description":"Set an application\'s security policy by name, for example to the default \\"trusted\\" or \\"untrusted\\" policies or to a custom policy. See the <a href=\\"/docs/how-finsemble-works/SecurityPolicies#changing-a-security-policy\\">Security Policies tutorial</a> for more information."},"showTaskbarIcon":{"type":"boolean","description":"Specifies whether the application should be displayed in the Windows taskbar."},"smallWindow":{"type":"boolean","deprecated":true},"maximizable":{"type":"boolean","deprecated":true},"cornerRounding":{"$ref":"#/definitions/cornerRounding"},"opacity":{"type":"number","default":1,"description":"Sets the opacity of the window."},"openLinksInExternalBrowser":{"type":"boolean","default":false,"description":"When set to true, links (anchor tags) will be open in the OS default browser. See \'navigation\' property for restricting navigation."},"allowedNavigationUrls":{"description":"Controls whether the app can navigate to other urls. If unspecified, the default is to allow all urls. This will change in a future version to allowing only same-origin urls, those with the same domain, protocol, and port as the window itself. An empty array indicates no navigation is allowed, even to the origin domain. To allow specific domains, add those domains to the array. The origin domain must also be added.","type":"array","items":{"type":"string","description":"A list of domains to which this app is allowed to navigate or open pop-up windows. If a domain is not fully qualified, it is treated as a wildcard, \'*.domain.com\'"}},"allowedWindowOpenUrls":{"description":"Controls whether the app can programmatically open a window with `window.open()` based on the url. If unspecified, the default is to allow all urls. This will change in a future version to allowing only same-origin urls, those with the same domain, protocol, and port as the window itself. An empty array indicates no navigation is allowed, even to the origin domain. To allow specific domains, add those domains to the array. The origin domain must also be added.","type":"array","items":{"type":"string","description":"A list of domains to which this app is allowed to navigate or open pop-up windows. If a domain is not fully qualified, it is treated as a wildcard, \'*.domain.com\'"}},"resizable":{"type":"boolean","default":true,"description":"When set to false, the user can\'t resize the window\'s edges and won\'t the window participate in Windows Aero Snap."},"alwaysOnTop":{"type":"boolean","default":false,"description":"When set to true, the window is always on top (like a sticky note) of any window with alwaysOnTop set to false."},"isEvergreen":{"type":"boolean","default":false,"description":"When set to true, the window hides and shows when switching between workspaces rather than opening and closing. The same <b>singleton</b> instance of the window is used across multiple workspaces. <b>Note</b>: Tabbing and tiling is set to false for Evergreen components. If you\'re using set/getComponentState, the state is different per workspace. Listen for the \'component-state-changed\' event on the window to update your application accordingly. Or fetch the new state in the Workspace \'load-complete\' event in the case of a native application."},"windowSpawnTimeout":{"type":"number","default":30,"description":"Number of seconds before a native application component spawn times out."},"windowTitleBarUrl":{"type":"string","description":"When specified, overrides the default Finsemble window titlebar. See finsemble.windowTitleBarUrl for more info."},"transparent":{"type":"boolean","description":"When set to true, the window is transparent. This works only if you haven\'t set any background color on the window, including through css tags. Dynamically removing background color styles does _not_ work on Mac (there must be no initial css styles for background or background-color)."},"userAgentString":{"type":"string","description":"Sets the userAgent for a web window, allowing for spoofing the of the userAgent."}}},"path":{"type":"string","description":"Specifies the path to a native application (i.e. when windowType is \\"native\\" or \\"assimilation\\"). The path can be: <ul><li>The name of an exe that is on the system path (e.g., notepad.exe).</li><li>The full path to an executable on the user\'s machine (e.g., C:\\\\Program Files\\\\app.exe).</li><li>A system installed URI (e.g., myuri://advancedapplauncher).</li></ul>When windowType is \\"native\\", additional arguments are automatically appended to the path or the URI. The native app can capture these arguments to tie it to Finsemble\'s window tracking. When building an application with finsemble.dll, this is handled automatically. Those arguments are:<ul><li><b>uuid</b> - A generated UUID that uniquely identifies this window.</li><li><b>left</b> - The x coordinate of the new window</li><li><b>top</b> - The y coordinate of the new window</li><li><b>width</b> - The width of the new window</li><li><b>height</b> - The height of the new window</li><li><b>finsembleWindowName</b> - The name of the window in the Finsemble config</li><li><b>componentType</b> - The component type in the Finsemble config</li><li><b>appName</b> - The name of the application in the Finsemble appd.</li></ul> A common problem occurs when a native application needs to be launched from an intermediary application (such as a launcher or batch script) or a window needs to be created by a multi-process. multi-window application. The intermediary application or process can pass these parameters along to the final application or thread, which uses them to connect back to Finsemble."},"position":{"type":"string","enum":["available","monitor","relative","virtual","absolute"],"description":"Defines a \\"viewport\\" for the spawn, with one of the Position Types:<ul><li><b>available</b> - Positioned according to the coordinates available on the monitor itself, less space claimed by the operating system (such as the windows toolbar). For example, `bottom:0` places the new component with its bottom flush against the windows toolbar.</li><li><b>monitor</b> - Positioned according to the absolute size of the monitor. For example, `top:0` places the component overlapping the toolbar.</li><li><b>relative</b> - Positioned relative to the relativeWindow. For example, `left:0;top:0` joins the top left corner of the new component with the top left corner of the relative window.</li><li><b>virtual</b> - Deprecated. Positioned against coordinates on the virtual screen. The virtual screen is the full viewing area of all monitors combined into a single theoretical monitor.</li><li><b>absolute</b> - Positioned using native operating system coordinates. Absolute positions require numeric top/right/left/bottom arguments.</li></ul>."},"relativeWindow":{"description":"The window to use when calculating any relative launches. If not set, the window from which spawn() was called. Primarily used as an argument to `LauncherClient.spawn()` and related functions."},"resizable":{"type":"boolean","deprecated":true},"right":{"type":["string","number","null"],"description":"A pixel value representing the distance from the right edge of the viewport as defined by \\"position\\". For non-absolute positions, you can also use the percentage value, which represents the percentage distance from the right edge of the viewport relative to the viewport\'s width."},"setBoundsOnly":{"type":"boolean","description":"If true, visibility of window is not changed. In other words, a hidden window won\'t be made visible. Primarily used as an argument to `LauncherClient.showWindow()` and related functions."},"show":{"type":"boolean"},"showTaskbarIcon":{"type":"boolean","deprecated":true},"slave":{"type":"boolean","description":"If true, the new window acts as a slave to the relativeWindow (or the launching window if relativeWindow is not specified). Slave windows automatically close when their parent windows close."},"staggerPixels":{"type":"number","description":"Number of pixels to stagger (default when neither left, right, top or bottom are set)."},"top":{"type":["string","number","null"],"description":"A pixel value that represents the distance from the bottom edge of the viewport as defined by \\"position\\". For non-absolute positions, you can also use the percentage value, which represents the percentage distance from the top edge of the viewport relative to the viewport\'s height."},"toSpawn":{"type":"array","description":"An array of objects defining the components to spawn. Each entry can either represent a single component in the form `{componentType, spawnOptions}` or a tabbed window of components in the form `{components, spawnOptions}`, where `components` is an array of single component definitions (again in the form `{componentType, spawnOptions}`). Most arguments that are normally passed to `LauncherClient.spawn` are supported, although positioning is interpreted as relative to the group\'s coordinates and dimensions for single components and ignored for tabbed components (as these use the position specified in the group\'s spawnOptions). Note - This param is taken into account only if the \\"windowType\\" param is \\"launchGroup\\".","items":{"type":"object","properties":{"components":{"type":"array","description":"An array of components to spawn as a tabbed group within the launchGroup.","items":{"componentType":{"type":"string","description":"The name of the component to spawn."},"spawnOptions":{"$ref":"#/definitions/spawnOptions"}},"spawnOptions":{"$ref":"#/definitions/spawnOptions"}},"componentType":{"type":"string","description":"The name of a component to spawn"},"spawnOptions":{"$ref":"#/definitions/spawnOptions"}}},"examples":[[{"componentType":"Welcome Component","spawnOptions":{"top":0,"left":0,"height":250,"width":600,"data":{}}},{"components":[{"componentType":"Welcome Component","spawnOptions":{"data":{}}},{"componentType":"ProcessMonitor","spawnOptions":{"data":{}}}],"spawnOptions":{"top":250,"left":0,"height":250,"width":600}},{"componentType":"Welcome Component","spawnOptions":{"top":500,"left":0,"height":200,"width":600,"data":{}}},{"componentType":"ProcessMonitor","spawnOptions":{"top":0,"left":600,"height":700,"width":300,"data":{}}}]]},"url":{"type":"string","description":"The URL to load for a web application (i.e. when `windowType` is `undefined`, \'WebWindow\' or \'application\')."},"width":{"type":["number","string"],"description":"A pixel or percentage value."},"windowTitleBlackList":{"type":["string","null"],"default":null,"description":"A regular expression-based string specifying window title to exclude from integration, such as splash screens or transient dialogs. Is used only for assimilation window type.","examples":["Opening.*"]},"windowTitleWhiteList":{"type":["string","null"],"default":null,"description":"A regular expression-based string specifying window title to include (finsemblize) in the integration. Is used only for assimilation window type.","examples":[".*(Outlook|Today).*"]},"windowType":{"type":"string","description":"Describes which type of component to spawn.<ul><li><b>WebWindow</b> - A normal HTML window. Requires \\"url\\" to be specified.</li><li><b>assimilation</b> - A window that is managed by the Finsemble assimilation process (usually a native window without source code access). Requires \\"path\\" or \\"alias\\" to be specified.</li><li><b>native</b> - A native window that has implemented finsemble.dll. Requires \\"path\\" or \\"alias\\" to be specified.</li><li><b>WebApplication</b> - (DEPRECATED) Use WebWindow instead. Requires \\"url\\" to be specified.</li><li><b>launchGroup</b> - A component made of other components, usually grouped together. See toSpawn property.</li><li><b>Citrix</b> - (EXPERIMENTAL) A virtual app available in your Citrix Workspace app launcher. Requires \\"alias\\" to be specified.</li></ul>","enum":["WebWindow","assimilation","native","WebApplication","launchGroup","Citrix","external"]}},"additionalProperties":true},"component":{"type":"object","finsemble:docs":{"rightnav":true,"indented":true},"description":"Properties associated with how Finsemble manages this application.","properties":{"category":{"type":"string","description":"During dynamic configuration, Finsemble can overwrite components already in the configuration. To prevent this from happening, set this value to \\"system\\". This setting is used, for example, to prevent system UI components from being dropped out of the config."},"mode":{"type":"string"},"advertiseReceivers":{"type":["array","string"],"items":{"type":"string"}},"spawnOnStartup":{"type":"boolean","default":false,"description":"When true, Finsemble automatically launches this application when the application starts."},"spawnOnAllMonitors":{"type":"boolean"},"canMinimize":{"deprecated":true,"replaceWith":"[foreign.services.windowService.allowMinimize](/docs/reference/ConfigReference#finsemble-apps---hostManifests-Finsemble-foreign-services-windowService-allowMinimize)","type":"boolean"},"canMaximize":{"deprecated":true,"replaceWith":"[foreign.services.windowService.allowMaximize](/docs/reference/ConfigReference#finsemble-apps---hostManifests-Finsemble-foreign-services-windowService-allowMaximize)","type":"boolean"},"useAppCatalog":{"deprecationMessage":"AppCatalog is deprecated and will be removed in a future release.","type":"boolean"},"singleton":{"type":"boolean","default":false,"description":"If set to `true`, the application behaves as a singleton; only a single instance can be launched. If the application has already been launched, if a user tries to launch it again, Finsemble brings it to front instead."},"showDevConsoleOnVisible":{"type":"boolean","default":false,"description":"If set to `true`, a Chrome developer console spawns along with the application to assist with debugging."},"allowQuickComponent":{"type":"string"},"neededClients":{"deprecated":true,"description":"Clients no longer need to be specified for initialization.","type":"array","items":{"type":"string"}},"displayName":{"type":"string","description":"Changes the applications\'s name in the launcher and its label in the pinned item section."},"centralLoggerNamePrefix":{"type":"string","description":"Prefixes the windowDisplayName for the entry in the Central logger."},"preload":{"type":["boolean","string","array"],"description":"A preload is a JavaScript file that is inserted into browser page and runs before any other content. Specify a full path for your preloads. You can specify a list of files to be included. Learn more about preloads in <a href=\\"/docs/add-apps/native/IntegratingNativeApps\\">Integrating HTML Applications</a>.","items":{"type":"string"}},"inject":{"type":["boolean","string"],"private":true,"deprecated":true},"spawnOnHotkey":{"description":"The application is launched when the user activates this global hotkey combination. Example: [\\"ctrl\\",\\"alt\\",\\"a\\"]","type":"array","items":{"type":"string"}},"enableGrpc":{"deprecated":true,"description":"Enables GRPC. Can be used from BrowserView based applications. grpc is a global variable available at window.grpc or at fin.grpc. Note: Sandbox is disabled for these applications.","type":"boolean"},"reloadTimeout":{"description":"Reload timeout for the component\'s WebContents.","type":"number","minimum":0,"maximum":999999,"default":60000},"maxReloadAttempts":{"description":"Number of maximum reload attempts that should be executed if the component\'s WebContents fails to load.","type":"number","minimum":0,"maximum":60,"default":0},"isUserDefined":{"description":"Property added when an app is added using addUserDefinedComponent.","type":"boolean","private":true},"expectOverwrite":{"private":"true","type":"boolean","default":false,"description":"Indicates that the component config expects to be overwritten by addApps."},"custom":{}},"additionalProperties":false},"foreign":{"title":"foreign","finsemble:docs":{"rightnav":true,"indented":true},"description":"This section contains configurations that other applications and services read when they interact with this component.","type":"object","properties":{"agentLabel":{"type":"string"},"clients":{"title":"clients","type":"object","private":true,"deprecated":true,"properties":{"dialogManager":{"title":"dialogManager","type":"object","properties":{"isDialog":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"services":{"type":"object","description":"Configurations for services that will interact with this application.","properties":{"windowService":{"type":"object","description":"Configurations that the window service will apply to this app.","properties":{"global":{"type":"boolean"},"allowSnapping":{"type":"boolean","default":true,"description":"If `true`, this window can be snapped. If `false`, this window cannot benefit from snapping."},"isArrangable":{"type":"boolean","deprecated":true,"description":"Deprecated as of 3.6"},"allowGrouping":{"type":"boolean","default":true,"description":"If `true`, the window can form groups with other windows. If `false`, this window cannot be placed into a group. Note: Grouping windows by manually dragging can be difficult or impossible if allowSnapping is disabled."},"allowAutoArrange":{"type":"boolean","default":true,"description":"If `true`, the window can be auto arranged. If `false`, will disable the window\'s ability to be auto arranged by the Window Service."},"allowTabbing":{"type":"boolean","default":false,"description":"If `true`, the window\'s titlebar will include a tab header that can be dragged or have other tabs dropped onto it. If `false`, tabbing will be disabled for this window."},"allowTiling":{"type":"boolean","default":false,"description":"If `true`, the window can be tiled on by other windows by dragging tab headers onto its body (below the titlebar). If `false`, tiling is disabled for this window. Tiling is not possible if a window is not resizable or if tabbing is disabled."},"allowMinimize":{"type":"boolean","default":true,"description":"If `true`, the window can be minimized to the taskbar. If `false`, the window cannot be minimized."},"allowMaximize":{"type":"boolean","default":true,"description":"If `true`, the window can be maximized. If `false`, the window cannot be maximized."},"shouldRegister":{"type":"boolean"},"manageWindowMovement":{"type":"boolean","default":true,"description":"If `true`, the Window Service manages the window\'s movement. Unless otherwise specified by the following params, this means the Window Service can perform actions on this window: move, group, snap, minimize, maximize, etc. When this parameter is `false` it could be overwritten by `allowSnapping`, `allowGrouping`, `allowAutoArrange`, `allowTabbing`, `allowTiling`, `allowMinimize`, `allowMaximize`, `window.dockable`, `FSBLHeader` if any from them is `true`"}}},"workspaceService":{"type":"object","description":"Configurations related to the workspace service.","properties":{"persistURL":{"type":"boolean","description":"A config that specifies whether Finsemble should persist the application URL. When true, the app or component automatically saves its last URL instead of using the one in the config. The application config overrides the global config.","default":false},"persistPath":{"type":"boolean","default":false,"description":"When true, the application automatically persists its path through restarts and workspace reloads, even when the path changes in the config. Path is used for \\"native\\" (aka \\"assimilation\\") windows."},"persistArguments":{"type":"boolean","default":true,"description":"When false, the application does not automatically persist its arguments through restarts and workspace reloads, even when the arguments change in the config. Arguments are used for \\"native\\" (aka \\"assimilation\\") windows."}}},"dockingService":{"type":"object","private":true,"deprecated":true,"properties":{"canGroup":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"components":{"type":"object","description":"Configurations specific to other applications that wish to interact with this app.","properties":{"App Launcher":{"type":"object","description":"App launcher is a drop down menu that launches other application.","properties":{"launchableByUser":{"type":"boolean","description":"If true, an App Launcher menu can include this application.","default":false}},"default":{}},"Toolbar":{"type":"object","description":"Configurations related to the global toolbar (at the top of the monitor).","properties":{"iconURL":{"type":"string","replaceWith":"the [\'icons\'](/docs/reference/ConfigReference#finsemble-apps---icons) array at the top level of the AppD entry.","deprecated":true,"examples":[{"iconURL":"$applicationRoot/assets/img/Finsemble_Taskbar_Icon.png"}]},"iconClass":{"type":"string","description":"A CSS class character to display when this application is pinned in the toolbar. See \\"fin-font\\" or use font-awesome or similar. This setting will override AppD icons.","examples":[{"iconClass":"ff-ungrid"}]}}},"Window Manager":{"$ref":"#/definitions/windowManager"}},"default":{}},"custom":{}},"additionalProperties":false,"default":{}},"childWindowOptions":{"finsemble:docs":{"halt":true,"type":"object","description":"Configuration for all child windows created via window.open for this app. Child windows can\'t join workspaces, group, tab, or tile. <i>childWindowOptions supports the same properties as component...</i>"},"$ref":"#/definitions/component"},"custom":{"type":"object","description":"This area is free-form and can support any custom elements associated with the app.","properties":{},"additionalProperties":true}},"additionalProperties":false},"services":{"private":true,"description":"The set of service configurations. These are defined internally for Finsemble and can be overridden by equivalent entries in servicesConfig.","type":"object","additionalProperties":{"$ref":"#/definitions/service"}},"service":{"description":"<b>[service name]</b> The name of the service you are configuring","type":"object","properties":{"bootParams":{"$ref":"#/definitions/bootParamsProperties"},"name":{"description":"name of service","type":"string"},"spawnAs":{"$ref":"#/definitions/spawnAs"},"affinity":{"type":["string","boolean"],"description":"Only applicable for `spawnAs: \\"window\\"`. When set, the service window are given process affinity based on the string passed in. This allows aggregation of services to a specific browser process. Set to false to disable render process grouping via affinity."},"visible":{"description":"Set this to `true`to reveal the hidden service window. Useful for debugging services.","type":"boolean","default":false},"html":{"type":"string","description":"The location of the services code.","examples":[{"html":"$servicesRoot/workspace/workspace.html"}]},"file":{"type":"string"},"category":{"type":"string","enum":["system"]},"showDevConsoleOnVisible":{"type":"boolean","default":true,"description":"Automatically spawns a dev console when visible is true. If a service is set to type \\"script\\", don\'t use this but instead debug serviceManager.html."},"debugServiceDelay":{"type":"integer","private":true,"deprecated":true},"window":{"title":"window","description":"Logger service\'s window config.","type":"object","properties":{"defaultWidth":{"type":"number"},"defaultHeight":{"type":"number"},"contextMenu":{"type":"boolean"}}},"config":{"anyOf":[{"title":"windowServiceConfig","description":"Service config specific to window service.","type":"object","properties":{"BUFFER_SIZE":{"type":"number"},"RESIZE_EVENT_THROTTLE_PERIOD":{"type":"number"},"MINIMUM_WIDTH":{"type":"number"},"MINIMUM_HEIGHT":{"type":"number"},"GROUP_MODE":{"title":"GROUP_MODE","type":"object","properties":{"enabled":{"type":"boolean"},"behavior":{"type":"string"}}},"DEBUG":{"type":"boolean"},"ALLOW_GROUPS_TO_SNAP":{"type":"boolean"},"SNAPPING_OPACITY":{"type":"number"},"groupTileBuffer":{"type":"number"},"headerHeight":{"type":"number"},"heartbeatResponseTimeoutDefaults":{"title":"heartbeatResponseTimeoutDefaults","type":"object","properties":{"min":{"type":"number"},"max":{"type":"number"},"crashed":{"type":"number"},"possiblyCrashed":{"type":"number"},"notResponding":{"type":"number"}}},"tabbing":{"type":"object","properties":{"enabled":{"type":"boolean","default":true}}},"tiling":{"type":"object","properties":{"enabled":{"type":"boolean","default":true}}}}},{"$ref":"#/definitions/serviceAssimilationConfig"}]},"channels":{"deprecated":true,"description":"Only used in Linker Service.","type":"array","items":{"type":"object"}},"custom":{}},"required":["html"],"additionalProperties":false},"scheduledRestart":{"finsemble:docs":{"rightnav":true},"description":"Set Finsemble to automatically restart at the specified time. We use the 24-hour clock, and the time is measured according to the user\'s local machine. The user can override these values through user preferences.","type":["boolean","object"],"default":false,"$ref":"#/definitions/WeeklyRecurringTime"},"scheduledShutdown":{"description":"Set Finsemble to automatically shut down. A user can override these values through user preferences.<br/>Additional property: <b>dialogTimeout</b> 10000 - When it is time to shut down, the user is presented with a dialog to confirm or cancel. Because shutdown typically occurs at night while the machine is unattended, most often the dialog times out and Finsemble shuts down. The `dialogTimeout` specifies how long to wait for a user response in milliseconds.","type":["boolean","object"],"default":false,"$ref":"#/definitions/WeeklyRecurringTime"},"WeeklyRecurringTime":{"type":["boolean","object"],"properties":{"dayOfWeek":{"description":"The day of the week to run the task. Sunday - Saturday: 0 - 6. If set to false, the task runs weekly","type":["number","boolean"],"maximum":6,"minimum":0},"hour":{"description":"0 - 23. the hour when Finsemble runs the task.","type":"number","maximum":23,"minimum":0},"minute":{"description":"0 - 59. the minute when Finsemble runs the task","type":"number","maximum":59,"minimum":0}}},"scheduledCloseDiscardUnsavedChanges":{"description":"If true AND Finsemble has a scheduled restart configured, it discards any unsaved workspace changes when Finsemble closes.","type":"boolean","default":false},"downloads":{"type":"object","properties":{"downloadLocation":{"description":"Location from which to download files without prompting. The default is to show a dialog to choose a location.","type":"string"},"previousLocations":{"private":true,"description":"List of last three locations selected by the user.","type":"array"}}},"serviceAssimilationConfig":{"title":"assimilationConfig","description":"Assimilation of native windows. This only works on Windows operating systems.","type":"object","properties":{"spawnAs":{"$ref":"#/definitions/spawnAs"},"affinity":{"description":"Only applicable for `spawnAs: \\"window\\"`. When set, the service window is given process affinity based on the string passed in. This allows aggregation of services to a specific browser process. Set to false to disable render process grouping via affinity","type":["string","boolean"]},"visible":{"description":"Set this to `true` to reveal the hidden service window. Useful for debugging services.","type":"boolean","default":false},"enabled":{"description":"Set to true to turn on Assimilation.","type":"boolean","default":true},"port":{"description":"Assimilation communicates with Finsemble\'s HTML services via a WebSocket. Set the port here.","type":"number","default":8392},"useFeaSpawn":{"type":"boolean"},"throttle":{"description":"Windows sends dozens of events per second when a window is moved. This value tells the application how often to collect those events. You might see performance degradations if you set the throttle below 5.","type":"number","default":15},"blacklist":{"type":"array"},"whitelist":{"type":"array"},"onlySpawned":{"description":"This Boolean tells assimilation whether it should restrict its scope to external applications spawned by Finsemble. If true, only applications launched from Finsemble will be controlled. If false, it will try to control the movements of all windows on the desktop.","type":"boolean","default":true},"focusDelay":{"description":"Sets the delay (in milliseconds) between the focus event being received and the actual focusing of the window. This is necessary because the focus event is called simultaneously with minimize/restore events, which causes issues with docking groups.","type":"number","default":30},"eventIgnore":{"description":"Sets the threshold (in milliseconds) from the previous event before which focus/restore events are dropped. Certain sequences of minimize/restore/focus events can create an unwanted loop of events; therefore, restore and focus events are throttled with this property.","type":"number","default":50},"hotkeyTimeout":{"type":"number"},"hideTitleBars":{"description":" Set to true to hide all Finsemble title bars for native applications.","type":"boolean"}}},"workspacesArray":{"title":"workspaces","finsemble:docs":{"rightnav":true},"description":"An array of workspaces to be presented to the user the first time they start Finsemble. By default, the first workspace listed in the array is the one first presented to an end user the first time they load their smart desktop. See <a href=\\"/docs/productivity/Workspaces/\\">instructions on generating default workspaces.</a>","type":"array","items":{"$ref":"#/definitions/workspaceTemplate"}},"workspaceTemplate":{"title":"Workspace Template","description":"Template for config specified workspace","type":"object","properties":{"name":{"type":"string","description":"Name of workspace. This appears in the workspaces menu."},"type":{"private":true,"deprecated":true,"description":"always equals `workspace`","type":"string"},"version":{"private":true,"deprecated":true,"type":"string"},"description":{"private":true,"deprecated":true,"type":"string"},"groups":{"description":"Contains groupings: of snapped windows and also of grouped windows.","$comment":"This format matches the docking system\'s internal store.","type":"object","additionalProperties":{"$ref":"#/definitions/workspaceGroup"}},"windowData":{"$comment":"This is only used when importing or loading a workspace from config. In storage, this data is stored in a separate key for each window.","description":"Launching and positioning data for each window.","type":"array","items":{"$ref":"#/definitions/workspaceWindowData"}},"permanent":{"description":"If set to true, users can\'t delete or rename this workspace.","type":"boolean"},"default":{"description":"If set to true, this workspace is the default that is loaded the first time the app is run","type":"boolean"},"windows":{"description":"The names of the windows in this workspace.","title":"windows","type":"array","items":{"type":"string"}},"components":{"private":true,"deprecated":true,"description":"use windowData","type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"options":{"type":"object","properties":{"top":{"type":"number"},"bottom":{"type":"number"},"left":{"type":"number"},"right":{"type":"number"}}}}}},"componentState":{"private":true,"deprecated":true,"description":"use componentStates","type":"array","items":{"type":"object"}},"guid":{"private":true,"deprecated":true,"type":"string"},"componentStates":{"$comment":"This is only used when importing or loading a workspace from config. In storage, this data is stored in a separate key for each window.","description":"Context state for each window, such as from calls to setComponentState()","type":"object","additionalProperties":{"$ref":"#/definitions/workspaceWindowState"}},"custom":{"description":"Optional field for proprietary data to be associated with this workspace","type":"object","additionalProperties":true}},"required":["name"],"additionalProperties":false},"workspaceGroup":{"description":"Can be either a snapped or grouped collection of windows. For a grouped collection, there is always also a snapped collection that is equivalent or a superset of it (as grouped windows are also snapped together). See each field for distinctions.","type":"object","properties":{"windowNames":{"description":"The names of the windows in this group.","type":"array","items":{"type":"string"}},"isMovable":{"description":"true if a grouped collection, false if a snapped collection.","type":"boolean"},"isAlwaysOnTop":{"description":"true if any window in the collection has aot set to true.","type":"boolean"},"topRightWindow":{"description":"The name of the window in the top right corner. This is used to determine whether to display a minimize button.","type":"string"},"isARectangle":{"description":"true if the windows form a perfect rectangle. Used only if docking is restricted to rectangular collections.","type":"boolean"},"ungroupedAlwaysOnTopState":{"description":"Specifies whether the aot flag is set for each individual window in the collection","additionalProperties":{"type":"boolean"}}}},"workspaceWindowData":{"description":"Launch and position data for a window. This is equivalent to the spawn parameters sent to LauncherClient.spawn(). Note that the defaultLeft, defaultTop, defaultHeight and defaultWidth must all be specified otherwise left, top, height and width will be used. Tab collections will show up as a virtual \'StackedWindow\'.","type":"object","properties":{"componentType":{"description":"The AppId of the window\'s app entry. This will be equal to `StackedWindow` for tab collections.","type":"string"},"windowType":{"description":"The window type. \'WebWindow\', \'NativeWindow\', \'NativeFinsembleWindow\' or \'StackedWindow\' when a tab collection","type":"string"},"name":{"description":"The window name","type":"string"},"alwaysOnTop":{"description":"True if aot is set.","type":"boolean"},"autoShow":{"description":"True if the window should be shown when launched.","type":"boolean"},"minWidth":{"description":"Minimum width (zero if none)","type":"number"},"minHeight":{"description":"Minimum height (zero if none)","type":"number"},"maxWidth":{"description":"Maximum width (8000 if none)","type":"number"},"maxHeight":{"description":"Maximum height (8000 if none)","type":"number"},"resizable":{"description":"True if the window can be resized","type":"boolean"},"maximizable":{"description":"True if the window can be maximized","type":"boolean"},"minimizable":{"description":"True if the window can be minimized","type":"boolean"},"opacity":{"description":"Opacity value (0-1)","type":"number"},"windowState":{"description":"0 - normal, 1 - minimized from normal, 2 - maximized, 3 - minimized from maximized, 4 - transitioning (?). Windows are never saved in maximized state.","type":"number"},"defaultLeft":{"description":"Left position of window in pixels.","type":"number"},"defaultTop":{"description":"Top position of window in pixels relative to the _physical monitor_ (does not consider space claimed by toolbar).","type":"number"},"defaultWidth":{"description":"Width of window in pixels.","type":"number"},"defaultHeight":{"description":"Height of window in pixels.","type":"number"},"left":{"private":true,"description":"Left position of window in pixels.","type":"number"},"top":{"private":true,"description":"Top position of window in pixels relative to available space less the toolbar.","type":"number"},"width":{"private":true,"description":"Width of window in pixels.","type":"number"},"height":{"private":true,"description":"Height of window in pixels.","type":"number"},"right":{"private":true,"description":"Right pixels from monitor edge.","type":"number"},"bottom":{"private":true,"description":"Bottom pixels from monitor edge relative to available space less the toolbar.","type":"number"},"monitorInfo":{"description":"The monitor number on which to place the window.","type":"number"},"showTaskbarIcon":{"description":"True if the windows task bar icon should be displayed. If the window is in a tab collection (stack), only the top window has this set to true.","type":"boolean"},"allowAutoArrange":{"description":"True if the window is allowed to be auto-arranged.","type":"boolean"},"url":{"description":"The url of the window. This can change if the user navigates the page. No required if native window or tab collection.","type":"string"},"transparent":{"description":"True if the window is transparent","type":"boolean"},"affinity":{"description":"The affinity group to which this window belongs.","type":"string"},"path":{"description":"Path of native component to spawn. Can be empty string if no path.","type":"string"},"alias":{"description":"Alias name of native app to spawn, which maps to an entry in the manifest\'s `appAssets` array.","type":"string"},"isWPF":{"description":"True if a native app and is wpf.","type":"boolean"},"childWindowIdentifiers":{"description":"Tab collections only. Contains references to all the windows in the stack.","type":"array","items":{"$ref":"#/definitions/workspaceStackWindowIdentifier"}},"visibleWindowIdentifier":{"description":"Tab collections only. A reference to the visible window in the stack.","$ref":"#/definitions/workspaceStackWindowIdentifier"},"bounds":{"description":"Tab collections only. The bounds of the stack (duplicate of information in windowData).","type":"object","properties":{"top":{"type":"number"},"left":{"type":"number"},"width":{"type":"number"},"height":{"type":"number"},"bottom":{"type":"number"},"right":{"type":"number"},"persistBounds":{"description":"Unused","type":"boolean"}}}}},"workspaceWindowState":{"description":"Stored context for each window in a workspace.","additionalProperties":{"description":"A map of contexts associated with this window. The contexts can be of any form.","type":"object","additionalProperties":true}},"workspaceStackWindowIdentifier":{"description":"An object defining a window inside of a tabbed collection (stack).","type":"object","properties":{"name":{"description":"The name of the window.","type":"string"},"windowName":{"description":"The name of the window.","type":"string"},"windowType":{"description":"Always WebWindow.","type":"string"},"title":{"description":"The title to display in the window. This can come from a user edit.","type":"string"},"alwaysOnTop":{"type":"boolean"}}},"cornerRounding":{"description":"Specifies corner rounding for a window.","type":["boolean","object"],"default":true,"properties":{"width":{"type":"number","default":0},"height":{"type":"number","default":0}}},"foldersAppDefinition":{"description":"Definition for AdvanceAppLauncher application folder.","type":"object","properties":{"icon":{"type":"string"},"type":{"type":"string"},"canDelete":{"type":"boolean"},"apps":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"appID":{"type":"string"}}}}}},"menus":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"align":{"type":"string"},"label":{"type":"string"},"menuType":{"type":"string"},"customData":{"type":"object","properties":{"mode":{"type":"string"},"list":{"type":"array","items:":{"type":"string"}}}},"fontIcon":{"type":"string"},"icon":{"type":"string"}}}},"notification":{"type":"object","description":"For any values on a notification not already set, these default values are set on the Notification object. All fields in here must match those in the INotification interface.","properties":{"type":{"type":"string"},"source":{"type":"string"},"timeout":{"type":"number"},"headerLogo":{"type":"string"},"contentLogo":{"type":"string"},"cssClassName":{"type":"string"},"meta":{"type":"object","additionalProperties":true}},"additionalProperties":false},"notificationType":{"description":"object Type. The values inside this object are applied only to notifications with the property \'type\' set to the key value.","type":"object","properties":{"defaultDismissButtonText":{"description":"Add a dismiss action to the Notification if one is not already set.","type":"string","default":"Dismiss"},"showDismissAction":{"description":"Add a dismiss action to the notification if one does not exists. Default set to false.","type":"boolean","default":false},"defaults":{"$ref":"#/definitions/notification"}},"additionalProperties":false},"stackedWindow":{"description":"Configuration for tabbed and tiled windows.","type":"object","properties":{"addReadyTimeout":{"description":"Sets the time, in milliseconds, for a tabbed/tiled windows to become ready.","type":"number","default":6500}},"additionalProperties":false},"spawnAs":{"type":"string","description":"Valid values are:<br/> \\"window\\" - Spawns the service as a child window of the Service Manager.<br/> \\"process\\" - Spawns the service in its own browser process (a.k.a. application). This gives the service dedicated CPU to maximize concurrency.<br/> \\"script\\" - Spawns the service as a script running in the Service Manager window. This minimizes memory footprint. This setting can only be used with the following services: assimilation, storage, hotkeys, linker, search and workspace.<br />","enum":["window","process","script"]},"securityPolicies":{"title":"securityPolicies","private":true,"description":"FEA security policy","type":"object","properties":{"//trusted":{"type":"string","description":"(deprecated). Comment fields are superseded by json schema comments and will be removed in a future version. See \'trusted\' parameter."},"trusted":{"type":"object","description":"Use Finsemble\'s default \\"trusted\\" policy for apps that are on a trusted domain. By default, the trusted policy allows access to every API endpoint."},"untrusted":{"title":"untrusted","description":"Use Finsemble\'s default \\"untrusted\\" policy for apps that are on external domains.","type":"object","properties":{"System":{"title":"System","type":"object","properties":{"clearCache":{"type":"boolean"},"exit":{"type":"boolean"},"launchExternalProcess":{"type":"boolean"}}},"Window":{"title":"Window","type":"object","properties":{"executeJavaScript":{"type":"boolean"},"webPreferences":{}}}}}}},"securityPolicyRules":{"title":"securityPolicyRules","private":true,"description":"Contains a rule to be applied to a security policy.","type":"object","properties":{"crossDomain":{"type":"string"},"sameDomain":{"type":"string"}}},"contentSecurityPolicy":{"description":"Overwrite the default content security policy for all components. This setting can be superseded by the application level \\"Content-Security-Policy\\" config. See <a href=\\"https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP\\">MDN documentation on CSPs</a>.","type":["array","string"],"items":{"type":"string"},"examples":[["script-src *"]]},"electronAdapter":{"description":"Finsemble\'s Electron Adapter config, dynamically added to manifest.","finsemble:docs":{"rightnav":true},"title":"finsemble-electron-adapter","type":"object","properties":{"manifests":{"description":"Allow the ability to specify manifest environments at run time by adding entries for each environment.","type":"object","examples":[{"manifests":{"dev":"http://localhost:3375/configs/application/manifest-local-dev.json","qa":"http://localhost:3375/configs/application/manifest-local-qa.json"}}]},"logHTTPErrors":{"description":"Set to false to prevent FEA logging of load failures in the 400-599 range.","type":"boolean","default":true},"useDOMBasedMovement":{"deprecated":true,"description":"Set to false to use native window movement with Electron - which is deprecated due to issues it causes with window Aero Shake and mouse events in draggable regions of windows.","type":"boolean"},"contextIsolation":{"private":true,"description":"When set to true, contextIsolation is turned on for e2o.ts preloads.","type":"boolean","default":false},"allowedManifestDomains":{"description":"Allow the ability to specify manifest urls at run time by setting the allowed domains where the hostname matches one of the entries. Every subdomain needs an entry. Wildcards are not allowed.","type":"array","items":{"type":"string"},"examples":[{"allowedManifestDomains":["finsemble.com","cosaic.io"]}]},"allowedBrowserProtocols":{"description":"(experimental) When calling System.openUrlWithBrowser, only URLs with `http:` and `https:` protocols are permitted for system security. Others that are needed can be added here. A `file:` protocol is a security risk and you should not add it.","type":"array","items":{"type":"string"},"examples":[["http:","https:","fsbl:","mailto:"]]},"reloadWindowHotkey":{"description":"(experimental) Allow a user to disable or override the hotkey for window reload. Set to false to disable or to an [Electron Accelerator string](https://www.electronjs.org/docs/latest/api/accelerator) to override.","type":["boolean","string"]},"reloadWindowIgnoringCacheHotkey":{"description":"(experimental) Allow a user to disable or override the hotkey for forcing window reload. Set to false to disable or to an [Electron Accelerator string](https://www.electronjs.org/docs/latest/api/accelerator) to override.","type":["boolean","string"]},"toggleInspectorHotkey":{"description":"(experimental) Allow a user to disable or override the hotkey to toggle the developer tools window. Set to false to disable or to an [Electron Accelerator string](https://www.electronjs.org/docs/latest/api/accelerator) to override.","type":["boolean","string"]},"logger":{"type":"object","description":"Configuration for logging of low-level events, such as window creation or network requests, from the Finsemble Electron Adapter. Log messages can be written to a rotated file at %AppData%/Roaming/Electron/logs, or output to the console. They can also be transmitted to the Finsemble Central Logger allowing them to be reviewed alongside logging from Finsemble and applications running in Finsemble.","properties":{"logLevel":{"type":"string","default":"debug","description":"The lowest level at which the logger pushes messages to a file. Available log levels from highest to lowest are: \'error\', \'warn\', \'log\',\'info\', \'debug\', and \'verbose\'. Note: This level is set after the manifest is read by the Electron Adapter. As a result, you might see some debug messages before the log level is set.","enum":["error","warn","log","info","debug","verbose"]},"logToDiskLevels":{"ref":"#/definitions/logToDiskLevels"},"transports":{"type":"object","description":"Transport level configuration.","properties":{"console":{"type":"object","description":"The console transport controls where logs are output.","properties":{"enable":{"type":"boolean","default":false,"description":"When set to true, logs are output to a terminal. When set to false, logs are output to file. See `logger` above."}}}}},"transmitToCentralLogger":{"description":"Set to \'false\' to disable sending Electron Adapters logs in the Central Logger. The log levels transmitted are managed in the central logger UI and are independent of the log levels configured for logging to file.","type":"boolean","default":true},"resourceUsageLogInterval":{"description":"Interval. in milliseconds, to log MainSystem.GetProcessList(). Useful for performance troubleshooting. Set to any negative number to disable logging.","type":"number","default":60000}}},"downloadUpdatesViaElectron":{"type":"boolean","default":true,"description":"Downloads the Electron/Squirrel autoUpdate packages to the local machine before checking for and performing updates. The files are downloaded using the same proxy and headers Electron uses."},"ignoreCertificateErrorHosts":{"description":"Certificate errors (SSL/TLS) are ignored for these hosts or URLs. Useful when using self-signed TLS certificates.","type":"array","items":{"type":"string"},"examples":[{"ignoreCertificateErrorHosts":["https://github.com:80/ChartIQ","self-signed.badssl.com"]}]},"env-allowlist":{"description":"Adds ability to specify Finsemble manifest macros based on environment variables.","type":"array","items":{"type":"string"},"examples":[{"env-allowlist":["TESTVAR","ANOTHERVAR"]}]},"forceCloseGone":{"description":"If true, force closes windows when the \\"render-process-gone\\" event triggers.","type":"boolean","default":false},"forceCloseUnresponsive":{"description":"If true, force closes windows when the \\"unresponsive\\" event triggers.","type":"boolean","default":false}}},"logToDiskLevels":{"description":"Specifies which logger levels should be sent from central logger to the FEA log. Helpful in debugging. You must configure this value in your manifest (that is, manifest-local.json, not in config.json).","type":"array","items":{"type":"string","enum":["error","warn","info","log","debug","verbose"]}},"loggerClientLogLevels":{"description":"Sets the default logging state of each client in the Central Logger if no previous state is found.","type":"object","properties":{"Error":{"description":"Set to \'true\' to see \'Error\' as a default client logging level.","type":"boolean","default":true},"Warn":{"description":"Set \'true\' to see \'Warn\' as a default client logging level.","type":"boolean","default":true},"Info":{"description":"Set to \'true\' to see \'Info\' as a default client logging level.","type":"boolean","default":false},"Log":{"description":"Set to \'true\' to see \'Log\' as a default client logging level.","type":"boolean","default":true},"Debug":{"description":"Set to \'true\' to see \'Debug\' as a default client logging level.","type":"boolean","default":false},"Verbose":{"description":"Set to \'true\' to see \'Verbose\' as a default client logging level","type":"boolean","default":false},"LocalOnly":{"description":"Set to \'true\' to see \'LocalOnly\' as a default client logging level.","type":"boolean","default":false}}},"logger":{"title":"Logger configuration","type":"object","properties":{"defaultClientLogLevels":{"ref":"#/definitions/loggerClientLogLevels"},"logToDiskLevels":{"deprecated":true,"replaceWith":"finsemble-electron-adapter.logger.logToDiskLevels","ref":"#/definitions/logToDiskLevels"},"allowNativeErrorNotifications":{"description":"Set to \'true\' to allow electron.Notifications for FEA errors.","type":"boolean","default":false}}},"deprecatedConfig":{"finsemble:docs":{"halt":true},"type":"array","private":true,"description":"Contains operations to handle deprecated config.","examples":[[{"versionDeprecated":"5.1","operation":"logMessage","description":"Example of only logging message for deprecated config.","property":"finsemble.logger.defaultClientLogLevels.Info","userMessage":"Please upgrade property to new config schema.","userMessageType":"error"},{"versionDeprecated":"5.1","operation":"removeProperty","description":"Example of removing a deprecated property.","property":"finsemble.testXYZ","userMessageType":"error"},{"versionDeprecated":"5.1","operation":"setValue","description":"Example of updating a specific value to a new specific value.","property":"finsemble.unknownComponent","ifOldValue":"nonConfiguredComponent","newValue":"unknownComponent","userMessage":"Upgrade to new config schema.","userMessageType":"warn"},{"versionDeprecated":"5.1","operation":"moveProperty","description":"Renames a leave property.","oldProperty":"finsemble.servicesConfig.launcher.staggerPixels","newProperty":"finsemble.servicesConfig.launcher.windowStaggerOffset","userMessage":"Upgrade to new config schema."},{"versionDeprecated":"5.1","operation":"moveProperty","oldProperty":"finsemble.components.*.window.url","newProperty":"finsemble.components.*.window.uri","description":"A set of object properties can be referenced with wildcards.","removeOld":false,"userMessageType":"error"},{"versionDeprecated":"5.1","operation":"moveProperty","oldProperty":"finsemble.components.*.foreign.services.*.allowAutoArrange","newProperty":"finsemble.components.*.foreign.services.*.autoArrangeEnabled","description":"You can use multiple wildcards.","removeOld":false,"userMessageType":"error","when":{"bootConfig":false,"mainConfig":true,"dynamicConfig":false}}]],"items":{"type":"object","description":"List of run-time operations to migrate deprecated config.","required":["versionDeprecated","operation"],"properties":{"versionDeprecated":{"type":"string","description":"The Finsemble version the property was deprecated under."},"operation":{"type":"string","enum":["logMessage","setValue","removeProperty","moveProperty","migrateAppDFDC320"],"title":"The operation schema","description":"the operation to perform."},"description":{"type":"string","description":"For additional info to describe the deprecated-config operation."},"property":{"type":"string","description":"For logMessage, setValue, and removeProperty this contains the property path to operate on."},"oldProperty":{"type":"string","description":"For moveProperty, this contains the source path of the deprecatedProperty to move. Wildcards within the path."},"newProperty":{"type":"string","description":"For moveProperty, this contains the target path that oldProperty will be moved to."},"removeOld":{"type":"boolean","description":"For moveProperty, if true, remove oldProperty after moving to new. Use false if customer code references old config location (which should be rare).","default":true},"clone":{"type":"boolean","description":"For moveProperty, if true, clone oldProperty before moving to new. Only set to false if removeOld is false and value change dynamically.","default":false},"userMessage":{"type":"string","description":"Additional log message to explain the handling of this deprecated config."},"userMessageType":{"type":"string","enum":["error","warn","log"],"description":"The log type to use when logging this operation.","default":"warn"},"when":{"type":"object","description":"When within Finsemble the operation should be invoked.","required":["bootConfig","mainConfig","dynamicConfig"],"properties":{"bootConfig":{"type":"boolean","description":"If true, invoke before bootConfig is validated in the System Manager.","default":true},"mainConfig":{"type":"boolean","description":"If true, invoke before full config is validated in the Config Service.","default":true},"dynamicConfig":{"type":"boolean","description":"if true, invoke after dynamical config is added within the Config Service, but before revalidation.","default":true}}}}}},"disableWMICalls":{"deprecated":true,"description":"When set to true, Finsemble will not make calls that require Windows Management Instrumentation Command-line (WMIC). This option fills GPU information for the getHostSpecs method and will be removed in a future version.","type":"boolean","default":true},"splashScreenTimeout":{"$comment":"DO NOT REMOVE THIS UNTIL 7.x is no longer in production because it will cause JSON validation errors during boot","title":"Splash screen timeout","deprecated":true,"description":"Amount of time, in milliseconds, to show the splash screen. The default value 0 causes the splash screen to hide in the `user` stage. This is after the UI Components have loaded and the same time that Workspace components start loading. If you set it to a negative number, you must call `FSBL.System.hideSplashScreen()` in a component when you want to hide the splash screen.","type":"number"},"splashScreenImage":{"title":"Splash screen image","description":"URL of the splash screen when starting Finsemble. The URL can point to either an HTML page or to an SVG file. Both HTML and SVG splash screens support transparency. Use an HTML splash screen if you want to use a .PNG image with transparent background or want more flexibility in styling or animating your splash screen. This image will remain on the screen until the user phase, unless an auth component is spawned or unless you call FSBL.System.hideSplashScreen() manually.","type":"string","default":"http://localhost:3375/assets/img/FinsembleSplash.svg"},"splashScreenOptions":{"title":"Splash screen options","description":"Splash screen options properties options that can be used to customize its UI. It can take any BrowserWindowConstructorOptions properties.","type":"object"},"spawnOptions":{"title":"Spawn Options","description":"Minimal definition for component spawn options","type":"object","properties":{"top":{"type":["number","string"]},"left":{"type":["number","string"]},"height":{"type":["number","string"]},"width":{"type":["number","string"]},"data":{"type":"object"}}},"toolbarMenus":{"type":"object","description":"Optional configuration for custom launcher menus on the Finsemble Toolbar","finsemble:docs":{"rightnav":true},"properties":{},"additionalProperties":{"$ref":"#/definitions/toolbarMenu"}},"toolbarMenu":{"type":"object","description":"Toolbar menu entries provide configuration for an individual menu","properties":{"displayName":{"type":"string","description":"The name of the menu, to be displayed on the toolbar"},"applications":{"type":"array","items":{"type":"string","description":"An array of application names, as defined in the appD configuration, to include in the menu."}},"position":{"type":"number","description":"Used to sort menus into order on the Toolbar (higher position values are displayed further to the right)."}}},"preloads":{"type":"array","items":{"type":"object","properties":{"alias":{"type":"string"},"url":{"type":"string"}}}},"extensions":{"description":"Register preload extensions for Finsemble apps.","type":"object","properties":{"preloads":{"description":"Registered aliases and details for preloads.","type":"object","additionalProperties":{"description":"Preload alias","type":"object","properties":{"url":{"description":"The URL of the hosted preload.","type":"string"},"autoload":{"description":"Specifies whether to automatically apply the preload to all or all launchable apps.","enum":["all","launchable","none"],"default":"none"}}},"examples":[{"zoom":{"url":"https://assets.finsemble.com/preloads/zoom.js","autoload":"launchable"}}]}}},"trustedPreloads":{"type":"array","items":{"type":"string"}},"windowTitleBarUrl":{"description":"Set to the location of the transpiled window title bar code (.js and .html files) based on Finsemble\'s WindowTitlebar template. That code is injected (js file) or used to create a titlebar window shell (html file) depending on titlebar configurations for each app. Leave this field undefined to use Finsemble\'s built-in titlebar. When creating a custom titlebar, point this to the directory containing your custom title bar. Your directory should include an \'index.js\' and \'index.html\' file. This is done automatically in most cases.","type":"string"}}}'),Ie=e=>{return`${e.minute} ${e.hour} * * ${t=e.dayOfWeek,!1===t||void 0===t?"*":t.toString()}`;var t},_e={splashScreenImage:"$documentRoot/assets/img/FinsembleSplash.png",finsemble:{documentRoot:"../../",applicationRoot:"$documentRoot/build",configRoot:"$documentRoot/configs",moduleRoot:"$applicationRoot/finsemble",servicesRoot:"$moduleRoot/services",configSchemaURL:"$moduleRoot/configs/schemas/finsemble.schema.json",systemTrayIcon:"$documentRoot/assets/img/Finsemble_SystemTray_Icon.png"},startup_app:{applicationIcon:"$documentRoot/assets/img/Finsemble_Taskbar_Icon.png"}},Fe=(e,t,i)=>{if(1!==e.length)if("*"===e[0])Object.keys(t).forEach(n=>{Fe(e.slice(1),t[n],i)});else{if(t[e[0]]||(t[e[0]]={}),Array.isArray(t[e[0]]))return void Object.values(t[e[0]]).forEach(t=>{Fe(e.slice(1),t,i)});if("object"!=typeof t[e[0]])return;Fe(e.slice(1),t[e[0]],i)}else{if("*"===e[0])return;if("object"!=typeof t)return;void 0===t[e[0]]&&(t[e[0]]=i)}},Pe=(e,t,i)=>{if(!e)return t;let n=t;if("string"==typeof t&&(null==t?void 0:t.length)&&"$"!==t.charAt(0))try{n=new URL(t,e).href,n=n.replace(/([^:]\/)\/+/g,"$1"),"/"===n.slice(-1)[0]&&(n=n.slice(0,-1))}catch(e){return i.error(e),t}return n},xe=(e,t)=>{if(!e)return e;const i=(e=>{var t;try{const i=new URL(e).pathname.replace(/^.*[\\/]/,""),n=null!==(t=i.split(".").pop())&&void 0!==t?t:null;return n===i?null:n}catch(e){return null}})(e);return i?`${e.substr(0,e.lastIndexOf("."))}.${t}`:`${e.replace(/\/?$/,"/")}index.${t}`};class Re{constructor(e,t,i){this.glue=e,this.logger=t,this.finsembleServiceContext=i,this.schema=r()({},Ce),this.config={},this.macros={},this.gate=new d}async updateContext(){var e,t,i,n;const o={...this.config,finsemble:{...this.config.finsemble}};delete o.finsemble.apps,delete o.finsemble.components,await this.glue.contexts.set(c,o),await this.glue.contexts.set("$FINSEMBLECONFIGAPPS",{finsemble:{apps:null===(t=null===(e=this.config)||void 0===e?void 0:e.finsemble)||void 0===t?void 0:t.apps,components:null===(n=null===(i=this.config)||void 0===i?void 0:i.finsemble)||void 0===n?void 0:n.components}})}normalizeSchema(){P(this.schema,({obj:e,key:t,value:i})=>{if("$ref"===t){const n=i.split("#/definitions/").pop();delete e[t],this.schema.definitions[n]&&Object.entries(this.schema.definitions[n]).forEach(t=>{e[t[0]]=t[1]})}}),delete this.schema.definitions}async recursiveLoadImport(e,t,i){if(this.logger.debug("config - recursiveLoadImport"),!e)return[];let n=[];const{err:o,data:a}=await(async(e,t)=>{let i,n=null;try{const t=await globalThis.fetch(e,{credentials:"same-origin",cache:"no-cache"});200!==t.status?n=`config - HTTP get error for ${e}: ${t.status} ${t.statusText}`:i=await t.json()}catch(i){n=`config - Failure fetching config from ${e} ${i.toString()}`,t.error(n,i)}return{err:n,data:i}})(e,i);return!o&&a?(this.config=r()(this.config,t?a:{finsemble:a},{customMerge:e=>{if("workspaces"===e)return(e,t)=>t}}),n=await this.processConfig(i,this.finsembleServiceContext.manifestURL)):o&&n.push(o.toString()),n}dupAppsToComponents(){var e;this.config.finsemble.components=null!==(e=this.config.finsemble.components)&&void 0!==e?e:{},this.config.finsemble.apps.forEach(e=>{var t,i;this.config.finsemble.components[e.appId]=null!==(i=null===(t=e.hostManifests)||void 0===t?void 0:t.Finsemble)&&void 0!==i?i:{}})}async processConfig(e,t){var i,n,o,a;this.macros=((e,t,i)=>{t.debug("config - computeManifestMacros");let n={};return(()=>{var o,a;n={};const s=r().all([{},null==e?void 0:e.finsemble,null!==(a=null===(o=null==e?void 0:e.finsemble)||void 0===o?void 0:o.custom)&&void 0!==a?a:{}]);Object.entries(s).forEach(e=>{const[o,r]=e;var a;"string"==typeof r&&"$schema"!==r&&("about:blank"===(a=r)||new RegExp("^(https?:\\/\\/)((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.?)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?)?([;&a-z\\d\\/#\\?%_.~+=-]*)?","i").test(a)?n[`$${o}`]=Pe(i,r,t):n[`$${o}`]=r)})})(),(()=>{var t,i;const o=globalThis;(null!==(i=null===(t=e["finsemble-electron-adapter"])||void 0===t?void 0:t["env-allowlist"])&&void 0!==i?i:[]).forEach(e=>{var t;return n[`$${e}`]=null===(t=o.glue42gd)||void 0===t?void 0:t.env[e]})})(),t.debug("config - computeManifestMacros=",n),n})(this.config,e,t),this.config=((e,t,i=ne)=>{i.debug("config - processManifestMacros");const n=t=>{let i=t;if("string"==typeof t){const t=Object.entries(e).length;for(let n=0;n<t;n++){let t=!1;if(Object.entries(e).forEach(e=>{const[n,o]=e;i.includes(n)&&(i=i.replace(n,o),t=!0)}),!t)break}}return i};return P(t,({obj:e,key:t,value:i})=>{if("string"==typeof i){const o=n(i);e[t]=o}else Array.isArray(i)&&(e[t]=i.map(e=>n(e)))}),t})(this.macros,this.config,e);const s=null!==(o=null===(n=null===(i=this.config.finsemble)||void 0===i?void 0:i.importConfig)||void 0===n?void 0:n.map(i=>this.recursiveLoadImport(Pe(t,i,e),!1,e)))&&void 0!==o?o:[];return null===(a=this.config.finsemble)||void 0===a||delete a.importConfig,(await Promise.allSettled(s)).flatMap(e=>"fulfilled"===e.status?e.value:e.reason)}async finalProcessingPass({appIds:e,additionalApps:t=[]}){var i,n;this.config.finsemble.apps=null!==(i=this.config.finsemble.apps)&&void 0!==i?i:[],this.logger.debug("config - Apps to be converted (from Finsemble apps.json format)",this.config.finsemble.apps),this.logger.debug("config - finalProcessingPass: filterUnusedComponents"),(e=>{var t;const i=["bloombergBridgeService","LinkerWindow","QuickComponentForm","NonConfiguredComponent","DockingGroupMask","ProcessMonitor","Download Manager","AppCatalog","HighlightScrim","FDC3Resolver","NotificationsCenter","NotificationsToasts"];(null===(t=null==e?void 0:e.finsemble)||void 0===t?void 0:t.components)&&(e.finsemble.components=f(e.finsemble.components,(e,t)=>i.includes(e)?[]:[[e,t]]))})(this.config),this.logger.debug("config - finalProcessingPass: expandConfig"),(e=>{var t,i,n,o,a,s,l,c;e&&(Object.entries(null!==(i=null===(t=null==e?void 0:e.finsemble)||void 0===t?void 0:t.appd)&&void 0!==i?i:{}).forEach(t=>{var i;const n=t[1];e.finsemble.apps=(null!==(i=e.finsemble.apps)&&void 0!==i?i:[]).concat(n)}),null===(n=null==e?void 0:e.finsemble)||void 0===n||delete n.appd,Object.entries(null!==(a=null===(o=null==e?void 0:e.finsemble)||void 0===o?void 0:o.components)&&void 0!==a?a:{}).forEach(t=>{const[i,n]=t;e.finsemble.components[i]=r()(re,n)}),null===(c=null!==(l=null===(s=null==e?void 0:e.finsemble)||void 0===s?void 0:s.apps)&&void 0!==l?l:[])||void 0===c||c.forEach((t,i)=>{var n,o;t.manifest&&(t=e.finsemble.apps[i]=ee(t)),(null===(o=null===(n=t.hostManifests)||void 0===n?void 0:n.Finsemble)||void 0===o?void 0:o.appService)&&(e.finsemble.apps[i]=r()(ae,t))}))})(this.config),this.logger.debug("config - finalProcessingPass: applyDefaults"),((e,t)=>{if(!t)return;const i=(e,n,o,r)=>{var a;n.has(o)||(n.add(o),o.default&&r&&Fe(e,t,o.default),o.properties&&Object.entries(o.properties).forEach(t=>{var a;const[s,l]=t;i(e.concat(s),new Set(n),l,null!==(a=o.forceDefaults)&&void 0!==a?a:r)}),"object"==typeof o.additionalProperties&&Object.entries(null!==(a=o.additionalProperties.properties)&&void 0!==a?a:{}).forEach(t=>{var a;const[,s]=t;i(e.concat("*"),new Set(n),s,null!==(a=o.additionalProperties.forceDefaults)&&void 0!==a?a:r)}))};i([],new Set,e,!0)})(this.schema,this.config),this.logger.debug("config - finalProcessingPass: configToGlue",e);const o=((e,t,i,n)=>{var o,r,a,s,l;if(!i)return[];const c=n?(null!==(r=null===(o=i.finsemble)||void 0===o?void 0:o.apps)&&void 0!==r?r:[]).filter(e=>n.includes(e.appId)):null===(a=i.finsemble)||void 0===a?void 0:a.apps,d=((e,t,i,n)=>{if(!n)return[];const o=[];for(const[r,a]of Object.entries(n)){const{data:n}=ue(e,t,r,i,a);n&&o.push(n)}return o})(e,t,i,n?f(null===(s=i.finsemble)||void 0===s?void 0:s.components,e=>n.includes(e.name)?[e.name]:[]):null===(l=i.finsemble)||void 0===l?void 0:l.components),p=((e,t,i,n)=>{if(!n)return[];const o=[];for(const r of n){const{data:n}=he(e,t,r,i);n&&o.push(n)}return(e=>{e.forEach(t=>{const{name:i}=t;e.some(e=>{var t,n,o,r,a,s;return(null!==(s=null===(a=null===(r=null===(o=null===(n=null===(t=e.customProperties)||void 0===t?void 0:t.appd)||void 0===n?void 0:n.hostManifests)||void 0===o?void 0:o.Finsemble)||void 0===r?void 0:r.bootParams)||void 0===a?void 0:a.dependencies)&&void 0!==s?s:[]).includes(i)})&&"object"==typeof t.runPriority&&t.runPriority.priority&&t.runPriority.priority++})})(o),o})(e,t,i,c),u=d.concat(p);return(async(e,t,i)=>{i.forEach(async i=>{var n,o,r,a,s;const l=null===(s=null===(a=null===(r=null===(o=null===(n=i.customProperties)||void 0===n?void 0:n.appd)||void 0===o?void 0:o.hostManifests)||void 0===r?void 0:r.Finsemble)||void 0===a?void 0:a.component)||void 0===s?void 0:s.spawnOnHotkey;if(l){const{name:n}=i,o=ie(l);t.debug(`config - Adding spawnOnHotkey ${o} = ${n}`),e.hotkeys.register(o,async()=>{const i=e.appManager.application(n);if(i){const{err:e}=await m(()=>i.start());e&&t.error(`config - Error spawning ${n} from hotkey ${o}`,e)}})}})})(e,t,u),u})(this.glue,this.logger,this.config,e).concat(t);this.logger.debug("config - Apps added by config service",o);const{err:a,data:s}=await m(()=>this.glue.appManager.inMemory.import(o,"merge"));this.logger.debug("config - Finished inMemory import");const l=a?[a]:null!==(n=null==s?void 0:s.errors.map(e=>e.app+" : "+e.error))&&void 0!==n?n:[];this.logger.debug("config - finalProcessingPass: dupAppsToComponents"),this.dupAppsToComponents(),this.updateContext(),this.glue.contexts.set("$FINSEMBLEMACROS",this.macros);const c=l.length?l.join("\n"):null;return c&&this.logger.error("config - finalProcessingPath error from configToGlue",l),{err:c}}async additionalIOCDApps(){var e;const t=null===(e=this.config.finsemble)||void 0===e?void 0:e.decoratorWindowUrl,i={name:"web-group-application",title:"Web group native implementation",type:"webGroup",disabled:!1,hidden:!0,captureErrors:!0,details:{url:xe(t,"html")}};i.details.url||delete i.details.url;const n={title:"Enter PostSSO Stage",type:"window",name:"EnterPostSSOStage",hidden:!0,ignoreSavedLayout:!0,ignoreFromLayouts:!0,service:!1,autoStart:!0,runPriority:{stage:"post-sso",priority:8e3,waitForInitialization:!0},details:{url:new URL("../enterBootStage/index.html",window.location.href).href,isSticky:!1,height:200,width:200,left:200,top:200,hidden:!0,mode:"html",channelSelector:{enabled:!1},allowFeedback:!1,allowClose:!1,allowMinimize:!1,allowMaximize:!1,context:{stage:"post-sso"}}},o=[n,{...n,title:"Enter User Stage",name:"EnterUserStage",runPriority:{stage:"post-sso",priority:1,waitForInitialization:!0},details:{...n.details,left:600,context:{stage:"user"}}}];return t&&o.push(i),this.logger.debug("config - additionalIOCDApps",o),{data:o}}async loadConfigAtBoot(e){var t;const i=e=>e.endsWith("/")?e.slice(0,-1):e,{manifestURL:n}=this.finsembleServiceContext,{documentRoot:o=i(new URL("../..",n).href)}=this.finsembleServiceContext;this.logger.debug("config - documentRoot",o);const a={finsemble:r().all([be,Se,Ae,ke,Te])};this.config=r().all([_e,a]),delete this.config.finsemble.importConfig,this.config.finsemble.documentRoot=o,e.info(`config - Loading manifest from ${this.finsembleServiceContext.manifestURL}`);const s=await this.recursiveLoadImport(this.finsembleServiceContext.manifestURL,!0,e),{err:l,data:c}=await this.additionalIOCDApps(),{err:d}=await this.finalProcessingPass({additionalApps:c});return{err:(null!==(t=null!=d?d:l)&&void 0!==t?t:s.length)?s.join("\n"):null}}processMacros(e){const t=e=>(Object.keys(this.macros).forEach(t=>{e=e.replace(t,this.macros[t])}),e),i=e=>{if(Array.isArray(e))return e.map(e=>i(e));if("object"==typeof e){const t=y(e);return f(t,(e,t)=>[[e,i(t)]])}return"string"==typeof e?t(e):e},n=i(e);Object.keys(n).forEach(t=>{e[t]=n[t]})}listenForAddApp(){this.glue.interop.register("FSBL.Clients.AppsClient.addApps",p(async(e,t)=>{this.logger.debug("config - FSBL.Clients.AppsClient.addApps start. Waiting at gate."),await this.gate.wait(async()=>{this.logger.debug("config - FSBL.Clients.AppsClient.addApps through gate"),e.apps.forEach(e=>{var t;this.processMacros(e),this.config.finsemble.apps=(null!==(t=this.config.finsemble.apps)&&void 0!==t?t:[]).filter(t=>t.appId!==e.appId).concat(e)}),await this.finalProcessingPass({appIds:e.apps.map(e=>e.appId)}),this.logger.debug("config - FSBL.Clients.AppsClient.addApps end")})},this.logger))}listenForRemoveApp(){this.glue.interop.register("FSBL.Clients.AppsClient.removeApps",p(async(e,t)=>{this.logger.debug("config - FSBL.Clients.AppsClient.removeApps start"),this.config.finsemble.apps=this.config.finsemble.apps.filter(t=>!e.appIds.some(e=>e===t.appId)),e.appIds.forEach(e=>{var t;null===(t=this.config.finsemble.components)||void 0===t||delete t[e]}),await this.updateContext(),this.logger.debug("config - FSBL.Clients.AppsClient.removeApps end")},this.logger))}listenForProcessAndSet(){this.glue.interop.register("FSBL.Clients.ConfigClient.processAndSet",p(async(e,t)=>{var i,n,o;this.logger.debug("config - FSBL.Clients.AppsClient.processAndSet start"),console.debug("config - Received processAndSet",e);const{newConfig:a,replace:s,overwrite:l}=e,{manifestURL:c}=await(null===(i=this.glue.windows.my())||void 0===i?void 0:i.getContext());if(a.appd){const e=(e=>{const t=[];return Object.values(e).forEach(e=>{t.push(ee(e))}),t})(a.appd);delete a.appd,a.apps=[...null!==(n=a.apps)&&void 0!==n?n:[],...e]}const d=(null!==(o=a.apps)&&void 0!==o?o:[]).map(e=>e.appId);if(s){const e=await this.glue.appManager.getConfigurations();await h(e,async e=>{var t,i,n;if((null===(t=e.customProperties)||void 0===t?void 0:t.appd)&&!(null===(n=null===(i=e.customProperties.appd.hostManifests)||void 0===i?void 0:i.finsemble)||void 0===n?void 0:n.appService)){const{appId:t}=e.customProperties.appd,{err:i}=await m(()=>this.glue.appManager.inMemory.remove(t));i&&this.logger.error("listenForProcessAndSet",i),this.config.finsemble.apps=this.config.finsemble.apps.filter(e=>e.appId!==t)}})}else if(l)await h(d,async e=>{const{err:t}=await m(()=>this.glue.appManager.inMemory.remove(e));t&&this.logger.error("listenForProcessAndSet",t),this.config.finsemble.apps=this.config.finsemble.apps.filter(t=>t.appId!==e)});else if(this.config.finsemble.apps.some(e=>d.includes(e.appId)))return{err:"processAndSet() contains duplicate app entries but overwrite and replace flags are both false"};console.debug("config - processAndSet: config after removals",this.config),this.config.finsemble=r()(this.config.finsemble,a,{arrayMerge:(e,t,i)=>(null!=e?e:[]).concat(t)}),console.debug("config - processAndSet: config after deepmerge",this.config);const p=await this.processConfig(this.logger,c),{err:u}=await this.finalProcessingPass({appIds:d});return this.logger.debug("config - processAndSet: apps after final processing pass (see devtools for more debugging)",this.config.finsemble.apps.map(e=>e.appId)),console.debug("config - processAndSet: config after final processing pass",this.config),this.logger.debug("config - FSBL.Clients.AppsClient.processAndSet end"),{err:(null!=u?u:p.length)?p.join("\n"):null,data:this.config.finsemble}},this.logger))}async maybeSetScheduledShutdownAndRestart(){const e=await(async e=>{var t,i,n,o,r,a,s,l,d;const p=null!==(t=await e.contexts.get(c))&&void 0!==t?t:{},{data:u}=await m(()=>e.prefs.get("IO.Global.FinsemblePreferences")),h=null!==(i=null==u?void 0:u.data)&&void 0!==i?i:{};return null===(d=null!==(r=null!==(n=null==h?void 0:h["finsemble.scheduledCloseDiscardUnsavedChanges"])&&void 0!==n?n:null===(o=null==p?void 0:p.finsemble)||void 0===o?void 0:o.scheduledCloseDiscardUnsavedChanges)&&void 0!==r?r:null===(l=null===(s=null===(a=null==p?void 0:p.finsemble)||void 0===a?void 0:a.servicesConfig)||void 0===s?void 0:s.workspace)||void 0===l?void 0:l.discardUnsavedChanges)||void 0===d||d})(this.glue);await(async(e,t,i)=>{const n=await(async e=>{var t,i,n,o,r,a;const s=null!==(t=await e.contexts.get(c))&&void 0!==t?t:{},{data:l}=await m(()=>e.prefs.get("IO.Global.FinsemblePreferences")),d=null!==(i=null==l?void 0:l.data)&&void 0!==i?i:{},p=null!==(n=null==d?void 0:d["finsemble.scheduledShutdown"])&&void 0!==n?n:null===(o=null==s?void 0:s.finsemble)||void 0===o?void 0:o.scheduledShutdown,u=null!==(r=null==d?void 0:d["finsemble.scheduledRestart"])&&void 0!==r?r:null===(a=null==s?void 0:s.finsemble)||void 0===a?void 0:a.scheduledRestart;return{shutdown:p?Ie(p):void 0,restart:u?Ie(u):void 0}})(e);if(n.shutdown){const o=n.shutdown;i("scheduledCloseDiscardUnsavedChanges","start",{command:"shutdown",cronTime:o,discardUnsavedLayoutChanges:t});const{err:r}=await v(()=>e.interop.invoke("T42.GD.Execute",{command:"schedule-shutdown",args:{cronTime:o,title:"shutdown",message:"Are you sure you want to shutdown?",timerDuration:60,discardUnsavedLayoutChanges:t}}));r&&i("scheduledCloseDiscardUnsavedChanges","error",r.toString())}if(n.restart){const o=n.restart;i("scheduledCloseDiscardUnsavedChanges","start",{command:"restart",cronTime:o,discardUnsavedLayoutChanges:t});const{err:r}=await v(()=>e.interop.invoke("T42.GD.Execute",{command:"schedule-restart",args:{cronTime:o,title:"restart",message:"Are you sure you want to restart?",timerDuration:60,discardUnsavedLayoutChanges:t}}));r&&i("scheduledCloseDiscardUnsavedChanges","error",r.toString())}})(this.glue,e,(...e)=>this.logger.info(...e))}async start(){this.normalizeSchema();const{err:e}=await this.loadConfigAtBoot(this.logger);this.logger.debug("config - Initial set of apps loaded from Finsemble config"),e&&this.logger.error("config - Error starting config service: ",e.toString()),this.listenForProcessAndSet(),this.listenForAddApp(),this.listenForRemoveApp()}}class Le{constructor(e,t,i){this.glue=e,this.logger=t,this.router=i,this.eventHandlers={}}async triggerEventHandlers({event:e,workspaceName:t},i){var n,o,r;const a=[];if(!this.eventHandlers[e])return{data:a};const s=this.glue.interop.methods();this.eventHandlers[e]=this.eventHandlers[e].filter(e=>s.some(t=>t.name===e));for(const s of this.eventHandlers[e]){this.logger.debug(`workspaces - WorkspaceClient.triggerEventHandlers ${e} ${t}`,`From ${i}`,s);const{data:l}=await m(()=>this.glue.layouts.get(t,"Global")),c=l?M(l):{name:t,version:"1.0.0",type:"workspace",groups:{},windows:[]},{err:d,data:p,invocationResult:u}=await v(()=>this.glue.interop.invoke(s,c));if(d||!p)return this.logger.error("workspaces - WorkspaceClient.triggerEventHandlers error",null==d?void 0:d.toString()),{err:d};this.logger.debug(`workspaces - WorkspaceClient.triggerEventHandlers ${e} ${t}`,`Handled by ${null===(n=null==u?void 0:u.executed_by)||void 0===n?void 0:n.applicationName}`,p);const h=(null==p?void 0:p.newData)?j(t,p.newData,null!==(r=null===(o=null==l?void 0:l.metadata)||void 0===o?void 0:o["iop#position"])&&void 0!==r?r:0):null;h&&this.logger.debug(`workspaces - WorkspaceClient.triggerEventHandlers ${e} ${t} modified layout=`,h),a.push({action:null==p?void 0:p.action,newData:h})}return{data:a}}async workspaceEventRelay(){await this.glue.interop.register("FSBL.Clients.WorkspaceClient.addEventListener",p(({event:e,uuid:t},i)=>{this.logger.debug(`workspaces - WorkspaceClient.addEventListener ${e}`,i.applicationName,t),this.eventHandlers[e]||(this.eventHandlers[e]=[]),this.eventHandlers[e].push(t)},this.logger)),await this.glue.interop.register("FSBL.Clients.WorkspaceClient.removeEventListener",p(({event:e,uuid:t},i)=>{var n;if(this.logger.debug(`workspaces - WorkspaceClient.removeEventListener ${this.eventHandlers[e]}`,i.applicationName,e),(null===(n=this.eventHandlers[e])||void 0===n?void 0:n.length)>0){const i=this.eventHandlers[e].indexOf(t);i>=0&&this.eventHandlers[e].splice(i,1)}0===this.eventHandlers[e].length&&delete this.eventHandlers[e]},this.logger)),await this.glue.interop.register("FSBL.Clients.WorkspaceClient.triggerEventHandlers",p(async(e,t)=>await this.triggerEventHandlers(e,t.applicationName),this.logger))}async broadcastUpdate(e){const t=await this.glue.layouts.getCurrentLayout();if(!t)return;const i=await this.glue.layouts.getAll("Global"),n=await $(i),o={activeWorkspace:M(t),workspaces:n.map(e=>e.name),workspacesConfig:await u(n,async e=>{const t=await this.glue.layouts.get(e.name,"Global");return t?[M(t)]:[]}),reason:e};this.logger.debug("workspaces - Layouts updated (see console for full state)"),console.debug("Layouts updated",o),this.router.publish("Finsemble.WorkspaceService.update",o)}async loadInitialWorkspace(e,t){var i;const{data:n}=await m(()=>this.glue.layouts.getAll("Global"));if(this.logger.debug("workspaces - workspaces - Trying to load initial layout",e),null==n?void 0:n.some(t=>t.name===e))await m(()=>this.glue.layouts.get(e,"Global"));else if(null==n?void 0:n.length)this.logger.debug(`workspaces - Initial layout "${e}" not found. Selecting first available layout: "${n[0].name}".`),e=n[0].name;else{const t={version:"1.0.0",name:"Empty Workspace",type:"workspace",groups:{},windows:[]};this.logger.debug(`workspaces - Initial layout "${e}" not found. Creating "Empty Workspace".`),e=t.name;const i=j(t.name,t,0),{err:n}=await m(()=>this.glue.layouts.import([i],"merge"));n&&this.logger.error('workspaces - Error creating "Empty Workspace" layout',i,n)}const{data:o}=null!==(i=await this.triggerEventHandlers({event:"load-requested",workspaceName:e},"fsbl-service"))&&void 0!==i?i:{data:null};if(o){const e=[];o.forEach(t=>{e.push(t.newData)}),await m(()=>this.glue.layouts.import(e,"merge"))}this.logger.debug(`workspaces - Restoring initial layout ${e}`);const{err:r}=await m(()=>this.glue.layouts.restore({name:e}));await this.triggerEventHandlers({event:"load-complete",workspaceName:e},"fsbl-service"),r?this.logger.error(`workspaces - Error restoring initial layout ${e}`,r):this.logger.debug("workspaces - Restored initial layout",e),await m(()=>this.glue.prefs.setFor("IO.Global.FinsembleLastWorkspace",{name:e}))}async maybeLoadInitialWorkspace(e){var t,i,n,o,r,a,s,l,c;const d=await this.glue.prefs.get("IO.Global.FinsemblePreferences"),p=await this.glue.prefs.get("IO.Global.FinsembleLastWorkspace"),u=null!==(a=null!==(o=null!==(i=null===(t=null==d?void 0:d.data)||void 0===t?void 0:t["finsemble.initialWorkspace"])&&void 0!==i?i:null===(n=null==e?void 0:e.finsemble)||void 0===n?void 0:n.initialWorkspace)&&void 0!==o?o:null===(r=null==p?void 0:p.data)||void 0===r?void 0:r.name)&&void 0!==a?a:null===(c=null===(l=null===(s=null==e?void 0:e.finsemble)||void 0===s?void 0:s.workspaces)||void 0===l?void 0:l[0])||void 0===c?void 0:c.name;this.logger.debug(`workspaces - initialWorkspace "${u}" is being loaded`),await this.loadInitialWorkspace(u,e)}async maybeSetUpDefaultWorkspaces(e){var t,i;const n=null!==(i=null===(t=e.finsemble)||void 0===t?void 0:t.workspaces)&&void 0!==i?i:[],{data:o=[]}=await m(()=>this.glue.layouts.getAll("Global"));await h(n,async e=>{if(!o.find(t=>t.name===e.name)){this.logger.debug(`workspaces - Adding layout ${e.name} from workspaces.json`);const t=j(e.name,e,0),{err:i}=await m(()=>this.glue.layouts.import([t],"merge"));i&&this.logger.error(`workspaces - Error creating ${e.name} layout`,t,i)}})}async loadWorkspacesPostSSO(e){await m(()=>this.glue.layouts.clearDefaultGlobal()),await this.maybeSetUpDefaultWorkspaces(e),await this.maybeLoadInitialWorkspace(e),this.broadcastUpdate("Finsemble.Workspace.GetActiveWorkspace")}async start(){await this.workspaceEventRelay(),await new Promise(e=>setTimeout(e,5)),this.glue.layouts.onAdded(()=>{this.broadcastUpdate("Finsemble.Workspace.NewWorkspace")}),this.glue.layouts.onChanged(()=>{this.broadcastUpdate("Finsemble.Workspace.Save")}),this.glue.layouts.onRemoved(()=>{this.broadcastUpdate("Finsemble.Workspace.Remove")}),this.glue.layouts.onRenamed(()=>{this.broadcastUpdate("Finsemble.Workspace.Rename")}),this.glue.layouts.onRestored(()=>{this.broadcastUpdate("Finsemble.Workspace.SwitchTo")})}}class We{constructor(e,t,i){this.glue=e,this.logger=t,this.router=i,this.heartbeats={}}async getMonitorInfo(e,t){let i=null;if(e.windowId){const t=this.glue.windows.findById(e.windowId),n=await(null==t?void 0:t.getDisplay());i=n?E(n):null}else i=(await this.glue.displays.all()).map(e=>E(e));return{data:i}}onWindowAdded(e){e.onClose(()=>{this.logger.debug("window-service - Window closed",{uuid:"uuid",name:e.id}),this.router.transmit("LauncherService.WindowClosed",{uuid:"uuid",name:e.id})})}async startHeartbeatMonitor(e){var t,i,n,o;const a=r()({min:5e3,max:18e5,crashed:9e4,possiblyCrashed:6e4,notResponding:6e4},null!==(o=null===(n=null===(i=null===(t=null==e?void 0:e.finsemble)||void 0===t?void 0:t.servicesConfig)||void 0===i?void 0:i.window)||void 0===n?void 0:n.heartbeatResponseTimeout)&&void 0!==o?o:{});await this.glue.windows.onWindowRemoved(e=>{const t=`${e.name}:${e.id}`;delete this.heartbeats[t]}),await this.glue.interop.register("Finsemble.heartbeat",e=>{var t;const i=null!==(t=this.heartbeats[e.windowName])&&void 0!==t?t:{errorSent:!1,notRespondingSent:!1,warningSent:!1};this.heartbeats[e.windowName]={...i,lastHeartbeat:Date.now()}});const s=e=>Math.min(a.max,Math.max(e,a.min)),l=s(a.crashed),c=s(a.possiblyCrashed),d=s(a.notResponding),p=(e,t)=>this.router.transmit("Finsemble.WindowService.HeartbeatTimeout",{type:t,window:e});setInterval(()=>{const e=Date.now();Object.entries(this.heartbeats).forEach(([t,i])=>{const n=e-i.lastHeartbeat>l&&!i.errorSent,o=e-i.lastHeartbeat>c&&!i.warningSent,r=e-i.lastHeartbeat>d&&!i.notRespondingSent,a=e-i.lastHeartbeat<=d&&(i.errorSent||i.warningSent||i.notRespondingSent);n?setTimeout((e=>()=>{Date.now()-e.lastHeartbeat>l&&!e.errorSent&&(e.errorSent=!0,p(t,"crashed"),this.logger.error("heartbeats - Heartbeat Status: Crashed Window",t))})(i),50):o?(i.warningSent=!0,p(t,"possiblyCrashed"),this.logger.warn("heartbeats - Heartbeat Status: Possibly Crashed Window",t)):r?(i.notRespondingSent=!0,p(t,"notResponding"),this.logger.warn("heartbeats - Heartbeat Status: Unresponsive Window",t)):a&&(this.logger.info("heartbeats - Heartbeat Status: Window has returned to a responsive state",t),p(t,"nowResponding"),i.warningSent=!1,i.errorSent=!1,i.notRespondingSent=!1)})},1e3)}async start({manifest:e}){await new Promise(e=>setTimeout(e,5)),await this.startHeartbeatMonitor(e),await this.router.publish("DockingService.AutoArrangeStatus",{isAutoArranged:{device0:!1}}),await this.glue.windows.onWindowAdded(e=>this.onWindowAdded(e)),await this.glue.interop.register("FSBL.Clients.WindowClient.getMonitorInfo",p(async(e,t)=>this.getMonitorInfo(e,t),this.logger)),this.router.addListener("DockingService.dockWindow",()=>{const e=this.glue.windows.find("Toolbar");e&&e.dock({position:"top",claimScreenArea:!0})})}}class je{getAdapterForTopic(e){var t;return null!==(t=this.adapterMap[e])&&void 0!==t?t:this.defaultAdapter}constructor(e,t){this.glue=e,this.logger=t,this.adapterMap={},this.defaultAdapter=null,this.user="defaultUser",this.uuid="Finsemble",this.pwMap={},this.adapterToTopicStash={}}async clearCache({topic:e}){return new Promise(t=>{const i=this.getAdapterForTopic(e);if(!i){const i=`StorageService: No adapter found for topic "${e}"`;return this.logger.warn(`storage - clearCache(): ${i}`),void t({err:i})}i.clearCache?null==i||i.clearCache({topic:e,key:""},(e,i)=>{t({err:e,data:i})}):t({err:`clearCache() not implemented in storage adapter ${i.baseName}`})})}async get({key:e,topic:t}){return new Promise(i=>{const n=this.getAdapterForTopic(t);if(!n){const e=`StorageService: No adapter found for topic "${t}"`;return this.logger.warn(`storage - get(): ${e}`),void i({err:e})}null==n||n.get({topic:t,key:e},(e,t)=>{i({err:e,data:t})})})}async keys({topic:e,keyPrefix:t}){return new Promise(i=>{const n=this.getAdapterForTopic(e);if(!n){const t=`StorageService: No adapter found for topic "${e}"`;return this.logger.warn(`storage - keys(): ${t}`),void i({err:t})}const o={topic:e,key:""};t&&(o.keyPrefix=t),n.keys?null==n||n.keys(o,(e,t)=>{i({err:e,data:t})}):i({err:`keys() not implemented in storage adapter ${n.baseName}`})})}async remove({key:e,topic:t}){return new Promise(i=>{const n=this.getAdapterForTopic(t);if(!n){const e=`StorageService: No adapter found for topic "${t}"`;return this.logger.warn(`storage - remove(): ${e}`),void i({err:e})}null==n||n.delete({topic:t,key:e},(e,t)=>{i({err:e,data:t})})})}async save({key:e,topic:t,value:i}){return new Promise(n=>{const o=this.getAdapterForTopic(t);if(!o){const e=`StorageService: No adapter found for topic "${t}"`;return this.logger.warn(`storage - save(): ${e}`),void n({err:e})}null==o||o.save({topic:t,key:e,value:i},(e,t)=>{n({err:e,data:t})})})}async setUser({user:e}){this.user=e,this.logger.debug("storage - Storage service setUser() called directly (probably because auth completed)");const t=(this.defaultAdapter?[this.defaultAdapter]:[]).concat(Object.values(this.adapterMap));return await h(t,async t=>{await t.setUser(e)}),this.logger.debug("storage - Storage service setUser() finished"),{err:null}}adapterIsLoaded(e,t){var i;this.logger.info(`storage - Storage service adapter ${e} asynchronously loaded successfully`);const n=this.adapterToTopicStash[e];null==n||n.forEach(e=>{"*"===e?this.defaultAdapter=t:this.adapterMap[e]=t}),null===(i=this.pwMap[e])||void 0===i||i.resolve(),this.pwMap[e]=!0}async loadAdapter(t,n){return new Promise(o=>{if(this.logger.debug(`storage - Storage service loading adapter ${n}`),globalThis.window){const i=document.createElement("script");i.onload=async()=>{if(this.logger.debug(`storage - Storage service adapter ${n} script tag loaded successfully, waiting for adapter to call "adapterReceiver.loaded()"`),this.pwMap[t])this.logger.info(`storage - Storage service adapter ${t} synchronously loaded successfully`);else{const i=new e;i.setTimeout(15e3,`Storage adapter ${t} did not call adapterReceiver.loaded() within 15 seconds`),this.pwMap[t]=i,await i.promise}o()},i.type="text/javascript",i.src=n,document.body.append(i)}else{try{i(89)(n)}catch(e){this.logger.error(e)}o()}})}async loadAdaptersFromConfig(e){var t,i,n;const o=null===(i=null===(t=e.finsemble)||void 0===t?void 0:t.servicesConfig)||void 0===i?void 0:i.storage;if(!o){const e="storage - No servicesConfig.storage entry found in config";return this.logger.warn(e),e}const{defaultStorage:r="IndexedDBAdapter",topicToDataStoreAdapters:a={},dataStoreAdapters:s={}}=o,l={...a,"*":r};this.logger.debug("storage - Storage service initializing",l),this.adapterToTopicStash=(e=>{const t=t=>Object.keys(e).filter(i=>e[i]===t),i=Object.values(e).filter(R);return Object.fromEntries(i.map(e=>[e,t(e)]))})(l),await h(Object.entries(s),([e,t])=>this.loadAdapter(e,t));const c=Object.values(this.adapterMap).concat(null!==(n=this.defaultAdapter)&&void 0!==n?n:[]).filter(R);return await h(c,async e=>{await e.setBaseName(this.uuid),await e.setUser(this.user)}),null}async start({uuid:e,manifest:t}){globalThis.adapterReceiver={loaded:(e,t)=>{this.adapterIsLoaded(e,t)}},this.uuid=e,await this.loadAdaptersFromConfig(t),await this.glue.interop.register("FSBL.Clients.StorageClient.get",p(async e=>this.get(e),this.logger)),await this.glue.interop.register("FSBL.Clients.StorageClient.remove",p(async e=>this.remove(e),this.logger)),await this.glue.interop.register("FSBL.Clients.StorageClient.save",p(async e=>this.save(e),this.logger)),await this.glue.interop.register("FSBL.Clients.StorageClient.clearCache",p(async e=>this.clearCache(e),this.logger)),await this.glue.interop.register("FSBL.Clients.StorageClient.keys",p(async e=>this.keys(e),this.logger)),await this.glue.interop.register("FSBL.Clients.StorageClient.setUser",p(async e=>this.setUser(e),this.logger))}}const Oe=()=>{let e=(new Date).getTime().toString(36);return e+=Math.floor(Math.random()*Math.pow(36,2)).toString(36),e.toUpperCase()};class De{constructor(e){this.moduleRoot=e,this.csfrTokens={}}setSearchParams(e,t,i){const{searchParams:n}=e;return n.set("client_id",i.client_id),n.set("response_type",i.backchannel_endpoint?"code":"token"),n.set("redirect_uri",i.redirect_uri),n.set("state",t),i.nonce&&n.set("nonce",Oe()),i.scope&&n.set("scope",i.scope),n.toString()}validateConfiguration(e){return e.authorization_endpoint?e.client_id?e.pkce&&!e.backchannel_endpoint?"backchannel_endpoint must be configured when using PKCE. Set it to the endpoint for your provider's token url":null:"Missing required field client_id":"Missing required field authorization_endpoint"}async getWindowCreateOptionsFromConfig(e,t){var i;if(!t)return{};try{const n=await e.appManager.application(t);return null!==(i=null==n?void 0:n.windowSettings)&&void 0!==i?i:{}}catch(e){return{}}}async authenticate(e,t,i,o,r,s,l,c){var d,p;const u=this.validateConfiguration(o);if(u)return c.error(`authentication - OAuth.authenticate() error ${u}`,o),void s(u);const h=window.btoa(n()()),f=await(async e=>{const t=(new TextEncoder).encode(e),i=await crypto.subtle.digest("SHA-256",t),n=new Uint8Array(i),o=String.fromCharCode(...n);return window.btoa(o).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")})(h),g={...o,code_challenge:f,code_challenge_method:"S256",grant_type:null!==(d=o.grant_type)&&void 0!==d?d:"authorization_code",redirect_uri:null!==(p=o.redirect_uri)&&void 0!==p?p:`${this.moduleRoot}/ui-components/oauthResponse/index.html`},v=Oe();this.csfrTokens[v]={config:g,cb:s,handler:l,profileName:t,codeVerifier:h};try{const t=new URL(g.authorization_endpoint);t.search=this.setSearchParams(t,v,g);const o={autoSnap:!1,isSticky:!1,placement:{snapped:!1,verticalAlignment:"center",horizontalAlignment:"center",height:600,width:480}},l=await this.getWindowCreateOptionsFromConfig(e,g.component),d=await F(e,r,{}),p={url:t.toString(),mode:"flat",channelSelector:{enabled:!1},context:{OAuthState:v,authorizationUrl:t.toString()},preloadScripts:i},u=(0,a.merge)(o,l,d,p);c.debug("authentication - Oauth.authenticate() windowCreateOptions",u);const{err:h,data:f}=await m(()=>e.windows.open(n()(),t.toString(),u));if(h||!f)return c.error("authentication - Oauth.authenticate() Failed to spawn pop up",h),void s(h);c.info("authentication - Authentication pop-up window spawned")}catch(e){const t=`authentication - OAUTH2 failed: ${e.message}`;c.error(t),s(t)}}async responseFromAuthorizationEndpoint(e,t,i){i.debug("authentication - OAuth.responseFromAuthorizationEndpoint() received from completeOAuth() call =",t);const{state:n,code:o}=t,r=this.csfrTokens[n];i.debug("authentication - OAuth.responseFromAuthorizationEndpoint() transaction =",r,"state=",n);const a=((t,i)=>{var n;return null!==(n=null!=e?e:t?null:"No state returned from endpoint")&&void 0!==n?n:i?null:`Cannot find OAUTH state ${t}`})(n,r);if(a){if(r){const{cb:e}=r;e(a),delete this.csfrTokens[n]}return{err:a}}const{config:s,cb:l}=r,{err:c,data:d}=s.backchannel_endpoint?await this.retrieveAccessToken(n,o,i):{err:null,data:t};return c?delete this.csfrTokens[n]:(this.csfrTokens[n].credentials=d,this.setupTokenExpirationOrRefresh(d,i)),null==l||l(c,{data:d}),{err:c,data:d}}async retrieveAccessToken(e,t,i){const n=this.csfrTokens[e],{config:o,profileName:r,codeVerifier:a}=n;if(!o.backchannel_endpoint)return{err:"No backchannel_endpoint available"};const{client_id:s,redirect_uri:l,grant_type:c,scope:d}=o,p={client_id:s,code:t,redirect_uri:l,state:e};c&&(p.grant_type=c),d&&(p.scope=d),a&&(p.code_verifier=a),o.client_secret&&(p.client_secret=o.client_secret);const u=new URLSearchParams(p).toString();i.debug("authentication - OAuth.retrieveAccessToken() fetching token",o.backchannel_endpoint,u,e,r);const{err:h,data:f}=await this.fetchAccessToken(o.backchannel_endpoint,u,r,i);if(o.userProfile_endpoint&&(null==f?void 0:f.access_token)){const{err:e,data:t}=await this.fetchUserData(o.userProfile_endpoint,null==f?void 0:f.access_token,i);return{err:e,data:{...f,...t}}}return{err:h,data:f}}async fetchAccessToken(e,t,i,n){try{const o=await fetch(e,{mode:"cors",method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:t}),r=await o.json();if(void 0!==r.error){const e=r.error+(r.error_description?" - "+r.error_description:"");return n.warn("authentication - OAuth.fetchAccessToken()",e),{err:e}}const s=r.id_token?(e=>{const t=e.split(".")[1].replace("-","+").replace("_","/");return JSON.parse(window.atob(t))})(r.id_token):{},l=(0,a.merge)({name:i,profileName:i},r,s);return n.debug("authentication - OAuth.fetchAccessToken() successful token fetch",l),{err:null,data:l}}catch(e){return n.warn("authentication - OAuth.fetchAccessToken()",e.message),{err:e.message}}}async fetchUserData(e,t,i){try{const n=await fetch(e,{method:"GET",headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/json"}}),o=await n.json();return i.debug("authentication - OAuth.fetchUserData() successful user data fetch",o),{err:null,data:o}}catch(e){return i.warn("authentication - OAuth.fetchUserId()",e.message),{err:e.message}}}async refreshToken(e,t){var i,n;const{state:o,code:r}=e,a=this.csfrTokens[o],{config:s}=a,l=null!==(i=s.refreshRetries)&&void 0!==i?i:3,c=null!==(n=s.refreshRetryDelaySeconds)&&void 0!==n?n:60;for(let e=0;e<l;e++){const{err:i,data:n}=await this.retrieveAccessToken(o,r,t);if(!i)return{err:null,data:n};t.info(`authentication - Retrying Access token refresh (retry ${e} of ${l}) in ${c} seconds`),await new Promise(e=>setTimeout(e,1e3*c))}return{err:"Access token refresh retries exhausted. The access token was NOT refreshed."}}setupTokenExpirationOrRefresh(e,t){var i;const{state:n}=e,o=this.csfrTokens[n],{config:r,handler:a,credentials:s}=o,l=(e,t)=>{e&&delete this.csfrTokens[n],a(e,{data:t})};if(!s||!s.expires_in){const e=`authentication - Access token for ${o.profileName} does not contain expires_in. Expiring immediately.`;return t.warn(e),delete this.csfrTokens[n],void a(null,{data:s,remove:!0})}const c=null!==(i=r.refreshPreemptExpirySeconds)&&void 0!==i?i:300,d=s.refresh_token&&(r.refreshAccessToken||null==r.refreshAccessToken),p=s.expires_in-d?c:0;t.info(`authentication - Access token expires in ${s.expires_in} seconds, setting up automated refresh in ${p} seconds`),setTimeout(async()=>{if(d){const{err:i,data:o}=await this.refreshToken(e,t);this.csfrTokens[n].credentials={...this.csfrTokens[n].credentials,...o},this.setupTokenExpirationOrRefresh(e,t),l(i,o)}else l(`Token expired for ${o.profileName}`)},1e3*p)}}class Me{constructor(e,t,i,n){this.glue=e,this.logger=t,this.configService=i,this.activeProfiles={},this.oauth=new De(n)}async beginAuthentication({preloadScripts:e,profile:t,spawnParams:i,handlerName:n}){return new Promise(o=>{var r,a;const s=this.configService.config.authentication,l=t&&s?{...s[t],name:t}:{},c=this.activeProfiles[t];if(null==c?void 0:c.credentials)return this.logger.debug(`authentication - beginAuthentication(): Authentication operation for ${t} returned credentials without a new transaction`),c.handlerNames.push(n),v(()=>this.glue.interop.invoke(n,{err:null,data:c.credentials})),void o({err:null,data:c.credentials});const d=!!c&&c.inFlightCallbacks.length>0;this.activeProfiles[t]={inFlightCallbacks:(null!==(r=null==c?void 0:c.inFlightCallbacks)&&void 0!==r?r:[]).concat(o),handlerNames:(null!==(a=null==c?void 0:c.handlerNames)&&void 0!==a?a:[]).concat(n)};const p=(e,i)=>{const{data:n,remove:o}=null!=i?i:{data:null,remove:!1},r=this.activeProfiles[t];r&&(r.handlerNames.forEach(t=>{v(()=>this.glue.interop.invoke(t,{err:e,data:n}))}),e||o?(this.logger.info(`authentication - Removing active profile ${t}`,e),delete this.activeProfiles[t]):(this.logger.debug(`authentication - Saving credentials to active profile ${t}`),r.credentials=n))};d?this.logger.debug(`authentication - beginAuthentication(): In flight operation for ${t} at ${Date.now()}`):(this.logger.debug(`authentication - beginAuthentication(): Authentication operation for ${t} started at ${Date.now()}`),this.oauth.authenticate(this.glue,t,e,l,i,(e,i)=>{const{data:n}=null!=i?i:{data:null},o=this.activeProfiles[t];o&&(o.inFlightCallbacks.forEach(t=>t({err:e,data:n})),o.inFlightCallbacks=[]),p(e,i)},p,this.logger))})}async completeOAUTH({err:e,data:t}){return this.oauth.responseFromAuthorizationEndpoint(e,t,this.logger)}async publishAuthorization(e){this.logger.debug("authentication - Received publishAuthorization credentials. Relaying to sso-application.");const{err:t}=await v(()=>this.glue.interop.invoke("Finsemble.Clients.AuthenticationClient.publishAuthorization.backChannel",e));t&&this.logger.error("Error invoking publishAuthentication",t)}async start(e){const t=[e];await this.glue.interop.register("FSBL.Clients.AuthenticationClient.beginAuthentication",p(async e=>this.beginAuthentication({preloadScripts:t,...e}),this.logger)),await this.glue.interop.register("FSBL.Clients.AuthenticationClient.completeOAUTH",p(async e=>this.completeOAUTH(e),this.logger)),await this.glue.interop.register("FSBL.Clients.AuthenticationClient.publishAuthorization",p(async e=>this.publishAuthorization(e),this.logger))}}class $e{constructor(e,t){this.glue=e,this.logger=t,this.storesInitialized={}}async start(){this.glue.interop.register("FSBL.Clients.DistributedStoreClient.init",p(async e=>{const{store:t,value:i}=e;if(this.storesInitialized[t])return;this.storesInitialized[t]=!0;const{err:n}=await m(()=>this.glue.contexts.update(t,i));n&&this.logger.error("distribute-store-service - failed to update context",t,n)},this.logger))}}class Ee{constructor(t,i,n){this.glue=t,this.logger=i,this.router=n,this.notifications=[],this.lastIssuedAt={},this.currentLastIssued=0,this.ready=new e}async updateLastIssued(e,t){var i;let n=!1;const o=new Date(1e3*t).getTime();e&&o>(null!==(i=this.lastIssuedAt[e])&&void 0!==i?i:0)&&(n=!0,this.lastIssuedAt[e]=o),o>this.currentLastIssued&&(n=!0,this.currentLastIssued=o),n&&await this.glue.prefs.setFor("IO.Global.NotificationsLastIssued",{currentLastIssued:o,lastIssuedAt:this.lastIssuedAt})}async startPersistence(){var e,t;this.logger.debug("notifications - loading persisted notifications (see console for more data)");const i=await this.glue.prefs.get("IO.Global.PersistedNotifications");if(this.notifications=null!==(t=null===(e=null==i?void 0:i.data)||void 0===e?void 0:e.notifications)&&void 0!==t?t:[],console.debug("notifications - loading persisted notifications (will filter out any with state 'Closed')",this.notifications),this.notifications=this.notifications.filter(e=>"Closed"!==e.state),this.notifications.length)try{await this.glue.notifications.import(this.notifications.map(e=>({...e})))}catch(e){console.warn("notifications - failed to load persisted notifications",e,this.notifications)}await this.glue.notifications.onRaised(async e=>{var t,i,n;if(this.notifications.some(t=>t.id===e.id))return;if(this.logger.debug("notifications - received onRaised",e),null===(t=e.data)||void 0===t?void 0:t.issuedAt){const t=new Date(null===(i=e.data)||void 0===i?void 0:i.issuedAt);e.timestamp=Math.round(t.getTime()/1e3)}e.timestamp&&this.updateLastIssued(null!==(n=e.source)&&void 0!==n?n:e.appTitle,e.timestamp),this.notifications.push(e);const o=new Date;for(this.notifications=this.notifications.flatMap(e=>{const t=e.timestamp?new Date(1e3*e.timestamp):new Date;return o.getTime()-t.getTime()>6048e5?[]:[e]});this.notifications.length>1e3;)this.notifications.shift();await this.glue.prefs.setFor("IO.Global.PersistedNotifications",{notifications:this.notifications}),this.logger.debug("notifications - notifications persisted onRaised (see console for more data)"),console.debug("notifications - notifications persisted onRaised",this.notifications)}),await this.glue.notifications.onClosed(async e=>{this.logger.debug("notifications - received onClosed (see console for full state)",e),this.notifications=this.notifications.filter(t=>t.id!==e.id),await this.glue.prefs.setFor("IO.Global.PersistedNotifications",{notifications:this.notifications}),console.debug("notifications - notifications persisted onClosed",this.notifications)}),await this.glue.notifications.onStateChanged(async(e,t)=>{this.logger.debug("notifications - received onStateChanged (see console for full state)",e,t),"Closed"!==t&&(this.notifications.forEach(i=>{i.id===e.id&&(i.state=t)}),await this.glue.prefs.setFor("IO.Global.PersistedNotifications",{notifications:this.notifications}),console.debug("notifications - notifications persisted onStateChanged",this.notifications))})}async getLastIssuedAt(e){var t;return(null==e?void 0:e.source)?{lastIssuedAt:new Date(null!==(t=this.lastIssuedAt[e.source])&&void 0!==t?t:0).toISOString()}:{lastIssuedAt:new Date(this.currentLastIssued).toISOString()}}async performAction(e){this.logger.debug("notifications - NotificationService.performAction",e);const{id:t,milliseconds:i,channel:n,payload:o,component:r,spawnParams:a}=e;switch(e.type){case"TRANSMIT":this.router.transmit(n,o);break;case"PUBLISH":this.router.publish(n,o);break;case"QUERY":this.router.query(n,o);break;case"SPAWN":const e=this.glue.appManager.application(r),s=await F(this.glue,a,{});try{await(null==e?void 0:e.start(void 0,s))}catch(e){this.logger.error(e)}break;case"SNOOZE":await this.glue.notifications.snooze(t,null!=i?i:3e4);break;case"DISMISS":await this.glue.notifications.clear(t)}}async registerHandlers(){this.logger.debug("notifications - FSBL.NotificationClient registering handlers"),this.glue.interop.methods({name:"HandleNotificationActionTypeSPAWN"}).length>0&&this.logger.error("notifications - Error: Went to register glue handlers for the NotificationService, but they've already been registered."),await this.glue.interop.register("FSBL.Clients.NotificationClient.performAction",p(e=>this.performAction(e),this.logger)),await this.glue.interop.register("FSBL.Clients.NotificationClient.getLastIssuedAt",p(e=>this.getLastIssuedAt(e),this.logger)),await this.router.subscribe("notification-ui",(e,t)=>{var i;const{showCenter:n}=null!==(i=t.data)&&void 0!==i?i:{};n?this.glue.notifications.panel.show():this.glue.notifications.panel.hide()}),this.logger.debug("notifications - FSBL.NotificationClient finished initializing"),this.ready.resolve()}async initialize(){var e;const t=await this.glue.prefs.get("IO.Global.NotificationsLastIssued");(null==t?void 0:t.data)&&(this.currentLastIssued=null!==(e=t.data.currentLastIssued)&&void 0!==e?e:0,this.lastIssuedAt=t.data.lastIssuedAt),await this.startPersistence()}async start(){await this.router.onReady(),await this.registerHandlers()}}class Ue{constructor(e,t){this.glue=e,this.logger=t,this.hotKeyToWindowMap={}}async maybeRemove(e,t){const i=this.hotKeyToWindowMap[e];if(!i)return;this.logger.debug("hotkeys - Removing global hotkey",e,t.applicationName,t.instance);const n=i.filter(e=>e.windowId!==t.windowId);n.length?this.hotKeyToWindowMap[e]=n:(await this.glue.hotkeys.unregister(e),delete this.hotKeyToWindowMap[e])}async addGlobalHotkey(e,t){const i=ie(e.keyArr),n=this.hotKeyToWindowMap[i];n?n.push(t):(this.hotKeyToWindowMap[i]=[t],this.logger.debug("hotkeys - Adding global hotkey",i,t.applicationName,t.instance),await this.glue.hotkeys.register(i,async()=>{var t;const n=null!==(t=this.hotKeyToWindowMap[i])&&void 0!==t?t:[];await h(n,async t=>{const{err:n}=await m(()=>this.glue.interop.invoke("FSBL.Clients.HotkeyClient.Triggered",{keyArr:e.keyArr},t));n&&await this.maybeRemove(i,t)})}))}async removeAllHotkeysForWindow(e,t){this.logger.debug("hotkeys - Removing all hotkeys for window",t.applicationName,t.instance),await h(Object.entries(this.hotKeyToWindowMap),async([e,i])=>{i.map(e=>e.windowId).includes(t.windowId)&&await this.maybeRemove(e,t)})}async removeGlobalHotkey(e,t){const i=ie(e.keyArr);await this.maybeRemove(i,t)}async maybeAddFinsembleSpecificHotkeys(e){var t,i,n;const o=null===(n=null===(i=null===(t=e.finsemble)||void 0===t?void 0:t.servicesConfig)||void 0===i?void 0:i.logger)||void 0===n?void 0:n.hotkeyShowCentralLogger;if(o){const e=ie(o);this.logger.debug("hotkeys - HotkeyService adding hotkey hotkeyShowCentralLogger",e),await this.glue.hotkeys.register(e,async()=>{const e=this.glue.windows.find("central-logger");e&&(e.show(),e.focus())})}}async start(e){await this.glue.interop.register("FSBL.Clients.HotkeyClient.addGlobalHotkey",p(async(e,t)=>this.addGlobalHotkey(e,t),this.logger)),await this.glue.interop.register("FSBL.Clients.HotkeyClient.removeAllHotkeysForWindow",p(async(e,t)=>this.removeAllHotkeysForWindow(e,t),this.logger)),await this.glue.interop.register("FSBL.Clients.HotkeyClient.removeGlobalHotkey",p(async(e,t)=>this.removeGlobalHotkey(e,t),this.logger)),await this.maybeAddFinsembleSpecificHotkeys(e)}}class ze{constructor(t,i,n){this.glue=t,this.logger=i,this.router=n,this.ready=new e}async maybeSetLogToDisk(e){var t,i;const n=null===(i=null===(t=null==e?void 0:e["finsemble-electron-adapter"])||void 0===t?void 0:t.logger)||void 0===i?void 0:i.logToDiskLevels;if(Array.isArray(n)){this.logger.debug("Setting central-logger logToDiskLevels",n);const{err:e}=await v(()=>this.glue.interop.invoke("central-logger-set-logToDisk",{logToDiskLevels:n}));e&&this.logger.error("Error setting logToDiskLevels",e)}}async start(){await this.router.onReady(),await this.register_handlers()}maybeStartRecipe(e){var t;(null===(t=null==e?void 0:e.iocd)||void 0===t?void 0:t.enableLegacyLoggerRecipe)&&this.glue.interop.register("finsemble-appender-log-message",async e=>{var t;null===(t=this.router)||void 0===t||t.transmit("logger.service.logMessages",[{category:"system",logClientName:"iocd",logType:e.level,logData:e.message,logTimestamp:new Date}])})}async register_handlers(){this.router.addListener("CentralConsole-Show",async(e,{data:t})=>{var i;if(t){const e=this.glue.windows.list().find(e=>"central-logger"===e.name);e?(await e.show(),await e.focus()):null===(i=this.glue.appManager.application("central-logger"))||void 0===i||i.start()}}),this.ready.resolve()}}class Ne{constructor(e,t){this.glue=e,this.logger=t}getLayouts(e){var t;const i=this.glue.layouts.list().filter(e=>"Global"===e.type);return(null!==(t=null==i?void 0:i.map(e=>e.name.toLowerCase()))&&void 0!==t?t:[]).filter(t=>t.includes(e))}async registerWorkspaceProvider(){B(this.glue,{name:"Installed Workspaces",searchCallback:({text:e},t)=>{var i,n;null===(i=this.logger.loggerClient)||void 0===i||i.debug("SearchService - Workspace provider - search request",e);const o=this.getLayouts(e.toLowerCase()).map(e=>({name:e,displayName:e,type:"Workspace",score:1,description:e,actions:[{name:"Switch"}],tags:[]}));null===(n=this.logger.loggerClient)||void 0===n||n.debug("SearchService - Workspace provider - search result",o),t(null,o)},itemActionCallback:e=>{var t;null===(t=this.logger.loggerClient)||void 0===t||t.debug("SearchService - Workspace provider - invoke item action",e),e.action&&e.item&&(async(e,t)=>{const{data:i}=await m(()=>e.layouts.getCurrentLayout());(null==i?void 0:i.name)&&await H(e,"close-requested",i.name);const{data:n}=await H(e,"load-requested",t);if(null==n?void 0:n.some(e=>"cancel"===(null==e?void 0:e.action)))return{err:null};let o=null;if(null==n?void 0:n.length){const t=[];n.forEach(e=>{e.newData&&t.push(e.newData)});const{err:i}=await m(()=>e.layouts.import(t,"merge"));i&&(o=i)}const{data:r=[]}=await m(()=>e.channels.all());await h(r,async t=>m(()=>e.channels.clearChannelData(t)));const{err:a}=await m(()=>e.layouts.restore({name:t}));if(a)(null==i?void 0:i.name)&&H(e,"close-failed",i.name),H(e,"load-failed",t);else{(null==i?void 0:i.name)&&H(e,"close-complete",i.name),H(e,"load-complete",t);const{data:n}=await m(()=>e.layouts.getCurrentLayout());await m(()=>e.layouts.save({name:t,type:"Global",metadata:null==n?void 0:n.metadata})),await m(()=>e.prefs.setFor("IO.Global.FinsembleLastWorkspace",{name:t}))}v(()=>e.interop.invoke("FSBL.Clients.WorkspaceClient.switchTo",{}))})(this.glue,e.item.name)}})}async registerLauncherProvider(){B(this.glue,{name:"Installed Components",searchCallback:({text:e},t)=>{var i,n;null===(i=this.logger.loggerClient)||void 0===i||i.debug("SearchService - Launcher provider - search request",e);const o=this.glue.appManager.applications();if(!o)return void t(null,[]);const r=e.toLowerCase(),a=o.filter(e=>{var t,i;return!e.hidden&&((null===(t=e.title)||void 0===t?void 0:t.toLowerCase().includes(r))||(null===(i=e.name)||void 0===i?void 0:i.toLowerCase().includes(r)))}).map(e=>{var t;const i=e.icon&&""!==e.icon?{imageType:"url",path:e.icon}:void 0;return{name:e.name,displayName:null!==(t=e.title)&&void 0!==t?t:e.name,score:1,icon:i,type:"Application",description:e.name,actions:[{name:"Spawn"}],tags:[]}});null===(n=this.logger.loggerClient)||void 0===n||n.debug("SearchService - Launcher provider - search result",a),t(null,a)},itemActionCallback:(e,t)=>{var i;null===(i=this.logger.loggerClient)||void 0===i||i.debug("SearchService - Launcher provider - invoke item action",e,t),e.action&&e.item&&q(this.glue,e.item.name,{addToWorkspace:!0,monitor:"mine",relativeWindow:{windowName:null!=t?t:""}})}})}async start(e){var t,i,n,o,r,a,s,l,c,d;(null!==(o=null===(n=null===(i=null===(t=null==e?void 0:e.finsemble)||void 0===t?void 0:t.servicesConfig)||void 0===i?void 0:i.workspace)||void 0===n?void 0:n.search)&&void 0!==o?o:{}).enabled&&(null===(r=this.logger.loggerClient)||void 0===r||r.log("SearchService - register workspace provider"),this.registerWorkspaceProvider()),!1!==(null===(c=(null!==(l=null===(s=null===(a=null==e?void 0:e.finsemble)||void 0===a?void 0:a.servicesConfig)||void 0===s?void 0:s.launcher)&&void 0!==l?l:{}).search)||void 0===c?void 0:c.enabled)&&(null===(d=this.logger.loggerClient)||void 0===d||d.log("SearchService - register app launcher provider"),this.registerLauncherProvider())}}class Be{constructor(e,t){this.glue=e,this.logger=t,this.listeners=new Set,this.mostRecentEvent={command:"",config:{}}}async processProtocolHandlerEvent(e,t){return this.logger.debug("protocol-handler - Received protocol handler event",e,"distributing to",this.listeners),this.mostRecentEvent=e,await h(Array.from(this.listeners),async t=>{const{err:i}=await v(()=>this.glue.interop.invoke(t,e));i&&this.logger.error("Error invoking protocol handler function",i)}),{handled:!0}}async getProtocolString(e,t){return this.mostRecentEvent}async registerProtocolHandlerTriggered(e,t){this.logger.debug("protocol-handler - Registering protocol-handler-triggered listener",null==e?void 0:e.invoker),this.listeners.add(e.invoker)}async unregisterProtocolHandlerTriggered(e,t){this.listeners.delete(e.invoker)}async start(){await this.glue.interop.register("FSBL.iocd-protocol-event",p(async(e,t)=>this.processProtocolHandlerEvent(e,t),this.logger)),await this.glue.interop.register("FSBL.System.getProtocolString",p(async(e,t)=>this.getProtocolString(e,t),this.logger)),await this.glue.interop.register("FSBL.Event.add.protocol-handler-triggered",p(async(e,t)=>this.registerProtocolHandlerTriggered(e,t),this.logger)),await this.glue.interop.register("FSBL.Event.remove.protocol-handler-triggered",p(async(e,t)=>this.unregisterProtocolHandlerTriggered(e,t),this.logger))}}const He=(e,t,{api:i,method:n,type:o,data:r})=>{if("start"===o&&(null==t||t.metrics.featureMetric("finsemble-polyfill",i,n)),"deprecated"===o)return null==t||t.metrics.featureMetric("finsemble-polyfill-deprecated",i,n),void e.error("DEPRECATED FUNCTION CALLED",`${i}.${n}()`,o,r);e[o]?e[o](`${i}.${n}()`,r):e.debug(`${i}.${n}()`,o,r)};class qe{constructor(e,t,i){this.gluePromise=e,this.asyncConstructors=t,this.loggerClient=i;const n=this.asyncConstructors.addConstructor();e.then(e=>{this.glue=e,this.asyncConstructors.finishConstructor(n)})}logStatus(e,t,i){He(this.loggerClient,this.glue,{api:"StorageClient",method:e,type:t,data:i})}async clearCache(e,t){this.logStatus("clearCache","start",t),await this.asyncConstructors.ready();const{err:i}=await v(()=>this.glue.interop.invoke("FSBL.Clients.StorageClient.clearCache",{...t}),e);return i&&this.logStatus("remove","error",i),this.logStatus("clearCache","return"),{err:i}}async remove(e,t){this.logStatus("remove","start",e),await this.asyncConstructors.ready();const{err:i}=await v(()=>this.glue.interop.invoke("FSBL.Clients.StorageClient.remove",e),t);return i&&this.logStatus("remove","error",i),this.logStatus("remove","return"),{err:i}}async keys(e,t){this.logStatus("keys","start",e),await this.asyncConstructors.ready();const{err:i,data:n}=await v(()=>this.glue.interop.invoke("FSBL.Clients.StorageClient.keys",e),t);return i&&this.logStatus("keys","error",i),this.logStatus("keys","return",n),{err:i,data:n}}async getStandardized(e,t){this.logStatus("getStandardized","start",e),await this.asyncConstructors.ready();const{err:i,data:n}=await v(()=>this.glue.interop.invoke("FSBL.Clients.StorageClient.get",e),t);return i&&this.logStatus("getStandardized","error",i),this.logStatus("getStandardized","return",n),{err:i,data:n}}async getMultiple(e,t){return this.logStatus("getMultiple","deprecated","Not Implemented"),{err:"get multiple is not implemented"}}async save(e,t){this.logStatus("save","start",e),await this.asyncConstructors.ready();const{err:i}=await v(()=>{var t;return this.glue.interop.invoke("FSBL.Clients.StorageClient.save",{key:null!==(t=e.key)&&void 0!==t?t:e.field,value:e.value,topic:e.topic})},t);return i&&this.logStatus("save","error",i),this.logStatus("save","return"),{err:i}}async setUser(e,t){this.logStatus("setUser","start",e),await this.asyncConstructors.ready();const{err:i}=await v(()=>this.glue.interop.invoke("FSBL.Clients.StorageClient.setUser",e),t);return i&&this.logStatus("setUser","error",i),this.logStatus("setUser","return"),{err:i}}async get(e,t){this.logStatus("get","start",e);const i=await this.getStandardized(e,t);return this.logStatus("get","return",i),i.data}}function Ge(...e){let t="";for(let i=0;i<e.length;i++)t=`${t} ${e[i]}`;return t.replace(/\s(.)/g,e=>e.toUpperCase()).replace(/\s/g,"").replace(/^(.)/,e=>e.toLowerCase())}class Ve{constructor(e,t,i){this.glue=e,this.manifest=t,this.logger=i,this.storageClient=null}async fillInWindowData(e,t){var i;const n=await u(null!==(i=null==t?void 0:t.windows)&&void 0!==i?i:[],async i=>{const n=Ge(t.name,i),o=Ge(t.name,i,i),{data:r}=await e.getStandardized({key:n,topic:"finsemble.workspace"}),{data:a}=await e.getStandardized({key:o,topic:"finsemble.workspace"});return[{windowName:i,windowData:r,componentStates:a}]});t.componentStates=Object.fromEntries(n.map(e=>[e.windowName,e.componentStates])),t.windowData=n.map(e=>({...e.windowData}))}async migrateWorkspaces(){const e=this.storageClient,{err:t,data:i}=await e.getStandardized({key:"finsemble.allWorkspaces",topic:"finsemble.workspace"});this.logger.debug("data-migration - workspaceNames=",i,t);const n=(null!=i?i:[]).flatMap(e=>e?[Ge(e)]:[]),o=await u(n,async t=>{const{data:i}=await e.getStandardized({key:t,topic:"finsemble.workspace"});return i?[i]:[]});await h(o,async t=>{await this.fillInWindowData(e,t)}),this.logger.debug("data-migration - workspaces from storage adapter",o);const r=await this.glue.layouts.getAll("Global");this.logger.debug("data-migration - removing existing iocd layouts",r.map(e=>e.name));for(let e=0;e<r.length;e++)await m(()=>this.glue.layouts.remove("Global",r[e].name));const a=(await $(r)).reduce((e,t,i)=>(e[t.name]=i,e),{}),s=o.map((e,t)=>{var i;return j(e.name,e,null!==(i=a[e.name])&&void 0!==i?i:t)});this.logger.debug("data-migration - converted layouts",s);const{err:l,data:c}=await m(()=>this.glue.layouts.import(s,"merge"));if(l||!c){const e=`data-migration - Error importing converted layouts ${l}`;this.logger.error(e)}const{data:d}=await e.getStandardized({key:"finsemble.lastUsedWorkspace.name",topic:"finsemble.workspace"});d&&(this.logger.debug("data-migration - setting current workspace from lastUsedWorkspace.name",d),await m(()=>this.glue.prefs.setFor("IO.Global.FinsembleLastWorkspace",{name:d})))}async migratePreferences(){const e=this.storageClient,{data:t}=await e.getStandardized({key:"userPreferences",topic:"finsemble"});this.logger.debug("data-migration - Preferences from Finsemble storage adapter",t);const{err:i}=await m(()=>this.glue.prefs.clearFor("IO.Global.FinsemblePreferences"));if(i&&this.logger.error("data-migration - error clearing preferences IO.Global.FinsemblePreferences",i),t){const{err:e}=await m(()=>this.glue.prefs.updateFor("IO.Global.FinsemblePreferences",t));e&&this.logger.error("data-migration - error saving preferences IO.Global.FinsemblePreferences",e)}else this.logger.debug("data-migration - No user preferences found in Finsemble storage adapter. IO.Global.FinsemblePreferences will be empty.")}async migrateAdvancedAppLauncher(){const e=this.storageClient,{data:t}=await e.getStandardized({key:"distributedStore-Finsemble-AppLauncher-Store",topic:"finsemble"}),i=null==t?void 0:t.values;if(!i)return;this.logger.debug("data-migration - advanced app launcher settings from Finsemble storage adapter",i);const n={activeFolder:i.activeFolder,activeTags:i.activeTags,dragDisabled:["Advanced App Launcher","Favorites"],folders:i.appFolders.folders,foldersList:i.appFolders.list,sortBy:i.sortBy};await this.glue.prefs.clearFor("IO.Global.UserDefinedApps");const o=f(i.appDefinitions,(e,t)=>{var i;return[[e,{name:null!==(i=t.name)&&void 0!==i?i:e,url:t.url}]]});await this.glue.prefs.setFor("IO.Global.UserDefinedApps",o),await this.glue.prefs.setFor("IO.Global.Launcher",n)}async maybeMigrateWorkspaces(e,t){"iocd"===e?this.logger.debug("data-migration - Skipping data migration of workspaces"):"oneTimeConversion"===e?!0!==(null==t?void 0:t.workspaces)?(this.logger.debug(`data-migration - Migrating workspaces ${e}`),await this.migrateWorkspaces(),await this.glue.prefs.updateFor("IO.Global.FinsembleOneTimeConversion",{workspaces:!0}),localStorage.setItem("oneTimeConversion:workspaces","true")):this.logger.debug("data-migration - Skipping data migration of workspaces, already one-time-converted"):(this.logger.debug(`data-migration - Migrating workspaces ${e}`),await this.migrateWorkspaces())}async maybeMigratePreferences(e,t){"iocd"===e?this.logger.debug("data-migration - Skipping data migration of preferences"):"oneTimeConversion"===e?!0!==(null==t?void 0:t.preferences)?(this.logger.debug(`data-migration - Migrating preferences ${e}`),await this.migratePreferences(),await this.glue.prefs.updateFor("IO.Global.FinsembleOneTimeConversion",{preferences:!0})):this.logger.debug("data-migration - Skipping data migration of preferences, already one-time-converted"):(this.logger.debug(`data-migration - Migrating preferences ${e}`),await this.migratePreferences())}async maybeMigrateAdvancedAppLauncher(e,t){"iocd"===e?this.logger.debug("data-migration - Skipping data migration of advanced app launcher"):"oneTimeConversion"===e?!0!==(null==t?void 0:t.advancedAppLauncher)?(this.logger.debug(`data-migration - Migrating preferences ${e}`),await this.migrateAdvancedAppLauncher(),await this.glue.prefs.updateFor("IO.Global.FinsembleOneTimeConversion",{advancedAppLauncher:!0})):this.logger.debug("data-migration - Skipping data migration of advanced app launcher, already one-time-converted"):(this.logger.debug(`data-migration - Migrating advancedAppLauncher ${e}`),await this.migrateAdvancedAppLauncher())}async setLastUsedWorkspaceName(){const e=this.storageClient,t=await this.glue.layouts.getCurrentLayout();t&&await e.save({key:"finsemble.lastUsedWorkspace.name",topic:"finsemble.workspace",value:t.name})}async saveToStorageAdapter(e){const t=this.storageClient;this.logger.debug("data-migration - Saving workspaces to storage adapter",e),await this.removeFromStorageAdapter(e),await h(e,async e=>{const i=await this.glue.layouts.get(e,"Global");if(!i)return void this.logger.warn(`data-migration - saveToStorageAdapter couldn't find layout "${e}"`);const n=M(i);this.logger.debug("data-migration - Saving workspace to storage adapter (see console for full workspace)",n.name),console.debug("Saving workspace to storage adapter",n);const{windowData:o,componentStates:r}=n;delete n.windowData,delete n.componentStates,await t.save({key:Ge(n.name),topic:"finsemble.workspace",value:n}),await h(o,async e=>{const i=Ge(n.name,e.name);await t.save({key:i,topic:"finsemble.workspace",value:e})}),await h(Object.entries(r),async([e,i])=>{const o=Ge(n.name,e,e);await t.save({key:o,topic:"finsemble.workspace",value:i})})});const{data:i=[]}=await t.getStandardized({key:"finsemble.allWorkspaces",topic:"finsemble.workspace"}),n=i.concat(e).filter(R);await t.save({key:"finsemble.allWorkspaces",topic:"finsemble.workspace",value:n}),await this.setLastUsedWorkspaceName()}async removeFromStorageAdapter(e){const t=this.storageClient;this.logger.debug("data-migration - Removing workspaces from storage adapter",e),await h(e,async e=>{var i;const{data:n}=await t.getStandardized({key:Ge(e),topic:"finsemble.workspace"});await h(null!==(i=null==n?void 0:n.windows)&&void 0!==i?i:[],async i=>{const n=Ge(e,i),o=Ge(e,i,i);await t.remove({key:n,topic:"finsemble.workspace"}),await t.remove({key:o,topic:"finsemble.workspace"})}),await t.remove({key:Ge(e),topic:"finsemble.workspace"})});const{data:i=[]}=await t.getStandardized({key:"finsemble.allWorkspaces",topic:"finsemble.workspace"}),n=i.filter(t=>!e.includes(t));await t.save({key:"finsemble.allWorkspaces",topic:"finsemble.workspace",value:n}),await this.setLastUsedWorkspaceName()}async setOrderInStorageAdapter(e){const t=this.storageClient;this.logger.debug("data-migration - Setting workspace order in storage adapter",e),await t.save({key:"finsemble.allWorkspaces",topic:"finsemble.workspace",value:e})}async renameInStorageAdapter(e,t){var i;const n=this.storageClient;this.logger.debug(`data-migration - Renaming workspace "${e}" to "${t}" in storage adapter`);const{data:o}=await n.getStandardized({key:Ge(e),topic:"finsemble.workspace"});await h(null!==(i=null==o?void 0:o.windows)&&void 0!==i?i:[],async i=>{const o=Ge(e,i),r=Ge(e,i,i),{data:a}=await n.getStandardized({key:o,topic:"finsemble.workspace"}),{data:s}=await n.getStandardized({key:r,topic:"finsemble.workspace"});await n.remove({key:o,topic:"finsemble.workspace"}),await n.remove({key:r,topic:"finsemble.workspace"});const l=Ge(t,i),c=Ge(t,i,i);await n.save({key:l,topic:"finsemble.workspace",value:a}),await n.save({key:c,topic:"finsemble.workspace",value:s})}),await n.remove({key:Ge(e),topic:"finsemble.workspace"}),o.name=t,await n.save({key:Ge(t),topic:"finsemble.workspace",value:o});const{data:r=[]}=await n.getStandardized({key:"finsemble.allWorkspaces",topic:"finsemble.workspace"}),a=r.map(i=>i===e?t:i);await n.save({key:"finsemble.allWorkspaces",topic:"finsemble.workspace",value:a}),await this.setLastUsedWorkspaceName()}async setPreferences(e){const t=this.storageClient;this.logger.debug("data-migration - setting preferences in storage adapter",e),await t.save({key:"userPreferences",topic:"finsemble",value:e})}async setAdvancedAppLauncher(e){const t=this.storageClient;this.logger.debug("data-migration - setting advanced app launcher in storage adapter",e);const i={global:!0,persist:!0,name:"Finsemble-AppLauncher-Store",values:{activeFolder:e.activeFolder,activeTags:e.activeTags,appFolders:{folders:e.folders,list:e.foldersList},sortBy:e.sortBy,dragDisabled:[],appDefinitions:{}}};await t.save({key:"distributedStore-Finsemble-AppLauncher-Store",topic:"finsemble",value:i})}async addUserDefinedComponent(e,t){const i=this.storageClient,{data:n}=await i.getStandardized({key:"distributedStore-Finsemble-AppLauncher-Store",topic:"finsemble"});n&&(this.logger.debug("data-migration - saving user defined component to AAL",e,t),n.values.appDefinitions[e]={appId:e,canDelete:!0,tags:[],type:"Component",url:t},await i.save({key:"distributedStore-Finsemble-AppLauncher-Store",topic:"finsemble",value:n}))}async removeUserDefinedComponent(e){const t=this.storageClient,{data:i}=await t.getStandardized({key:"distributedStore-Finsemble-AppLauncher-Store",topic:"finsemble"});i&&(this.logger.debug("data-migration - removing user defined component to AAL",e),delete i.values.appDefinitions[e],await t.save({key:"distributedStore-Finsemble-AppLauncher-Store",topic:"finsemble",value:i}))}async storageAdapterPersistence(e,t,i){let n=!1,o=!1;e&&this.logger.debug("data-migration - Saving back to storage adapter is enabled at iocd.data.workspaces.saveToStorageAdapter"),await this.glue.interop.register("FSBL.Clients.WorkspaceClient.storageAdapter.save",p(async({workspaces:t},i)=>{e&&await this.saveToStorageAdapter(t)},this.logger)),await this.glue.interop.register("FSBL.Clients.WorkspaceClient.storageAdapter.remove",p(async({workspaces:t},i)=>{e&&await this.removeFromStorageAdapter(t)},this.logger)),await this.glue.interop.register("FSBL.Clients.WorkspaceClient.storageAdapter.order",p(async({workspaces:t},i)=>{e&&await this.setOrderInStorageAdapter(t)},this.logger)),await this.glue.interop.register("FSBL.Clients.WorkspaceClient.storageAdapter.rename",p(async({oldName:t,newName:i},n)=>{e&&await this.renameInStorageAdapter(t,i)},this.logger)),await this.glue.interop.register("FSBL.Clients.AppsClient.addUserDefinedComponent",p(async({name:t,url:n},o)=>{e&&i&&await this.addUserDefinedComponent(t,n)},this.logger)),await this.glue.interop.register("FSBL.Clients.AppsClient.removeUserDefinedComponent",p(async({name:t},n)=>{e&&i&&await this.removeUserDefinedComponent(t)},this.logger)),setTimeout(()=>{this.glue.prefs.subscribeFor("IO.Global.FinsemblePreferences",async e=>{this.logger.debug("data-migration - Updated IO.Global.FinsemblePreferences received",e),n?t&&await this.setPreferences(e.data):n=!0}),this.glue.prefs.subscribeFor("IO.Global.Launcher",async e=>{this.logger.debug("data-migration - Updated IO.Global.Launcher received",e),o?i&&await this.setAdvancedAppLauncher(e.data):o=!0})},2e3)}async run(){var e,t,i,n,o,r,a,s,l,c,d,p,u,h,f,g;this.logger.debug("data-migration - Data migration start");const m=null===(e=this.manifest.iocd)||void 0===e?void 0:e.data;this.logger.debug("data-migration - Migrating config",m);const v=null!==(i=null===(t=null==m?void 0:m.workspaces)||void 0===t?void 0:t.load)&&void 0!==i?i:"storageAdapter",w=null===(o=null===(n=null==m?void 0:m.workspaces)||void 0===n?void 0:n.saveToStorageAdapter)||void 0===o||o,y=null!==(a=null===(r=null==m?void 0:m.preferences)||void 0===r?void 0:r.load)&&void 0!==a?a:"storageAdapter",b=null!==(l=null===(s=null==m?void 0:m.advancedAppLauncher)||void 0===s?void 0:s.load)&&void 0!==l?l:"storageAdapter",S=null===(d=null===(c=null==m?void 0:m.preferences)||void 0===c?void 0:c.saveToStorageAdapter)||void 0===d||d,k=null===(u=null===(p=null==m?void 0:m.advancedAppLauncher)||void 0===p?void 0:p.saveToStorageAdapter)||void 0===u||u,T=new x;this.storageClient=new qe(new Promise(e=>{e(this.glue)}),T,this.logger.loggerClient);const A=await this.glue.prefs.get("IO.Global.FinsembleOneTimeConversion");await this.maybeMigrateWorkspaces(v,null!==(h=null==A?void 0:A.data)&&void 0!==h?h:{}),await this.maybeMigratePreferences(y,null!==(f=null==A?void 0:A.data)&&void 0!==f?f:{}),await this.maybeMigrateAdvancedAppLauncher(b,null!==(g=null==A?void 0:A.data)&&void 0!==g?g:{}),await this.storageAdapterPersistence(w,S,k),this.logger.debug("data-migration - Data migration end")}}class Ze{constructor(e,t,i){this.asyncConstructors=t,this.loggerClient=i,this.subscriptions={};const n=t.addConstructor();e.then(e=>{this.glue=e,t.finishConstructor(n)})}logStatus(e,t,i){He(this.loggerClient,this.glue,{api:"Router.transmit",method:e,type:t,data:i})}addListener(e,t){this.logStatus("addListener","start",{channel:e});let i=null;return(async()=>{var n;await this.asyncConstructors.ready(),i=await this.glue.bus.subscribe(e,(i,n,o)=>{const{peerId:r="Unknown peer"}=o,a={data:i._data,originatedHere:()=>o.peerId===this.glue.interop.instance.peerId,options:{suppressWarnings:!1},header:{type:"transmit",channel:e,incomingTransportInfo:{lastClient:r,origin:r,transportID:"FinsembleTransport"},lastClient:r,origin:r,originMetadata:{routerConnectionId:"",transportInfo:{transportID:"FinsembleTransport"},windowName:"",appId:"",webContentsName:""}}};t(null,a)}),this.subscriptions[e]=(null!==(n=this.subscriptions[e])&&void 0!==n?n:[]).concat({iocdSubscription:i,eventHandler:t})})(),this.logStatus("addListener","return"),()=>{var t;i&&(this.subscriptions[e]=(null!==(t=this.subscriptions.channel)&&void 0!==t?t:[]).filter(e=>e.iocdSubscription!==i),this.subscriptions[e].length||delete this.subscriptions[e],i.unsubscribe())}}removeListener(e,t){this.logStatus("removeListener","start",{channel:e}),(async()=>{var i,n;await this.asyncConstructors.ready(),(null!==(i=this.subscriptions[e])&&void 0!==i?i:[]).forEach(i=>{t&&i.eventHandler!==t||(i.iocdSubscription.unsubscribe(),this.subscriptions[e]=this.subscriptions[e].filter(e=>e!==i))}),(null===(n=this.subscriptions[e])||void 0===n?void 0:n.length)||delete this.subscriptions[e]})(),this.logStatus("removeListener","return")}async transmit(e,t,i){this.logStatus("transmit","start",{toChannel:e}),await this.asyncConstructors.ready();try{await this.glue.bus.publish(e,{_data:t})}catch(e){console.error("Router transmit() error calling invoke",e)}this.logStatus("transmit","return")}}class Je{constructor(e,t,i){this.gluePromise=e,this.asyncConstructors=t,this.loggerClient=i,this.lastSubId=0,this.unsubscribeFunctions={},this.catalogue={},this.gate=new d,this.alreadyRegisteredWithIOCD=!1,this.responders=[];const n=t.addConstructor();e.then(e=>{this.glue=e,this.initialize(),t.finishConstructor(n)})}logStatus(e,t,i){He(this.loggerClient,this.glue,{api:"Router.pubsub",method:e,type:t,data:i})}async initialize(){await this.glue.contexts.subscribe("finsemble-pubsub-catalogue",e=>{this.catalogue=e})}getLocalResponder(e){const t=this.responders.find(t=>t.topic===e),i=this.responders.find(t=>new RegExp(t.topic).test(e));return null!=t?t:i}handleIncomingPublish(e,t,i){var n;e.publishCallback?e.publishCallback(null,{data:t.data,header:t.header,options:t.options,originatedHere:()=>i.peerId===this.glue.interop.instance.peerId,sendNotifyToAllSubscribers:(i,n)=>{var o;i||null===(o=e.updateCallback)||void 0===o||o.call(e,t.topic,n)}}):null===(n=e.updateCallback)||void 0===n||n.call(e,t.topic,t.data)}handleIncomingSubscribe(t,i,n){var o;const r=new e;return t.subscribeCallback?(t.subscribeCallback(null,{data:i.data,header:i.header,options:i.options,originatedHere:()=>n.peerId===t.peerId,sendNotifyToSubscriber:(e,i)=>{r.resolve({error:e||void 0,data:i?{data:i}:void 0,initialData:t.initialState})}}),r.promise):Promise.resolve({data:void 0,initialData:null!==(o=t.initialState)&&void 0!==o?o:{}})}handleIncomingUnsubscribe(t,i,n){var o;const r=new e;return t.unsubscribeCallback?(t.unsubscribeCallback(null,{data:i.data,header:i.header,options:i.options,originatedHere:()=>n.peerId===t.peerId,removeSubscriber:()=>{var e;r.resolve({data:void 0,initialData:null!==(e=t.initialState)&&void 0!==e?e:{}})}}),r.promise):Promise.resolve({data:void 0,initialData:null!==(o=t.initialState)&&void 0!==o?o:{}})}async registerResponder(e,t,i){var n,o,r;const a=e instanceof RegExp?e.source:e;if(this.responders.find(e=>a===e.topic))throw new Error(`Router:registerResponder(): A local responder for topic already exists:'${a}'`);if(this.responders.push({topic:a,initialState:i,updateCallback:(e,t)=>{const i=`finsemble-pubsub-topic-${e}`;this.glue.contexts.set(i,t)},subscribeCallback:null==t?void 0:t.subscribeCallback,unsubscribeCallback:null==t?void 0:t.unsubscribeCallback,publishCallback:null==t?void 0:t.publishCallback,peerId:null!==(n=this.glue.interop.instance.peerId)&&void 0!==n?n:"Unknown peer"}),!this.alreadyRegisteredWithIOCD){const{err:e}=await m(()=>this.glue.interop.register("finsemble-pubsub-responder",p(async(e,t)=>{const i=this.getLocalResponder(e.topic);if(i)if("publish"===e.action)this.handleIncomingPublish(i,e,t);else{if("subscribe"===e.action)return this.handleIncomingSubscribe(i,e,t);if("unsubscribe"===e.action)return this.handleIncomingUnsubscribe(i,e,t)}})));if(e)return{err:e};this.alreadyRegisteredWithIOCD=!0}const s=null!==(o=this.glue.interop.instance.peerId)&&void 0!==o?o:"Unknown peer",l=(null!==(r=this.catalogue[s])&&void 0!==r?r:[]).concat({topic:a,isRegex:e instanceof RegExp,peerId:s}),{err:c}=await m(()=>this.glue.contexts.update("finsemble-pubsub-catalogue",{[s]:l}));return{err:c}}findRemoteResponder(e){const t=e=>this.glue.interop.servers().find(t=>t.peerId===e),i=Object.keys(this.catalogue).filter(e=>!t(e));if(i){let e={};i.forEach(t=>{e[t]=null,delete this.catalogue[t]}),this.glue.contexts.update("finsemble-pubsub-catalogue",e)}const n=Object.keys(this.catalogue).find(t=>this.catalogue[t].find(t=>!t.isRegex&&t.topic===e)),o=Object.keys(this.catalogue).find(t=>this.catalogue[t].find(t=>t.isRegex&&new RegExp(t.topic).test(e)));return null!=n?n:o}subscribe(t,i){this.logStatus("subscribe","start",{topic:t});const n=""+this.lastSubId++;return(async()=>{var o,r,a,s,l,c;await this.asyncConstructors.ready();const d=this.findRemoteResponder(t),p=`finsemble-pubsub-topic-${t}`;let u=!1;const h=await this.glue.contexts.subscribe(p,(e,n,o,r,a)=>{var s;if(!u)return;const l={data:null!==(s=null==e?void 0:e.envelope)&&void 0!==s?s:e,header:{topic:t,type:"",origin:"",subscribeID:""},originatedHere:()=>!a.updateId};i(void 0,l)}),f=async()=>{h();const{err:e}=await v(()=>this.glue.interop.invoke("finsemble-pubsub-responder",{action:"unsubscribe",topic:t,options:{},header:{}},{peerId:d},{waitTimeoutMs:3e4}));e&&this.logStatus("unsubscribe","error",e)};let g=null;if(d){const{err:e,data:n}=await v(()=>this.glue.interop.invoke("finsemble-pubsub-responder",{action:"subscribe",topic:t,options:{},header:{}},{peerId:d},{waitTimeoutMs:3e4}));if(g=null!=n?n:null,e)return f(),void i(e,{})}this.unsubscribeFunctions[n]=f;let m=await this.glue.contexts.get(p);0===Object.keys(m).length&&(m=void 0);const w=this.getLocalResponder(t);let y=null;if(null==w?void 0:w.subscribeCallback){const i=new e;w.subscribeCallback(null,{data:{topic:t},header:{},options:{suppressWarnings:!1},originatedHere:()=>!0,sendNotifyToSubscriber:(e,t)=>{i.resolve(t)}}),y=await i.promise}const b=null!==(s=null!==(a=null!==(r=null!==(o=null==g?void 0:g.data)&&void 0!==o?o:m)&&void 0!==r?r:null==g?void 0:g.initialData)&&void 0!==a?a:y)&&void 0!==s?s:null==w?void 0:w.initialState;i(void 0,{data:null!==(c=null!==(l=null==b?void 0:b.envelope)&&void 0!==l?l:b)&&void 0!==c?c:{},header:{topic:t,type:"",origin:"",subscribeID:""},originatedHere:()=>!1}),u=!0})(),this.logStatus("subscribe","return"),{subscribeID:n,topic:t}}unsubscribe(e){this.logStatus("unsubscribe","start",{subscribeIDStruct:e});const t=this.unsubscribeFunctions[e.subscribeID];t?t():setTimeout(()=>{this.unsubscribe(e)},100),this.logStatus("unsubscribe","return")}async publish(e,t){this.logStatus("publish","start",{topic:e}),await this.asyncConstructors.ready(),await this.gate.wait(async()=>{let i=this.findRemoteResponder(e);const o={envelope:t,transactionID:n()()};if(i){const{err:t}=await v(()=>this.glue.interop.invoke("finsemble-pubsub-responder",{data:o,action:"publish",topic:e,options:{},header:{}},{peerId:i}));t&&this.logStatus("publish","error",t)}else{const t=`finsemble-pubsub-topic-${e}`;this.glue.contexts.set(t,o)}}),this.logStatus("publish","return")}addPubSubResponder(e,t,i,n){return this.logStatus("addPubSubResponder","start",{topic:e}),(async()=>{await this.asyncConstructors.ready();const{err:o}=await this.registerResponder(e,null!=i?i:{},{envelope:t});o&&this.logStatus("addPubSubResponder","error",{topic:e,err:o}),null==n||n(null!=o?o:void 0,o?void 0:"success"),this.logStatus("addPubSubResponder","return")})()}async removePubSubResponder(e){var t,i;this.logStatus("removePubSubResponder","start",{topic:e}),this.responders=this.responders.filter(t=>t.topic!==e);const n=await this.glue.contexts.get("finsemble-pubsub-catalogue"),o=null!==(t=this.glue.interop.instance.peerId)&&void 0!==t?t:"Unknown peer",r=(null!==(i=n[o])&&void 0!==i?i:[]).filter(t=>t.topic!==e),{err:a}=await m(()=>this.glue.contexts.update("finsemble-pubsub-catalogue",{[o]:r}));a&&this.logStatus("removePubSubResponder","error",{err:a}),this.logStatus("removePubSubResponder","return")}trustedMessage(e){return!0}async disconnectAll(){var e;this.logStatus("disconnectAll","start"),await this.asyncConstructors.ready(),Object.values(this.unsubscribeFunctions).forEach(e=>e()),this.unsubscribeFunctions={};const t=null!==(e=this.glue.interop.instance.peerId)&&void 0!==e?e:"Unknown peer";await m(()=>this.glue.contexts.update("finsemble-pubsub-catalogue",{[t]:null})),await m(()=>this.glue.interop.unregister("finsemble-pubsub-responder")),this.responders=[],this.logStatus("disconnectAll","return")}calibrateTimeWithRouterService(e){e(0)}}class Ke{constructor(e,t,i){this.gluePromise=e,this.asyncConstructors=t,this.loggerClient=i;const n=t.addConstructor();e.then(e=>{this.glue=e,t.finishConstructor(n)})}logStatus(e,t,i){He(this.loggerClient,this.glue,{api:"Router.queries",method:e,type:t,data:i})}isInteropEndpointRegistered(e){return this.glue.interop.methods().some(t=>t.name===e)}async addResponder(t,i){if(this.logStatus("addResponder","start",{channel:t}),await this.asyncConstructors.ready(),this.isInteropEndpointRegistered(t)){const e=`addResponder failed because responder already added to ${t}`;throw this.logStatus("addResponder","error",e),new Error(e)}await this.glue.interop.register(t,p(async(n,o)=>{var r,a,s;const l=new e,c={origin:null!==(r=o.instance)&&void 0!==r?r:"Unknown origin",type:"query",queryID:"",channel:t,logWhenNoResponder:!1,error:null,subscribeID:t,lastClient:"",incomingTransportInfo:{lastClient:"",origin:null!==(a=o.instance)&&void 0!==a?a:"",transportID:"FinsembleTransport"}},d={data:null!==(s=null==n?void 0:n["#primitives-wrapper"])&&void 0!==s?s:n,header:c,options:{suppressWarnings:!1},sendQueryResponse:(e,t)=>{const i="object"!=typeof t||Array.isArray(t)?{"#primitives-wrapper":t}:t;l.resolve({err:e,data:i})},originatedHere:()=>{var e,t;return o.windowId===(null!==(t=null===(e=this.glue.windows.my())||void 0===e?void 0:e.id)&&void 0!==t?t:"Unknown or incompatible window type")}};return i(null,d),this.logStatus("addResponder","return"),await l.promise}))}removeResponder(e){this.logStatus("removeResponder","start",{responderChannel:e}),this.glue.interop.unregister(e),this.logStatus("removeResponder","return")}async query(e,t,i,n){var o;this.logStatus("query","start",{channel:e}),await this.asyncConstructors.ready();const r="function"==typeof i?i:n,a="object"!=typeof t||Array.isArray(t)?{"#primitives-wrapper":t}:t,s=null==i?void 0:i.timeout,l=s?{methodResponseTimeoutMs:s}:void 0,c={channel:e,topic:e,type:"",origin:"",subscribeID:e,lastClient:"",incomingTransportInfo:{lastClient:"",origin:"",transportID:"FinsembleTransport"},originMetadata:{routerConnectionId:"",transportInfo:{transportID:"FinsembleTransport"},windowName:"",appId:"",webContentsName:""}};if(!this.isInteropEndpointRegistered(e)){const t=`query failed since no responder on ${e}`;return this.logStatus("query","error",t),null==r||r(t,{header:c}),{err:t,response:{header:c}}}const{err:d,data:p}=await v(()=>this.glue.interop.invoke(e,a,void 0,l)),u={data:null!==(o=null==p?void 0:p["#primitives-wrapper"])&&void 0!==o?o:p,header:c};return this.logStatus("query","return"),null==r||r(d,u),{err:d,response:u}}}class Ye{constructor(e,t,i){this.asyncConstructors=t,this.loggerClient=i,this.transmitter=new Ze(e,this.asyncConstructors,i),this.pubSub=new Je(e,this.asyncConstructors,i),this.queries=new Ke(e,this.asyncConstructors,i)}async onReady(e){await this.asyncConstructors.ready(),null==e||e()}async onFailure(e){}addListener(e,t){return this.transmitter.addListener(e,t)}removeListener(e,t){return this.transmitter.removeListener(e,t)}transmit(e,t,i){return this.transmitter.transmit(e,t,i)}addResponder(e,t){this.queries.addResponder(e,t)}removeResponder(e){this.queries.removeResponder(e)}query(e,t,i,n){return this.queries.query(e,t,i,n)}subscribe(e,t){return this.pubSub.subscribe(e,t)}publish(e,t){return this.pubSub.publish(e,t)}addPubSubResponder(e,t,i,n){return this.pubSub.addPubSubResponder(e,t,i,n)}removePubSubResponder(e){return this.pubSub.removePubSubResponder(e)}unsubscribe(e){this.pubSub.unsubscribe(e)}trustedMessage(e){return this.pubSub.trustedMessage(e)}disconnectAll(){var e;null===(e=this.pubSub)||void 0===e||e.disconnectAll()}}class Qe{warn(...e){globalThis.console.warn(...e)}info(...e){globalThis.console.info(...e)}log(...e){globalThis.console.log(...e)}debug(...e){globalThis.console.debug(...e)}error(...e){globalThis.console.error(...e)}verbose(...e){globalThis.console.debug(...e)}deprecated(...e){globalThis.console.error(...e)}}class Xe{constructor(e,t){this.asyncConstructors=t,this.queue=[],this.logState={Error:!0,Warn:!0,Log:!0,Info:!1,Debug:!1,Verbose:!1,Console:!1},this.componentSelected=!1,this.centralLoggerReady=!1,this.enableLegacyLoggerRecipe=!1,this.routerClient=null;const i=t.addConstructor();e.then(async e=>{var n,o,r,a;this.glue=e;const s=null!==(r=null===(o=null===(n=this.glue.windows)||void 0===n?void 0:n.my())||void 0===o?void 0:o.name)&&void 0!==r?r:"unknown window";await this.glue.contexts.subscribe("central-logger-component-states",({componentLogState:e,componentFilterState:t})=>{s in e&&s in t&&(this.logState=e[s],this.componentSelected=t[s],this.centralLoggerReady=!0,this.processQueue())});const l=await e.contexts.get(c);this.enableLegacyLoggerRecipe=null===(a=l.iocd)||void 0===a?void 0:a.enableLegacyLoggerRecipe,t.finishConstructor(i)}),this.system={warn:(...e)=>{this.logIt("system","Warn",e)},info:(...e)=>{this.logIt("system","Info",e)},log:(...e)=>{this.logIt("system","Log",e)},error:(...e)=>{this.logIt("system","Error",e)},debug:(...e)=>{this.logIt("system","Debug",e)},verbose:(...e)=>{this.logIt("system","Verbose",e)},deprecated:(...e)=>{this.logIt("system","Error",e)}},this.perf={warn:(...e)=>{this.logIt("perf","Warn",e)},info:(...e)=>{this.logIt("perf","Info",e)},log:(...e)=>{this.logIt("perf","Log",e)},error:(...e)=>{this.logIt("perf","Error",e)},debug:(...e)=>{this.logIt("perf","Debug",e)},verbose:(...e)=>{this.logIt("perf","Verbose",e)},deprecated:(...e)=>{this.logIt("perf","Error",e)}},this.console=new Qe}logIt(e,t,i){var n,o,r,a;const s={category:e,logType:t,logClientName:null!==(a=null===(r=null===(o=null===(n=this.glue)||void 0===n?void 0:n.windows)||void 0===o?void 0:o.my())||void 0===r?void 0:r.name)&&void 0!==a?a:"",logData:i,logTimestamp:(new Date).valueOf()};this.queue.push(s),this.processQueue()}async processQueue(){var e;if(!this.centralLoggerReady||0===this.queue.length)return;await this.asyncConstructors.ready();const t=this.queue.slice(0);if(this.queue=[],!this.componentSelected)return;const i=t.filter(e=>this.logState[e.logType]);if(i.length){i.forEach(e=>{var t,i,n,o;e.logClientName=null!==(o=null===(n=null===(i=null===(t=this.glue)||void 0===t?void 0:t.windows)||void 0===i?void 0:i.my())||void 0===n?void 0:n.name)&&void 0!==o?o:""});const t=e=>({Error:"error",Log:"log",Debug:"debug",Info:"info",Warn:"warn",Verbose:"debug",Console:"log"}[e]);this.logState.Console&&i.forEach(e=>this.console[t(e.logType)](...e.logData)),await v(()=>this.glue.interop.invoke("fsbl-logger-service-log-messages",{data:i}));const n=i.filter(e=>"Error"===e.logType||"Warn"===e.logType);this.enableLegacyLoggerRecipe&&n.length&&(null===(e=this.routerClient)||void 0===e||e.transmit("logger.service.logMessages",n.map(e=>({...e,logData:JSON.stringify(e.logData)}))))}}warn(...e){this.logIt("dev","Warn",e)}info(...e){this.logIt("dev","Info",e)}log(...e){this.logIt("dev","Log",e)}debug(...e){this.logIt("dev","Debug",e)}error(...e){this.logIt("dev","Error",e)}verbose(...e){this.logIt("dev","Verbose",e)}deprecated(...e){this.logIt("dev","Error",e)}initialize(e){this.routerClient=e}}let et=!1;const tt=async({glue:t,logger:i,workspaceService:n,storageService:o,appService:r,configService:a,notificationService:s,manifest:l})=>{const c=new e,d=new e;await t.interop.register("FSBL.enterBootStage",p(async e=>(async e=>{"post-sso"===e?(et=!0,await(async()=>{i.debug("boot-sequence - runPostSSOStage: Received post-sso boot stage signal."),await t.contexts.set("IO.Global.InUserStage",{inUserStage:!0});const e=await globalThis.glue42gd.getAuth(),{user:n}=null!=e?e:{};n&&await o.setUser({user:n}),i.debug("boot-sequence - runPostSSOStage: Running data migration()");const d=new Ve(t,l,i);await d.run(),i.debug("boot-sequence - runPostSSOStage: Calling appService.loadUserDefinedApps()"),await r.loadUserDefinedApps(),await a.maybeSetScheduledShutdownAndRestart(),await s.initialize(),c.resolve(),i.debug("boot-sequence - runPostSSOStage: Returning response to EnterBootStage app")})()):"user"===e?await(async()=>{i.debug("boot-sequence - runUserStage: Received user boot stage signal."),i.debug("boot-sequence - runUserStage: Calling workspaceService.loadWorkspacesPostSSO()"),await n.loadWorkspacesPostSSO(l),i.debug("boot-sequence - runUserStage: Setting context IO.Global.InUserStage to release FSBL preferences API"),d.resolve(),i.debug("boot-sequence - runUserStage: Returning response to EnterBootStage app")})():i.error(`boot-sequence - Received FSBL.enterBootStage for unknown stage "${e}"`)})(null==e?void 0:e.stage),i)),await c.promise,await d.promise};if(globalThis.glue42gd){const e=globalThis.Glue;null==e||e({appManager:"full",bus:!0,layouts:"full"}).then(e=>{(async e=>{var t,i;null===(t=e.windows.my())||void 0===t||t.onClosing(async t=>{var i;t(),null===(i=e.windows.my())||void 0===i||i.hide()}),e.interop.invoke("fsbl-service-started",{});const n=await(null===(i=e.windows.my())||void 0===i?void 0:i.getContext()),o=new x,r=new Xe(new Promise(t=>{t(e)}),o),a=((e,t,i="debug")=>{const n=e.logger.subLogger("fsbl-service");return n.publishLevel(i),{loggerClient:t,trace:(...e)=>{console.trace(...e),n.trace(e.map(e=>oe(e)).join("\n")),null==t||t.verbose(...e)},debug:(...e)=>{console.debug(...e),n.debug(e.map(e=>oe(e)).join("\n")),null==t||t.debug(...e)},info:(...e)=>{console.info(...e),n.info(e.map(e=>oe(e)).join("\n")),null==t||t.info(...e)},warn:(...e)=>{console.warn(...e),n.warn(e.map(e=>oe(e)).join("\n")),null==t||t.warn(...e)},error:(...e)=>{var i;console.error(...e),(null===(i=null==e?void 0:e[1])||void 0===i?void 0:i.stack)?(n.error(`${e[0]}\n${e[1].stack}`),null==t||t.error(e[0],e[1].stack.split("\n"))):(n.warn(e.map(e=>oe(e)).join("\n")),null==t||t.warn(...e))}}})(e,r);if(n){a.debug("boot-sequence - finsembleServiceContext from fsbl-service.details.context",n),await e.contexts.set("$FINSEMBLESERVICECONTEXT",n);try{await(async(e,t,i,n)=>{var o,r,a,s,l,d,p,u;let h=!0;const f=null!==(o=null==t?void 0:t.timeout)&&void 0!==o?o:4e4,g=setInterval(()=>{var t;if(!et&&e.windows.list().map(e=>e.name).includes("sso-application"))return void i.info(`boot-sequence - sso-application is still waiting so timeout has been reset another ${f} milliseconds.`);clearInterval(g),h?null===(t=e.windows.my())||void 0===t||t.show():e.notifications.raise({title:"A system error has occurred during startup. Please check fsbl-service console for errors."});const n=`boot-sequence - fsbl-service is taking over ${f} milliseconds to start. Check for dev console errors or increase timeout in manifest under "iocd.timeout".`;i.error(n),console.error(n),document.getElementById("errorMessage").innerText=n},f);i.debug("boot-sequence - Entering pre-sso initialization");const m=new URL("../fsbl-polyfill.umd.js",document.location.href).href;i.debug("Preload url is",m);const w=new Ye(new Promise(t=>{t(e)}),n,i.loggerClient),y=new ze(e,i,w),b=new ye(e,i,w),S=new Re(e,i,t),k=new je(e,i),T=new Le(e,i,w),A=new We(e,i,w),C=new Me(e,i,S,null===(a=null===(r=S.config)||void 0===r?void 0:r.finsemble)||void 0===a?void 0:a.moduleRoot),I=new $e(e,i),_=new Ee(e,i,w),F=new Ue(e,i),P=new Be(e,i),x=new G(e,i,w),R=new Ne(e,i);await y.start(),await b.start(),await P.start(),await S.start();const L=await e.contexts.get(c);y.maybeStartRecipe(L),i.debug("boot-sequence - MANIFEST",L);const W=null!==(l=null===(s=null==L?void 0:L.startup_app)||void 0===s?void 0:s.uuid)&&void 0!==l?l:"Finsemble";h=null===(u=null===(p=null===(d=L.finsemble)||void 0===d?void 0:d.bootConfig)||void 0===p?void 0:p.onErrorMakeSystemManagerVisible)||void 0===u||u,i.debug("boot-sequence - distributedStoreService start"),await I.start(),i.debug("boot-sequence - storageService start"),await k.start({uuid:W,manifest:L}),i.debug("boot-sequence - windowService start"),await A.start({manifest:L}),i.debug("boot-sequence - workspaceService start"),await T.start(),i.debug("boot-sequence - authenticationService start"),await C.start(m),i.debug("boot-sequence - appService start"),await x.start(),i.debug("boot-sequence - notificationService start"),await _.start(),i.debug("boot-sequence - hotkeyService start"),await F.start(L),i.debug("boot-sequence - maybeSetLogToDisk"),await y.maybeSetLogToDisk(L),i.debug("boot-sequence - searchService start"),await R.start(L);const{err:j}=await v(()=>e.interop.invoke("fsbl-service-ready-for-user-stage",{}));j&&i.error("boot-sequence - Error calling fsbl-service-ready-for-user-stage",j),i.debug("boot-sequence - pre-sso initialization complete. Now waiting to enter post-sso boot stage."),await tt({glue:e,logger:i,configService:S,workspaceService:T,storageService:k,appService:x,notificationService:_,manifest:L}),clearInterval(g),i.debug("boot-sequence - post-sso initialization complete. fsbl-service is now fully operational.")})(e,n,a,o)}catch(e){throw a.error("boot-sequence - Unhandled exception in service startup",e.toString(),e.stack),e}}else a.error("boot-sequence - No initial context found for fsbl-service. Stopping boot. Ensure that the fsbl-service entry in systemAppStore contains a valid context entry of type FinsembleServiceContext.")})(e),globalThis.iop=e})}})()})();
|
|
3
3
|
//# sourceMappingURL=index.umd.js.map
|