@uxland/primary-shell 7.5.1 → 7.6.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/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { E as i, q as e, v as r, b as t, P as n, m as o, l, c, n as p, e as g, d as m, p as v, f as E, g as P, o as h, j as u, u as C } from "./index-CD30Kudo.js";
1
+ import { E as i, q as e, v as r, b as t, P as n, m as o, l, c, n as p, e as g, d as m, p as v, f as E, g as P, o as h, j as u, u as C } from "./index-BzErjl2Y.js";
2
2
  export {
3
3
  i as EcapEventManager,
4
4
  e as PrimariaContentSwitcher,
@@ -207,7 +207,7 @@ Registered bindings:`,ne.forEach(function(oe){var de="Object";oe.implementationT
207
207
  `+de,oe.constraint.metaData&&(re=re+" - "+oe.constraint.metaData)})),re}function alreadyDependencyChain(te,J){return te.parentRequest===null?!1:te.parentRequest.serviceIdentifier===J?!0:alreadyDependencyChain(te.parentRequest,J)}function dependencyChainToString(te){function J(re,ne){ne===void 0&&(ne=[]);var oe=getServiceIdentifierAsString(re.serviceIdentifier);return ne.push(oe),re.parentRequest!==null?J(re.parentRequest,ne):ne}var X=J(te);return X.reverse().join(" --> ")}function circularDependencyToException(te){te.childRequests.forEach(function(J){if(alreadyDependencyChain(J,J.serviceIdentifier)){var X=dependencyChainToString(J);throw new Error(CIRCULAR_DEPENDENCY+" "+X)}else circularDependencyToException(J)})}function listMetadataForTarget(te,J){if(J.isTagged()||J.isNamed()){var X="",re=J.getNamedTag(),ne=J.getCustomTags();return re!==null&&(X+=re.toString()+`
208
208
  `),ne!==null&&ne.forEach(function(oe){X+=oe.toString()+`
209
209
  `})," "+te+`
210
- `+te+" - "+X}else return" "+te}function getFunctionName(te){if(te.name)return te.name;var J=te.toString(),X=J.match(/^function\s*([^\s(]+)/);return X?X[1]:"Anonymous function: "+J}function getSymbolDescription(te){return te.toString().slice(7,-1)}var Context=(function(){function te(J){this.id=id(),this.container=J}return te.prototype.addPlan=function(J){this.plan=J},te.prototype.setCurrentRequest=function(J){this.currentRequest=J},te})(),Metadata=(function(){function te(J,X){this.key=J,this.value=X}return te.prototype.toString=function(){return this.key===NAMED_TAG?"named: "+String(this.value).toString()+" ":"tagged: { key:"+this.key.toString()+", value: "+String(this.value)+" }"},te})(),Plan=(function(){function te(J,X){this.parentContext=J,this.rootRequest=X}return te})(),LazyServiceIdentifier=(function(){function te(J){this._cb=J}return te.prototype.unwrap=function(){return this._cb()},te})(),QueryableString=(function(){function te(J){this.str=J}return te.prototype.startsWith=function(J){return this.str.indexOf(J)===0},te.prototype.endsWith=function(J){var X="",re=J.split("").reverse().join("");return X=this.str.split("").reverse().join(""),this.startsWith.call({str:X},re)},te.prototype.contains=function(J){return this.str.indexOf(J)!==-1},te.prototype.equals=function(J){return this.str===J},te.prototype.value=function(){return this.str},te})(),Target=(function(){function te(J,X,re,ne){this.id=id(),this.type=J,this.serviceIdentifier=re;var oe=typeof X=="symbol"?getSymbolDescription(X):X;this.name=new QueryableString(oe||""),this.identifier=X,this.metadata=new Array;var de=null;typeof ne=="string"?de=new Metadata(NAMED_TAG,ne):ne instanceof Metadata&&(de=ne),de!==null&&this.metadata.push(de)}return te.prototype.hasTag=function(J){for(var X=0,re=this.metadata;X<re.length;X++){var ne=re[X];if(ne.key===J)return!0}return!1},te.prototype.isArray=function(){return this.hasTag(MULTI_INJECT_TAG)},te.prototype.matchesArray=function(J){return this.matchesTag(MULTI_INJECT_TAG)(J)},te.prototype.isNamed=function(){return this.hasTag(NAMED_TAG)},te.prototype.isTagged=function(){return this.metadata.some(function(J){return NON_CUSTOM_TAG_KEYS.every(function(X){return J.key!==X})})},te.prototype.isOptional=function(){return this.matchesTag(OPTIONAL_TAG)(!0)},te.prototype.getNamedTag=function(){return this.isNamed()?this.metadata.filter(function(J){return J.key===NAMED_TAG})[0]:null},te.prototype.getCustomTags=function(){return this.isTagged()?this.metadata.filter(function(J){return NON_CUSTOM_TAG_KEYS.every(function(X){return J.key!==X})}):null},te.prototype.matchesNamedTag=function(J){return this.matchesTag(NAMED_TAG)(J)},te.prototype.matchesTag=function(J){var X=this;return function(re){for(var ne=0,oe=X.metadata;ne<oe.length;ne++){var de=oe[ne];if(de.key===J&&de.value===re)return!0}return!1}},te})(),__spreadArray$2=function(te,J,X){if(X||arguments.length===2)for(var re=0,ne=J.length,oe;re<ne;re++)(oe||!(re in J))&&(oe||(oe=Array.prototype.slice.call(J,0,re)),oe[re]=J[re]);return te.concat(oe||Array.prototype.slice.call(J))};function getDependencies$1(te,J){var X=getFunctionName(J);return getTargets(te,X,J,!1)}function getTargets(te,J,X,re){var ne=te.getConstructorMetadata(X),oe=ne.compilerGeneratedMetadata;if(oe===void 0){var de=MISSING_INJECTABLE_ANNOTATION+" "+J+".";throw new Error(de)}var ce=ne.userGeneratedMetadata,he=Object.keys(ce),ue=X.length===0&&he.length>0,pe=he.length>X.length,fe=ue||pe?he.length:X.length,be=getConstructorArgsAsTargets(re,J,oe,ce,fe),ge=getClassPropsAsTargets(te,X,J),ve=__spreadArray$2(__spreadArray$2([],be,!0),ge,!0);return ve}function getConstructorArgsAsTarget(te,J,X,re,ne){var oe=ne[te.toString()]||[],de=formatTargetMetadata(oe),ce=de.unmanaged!==!0,he=re[te],ue=de.inject||de.multiInject;if(he=ue||he,he instanceof LazyServiceIdentifier&&(he=he.unwrap()),ce){var pe=he===Object,fe=he===Function,be=he===void 0,ge=pe||fe||be;if(!J&&ge){var ve=MISSING_INJECT_ANNOTATION+" argument "+te+" in class "+X+".";throw new Error(ve)}var me=new Target(TargetTypeEnum.ConstructorArgument,de.targetName,he);return me.metadata=oe,me}return null}function getConstructorArgsAsTargets(te,J,X,re,ne){for(var oe=[],de=0;de<ne;de++){var ce=de,he=getConstructorArgsAsTarget(ce,te,J,X,re);he!==null&&oe.push(he)}return oe}function _getServiceIdentifierForProperty(te,J,X,re){var ne=te||J;if(ne===void 0){var oe=MISSING_INJECTABLE_ANNOTATION+" for property "+String(X)+" in class "+re+".";throw new Error(oe)}return ne}function getClassPropsAsTargets(te,J,X){for(var re=te.getPropertiesMetadata(J),ne=[],oe=Object.getOwnPropertySymbols(re),de=Object.keys(re),ce=de.concat(oe),he=0,ue=ce;he<ue.length;he++){var pe=ue[he],fe=re[pe],be=formatTargetMetadata(fe),ge=be.targetName||pe,ve=_getServiceIdentifierForProperty(be.inject,be.multiInject,pe,X),me=new Target(TargetTypeEnum.ClassProperty,ge,ve);me.metadata=fe,ne.push(me)}var _e=Object.getPrototypeOf(J.prototype).constructor;if(_e!==Object){var ye=getClassPropsAsTargets(te,_e,X);ne=__spreadArray$2(__spreadArray$2([],ne,!0),ye,!0)}return ne}function getBaseClassDependencyCount(te,J){var X=Object.getPrototypeOf(J.prototype).constructor;if(X!==Object){var re=getFunctionName(X),ne=getTargets(te,re,X,!0),oe=ne.map(function(he){return he.metadata.filter(function(ue){return ue.key===UNMANAGED_TAG})}),de=[].concat.apply([],oe).length,ce=ne.length-de;return ce>0?ce:getBaseClassDependencyCount(te,X)}else return 0}function formatTargetMetadata(te){var J={};return te.forEach(function(X){J[X.key.toString()]=X.value}),{inject:J[INJECT_TAG],multiInject:J[MULTI_INJECT_TAG],targetName:J[NAME_TAG],unmanaged:J[UNMANAGED_TAG]}}var Request$1=(function(){function te(J,X,re,ne,oe){this.id=id(),this.serviceIdentifier=J,this.parentContext=X,this.parentRequest=re,this.target=oe,this.childRequests=[],this.bindings=Array.isArray(ne)?ne:[ne],this.requestScope=re===null?new Map:null}return te.prototype.addChildRequest=function(J,X,re){var ne=new te(J,this.parentContext,this,X,re);return this.childRequests.push(ne),ne},te})();function getBindingDictionary(te){return te._bindingDictionary}function _createTarget(te,J,X,re,ne,oe){var de=te?MULTI_INJECT_TAG:INJECT_TAG,ce=new Metadata(de,X),he=new Target(J,re,X,ce);if(ne!==void 0){var ue=new Metadata(ne,oe);he.metadata.push(ue)}return he}function _getActiveBindings(te,J,X,re,ne){var oe=getBindings(X.container,ne.serviceIdentifier),de=[];return oe.length===BindingCount.NoBindingsAvailable&&X.container.options.autoBindInjectable&&typeof ne.serviceIdentifier=="function"&&te.getConstructorMetadata(ne.serviceIdentifier).compilerGeneratedMetadata&&(X.container.bind(ne.serviceIdentifier).toSelf(),oe=getBindings(X.container,ne.serviceIdentifier)),J?de=oe:de=oe.filter(function(ce){var he=new Request$1(ce.serviceIdentifier,X,re,ce,ne);return ce.constraint(he)}),_validateActiveBindingCount(ne.serviceIdentifier,de,ne,X.container),de}function _validateActiveBindingCount(te,J,X,re){switch(J.length){case BindingCount.NoBindingsAvailable:if(X.isOptional())return J;var ne=getServiceIdentifierAsString(te),oe=NOT_REGISTERED;throw oe+=listMetadataForTarget(ne,X),oe+=listRegisteredBindingsForServiceIdentifier(re,ne,getBindings),new Error(oe);case BindingCount.OnlyOneBindingAvailable:return J;case BindingCount.MultipleBindingsAvailable:default:if(X.isArray())return J;var ne=getServiceIdentifierAsString(te),oe=AMBIGUOUS_MATCH+" "+ne;throw oe+=listRegisteredBindingsForServiceIdentifier(re,ne,getBindings),new Error(oe)}}function _createSubRequests(te,J,X,re,ne,oe){var de,ce;if(ne===null){de=_getActiveBindings(te,J,re,null,oe),ce=new Request$1(X,re,null,de,oe);var he=new Plan(re,ce);re.addPlan(he)}else de=_getActiveBindings(te,J,re,ne,oe),ce=ne.addChildRequest(oe.serviceIdentifier,de,oe);de.forEach(function(ue){var pe=null;if(oe.isArray())pe=ce.addChildRequest(ue.serviceIdentifier,ue,oe);else{if(ue.cache)return;pe=ce}if(ue.type===BindingTypeEnum.Instance&&ue.implementationType!==null){var fe=getDependencies$1(te,ue.implementationType);if(!re.container.options.skipBaseClassChecks){var be=getBaseClassDependencyCount(te,ue.implementationType);if(fe.length<be){var ge=ARGUMENTS_LENGTH_MISMATCH(getFunctionName(ue.implementationType));throw new Error(ge)}}fe.forEach(function(ve){_createSubRequests(te,!1,ve.serviceIdentifier,re,pe,ve)})}})}function getBindings(te,J){var X=[],re=getBindingDictionary(te);return re.hasKey(J)?X=re.get(J):te.parent!==null&&(X=getBindings(te.parent,J)),X}function plan(te,J,X,re,ne,oe,de,ce){ce===void 0&&(ce=!1);var he=new Context(J),ue=_createTarget(X,re,ne,"",oe,de);try{return _createSubRequests(te,ce,ne,he,null,ue),he}catch(pe){throw isStackOverflowExeption(pe)&&circularDependencyToException(he.plan.rootRequest),pe}}function createMockRequest(te,J,X,re){var ne=new Target(TargetTypeEnum.Variable,"",J,new Metadata(X,re)),oe=new Context(te),de=new Request$1(J,oe,null,[],ne);return de}function isPromise(te){var J=typeof te=="object"&&te!==null||typeof te=="function";return J&&typeof te.then=="function"}function isPromiseOrContainsPromise(te){return isPromise(te)?!0:Array.isArray(te)&&te.some(isPromise)}var __awaiter$3=function(te,J,X,re){function ne(oe){return oe instanceof X?oe:new X(function(de){de(oe)})}return new(X||(X=Promise))(function(oe,de){function ce(pe){try{ue(re.next(pe))}catch(fe){de(fe)}}function he(pe){try{ue(re.throw(pe))}catch(fe){de(fe)}}function ue(pe){pe.done?oe(pe.value):ne(pe.value).then(ce,he)}ue((re=re.apply(te,J||[])).next())})},__generator$3=function(te,J){var X={label:0,sent:function(){if(oe[0]&1)throw oe[1];return oe[1]},trys:[],ops:[]},re,ne,oe,de;return de={next:ce(0),throw:ce(1),return:ce(2)},typeof Symbol=="function"&&(de[Symbol.iterator]=function(){return this}),de;function ce(ue){return function(pe){return he([ue,pe])}}function he(ue){if(re)throw new TypeError("Generator is already executing.");for(;X;)try{if(re=1,ne&&(oe=ue[0]&2?ne.return:ue[0]?ne.throw||((oe=ne.return)&&oe.call(ne),0):ne.next)&&!(oe=oe.call(ne,ue[1])).done)return oe;switch(ne=0,oe&&(ue=[ue[0]&2,oe.value]),ue[0]){case 0:case 1:oe=ue;break;case 4:return X.label++,{value:ue[1],done:!1};case 5:X.label++,ne=ue[1],ue=[0];continue;case 7:ue=X.ops.pop(),X.trys.pop();continue;default:if(oe=X.trys,!(oe=oe.length>0&&oe[oe.length-1])&&(ue[0]===6||ue[0]===2)){X=0;continue}if(ue[0]===3&&(!oe||ue[1]>oe[0]&&ue[1]<oe[3])){X.label=ue[1];break}if(ue[0]===6&&X.label<oe[1]){X.label=oe[1],oe=ue;break}if(oe&&X.label<oe[2]){X.label=oe[2],X.ops.push(ue);break}oe[2]&&X.ops.pop(),X.trys.pop();continue}ue=J.call(te,X)}catch(pe){ue=[6,pe],ne=0}finally{re=oe=0}if(ue[0]&5)throw ue[1];return{value:ue[0]?ue[1]:void 0,done:!0}}},tryGetFromScope=function(te,J){return J.scope===BindingScopeEnum.Singleton&&J.activated?J.cache:J.scope===BindingScopeEnum.Request&&te.has(J.id)?te.get(J.id):null},saveToScope=function(te,J,X){J.scope===BindingScopeEnum.Singleton&&_saveToSingletonScope(J,X),J.scope===BindingScopeEnum.Request&&_saveToRequestScope(te,J,X)},_saveToRequestScope=function(te,J,X){te.has(J.id)||te.set(J.id,X)},_saveToSingletonScope=function(te,J){te.cache=J,te.activated=!0,isPromise(J)&&_saveAsyncResultToSingletonScope(te,J)},_saveAsyncResultToSingletonScope=function(te,J){return __awaiter$3(void 0,void 0,void 0,function(){var X,re;return __generator$3(this,function(ne){switch(ne.label){case 0:return ne.trys.push([0,2,,3]),[4,J];case 1:return X=ne.sent(),te.cache=X,[3,3];case 2:throw re=ne.sent(),te.cache=null,te.activated=!1,re;case 3:return[2]}})})},FactoryType;(function(te){te.DynamicValue="toDynamicValue",te.Factory="toFactory",te.Provider="toProvider"})(FactoryType||(FactoryType={}));var ensureFullyBound=function(te){var J=null;switch(te.type){case BindingTypeEnum.ConstantValue:case BindingTypeEnum.Function:J=te.cache;break;case BindingTypeEnum.Constructor:case BindingTypeEnum.Instance:J=te.implementationType;break;case BindingTypeEnum.DynamicValue:J=te.dynamicValue;break;case BindingTypeEnum.Provider:J=te.provider;break;case BindingTypeEnum.Factory:J=te.factory;break}if(J===null){var X=getServiceIdentifierAsString(te.serviceIdentifier);throw new Error(INVALID_BINDING_TYPE+" "+X)}},getFactoryDetails=function(te){switch(te.type){case BindingTypeEnum.Factory:return{factory:te.factory,factoryType:FactoryType.Factory};case BindingTypeEnum.Provider:return{factory:te.provider,factoryType:FactoryType.Provider};case BindingTypeEnum.DynamicValue:return{factory:te.dynamicValue,factoryType:FactoryType.DynamicValue};default:throw new Error("Unexpected factory type "+te.type)}},__assign$1=function(){return __assign$1=Object.assign||function(te){for(var J,X=1,re=arguments.length;X<re;X++){J=arguments[X];for(var ne in J)Object.prototype.hasOwnProperty.call(J,ne)&&(te[ne]=J[ne])}return te},__assign$1.apply(this,arguments)},__awaiter$2=function(te,J,X,re){function ne(oe){return oe instanceof X?oe:new X(function(de){de(oe)})}return new(X||(X=Promise))(function(oe,de){function ce(pe){try{ue(re.next(pe))}catch(fe){de(fe)}}function he(pe){try{ue(re.throw(pe))}catch(fe){de(fe)}}function ue(pe){pe.done?oe(pe.value):ne(pe.value).then(ce,he)}ue((re=re.apply(te,J||[])).next())})},__generator$2=function(te,J){var X={label:0,sent:function(){if(oe[0]&1)throw oe[1];return oe[1]},trys:[],ops:[]},re,ne,oe,de;return de={next:ce(0),throw:ce(1),return:ce(2)},typeof Symbol=="function"&&(de[Symbol.iterator]=function(){return this}),de;function ce(ue){return function(pe){return he([ue,pe])}}function he(ue){if(re)throw new TypeError("Generator is already executing.");for(;X;)try{if(re=1,ne&&(oe=ue[0]&2?ne.return:ue[0]?ne.throw||((oe=ne.return)&&oe.call(ne),0):ne.next)&&!(oe=oe.call(ne,ue[1])).done)return oe;switch(ne=0,oe&&(ue=[ue[0]&2,oe.value]),ue[0]){case 0:case 1:oe=ue;break;case 4:return X.label++,{value:ue[1],done:!1};case 5:X.label++,ne=ue[1],ue=[0];continue;case 7:ue=X.ops.pop(),X.trys.pop();continue;default:if(oe=X.trys,!(oe=oe.length>0&&oe[oe.length-1])&&(ue[0]===6||ue[0]===2)){X=0;continue}if(ue[0]===3&&(!oe||ue[1]>oe[0]&&ue[1]<oe[3])){X.label=ue[1];break}if(ue[0]===6&&X.label<oe[1]){X.label=oe[1],oe=ue;break}if(oe&&X.label<oe[2]){X.label=oe[2],X.ops.push(ue);break}oe[2]&&X.ops.pop(),X.trys.pop();continue}ue=J.call(te,X)}catch(pe){ue=[6,pe],ne=0}finally{re=oe=0}if(ue[0]&5)throw ue[1];return{value:ue[0]?ue[1]:void 0,done:!0}}},__spreadArray$1=function(te,J,X){if(X||arguments.length===2)for(var re=0,ne=J.length,oe;re<ne;re++)(oe||!(re in J))&&(oe||(oe=Array.prototype.slice.call(J,0,re)),oe[re]=J[re]);return te.concat(oe||Array.prototype.slice.call(J))};function _resolveRequests(te,J){return te.reduce(function(X,re){var ne=J(re),oe=re.target.type;return oe===TargetTypeEnum.ConstructorArgument?X.constructorInjections.push(ne):(X.propertyRequests.push(re),X.propertyInjections.push(ne)),X.isAsync||(X.isAsync=isPromiseOrContainsPromise(ne)),X},{constructorInjections:[],propertyInjections:[],propertyRequests:[],isAsync:!1})}function _createInstance(te,J,X){var re;if(J.length>0){var ne=_resolveRequests(J,X),oe=__assign$1(__assign$1({},ne),{constr:te});ne.isAsync?re=createInstanceWithInjectionsAsync(oe):re=createInstanceWithInjections(oe)}else re=new te;return re}function createInstanceWithInjections(te){var J,X=new((J=te.constr).bind.apply(J,__spreadArray$1([void 0],te.constructorInjections,!1)));return te.propertyRequests.forEach(function(re,ne){var oe=re.target.identifier,de=te.propertyInjections[ne];(!re.target.isOptional()||de!==void 0)&&(X[oe]=de)}),X}function createInstanceWithInjectionsAsync(te){return __awaiter$2(this,void 0,void 0,function(){var J,X;return __generator$2(this,function(re){switch(re.label){case 0:return[4,possiblyWaitInjections(te.constructorInjections)];case 1:return J=re.sent(),[4,possiblyWaitInjections(te.propertyInjections)];case 2:return X=re.sent(),[2,createInstanceWithInjections(__assign$1(__assign$1({},te),{constructorInjections:J,propertyInjections:X}))]}})})}function possiblyWaitInjections(te){return __awaiter$2(this,void 0,void 0,function(){var J,X,re,ne;return __generator$2(this,function(oe){for(J=[],X=0,re=te;X<re.length;X++)ne=re[X],Array.isArray(ne)?J.push(Promise.all(ne)):J.push(ne);return[2,Promise.all(J)]})})}function _getInstanceAfterPostConstruct(te,J){var X=_postConstruct(te,J);return isPromise(X)?X.then(function(){return J}):J}function _postConstruct(te,J){var X,re;if(Reflect.hasMetadata(POST_CONSTRUCT,te)){var ne=Reflect.getMetadata(POST_CONSTRUCT,te);try{return(re=(X=J)[ne.value])===null||re===void 0?void 0:re.call(X)}catch(oe){if(oe instanceof Error)throw new Error(POST_CONSTRUCT_ERROR(te.name,oe.message))}}}function _validateInstanceResolution(te,J){te.scope!==BindingScopeEnum.Singleton&&_throwIfHandlingDeactivation(te,J)}function _throwIfHandlingDeactivation(te,J){var X="Class cannot be instantiated in "+(te.scope===BindingScopeEnum.Request?"request":"transient")+" scope.";if(typeof te.onDeactivation=="function")throw new Error(ON_DEACTIVATION_ERROR(J.name,X));if(Reflect.hasMetadata(PRE_DESTROY,J))throw new Error(PRE_DESTROY_ERROR(J.name,X))}function resolveInstance(te,J,X,re){_validateInstanceResolution(te,J);var ne=_createInstance(J,X,re);return isPromise(ne)?ne.then(function(oe){return _getInstanceAfterPostConstruct(J,oe)}):_getInstanceAfterPostConstruct(J,ne)}var __awaiter$1=function(te,J,X,re){function ne(oe){return oe instanceof X?oe:new X(function(de){de(oe)})}return new(X||(X=Promise))(function(oe,de){function ce(pe){try{ue(re.next(pe))}catch(fe){de(fe)}}function he(pe){try{ue(re.throw(pe))}catch(fe){de(fe)}}function ue(pe){pe.done?oe(pe.value):ne(pe.value).then(ce,he)}ue((re=re.apply(te,J||[])).next())})},__generator$1=function(te,J){var X={label:0,sent:function(){if(oe[0]&1)throw oe[1];return oe[1]},trys:[],ops:[]},re,ne,oe,de;return de={next:ce(0),throw:ce(1),return:ce(2)},typeof Symbol=="function"&&(de[Symbol.iterator]=function(){return this}),de;function ce(ue){return function(pe){return he([ue,pe])}}function he(ue){if(re)throw new TypeError("Generator is already executing.");for(;X;)try{if(re=1,ne&&(oe=ue[0]&2?ne.return:ue[0]?ne.throw||((oe=ne.return)&&oe.call(ne),0):ne.next)&&!(oe=oe.call(ne,ue[1])).done)return oe;switch(ne=0,oe&&(ue=[ue[0]&2,oe.value]),ue[0]){case 0:case 1:oe=ue;break;case 4:return X.label++,{value:ue[1],done:!1};case 5:X.label++,ne=ue[1],ue=[0];continue;case 7:ue=X.ops.pop(),X.trys.pop();continue;default:if(oe=X.trys,!(oe=oe.length>0&&oe[oe.length-1])&&(ue[0]===6||ue[0]===2)){X=0;continue}if(ue[0]===3&&(!oe||ue[1]>oe[0]&&ue[1]<oe[3])){X.label=ue[1];break}if(ue[0]===6&&X.label<oe[1]){X.label=oe[1],oe=ue;break}if(oe&&X.label<oe[2]){X.label=oe[2],X.ops.push(ue);break}oe[2]&&X.ops.pop(),X.trys.pop();continue}ue=J.call(te,X)}catch(pe){ue=[6,pe],ne=0}finally{re=oe=0}if(ue[0]&5)throw ue[1];return{value:ue[0]?ue[1]:void 0,done:!0}}},_resolveRequest=function(te){return function(J){J.parentContext.setCurrentRequest(J);var X=J.bindings,re=J.childRequests,ne=J.target&&J.target.isArray(),oe=!J.parentRequest||!J.parentRequest.target||!J.target||!J.parentRequest.target.matchesArray(J.target.serviceIdentifier);if(ne&&oe)return re.map(function(ce){var he=_resolveRequest(te);return he(ce)});if(J.target.isOptional()&&X.length===0)return;var de=X[0];return _resolveBinding(te,J,de)}},_resolveFactoryFromBinding=function(te,J){var X=getFactoryDetails(te);return tryAndThrowErrorIfStackOverflow(function(){return X.factory.bind(te)(J)},function(){return new Error(CIRCULAR_DEPENDENCY_IN_FACTORY(X.factoryType,J.currentRequest.serviceIdentifier.toString()))})},_getResolvedFromBinding=function(te,J,X){var re,ne=J.childRequests;switch(ensureFullyBound(X),X.type){case BindingTypeEnum.ConstantValue:case BindingTypeEnum.Function:re=X.cache;break;case BindingTypeEnum.Constructor:re=X.implementationType;break;case BindingTypeEnum.Instance:re=resolveInstance(X,X.implementationType,ne,_resolveRequest(te));break;default:re=_resolveFactoryFromBinding(X,J.parentContext)}return re},_resolveInScope=function(te,J,X){var re=tryGetFromScope(te,J);return re!==null||(re=X(),saveToScope(te,J,re)),re},_resolveBinding=function(te,J,X){return _resolveInScope(te,X,function(){var re=_getResolvedFromBinding(te,J,X);return isPromise(re)?re=re.then(function(ne){return _onActivation(J,X,ne)}):re=_onActivation(J,X,re),re})};function _onActivation(te,J,X){var re=_bindingActivation(te.parentContext,J,X),ne=_getContainersIterator(te.parentContext.container),oe,de=ne.next();do{oe=de.value;var ce=te.parentContext,he=te.serviceIdentifier,ue=_getContainerActivationsForService(oe,he);isPromise(re)?re=_activateContainerAsync(ue,ce,re):re=_activateContainer(ue,ce,re),de=ne.next()}while(de.done!==!0&&!getBindingDictionary(oe).hasKey(te.serviceIdentifier));return re}var _bindingActivation=function(te,J,X){var re;return typeof J.onActivation=="function"?re=J.onActivation(te,X):re=X,re},_activateContainer=function(te,J,X){for(var re=te.next();!re.done;){if(X=re.value(J,X),isPromise(X))return _activateContainerAsync(te,J,X);re=te.next()}return X},_activateContainerAsync=function(te,J,X){return __awaiter$1(void 0,void 0,void 0,function(){var re,ne;return __generator$1(this,function(oe){switch(oe.label){case 0:return[4,X];case 1:re=oe.sent(),ne=te.next(),oe.label=2;case 2:return ne.done?[3,4]:[4,ne.value(J,re)];case 3:return re=oe.sent(),ne=te.next(),[3,2];case 4:return[2,re]}})})},_getContainerActivationsForService=function(te,J){var X=te._activations;return X.hasKey(J)?X.get(J).values():[].values()},_getContainersIterator=function(te){for(var J=[te],X=te.parent;X!==null;)J.push(X),X=X.parent;var re=function(){var oe=J.pop();return oe!==void 0?{done:!1,value:oe}:{done:!0,value:void 0}},ne={next:re};return ne};function resolve(te){var J=_resolveRequest(te.plan.rootRequest.requestScope);return J(te.plan.rootRequest)}var traverseAncerstors=function(te,J){var X=te.parentRequest;return X!==null?J(X)?!0:traverseAncerstors(X,J):!1},taggedConstraint=function(te){return function(J){var X=function(re){return re!==null&&re.target!==null&&re.target.matchesTag(te)(J)};return X.metaData=new Metadata(te,J),X}},namedConstraint=taggedConstraint(NAMED_TAG),typeConstraint=function(te){return function(J){var X=null;if(J!==null)if(X=J.bindings[0],typeof te=="string"){var re=X.serviceIdentifier;return re===te}else{var ne=J.bindings[0].implementationType;return te===ne}return!1}},BindingWhenSyntax=(function(){function te(J){this._binding=J}return te.prototype.when=function(J){return this._binding.constraint=J,new BindingOnSyntax(this._binding)},te.prototype.whenTargetNamed=function(J){return this._binding.constraint=namedConstraint(J),new BindingOnSyntax(this._binding)},te.prototype.whenTargetIsDefault=function(){return this._binding.constraint=function(J){if(J===null)return!1;var X=J.target!==null&&!J.target.isNamed()&&!J.target.isTagged();return X},new BindingOnSyntax(this._binding)},te.prototype.whenTargetTagged=function(J,X){return this._binding.constraint=taggedConstraint(J)(X),new BindingOnSyntax(this._binding)},te.prototype.whenInjectedInto=function(J){return this._binding.constraint=function(X){return X!==null&&typeConstraint(J)(X.parentRequest)},new BindingOnSyntax(this._binding)},te.prototype.whenParentNamed=function(J){return this._binding.constraint=function(X){return X!==null&&namedConstraint(J)(X.parentRequest)},new BindingOnSyntax(this._binding)},te.prototype.whenParentTagged=function(J,X){return this._binding.constraint=function(re){return re!==null&&taggedConstraint(J)(X)(re.parentRequest)},new BindingOnSyntax(this._binding)},te.prototype.whenAnyAncestorIs=function(J){return this._binding.constraint=function(X){return X!==null&&traverseAncerstors(X,typeConstraint(J))},new BindingOnSyntax(this._binding)},te.prototype.whenNoAncestorIs=function(J){return this._binding.constraint=function(X){return X!==null&&!traverseAncerstors(X,typeConstraint(J))},new BindingOnSyntax(this._binding)},te.prototype.whenAnyAncestorNamed=function(J){return this._binding.constraint=function(X){return X!==null&&traverseAncerstors(X,namedConstraint(J))},new BindingOnSyntax(this._binding)},te.prototype.whenNoAncestorNamed=function(J){return this._binding.constraint=function(X){return X!==null&&!traverseAncerstors(X,namedConstraint(J))},new BindingOnSyntax(this._binding)},te.prototype.whenAnyAncestorTagged=function(J,X){return this._binding.constraint=function(re){return re!==null&&traverseAncerstors(re,taggedConstraint(J)(X))},new BindingOnSyntax(this._binding)},te.prototype.whenNoAncestorTagged=function(J,X){return this._binding.constraint=function(re){return re!==null&&!traverseAncerstors(re,taggedConstraint(J)(X))},new BindingOnSyntax(this._binding)},te.prototype.whenAnyAncestorMatches=function(J){return this._binding.constraint=function(X){return X!==null&&traverseAncerstors(X,J)},new BindingOnSyntax(this._binding)},te.prototype.whenNoAncestorMatches=function(J){return this._binding.constraint=function(X){return X!==null&&!traverseAncerstors(X,J)},new BindingOnSyntax(this._binding)},te})(),BindingOnSyntax=(function(){function te(J){this._binding=J}return te.prototype.onActivation=function(J){return this._binding.onActivation=J,new BindingWhenSyntax(this._binding)},te.prototype.onDeactivation=function(J){return this._binding.onDeactivation=J,new BindingWhenSyntax(this._binding)},te})(),BindingWhenOnSyntax=(function(){function te(J){this._binding=J,this._bindingWhenSyntax=new BindingWhenSyntax(this._binding),this._bindingOnSyntax=new BindingOnSyntax(this._binding)}return te.prototype.when=function(J){return this._bindingWhenSyntax.when(J)},te.prototype.whenTargetNamed=function(J){return this._bindingWhenSyntax.whenTargetNamed(J)},te.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},te.prototype.whenTargetTagged=function(J,X){return this._bindingWhenSyntax.whenTargetTagged(J,X)},te.prototype.whenInjectedInto=function(J){return this._bindingWhenSyntax.whenInjectedInto(J)},te.prototype.whenParentNamed=function(J){return this._bindingWhenSyntax.whenParentNamed(J)},te.prototype.whenParentTagged=function(J,X){return this._bindingWhenSyntax.whenParentTagged(J,X)},te.prototype.whenAnyAncestorIs=function(J){return this._bindingWhenSyntax.whenAnyAncestorIs(J)},te.prototype.whenNoAncestorIs=function(J){return this._bindingWhenSyntax.whenNoAncestorIs(J)},te.prototype.whenAnyAncestorNamed=function(J){return this._bindingWhenSyntax.whenAnyAncestorNamed(J)},te.prototype.whenAnyAncestorTagged=function(J,X){return this._bindingWhenSyntax.whenAnyAncestorTagged(J,X)},te.prototype.whenNoAncestorNamed=function(J){return this._bindingWhenSyntax.whenNoAncestorNamed(J)},te.prototype.whenNoAncestorTagged=function(J,X){return this._bindingWhenSyntax.whenNoAncestorTagged(J,X)},te.prototype.whenAnyAncestorMatches=function(J){return this._bindingWhenSyntax.whenAnyAncestorMatches(J)},te.prototype.whenNoAncestorMatches=function(J){return this._bindingWhenSyntax.whenNoAncestorMatches(J)},te.prototype.onActivation=function(J){return this._bindingOnSyntax.onActivation(J)},te.prototype.onDeactivation=function(J){return this._bindingOnSyntax.onDeactivation(J)},te})(),BindingInSyntax=(function(){function te(J){this._binding=J}return te.prototype.inRequestScope=function(){return this._binding.scope=BindingScopeEnum.Request,new BindingWhenOnSyntax(this._binding)},te.prototype.inSingletonScope=function(){return this._binding.scope=BindingScopeEnum.Singleton,new BindingWhenOnSyntax(this._binding)},te.prototype.inTransientScope=function(){return this._binding.scope=BindingScopeEnum.Transient,new BindingWhenOnSyntax(this._binding)},te})(),BindingInWhenOnSyntax=(function(){function te(J){this._binding=J,this._bindingWhenSyntax=new BindingWhenSyntax(this._binding),this._bindingOnSyntax=new BindingOnSyntax(this._binding),this._bindingInSyntax=new BindingInSyntax(J)}return te.prototype.inRequestScope=function(){return this._bindingInSyntax.inRequestScope()},te.prototype.inSingletonScope=function(){return this._bindingInSyntax.inSingletonScope()},te.prototype.inTransientScope=function(){return this._bindingInSyntax.inTransientScope()},te.prototype.when=function(J){return this._bindingWhenSyntax.when(J)},te.prototype.whenTargetNamed=function(J){return this._bindingWhenSyntax.whenTargetNamed(J)},te.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},te.prototype.whenTargetTagged=function(J,X){return this._bindingWhenSyntax.whenTargetTagged(J,X)},te.prototype.whenInjectedInto=function(J){return this._bindingWhenSyntax.whenInjectedInto(J)},te.prototype.whenParentNamed=function(J){return this._bindingWhenSyntax.whenParentNamed(J)},te.prototype.whenParentTagged=function(J,X){return this._bindingWhenSyntax.whenParentTagged(J,X)},te.prototype.whenAnyAncestorIs=function(J){return this._bindingWhenSyntax.whenAnyAncestorIs(J)},te.prototype.whenNoAncestorIs=function(J){return this._bindingWhenSyntax.whenNoAncestorIs(J)},te.prototype.whenAnyAncestorNamed=function(J){return this._bindingWhenSyntax.whenAnyAncestorNamed(J)},te.prototype.whenAnyAncestorTagged=function(J,X){return this._bindingWhenSyntax.whenAnyAncestorTagged(J,X)},te.prototype.whenNoAncestorNamed=function(J){return this._bindingWhenSyntax.whenNoAncestorNamed(J)},te.prototype.whenNoAncestorTagged=function(J,X){return this._bindingWhenSyntax.whenNoAncestorTagged(J,X)},te.prototype.whenAnyAncestorMatches=function(J){return this._bindingWhenSyntax.whenAnyAncestorMatches(J)},te.prototype.whenNoAncestorMatches=function(J){return this._bindingWhenSyntax.whenNoAncestorMatches(J)},te.prototype.onActivation=function(J){return this._bindingOnSyntax.onActivation(J)},te.prototype.onDeactivation=function(J){return this._bindingOnSyntax.onDeactivation(J)},te})(),BindingToSyntax=(function(){function te(J){this._binding=J}return te.prototype.to=function(J){return this._binding.type=BindingTypeEnum.Instance,this._binding.implementationType=J,new BindingInWhenOnSyntax(this._binding)},te.prototype.toSelf=function(){if(typeof this._binding.serviceIdentifier!="function")throw new Error(""+INVALID_TO_SELF_VALUE);var J=this._binding.serviceIdentifier;return this.to(J)},te.prototype.toConstantValue=function(J){return this._binding.type=BindingTypeEnum.ConstantValue,this._binding.cache=J,this._binding.dynamicValue=null,this._binding.implementationType=null,this._binding.scope=BindingScopeEnum.Singleton,new BindingWhenOnSyntax(this._binding)},te.prototype.toDynamicValue=function(J){return this._binding.type=BindingTypeEnum.DynamicValue,this._binding.cache=null,this._binding.dynamicValue=J,this._binding.implementationType=null,new BindingInWhenOnSyntax(this._binding)},te.prototype.toConstructor=function(J){return this._binding.type=BindingTypeEnum.Constructor,this._binding.implementationType=J,this._binding.scope=BindingScopeEnum.Singleton,new BindingWhenOnSyntax(this._binding)},te.prototype.toFactory=function(J){return this._binding.type=BindingTypeEnum.Factory,this._binding.factory=J,this._binding.scope=BindingScopeEnum.Singleton,new BindingWhenOnSyntax(this._binding)},te.prototype.toFunction=function(J){if(typeof J!="function")throw new Error(INVALID_FUNCTION_BINDING);var X=this.toConstantValue(J);return this._binding.type=BindingTypeEnum.Function,this._binding.scope=BindingScopeEnum.Singleton,X},te.prototype.toAutoFactory=function(J){return this._binding.type=BindingTypeEnum.Factory,this._binding.factory=function(X){var re=function(){return X.container.get(J)};return re},this._binding.scope=BindingScopeEnum.Singleton,new BindingWhenOnSyntax(this._binding)},te.prototype.toAutoNamedFactory=function(J){return this._binding.type=BindingTypeEnum.Factory,this._binding.factory=function(X){return function(re){return X.container.getNamed(J,re)}},new BindingWhenOnSyntax(this._binding)},te.prototype.toProvider=function(J){return this._binding.type=BindingTypeEnum.Provider,this._binding.provider=J,this._binding.scope=BindingScopeEnum.Singleton,new BindingWhenOnSyntax(this._binding)},te.prototype.toService=function(J){this.toDynamicValue(function(X){return X.container.get(J)})},te})(),ContainerSnapshot=(function(){function te(){}return te.of=function(J,X,re,ne,oe){var de=new te;return de.bindings=J,de.middleware=X,de.deactivations=ne,de.activations=re,de.moduleActivationStore=oe,de},te})();function isClonable(te){return typeof te=="object"&&te!==null&&"clone"in te&&typeof te.clone=="function"}var Lookup=(function(){function te(){this._map=new Map}return te.prototype.getMap=function(){return this._map},te.prototype.add=function(J,X){if(J==null)throw new Error(NULL_ARGUMENT);if(X==null)throw new Error(NULL_ARGUMENT);var re=this._map.get(J);re!==void 0?re.push(X):this._map.set(J,[X])},te.prototype.get=function(J){if(J==null)throw new Error(NULL_ARGUMENT);var X=this._map.get(J);if(X!==void 0)return X;throw new Error(KEY_NOT_FOUND)},te.prototype.remove=function(J){if(J==null)throw new Error(NULL_ARGUMENT);if(!this._map.delete(J))throw new Error(KEY_NOT_FOUND)},te.prototype.removeIntersection=function(J){var X=this;this.traverse(function(re,ne){var oe=J.hasKey(re)?J.get(re):void 0;if(oe!==void 0){var de=ne.filter(function(ce){return!oe.some(function(he){return ce===he})});X._setValue(re,de)}})},te.prototype.removeByCondition=function(J){var X=this,re=[];return this._map.forEach(function(ne,oe){for(var de=[],ce=0,he=ne;ce<he.length;ce++){var ue=he[ce],pe=J(ue);pe?re.push(ue):de.push(ue)}X._setValue(oe,de)}),re},te.prototype.hasKey=function(J){if(J==null)throw new Error(NULL_ARGUMENT);return this._map.has(J)},te.prototype.clone=function(){var J=new te;return this._map.forEach(function(X,re){X.forEach(function(ne){return J.add(re,isClonable(ne)?ne.clone():ne)})}),J},te.prototype.traverse=function(J){this._map.forEach(function(X,re){J(re,X)})},te.prototype._setValue=function(J,X){X.length>0?this._map.set(J,X):this._map.delete(J)},te})(),ModuleActivationStore=(function(){function te(){this._map=new Map}return te.prototype.remove=function(J){if(this._map.has(J)){var X=this._map.get(J);return this._map.delete(J),X}return this._getEmptyHandlersStore()},te.prototype.addDeactivation=function(J,X,re){this._getModuleActivationHandlers(J).onDeactivations.add(X,re)},te.prototype.addActivation=function(J,X,re){this._getModuleActivationHandlers(J).onActivations.add(X,re)},te.prototype.clone=function(){var J=new te;return this._map.forEach(function(X,re){J._map.set(re,{onActivations:X.onActivations.clone(),onDeactivations:X.onDeactivations.clone()})}),J},te.prototype._getModuleActivationHandlers=function(J){var X=this._map.get(J);return X===void 0&&(X=this._getEmptyHandlersStore(),this._map.set(J,X)),X},te.prototype._getEmptyHandlersStore=function(){var J={onActivations:new Lookup,onDeactivations:new Lookup};return J},te})(),__assign=function(){return __assign=Object.assign||function(te){for(var J,X=1,re=arguments.length;X<re;X++){J=arguments[X];for(var ne in J)Object.prototype.hasOwnProperty.call(J,ne)&&(te[ne]=J[ne])}return te},__assign.apply(this,arguments)},__awaiter=function(te,J,X,re){function ne(oe){return oe instanceof X?oe:new X(function(de){de(oe)})}return new(X||(X=Promise))(function(oe,de){function ce(pe){try{ue(re.next(pe))}catch(fe){de(fe)}}function he(pe){try{ue(re.throw(pe))}catch(fe){de(fe)}}function ue(pe){pe.done?oe(pe.value):ne(pe.value).then(ce,he)}ue((re=re.apply(te,J||[])).next())})},__generator=function(te,J){var X={label:0,sent:function(){if(oe[0]&1)throw oe[1];return oe[1]},trys:[],ops:[]},re,ne,oe,de;return de={next:ce(0),throw:ce(1),return:ce(2)},typeof Symbol=="function"&&(de[Symbol.iterator]=function(){return this}),de;function ce(ue){return function(pe){return he([ue,pe])}}function he(ue){if(re)throw new TypeError("Generator is already executing.");for(;X;)try{if(re=1,ne&&(oe=ue[0]&2?ne.return:ue[0]?ne.throw||((oe=ne.return)&&oe.call(ne),0):ne.next)&&!(oe=oe.call(ne,ue[1])).done)return oe;switch(ne=0,oe&&(ue=[ue[0]&2,oe.value]),ue[0]){case 0:case 1:oe=ue;break;case 4:return X.label++,{value:ue[1],done:!1};case 5:X.label++,ne=ue[1],ue=[0];continue;case 7:ue=X.ops.pop(),X.trys.pop();continue;default:if(oe=X.trys,!(oe=oe.length>0&&oe[oe.length-1])&&(ue[0]===6||ue[0]===2)){X=0;continue}if(ue[0]===3&&(!oe||ue[1]>oe[0]&&ue[1]<oe[3])){X.label=ue[1];break}if(ue[0]===6&&X.label<oe[1]){X.label=oe[1],oe=ue;break}if(oe&&X.label<oe[2]){X.label=oe[2],X.ops.push(ue);break}oe[2]&&X.ops.pop(),X.trys.pop();continue}ue=J.call(te,X)}catch(pe){ue=[6,pe],ne=0}finally{re=oe=0}if(ue[0]&5)throw ue[1];return{value:ue[0]?ue[1]:void 0,done:!0}}},__spreadArray=function(te,J,X){if(X||arguments.length===2)for(var re=0,ne=J.length,oe;re<ne;re++)(oe||!(re in J))&&(oe||(oe=Array.prototype.slice.call(J,0,re)),oe[re]=J[re]);return te.concat(oe||Array.prototype.slice.call(J))},Container=(function(){function te(J){var X=J||{};if(typeof X!="object")throw new Error(""+CONTAINER_OPTIONS_MUST_BE_AN_OBJECT);if(X.defaultScope===void 0)X.defaultScope=BindingScopeEnum.Transient;else if(X.defaultScope!==BindingScopeEnum.Singleton&&X.defaultScope!==BindingScopeEnum.Transient&&X.defaultScope!==BindingScopeEnum.Request)throw new Error(""+CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE);if(X.autoBindInjectable===void 0)X.autoBindInjectable=!1;else if(typeof X.autoBindInjectable!="boolean")throw new Error(""+CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE);if(X.skipBaseClassChecks===void 0)X.skipBaseClassChecks=!1;else if(typeof X.skipBaseClassChecks!="boolean")throw new Error(""+CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK);this.options={autoBindInjectable:X.autoBindInjectable,defaultScope:X.defaultScope,skipBaseClassChecks:X.skipBaseClassChecks},this.id=id(),this._bindingDictionary=new Lookup,this._snapshots=[],this._middleware=null,this._activations=new Lookup,this._deactivations=new Lookup,this.parent=null,this._metadataReader=new MetadataReader,this._moduleActivationStore=new ModuleActivationStore}return te.merge=function(J,X){for(var re=[],ne=2;ne<arguments.length;ne++)re[ne-2]=arguments[ne];var oe=new te,de=__spreadArray([J,X],re,!0).map(function(ue){return getBindingDictionary(ue)}),ce=getBindingDictionary(oe);function he(ue,pe){ue.traverse(function(fe,be){be.forEach(function(ge){pe.add(ge.serviceIdentifier,ge.clone())})})}return de.forEach(function(ue){he(ue,ce)}),oe},te.prototype.load=function(){for(var J=[],X=0;X<arguments.length;X++)J[X]=arguments[X];for(var re=this._getContainerModuleHelpersFactory(),ne=0,oe=J;ne<oe.length;ne++){var de=oe[ne],ce=re(de.id);de.registry(ce.bindFunction,ce.unbindFunction,ce.isboundFunction,ce.rebindFunction,ce.unbindAsyncFunction,ce.onActivationFunction,ce.onDeactivationFunction)}},te.prototype.loadAsync=function(){for(var J=[],X=0;X<arguments.length;X++)J[X]=arguments[X];return __awaiter(this,void 0,void 0,function(){var re,ne,oe,de,ce;return __generator(this,function(he){switch(he.label){case 0:re=this._getContainerModuleHelpersFactory(),ne=0,oe=J,he.label=1;case 1:return ne<oe.length?(de=oe[ne],ce=re(de.id),[4,de.registry(ce.bindFunction,ce.unbindFunction,ce.isboundFunction,ce.rebindFunction,ce.unbindAsyncFunction,ce.onActivationFunction,ce.onDeactivationFunction)]):[3,4];case 2:he.sent(),he.label=3;case 3:return ne++,[3,1];case 4:return[2]}})})},te.prototype.unload=function(){for(var J=this,X=[],re=0;re<arguments.length;re++)X[re]=arguments[re];X.forEach(function(ne){var oe=J._removeModuleBindings(ne.id);J._deactivateSingletons(oe),J._removeModuleHandlers(ne.id)})},te.prototype.unloadAsync=function(){for(var J=[],X=0;X<arguments.length;X++)J[X]=arguments[X];return __awaiter(this,void 0,void 0,function(){var re,ne,oe,de;return __generator(this,function(ce){switch(ce.label){case 0:re=0,ne=J,ce.label=1;case 1:return re<ne.length?(oe=ne[re],de=this._removeModuleBindings(oe.id),[4,this._deactivateSingletonsAsync(de)]):[3,4];case 2:ce.sent(),this._removeModuleHandlers(oe.id),ce.label=3;case 3:return re++,[3,1];case 4:return[2]}})})},te.prototype.bind=function(J){var X=this.options.defaultScope||BindingScopeEnum.Transient,re=new Binding(J,X);return this._bindingDictionary.add(J,re),new BindingToSyntax(re)},te.prototype.rebind=function(J){return this.unbind(J),this.bind(J)},te.prototype.rebindAsync=function(J){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(X){switch(X.label){case 0:return[4,this.unbindAsync(J)];case 1:return X.sent(),[2,this.bind(J)]}})})},te.prototype.unbind=function(J){if(this._bindingDictionary.hasKey(J)){var X=this._bindingDictionary.get(J);this._deactivateSingletons(X)}this._removeServiceFromDictionary(J)},te.prototype.unbindAsync=function(J){return __awaiter(this,void 0,void 0,function(){var X;return __generator(this,function(re){switch(re.label){case 0:return this._bindingDictionary.hasKey(J)?(X=this._bindingDictionary.get(J),[4,this._deactivateSingletonsAsync(X)]):[3,2];case 1:re.sent(),re.label=2;case 2:return this._removeServiceFromDictionary(J),[2]}})})},te.prototype.unbindAll=function(){var J=this;this._bindingDictionary.traverse(function(X,re){J._deactivateSingletons(re)}),this._bindingDictionary=new Lookup},te.prototype.unbindAllAsync=function(){return __awaiter(this,void 0,void 0,function(){var J,X=this;return __generator(this,function(re){switch(re.label){case 0:return J=[],this._bindingDictionary.traverse(function(ne,oe){J.push(X._deactivateSingletonsAsync(oe))}),[4,Promise.all(J)];case 1:return re.sent(),this._bindingDictionary=new Lookup,[2]}})})},te.prototype.onActivation=function(J,X){this._activations.add(J,X)},te.prototype.onDeactivation=function(J,X){this._deactivations.add(J,X)},te.prototype.isBound=function(J){var X=this._bindingDictionary.hasKey(J);return!X&&this.parent&&(X=this.parent.isBound(J)),X},te.prototype.isCurrentBound=function(J){return this._bindingDictionary.hasKey(J)},te.prototype.isBoundNamed=function(J,X){return this.isBoundTagged(J,NAMED_TAG,X)},te.prototype.isBoundTagged=function(J,X,re){var ne=!1;if(this._bindingDictionary.hasKey(J)){var oe=this._bindingDictionary.get(J),de=createMockRequest(this,J,X,re);ne=oe.some(function(ce){return ce.constraint(de)})}return!ne&&this.parent&&(ne=this.parent.isBoundTagged(J,X,re)),ne},te.prototype.snapshot=function(){this._snapshots.push(ContainerSnapshot.of(this._bindingDictionary.clone(),this._middleware,this._activations.clone(),this._deactivations.clone(),this._moduleActivationStore.clone()))},te.prototype.restore=function(){var J=this._snapshots.pop();if(J===void 0)throw new Error(NO_MORE_SNAPSHOTS_AVAILABLE);this._bindingDictionary=J.bindings,this._activations=J.activations,this._deactivations=J.deactivations,this._middleware=J.middleware,this._moduleActivationStore=J.moduleActivationStore},te.prototype.createChild=function(J){var X=new te(J||this.options);return X.parent=this,X},te.prototype.applyMiddleware=function(){for(var J=[],X=0;X<arguments.length;X++)J[X]=arguments[X];var re=this._middleware?this._middleware:this._planAndResolve();this._middleware=J.reduce(function(ne,oe){return oe(ne)},re)},te.prototype.applyCustomMetadataReader=function(J){this._metadataReader=J},te.prototype.get=function(J){var X=this._getNotAllArgs(J,!1);return this._getButThrowIfAsync(X)},te.prototype.getAsync=function(J){return __awaiter(this,void 0,void 0,function(){var X;return __generator(this,function(re){return X=this._getNotAllArgs(J,!1),[2,this._get(X)]})})},te.prototype.getTagged=function(J,X,re){var ne=this._getNotAllArgs(J,!1,X,re);return this._getButThrowIfAsync(ne)},te.prototype.getTaggedAsync=function(J,X,re){return __awaiter(this,void 0,void 0,function(){var ne;return __generator(this,function(oe){return ne=this._getNotAllArgs(J,!1,X,re),[2,this._get(ne)]})})},te.prototype.getNamed=function(J,X){return this.getTagged(J,NAMED_TAG,X)},te.prototype.getNamedAsync=function(J,X){return this.getTaggedAsync(J,NAMED_TAG,X)},te.prototype.getAll=function(J){var X=this._getAllArgs(J);return this._getButThrowIfAsync(X)},te.prototype.getAllAsync=function(J){var X=this._getAllArgs(J);return this._getAll(X)},te.prototype.getAllTagged=function(J,X,re){var ne=this._getNotAllArgs(J,!0,X,re);return this._getButThrowIfAsync(ne)},te.prototype.getAllTaggedAsync=function(J,X,re){var ne=this._getNotAllArgs(J,!0,X,re);return this._getAll(ne)},te.prototype.getAllNamed=function(J,X){return this.getAllTagged(J,NAMED_TAG,X)},te.prototype.getAllNamedAsync=function(J,X){return this.getAllTaggedAsync(J,NAMED_TAG,X)},te.prototype.resolve=function(J){var X=this.isBound(J);X||this.bind(J).toSelf();var re=this.get(J);return X||this.unbind(J),re},te.prototype._preDestroy=function(J,X){var re,ne;if(Reflect.hasMetadata(PRE_DESTROY,J)){var oe=Reflect.getMetadata(PRE_DESTROY,J);return(ne=(re=X)[oe.value])===null||ne===void 0?void 0:ne.call(re)}},te.prototype._removeModuleHandlers=function(J){var X=this._moduleActivationStore.remove(J);this._activations.removeIntersection(X.onActivations),this._deactivations.removeIntersection(X.onDeactivations)},te.prototype._removeModuleBindings=function(J){return this._bindingDictionary.removeByCondition(function(X){return X.moduleId===J})},te.prototype._deactivate=function(J,X){var re=this,ne=Object.getPrototypeOf(X).constructor;try{if(this._deactivations.hasKey(J.serviceIdentifier)){var oe=this._deactivateContainer(X,this._deactivations.get(J.serviceIdentifier).values());if(isPromise(oe))return this._handleDeactivationError(oe.then(function(){return re._propagateContainerDeactivationThenBindingAndPreDestroyAsync(J,X,ne)}),ne)}var de=this._propagateContainerDeactivationThenBindingAndPreDestroy(J,X,ne);if(isPromise(de))return this._handleDeactivationError(de,ne)}catch(ce){if(ce instanceof Error)throw new Error(ON_DEACTIVATION_ERROR(ne.name,ce.message))}},te.prototype._handleDeactivationError=function(J,X){return __awaiter(this,void 0,void 0,function(){var re;return __generator(this,function(ne){switch(ne.label){case 0:return ne.trys.push([0,2,,3]),[4,J];case 1:return ne.sent(),[3,3];case 2:if(re=ne.sent(),re instanceof Error)throw new Error(ON_DEACTIVATION_ERROR(X.name,re.message));return[3,3];case 3:return[2]}})})},te.prototype._deactivateContainer=function(J,X){for(var re=this,ne=X.next();ne.value;){var oe=ne.value(J);if(isPromise(oe))return oe.then(function(){return re._deactivateContainerAsync(J,X)});ne=X.next()}},te.prototype._deactivateContainerAsync=function(J,X){return __awaiter(this,void 0,void 0,function(){var re;return __generator(this,function(ne){switch(ne.label){case 0:re=X.next(),ne.label=1;case 1:return re.value?[4,re.value(J)]:[3,3];case 2:return ne.sent(),re=X.next(),[3,1];case 3:return[2]}})})},te.prototype._getContainerModuleHelpersFactory=function(){var J=this,X=function(pe,fe){pe._binding.moduleId=fe},re=function(pe){return function(fe){var be=J.bind(fe);return X(be,pe),be}},ne=function(){return function(pe){return J.unbind(pe)}},oe=function(){return function(pe){return J.unbindAsync(pe)}},de=function(){return function(pe){return J.isBound(pe)}},ce=function(pe){return function(fe){var be=J.rebind(fe);return X(be,pe),be}},he=function(pe){return function(fe,be){J._moduleActivationStore.addActivation(pe,fe,be),J.onActivation(fe,be)}},ue=function(pe){return function(fe,be){J._moduleActivationStore.addDeactivation(pe,fe,be),J.onDeactivation(fe,be)}};return function(pe){return{bindFunction:re(pe),isboundFunction:de(),onActivationFunction:he(pe),onDeactivationFunction:ue(pe),rebindFunction:ce(pe),unbindFunction:ne(),unbindAsyncFunction:oe()}}},te.prototype._getAll=function(J){return Promise.all(this._get(J))},te.prototype._get=function(J){var X=__assign(__assign({},J),{contextInterceptor:function(ne){return ne},targetType:TargetTypeEnum.Variable});if(this._middleware){var re=this._middleware(X);if(re==null)throw new Error(INVALID_MIDDLEWARE_RETURN);return re}return this._planAndResolve()(X)},te.prototype._getButThrowIfAsync=function(J){var X=this._get(J);if(isPromiseOrContainsPromise(X))throw new Error(LAZY_IN_SYNC(J.serviceIdentifier));return X},te.prototype._getAllArgs=function(J){var X={avoidConstraints:!0,isMultiInject:!0,serviceIdentifier:J};return X},te.prototype._getNotAllArgs=function(J,X,re,ne){var oe={avoidConstraints:!1,isMultiInject:X,serviceIdentifier:J,key:re,value:ne};return oe},te.prototype._planAndResolve=function(){var J=this;return function(X){var re=plan(J._metadataReader,J,X.isMultiInject,X.targetType,X.serviceIdentifier,X.key,X.value,X.avoidConstraints);re=X.contextInterceptor(re);var ne=resolve(re);return ne}},te.prototype._deactivateIfSingleton=function(J){var X=this;if(J.activated)return isPromise(J.cache)?J.cache.then(function(re){return X._deactivate(J,re)}):this._deactivate(J,J.cache)},te.prototype._deactivateSingletons=function(J){for(var X=0,re=J;X<re.length;X++){var ne=re[X],oe=this._deactivateIfSingleton(ne);if(isPromise(oe))throw new Error(ASYNC_UNBIND_REQUIRED)}},te.prototype._deactivateSingletonsAsync=function(J){return __awaiter(this,void 0,void 0,function(){var X=this;return __generator(this,function(re){switch(re.label){case 0:return[4,Promise.all(J.map(function(ne){return X._deactivateIfSingleton(ne)}))];case 1:return re.sent(),[2]}})})},te.prototype._propagateContainerDeactivationThenBindingAndPreDestroy=function(J,X,re){return this.parent?this._deactivate.bind(this.parent)(J,X):this._bindingDeactivationAndPreDestroy(J,X,re)},te.prototype._propagateContainerDeactivationThenBindingAndPreDestroyAsync=function(J,X,re){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(ne){switch(ne.label){case 0:return this.parent?[4,this._deactivate.bind(this.parent)(J,X)]:[3,2];case 1:return ne.sent(),[3,4];case 2:return[4,this._bindingDeactivationAndPreDestroyAsync(J,X,re)];case 3:ne.sent(),ne.label=4;case 4:return[2]}})})},te.prototype._removeServiceFromDictionary=function(J){try{this._bindingDictionary.remove(J)}catch{throw new Error(CANNOT_UNBIND+" "+getServiceIdentifierAsString(J))}},te.prototype._bindingDeactivationAndPreDestroy=function(J,X,re){var ne=this;if(typeof J.onDeactivation=="function"){var oe=J.onDeactivation(X);if(isPromise(oe))return oe.then(function(){return ne._preDestroy(re,X)})}return this._preDestroy(re,X)},te.prototype._bindingDeactivationAndPreDestroyAsync=function(J,X,re){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(ne){switch(ne.label){case 0:return typeof J.onDeactivation!="function"?[3,2]:[4,J.onDeactivation(X)];case 1:ne.sent(),ne.label=2;case 2:return[4,this._preDestroy(re,X)];case 3:return ne.sent(),[2]}})})},te})();function getFirstArrayDuplicate(te){for(var J=new Set,X=0,re=te;X<re.length;X++){var ne=re[X];if(J.has(ne))return ne;J.add(ne)}}function targetIsConstructorFunction(te){return te.prototype!==void 0}function _throwIfMethodParameter(te){if(te!==void 0)throw new Error(INVALID_DECORATOR_OPERATION)}function tagParameter(te,J,X,re){_throwIfMethodParameter(J),_tagParameterOrProperty(TAGGED,te,X.toString(),re)}function tagProperty(te,J,X){if(targetIsConstructorFunction(te))throw new Error(INVALID_DECORATOR_OPERATION);_tagParameterOrProperty(TAGGED_PROP,te.constructor,J,X)}function _ensureNoMetadataKeyDuplicates(te){var J=[];if(Array.isArray(te)){J=te;var X=getFirstArrayDuplicate(J.map(function(re){return re.key}));if(X!==void 0)throw new Error(DUPLICATED_METADATA+" "+X.toString())}else J=[te];return J}function _tagParameterOrProperty(te,J,X,re){var ne=_ensureNoMetadataKeyDuplicates(re),oe={};Reflect.hasOwnMetadata(te,J)&&(oe=Reflect.getMetadata(te,J));var de=oe[X];if(de===void 0)de=[];else for(var ce=function(fe){if(ne.some(function(be){return be.key===fe.key}))throw new Error(DUPLICATED_METADATA+" "+fe.key.toString())},he=0,ue=de;he<ue.length;he++){var pe=ue[he];ce(pe)}de.push.apply(de,ne),oe[X]=de,Reflect.defineMetadata(te,oe,J)}function createTaggedDecorator(te){return function(J,X,re){typeof re=="number"?tagParameter(J,X,re,te):tagProperty(J,X,te)}}function injectable(){return function(te){if(Reflect.hasOwnMetadata(PARAM_TYPES,te))throw new Error(DUPLICATED_INJECTABLE_DECORATOR);var J=Reflect.getMetadata(DESIGN_PARAM_TYPES,te)||[];return Reflect.defineMetadata(PARAM_TYPES,J,te),te}}function injectBase(te){return function(J){return function(X,re,ne){if(J===void 0){var oe=typeof X=="function"?X.name:X.constructor.name;throw new Error(UNDEFINED_INJECT_ANNOTATION(oe))}return createTaggedDecorator(new Metadata(te,J))(X,re,ne)}}}var inject=injectBase(INJECT_TAG);const registerRequest$1=(te,J)=>(X,re)=>{J.bind(re).to(re).inTransientScope(),injectable()(re);const ne=te.broker.registerRequest(X,oe=>J.get(re).handle(oe));return{dispose:()=>{J.isBound(re)&&J.unbind(re),ne.dispose()}}},brokerExtensions=(te,J)=>({registerRequest:registerRequest$1(te,J)});function rand(te){const J=Math.random()*16|0;return(te==="x"?J:J&3|8).toString(16)}function generateId(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,rand)}const mapArrayToLabelValue=(te,J,X)=>te.map(re=>{const ne=re[J],oe=re[X];return(ne===""||ne==null)&&typeof oe=="string"&&oe.trim()!==""?{label:oe,value:oe}:(ne===""||ne==null)&&(oe===""||oe==null)?null:{label:ne,value:oe}}).filter(re=>re!==null);function createConnectToStoreDecorator(te){return function(X){return(re,ne)=>{Object.defineProperty(re,ne,{get(){return this[`__${ne}`]},set(ce){this[`__${ne}`]!==ce&&(this[`__${ne}`]=Array.isArray(ce)?[...ce]:typeof ce=="object"&&ce!==null?{...ce}:ce,this.requestUpdate(ne))},configurable:!0,enumerable:!0});const oe=re.connectedCallback,de=re.disconnectedCallback;re.connectedCallback=function(){oe&&oe.call(this),this[ne]=X(te.getState()),this[`__unsubscribe__${ne}`]=te.subscribe(()=>{const ce=X(te.getState());this[ne]=Array.isArray(ce)?[...ce]:typeof ce=="object"&&ce!==null?{...ce}:ce})},re.disconnectedCallback=function(){de&&de.call(this),this[`__unsubscribe__${ne}`]&&this[`__unsubscribe__${ne}`]()}}}}function createConnectedProperty(te){return(J,X={})=>{const re=createConnectToStoreDecorator(te);return(ne,oe)=>{n$z(X)(ne,oe),re(J)(ne,oe)}}}const pdfViewerId="pdf-viewer";let shellLocaleManager;const useLocalization=async te=>{L$5("ca"),shellLocaleManager=await te.createLocaleManager(locales$1)},translate$1=te=>shellLocaleManager?shellLocaleManager.translate(te):te,locales$1={ca:{[primariaShellId]:{title:"Estació de Treball Clínica",actions:{create:"Crear",toggleMenuClose:"Tancar menú",toggleMenuOpen:"Expandir menú",askExit:"Atenció, vols sortir igualment?",finalizeVisit:"Finalitzar visita"},clinicalMonitoring:{title:"Seguiment clínic"},errors:{session:"Hi ha hagut un error amb la sessió. Siusplau, tanca i torna a obrir l'aplicació.",invalidPatient:"El pacient actual no és vàlid. Siusplau, tanca i torna a obrir l'aplicació."},header:{workCenter:"Centre treball",role:"Tipus de profesional",speciality:"Àmbit treball"},busyManager:{title:"Tasques pendents:"},pdfManager:{uploaded:"Document disponible al visor de resultats",alreadyUploaded:"Ja s'ha carregat un document amb aquest nom",navButtonLabel:"Visor PDF",missingData:"Es necesita un document o URL per enviar al visor de resultats",duplicatedSource:"Només pots envar un document o URL a la vegada"},pdfVisor:{noPdfSelected:"No hi ha cap PDF seleccionat"},importDataManager:{title:"Importar dades",actions:{cancel:"Cancel·lar",import:"Importar dades"}}}}},styles$q=".item{display:flex;cursor:pointer;border-radius:8px;padding:8px;justify-content:center;transition:background-color .3s ease}.item[expanded]{justify-content:space-between}.item:hover{background-color:var(--color-primary-900);color:#fff}.item .icon-label{display:flex;gap:8px;transition:background-color .3s}.item.active{outline:2px solid white;outline-offset:-2px}";/**
210
+ `+te+" - "+X}else return" "+te}function getFunctionName(te){if(te.name)return te.name;var J=te.toString(),X=J.match(/^function\s*([^\s(]+)/);return X?X[1]:"Anonymous function: "+J}function getSymbolDescription(te){return te.toString().slice(7,-1)}var Context=(function(){function te(J){this.id=id(),this.container=J}return te.prototype.addPlan=function(J){this.plan=J},te.prototype.setCurrentRequest=function(J){this.currentRequest=J},te})(),Metadata=(function(){function te(J,X){this.key=J,this.value=X}return te.prototype.toString=function(){return this.key===NAMED_TAG?"named: "+String(this.value).toString()+" ":"tagged: { key:"+this.key.toString()+", value: "+String(this.value)+" }"},te})(),Plan=(function(){function te(J,X){this.parentContext=J,this.rootRequest=X}return te})(),LazyServiceIdentifier=(function(){function te(J){this._cb=J}return te.prototype.unwrap=function(){return this._cb()},te})(),QueryableString=(function(){function te(J){this.str=J}return te.prototype.startsWith=function(J){return this.str.indexOf(J)===0},te.prototype.endsWith=function(J){var X="",re=J.split("").reverse().join("");return X=this.str.split("").reverse().join(""),this.startsWith.call({str:X},re)},te.prototype.contains=function(J){return this.str.indexOf(J)!==-1},te.prototype.equals=function(J){return this.str===J},te.prototype.value=function(){return this.str},te})(),Target=(function(){function te(J,X,re,ne){this.id=id(),this.type=J,this.serviceIdentifier=re;var oe=typeof X=="symbol"?getSymbolDescription(X):X;this.name=new QueryableString(oe||""),this.identifier=X,this.metadata=new Array;var de=null;typeof ne=="string"?de=new Metadata(NAMED_TAG,ne):ne instanceof Metadata&&(de=ne),de!==null&&this.metadata.push(de)}return te.prototype.hasTag=function(J){for(var X=0,re=this.metadata;X<re.length;X++){var ne=re[X];if(ne.key===J)return!0}return!1},te.prototype.isArray=function(){return this.hasTag(MULTI_INJECT_TAG)},te.prototype.matchesArray=function(J){return this.matchesTag(MULTI_INJECT_TAG)(J)},te.prototype.isNamed=function(){return this.hasTag(NAMED_TAG)},te.prototype.isTagged=function(){return this.metadata.some(function(J){return NON_CUSTOM_TAG_KEYS.every(function(X){return J.key!==X})})},te.prototype.isOptional=function(){return this.matchesTag(OPTIONAL_TAG)(!0)},te.prototype.getNamedTag=function(){return this.isNamed()?this.metadata.filter(function(J){return J.key===NAMED_TAG})[0]:null},te.prototype.getCustomTags=function(){return this.isTagged()?this.metadata.filter(function(J){return NON_CUSTOM_TAG_KEYS.every(function(X){return J.key!==X})}):null},te.prototype.matchesNamedTag=function(J){return this.matchesTag(NAMED_TAG)(J)},te.prototype.matchesTag=function(J){var X=this;return function(re){for(var ne=0,oe=X.metadata;ne<oe.length;ne++){var de=oe[ne];if(de.key===J&&de.value===re)return!0}return!1}},te})(),__spreadArray$2=function(te,J,X){if(X||arguments.length===2)for(var re=0,ne=J.length,oe;re<ne;re++)(oe||!(re in J))&&(oe||(oe=Array.prototype.slice.call(J,0,re)),oe[re]=J[re]);return te.concat(oe||Array.prototype.slice.call(J))};function getDependencies$1(te,J){var X=getFunctionName(J);return getTargets(te,X,J,!1)}function getTargets(te,J,X,re){var ne=te.getConstructorMetadata(X),oe=ne.compilerGeneratedMetadata;if(oe===void 0){var de=MISSING_INJECTABLE_ANNOTATION+" "+J+".";throw new Error(de)}var ce=ne.userGeneratedMetadata,he=Object.keys(ce),ue=X.length===0&&he.length>0,pe=he.length>X.length,fe=ue||pe?he.length:X.length,be=getConstructorArgsAsTargets(re,J,oe,ce,fe),ge=getClassPropsAsTargets(te,X,J),ve=__spreadArray$2(__spreadArray$2([],be,!0),ge,!0);return ve}function getConstructorArgsAsTarget(te,J,X,re,ne){var oe=ne[te.toString()]||[],de=formatTargetMetadata(oe),ce=de.unmanaged!==!0,he=re[te],ue=de.inject||de.multiInject;if(he=ue||he,he instanceof LazyServiceIdentifier&&(he=he.unwrap()),ce){var pe=he===Object,fe=he===Function,be=he===void 0,ge=pe||fe||be;if(!J&&ge){var ve=MISSING_INJECT_ANNOTATION+" argument "+te+" in class "+X+".";throw new Error(ve)}var me=new Target(TargetTypeEnum.ConstructorArgument,de.targetName,he);return me.metadata=oe,me}return null}function getConstructorArgsAsTargets(te,J,X,re,ne){for(var oe=[],de=0;de<ne;de++){var ce=de,he=getConstructorArgsAsTarget(ce,te,J,X,re);he!==null&&oe.push(he)}return oe}function _getServiceIdentifierForProperty(te,J,X,re){var ne=te||J;if(ne===void 0){var oe=MISSING_INJECTABLE_ANNOTATION+" for property "+String(X)+" in class "+re+".";throw new Error(oe)}return ne}function getClassPropsAsTargets(te,J,X){for(var re=te.getPropertiesMetadata(J),ne=[],oe=Object.getOwnPropertySymbols(re),de=Object.keys(re),ce=de.concat(oe),he=0,ue=ce;he<ue.length;he++){var pe=ue[he],fe=re[pe],be=formatTargetMetadata(fe),ge=be.targetName||pe,ve=_getServiceIdentifierForProperty(be.inject,be.multiInject,pe,X),me=new Target(TargetTypeEnum.ClassProperty,ge,ve);me.metadata=fe,ne.push(me)}var _e=Object.getPrototypeOf(J.prototype).constructor;if(_e!==Object){var ye=getClassPropsAsTargets(te,_e,X);ne=__spreadArray$2(__spreadArray$2([],ne,!0),ye,!0)}return ne}function getBaseClassDependencyCount(te,J){var X=Object.getPrototypeOf(J.prototype).constructor;if(X!==Object){var re=getFunctionName(X),ne=getTargets(te,re,X,!0),oe=ne.map(function(he){return he.metadata.filter(function(ue){return ue.key===UNMANAGED_TAG})}),de=[].concat.apply([],oe).length,ce=ne.length-de;return ce>0?ce:getBaseClassDependencyCount(te,X)}else return 0}function formatTargetMetadata(te){var J={};return te.forEach(function(X){J[X.key.toString()]=X.value}),{inject:J[INJECT_TAG],multiInject:J[MULTI_INJECT_TAG],targetName:J[NAME_TAG],unmanaged:J[UNMANAGED_TAG]}}var Request$1=(function(){function te(J,X,re,ne,oe){this.id=id(),this.serviceIdentifier=J,this.parentContext=X,this.parentRequest=re,this.target=oe,this.childRequests=[],this.bindings=Array.isArray(ne)?ne:[ne],this.requestScope=re===null?new Map:null}return te.prototype.addChildRequest=function(J,X,re){var ne=new te(J,this.parentContext,this,X,re);return this.childRequests.push(ne),ne},te})();function getBindingDictionary(te){return te._bindingDictionary}function _createTarget(te,J,X,re,ne,oe){var de=te?MULTI_INJECT_TAG:INJECT_TAG,ce=new Metadata(de,X),he=new Target(J,re,X,ce);if(ne!==void 0){var ue=new Metadata(ne,oe);he.metadata.push(ue)}return he}function _getActiveBindings(te,J,X,re,ne){var oe=getBindings(X.container,ne.serviceIdentifier),de=[];return oe.length===BindingCount.NoBindingsAvailable&&X.container.options.autoBindInjectable&&typeof ne.serviceIdentifier=="function"&&te.getConstructorMetadata(ne.serviceIdentifier).compilerGeneratedMetadata&&(X.container.bind(ne.serviceIdentifier).toSelf(),oe=getBindings(X.container,ne.serviceIdentifier)),J?de=oe:de=oe.filter(function(ce){var he=new Request$1(ce.serviceIdentifier,X,re,ce,ne);return ce.constraint(he)}),_validateActiveBindingCount(ne.serviceIdentifier,de,ne,X.container),de}function _validateActiveBindingCount(te,J,X,re){switch(J.length){case BindingCount.NoBindingsAvailable:if(X.isOptional())return J;var ne=getServiceIdentifierAsString(te),oe=NOT_REGISTERED;throw oe+=listMetadataForTarget(ne,X),oe+=listRegisteredBindingsForServiceIdentifier(re,ne,getBindings),new Error(oe);case BindingCount.OnlyOneBindingAvailable:return J;case BindingCount.MultipleBindingsAvailable:default:if(X.isArray())return J;var ne=getServiceIdentifierAsString(te),oe=AMBIGUOUS_MATCH+" "+ne;throw oe+=listRegisteredBindingsForServiceIdentifier(re,ne,getBindings),new Error(oe)}}function _createSubRequests(te,J,X,re,ne,oe){var de,ce;if(ne===null){de=_getActiveBindings(te,J,re,null,oe),ce=new Request$1(X,re,null,de,oe);var he=new Plan(re,ce);re.addPlan(he)}else de=_getActiveBindings(te,J,re,ne,oe),ce=ne.addChildRequest(oe.serviceIdentifier,de,oe);de.forEach(function(ue){var pe=null;if(oe.isArray())pe=ce.addChildRequest(ue.serviceIdentifier,ue,oe);else{if(ue.cache)return;pe=ce}if(ue.type===BindingTypeEnum.Instance&&ue.implementationType!==null){var fe=getDependencies$1(te,ue.implementationType);if(!re.container.options.skipBaseClassChecks){var be=getBaseClassDependencyCount(te,ue.implementationType);if(fe.length<be){var ge=ARGUMENTS_LENGTH_MISMATCH(getFunctionName(ue.implementationType));throw new Error(ge)}}fe.forEach(function(ve){_createSubRequests(te,!1,ve.serviceIdentifier,re,pe,ve)})}})}function getBindings(te,J){var X=[],re=getBindingDictionary(te);return re.hasKey(J)?X=re.get(J):te.parent!==null&&(X=getBindings(te.parent,J)),X}function plan(te,J,X,re,ne,oe,de,ce){ce===void 0&&(ce=!1);var he=new Context(J),ue=_createTarget(X,re,ne,"",oe,de);try{return _createSubRequests(te,ce,ne,he,null,ue),he}catch(pe){throw isStackOverflowExeption(pe)&&circularDependencyToException(he.plan.rootRequest),pe}}function createMockRequest(te,J,X,re){var ne=new Target(TargetTypeEnum.Variable,"",J,new Metadata(X,re)),oe=new Context(te),de=new Request$1(J,oe,null,[],ne);return de}function isPromise(te){var J=typeof te=="object"&&te!==null||typeof te=="function";return J&&typeof te.then=="function"}function isPromiseOrContainsPromise(te){return isPromise(te)?!0:Array.isArray(te)&&te.some(isPromise)}var __awaiter$3=function(te,J,X,re){function ne(oe){return oe instanceof X?oe:new X(function(de){de(oe)})}return new(X||(X=Promise))(function(oe,de){function ce(pe){try{ue(re.next(pe))}catch(fe){de(fe)}}function he(pe){try{ue(re.throw(pe))}catch(fe){de(fe)}}function ue(pe){pe.done?oe(pe.value):ne(pe.value).then(ce,he)}ue((re=re.apply(te,J||[])).next())})},__generator$3=function(te,J){var X={label:0,sent:function(){if(oe[0]&1)throw oe[1];return oe[1]},trys:[],ops:[]},re,ne,oe,de;return de={next:ce(0),throw:ce(1),return:ce(2)},typeof Symbol=="function"&&(de[Symbol.iterator]=function(){return this}),de;function ce(ue){return function(pe){return he([ue,pe])}}function he(ue){if(re)throw new TypeError("Generator is already executing.");for(;X;)try{if(re=1,ne&&(oe=ue[0]&2?ne.return:ue[0]?ne.throw||((oe=ne.return)&&oe.call(ne),0):ne.next)&&!(oe=oe.call(ne,ue[1])).done)return oe;switch(ne=0,oe&&(ue=[ue[0]&2,oe.value]),ue[0]){case 0:case 1:oe=ue;break;case 4:return X.label++,{value:ue[1],done:!1};case 5:X.label++,ne=ue[1],ue=[0];continue;case 7:ue=X.ops.pop(),X.trys.pop();continue;default:if(oe=X.trys,!(oe=oe.length>0&&oe[oe.length-1])&&(ue[0]===6||ue[0]===2)){X=0;continue}if(ue[0]===3&&(!oe||ue[1]>oe[0]&&ue[1]<oe[3])){X.label=ue[1];break}if(ue[0]===6&&X.label<oe[1]){X.label=oe[1],oe=ue;break}if(oe&&X.label<oe[2]){X.label=oe[2],X.ops.push(ue);break}oe[2]&&X.ops.pop(),X.trys.pop();continue}ue=J.call(te,X)}catch(pe){ue=[6,pe],ne=0}finally{re=oe=0}if(ue[0]&5)throw ue[1];return{value:ue[0]?ue[1]:void 0,done:!0}}},tryGetFromScope=function(te,J){return J.scope===BindingScopeEnum.Singleton&&J.activated?J.cache:J.scope===BindingScopeEnum.Request&&te.has(J.id)?te.get(J.id):null},saveToScope=function(te,J,X){J.scope===BindingScopeEnum.Singleton&&_saveToSingletonScope(J,X),J.scope===BindingScopeEnum.Request&&_saveToRequestScope(te,J,X)},_saveToRequestScope=function(te,J,X){te.has(J.id)||te.set(J.id,X)},_saveToSingletonScope=function(te,J){te.cache=J,te.activated=!0,isPromise(J)&&_saveAsyncResultToSingletonScope(te,J)},_saveAsyncResultToSingletonScope=function(te,J){return __awaiter$3(void 0,void 0,void 0,function(){var X,re;return __generator$3(this,function(ne){switch(ne.label){case 0:return ne.trys.push([0,2,,3]),[4,J];case 1:return X=ne.sent(),te.cache=X,[3,3];case 2:throw re=ne.sent(),te.cache=null,te.activated=!1,re;case 3:return[2]}})})},FactoryType;(function(te){te.DynamicValue="toDynamicValue",te.Factory="toFactory",te.Provider="toProvider"})(FactoryType||(FactoryType={}));var ensureFullyBound=function(te){var J=null;switch(te.type){case BindingTypeEnum.ConstantValue:case BindingTypeEnum.Function:J=te.cache;break;case BindingTypeEnum.Constructor:case BindingTypeEnum.Instance:J=te.implementationType;break;case BindingTypeEnum.DynamicValue:J=te.dynamicValue;break;case BindingTypeEnum.Provider:J=te.provider;break;case BindingTypeEnum.Factory:J=te.factory;break}if(J===null){var X=getServiceIdentifierAsString(te.serviceIdentifier);throw new Error(INVALID_BINDING_TYPE+" "+X)}},getFactoryDetails=function(te){switch(te.type){case BindingTypeEnum.Factory:return{factory:te.factory,factoryType:FactoryType.Factory};case BindingTypeEnum.Provider:return{factory:te.provider,factoryType:FactoryType.Provider};case BindingTypeEnum.DynamicValue:return{factory:te.dynamicValue,factoryType:FactoryType.DynamicValue};default:throw new Error("Unexpected factory type "+te.type)}},__assign$1=function(){return __assign$1=Object.assign||function(te){for(var J,X=1,re=arguments.length;X<re;X++){J=arguments[X];for(var ne in J)Object.prototype.hasOwnProperty.call(J,ne)&&(te[ne]=J[ne])}return te},__assign$1.apply(this,arguments)},__awaiter$2=function(te,J,X,re){function ne(oe){return oe instanceof X?oe:new X(function(de){de(oe)})}return new(X||(X=Promise))(function(oe,de){function ce(pe){try{ue(re.next(pe))}catch(fe){de(fe)}}function he(pe){try{ue(re.throw(pe))}catch(fe){de(fe)}}function ue(pe){pe.done?oe(pe.value):ne(pe.value).then(ce,he)}ue((re=re.apply(te,J||[])).next())})},__generator$2=function(te,J){var X={label:0,sent:function(){if(oe[0]&1)throw oe[1];return oe[1]},trys:[],ops:[]},re,ne,oe,de;return de={next:ce(0),throw:ce(1),return:ce(2)},typeof Symbol=="function"&&(de[Symbol.iterator]=function(){return this}),de;function ce(ue){return function(pe){return he([ue,pe])}}function he(ue){if(re)throw new TypeError("Generator is already executing.");for(;X;)try{if(re=1,ne&&(oe=ue[0]&2?ne.return:ue[0]?ne.throw||((oe=ne.return)&&oe.call(ne),0):ne.next)&&!(oe=oe.call(ne,ue[1])).done)return oe;switch(ne=0,oe&&(ue=[ue[0]&2,oe.value]),ue[0]){case 0:case 1:oe=ue;break;case 4:return X.label++,{value:ue[1],done:!1};case 5:X.label++,ne=ue[1],ue=[0];continue;case 7:ue=X.ops.pop(),X.trys.pop();continue;default:if(oe=X.trys,!(oe=oe.length>0&&oe[oe.length-1])&&(ue[0]===6||ue[0]===2)){X=0;continue}if(ue[0]===3&&(!oe||ue[1]>oe[0]&&ue[1]<oe[3])){X.label=ue[1];break}if(ue[0]===6&&X.label<oe[1]){X.label=oe[1],oe=ue;break}if(oe&&X.label<oe[2]){X.label=oe[2],X.ops.push(ue);break}oe[2]&&X.ops.pop(),X.trys.pop();continue}ue=J.call(te,X)}catch(pe){ue=[6,pe],ne=0}finally{re=oe=0}if(ue[0]&5)throw ue[1];return{value:ue[0]?ue[1]:void 0,done:!0}}},__spreadArray$1=function(te,J,X){if(X||arguments.length===2)for(var re=0,ne=J.length,oe;re<ne;re++)(oe||!(re in J))&&(oe||(oe=Array.prototype.slice.call(J,0,re)),oe[re]=J[re]);return te.concat(oe||Array.prototype.slice.call(J))};function _resolveRequests(te,J){return te.reduce(function(X,re){var ne=J(re),oe=re.target.type;return oe===TargetTypeEnum.ConstructorArgument?X.constructorInjections.push(ne):(X.propertyRequests.push(re),X.propertyInjections.push(ne)),X.isAsync||(X.isAsync=isPromiseOrContainsPromise(ne)),X},{constructorInjections:[],propertyInjections:[],propertyRequests:[],isAsync:!1})}function _createInstance(te,J,X){var re;if(J.length>0){var ne=_resolveRequests(J,X),oe=__assign$1(__assign$1({},ne),{constr:te});ne.isAsync?re=createInstanceWithInjectionsAsync(oe):re=createInstanceWithInjections(oe)}else re=new te;return re}function createInstanceWithInjections(te){var J,X=new((J=te.constr).bind.apply(J,__spreadArray$1([void 0],te.constructorInjections,!1)));return te.propertyRequests.forEach(function(re,ne){var oe=re.target.identifier,de=te.propertyInjections[ne];(!re.target.isOptional()||de!==void 0)&&(X[oe]=de)}),X}function createInstanceWithInjectionsAsync(te){return __awaiter$2(this,void 0,void 0,function(){var J,X;return __generator$2(this,function(re){switch(re.label){case 0:return[4,possiblyWaitInjections(te.constructorInjections)];case 1:return J=re.sent(),[4,possiblyWaitInjections(te.propertyInjections)];case 2:return X=re.sent(),[2,createInstanceWithInjections(__assign$1(__assign$1({},te),{constructorInjections:J,propertyInjections:X}))]}})})}function possiblyWaitInjections(te){return __awaiter$2(this,void 0,void 0,function(){var J,X,re,ne;return __generator$2(this,function(oe){for(J=[],X=0,re=te;X<re.length;X++)ne=re[X],Array.isArray(ne)?J.push(Promise.all(ne)):J.push(ne);return[2,Promise.all(J)]})})}function _getInstanceAfterPostConstruct(te,J){var X=_postConstruct(te,J);return isPromise(X)?X.then(function(){return J}):J}function _postConstruct(te,J){var X,re;if(Reflect.hasMetadata(POST_CONSTRUCT,te)){var ne=Reflect.getMetadata(POST_CONSTRUCT,te);try{return(re=(X=J)[ne.value])===null||re===void 0?void 0:re.call(X)}catch(oe){if(oe instanceof Error)throw new Error(POST_CONSTRUCT_ERROR(te.name,oe.message))}}}function _validateInstanceResolution(te,J){te.scope!==BindingScopeEnum.Singleton&&_throwIfHandlingDeactivation(te,J)}function _throwIfHandlingDeactivation(te,J){var X="Class cannot be instantiated in "+(te.scope===BindingScopeEnum.Request?"request":"transient")+" scope.";if(typeof te.onDeactivation=="function")throw new Error(ON_DEACTIVATION_ERROR(J.name,X));if(Reflect.hasMetadata(PRE_DESTROY,J))throw new Error(PRE_DESTROY_ERROR(J.name,X))}function resolveInstance(te,J,X,re){_validateInstanceResolution(te,J);var ne=_createInstance(J,X,re);return isPromise(ne)?ne.then(function(oe){return _getInstanceAfterPostConstruct(J,oe)}):_getInstanceAfterPostConstruct(J,ne)}var __awaiter$1=function(te,J,X,re){function ne(oe){return oe instanceof X?oe:new X(function(de){de(oe)})}return new(X||(X=Promise))(function(oe,de){function ce(pe){try{ue(re.next(pe))}catch(fe){de(fe)}}function he(pe){try{ue(re.throw(pe))}catch(fe){de(fe)}}function ue(pe){pe.done?oe(pe.value):ne(pe.value).then(ce,he)}ue((re=re.apply(te,J||[])).next())})},__generator$1=function(te,J){var X={label:0,sent:function(){if(oe[0]&1)throw oe[1];return oe[1]},trys:[],ops:[]},re,ne,oe,de;return de={next:ce(0),throw:ce(1),return:ce(2)},typeof Symbol=="function"&&(de[Symbol.iterator]=function(){return this}),de;function ce(ue){return function(pe){return he([ue,pe])}}function he(ue){if(re)throw new TypeError("Generator is already executing.");for(;X;)try{if(re=1,ne&&(oe=ue[0]&2?ne.return:ue[0]?ne.throw||((oe=ne.return)&&oe.call(ne),0):ne.next)&&!(oe=oe.call(ne,ue[1])).done)return oe;switch(ne=0,oe&&(ue=[ue[0]&2,oe.value]),ue[0]){case 0:case 1:oe=ue;break;case 4:return X.label++,{value:ue[1],done:!1};case 5:X.label++,ne=ue[1],ue=[0];continue;case 7:ue=X.ops.pop(),X.trys.pop();continue;default:if(oe=X.trys,!(oe=oe.length>0&&oe[oe.length-1])&&(ue[0]===6||ue[0]===2)){X=0;continue}if(ue[0]===3&&(!oe||ue[1]>oe[0]&&ue[1]<oe[3])){X.label=ue[1];break}if(ue[0]===6&&X.label<oe[1]){X.label=oe[1],oe=ue;break}if(oe&&X.label<oe[2]){X.label=oe[2],X.ops.push(ue);break}oe[2]&&X.ops.pop(),X.trys.pop();continue}ue=J.call(te,X)}catch(pe){ue=[6,pe],ne=0}finally{re=oe=0}if(ue[0]&5)throw ue[1];return{value:ue[0]?ue[1]:void 0,done:!0}}},_resolveRequest=function(te){return function(J){J.parentContext.setCurrentRequest(J);var X=J.bindings,re=J.childRequests,ne=J.target&&J.target.isArray(),oe=!J.parentRequest||!J.parentRequest.target||!J.target||!J.parentRequest.target.matchesArray(J.target.serviceIdentifier);if(ne&&oe)return re.map(function(ce){var he=_resolveRequest(te);return he(ce)});if(J.target.isOptional()&&X.length===0)return;var de=X[0];return _resolveBinding(te,J,de)}},_resolveFactoryFromBinding=function(te,J){var X=getFactoryDetails(te);return tryAndThrowErrorIfStackOverflow(function(){return X.factory.bind(te)(J)},function(){return new Error(CIRCULAR_DEPENDENCY_IN_FACTORY(X.factoryType,J.currentRequest.serviceIdentifier.toString()))})},_getResolvedFromBinding=function(te,J,X){var re,ne=J.childRequests;switch(ensureFullyBound(X),X.type){case BindingTypeEnum.ConstantValue:case BindingTypeEnum.Function:re=X.cache;break;case BindingTypeEnum.Constructor:re=X.implementationType;break;case BindingTypeEnum.Instance:re=resolveInstance(X,X.implementationType,ne,_resolveRequest(te));break;default:re=_resolveFactoryFromBinding(X,J.parentContext)}return re},_resolveInScope=function(te,J,X){var re=tryGetFromScope(te,J);return re!==null||(re=X(),saveToScope(te,J,re)),re},_resolveBinding=function(te,J,X){return _resolveInScope(te,X,function(){var re=_getResolvedFromBinding(te,J,X);return isPromise(re)?re=re.then(function(ne){return _onActivation(J,X,ne)}):re=_onActivation(J,X,re),re})};function _onActivation(te,J,X){var re=_bindingActivation(te.parentContext,J,X),ne=_getContainersIterator(te.parentContext.container),oe,de=ne.next();do{oe=de.value;var ce=te.parentContext,he=te.serviceIdentifier,ue=_getContainerActivationsForService(oe,he);isPromise(re)?re=_activateContainerAsync(ue,ce,re):re=_activateContainer(ue,ce,re),de=ne.next()}while(de.done!==!0&&!getBindingDictionary(oe).hasKey(te.serviceIdentifier));return re}var _bindingActivation=function(te,J,X){var re;return typeof J.onActivation=="function"?re=J.onActivation(te,X):re=X,re},_activateContainer=function(te,J,X){for(var re=te.next();!re.done;){if(X=re.value(J,X),isPromise(X))return _activateContainerAsync(te,J,X);re=te.next()}return X},_activateContainerAsync=function(te,J,X){return __awaiter$1(void 0,void 0,void 0,function(){var re,ne;return __generator$1(this,function(oe){switch(oe.label){case 0:return[4,X];case 1:re=oe.sent(),ne=te.next(),oe.label=2;case 2:return ne.done?[3,4]:[4,ne.value(J,re)];case 3:return re=oe.sent(),ne=te.next(),[3,2];case 4:return[2,re]}})})},_getContainerActivationsForService=function(te,J){var X=te._activations;return X.hasKey(J)?X.get(J).values():[].values()},_getContainersIterator=function(te){for(var J=[te],X=te.parent;X!==null;)J.push(X),X=X.parent;var re=function(){var oe=J.pop();return oe!==void 0?{done:!1,value:oe}:{done:!0,value:void 0}},ne={next:re};return ne};function resolve(te){var J=_resolveRequest(te.plan.rootRequest.requestScope);return J(te.plan.rootRequest)}var traverseAncerstors=function(te,J){var X=te.parentRequest;return X!==null?J(X)?!0:traverseAncerstors(X,J):!1},taggedConstraint=function(te){return function(J){var X=function(re){return re!==null&&re.target!==null&&re.target.matchesTag(te)(J)};return X.metaData=new Metadata(te,J),X}},namedConstraint=taggedConstraint(NAMED_TAG),typeConstraint=function(te){return function(J){var X=null;if(J!==null)if(X=J.bindings[0],typeof te=="string"){var re=X.serviceIdentifier;return re===te}else{var ne=J.bindings[0].implementationType;return te===ne}return!1}},BindingWhenSyntax=(function(){function te(J){this._binding=J}return te.prototype.when=function(J){return this._binding.constraint=J,new BindingOnSyntax(this._binding)},te.prototype.whenTargetNamed=function(J){return this._binding.constraint=namedConstraint(J),new BindingOnSyntax(this._binding)},te.prototype.whenTargetIsDefault=function(){return this._binding.constraint=function(J){if(J===null)return!1;var X=J.target!==null&&!J.target.isNamed()&&!J.target.isTagged();return X},new BindingOnSyntax(this._binding)},te.prototype.whenTargetTagged=function(J,X){return this._binding.constraint=taggedConstraint(J)(X),new BindingOnSyntax(this._binding)},te.prototype.whenInjectedInto=function(J){return this._binding.constraint=function(X){return X!==null&&typeConstraint(J)(X.parentRequest)},new BindingOnSyntax(this._binding)},te.prototype.whenParentNamed=function(J){return this._binding.constraint=function(X){return X!==null&&namedConstraint(J)(X.parentRequest)},new BindingOnSyntax(this._binding)},te.prototype.whenParentTagged=function(J,X){return this._binding.constraint=function(re){return re!==null&&taggedConstraint(J)(X)(re.parentRequest)},new BindingOnSyntax(this._binding)},te.prototype.whenAnyAncestorIs=function(J){return this._binding.constraint=function(X){return X!==null&&traverseAncerstors(X,typeConstraint(J))},new BindingOnSyntax(this._binding)},te.prototype.whenNoAncestorIs=function(J){return this._binding.constraint=function(X){return X!==null&&!traverseAncerstors(X,typeConstraint(J))},new BindingOnSyntax(this._binding)},te.prototype.whenAnyAncestorNamed=function(J){return this._binding.constraint=function(X){return X!==null&&traverseAncerstors(X,namedConstraint(J))},new BindingOnSyntax(this._binding)},te.prototype.whenNoAncestorNamed=function(J){return this._binding.constraint=function(X){return X!==null&&!traverseAncerstors(X,namedConstraint(J))},new BindingOnSyntax(this._binding)},te.prototype.whenAnyAncestorTagged=function(J,X){return this._binding.constraint=function(re){return re!==null&&traverseAncerstors(re,taggedConstraint(J)(X))},new BindingOnSyntax(this._binding)},te.prototype.whenNoAncestorTagged=function(J,X){return this._binding.constraint=function(re){return re!==null&&!traverseAncerstors(re,taggedConstraint(J)(X))},new BindingOnSyntax(this._binding)},te.prototype.whenAnyAncestorMatches=function(J){return this._binding.constraint=function(X){return X!==null&&traverseAncerstors(X,J)},new BindingOnSyntax(this._binding)},te.prototype.whenNoAncestorMatches=function(J){return this._binding.constraint=function(X){return X!==null&&!traverseAncerstors(X,J)},new BindingOnSyntax(this._binding)},te})(),BindingOnSyntax=(function(){function te(J){this._binding=J}return te.prototype.onActivation=function(J){return this._binding.onActivation=J,new BindingWhenSyntax(this._binding)},te.prototype.onDeactivation=function(J){return this._binding.onDeactivation=J,new BindingWhenSyntax(this._binding)},te})(),BindingWhenOnSyntax=(function(){function te(J){this._binding=J,this._bindingWhenSyntax=new BindingWhenSyntax(this._binding),this._bindingOnSyntax=new BindingOnSyntax(this._binding)}return te.prototype.when=function(J){return this._bindingWhenSyntax.when(J)},te.prototype.whenTargetNamed=function(J){return this._bindingWhenSyntax.whenTargetNamed(J)},te.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},te.prototype.whenTargetTagged=function(J,X){return this._bindingWhenSyntax.whenTargetTagged(J,X)},te.prototype.whenInjectedInto=function(J){return this._bindingWhenSyntax.whenInjectedInto(J)},te.prototype.whenParentNamed=function(J){return this._bindingWhenSyntax.whenParentNamed(J)},te.prototype.whenParentTagged=function(J,X){return this._bindingWhenSyntax.whenParentTagged(J,X)},te.prototype.whenAnyAncestorIs=function(J){return this._bindingWhenSyntax.whenAnyAncestorIs(J)},te.prototype.whenNoAncestorIs=function(J){return this._bindingWhenSyntax.whenNoAncestorIs(J)},te.prototype.whenAnyAncestorNamed=function(J){return this._bindingWhenSyntax.whenAnyAncestorNamed(J)},te.prototype.whenAnyAncestorTagged=function(J,X){return this._bindingWhenSyntax.whenAnyAncestorTagged(J,X)},te.prototype.whenNoAncestorNamed=function(J){return this._bindingWhenSyntax.whenNoAncestorNamed(J)},te.prototype.whenNoAncestorTagged=function(J,X){return this._bindingWhenSyntax.whenNoAncestorTagged(J,X)},te.prototype.whenAnyAncestorMatches=function(J){return this._bindingWhenSyntax.whenAnyAncestorMatches(J)},te.prototype.whenNoAncestorMatches=function(J){return this._bindingWhenSyntax.whenNoAncestorMatches(J)},te.prototype.onActivation=function(J){return this._bindingOnSyntax.onActivation(J)},te.prototype.onDeactivation=function(J){return this._bindingOnSyntax.onDeactivation(J)},te})(),BindingInSyntax=(function(){function te(J){this._binding=J}return te.prototype.inRequestScope=function(){return this._binding.scope=BindingScopeEnum.Request,new BindingWhenOnSyntax(this._binding)},te.prototype.inSingletonScope=function(){return this._binding.scope=BindingScopeEnum.Singleton,new BindingWhenOnSyntax(this._binding)},te.prototype.inTransientScope=function(){return this._binding.scope=BindingScopeEnum.Transient,new BindingWhenOnSyntax(this._binding)},te})(),BindingInWhenOnSyntax=(function(){function te(J){this._binding=J,this._bindingWhenSyntax=new BindingWhenSyntax(this._binding),this._bindingOnSyntax=new BindingOnSyntax(this._binding),this._bindingInSyntax=new BindingInSyntax(J)}return te.prototype.inRequestScope=function(){return this._bindingInSyntax.inRequestScope()},te.prototype.inSingletonScope=function(){return this._bindingInSyntax.inSingletonScope()},te.prototype.inTransientScope=function(){return this._bindingInSyntax.inTransientScope()},te.prototype.when=function(J){return this._bindingWhenSyntax.when(J)},te.prototype.whenTargetNamed=function(J){return this._bindingWhenSyntax.whenTargetNamed(J)},te.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},te.prototype.whenTargetTagged=function(J,X){return this._bindingWhenSyntax.whenTargetTagged(J,X)},te.prototype.whenInjectedInto=function(J){return this._bindingWhenSyntax.whenInjectedInto(J)},te.prototype.whenParentNamed=function(J){return this._bindingWhenSyntax.whenParentNamed(J)},te.prototype.whenParentTagged=function(J,X){return this._bindingWhenSyntax.whenParentTagged(J,X)},te.prototype.whenAnyAncestorIs=function(J){return this._bindingWhenSyntax.whenAnyAncestorIs(J)},te.prototype.whenNoAncestorIs=function(J){return this._bindingWhenSyntax.whenNoAncestorIs(J)},te.prototype.whenAnyAncestorNamed=function(J){return this._bindingWhenSyntax.whenAnyAncestorNamed(J)},te.prototype.whenAnyAncestorTagged=function(J,X){return this._bindingWhenSyntax.whenAnyAncestorTagged(J,X)},te.prototype.whenNoAncestorNamed=function(J){return this._bindingWhenSyntax.whenNoAncestorNamed(J)},te.prototype.whenNoAncestorTagged=function(J,X){return this._bindingWhenSyntax.whenNoAncestorTagged(J,X)},te.prototype.whenAnyAncestorMatches=function(J){return this._bindingWhenSyntax.whenAnyAncestorMatches(J)},te.prototype.whenNoAncestorMatches=function(J){return this._bindingWhenSyntax.whenNoAncestorMatches(J)},te.prototype.onActivation=function(J){return this._bindingOnSyntax.onActivation(J)},te.prototype.onDeactivation=function(J){return this._bindingOnSyntax.onDeactivation(J)},te})(),BindingToSyntax=(function(){function te(J){this._binding=J}return te.prototype.to=function(J){return this._binding.type=BindingTypeEnum.Instance,this._binding.implementationType=J,new BindingInWhenOnSyntax(this._binding)},te.prototype.toSelf=function(){if(typeof this._binding.serviceIdentifier!="function")throw new Error(""+INVALID_TO_SELF_VALUE);var J=this._binding.serviceIdentifier;return this.to(J)},te.prototype.toConstantValue=function(J){return this._binding.type=BindingTypeEnum.ConstantValue,this._binding.cache=J,this._binding.dynamicValue=null,this._binding.implementationType=null,this._binding.scope=BindingScopeEnum.Singleton,new BindingWhenOnSyntax(this._binding)},te.prototype.toDynamicValue=function(J){return this._binding.type=BindingTypeEnum.DynamicValue,this._binding.cache=null,this._binding.dynamicValue=J,this._binding.implementationType=null,new BindingInWhenOnSyntax(this._binding)},te.prototype.toConstructor=function(J){return this._binding.type=BindingTypeEnum.Constructor,this._binding.implementationType=J,this._binding.scope=BindingScopeEnum.Singleton,new BindingWhenOnSyntax(this._binding)},te.prototype.toFactory=function(J){return this._binding.type=BindingTypeEnum.Factory,this._binding.factory=J,this._binding.scope=BindingScopeEnum.Singleton,new BindingWhenOnSyntax(this._binding)},te.prototype.toFunction=function(J){if(typeof J!="function")throw new Error(INVALID_FUNCTION_BINDING);var X=this.toConstantValue(J);return this._binding.type=BindingTypeEnum.Function,this._binding.scope=BindingScopeEnum.Singleton,X},te.prototype.toAutoFactory=function(J){return this._binding.type=BindingTypeEnum.Factory,this._binding.factory=function(X){var re=function(){return X.container.get(J)};return re},this._binding.scope=BindingScopeEnum.Singleton,new BindingWhenOnSyntax(this._binding)},te.prototype.toAutoNamedFactory=function(J){return this._binding.type=BindingTypeEnum.Factory,this._binding.factory=function(X){return function(re){return X.container.getNamed(J,re)}},new BindingWhenOnSyntax(this._binding)},te.prototype.toProvider=function(J){return this._binding.type=BindingTypeEnum.Provider,this._binding.provider=J,this._binding.scope=BindingScopeEnum.Singleton,new BindingWhenOnSyntax(this._binding)},te.prototype.toService=function(J){this.toDynamicValue(function(X){return X.container.get(J)})},te})(),ContainerSnapshot=(function(){function te(){}return te.of=function(J,X,re,ne,oe){var de=new te;return de.bindings=J,de.middleware=X,de.deactivations=ne,de.activations=re,de.moduleActivationStore=oe,de},te})();function isClonable(te){return typeof te=="object"&&te!==null&&"clone"in te&&typeof te.clone=="function"}var Lookup=(function(){function te(){this._map=new Map}return te.prototype.getMap=function(){return this._map},te.prototype.add=function(J,X){if(J==null)throw new Error(NULL_ARGUMENT);if(X==null)throw new Error(NULL_ARGUMENT);var re=this._map.get(J);re!==void 0?re.push(X):this._map.set(J,[X])},te.prototype.get=function(J){if(J==null)throw new Error(NULL_ARGUMENT);var X=this._map.get(J);if(X!==void 0)return X;throw new Error(KEY_NOT_FOUND)},te.prototype.remove=function(J){if(J==null)throw new Error(NULL_ARGUMENT);if(!this._map.delete(J))throw new Error(KEY_NOT_FOUND)},te.prototype.removeIntersection=function(J){var X=this;this.traverse(function(re,ne){var oe=J.hasKey(re)?J.get(re):void 0;if(oe!==void 0){var de=ne.filter(function(ce){return!oe.some(function(he){return ce===he})});X._setValue(re,de)}})},te.prototype.removeByCondition=function(J){var X=this,re=[];return this._map.forEach(function(ne,oe){for(var de=[],ce=0,he=ne;ce<he.length;ce++){var ue=he[ce],pe=J(ue);pe?re.push(ue):de.push(ue)}X._setValue(oe,de)}),re},te.prototype.hasKey=function(J){if(J==null)throw new Error(NULL_ARGUMENT);return this._map.has(J)},te.prototype.clone=function(){var J=new te;return this._map.forEach(function(X,re){X.forEach(function(ne){return J.add(re,isClonable(ne)?ne.clone():ne)})}),J},te.prototype.traverse=function(J){this._map.forEach(function(X,re){J(re,X)})},te.prototype._setValue=function(J,X){X.length>0?this._map.set(J,X):this._map.delete(J)},te})(),ModuleActivationStore=(function(){function te(){this._map=new Map}return te.prototype.remove=function(J){if(this._map.has(J)){var X=this._map.get(J);return this._map.delete(J),X}return this._getEmptyHandlersStore()},te.prototype.addDeactivation=function(J,X,re){this._getModuleActivationHandlers(J).onDeactivations.add(X,re)},te.prototype.addActivation=function(J,X,re){this._getModuleActivationHandlers(J).onActivations.add(X,re)},te.prototype.clone=function(){var J=new te;return this._map.forEach(function(X,re){J._map.set(re,{onActivations:X.onActivations.clone(),onDeactivations:X.onDeactivations.clone()})}),J},te.prototype._getModuleActivationHandlers=function(J){var X=this._map.get(J);return X===void 0&&(X=this._getEmptyHandlersStore(),this._map.set(J,X)),X},te.prototype._getEmptyHandlersStore=function(){var J={onActivations:new Lookup,onDeactivations:new Lookup};return J},te})(),__assign=function(){return __assign=Object.assign||function(te){for(var J,X=1,re=arguments.length;X<re;X++){J=arguments[X];for(var ne in J)Object.prototype.hasOwnProperty.call(J,ne)&&(te[ne]=J[ne])}return te},__assign.apply(this,arguments)},__awaiter=function(te,J,X,re){function ne(oe){return oe instanceof X?oe:new X(function(de){de(oe)})}return new(X||(X=Promise))(function(oe,de){function ce(pe){try{ue(re.next(pe))}catch(fe){de(fe)}}function he(pe){try{ue(re.throw(pe))}catch(fe){de(fe)}}function ue(pe){pe.done?oe(pe.value):ne(pe.value).then(ce,he)}ue((re=re.apply(te,J||[])).next())})},__generator=function(te,J){var X={label:0,sent:function(){if(oe[0]&1)throw oe[1];return oe[1]},trys:[],ops:[]},re,ne,oe,de;return de={next:ce(0),throw:ce(1),return:ce(2)},typeof Symbol=="function"&&(de[Symbol.iterator]=function(){return this}),de;function ce(ue){return function(pe){return he([ue,pe])}}function he(ue){if(re)throw new TypeError("Generator is already executing.");for(;X;)try{if(re=1,ne&&(oe=ue[0]&2?ne.return:ue[0]?ne.throw||((oe=ne.return)&&oe.call(ne),0):ne.next)&&!(oe=oe.call(ne,ue[1])).done)return oe;switch(ne=0,oe&&(ue=[ue[0]&2,oe.value]),ue[0]){case 0:case 1:oe=ue;break;case 4:return X.label++,{value:ue[1],done:!1};case 5:X.label++,ne=ue[1],ue=[0];continue;case 7:ue=X.ops.pop(),X.trys.pop();continue;default:if(oe=X.trys,!(oe=oe.length>0&&oe[oe.length-1])&&(ue[0]===6||ue[0]===2)){X=0;continue}if(ue[0]===3&&(!oe||ue[1]>oe[0]&&ue[1]<oe[3])){X.label=ue[1];break}if(ue[0]===6&&X.label<oe[1]){X.label=oe[1],oe=ue;break}if(oe&&X.label<oe[2]){X.label=oe[2],X.ops.push(ue);break}oe[2]&&X.ops.pop(),X.trys.pop();continue}ue=J.call(te,X)}catch(pe){ue=[6,pe],ne=0}finally{re=oe=0}if(ue[0]&5)throw ue[1];return{value:ue[0]?ue[1]:void 0,done:!0}}},__spreadArray=function(te,J,X){if(X||arguments.length===2)for(var re=0,ne=J.length,oe;re<ne;re++)(oe||!(re in J))&&(oe||(oe=Array.prototype.slice.call(J,0,re)),oe[re]=J[re]);return te.concat(oe||Array.prototype.slice.call(J))},Container=(function(){function te(J){var X=J||{};if(typeof X!="object")throw new Error(""+CONTAINER_OPTIONS_MUST_BE_AN_OBJECT);if(X.defaultScope===void 0)X.defaultScope=BindingScopeEnum.Transient;else if(X.defaultScope!==BindingScopeEnum.Singleton&&X.defaultScope!==BindingScopeEnum.Transient&&X.defaultScope!==BindingScopeEnum.Request)throw new Error(""+CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE);if(X.autoBindInjectable===void 0)X.autoBindInjectable=!1;else if(typeof X.autoBindInjectable!="boolean")throw new Error(""+CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE);if(X.skipBaseClassChecks===void 0)X.skipBaseClassChecks=!1;else if(typeof X.skipBaseClassChecks!="boolean")throw new Error(""+CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK);this.options={autoBindInjectable:X.autoBindInjectable,defaultScope:X.defaultScope,skipBaseClassChecks:X.skipBaseClassChecks},this.id=id(),this._bindingDictionary=new Lookup,this._snapshots=[],this._middleware=null,this._activations=new Lookup,this._deactivations=new Lookup,this.parent=null,this._metadataReader=new MetadataReader,this._moduleActivationStore=new ModuleActivationStore}return te.merge=function(J,X){for(var re=[],ne=2;ne<arguments.length;ne++)re[ne-2]=arguments[ne];var oe=new te,de=__spreadArray([J,X],re,!0).map(function(ue){return getBindingDictionary(ue)}),ce=getBindingDictionary(oe);function he(ue,pe){ue.traverse(function(fe,be){be.forEach(function(ge){pe.add(ge.serviceIdentifier,ge.clone())})})}return de.forEach(function(ue){he(ue,ce)}),oe},te.prototype.load=function(){for(var J=[],X=0;X<arguments.length;X++)J[X]=arguments[X];for(var re=this._getContainerModuleHelpersFactory(),ne=0,oe=J;ne<oe.length;ne++){var de=oe[ne],ce=re(de.id);de.registry(ce.bindFunction,ce.unbindFunction,ce.isboundFunction,ce.rebindFunction,ce.unbindAsyncFunction,ce.onActivationFunction,ce.onDeactivationFunction)}},te.prototype.loadAsync=function(){for(var J=[],X=0;X<arguments.length;X++)J[X]=arguments[X];return __awaiter(this,void 0,void 0,function(){var re,ne,oe,de,ce;return __generator(this,function(he){switch(he.label){case 0:re=this._getContainerModuleHelpersFactory(),ne=0,oe=J,he.label=1;case 1:return ne<oe.length?(de=oe[ne],ce=re(de.id),[4,de.registry(ce.bindFunction,ce.unbindFunction,ce.isboundFunction,ce.rebindFunction,ce.unbindAsyncFunction,ce.onActivationFunction,ce.onDeactivationFunction)]):[3,4];case 2:he.sent(),he.label=3;case 3:return ne++,[3,1];case 4:return[2]}})})},te.prototype.unload=function(){for(var J=this,X=[],re=0;re<arguments.length;re++)X[re]=arguments[re];X.forEach(function(ne){var oe=J._removeModuleBindings(ne.id);J._deactivateSingletons(oe),J._removeModuleHandlers(ne.id)})},te.prototype.unloadAsync=function(){for(var J=[],X=0;X<arguments.length;X++)J[X]=arguments[X];return __awaiter(this,void 0,void 0,function(){var re,ne,oe,de;return __generator(this,function(ce){switch(ce.label){case 0:re=0,ne=J,ce.label=1;case 1:return re<ne.length?(oe=ne[re],de=this._removeModuleBindings(oe.id),[4,this._deactivateSingletonsAsync(de)]):[3,4];case 2:ce.sent(),this._removeModuleHandlers(oe.id),ce.label=3;case 3:return re++,[3,1];case 4:return[2]}})})},te.prototype.bind=function(J){var X=this.options.defaultScope||BindingScopeEnum.Transient,re=new Binding(J,X);return this._bindingDictionary.add(J,re),new BindingToSyntax(re)},te.prototype.rebind=function(J){return this.unbind(J),this.bind(J)},te.prototype.rebindAsync=function(J){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(X){switch(X.label){case 0:return[4,this.unbindAsync(J)];case 1:return X.sent(),[2,this.bind(J)]}})})},te.prototype.unbind=function(J){if(this._bindingDictionary.hasKey(J)){var X=this._bindingDictionary.get(J);this._deactivateSingletons(X)}this._removeServiceFromDictionary(J)},te.prototype.unbindAsync=function(J){return __awaiter(this,void 0,void 0,function(){var X;return __generator(this,function(re){switch(re.label){case 0:return this._bindingDictionary.hasKey(J)?(X=this._bindingDictionary.get(J),[4,this._deactivateSingletonsAsync(X)]):[3,2];case 1:re.sent(),re.label=2;case 2:return this._removeServiceFromDictionary(J),[2]}})})},te.prototype.unbindAll=function(){var J=this;this._bindingDictionary.traverse(function(X,re){J._deactivateSingletons(re)}),this._bindingDictionary=new Lookup},te.prototype.unbindAllAsync=function(){return __awaiter(this,void 0,void 0,function(){var J,X=this;return __generator(this,function(re){switch(re.label){case 0:return J=[],this._bindingDictionary.traverse(function(ne,oe){J.push(X._deactivateSingletonsAsync(oe))}),[4,Promise.all(J)];case 1:return re.sent(),this._bindingDictionary=new Lookup,[2]}})})},te.prototype.onActivation=function(J,X){this._activations.add(J,X)},te.prototype.onDeactivation=function(J,X){this._deactivations.add(J,X)},te.prototype.isBound=function(J){var X=this._bindingDictionary.hasKey(J);return!X&&this.parent&&(X=this.parent.isBound(J)),X},te.prototype.isCurrentBound=function(J){return this._bindingDictionary.hasKey(J)},te.prototype.isBoundNamed=function(J,X){return this.isBoundTagged(J,NAMED_TAG,X)},te.prototype.isBoundTagged=function(J,X,re){var ne=!1;if(this._bindingDictionary.hasKey(J)){var oe=this._bindingDictionary.get(J),de=createMockRequest(this,J,X,re);ne=oe.some(function(ce){return ce.constraint(de)})}return!ne&&this.parent&&(ne=this.parent.isBoundTagged(J,X,re)),ne},te.prototype.snapshot=function(){this._snapshots.push(ContainerSnapshot.of(this._bindingDictionary.clone(),this._middleware,this._activations.clone(),this._deactivations.clone(),this._moduleActivationStore.clone()))},te.prototype.restore=function(){var J=this._snapshots.pop();if(J===void 0)throw new Error(NO_MORE_SNAPSHOTS_AVAILABLE);this._bindingDictionary=J.bindings,this._activations=J.activations,this._deactivations=J.deactivations,this._middleware=J.middleware,this._moduleActivationStore=J.moduleActivationStore},te.prototype.createChild=function(J){var X=new te(J||this.options);return X.parent=this,X},te.prototype.applyMiddleware=function(){for(var J=[],X=0;X<arguments.length;X++)J[X]=arguments[X];var re=this._middleware?this._middleware:this._planAndResolve();this._middleware=J.reduce(function(ne,oe){return oe(ne)},re)},te.prototype.applyCustomMetadataReader=function(J){this._metadataReader=J},te.prototype.get=function(J){var X=this._getNotAllArgs(J,!1);return this._getButThrowIfAsync(X)},te.prototype.getAsync=function(J){return __awaiter(this,void 0,void 0,function(){var X;return __generator(this,function(re){return X=this._getNotAllArgs(J,!1),[2,this._get(X)]})})},te.prototype.getTagged=function(J,X,re){var ne=this._getNotAllArgs(J,!1,X,re);return this._getButThrowIfAsync(ne)},te.prototype.getTaggedAsync=function(J,X,re){return __awaiter(this,void 0,void 0,function(){var ne;return __generator(this,function(oe){return ne=this._getNotAllArgs(J,!1,X,re),[2,this._get(ne)]})})},te.prototype.getNamed=function(J,X){return this.getTagged(J,NAMED_TAG,X)},te.prototype.getNamedAsync=function(J,X){return this.getTaggedAsync(J,NAMED_TAG,X)},te.prototype.getAll=function(J){var X=this._getAllArgs(J);return this._getButThrowIfAsync(X)},te.prototype.getAllAsync=function(J){var X=this._getAllArgs(J);return this._getAll(X)},te.prototype.getAllTagged=function(J,X,re){var ne=this._getNotAllArgs(J,!0,X,re);return this._getButThrowIfAsync(ne)},te.prototype.getAllTaggedAsync=function(J,X,re){var ne=this._getNotAllArgs(J,!0,X,re);return this._getAll(ne)},te.prototype.getAllNamed=function(J,X){return this.getAllTagged(J,NAMED_TAG,X)},te.prototype.getAllNamedAsync=function(J,X){return this.getAllTaggedAsync(J,NAMED_TAG,X)},te.prototype.resolve=function(J){var X=this.isBound(J);X||this.bind(J).toSelf();var re=this.get(J);return X||this.unbind(J),re},te.prototype._preDestroy=function(J,X){var re,ne;if(Reflect.hasMetadata(PRE_DESTROY,J)){var oe=Reflect.getMetadata(PRE_DESTROY,J);return(ne=(re=X)[oe.value])===null||ne===void 0?void 0:ne.call(re)}},te.prototype._removeModuleHandlers=function(J){var X=this._moduleActivationStore.remove(J);this._activations.removeIntersection(X.onActivations),this._deactivations.removeIntersection(X.onDeactivations)},te.prototype._removeModuleBindings=function(J){return this._bindingDictionary.removeByCondition(function(X){return X.moduleId===J})},te.prototype._deactivate=function(J,X){var re=this,ne=Object.getPrototypeOf(X).constructor;try{if(this._deactivations.hasKey(J.serviceIdentifier)){var oe=this._deactivateContainer(X,this._deactivations.get(J.serviceIdentifier).values());if(isPromise(oe))return this._handleDeactivationError(oe.then(function(){return re._propagateContainerDeactivationThenBindingAndPreDestroyAsync(J,X,ne)}),ne)}var de=this._propagateContainerDeactivationThenBindingAndPreDestroy(J,X,ne);if(isPromise(de))return this._handleDeactivationError(de,ne)}catch(ce){if(ce instanceof Error)throw new Error(ON_DEACTIVATION_ERROR(ne.name,ce.message))}},te.prototype._handleDeactivationError=function(J,X){return __awaiter(this,void 0,void 0,function(){var re;return __generator(this,function(ne){switch(ne.label){case 0:return ne.trys.push([0,2,,3]),[4,J];case 1:return ne.sent(),[3,3];case 2:if(re=ne.sent(),re instanceof Error)throw new Error(ON_DEACTIVATION_ERROR(X.name,re.message));return[3,3];case 3:return[2]}})})},te.prototype._deactivateContainer=function(J,X){for(var re=this,ne=X.next();ne.value;){var oe=ne.value(J);if(isPromise(oe))return oe.then(function(){return re._deactivateContainerAsync(J,X)});ne=X.next()}},te.prototype._deactivateContainerAsync=function(J,X){return __awaiter(this,void 0,void 0,function(){var re;return __generator(this,function(ne){switch(ne.label){case 0:re=X.next(),ne.label=1;case 1:return re.value?[4,re.value(J)]:[3,3];case 2:return ne.sent(),re=X.next(),[3,1];case 3:return[2]}})})},te.prototype._getContainerModuleHelpersFactory=function(){var J=this,X=function(pe,fe){pe._binding.moduleId=fe},re=function(pe){return function(fe){var be=J.bind(fe);return X(be,pe),be}},ne=function(){return function(pe){return J.unbind(pe)}},oe=function(){return function(pe){return J.unbindAsync(pe)}},de=function(){return function(pe){return J.isBound(pe)}},ce=function(pe){return function(fe){var be=J.rebind(fe);return X(be,pe),be}},he=function(pe){return function(fe,be){J._moduleActivationStore.addActivation(pe,fe,be),J.onActivation(fe,be)}},ue=function(pe){return function(fe,be){J._moduleActivationStore.addDeactivation(pe,fe,be),J.onDeactivation(fe,be)}};return function(pe){return{bindFunction:re(pe),isboundFunction:de(),onActivationFunction:he(pe),onDeactivationFunction:ue(pe),rebindFunction:ce(pe),unbindFunction:ne(),unbindAsyncFunction:oe()}}},te.prototype._getAll=function(J){return Promise.all(this._get(J))},te.prototype._get=function(J){var X=__assign(__assign({},J),{contextInterceptor:function(ne){return ne},targetType:TargetTypeEnum.Variable});if(this._middleware){var re=this._middleware(X);if(re==null)throw new Error(INVALID_MIDDLEWARE_RETURN);return re}return this._planAndResolve()(X)},te.prototype._getButThrowIfAsync=function(J){var X=this._get(J);if(isPromiseOrContainsPromise(X))throw new Error(LAZY_IN_SYNC(J.serviceIdentifier));return X},te.prototype._getAllArgs=function(J){var X={avoidConstraints:!0,isMultiInject:!0,serviceIdentifier:J};return X},te.prototype._getNotAllArgs=function(J,X,re,ne){var oe={avoidConstraints:!1,isMultiInject:X,serviceIdentifier:J,key:re,value:ne};return oe},te.prototype._planAndResolve=function(){var J=this;return function(X){var re=plan(J._metadataReader,J,X.isMultiInject,X.targetType,X.serviceIdentifier,X.key,X.value,X.avoidConstraints);re=X.contextInterceptor(re);var ne=resolve(re);return ne}},te.prototype._deactivateIfSingleton=function(J){var X=this;if(J.activated)return isPromise(J.cache)?J.cache.then(function(re){return X._deactivate(J,re)}):this._deactivate(J,J.cache)},te.prototype._deactivateSingletons=function(J){for(var X=0,re=J;X<re.length;X++){var ne=re[X],oe=this._deactivateIfSingleton(ne);if(isPromise(oe))throw new Error(ASYNC_UNBIND_REQUIRED)}},te.prototype._deactivateSingletonsAsync=function(J){return __awaiter(this,void 0,void 0,function(){var X=this;return __generator(this,function(re){switch(re.label){case 0:return[4,Promise.all(J.map(function(ne){return X._deactivateIfSingleton(ne)}))];case 1:return re.sent(),[2]}})})},te.prototype._propagateContainerDeactivationThenBindingAndPreDestroy=function(J,X,re){return this.parent?this._deactivate.bind(this.parent)(J,X):this._bindingDeactivationAndPreDestroy(J,X,re)},te.prototype._propagateContainerDeactivationThenBindingAndPreDestroyAsync=function(J,X,re){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(ne){switch(ne.label){case 0:return this.parent?[4,this._deactivate.bind(this.parent)(J,X)]:[3,2];case 1:return ne.sent(),[3,4];case 2:return[4,this._bindingDeactivationAndPreDestroyAsync(J,X,re)];case 3:ne.sent(),ne.label=4;case 4:return[2]}})})},te.prototype._removeServiceFromDictionary=function(J){try{this._bindingDictionary.remove(J)}catch{throw new Error(CANNOT_UNBIND+" "+getServiceIdentifierAsString(J))}},te.prototype._bindingDeactivationAndPreDestroy=function(J,X,re){var ne=this;if(typeof J.onDeactivation=="function"){var oe=J.onDeactivation(X);if(isPromise(oe))return oe.then(function(){return ne._preDestroy(re,X)})}return this._preDestroy(re,X)},te.prototype._bindingDeactivationAndPreDestroyAsync=function(J,X,re){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(ne){switch(ne.label){case 0:return typeof J.onDeactivation!="function"?[3,2]:[4,J.onDeactivation(X)];case 1:ne.sent(),ne.label=2;case 2:return[4,this._preDestroy(re,X)];case 3:return ne.sent(),[2]}})})},te})();function getFirstArrayDuplicate(te){for(var J=new Set,X=0,re=te;X<re.length;X++){var ne=re[X];if(J.has(ne))return ne;J.add(ne)}}function targetIsConstructorFunction(te){return te.prototype!==void 0}function _throwIfMethodParameter(te){if(te!==void 0)throw new Error(INVALID_DECORATOR_OPERATION)}function tagParameter(te,J,X,re){_throwIfMethodParameter(J),_tagParameterOrProperty(TAGGED,te,X.toString(),re)}function tagProperty(te,J,X){if(targetIsConstructorFunction(te))throw new Error(INVALID_DECORATOR_OPERATION);_tagParameterOrProperty(TAGGED_PROP,te.constructor,J,X)}function _ensureNoMetadataKeyDuplicates(te){var J=[];if(Array.isArray(te)){J=te;var X=getFirstArrayDuplicate(J.map(function(re){return re.key}));if(X!==void 0)throw new Error(DUPLICATED_METADATA+" "+X.toString())}else J=[te];return J}function _tagParameterOrProperty(te,J,X,re){var ne=_ensureNoMetadataKeyDuplicates(re),oe={};Reflect.hasOwnMetadata(te,J)&&(oe=Reflect.getMetadata(te,J));var de=oe[X];if(de===void 0)de=[];else for(var ce=function(fe){if(ne.some(function(be){return be.key===fe.key}))throw new Error(DUPLICATED_METADATA+" "+fe.key.toString())},he=0,ue=de;he<ue.length;he++){var pe=ue[he];ce(pe)}de.push.apply(de,ne),oe[X]=de,Reflect.defineMetadata(te,oe,J)}function createTaggedDecorator(te){return function(J,X,re){typeof re=="number"?tagParameter(J,X,re,te):tagProperty(J,X,te)}}function injectable(){return function(te){if(Reflect.hasOwnMetadata(PARAM_TYPES,te))throw new Error(DUPLICATED_INJECTABLE_DECORATOR);var J=Reflect.getMetadata(DESIGN_PARAM_TYPES,te)||[];return Reflect.defineMetadata(PARAM_TYPES,J,te),te}}function injectBase(te){return function(J){return function(X,re,ne){if(J===void 0){var oe=typeof X=="function"?X.name:X.constructor.name;throw new Error(UNDEFINED_INJECT_ANNOTATION(oe))}return createTaggedDecorator(new Metadata(te,J))(X,re,ne)}}}var inject=injectBase(INJECT_TAG);const registerRequest$1=(te,J)=>(X,re)=>{J.bind(re).to(re).inTransientScope(),injectable()(re);const ne=te.broker.registerRequest(X,oe=>J.get(re).handle(oe));return{dispose:()=>{J.isBound(re)&&J.unbind(re),ne.dispose()}}},brokerExtensions=(te,J)=>({registerRequest:registerRequest$1(te,J)});function rand(te){const J=Math.random()*16|0;return(te==="x"?J:J&3|8).toString(16)}function generateId(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,rand)}const mapArrayToLabelValue=(te,J,X)=>te.map(re=>{const ne=re[J],oe=re[X];return(ne===""||ne==null)&&typeof oe=="string"&&oe.trim()!==""?{label:oe,value:oe}:(ne===""||ne==null)&&(oe===""||oe==null)?null:{label:ne,value:oe}}).filter(re=>re!==null);function createConnectToStoreDecorator(te){return function(X){return(re,ne)=>{Object.defineProperty(re,ne,{get(){return this[`__${ne}`]},set(ce){this[`__${ne}`]!==ce&&(this[`__${ne}`]=Array.isArray(ce)?[...ce]:typeof ce=="object"&&ce!==null?{...ce}:ce,this.requestUpdate(ne))},configurable:!0,enumerable:!0});const oe=re.connectedCallback,de=re.disconnectedCallback;re.connectedCallback=function(){oe&&oe.call(this),this[ne]=X(te.getState()),this[`__unsubscribe__${ne}`]=te.subscribe(()=>{const ce=X(te.getState());this[ne]=Array.isArray(ce)?[...ce]:typeof ce=="object"&&ce!==null?{...ce}:ce})},re.disconnectedCallback=function(){de&&de.call(this),this[`__unsubscribe__${ne}`]&&this[`__unsubscribe__${ne}`]()}}}}function createConnectedProperty(te){return(J,X={})=>{const re=createConnectToStoreDecorator(te);return(ne,oe)=>{n$z(X)(ne,oe),re(J)(ne,oe)}}}const pdfViewerId="pdf-viewer";let shellLocaleManager;const useLocalization=async te=>{L$5("ca"),shellLocaleManager=await te.createLocaleManager(locales$1)},translate$1=te=>shellLocaleManager?shellLocaleManager.translate(te):te,locales$1={ca:{[primariaShellId]:{title:"Estació de Treball Clínica",actions:{create:"Crear",toggleMenuClose:"Tancar menú",toggleMenuOpen:"Expandir menú",askExit:"Atenció, vols sortir igualment?",finalizeVisit:"Finalitzar visita"},errors:{session:"Hi ha hagut un error amb la sessió. Siusplau, tanca i torna a obrir l'aplicació.",invalidPatient:"El pacient actual no és vàlid. Siusplau, tanca i torna a obrir l'aplicació."},header:{workCenter:"Centre treball",role:"Tipus de profesional",speciality:"Àmbit treball"},busyManager:{title:"Tasques pendents:"},pdfManager:{uploaded:"Document disponible al visor de resultats",alreadyUploaded:"Ja s'ha carregat un document amb aquest nom",navButtonLabel:"Visor PDF",missingData:"Es necesita un document o URL per enviar al visor de resultats",duplicatedSource:"Només pots envar un document o URL a la vegada"},pdfVisor:{noPdfSelected:"No hi ha cap PDF seleccionat"},importDataManager:{title:"Importar dades",actions:{cancel:"Cancel·lar",import:"Importar dades"}}}}},styles$q=".item{display:flex;cursor:pointer;border-radius:8px;padding:8px;justify-content:center;transition:background-color .3s ease}.item[expanded]{justify-content:space-between}.item:hover{background-color:var(--color-primary-900);color:#fff}.item .icon-label{display:flex;gap:8px;transition:background-color .3s}.item.active{outline:2px solid white;outline-offset:-2px}";/**
211
211
  * @license
212
212
  * Copyright 2017 Google LLC
213
213
  * SPDX-License-Identifier: BSD-3-Clause
@@ -642,7 +642,7 @@ ${te.searchString?.length>1?ke$1`
642
642
  </div>
643
643
  `;var __defProp$f=Object.defineProperty,__getOwnPropDesc$8=Object.getOwnPropertyDescriptor,__decorateClass$k=(te,J,X,re)=>{for(var ne=re>1?void 0:re?__getOwnPropDesc$8(J,X):J,oe=te.length-1,de;oe>=0;oe--)(de=te[oe])&&(ne=(re?de(J,X,ne):de(ne))||ne);return re&&ne&&__defProp$f(J,X,ne),ne};let ActivityHistoryMain=class extends PrimariaRegionHost(h$n){constructor(){super(...arguments),this.subscriptions=[],this._searchTimeout=null,this.maximized=!1,this.searchQuery=""}render(){return ke$1`${template$d(this)}`}connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),this._unsubscribeEvents()}firstUpdated(){super.firstUpdated(),this._subscribeEvents()}_maximize(){this.maximized=!0}_minimize(){this.maximized=!1}_subscribeEvents(){const te=this.api.broker.subscribe("mainViewChanged",({viewId:J})=>{(J==="clinical-monitoring"||J==="admin-clinical-monitoring")&&(this.maximized=!1)});this.subscriptions.push(te)}_unsubscribeEvents(){this.subscriptions.forEach(te=>te.dispose())}_handleSelectDate(te){const J=parse(te,"dd/MM/yyyy",new Date);this.scrollToClosestDate(J)}_handleSearchChange(te){typeof te.detail=="string"&&(this.searchQuery=te.detail,this._searchTimeout&&clearTimeout(this._searchTimeout),this._searchTimeout=setTimeout(()=>{this.api.broker.send(new SearchActivityHistoryItems(this.searchQuery))},300))}async _raiseEcapCronogramEvent(){const te=await this.api.broker.send("get_patient_cip");this.api.ecapEventManager.publish("CRONOGRAMA","NO_TANCAR",{CIP:te})}scrollToClosestDate(te){const J=te.getTime();this.shadowRoot.querySelector("activity-history-timeline")._scrollIntoDate(J)}};ActivityHistoryMain.styles=i$w`
644
644
  ${r$G(styles$b)}
645
- `,__decorateClass$k([n$z({type:Boolean,reflect:!0})],ActivityHistoryMain.prototype,"maximized",2),__decorateClass$k([lazyInject$2(TYPES$2.primaryApi)],ActivityHistoryMain.prototype,"api",2),__decorateClass$k([connectedProperty(activityHistoryCollectionsSelector)],ActivityHistoryMain.prototype,"historyItems",2),__decorateClass$k([connectedProperty(isCollectionInitialState)],ActivityHistoryMain.prototype,"isCollectionInitialState",2),__decorateClass$k([connectedProperty(isSomeCollectionLoadedAndOtherLoading)],ActivityHistoryMain.prototype,"isSomeCollectionLoadedAndOtherLoading",2),__decorateClass$k([n$z()],ActivityHistoryMain.prototype,"searchQuery",2),ActivityHistoryMain=__decorateClass$k([t$l("activity-history-main")],ActivityHistoryMain);const registerViews$2=te=>{te.regionManager.registerView(te.regionManager.regions.clinicalMonitoring.content,{id:te.pluginInfo.pluginId,factory:()=>Promise.resolve(new ActivityHistoryMain)})},unregisterViews$2=()=>{const te=container$2.get(TYPES$2.primaryApi);te.regionManager.removeView(te.regionManager.regions.clinicalMonitoring.content,te.pluginInfo.pluginId)},bootstrapFeatures=te=>{bootstrapActivityHistoryItem(te)},teardownFeatures=()=>{teardownActivityHistoryItem()},initialize$2=async te=>(setShellApiForOwnSpec(te),registerViews$2(te),await initializeLocalization(te),bindDeps(te),bootstrapFeatures(te),Promise.resolve()),dispose$2=()=>(setShellApiForOwnSpec(null),teardownFeatures(),unregisterViews$2(),unbindDeps(),Promise.resolve()),styles$a=":host{min-height:1px;height:100%;width:100%}.wrapper{position:relative;min-height:1px;height:100%;display:flex;flex-direction:row}.wrapper #widgets-sidebar-region{width:25%;border-left:1px solid rgb(189,189,189);overflow:auto}.wrapper .content{flex:1;display:flex;flex-direction:column}.wrapper .content #header-widgets-region{display:grid;grid-template-columns:repeat(3,1fr);gap:24px;padding:24px 24px 0}.wrapper .content #content-widgets-region{flex:1;min-height:1px;height:100%;padding:24px}@media (max-width: 1439px){:host{min-height:100vh}.wrapper{flex-direction:column}.wrapper #widgets-sidebar-region{max-width:100%;width:auto;border-left:none;overflow:auto;min-height:100%}.wrapper .content #header-widgets-region{grid-template-columns:1fr;gap:16px}.wrapper .content #content-widgets-region{height:70vh;flex:none}}",template$c=te=>ke$1`
645
+ `,__decorateClass$k([n$z({type:Boolean,reflect:!0})],ActivityHistoryMain.prototype,"maximized",2),__decorateClass$k([lazyInject$2(TYPES$2.primaryApi)],ActivityHistoryMain.prototype,"api",2),__decorateClass$k([connectedProperty(activityHistoryCollectionsSelector)],ActivityHistoryMain.prototype,"historyItems",2),__decorateClass$k([connectedProperty(isCollectionInitialState)],ActivityHistoryMain.prototype,"isCollectionInitialState",2),__decorateClass$k([connectedProperty(isSomeCollectionLoadedAndOtherLoading)],ActivityHistoryMain.prototype,"isSomeCollectionLoadedAndOtherLoading",2),__decorateClass$k([n$z()],ActivityHistoryMain.prototype,"searchQuery",2),ActivityHistoryMain=__decorateClass$k([t$l("activity-history-main")],ActivityHistoryMain);const registerViews$2=te=>{te.regionManager.registerView(te.regionManager.regions.clinicalMonitoring.content,{id:te.pluginInfo.pluginId,factory:()=>Promise.resolve(new ActivityHistoryMain)})},unregisterViews$2=()=>{const te=container$2.get(TYPES$2.primaryApi);te.regionManager.removeView(te.regionManager.regions.clinicalMonitoring.content,te.pluginInfo.pluginId)},bootstrapFeatures=te=>{bootstrapActivityHistoryItem(te)},teardownFeatures=()=>{teardownActivityHistoryItem()},initialize$2=async te=>(setShellApiForOwnSpec(te),registerViews$2(te),await initializeLocalization(te),bindDeps(te),bootstrapFeatures(te),Promise.resolve()),dispose$2=()=>(setShellApiForOwnSpec(null),teardownFeatures(),unregisterViews$2(),unbindDeps(),Promise.resolve()),styles$a=":host{min-height:1px;height:100%;width:100%}.wrapper{position:relative;min-height:1px;height:100%;display:flex;flex-direction:row}.wrapper #widgets-sidebar-region{width:25%;border-left:1px solid rgb(189,189,189);overflow:auto}.wrapper .content{flex:1;display:flex;flex-direction:column}.wrapper .content #header-widgets-region{display:grid;grid-template-columns:repeat(3,1fr);gap:24px;padding:24px 24px 0}.wrapper .content #content-widgets-region{flex:1;min-height:1px;height:100%;padding:24px}@media (max-width: 1439px){:host{min-height:100vh}.wrapper{flex-direction:column}.wrapper #widgets-sidebar-region{max-width:100%;width:auto;border-left:none;overflow:auto;min-height:100%}.wrapper .content #content-widgets-region{height:70vh;flex:none}}",template$c=te=>ke$1`
646
646
  <div class="wrapper">
647
647
  <div class="content">
648
648
  <div id="header-widgets-region"></div>
@@ -652,7 +652,7 @@ ${te.searchString?.length>1?ke$1`
652
652
  </div>
653
653
  `,TYPES$1={primaryApi:Symbol.for("primaryApi")},container$1=new Container,{lazyInject:lazyInject$1}=getDecorators(container$1);var __defProp$e=Object.defineProperty,__decorateClass$j=(te,J,X,re)=>{for(var ne=void 0,oe=te.length-1,de;oe>=0;oe--)(de=te[oe])&&(ne=de(J,X,ne)||ne);return ne&&__defProp$e(J,X,ne),ne};const Is=class Is extends PrimariaRegionHost(h$n){render(){return ke$1`${template$c()}`}firstUpdated(){this._observeMaximizedState()}_observeMaximizedState(){const J=this.renderRoot.querySelector("#content-widgets-region");if(!J)return;new MutationObserver(()=>{const re=J.querySelector("activity-history-main");if(!re)return;const ne=re.hasAttribute("maximized")||re.maximized;this._toggleWidgetsVisibility(!ne)}).observe(J,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["maximized"]})}_toggleWidgetsVisibility(J){const X=this.renderRoot.querySelector("#widgets-sidebar-region"),re=this.renderRoot.querySelector("#header-widgets-region");X&&(X.style.display=J?"":"none"),re&&(re.style.display=J?"":"none")}};Is.styles=i$w`
654
654
  ${r$G(styles$a)}
655
- `;let ClinicalMonitoring=Is;__decorateClass$j([lazyInject$1(TYPES$1.primaryApi)],ClinicalMonitoring.prototype,"api"),__decorateClass$j([s$z({targetId:"widgets-sidebar-region",name:"clinical-monitoring-widgets-sidebar-region"})],ClinicalMonitoring.prototype,"sidebarRegion"),__decorateClass$j([s$z({targetId:"header-widgets-region",name:"clinical-monitoring-header-widgets-region"})],ClinicalMonitoring.prototype,"headerRegion"),__decorateClass$j([s$z({targetId:"content-widgets-region",name:"clinical-monitoring-content-widgets-region"})],ClinicalMonitoring.prototype,"contentRegion");const registerViews$1=async te=>{t$l("clinical-monitoring")(ClinicalMonitoring),te.regionManager.registerMainView({id:te.pluginInfo.pluginId,factory:()=>{const J=new ClinicalMonitoring;return Promise.resolve(J)},isDefault:!0}),te.regionManager.registerView(te.regionManager.regions.shell.navigationMenu,{id:te.pluginInfo.pluginId,factory:()=>{const J=new PrimariaNavItem({icon:"account_box",label:"Seguiment clínic",callbackFn:()=>{te.regionManager.activateMainView(te.pluginInfo.pluginId)}});return Promise.resolve(J)},sortHint:"0020"}),setTimeout(()=>{activateClinicalMonitoringView$1(te)},300)},unregisterViews$1=te=>{te.regionManager.removeView(te.regionManager.regions.shell.main,te.pluginInfo.pluginId),te.regionManager.removeView(te.regionManager.regions.shell.navigationMenu,te.pluginInfo.pluginId)},activateClinicalMonitoringView$1=te=>{te.regionManager.activateMainView(te.pluginInfo.pluginId)},initialize$1=async te=>(registerViews$1(te),Promise.resolve()),dispose$1=te=>(unregisterViews$1(te),Promise.resolve()),styles$9=":host{min-height:1px;height:100%;width:100%}.wrapper{position:relative;min-height:1px;height:100%;display:flex;flex-direction:row}.wrapper #widgets-sidebar-region{width:50%;border-left:1px solid rgb(189,189,189);overflow:auto}.wrapper .content{flex:1;display:flex;flex-direction:column}.wrapper .content #header-widgets-region{display:grid;grid-template-columns:repeat(2,1fr);gap:24px;padding:24px 24px 0}.wrapper .content #content-widgets-region{flex:1;min-height:1px;height:100%;padding:24px}@media (max-width: 1439px){:host{min-height:100vh}.wrapper{flex-direction:column}.wrapper #widgets-sidebar-region{max-width:100%;width:auto;border-left:none;overflow:auto}.wrapper .content #header-widgets-region{grid-template-columns:1fr;gap:16px}.wrapper .content #content-widgets-region{height:70vh;flex:none}}",template$b=te=>ke$1`
655
+ `;let ClinicalMonitoring=Is;__decorateClass$j([lazyInject$1(TYPES$1.primaryApi)],ClinicalMonitoring.prototype,"api"),__decorateClass$j([s$z({targetId:"widgets-sidebar-region",name:"clinical-monitoring-widgets-sidebar-region"})],ClinicalMonitoring.prototype,"sidebarRegion"),__decorateClass$j([s$z({targetId:"header-widgets-region",name:"clinical-monitoring-header-widgets-region"})],ClinicalMonitoring.prototype,"headerRegion"),__decorateClass$j([s$z({targetId:"content-widgets-region",name:"clinical-monitoring-content-widgets-region"})],ClinicalMonitoring.prototype,"contentRegion");const registerViews$1=async te=>{t$l("clinical-monitoring")(ClinicalMonitoring),te.regionManager.registerMainView({id:te.pluginInfo.pluginId,factory:()=>{const J=new ClinicalMonitoring;return Promise.resolve(J)},isDefault:!0}),te.regionManager.registerView(te.regionManager.regions.shell.navigationMenu,{id:te.pluginInfo.pluginId,factory:()=>{const J=new PrimariaNavItem({icon:"account_box",label:"Seguiment clínic",callbackFn:()=>{te.regionManager.activateMainView(te.pluginInfo.pluginId)}});return Promise.resolve(J)},sortHint:"0020"}),setTimeout(()=>{activateClinicalMonitoringView$1(te)},300)},unregisterViews$1=te=>{te.regionManager.removeView(te.regionManager.regions.shell.main,te.pluginInfo.pluginId),te.regionManager.removeView(te.regionManager.regions.shell.navigationMenu,te.pluginInfo.pluginId)},activateClinicalMonitoringView$1=te=>{te.regionManager.activateMainView(te.pluginInfo.pluginId)},initialize$1=async te=>(registerViews$1(te),Promise.resolve()),dispose$1=te=>(unregisterViews$1(te),Promise.resolve()),styles$9=":host{min-height:1px;height:100%;width:100%}.wrapper{position:relative;min-height:1px;height:100%;display:flex;flex-direction:row}.wrapper #widgets-sidebar-region{width:50%;border-left:1px solid rgb(189,189,189);overflow:auto}.wrapper .content{flex:1;display:flex;flex-direction:column}.wrapper .content #header-widgets-region{display:grid;grid-template-columns:repeat(2,1fr);gap:24px;padding:24px 24px 0}.wrapper .content #content-widgets-region{flex:1;min-height:1px;height:100%;padding:24px}@media (max-width: 1439px){:host{min-height:100vh}.wrapper{flex-direction:column}.wrapper #widgets-sidebar-region{max-width:100%;width:auto;border-left:none;overflow:auto}.wrapper .content #content-widgets-region{height:70vh;flex:none}}",template$b=te=>ke$1`
656
656
  <div class="wrapper">
657
657
  <div class="content">
658
658
  <div id="header-widgets-region"></div>
@@ -662,7 +662,7 @@ ${te.searchString?.length>1?ke$1`
662
662
  </div>
663
663
  `,TYPES={primaryApi:Symbol.for("primaryApi")},container=new Container,{lazyInject}=getDecorators(container);var __defProp$d=Object.defineProperty,__decorateClass$i=(te,J,X,re)=>{for(var ne=void 0,oe=te.length-1,de;oe>=0;oe--)(de=te[oe])&&(ne=de(J,X,ne)||ne);return ne&&__defProp$d(J,X,ne),ne};const Ls=class Ls extends PrimariaRegionHost(h$n){render(){return ke$1`${template$b()}`}firstUpdated(){this._observeMaximizedState()}_observeMaximizedState(){const J=this.renderRoot.querySelector("#content-widgets-region");if(!J)return;new MutationObserver(()=>{const re=J.querySelector("activity-history-main");if(!re)return;const ne=re.hasAttribute("maximized")||re.maximized;this._toggleWidgetsVisibility(!ne)}).observe(J,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["maximized"]})}_toggleWidgetsVisibility(J){const X=this.renderRoot.querySelector("#widgets-sidebar-region"),re=this.renderRoot.querySelector("#header-widgets-region");X&&(X.style.display=J?"":"none"),re&&(re.style.display=J?"":"none")}};Ls.styles=i$w`
664
664
  ${r$G(styles$9)}
665
- `;let AdminClinicalMonitoring=Ls;__decorateClass$i([lazyInject(TYPES.primaryApi)],AdminClinicalMonitoring.prototype,"api"),__decorateClass$i([s$z({targetId:"widgets-sidebar-region",name:"clinical-monitoring-widgets-sidebar-region"})],AdminClinicalMonitoring.prototype,"sidebarRegion"),__decorateClass$i([s$z({targetId:"header-widgets-region",name:"clinical-monitoring-header-widgets-region"})],AdminClinicalMonitoring.prototype,"headerRegion"),__decorateClass$i([s$z({targetId:"content-widgets-region",name:"clinical-monitoring-content-widgets-region"})],AdminClinicalMonitoring.prototype,"contentRegion");const registerViews=async te=>{t$l("clinical-monitoring")(AdminClinicalMonitoring),te.regionManager.registerMainView({id:te.pluginInfo.pluginId,factory:()=>{const J=new AdminClinicalMonitoring;return Promise.resolve(J)},isDefault:!0}),te.regionManager.registerView(te.regionManager.regions.shell.navigationMenu,{id:te.pluginInfo.pluginId,factory:()=>{const J=new PrimariaNavItem({icon:"account_box",label:"Seguiment clínic",callbackFn:()=>{te.regionManager.activateMainView(te.pluginInfo.pluginId)}});return Promise.resolve(J)},sortHint:"0020"}),setTimeout(()=>{activateClinicalMonitoringView(te)},300)},unregisterViews=te=>{te.regionManager.removeView(te.regionManager.regions.shell.main,te.pluginInfo.pluginId),te.regionManager.removeView(te.regionManager.regions.shell.navigationMenu,te.pluginInfo.pluginId)},activateClinicalMonitoringView=te=>{te.regionManager.activateMainView(te.pluginInfo.pluginId)},initialize=async te=>(registerViews(te),Promise.resolve()),dispose=te=>(unregisterViews(te),Promise.resolve());let bootstrappedPlugins=[];const commonPlugins=[{pluginId:"activity-history",importer:()=>Promise.resolve({initialize:initialize$2,dispose:dispose$2})}],doctorInternalPlugins=[{pluginId:"clinical-monitoring",importer:()=>Promise.resolve({initialize:initialize$1,dispose:dispose$1})}],administrativeInternalPlugins=[{pluginId:"admin-clinical-monitoring",importer:()=>Promise.resolve({initialize,dispose})}],getPluginsByUserRole=te=>te?commonPlugins.concat(administrativeInternalPlugins):commonPlugins.concat(doctorInternalPlugins),bootstrapPlugins=async te=>{const J=shellApi.userManager.isUserRoleAdministrative(),re=getPluginsByUserRole(J).concat(te||[]);bootstrappedPlugins=await v$i(re,primariaApiFactory)},disposePlugins=async()=>Promise.all(bootstrappedPlugins.map(te=>te?.dispose()));var __getOwnPropDesc$7=Object.getOwnPropertyDescriptor,__decorateClass$h=(te,J,X,re)=>{for(var ne=re>1?void 0:re?__getOwnPropDesc$7(J,X):J,oe=te.length-1,de;oe>=0;oe--)(de=te[oe])&&(ne=de(ne)||ne);return ne},__decorateParam$4=(te,J)=>(X,re)=>J(X,re,te);let ExitShellHandler=class{constructor(te){this.api=te}async handle(te){const J=te&&te.ecapEvent!==void 0?te:void 0;try{const X=this.api.pluginBusyManager.getBusyPluginTasks();if(X.length>0){const{confirmed:re}=await this.askForClose(X);if(!re)return}await Promise.race([disposePlugins(),this.timeout(1e4)]),disposeShell(),this.emitClose(J)}catch(X){this.api.notificationService.error(X.message),this.emitClose(J)}}askForClose(te){return this.api.interactionService.confirm({busyTasks:te},{component:PluginBusyList},{title:translate$1("actions.askExit"),state:"error",confirmButtonText:"Sí",cancelButtonText:"No"})}timeout(te){return new Promise(J=>setTimeout(J,te))}emitClose(te){te?raiseCustomCloseEvent(te):raiseCloseEvent()}};ExitShellHandler=__decorateClass$h([__decorateParam$4(0,inject(TYPES$3.primaryApi))],ExitShellHandler);class ExitShell{constructor(J,X){this.ecapEvent=J,this.payload=X}}let request$3;const useExitShell=te=>{disposeExitShell(),request$3=registerRequest(te,container$3)(ExitShell,ExitShellHandler)},disposeExitShell=()=>{request$3?.dispose()};var __getOwnPropDesc$6=Object.getOwnPropertyDescriptor,__decorateClass$g=(te,J,X,re)=>{for(var ne=re>1?void 0:re?__getOwnPropDesc$6(J,X):J,oe=te.length-1,de;oe>=0;oe--)(de=te[oe])&&(ne=de(ne)||ne);return ne},__decorateParam$3=(te,J)=>(X,re)=>J(X,re,te);let GetUserInfoBackendAdapter=class{constructor(te){this.api=te}getUserInfo(){const te=jwtDecode(this.api.tokenManager.getToken()),J={userId:this.getUserId(te.access_info),firstName:te.access_info.trace_user_given_name,familyName:te.access_info.trace_user_family_name,lastName:te.access_info.trace_user_last_name,registrationNumber:te.access_info.identifier.find(X=>X.type==="NUMCOL")?.value,workCenter:te.access_info.center_code,role:te.access_info.role_type,speciality:te.access_info.professional_category};return Promise.resolve(J)}getUserId(te){return te.identifier?.find(J=>J.type==="DNI")?.value||te.identifier?.find(J=>J.type==="NIE")?.value}};GetUserInfoBackendAdapter=__decorateClass$g([injectable(),__decorateParam$3(0,inject(TYPES$3.primaryApi))],GetUserInfoBackendAdapter);var __getOwnPropDesc$5=Object.getOwnPropertyDescriptor,__decorateClass$f=(te,J,X,re)=>{for(var ne=re>1?void 0:re?__getOwnPropDesc$5(J,X):J,oe=te.length-1,de;oe>=0;oe--)(de=te[oe])&&(ne=de(ne)||ne);return ne},__decorateParam$2=(te,J)=>(X,re)=>J(X,re,te);let GetUserInfoHandler=class{constructor(te,J){this.api=te,this.backendAdapter=J}async handle(te){try{const J=await this.backendAdapter.getUserInfo();return this.api.globalStateManager.setData("userInfo",J),J}catch(J){this.api.notificationService.error(J.message)}}};GetUserInfoHandler=__decorateClass$f([__decorateParam$2(0,inject(TYPES$3.primaryApi)),__decorateParam$2(1,inject(GetUserInfoBackendAdapter))],GetUserInfoHandler);class GetUserInfo{}let request$2;const useGetUserInfo=te=>{disposeGetUserInfo(),request$2=registerRequest(te,container$3)(GetUserInfo,GetUserInfoHandler),registerDep(GetUserInfoBackendAdapter)},disposeGetUserInfo=()=>{request$2?.dispose(),unregisterDep(GetUserInfoBackendAdapter)};var __getOwnPropDesc$4=Object.getOwnPropertyDescriptor,__decorateClass$e=(te,J,X,re)=>{for(var ne=re>1?void 0:re?__getOwnPropDesc$4(J,X):J,oe=te.length-1,de;oe>=0;oe--)(de=te[oe])&&(ne=de(ne)||ne);return ne},__decorateParam$1=(te,J)=>(X,re)=>J(X,re,te);let GetVisitIdHandler=class{constructor(te){this.api=te}async handle(te){try{return await this.getVisitId()}catch(J){this.api.notificationService.error(J.message);return}}getVisitId(){const J=new URLSearchParams(window.location.search).get("visit_id");return Promise.resolve(J||void 0)}};GetVisitIdHandler=__decorateClass$e([__decorateParam$1(0,inject(TYPES$3.primaryApi))],GetVisitIdHandler);class GetVisitId{}let request$1;const useGetVisitId=te=>{disposeGetVisitId(),request$1=registerRequest(te,container$3)(GetVisitId,GetVisitIdHandler)},disposeGetVisitId=()=>{request$1?.dispose()};var __getOwnPropDesc$3=Object.getOwnPropertyDescriptor,__decorateClass$d=(te,J,X,re)=>{for(var ne=re>1?void 0:re?__getOwnPropDesc$3(J,X):J,oe=te.length-1,de;oe>=0;oe--)(de=te[oe])&&(ne=de(ne)||ne);return ne},__decorateParam=(te,J)=>(X,re)=>J(X,re,te);let FinalizeVisitHandler=class{constructor(te){this.api=te}async handle(te){try{const J=te.visitId;this.api.broker.send(new ExitShell("RESOL_VISITA",{VisiID:J}))}catch(J){this.api.notificationService.error(J.message)}}};FinalizeVisitHandler=__decorateClass$d([__decorateParam(0,inject(TYPES$3.primaryApi))],FinalizeVisitHandler);class FinalizeVisit{constructor(J){this.visitId=J}}let request;const useFinalizeVisit=te=>{disposeFinalizeVisit(),request=registerRequest(te,container$3)(FinalizeVisit,FinalizeVisitHandler)},disposeFinalizeVisit=()=>{request?.dispose()},useFeatures=te=>{container$3.bind(TYPES$3.primaryApi).toConstantValue(te),useGetUserInfo(te),useExitShell(te),useGetVisitId(te),useFinalizeVisit(te),te.broker.send(new GetUserInfo)},disposeFeatures=te=>{disposeGetUserInfo(),disposeExitShell(),disposeGetVisitId(),disposeFinalizeVisit(),container$3.unbindAll(),te.regionManager._destroy(),mediatorSettings.resolver.clear()},disposeShell=()=>{disposeFeatures(shellApi)},raiseCloseEvent=()=>{shellApi.ecapEventManager.publish("CLOSE_FORM","",{})},raiseCustomCloseEvent=te=>{shellApi.ecapEventManager.publish(te.ecapEvent,"",te.payload)};var shellViews=(te=>(te.shell="primaria-shell",te.error="primaria-error-view",te))(shellViews||{});const styles$8=":host{width:100%;overflow:hidden}#main-switcher{display:inherit}.container{width:100%;height:100%;display:flex;flex-direction:column;background:#fff}.main-container{min-height:1px;height:100%;display:flex}.main-container .sidebar{padding-inline:16px;display:flex;flex-direction:column;justify-content:space-between;align-items:center;background:var(--color-primary-700);width:40px;height:100%;color:#fff}.main-container .sidebar .quick-actions-content{padding-top:24px;padding-bottom:22px;border-radius:8px}.main-container .sidebar .quick-actions-content .create-button-icon-badge{position:relative}.main-container .sidebar .quick-actions-content .create-button-icon-badge dss-notification-badge{position:absolute;top:-7px;right:-6px;z-index:1}.main-container .sidebar .quick-actions-content .create-button-icon-badge dss-icon{position:relative}.main-container .sidebar .icon{margin-left:8px}.main-container .sidebar #menu-region-container{padding-top:24px;min-height:1px;height:100%;width:100%;display:flex;flex-direction:column;gap:4px;overflow-y:auto;margin-right:-14px;padding-right:14px;scrollbar-color:var(--color-primary-200) var(--color-primary-700);scrollbar-width:thin}.main-container .sidebar #menu-region-container::-webkit-scrollbar{width:6px}.main-container .sidebar #menu-region-container::-webkit-scrollbar-track{background:var(--color-primary-700)}.main-container .sidebar #menu-region-container::-webkit-scrollbar-thumb{background-color:var(--color-primary-400);border-radius:4px}.main-container .sidebar .bottom-content{display:flex;flex-direction:column;gap:24px;width:100%}.main-container .sidebar .bottom-content .bottom-content-first{display:flex;flex-direction:column;gap:22px}.main-container .sidebar[expanded]{width:252px;align-items:flex-start}.main-container .sidebar .create-button-closed{cursor:pointer;background-color:#f0f0f0;color:var(--color-primary-700);border-radius:8px;width:40px;height:40px;display:flex;flex-direction:row;align-items:center;justify-content:center;transition:background-color .3s ease}.main-container .sidebar .create-button-closed:hover{background-color:var(--color-primary-900);color:#fff}.main-container .sidebar .create-button-opened{cursor:pointer;background-color:#f0f0f0;color:var(--color-primary-700);border-radius:8px;gap:8px;font-weight:600;width:220px;height:40px;display:flex;flex-direction:row;align-items:center;transition:background-color .3s ease}.main-container .sidebar .create-button-opened:hover{background-color:var(--color-primary-900);color:#fff}.main-container .content{display:flex;height:100%;width:100%}.main-container #main-region-container{min-height:1px;height:100%;flex:1}.main-container #navigation-menu-lower-region-container{display:flex;flex-direction:column;gap:4px}.main-container #floating-region-container{position:fixed;z-index:300}.footer{display:flex;height:48px;padding:12px 24px}.footer .footer-logo{align-self:center;display:flex;gap:16px}.divider-opened{width:220px}.divider-closed{width:40px}.toggle-button{margin-bottom:24px}@media (max-width: 1024px){.bottom-content-first{margin-bottom:24px}.toggle-button{display:none}.content{overflow-y:auto}}";let t$h="";function f$p(){return t$h}function s$s(te,J){const X=f$p(),re=`${te}${X}`;customElements.define(re,J)}const e$K="*,*:before,*:after{box-sizing:border-box}*{margin:0;padding:0;font-family:var(--font-family)}ul,ol{list-style:none}",o$H={type:Boolean,converter:{fromAttribute:te=>te!==null&&te!=="false",toAttribute:te=>te?"true":null}},n$w={type:Array,converter:{fromAttribute:te=>{if(!te)return[];const J=JSON.parse(te);return Array.isArray(J)?J.map(X=>X.toString()):[J.toString()]},toAttribute:te=>JSON.stringify(te)}},i$s=':host{display:flex;align-items:center}.dss-icon,.material-symbols-rounded{font-family:var(--icon-font);font-size:var(--icon-size-md);font-weight:400;font-style:normal;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;-webkit-font-feature-settings:"liga";-webkit-font-smoothing:antialiased;font-variation-settings:"FILL" 0,"wght" 400,"GRAD" 0,"opsz" 24}.dss-icon--fill,.material-symbols-rounded--fill{font-variation-settings:"FILL" 1}.dss-icon--sm{font-size:var(--icon-size-sm)}.dss-icon--md{font-size:var(--icon-size-md)}.dss-icon--lg{font-size:var(--icon-size-lg)}.dss-icon--xl{font-size:var(--icon-size-xl)}.dss-icon-ghost{display:inline-block;height:var(--icon-size-md);width:var(--icon-size-md);overflow:hidden;background-color:transparent}.dss-icon-ghost--sm{height:var(--icon-size-sm);width:var(--icon-size-sm);border-radius:var(--dss-radius-xs)}.dss-icon-ghost--lg{height:var(--icon-size-lg);width:var(--icon-size-lg)}.dss-icon-ghost--xl{height:var(--icon-size-xl);width:var(--icon-size-xl)}',d$n=te=>ke$1`
665
+ `;let AdminClinicalMonitoring=Ls;__decorateClass$i([lazyInject(TYPES.primaryApi)],AdminClinicalMonitoring.prototype,"api"),__decorateClass$i([s$z({targetId:"widgets-sidebar-region",name:"clinical-monitoring-widgets-sidebar-region"})],AdminClinicalMonitoring.prototype,"sidebarRegion"),__decorateClass$i([s$z({targetId:"header-widgets-region",name:"clinical-monitoring-header-widgets-region"})],AdminClinicalMonitoring.prototype,"headerRegion"),__decorateClass$i([s$z({targetId:"content-widgets-region",name:"clinical-monitoring-content-widgets-region"})],AdminClinicalMonitoring.prototype,"contentRegion");const registerViews=async te=>{t$l("clinical-monitoring")(AdminClinicalMonitoring),te.regionManager.registerMainView({id:te.pluginInfo.pluginId,factory:()=>{const J=new AdminClinicalMonitoring;return Promise.resolve(J)},isDefault:!0}),te.regionManager.registerView(te.regionManager.regions.shell.navigationMenu,{id:te.pluginInfo.pluginId,factory:()=>{const J=new PrimariaNavItem({icon:"account_box",label:"Seguiment administratiu",callbackFn:()=>{te.regionManager.activateMainView(te.pluginInfo.pluginId)}});return Promise.resolve(J)},sortHint:"0020"}),setTimeout(()=>{activateClinicalMonitoringView(te)},300)},unregisterViews=te=>{te.regionManager.removeView(te.regionManager.regions.shell.main,te.pluginInfo.pluginId),te.regionManager.removeView(te.regionManager.regions.shell.navigationMenu,te.pluginInfo.pluginId)},activateClinicalMonitoringView=te=>{te.regionManager.activateMainView(te.pluginInfo.pluginId)},initialize=async te=>(registerViews(te),Promise.resolve()),dispose=te=>(unregisterViews(te),Promise.resolve());let bootstrappedPlugins=[];const commonPlugins=[{pluginId:"activity-history",importer:()=>Promise.resolve({initialize:initialize$2,dispose:dispose$2})}],doctorInternalPlugins=[{pluginId:"clinical-monitoring",importer:()=>Promise.resolve({initialize:initialize$1,dispose:dispose$1})}],administrativeInternalPlugins=[{pluginId:"admin-clinical-monitoring",importer:()=>Promise.resolve({initialize,dispose})}],getPluginsByUserRole=te=>te?commonPlugins.concat(administrativeInternalPlugins):commonPlugins.concat(doctorInternalPlugins),bootstrapPlugins=async te=>{const J=shellApi.userManager.isUserRoleAdministrative(),re=getPluginsByUserRole(J).concat(te||[]);bootstrappedPlugins=await v$i(re,primariaApiFactory)},disposePlugins=async()=>Promise.all(bootstrappedPlugins.map(te=>te?.dispose()));var __getOwnPropDesc$7=Object.getOwnPropertyDescriptor,__decorateClass$h=(te,J,X,re)=>{for(var ne=re>1?void 0:re?__getOwnPropDesc$7(J,X):J,oe=te.length-1,de;oe>=0;oe--)(de=te[oe])&&(ne=de(ne)||ne);return ne},__decorateParam$4=(te,J)=>(X,re)=>J(X,re,te);let ExitShellHandler=class{constructor(te){this.api=te}async handle(te){const J=te&&te.ecapEvent!==void 0?te:void 0;try{const X=this.api.pluginBusyManager.getBusyPluginTasks();if(X.length>0){const{confirmed:re}=await this.askForClose(X);if(!re)return}await Promise.race([disposePlugins(),this.timeout(1e4)]),disposeShell(),this.emitClose(J)}catch(X){this.api.notificationService.error(X.message),this.emitClose(J)}}askForClose(te){return this.api.interactionService.confirm({busyTasks:te},{component:PluginBusyList},{title:translate$1("actions.askExit"),state:"error",confirmButtonText:"Sí",cancelButtonText:"No"})}timeout(te){return new Promise(J=>setTimeout(J,te))}emitClose(te){te?raiseCustomCloseEvent(te):raiseCloseEvent()}};ExitShellHandler=__decorateClass$h([__decorateParam$4(0,inject(TYPES$3.primaryApi))],ExitShellHandler);class ExitShell{constructor(J,X){this.ecapEvent=J,this.payload=X}}let request$3;const useExitShell=te=>{disposeExitShell(),request$3=registerRequest(te,container$3)(ExitShell,ExitShellHandler)},disposeExitShell=()=>{request$3?.dispose()};var __getOwnPropDesc$6=Object.getOwnPropertyDescriptor,__decorateClass$g=(te,J,X,re)=>{for(var ne=re>1?void 0:re?__getOwnPropDesc$6(J,X):J,oe=te.length-1,de;oe>=0;oe--)(de=te[oe])&&(ne=de(ne)||ne);return ne},__decorateParam$3=(te,J)=>(X,re)=>J(X,re,te);let GetUserInfoBackendAdapter=class{constructor(te){this.api=te}getUserInfo(){const te=jwtDecode(this.api.tokenManager.getToken()),J={userId:this.getUserId(te.access_info),firstName:te.access_info.trace_user_given_name,familyName:te.access_info.trace_user_family_name,lastName:te.access_info.trace_user_last_name,registrationNumber:te.access_info.identifier.find(X=>X.type==="NUMCOL")?.value,workCenter:te.access_info.center_code,role:te.access_info.role_type,speciality:te.access_info.professional_category};return Promise.resolve(J)}getUserId(te){return te.identifier?.find(J=>J.type==="DNI")?.value||te.identifier?.find(J=>J.type==="NIE")?.value}};GetUserInfoBackendAdapter=__decorateClass$g([injectable(),__decorateParam$3(0,inject(TYPES$3.primaryApi))],GetUserInfoBackendAdapter);var __getOwnPropDesc$5=Object.getOwnPropertyDescriptor,__decorateClass$f=(te,J,X,re)=>{for(var ne=re>1?void 0:re?__getOwnPropDesc$5(J,X):J,oe=te.length-1,de;oe>=0;oe--)(de=te[oe])&&(ne=de(ne)||ne);return ne},__decorateParam$2=(te,J)=>(X,re)=>J(X,re,te);let GetUserInfoHandler=class{constructor(te,J){this.api=te,this.backendAdapter=J}async handle(te){try{const J=await this.backendAdapter.getUserInfo();return this.api.globalStateManager.setData("userInfo",J),J}catch(J){this.api.notificationService.error(J.message)}}};GetUserInfoHandler=__decorateClass$f([__decorateParam$2(0,inject(TYPES$3.primaryApi)),__decorateParam$2(1,inject(GetUserInfoBackendAdapter))],GetUserInfoHandler);class GetUserInfo{}let request$2;const useGetUserInfo=te=>{disposeGetUserInfo(),request$2=registerRequest(te,container$3)(GetUserInfo,GetUserInfoHandler),registerDep(GetUserInfoBackendAdapter)},disposeGetUserInfo=()=>{request$2?.dispose(),unregisterDep(GetUserInfoBackendAdapter)};var __getOwnPropDesc$4=Object.getOwnPropertyDescriptor,__decorateClass$e=(te,J,X,re)=>{for(var ne=re>1?void 0:re?__getOwnPropDesc$4(J,X):J,oe=te.length-1,de;oe>=0;oe--)(de=te[oe])&&(ne=de(ne)||ne);return ne},__decorateParam$1=(te,J)=>(X,re)=>J(X,re,te);let GetVisitIdHandler=class{constructor(te){this.api=te}async handle(te){try{return await this.getVisitId()}catch(J){this.api.notificationService.error(J.message);return}}getVisitId(){const J=new URLSearchParams(window.location.search).get("visit_id");return Promise.resolve(J||void 0)}};GetVisitIdHandler=__decorateClass$e([__decorateParam$1(0,inject(TYPES$3.primaryApi))],GetVisitIdHandler);class GetVisitId{}let request$1;const useGetVisitId=te=>{disposeGetVisitId(),request$1=registerRequest(te,container$3)(GetVisitId,GetVisitIdHandler)},disposeGetVisitId=()=>{request$1?.dispose()};var __getOwnPropDesc$3=Object.getOwnPropertyDescriptor,__decorateClass$d=(te,J,X,re)=>{for(var ne=re>1?void 0:re?__getOwnPropDesc$3(J,X):J,oe=te.length-1,de;oe>=0;oe--)(de=te[oe])&&(ne=de(ne)||ne);return ne},__decorateParam=(te,J)=>(X,re)=>J(X,re,te);let FinalizeVisitHandler=class{constructor(te){this.api=te}async handle(te){try{const J=te.visitId;this.api.broker.send(new ExitShell("RESOL_VISITA",{VisiID:J}))}catch(J){this.api.notificationService.error(J.message)}}};FinalizeVisitHandler=__decorateClass$d([__decorateParam(0,inject(TYPES$3.primaryApi))],FinalizeVisitHandler);class FinalizeVisit{constructor(J){this.visitId=J}}let request;const useFinalizeVisit=te=>{disposeFinalizeVisit(),request=registerRequest(te,container$3)(FinalizeVisit,FinalizeVisitHandler)},disposeFinalizeVisit=()=>{request?.dispose()},useFeatures=te=>{container$3.bind(TYPES$3.primaryApi).toConstantValue(te),useGetUserInfo(te),useExitShell(te),useGetVisitId(te),useFinalizeVisit(te),te.broker.send(new GetUserInfo)},disposeFeatures=te=>{disposeGetUserInfo(),disposeExitShell(),disposeGetVisitId(),disposeFinalizeVisit(),container$3.unbindAll(),te.regionManager._destroy(),mediatorSettings.resolver.clear()},disposeShell=()=>{disposeFeatures(shellApi)},raiseCloseEvent=()=>{shellApi.ecapEventManager.publish("CLOSE_FORM","",{})},raiseCustomCloseEvent=te=>{shellApi.ecapEventManager.publish(te.ecapEvent,"",te.payload)};var shellViews=(te=>(te.shell="primaria-shell",te.error="primaria-error-view",te))(shellViews||{});const styles$8=":host{width:100%;overflow:hidden}#main-switcher{display:inherit}.container{width:100%;height:100%;display:flex;flex-direction:column;background:#fff}.main-container{min-height:1px;height:100%;display:flex}.main-container .sidebar{padding-inline:16px;display:flex;flex-direction:column;justify-content:space-between;align-items:center;background:var(--color-primary-700);width:40px;height:100%;color:#fff}.main-container .sidebar .quick-actions-content{padding-top:24px;padding-bottom:22px;border-radius:8px}.main-container .sidebar .quick-actions-content .create-button-icon-badge{position:relative}.main-container .sidebar .quick-actions-content .create-button-icon-badge dss-notification-badge{position:absolute;top:-7px;right:-6px;z-index:1}.main-container .sidebar .quick-actions-content .create-button-icon-badge dss-icon{position:relative}.main-container .sidebar .icon{margin-left:8px}.main-container .sidebar #menu-region-container{padding-top:24px;min-height:1px;height:100%;width:100%;display:flex;flex-direction:column;gap:4px;overflow-y:auto;margin-right:-14px;padding-right:14px;scrollbar-color:var(--color-primary-200) var(--color-primary-700);scrollbar-width:thin}.main-container .sidebar #menu-region-container::-webkit-scrollbar{width:6px}.main-container .sidebar #menu-region-container::-webkit-scrollbar-track{background:var(--color-primary-700)}.main-container .sidebar #menu-region-container::-webkit-scrollbar-thumb{background-color:var(--color-primary-400);border-radius:4px}.main-container .sidebar .bottom-content{display:flex;flex-direction:column;gap:24px;width:100%}.main-container .sidebar .bottom-content .bottom-content-first{display:flex;flex-direction:column;gap:22px}.main-container .sidebar[expanded]{width:252px;align-items:flex-start}.main-container .sidebar .create-button-closed{cursor:pointer;background-color:#f0f0f0;color:var(--color-primary-700);border-radius:8px;width:40px;height:40px;display:flex;flex-direction:row;align-items:center;justify-content:center;transition:background-color .3s ease}.main-container .sidebar .create-button-closed:hover{background-color:var(--color-primary-900);color:#fff}.main-container .sidebar .create-button-opened{cursor:pointer;background-color:#f0f0f0;color:var(--color-primary-700);border-radius:8px;gap:8px;font-weight:600;width:220px;height:40px;display:flex;flex-direction:row;align-items:center;transition:background-color .3s ease}.main-container .sidebar .create-button-opened:hover{background-color:var(--color-primary-900);color:#fff}.main-container .content{display:flex;height:100%;width:100%}.main-container #main-region-container{min-height:1px;height:100%;flex:1}.main-container #navigation-menu-lower-region-container{display:flex;flex-direction:column;gap:4px}.main-container #floating-region-container{position:fixed;z-index:300}.footer{display:flex;height:48px;padding:12px 24px}.footer .footer-logo{align-self:center;display:flex;gap:16px}.divider-opened{width:220px}.divider-closed{width:40px}.toggle-button{margin-bottom:24px}@media (max-width: 1439px){.bottom-content-first{margin-bottom:24px}.toggle-button{display:none}.content{overflow-y:auto}}";let t$h="";function f$p(){return t$h}function s$s(te,J){const X=f$p(),re=`${te}${X}`;customElements.define(re,J)}const e$K="*,*:before,*:after{box-sizing:border-box}*{margin:0;padding:0;font-family:var(--font-family)}ul,ol{list-style:none}",o$H={type:Boolean,converter:{fromAttribute:te=>te!==null&&te!=="false",toAttribute:te=>te?"true":null}},n$w={type:Array,converter:{fromAttribute:te=>{if(!te)return[];const J=JSON.parse(te);return Array.isArray(J)?J.map(X=>X.toString()):[J.toString()]},toAttribute:te=>JSON.stringify(te)}},i$s=':host{display:flex;align-items:center}.dss-icon,.material-symbols-rounded{font-family:var(--icon-font);font-size:var(--icon-size-md);font-weight:400;font-style:normal;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;-webkit-font-feature-settings:"liga";-webkit-font-smoothing:antialiased;font-variation-settings:"FILL" 0,"wght" 400,"GRAD" 0,"opsz" 24}.dss-icon--fill,.material-symbols-rounded--fill{font-variation-settings:"FILL" 1}.dss-icon--sm{font-size:var(--icon-size-sm)}.dss-icon--md{font-size:var(--icon-size-md)}.dss-icon--lg{font-size:var(--icon-size-lg)}.dss-icon--xl{font-size:var(--icon-size-xl)}.dss-icon-ghost{display:inline-block;height:var(--icon-size-md);width:var(--icon-size-md);overflow:hidden;background-color:transparent}.dss-icon-ghost--sm{height:var(--icon-size-sm);width:var(--icon-size-sm);border-radius:var(--dss-radius-xs)}.dss-icon-ghost--lg{height:var(--icon-size-lg);width:var(--icon-size-lg)}.dss-icon-ghost--xl{height:var(--icon-size-xl);width:var(--icon-size-xl)}',d$n=te=>ke$1`
666
666
 
667
667
  ${te.fontLoaded?ke$1`
668
668
  <i