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,GACd,CACX,KACa,IAAT,EAAe,CACf,IAAI,EAAM,EAAW,GAAe,EAAW,EAAW,GAC1D,OAAO,eAAe,EAAK,EAAK,CAC5B,cAAc,EACd,YAAY,EACZ,IAAK,WAAc,OAAO,EAAI,EAAW,GAEjD,CACJ,EAmiDA,EAAQ,oBAAsB,EAC9B,EAAQ,aAAe,EACvB,EAAQ,mBAAqB,EAC7B,EAAQ,uBAAyB,EACjC,EAAQ,qBAAuB,EAC/B,EAAQ,YAAc,EACtB,EAAQ,mBAAqB,EAC7B,OAAO,eAAe,EAAS,aAAc,CAAE,OAAO,GACzD","file":"/npm/sq-sq-single-angular-modal@3.1.3/bundles/sq-single-angular-modal.umd.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/sq-sq-single-angular-modal@3.1.3/bundles/sq-single-angular-modal.umd.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","(function (global, factory) {\n    typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs/Subject'), require('rxjs/add/operator/filter'), require('@angular/platform-browser')) :\n        typeof define === 'function' && define.amd ? define(['exports', '@angular/core', 'rxjs/Subject', 'rxjs/add/operator/filter', '@angular/platform-browser'], factory) :\n            (factory((global.angular2Modal = global.angular2Modal || {}), global.ng.core, global.Rx, null, global.ng.platformBrowser));\n}(this, (function (exports, _angular_core, rxjs_Subject, rxjs_add_operator_filter, _angular_platformBrowser) {\n    'use strict';\n    var PRIVATE_PREFIX = '$$';\n    var RESERVED_REGEX = /^(\\$\\$).*/;\n    function validateMethodName(name) {\n        if (!name) {\n            throw new Error(\"Illegal method name. Empty method name is not allowed\");\n        }\n        else if (name in this) {\n            throw new Error(\"A member name '\" + name + \"' already defined.\");\n        }\n    }\n    /**\n     * Returns a list of assigned property names (non private)\n     * @param subject\n     * @returns {string[]}\n     */\n    function getAssignedPropertyNames(subject) {\n        return Object.getOwnPropertyNames(subject)\n            .filter(function (name) { return RESERVED_REGEX.test(name); })\n            .map(function (name) { return name.substr(2); });\n    }\n    function privateKey(name) {\n        return PRIVATE_PREFIX + name;\n    }\n    function objectDefinePropertyValue(obj, propertyName, value) {\n        Object.defineProperty(obj, propertyName, {\n            configurable: false,\n            enumerable: false,\n            writable: false,\n            value: value\n        });\n    }\n    /**\n     * Given a FluentAssign instance, apply all of the supplied default values so calling\n     * instance.toJSON will return those values (does not create a setter function)\n     * @param instance\n     * @param defaultValues\n     */\n    function applyDefaultValues(instance, defaultValues) {\n        Object.getOwnPropertyNames(defaultValues)\n            .forEach(function (name) { return instance[privateKey(name)] = defaultValues[name]; });\n    }\n    /**\n     * Create a function for setting a value for a property on a given object.\n     * @param obj The object to apply the key & setter on.\n     * @param propertyName The name of the property on the object\n     * @param writeOnce If true will allow writing once (default: false)\n     *\n     * Example:\n     * let obj = new FluentAssign<any>;\n     * setAssignMethod(obj, 'myProp');\n     * obj.myProp('someValue');\n     * const result = obj.toJSON();\n     * console.log(result); //{ myProp: 'someValue' }\n     *\n     *\n     * let obj = new FluentAssign<any>;\n     * setAssignMethod(obj, 'myProp', true); // applying writeOnce\n     * obj.myProp('someValue');\n     * obj.myProp('someValue'); // ERROR: Overriding config property 'myProp' is not allowed.\n     */\n    function setAssignMethod(obj, propertyName, writeOnce) {\n        var _this = this;\n        if (writeOnce === void 0) {\n            writeOnce = false;\n        }\n        validateMethodName.call(obj, propertyName);\n        var key = privateKey(propertyName);\n        objectDefinePropertyValue(obj, propertyName, function (value) {\n            if (writeOnce && _this.hasOwnProperty(key)) {\n                throw new Error(\"Overriding config property '\" + propertyName + \"' is not allowed.\");\n            }\n            obj[key] = value;\n            return obj;\n        });\n    }\n    /**\n     * Create a function for setting a value that is an alias to an other setter function.\n     * @param obj The object to apply the key & setter on.\n     * @param propertyName The name of the property on the object\n     * @param srcPropertyName The name of the property on the object this alias points to\n     * @param hard If true, will set a readonly property on the object that returns\n     *        the value of the source property. Default: false\n     *\n     * Example:\n     * let obj = new FluentAssign<any> ;\n     * setAssignMethod(obj, 'myProp');\n     * setAssignAlias(obj, 'myPropAlias', 'myProp');\n     * obj.myPropAlias('someValue');\n     * const result = obj.toJSON();\n     * console.log(result); //{ myProp: 'someValue' }\n     * result.myPropAlias // undefined\n     *\n     *\n     * let obj = new FluentAssign<any> ;\n     * setAssignMethod(obj, 'myProp');\n     * setAssignAlias(obj, 'myPropAlias', 'myProp', true); // setting a hard alias.\n     * obj.myPropAlias('someValue');\n     * const result = obj.toJSON();\n     * console.log(result); //{ myProp: 'someValue' }\n     * result.myPropAlias // someValue\n     */\n    function setAssignAlias(obj, propertyName, srcPropertyName, hard) {\n        if (hard === void 0) {\n            hard = false;\n        }\n        validateMethodName.call(obj, propertyName);\n        objectDefinePropertyValue(obj, propertyName, function (value) {\n            obj[srcPropertyName](value);\n            return obj;\n        });\n        if (hard === true) {\n            var key = privateKey(propertyName), srcKey_1 = privateKey(srcPropertyName);\n            Object.defineProperty(obj, key, {\n                configurable: false,\n                enumerable: false,\n                get: function () { return obj[srcKey_1]; }\n            });\n        }\n    }\n    /**\n     * Represent a fluent API factory wrapper for defining FluentAssign instances.\n     */\n    var FluentAssignFactory = (function () {\n        function FluentAssignFactory(fluentAssign) {\n            this._fluentAssign =\n                fluentAssign instanceof FluentAssign ? fluentAssign : new FluentAssign();\n        }\n        /**\n         * Create a setter method on the FluentAssign instance.\n         * @param name The name of the setter function.\n         * @param defaultValue If set (not undefined) set's the value on the instance immediately.\n         * @returns {FluentAssignFactory}\n         */\n        FluentAssignFactory.prototype.setMethod = function (name, defaultValue) {\n            if (defaultValue === void 0) {\n                defaultValue = undefined;\n            }\n            setAssignMethod(this._fluentAssign, name);\n            if (defaultValue !== undefined) {\n                this._fluentAssign[name](defaultValue);\n            }\n            return this;\n        };\n        Object.defineProperty(FluentAssignFactory.prototype, \"fluentAssign\", {\n            /**\n             * The FluentAssign instance.\n             * @returns {FluentAssign<T>}\n             */\n            get: function () {\n                return this._fluentAssign;\n            },\n            enumerable: true,\n            configurable: true\n        });\n        return FluentAssignFactory;\n    }());\n    /**\n     * Represent an object where every property is a function representing an assignment function.\n     * Calling each function with a value will assign the value to the object and return the object.\n     * Calling 'toJSON' returns an object with the same properties but this time representing the\n     * assigned values.\n     *\n     * This allows setting an object in a fluent API manner.\n     * Example:\n     let fluent = new FluentAssign<any>(undefined, ['some', 'went']);\n     fluent.some('thing').went('wrong').toJSON();\n     // { some: 'thing', went: 'wrong' }\n     */\n    var FluentAssign = (function () {\n        /**\n         *\n         * @param defaultValues An object representing default values for the underlying object.\n         * @param initialSetters A list of initial setters for this FluentAssign.\n         * @param baseType the class/type to create a new base. optional, {} is used if not supplied.\n         */\n        function FluentAssign(defaultValues, initialSetters, baseType) {\n            if (defaultValues === void 0) {\n                defaultValues = undefined;\n            }\n            if (initialSetters === void 0) {\n                initialSetters = undefined;\n            }\n            if (baseType === void 0) {\n                baseType = undefined;\n            }\n            var _this = this;\n            if (Array.isArray(defaultValues)) {\n                defaultValues.forEach(function (d) { return applyDefaultValues(_this, d); });\n            }\n            else if (defaultValues) {\n                applyDefaultValues(this, defaultValues);\n            }\n            if (Array.isArray(initialSetters)) {\n                initialSetters.forEach(function (name) { return setAssignMethod(_this, name); });\n            }\n            if (baseType) {\n                this.__fluent$base__ = baseType;\n            }\n        }\n        /**\n         * Returns a FluentAssignFactory<FluentAssign<T>> ready to define a FluentAssign type.\n         * @param defaultValues An object representing default values for the instance.\n         * @param initialSetters A list of initial setters for the instance.\n         * @returns {FluentAssignFactory<T>}\n         */\n        FluentAssign.compose = function (defaultValues, initialSetters) {\n            if (defaultValues === void 0) {\n                defaultValues = undefined;\n            }\n            if (initialSetters === void 0) {\n                initialSetters = undefined;\n            }\n            return FluentAssign.composeWith(new FluentAssign(defaultValues, initialSetters));\n        };\n        /**\n         * Returns a FluentAssignFactory<Z> where Z is an instance of FluentAssign<?> or a derived\n         * class of it.\n         * @param fluentAssign An instance of FluentAssign<?> or a derived class of FluentAssign<?>.\n         * @returns {any}\n         */\n        FluentAssign.composeWith = function (fluentAssign) {\n            return new FluentAssignFactory(fluentAssign);\n        };\n        FluentAssign.prototype.toJSON = function () {\n            var _this = this;\n            return getAssignedPropertyNames(this)\n                .reduce(function (obj, name) {\n                var key = privateKey(name);\n                // re-define property descriptors (we dont want their value)\n                var propDesc = Object.getOwnPropertyDescriptor(_this, key);\n                if (propDesc) {\n                    Object.defineProperty(obj, name, propDesc);\n                }\n                else {\n                    obj[name] = _this[key];\n                }\n                return obj;\n            }, this.__fluent$base__ ? new this.__fluent$base__() : {});\n        };\n        return FluentAssign;\n    }());\n    /**\n     * Simple object extend\n     * @param m1\n     * @param m2\n     * @returns {{}}\n     */\n    /**\n     * Simple object extend\n     * @param m1\n     * @param m2\n     * @returns {{}}\n     */ function extend(m1, m2) {\n        var m = {};\n        for (var attr in m1) {\n            if (m1.hasOwnProperty(attr)) {\n                m[attr] = m1[attr];\n            }\n        }\n        for (var attr in m2) {\n            if (m2.hasOwnProperty(attr)) {\n                m[attr] = m2[attr];\n            }\n        }\n        return m;\n    }\n    /**\n     * Simple, not optimized, array union of unique values.\n     * @param arr1\n     * @param arr2\n     * @returns {T[]|any[]|any[][]|any[]}\n     */\n    function arrayUnion(arr1, arr2) {\n        return arr1\n            .concat(arr2.filter(function (v) { return arr1.indexOf(v) === -1; }));\n    }\n    /**\n     * Returns true if the config supports a given key.\n     * @param key\n     * @returns {boolean}\n     */\n    function supportsKey(keyCode, config) {\n        if (!Array.isArray(config))\n            return config === null ? false : true;\n        return config.indexOf(keyCode) > -1;\n    }\n    /**\n     * Given an object representing a key/value map of css properties, returns a valid css string\n     * representing the object.\n     * Example:\n     * console.log(toStyleString({\n     *     position: 'absolute',\n     *     width: '100%',\n     *     height: '100%',\n     *     top: '0',\n     *     left: '0',\n     *     right: '0',\n     *     bottom: '0'\n     * }));\n     * // position:absolute;width:100%;height:100%;top:0;left:0;right:0;bottom:0\n     * @param obj\n     * @returns {string}\n     */\n    var PromiseCompleter = (function () {\n        function PromiseCompleter() {\n            var _this = this;\n            this.promise = new Promise(function (res, rej) {\n                _this.resolve = res;\n                _this.reject = rej;\n            });\n        }\n        return PromiseCompleter;\n    }());\n    function noop() { }\n    function createComponent(instructions) {\n        var injector = getInjector(instructions);\n        return instructions.vcRef.createComponent(injector.get(_angular_core.ComponentFactoryResolver).resolveComponentFactory(instructions.component), instructions.vcRef.length, injector, instructions.projectableNodes);\n    }\n    function getInjector(instructions) {\n        var ctxInjector = instructions.injector || instructions.vcRef.parentInjector;\n        return Array.isArray(instructions.bindings) && instructions.bindings.length > 0 ?\n            _angular_core.ReflectiveInjector.fromResolvedProviders(instructions.bindings, ctxInjector) : ctxInjector;\n    }\n    // export function createComponent(cfr: ComponentFactoryResolver,\n    //                                         type: any,\n    //                                         vcr: ViewContainerRef,\n    //                                         bindings: ResolvedReflectiveProvider[],\n    //                                         projectableNodes?: any[][]): ComponentRef<any> {\n    //   return vcr.createComponent(\n    //     cfr.resolveComponentFactory(type),\n    //     vcr.length,\n    //     getInjector(vcr, bindings),\n    //     projectableNodes\n    //   );\n    // }\n    //\n    // function getInjector(viewContainer: ViewContainerRef, bindings: ResolvedReflectiveProvider[]) {\n    //   const ctxInjector = viewContainer.parentInjector;\n    //   return Array.isArray(bindings) && bindings.length > 0 ?\n    //     ReflectiveInjector.fromResolvedProviders(bindings, ctxInjector) : ctxInjector;\n    //\n    // }\n    var __extends = (undefined && undefined.__extends) || (function () {\n        var extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b)\n                if (b.hasOwnProperty(p))\n                    d[p] = b[p]; };\n        return function (d, b) {\n            extendStatics(d, b);\n            function __() { this.constructor = d; }\n            d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n        };\n    })();\n    var DialogBailOutError = (function (_super) {\n        __extends(DialogBailOutError, _super);\n        function DialogBailOutError(value) {\n            var _this = _super.call(this) || this;\n            if (!value) {\n                value = 'Dialog was forced to close by an unknown source.';\n            }\n            _this.message = value;\n            return _this;\n        }\n        return DialogBailOutError;\n    }(Error));\n    /**\n     * API to an open modal window.\n     */\n    var DialogRef = (function () {\n        function DialogRef(overlay, context) {\n            this.overlay = overlay;\n            this.context = context;\n            this._resultDeferred = new PromiseCompleter();\n            this._onDestroy = new rxjs_Subject.Subject();\n            this.onDestroy = this._onDestroy.asObservable();\n        }\n        Object.defineProperty(DialogRef.prototype, \"result\", {\n            /**\n             * A Promise that is resolved on a close event and rejected on a dismiss event.\n             * @returns {Promise<T>|any|*|Promise<any>}\n             */\n            get: function () {\n                return this._resultDeferred.promise;\n            },\n            enumerable: true,\n            configurable: true\n        });\n        /**\n         * Set a close/dismiss guard\n         * @param g\n         */\n        DialogRef.prototype.setCloseGuard = function (guard) {\n            this.closeGuard = guard;\n        };\n        /**\n         *  Close the modal with a return value, i.e: result.\n         */\n        DialogRef.prototype.close = function (result) {\n            var _this = this;\n            if (result === void 0) {\n                result = null;\n            }\n            var _close = function () {\n                _this.destroy();\n                _this._resultDeferred.resolve(result);\n            };\n            this._fireHook('beforeClose')\n                .then(function (value) { return value !== true && _close(); })\n                .catch(_close);\n        };\n        /**\n         *  Close the modal without a return value, i.e: cancelled.\n         *  This call is automatically invoked when a user either:\n         *  - Presses an exit keyboard key (if configured).\n         *  - Clicks outside of the modal window (if configured).\n         *  Usually, dismiss represent a Cancel button or a X button.\n         */\n        DialogRef.prototype.dismiss = function () {\n            var _this = this;\n            var _dismiss = function () {\n                _this.destroy();\n                _this._resultDeferred.promise.catch(function () { });\n                _this._resultDeferred.reject();\n            };\n            this._fireHook('beforeDismiss')\n                .then(function (value) { return value !== true && _dismiss(); })\n                .catch(_dismiss);\n        };\n        /**\n         * Gracefully close the overlay/dialog with a rejected result.\n         * Does not trigger canDestroy on the overlay.\n         */\n        DialogRef.prototype.bailOut = function () {\n            if (this.destroyed !== true) {\n                this.destroyed = true;\n                this._onDestroy.next(null);\n                this._onDestroy.complete();\n                this._resultDeferred.reject(new DialogBailOutError());\n            }\n        };\n        DialogRef.prototype.destroy = function () {\n            var _this = this;\n            if (this.destroyed !== true) {\n                this.destroyed = true;\n                if (typeof this.overlayRef.instance.canDestroy === 'function') {\n                    this.overlayRef.instance.canDestroy()\n                        .catch(function () { })\n                        .then(function () { return _this._destroy(); });\n                }\n                else {\n                    this._destroy();\n                }\n            }\n        };\n        DialogRef.prototype._destroy = function () {\n            this._onDestroy.next(null);\n            this._onDestroy.complete();\n            this.overlayRef.destroy();\n        };\n        DialogRef.prototype._fireHook = function (name) {\n            var gurad = this.closeGuard, fn = gurad && typeof gurad[name] === 'function' && gurad[name];\n            return Promise.resolve(fn ? fn.call(gurad) : false);\n        };\n        return DialogRef;\n    }());\n    (function (DROP_IN_TYPE) {\n        DROP_IN_TYPE[DROP_IN_TYPE[\"alert\"] = 0] = \"alert\";\n        DROP_IN_TYPE[DROP_IN_TYPE[\"prompt\"] = 1] = \"prompt\";\n        DROP_IN_TYPE[DROP_IN_TYPE[\"confirm\"] = 2] = \"confirm\";\n    })(exports.DROP_IN_TYPE || (exports.DROP_IN_TYPE = {}));\n    var OverlayRenderer = (function () {\n        function OverlayRenderer() {\n        }\n        return OverlayRenderer;\n    }());\n    var vcRefCollection = {};\n    function getVCRef(key) {\n        return vcRefCollection[key] ? vcRefCollection[key].slice() : [];\n    }\n    function setVCRef(key, vcRef) {\n        if (!vcRefCollection.hasOwnProperty(key)) {\n            vcRefCollection[key] = [];\n        }\n        vcRefCollection[key].push(vcRef);\n    }\n    function delVCRef(key, vcRef) {\n        if (!vcRef) {\n            vcRefCollection[key] = [];\n        }\n        else {\n            var coll = vcRefCollection[key] || [], idx = coll.indexOf(vcRef);\n            if (idx > -1) {\n                coll.splice(idx, 1);\n            }\n        }\n    }\n    /**\n     * A Simple store that holds a reference to ViewContainerRef instances by a user defined key.\n     * This, with the OverlayTarget directive makes it easy to block the overlay inside an element\n     * without having to use the angular query boilerplate.\n     * @type {{\n     *  getVCRef: (function(string): ViewContainerRef),\n     *  setVCRef: (function(string, ViewContainerRef): void),\n     *  delVCRef: (function(string): void)\n     *  }}\n     */\n    var vcRefStore = { getVCRef: getVCRef, setVCRef: setVCRef, delVCRef: delVCRef };\n    var BASKET_GROUP = {};\n    /**\n     * A dumb stack implementation over an array.\n     */\n    var DialogRefStack = (function () {\n        function DialogRefStack() {\n            this._stack = [];\n            this._stackMap = new Map();\n        }\n        Object.defineProperty(DialogRefStack.prototype, \"length\", {\n            get: function () {\n                return this._stack.length;\n            },\n            enumerable: true,\n            configurable: true\n        });\n        DialogRefStack.prototype.push = function (dialogRef, group) {\n            if (this._stack.indexOf(dialogRef) === -1) {\n                this._stack.push(dialogRef);\n                this._stackMap.set(dialogRef, group || BASKET_GROUP);\n            }\n        };\n        /**\n         * Push a DialogRef into the stack and manage it so when it's done\n         * it will automatically kick itself out of the stack.\n         * @param dialogRef\n         */\n        DialogRefStack.prototype.pushManaged = function (dialogRef, group) {\n            var _this = this;\n            this.push(dialogRef, group);\n            dialogRef.onDestroy.subscribe(function () { return _this.remove(dialogRef); });\n        };\n        DialogRefStack.prototype.pop = function () {\n            var dialogRef = this._stack.pop();\n            this._stackMap.delete(dialogRef);\n            return dialogRef;\n        };\n        /**\n         * Remove a DialogRef from the stack.\n         * @param dialogRef\n         */\n        DialogRefStack.prototype.remove = function (dialogRef) {\n            var idx = this.indexOf(dialogRef);\n            if (idx > -1) {\n                this._stack.splice(idx, 1);\n                this._stackMap.delete(dialogRef);\n            }\n        };\n        DialogRefStack.prototype.index = function (index) {\n            return this._stack[index];\n        };\n        DialogRefStack.prototype.indexOf = function (dialogRef) {\n            return this._stack.indexOf(dialogRef);\n        };\n        DialogRefStack.prototype.groupOf = function (dialogRef) {\n            return this._stackMap.get(dialogRef);\n        };\n        DialogRefStack.prototype.groupBy = function (group) {\n            var arr = [];\n            if (group) {\n                this._stackMap.forEach(function (value, key) {\n                    if (value === group) {\n                        arr.push(key);\n                    }\n                });\n            }\n            return arr;\n        };\n        DialogRefStack.prototype.groupLength = function (group) {\n            var count = 0;\n            if (group) {\n                this._stackMap.forEach(function (value, key) {\n                    if (value === group) {\n                        count++;\n                    }\n                });\n            }\n            return count;\n        };\n        return DialogRefStack;\n    }());\n    var _stack = new DialogRefStack();\n    var Overlay = (function () {\n        function Overlay(_modalRenderer, injector) {\n            this._modalRenderer = _modalRenderer;\n            this.injector = injector;\n        }\n        Object.defineProperty(Overlay.prototype, \"stackLength\", {\n            get: function () {\n                return _stack.length;\n            },\n            enumerable: true,\n            configurable: true\n        });\n        /**\n         * Check if a given DialogRef is the top most ref in the stack.\n         * TODO: distinguish between body modal vs in element modal.\n         * @param dialogRef\n         * @returns {boolean}\n         */\n        Overlay.prototype.isTopMost = function (dialogRef) {\n            return _stack.indexOf(dialogRef) === _stack.length - 1;\n        };\n        Overlay.prototype.stackPosition = function (dialogRef) {\n            return _stack.indexOf(dialogRef);\n        };\n        Overlay.prototype.groupStackLength = function (dialogRef) {\n            return _stack.groupLength(_stack.groupOf(dialogRef));\n        };\n        /**\n         * Creates an overlay and returns a dialog ref.\n         * @param config instructions how to create the overlay\n         * @param group A token to associate the new overlay with, used for reference (stacks usually)\n         * @returns {DialogRef<T>[]}\n         */\n        Overlay.prototype.open = function (config, group) {\n            var _this = this;\n            var viewContainer = config.viewContainer, containers = [];\n            if (typeof viewContainer === 'string') {\n                containers = vcRefStore.getVCRef(viewContainer);\n            }\n            else if (Array.isArray(viewContainer)) {\n                containers = viewContainer;\n            }\n            else if (viewContainer) {\n                containers = [viewContainer];\n            }\n            if (!containers || !containers[0]) {\n                if (!this.defaultViewContainer) {\n                    throw new Error('Default view container not set. Add the \"defaultOverlayTarget\" directive ' +\n                        'to the application root component template (e.g: <span defaultOverlayTarget></span>. ' +\n                        'You can also set it manually using the \"Overlay\" service \"defaultViewContainer\" property.');\n                }\n                containers = [this.defaultViewContainer];\n            }\n            return containers\n                .map(function (vc) { return _this.createOverlay(config.renderer || _this._modalRenderer, vc, config, group); });\n        };\n        Overlay.prototype.createOverlay = function (renderer, vcRef, config, group) {\n            if (config.context) {\n                config.context.normalize();\n            }\n            if (!config.injector) {\n                config.injector = this.injector;\n            }\n            var dialog = new DialogRef(this, config.context || {});\n            dialog.inElement = config.context && !!config.context.inElement;\n            var cmpRef = renderer.render(dialog, vcRef, config.injector);\n            Object.defineProperty(dialog, 'overlayRef', { value: cmpRef });\n            _stack.pushManaged(dialog, group);\n            return dialog;\n        };\n        return Overlay;\n    }());\n    Overlay.decorators = [\n        { type: _angular_core.Injectable },\n    ];\n    /** @nocollapse */\n    Overlay.ctorParameters = function () {\n        return [\n            { type: OverlayRenderer, },\n            { type: _angular_core.Injector, },\n        ];\n    };\n    /**\n     * A directive use to signal the overlay that the host of this directive\n     * is a dialog boundary, i.e: over click outside of the element should close the modal\n     * (if non blocking)\n     */\n    var OverlayDialogBoundary = (function () {\n        function OverlayDialogBoundary(el, dialogRef) {\n            if (dialogRef && el.nativeElement) {\n                dialogRef.overlayRef.instance.setClickBoundary(el.nativeElement);\n            }\n        }\n        return OverlayDialogBoundary;\n    }());\n    OverlayDialogBoundary.decorators = [\n        { type: _angular_core.Directive, args: [{\n                    selector: '[overlayDialogBoundary]'\n                },] },\n    ];\n    /** @nocollapse */\n    OverlayDialogBoundary.ctorParameters = function () {\n        return [\n            { type: _angular_core.ElementRef, },\n            { type: DialogRef, },\n        ];\n    };\n    var OverlayTarget = (function () {\n        function OverlayTarget(vcRef) {\n            this.vcRef = vcRef;\n        }\n        Object.defineProperty(OverlayTarget.prototype, \"targetKey\", {\n            set: function (value) {\n                this._targetKey = value;\n                if (value) {\n                    vcRefStore.setVCRef(value, this.vcRef);\n                }\n            },\n            enumerable: true,\n            configurable: true\n        });\n        OverlayTarget.prototype.ngOnDestroy = function () {\n            if (this._targetKey) {\n                vcRefStore.delVCRef(this._targetKey, this.vcRef);\n            }\n        };\n        return OverlayTarget;\n    }());\n    OverlayTarget.decorators = [\n        { type: _angular_core.Directive, args: [{\n                    selector: '[overlayTarget]'\n                },] },\n    ];\n    /** @nocollapse */\n    OverlayTarget.ctorParameters = function () {\n        return [\n            { type: _angular_core.ViewContainerRef, },\n        ];\n    };\n    OverlayTarget.propDecorators = {\n        'targetKey': [{ type: _angular_core.Input, args: ['overlayTarget',] },],\n    };\n    var DefaultOverlayTarget = (function () {\n        function DefaultOverlayTarget(overlay, vcRef) {\n            this.overlay = overlay;\n            overlay.defaultViewContainer = vcRef;\n        }\n        DefaultOverlayTarget.prototype.ngOnDestroy = function () {\n            this.overlay.defaultViewContainer = undefined;\n        };\n        return DefaultOverlayTarget;\n    }());\n    DefaultOverlayTarget.decorators = [\n        { type: _angular_core.Directive, args: [{\n                    selector: '[defaultOverlayTarget]'\n                },] },\n    ];\n    /** @nocollapse */\n    DefaultOverlayTarget.ctorParameters = function () {\n        return [\n            { type: Overlay, },\n            { type: _angular_core.ViewContainerRef, },\n        ];\n    };\n    // <template [dynCmp]=\"myCmp\" [dynCmpBindings]=\"myBindings\"></template>\n    // <template [dynCmp]=\"ctx.component\" [dynCmpBindings]=\"ctx.bindings\" [dynCmpProjectables]=\"ctx.projectableNodes\"></template>\n    var SwapComponentDirective = (function () {\n        function SwapComponentDirective(cfr, vcRef, tRef) {\n            this.cfr = cfr;\n            this.vcRef = vcRef;\n            this.tRef = tRef;\n            this.onCreate = new _angular_core.EventEmitter(false);\n        }\n        Object.defineProperty(SwapComponentDirective.prototype, \"swapCmp\", {\n            set: function (component) {\n                this.component = component;\n                this.vcRef.clear();\n                if (this.component) {\n                    var injector = this.swapCmpInjector || this.vcRef.parentInjector;\n                    if (Array.isArray(this.swapCmpBindings) && this.swapCmpBindings.length > 0) {\n                        injector = _angular_core.ReflectiveInjector.fromResolvedProviders(this.swapCmpBindings, injector);\n                    }\n                    var cmpRef = this.vcRef.createComponent(this.cfr.resolveComponentFactory(component), this.vcRef.length, injector, this.swapCmpProjectables);\n                    cmpRef.changeDetectorRef.detectChanges();\n                    this.onCreate.emit(cmpRef);\n                }\n            },\n            enumerable: true,\n            configurable: true\n        });\n        return SwapComponentDirective;\n    }());\n    SwapComponentDirective.decorators = [\n        { type: _angular_core.Directive, args: [{\n                    selector: '[swapCmp]'\n                },] },\n    ];\n    /** @nocollapse */\n    SwapComponentDirective.ctorParameters = function () {\n        return [\n            { type: _angular_core.ComponentFactoryResolver, },\n            { type: _angular_core.ViewContainerRef, },\n            { type: _angular_core.TemplateRef, },\n        ];\n    };\n    SwapComponentDirective.propDecorators = {\n        'swapCmpBindings': [{ type: _angular_core.Input },],\n        'swapCmpInjector': [{ type: _angular_core.Input },],\n        'swapCmpProjectables': [{ type: _angular_core.Input },],\n        'onCreate': [{ type: _angular_core.Output },],\n        'swapCmp': [{ type: _angular_core.Input },],\n    };\n    var BROWSER_PREFIX = ['webkit', 'moz', 'MS', 'o', ''];\n    function register(eventName, element, cb) {\n        BROWSER_PREFIX.forEach(function (p) {\n            element.addEventListener(p ? p + eventName : eventName.toLowerCase(), cb, false);\n        });\n    }\n    /**\n     * A base class for supporting dynamic components.\n     * There are 3 main support areas:\n     * 1 - Easy wrapper for dynamic styling via CSS classes and inline styles.\n     * 2 - Easy wrapper for interception of transition/animation end events.\n     * 3 - Easy wrapper for component creation and injection.\n     *\n     * Dynamic css is done via direct element manipulation (via renderer), it does not use change detection\n     * or binding. This is to allow better control over animation.\n     *\n     * Animation support is limited, only transition/keyframes END even are notified.\n     * The animation support is needed since currently the angular animation module is limited as well and\n     * does not support CSS animation that are not pre-parsed and are not in the styles metadata of a component.\n     *\n     * Capabilities: Add/Remove styls, Add/Remove classes, listen to animation/transition end event,\n     * add components\n     */\n    var BaseDynamicComponent = (function () {\n        function BaseDynamicComponent(el, renderer) {\n            this.el = el;\n            this.renderer = renderer;\n        }\n        BaseDynamicComponent.prototype.activateAnimationListener = function () {\n            var _this = this;\n            if (this.animationEnd)\n                return;\n            this.animationEnd = new rxjs_Subject.Subject();\n            this.animationEnd$ = this.animationEnd.asObservable();\n            register('TransitionEnd', this.el.nativeElement, function (e) { return _this.onEnd(e); });\n            register('AnimationEnd', this.el.nativeElement, function (e) { return _this.onEnd(e); });\n        };\n        /**\n         * Set a specific inline style on the overlay host element.\n         * @param prop The style key\n         * @param value The value, undefined to remove\n         * @returns {ModalOverlay}\n         */\n        BaseDynamicComponent.prototype.setStyle = function (prop, value) {\n            this.renderer.setElementStyle(this.el.nativeElement, prop, value);\n            return this;\n        };\n        BaseDynamicComponent.prototype.forceReflow = function () {\n            this.el.nativeElement.offsetWidth;\n        };\n        BaseDynamicComponent.prototype.addClass = function (css, forceReflow) {\n            var _this = this;\n            if (forceReflow === void 0) {\n                forceReflow = false;\n            }\n            css.split(' ')\n                .forEach(function (c) { return _this.renderer.setElementClass(_this.el.nativeElement, c, true); });\n            if (forceReflow)\n                this.forceReflow();\n        };\n        BaseDynamicComponent.prototype.removeClass = function (css, forceReflow) {\n            var _this = this;\n            if (forceReflow === void 0) {\n                forceReflow = false;\n            }\n            css.split(' ')\n                .forEach(function (c) { return _this.renderer.setElementClass(_this.el.nativeElement, c, false); });\n            if (forceReflow)\n                this.forceReflow();\n        };\n        BaseDynamicComponent.prototype.ngOnDestroy = function () {\n            if (this.animationEnd && !this.animationEnd.closed) {\n                this.animationEnd.complete();\n            }\n        };\n        BaseDynamicComponent.prototype.myAnimationEnd$ = function () {\n            var _this = this;\n            return this.animationEnd$\n                .filter(function (e) { return e.target === _this.el.nativeElement; });\n        };\n        /**\n         * Add a component, supply a view container ref.\n         * Note: The components vcRef will result in a sibling.\n         * @param component The component to add\n         * @param vcRef The container to add to\n         * @param bindings Bindings to use (added on top of the ViewContainerRef)\n         * @returns {Promise<ComponentRef<any>>}\n         */\n        BaseDynamicComponent.prototype._addComponent = function (instructions) {\n            var cmpRef = createComponent(instructions);\n            cmpRef.changeDetectorRef.detectChanges();\n            return cmpRef;\n        };\n        BaseDynamicComponent.prototype.onEnd = function (event) {\n            if (!this.animationEnd.closed) {\n                this.animationEnd.next(event);\n            }\n        };\n        return BaseDynamicComponent;\n    }());\n    var __extends$2 = (undefined && undefined.__extends) || (function () {\n        var extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b)\n                if (b.hasOwnProperty(p))\n                    d[p] = b[p]; };\n        return function (d, b) {\n            extendStatics(d, b);\n            function __() { this.constructor = d; }\n            d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n        };\n    })();\n    /**\n     * Represents the modal backdrop shaped by CSS.\n     */\n    var CSSBackdrop = (function (_super) {\n        __extends$2(CSSBackdrop, _super);\n        function CSSBackdrop(el, renderer) {\n            var _this = _super.call(this, el, renderer) || this;\n            _this.activateAnimationListener();\n            var style = {\n                position: 'absolute',\n                top: 0,\n                left: 0,\n                width: '100%',\n                height: '100%'\n            };\n            Object.keys(style).forEach(function (k) { return _this.setStyle(k, style[k]); });\n            return _this;\n        }\n        return CSSBackdrop;\n    }(BaseDynamicComponent));\n    CSSBackdrop.decorators = [\n        { type: _angular_core.Component, args: [{\n                    selector: 'css-backdrop',\n                    host: {\n                        '[attr.class]': 'cssClass',\n                        '[attr.style]': 'styleStr'\n                    },\n                    encapsulation: _angular_core.ViewEncapsulation.None,\n                    template: \"\"\n                },] },\n    ];\n    /** @nocollapse */\n    CSSBackdrop.ctorParameters = function () {\n        return [\n            { type: _angular_core.ElementRef, },\n            { type: _angular_core.Renderer, },\n        ];\n    };\n    var __extends$3 = (undefined && undefined.__extends) || (function () {\n        var extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b)\n                if (b.hasOwnProperty(p))\n                    d[p] = b[p]; };\n        return function (d, b) {\n            extendStatics(d, b);\n            function __() { this.constructor = d; }\n            d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n        };\n    })();\n    /**\n     * A component that acts as a top level container for an open modal window.\n     */\n    var CSSDialogContainer = (function (_super) {\n        __extends$3(CSSDialogContainer, _super);\n        function CSSDialogContainer(dialog, el, renderer) {\n            var _this = _super.call(this, el, renderer) || this;\n            _this.dialog = dialog;\n            _this.activateAnimationListener();\n            return _this;\n        }\n        return CSSDialogContainer;\n    }(BaseDynamicComponent));\n    CSSDialogContainer.decorators = [\n        { type: _angular_core.Component, args: [{\n                    selector: 'css-dialog-container',\n                    host: {\n                        'tabindex': '-1',\n                        'role': 'dialog'\n                    },\n                    encapsulation: _angular_core.ViewEncapsulation.None,\n                    template: \"<ng-content></ng-content>\"\n                },] },\n    ];\n    /** @nocollapse */\n    CSSDialogContainer.ctorParameters = function () {\n        return [\n            { type: DialogRef, },\n            { type: _angular_core.ElementRef, },\n            { type: _angular_core.Renderer, },\n        ];\n    };\n    // export { FadeInBackdrop } from './fade-in-backdrop';\n    // export { SplitScreenBackdrop } from './split-screen-backdrop';\n    var __extends$1 = (undefined && undefined.__extends) || (function () {\n        var extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b)\n                if (b.hasOwnProperty(p))\n                    d[p] = b[p]; };\n        return function (d, b) {\n            extendStatics(d, b);\n            function __() { this.constructor = d; }\n            d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n        };\n    })();\n    /**\n     * Represents the modal overlay.\n     */\n    var ModalOverlay = (function (_super) {\n        __extends$1(ModalOverlay, _super);\n        function ModalOverlay(dialogRef, vcr, el, renderer) {\n            var _this = _super.call(this, el, renderer) || this;\n            _this.dialogRef = dialogRef;\n            _this.vcr = vcr;\n            _this.activateAnimationListener();\n            return _this;\n        }\n        /**\n         * @internal\n         */\n        ModalOverlay.prototype.getProjectables = function (content, bindings) {\n            var nodes;\n            if (typeof content === 'string') {\n                nodes = [[this.renderer.createText(null, \"\" + content)]];\n            }\n            else if (content instanceof _angular_core.TemplateRef) {\n                nodes = [\n                    this.dialogRef.overlay.defaultViewContainer\n                        .createEmbeddedView(content, { dialogRef: this.dialogRef }).rootNodes\n                ];\n            }\n            else {\n                nodes = [this.embedComponent({ component: content, bindings: bindings }).rootNodes];\n            }\n            return nodes;\n        };\n        ModalOverlay.prototype.embedComponent = function (config) {\n            return this.vcr.createEmbeddedView(this.template, {\n                $implicit: config\n            });\n        };\n        ModalOverlay.prototype.addComponent = function (type, bindings, projectableNodes) {\n            if (bindings === void 0) {\n                bindings = [];\n            }\n            if (projectableNodes === void 0) {\n                projectableNodes = [];\n            }\n            return _super.prototype._addComponent.call(this, {\n                component: type,\n                vcRef: this.innerVcr,\n                bindings: bindings,\n                projectableNodes: projectableNodes\n            });\n        };\n        ModalOverlay.prototype.fullscreen = function () {\n            var _this = this;\n            var style = {\n                position: 'fixed',\n                top: 0,\n                left: 0,\n                bottom: 0,\n                right: 0,\n                'z-index': 1500\n            };\n            Object.keys(style).forEach(function (k) { return _this.setStyle(k, style[k]); });\n        };\n        ModalOverlay.prototype.insideElement = function () {\n            var _this = this;\n            var style = {\n                position: 'absolute',\n                overflow: 'hidden',\n                width: '100%',\n                height: '100%',\n                top: 0,\n                left: 0,\n                bottom: 0,\n                right: 0\n            };\n            Object.keys(style).forEach(function (k) { return _this.setStyle(k, style[k]); });\n        };\n        /**\n         * Define an element that click inside it will not trigger modal close.\n         * Since events bubble, clicking on a dialog will bubble up to the overlay, a plugin\n         * must define an element that represent the dialog, the overlay will make sure no to close when\n         * it was clicked.\n         * @param element\n         */\n        ModalOverlay.prototype.setClickBoundary = function (element) {\n            var _this = this;\n            var target;\n            var elListener = function (event) { return target = event.target; };\n            var docListener = function (event) {\n                if (_this.dialogRef.context.isBlocking || !_this.dialogRef.overlay.isTopMost(_this.dialogRef)) {\n                    return;\n                }\n                var current = event.target;\n                // on click, this will hit.\n                if (current === target)\n                    return;\n                // on mouse down -> drag -> release the current might not be 'target', it might be\n                // a sibling or a child (i.e: not part of the tree-up direction). It might also be a release\n                // outside the dialog... so we compare to the boundary element\n                do {\n                    if (current === element) {\n                        return;\n                    }\n                } while (current.parentNode && (current = current.parentNode));\n                _this.dialogRef.dismiss();\n            };\n            this.dialogRef.onDestroy.subscribe(function () {\n                element.removeEventListener('click', elListener, false);\n                element.removeEventListener('touchstart', elListener, false);\n                document.removeEventListener('click', docListener, false);\n                document.removeEventListener('touchend', docListener, false);\n            });\n            setTimeout(function () {\n                element.addEventListener('mousedown', elListener, false);\n                element.addEventListener('touchstart', docListener, false);\n                document.addEventListener('click', docListener, false);\n                document.addEventListener('touchend', docListener, false);\n            });\n        };\n        /**\n         * Temp workaround for animation where destruction of the top level component does not\n         * trigger child animations. Solution should be found either in animation module or in design\n         * of the modal component tree.\n         * @returns {Promise<void>}\n         */\n        ModalOverlay.prototype.canDestroy = function () {\n            var completer = new PromiseCompleter();\n            if (!Array.isArray(this.beforeDestroyHandlers)) {\n                completer.resolve();\n            }\n            else {\n                // run destroy notification but protect against halt.\n                var id_1 = setTimeout(function () {\n                    id_1 = null;\n                    completer.reject();\n                }, 1000);\n                var resolve = function () {\n                    if (id_1 === null)\n                        return;\n                    clearTimeout(id_1);\n                    completer.resolve();\n                };\n                Promise.all(this.beforeDestroyHandlers.map(function (fn) { return fn(); }))\n                    .then(resolve)\n                    .catch(resolve);\n            }\n            return completer.promise;\n        };\n        /**\n         * A handler running before destruction of the overlay\n         * use to delay destruction due to animation.\n         * This is part of the workaround for animation, see canDestroy.\n         *\n         * NOTE: There is no guarantee that the listeners will fire, use dialog.onDestory for that.\n         * @param fn\n         */\n        ModalOverlay.prototype.beforeDestroy = function (fn) {\n            if (!this.beforeDestroyHandlers) {\n                this.beforeDestroyHandlers = [];\n            }\n            this.beforeDestroyHandlers.push(fn);\n        };\n        ModalOverlay.prototype.documentKeypress = function (event) {\n            // check that this modal is the last in the stack.\n            if (!this.dialogRef.overlay.isTopMost(this.dialogRef))\n                return;\n            if (supportsKey(event.keyCode, this.dialogRef.context.keyboard)) {\n                this.dialogRef.dismiss();\n            }\n        };\n        ModalOverlay.prototype.ngOnDestroy = function () {\n            _super.prototype.ngOnDestroy.call(this);\n            if (this.dialogRef.destroyed !== true) {\n                // if we're here the overlay is destroyed by an external event that is not user invoked.\n                // i.e: The user did no call dismiss or close and dialogRef.destroy() did not invoke.\n                // this will happen when routing or killing an element containing a blocked overlay (ngIf)\n                // we bail out, i.e gracefully shutting down.\n                this.dialogRef.bailOut();\n            }\n        };\n        return ModalOverlay;\n    }(BaseDynamicComponent));\n    ModalOverlay.decorators = [\n        { type: _angular_core.Component, args: [{\n                    selector: 'modal-overlay',\n                    host: {\n                        '(body:keydown)': 'documentKeypress($event)'\n                    },\n                    encapsulation: _angular_core.ViewEncapsulation.None,\n                    template: \"<ng-template #innerView></ng-template>\\n<ng-template #template let-ctx>\\n    <ng-template [swapCmp]=\\\"ctx.component\\\" [swapCmpBindings]=\\\"ctx.bindings\\\" [swapCmpProjectables]=\\\"ctx.projectableNodes\\\"></ng-template>\\n</ng-template>\\n\"\n                },] },\n    ];\n    /** @nocollapse */\n    ModalOverlay.ctorParameters = function () {\n        return [\n            { type: DialogRef, },\n            { type: _angular_core.ViewContainerRef, },\n            { type: _angular_core.ElementRef, },\n            { type: _angular_core.Renderer, },\n        ];\n    };\n    ModalOverlay.propDecorators = {\n        'innerVcr': [{ type: _angular_core.ViewChild, args: ['innerView', { read: _angular_core.ViewContainerRef },] },],\n        'template': [{ type: _angular_core.ViewChild, args: ['template',] },],\n    };\n    var DOMOverlayRenderer = (function () {\n        function DOMOverlayRenderer() {\n        }\n        DOMOverlayRenderer.prototype.render = function (dialog, vcRef, injector) {\n            var bindings = _angular_core.ReflectiveInjector.resolve([\n                { provide: DialogRef, useValue: dialog }\n            ]);\n            var cmpRef = createComponent({\n                component: ModalOverlay,\n                vcRef: vcRef,\n                injector: injector,\n                bindings: bindings\n            });\n            if (dialog.inElement) {\n                vcRef.element.nativeElement.appendChild(cmpRef.location.nativeElement);\n            }\n            else {\n                document.body.appendChild(cmpRef.location.nativeElement);\n            }\n            return cmpRef;\n        };\n        return DOMOverlayRenderer;\n    }());\n    DOMOverlayRenderer.decorators = [\n        { type: _angular_core.Injectable },\n    ];\n    /** @nocollapse */\n    DOMOverlayRenderer.ctorParameters = function () { return []; };\n    var __extends$4 = (undefined && undefined.__extends) || (function () {\n        var extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b)\n                if (b.hasOwnProperty(p))\n                    d[p] = b[p]; };\n        return function (d, b) {\n            extendStatics(d, b);\n            function __() { this.constructor = d; }\n            d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n        };\n    })();\n    var UnsupportedDropInError = (function (_super) {\n        __extends$4(UnsupportedDropInError, _super);\n        function UnsupportedDropInError(dropInName) {\n            var _this = _super.call(this) || this;\n            _this.message = \"Unsupported Drop-In \" + dropInName;\n            return _this;\n        }\n        return UnsupportedDropInError;\n    }(Error));\n    var Modal = (function () {\n        function Modal(overlay) {\n            this.overlay = overlay;\n        }\n        Modal.prototype.alert = function () {\n            throw new UnsupportedDropInError('alert');\n        };\n        Modal.prototype.prompt = function () {\n            throw new UnsupportedDropInError('prompt');\n        };\n        Modal.prototype.confirm = function () {\n            throw new UnsupportedDropInError('confirm');\n        };\n        /**\n         * Opens a modal window inside an existing component.\n         * @param content The content to display, either string, template ref or a component.\n         * @param config Additional settings.\n         * @returns {Promise<DialogRef>}\n         */\n        Modal.prototype.open = function (content, config) {\n            config = config || {};\n            try {\n                var dialogs = this.overlay.open(config, this.constructor);\n                if (dialogs.length > 1) {\n                    console.warn(\"Attempt to open more then 1 overlay detected.\\n        Multiple modal copies are not supported at the moment, \\n        only the first viewContainer will display.\");\n                }\n                // TODO:  Currently supporting 1 view container, hence working on dialogs[0].\n                //        upgrade to multiple containers.\n                return Promise.resolve(this.create(dialogs[0], content, config.bindings));\n            }\n            catch (e) {\n                return Promise.reject(e);\n            }\n        };\n        Modal.prototype.createBackdrop = function (dialogRef, BackdropComponent) {\n            var b = _angular_core.ReflectiveInjector.resolve([{ provide: DialogRef, useValue: dialogRef }]);\n            return dialogRef.overlayRef.instance.addComponent(BackdropComponent, b);\n        };\n        Modal.prototype.createContainer = function (dialogRef, ContainerComponent, content, bindings) {\n            var b = _angular_core.ReflectiveInjector.resolve([{ provide: DialogRef, useValue: dialogRef }])\n                .concat(bindings || []);\n            var nodes = dialogRef.overlayRef.instance.getProjectables(content, b);\n            return dialogRef.overlayRef.instance.addComponent(ContainerComponent, b, nodes);\n        };\n        /**\n         * A helper function for derived classes to create backdrop & container\n         * @param dialogRef\n         * @param backdrop\n         * @param container\n         * @returns { backdropRef: ComponentRef<B>, containerRef: ComponentRef<C> }\n         *\n         * @deprecated use createBackdrop and createContainer instead\n         */\n        Modal.prototype.createModal = function (dialogRef, backdrop, container) {\n            var b = _angular_core.ReflectiveInjector.resolve([{ provide: DialogRef, useValue: dialogRef }]);\n            return {\n                backdropRef: dialogRef.overlayRef.instance.addComponent(backdrop, b),\n                containerRef: dialogRef.overlayRef.instance.addComponent(container, b)\n            };\n        };\n        return Modal;\n    }());\n    // heavily inspired by:\n    // http://www.bennadel.com/blog/3025-creating-custom-dom-and-host-event-bindings-in-angular-2-beta-6.htm\n    var eventMap = {\n        clickOutside: 'click',\n        mousedownOutside: 'mousedown',\n        mouseupOutside: 'mouseup',\n        mousemoveOutside: 'mousemove'\n    };\n    /**\n     * An event handler factory for event handlers that bubble the event to a given handler\n     * if the event target is not an ancestor of the given element.\n     * @param element\n     * @param handler\n     * @returns {function(any): undefined}\n     */\n    function bubbleNonAncestorHandlerFactory(element, handler) {\n        return function (event) {\n            var current = event.target;\n            do {\n                if (current === element) {\n                    return;\n                }\n            } while (current.parentNode && (current = current.parentNode));\n            handler(event);\n        };\n    }\n    var DOMOutsideEventPlugin = (function () {\n        function DOMOutsideEventPlugin() {\n            // TODO: use DI factory for this.\n            if (!document || typeof document.addEventListener !== 'function') {\n                this.addEventListener = noop;\n            }\n        }\n        DOMOutsideEventPlugin.prototype.supports = function (eventName) {\n            return eventMap.hasOwnProperty(eventName);\n        };\n        DOMOutsideEventPlugin.prototype.addEventListener = function (element, eventName, handler) {\n            var zone = this.manager.getZone();\n            // A Factory that registers the event on the document, instead of the element.\n            // the handler is created at runtime, and it acts as a propagation/bubble predicate, it will\n            // bubble up the event (i.e: execute our original event handler) only if the event targer\n            // is an ancestor of our element.\n            // The event is fired inside the angular zone so change detection can kick into action.\n            var onceOnOutside = function () {\n                var listener = bubbleNonAncestorHandlerFactory(element, function (evt) { return zone.runGuarded(function () { return handler(evt); }); });\n                // mimic BrowserDomAdapter.onAndCancel\n                document.addEventListener(eventMap[eventName], listener, false);\n                return function () { return document.removeEventListener(eventMap[eventName], listener, false); };\n            };\n            // we run the event registration for the document in a different zone, this will make sure\n            // change detection is off.\n            // It turns out that if a component that use DOMOutsideEventPlugin is built from a click\n            // event, we might get here before the event reached the document, causing a quick false\n            // positive handling (when stopPropagation() was'nt invoked). To workaround this we wait\n            // for the next vm turn and register.\n            // Event registration returns a dispose function for that event, angular use it to clean\n            // up after component get's destroyed. Since we need to return a dispose function\n            // synchronously we have to put a wrapper for it since we will get it asynchronously,\n            // i.e: after we need to return it.\n            //\n            return zone.runOutsideAngular(function () {\n                var fn;\n                setTimeout(function () { return fn = onceOnOutside(); }, 0);\n                return function () { return fn(); };\n            });\n        };\n        DOMOutsideEventPlugin.prototype.addGlobalEventListener = function (target, eventName, handler) {\n            throw 'not supported';\n        };\n        return DOMOutsideEventPlugin;\n    }());\n    DOMOutsideEventPlugin.decorators = [\n        { type: _angular_core.Injectable },\n    ];\n    /** @nocollapse */\n    DOMOutsideEventPlugin.ctorParameters = function () { return []; };\n    var __extends$5 = (undefined && undefined.__extends) || (function () {\n        var extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b)\n                if (b.hasOwnProperty(p))\n                    d[p] = b[p]; };\n        return function (d, b) {\n            extendStatics(d, b);\n            function __() { this.constructor = d; }\n            d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n        };\n    })();\n    var DEFAULT_VALUES = {\n        inElement: false,\n        isBlocking: true,\n        keyboard: [27],\n        supportsKey: function supportsKey$$1(keyCode) {\n            return this.keyboard.indexOf(keyCode) > -1;\n        }\n    };\n    var DEFAULT_SETTERS = [\n        'inElement',\n        'isBlocking',\n        'keyboard'\n    ];\n    var OverlayContext = (function () {\n        function OverlayContext() {\n        }\n        OverlayContext.prototype.normalize = function () {\n            if (this.isBlocking !== false)\n                this.isBlocking = true;\n            if (this.keyboard === null) {\n                this.keyboard = [];\n            }\n            else if (typeof this.keyboard === 'number') {\n                this.keyboard = [this.keyboard];\n            }\n            else if (!Array.isArray(this.keyboard)) {\n                this.keyboard = DEFAULT_VALUES.keyboard;\n            }\n        };\n        return OverlayContext;\n    }());\n    /**\n     * A core context builder for a modal window instance, used to define the context upon\n     * a modal choose it's behaviour.\n     */\n    var OverlayContextBuilder = (function (_super) {\n        __extends$5(OverlayContextBuilder, _super);\n        function OverlayContextBuilder(defaultValues, initialSetters, baseType) {\n            if (defaultValues === void 0) {\n                defaultValues = undefined;\n            }\n            if (initialSetters === void 0) {\n                initialSetters = undefined;\n            }\n            if (baseType === void 0) {\n                baseType = undefined;\n            }\n            return _super.call(this, extend(DEFAULT_VALUES, defaultValues || {}), arrayUnion(DEFAULT_SETTERS, initialSetters || []), baseType || OverlayContext // https://github.com/Microsoft/TypeScript/issues/7234\n            ) || this;\n        }\n        /**\n         * Returns an new OverlayConfig with a context property representing the data in this builder.\n         * @param base A base configuration that the result will extend\n         * @returns OverlayConfig\n         */\n        OverlayContextBuilder.prototype.toOverlayConfig = function (base) {\n            return extend(base || {}, {\n                context: this.toJSON()\n            });\n        };\n        return OverlayContextBuilder;\n    }(FluentAssign));\n    /**\n     * A helper to create an `OverlayConfig` on the fly.\n     * Since `OverlayConfig` requires context it means a builder is needed, this process had some boilerplate.\n     * When a quick, on the fly overlay config is needed use this helper to avoid that boilerplate.\n     *\n     * A builder is used as an API to allow setting the context and providing some operations around the modal.\n     * When a developers knows the context before hand we can skip this step, this is what this factory is for.\n     *\n     * @param context The context for the modal\n     * @param baseContextType Optional. The type/class of the context. This is the class used to init a new instance of the context\n     * @param baseConfig A base configuration that the result will extend\n     * @returns {OverlayConfig}\n     */\n    function overlayConfigFactory(context, baseContextType, baseConfig) {\n        return new OverlayContextBuilder(context, undefined, baseContextType).toOverlayConfig(baseConfig);\n    }\n    var __extends$6 = (undefined && undefined.__extends) || (function () {\n        var extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b)\n                if (b.hasOwnProperty(p))\n                    d[p] = b[p]; };\n        return function (d, b) {\n            extendStatics(d, b);\n            function __() { this.constructor = d; }\n            d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n        };\n    })();\n    var DEFAULT_VALUES$1 = {};\n    var DEFAULT_SETTERS$1 = [\n        'message'\n    ];\n    var ModalContext = (function (_super) {\n        __extends$6(ModalContext, _super);\n        function ModalContext() {\n            return _super !== null && _super.apply(this, arguments) || this;\n        }\n        return ModalContext;\n    }(OverlayContext));\n    /**\n     * A core context builder for a modal window instance, used to define the context upon\n     * a modal choose it's behaviour.\n     */\n    var ModalContextBuilder = (function (_super) {\n        __extends$6(ModalContextBuilder, _super);\n        function ModalContextBuilder(defaultValues, initialSetters, baseType) {\n            if (defaultValues === void 0) {\n                defaultValues = undefined;\n            }\n            if (initialSetters === void 0) {\n                initialSetters = undefined;\n            }\n            if (baseType === void 0) {\n                baseType = undefined;\n            }\n            return _super.call(this, extend(DEFAULT_VALUES$1, defaultValues || {}), arrayUnion(DEFAULT_SETTERS$1, initialSetters || []), baseType) || this;\n        }\n        return ModalContextBuilder;\n    }(OverlayContextBuilder));\n    var __extends$7 = (undefined && undefined.__extends) || (function () {\n        var extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b)\n                if (b.hasOwnProperty(p))\n                    d[p] = b[p]; };\n        return function (d, b) {\n            extendStatics(d, b);\n            function __() { this.constructor = d; }\n            d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n        };\n    })();\n    var DEFAULT_SETTERS$2 = [\n        'component'\n    ];\n    var ModalOpenContext = (function (_super) {\n        __extends$7(ModalOpenContext, _super);\n        function ModalOpenContext() {\n            return _super !== null && _super.apply(this, arguments) || this;\n        }\n        return ModalOpenContext;\n    }(ModalContext));\n    /**\n     * A Modal Context that knows about the modal service, and so can open a modal window on demand.\n     * Use the fluent API to configure the preset and then invoke the 'open' method to open a modal\n     * based on the context.\n     */\n    var ModalOpenContextBuilder = (function (_super) {\n        __extends$7(ModalOpenContextBuilder, _super);\n        function ModalOpenContextBuilder(defaultValues, initialSetters, baseType) {\n            if (defaultValues === void 0) {\n                defaultValues = undefined;\n            }\n            if (initialSetters === void 0) {\n                initialSetters = undefined;\n            }\n            if (baseType === void 0) {\n                baseType = undefined;\n            }\n            return _super.call(this, defaultValues || {}, arrayUnion(DEFAULT_SETTERS$2, initialSetters || []), baseType) || this;\n        }\n        /**\n         * Hook to alter config and return bindings.\n         * @param config\n         */\n        ModalOpenContextBuilder.prototype.$$beforeOpen = function (config) {\n            return [];\n        };\n        /**\n         * Open a modal window based on the configuration of this config instance.\n         * @param viewContainer If set opens the modal inside the supplied viewContainer\n         * @returns Promise<DialogRef>\n         */\n        ModalOpenContextBuilder.prototype.open = function (viewContainer) {\n            var context = this.toJSON();\n            if (!(context.modal instanceof Modal)) {\n                return Promise.reject(new Error('Configuration Error: modal service not set.'));\n            }\n            var overlayConfig = {\n                context: context,\n                viewContainer: viewContainer,\n                bindings: typeof this.$$beforeOpen === 'function' && this.$$beforeOpen(context)\n            };\n            return context.modal.open(context.component, overlayConfig);\n        };\n        return ModalOpenContextBuilder;\n    }(ModalContextBuilder));\n    var ModalModule = (function () {\n        function ModalModule() {\n        }\n        /**\n         * Returns a ModalModule pre-loaded with a list of dynamically inserted components.\n         * Since dynamic components are not analysed by the angular compiler they must register manually\n         * using entryComponents, this is an easy way to do it.\n         * @param entryComponents A list of dynamically inserted components (dialog's).\n         * @returns {{ngModule: ModalModule, providers: {provide: OpaqueToken, useValue: Array<Type|any[]>, multi: boolean}[]}}\n         */\n        ModalModule.withComponents = function (entryComponents) {\n            return {\n                ngModule: ModalModule,\n                providers: [\n                    { provide: _angular_core.ANALYZE_FOR_ENTRY_COMPONENTS, useValue: entryComponents, multi: true }\n                ]\n            };\n        };\n        /**\n         * Returns a NgModule for use in the root Module.\n         * @param entryComponents A list of dynamically inserted components (dialog's).\n         * @returns ModuleWithProviders\n         */\n        ModalModule.forRoot = function (entryComponents) {\n            return {\n                ngModule: ModalModule,\n                providers: [\n                    Overlay,\n                    { provide: OverlayRenderer, useClass: DOMOverlayRenderer },\n                    { provide: _angular_platformBrowser.EVENT_MANAGER_PLUGINS, useClass: DOMOutsideEventPlugin, multi: true },\n                    { provide: _angular_core.ANALYZE_FOR_ENTRY_COMPONENTS, useValue: entryComponents || [], multi: true }\n                ]\n            };\n        };\n        return ModalModule;\n    }());\n    ModalModule.decorators = [\n        { type: _angular_core.NgModule, args: [{\n                    declarations: [\n                        ModalOverlay,\n                        SwapComponentDirective,\n                        CSSBackdrop,\n                        CSSDialogContainer,\n                        OverlayDialogBoundary,\n                        OverlayTarget,\n                        DefaultOverlayTarget\n                    ],\n                    exports: [\n                        CSSBackdrop,\n                        CSSDialogContainer,\n                        SwapComponentDirective,\n                        OverlayDialogBoundary,\n                        OverlayTarget,\n                        DefaultOverlayTarget\n                    ],\n                    entryComponents: [\n                        ModalOverlay,\n                        CSSBackdrop,\n                        CSSDialogContainer\n                    ]\n                },] },\n    ];\n    /** @nocollapse */\n    ModalModule.ctorParameters = function () { return []; };\n    exports.extend = extend;\n    exports.arrayUnion = arrayUnion;\n    exports.PromiseCompleter = PromiseCompleter;\n    exports.createComponent = createComponent;\n    exports.DialogRef = DialogRef;\n    exports.OverlayRenderer = OverlayRenderer;\n    exports.Modal = Modal;\n    exports.DOMOverlayRenderer = DOMOverlayRenderer;\n    exports.overlayConfigFactory = overlayConfigFactory;\n    exports.OverlayContext = OverlayContext;\n    exports.OverlayContextBuilder = OverlayContextBuilder;\n    exports.Overlay = Overlay;\n    exports.ModalOverlay = ModalOverlay;\n    exports.OverlayDialogBoundary = OverlayDialogBoundary;\n    exports.OverlayTarget = OverlayTarget;\n    exports.DEFAULT_VALUES = DEFAULT_VALUES$1;\n    exports.ModalContext = ModalContext;\n    exports.ModalContextBuilder = ModalContextBuilder;\n    exports.ModalOpenContext = ModalOpenContext;\n    exports.ModalOpenContextBuilder = ModalOpenContextBuilder;\n    exports.ModalModule = ModalModule;\n    exports.privateKey = privateKey;\n    exports.setAssignMethod = setAssignMethod;\n    exports.setAssignAlias = setAssignAlias;\n    exports.FluentAssignFactory = FluentAssignFactory;\n    exports.FluentAssign = FluentAssign;\n    exports.DialogBailOutError = DialogBailOutError;\n    exports.SwapComponentDirective = SwapComponentDirective;\n    exports.BaseDynamicComponent = BaseDynamicComponent;\n    exports.CSSBackdrop = CSSBackdrop;\n    exports.CSSDialogContainer = CSSDialogContainer;\n    Object.defineProperty(exports, '__esModule', { value: true });\n})));\n"]}