/*
  MIT License http://www.opensource.org/licenses/mit-license.php
  Author Tobias Koppers @sokra
*/

/*
 * Tine 2.0
 *
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Christian Feitl <c.feitl@metaways.de>
 * @copyright   Copyright (c) 2022 Metaways Infosystems GmbH (http://www.metaways.de)
 */

/*
 * Tine 2.0
 *
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Cornelius Weiß <c.weiss@metaways.de>
 * @copyright   Copyright (c) 2019 Metaways Infosystems GmbH (http://www.metaways.de)
 */

/*
 * Tine 2.0
 *
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Cornelius Weiß <c.weiss@metaways.de>
 * @copyright   Copyright (c) 2022 Metaways Infosystems GmbH (http://www.metaways.de)
 */

/* .Expression */

/* .HTMLProxy */

/* ["default"] */

/* ["default"].locals */

/* asset import */

/* binding */

/* harmony default export */

/* harmony export */

/* harmony import */

/* import() | Tinebase/js/localized-address-format */

/* istanbul ignore if  */

/* istanbul ignore next  */

/*#__PURE__*/

/**
   * @cfg {String} JSON encoded node record
   */

/**
   * @param {Array} promises        List of promises to batch
   * @returns {Promise<any[]>}
   */

/**
   * @private
   */

/**
   * @property {DocsAPI.DocEditor}
   */

/**
   * Get translated application title
   *
   * @return {String}
   */

/**
 * Execute promise which is provided as a separate function in order to make a clean/original promise call.
 * If there was an error, log it and return rejected promise execution so it might be used again for retrial
 *
 * @param {Object} [logger]     Custom logger that can be provided
 * @returns {function(*=): Promise<T | {rejectedPromise: *, error: any, status: string}>}
 */

/**
 * For provided list of promises and `raceTimeoutInMs` method will execute promises in parallel and wait for the
 * response for certain amount of time. After time is out (based on `raceTimeoutInMs`) caller may decide what response
 * to receive. By default method returns only promises that "won" the timeout race. Otherwise it can return all
 * reflected promises including promises that "lost" the race.
 *
 * @param {Array} listOfPromises                  A list of promises to race against time
 * @param {Number} [raceTimeoutInMs]              The time in milliseconds that each promise will race against
 * @param {String} [raceTimeoutMessage]           A custom message provided for promise which "lost" the race
 * @param {(
 * 'ONLY_RESOLVED' | 'ONLY_WINNER_PROMISES' | 'ALL'
 * )} responseMode                                Different mode will provide different responses,
 *                                                depending on caller requirements.
 * @returns {Promise<any[]>}
 */

/**
 * Render country name by it's iso code
 *
 * @namespace   Tine.Addressbook
 * @author      Michael Spahn <m.spahn@metaways.de>
 * @singleton
 */

/**
 * Render given MailAddresss
 *
 * @namespace   Tine.Addressbook
 * @author      Michael Spahn <m.spahn@metaways.de>
 * @singleton
 */

/**
 * Render given URL as html
 *
 * @namespace   Tine.Addressbook
 * @author      Michael Spahn <m.spahn@metaways.de>
 * @singleton
 */

/**
 * Render given addresss
 *
 * You need to pass the record and a config to use this renderer.
 * The config contains a mapping, which fields from the record should have which place in the template.
 * Undefined fields won't be rendered, this keeps it well reusable for all address like purposes.
 *
 * @namespace   Tine.Addressbook
 * @author      Michael Spahn <m.spahn@metaways.de>
 * @singleton
 */

/**
 * Render given image
 *
 * @namespace   Tine.Addressbook
 * @author      Michael Spahn <m.spahn@metaways.de>
 * @singleton
 */

/**
 * Render preferred addresss
 *
 * give the preferred address from contact. (street, postalcode and locality)
 * @namespace   Tine.Addressbook
 * @author      Christian Feitl <c.feitl@metaways.de>
 */

/**
 * This method resolves all promises without failing, logs an error if there is logger provided and displays a final status of executed promise.
 * It can be "resolved" or "rejected". If "rejected", it also provides a reference to rejected function that returns a promise.
 * The purpose is to continue with the execution of all promises even if some of them were rejected
 *
 * @param {Array} listOfPromises      Array of promises, which are mapped into reflect function
 * @param {Object} [logger]           Custom logger that can be provided
 * @returns {Promise<any[]>}
 */

/**
 * list type renderer
 *
 * @private
 * @return {String} HTML
 */

/***/

//        don't forget attachments

// 3rd party modules

// @TODO: let user choose where to restore

// CONCATENATED MODULE: ../../OnlyOfficeIntegrator/js/nodeGridPanelPlugin.js

// CONCATENATED MODULE: ../../OnlyOfficeIntegrator/js/onlyOffice.js

// ESM COMPAT FLAG

// EXTERNAL MODULE: ../../Addressbook/js/renderers.js

// Exports

// For old IE

// If url is already wrapped in quotes, remove them

// Module

// OO activity count's as user presence

// See https://drafts.csswg.org/css-values-3/#urls

// Should url be wrapped?

// Special case to return head of iframe instead of iframe itself

// This will throw an exception if access to iframe is blocked

// WTF?

// always validate cachePromises to get the correct recordData

// arg: how to get recordProxy here in a generic way?

// dblclick actions

// due to cross-origin restrictions

// file picker

// filemanager

// fmail

// hack for attachments where grants are not evaluated

// import a list of modules into the list

// istanbul ignore if

// istanbul ignore next

// layout: 'fit',

// local modules

// make sure history tokens are keeped alive

// node core modules

// offer exportAs for attachments/uploads?

// only available in developer edition

// open document does not need to check preview status

// preview panel

// quickadds -> in personal folder

// return the list of modules as css string

// style: 'height: 100%',

// switch to new document

// upload grids

// upload grids -> tempFile

// we need to return a promise for gridPanel here as it needs to remove the local record!

// we see this in the logs, reloaded opener?

//dependentLocality: '',

//sortingCode: '',
