{"version":3,"sources":["mobiledoc-dom-renderer/cards/image.js","mobiledoc-dom-renderer/index.js","mobiledoc-dom-renderer/renderer-factory.js","mobiledoc-dom-renderer/renderers/0-2.js","mobiledoc-dom-renderer/renderers/0-3.js","mobiledoc-dom-renderer/utils/array-utils.js","mobiledoc-dom-renderer/utils/dom.js","mobiledoc-dom-renderer/utils/marker-types.js","mobiledoc-dom-renderer/utils/render-type.js","mobiledoc-dom-renderer/utils/render-utils.js","mobiledoc-dom-renderer/utils/sanitization-utils.js","mobiledoc-dom-renderer/utils/section-types.js","mobiledoc-dom-renderer/utils/tag-names.js"],"sourcesContent":["define('mobiledoc-dom-renderer/cards/image', ['exports', 'mobiledoc-dom-renderer/utils/render-type'], function (exports, _mobiledocDomRendererUtilsRenderType) {\n 'use strict';\n\n exports['default'] = {\n name: 'image',\n type: _mobiledocDomRendererUtilsRenderType['default'],\n render: function render(_ref) {\n var payload = _ref.payload;\n var dom = _ref.env.dom;\n\n var img = dom.createElement('img');\n img.src = payload.src;\n return img;\n }\n };\n});","define('mobiledoc-dom-renderer', ['exports', 'mobiledoc-dom-renderer/renderer-factory', 'mobiledoc-dom-renderer/utils/render-type'], function (exports, _mobiledocDomRendererRendererFactory, _mobiledocDomRendererUtilsRenderType) {\n 'use strict';\n\n exports.registerGlobal = registerGlobal;\n exports.RENDER_TYPE = _mobiledocDomRendererUtilsRenderType['default'];\n\n function registerGlobal(window) {\n window.MobiledocDOMRenderer = _mobiledocDomRendererRendererFactory['default'];\n }\n\n exports['default'] = _mobiledocDomRendererRendererFactory['default'];\n});","define('mobiledoc-dom-renderer/renderer-factory', ['exports', 'mobiledoc-dom-renderer/renderers/0-2', 'mobiledoc-dom-renderer/renderers/0-3', 'mobiledoc-dom-renderer/utils/render-type'], function (exports, _mobiledocDomRendererRenderers02, _mobiledocDomRendererRenderers03, _mobiledocDomRendererUtilsRenderType) {\n 'use strict';\n\n var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\n function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }\n\n /**\n * runtime DOM renderer\n * renders a mobiledoc to DOM\n *\n * input: mobiledoc\n * output: DOM\n */\n\n function validateCards(cards) {\n if (!Array.isArray(cards)) {\n throw new Error('`cards` must be passed as an array');\n }\n for (var i = 0; i < cards.length; i++) {\n var card = cards[i];\n if (card.type !== _mobiledocDomRendererUtilsRenderType['default']) {\n throw new Error('Card \"' + card.name + '\" must be of type \"' + _mobiledocDomRendererUtilsRenderType['default'] + '\", was \"' + card.type + '\"');\n }\n if (!card.render) {\n throw new Error('Card \"' + card.name + '\" must define `render`');\n }\n }\n }\n\n function validateAtoms(atoms) {\n if (!Array.isArray(atoms)) {\n throw new Error('`atoms` must be passed as an array');\n }\n for (var i = 0; i < atoms.length; i++) {\n var atom = atoms[i];\n if (atom.type !== _mobiledocDomRendererUtilsRenderType['default']) {\n throw new Error('Atom \"' + atom.name + '\" must be type \"' + _mobiledocDomRendererUtilsRenderType['default'] + '\", was \"' + atom.type + '\"');\n }\n if (!atom.render) {\n throw new Error('Atom \"' + atom.name + '\" must define `render`');\n }\n }\n }\n\n var RendererFactory = (function () {\n function RendererFactory() {\n var _ref = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n var _ref$cards = _ref.cards;\n var cards = _ref$cards === undefined ? [] : _ref$cards;\n var _ref$atoms = _ref.atoms;\n var atoms = _ref$atoms === undefined ? [] : _ref$atoms;\n var _ref$cardOptions = _ref.cardOptions;\n var cardOptions = _ref$cardOptions === undefined ? {} : _ref$cardOptions;\n var unknownCardHandler = _ref.unknownCardHandler;\n var unknownAtomHandler = _ref.unknownAtomHandler;\n var _ref$markupElementRenderer = _ref.markupElementRenderer;\n var markupElementRenderer = _ref$markupElementRenderer === undefined ? {} : _ref$markupElementRenderer;\n var _ref$sectionElementRenderer = _ref.sectionElementRenderer;\n var sectionElementRenderer = _ref$sectionElementRenderer === undefined ? {} : _ref$sectionElementRenderer;\n var dom = _ref.dom;\n var _ref$markupSanitizer = _ref.markupSanitizer;\n var markupSanitizer = _ref$markupSanitizer === undefined ? null : _ref$markupSanitizer;\n\n _classCallCheck(this, RendererFactory);\n\n validateCards(cards);\n validateAtoms(atoms);\n\n if (!dom) {\n if (typeof window === 'undefined') {\n throw new Error('A `dom` option must be provided to the renderer when running without window.document');\n }\n dom = window.document;\n }\n\n this.options = {\n cards: cards,\n atoms: atoms,\n cardOptions: cardOptions,\n unknownCardHandler: unknownCardHandler,\n unknownAtomHandler: unknownAtomHandler,\n markupElementRenderer: markupElementRenderer,\n sectionElementRenderer: sectionElementRenderer,\n dom: dom,\n markupSanitizer: markupSanitizer\n };\n }\n\n _createClass(RendererFactory, [{\n key: 'render',\n value: function render(mobiledoc) {\n var version = mobiledoc.version;\n\n switch (version) {\n case _mobiledocDomRendererRenderers02.MOBILEDOC_VERSION:\n case undefined:\n case null:\n return new _mobiledocDomRendererRenderers02['default'](mobiledoc, this.options).render();\n case _mobiledocDomRendererRenderers03.MOBILEDOC_VERSION_0_3_0:\n case _mobiledocDomRendererRenderers03.MOBILEDOC_VERSION_0_3_1:\n case _mobiledocDomRendererRenderers03.MOBILEDOC_VERSION_0_3_2:\n return new _mobiledocDomRendererRenderers03['default'](mobiledoc, this.options).render();\n default:\n throw new Error('Unexpected Mobiledoc version \"' + version + '\"');\n }\n }\n }]);\n\n return RendererFactory;\n })();\n\n exports['default'] = RendererFactory;\n});","define('mobiledoc-dom-renderer/renderers/0-2', ['exports', 'mobiledoc-dom-renderer/utils/dom', 'mobiledoc-dom-renderer/cards/image', 'mobiledoc-dom-renderer/utils/render-type', 'mobiledoc-dom-renderer/utils/section-types', 'mobiledoc-dom-renderer/utils/tag-names', 'mobiledoc-dom-renderer/utils/sanitization-utils', 'mobiledoc-dom-renderer/utils/render-utils'], function (exports, _mobiledocDomRendererUtilsDom, _mobiledocDomRendererCardsImage, _mobiledocDomRendererUtilsRenderType, _mobiledocDomRendererUtilsSectionTypes, _mobiledocDomRendererUtilsTagNames, _mobiledocDomRendererUtilsSanitizationUtils, _mobiledocDomRendererUtilsRenderUtils) {\n 'use strict';\n\n var _slicedToArray = (function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i['return']) _i['return'](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError('Invalid attempt to destructure non-iterable instance'); } }; })();\n\n var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\n function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }\n\n var MOBILEDOC_VERSION = '0.2.0';\n\n exports.MOBILEDOC_VERSION = MOBILEDOC_VERSION;\n var IMAGE_SECTION_TAG_NAME = 'img';\n\n function validateVersion(version) {\n if (version !== MOBILEDOC_VERSION) {\n throw new Error('Unexpected Mobiledoc version \"' + version + '\"');\n }\n }\n\n var Renderer = (function () {\n function Renderer(mobiledoc, options) {\n var _this = this;\n\n _classCallCheck(this, Renderer);\n\n var cards = options.cards;\n var cardOptions = options.cardOptions;\n var unknownCardHandler = options.unknownCardHandler;\n var markupElementRenderer = options.markupElementRenderer;\n var sectionElementRenderer = options.sectionElementRenderer;\n var dom = options.dom;\n var version = mobiledoc.version;\n var sectionData = mobiledoc.sections;\n\n validateVersion(version);\n\n var _sectionData = _slicedToArray(sectionData, 2);\n\n var markerTypes = _sectionData[0];\n var sections = _sectionData[1];\n\n this.dom = dom;\n this.root = dom.createDocumentFragment();\n this.markerTypes = markerTypes;\n this.sections = sections;\n this.cards = cards;\n this.cardOptions = cardOptions;\n this.unknownCardHandler = unknownCardHandler || this._defaultUnknownCardHandler;\n\n this.sectionElementRenderer = {\n '__default__': _mobiledocDomRendererUtilsRenderUtils.defaultSectionElementRenderer\n };\n Object.keys(sectionElementRenderer).forEach(function (key) {\n _this.sectionElementRenderer[key.toLowerCase()] = sectionElementRenderer[key];\n });\n\n this.markupElementRenderer = {\n '__default__': _mobiledocDomRendererUtilsRenderUtils.defaultMarkupElementRenderer\n };\n Object.keys(markupElementRenderer).forEach(function (key) {\n _this.markupElementRenderer[key.toLowerCase()] = markupElementRenderer[key];\n });\n\n this._renderCallbacks = [];\n this._teardownCallbacks = [];\n this._renderedChildNodes = [];\n }\n\n _createClass(Renderer, [{\n key: 'render',\n value: function render() {\n var _this2 = this;\n\n this.sections.forEach(function (section) {\n var rendered = _this2.renderSection(section);\n if (rendered) {\n _this2.root.appendChild(rendered);\n }\n });\n for (var i = 0; i < this._renderCallbacks.length; i++) {\n this._renderCallbacks[i]();\n }\n // maintain a reference to child nodes so they can be cleaned up later by teardown\n this._renderedChildNodes = [];\n var node = this.root.firstChild;\n while (node) {\n this._renderedChildNodes.push(node);\n node = node.nextSibling;\n }\n return { result: this.root, teardown: function teardown() {\n return _this2.teardown();\n } };\n }\n }, {\n key: 'teardown',\n value: function teardown() {\n for (var i = 0; i < this._teardownCallbacks.length; i++) {\n this._teardownCallbacks[i]();\n }\n for (var i = 0; i < this._renderedChildNodes.length; i++) {\n var node = this._renderedChildNodes[i];\n if (node.parentNode) {\n node.parentNode.removeChild(node);\n }\n }\n }\n }, {\n key: 'renderSection',\n value: function renderSection(section) {\n var _section = _slicedToArray(section, 1);\n\n var type = _section[0];\n\n switch (type) {\n case _mobiledocDomRendererUtilsSectionTypes.MARKUP_SECTION_TYPE:\n return this.renderMarkupSection(section);\n case _mobiledocDomRendererUtilsSectionTypes.IMAGE_SECTION_TYPE:\n return this.renderImageSection(section);\n case _mobiledocDomRendererUtilsSectionTypes.LIST_SECTION_TYPE:\n return this.renderListSection(section);\n case _mobiledocDomRendererUtilsSectionTypes.CARD_SECTION_TYPE:\n return this.renderCardSection(section);\n default:\n throw new Error('Cannot render mobiledoc section of type \"' + type + '\"');\n }\n }\n }, {\n key: 'renderMarkersOnElement',\n value: function renderMarkersOnElement(element, markers) {\n var elements = [element];\n var currentElement = element;\n\n var pushElement = function pushElement(openedElement) {\n currentElement.appendChild(openedElement);\n elements.push(openedElement);\n currentElement = openedElement;\n };\n\n for (var i = 0, l = markers.length; i < l; i++) {\n var marker = markers[i];\n\n var _marker = _slicedToArray(marker, 3);\n\n var openTypes = _marker[0];\n var closeCount = _marker[1];\n var text = _marker[2];\n\n for (var j = 0, m = openTypes.length; j < m; j++) {\n var markerType = this.markerTypes[openTypes[j]];\n\n var _markerType = _slicedToArray(markerType, 2);\n\n var tagName = _markerType[0];\n var _markerType$1 = _markerType[1];\n var attrs = _markerType$1 === undefined ? [] : _markerType$1;\n\n if ((0, _mobiledocDomRendererUtilsTagNames.isValidMarkerType)(tagName)) {\n pushElement(this.renderMarkupElement(tagName, attrs));\n } else {\n closeCount--;\n }\n }\n\n currentElement.appendChild((0, _mobiledocDomRendererUtilsDom.createTextNode)(this.dom, text));\n\n for (var j = 0, m = closeCount; j < m; j++) {\n elements.pop();\n currentElement = elements[elements.length - 1];\n }\n }\n }\n\n /**\n * @param attrs Array\n */\n }, {\n key: 'renderMarkupElement',\n value: function renderMarkupElement(tagName, attrs) {\n tagName = tagName.toLowerCase();\n attrs = (0, _mobiledocDomRendererUtilsSanitizationUtils.reduceAttributes)(attrs);\n\n var renderer = this.markupElementRendererFor(tagName);\n return renderer(tagName, this.dom, attrs);\n }\n }, {\n key: 'markupElementRendererFor',\n value: function markupElementRendererFor(tagName) {\n return this.markupElementRenderer[tagName] || this.markupElementRenderer.__default__;\n }\n }, {\n key: 'renderListItem',\n value: function renderListItem(markers) {\n var element = this.dom.createElement('li');\n this.renderMarkersOnElement(element, markers);\n return element;\n }\n }, {\n key: 'renderListSection',\n value: function renderListSection(_ref) {\n var _this3 = this;\n\n var _ref2 = _slicedToArray(_ref, 3);\n\n var type = _ref2[0];\n var tagName = _ref2[1];\n var listItems = _ref2[2];\n\n if (!(0, _mobiledocDomRendererUtilsTagNames.isValidSectionTagName)(tagName, _mobiledocDomRendererUtilsSectionTypes.LIST_SECTION_TYPE)) {\n return;\n }\n var element = this.dom.createElement(tagName);\n listItems.forEach(function (li) {\n element.appendChild(_this3.renderListItem(li));\n });\n return element;\n }\n }, {\n key: 'renderImageSection',\n value: function renderImageSection(_ref3) {\n var _ref32 = _slicedToArray(_ref3, 2);\n\n var type = _ref32[0];\n var src = _ref32[1];\n\n var element = this.dom.createElement(IMAGE_SECTION_TAG_NAME);\n element.src = src;\n return element;\n }\n }, {\n key: 'findCard',\n value: function findCard(name) {\n for (var i = 0; i < this.cards.length; i++) {\n if (this.cards[i].name === name) {\n return this.cards[i];\n }\n }\n if (name === _mobiledocDomRendererCardsImage['default'].name) {\n return _mobiledocDomRendererCardsImage['default'];\n }\n return this._createUnknownCard(name);\n }\n }, {\n key: '_createUnknownCard',\n value: function _createUnknownCard(name) {\n return {\n name: name,\n type: _mobiledocDomRendererUtilsRenderType['default'],\n render: this.unknownCardHandler\n };\n }\n }, {\n key: '_createCardArgument',\n value: function _createCardArgument(card) {\n var _this4 = this;\n\n var payload = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];\n\n var env = {\n name: card.name,\n isInEditor: false,\n dom: this.dom,\n didRender: function didRender(callback) {\n return _this4._registerRenderCallback(callback);\n },\n onTeardown: function onTeardown(callback) {\n return _this4._registerTeardownCallback(callback);\n }\n };\n\n var options = this.cardOptions;\n\n return { env: env, options: options, payload: payload };\n }\n }, {\n key: '_registerRenderCallback',\n value: function _registerRenderCallback(callback) {\n this._renderCallbacks.push(callback);\n }\n }, {\n key: '_registerTeardownCallback',\n value: function _registerTeardownCallback(callback) {\n this._teardownCallbacks.push(callback);\n }\n }, {\n key: 'renderCardSection',\n value: function renderCardSection(_ref4) {\n var _ref42 = _slicedToArray(_ref4, 3);\n\n var type = _ref42[0];\n var name = _ref42[1];\n var payload = _ref42[2];\n\n var card = this.findCard(name);\n\n var cardArg = this._createCardArgument(card, payload);\n var rendered = card.render(cardArg);\n\n this._validateCardRender(rendered, card.name);\n\n return rendered;\n }\n }, {\n key: '_validateCardRender',\n value: function _validateCardRender(rendered, cardName) {\n if (!rendered) {\n return;\n }\n\n if (typeof rendered !== 'object') {\n throw new Error('Card \"' + cardName + '\" must render ' + _mobiledocDomRendererUtilsRenderType['default'] + ', but result was \"' + rendered + '\"');\n }\n }\n }, {\n key: 'renderMarkupSection',\n value: function renderMarkupSection(_ref5) {\n var _ref52 = _slicedToArray(_ref5, 3);\n\n var type = _ref52[0];\n var tagName = _ref52[1];\n var markers = _ref52[2];\n\n tagName = tagName.toLowerCase();\n if (!(0, _mobiledocDomRendererUtilsTagNames.isValidSectionTagName)(tagName, _mobiledocDomRendererUtilsSectionTypes.MARKUP_SECTION_TYPE)) {\n return;\n }\n\n var renderer = this.sectionElementRendererFor(tagName);\n var element = renderer(tagName, this.dom);\n\n this.renderMarkersOnElement(element, markers);\n return element;\n }\n }, {\n key: 'sectionElementRendererFor',\n value: function sectionElementRendererFor(tagName) {\n return this.sectionElementRenderer[tagName] || this.sectionElementRenderer.__default__;\n }\n }, {\n key: '_defaultUnknownCardHandler',\n get: function get() {\n return function (_ref6) {\n var name = _ref6.env.name;\n\n throw new Error('Card \"' + name + '\" not found but no unknownCardHandler was registered');\n };\n }\n }]);\n\n return Renderer;\n })();\n\n exports['default'] = Renderer;\n});","define('mobiledoc-dom-renderer/renderers/0-3', ['exports', 'mobiledoc-dom-renderer/utils/dom', 'mobiledoc-dom-renderer/cards/image', 'mobiledoc-dom-renderer/utils/render-type', 'mobiledoc-dom-renderer/utils/section-types', 'mobiledoc-dom-renderer/utils/tag-names', 'mobiledoc-dom-renderer/utils/sanitization-utils', 'mobiledoc-dom-renderer/utils/render-utils', 'mobiledoc-dom-renderer/utils/marker-types'], function (exports, _mobiledocDomRendererUtilsDom, _mobiledocDomRendererCardsImage, _mobiledocDomRendererUtilsRenderType, _mobiledocDomRendererUtilsSectionTypes, _mobiledocDomRendererUtilsTagNames, _mobiledocDomRendererUtilsSanitizationUtils, _mobiledocDomRendererUtilsRenderUtils, _mobiledocDomRendererUtilsMarkerTypes) {\n 'use strict';\n\n var _slicedToArray = (function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i['return']) _i['return'](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError('Invalid attempt to destructure non-iterable instance'); } }; })();\n\n var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\n function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }\n\n var MOBILEDOC_VERSION_0_3_0 = '0.3.0';\n exports.MOBILEDOC_VERSION_0_3_0 = MOBILEDOC_VERSION_0_3_0;\n var MOBILEDOC_VERSION_0_3_1 = '0.3.1';\n exports.MOBILEDOC_VERSION_0_3_1 = MOBILEDOC_VERSION_0_3_1;\n var MOBILEDOC_VERSION_0_3_2 = '0.3.2';\n\n exports.MOBILEDOC_VERSION_0_3_2 = MOBILEDOC_VERSION_0_3_2;\n var IMAGE_SECTION_TAG_NAME = 'img';\n\n function validateVersion(version) {\n switch (version) {\n case MOBILEDOC_VERSION_0_3_0:\n case MOBILEDOC_VERSION_0_3_1:\n case MOBILEDOC_VERSION_0_3_2:\n return;\n default:\n throw new Error('Unexpected Mobiledoc version \"' + version + '\"');\n }\n }\n\n var Renderer = (function () {\n function Renderer(mobiledoc, state) {\n var _this = this;\n\n _classCallCheck(this, Renderer);\n\n var cards = state.cards;\n var cardOptions = state.cardOptions;\n var atoms = state.atoms;\n var unknownCardHandler = state.unknownCardHandler;\n var unknownAtomHandler = state.unknownAtomHandler;\n var markupElementRenderer = state.markupElementRenderer;\n var sectionElementRenderer = state.sectionElementRenderer;\n var dom = state.dom;\n var version = mobiledoc.version;\n var sections = mobiledoc.sections;\n var atomTypes = mobiledoc.atoms;\n var cardTypes = mobiledoc.cards;\n var markerTypes = mobiledoc.markups;\n\n validateVersion(version);\n\n this.dom = dom;\n this.root = this.dom.createDocumentFragment();\n this.sections = sections;\n this.atomTypes = atomTypes;\n this.cardTypes = cardTypes;\n this.markerTypes = markerTypes;\n this.cards = cards;\n this.atoms = atoms;\n this.cardOptions = cardOptions;\n this.unknownCardHandler = unknownCardHandler || this._defaultUnknownCardHandler;\n this.unknownAtomHandler = unknownAtomHandler || this._defaultUnknownAtomHandler;\n\n this.sectionElementRenderer = {\n '__default__': _mobiledocDomRendererUtilsRenderUtils.defaultSectionElementRenderer\n };\n Object.keys(sectionElementRenderer).forEach(function (key) {\n _this.sectionElementRenderer[key.toLowerCase()] = sectionElementRenderer[key];\n });\n\n this.markupElementRenderer = {\n '__default__': _mobiledocDomRendererUtilsRenderUtils.defaultMarkupElementRenderer\n };\n Object.keys(markupElementRenderer).forEach(function (key) {\n _this.markupElementRenderer[key.toLowerCase()] = markupElementRenderer[key];\n });\n\n this._renderCallbacks = [];\n this._teardownCallbacks = [];\n }\n\n _createClass(Renderer, [{\n key: 'render',\n value: function render() {\n var _this2 = this;\n\n this.sections.forEach(function (section) {\n var rendered = _this2.renderSection(section);\n if (rendered) {\n _this2.root.appendChild(rendered);\n }\n });\n for (var i = 0; i < this._renderCallbacks.length; i++) {\n this._renderCallbacks[i]();\n }\n // maintain a reference to child nodes so they can be cleaned up later by teardown\n this._renderedChildNodes = Array.prototype.slice.call(this.root.childNodes);\n return { result: this.root, teardown: function teardown() {\n return _this2.teardown();\n } };\n }\n }, {\n key: 'teardown',\n value: function teardown() {\n for (var i = 0; i < this._teardownCallbacks.length; i++) {\n this._teardownCallbacks[i]();\n }\n for (var i = 0; i < this._renderedChildNodes.length; i++) {\n var node = this._renderedChildNodes[i];\n if (node.parentNode) {\n node.parentNode.removeChild(node);\n }\n }\n }\n }, {\n key: 'renderSection',\n value: function renderSection(section) {\n var _section = _slicedToArray(section, 1);\n\n var type = _section[0];\n\n switch (type) {\n case _mobiledocDomRendererUtilsSectionTypes.MARKUP_SECTION_TYPE:\n return this.renderMarkupSection(section);\n case _mobiledocDomRendererUtilsSectionTypes.IMAGE_SECTION_TYPE:\n return this.renderImageSection(section);\n case _mobiledocDomRendererUtilsSectionTypes.LIST_SECTION_TYPE:\n return this.renderListSection(section);\n case _mobiledocDomRendererUtilsSectionTypes.CARD_SECTION_TYPE:\n return this.renderCardSection(section);\n default:\n throw new Error('Cannot render mobiledoc section of type \"' + type + '\"');\n }\n }\n }, {\n key: 'renderMarkersOnElement',\n value: function renderMarkersOnElement(element, markers) {\n var elements = [element];\n var currentElement = element;\n\n var pushElement = function pushElement(openedElement) {\n currentElement.appendChild(openedElement);\n elements.push(openedElement);\n currentElement = openedElement;\n };\n\n for (var i = 0, l = markers.length; i < l; i++) {\n var marker = markers[i];\n\n var _marker = _slicedToArray(marker, 4);\n\n var type = _marker[0];\n var openTypes = _marker[1];\n var closeCount = _marker[2];\n var value = _marker[3];\n\n for (var j = 0, m = openTypes.length; j < m; j++) {\n var markerType = this.markerTypes[openTypes[j]];\n\n var _markerType = _slicedToArray(markerType, 2);\n\n var tagName = _markerType[0];\n var _markerType$1 = _markerType[1];\n var attrs = _markerType$1 === undefined ? [] : _markerType$1;\n\n if ((0, _mobiledocDomRendererUtilsTagNames.isValidMarkerType)(tagName)) {\n pushElement(this.renderMarkupElement(tagName, attrs));\n } else {\n closeCount--;\n }\n }\n\n switch (type) {\n case _mobiledocDomRendererUtilsMarkerTypes.MARKUP_MARKER_TYPE:\n currentElement.appendChild((0, _mobiledocDomRendererUtilsDom.createTextNode)(this.dom, value));\n break;\n case _mobiledocDomRendererUtilsMarkerTypes.ATOM_MARKER_TYPE:\n currentElement.appendChild(this._renderAtom(value));\n break;\n default:\n throw new Error('Unknown markup type (' + type + ')');\n }\n\n for (var j = 0, m = closeCount; j < m; j++) {\n elements.pop();\n currentElement = elements[elements.length - 1];\n }\n }\n }\n\n /**\n * @param attrs Array\n */\n }, {\n key: 'renderMarkupElement',\n value: function renderMarkupElement(tagName, attrs) {\n tagName = tagName.toLowerCase();\n attrs = (0, _mobiledocDomRendererUtilsSanitizationUtils.reduceAttributes)(attrs);\n\n var renderer = this.markupElementRendererFor(tagName);\n return renderer(tagName, this.dom, attrs);\n }\n }, {\n key: 'markupElementRendererFor',\n value: function markupElementRendererFor(tagName) {\n return this.markupElementRenderer[tagName] || this.markupElementRenderer.__default__;\n }\n }, {\n key: 'renderListItem',\n value: function renderListItem(markers) {\n var element = this.dom.createElement('li');\n this.renderMarkersOnElement(element, markers);\n return element;\n }\n }, {\n key: 'renderListSection',\n value: function renderListSection(_ref) {\n var _this3 = this;\n\n var _ref2 = _slicedToArray(_ref, 3);\n\n var type = _ref2[0];\n var tagName = _ref2[1];\n var listItems = _ref2[2];\n\n if (!(0, _mobiledocDomRendererUtilsTagNames.isValidSectionTagName)(tagName, _mobiledocDomRendererUtilsSectionTypes.LIST_SECTION_TYPE)) {\n return;\n }\n var element = this.dom.createElement(tagName);\n listItems.forEach(function (li) {\n element.appendChild(_this3.renderListItem(li));\n });\n return element;\n }\n }, {\n key: 'renderImageSection',\n value: function renderImageSection(_ref3) {\n var _ref32 = _slicedToArray(_ref3, 2);\n\n var type = _ref32[0];\n var src = _ref32[1];\n\n var element = this.dom.createElement(IMAGE_SECTION_TAG_NAME);\n element.src = src;\n return element;\n }\n }, {\n key: 'findCard',\n value: function findCard(name) {\n for (var i = 0; i < this.cards.length; i++) {\n if (this.cards[i].name === name) {\n return this.cards[i];\n }\n }\n if (name === _mobiledocDomRendererCardsImage['default'].name) {\n return _mobiledocDomRendererCardsImage['default'];\n }\n return this._createUnknownCard(name);\n }\n }, {\n key: '_findCardByIndex',\n value: function _findCardByIndex(index) {\n var cardType = this.cardTypes[index];\n if (!cardType) {\n throw new Error('No card definition found at index ' + index);\n }\n\n var _cardType = _slicedToArray(cardType, 2);\n\n var name = _cardType[0];\n var payload = _cardType[1];\n\n var card = this.findCard(name);\n\n return {\n card: card,\n payload: payload\n };\n }\n }, {\n key: '_createUnknownCard',\n value: function _createUnknownCard(name) {\n return {\n name: name,\n type: _mobiledocDomRendererUtilsRenderType['default'],\n render: this.unknownCardHandler\n };\n }\n }, {\n key: '_createCardArgument',\n value: function _createCardArgument(card) {\n var _this4 = this;\n\n var payload = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];\n\n var env = {\n name: card.name,\n isInEditor: false,\n dom: this.dom,\n didRender: function didRender(callback) {\n return _this4._registerRenderCallback(callback);\n },\n onTeardown: function onTeardown(callback) {\n return _this4._registerTeardownCallback(callback);\n }\n };\n\n var options = this.cardOptions;\n\n return { env: env, options: options, payload: payload };\n }\n }, {\n key: '_registerTeardownCallback',\n value: function _registerTeardownCallback(callback) {\n this._teardownCallbacks.push(callback);\n }\n }, {\n key: '_registerRenderCallback',\n value: function _registerRenderCallback(callback) {\n this._renderCallbacks.push(callback);\n }\n }, {\n key: 'renderCardSection',\n value: function renderCardSection(_ref4) {\n var _ref42 = _slicedToArray(_ref4, 2);\n\n var type = _ref42[0];\n var index = _ref42[1];\n\n var _findCardByIndex2 = this._findCardByIndex(index);\n\n var card = _findCardByIndex2.card;\n var payload = _findCardByIndex2.payload;\n\n var cardArg = this._createCardArgument(card, payload);\n var rendered = card.render(cardArg);\n\n this._validateCardRender(rendered, card.name);\n\n return rendered;\n }\n }, {\n key: '_validateCardRender',\n value: function _validateCardRender(rendered, cardName) {\n if (!rendered) {\n return;\n }\n\n if (typeof rendered !== 'object') {\n throw new Error('Card \"' + cardName + '\" must render ' + _mobiledocDomRendererUtilsRenderType['default'] + ', but result was \"' + rendered + '\"');\n }\n }\n }, {\n key: 'findAtom',\n value: function findAtom(name) {\n for (var i = 0; i < this.atoms.length; i++) {\n if (this.atoms[i].name === name) {\n return this.atoms[i];\n }\n }\n return this._createUnknownAtom(name);\n }\n }, {\n key: '_createUnknownAtom',\n value: function _createUnknownAtom(name) {\n return {\n name: name,\n type: _mobiledocDomRendererUtilsRenderType['default'],\n render: this.unknownAtomHandler\n };\n }\n }, {\n key: '_createAtomArgument',\n value: function _createAtomArgument(atom, value, payload) {\n var _this5 = this;\n\n var env = {\n name: atom.name,\n isInEditor: false,\n dom: this.dom,\n onTeardown: function onTeardown(callback) {\n return _this5._registerTeardownCallback(callback);\n }\n };\n\n var options = this.cardOptions;\n\n return { env: env, options: options, value: value, payload: payload };\n }\n }, {\n key: '_validateAtomRender',\n value: function _validateAtomRender(rendered, atomName) {\n if (!rendered) {\n return;\n }\n\n if (typeof rendered !== 'object') {\n throw new Error('Atom \"' + atomName + '\" must render ' + _mobiledocDomRendererUtilsRenderType['default'] + ', but result was \"' + rendered + '\"');\n }\n }\n }, {\n key: '_findAtomByIndex',\n value: function _findAtomByIndex(index) {\n var atomType = this.atomTypes[index];\n if (!atomType) {\n throw new Error('No atom definition found at index ' + index);\n }\n\n var _atomType = _slicedToArray(atomType, 3);\n\n var name = _atomType[0];\n var value = _atomType[1];\n var payload = _atomType[2];\n\n var atom = this.findAtom(name);\n\n return {\n atom: atom,\n value: value,\n payload: payload\n };\n }\n }, {\n key: '_renderAtom',\n value: function _renderAtom(index) {\n var _findAtomByIndex2 = this._findAtomByIndex(index);\n\n var atom = _findAtomByIndex2.atom;\n var value = _findAtomByIndex2.value;\n var payload = _findAtomByIndex2.payload;\n\n var atomArg = this._createAtomArgument(atom, value, payload);\n var rendered = atom.render(atomArg);\n\n this._validateAtomRender(rendered, atom.name);\n\n return rendered || (0, _mobiledocDomRendererUtilsDom.createTextNode)(this.dom, '');\n }\n }, {\n key: 'renderMarkupSection',\n value: function renderMarkupSection(_ref5) {\n var _ref52 = _slicedToArray(_ref5, 4);\n\n var type = _ref52[0];\n var tagName = _ref52[1];\n var markers = _ref52[2];\n var _ref52$3 = _ref52[3];\n var attributes = _ref52$3 === undefined ? [] : _ref52$3;\n\n tagName = tagName.toLowerCase();\n if (!(0, _mobiledocDomRendererUtilsTagNames.isValidSectionTagName)(tagName, _mobiledocDomRendererUtilsSectionTypes.MARKUP_SECTION_TYPE)) {\n return;\n }\n\n var attrsObj = (0, _mobiledocDomRendererUtilsSanitizationUtils.reduceAttributes)(attributes);\n var renderer = this.sectionElementRendererFor(tagName);\n var element = renderer(tagName, this.dom, attrsObj);\n\n this.renderMarkersOnElement(element, markers);\n return element;\n }\n }, {\n key: 'sectionElementRendererFor',\n value: function sectionElementRendererFor(tagName) {\n return this.sectionElementRenderer[tagName] || this.sectionElementRenderer.__default__;\n }\n }, {\n key: '_defaultUnknownCardHandler',\n get: function get() {\n return function (_ref6) {\n var name = _ref6.env.name;\n\n throw new Error('Card \"' + name + '\" not found but no unknownCardHandler was registered');\n };\n }\n }, {\n key: '_defaultUnknownAtomHandler',\n get: function get() {\n return function (_ref7) {\n var name = _ref7.env.name;\n\n throw new Error('Atom \"' + name + '\" not found but no unknownAtomHandler was registered');\n };\n }\n }]);\n\n return Renderer;\n })();\n\n exports['default'] = Renderer;\n});","define(\"mobiledoc-dom-renderer/utils/array-utils\", [\"exports\"], function (exports) {\n \"use strict\";\n\n exports.includes = includes;\n exports.kvArrayToObject = kvArrayToObject;\n exports.objectToSortedKVArray = objectToSortedKVArray;\n\n function includes(array, detectValue) {\n for (var i = 0; i < array.length; i++) {\n var value = array[i];\n if (value === detectValue) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * @param {Array} array of key1,value1,key2,value2,...\n * @return {Object} {key1:value1, key2:value2, ...}\n * @private\n */\n\n function kvArrayToObject(array) {\n if (!Array.isArray(array)) {\n return {};\n }\n\n var obj = {};\n for (var i = 0; i < array.length; i += 2) {\n var key = array[i];\n var value = array[i + 1];\n\n obj[key] = value;\n }\n return obj;\n }\n\n /**\n * @param {Object} {key1:value1, key2:value2, ...}\n * @return {Array} array of key1,value1,key2,value2,...\n * @private\n */\n\n function objectToSortedKVArray(obj) {\n var keys = Object.keys(obj).sort();\n var result = [];\n keys.forEach(function (k) {\n result.push(k);\n result.push(obj[k]);\n });\n return result;\n }\n});","define('mobiledoc-dom-renderer/utils/dom', ['exports'], function (exports) {\n 'use strict';\n\n exports.createTextNode = createTextNode;\n exports.normalizeTagName = normalizeTagName;\n function addHTMLSpaces(text) {\n var nbsp = ' ';\n return text.replace(/ /g, ' ' + nbsp);\n }\n\n function createTextNode(dom, text) {\n return dom.createTextNode(addHTMLSpaces(text));\n }\n\n function normalizeTagName(tagName) {\n return tagName.toLowerCase();\n }\n});","define(\"mobiledoc-dom-renderer/utils/marker-types\", [\"exports\"], function (exports) {\n \"use strict\";\n\n var MARKUP_MARKER_TYPE = 0;\n exports.MARKUP_MARKER_TYPE = MARKUP_MARKER_TYPE;\n var ATOM_MARKER_TYPE = 1;\n exports.ATOM_MARKER_TYPE = ATOM_MARKER_TYPE;\n});","define('mobiledoc-dom-renderer/utils/render-type', ['exports'], function (exports) {\n 'use strict';\n\n exports['default'] = 'dom';\n});","define('mobiledoc-dom-renderer/utils/render-utils', ['exports', 'mobiledoc-dom-renderer/utils/tag-names', 'mobiledoc-dom-renderer/utils/sanitization-utils'], function (exports, _mobiledocDomRendererUtilsTagNames, _mobiledocDomRendererUtilsSanitizationUtils) {\n 'use strict';\n\n exports.defaultSectionElementRenderer = defaultSectionElementRenderer;\n exports.defaultMarkupElementRenderer = defaultMarkupElementRenderer;\n var VALID_ATTRIBUTES = ['data-md-text-align'];\n\n exports.VALID_ATTRIBUTES = VALID_ATTRIBUTES;\n function _isValidAttribute(attr) {\n return VALID_ATTRIBUTES.indexOf(attr) !== -1;\n }\n\n function handleMarkupSectionAttribute(element, attributeKey, attributeValue) {\n if (!_isValidAttribute(attributeKey)) {\n throw new Error('Cannot use attribute: ' + attributeKey);\n }\n\n element.setAttribute(attributeKey, attributeValue);\n }\n\n function defaultSectionElementRenderer(tagName, dom) {\n var attrsObj = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2];\n\n var element = undefined;\n if ((0, _mobiledocDomRendererUtilsTagNames.isMarkupSectionElementName)(tagName)) {\n element = dom.createElement(tagName);\n\n Object.keys(attrsObj).forEach(function (k) {\n handleMarkupSectionAttribute(element, k, attrsObj[k]);\n });\n } else {\n element = dom.createElement('div');\n element.setAttribute('class', tagName);\n }\n\n return element;\n }\n\n function sanitizeAttribute(tagName, attrName, attrValue) {\n if (tagName === 'a' && attrName === 'href') {\n return (0, _mobiledocDomRendererUtilsSanitizationUtils.sanitizeHref)(attrValue);\n } else {\n return attrValue;\n }\n }\n\n function defaultMarkupElementRenderer(tagName, dom, attrsObj) {\n var element = dom.createElement(tagName);\n Object.keys(attrsObj).forEach(function (attrName) {\n var attrValue = attrsObj[attrName];\n attrValue = sanitizeAttribute(tagName, attrName, attrValue);\n element.setAttribute(attrName, attrValue);\n });\n return element;\n }\n});","define('mobiledoc-dom-renderer/utils/sanitization-utils', ['exports', 'mobiledoc-dom-renderer/utils/array-utils'], function (exports, _mobiledocDomRendererUtilsArrayUtils) {\n 'use strict';\n\n exports.sanitizeHref = sanitizeHref;\n exports.reduceAttributes = reduceAttributes;\n\n var PROTOCOL_REGEXP = /^([a-z0-9.+-]+:)/i;\n\n var badProtocols = ['javascript:', // jshint ignore:line\n 'vbscript:' // jshint ignore:line\n ];\n\n function getProtocol(url) {\n var matches = url && url.match(PROTOCOL_REGEXP);\n var protocol = matches && matches[0] || ':';\n return protocol;\n }\n\n function sanitizeHref(url) {\n var protocol = getProtocol(url).toLowerCase();\n if ((0, _mobiledocDomRendererUtilsArrayUtils.includes)(badProtocols, protocol)) {\n return 'unsafe:' + url;\n }\n return url;\n }\n\n /**\n * @param attributes array\n * @return obj with normalized attribute names (lowercased)\n */\n\n function reduceAttributes(attributes) {\n var obj = {};\n for (var i = 0; i < attributes.length; i += 2) {\n var key = attributes[i];\n var val = attributes[i + 1];\n obj[key.toLowerCase()] = val;\n }\n return obj;\n }\n});","define(\"mobiledoc-dom-renderer/utils/section-types\", [\"exports\"], function (exports) {\n \"use strict\";\n\n var MARKUP_SECTION_TYPE = 1;\n exports.MARKUP_SECTION_TYPE = MARKUP_SECTION_TYPE;\n var IMAGE_SECTION_TYPE = 2;\n exports.IMAGE_SECTION_TYPE = IMAGE_SECTION_TYPE;\n var LIST_SECTION_TYPE = 3;\n exports.LIST_SECTION_TYPE = LIST_SECTION_TYPE;\n var CARD_SECTION_TYPE = 10;\n exports.CARD_SECTION_TYPE = CARD_SECTION_TYPE;\n});","define('mobiledoc-dom-renderer/utils/tag-names', ['exports', 'mobiledoc-dom-renderer/utils/section-types', 'mobiledoc-dom-renderer/utils/dom'], function (exports, _mobiledocDomRendererUtilsSectionTypes, _mobiledocDomRendererUtilsDom) {\n 'use strict';\n\n exports.isValidSectionTagName = isValidSectionTagName;\n exports.isMarkupSectionElementName = isMarkupSectionElementName;\n exports.isValidMarkerType = isValidMarkerType;\n\n var MARKUP_SECTION_TAG_NAMES = ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'blockquote', 'pull-quote', 'aside'].map(_mobiledocDomRendererUtilsDom.normalizeTagName);\n\n var MARKUP_SECTION_ELEMENT_NAMES = ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'blockquote', 'aside'].map(_mobiledocDomRendererUtilsDom.normalizeTagName);\n\n var LIST_SECTION_TAG_NAMES = ['ul', 'ol'].map(_mobiledocDomRendererUtilsDom.normalizeTagName);\n\n var MARKUP_TYPES = ['b', 'i', 'strong', 'em', 'a', 'u', 'sub', 'sup', 's', 'code'].map(_mobiledocDomRendererUtilsDom.normalizeTagName);\n\n function contains(array, item) {\n return array.indexOf(item) !== -1;\n }\n\n function isValidSectionTagName(tagName, sectionType) {\n tagName = (0, _mobiledocDomRendererUtilsDom.normalizeTagName)(tagName);\n\n switch (sectionType) {\n case _mobiledocDomRendererUtilsSectionTypes.MARKUP_SECTION_TYPE:\n return contains(MARKUP_SECTION_TAG_NAMES, tagName);\n case _mobiledocDomRendererUtilsSectionTypes.LIST_SECTION_TYPE:\n return contains(LIST_SECTION_TAG_NAMES, tagName);\n default:\n throw new Error('Cannot validate tagName for unknown section type \"' + sectionType + '\"');\n }\n }\n\n function isMarkupSectionElementName(tagName) {\n tagName = (0, _mobiledocDomRendererUtilsDom.normalizeTagName)(tagName);\n return contains(MARKUP_SECTION_ELEMENT_NAMES, tagName);\n }\n\n function isValidMarkerType(type) {\n type = (0, _mobiledocDomRendererUtilsDom.normalizeTagName)(type);\n return contains(MARKUP_TYPES, type);\n }\n});"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACVA;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;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;;ACjHA;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;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;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;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;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;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;;AChWA;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;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;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;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;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;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;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;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;;ACzeA;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;;ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;;ACNA;AACA;AACA;AACA;;ACHA;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;;ACtDA;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;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACVA;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;","file":"mobiledoc-dom-renderer.js"}