{"version":3,"sources":["webpack:///../WCC.UI/node_modules/inversify/es/utils/js.js","webpack:///../WCC.UI/node_modules/inversify/es/annotation/decorator_utils.js","webpack:///../WCC.UI/node_modules/inversify/es/annotation/inject_base.js","webpack:///../WCC.UI/node_modules/inversify/es/annotation/inject.js","webpack:///../WCC.UI/node_modules/inversify/es/annotation/injectable.js","webpack:///../WCC.UI/node_modules/inversify/es/annotation/unmanaged.js","webpack:///../WCC.UI/node_modules/inversify/es/constants/error_msgs.js","webpack:///../WCC.UI/node_modules/inversify/es/constants/metadata_keys.js","webpack:///../WCC.UI/node_modules/inversify/es/constants/literal_types.js","webpack:///../WCC.UI/node_modules/inversify/es/utils/id.js","webpack:///../WCC.UI/node_modules/inversify/es/bindings/binding.js","webpack:///../WCC.UI/node_modules/inversify/es/planning/metadata_reader.js","webpack:///../WCC.UI/node_modules/inversify/es/bindings/binding_count.js","webpack:///../WCC.UI/node_modules/inversify/es/utils/exceptions.js","webpack:///../WCC.UI/node_modules/inversify/es/utils/serialization.js","webpack:///../WCC.UI/node_modules/inversify/es/planning/context.js","webpack:///../WCC.UI/node_modules/inversify/es/planning/plan.js","webpack:///../WCC.UI/node_modules/inversify/es/annotation/lazy_service_identifier.js","webpack:///../WCC.UI/node_modules/inversify/es/planning/queryable_string.js","webpack:///../WCC.UI/node_modules/inversify/es/planning/target.js","webpack:///../WCC.UI/node_modules/inversify/es/planning/reflection_utils.js","webpack:///../WCC.UI/node_modules/inversify/es/planning/request.js","webpack:///../WCC.UI/node_modules/inversify/es/planning/planner.js","webpack:///../WCC.UI/node_modules/inversify/es/utils/async.js","webpack:///../WCC.UI/node_modules/inversify/es/scope/scope.js","webpack:///../WCC.UI/node_modules/inversify/es/utils/factory_type.js","webpack:///../WCC.UI/node_modules/inversify/es/utils/binding_utils.js","webpack:///../WCC.UI/node_modules/inversify/es/resolution/instantiation.js","webpack:///../WCC.UI/node_modules/inversify/es/resolution/resolver.js","webpack:///../WCC.UI/node_modules/inversify/es/syntax/constraint_helpers.js","webpack:///../WCC.UI/node_modules/inversify/es/syntax/binding_when_syntax.js","webpack:///../WCC.UI/node_modules/inversify/es/syntax/binding_on_syntax.js","webpack:///../WCC.UI/node_modules/inversify/es/syntax/binding_when_on_syntax.js","webpack:///../WCC.UI/node_modules/inversify/es/syntax/binding_in_syntax.js","webpack:///../WCC.UI/node_modules/inversify/es/syntax/binding_in_when_on_syntax.js","webpack:///../WCC.UI/node_modules/inversify/es/syntax/binding_to_syntax.js","webpack:///../WCC.UI/node_modules/inversify/es/container/container_snapshot.js","webpack:///../WCC.UI/node_modules/inversify/es/utils/clonable.js","webpack:///../WCC.UI/node_modules/inversify/es/container/lookup.js","webpack:///../WCC.UI/node_modules/inversify/es/container/module_activation_store.js","webpack:///../WCC.UI/node_modules/inversify/es/container/container.js","webpack:///../WCC.UI/node_modules/inversify/es/planning/metadata.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAO;AACP;AACA,qCAAqC,qBAAqB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8B;;ACbsD;AACK;AACN;AACrD;AACA;AACA;AACA;AACA;AACA,wBAAwB,iDAAsC;AAC9D;AACA;AACA;AACA;AACA,4BAA4B,+BAAmB;AAC/C;AACA;AACA;AACA,wBAAwB,iDAAsC;AAC9D;AACA,4BAA4B,oCAAwB;AACpD;AACA;AACA;AACA;AACA;AACA,wBAAwB,sBAAsB,8BAA8B,eAAe,EAAE;AAC7F;AACA,4BAA4B,yCAA8B;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,yBAAyB,EAAE;AACzE,gCAAgC,yCAA8B;AAC9D;AACA;AACA,6EAA6E,uCAAuC;AACpH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,oCAAoC;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACsE;AACtE,2C;;;;;;;;;;;;;;;;;;;;;;;;;ACxFsE;AACtB;AACU;AACnD;AACP;AACA;AACA;AACA;AACA,gCAAgC,yDAA2B;AAC3D;AACA,mBAAmB,wDAAqB,KAAK,4BAAQ;AACrD;AACA;AACA;AACA,uC;;ACd2D;AAChB;AAC3C,aAAa,UAAU,CAAC,mCAAuB;AAC7B;AAClB,kC;;;;;;;;ACJA;AAAA;AAAA;AAAuD;AACI;AAC3D;AACA;AACA,mCAAmC,4EAAwB;AAC3D,4BAA4B,6FAA2C;AACvE;AACA,wCAAwC,mFAA+B;AACvE,+BAA+B,4EAAwB;AACvD;AACA;AACA;AACsB;AACtB,sC;;;;;;;;ACbA;AAAA;AAAA;AAAA;AAA2D;AACX;AACC;AACjD;AACA;AACA,2BAA2B,mEAAQ,CAAC,8EAA0B;AAC9D,QAAQ,6EAAY;AACpB;AACA;AACqB;AACrB,qC;;;;;;;;ACVA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACP;AACA;AACA;AACA;AACO;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,qHAAqH;AACxJ;AACP;AACO;AACP;AACO;AACP;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA;AACO;AACP;AACO;AACP;AACO;AACP;AACO;AACP;AACO;AACA;AACA;AACA,2DAA2D,uEAAuE;AAClI,wDAAwD,oEAAoE;AAC5H,4DAA4D,yEAAyE;AACrI;AACP;AACA;AACA;AACO;AACP,sC;;;;;;;;ACpDA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP,yC;;;;;;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC6D;AAC7D,yC;;ACrBA;AACA;AACA;AACA;AACc;AACd,8B;;ACL+E;AAC9C;AACjC,IAAI,eAAO;AACX;AACA,kBAAkB,EAAE;AACpB;AACA;AACA;AACA,oBAAoB,eAAe;AACnC,8CAA8C,aAAa;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,gBAAgB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACkB;AACnB,mC;;;;;;;;ACpC2D;AAC3D,IAAI,8BAAc;AAClB;AACA;AACA;AACA,4DAA4D,oCAAwB;AACpF,wDAAwD,+BAAmB;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,oCAAwB;AAChF;AACA;AACA;AACA,CAAC;AACyB;AAC1B,2C;;ACnBA;AACA;AACA;AACA;AACA;AACwB;AACxB,yC;;ACNsD;AAC/C;AACP;AACA,0BAA0B,oCAAyB;AACnD;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sC;;AChBsD;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,aAAa;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,yCAA8B;AAC1D;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACiL;AACjL,yC;;ACpGiC;AACjC,IAAI,eAAO;AACX;AACA,kBAAkB,EAAE;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACkB;AACnB,mC;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACe;AAChB,gC;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAC+B;AAChC,mD;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,qBAAqB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAC0B;AAC3B,4C;;ACzB2D;AAC1B;AAC6B;AACxB;AACe;AACrD,IAAI,aAAM;AACV;AACA,kBAAkB,EAAE;AACpB;AACA;AACA,6DAA6D,oBAAoB;AACjF,wBAAwB,eAAe;AACvC;AACA;AACA;AACA;AACA,+BAA+B,qCAAQ,CAAC,kCAAsB;AAC9D;AACA,0CAA0C,qCAAQ;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,gBAAgB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,yCAA6B;AACxD;AACA;AACA,+BAA+B,yCAA6B;AAC5D;AACA;AACA,2BAA2B,kCAAsB;AACjD;AACA;AACA,uDAAuD,QAAQ,4CAAgC,uBAAuB,6BAA6B,EAAE,EAAE,EAAE;AACzJ;AACA;AACA,+BAA+B,qCAAyB;AACxD;AACA;AACA;AACA,sDAAsD,kBAAkB,kCAAsB,CAAC,EAAE;AACjG;AACA;AACA;AACA;AACA;AACA,6DAA6D,QAAQ,4CAAgC,uBAAuB,6BAA6B,EAAE,EAAE,EAAE;AAC/J;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,kCAAsB;AACrD;AACA;AACA;AACA;AACA,iDAAiD,gBAAgB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACiB;AAClB,kC;;ACjFA,qBAAqB,SAAI,IAAI,SAAI;AACjC,4EAA4E,OAAO;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AAC6E;AACvB;AACM;AACD;AACF;AACvB;AAClC;AACA,0BAA0B,eAAe;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,mDAAwC;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,oBAAoB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,+CAAoC;AAC1D;AACA;AACA,yBAAyB,aAAM,CAAC,cAAc;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,gBAAgB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,mDAAwC;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,oBAAoB;AACvD;AACA;AACA;AACA;AACA;AACA,yBAAyB,aAAM,CAAC,cAAc;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA,iDAAiD,wCAAwC,kBAAkB,sCAA0B,CAAC,EAAE,EAAE,EAAE;AAC5I;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,kCAAkC,mCAAuB;AACzD,uCAAuC,yCAA6B;AACpE,sCAAsC,iCAAqB;AAC3D,qCAAqC,sCAA0B;AAC/D;AACA;AACyE;AACzE,4C;;ACvIiC;AACjC,IAAI,eAAO;AACX;AACA,kBAAkB,EAAE;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACkB;AACnB,mC;;ACtByD;AACH;AACuB;AAClB;AACG;AAC0G;AACpI;AACE;AACR;AACqE;AAC/D;AACF;AAClC;AACA;AACA;AACA;AACA,sCAAsC,yCAA6B,GAAG,mCAAuB;AAC7F,6BAA6B,qCAAQ;AACrC,qBAAqB,aAAM;AAC3B;AACA,8BAA8B,qCAAQ;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,YAAY;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,eAAO;AACrC;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,YAAY;AACzB;AACA;AACA;AACA;AACA,8CAA8C,4BAA4B;AAC1E,0BAA0B,oCAAyB;AACnD,uBAAuB,qBAAqB;AAC5C,uBAAuB,0CAA0C;AACjE;AACA;AACA,aAAa,YAAY;AACzB;AACA,aAAa,YAAY;AACzB;AACA;AACA,8CAA8C,4BAA4B;AAC1E,0BAA0B,qCAA0B;AACpD,uBAAuB,0CAA0C;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,eAAO;AAClC,0BAA0B,IAAI;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,eAAe;AAC5C,+BAA+B,eAAe;AAC9C;AACA,+CAA+C,2BAA2B;AAC1E;AACA,gCAAgC,+CAAoC,CAAC,eAAe;AACpF;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,0BAA0B;AAChE,sBAAsB,eAAO;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,uBAAuB;AACnC,YAAY,6BAA6B;AACzC;AACA;AACA;AACA;AACA;AACA,qBAAqB,aAAM,CAAC,cAAc,sCAAsC,qCAAQ;AACxF,sBAAsB,eAAO;AAC7B,sBAAsB,eAAO;AAC7B;AACA;AACyD;AACzD,mC;;ACnJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACiD;AACjD,iC;;ACXA,iBAAiB,SAAI,IAAI,SAAI;AAC7B,2BAA2B,+DAA+D,gBAAgB,EAAE,EAAE;AAC9G;AACA,mCAAmC,MAAM,6BAA6B,EAAE,YAAY,WAAW,EAAE;AACjG,kCAAkC,MAAM,iCAAiC,EAAE,YAAY,WAAW,EAAE;AACpG,+BAA+B,qFAAqF;AACpH;AACA,KAAK;AACL;AACA,mBAAmB,SAAI,IAAI,SAAI;AAC/B,aAAa,6BAA6B,0BAA0B,aAAa,EAAE,qBAAqB;AACxG,gBAAgB,qDAAqD,oEAAoE,aAAa,EAAE;AACxJ,sBAAsB,sBAAsB,qBAAqB,GAAG;AACpE;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC,kCAAkC,SAAS;AAC3C,kCAAkC,WAAW,UAAU;AACvD,yCAAyC,cAAc;AACvD;AACA,6GAA6G,OAAO,UAAU;AAC9H,gFAAgF,iBAAiB,OAAO;AACxG,wDAAwD,gBAAgB,QAAQ,OAAO;AACvF,8CAA8C,gBAAgB,gBAAgB,OAAO;AACrF;AACA,iCAAiC;AACjC;AACA;AACA,SAAS,YAAY,aAAa,OAAO,EAAE,UAAU,WAAW;AAChE,mCAAmC,SAAS;AAC5C;AACA;AACgD;AACL;AACpC;AACP,2BAA2B,gBAAgB;AAC3C;AACA;AACA,0BAA0B,gBAAgB;AAC1C;AACA;AACA;AACA;AACA;AACO;AACP,0BAA0B,gBAAgB;AAC1C;AACA;AACA,0BAA0B,gBAAgB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,SAAS;AACjB;AACA;AACA;AACA,wEAAwE;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,CAAC,EAAE;AACH,iC;;ACxFO;AACP;AACA;AACA;AACA;AACA,CAAC,kCAAkC;AACnC,wC;;ACN4D;AACN;AACO;AAChB;AACtC;AACP;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA,+CAA+C,6CAA6C,EAAE;AAC9F;AACA;AACA;AACO;AACP;AACA;AACA,aAAa,eAAe;AAC5B,aAAa,eAAe;AAC5B;AACA;AACA,aAAa,eAAe;AAC5B,aAAa,eAAe;AAC5B;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA,wCAAwC,4BAA4B;AACpE,wBAAwB,0CAA+B;AACvD;AACA;AACO;AACP;AACA,aAAa,eAAe;AAC5B,oBAAoB,wCAAwC,WAAW;AACvE,aAAa,eAAe;AAC5B,oBAAoB,yCAAyC,WAAW;AACxE,aAAa,eAAe;AAC5B,oBAAoB,6CAA6C,WAAW;AAC5E;AACA;AACA;AACA;AACA,yC;;ACrDA,gBAAgB,SAAI,IAAI,SAAI;AAC5B;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,qBAAS,IAAI,SAAI,IAAI,SAAI;AAC7B,2BAA2B,+DAA+D,gBAAgB,EAAE,EAAE;AAC9G;AACA,mCAAmC,MAAM,6BAA6B,EAAE,YAAY,WAAW,EAAE;AACjG,kCAAkC,MAAM,iCAAiC,EAAE,YAAY,WAAW,EAAE;AACpG,+BAA+B,qFAAqF;AACpH;AACA,KAAK;AACL;AACA,IAAI,uBAAW,IAAI,SAAI,IAAI,SAAI;AAC/B,aAAa,6BAA6B,0BAA0B,aAAa,EAAE,qBAAqB;AACxG,gBAAgB,qDAAqD,oEAAoE,aAAa,EAAE;AACxJ,sBAAsB,sBAAsB,qBAAqB,GAAG;AACpE;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC,kCAAkC,SAAS;AAC3C,kCAAkC,WAAW,UAAU;AACvD,yCAAyC,cAAc;AACvD;AACA,6GAA6G,OAAO,UAAU;AAC9H,gFAAgF,iBAAiB,OAAO;AACxG,wDAAwD,gBAAgB,QAAQ,OAAO;AACvF,8CAA8C,gBAAgB,gBAAgB,OAAO;AACrF;AACA,iCAAiC;AACjC;AACA;AACA,SAAS,YAAY,aAAa,OAAO,EAAE,UAAU,WAAW;AAChE,mCAAmC,SAAS;AAC5C;AACA;AACA,IAAI,yBAAa,IAAI,SAAI,IAAI,SAAI;AACjC,4EAA4E,OAAO;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACyG;AAC3B;AACnB;AACY;AACvE;AACA;AACA;AACA;AACA,2BAA2B,cAAc;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,0BAA0B;AACjE;AACA;AACA,KAAK,GAAG,0FAA0F;AAClG;AACA;AACA;AACA;AACA;AACA,kEAAkE,cAAc,iBAAiB;AACjG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,yBAAa;AACvE;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,WAAW,qBAAS;AACpB;AACA,eAAe,uBAAW;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gFAAgF,UAAU,uFAAuF;AACjL;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA,WAAW,qBAAS;AACpB;AACA,eAAe,uBAAW;AAC1B;AACA,iFAAiF,yCAAyC;AAC1H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA,QAAQ,SAAS;AACjB,qDAAqD,eAAe,EAAE;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uCAA2B;AACvD,uCAAuC,uCAA2B;AAClE;AACA;AACA;AACA;AACA,4BAA4B,kDAAoB;AAChD;AACA;AACA;AACA;AACA,0BAA0B,gBAAgB;AAC1C;AACA;AACA;AACA;AACA,oFAAoF,gBAAgB;AACpG;AACA;AACA;AACA,wBAAwB,mDAAqB;AAC7C;AACA,4BAA4B,oCAAwB;AACpD,wBAAwB,+CAAiB;AACzC;AACA;AACA;AACA;AACA;AACA,QAAQ,SAAS;AACjB,sDAAsD,+DAA+D,EAAE;AACvH;AACA;AACA;AACA;AACA;AAC2B;AAC3B,yC;;AC1LA,IAAI,gBAAS,IAAI,SAAI,IAAI,SAAI;AAC7B,2BAA2B,+DAA+D,gBAAgB,EAAE,EAAE;AAC9G;AACA,mCAAmC,MAAM,6BAA6B,EAAE,YAAY,WAAW,EAAE;AACjG,kCAAkC,MAAM,iCAAiC,EAAE,YAAY,WAAW,EAAE;AACpG,+BAA+B,qFAAqF;AACpH;AACA,KAAK;AACL;AACA,IAAI,kBAAW,IAAI,SAAI,IAAI,SAAI;AAC/B,aAAa,6BAA6B,0BAA0B,aAAa,EAAE,qBAAqB;AACxG,gBAAgB,qDAAqD,oEAAoE,aAAa,EAAE;AACxJ,sBAAsB,sBAAsB,qBAAqB,GAAG;AACpE;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC,kCAAkC,SAAS;AAC3C,kCAAkC,WAAW,UAAU;AACvD,yCAAyC,cAAc;AACvD;AACA,6GAA6G,OAAO,UAAU;AAC9H,gFAAgF,iBAAiB,OAAO;AACxG,wDAAwD,gBAAgB,QAAQ,OAAO;AACvF,8CAA8C,gBAAgB,gBAAgB,OAAO;AACrF;AACA,iCAAiC;AACjC;AACA;AACA,SAAS,YAAY,aAAa,OAAO,EAAE,UAAU,WAAW;AAChE,mCAAmC,SAAS;AAC5C;AACA;AACsD;AACO;AACF;AACG;AACnB;AACkC;AACP;AACpB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,iBAAiB;AAC1C,WAAW,+BAA+B,cAAc,sDAAsD,EAAE,eAAe,kBAAkB,oDAAyC,mFAAmF,EAAE;AAC/Q;AACA;AACA;AACA;AACA,IAAI,gBAAgB;AACpB;AACA,aAAa,eAAe;AAC5B,aAAa,eAAe;AAC5B;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA,aAAa,eAAe;AAC5B,qBAAqB,eAAe;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,eAAe;AAChC;AACA;AACA;AACA;AACA,IAAI,WAAW;AACf;AACA;AACA;AACA;AACA;AACA,YAAY,SAAS;AACrB,sDAAsD,kDAAkD,EAAE;AAC1G;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,mDAAmD,oBAAoB;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF,QAAQ,gBAAS;AACvG;AACA,WAAW,kBAAW;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,CAAC,EAAE;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACmB;AACnB,oC;;AC7M2D;AACX;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA,8BAA8B,qCAAQ;AACtC;AACA,EAAE;AACF,uCAAuC,kCAAsB;AAC7D,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AAC+E;AACjF,8C;;ACnCsD;AACuD;AAC7G,IAAI,qCAAiB;AACrB;AACA;AACA;AACA;AACA;AACA,mBAAmB,iCAAe;AAClC;AACA;AACA,mCAAmC,eAAe;AAClD,mBAAmB,iCAAe;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,iCAAe;AAClC;AACA;AACA,mCAAmC,gBAAgB;AACnD,mBAAmB,iCAAe;AAClC;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA,mBAAmB,iCAAe;AAClC;AACA;AACA;AACA,uCAAuC,eAAe;AACtD;AACA,mBAAmB,iCAAe;AAClC;AACA;AACA;AACA,uCAAuC,gBAAgB;AACvD;AACA,mBAAmB,iCAAe;AAClC;AACA;AACA;AACA,uCAAuC,kBAAkB,UAAU,cAAc;AACjF;AACA,mBAAmB,iCAAe;AAClC;AACA;AACA;AACA,wCAAwC,kBAAkB,UAAU,cAAc;AAClF;AACA,mBAAmB,iCAAe;AAClC;AACA;AACA;AACA,uCAAuC,kBAAkB,UAAU,eAAe;AAClF;AACA,mBAAmB,iCAAe;AAClC;AACA;AACA;AACA,wCAAwC,kBAAkB,UAAU,eAAe;AACnF;AACA,mBAAmB,iCAAe;AAClC;AACA;AACA;AACA,uCAAuC,kBAAkB,UAAU,gBAAgB;AACnF;AACA,mBAAmB,iCAAe;AAClC;AACA;AACA;AACA,wCAAwC,kBAAkB,UAAU,gBAAgB;AACpF;AACA,mBAAmB,iCAAe;AAClC;AACA;AACA;AACA,uCAAuC,kBAAkB;AACzD;AACA,mBAAmB,iCAAe;AAClC;AACA;AACA;AACA,wCAAwC,kBAAkB;AAC1D;AACA,mBAAmB,iCAAe;AAClC;AACA;AACA,CAAC;AAC4B;AAC7B,+C;;ACnG0D;AAC1D,IAAI,iCAAe;AACnB;AACA;AACA;AACA;AACA;AACA,mBAAmB,qCAAiB;AACpC;AACA;AACA;AACA,mBAAmB,qCAAiB;AACpC;AACA;AACA,CAAC;AAC0B;AAC3B,6C;;AChBsD;AACI;AAC1D,IAAI,0CAAmB;AACvB;AACA;AACA,sCAAsC,qCAAiB;AACvD,oCAAoC,iCAAe;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAC8B;AAC/B,kD;;AC9D8D;AACC;AAC/D,IAAI,iCAAe;AACnB;AACA;AACA;AACA;AACA,8BAA8B,gBAAgB;AAC9C,mBAAmB,0CAAmB;AACtC;AACA;AACA,8BAA8B,gBAAgB;AAC9C,mBAAmB,0CAAmB;AACtC;AACA;AACA,8BAA8B,gBAAgB;AAC9C,mBAAmB,0CAAmB;AACtC;AACA;AACA,CAAC;AAC0B;AAC3B,6C;;ACrBsD;AACA;AACI;AAC1D,IAAI,+CAAqB;AACzB;AACA;AACA,sCAAsC,qCAAiB;AACvD,oCAAoC,iCAAe;AACnD,oCAAoC,iCAAe;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACgC;AACjC,qD;;ACzEsD;AACyB;AACX;AACL;AAC/D,IAAI,iCAAe;AACnB;AACA;AACA;AACA;AACA,6BAA6B,eAAe;AAC5C;AACA,mBAAmB,+CAAqB;AACxC;AACA;AACA;AACA,iCAAiC,2CAAgC;AACjE;AACA;AACA;AACA;AACA;AACA,6BAA6B,eAAe;AAC5C;AACA;AACA;AACA,8BAA8B,gBAAgB;AAC9C,mBAAmB,0CAAmB;AACtC;AACA;AACA,6BAA6B,eAAe;AAC5C;AACA;AACA;AACA,mBAAmB,+CAAqB;AACxC;AACA;AACA,6BAA6B,eAAe;AAC5C;AACA,8BAA8B,gBAAgB;AAC9C,mBAAmB,0CAAmB;AACtC;AACA;AACA,6BAA6B,eAAe;AAC5C;AACA,8BAA8B,gBAAgB;AAC9C,mBAAmB,0CAAmB;AACtC;AACA;AACA;AACA,4BAA4B,8CAAmC;AAC/D;AACA;AACA,6BAA6B,eAAe;AAC5C,8BAA8B,gBAAgB;AAC9C;AACA;AACA;AACA,6BAA6B,eAAe;AAC5C;AACA,2CAA2C,iDAAiD;AAC5F;AACA;AACA,8BAA8B,gBAAgB;AAC9C,mBAAmB,0CAAmB;AACtC;AACA;AACA,6BAA6B,eAAe;AAC5C;AACA,qCAAqC,6DAA6D;AAClG;AACA,mBAAmB,0CAAmB;AACtC;AACA;AACA,6BAA6B,eAAe;AAC5C;AACA,8BAA8B,gBAAgB;AAC9C,mBAAmB,0CAAmB;AACtC;AACA;AACA,gDAAgD,uCAAuC,EAAE;AACzF;AACA;AACA,CAAC;AAC0B;AAC3B,6C;;ACpFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAC4B;AAC7B,8C;;ACfA;AACA;AACA;AACA;AACA;AACA;AACsB;AACtB,oC;;ACPsD;AACP;AAC/C,IAAI,aAAM;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,mCAAwB;AACpD;AACA;AACA,4BAA4B,mCAAwB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,mCAAwB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,mCAAwB;AACpD;AACA;AACA;AACA;AACA,4BAA4B,mCAAwB;AACpD;AACA;AACA,4BAA4B,mCAAwB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gFAAgF,yCAAyC,EAAE;AAC3H,iBAAiB;AACjB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,uBAAuB;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,4BAA4B,mCAAwB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,sBAAsB,UAAU,qBAAqB,EAAE;AAC/F,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACiB;AAClB,kC;;ACxGkC;AAClC,IAAI,6CAAqB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,aAAM;AACrC,iCAAiC,aAAM;AACvC;AACA;AACA;AACA;AACA,CAAC;AACgC;AACjC,mD;;ACjDA,IAAI,gBAAQ,IAAI,SAAI,IAAI,SAAI;AAC5B,IAAI,gBAAQ;AACZ,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,gBAAQ;AACnB;AACA,IAAI,iBAAS,IAAI,SAAI,IAAI,SAAI;AAC7B,2BAA2B,+DAA+D,gBAAgB,EAAE,EAAE;AAC9G;AACA,mCAAmC,MAAM,6BAA6B,EAAE,YAAY,WAAW,EAAE;AACjG,kCAAkC,MAAM,iCAAiC,EAAE,YAAY,WAAW,EAAE;AACpG,+BAA+B,qFAAqF;AACpH;AACA,KAAK;AACL;AACA,IAAI,mBAAW,IAAI,SAAI,IAAI,SAAI;AAC/B,aAAa,6BAA6B,0BAA0B,aAAa,EAAE,qBAAqB;AACxG,gBAAgB,qDAAqD,oEAAoE,aAAa,EAAE;AACxJ,sBAAsB,sBAAsB,qBAAqB,GAAG;AACpE;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC,kCAAkC,SAAS;AAC3C,kCAAkC,WAAW,UAAU;AACvD,yCAAyC,cAAc;AACvD;AACA,6GAA6G,OAAO,UAAU;AAC9H,gFAAgF,iBAAiB,OAAO;AACxG,wDAAwD,gBAAgB,QAAQ,OAAO;AACvF,8CAA8C,gBAAgB,gBAAgB,OAAO;AACrF;AACA,iCAAiC;AACjC;AACA;AACA,SAAS,YAAY,aAAa,OAAO,EAAE,UAAU,WAAW;AAChE,mCAAmC,SAAS;AAC5C;AACA;AACA,IAAI,qBAAa,IAAI,SAAI,IAAI,SAAI;AACjC,4EAA4E,OAAO;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AAC8C;AACQ;AACwB;AACnB;AACE;AACuB;AACnC;AACa;AACS;AACtC;AACqC;AACb;AACvB;AACgC;AAClE,IAAI,mBAAS;AACb;AACA;AACA;AACA,iCAAiC,yDAA8C;AAC/E;AACA;AACA,mCAAmC,gBAAgB;AACnD;AACA,0CAA0C,gBAAgB;AAC1D,qCAAqC,gBAAgB;AACrD,qCAAqC,gBAAgB;AACrD,iCAAiC,6DAAkD;AACnF;AACA;AACA;AACA;AACA;AACA,iCAAiC,oEAAyD;AAC1F;AACA;AACA;AACA;AACA;AACA,iCAAiC,+DAAoD;AACrF;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,EAAE;AACpB,sCAAsC,aAAM;AAC5C;AACA;AACA,gCAAgC,aAAM;AACtC,kCAAkC,aAAM;AACxC;AACA,mCAAmC,8BAAc;AACjD,0CAA0C,6CAAqB;AAC/D;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA,+BAA+B,qBAAa,6EAA6E,QAAQ,oBAAoB,kBAAkB,EAAE;AACzK,gCAAgC,oBAAoB;AACpD;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA,6CAA6C,uBAAuB;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA,eAAe,iBAAS;AACxB;AACA,mBAAmB,mBAAW;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA,eAAe,iBAAS;AACxB;AACA,mBAAmB,mBAAW;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,iDAAiD,gBAAgB;AACjE,0BAA0B,eAAO;AACjC;AACA,mBAAmB,iCAAe;AAClC;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAS;AACxB,mBAAmB,mBAAW;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAS;AACxB;AACA,mBAAmB,mBAAW;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,sCAAsC,aAAM;AAC5C;AACA;AACA,eAAe,iBAAS;AACxB;AACA;AACA,mBAAmB,mBAAW;AAC9B;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA,sDAAsD,aAAM;AAC5D;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,kCAAsB;AAC3E;AACA;AACA;AACA;AACA;AACA,4BAA4B,iBAAiB;AAC7C,gDAAgD,gCAAgC,EAAE;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,iBAAiB;AAC9C;AACA;AACA;AACA;AACA,4BAA4B,iDAAsC;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA,qEAAqE,mBAAmB,EAAE;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAS;AACxB;AACA,mBAAmB,mBAAW;AAC9B;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAS;AACxB;AACA,mBAAmB,mBAAW;AAC9B;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,iDAAiD,kCAAsB;AACvE;AACA;AACA,sDAAsD,kCAAsB;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,kCAAsB;AAC1E;AACA;AACA,yDAAyD,kCAAsB;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,oCAAwB;AACxD,2CAA2C,oCAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6EAA6E,sCAAsC,EAAE;AACrH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,SAAS;AAC7B,kFAAkF,2GAA2G,EAAE;AAC/L;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,4BAA4B,2CAAgC;AAC5D;AACA;AACA;AACA,eAAe,iBAAS;AACxB;AACA,mBAAmB,mBAAW;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,2CAAgC;AACxE;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAS;AACxB;AACA,mBAAmB,mBAAW;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,EAAE;AACX;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAQ,CAAC,gBAAQ,GAAG,aAAa,yCAAyC,gBAAgB,EAAE,cAAc,cAAc,WAAW;AACpK;AACA;AACA;AACA,gCAAgC,+CAAoC;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,0BAA0B;AACtC,4BAA4B,kCAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,IAAI;AAC9B;AACA,yBAAyB,OAAO;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,SAAS;AACrB,2DAA2D,6CAA6C,EAAE;AAC1G;AACA;AACA;AACA;AACA,+CAA+C,wBAAwB;AACvE;AACA;AACA,gBAAgB,SAAS;AACzB,gCAAgC,2CAAgC;AAChE;AACA;AACA;AACA;AACA,eAAe,iBAAS;AACxB;AACA,mBAAmB,mBAAW;AAC9B;AACA,8EAA8E,wCAAwC,EAAE;AACxH;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAS;AACxB,mBAAmB,mBAAW;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,mCAAwB,SAAS,4BAA4B;AACzF;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB,gDAAgD,iDAAiD,EAAE;AACnG;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAS;AACxB,mBAAmB,mBAAW;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,CAAC;AACoB;AACrB,qC;;;;;;;;AC7rBA;AAAA;AAA2D;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,0EAAsB;AAC/C;AACA;AACA;AACA,6BAA6B,qEAAqE;AAClG;AACA;AACA;AACA,CAAC;AACmB;AACpB,oC","file":"npm.inversify.b3ebf9f0bc6f634ab683.js","sourcesContent":["export function getFirstArrayDuplicate(array) {\n var seenValues = new Set();\n for (var _i = 0, array_1 = array; _i < array_1.length; _i++) {\n var entry = array_1[_i];\n if (seenValues.has(entry)) {\n return entry;\n }\n else {\n seenValues.add(entry);\n }\n }\n return undefined;\n}\n//# sourceMappingURL=js.js.map","import * as ERROR_MSGS from \"../constants/error_msgs\";\nimport * as METADATA_KEY from \"../constants/metadata_keys\";\nimport { getFirstArrayDuplicate } from \"../utils/js\";\nfunction targetIsConstructorFunction(target) {\n return target.prototype !== undefined;\n}\nfunction _throwIfMethodParameter(parameterName) {\n if (parameterName !== undefined) {\n throw new Error(ERROR_MSGS.INVALID_DECORATOR_OPERATION);\n }\n}\nfunction tagParameter(annotationTarget, parameterName, parameterIndex, metadata) {\n _throwIfMethodParameter(parameterName);\n _tagParameterOrProperty(METADATA_KEY.TAGGED, annotationTarget, parameterIndex.toString(), metadata);\n}\nfunction tagProperty(annotationTarget, propertyName, metadata) {\n if (targetIsConstructorFunction(annotationTarget)) {\n throw new Error(ERROR_MSGS.INVALID_DECORATOR_OPERATION);\n }\n _tagParameterOrProperty(METADATA_KEY.TAGGED_PROP, annotationTarget.constructor, propertyName, metadata);\n}\nfunction _ensureNoMetadataKeyDuplicates(metadata) {\n var metadatas = [];\n if (Array.isArray(metadata)) {\n metadatas = metadata;\n var duplicate = getFirstArrayDuplicate(metadatas.map(function (md) { return md.key; }));\n if (duplicate !== undefined) {\n throw new Error(ERROR_MSGS.DUPLICATED_METADATA + \" \" + duplicate.toString());\n }\n }\n else {\n metadatas = [metadata];\n }\n return metadatas;\n}\nfunction _tagParameterOrProperty(metadataKey, annotationTarget, key, metadata) {\n var metadatas = _ensureNoMetadataKeyDuplicates(metadata);\n var paramsOrPropertiesMetadata = {};\n if (Reflect.hasOwnMetadata(metadataKey, annotationTarget)) {\n paramsOrPropertiesMetadata = Reflect.getMetadata(metadataKey, annotationTarget);\n }\n var paramOrPropertyMetadata = paramsOrPropertiesMetadata[key];\n if (paramOrPropertyMetadata === undefined) {\n paramOrPropertyMetadata = [];\n }\n else {\n var _loop_1 = function (m) {\n if (metadatas.some(function (md) { return md.key === m.key; })) {\n throw new Error(ERROR_MSGS.DUPLICATED_METADATA + \" \" + m.key.toString());\n }\n };\n for (var _i = 0, paramOrPropertyMetadata_1 = paramOrPropertyMetadata; _i < paramOrPropertyMetadata_1.length; _i++) {\n var m = paramOrPropertyMetadata_1[_i];\n _loop_1(m);\n }\n }\n paramOrPropertyMetadata.push.apply(paramOrPropertyMetadata, metadatas);\n paramsOrPropertiesMetadata[key] = paramOrPropertyMetadata;\n Reflect.defineMetadata(metadataKey, paramsOrPropertiesMetadata, annotationTarget);\n}\nfunction createTaggedDecorator(metadata) {\n return function (target, targetKey, indexOrPropertyDescriptor) {\n if (typeof indexOrPropertyDescriptor === \"number\") {\n tagParameter(target, targetKey, indexOrPropertyDescriptor, metadata);\n }\n else {\n tagProperty(target, targetKey, metadata);\n }\n };\n}\nfunction _decorate(decorators, target) {\n Reflect.decorate(decorators, target);\n}\nfunction _param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); };\n}\nfunction decorate(decorator, target, parameterIndexOrProperty) {\n if (typeof parameterIndexOrProperty === \"number\") {\n _decorate([_param(parameterIndexOrProperty, decorator)], target);\n }\n else if (typeof parameterIndexOrProperty === \"string\") {\n Reflect.decorate([decorator], target, parameterIndexOrProperty);\n }\n else {\n _decorate([decorator], target);\n }\n}\nexport { decorate, tagParameter, tagProperty, createTaggedDecorator };\n//# sourceMappingURL=decorator_utils.js.map","import { UNDEFINED_INJECT_ANNOTATION } from \"../constants/error_msgs\";\nimport { Metadata } from \"../planning/metadata\";\nimport { createTaggedDecorator } from \"./decorator_utils\";\nexport function injectBase(metadataKey) {\n return function (serviceIdentifier) {\n return function (target, targetKey, indexOrPropertyDescriptor) {\n if (serviceIdentifier === undefined) {\n var className = typeof target === \"function\" ? target.name : target.constructor.name;\n throw new Error(UNDEFINED_INJECT_ANNOTATION(className));\n }\n return createTaggedDecorator(new Metadata(metadataKey, serviceIdentifier))(target, targetKey, indexOrPropertyDescriptor);\n };\n };\n}\n//# sourceMappingURL=inject_base.js.map","import * as METADATA_KEY from \"../constants/metadata_keys\";\nimport { injectBase } from \"./inject_base\";\nvar inject = injectBase(METADATA_KEY.INJECT_TAG);\nexport { inject };\n//# sourceMappingURL=inject.js.map","import * as ERRORS_MSGS from \"../constants/error_msgs\";\nimport * as METADATA_KEY from \"../constants/metadata_keys\";\nfunction injectable() {\n return function (target) {\n if (Reflect.hasOwnMetadata(METADATA_KEY.PARAM_TYPES, target)) {\n throw new Error(ERRORS_MSGS.DUPLICATED_INJECTABLE_DECORATOR);\n }\n var types = Reflect.getMetadata(METADATA_KEY.DESIGN_PARAM_TYPES, target) || [];\n Reflect.defineMetadata(METADATA_KEY.PARAM_TYPES, types, target);\n return target;\n };\n}\nexport { injectable };\n//# sourceMappingURL=injectable.js.map","import * as METADATA_KEY from \"../constants/metadata_keys\";\nimport { Metadata } from \"../planning/metadata\";\nimport { tagParameter } from \"./decorator_utils\";\nfunction unmanaged() {\n return function (target, targetKey, index) {\n var metadata = new Metadata(METADATA_KEY.UNMANAGED_TAG, true);\n tagParameter(target, targetKey, index, metadata);\n };\n}\nexport { unmanaged };\n//# sourceMappingURL=unmanaged.js.map","export var DUPLICATED_INJECTABLE_DECORATOR = \"Cannot apply @injectable decorator multiple times.\";\nexport var DUPLICATED_METADATA = \"Metadata key was used more than once in a parameter:\";\nexport var NULL_ARGUMENT = \"NULL argument\";\nexport var KEY_NOT_FOUND = \"Key Not Found\";\nexport var AMBIGUOUS_MATCH = \"Ambiguous match found for serviceIdentifier:\";\nexport var CANNOT_UNBIND = \"Could not unbind serviceIdentifier:\";\nexport var NOT_REGISTERED = \"No matching bindings found for serviceIdentifier:\";\nexport var MISSING_INJECTABLE_ANNOTATION = \"Missing required @injectable annotation in:\";\nexport var MISSING_INJECT_ANNOTATION = \"Missing required @inject or @multiInject annotation in:\";\nexport var UNDEFINED_INJECT_ANNOTATION = function (name) {\n return \"@inject called with undefined this could mean that the class \" + name + \" has \" +\n \"a circular dependency problem. You can use a LazyServiceIdentifer to \" +\n \"overcome this limitation.\";\n};\nexport var CIRCULAR_DEPENDENCY = \"Circular dependency found:\";\nexport var NOT_IMPLEMENTED = \"Sorry, this feature is not fully implemented yet.\";\nexport var INVALID_BINDING_TYPE = \"Invalid binding type:\";\nexport var NO_MORE_SNAPSHOTS_AVAILABLE = \"No snapshot available to restore.\";\nexport var INVALID_MIDDLEWARE_RETURN = \"Invalid return type in middleware. Middleware must return!\";\nexport var INVALID_FUNCTION_BINDING = \"Value provided to function binding must be a function!\";\nexport var LAZY_IN_SYNC = function (key) { return \"You are attempting to construct '\" + key + \"' in a synchronous way\\n but it has asynchronous dependencies.\"; };\nexport var INVALID_TO_SELF_VALUE = \"The toSelf function can only be applied when a constructor is \" +\n \"used as service identifier\";\nexport var INVALID_DECORATOR_OPERATION = \"The @inject @multiInject @tagged and @named decorators \" +\n \"must be applied to the parameters of a class constructor or a class property.\";\nexport var ARGUMENTS_LENGTH_MISMATCH = function () {\n var values = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n values[_i] = arguments[_i];\n }\n return \"The number of constructor arguments in the derived class \" +\n (values[0] + \" must be >= than the number of constructor arguments of its base class.\");\n};\nexport var CONTAINER_OPTIONS_MUST_BE_AN_OBJECT = \"Invalid Container constructor argument. Container options \" +\n \"must be an object.\";\nexport var CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE = \"Invalid Container option. Default scope must \" +\n \"be a string ('singleton' or 'transient').\";\nexport var CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE = \"Invalid Container option. Auto bind injectable must \" +\n \"be a boolean\";\nexport var CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK = \"Invalid Container option. Skip base check must \" +\n \"be a boolean\";\nexport var MULTIPLE_PRE_DESTROY_METHODS = \"Cannot apply @preDestroy decorator multiple times in the same class\";\nexport var MULTIPLE_POST_CONSTRUCT_METHODS = \"Cannot apply @postConstruct decorator multiple times in the same class\";\nexport var ASYNC_UNBIND_REQUIRED = \"Attempting to unbind dependency with asynchronous destruction (@preDestroy or onDeactivation)\";\nexport var POST_CONSTRUCT_ERROR = function (clazz, errorMessage) { return \"@postConstruct error in class \" + clazz + \": \" + errorMessage; };\nexport var PRE_DESTROY_ERROR = function (clazz, errorMessage) { return \"@preDestroy error in class \" + clazz + \": \" + errorMessage; };\nexport var ON_DEACTIVATION_ERROR = function (clazz, errorMessage) { return \"onDeactivation() error in class \" + clazz + \": \" + errorMessage; };\nexport var CIRCULAR_DEPENDENCY_IN_FACTORY = function (factoryType, serviceIdentifier) {\n return \"It looks like there is a circular dependency in one of the '\" + factoryType + \"' bindings. Please investigate bindings with\" +\n (\"service identifier '\" + serviceIdentifier + \"'.\");\n};\nexport var STACK_OVERFLOW = \"Maximum call stack size exceeded\";\n//# sourceMappingURL=error_msgs.js.map","export var NAMED_TAG = \"named\";\nexport var NAME_TAG = \"name\";\nexport var UNMANAGED_TAG = \"unmanaged\";\nexport var OPTIONAL_TAG = \"optional\";\nexport var INJECT_TAG = \"inject\";\nexport var MULTI_INJECT_TAG = \"multi_inject\";\nexport var TAGGED = \"inversify:tagged\";\nexport var TAGGED_PROP = \"inversify:tagged_props\";\nexport var PARAM_TYPES = \"inversify:paramtypes\";\nexport var DESIGN_PARAM_TYPES = \"design:paramtypes\";\nexport var POST_CONSTRUCT = \"post_construct\";\nexport var PRE_DESTROY = \"pre_destroy\";\nfunction getNonCustomTagKeys() {\n return [\n INJECT_TAG,\n MULTI_INJECT_TAG,\n NAME_TAG,\n UNMANAGED_TAG,\n NAMED_TAG,\n OPTIONAL_TAG,\n ];\n}\nexport var NON_CUSTOM_TAG_KEYS = getNonCustomTagKeys();\n//# sourceMappingURL=metadata_keys.js.map","var BindingScopeEnum = {\n Request: \"Request\",\n Singleton: \"Singleton\",\n Transient: \"Transient\"\n};\nvar BindingTypeEnum = {\n ConstantValue: \"ConstantValue\",\n Constructor: \"Constructor\",\n DynamicValue: \"DynamicValue\",\n Factory: \"Factory\",\n Function: \"Function\",\n Instance: \"Instance\",\n Invalid: \"Invalid\",\n Provider: \"Provider\"\n};\nvar TargetTypeEnum = {\n ClassProperty: \"ClassProperty\",\n ConstructorArgument: \"ConstructorArgument\",\n Variable: \"Variable\"\n};\nexport { BindingScopeEnum, BindingTypeEnum, TargetTypeEnum };\n//# sourceMappingURL=literal_types.js.map","var idCounter = 0;\nfunction id() {\n return idCounter++;\n}\nexport { id };\n//# sourceMappingURL=id.js.map","import { BindingScopeEnum, BindingTypeEnum } from \"../constants/literal_types\";\nimport { id } from \"../utils/id\";\nvar Binding = (function () {\n function Binding(serviceIdentifier, scope) {\n this.id = id();\n this.activated = false;\n this.serviceIdentifier = serviceIdentifier;\n this.scope = scope;\n this.type = BindingTypeEnum.Invalid;\n this.constraint = function (request) { return true; };\n this.implementationType = null;\n this.cache = null;\n this.factory = null;\n this.provider = null;\n this.onActivation = null;\n this.onDeactivation = null;\n this.dynamicValue = null;\n }\n Binding.prototype.clone = function () {\n var clone = new Binding(this.serviceIdentifier, this.scope);\n clone.activated = (clone.scope === BindingScopeEnum.Singleton) ? this.activated : false;\n clone.implementationType = this.implementationType;\n clone.dynamicValue = this.dynamicValue;\n clone.scope = this.scope;\n clone.type = this.type;\n clone.factory = this.factory;\n clone.provider = this.provider;\n clone.constraint = this.constraint;\n clone.onActivation = this.onActivation;\n clone.onDeactivation = this.onDeactivation;\n clone.cache = this.cache;\n return clone;\n };\n return Binding;\n}());\nexport { Binding };\n//# sourceMappingURL=binding.js.map","import * as METADATA_KEY from \"../constants/metadata_keys\";\nvar MetadataReader = (function () {\n function MetadataReader() {\n }\n MetadataReader.prototype.getConstructorMetadata = function (constructorFunc) {\n var compilerGeneratedMetadata = Reflect.getMetadata(METADATA_KEY.PARAM_TYPES, constructorFunc);\n var userGeneratedMetadata = Reflect.getMetadata(METADATA_KEY.TAGGED, constructorFunc);\n return {\n compilerGeneratedMetadata: compilerGeneratedMetadata,\n userGeneratedMetadata: userGeneratedMetadata || {}\n };\n };\n MetadataReader.prototype.getPropertiesMetadata = function (constructorFunc) {\n var userGeneratedMetadata = Reflect.getMetadata(METADATA_KEY.TAGGED_PROP, constructorFunc) || [];\n return userGeneratedMetadata;\n };\n return MetadataReader;\n}());\nexport { MetadataReader };\n//# sourceMappingURL=metadata_reader.js.map","var BindingCount = {\n MultipleBindingsAvailable: 2,\n NoBindingsAvailable: 0,\n OnlyOneBindingAvailable: 1\n};\nexport { BindingCount };\n//# sourceMappingURL=binding_count.js.map","import * as ERROR_MSGS from \"../constants/error_msgs\";\nexport function isStackOverflowExeption(error) {\n return (error instanceof RangeError ||\n error.message === ERROR_MSGS.STACK_OVERFLOW);\n}\nexport var tryAndThrowErrorIfStackOverflow = function (fn, errorCallback) {\n try {\n return fn();\n }\n catch (error) {\n if (isStackOverflowExeption(error)) {\n error = errorCallback();\n }\n throw error;\n }\n};\n//# sourceMappingURL=exceptions.js.map","import * as ERROR_MSGS from \"../constants/error_msgs\";\nfunction getServiceIdentifierAsString(serviceIdentifier) {\n if (typeof serviceIdentifier === \"function\") {\n var _serviceIdentifier = serviceIdentifier;\n return _serviceIdentifier.name;\n }\n else if (typeof serviceIdentifier === \"symbol\") {\n return serviceIdentifier.toString();\n }\n else {\n var _serviceIdentifier = serviceIdentifier;\n return _serviceIdentifier;\n }\n}\nfunction listRegisteredBindingsForServiceIdentifier(container, serviceIdentifier, getBindings) {\n var registeredBindingsList = \"\";\n var registeredBindings = getBindings(container, serviceIdentifier);\n if (registeredBindings.length !== 0) {\n registeredBindingsList = \"\\nRegistered bindings:\";\n registeredBindings.forEach(function (binding) {\n var name = \"Object\";\n if (binding.implementationType !== null) {\n name = getFunctionName(binding.implementationType);\n }\n registeredBindingsList = registeredBindingsList + \"\\n \" + name;\n if (binding.constraint.metaData) {\n registeredBindingsList = registeredBindingsList + \" - \" + binding.constraint.metaData;\n }\n });\n }\n return registeredBindingsList;\n}\nfunction alreadyDependencyChain(request, serviceIdentifier) {\n if (request.parentRequest === null) {\n return false;\n }\n else if (request.parentRequest.serviceIdentifier === serviceIdentifier) {\n return true;\n }\n else {\n return alreadyDependencyChain(request.parentRequest, serviceIdentifier);\n }\n}\nfunction dependencyChainToString(request) {\n function _createStringArr(req, result) {\n if (result === void 0) { result = []; }\n var serviceIdentifier = getServiceIdentifierAsString(req.serviceIdentifier);\n result.push(serviceIdentifier);\n if (req.parentRequest !== null) {\n return _createStringArr(req.parentRequest, result);\n }\n return result;\n }\n var stringArr = _createStringArr(request);\n return stringArr.reverse().join(\" --> \");\n}\nfunction circularDependencyToException(request) {\n request.childRequests.forEach(function (childRequest) {\n if (alreadyDependencyChain(childRequest, childRequest.serviceIdentifier)) {\n var services = dependencyChainToString(childRequest);\n throw new Error(ERROR_MSGS.CIRCULAR_DEPENDENCY + \" \" + services);\n }\n else {\n circularDependencyToException(childRequest);\n }\n });\n}\nfunction listMetadataForTarget(serviceIdentifierString, target) {\n if (target.isTagged() || target.isNamed()) {\n var m_1 = \"\";\n var namedTag = target.getNamedTag();\n var otherTags = target.getCustomTags();\n if (namedTag !== null) {\n m_1 += namedTag.toString() + \"\\n\";\n }\n if (otherTags !== null) {\n otherTags.forEach(function (tag) {\n m_1 += tag.toString() + \"\\n\";\n });\n }\n return \" \" + serviceIdentifierString + \"\\n \" + serviceIdentifierString + \" - \" + m_1;\n }\n else {\n return \" \" + serviceIdentifierString;\n }\n}\nfunction getFunctionName(func) {\n if (func.name) {\n return func.name;\n }\n else {\n var name_1 = func.toString();\n var match = name_1.match(/^function\\s*([^\\s(]+)/);\n return match ? match[1] : \"Anonymous function: \" + name_1;\n }\n}\nfunction getSymbolDescription(symbol) {\n return symbol.toString().slice(7, -1);\n}\nexport { getFunctionName, getServiceIdentifierAsString, listRegisteredBindingsForServiceIdentifier, listMetadataForTarget, circularDependencyToException, getSymbolDescription };\n//# sourceMappingURL=serialization.js.map","import { id } from \"../utils/id\";\nvar Context = (function () {\n function Context(container) {\n this.id = id();\n this.container = container;\n }\n Context.prototype.addPlan = function (plan) {\n this.plan = plan;\n };\n Context.prototype.setCurrentRequest = function (currentRequest) {\n this.currentRequest = currentRequest;\n };\n return Context;\n}());\nexport { Context };\n//# sourceMappingURL=context.js.map","var Plan = (function () {\n function Plan(parentContext, rootRequest) {\n this.parentContext = parentContext;\n this.rootRequest = rootRequest;\n }\n return Plan;\n}());\nexport { Plan };\n//# sourceMappingURL=plan.js.map","var LazyServiceIdentifer = (function () {\n function LazyServiceIdentifer(cb) {\n this._cb = cb;\n }\n LazyServiceIdentifer.prototype.unwrap = function () {\n return this._cb();\n };\n return LazyServiceIdentifer;\n}());\nexport { LazyServiceIdentifer };\n//# sourceMappingURL=lazy_service_identifier.js.map","var QueryableString = (function () {\n function QueryableString(str) {\n this.str = str;\n }\n QueryableString.prototype.startsWith = function (searchString) {\n return this.str.indexOf(searchString) === 0;\n };\n QueryableString.prototype.endsWith = function (searchString) {\n var reverseString = \"\";\n var reverseSearchString = searchString.split(\"\").reverse().join(\"\");\n reverseString = this.str.split(\"\").reverse().join(\"\");\n return this.startsWith.call({ str: reverseString }, reverseSearchString);\n };\n QueryableString.prototype.contains = function (searchString) {\n return (this.str.indexOf(searchString) !== -1);\n };\n QueryableString.prototype.equals = function (compareString) {\n return this.str === compareString;\n };\n QueryableString.prototype.value = function () {\n return this.str;\n };\n return QueryableString;\n}());\nexport { QueryableString };\n//# sourceMappingURL=queryable_string.js.map","import * as METADATA_KEY from '../constants/metadata_keys';\nimport { id } from '../utils/id';\nimport { getSymbolDescription } from '../utils/serialization';\nimport { Metadata } from './metadata';\nimport { QueryableString } from './queryable_string';\nvar Target = (function () {\n function Target(type, identifier, serviceIdentifier, namedOrTagged) {\n this.id = id();\n this.type = type;\n this.serviceIdentifier = serviceIdentifier;\n var queryableName = typeof identifier === 'symbol' ? getSymbolDescription(identifier) : identifier;\n this.name = new QueryableString(queryableName || \"\");\n this.identifier = identifier;\n this.metadata = new Array();\n var metadataItem = null;\n if (typeof namedOrTagged === 'string') {\n metadataItem = new Metadata(METADATA_KEY.NAMED_TAG, namedOrTagged);\n }\n else if (namedOrTagged instanceof Metadata) {\n metadataItem = namedOrTagged;\n }\n if (metadataItem !== null) {\n this.metadata.push(metadataItem);\n }\n }\n Target.prototype.hasTag = function (key) {\n for (var _i = 0, _a = this.metadata; _i < _a.length; _i++) {\n var m = _a[_i];\n if (m.key === key) {\n return true;\n }\n }\n return false;\n };\n Target.prototype.isArray = function () {\n return this.hasTag(METADATA_KEY.MULTI_INJECT_TAG);\n };\n Target.prototype.matchesArray = function (name) {\n return this.matchesTag(METADATA_KEY.MULTI_INJECT_TAG)(name);\n };\n Target.prototype.isNamed = function () {\n return this.hasTag(METADATA_KEY.NAMED_TAG);\n };\n Target.prototype.isTagged = function () {\n return this.metadata.some(function (metadata) { return METADATA_KEY.NON_CUSTOM_TAG_KEYS.every(function (key) { return metadata.key !== key; }); });\n };\n Target.prototype.isOptional = function () {\n return this.matchesTag(METADATA_KEY.OPTIONAL_TAG)(true);\n };\n Target.prototype.getNamedTag = function () {\n if (this.isNamed()) {\n return this.metadata.filter(function (m) { return m.key === METADATA_KEY.NAMED_TAG; })[0];\n }\n return null;\n };\n Target.prototype.getCustomTags = function () {\n if (this.isTagged()) {\n return this.metadata.filter(function (metadata) { return METADATA_KEY.NON_CUSTOM_TAG_KEYS.every(function (key) { return metadata.key !== key; }); });\n }\n else {\n return null;\n }\n };\n Target.prototype.matchesNamedTag = function (name) {\n return this.matchesTag(METADATA_KEY.NAMED_TAG)(name);\n };\n Target.prototype.matchesTag = function (key) {\n var _this = this;\n return function (value) {\n for (var _i = 0, _a = _this.metadata; _i < _a.length; _i++) {\n var m = _a[_i];\n if (m.key === key && m.value === value) {\n return true;\n }\n }\n return false;\n };\n };\n return Target;\n}());\nexport { Target };\n//# sourceMappingURL=target.js.map","var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nimport { LazyServiceIdentifer } from \"../annotation/lazy_service_identifier\";\nimport * as ERROR_MSGS from \"../constants/error_msgs\";\nimport { TargetTypeEnum } from \"../constants/literal_types\";\nimport * as METADATA_KEY from \"../constants/metadata_keys\";\nimport { getFunctionName } from \"../utils/serialization\";\nimport { Target } from \"./target\";\nfunction getDependencies(metadataReader, func) {\n var constructorName = getFunctionName(func);\n return getTargets(metadataReader, constructorName, func, false);\n}\nfunction getTargets(metadataReader, constructorName, func, isBaseClass) {\n var metadata = metadataReader.getConstructorMetadata(func);\n var serviceIdentifiers = metadata.compilerGeneratedMetadata;\n if (serviceIdentifiers === undefined) {\n var msg = ERROR_MSGS.MISSING_INJECTABLE_ANNOTATION + \" \" + constructorName + \".\";\n throw new Error(msg);\n }\n var constructorArgsMetadata = metadata.userGeneratedMetadata;\n var keys = Object.keys(constructorArgsMetadata);\n var hasUserDeclaredUnknownInjections = (func.length === 0 && keys.length > 0);\n var hasOptionalParameters = keys.length > func.length;\n var iterations = (hasUserDeclaredUnknownInjections || hasOptionalParameters) ? keys.length : func.length;\n var constructorTargets = getConstructorArgsAsTargets(isBaseClass, constructorName, serviceIdentifiers, constructorArgsMetadata, iterations);\n var propertyTargets = getClassPropsAsTargets(metadataReader, func, constructorName);\n var targets = __spreadArray(__spreadArray([], constructorTargets, true), propertyTargets, true);\n return targets;\n}\nfunction getConstructorArgsAsTarget(index, isBaseClass, constructorName, serviceIdentifiers, constructorArgsMetadata) {\n var targetMetadata = constructorArgsMetadata[index.toString()] || [];\n var metadata = formatTargetMetadata(targetMetadata);\n var isManaged = metadata.unmanaged !== true;\n var serviceIdentifier = serviceIdentifiers[index];\n var injectIdentifier = (metadata.inject || metadata.multiInject);\n serviceIdentifier = (injectIdentifier) ? (injectIdentifier) : serviceIdentifier;\n if (serviceIdentifier instanceof LazyServiceIdentifer) {\n serviceIdentifier = serviceIdentifier.unwrap();\n }\n if (isManaged) {\n var isObject = serviceIdentifier === Object;\n var isFunction = serviceIdentifier === Function;\n var isUndefined = serviceIdentifier === undefined;\n var isUnknownType = (isObject || isFunction || isUndefined);\n if (!isBaseClass && isUnknownType) {\n var msg = ERROR_MSGS.MISSING_INJECT_ANNOTATION + \" argument \" + index + \" in class \" + constructorName + \".\";\n throw new Error(msg);\n }\n var target = new Target(TargetTypeEnum.ConstructorArgument, metadata.targetName, serviceIdentifier);\n target.metadata = targetMetadata;\n return target;\n }\n return null;\n}\nfunction getConstructorArgsAsTargets(isBaseClass, constructorName, serviceIdentifiers, constructorArgsMetadata, iterations) {\n var targets = [];\n for (var i = 0; i < iterations; i++) {\n var index = i;\n var target = getConstructorArgsAsTarget(index, isBaseClass, constructorName, serviceIdentifiers, constructorArgsMetadata);\n if (target !== null) {\n targets.push(target);\n }\n }\n return targets;\n}\nfunction _getServiceIdentifierForProperty(inject, multiInject, propertyName, className) {\n var serviceIdentifier = (inject || multiInject);\n if (serviceIdentifier === undefined) {\n var msg = ERROR_MSGS.MISSING_INJECTABLE_ANNOTATION + \" for property \" + String(propertyName) + \" in class \" + className + \".\";\n throw new Error(msg);\n }\n return serviceIdentifier;\n}\nfunction getClassPropsAsTargets(metadataReader, constructorFunc, constructorName) {\n var classPropsMetadata = metadataReader.getPropertiesMetadata(constructorFunc);\n var targets = [];\n var symbolKeys = Object.getOwnPropertySymbols(classPropsMetadata);\n var stringKeys = Object.keys(classPropsMetadata);\n var keys = stringKeys.concat(symbolKeys);\n for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {\n var key = keys_1[_i];\n var targetMetadata = classPropsMetadata[key];\n var metadata = formatTargetMetadata(targetMetadata);\n var identifier = metadata.targetName || key;\n var serviceIdentifier = _getServiceIdentifierForProperty(metadata.inject, metadata.multiInject, key, constructorName);\n var target = new Target(TargetTypeEnum.ClassProperty, identifier, serviceIdentifier);\n target.metadata = targetMetadata;\n targets.push(target);\n }\n var baseConstructor = Object.getPrototypeOf(constructorFunc.prototype).constructor;\n if (baseConstructor !== Object) {\n var baseTargets = getClassPropsAsTargets(metadataReader, baseConstructor, constructorName);\n targets = __spreadArray(__spreadArray([], targets, true), baseTargets, true);\n }\n return targets;\n}\nfunction getBaseClassDependencyCount(metadataReader, func) {\n var baseConstructor = Object.getPrototypeOf(func.prototype).constructor;\n if (baseConstructor !== Object) {\n var baseConstructorName = getFunctionName(baseConstructor);\n var targets = getTargets(metadataReader, baseConstructorName, baseConstructor, true);\n var metadata = targets.map(function (t) { return t.metadata.filter(function (m) { return m.key === METADATA_KEY.UNMANAGED_TAG; }); });\n var unmanagedCount = [].concat.apply([], metadata).length;\n var dependencyCount = targets.length - unmanagedCount;\n if (dependencyCount > 0) {\n return dependencyCount;\n }\n else {\n return getBaseClassDependencyCount(metadataReader, baseConstructor);\n }\n }\n else {\n return 0;\n }\n}\nfunction formatTargetMetadata(targetMetadata) {\n var targetMetadataMap = {};\n targetMetadata.forEach(function (m) {\n targetMetadataMap[m.key.toString()] = m.value;\n });\n return {\n inject: targetMetadataMap[METADATA_KEY.INJECT_TAG],\n multiInject: targetMetadataMap[METADATA_KEY.MULTI_INJECT_TAG],\n targetName: targetMetadataMap[METADATA_KEY.NAME_TAG],\n unmanaged: targetMetadataMap[METADATA_KEY.UNMANAGED_TAG]\n };\n}\nexport { getDependencies, getBaseClassDependencyCount, getFunctionName };\n//# sourceMappingURL=reflection_utils.js.map","import { id } from \"../utils/id\";\nvar Request = (function () {\n function Request(serviceIdentifier, parentContext, parentRequest, bindings, target) {\n this.id = id();\n this.serviceIdentifier = serviceIdentifier;\n this.parentContext = parentContext;\n this.parentRequest = parentRequest;\n this.target = target;\n this.childRequests = [];\n this.bindings = (Array.isArray(bindings) ? bindings : [bindings]);\n this.requestScope = parentRequest === null\n ? new Map()\n : null;\n }\n Request.prototype.addChildRequest = function (serviceIdentifier, bindings, target) {\n var child = new Request(serviceIdentifier, this.parentContext, this, bindings, target);\n this.childRequests.push(child);\n return child;\n };\n return Request;\n}());\nexport { Request };\n//# sourceMappingURL=request.js.map","import { BindingCount } from \"../bindings/binding_count\";\nimport * as ERROR_MSGS from \"../constants/error_msgs\";\nimport { BindingTypeEnum, TargetTypeEnum } from \"../constants/literal_types\";\nimport * as METADATA_KEY from \"../constants/metadata_keys\";\nimport { isStackOverflowExeption } from \"../utils/exceptions\";\nimport { circularDependencyToException, getServiceIdentifierAsString, listMetadataForTarget, listRegisteredBindingsForServiceIdentifier } from \"../utils/serialization\";\nimport { Context } from \"./context\";\nimport { Metadata } from \"./metadata\";\nimport { Plan } from \"./plan\";\nimport { getBaseClassDependencyCount, getDependencies, getFunctionName } from \"./reflection_utils\";\nimport { Request } from \"./request\";\nimport { Target } from \"./target\";\nfunction getBindingDictionary(cntnr) {\n return cntnr._bindingDictionary;\n}\nfunction _createTarget(isMultiInject, targetType, serviceIdentifier, name, key, value) {\n var metadataKey = isMultiInject ? METADATA_KEY.MULTI_INJECT_TAG : METADATA_KEY.INJECT_TAG;\n var injectMetadata = new Metadata(metadataKey, serviceIdentifier);\n var target = new Target(targetType, name, serviceIdentifier, injectMetadata);\n if (key !== undefined) {\n var tagMetadata = new Metadata(key, value);\n target.metadata.push(tagMetadata);\n }\n return target;\n}\nfunction _getActiveBindings(metadataReader, avoidConstraints, context, parentRequest, target) {\n var bindings = getBindings(context.container, target.serviceIdentifier);\n var activeBindings = [];\n if (bindings.length === BindingCount.NoBindingsAvailable &&\n context.container.options.autoBindInjectable &&\n typeof target.serviceIdentifier === \"function\" &&\n metadataReader.getConstructorMetadata(target.serviceIdentifier).compilerGeneratedMetadata) {\n context.container.bind(target.serviceIdentifier).toSelf();\n bindings = getBindings(context.container, target.serviceIdentifier);\n }\n if (!avoidConstraints) {\n activeBindings = bindings.filter(function (binding) {\n var request = new Request(binding.serviceIdentifier, context, parentRequest, binding, target);\n return binding.constraint(request);\n });\n }\n else {\n activeBindings = bindings;\n }\n _validateActiveBindingCount(target.serviceIdentifier, activeBindings, target, context.container);\n return activeBindings;\n}\nfunction _validateActiveBindingCount(serviceIdentifier, bindings, target, container) {\n switch (bindings.length) {\n case BindingCount.NoBindingsAvailable:\n if (target.isOptional()) {\n return bindings;\n }\n else {\n var serviceIdentifierString = getServiceIdentifierAsString(serviceIdentifier);\n var msg = ERROR_MSGS.NOT_REGISTERED;\n msg += listMetadataForTarget(serviceIdentifierString, target);\n msg += listRegisteredBindingsForServiceIdentifier(container, serviceIdentifierString, getBindings);\n throw new Error(msg);\n }\n case BindingCount.OnlyOneBindingAvailable:\n return bindings;\n case BindingCount.MultipleBindingsAvailable:\n default:\n if (!target.isArray()) {\n var serviceIdentifierString = getServiceIdentifierAsString(serviceIdentifier);\n var msg = ERROR_MSGS.AMBIGUOUS_MATCH + \" \" + serviceIdentifierString;\n msg += listRegisteredBindingsForServiceIdentifier(container, serviceIdentifierString, getBindings);\n throw new Error(msg);\n }\n else {\n return bindings;\n }\n }\n}\nfunction _createSubRequests(metadataReader, avoidConstraints, serviceIdentifier, context, parentRequest, target) {\n var activeBindings;\n var childRequest;\n if (parentRequest === null) {\n activeBindings = _getActiveBindings(metadataReader, avoidConstraints, context, null, target);\n childRequest = new Request(serviceIdentifier, context, null, activeBindings, target);\n var thePlan = new Plan(context, childRequest);\n context.addPlan(thePlan);\n }\n else {\n activeBindings = _getActiveBindings(metadataReader, avoidConstraints, context, parentRequest, target);\n childRequest = parentRequest.addChildRequest(target.serviceIdentifier, activeBindings, target);\n }\n activeBindings.forEach(function (binding) {\n var subChildRequest = null;\n if (target.isArray()) {\n subChildRequest = childRequest.addChildRequest(binding.serviceIdentifier, binding, target);\n }\n else {\n if (binding.cache) {\n return;\n }\n subChildRequest = childRequest;\n }\n if (binding.type === BindingTypeEnum.Instance && binding.implementationType !== null) {\n var dependencies = getDependencies(metadataReader, binding.implementationType);\n if (!context.container.options.skipBaseClassChecks) {\n var baseClassDependencyCount = getBaseClassDependencyCount(metadataReader, binding.implementationType);\n if (dependencies.length < baseClassDependencyCount) {\n var error = ERROR_MSGS.ARGUMENTS_LENGTH_MISMATCH(getFunctionName(binding.implementationType));\n throw new Error(error);\n }\n }\n dependencies.forEach(function (dependency) {\n _createSubRequests(metadataReader, false, dependency.serviceIdentifier, context, subChildRequest, dependency);\n });\n }\n });\n}\nfunction getBindings(container, serviceIdentifier) {\n var bindings = [];\n var bindingDictionary = getBindingDictionary(container);\n if (bindingDictionary.hasKey(serviceIdentifier)) {\n bindings = bindingDictionary.get(serviceIdentifier);\n }\n else if (container.parent !== null) {\n bindings = getBindings(container.parent, serviceIdentifier);\n }\n return bindings;\n}\nfunction plan(metadataReader, container, isMultiInject, targetType, serviceIdentifier, key, value, avoidConstraints) {\n if (avoidConstraints === void 0) { avoidConstraints = false; }\n var context = new Context(container);\n var target = _createTarget(isMultiInject, targetType, serviceIdentifier, \"\", key, value);\n try {\n _createSubRequests(metadataReader, avoidConstraints, serviceIdentifier, context, null, target);\n return context;\n }\n catch (error) {\n if (isStackOverflowExeption(error)) {\n circularDependencyToException(context.plan.rootRequest);\n }\n throw error;\n }\n}\nfunction createMockRequest(container, serviceIdentifier, key, value) {\n var target = new Target(TargetTypeEnum.Variable, \"\", serviceIdentifier, new Metadata(key, value));\n var context = new Context(container);\n var request = new Request(serviceIdentifier, context, null, [], target);\n return request;\n}\nexport { plan, createMockRequest, getBindingDictionary };\n//# sourceMappingURL=planner.js.map","function isPromise(object) {\n var isObjectOrFunction = (typeof object === 'object' && object !== null) || typeof object === 'function';\n return isObjectOrFunction && typeof object.then === \"function\";\n}\nfunction isPromiseOrContainsPromise(object) {\n if (isPromise(object)) {\n return true;\n }\n return Array.isArray(object) && object.some(isPromise);\n}\nexport { isPromise, isPromiseOrContainsPromise };\n//# sourceMappingURL=async.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nimport { BindingScopeEnum } from \"../inversify\";\nimport { isPromise } from \"../utils/async\";\nexport var tryGetFromScope = function (requestScope, binding) {\n if ((binding.scope === BindingScopeEnum.Singleton) && binding.activated) {\n return binding.cache;\n }\n if (binding.scope === BindingScopeEnum.Request &&\n requestScope.has(binding.id)) {\n return requestScope.get(binding.id);\n }\n return null;\n};\nexport var saveToScope = function (requestScope, binding, result) {\n if (binding.scope === BindingScopeEnum.Singleton) {\n _saveToSingletonScope(binding, result);\n }\n if (binding.scope === BindingScopeEnum.Request) {\n _saveToRequestScope(requestScope, binding, result);\n }\n};\nvar _saveToRequestScope = function (requestScope, binding, result) {\n if (!requestScope.has(binding.id)) {\n requestScope.set(binding.id, result);\n }\n};\nvar _saveToSingletonScope = function (binding, result) {\n binding.cache = result;\n binding.activated = true;\n if (isPromise(result)) {\n void _saveAsyncResultToSingletonScope(binding, result);\n }\n};\nvar _saveAsyncResultToSingletonScope = function (binding, asyncResult) { return __awaiter(void 0, void 0, void 0, function () {\n var result, ex_1;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4, asyncResult];\n case 1:\n result = _a.sent();\n binding.cache = result;\n return [3, 3];\n case 2:\n ex_1 = _a.sent();\n binding.cache = null;\n binding.activated = false;\n throw ex_1;\n case 3: return [2];\n }\n });\n}); };\n//# sourceMappingURL=scope.js.map","export var FactoryType;\n(function (FactoryType) {\n FactoryType[\"DynamicValue\"] = \"toDynamicValue\";\n FactoryType[\"Factory\"] = \"toFactory\";\n FactoryType[\"Provider\"] = \"toProvider\";\n})(FactoryType || (FactoryType = {}));\n//# sourceMappingURL=factory_type.js.map","import { getServiceIdentifierAsString } from \"../inversify\";\nimport * as ERROR_MSGS from \"../constants/error_msgs\";\nimport { BindingTypeEnum } from \"../constants/literal_types\";\nimport { FactoryType } from \"./factory_type\";\nexport var multiBindToService = function (container) {\n return function (service) {\n return function () {\n var types = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n types[_i] = arguments[_i];\n }\n return types.forEach(function (t) { return container.bind(t).toService(service); });\n };\n };\n};\nexport var ensureFullyBound = function (binding) {\n var boundValue = null;\n switch (binding.type) {\n case BindingTypeEnum.ConstantValue:\n case BindingTypeEnum.Function:\n boundValue = binding.cache;\n break;\n case BindingTypeEnum.Constructor:\n case BindingTypeEnum.Instance:\n boundValue = binding.implementationType;\n break;\n case BindingTypeEnum.DynamicValue:\n boundValue = binding.dynamicValue;\n break;\n case BindingTypeEnum.Provider:\n boundValue = binding.provider;\n break;\n case BindingTypeEnum.Factory:\n boundValue = binding.factory;\n break;\n }\n if (boundValue === null) {\n var serviceIdentifierAsString = getServiceIdentifierAsString(binding.serviceIdentifier);\n throw new Error(ERROR_MSGS.INVALID_BINDING_TYPE + \" \" + serviceIdentifierAsString);\n }\n};\nexport var getFactoryDetails = function (binding) {\n switch (binding.type) {\n case BindingTypeEnum.Factory:\n return { factory: binding.factory, factoryType: FactoryType.Factory };\n case BindingTypeEnum.Provider:\n return { factory: binding.provider, factoryType: FactoryType.Provider };\n case BindingTypeEnum.DynamicValue:\n return { factory: binding.dynamicValue, factoryType: FactoryType.DynamicValue };\n default:\n throw new Error(\"Unexpected factory type \" + binding.type);\n }\n};\n//# sourceMappingURL=binding_utils.js.map","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nimport { ON_DEACTIVATION_ERROR, POST_CONSTRUCT_ERROR, PRE_DESTROY_ERROR } from \"../constants/error_msgs\";\nimport { BindingScopeEnum, TargetTypeEnum } from \"../constants/literal_types\";\nimport * as METADATA_KEY from \"../constants/metadata_keys\";\nimport { isPromise, isPromiseOrContainsPromise } from \"../utils/async\";\nfunction _resolveRequests(childRequests, resolveRequest) {\n return childRequests.reduce(function (resolvedRequests, childRequest) {\n var injection = resolveRequest(childRequest);\n var targetType = childRequest.target.type;\n if (targetType === TargetTypeEnum.ConstructorArgument) {\n resolvedRequests.constructorInjections.push(injection);\n }\n else {\n resolvedRequests.propertyRequests.push(childRequest);\n resolvedRequests.propertyInjections.push(injection);\n }\n if (!resolvedRequests.isAsync) {\n resolvedRequests.isAsync = isPromiseOrContainsPromise(injection);\n }\n return resolvedRequests;\n }, { constructorInjections: [], propertyInjections: [], propertyRequests: [], isAsync: false });\n}\nfunction _createInstance(constr, childRequests, resolveRequest) {\n var result;\n if (childRequests.length > 0) {\n var resolved = _resolveRequests(childRequests, resolveRequest);\n var createInstanceWithInjectionsArg = __assign(__assign({}, resolved), { constr: constr });\n if (resolved.isAsync) {\n result = createInstanceWithInjectionsAsync(createInstanceWithInjectionsArg);\n }\n else {\n result = createInstanceWithInjections(createInstanceWithInjectionsArg);\n }\n }\n else {\n result = new constr();\n }\n return result;\n}\nfunction createInstanceWithInjections(args) {\n var _a;\n var instance = new ((_a = args.constr).bind.apply(_a, __spreadArray([void 0], args.constructorInjections, false)))();\n args.propertyRequests.forEach(function (r, index) {\n var property = r.target.identifier;\n var injection = args.propertyInjections[index];\n instance[property] = injection;\n });\n return instance;\n}\nfunction createInstanceWithInjectionsAsync(args) {\n return __awaiter(this, void 0, void 0, function () {\n var constructorInjections, propertyInjections;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4, possiblyWaitInjections(args.constructorInjections)];\n case 1:\n constructorInjections = _a.sent();\n return [4, possiblyWaitInjections(args.propertyInjections)];\n case 2:\n propertyInjections = _a.sent();\n return [2, createInstanceWithInjections(__assign(__assign({}, args), { constructorInjections: constructorInjections, propertyInjections: propertyInjections }))];\n }\n });\n });\n}\nfunction possiblyWaitInjections(possiblePromiseinjections) {\n return __awaiter(this, void 0, void 0, function () {\n var injections, _i, possiblePromiseinjections_1, injection;\n return __generator(this, function (_a) {\n injections = [];\n for (_i = 0, possiblePromiseinjections_1 = possiblePromiseinjections; _i < possiblePromiseinjections_1.length; _i++) {\n injection = possiblePromiseinjections_1[_i];\n if (Array.isArray(injection)) {\n injections.push(Promise.all(injection));\n }\n else {\n injections.push(injection);\n }\n }\n return [2, Promise.all(injections)];\n });\n });\n}\nfunction _getInstanceAfterPostConstruct(constr, result) {\n var postConstructResult = _postConstruct(constr, result);\n if (isPromise(postConstructResult)) {\n return postConstructResult.then(function () { return result; });\n }\n else {\n return result;\n }\n}\nfunction _postConstruct(constr, instance) {\n var _a, _b;\n if (Reflect.hasMetadata(METADATA_KEY.POST_CONSTRUCT, constr)) {\n var data = Reflect.getMetadata(METADATA_KEY.POST_CONSTRUCT, constr);\n try {\n return (_b = (_a = instance)[data.value]) === null || _b === void 0 ? void 0 : _b.call(_a);\n }\n catch (e) {\n throw new Error(POST_CONSTRUCT_ERROR(constr.name, e.message));\n }\n }\n}\nfunction _validateInstanceResolution(binding, constr) {\n if (binding.scope !== BindingScopeEnum.Singleton) {\n _throwIfHandlingDeactivation(binding, constr);\n }\n}\nfunction _throwIfHandlingDeactivation(binding, constr) {\n var scopeErrorMessage = \"Class cannot be instantiated in \" + (binding.scope === BindingScopeEnum.Request ?\n \"request\" :\n \"transient\") + \" scope.\";\n if (typeof binding.onDeactivation === \"function\") {\n throw new Error(ON_DEACTIVATION_ERROR(constr.name, scopeErrorMessage));\n }\n if (Reflect.hasMetadata(METADATA_KEY.PRE_DESTROY, constr)) {\n throw new Error(PRE_DESTROY_ERROR(constr.name, scopeErrorMessage));\n }\n}\nfunction resolveInstance(binding, constr, childRequests, resolveRequest) {\n _validateInstanceResolution(binding, constr);\n var result = _createInstance(constr, childRequests, resolveRequest);\n if (isPromise(result)) {\n return result.then(function (resolvedResult) { return _getInstanceAfterPostConstruct(constr, resolvedResult); });\n }\n else {\n return _getInstanceAfterPostConstruct(constr, result);\n }\n}\nexport { resolveInstance };\n//# sourceMappingURL=instantiation.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nimport * as ERROR_MSGS from \"../constants/error_msgs\";\nimport { BindingTypeEnum } from \"../constants/literal_types\";\nimport { getBindingDictionary } from \"../planning/planner\";\nimport { saveToScope, tryGetFromScope } from \"../scope/scope\";\nimport { isPromise } from \"../utils/async\";\nimport { getFactoryDetails, ensureFullyBound } from \"../utils/binding_utils\";\nimport { tryAndThrowErrorIfStackOverflow } from \"../utils/exceptions\";\nimport { resolveInstance } from \"./instantiation\";\nvar _resolveRequest = function (requestScope) {\n return function (request) {\n request.parentContext.setCurrentRequest(request);\n var bindings = request.bindings;\n var childRequests = request.childRequests;\n var targetIsAnArray = request.target && request.target.isArray();\n var targetParentIsNotAnArray = !request.parentRequest ||\n !request.parentRequest.target ||\n !request.target ||\n !request.parentRequest.target.matchesArray(request.target.serviceIdentifier);\n if (targetIsAnArray && targetParentIsNotAnArray) {\n return childRequests.map(function (childRequest) {\n var _f = _resolveRequest(requestScope);\n return _f(childRequest);\n });\n }\n else {\n if (request.target.isOptional() && bindings.length === 0) {\n return undefined;\n }\n var binding = bindings[0];\n return _resolveBinding(requestScope, request, binding);\n }\n };\n};\nvar _resolveFactoryFromBinding = function (binding, context) {\n var factoryDetails = getFactoryDetails(binding);\n return tryAndThrowErrorIfStackOverflow(function () { return factoryDetails.factory.bind(binding)(context); }, function () { return new Error(ERROR_MSGS.CIRCULAR_DEPENDENCY_IN_FACTORY(factoryDetails.factoryType, context.currentRequest.serviceIdentifier.toString())); });\n};\nvar _getResolvedFromBinding = function (requestScope, request, binding) {\n var result;\n var childRequests = request.childRequests;\n ensureFullyBound(binding);\n switch (binding.type) {\n case BindingTypeEnum.ConstantValue:\n case BindingTypeEnum.Function:\n result = binding.cache;\n break;\n case BindingTypeEnum.Constructor:\n result = binding.implementationType;\n break;\n case BindingTypeEnum.Instance:\n result = resolveInstance(binding, binding.implementationType, childRequests, _resolveRequest(requestScope));\n break;\n default:\n result = _resolveFactoryFromBinding(binding, request.parentContext);\n }\n return result;\n};\nvar _resolveInScope = function (requestScope, binding, resolveFromBinding) {\n var result = tryGetFromScope(requestScope, binding);\n if (result !== null) {\n return result;\n }\n result = resolveFromBinding();\n saveToScope(requestScope, binding, result);\n return result;\n};\nvar _resolveBinding = function (requestScope, request, binding) {\n return _resolveInScope(requestScope, binding, function () {\n var result = _getResolvedFromBinding(requestScope, request, binding);\n if (isPromise(result)) {\n result = result.then(function (resolved) { return _onActivation(request, binding, resolved); });\n }\n else {\n result = _onActivation(request, binding, result);\n }\n return result;\n });\n};\nfunction _onActivation(request, binding, resolved) {\n var result = _bindingActivation(request.parentContext, binding, resolved);\n var containersIterator = _getContainersIterator(request.parentContext.container);\n var container;\n var containersIteratorResult = containersIterator.next();\n do {\n container = containersIteratorResult.value;\n var context_1 = request.parentContext;\n var serviceIdentifier = request.serviceIdentifier;\n var activationsIterator = _getContainerActivationsForService(container, serviceIdentifier);\n if (isPromise(result)) {\n result = _activateContainerAsync(activationsIterator, context_1, result);\n }\n else {\n result = _activateContainer(activationsIterator, context_1, result);\n }\n containersIteratorResult = containersIterator.next();\n } while (containersIteratorResult.done !== true && !getBindingDictionary(container).hasKey(request.serviceIdentifier));\n return result;\n}\nvar _bindingActivation = function (context, binding, previousResult) {\n var result;\n if (typeof binding.onActivation === \"function\") {\n result = binding.onActivation(context, previousResult);\n }\n else {\n result = previousResult;\n }\n return result;\n};\nvar _activateContainer = function (activationsIterator, context, result) {\n var activation = activationsIterator.next();\n while (!activation.done) {\n result = activation.value(context, result);\n if (isPromise(result)) {\n return _activateContainerAsync(activationsIterator, context, result);\n }\n activation = activationsIterator.next();\n }\n return result;\n};\nvar _activateContainerAsync = function (activationsIterator, context, resultPromise) { return __awaiter(void 0, void 0, void 0, function () {\n var result, activation;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4, resultPromise];\n case 1:\n result = _a.sent();\n activation = activationsIterator.next();\n _a.label = 2;\n case 2:\n if (!!activation.done) return [3, 4];\n return [4, activation.value(context, result)];\n case 3:\n result = _a.sent();\n activation = activationsIterator.next();\n return [3, 2];\n case 4: return [2, result];\n }\n });\n}); };\nvar _getContainerActivationsForService = function (container, serviceIdentifier) {\n var activations = container._activations;\n return activations.hasKey(serviceIdentifier) ? activations.get(serviceIdentifier).values() : [].values();\n};\nvar _getContainersIterator = function (container) {\n var containersStack = [container];\n var parent = container.parent;\n while (parent !== null) {\n containersStack.push(parent);\n parent = parent.parent;\n }\n var getNextContainer = function () {\n var nextContainer = containersStack.pop();\n if (nextContainer !== undefined) {\n return { done: false, value: nextContainer };\n }\n else {\n return { done: true, value: undefined };\n }\n };\n var containersIterator = {\n next: getNextContainer,\n };\n return containersIterator;\n};\nfunction resolve(context) {\n var _f = _resolveRequest(context.plan.rootRequest.requestScope);\n return _f(context.plan.rootRequest);\n}\nexport { resolve };\n//# sourceMappingURL=resolver.js.map","import * as METADATA_KEY from \"../constants/metadata_keys\";\nimport { Metadata } from \"../planning/metadata\";\nvar traverseAncerstors = function (request, constraint) {\n var parent = request.parentRequest;\n if (parent !== null) {\n return constraint(parent) ? true : traverseAncerstors(parent, constraint);\n }\n else {\n return false;\n }\n};\nvar taggedConstraint = function (key) { return function (value) {\n var constraint = function (request) {\n return request !== null && request.target !== null && request.target.matchesTag(key)(value);\n };\n constraint.metaData = new Metadata(key, value);\n return constraint;\n}; };\nvar namedConstraint = taggedConstraint(METADATA_KEY.NAMED_TAG);\nvar typeConstraint = function (type) { return function (request) {\n var binding = null;\n if (request !== null) {\n binding = request.bindings[0];\n if (typeof type === \"string\") {\n var serviceIdentifier = binding.serviceIdentifier;\n return serviceIdentifier === type;\n }\n else {\n var constructor = request.bindings[0].implementationType;\n return type === constructor;\n }\n }\n return false;\n}; };\nexport { traverseAncerstors, taggedConstraint, namedConstraint, typeConstraint };\n//# sourceMappingURL=constraint_helpers.js.map","import { BindingOnSyntax } from \"./binding_on_syntax\";\nimport { namedConstraint, taggedConstraint, traverseAncerstors, typeConstraint } from \"./constraint_helpers\";\nvar BindingWhenSyntax = (function () {\n function BindingWhenSyntax(binding) {\n this._binding = binding;\n }\n BindingWhenSyntax.prototype.when = function (constraint) {\n this._binding.constraint = constraint;\n return new BindingOnSyntax(this._binding);\n };\n BindingWhenSyntax.prototype.whenTargetNamed = function (name) {\n this._binding.constraint = namedConstraint(name);\n return new BindingOnSyntax(this._binding);\n };\n BindingWhenSyntax.prototype.whenTargetIsDefault = function () {\n this._binding.constraint = function (request) {\n if (request === null) {\n return false;\n }\n var targetIsDefault = (request.target !== null) &&\n (!request.target.isNamed()) &&\n (!request.target.isTagged());\n return targetIsDefault;\n };\n return new BindingOnSyntax(this._binding);\n };\n BindingWhenSyntax.prototype.whenTargetTagged = function (tag, value) {\n this._binding.constraint = taggedConstraint(tag)(value);\n return new BindingOnSyntax(this._binding);\n };\n BindingWhenSyntax.prototype.whenInjectedInto = function (parent) {\n this._binding.constraint = function (request) {\n return request !== null && typeConstraint(parent)(request.parentRequest);\n };\n return new BindingOnSyntax(this._binding);\n };\n BindingWhenSyntax.prototype.whenParentNamed = function (name) {\n this._binding.constraint = function (request) {\n return request !== null && namedConstraint(name)(request.parentRequest);\n };\n return new BindingOnSyntax(this._binding);\n };\n BindingWhenSyntax.prototype.whenParentTagged = function (tag, value) {\n this._binding.constraint = function (request) {\n return request !== null && taggedConstraint(tag)(value)(request.parentRequest);\n };\n return new BindingOnSyntax(this._binding);\n };\n BindingWhenSyntax.prototype.whenAnyAncestorIs = function (ancestor) {\n this._binding.constraint = function (request) {\n return request !== null && traverseAncerstors(request, typeConstraint(ancestor));\n };\n return new BindingOnSyntax(this._binding);\n };\n BindingWhenSyntax.prototype.whenNoAncestorIs = function (ancestor) {\n this._binding.constraint = function (request) {\n return request !== null && !traverseAncerstors(request, typeConstraint(ancestor));\n };\n return new BindingOnSyntax(this._binding);\n };\n BindingWhenSyntax.prototype.whenAnyAncestorNamed = function (name) {\n this._binding.constraint = function (request) {\n return request !== null && traverseAncerstors(request, namedConstraint(name));\n };\n return new BindingOnSyntax(this._binding);\n };\n BindingWhenSyntax.prototype.whenNoAncestorNamed = function (name) {\n this._binding.constraint = function (request) {\n return request !== null && !traverseAncerstors(request, namedConstraint(name));\n };\n return new BindingOnSyntax(this._binding);\n };\n BindingWhenSyntax.prototype.whenAnyAncestorTagged = function (tag, value) {\n this._binding.constraint = function (request) {\n return request !== null && traverseAncerstors(request, taggedConstraint(tag)(value));\n };\n return new BindingOnSyntax(this._binding);\n };\n BindingWhenSyntax.prototype.whenNoAncestorTagged = function (tag, value) {\n this._binding.constraint = function (request) {\n return request !== null && !traverseAncerstors(request, taggedConstraint(tag)(value));\n };\n return new BindingOnSyntax(this._binding);\n };\n BindingWhenSyntax.prototype.whenAnyAncestorMatches = function (constraint) {\n this._binding.constraint = function (request) {\n return request !== null && traverseAncerstors(request, constraint);\n };\n return new BindingOnSyntax(this._binding);\n };\n BindingWhenSyntax.prototype.whenNoAncestorMatches = function (constraint) {\n this._binding.constraint = function (request) {\n return request !== null && !traverseAncerstors(request, constraint);\n };\n return new BindingOnSyntax(this._binding);\n };\n return BindingWhenSyntax;\n}());\nexport { BindingWhenSyntax };\n//# sourceMappingURL=binding_when_syntax.js.map","import { BindingWhenSyntax } from \"./binding_when_syntax\";\nvar BindingOnSyntax = (function () {\n function BindingOnSyntax(binding) {\n this._binding = binding;\n }\n BindingOnSyntax.prototype.onActivation = function (handler) {\n this._binding.onActivation = handler;\n return new BindingWhenSyntax(this._binding);\n };\n BindingOnSyntax.prototype.onDeactivation = function (handler) {\n this._binding.onDeactivation = handler;\n return new BindingWhenSyntax(this._binding);\n };\n return BindingOnSyntax;\n}());\nexport { BindingOnSyntax };\n//# sourceMappingURL=binding_on_syntax.js.map","import { BindingOnSyntax } from \"./binding_on_syntax\";\nimport { BindingWhenSyntax } from \"./binding_when_syntax\";\nvar BindingWhenOnSyntax = (function () {\n function BindingWhenOnSyntax(binding) {\n this._binding = binding;\n this._bindingWhenSyntax = new BindingWhenSyntax(this._binding);\n this._bindingOnSyntax = new BindingOnSyntax(this._binding);\n }\n BindingWhenOnSyntax.prototype.when = function (constraint) {\n return this._bindingWhenSyntax.when(constraint);\n };\n BindingWhenOnSyntax.prototype.whenTargetNamed = function (name) {\n return this._bindingWhenSyntax.whenTargetNamed(name);\n };\n BindingWhenOnSyntax.prototype.whenTargetIsDefault = function () {\n return this._bindingWhenSyntax.whenTargetIsDefault();\n };\n BindingWhenOnSyntax.prototype.whenTargetTagged = function (tag, value) {\n return this._bindingWhenSyntax.whenTargetTagged(tag, value);\n };\n BindingWhenOnSyntax.prototype.whenInjectedInto = function (parent) {\n return this._bindingWhenSyntax.whenInjectedInto(parent);\n };\n BindingWhenOnSyntax.prototype.whenParentNamed = function (name) {\n return this._bindingWhenSyntax.whenParentNamed(name);\n };\n BindingWhenOnSyntax.prototype.whenParentTagged = function (tag, value) {\n return this._bindingWhenSyntax.whenParentTagged(tag, value);\n };\n BindingWhenOnSyntax.prototype.whenAnyAncestorIs = function (ancestor) {\n return this._bindingWhenSyntax.whenAnyAncestorIs(ancestor);\n };\n BindingWhenOnSyntax.prototype.whenNoAncestorIs = function (ancestor) {\n return this._bindingWhenSyntax.whenNoAncestorIs(ancestor);\n };\n BindingWhenOnSyntax.prototype.whenAnyAncestorNamed = function (name) {\n return this._bindingWhenSyntax.whenAnyAncestorNamed(name);\n };\n BindingWhenOnSyntax.prototype.whenAnyAncestorTagged = function (tag, value) {\n return this._bindingWhenSyntax.whenAnyAncestorTagged(tag, value);\n };\n BindingWhenOnSyntax.prototype.whenNoAncestorNamed = function (name) {\n return this._bindingWhenSyntax.whenNoAncestorNamed(name);\n };\n BindingWhenOnSyntax.prototype.whenNoAncestorTagged = function (tag, value) {\n return this._bindingWhenSyntax.whenNoAncestorTagged(tag, value);\n };\n BindingWhenOnSyntax.prototype.whenAnyAncestorMatches = function (constraint) {\n return this._bindingWhenSyntax.whenAnyAncestorMatches(constraint);\n };\n BindingWhenOnSyntax.prototype.whenNoAncestorMatches = function (constraint) {\n return this._bindingWhenSyntax.whenNoAncestorMatches(constraint);\n };\n BindingWhenOnSyntax.prototype.onActivation = function (handler) {\n return this._bindingOnSyntax.onActivation(handler);\n };\n BindingWhenOnSyntax.prototype.onDeactivation = function (handler) {\n return this._bindingOnSyntax.onDeactivation(handler);\n };\n return BindingWhenOnSyntax;\n}());\nexport { BindingWhenOnSyntax };\n//# sourceMappingURL=binding_when_on_syntax.js.map","import { BindingScopeEnum } from \"../constants/literal_types\";\nimport { BindingWhenOnSyntax } from \"./binding_when_on_syntax\";\nvar BindingInSyntax = (function () {\n function BindingInSyntax(binding) {\n this._binding = binding;\n }\n BindingInSyntax.prototype.inRequestScope = function () {\n this._binding.scope = BindingScopeEnum.Request;\n return new BindingWhenOnSyntax(this._binding);\n };\n BindingInSyntax.prototype.inSingletonScope = function () {\n this._binding.scope = BindingScopeEnum.Singleton;\n return new BindingWhenOnSyntax(this._binding);\n };\n BindingInSyntax.prototype.inTransientScope = function () {\n this._binding.scope = BindingScopeEnum.Transient;\n return new BindingWhenOnSyntax(this._binding);\n };\n return BindingInSyntax;\n}());\nexport { BindingInSyntax };\n//# sourceMappingURL=binding_in_syntax.js.map","import { BindingInSyntax } from \"./binding_in_syntax\";\nimport { BindingOnSyntax } from \"./binding_on_syntax\";\nimport { BindingWhenSyntax } from \"./binding_when_syntax\";\nvar BindingInWhenOnSyntax = (function () {\n function BindingInWhenOnSyntax(binding) {\n this._binding = binding;\n this._bindingWhenSyntax = new BindingWhenSyntax(this._binding);\n this._bindingOnSyntax = new BindingOnSyntax(this._binding);\n this._bindingInSyntax = new BindingInSyntax(binding);\n }\n BindingInWhenOnSyntax.prototype.inRequestScope = function () {\n return this._bindingInSyntax.inRequestScope();\n };\n BindingInWhenOnSyntax.prototype.inSingletonScope = function () {\n return this._bindingInSyntax.inSingletonScope();\n };\n BindingInWhenOnSyntax.prototype.inTransientScope = function () {\n return this._bindingInSyntax.inTransientScope();\n };\n BindingInWhenOnSyntax.prototype.when = function (constraint) {\n return this._bindingWhenSyntax.when(constraint);\n };\n BindingInWhenOnSyntax.prototype.whenTargetNamed = function (name) {\n return this._bindingWhenSyntax.whenTargetNamed(name);\n };\n BindingInWhenOnSyntax.prototype.whenTargetIsDefault = function () {\n return this._bindingWhenSyntax.whenTargetIsDefault();\n };\n BindingInWhenOnSyntax.prototype.whenTargetTagged = function (tag, value) {\n return this._bindingWhenSyntax.whenTargetTagged(tag, value);\n };\n BindingInWhenOnSyntax.prototype.whenInjectedInto = function (parent) {\n return this._bindingWhenSyntax.whenInjectedInto(parent);\n };\n BindingInWhenOnSyntax.prototype.whenParentNamed = function (name) {\n return this._bindingWhenSyntax.whenParentNamed(name);\n };\n BindingInWhenOnSyntax.prototype.whenParentTagged = function (tag, value) {\n return this._bindingWhenSyntax.whenParentTagged(tag, value);\n };\n BindingInWhenOnSyntax.prototype.whenAnyAncestorIs = function (ancestor) {\n return this._bindingWhenSyntax.whenAnyAncestorIs(ancestor);\n };\n BindingInWhenOnSyntax.prototype.whenNoAncestorIs = function (ancestor) {\n return this._bindingWhenSyntax.whenNoAncestorIs(ancestor);\n };\n BindingInWhenOnSyntax.prototype.whenAnyAncestorNamed = function (name) {\n return this._bindingWhenSyntax.whenAnyAncestorNamed(name);\n };\n BindingInWhenOnSyntax.prototype.whenAnyAncestorTagged = function (tag, value) {\n return this._bindingWhenSyntax.whenAnyAncestorTagged(tag, value);\n };\n BindingInWhenOnSyntax.prototype.whenNoAncestorNamed = function (name) {\n return this._bindingWhenSyntax.whenNoAncestorNamed(name);\n };\n BindingInWhenOnSyntax.prototype.whenNoAncestorTagged = function (tag, value) {\n return this._bindingWhenSyntax.whenNoAncestorTagged(tag, value);\n };\n BindingInWhenOnSyntax.prototype.whenAnyAncestorMatches = function (constraint) {\n return this._bindingWhenSyntax.whenAnyAncestorMatches(constraint);\n };\n BindingInWhenOnSyntax.prototype.whenNoAncestorMatches = function (constraint) {\n return this._bindingWhenSyntax.whenNoAncestorMatches(constraint);\n };\n BindingInWhenOnSyntax.prototype.onActivation = function (handler) {\n return this._bindingOnSyntax.onActivation(handler);\n };\n BindingInWhenOnSyntax.prototype.onDeactivation = function (handler) {\n return this._bindingOnSyntax.onDeactivation(handler);\n };\n return BindingInWhenOnSyntax;\n}());\nexport { BindingInWhenOnSyntax };\n//# sourceMappingURL=binding_in_when_on_syntax.js.map","import * as ERROR_MSGS from \"../constants/error_msgs\";\nimport { BindingScopeEnum, BindingTypeEnum } from \"../constants/literal_types\";\nimport { BindingInWhenOnSyntax } from \"./binding_in_when_on_syntax\";\nimport { BindingWhenOnSyntax } from \"./binding_when_on_syntax\";\nvar BindingToSyntax = (function () {\n function BindingToSyntax(binding) {\n this._binding = binding;\n }\n BindingToSyntax.prototype.to = function (constructor) {\n this._binding.type = BindingTypeEnum.Instance;\n this._binding.implementationType = constructor;\n return new BindingInWhenOnSyntax(this._binding);\n };\n BindingToSyntax.prototype.toSelf = function () {\n if (typeof this._binding.serviceIdentifier !== \"function\") {\n throw new Error(\"\" + ERROR_MSGS.INVALID_TO_SELF_VALUE);\n }\n var self = this._binding.serviceIdentifier;\n return this.to(self);\n };\n BindingToSyntax.prototype.toConstantValue = function (value) {\n this._binding.type = BindingTypeEnum.ConstantValue;\n this._binding.cache = value;\n this._binding.dynamicValue = null;\n this._binding.implementationType = null;\n this._binding.scope = BindingScopeEnum.Singleton;\n return new BindingWhenOnSyntax(this._binding);\n };\n BindingToSyntax.prototype.toDynamicValue = function (func) {\n this._binding.type = BindingTypeEnum.DynamicValue;\n this._binding.cache = null;\n this._binding.dynamicValue = func;\n this._binding.implementationType = null;\n return new BindingInWhenOnSyntax(this._binding);\n };\n BindingToSyntax.prototype.toConstructor = function (constructor) {\n this._binding.type = BindingTypeEnum.Constructor;\n this._binding.implementationType = constructor;\n this._binding.scope = BindingScopeEnum.Singleton;\n return new BindingWhenOnSyntax(this._binding);\n };\n BindingToSyntax.prototype.toFactory = function (factory) {\n this._binding.type = BindingTypeEnum.Factory;\n this._binding.factory = factory;\n this._binding.scope = BindingScopeEnum.Singleton;\n return new BindingWhenOnSyntax(this._binding);\n };\n BindingToSyntax.prototype.toFunction = function (func) {\n if (typeof func !== \"function\") {\n throw new Error(ERROR_MSGS.INVALID_FUNCTION_BINDING);\n }\n var bindingWhenOnSyntax = this.toConstantValue(func);\n this._binding.type = BindingTypeEnum.Function;\n this._binding.scope = BindingScopeEnum.Singleton;\n return bindingWhenOnSyntax;\n };\n BindingToSyntax.prototype.toAutoFactory = function (serviceIdentifier) {\n this._binding.type = BindingTypeEnum.Factory;\n this._binding.factory = function (context) {\n var autofactory = function () { return context.container.get(serviceIdentifier); };\n return autofactory;\n };\n this._binding.scope = BindingScopeEnum.Singleton;\n return new BindingWhenOnSyntax(this._binding);\n };\n BindingToSyntax.prototype.toAutoNamedFactory = function (serviceIdentifier) {\n this._binding.type = BindingTypeEnum.Factory;\n this._binding.factory = function (context) {\n return function (named) { return context.container.getNamed(serviceIdentifier, named); };\n };\n return new BindingWhenOnSyntax(this._binding);\n };\n BindingToSyntax.prototype.toProvider = function (provider) {\n this._binding.type = BindingTypeEnum.Provider;\n this._binding.provider = provider;\n this._binding.scope = BindingScopeEnum.Singleton;\n return new BindingWhenOnSyntax(this._binding);\n };\n BindingToSyntax.prototype.toService = function (service) {\n this.toDynamicValue(function (context) { return context.container.get(service); });\n };\n return BindingToSyntax;\n}());\nexport { BindingToSyntax };\n//# sourceMappingURL=binding_to_syntax.js.map","var ContainerSnapshot = (function () {\n function ContainerSnapshot() {\n }\n ContainerSnapshot.of = function (bindings, middleware, activations, deactivations, moduleActivationStore) {\n var snapshot = new ContainerSnapshot();\n snapshot.bindings = bindings;\n snapshot.middleware = middleware;\n snapshot.deactivations = deactivations;\n snapshot.activations = activations;\n snapshot.moduleActivationStore = moduleActivationStore;\n return snapshot;\n };\n return ContainerSnapshot;\n}());\nexport { ContainerSnapshot };\n//# sourceMappingURL=container_snapshot.js.map","function isClonable(obj) {\n return (typeof obj === 'object')\n && (obj !== null)\n && ('clone' in obj)\n && typeof obj.clone === 'function';\n}\nexport { isClonable };\n//# sourceMappingURL=clonable.js.map","import * as ERROR_MSGS from \"../constants/error_msgs\";\nimport { isClonable } from \"../utils/clonable\";\nvar Lookup = (function () {\n function Lookup() {\n this._map = new Map();\n }\n Lookup.prototype.getMap = function () {\n return this._map;\n };\n Lookup.prototype.add = function (serviceIdentifier, value) {\n if (serviceIdentifier === null || serviceIdentifier === undefined) {\n throw new Error(ERROR_MSGS.NULL_ARGUMENT);\n }\n if (value === null || value === undefined) {\n throw new Error(ERROR_MSGS.NULL_ARGUMENT);\n }\n var entry = this._map.get(serviceIdentifier);\n if (entry !== undefined) {\n entry.push(value);\n }\n else {\n this._map.set(serviceIdentifier, [value]);\n }\n };\n Lookup.prototype.get = function (serviceIdentifier) {\n if (serviceIdentifier === null || serviceIdentifier === undefined) {\n throw new Error(ERROR_MSGS.NULL_ARGUMENT);\n }\n var entry = this._map.get(serviceIdentifier);\n if (entry !== undefined) {\n return entry;\n }\n else {\n throw new Error(ERROR_MSGS.KEY_NOT_FOUND);\n }\n };\n Lookup.prototype.remove = function (serviceIdentifier) {\n if (serviceIdentifier === null || serviceIdentifier === undefined) {\n throw new Error(ERROR_MSGS.NULL_ARGUMENT);\n }\n if (!this._map.delete(serviceIdentifier)) {\n throw new Error(ERROR_MSGS.KEY_NOT_FOUND);\n }\n };\n Lookup.prototype.removeIntersection = function (lookup) {\n var _this = this;\n this.traverse(function (serviceIdentifier, value) {\n var lookupActivations = lookup.hasKey(serviceIdentifier) ? lookup.get(serviceIdentifier) : undefined;\n if (lookupActivations !== undefined) {\n var filteredValues = value.filter(function (lookupValue) {\n return !lookupActivations.some(function (moduleActivation) { return lookupValue === moduleActivation; });\n });\n _this._setValue(serviceIdentifier, filteredValues);\n }\n });\n };\n Lookup.prototype.removeByCondition = function (condition) {\n var _this = this;\n var removals = [];\n this._map.forEach(function (entries, key) {\n var updatedEntries = [];\n for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) {\n var entry = entries_1[_i];\n var remove = condition(entry);\n if (remove) {\n removals.push(entry);\n }\n else {\n updatedEntries.push(entry);\n }\n }\n _this._setValue(key, updatedEntries);\n });\n return removals;\n };\n Lookup.prototype.hasKey = function (serviceIdentifier) {\n if (serviceIdentifier === null || serviceIdentifier === undefined) {\n throw new Error(ERROR_MSGS.NULL_ARGUMENT);\n }\n return this._map.has(serviceIdentifier);\n };\n Lookup.prototype.clone = function () {\n var copy = new Lookup();\n this._map.forEach(function (value, key) {\n value.forEach(function (b) { return copy.add(key, isClonable(b) ? b.clone() : b); });\n });\n return copy;\n };\n Lookup.prototype.traverse = function (func) {\n this._map.forEach(function (value, key) {\n func(key, value);\n });\n };\n Lookup.prototype._setValue = function (serviceIdentifier, value) {\n if (value.length > 0) {\n this._map.set(serviceIdentifier, value);\n }\n else {\n this._map.delete(serviceIdentifier);\n }\n };\n return Lookup;\n}());\nexport { Lookup };\n//# sourceMappingURL=lookup.js.map","import { Lookup } from \"./lookup\";\nvar ModuleActivationStore = (function () {\n function ModuleActivationStore() {\n this._map = new Map();\n }\n ModuleActivationStore.prototype.remove = function (moduleId) {\n if (this._map.has(moduleId)) {\n var handlers = this._map.get(moduleId);\n this._map.delete(moduleId);\n return handlers;\n }\n return this._getEmptyHandlersStore();\n };\n ModuleActivationStore.prototype.addDeactivation = function (moduleId, serviceIdentifier, onDeactivation) {\n this._getModuleActivationHandlers(moduleId)\n .onDeactivations.add(serviceIdentifier, onDeactivation);\n };\n ModuleActivationStore.prototype.addActivation = function (moduleId, serviceIdentifier, onActivation) {\n this._getModuleActivationHandlers(moduleId)\n .onActivations.add(serviceIdentifier, onActivation);\n };\n ModuleActivationStore.prototype.clone = function () {\n var clone = new ModuleActivationStore();\n this._map.forEach(function (handlersStore, moduleId) {\n clone._map.set(moduleId, {\n onActivations: handlersStore.onActivations.clone(),\n onDeactivations: handlersStore.onDeactivations.clone(),\n });\n });\n return clone;\n };\n ModuleActivationStore.prototype._getModuleActivationHandlers = function (moduleId) {\n var moduleActivationHandlers = this._map.get(moduleId);\n if (moduleActivationHandlers === undefined) {\n moduleActivationHandlers = this._getEmptyHandlersStore();\n this._map.set(moduleId, moduleActivationHandlers);\n }\n return moduleActivationHandlers;\n };\n ModuleActivationStore.prototype._getEmptyHandlersStore = function () {\n var handlersStore = {\n onActivations: new Lookup(),\n onDeactivations: new Lookup()\n };\n return handlersStore;\n };\n return ModuleActivationStore;\n}());\nexport { ModuleActivationStore };\n//# sourceMappingURL=module_activation_store.js.map","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nimport { Binding } from \"../bindings/binding\";\nimport * as ERROR_MSGS from \"../constants/error_msgs\";\nimport { BindingScopeEnum, TargetTypeEnum } from \"../constants/literal_types\";\nimport * as METADATA_KEY from \"../constants/metadata_keys\";\nimport { MetadataReader } from \"../planning/metadata_reader\";\nimport { createMockRequest, getBindingDictionary, plan } from \"../planning/planner\";\nimport { resolve } from \"../resolution/resolver\";\nimport { BindingToSyntax } from \"../syntax/binding_to_syntax\";\nimport { isPromise, isPromiseOrContainsPromise } from \"../utils/async\";\nimport { id } from \"../utils/id\";\nimport { getServiceIdentifierAsString } from \"../utils/serialization\";\nimport { ContainerSnapshot } from \"./container_snapshot\";\nimport { Lookup } from \"./lookup\";\nimport { ModuleActivationStore } from \"./module_activation_store\";\nvar Container = (function () {\n function Container(containerOptions) {\n var options = containerOptions || {};\n if (typeof options !== \"object\") {\n throw new Error(\"\" + ERROR_MSGS.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT);\n }\n if (options.defaultScope === undefined) {\n options.defaultScope = BindingScopeEnum.Transient;\n }\n else if (options.defaultScope !== BindingScopeEnum.Singleton &&\n options.defaultScope !== BindingScopeEnum.Transient &&\n options.defaultScope !== BindingScopeEnum.Request) {\n throw new Error(\"\" + ERROR_MSGS.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE);\n }\n if (options.autoBindInjectable === undefined) {\n options.autoBindInjectable = false;\n }\n else if (typeof options.autoBindInjectable !== \"boolean\") {\n throw new Error(\"\" + ERROR_MSGS.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE);\n }\n if (options.skipBaseClassChecks === undefined) {\n options.skipBaseClassChecks = false;\n }\n else if (typeof options.skipBaseClassChecks !== \"boolean\") {\n throw new Error(\"\" + ERROR_MSGS.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK);\n }\n this.options = {\n autoBindInjectable: options.autoBindInjectable,\n defaultScope: options.defaultScope,\n skipBaseClassChecks: options.skipBaseClassChecks\n };\n this.id = id();\n this._bindingDictionary = new Lookup();\n this._snapshots = [];\n this._middleware = null;\n this._activations = new Lookup();\n this._deactivations = new Lookup();\n this.parent = null;\n this._metadataReader = new MetadataReader();\n this._moduleActivationStore = new ModuleActivationStore();\n }\n Container.merge = function (container1, container2) {\n var containers = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n containers[_i - 2] = arguments[_i];\n }\n var container = new Container();\n var targetContainers = __spreadArray([container1, container2], containers, true).map(function (targetContainer) { return getBindingDictionary(targetContainer); });\n var bindingDictionary = getBindingDictionary(container);\n function copyDictionary(origin, destination) {\n origin.traverse(function (_key, value) {\n value.forEach(function (binding) {\n destination.add(binding.serviceIdentifier, binding.clone());\n });\n });\n }\n targetContainers.forEach(function (targetBindingDictionary) {\n copyDictionary(targetBindingDictionary, bindingDictionary);\n });\n return container;\n };\n Container.prototype.load = function () {\n var modules = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n modules[_i] = arguments[_i];\n }\n var getHelpers = this._getContainerModuleHelpersFactory();\n for (var _a = 0, modules_1 = modules; _a < modules_1.length; _a++) {\n var currentModule = modules_1[_a];\n var containerModuleHelpers = getHelpers(currentModule.id);\n currentModule.registry(containerModuleHelpers.bindFunction, containerModuleHelpers.unbindFunction, containerModuleHelpers.isboundFunction, containerModuleHelpers.rebindFunction, containerModuleHelpers.unbindAsyncFunction, containerModuleHelpers.onActivationFunction, containerModuleHelpers.onDeactivationFunction);\n }\n };\n Container.prototype.loadAsync = function () {\n var modules = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n modules[_i] = arguments[_i];\n }\n return __awaiter(this, void 0, void 0, function () {\n var getHelpers, _a, modules_2, currentModule, containerModuleHelpers;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n getHelpers = this._getContainerModuleHelpersFactory();\n _a = 0, modules_2 = modules;\n _b.label = 1;\n case 1:\n if (!(_a < modules_2.length)) return [3, 4];\n currentModule = modules_2[_a];\n containerModuleHelpers = getHelpers(currentModule.id);\n return [4, currentModule.registry(containerModuleHelpers.bindFunction, containerModuleHelpers.unbindFunction, containerModuleHelpers.isboundFunction, containerModuleHelpers.rebindFunction, containerModuleHelpers.unbindAsyncFunction, containerModuleHelpers.onActivationFunction, containerModuleHelpers.onDeactivationFunction)];\n case 2:\n _b.sent();\n _b.label = 3;\n case 3:\n _a++;\n return [3, 1];\n case 4: return [2];\n }\n });\n });\n };\n Container.prototype.unload = function () {\n var _this = this;\n var modules = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n modules[_i] = arguments[_i];\n }\n modules.forEach(function (module) {\n var deactivations = _this._removeModuleBindings(module.id);\n _this._deactivateSingletons(deactivations);\n _this._removeModuleHandlers(module.id);\n });\n };\n Container.prototype.unloadAsync = function () {\n var modules = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n modules[_i] = arguments[_i];\n }\n return __awaiter(this, void 0, void 0, function () {\n var _a, modules_3, module_1, deactivations;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n _a = 0, modules_3 = modules;\n _b.label = 1;\n case 1:\n if (!(_a < modules_3.length)) return [3, 4];\n module_1 = modules_3[_a];\n deactivations = this._removeModuleBindings(module_1.id);\n return [4, this._deactivateSingletonsAsync(deactivations)];\n case 2:\n _b.sent();\n this._removeModuleHandlers(module_1.id);\n _b.label = 3;\n case 3:\n _a++;\n return [3, 1];\n case 4: return [2];\n }\n });\n });\n };\n Container.prototype.bind = function (serviceIdentifier) {\n var scope = this.options.defaultScope || BindingScopeEnum.Transient;\n var binding = new Binding(serviceIdentifier, scope);\n this._bindingDictionary.add(serviceIdentifier, binding);\n return new BindingToSyntax(binding);\n };\n Container.prototype.rebind = function (serviceIdentifier) {\n this.unbind(serviceIdentifier);\n return this.bind(serviceIdentifier);\n };\n Container.prototype.rebindAsync = function (serviceIdentifier) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4, this.unbindAsync(serviceIdentifier)];\n case 1:\n _a.sent();\n return [2, this.bind(serviceIdentifier)];\n }\n });\n });\n };\n Container.prototype.unbind = function (serviceIdentifier) {\n if (this._bindingDictionary.hasKey(serviceIdentifier)) {\n var bindings = this._bindingDictionary.get(serviceIdentifier);\n this._deactivateSingletons(bindings);\n }\n this._removeServiceFromDictionary(serviceIdentifier);\n };\n Container.prototype.unbindAsync = function (serviceIdentifier) {\n return __awaiter(this, void 0, void 0, function () {\n var bindings;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!this._bindingDictionary.hasKey(serviceIdentifier)) return [3, 2];\n bindings = this._bindingDictionary.get(serviceIdentifier);\n return [4, this._deactivateSingletonsAsync(bindings)];\n case 1:\n _a.sent();\n _a.label = 2;\n case 2:\n this._removeServiceFromDictionary(serviceIdentifier);\n return [2];\n }\n });\n });\n };\n Container.prototype.unbindAll = function () {\n var _this = this;\n this._bindingDictionary.traverse(function (_key, value) {\n _this._deactivateSingletons(value);\n });\n this._bindingDictionary = new Lookup();\n };\n Container.prototype.unbindAllAsync = function () {\n return __awaiter(this, void 0, void 0, function () {\n var promises;\n var _this = this;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n promises = [];\n this._bindingDictionary.traverse(function (_key, value) {\n promises.push(_this._deactivateSingletonsAsync(value));\n });\n return [4, Promise.all(promises)];\n case 1:\n _a.sent();\n this._bindingDictionary = new Lookup();\n return [2];\n }\n });\n });\n };\n Container.prototype.onActivation = function (serviceIdentifier, onActivation) {\n this._activations.add(serviceIdentifier, onActivation);\n };\n Container.prototype.onDeactivation = function (serviceIdentifier, onDeactivation) {\n this._deactivations.add(serviceIdentifier, onDeactivation);\n };\n Container.prototype.isBound = function (serviceIdentifier) {\n var bound = this._bindingDictionary.hasKey(serviceIdentifier);\n if (!bound && this.parent) {\n bound = this.parent.isBound(serviceIdentifier);\n }\n return bound;\n };\n Container.prototype.isCurrentBound = function (serviceIdentifier) {\n return this._bindingDictionary.hasKey(serviceIdentifier);\n };\n Container.prototype.isBoundNamed = function (serviceIdentifier, named) {\n return this.isBoundTagged(serviceIdentifier, METADATA_KEY.NAMED_TAG, named);\n };\n Container.prototype.isBoundTagged = function (serviceIdentifier, key, value) {\n var bound = false;\n if (this._bindingDictionary.hasKey(serviceIdentifier)) {\n var bindings = this._bindingDictionary.get(serviceIdentifier);\n var request_1 = createMockRequest(this, serviceIdentifier, key, value);\n bound = bindings.some(function (b) { return b.constraint(request_1); });\n }\n if (!bound && this.parent) {\n bound = this.parent.isBoundTagged(serviceIdentifier, key, value);\n }\n return bound;\n };\n Container.prototype.snapshot = function () {\n this._snapshots.push(ContainerSnapshot.of(this._bindingDictionary.clone(), this._middleware, this._activations.clone(), this._deactivations.clone(), this._moduleActivationStore.clone()));\n };\n Container.prototype.restore = function () {\n var snapshot = this._snapshots.pop();\n if (snapshot === undefined) {\n throw new Error(ERROR_MSGS.NO_MORE_SNAPSHOTS_AVAILABLE);\n }\n this._bindingDictionary = snapshot.bindings;\n this._activations = snapshot.activations;\n this._deactivations = snapshot.deactivations;\n this._middleware = snapshot.middleware;\n this._moduleActivationStore = snapshot.moduleActivationStore;\n };\n Container.prototype.createChild = function (containerOptions) {\n var child = new Container(containerOptions || this.options);\n child.parent = this;\n return child;\n };\n Container.prototype.applyMiddleware = function () {\n var middlewares = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n middlewares[_i] = arguments[_i];\n }\n var initial = (this._middleware) ? this._middleware : this._planAndResolve();\n this._middleware = middlewares.reduce(function (prev, curr) { return curr(prev); }, initial);\n };\n Container.prototype.applyCustomMetadataReader = function (metadataReader) {\n this._metadataReader = metadataReader;\n };\n Container.prototype.get = function (serviceIdentifier) {\n var getArgs = this._getNotAllArgs(serviceIdentifier, false);\n return this._getButThrowIfAsync(getArgs);\n };\n Container.prototype.getAsync = function (serviceIdentifier) {\n return __awaiter(this, void 0, void 0, function () {\n var getArgs;\n return __generator(this, function (_a) {\n getArgs = this._getNotAllArgs(serviceIdentifier, false);\n return [2, this._get(getArgs)];\n });\n });\n };\n Container.prototype.getTagged = function (serviceIdentifier, key, value) {\n var getArgs = this._getNotAllArgs(serviceIdentifier, false, key, value);\n return this._getButThrowIfAsync(getArgs);\n };\n Container.prototype.getTaggedAsync = function (serviceIdentifier, key, value) {\n return __awaiter(this, void 0, void 0, function () {\n var getArgs;\n return __generator(this, function (_a) {\n getArgs = this._getNotAllArgs(serviceIdentifier, false, key, value);\n return [2, this._get(getArgs)];\n });\n });\n };\n Container.prototype.getNamed = function (serviceIdentifier, named) {\n return this.getTagged(serviceIdentifier, METADATA_KEY.NAMED_TAG, named);\n };\n Container.prototype.getNamedAsync = function (serviceIdentifier, named) {\n return this.getTaggedAsync(serviceIdentifier, METADATA_KEY.NAMED_TAG, named);\n };\n Container.prototype.getAll = function (serviceIdentifier) {\n var getArgs = this._getAllArgs(serviceIdentifier);\n return this._getButThrowIfAsync(getArgs);\n };\n Container.prototype.getAllAsync = function (serviceIdentifier) {\n var getArgs = this._getAllArgs(serviceIdentifier);\n return this._getAll(getArgs);\n };\n Container.prototype.getAllTagged = function (serviceIdentifier, key, value) {\n var getArgs = this._getNotAllArgs(serviceIdentifier, true, key, value);\n return this._getButThrowIfAsync(getArgs);\n };\n Container.prototype.getAllTaggedAsync = function (serviceIdentifier, key, value) {\n var getArgs = this._getNotAllArgs(serviceIdentifier, true, key, value);\n return this._getAll(getArgs);\n };\n Container.prototype.getAllNamed = function (serviceIdentifier, named) {\n return this.getAllTagged(serviceIdentifier, METADATA_KEY.NAMED_TAG, named);\n };\n Container.prototype.getAllNamedAsync = function (serviceIdentifier, named) {\n return this.getAllTaggedAsync(serviceIdentifier, METADATA_KEY.NAMED_TAG, named);\n };\n Container.prototype.resolve = function (constructorFunction) {\n var isBound = this.isBound(constructorFunction);\n if (!isBound) {\n this.bind(constructorFunction).toSelf();\n }\n var resolved = this.get(constructorFunction);\n if (!isBound) {\n this.unbind(constructorFunction);\n }\n return resolved;\n };\n Container.prototype._preDestroy = function (constructor, instance) {\n if (Reflect.hasMetadata(METADATA_KEY.PRE_DESTROY, constructor)) {\n var data = Reflect.getMetadata(METADATA_KEY.PRE_DESTROY, constructor);\n return instance[data.value]();\n }\n };\n Container.prototype._removeModuleHandlers = function (moduleId) {\n var moduleActivationsHandlers = this._moduleActivationStore.remove(moduleId);\n this._activations.removeIntersection(moduleActivationsHandlers.onActivations);\n this._deactivations.removeIntersection(moduleActivationsHandlers.onDeactivations);\n };\n Container.prototype._removeModuleBindings = function (moduleId) {\n return this._bindingDictionary.removeByCondition(function (binding) { return binding.moduleId === moduleId; });\n };\n Container.prototype._deactivate = function (binding, instance) {\n var _this = this;\n var constructor = Object.getPrototypeOf(instance).constructor;\n try {\n if (this._deactivations.hasKey(binding.serviceIdentifier)) {\n var result = this._deactivateContainer(instance, this._deactivations.get(binding.serviceIdentifier).values());\n if (isPromise(result)) {\n return this._handleDeactivationError(result.then(function () { return _this._propagateContainerDeactivationThenBindingAndPreDestroyAsync(binding, instance, constructor); }), constructor);\n }\n }\n var propagateDeactivationResult = this._propagateContainerDeactivationThenBindingAndPreDestroy(binding, instance, constructor);\n if (isPromise(propagateDeactivationResult)) {\n return this._handleDeactivationError(propagateDeactivationResult, constructor);\n }\n }\n catch (ex) {\n throw new Error(ERROR_MSGS.ON_DEACTIVATION_ERROR(constructor.name, ex.message));\n }\n };\n Container.prototype._handleDeactivationError = function (asyncResult, constructor) {\n return __awaiter(this, void 0, void 0, function () {\n var ex_1;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4, asyncResult];\n case 1:\n _a.sent();\n return [3, 3];\n case 2:\n ex_1 = _a.sent();\n throw new Error(ERROR_MSGS.ON_DEACTIVATION_ERROR(constructor.name, ex_1.message));\n case 3: return [2];\n }\n });\n });\n };\n Container.prototype._deactivateContainer = function (instance, deactivationsIterator) {\n var _this = this;\n var deactivation = deactivationsIterator.next();\n while (deactivation.value) {\n var result = deactivation.value(instance);\n if (isPromise(result)) {\n return result.then(function () {\n return _this._deactivateContainerAsync(instance, deactivationsIterator);\n });\n }\n deactivation = deactivationsIterator.next();\n }\n };\n Container.prototype._deactivateContainerAsync = function (instance, deactivationsIterator) {\n return __awaiter(this, void 0, void 0, function () {\n var deactivation;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n deactivation = deactivationsIterator.next();\n _a.label = 1;\n case 1:\n if (!deactivation.value) return [3, 3];\n return [4, deactivation.value(instance)];\n case 2:\n _a.sent();\n deactivation = deactivationsIterator.next();\n return [3, 1];\n case 3: return [2];\n }\n });\n });\n };\n Container.prototype._getContainerModuleHelpersFactory = function () {\n var _this = this;\n var setModuleId = function (bindingToSyntax, moduleId) {\n bindingToSyntax._binding.moduleId = moduleId;\n };\n var getBindFunction = function (moduleId) {\n return function (serviceIdentifier) {\n var bindingToSyntax = _this.bind(serviceIdentifier);\n setModuleId(bindingToSyntax, moduleId);\n return bindingToSyntax;\n };\n };\n var getUnbindFunction = function () {\n return function (serviceIdentifier) {\n return _this.unbind(serviceIdentifier);\n };\n };\n var getUnbindAsyncFunction = function () {\n return function (serviceIdentifier) {\n return _this.unbindAsync(serviceIdentifier);\n };\n };\n var getIsboundFunction = function () {\n return function (serviceIdentifier) {\n return _this.isBound(serviceIdentifier);\n };\n };\n var getRebindFunction = function (moduleId) {\n return function (serviceIdentifier) {\n var bindingToSyntax = _this.rebind(serviceIdentifier);\n setModuleId(bindingToSyntax, moduleId);\n return bindingToSyntax;\n };\n };\n var getOnActivationFunction = function (moduleId) {\n return function (serviceIdentifier, onActivation) {\n _this._moduleActivationStore.addActivation(moduleId, serviceIdentifier, onActivation);\n _this.onActivation(serviceIdentifier, onActivation);\n };\n };\n var getOnDeactivationFunction = function (moduleId) {\n return function (serviceIdentifier, onDeactivation) {\n _this._moduleActivationStore.addDeactivation(moduleId, serviceIdentifier, onDeactivation);\n _this.onDeactivation(serviceIdentifier, onDeactivation);\n };\n };\n return function (mId) { return ({\n bindFunction: getBindFunction(mId),\n isboundFunction: getIsboundFunction(),\n onActivationFunction: getOnActivationFunction(mId),\n onDeactivationFunction: getOnDeactivationFunction(mId),\n rebindFunction: getRebindFunction(mId),\n unbindFunction: getUnbindFunction(),\n unbindAsyncFunction: getUnbindAsyncFunction()\n }); };\n };\n Container.prototype._getAll = function (getArgs) {\n return Promise.all(this._get(getArgs));\n };\n Container.prototype._get = function (getArgs) {\n var planAndResolveArgs = __assign(__assign({}, getArgs), { contextInterceptor: function (context) { return context; }, targetType: TargetTypeEnum.Variable });\n if (this._middleware) {\n var middlewareResult = this._middleware(planAndResolveArgs);\n if (middlewareResult === undefined || middlewareResult === null) {\n throw new Error(ERROR_MSGS.INVALID_MIDDLEWARE_RETURN);\n }\n return middlewareResult;\n }\n return this._planAndResolve()(planAndResolveArgs);\n };\n Container.prototype._getButThrowIfAsync = function (getArgs) {\n var result = this._get(getArgs);\n if (isPromiseOrContainsPromise(result)) {\n throw new Error(ERROR_MSGS.LAZY_IN_SYNC(getArgs.serviceIdentifier));\n }\n return result;\n };\n Container.prototype._getAllArgs = function (serviceIdentifier) {\n var getAllArgs = {\n avoidConstraints: true,\n isMultiInject: true,\n serviceIdentifier: serviceIdentifier,\n };\n return getAllArgs;\n };\n Container.prototype._getNotAllArgs = function (serviceIdentifier, isMultiInject, key, value) {\n var getNotAllArgs = {\n avoidConstraints: false,\n isMultiInject: isMultiInject,\n serviceIdentifier: serviceIdentifier,\n key: key,\n value: value,\n };\n return getNotAllArgs;\n };\n Container.prototype._planAndResolve = function () {\n var _this = this;\n return function (args) {\n var context = plan(_this._metadataReader, _this, args.isMultiInject, args.targetType, args.serviceIdentifier, args.key, args.value, args.avoidConstraints);\n context = args.contextInterceptor(context);\n var result = resolve(context);\n return result;\n };\n };\n Container.prototype._deactivateIfSingleton = function (binding) {\n var _this = this;\n if (!binding.activated) {\n return;\n }\n if (isPromise(binding.cache)) {\n return binding.cache.then(function (resolved) { return _this._deactivate(binding, resolved); });\n }\n return this._deactivate(binding, binding.cache);\n };\n Container.prototype._deactivateSingletons = function (bindings) {\n for (var _i = 0, bindings_1 = bindings; _i < bindings_1.length; _i++) {\n var binding = bindings_1[_i];\n var result = this._deactivateIfSingleton(binding);\n if (isPromise(result)) {\n throw new Error(ERROR_MSGS.ASYNC_UNBIND_REQUIRED);\n }\n }\n };\n Container.prototype._deactivateSingletonsAsync = function (bindings) {\n return __awaiter(this, void 0, void 0, function () {\n var _this = this;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4, Promise.all(bindings.map(function (b) { return _this._deactivateIfSingleton(b); }))];\n case 1:\n _a.sent();\n return [2];\n }\n });\n });\n };\n Container.prototype._propagateContainerDeactivationThenBindingAndPreDestroy = function (binding, instance, constructor) {\n if (this.parent) {\n return this._deactivate.bind(this.parent)(binding, instance);\n }\n else {\n return this._bindingDeactivationAndPreDestroy(binding, instance, constructor);\n }\n };\n Container.prototype._propagateContainerDeactivationThenBindingAndPreDestroyAsync = function (binding, instance, constructor) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!this.parent) return [3, 2];\n return [4, this._deactivate.bind(this.parent)(binding, instance)];\n case 1:\n _a.sent();\n return [3, 4];\n case 2: return [4, this._bindingDeactivationAndPreDestroyAsync(binding, instance, constructor)];\n case 3:\n _a.sent();\n _a.label = 4;\n case 4: return [2];\n }\n });\n });\n };\n Container.prototype._removeServiceFromDictionary = function (serviceIdentifier) {\n try {\n this._bindingDictionary.remove(serviceIdentifier);\n }\n catch (e) {\n throw new Error(ERROR_MSGS.CANNOT_UNBIND + \" \" + getServiceIdentifierAsString(serviceIdentifier));\n }\n };\n Container.prototype._bindingDeactivationAndPreDestroy = function (binding, instance, constructor) {\n var _this = this;\n if (typeof binding.onDeactivation === \"function\") {\n var result = binding.onDeactivation(instance);\n if (isPromise(result)) {\n return result.then(function () { return _this._preDestroy(constructor, instance); });\n }\n }\n return this._preDestroy(constructor, instance);\n };\n Container.prototype._bindingDeactivationAndPreDestroyAsync = function (binding, instance, constructor) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!(typeof binding.onDeactivation === \"function\")) return [3, 2];\n return [4, binding.onDeactivation(instance)];\n case 1:\n _a.sent();\n _a.label = 2;\n case 2: return [4, this._preDestroy(constructor, instance)];\n case 3:\n _a.sent();\n return [2];\n }\n });\n });\n };\n return Container;\n}());\nexport { Container };\n//# sourceMappingURL=container.js.map","import * as METADATA_KEY from \"../constants/metadata_keys\";\nvar Metadata = (function () {\n function Metadata(key, value) {\n this.key = key;\n this.value = value;\n }\n Metadata.prototype.toString = function () {\n if (this.key === METADATA_KEY.NAMED_TAG) {\n return \"named: \" + String(this.value).toString() + \" \";\n }\n else {\n return \"tagged: { key:\" + this.key.toString() + \", value: \" + String(this.value) + \" }\";\n }\n };\n return Metadata;\n}());\nexport { Metadata };\n//# sourceMappingURL=metadata.js.map"],"sourceRoot":""}