(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[1,2],{

/***/ "eTdQ":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "showNewDocumentDialog", function() { return showNewDocumentDialog; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "openNewDocumentWithDeeplinkPath", function() { return openNewDocumentWithDeeplinkPath; });
/* harmony import */ var js_logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GGSb");
/* harmony import */ var js_logger__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(js_logger__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _interfaces_DeeplinkInterface__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("TXS8");
/* harmony import */ var _interfaces_DocumentTemplateKind__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("0B1G");
/* harmony import */ var _Loader__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("77JF");
/* harmony import */ var _utils_DocumentTemplateInteractionUtils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("H2+D");
/* harmony import */ var _utils_HostUtils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("BwkI");
/* harmony import */ var _hosts__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("Zghy");
/* harmony import */ var _interfaces_DocumentTemplateCategoryTypes__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("cIFk");
/*************************************************************************
 * ADOBE CONFIDENTIAL
 * ___________________
 *
 * Copyright 2019 Adobe
 * All Rights Reserved.
 *
 * NOTICE: All information contained herein is, and remains
 * the property of Adobe and its suppliers, if any. The intellectual
 * and technical concepts contained herein are proprietary to Adobe
 * and its suppliers and are protected by all applicable intellectual
 * property laws, including trade secret and copyright laws.
 * Dissemination of this information or reproduction of this material
 * is strictly forbidden unless prior written permission is obtained
 * from Adobe.
 **************************************************************************/








const _logger = js_logger__WEBPACK_IMPORTED_MODULE_0___default.a.get('Commands');
/**
 * Entry point for applications.
 *
 * @param event Event to handle.
 */
function showNewDocumentDialog(event) {
    Object(_Loader__WEBPACK_IMPORTED_MODULE_3__["showNewDocumentDialogImpl"])(event);
}
/**
 * Opens the New Document Dialog at the given path.
 * The DeeplinkPath can also include an action to be applied to the selected document.
 * If no action is provided, it will default to SELECT.
 *
 * @param deeplinkPath The path to the tab, collection and selector of a document.
 */
async function openNewDocumentWithDeeplinkPath(deeplinkPath) {
    var _a, _b, _c, _d, _e;
    try {
        if (!((_a = _Loader__WEBPACK_IMPORTED_MODULE_3__["appRef"] === null || _Loader__WEBPACK_IMPORTED_MODULE_3__["appRef"] === void 0 ? void 0 : _Loader__WEBPACK_IMPORTED_MODULE_3__["appRef"].current) === null || _a === void 0 ? void 0 : _a.store)) {
            throw new Error('Application Store is not available');
        }
        if (!deeplinkPath.tab) {
            throw new Error('`deeplinkPath` is missing `tab` field');
        }
        // If a documentSelector is specified, a collection must also be specified.
        // This isn't the case for the Recent view, for hosts that don't have a split view for it (e.g. Illustrator)
        if (deeplinkPath.collection === undefined &&
            deeplinkPath.documentSelector &&
            !(deeplinkPath.tab === _interfaces_DocumentTemplateCategoryTypes__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].RECENT && !Object(_utils_HostUtils__WEBPACK_IMPORTED_MODULE_5__[/* splitRecentViewForHostId */ "e"])(_hosts__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"].id))) {
            throw new Error('`documentSelector` is present in `deeplinkPath`, but `collection` field is missing');
        }
        // If the deeplinkCommand doesn't have a documentSelector, select the first element
        // of the collection so we can navigate to it
        const documentSelector = deeplinkPath.documentSelector || { index: 0 };
        const collection = (_b = deeplinkPath.collection) !== null && _b !== void 0 ? _b : (deeplinkPath.tab === _interfaces_DocumentTemplateCategoryTypes__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].TEMPLATES ? 0 : _interfaces_DocumentTemplateKind__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].PRESET);
        // We only need to wait for CCLibraries when we want to either Open or Download a Template in order to check
        // the licensing information. Otherwise, we can bypass that waiting time.
        const bypassCCLibrariesWait = !deeplinkPath.action || ![_interfaces_DeeplinkInterface__WEBPACK_IMPORTED_MODULE_1__[/* DeeplinkAction */ "a"].OPEN, _interfaces_DeeplinkInterface__WEBPACK_IMPORTED_MODULE_1__[/* DeeplinkAction */ "a"].DOWNLOAD].includes(deeplinkPath.action);
        const document = await _Loader__WEBPACK_IMPORTED_MODULE_3__["appRef"].current.store.getDocumentByCategoryAndCollection(deeplinkPath.tab, collection, documentSelector, bypassCCLibrariesWait);
        if (!document && (deeplinkPath.documentSelector || deeplinkPath.collection !== undefined)) {
            throw new Error('No document found matching the `deeplinkPath`.');
        }
        if (deeplinkPath.action === _interfaces_DeeplinkInterface__WEBPACK_IMPORTED_MODULE_1__[/* DeeplinkAction */ "a"].OPEN) {
            if (!document) {
                throw new Error('Cannot open - no document found.');
            }
            // Cannot open a template that isn't downloaded
            if (document.kind === _interfaces_DocumentTemplateKind__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].TEMPLATE && !document.isLicensed) {
                throw new Error("Cannot open a template that isn't downloaded!");
            }
            _Loader__WEBPACK_IMPORTED_MODULE_3__["appRef"].current.store._activeDocumentTemplate = document;
            Object(_utils_DocumentTemplateInteractionUtils__WEBPACK_IMPORTED_MODULE_4__[/* createDocument */ "a"])(_Loader__WEBPACK_IMPORTED_MODULE_3__["appRef"].current.store);
            // If we are opening a document, exit the function since we don't need to open the dialog
            return;
        }
        await Object(_Loader__WEBPACK_IMPORTED_MODULE_3__["showNewDocumentDialogImpl"])({}, {
            view: deeplinkPath.tab,
            collection,
            document,
        });
        // Handle actions that need the dialog to be open first
        if (document && document.kind === _interfaces_DocumentTemplateKind__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].TEMPLATE) {
            switch (deeplinkPath.action) {
                case _interfaces_DeeplinkInterface__WEBPACK_IMPORTED_MODULE_1__[/* DeeplinkAction */ "a"].PREVIEW:
                    (_e = (_d = (_c = _Loader__WEBPACK_IMPORTED_MODULE_3__["appRef"].current.router) === null || _c === void 0 ? void 0 : _c.current) === null || _d === void 0 ? void 0 : _d.history) === null || _e === void 0 ? void 0 : _e.push('/template-preview');
                    break;
                case _interfaces_DeeplinkInterface__WEBPACK_IMPORTED_MODULE_1__[/* DeeplinkAction */ "a"].DOWNLOAD:
                    Object(_utils_DocumentTemplateInteractionUtils__WEBPACK_IMPORTED_MODULE_4__[/* startDownload */ "k"])(_Loader__WEBPACK_IMPORTED_MODULE_3__["appRef"].current.store);
                    break;
            }
        }
    }
    catch (error) {
        _logger.error('There was an error processing the Deeplink Path.', error);
    }
}


/***/ }),

/***/ "qAiR":
/***/ (function(module, exports, __webpack_require__) {

var map = {
	"./IconMapper": "XLCt",
	"./IconMapper.test": "w6Pn",
	"./IconMapper.test.tsx": "w6Pn",
	"./IconMapper.tsx": "XLCt",
	"./Icons": "ekoL",
	"./Icons.tsx": "ekoL",
	"./icon_mappings_idsn": "Xug+",
	"./icon_mappings_idsn.json": "Xug+",
	"./icon_mappings_phxs": "S8y1",
	"./icon_mappings_phxs.json": "S8y1"
};


function webpackContext(req) {
	var id = webpackContextResolve(req);
	return __webpack_require__(id);
}
function webpackContextResolve(req) {
	if(!__webpack_require__.o(map, req)) {
		var e = new Error("Cannot find module '" + req + "'");
		e.code = 'MODULE_NOT_FOUND';
		throw e;
	}
	return map[req];
}
webpackContext.keys = function webpackContextKeys() {
	return Object.keys(map);
};
webpackContext.resolve = webpackContextResolve;
module.exports = webpackContext;
webpackContext.id = "qAiR";

/***/ })

}]);