') !== '7';\n }); // IE <= 11 replaces $0 with the whole match, as if it was $&\n // https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0\n\n var REPLACE_KEEPS_$0 = function () {\n return 'a'.replace(/./, '$0') === '$0';\n }();\n\n var REPLACE = wellKnownSymbol('replace'); // Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string\n\n var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = function () {\n if (/./[REPLACE]) {\n return /./[REPLACE]('a', '$0') === '';\n }\n\n return false;\n }(); // Chrome 51 has a buggy \"split\" implementation when RegExp#exec !== nativeExec\n // Weex JS has frozen built-in prototypes, so use try / catch wrapper\n\n\n var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {\n // eslint-disable-next-line regexp/no-empty-group -- required for testing\n var re = /(?:)/;\n var originalExec = re.exec;\n\n re.exec = function () {\n return originalExec.apply(this, arguments);\n };\n\n var result = 'ab'.split(re);\n return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';\n });\n\n var fixRegexpWellKnownSymbolLogic = function fixRegexpWellKnownSymbolLogic(KEY, length, exec, sham) {\n var SYMBOL = wellKnownSymbol(KEY);\n var DELEGATES_TO_SYMBOL = !fails(function () {\n // String methods call symbol-named RegEp methods\n var O = {};\n\n O[SYMBOL] = function () {\n return 7;\n };\n\n return ''[KEY](O) != 7;\n });\n var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {\n // Symbol-named RegExp methods call .exec\n var execCalled = false;\n var re = /a/;\n\n if (KEY === 'split') {\n // We can't use real regex here since it causes deoptimization\n // and serious performance degradation in V8\n // https://github.com/zloirock/core-js/issues/306\n re = {}; // RegExp[@@split] doesn't call the regex's exec method, but first creates\n // a new one. We need to return the patched regex when creating the new one.\n\n re.constructor = {};\n\n re.constructor[SPECIES] = function () {\n return re;\n };\n\n re.flags = '';\n re[SYMBOL] = /./[SYMBOL];\n }\n\n re.exec = function () {\n execCalled = true;\n return null;\n };\n\n re[SYMBOL]('');\n return !execCalled;\n });\n\n if (!DELEGATES_TO_SYMBOL || !DELEGATES_TO_EXEC || KEY === 'replace' && !(REPLACE_SUPPORTS_NAMED_GROUPS && REPLACE_KEEPS_$0 && !REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE) || KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC) {\n var nativeRegExpMethod = /./[SYMBOL];\n var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {\n if (regexp.exec === regexpExec) {\n if (DELEGATES_TO_SYMBOL && !forceStringMethod) {\n // The native String method already delegates to @@method (this\n // polyfilled function), leasing to infinite recursion.\n // We avoid it by directly calling the native @@method method.\n return {\n done: true,\n value: nativeRegExpMethod.call(regexp, str, arg2)\n };\n }\n\n return {\n done: true,\n value: nativeMethod.call(str, regexp, arg2)\n };\n }\n\n return {\n done: false\n };\n }, {\n REPLACE_KEEPS_$0: REPLACE_KEEPS_$0,\n REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE: REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE\n });\n var stringMethod = methods[0];\n var regexMethod = methods[1];\n redefine(String.prototype, KEY, stringMethod);\n redefine(RegExp.prototype, SYMBOL, length == 2 // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)\n // 21.2.5.11 RegExp.prototype[@@split](string, limit)\n ? function (string, arg) {\n return regexMethod.call(string, this, arg);\n } // 21.2.5.6 RegExp.prototype[@@match](string)\n // 21.2.5.9 RegExp.prototype[@@search](string)\n : function (string) {\n return regexMethod.call(string, this);\n });\n }\n\n if (sham) createNonEnumerableProperty(RegExp.prototype[SYMBOL], 'sham', true);\n }; // `String.prototype.{ codePointAt, at }` methods implementation\n\n\n var createMethod$1 = function createMethod$1(CONVERT_TO_STRING) {\n return function ($this, pos) {\n var S = String(requireObjectCoercible($this));\n var position = toInteger(pos);\n var size = S.length;\n var first, second;\n if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;\n first = S.charCodeAt(position);\n return first < 0xD800 || first > 0xDBFF || position + 1 === size || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF ? CONVERT_TO_STRING ? S.charAt(position) : first : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;\n };\n };\n\n var stringMultibyte = {\n // `String.prototype.codePointAt` method\n // https://tc39.es/ecma262/#sec-string.prototype.codepointat\n codeAt: createMethod$1(false),\n // `String.prototype.at` method\n // https://github.com/mathiasbynens/String.prototype.at\n charAt: createMethod$1(true)\n };\n var charAt = stringMultibyte.charAt; // `AdvanceStringIndex` abstract operation\n // https://tc39.es/ecma262/#sec-advancestringindex\n\n var advanceStringIndex = function advanceStringIndex(S, index, unicode) {\n return index + (unicode ? charAt(S, index).length : 1);\n }; // `RegExpExec` abstract operation\n // https://tc39.es/ecma262/#sec-regexpexec\n\n\n var regexpExecAbstract = function regexpExecAbstract(R, S) {\n var exec = R.exec;\n\n if (typeof exec === 'function') {\n var result = exec.call(R, S);\n\n if (_typeof2(result) !== 'object') {\n throw TypeError('RegExp exec method returned something other than an Object or null');\n }\n\n return result;\n }\n\n if (classofRaw(R) !== 'RegExp') {\n throw TypeError('RegExp#exec called on incompatible receiver');\n }\n\n return regexpExec.call(R, S);\n }; // @@match logic\n\n\n fixRegexpWellKnownSymbolLogic('match', 1, function (MATCH, nativeMatch, maybeCallNative) {\n return [// `String.prototype.match` method\n // https://tc39.es/ecma262/#sec-string.prototype.match\n function match(regexp) {\n var O = requireObjectCoercible(this);\n var matcher = regexp == undefined ? undefined : regexp[MATCH];\n return matcher !== undefined ? matcher.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));\n }, // `RegExp.prototype[@@match]` method\n // https://tc39.es/ecma262/#sec-regexp.prototype-@@match\n function (regexp) {\n var res = maybeCallNative(nativeMatch, regexp, this);\n if (res.done) return res.value;\n var rx = anObject(regexp);\n var S = String(this);\n if (!rx.global) return regexpExecAbstract(rx, S);\n var fullUnicode = rx.unicode;\n rx.lastIndex = 0;\n var A = [];\n var n = 0;\n var result;\n\n while ((result = regexpExecAbstract(rx, S)) !== null) {\n var matchStr = String(result[0]);\n A[n] = matchStr;\n if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);\n n++;\n }\n\n return n === 0 ? null : A;\n }];\n }); // `IsArray` abstract operation\n // https://tc39.es/ecma262/#sec-isarray\n\n var isArray = Array.isArray || function isArray(arg) {\n return classofRaw(arg) == 'Array';\n }; // `ToObject` abstract operation\n // https://tc39.es/ecma262/#sec-toobject\n\n\n var toObject = function toObject(argument) {\n return Object(requireObjectCoercible(argument));\n };\n\n var createProperty = function createProperty(object, key, value) {\n var propertyKey = toPrimitive(key);\n if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));else object[propertyKey] = value;\n };\n\n var SPECIES$1 = wellKnownSymbol('species'); // `ArraySpeciesCreate` abstract operation\n // https://tc39.es/ecma262/#sec-arrayspeciescreate\n\n var arraySpeciesCreate = function arraySpeciesCreate(originalArray, length) {\n var C;\n\n if (isArray(originalArray)) {\n C = originalArray.constructor; // cross-realm fallback\n\n if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;else if (isObject(C)) {\n C = C[SPECIES$1];\n if (C === null) C = undefined;\n }\n }\n\n return new (C === undefined ? Array : C)(length === 0 ? 0 : length);\n };\n\n var SPECIES$2 = wellKnownSymbol('species');\n\n var arrayMethodHasSpeciesSupport = function arrayMethodHasSpeciesSupport(METHOD_NAME) {\n // We can't use this feature detection in V8 since it causes\n // deoptimization and serious performance degradation\n // https://github.com/zloirock/core-js/issues/677\n return engineV8Version >= 51 || !fails(function () {\n var array = [];\n var constructor = array.constructor = {};\n\n constructor[SPECIES$2] = function () {\n return {\n foo: 1\n };\n };\n\n return array[METHOD_NAME](Boolean).foo !== 1;\n });\n };\n\n var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');\n var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;\n var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded'; // We can't use this feature detection in V8 since it causes\n // deoptimization and serious performance degradation\n // https://github.com/zloirock/core-js/issues/679\n\n var IS_CONCAT_SPREADABLE_SUPPORT = engineV8Version >= 51 || !fails(function () {\n var array = [];\n array[IS_CONCAT_SPREADABLE] = false;\n return array.concat()[0] !== array;\n });\n var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');\n\n var isConcatSpreadable = function isConcatSpreadable(O) {\n if (!isObject(O)) return false;\n var spreadable = O[IS_CONCAT_SPREADABLE];\n return spreadable !== undefined ? !!spreadable : isArray(O);\n };\n\n var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT; // `Array.prototype.concat` method\n // https://tc39.es/ecma262/#sec-array.prototype.concat\n // with adding support of @@isConcatSpreadable and @@species\n\n _export({\n target: 'Array',\n proto: true,\n forced: FORCED\n }, {\n // eslint-disable-next-line no-unused-vars -- required for `.length`\n concat: function concat(arg) {\n var O = toObject(this);\n var A = arraySpeciesCreate(O, 0);\n var n = 0;\n var i, k, length, len, E;\n\n for (i = -1, length = arguments.length; i < length; i++) {\n E = i === -1 ? O : arguments[i];\n\n if (isConcatSpreadable(E)) {\n len = toLength(E.length);\n if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);\n\n for (k = 0; k < len; k++, n++) {\n if (k in E) createProperty(A, n, E[k]);\n }\n } else {\n if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);\n createProperty(A, n++, E);\n }\n }\n\n A.length = n;\n return A;\n }\n });\n\n var TO_STRING_TAG = wellKnownSymbol('toStringTag');\n var test = {};\n test[TO_STRING_TAG] = 'z';\n var toStringTagSupport = String(test) === '[object z]';\n var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag'); // ES3 wrong here\n\n var CORRECT_ARGUMENTS = classofRaw(function () {\n return arguments;\n }()) == 'Arguments'; // fallback for IE11 Script Access Denied error\n\n var tryGet = function tryGet(it, key) {\n try {\n return it[key];\n } catch (error) {\n /* empty */\n }\n }; // getting tag from ES6+ `Object.prototype.toString`\n\n\n var classof = toStringTagSupport ? classofRaw : function (it) {\n var O, tag, result;\n return it === undefined ? 'Undefined' : it === null ? 'Null' // @@toStringTag case\n : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG$1)) == 'string' ? tag // builtinTag case\n : CORRECT_ARGUMENTS ? classofRaw(O) // ES3 arguments fallback\n : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;\n }; // `Object.prototype.toString` method implementation\n // https://tc39.es/ecma262/#sec-object.prototype.tostring\n\n var objectToString = toStringTagSupport ? {}.toString : function toString() {\n return '[object ' + classof(this) + ']';\n }; // `Object.prototype.toString` method\n // https://tc39.es/ecma262/#sec-object.prototype.tostring\n\n if (!toStringTagSupport) {\n redefine(Object.prototype, 'toString', objectToString, {\n unsafe: true\n });\n }\n\n var TO_STRING = 'toString';\n var RegExpPrototype = RegExp.prototype;\n var nativeToString = RegExpPrototype[TO_STRING];\n var NOT_GENERIC = fails(function () {\n return nativeToString.call({\n source: 'a',\n flags: 'b'\n }) != '/a/b';\n }); // FF44- RegExp#toString has a wrong name\n\n var INCORRECT_NAME = nativeToString.name != TO_STRING; // `RegExp.prototype.toString` method\n // https://tc39.es/ecma262/#sec-regexp.prototype.tostring\n\n if (NOT_GENERIC || INCORRECT_NAME) {\n redefine(RegExp.prototype, TO_STRING, function toString() {\n var R = anObject(this);\n var p = String(R.source);\n var rf = R.flags;\n var f = String(rf === undefined && R instanceof RegExp && !('flags' in RegExpPrototype) ? regexpFlags.call(R) : rf);\n return '/' + p + '/' + f;\n }, {\n unsafe: true\n });\n }\n\n var MATCH = wellKnownSymbol('match'); // `IsRegExp` abstract operation\n // https://tc39.es/ecma262/#sec-isregexp\n\n var isRegexp = function isRegexp(it) {\n var isRegExp;\n return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classofRaw(it) == 'RegExp');\n };\n\n var aFunction$1 = function aFunction$1(it) {\n if (typeof it != 'function') {\n throw TypeError(String(it) + ' is not a function');\n }\n\n return it;\n };\n\n var SPECIES$3 = wellKnownSymbol('species'); // `SpeciesConstructor` abstract operation\n // https://tc39.es/ecma262/#sec-speciesconstructor\n\n var speciesConstructor = function speciesConstructor(O, defaultConstructor) {\n var C = anObject(O).constructor;\n var S;\n return C === undefined || (S = anObject(C)[SPECIES$3]) == undefined ? defaultConstructor : aFunction$1(S);\n };\n\n var arrayPush = [].push;\n var min$2 = Math.min;\n var MAX_UINT32 = 0xFFFFFFFF; // babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError\n\n var SUPPORTS_Y = !fails(function () {\n return !RegExp(MAX_UINT32, 'y');\n }); // @@split logic\n\n fixRegexpWellKnownSymbolLogic('split', 2, function (SPLIT, nativeSplit, maybeCallNative) {\n var internalSplit;\n\n if ('abbc'.split(/(b)*/)[1] == 'c' || // eslint-disable-next-line regexp/no-empty-group -- required for testing\n 'test'.split(/(?:)/, -1).length != 4 || 'ab'.split(/(?:ab)*/).length != 2 || '.'.split(/(.?)(.?)/).length != 4 || // eslint-disable-next-line regexp/no-assertion-capturing-group, regexp/no-empty-group -- required for testing\n '.'.split(/()()/).length > 1 || ''.split(/.?/).length) {\n // based on es5-shim implementation, need to rework it\n internalSplit = function internalSplit(separator, limit) {\n var string = String(requireObjectCoercible(this));\n var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;\n if (lim === 0) return [];\n if (separator === undefined) return [string]; // If `separator` is not a regex, use native split\n\n if (!isRegexp(separator)) {\n return nativeSplit.call(string, separator, lim);\n }\n\n var output = [];\n var flags = (separator.ignoreCase ? 'i' : '') + (separator.multiline ? 'm' : '') + (separator.unicode ? 'u' : '') + (separator.sticky ? 'y' : '');\n var lastLastIndex = 0; // Make `global` and avoid `lastIndex` issues by working with a copy\n\n var separatorCopy = new RegExp(separator.source, flags + 'g');\n var match, lastIndex, lastLength;\n\n while (match = regexpExec.call(separatorCopy, string)) {\n lastIndex = separatorCopy.lastIndex;\n\n if (lastIndex > lastLastIndex) {\n output.push(string.slice(lastLastIndex, match.index));\n if (match.length > 1 && match.index < string.length) arrayPush.apply(output, match.slice(1));\n lastLength = match[0].length;\n lastLastIndex = lastIndex;\n if (output.length >= lim) break;\n }\n\n if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop\n }\n\n if (lastLastIndex === string.length) {\n if (lastLength || !separatorCopy.test('')) output.push('');\n } else output.push(string.slice(lastLastIndex));\n\n return output.length > lim ? output.slice(0, lim) : output;\n }; // Chakra, V8\n\n } else if ('0'.split(undefined, 0).length) {\n internalSplit = function internalSplit(separator, limit) {\n return separator === undefined && limit === 0 ? [] : nativeSplit.call(this, separator, limit);\n };\n } else internalSplit = nativeSplit;\n\n return [// `String.prototype.split` method\n // https://tc39.es/ecma262/#sec-string.prototype.split\n function split(separator, limit) {\n var O = requireObjectCoercible(this);\n var splitter = separator == undefined ? undefined : separator[SPLIT];\n return splitter !== undefined ? splitter.call(separator, O, limit) : internalSplit.call(String(O), separator, limit);\n }, // `RegExp.prototype[@@split]` method\n // https://tc39.es/ecma262/#sec-regexp.prototype-@@split\n //\n // NOTE: This cannot be properly polyfilled in engines that don't support\n // the 'y' flag.\n function (regexp, limit) {\n var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== nativeSplit);\n if (res.done) return res.value;\n var rx = anObject(regexp);\n var S = String(this);\n var C = speciesConstructor(rx, RegExp);\n var unicodeMatching = rx.unicode;\n var flags = (rx.ignoreCase ? 'i' : '') + (rx.multiline ? 'm' : '') + (rx.unicode ? 'u' : '') + (SUPPORTS_Y ? 'y' : 'g'); // ^(? + rx + ) is needed, in combination with some S slicing, to\n // simulate the 'y' flag.\n\n var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags);\n var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;\n if (lim === 0) return [];\n if (S.length === 0) return regexpExecAbstract(splitter, S) === null ? [S] : [];\n var p = 0;\n var q = 0;\n var A = [];\n\n while (q < S.length) {\n splitter.lastIndex = SUPPORTS_Y ? q : 0;\n var z = regexpExecAbstract(splitter, SUPPORTS_Y ? S : S.slice(q));\n var e;\n\n if (z === null || (e = min$2(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p) {\n q = advanceStringIndex(S, q, unicodeMatching);\n } else {\n A.push(S.slice(p, q));\n if (A.length === lim) return A;\n\n for (var i = 1; i <= z.length - 1; i++) {\n A.push(z[i]);\n if (A.length === lim) return A;\n }\n\n q = p = e;\n }\n }\n\n A.push(S.slice(p));\n return A;\n }];\n }, !SUPPORTS_Y);\n /**\n * Append a class to an element\n *\n * @api private\n * @method _addClass\n * @param {Object} element\n * @param {String} className\n * @returns null\n */\n\n function addClass(element, className) {\n if (element instanceof SVGElement) {\n // svg\n var pre = element.getAttribute(\"class\") || \"\";\n\n if (!pre.match(className)) {\n // check if element doesn't already have className\n element.setAttribute(\"class\", \"\".concat(pre, \" \").concat(className));\n }\n } else {\n if (element.classList !== undefined) {\n // check for modern classList property\n var classes = className.split(\" \");\n forEach(classes, function (cls) {\n element.classList.add(cls);\n });\n } else if (!element.className.match(className)) {\n // check if element doesn't already have className\n element.className += \" \".concat(className);\n }\n }\n }\n /**\n * Get an element CSS property on the page\n * Thanks to JavaScript Kit: http://www.javascriptkit.com/dhtmltutors/dhtmlcascade4.shtml\n *\n * @api private\n * @method _getPropValue\n * @param {Object} element\n * @param {String} propName\n * @returns string property value\n */\n\n\n function getPropValue(element, propName) {\n var propValue = \"\";\n\n if (element.currentStyle) {\n //IE\n propValue = element.currentStyle[propName];\n } else if (document.defaultView && document.defaultView.getComputedStyle) {\n //Others\n propValue = document.defaultView.getComputedStyle(element, null).getPropertyValue(propName);\n } //Prevent exception in IE\n\n\n if (propValue && propValue.toLowerCase) {\n return propValue.toLowerCase();\n } else {\n return propValue;\n }\n }\n /**\n * To set the show element\n * This function set a relative (in most cases) position and changes the z-index\n *\n * @api private\n * @method _setShowElement\n * @param {Object} targetElement\n */\n\n\n function setShowElement(_ref) {\n var element = _ref.element;\n addClass(element, \"introjs-showElement\");\n var currentElementPosition = getPropValue(element, \"position\");\n\n if (currentElementPosition !== \"absolute\" && currentElementPosition !== \"relative\" && currentElementPosition !== \"sticky\" && currentElementPosition !== \"fixed\") {\n //change to new intro item\n addClass(element, \"introjs-relativePosition\");\n }\n }\n /**\n * Find the nearest scrollable parent\n * copied from https://stackoverflow.com/questions/35939886/find-first-scrollable-parent\n *\n * @param Element element\n * @return Element\n */\n\n\n function getScrollParent(element) {\n var style = window.getComputedStyle(element);\n var excludeStaticParent = style.position === \"absolute\";\n var overflowRegex = /(auto|scroll)/;\n if (style.position === \"fixed\") return document.body;\n\n for (var parent = element; parent = parent.parentElement;) {\n style = window.getComputedStyle(parent);\n\n if (excludeStaticParent && style.position === \"static\") {\n continue;\n }\n\n if (overflowRegex.test(style.overflow + style.overflowY + style.overflowX)) return parent;\n }\n\n return document.body;\n }\n /**\n * scroll a scrollable element to a child element\n *\n * @param {Object} targetElement\n */\n\n\n function scrollParentToElement(targetElement) {\n var element = targetElement.element;\n if (!this._options.scrollToElement) return;\n var parent = getScrollParent(element);\n if (parent === document.body) return;\n parent.scrollTop = element.offsetTop - parent.offsetTop;\n }\n /**\n * Provides a cross-browser way to get the screen dimensions\n * via: http://stackoverflow.com/questions/5864467/internet-explorer-innerheight\n *\n * @api private\n * @method _getWinSize\n * @returns {Object} width and height attributes\n */\n\n\n function getWinSize() {\n if (window.innerWidth !== undefined) {\n return {\n width: window.innerWidth,\n height: window.innerHeight\n };\n } else {\n var D = document.documentElement;\n return {\n width: D.clientWidth,\n height: D.clientHeight\n };\n }\n }\n /**\n * Check to see if the element is in the viewport or not\n * http://stackoverflow.com/questions/123999/how-to-tell-if-a-dom-element-is-visible-in-the-current-viewport\n *\n * @api private\n * @method _elementInViewport\n * @param {Object} el\n */\n\n\n function elementInViewport(el) {\n var rect = el.getBoundingClientRect();\n return rect.top >= 0 && rect.left >= 0 && rect.bottom + 80 <= window.innerHeight && // add 80 to get the text right\n rect.right <= window.innerWidth;\n }\n /**\n * To change the scroll of `window` after highlighting an element\n *\n * @api private\n * @param {String} scrollTo\n * @param {Object} targetElement\n * @param {Object} tooltipLayer\n */\n\n\n function scrollTo(scrollTo, _ref, tooltipLayer) {\n var element = _ref.element;\n if (scrollTo === \"off\") return;\n var rect;\n if (!this._options.scrollToElement) return;\n\n if (scrollTo === \"tooltip\") {\n rect = tooltipLayer.getBoundingClientRect();\n } else {\n rect = element.getBoundingClientRect();\n }\n\n if (!elementInViewport(element)) {\n var winHeight = getWinSize().height;\n var top = rect.bottom - (rect.bottom - rect.top); // TODO (afshinm): do we need scroll padding now?\n // I have changed the scroll option and now it scrolls the window to\n // the center of the target element or tooltip.\n\n if (top < 0 || element.clientHeight > winHeight) {\n window.scrollBy(0, rect.top - (winHeight / 2 - rect.height / 2) - this._options.scrollPadding); // 30px padding from edge to look nice\n //Scroll down\n } else {\n window.scrollBy(0, rect.top - (winHeight / 2 - rect.height / 2) + this._options.scrollPadding); // 30px padding from edge to look nice\n }\n }\n }\n /**\n * Setting anchors to behave like buttons\n *\n * @api private\n * @method _setAnchorAsButton\n */\n\n\n function setAnchorAsButton(anchor) {\n anchor.setAttribute(\"role\", \"button\");\n anchor.tabIndex = 0;\n } // `Object.keys` method\n // https://tc39.es/ecma262/#sec-object.keys\n\n\n var objectKeys = Object.keys || function keys(O) {\n return objectKeysInternal(O, enumBugKeys);\n };\n\n var nativeAssign = Object.assign;\n var defineProperty = Object.defineProperty; // `Object.assign` method\n // https://tc39.es/ecma262/#sec-object.assign\n\n var objectAssign = !nativeAssign || fails(function () {\n // should have correct order of operations (Edge bug)\n if (descriptors && nativeAssign({\n b: 1\n }, nativeAssign(defineProperty({}, 'a', {\n enumerable: true,\n get: function get() {\n defineProperty(this, 'b', {\n value: 3,\n enumerable: false\n });\n }\n }), {\n b: 2\n })).b !== 1) return true; // should work with symbols and should have deterministic property order (V8 bug)\n\n var A = {};\n var B = {};\n /* global Symbol -- required for testing */\n\n var symbol = Symbol();\n var alphabet = 'abcdefghijklmnopqrst';\n A[symbol] = 7;\n alphabet.split('').forEach(function (chr) {\n B[chr] = chr;\n });\n return nativeAssign({}, A)[symbol] != 7 || objectKeys(nativeAssign({}, B)).join('') != alphabet;\n }) ? function assign(target, source) {\n // eslint-disable-line no-unused-vars -- required for `.length`\n var T = toObject(target);\n var argumentsLength = arguments.length;\n var index = 1;\n var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;\n var propertyIsEnumerable = objectPropertyIsEnumerable.f;\n\n while (argumentsLength > index) {\n var S = indexedObject(arguments[index++]);\n var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S);\n var length = keys.length;\n var j = 0;\n var key;\n\n while (length > j) {\n key = keys[j++];\n if (!descriptors || propertyIsEnumerable.call(S, key)) T[key] = S[key];\n }\n }\n\n return T;\n } : nativeAssign; // `Object.assign` method\n // https://tc39.es/ecma262/#sec-object.assign\n\n _export({\n target: 'Object',\n stat: true,\n forced: Object.assign !== objectAssign\n }, {\n assign: objectAssign\n });\n /**\n * Get an element position on the page relative to another element (or body)\n * Thanks to `meouw`: http://stackoverflow.com/a/442474/375966\n *\n * @api private\n * @method getOffset\n * @param {Object} element\n * @param {Object} relativeEl\n * @returns Element's position info\n */\n\n\n function getOffset(element, relativeEl) {\n var body = document.body;\n var docEl = document.documentElement;\n var scrollTop = window.pageYOffset || docEl.scrollTop || body.scrollTop;\n var scrollLeft = window.pageXOffset || docEl.scrollLeft || body.scrollLeft;\n relativeEl = relativeEl || body;\n var x = element.getBoundingClientRect();\n var xr = relativeEl.getBoundingClientRect();\n var relativeElPosition = getPropValue(relativeEl, \"position\");\n var obj = {\n width: x.width,\n height: x.height\n };\n\n if (relativeEl.tagName.toLowerCase() !== \"body\" && relativeElPosition === \"relative\" || relativeElPosition === \"sticky\") {\n // when the container of our target element is _not_ body and has either \"relative\" or \"sticky\" position, we should not\n // consider the scroll position but we need to include the relative x/y of the container element\n return Object.assign(obj, {\n top: x.top - xr.top,\n left: x.left - xr.left\n });\n } else {\n return Object.assign(obj, {\n top: x.top + scrollTop,\n left: x.left + scrollLeft\n });\n }\n }\n /**\n * Checks to see if target element (or parents) position is fixed or not\n *\n * @api private\n * @method _isFixed\n * @param {Object} element\n * @returns Boolean\n */\n\n\n function isFixed(element) {\n var p = element.parentNode;\n\n if (!p || p.nodeName === \"HTML\") {\n return false;\n }\n\n if (getPropValue(element, \"position\") === \"fixed\") {\n return true;\n }\n\n return isFixed(p);\n }\n\n var floor$1 = Math.floor;\n var replace = ''.replace;\n var SUBSTITUTION_SYMBOLS = /\\$([$&'`]|\\d{1,2}|<[^>]*>)/g;\n var SUBSTITUTION_SYMBOLS_NO_NAMED = /\\$([$&'`]|\\d{1,2})/g; // https://tc39.es/ecma262/#sec-getsubstitution\n\n var getSubstitution = function getSubstitution(matched, str, position, captures, namedCaptures, replacement) {\n var tailPos = position + matched.length;\n var m = captures.length;\n var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;\n\n if (namedCaptures !== undefined) {\n namedCaptures = toObject(namedCaptures);\n symbols = SUBSTITUTION_SYMBOLS;\n }\n\n return replace.call(replacement, symbols, function (match, ch) {\n var capture;\n\n switch (ch.charAt(0)) {\n case '$':\n return '$';\n\n case '&':\n return matched;\n\n case '`':\n return str.slice(0, position);\n\n case \"'\":\n return str.slice(tailPos);\n\n case '<':\n capture = namedCaptures[ch.slice(1, -1)];\n break;\n\n default:\n // \\d\\d?\n var n = +ch;\n if (n === 0) return match;\n\n if (n > m) {\n var f = floor$1(n / 10);\n if (f === 0) return match;\n if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);\n return match;\n }\n\n capture = captures[n - 1];\n }\n\n return capture === undefined ? '' : capture;\n });\n };\n\n var max$1 = Math.max;\n var min$3 = Math.min;\n\n var maybeToString = function maybeToString(it) {\n return it === undefined ? it : String(it);\n }; // @@replace logic\n\n\n fixRegexpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, maybeCallNative, reason) {\n var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = reason.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE;\n var REPLACE_KEEPS_$0 = reason.REPLACE_KEEPS_$0;\n var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';\n return [// `String.prototype.replace` method\n // https://tc39.es/ecma262/#sec-string.prototype.replace\n function replace(searchValue, replaceValue) {\n var O = requireObjectCoercible(this);\n var replacer = searchValue == undefined ? undefined : searchValue[REPLACE];\n return replacer !== undefined ? replacer.call(searchValue, O, replaceValue) : nativeReplace.call(String(O), searchValue, replaceValue);\n }, // `RegExp.prototype[@@replace]` method\n // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace\n function (regexp, replaceValue) {\n if (!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE && REPLACE_KEEPS_$0 || typeof replaceValue === 'string' && replaceValue.indexOf(UNSAFE_SUBSTITUTE) === -1) {\n var res = maybeCallNative(nativeReplace, regexp, this, replaceValue);\n if (res.done) return res.value;\n }\n\n var rx = anObject(regexp);\n var S = String(this);\n var functionalReplace = typeof replaceValue === 'function';\n if (!functionalReplace) replaceValue = String(replaceValue);\n var global = rx.global;\n\n if (global) {\n var fullUnicode = rx.unicode;\n rx.lastIndex = 0;\n }\n\n var results = [];\n\n while (true) {\n var result = regexpExecAbstract(rx, S);\n if (result === null) break;\n results.push(result);\n if (!global) break;\n var matchStr = String(result[0]);\n if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);\n }\n\n var accumulatedResult = '';\n var nextSourcePosition = 0;\n\n for (var i = 0; i < results.length; i++) {\n result = results[i];\n var matched = String(result[0]);\n var position = max$1(min$3(toInteger(result.index), S.length), 0);\n var captures = []; // NOTE: This is equivalent to\n // captures = result.slice(1).map(maybeToString)\n // but for some reason `nativeSlice.call(result, 1, result.length)` (called in\n // the slice polyfill when slicing native arrays) \"doesn't work\" in safari 9 and\n // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.\n\n for (var j = 1; j < result.length; j++) {\n captures.push(maybeToString(result[j]));\n }\n\n var namedCaptures = result.groups;\n\n if (functionalReplace) {\n var replacerArgs = [matched].concat(captures, position, S);\n if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);\n var replacement = String(replaceValue.apply(undefined, replacerArgs));\n } else {\n replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);\n }\n\n if (position >= nextSourcePosition) {\n accumulatedResult += S.slice(nextSourcePosition, position) + replacement;\n nextSourcePosition = position + matched.length;\n }\n }\n\n return accumulatedResult + S.slice(nextSourcePosition);\n }];\n });\n /**\n * Remove a class from an element\n *\n * @api private\n * @method _removeClass\n * @param {Object} element\n * @param {RegExp|String} classNameRegex can be regex or string\n * @returns null\n */\n\n function removeClass(element, classNameRegex) {\n if (element instanceof SVGElement) {\n var pre = element.getAttribute(\"class\") || \"\";\n element.setAttribute(\"class\", pre.replace(classNameRegex, \"\").replace(/^\\s+|\\s+$/g, \"\"));\n } else {\n element.className = element.className.replace(classNameRegex, \"\").replace(/^\\s+|\\s+$/g, \"\");\n }\n }\n /**\n * Sets the style of an DOM element\n *\n * @param {Object} element\n * @param {Object|string} style\n * @return null\n */\n\n\n function setStyle(element, style) {\n var cssText = \"\";\n\n if (element.style.cssText) {\n cssText += element.style.cssText;\n }\n\n if (typeof style === \"string\") {\n cssText += style;\n } else {\n for (var rule in style) {\n cssText += \"\".concat(rule, \":\").concat(style[rule], \";\");\n }\n }\n\n element.style.cssText = cssText;\n }\n /**\n * Update the position of the helper layer on the screen\n *\n * @api private\n * @method _setHelperLayerPosition\n * @param {Object} helperLayer\n */\n\n\n function setHelperLayerPosition(helperLayer) {\n if (helperLayer) {\n //prevent error when `this._currentStep` in undefined\n if (!this._introItems[this._currentStep]) return;\n var currentElement = this._introItems[this._currentStep];\n var elementPosition = getOffset(currentElement.element, this._targetElement);\n var widthHeightPadding = this._options.helperElementPadding; // If the target element is fixed, the tooltip should be fixed as well.\n // Otherwise, remove a fixed class that may be left over from the previous\n // step.\n\n if (isFixed(currentElement.element)) {\n addClass(helperLayer, \"introjs-fixedTooltip\");\n } else {\n removeClass(helperLayer, \"introjs-fixedTooltip\");\n }\n\n if (currentElement.position === \"floating\") {\n widthHeightPadding = 0;\n } //set new position to helper layer\n\n\n setStyle(helperLayer, {\n width: \"\".concat(elementPosition.width + widthHeightPadding, \"px\"),\n height: \"\".concat(elementPosition.height + widthHeightPadding, \"px\"),\n top: \"\".concat(elementPosition.top - widthHeightPadding / 2, \"px\"),\n left: \"\".concat(elementPosition.left - widthHeightPadding / 2, \"px\")\n });\n }\n } // `Object.defineProperties` method\n // https://tc39.es/ecma262/#sec-object.defineproperties\n\n\n var objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var keys = objectKeys(Properties);\n var length = keys.length;\n var index = 0;\n var key;\n\n while (length > index) {\n objectDefineProperty.f(O, key = keys[index++], Properties[key]);\n }\n\n return O;\n };\n var html = getBuiltIn('document', 'documentElement');\n var GT = '>';\n var LT = '<';\n var PROTOTYPE = 'prototype';\n var SCRIPT = 'script';\n var IE_PROTO = sharedKey('IE_PROTO');\n\n var EmptyConstructor = function EmptyConstructor() {\n /* empty */\n };\n\n var scriptTag = function scriptTag(content) {\n return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;\n }; // Create object with fake `null` prototype: use ActiveX Object with cleared prototype\n\n\n var NullProtoObjectViaActiveX = function NullProtoObjectViaActiveX(activeXDocument) {\n activeXDocument.write(scriptTag(''));\n activeXDocument.close();\n var temp = activeXDocument.parentWindow.Object;\n activeXDocument = null; // avoid memory leak\n\n return temp;\n }; // Create object with fake `null` prototype: use iframe Object with cleared prototype\n\n\n var NullProtoObjectViaIFrame = function NullProtoObjectViaIFrame() {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = documentCreateElement('iframe');\n var JS = 'java' + SCRIPT + ':';\n var iframeDocument;\n iframe.style.display = 'none';\n html.appendChild(iframe); // https://github.com/zloirock/core-js/issues/475\n\n iframe.src = String(JS);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(scriptTag('document.F=Object'));\n iframeDocument.close();\n return iframeDocument.F;\n }; // Check for document.domain and active x support\n // No need to use active x approach when document.domain is not set\n // see https://github.com/es-shims/es5-shim/issues/150\n // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346\n // avoid IE GC bug\n\n\n var activeXDocument;\n\n var _NullProtoObject = function NullProtoObject() {\n try {\n /* global ActiveXObject -- old IE */\n activeXDocument = document.domain && new ActiveXObject('htmlfile');\n } catch (error) {\n /* ignore */\n }\n\n _NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();\n var length = enumBugKeys.length;\n\n while (length--) {\n delete _NullProtoObject[PROTOTYPE][enumBugKeys[length]];\n }\n\n return _NullProtoObject();\n };\n\n hiddenKeys[IE_PROTO] = true; // `Object.create` method\n // https://tc39.es/ecma262/#sec-object.create\n\n var objectCreate = Object.create || function create(O, Properties) {\n var result;\n\n if (O !== null) {\n EmptyConstructor[PROTOTYPE] = anObject(O);\n result = new EmptyConstructor();\n EmptyConstructor[PROTOTYPE] = null; // add \"__proto__\" for Object.getPrototypeOf polyfill\n\n result[IE_PROTO] = O;\n } else result = _NullProtoObject();\n\n return Properties === undefined ? result : objectDefineProperties(result, Properties);\n };\n\n var UNSCOPABLES = wellKnownSymbol('unscopables');\n var ArrayPrototype = Array.prototype; // Array.prototype[@@unscopables]\n // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\n\n if (ArrayPrototype[UNSCOPABLES] == undefined) {\n objectDefineProperty.f(ArrayPrototype, UNSCOPABLES, {\n configurable: true,\n value: objectCreate(null)\n });\n } // add a key to Array.prototype[@@unscopables]\n\n\n var addToUnscopables = function addToUnscopables(key) {\n ArrayPrototype[UNSCOPABLES][key] = true;\n };\n\n var $includes = arrayIncludes.includes; // `Array.prototype.includes` method\n // https://tc39.es/ecma262/#sec-array.prototype.includes\n\n _export({\n target: 'Array',\n proto: true\n }, {\n includes: function includes(el\n /* , fromIndex = 0 */\n ) {\n return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);\n }\n }); // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\n\n\n addToUnscopables('includes');\n var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice');\n var SPECIES$4 = wellKnownSymbol('species');\n var nativeSlice = [].slice;\n var max$2 = Math.max; // `Array.prototype.slice` method\n // https://tc39.es/ecma262/#sec-array.prototype.slice\n // fallback for not array-like ES3 strings and DOM objects\n\n _export({\n target: 'Array',\n proto: true,\n forced: !HAS_SPECIES_SUPPORT\n }, {\n slice: function slice(start, end) {\n var O = toIndexedObject(this);\n var length = toLength(O.length);\n var k = toAbsoluteIndex(start, length);\n var fin = toAbsoluteIndex(end === undefined ? length : end, length); // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible\n\n var Constructor, result, n;\n\n if (isArray(O)) {\n Constructor = O.constructor; // cross-realm fallback\n\n if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) {\n Constructor = undefined;\n } else if (isObject(Constructor)) {\n Constructor = Constructor[SPECIES$4];\n if (Constructor === null) Constructor = undefined;\n }\n\n if (Constructor === Array || Constructor === undefined) {\n return nativeSlice.call(O, k, fin);\n }\n }\n\n result = new (Constructor === undefined ? Array : Constructor)(max$2(fin - k, 0));\n\n for (n = 0; k < fin; k++, n++) {\n if (k in O) createProperty(result, n, O[k]);\n }\n\n result.length = n;\n return result;\n }\n });\n\n var notARegexp = function notARegexp(it) {\n if (isRegexp(it)) {\n throw TypeError(\"The method doesn't accept regular expressions\");\n }\n\n return it;\n };\n\n var MATCH$1 = wellKnownSymbol('match');\n\n var correctIsRegexpLogic = function correctIsRegexpLogic(METHOD_NAME) {\n var regexp = /./;\n\n try {\n '/./'[METHOD_NAME](regexp);\n } catch (error1) {\n try {\n regexp[MATCH$1] = false;\n return '/./'[METHOD_NAME](regexp);\n } catch (error2) {\n /* empty */\n }\n }\n\n return false;\n }; // `String.prototype.includes` method\n // https://tc39.es/ecma262/#sec-string.prototype.includes\n\n\n _export({\n target: 'String',\n proto: true,\n forced: !correctIsRegexpLogic('includes')\n }, {\n includes: function includes(searchString\n /* , position = 0 */\n ) {\n return !!~String(requireObjectCoercible(this)).indexOf(notARegexp(searchString), arguments.length > 1 ? arguments[1] : undefined);\n }\n });\n\n var arrayMethodIsStrict = function arrayMethodIsStrict(METHOD_NAME, argument) {\n var method = [][METHOD_NAME];\n return !!method && fails(function () {\n // eslint-disable-next-line no-useless-call,no-throw-literal -- required for testing\n method.call(null, argument || function () {\n throw 1;\n }, 1);\n });\n };\n\n var nativeJoin = [].join;\n var ES3_STRINGS = indexedObject != Object;\n var STRICT_METHOD = arrayMethodIsStrict('join', ','); // `Array.prototype.join` method\n // https://tc39.es/ecma262/#sec-array.prototype.join\n\n _export({\n target: 'Array',\n proto: true,\n forced: ES3_STRINGS || !STRICT_METHOD\n }, {\n join: function join(separator) {\n return nativeJoin.call(toIndexedObject(this), separator === undefined ? ',' : separator);\n }\n }); // optional / simple context binding\n\n\n var functionBindContext = function functionBindContext(fn, that, length) {\n aFunction$1(fn);\n if (that === undefined) return fn;\n\n switch (length) {\n case 0:\n return function () {\n return fn.call(that);\n };\n\n case 1:\n return function (a) {\n return fn.call(that, a);\n };\n\n case 2:\n return function (a, b) {\n return fn.call(that, a, b);\n };\n\n case 3:\n return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n\n return function\n /* ...args */\n () {\n return fn.apply(that, arguments);\n };\n };\n\n var push = [].push; // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterOut }` methods implementation\n\n var createMethod$2 = function createMethod$2(TYPE) {\n var IS_MAP = TYPE == 1;\n var IS_FILTER = TYPE == 2;\n var IS_SOME = TYPE == 3;\n var IS_EVERY = TYPE == 4;\n var IS_FIND_INDEX = TYPE == 6;\n var IS_FILTER_OUT = TYPE == 7;\n var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;\n return function ($this, callbackfn, that, specificCreate) {\n var O = toObject($this);\n var self = indexedObject(O);\n var boundFunction = functionBindContext(callbackfn, that, 3);\n var length = toLength(self.length);\n var index = 0;\n var create = specificCreate || arraySpeciesCreate;\n var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_OUT ? create($this, 0) : undefined;\n var value, result;\n\n for (; length > index; index++) {\n if (NO_HOLES || index in self) {\n value = self[index];\n result = boundFunction(value, index, O);\n\n if (TYPE) {\n if (IS_MAP) target[index] = result; // map\n else if (result) switch (TYPE) {\n case 3:\n return true;\n // some\n\n case 5:\n return value;\n // find\n\n case 6:\n return index;\n // findIndex\n\n case 2:\n push.call(target, value);\n // filter\n } else switch (TYPE) {\n case 4:\n return false;\n // every\n\n case 7:\n push.call(target, value);\n // filterOut\n }\n }\n }\n }\n\n return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;\n };\n };\n\n var arrayIteration = {\n // `Array.prototype.forEach` method\n // https://tc39.es/ecma262/#sec-array.prototype.foreach\n forEach: createMethod$2(0),\n // `Array.prototype.map` method\n // https://tc39.es/ecma262/#sec-array.prototype.map\n map: createMethod$2(1),\n // `Array.prototype.filter` method\n // https://tc39.es/ecma262/#sec-array.prototype.filter\n filter: createMethod$2(2),\n // `Array.prototype.some` method\n // https://tc39.es/ecma262/#sec-array.prototype.some\n some: createMethod$2(3),\n // `Array.prototype.every` method\n // https://tc39.es/ecma262/#sec-array.prototype.every\n every: createMethod$2(4),\n // `Array.prototype.find` method\n // https://tc39.es/ecma262/#sec-array.prototype.find\n find: createMethod$2(5),\n // `Array.prototype.findIndex` method\n // https://tc39.es/ecma262/#sec-array.prototype.findIndex\n findIndex: createMethod$2(6),\n // `Array.prototype.filterOut` method\n // https://github.com/tc39/proposal-array-filtering\n filterOut: createMethod$2(7)\n };\n var $filter = arrayIteration.filter;\n var HAS_SPECIES_SUPPORT$1 = arrayMethodHasSpeciesSupport('filter'); // `Array.prototype.filter` method\n // https://tc39.es/ecma262/#sec-array.prototype.filter\n // with adding support of @@species\n\n _export({\n target: 'Array',\n proto: true,\n forced: !HAS_SPECIES_SUPPORT$1\n }, {\n filter: function filter(callbackfn\n /* , thisArg */\n ) {\n return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n });\n /**\n * Set tooltip left so it doesn't go off the right side of the window\n *\n * @return boolean true, if tooltipLayerStyleLeft is ok. false, otherwise.\n */\n\n\n function checkRight(targetOffset, tooltipLayerStyleLeft, tooltipOffset, windowSize, tooltipLayer) {\n if (targetOffset.left + tooltipLayerStyleLeft + tooltipOffset.width > windowSize.width) {\n // off the right side of the window\n tooltipLayer.style.left = \"\".concat(windowSize.width - tooltipOffset.width - targetOffset.left, \"px\");\n return false;\n }\n\n tooltipLayer.style.left = \"\".concat(tooltipLayerStyleLeft, \"px\");\n return true;\n }\n /**\n * Set tooltip right so it doesn't go off the left side of the window\n *\n * @return boolean true, if tooltipLayerStyleRight is ok. false, otherwise.\n */\n\n\n function checkLeft(targetOffset, tooltipLayerStyleRight, tooltipOffset, tooltipLayer) {\n if (targetOffset.left + targetOffset.width - tooltipLayerStyleRight - tooltipOffset.width < 0) {\n // off the left side of the window\n tooltipLayer.style.left = \"\".concat(-targetOffset.left, \"px\");\n return false;\n }\n\n tooltipLayer.style.right = \"\".concat(tooltipLayerStyleRight, \"px\");\n return true;\n }\n\n var HAS_SPECIES_SUPPORT$2 = arrayMethodHasSpeciesSupport('splice');\n var max$3 = Math.max;\n var min$4 = Math.min;\n var MAX_SAFE_INTEGER$1 = 0x1FFFFFFFFFFFFF;\n var MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded'; // `Array.prototype.splice` method\n // https://tc39.es/ecma262/#sec-array.prototype.splice\n // with adding support of @@species\n\n _export({\n target: 'Array',\n proto: true,\n forced: !HAS_SPECIES_SUPPORT$2\n }, {\n splice: function splice(start, deleteCount\n /* , ...items */\n ) {\n var O = toObject(this);\n var len = toLength(O.length);\n var actualStart = toAbsoluteIndex(start, len);\n var argumentsLength = arguments.length;\n var insertCount, actualDeleteCount, A, k, from, to;\n\n if (argumentsLength === 0) {\n insertCount = actualDeleteCount = 0;\n } else if (argumentsLength === 1) {\n insertCount = 0;\n actualDeleteCount = len - actualStart;\n } else {\n insertCount = argumentsLength - 2;\n actualDeleteCount = min$4(max$3(toInteger(deleteCount), 0), len - actualStart);\n }\n\n if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER$1) {\n throw TypeError(MAXIMUM_ALLOWED_LENGTH_EXCEEDED);\n }\n\n A = arraySpeciesCreate(O, actualDeleteCount);\n\n for (k = 0; k < actualDeleteCount; k++) {\n from = actualStart + k;\n if (from in O) createProperty(A, k, O[from]);\n }\n\n A.length = actualDeleteCount;\n\n if (insertCount < actualDeleteCount) {\n for (k = actualStart; k < len - actualDeleteCount; k++) {\n from = k + actualDeleteCount;\n to = k + insertCount;\n if (from in O) O[to] = O[from];else delete O[to];\n }\n\n for (k = len; k > len - actualDeleteCount + insertCount; k--) {\n delete O[k - 1];\n }\n } else if (insertCount > actualDeleteCount) {\n for (k = len - actualDeleteCount; k > actualStart; k--) {\n from = k + actualDeleteCount - 1;\n to = k + insertCount - 1;\n if (from in O) O[to] = O[from];else delete O[to];\n }\n }\n\n for (k = 0; k < insertCount; k++) {\n O[k + actualStart] = arguments[k + 2];\n }\n\n O.length = len - actualDeleteCount + insertCount;\n return A;\n }\n });\n /**\n * Remove an entry from a string array if it's there, does nothing if it isn't there.\n *\n * @param {Array} stringArray\n * @param {String} stringToRemove\n */\n\n\n function removeEntry(stringArray, stringToRemove) {\n if (stringArray.includes(stringToRemove)) {\n stringArray.splice(stringArray.indexOf(stringToRemove), 1);\n }\n }\n /**\n * auto-determine alignment\n * @param {Integer} offsetLeft\n * @param {Integer} tooltipWidth\n * @param {Object} windowSize\n * @param {String} desiredAlignment\n * @return {String} calculatedAlignment\n */\n\n\n function _determineAutoAlignment(offsetLeft, tooltipWidth, _ref, desiredAlignment) {\n var width = _ref.width;\n var halfTooltipWidth = tooltipWidth / 2;\n var winWidth = Math.min(width, window.screen.width);\n var possibleAlignments = [\"-left-aligned\", \"-middle-aligned\", \"-right-aligned\"];\n var calculatedAlignment = \"\"; // valid left must be at least a tooltipWidth\n // away from right side\n\n if (winWidth - offsetLeft < tooltipWidth) {\n removeEntry(possibleAlignments, \"-left-aligned\");\n } // valid middle must be at least half\n // width away from both sides\n\n\n if (offsetLeft < halfTooltipWidth || winWidth - offsetLeft < halfTooltipWidth) {\n removeEntry(possibleAlignments, \"-middle-aligned\");\n } // valid right must be at least a tooltipWidth\n // width away from left side\n\n\n if (offsetLeft < tooltipWidth) {\n removeEntry(possibleAlignments, \"-right-aligned\");\n }\n\n if (possibleAlignments.length) {\n if (possibleAlignments.includes(desiredAlignment)) {\n // the desired alignment is valid\n calculatedAlignment = desiredAlignment;\n } else {\n // pick the first valid position, in order\n calculatedAlignment = possibleAlignments[0];\n }\n } else {\n // if screen width is too small\n // for ANY alignment, middle is\n // probably the best for visibility\n calculatedAlignment = \"-middle-aligned\";\n }\n\n return calculatedAlignment;\n }\n /**\n * Determines the position of the tooltip based on the position precedence and availability\n * of screen space.\n *\n * @param {Object} targetElement\n * @param {Object} tooltipLayer\n * @param {String} desiredTooltipPosition\n * @return {String} calculatedPosition\n */\n\n\n function _determineAutoPosition(targetElement, tooltipLayer, desiredTooltipPosition) {\n // Take a clone of position precedence. These will be the available\n var possiblePositions = this._options.positionPrecedence.slice();\n\n var windowSize = getWinSize();\n var tooltipHeight = getOffset(tooltipLayer).height + 10;\n var tooltipWidth = getOffset(tooltipLayer).width + 20;\n var targetElementRect = targetElement.getBoundingClientRect(); // If we check all the possible areas, and there are no valid places for the tooltip, the element\n // must take up most of the screen real estate. Show the tooltip floating in the middle of the screen.\n\n var calculatedPosition = \"floating\";\n /*\n * auto determine position\n */\n // Check for space below\n\n if (targetElementRect.bottom + tooltipHeight > windowSize.height) {\n removeEntry(possiblePositions, \"bottom\");\n } // Check for space above\n\n\n if (targetElementRect.top - tooltipHeight < 0) {\n removeEntry(possiblePositions, \"top\");\n } // Check for space to the right\n\n\n if (targetElementRect.right + tooltipWidth > windowSize.width) {\n removeEntry(possiblePositions, \"right\");\n } // Check for space to the left\n\n\n if (targetElementRect.left - tooltipWidth < 0) {\n removeEntry(possiblePositions, \"left\");\n } // @var {String} ex: 'right-aligned'\n\n\n var desiredAlignment = function (pos) {\n var hyphenIndex = pos.indexOf(\"-\");\n\n if (hyphenIndex !== -1) {\n // has alignment\n return pos.substr(hyphenIndex);\n }\n\n return \"\";\n }(desiredTooltipPosition || \"\"); // strip alignment from position\n\n\n if (desiredTooltipPosition) {\n // ex: \"bottom-right-aligned\"\n // should return 'bottom'\n desiredTooltipPosition = desiredTooltipPosition.split(\"-\")[0];\n }\n\n if (possiblePositions.length) {\n if (possiblePositions.includes(desiredTooltipPosition)) {\n // If the requested position is in the list, choose that\n calculatedPosition = desiredTooltipPosition;\n } else {\n // Pick the first valid position, in order\n calculatedPosition = possiblePositions[0];\n }\n } // only top and bottom positions have optional alignments\n\n\n if ([\"top\", \"bottom\"].includes(calculatedPosition)) {\n calculatedPosition += _determineAutoAlignment(targetElementRect.left, tooltipWidth, windowSize, desiredAlignment);\n }\n\n return calculatedPosition;\n }\n /**\n * Render tooltip box in the page\n *\n * @api private\n * @method placeTooltip\n * @param {HTMLElement} targetElement\n * @param {HTMLElement} tooltipLayer\n * @param {HTMLElement} arrowLayer\n * @param {Boolean} hintMode\n */\n\n\n function placeTooltip(targetElement, tooltipLayer, arrowLayer, hintMode) {\n var tooltipCssClass = \"\";\n var currentStepObj;\n var tooltipOffset;\n var targetOffset;\n var windowSize;\n var currentTooltipPosition;\n hintMode = hintMode || false; //reset the old style\n\n tooltipLayer.style.top = null;\n tooltipLayer.style.right = null;\n tooltipLayer.style.bottom = null;\n tooltipLayer.style.left = null;\n tooltipLayer.style.marginLeft = null;\n tooltipLayer.style.marginTop = null;\n arrowLayer.style.display = \"inherit\"; //prevent error when `this._currentStep` is undefined\n\n if (!this._introItems[this._currentStep]) return; //if we have a custom css class for each step\n\n currentStepObj = this._introItems[this._currentStep];\n\n if (typeof currentStepObj.tooltipClass === \"string\") {\n tooltipCssClass = currentStepObj.tooltipClass;\n } else {\n tooltipCssClass = this._options.tooltipClass;\n }\n\n tooltipLayer.className = [\"introjs-tooltip\", tooltipCssClass].filter(Boolean).join(\" \");\n tooltipLayer.setAttribute(\"role\", \"dialog\");\n currentTooltipPosition = this._introItems[this._currentStep].position; // Floating is always valid, no point in calculating\n\n if (currentTooltipPosition !== \"floating\" && this._options.autoPosition) {\n currentTooltipPosition = _determineAutoPosition.call(this, targetElement, tooltipLayer, currentTooltipPosition);\n }\n\n var tooltipLayerStyleLeft;\n targetOffset = getOffset(targetElement);\n tooltipOffset = getOffset(tooltipLayer);\n windowSize = getWinSize();\n addClass(tooltipLayer, \"introjs-\".concat(currentTooltipPosition));\n\n switch (currentTooltipPosition) {\n case \"top-right-aligned\":\n arrowLayer.className = \"introjs-arrow bottom-right\";\n var tooltipLayerStyleRight = 0;\n checkLeft(targetOffset, tooltipLayerStyleRight, tooltipOffset, tooltipLayer);\n tooltipLayer.style.bottom = \"\".concat(targetOffset.height + 20, \"px\");\n break;\n\n case \"top-middle-aligned\":\n arrowLayer.className = \"introjs-arrow bottom-middle\";\n var tooltipLayerStyleLeftRight = targetOffset.width / 2 - tooltipOffset.width / 2; // a fix for middle aligned hints\n\n if (hintMode) {\n tooltipLayerStyleLeftRight += 5;\n }\n\n if (checkLeft(targetOffset, tooltipLayerStyleLeftRight, tooltipOffset, tooltipLayer)) {\n tooltipLayer.style.right = null;\n checkRight(targetOffset, tooltipLayerStyleLeftRight, tooltipOffset, windowSize, tooltipLayer);\n }\n\n tooltipLayer.style.bottom = \"\".concat(targetOffset.height + 20, \"px\");\n break;\n\n case \"top-left-aligned\": // top-left-aligned is the same as the default top\n\n case \"top\":\n arrowLayer.className = \"introjs-arrow bottom\";\n tooltipLayerStyleLeft = hintMode ? 0 : 15;\n checkRight(targetOffset, tooltipLayerStyleLeft, tooltipOffset, windowSize, tooltipLayer);\n tooltipLayer.style.bottom = \"\".concat(targetOffset.height + 20, \"px\");\n break;\n\n case \"right\":\n tooltipLayer.style.left = \"\".concat(targetOffset.width + 20, \"px\");\n\n if (targetOffset.top + tooltipOffset.height > windowSize.height) {\n // In this case, right would have fallen below the bottom of the screen.\n // Modify so that the bottom of the tooltip connects with the target\n arrowLayer.className = \"introjs-arrow left-bottom\";\n tooltipLayer.style.top = \"-\".concat(tooltipOffset.height - targetOffset.height - 20, \"px\");\n } else {\n arrowLayer.className = \"introjs-arrow left\";\n }\n\n break;\n\n case \"left\":\n if (!hintMode && this._options.showStepNumbers === true) {\n tooltipLayer.style.top = \"15px\";\n }\n\n if (targetOffset.top + tooltipOffset.height > windowSize.height) {\n // In this case, left would have fallen below the bottom of the screen.\n // Modify so that the bottom of the tooltip connects with the target\n tooltipLayer.style.top = \"-\".concat(tooltipOffset.height - targetOffset.height - 20, \"px\");\n arrowLayer.className = \"introjs-arrow right-bottom\";\n } else {\n arrowLayer.className = \"introjs-arrow right\";\n }\n\n tooltipLayer.style.right = \"\".concat(targetOffset.width + 20, \"px\");\n break;\n\n case \"floating\":\n arrowLayer.style.display = \"none\"; //we have to adjust the top and left of layer manually for intro items without element\n\n tooltipLayer.style.left = \"50%\";\n tooltipLayer.style.top = \"50%\";\n tooltipLayer.style.marginLeft = \"-\".concat(tooltipOffset.width / 2, \"px\");\n tooltipLayer.style.marginTop = \"-\".concat(tooltipOffset.height / 2, \"px\");\n break;\n\n case \"bottom-right-aligned\":\n arrowLayer.className = \"introjs-arrow top-right\";\n tooltipLayerStyleRight = 0;\n checkLeft(targetOffset, tooltipLayerStyleRight, tooltipOffset, tooltipLayer);\n tooltipLayer.style.top = \"\".concat(targetOffset.height + 20, \"px\");\n break;\n\n case \"bottom-middle-aligned\":\n arrowLayer.className = \"introjs-arrow top-middle\";\n tooltipLayerStyleLeftRight = targetOffset.width / 2 - tooltipOffset.width / 2; // a fix for middle aligned hints\n\n if (hintMode) {\n tooltipLayerStyleLeftRight += 5;\n }\n\n if (checkLeft(targetOffset, tooltipLayerStyleLeftRight, tooltipOffset, tooltipLayer)) {\n tooltipLayer.style.right = null;\n checkRight(targetOffset, tooltipLayerStyleLeftRight, tooltipOffset, windowSize, tooltipLayer);\n }\n\n tooltipLayer.style.top = \"\".concat(targetOffset.height + 20, \"px\");\n break;\n // case 'bottom-left-aligned':\n // Bottom-left-aligned is the same as the default bottom\n // case 'bottom':\n // Bottom going to follow the default behavior\n\n default:\n arrowLayer.className = \"introjs-arrow top\";\n tooltipLayerStyleLeft = 0;\n checkRight(targetOffset, tooltipLayerStyleLeft, tooltipOffset, windowSize, tooltipLayer);\n tooltipLayer.style.top = \"\".concat(targetOffset.height + 20, \"px\");\n }\n }\n /**\n * To remove all show element(s)\n *\n * @api private\n * @method _removeShowElement\n */\n\n\n function removeShowElement() {\n var elms = document.querySelectorAll(\".introjs-showElement\");\n forEach(elms, function (elm) {\n removeClass(elm, /introjs-[a-zA-Z]+/g);\n });\n }\n\n function _createElement(tagname, attrs) {\n var element = document.createElement(tagname);\n attrs = attrs || {}; // regex for matching attributes that need to be set with setAttribute\n\n var setAttRegex = /^(?:role|data-|aria-)/;\n\n for (var k in attrs) {\n var v = attrs[k];\n\n if (k === \"style\") {\n setStyle(element, v);\n } else if (k.match(setAttRegex)) {\n element.setAttribute(k, v);\n } else {\n element[k] = v;\n }\n }\n\n return element;\n }\n /**\n * Appends `element` to `parentElement`\n *\n * @param {Element} parentElement\n * @param {Element} element\n * @param {Boolean} [animate=false]\n */\n\n\n function appendChild(parentElement, element, animate) {\n if (animate) {\n var existingOpacity = element.style.opacity || \"1\";\n setStyle(element, {\n opacity: \"0\"\n });\n window.setTimeout(function () {\n setStyle(element, {\n opacity: existingOpacity\n });\n }, 10);\n }\n\n parentElement.appendChild(element);\n }\n /**\n * Gets the current progress percentage\n *\n * @api private\n * @method _getProgress\n * @returns current progress percentage\n */\n\n\n function _getProgress() {\n // Steps are 0 indexed\n var currentStep = parseInt(this._currentStep + 1, 10);\n return currentStep / this._introItems.length * 100;\n }\n /**\n * Add disableinteraction layer and adjust the size and position of the layer\n *\n * @api private\n * @method _disableInteraction\n */\n\n\n function _disableInteraction() {\n var disableInteractionLayer = document.querySelector(\".introjs-disableInteraction\");\n\n if (disableInteractionLayer === null) {\n disableInteractionLayer = _createElement(\"div\", {\n className: \"introjs-disableInteraction\"\n });\n\n this._targetElement.appendChild(disableInteractionLayer);\n }\n\n setHelperLayerPosition.call(this, disableInteractionLayer);\n }\n /**\n * Show an element on the page\n *\n * @api private\n * @method _showElement\n * @param {Object} targetElement\n */\n\n\n function _showElement(targetElement) {\n var _this = this;\n\n if (typeof this._introChangeCallback !== \"undefined\") {\n this._introChangeCallback.call(this, targetElement.element);\n }\n\n var self = this;\n var oldHelperLayer = document.querySelector(\".introjs-helperLayer\");\n var oldReferenceLayer = document.querySelector(\".introjs-tooltipReferenceLayer\");\n var highlightClass = \"introjs-helperLayer\";\n var nextTooltipButton;\n var prevTooltipButton;\n var skipTooltipButton;\n\n if (typeof targetElement.highlightClass === \"string\") {\n highlightClass += \" \".concat(targetElement.highlightClass);\n } //check for options highlight class\n\n\n if (typeof this._options.highlightClass === \"string\") {\n highlightClass += \" \".concat(this._options.highlightClass);\n }\n\n if (oldHelperLayer !== null) {\n var oldHelperNumberLayer = oldReferenceLayer.querySelector(\".introjs-helperNumberLayer\");\n var oldtooltipLayer = oldReferenceLayer.querySelector(\".introjs-tooltiptext\");\n var oldTooltipTitleLayer = oldReferenceLayer.querySelector(\".introjs-tooltip-title\");\n var oldArrowLayer = oldReferenceLayer.querySelector(\".introjs-arrow\");\n var oldtooltipContainer = oldReferenceLayer.querySelector(\".introjs-tooltip\");\n skipTooltipButton = oldReferenceLayer.querySelector(\".introjs-skipbutton\");\n prevTooltipButton = oldReferenceLayer.querySelector(\".introjs-prevbutton\");\n nextTooltipButton = oldReferenceLayer.querySelector(\".introjs-nextbutton\"); //update or reset the helper highlight class\n\n oldHelperLayer.className = highlightClass; //hide the tooltip\n\n oldtooltipContainer.style.opacity = 0;\n oldtooltipContainer.style.display = \"none\"; // if the target element is within a scrollable element\n\n scrollParentToElement.call(self, targetElement); // set new position to helper layer\n\n setHelperLayerPosition.call(self, oldHelperLayer);\n setHelperLayerPosition.call(self, oldReferenceLayer); //remove old classes if the element still exist\n\n removeShowElement(); //we should wait until the CSS3 transition is competed (it's 0.3 sec) to prevent incorrect `height` and `width` calculation\n\n if (self._lastShowElementTimer) {\n window.clearTimeout(self._lastShowElementTimer);\n }\n\n self._lastShowElementTimer = window.setTimeout(function () {\n // set current step to the label\n if (oldHelperNumberLayer !== null) {\n oldHelperNumberLayer.innerHTML = \"\".concat(targetElement.step, \" of \").concat(_this._introItems.length);\n } // set current tooltip text\n\n\n oldtooltipLayer.innerHTML = targetElement.intro; // set current tooltip title\n\n oldTooltipTitleLayer.innerHTML = targetElement.title; //set the tooltip position\n\n oldtooltipContainer.style.display = \"block\";\n placeTooltip.call(self, targetElement.element, oldtooltipContainer, oldArrowLayer); //change active bullet\n\n if (self._options.showBullets) {\n oldReferenceLayer.querySelector(\".introjs-bullets li > a.active\").className = \"\";\n oldReferenceLayer.querySelector(\".introjs-bullets li > a[data-stepnumber=\\\"\".concat(targetElement.step, \"\\\"]\")).className = \"active\";\n }\n\n oldReferenceLayer.querySelector(\".introjs-progress .introjs-progressbar\").style.cssText = \"width:\".concat(_getProgress.call(self), \"%;\");\n oldReferenceLayer.querySelector(\".introjs-progress .introjs-progressbar\").setAttribute(\"aria-valuenow\", _getProgress.call(self)); //show the tooltip\n\n oldtooltipContainer.style.opacity = 1; //reset button focus\n\n if (typeof nextTooltipButton !== \"undefined\" && nextTooltipButton !== null && /introjs-donebutton/gi.test(nextTooltipButton.className)) {\n // skip button is now \"done\" button\n nextTooltipButton.focus();\n } else if (typeof nextTooltipButton !== \"undefined\" && nextTooltipButton !== null) {\n //still in the tour, focus on next\n nextTooltipButton.focus();\n } // change the scroll of the window, if needed\n\n\n scrollTo.call(self, targetElement.scrollTo, targetElement, oldtooltipLayer);\n }, 350); // end of old element if-else condition\n } else {\n var helperLayer = _createElement(\"div\", {\n className: highlightClass\n });\n\n var referenceLayer = _createElement(\"div\", {\n className: \"introjs-tooltipReferenceLayer\"\n });\n\n var arrowLayer = _createElement(\"div\", {\n className: \"introjs-arrow\"\n });\n\n var tooltipLayer = _createElement(\"div\", {\n className: \"introjs-tooltip\"\n });\n\n var tooltipTextLayer = _createElement(\"div\", {\n className: \"introjs-tooltiptext\"\n });\n\n var tooltipHeaderLayer = _createElement(\"div\", {\n className: \"introjs-tooltip-header\"\n });\n\n var tooltipTitleLayer = _createElement(\"h1\", {\n className: \"introjs-tooltip-title\"\n });\n\n var bulletsLayer = _createElement(\"div\", {\n className: \"introjs-bullets\"\n });\n\n var progressLayer = _createElement(\"div\");\n\n var buttonsLayer = _createElement(\"div\");\n\n setStyle(helperLayer, {\n \"box-shadow\": \"0 0 1px 2px rgba(33, 33, 33, 0.8), rgba(33, 33, 33, \".concat(self._options.overlayOpacity.toString(), \") 0 0 0 5000px\")\n }); // target is within a scrollable element\n\n scrollParentToElement.call(self, targetElement); //set new position to helper layer\n\n setHelperLayerPosition.call(self, helperLayer);\n setHelperLayerPosition.call(self, referenceLayer); //add helper layer to target element\n\n appendChild(this._targetElement, helperLayer, true);\n appendChild(this._targetElement, referenceLayer);\n tooltipTextLayer.innerHTML = targetElement.intro;\n tooltipTitleLayer.innerHTML = targetElement.title;\n\n if (this._options.showBullets === false) {\n bulletsLayer.style.display = \"none\";\n }\n\n var ulContainer = _createElement(\"ul\");\n\n ulContainer.setAttribute(\"role\", \"tablist\");\n\n var anchorClick = function anchorClick() {\n self.goToStep(this.getAttribute(\"data-stepnumber\"));\n };\n\n forEach(this._introItems, function (_ref, i) {\n var step = _ref.step;\n\n var innerLi = _createElement(\"li\");\n\n var anchorLink = _createElement(\"a\");\n\n innerLi.setAttribute(\"role\", \"presentation\");\n anchorLink.setAttribute(\"role\", \"tab\");\n anchorLink.onclick = anchorClick;\n\n if (i === targetElement.step - 1) {\n anchorLink.className = \"active\";\n }\n\n setAnchorAsButton(anchorLink);\n anchorLink.innerHTML = \" \";\n anchorLink.setAttribute(\"data-stepnumber\", step);\n innerLi.appendChild(anchorLink);\n ulContainer.appendChild(innerLi);\n });\n bulletsLayer.appendChild(ulContainer);\n progressLayer.className = \"introjs-progress\";\n\n if (this._options.showProgress === false) {\n progressLayer.style.display = \"none\";\n }\n\n var progressBar = _createElement(\"div\", {\n className: \"introjs-progressbar\"\n });\n\n if (this._options.progressBarAdditionalClass) {\n progressBar.className += \" \" + this._options.progressBarAdditionalClass;\n }\n\n progressBar.setAttribute(\"role\", \"progress\");\n progressBar.setAttribute(\"aria-valuemin\", 0);\n progressBar.setAttribute(\"aria-valuemax\", 100);\n progressBar.setAttribute(\"aria-valuenow\", _getProgress.call(this));\n progressBar.style.cssText = \"width:\".concat(_getProgress.call(this), \"%;\");\n progressLayer.appendChild(progressBar);\n buttonsLayer.className = \"introjs-tooltipbuttons\";\n\n if (this._options.showButtons === false) {\n buttonsLayer.style.display = \"none\";\n }\n\n tooltipHeaderLayer.appendChild(tooltipTitleLayer);\n tooltipLayer.appendChild(tooltipHeaderLayer);\n tooltipLayer.appendChild(tooltipTextLayer);\n tooltipLayer.appendChild(bulletsLayer);\n tooltipLayer.appendChild(progressLayer); // add helper layer number\n\n var helperNumberLayer = _createElement(\"div\");\n\n if (this._options.showStepNumbers === true) {\n helperNumberLayer.className = \"introjs-helperNumberLayer\";\n helperNumberLayer.innerHTML = \"\".concat(targetElement.step, \" of \").concat(this._introItems.length);\n tooltipLayer.appendChild(helperNumberLayer);\n }\n\n tooltipLayer.appendChild(arrowLayer);\n referenceLayer.appendChild(tooltipLayer); //next button\n\n nextTooltipButton = _createElement(\"a\");\n\n nextTooltipButton.onclick = function () {\n if (self._introItems.length - 1 !== self._currentStep) {\n nextStep.call(self);\n } else if (/introjs-donebutton/gi.test(nextTooltipButton.className)) {\n if (typeof self._introCompleteCallback === \"function\") {\n self._introCompleteCallback.call(self);\n }\n\n exitIntro.call(self, self._targetElement);\n }\n };\n\n setAnchorAsButton(nextTooltipButton);\n nextTooltipButton.innerHTML = this._options.nextLabel; //previous button\n\n prevTooltipButton = _createElement(\"a\");\n\n prevTooltipButton.onclick = function () {\n if (self._currentStep !== 0) {\n previousStep.call(self);\n }\n };\n\n setAnchorAsButton(prevTooltipButton);\n prevTooltipButton.innerHTML = this._options.prevLabel; //skip button\n\n skipTooltipButton = _createElement(\"a\", {\n className: \"introjs-skipbutton\"\n });\n setAnchorAsButton(skipTooltipButton);\n skipTooltipButton.innerHTML = this._options.skipLabel;\n\n skipTooltipButton.onclick = function () {\n if (self._introItems.length - 1 === self._currentStep && typeof self._introCompleteCallback === \"function\") {\n self._introCompleteCallback.call(self);\n }\n\n if (typeof self._introSkipCallback === \"function\") {\n self._introSkipCallback.call(self);\n }\n\n exitIntro.call(self, self._targetElement);\n };\n\n tooltipHeaderLayer.appendChild(skipTooltipButton); //in order to prevent displaying previous button always\n\n if (this._introItems.length > 1) {\n buttonsLayer.appendChild(prevTooltipButton);\n } // we always need the next button because this\n // button changes to \"Done\" in the last step of the tour\n\n\n buttonsLayer.appendChild(nextTooltipButton);\n tooltipLayer.appendChild(buttonsLayer); //set proper position\n\n placeTooltip.call(self, targetElement.element, tooltipLayer, arrowLayer); // change the scroll of the window, if needed\n\n scrollTo.call(this, targetElement.scrollTo, targetElement, tooltipLayer); //end of new element if-else condition\n } // removing previous disable interaction layer\n\n\n var disableInteractionLayer = self._targetElement.querySelector(\".introjs-disableInteraction\");\n\n if (disableInteractionLayer) {\n disableInteractionLayer.parentNode.removeChild(disableInteractionLayer);\n } //disable interaction\n\n\n if (targetElement.disableInteraction) {\n _disableInteraction.call(self);\n } // when it's the first step of tour\n\n\n if (this._currentStep === 0 && this._introItems.length > 1) {\n if (typeof nextTooltipButton !== \"undefined\" && nextTooltipButton !== null) {\n nextTooltipButton.className = \"\".concat(this._options.buttonClass, \" introjs-nextbutton\");\n nextTooltipButton.innerHTML = this._options.nextLabel;\n }\n\n if (this._options.hidePrev === true) {\n if (typeof prevTooltipButton !== \"undefined\" && prevTooltipButton !== null) {\n prevTooltipButton.className = \"\".concat(this._options.buttonClass, \" introjs-prevbutton introjs-hidden\");\n }\n\n if (typeof nextTooltipButton !== \"undefined\" && nextTooltipButton !== null) {\n addClass(nextTooltipButton, \"introjs-fullbutton\");\n }\n } else {\n if (typeof prevTooltipButton !== \"undefined\" && prevTooltipButton !== null) {\n prevTooltipButton.className = \"\".concat(this._options.buttonClass, \" introjs-prevbutton introjs-disabled\");\n }\n }\n } else if (this._introItems.length - 1 === this._currentStep || this._introItems.length === 1) {\n // last step of tour\n if (typeof prevTooltipButton !== \"undefined\" && prevTooltipButton !== null) {\n prevTooltipButton.className = \"\".concat(this._options.buttonClass, \" introjs-prevbutton\");\n }\n\n if (this._options.hideNext === true) {\n if (typeof nextTooltipButton !== \"undefined\" && nextTooltipButton !== null) {\n nextTooltipButton.className = \"\".concat(this._options.buttonClass, \" introjs-nextbutton introjs-hidden\");\n }\n\n if (typeof prevTooltipButton !== \"undefined\" && prevTooltipButton !== null) {\n addClass(prevTooltipButton, \"introjs-fullbutton\");\n }\n } else {\n if (typeof nextTooltipButton !== \"undefined\" && nextTooltipButton !== null) {\n if (this._options.nextToDone === true) {\n nextTooltipButton.innerHTML = this._options.doneLabel;\n addClass(nextTooltipButton, \"\".concat(this._options.buttonClass, \" introjs-nextbutton introjs-donebutton\"));\n } else {\n nextTooltipButton.className = \"\".concat(this._options.buttonClass, \" introjs-nextbutton introjs-disabled\");\n }\n }\n }\n } else {\n // steps between start and end\n if (typeof prevTooltipButton !== \"undefined\" && prevTooltipButton !== null) {\n prevTooltipButton.className = \"\".concat(this._options.buttonClass, \" introjs-prevbutton\");\n }\n\n if (typeof nextTooltipButton !== \"undefined\" && nextTooltipButton !== null) {\n nextTooltipButton.className = \"\".concat(this._options.buttonClass, \" introjs-nextbutton\");\n nextTooltipButton.innerHTML = this._options.nextLabel;\n }\n }\n\n if (typeof prevTooltipButton !== \"undefined\" && prevTooltipButton !== null) {\n prevTooltipButton.setAttribute(\"role\", \"button\");\n }\n\n if (typeof nextTooltipButton !== \"undefined\" && nextTooltipButton !== null) {\n nextTooltipButton.setAttribute(\"role\", \"button\");\n }\n\n if (typeof skipTooltipButton !== \"undefined\" && skipTooltipButton !== null) {\n skipTooltipButton.setAttribute(\"role\", \"button\");\n } //Set focus on \"next\" button, so that hitting Enter always moves you onto the next step\n\n\n if (typeof nextTooltipButton !== \"undefined\" && nextTooltipButton !== null) {\n nextTooltipButton.focus();\n }\n\n setShowElement(targetElement);\n\n if (typeof this._introAfterChangeCallback !== \"undefined\") {\n this._introAfterChangeCallback.call(this, targetElement.element);\n }\n }\n /**\n * Go to specific step of introduction\n *\n * @api private\n * @method _goToStep\n */\n\n\n function goToStep(step) {\n //because steps starts with zero\n this._currentStep = step - 2;\n\n if (typeof this._introItems !== \"undefined\") {\n nextStep.call(this);\n }\n }\n /**\n * Go to the specific step of introduction with the explicit [data-step] number\n *\n * @api private\n * @method _goToStepNumber\n */\n\n\n function goToStepNumber(step) {\n this._currentStepNumber = step;\n\n if (typeof this._introItems !== \"undefined\") {\n nextStep.call(this);\n }\n }\n /**\n * Go to next step on intro\n *\n * @api private\n * @method _nextStep\n */\n\n\n function nextStep() {\n var _this = this;\n\n this._direction = \"forward\";\n\n if (typeof this._currentStepNumber !== \"undefined\") {\n forEach(this._introItems, function (_ref, i) {\n var step = _ref.step;\n\n if (step === _this._currentStepNumber) {\n _this._currentStep = i - 1;\n _this._currentStepNumber = undefined;\n }\n });\n }\n\n if (typeof this._currentStep === \"undefined\") {\n this._currentStep = 0;\n } else {\n ++this._currentStep;\n }\n\n var nextStep = this._introItems[this._currentStep];\n var continueStep = true;\n\n if (typeof this._introBeforeChangeCallback !== \"undefined\") {\n continueStep = this._introBeforeChangeCallback.call(this, nextStep && nextStep.element);\n } // if `onbeforechange` returned `false`, stop displaying the element\n\n\n if (continueStep === false) {\n --this._currentStep;\n return false;\n }\n\n if (this._introItems.length <= this._currentStep) {\n //end of the intro\n //check if any callback is defined\n if (typeof this._introCompleteCallback === \"function\") {\n this._introCompleteCallback.call(this);\n }\n\n exitIntro.call(this, this._targetElement);\n return;\n }\n\n _showElement.call(this, nextStep);\n }\n /**\n * Go to previous step on intro\n *\n * @api private\n * @method _previousStep\n */\n\n\n function previousStep() {\n this._direction = \"backward\";\n\n if (this._currentStep === 0) {\n return false;\n }\n\n --this._currentStep;\n var nextStep = this._introItems[this._currentStep];\n var continueStep = true;\n\n if (typeof this._introBeforeChangeCallback !== \"undefined\") {\n continueStep = this._introBeforeChangeCallback.call(this, nextStep && nextStep.element);\n } // if `onbeforechange` returned `false`, stop displaying the element\n\n\n if (continueStep === false) {\n ++this._currentStep;\n return false;\n }\n\n _showElement.call(this, nextStep);\n }\n /**\n * Returns the current step of the intro\n *\n * @returns {number | boolean}\n */\n\n\n function currentStep() {\n return this._currentStep;\n }\n /**\n * on keyCode:\n * https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode\n * This feature has been removed from the Web standards.\n * Though some browsers may still support it, it is in\n * the process of being dropped.\n * Instead, you should use KeyboardEvent.code,\n * if it's implemented.\n *\n * jQuery's approach is to test for\n * (1) e.which, then\n * (2) e.charCode, then\n * (3) e.keyCode\n * https://github.com/jquery/jquery/blob/a6b0705294d336ae2f63f7276de0da1195495363/src/event.js#L638\n *\n * @param type var\n * @return type\n */\n\n\n function onKeyDown(e) {\n var code = e.code === undefined ? e.which : e.code; // if e.which is null\n\n if (code === null) {\n code = e.charCode === null ? e.keyCode : e.charCode;\n }\n\n if ((code === \"Escape\" || code === 27) && this._options.exitOnEsc === true) {\n //escape key pressed, exit the intro\n //check if exit callback is defined\n exitIntro.call(this, this._targetElement);\n } else if (code === \"ArrowLeft\" || code === 37) {\n //left arrow\n previousStep.call(this);\n } else if (code === \"ArrowRight\" || code === 39) {\n //right arrow\n nextStep.call(this);\n } else if (code === \"Enter\" || code === \"NumpadEnter\" || code === 13) {\n //srcElement === ie\n var target = e.target || e.srcElement;\n\n if (target && target.className.match(\"introjs-prevbutton\")) {\n //user hit enter while focusing on previous button\n previousStep.call(this);\n } else if (target && target.className.match(\"introjs-skipbutton\")) {\n //user hit enter while focusing on skip button\n if (this._introItems.length - 1 === this._currentStep && typeof this._introCompleteCallback === \"function\") {\n this._introCompleteCallback.call(this);\n }\n\n exitIntro.call(this, this._targetElement);\n } else if (target && target.getAttribute(\"data-stepnumber\")) {\n // user hit enter while focusing on step bullet\n target.click();\n } else {\n //default behavior for responding to enter\n nextStep.call(this);\n } //prevent default behaviour on hitting Enter, to prevent steps being skipped in some browsers\n\n\n if (e.preventDefault) {\n e.preventDefault();\n } else {\n e.returnValue = false;\n }\n }\n }\n /*\n * makes a copy of the object\n * @api private\n * @method _cloneObject\n */\n\n\n function cloneObject(object) {\n if (object === null || _typeof(object) !== \"object\" || typeof object.nodeType !== \"undefined\") {\n return object;\n }\n\n var temp = {};\n\n for (var key in object) {\n if (typeof window.jQuery !== \"undefined\" && object[key] instanceof window.jQuery) {\n temp[key] = object[key];\n } else {\n temp[key] = cloneObject(object[key]);\n }\n }\n\n return temp;\n }\n /**\n * Get a queryselector within the hint wrapper\n *\n * @param {String} selector\n * @return {NodeList|Array}\n */\n\n\n function hintQuerySelectorAll(selector) {\n var hintsWrapper = document.querySelector(\".introjs-hints\");\n return hintsWrapper ? hintsWrapper.querySelectorAll(selector) : [];\n }\n /**\n * Hide a hint\n *\n * @api private\n * @method hideHint\n */\n\n\n function hideHint(stepId) {\n var hint = hintQuerySelectorAll(\".introjs-hint[data-step=\\\"\".concat(stepId, \"\\\"]\"))[0];\n removeHintTooltip.call(this);\n\n if (hint) {\n addClass(hint, \"introjs-hidehint\");\n } // call the callback function (if any)\n\n\n if (typeof this._hintCloseCallback !== \"undefined\") {\n this._hintCloseCallback.call(this, stepId);\n }\n }\n /**\n * Hide all hints\n *\n * @api private\n * @method hideHints\n */\n\n\n function hideHints() {\n var _this = this;\n\n var hints = hintQuerySelectorAll(\".introjs-hint\");\n forEach(hints, function (hint) {\n hideHint.call(_this, hint.getAttribute(\"data-step\"));\n });\n }\n /**\n * Show all hints\n *\n * @api private\n * @method _showHints\n */\n\n\n function showHints() {\n var _this2 = this;\n\n var hints = hintQuerySelectorAll(\".introjs-hint\");\n\n if (hints && hints.length) {\n forEach(hints, function (hint) {\n showHint.call(_this2, hint.getAttribute(\"data-step\"));\n });\n } else {\n populateHints.call(this, this._targetElement);\n }\n }\n /**\n * Show a hint\n *\n * @api private\n * @method showHint\n */\n\n\n function showHint(stepId) {\n var hint = hintQuerySelectorAll(\".introjs-hint[data-step=\\\"\".concat(stepId, \"\\\"]\"))[0];\n\n if (hint) {\n removeClass(hint, /introjs-hidehint/g);\n }\n }\n /**\n * Removes all hint elements on the page\n * Useful when you want to destroy the elements and add them again (e.g. a modal or popup)\n *\n * @api private\n * @method removeHints\n */\n\n\n function removeHints() {\n var _this3 = this;\n\n var hints = hintQuerySelectorAll(\".introjs-hint\");\n forEach(hints, function (hint) {\n removeHint.call(_this3, hint.getAttribute(\"data-step\"));\n });\n }\n /**\n * Remove one single hint element from the page\n * Useful when you want to destroy the element and add them again (e.g. a modal or popup)\n * Use removeHints if you want to remove all elements.\n *\n * @api private\n * @method removeHint\n */\n\n\n function removeHint(stepId) {\n var hint = hintQuerySelectorAll(\".introjs-hint[data-step=\\\"\".concat(stepId, \"\\\"]\"))[0];\n\n if (hint) {\n hint.parentNode.removeChild(hint);\n }\n }\n /**\n * Add all available hints to the page\n *\n * @api private\n * @method addHints\n */\n\n\n function addHints() {\n var _this4 = this;\n\n var self = this;\n var hintsWrapper = document.querySelector(\".introjs-hints\");\n\n if (hintsWrapper === null) {\n hintsWrapper = _createElement(\"div\", {\n className: \"introjs-hints\"\n });\n }\n /**\n * Returns an event handler unique to the hint iteration\n *\n * @param {Integer} i\n * @return {Function}\n */\n\n\n var getHintClick = function getHintClick(i) {\n return function (e) {\n var evt = e ? e : window.event;\n\n if (evt.stopPropagation) {\n evt.stopPropagation();\n }\n\n if (evt.cancelBubble !== null) {\n evt.cancelBubble = true;\n }\n\n showHintDialog.call(self, i);\n };\n };\n\n forEach(this._introItems, function (item, i) {\n // avoid append a hint twice\n if (document.querySelector(\".introjs-hint[data-step=\\\"\".concat(i, \"\\\"]\"))) {\n return;\n }\n\n var hint = _createElement(\"a\", {\n className: \"introjs-hint\"\n });\n\n setAnchorAsButton(hint);\n hint.onclick = getHintClick(i);\n\n if (!item.hintAnimation) {\n addClass(hint, \"introjs-hint-no-anim\");\n } // hint's position should be fixed if the target element's position is fixed\n\n\n if (isFixed(item.element)) {\n addClass(hint, \"introjs-fixedhint\");\n }\n\n var hintDot = _createElement(\"div\", {\n className: \"introjs-hint-dot\"\n });\n\n var hintPulse = _createElement(\"div\", {\n className: \"introjs-hint-pulse\"\n });\n\n hint.appendChild(hintDot);\n hint.appendChild(hintPulse);\n hint.setAttribute(\"data-step\", i); // we swap the hint element with target element\n // because _setHelperLayerPosition uses `element` property\n\n item.targetElement = item.element;\n item.element = hint; // align the hint position\n\n alignHintPosition.call(_this4, item.hintPosition, hint, item.targetElement);\n hintsWrapper.appendChild(hint);\n }); // adding the hints wrapper\n\n document.body.appendChild(hintsWrapper); // call the callback function (if any)\n\n if (typeof this._hintsAddedCallback !== \"undefined\") {\n this._hintsAddedCallback.call(this);\n }\n }\n /**\n * Aligns hint position\n *\n * @api private\n * @method alignHintPosition\n * @param {String} position\n * @param {Object} hint\n * @param {Object} element\n */\n\n\n function alignHintPosition(position, _ref, element) {\n var style = _ref.style; // get/calculate offset of target element\n\n var offset = getOffset.call(this, element);\n var iconWidth = 20;\n var iconHeight = 20; // align the hint element\n\n switch (position) {\n default:\n case \"top-left\":\n style.left = \"\".concat(offset.left, \"px\");\n style.top = \"\".concat(offset.top, \"px\");\n break;\n\n case \"top-right\":\n style.left = \"\".concat(offset.left + offset.width - iconWidth, \"px\");\n style.top = \"\".concat(offset.top, \"px\");\n break;\n\n case \"bottom-left\":\n style.left = \"\".concat(offset.left, \"px\");\n style.top = \"\".concat(offset.top + offset.height - iconHeight, \"px\");\n break;\n\n case \"bottom-right\":\n style.left = \"\".concat(offset.left + offset.width - iconWidth, \"px\");\n style.top = \"\".concat(offset.top + offset.height - iconHeight, \"px\");\n break;\n\n case \"middle-left\":\n style.left = \"\".concat(offset.left, \"px\");\n style.top = \"\".concat(offset.top + (offset.height - iconHeight) / 2, \"px\");\n break;\n\n case \"middle-right\":\n style.left = \"\".concat(offset.left + offset.width - iconWidth, \"px\");\n style.top = \"\".concat(offset.top + (offset.height - iconHeight) / 2, \"px\");\n break;\n\n case \"middle-middle\":\n style.left = \"\".concat(offset.left + (offset.width - iconWidth) / 2, \"px\");\n style.top = \"\".concat(offset.top + (offset.height - iconHeight) / 2, \"px\");\n break;\n\n case \"bottom-middle\":\n style.left = \"\".concat(offset.left + (offset.width - iconWidth) / 2, \"px\");\n style.top = \"\".concat(offset.top + offset.height - iconHeight, \"px\");\n break;\n\n case \"top-middle\":\n style.left = \"\".concat(offset.left + (offset.width - iconWidth) / 2, \"px\");\n style.top = \"\".concat(offset.top, \"px\");\n break;\n }\n }\n /**\n * Triggers when user clicks on the hint element\n *\n * @api private\n * @method _showHintDialog\n * @param {Number} stepId\n */\n\n\n function showHintDialog(stepId) {\n var hintElement = document.querySelector(\".introjs-hint[data-step=\\\"\".concat(stepId, \"\\\"]\"));\n var item = this._introItems[stepId]; // call the callback function (if any)\n\n if (typeof this._hintClickCallback !== \"undefined\") {\n this._hintClickCallback.call(this, hintElement, item, stepId);\n } // remove all open tooltips\n\n\n var removedStep = removeHintTooltip.call(this); // to toggle the tooltip\n\n if (parseInt(removedStep, 10) === stepId) {\n return;\n }\n\n var tooltipLayer = _createElement(\"div\", {\n className: \"introjs-tooltip\"\n });\n\n var tooltipTextLayer = _createElement(\"div\");\n\n var arrowLayer = _createElement(\"div\");\n\n var referenceLayer = _createElement(\"div\");\n\n tooltipLayer.onclick = function (e) {\n //IE9 & Other Browsers\n if (e.stopPropagation) {\n e.stopPropagation();\n } //IE8 and Lower\n else {\n e.cancelBubble = true;\n }\n };\n\n tooltipTextLayer.className = \"introjs-tooltiptext\";\n\n var tooltipWrapper = _createElement(\"p\");\n\n tooltipWrapper.innerHTML = item.hint;\n\n var closeButton = _createElement(\"a\");\n\n closeButton.className = this._options.buttonClass;\n closeButton.setAttribute(\"role\", \"button\");\n closeButton.innerHTML = this._options.hintButtonLabel;\n closeButton.onclick = hideHint.bind(this, stepId);\n tooltipTextLayer.appendChild(tooltipWrapper);\n tooltipTextLayer.appendChild(closeButton);\n arrowLayer.className = \"introjs-arrow\";\n tooltipLayer.appendChild(arrowLayer);\n tooltipLayer.appendChild(tooltipTextLayer); // set current step for _placeTooltip function\n\n this._currentStep = hintElement.getAttribute(\"data-step\"); // align reference layer position\n\n referenceLayer.className = \"introjs-tooltipReferenceLayer introjs-hintReference\";\n referenceLayer.setAttribute(\"data-step\", hintElement.getAttribute(\"data-step\"));\n setHelperLayerPosition.call(this, referenceLayer);\n referenceLayer.appendChild(tooltipLayer);\n document.body.appendChild(referenceLayer); //set proper position\n\n placeTooltip.call(this, hintElement, tooltipLayer, arrowLayer, true);\n }\n /**\n * Removes open hint (tooltip hint)\n *\n * @api private\n * @method _removeHintTooltip\n */\n\n\n function removeHintTooltip() {\n var tooltip = document.querySelector(\".introjs-hintReference\");\n\n if (tooltip) {\n var step = tooltip.getAttribute(\"data-step\");\n tooltip.parentNode.removeChild(tooltip);\n return step;\n }\n }\n /**\n * Start parsing hint items\n *\n * @api private\n * @param {Object} targetElm\n * @method _startHint\n */\n\n\n function populateHints(targetElm) {\n var _this5 = this;\n\n this._introItems = [];\n\n if (this._options.hints) {\n forEach(this._options.hints, function (hint) {\n var currentItem = cloneObject(hint);\n\n if (typeof currentItem.element === \"string\") {\n //grab the element with given selector from the page\n currentItem.element = document.querySelector(currentItem.element);\n }\n\n currentItem.hintPosition = currentItem.hintPosition || _this5._options.hintPosition;\n currentItem.hintAnimation = currentItem.hintAnimation || _this5._options.hintAnimation;\n\n if (currentItem.element !== null) {\n _this5._introItems.push(currentItem);\n }\n });\n } else {\n var hints = targetElm.querySelectorAll(\"*[data-hint]\");\n\n if (!hints || !hints.length) {\n return false;\n } //first add intro items with data-step\n\n\n forEach(hints, function (currentElement) {\n // hint animation\n var hintAnimation = currentElement.getAttribute(\"data-hintanimation\");\n\n if (hintAnimation) {\n hintAnimation = hintAnimation === \"true\";\n } else {\n hintAnimation = _this5._options.hintAnimation;\n }\n\n _this5._introItems.push({\n element: currentElement,\n hint: currentElement.getAttribute(\"data-hint\"),\n hintPosition: currentElement.getAttribute(\"data-hintposition\") || _this5._options.hintPosition,\n hintAnimation: hintAnimation,\n tooltipClass: currentElement.getAttribute(\"data-tooltipclass\"),\n position: currentElement.getAttribute(\"data-position\") || _this5._options.tooltipPosition\n });\n });\n }\n\n addHints.call(this);\n /*\n todo:\n these events should be removed at some point\n */\n\n DOMEvent.on(document, \"click\", removeHintTooltip, this, false);\n DOMEvent.on(window, \"resize\", reAlignHints, this, true);\n }\n /**\n * Re-aligns all hint elements\n *\n * @api private\n * @method _reAlignHints\n */\n\n\n function reAlignHints() {\n var _this6 = this;\n\n forEach(this._introItems, function (_ref2) {\n var targetElement = _ref2.targetElement,\n hintPosition = _ref2.hintPosition,\n element = _ref2.element;\n\n if (typeof targetElement === \"undefined\") {\n return;\n }\n\n alignHintPosition.call(_this6, hintPosition, element, targetElement);\n });\n }\n /**\n * Update placement of the intro objects on the screen\n * @api private\n */\n\n\n function refresh() {\n // re-align intros\n setHelperLayerPosition.call(this, document.querySelector(\".introjs-helperLayer\"));\n setHelperLayerPosition.call(this, document.querySelector(\".introjs-tooltipReferenceLayer\"));\n setHelperLayerPosition.call(this, document.querySelector(\".introjs-disableInteraction\")); // re-align tooltip\n\n if (this._currentStep !== undefined && this._currentStep !== null) {\n var oldArrowLayer = document.querySelector(\".introjs-arrow\");\n var oldtooltipContainer = document.querySelector(\".introjs-tooltip\");\n placeTooltip.call(this, this._introItems[this._currentStep].element, oldtooltipContainer, oldArrowLayer);\n } //re-align hints\n\n\n reAlignHints.call(this);\n return this;\n }\n\n function onResize() {\n refresh.call(this);\n }\n /**\n * Removes `element` from `parentElement`\n *\n * @param {Element} element\n * @param {Boolean} [animate=false]\n */\n\n\n function removeChild(element, animate) {\n if (!element || !element.parentElement) return;\n var parentElement = element.parentElement;\n\n if (animate) {\n setStyle(element, {\n opacity: \"0\"\n });\n window.setTimeout(function () {\n parentElement.removeChild(element);\n }, 500);\n } else {\n parentElement.removeChild(element);\n }\n }\n /**\n * Exit from intro\n *\n * @api private\n * @method _exitIntro\n * @param {Object} targetElement\n * @param {Boolean} force - Setting to `true` will skip the result of beforeExit callback\n */\n\n\n function exitIntro(targetElement, force) {\n var continueExit = true; // calling onbeforeexit callback\n //\n // If this callback return `false`, it would halt the process\n\n if (this._introBeforeExitCallback !== undefined) {\n continueExit = this._introBeforeExitCallback.call(this);\n } // skip this check if `force` parameter is `true`\n // otherwise, if `onbeforeexit` returned `false`, don't exit the intro\n\n\n if (!force && continueExit === false) return; // remove overlay layers from the page\n\n var overlayLayers = targetElement.querySelectorAll(\".introjs-overlay\");\n\n if (overlayLayers && overlayLayers.length) {\n forEach(overlayLayers, function (overlayLayer) {\n return removeChild(overlayLayer);\n });\n } //remove all helper layers\n\n\n var helperLayer = targetElement.querySelector(\".introjs-helperLayer\");\n removeChild(helperLayer, true);\n var referenceLayer = targetElement.querySelector(\".introjs-tooltipReferenceLayer\");\n removeChild(referenceLayer); //remove disableInteractionLayer\n\n var disableInteractionLayer = targetElement.querySelector(\".introjs-disableInteraction\");\n removeChild(disableInteractionLayer); //remove intro floating element\n\n var floatingElement = document.querySelector(\".introjsFloatingElement\");\n removeChild(floatingElement);\n removeShowElement(); //clean listeners\n\n DOMEvent.off(window, \"keydown\", onKeyDown, this, true);\n DOMEvent.off(window, \"resize\", onResize, this, true); //check if any callback is defined\n\n if (this._introExitCallback !== undefined) {\n this._introExitCallback.call(this);\n } //set the step to zero\n\n\n this._currentStep = undefined;\n }\n /**\n * Add overlay layer to the page\n *\n * @api private\n * @method _addOverlayLayer\n * @param {Object} targetElm\n */\n\n\n function addOverlayLayer(targetElm) {\n var _this = this;\n\n var overlayLayer = _createElement(\"div\", {\n className: \"introjs-overlay\"\n });\n\n setStyle(overlayLayer, {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n position: \"fixed\"\n });\n targetElm.appendChild(overlayLayer);\n\n if (this._options.exitOnOverlayClick === true) {\n setStyle(overlayLayer, {\n cursor: \"pointer\"\n });\n\n overlayLayer.onclick = function () {\n exitIntro.call(_this, targetElm);\n };\n }\n\n return true;\n }\n /**\n * Initiate a new introduction/guide from an element in the page\n *\n * @api private\n * @method _introForElement\n * @param {Object} targetElm\n * @param {String} group\n * @returns {Boolean} Success or not?\n */\n\n\n function introForElement(targetElm, group) {\n var _this = this;\n\n var allIntroSteps = targetElm.querySelectorAll(\"*[data-intro]\");\n var introItems = [];\n\n if (this._options.steps) {\n //use steps passed programmatically\n forEach(this._options.steps, function (step) {\n var currentItem = cloneObject(step); //set the step\n\n currentItem.step = introItems.length + 1;\n currentItem.title = currentItem.title || \"\"; //use querySelector function only when developer used CSS selector\n\n if (typeof currentItem.element === \"string\") {\n //grab the element with given selector from the page\n currentItem.element = document.querySelector(currentItem.element);\n } //intro without element\n\n\n if (typeof currentItem.element === \"undefined\" || currentItem.element === null) {\n var floatingElementQuery = document.querySelector(\".introjsFloatingElement\");\n\n if (floatingElementQuery === null) {\n floatingElementQuery = _createElement(\"div\", {\n className: \"introjsFloatingElement\"\n });\n document.body.appendChild(floatingElementQuery);\n }\n\n currentItem.element = floatingElementQuery;\n currentItem.position = \"floating\";\n }\n\n currentItem.scrollTo = currentItem.scrollTo || _this._options.scrollTo;\n\n if (typeof currentItem.disableInteraction === \"undefined\") {\n currentItem.disableInteraction = _this._options.disableInteraction;\n }\n\n if (currentItem.element !== null) {\n introItems.push(currentItem);\n }\n });\n } else {\n //use steps from data-* annotations\n var elmsLength = allIntroSteps.length;\n var disableInteraction; //if there's no element to intro\n\n if (elmsLength < 1) {\n return false;\n }\n\n forEach(allIntroSteps, function (currentElement) {\n // PR #80\n // start intro for groups of elements\n if (group && currentElement.getAttribute(\"data-intro-group\") !== group) {\n return;\n } // skip hidden elements\n\n\n if (currentElement.style.display === \"none\") {\n return;\n }\n\n var step = parseInt(currentElement.getAttribute(\"data-step\"), 10);\n\n if (currentElement.hasAttribute(\"data-disable-interaction\")) {\n disableInteraction = !!currentElement.getAttribute(\"data-disable-interaction\");\n } else {\n disableInteraction = _this._options.disableInteraction;\n }\n\n if (step > 0) {\n introItems[step - 1] = {\n element: currentElement,\n title: currentElement.getAttribute(\"data-title\") || \"\",\n intro: currentElement.getAttribute(\"data-intro\"),\n step: parseInt(currentElement.getAttribute(\"data-step\"), 10),\n tooltipClass: currentElement.getAttribute(\"data-tooltipclass\"),\n highlightClass: currentElement.getAttribute(\"data-highlightclass\"),\n position: currentElement.getAttribute(\"data-position\") || _this._options.tooltipPosition,\n scrollTo: currentElement.getAttribute(\"data-scrollto\") || _this._options.scrollTo,\n disableInteraction: disableInteraction\n };\n }\n }); //next add intro items without data-step\n //todo: we need a cleanup here, two loops are redundant\n\n var _nextStep = 0;\n forEach(allIntroSteps, function (currentElement) {\n // PR #80\n // start intro for groups of elements\n if (group && currentElement.getAttribute(\"data-intro-group\") !== group) {\n return;\n }\n\n if (currentElement.getAttribute(\"data-step\") === null) {\n while (true) {\n if (typeof introItems[_nextStep] === \"undefined\") {\n break;\n } else {\n _nextStep++;\n }\n }\n\n if (currentElement.hasAttribute(\"data-disable-interaction\")) {\n disableInteraction = !!currentElement.getAttribute(\"data-disable-interaction\");\n } else {\n disableInteraction = _this._options.disableInteraction;\n }\n\n introItems[_nextStep] = {\n element: currentElement,\n title: currentElement.getAttribute(\"data-title\") || \"\",\n intro: currentElement.getAttribute(\"data-intro\"),\n step: _nextStep + 1,\n tooltipClass: currentElement.getAttribute(\"data-tooltipclass\"),\n highlightClass: currentElement.getAttribute(\"data-highlightclass\"),\n position: currentElement.getAttribute(\"data-position\") || _this._options.tooltipPosition,\n scrollTo: currentElement.getAttribute(\"data-scrollto\") || _this._options.scrollTo,\n disableInteraction: disableInteraction\n };\n }\n });\n } //removing undefined/null elements\n\n\n var tempIntroItems = [];\n\n for (var z = 0; z < introItems.length; z++) {\n if (introItems[z]) {\n // copy non-falsy values to the end of the array\n tempIntroItems.push(introItems[z]);\n }\n }\n\n introItems = tempIntroItems; //Ok, sort all items with given steps\n\n introItems.sort(function (a, b) {\n return a.step - b.step;\n }); //set it to the introJs object\n\n this._introItems = introItems; //add overlay layer to the page\n\n if (addOverlayLayer.call(this, targetElm)) {\n //then, start the show\n nextStep.call(this);\n\n if (this._options.keyboardNavigation) {\n DOMEvent.on(window, \"keydown\", onKeyDown, this, true);\n } //for window resize\n\n\n DOMEvent.on(window, \"resize\", onResize, this, true);\n }\n\n return false;\n }\n\n var version$1 = \"3.4.0\";\n /**\n * IntroJs main class\n *\n * @class IntroJs\n */\n\n function IntroJs(obj) {\n this._targetElement = obj;\n this._introItems = [];\n this._options = {\n /* Next button label in tooltip box */\n nextLabel: \"Next\",\n\n /* Previous button label in tooltip box */\n prevLabel: \"Back\",\n\n /* Skip button label in tooltip box */\n skipLabel: \"×\",\n\n /* Done button label in tooltip box */\n doneLabel: \"Done\",\n\n /* Hide previous button in the first step? Otherwise, it will be disabled button. */\n hidePrev: false,\n\n /* Hide next button in the last step? Otherwise, it will be disabled button (note: this will also hide the \"Done\" button) */\n hideNext: false,\n\n /* Change the Next button to Done in the last step of the intro? otherwise, it will render a disabled button */\n nextToDone: true,\n\n /* Default tooltip box position */\n tooltipPosition: \"bottom\",\n\n /* Next CSS class for tooltip boxes */\n tooltipClass: \"\",\n\n /* CSS class that is added to the helperLayer */\n highlightClass: \"\",\n\n /* Close introduction when pressing Escape button? */\n exitOnEsc: true,\n\n /* Close introduction when clicking on overlay layer? */\n exitOnOverlayClick: true,\n\n /* Show step numbers in introduction? */\n showStepNumbers: false,\n\n /* Let user use keyboard to navigate the tour? */\n keyboardNavigation: true,\n\n /* Show tour control buttons? */\n showButtons: true,\n\n /* Show tour bullets? */\n showBullets: true,\n\n /* Show tour progress? */\n showProgress: false,\n\n /* Scroll to highlighted element? */\n scrollToElement: true,\n\n /*\n * Should we scroll the tooltip or target element?\n *\n * Options are: 'element' or 'tooltip'\n */\n scrollTo: \"element\",\n\n /* Padding to add after scrolling when element is not in the viewport (in pixels) */\n scrollPadding: 30,\n\n /* Set the overlay opacity */\n overlayOpacity: 0.5,\n\n /* To determine the tooltip position automatically based on the window.width/height */\n autoPosition: true,\n\n /* Precedence of positions, when auto is enabled */\n positionPrecedence: [\"bottom\", \"top\", \"right\", \"left\"],\n\n /* Disable an interaction with element? */\n disableInteraction: false,\n\n /* Set how much padding to be used around helper element */\n helperElementPadding: 10,\n\n /* Default hint position */\n hintPosition: \"top-middle\",\n\n /* Hint button label */\n hintButtonLabel: \"Got it\",\n\n /* Adding animation to hints? */\n hintAnimation: true,\n\n /* additional classes to put on the buttons */\n buttonClass: \"introjs-button\",\n\n /* additional classes to put on progress bar */\n progressBarAdditionalClass: false\n };\n }\n\n var introJs = function introJs(targetElm) {\n var instance;\n\n if (_typeof(targetElm) === \"object\") {\n //Ok, create a new instance\n instance = new IntroJs(targetElm);\n } else if (typeof targetElm === \"string\") {\n //select the target element with query selector\n var targetElement = document.querySelector(targetElm);\n\n if (targetElement) {\n instance = new IntroJs(targetElement);\n } else {\n throw new Error(\"There is no element with given selector.\");\n }\n } else {\n instance = new IntroJs(document.body);\n } // add instance to list of _instances\n // passing group to stamp to increment\n // from 0 onward somewhat reliably\n\n\n introJs.instances[stamp(instance, \"introjs-instance\")] = instance;\n return instance;\n };\n /**\n * Current IntroJs version\n *\n * @property version\n * @type String\n */\n\n\n introJs.version = version$1;\n /**\n * key-val object helper for introJs instances\n *\n * @property instances\n * @type Object\n */\n\n introJs.instances = {}; //Prototype\n\n introJs.fn = IntroJs.prototype = {\n clone: function clone() {\n return new IntroJs(this);\n },\n setOption: function setOption(option, value) {\n this._options[option] = value;\n return this;\n },\n setOptions: function setOptions(options) {\n this._options = mergeOptions(this._options, options);\n return this;\n },\n start: function start(group) {\n introForElement.call(this, this._targetElement, group);\n return this;\n },\n goToStep: function goToStep$1(step) {\n goToStep.call(this, step);\n return this;\n },\n addStep: function addStep(options) {\n if (!this._options.steps) {\n this._options.steps = [];\n }\n\n this._options.steps.push(options);\n\n return this;\n },\n addSteps: function addSteps(steps) {\n if (!steps.length) return;\n\n for (var index = 0; index < steps.length; index++) {\n this.addStep(steps[index]);\n }\n\n return this;\n },\n goToStepNumber: function goToStepNumber$1(step) {\n goToStepNumber.call(this, step);\n return this;\n },\n nextStep: function nextStep$1() {\n nextStep.call(this);\n return this;\n },\n previousStep: function previousStep$1() {\n previousStep.call(this);\n return this;\n },\n currentStep: function currentStep$1() {\n return currentStep.call(this);\n },\n exit: function exit(force) {\n exitIntro.call(this, this._targetElement, force);\n return this;\n },\n refresh: function refresh$1() {\n refresh.call(this);\n return this;\n },\n onbeforechange: function onbeforechange(providedCallback) {\n if (typeof providedCallback === \"function\") {\n this._introBeforeChangeCallback = providedCallback;\n } else {\n throw new Error(\"Provided callback for onbeforechange was not a function\");\n }\n\n return this;\n },\n onchange: function onchange(providedCallback) {\n if (typeof providedCallback === \"function\") {\n this._introChangeCallback = providedCallback;\n } else {\n throw new Error(\"Provided callback for onchange was not a function.\");\n }\n\n return this;\n },\n onafterchange: function onafterchange(providedCallback) {\n if (typeof providedCallback === \"function\") {\n this._introAfterChangeCallback = providedCallback;\n } else {\n throw new Error(\"Provided callback for onafterchange was not a function\");\n }\n\n return this;\n },\n oncomplete: function oncomplete(providedCallback) {\n if (typeof providedCallback === \"function\") {\n this._introCompleteCallback = providedCallback;\n } else {\n throw new Error(\"Provided callback for oncomplete was not a function.\");\n }\n\n return this;\n },\n onhintsadded: function onhintsadded(providedCallback) {\n if (typeof providedCallback === \"function\") {\n this._hintsAddedCallback = providedCallback;\n } else {\n throw new Error(\"Provided callback for onhintsadded was not a function.\");\n }\n\n return this;\n },\n onhintclick: function onhintclick(providedCallback) {\n if (typeof providedCallback === \"function\") {\n this._hintClickCallback = providedCallback;\n } else {\n throw new Error(\"Provided callback for onhintclick was not a function.\");\n }\n\n return this;\n },\n onhintclose: function onhintclose(providedCallback) {\n if (typeof providedCallback === \"function\") {\n this._hintCloseCallback = providedCallback;\n } else {\n throw new Error(\"Provided callback for onhintclose was not a function.\");\n }\n\n return this;\n },\n onexit: function onexit(providedCallback) {\n if (typeof providedCallback === \"function\") {\n this._introExitCallback = providedCallback;\n } else {\n throw new Error(\"Provided callback for onexit was not a function.\");\n }\n\n return this;\n },\n onskip: function onskip(providedCallback) {\n if (typeof providedCallback === \"function\") {\n this._introSkipCallback = providedCallback;\n } else {\n throw new Error(\"Provided callback for onskip was not a function.\");\n }\n\n return this;\n },\n onbeforeexit: function onbeforeexit(providedCallback) {\n if (typeof providedCallback === \"function\") {\n this._introBeforeExitCallback = providedCallback;\n } else {\n throw new Error(\"Provided callback for onbeforeexit was not a function.\");\n }\n\n return this;\n },\n addHints: function addHints() {\n populateHints.call(this, this._targetElement);\n return this;\n },\n hideHint: function hideHint$1(stepId) {\n hideHint.call(this, stepId);\n return this;\n },\n hideHints: function hideHints$1() {\n hideHints.call(this);\n return this;\n },\n showHint: function showHint$1(stepId) {\n showHint.call(this, stepId);\n return this;\n },\n showHints: function showHints$1() {\n showHints.call(this);\n return this;\n },\n removeHints: function removeHints$1() {\n removeHints.call(this);\n return this;\n },\n removeHint: function removeHint$1(stepId) {\n removeHint().call(this, stepId);\n return this;\n },\n showHintDialog: function showHintDialog$1(stepId) {\n showHintDialog.call(this, stepId);\n return this;\n }\n };\n return introJs;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === \"object\" && typeof module !== \"undefined\" ? factory(exports) : typeof define === \"function\" && define.amd ? define([\"exports\"], factory) : factory(global.ActiveStorage = {});\n})(this, function (exports) {\n \"use strict\";\n\n function createCommonjsModule(fn, module) {\n return module = {\n exports: {}\n }, fn(module, module.exports), module.exports;\n }\n\n var sparkMd5 = createCommonjsModule(function (module, exports) {\n (function (factory) {\n {\n module.exports = factory();\n }\n })(function (undefined) {\n var hex_chr = [\"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"a\", \"b\", \"c\", \"d\", \"e\", \"f\"];\n\n function md5cycle(x, k) {\n var a = x[0],\n b = x[1],\n c = x[2],\n d = x[3];\n a += (b & c | ~b & d) + k[0] - 680876936 | 0;\n a = (a << 7 | a >>> 25) + b | 0;\n d += (a & b | ~a & c) + k[1] - 389564586 | 0;\n d = (d << 12 | d >>> 20) + a | 0;\n c += (d & a | ~d & b) + k[2] + 606105819 | 0;\n c = (c << 17 | c >>> 15) + d | 0;\n b += (c & d | ~c & a) + k[3] - 1044525330 | 0;\n b = (b << 22 | b >>> 10) + c | 0;\n a += (b & c | ~b & d) + k[4] - 176418897 | 0;\n a = (a << 7 | a >>> 25) + b | 0;\n d += (a & b | ~a & c) + k[5] + 1200080426 | 0;\n d = (d << 12 | d >>> 20) + a | 0;\n c += (d & a | ~d & b) + k[6] - 1473231341 | 0;\n c = (c << 17 | c >>> 15) + d | 0;\n b += (c & d | ~c & a) + k[7] - 45705983 | 0;\n b = (b << 22 | b >>> 10) + c | 0;\n a += (b & c | ~b & d) + k[8] + 1770035416 | 0;\n a = (a << 7 | a >>> 25) + b | 0;\n d += (a & b | ~a & c) + k[9] - 1958414417 | 0;\n d = (d << 12 | d >>> 20) + a | 0;\n c += (d & a | ~d & b) + k[10] - 42063 | 0;\n c = (c << 17 | c >>> 15) + d | 0;\n b += (c & d | ~c & a) + k[11] - 1990404162 | 0;\n b = (b << 22 | b >>> 10) + c | 0;\n a += (b & c | ~b & d) + k[12] + 1804603682 | 0;\n a = (a << 7 | a >>> 25) + b | 0;\n d += (a & b | ~a & c) + k[13] - 40341101 | 0;\n d = (d << 12 | d >>> 20) + a | 0;\n c += (d & a | ~d & b) + k[14] - 1502002290 | 0;\n c = (c << 17 | c >>> 15) + d | 0;\n b += (c & d | ~c & a) + k[15] + 1236535329 | 0;\n b = (b << 22 | b >>> 10) + c | 0;\n a += (b & d | c & ~d) + k[1] - 165796510 | 0;\n a = (a << 5 | a >>> 27) + b | 0;\n d += (a & c | b & ~c) + k[6] - 1069501632 | 0;\n d = (d << 9 | d >>> 23) + a | 0;\n c += (d & b | a & ~b) + k[11] + 643717713 | 0;\n c = (c << 14 | c >>> 18) + d | 0;\n b += (c & a | d & ~a) + k[0] - 373897302 | 0;\n b = (b << 20 | b >>> 12) + c | 0;\n a += (b & d | c & ~d) + k[5] - 701558691 | 0;\n a = (a << 5 | a >>> 27) + b | 0;\n d += (a & c | b & ~c) + k[10] + 38016083 | 0;\n d = (d << 9 | d >>> 23) + a | 0;\n c += (d & b | a & ~b) + k[15] - 660478335 | 0;\n c = (c << 14 | c >>> 18) + d | 0;\n b += (c & a | d & ~a) + k[4] - 405537848 | 0;\n b = (b << 20 | b >>> 12) + c | 0;\n a += (b & d | c & ~d) + k[9] + 568446438 | 0;\n a = (a << 5 | a >>> 27) + b | 0;\n d += (a & c | b & ~c) + k[14] - 1019803690 | 0;\n d = (d << 9 | d >>> 23) + a | 0;\n c += (d & b | a & ~b) + k[3] - 187363961 | 0;\n c = (c << 14 | c >>> 18) + d | 0;\n b += (c & a | d & ~a) + k[8] + 1163531501 | 0;\n b = (b << 20 | b >>> 12) + c | 0;\n a += (b & d | c & ~d) + k[13] - 1444681467 | 0;\n a = (a << 5 | a >>> 27) + b | 0;\n d += (a & c | b & ~c) + k[2] - 51403784 | 0;\n d = (d << 9 | d >>> 23) + a | 0;\n c += (d & b | a & ~b) + k[7] + 1735328473 | 0;\n c = (c << 14 | c >>> 18) + d | 0;\n b += (c & a | d & ~a) + k[12] - 1926607734 | 0;\n b = (b << 20 | b >>> 12) + c | 0;\n a += (b ^ c ^ d) + k[5] - 378558 | 0;\n a = (a << 4 | a >>> 28) + b | 0;\n d += (a ^ b ^ c) + k[8] - 2022574463 | 0;\n d = (d << 11 | d >>> 21) + a | 0;\n c += (d ^ a ^ b) + k[11] + 1839030562 | 0;\n c = (c << 16 | c >>> 16) + d | 0;\n b += (c ^ d ^ a) + k[14] - 35309556 | 0;\n b = (b << 23 | b >>> 9) + c | 0;\n a += (b ^ c ^ d) + k[1] - 1530992060 | 0;\n a = (a << 4 | a >>> 28) + b | 0;\n d += (a ^ b ^ c) + k[4] + 1272893353 | 0;\n d = (d << 11 | d >>> 21) + a | 0;\n c += (d ^ a ^ b) + k[7] - 155497632 | 0;\n c = (c << 16 | c >>> 16) + d | 0;\n b += (c ^ d ^ a) + k[10] - 1094730640 | 0;\n b = (b << 23 | b >>> 9) + c | 0;\n a += (b ^ c ^ d) + k[13] + 681279174 | 0;\n a = (a << 4 | a >>> 28) + b | 0;\n d += (a ^ b ^ c) + k[0] - 358537222 | 0;\n d = (d << 11 | d >>> 21) + a | 0;\n c += (d ^ a ^ b) + k[3] - 722521979 | 0;\n c = (c << 16 | c >>> 16) + d | 0;\n b += (c ^ d ^ a) + k[6] + 76029189 | 0;\n b = (b << 23 | b >>> 9) + c | 0;\n a += (b ^ c ^ d) + k[9] - 640364487 | 0;\n a = (a << 4 | a >>> 28) + b | 0;\n d += (a ^ b ^ c) + k[12] - 421815835 | 0;\n d = (d << 11 | d >>> 21) + a | 0;\n c += (d ^ a ^ b) + k[15] + 530742520 | 0;\n c = (c << 16 | c >>> 16) + d | 0;\n b += (c ^ d ^ a) + k[2] - 995338651 | 0;\n b = (b << 23 | b >>> 9) + c | 0;\n a += (c ^ (b | ~d)) + k[0] - 198630844 | 0;\n a = (a << 6 | a >>> 26) + b | 0;\n d += (b ^ (a | ~c)) + k[7] + 1126891415 | 0;\n d = (d << 10 | d >>> 22) + a | 0;\n c += (a ^ (d | ~b)) + k[14] - 1416354905 | 0;\n c = (c << 15 | c >>> 17) + d | 0;\n b += (d ^ (c | ~a)) + k[5] - 57434055 | 0;\n b = (b << 21 | b >>> 11) + c | 0;\n a += (c ^ (b | ~d)) + k[12] + 1700485571 | 0;\n a = (a << 6 | a >>> 26) + b | 0;\n d += (b ^ (a | ~c)) + k[3] - 1894986606 | 0;\n d = (d << 10 | d >>> 22) + a | 0;\n c += (a ^ (d | ~b)) + k[10] - 1051523 | 0;\n c = (c << 15 | c >>> 17) + d | 0;\n b += (d ^ (c | ~a)) + k[1] - 2054922799 | 0;\n b = (b << 21 | b >>> 11) + c | 0;\n a += (c ^ (b | ~d)) + k[8] + 1873313359 | 0;\n a = (a << 6 | a >>> 26) + b | 0;\n d += (b ^ (a | ~c)) + k[15] - 30611744 | 0;\n d = (d << 10 | d >>> 22) + a | 0;\n c += (a ^ (d | ~b)) + k[6] - 1560198380 | 0;\n c = (c << 15 | c >>> 17) + d | 0;\n b += (d ^ (c | ~a)) + k[13] + 1309151649 | 0;\n b = (b << 21 | b >>> 11) + c | 0;\n a += (c ^ (b | ~d)) + k[4] - 145523070 | 0;\n a = (a << 6 | a >>> 26) + b | 0;\n d += (b ^ (a | ~c)) + k[11] - 1120210379 | 0;\n d = (d << 10 | d >>> 22) + a | 0;\n c += (a ^ (d | ~b)) + k[2] + 718787259 | 0;\n c = (c << 15 | c >>> 17) + d | 0;\n b += (d ^ (c | ~a)) + k[9] - 343485551 | 0;\n b = (b << 21 | b >>> 11) + c | 0;\n x[0] = a + x[0] | 0;\n x[1] = b + x[1] | 0;\n x[2] = c + x[2] | 0;\n x[3] = d + x[3] | 0;\n }\n\n function md5blk(s) {\n var md5blks = [],\n i;\n\n for (i = 0; i < 64; i += 4) {\n md5blks[i >> 2] = s.charCodeAt(i) + (s.charCodeAt(i + 1) << 8) + (s.charCodeAt(i + 2) << 16) + (s.charCodeAt(i + 3) << 24);\n }\n\n return md5blks;\n }\n\n function md5blk_array(a) {\n var md5blks = [],\n i;\n\n for (i = 0; i < 64; i += 4) {\n md5blks[i >> 2] = a[i] + (a[i + 1] << 8) + (a[i + 2] << 16) + (a[i + 3] << 24);\n }\n\n return md5blks;\n }\n\n function md51(s) {\n var n = s.length,\n state = [1732584193, -271733879, -1732584194, 271733878],\n i,\n length,\n tail,\n tmp,\n lo,\n hi;\n\n for (i = 64; i <= n; i += 64) {\n md5cycle(state, md5blk(s.substring(i - 64, i)));\n }\n\n s = s.substring(i - 64);\n length = s.length;\n tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];\n\n for (i = 0; i < length; i += 1) {\n tail[i >> 2] |= s.charCodeAt(i) << (i % 4 << 3);\n }\n\n tail[i >> 2] |= 128 << (i % 4 << 3);\n\n if (i > 55) {\n md5cycle(state, tail);\n\n for (i = 0; i < 16; i += 1) {\n tail[i] = 0;\n }\n }\n\n tmp = n * 8;\n tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);\n lo = parseInt(tmp[2], 16);\n hi = parseInt(tmp[1], 16) || 0;\n tail[14] = lo;\n tail[15] = hi;\n md5cycle(state, tail);\n return state;\n }\n\n function md51_array(a) {\n var n = a.length,\n state = [1732584193, -271733879, -1732584194, 271733878],\n i,\n length,\n tail,\n tmp,\n lo,\n hi;\n\n for (i = 64; i <= n; i += 64) {\n md5cycle(state, md5blk_array(a.subarray(i - 64, i)));\n }\n\n a = i - 64 < n ? a.subarray(i - 64) : new Uint8Array(0);\n length = a.length;\n tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];\n\n for (i = 0; i < length; i += 1) {\n tail[i >> 2] |= a[i] << (i % 4 << 3);\n }\n\n tail[i >> 2] |= 128 << (i % 4 << 3);\n\n if (i > 55) {\n md5cycle(state, tail);\n\n for (i = 0; i < 16; i += 1) {\n tail[i] = 0;\n }\n }\n\n tmp = n * 8;\n tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);\n lo = parseInt(tmp[2], 16);\n hi = parseInt(tmp[1], 16) || 0;\n tail[14] = lo;\n tail[15] = hi;\n md5cycle(state, tail);\n return state;\n }\n\n function rhex(n) {\n var s = \"\",\n j;\n\n for (j = 0; j < 4; j += 1) {\n s += hex_chr[n >> j * 8 + 4 & 15] + hex_chr[n >> j * 8 & 15];\n }\n\n return s;\n }\n\n function hex(x) {\n var i;\n\n for (i = 0; i < x.length; i += 1) {\n x[i] = rhex(x[i]);\n }\n\n return x.join(\"\");\n }\n\n if (hex(md51(\"hello\")) !== \"5d41402abc4b2a76b9719d911017c592\") ;\n\n if (typeof ArrayBuffer !== \"undefined\" && !ArrayBuffer.prototype.slice) {\n (function () {\n function clamp(val, length) {\n val = val | 0 || 0;\n\n if (val < 0) {\n return Math.max(val + length, 0);\n }\n\n return Math.min(val, length);\n }\n\n ArrayBuffer.prototype.slice = function (from, to) {\n var length = this.byteLength,\n begin = clamp(from, length),\n end = length,\n num,\n target,\n targetArray,\n sourceArray;\n\n if (to !== undefined) {\n end = clamp(to, length);\n }\n\n if (begin > end) {\n return new ArrayBuffer(0);\n }\n\n num = end - begin;\n target = new ArrayBuffer(num);\n targetArray = new Uint8Array(target);\n sourceArray = new Uint8Array(this, begin, num);\n targetArray.set(sourceArray);\n return target;\n };\n })();\n }\n\n function toUtf8(str) {\n if (/[\\u0080-\\uFFFF]/.test(str)) {\n str = unescape(encodeURIComponent(str));\n }\n\n return str;\n }\n\n function utf8Str2ArrayBuffer(str, returnUInt8Array) {\n var length = str.length,\n buff = new ArrayBuffer(length),\n arr = new Uint8Array(buff),\n i;\n\n for (i = 0; i < length; i += 1) {\n arr[i] = str.charCodeAt(i);\n }\n\n return returnUInt8Array ? arr : buff;\n }\n\n function arrayBuffer2Utf8Str(buff) {\n return String.fromCharCode.apply(null, new Uint8Array(buff));\n }\n\n function concatenateArrayBuffers(first, second, returnUInt8Array) {\n var result = new Uint8Array(first.byteLength + second.byteLength);\n result.set(new Uint8Array(first));\n result.set(new Uint8Array(second), first.byteLength);\n return returnUInt8Array ? result : result.buffer;\n }\n\n function hexToBinaryString(hex) {\n var bytes = [],\n length = hex.length,\n x;\n\n for (x = 0; x < length - 1; x += 2) {\n bytes.push(parseInt(hex.substr(x, 2), 16));\n }\n\n return String.fromCharCode.apply(String, bytes);\n }\n\n function SparkMD5() {\n this.reset();\n }\n\n SparkMD5.prototype.append = function (str) {\n this.appendBinary(toUtf8(str));\n return this;\n };\n\n SparkMD5.prototype.appendBinary = function (contents) {\n this._buff += contents;\n this._length += contents.length;\n var length = this._buff.length,\n i;\n\n for (i = 64; i <= length; i += 64) {\n md5cycle(this._hash, md5blk(this._buff.substring(i - 64, i)));\n }\n\n this._buff = this._buff.substring(i - 64);\n return this;\n };\n\n SparkMD5.prototype.end = function (raw) {\n var buff = this._buff,\n length = buff.length,\n i,\n tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n ret;\n\n for (i = 0; i < length; i += 1) {\n tail[i >> 2] |= buff.charCodeAt(i) << (i % 4 << 3);\n }\n\n this._finish(tail, length);\n\n ret = hex(this._hash);\n\n if (raw) {\n ret = hexToBinaryString(ret);\n }\n\n this.reset();\n return ret;\n };\n\n SparkMD5.prototype.reset = function () {\n this._buff = \"\";\n this._length = 0;\n this._hash = [1732584193, -271733879, -1732584194, 271733878];\n return this;\n };\n\n SparkMD5.prototype.getState = function () {\n return {\n buff: this._buff,\n length: this._length,\n hash: this._hash\n };\n };\n\n SparkMD5.prototype.setState = function (state) {\n this._buff = state.buff;\n this._length = state.length;\n this._hash = state.hash;\n return this;\n };\n\n SparkMD5.prototype.destroy = function () {\n delete this._hash;\n delete this._buff;\n delete this._length;\n };\n\n SparkMD5.prototype._finish = function (tail, length) {\n var i = length,\n tmp,\n lo,\n hi;\n tail[i >> 2] |= 128 << (i % 4 << 3);\n\n if (i > 55) {\n md5cycle(this._hash, tail);\n\n for (i = 0; i < 16; i += 1) {\n tail[i] = 0;\n }\n }\n\n tmp = this._length * 8;\n tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);\n lo = parseInt(tmp[2], 16);\n hi = parseInt(tmp[1], 16) || 0;\n tail[14] = lo;\n tail[15] = hi;\n md5cycle(this._hash, tail);\n };\n\n SparkMD5.hash = function (str, raw) {\n return SparkMD5.hashBinary(toUtf8(str), raw);\n };\n\n SparkMD5.hashBinary = function (content, raw) {\n var hash = md51(content),\n ret = hex(hash);\n return raw ? hexToBinaryString(ret) : ret;\n };\n\n SparkMD5.ArrayBuffer = function () {\n this.reset();\n };\n\n SparkMD5.ArrayBuffer.prototype.append = function (arr) {\n var buff = concatenateArrayBuffers(this._buff.buffer, arr, true),\n length = buff.length,\n i;\n this._length += arr.byteLength;\n\n for (i = 64; i <= length; i += 64) {\n md5cycle(this._hash, md5blk_array(buff.subarray(i - 64, i)));\n }\n\n this._buff = i - 64 < length ? new Uint8Array(buff.buffer.slice(i - 64)) : new Uint8Array(0);\n return this;\n };\n\n SparkMD5.ArrayBuffer.prototype.end = function (raw) {\n var buff = this._buff,\n length = buff.length,\n tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n i,\n ret;\n\n for (i = 0; i < length; i += 1) {\n tail[i >> 2] |= buff[i] << (i % 4 << 3);\n }\n\n this._finish(tail, length);\n\n ret = hex(this._hash);\n\n if (raw) {\n ret = hexToBinaryString(ret);\n }\n\n this.reset();\n return ret;\n };\n\n SparkMD5.ArrayBuffer.prototype.reset = function () {\n this._buff = new Uint8Array(0);\n this._length = 0;\n this._hash = [1732584193, -271733879, -1732584194, 271733878];\n return this;\n };\n\n SparkMD5.ArrayBuffer.prototype.getState = function () {\n var state = SparkMD5.prototype.getState.call(this);\n state.buff = arrayBuffer2Utf8Str(state.buff);\n return state;\n };\n\n SparkMD5.ArrayBuffer.prototype.setState = function (state) {\n state.buff = utf8Str2ArrayBuffer(state.buff, true);\n return SparkMD5.prototype.setState.call(this, state);\n };\n\n SparkMD5.ArrayBuffer.prototype.destroy = SparkMD5.prototype.destroy;\n SparkMD5.ArrayBuffer.prototype._finish = SparkMD5.prototype._finish;\n\n SparkMD5.ArrayBuffer.hash = function (arr, raw) {\n var hash = md51_array(new Uint8Array(arr)),\n ret = hex(hash);\n return raw ? hexToBinaryString(ret) : ret;\n };\n\n return SparkMD5;\n });\n });\n\n var classCallCheck = function classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n };\n\n var createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n }();\n\n var fileSlice = File.prototype.slice || File.prototype.mozSlice || File.prototype.webkitSlice;\n\n var FileChecksum = function () {\n createClass(FileChecksum, null, [{\n key: \"create\",\n value: function create(file, callback) {\n var instance = new FileChecksum(file);\n instance.create(callback);\n }\n }]);\n\n function FileChecksum(file) {\n classCallCheck(this, FileChecksum);\n this.file = file;\n this.chunkSize = 2097152;\n this.chunkCount = Math.ceil(this.file.size / this.chunkSize);\n this.chunkIndex = 0;\n }\n\n createClass(FileChecksum, [{\n key: \"create\",\n value: function create(callback) {\n var _this = this;\n\n this.callback = callback;\n this.md5Buffer = new sparkMd5.ArrayBuffer();\n this.fileReader = new FileReader();\n this.fileReader.addEventListener(\"load\", function (event) {\n return _this.fileReaderDidLoad(event);\n });\n this.fileReader.addEventListener(\"error\", function (event) {\n return _this.fileReaderDidError(event);\n });\n this.readNextChunk();\n }\n }, {\n key: \"fileReaderDidLoad\",\n value: function fileReaderDidLoad(event) {\n this.md5Buffer.append(event.target.result);\n\n if (!this.readNextChunk()) {\n var binaryDigest = this.md5Buffer.end(true);\n var base64digest = btoa(binaryDigest);\n this.callback(null, base64digest);\n }\n }\n }, {\n key: \"fileReaderDidError\",\n value: function fileReaderDidError(event) {\n this.callback(\"Error reading \" + this.file.name);\n }\n }, {\n key: \"readNextChunk\",\n value: function readNextChunk() {\n if (this.chunkIndex < this.chunkCount || this.chunkIndex == 0 && this.chunkCount == 0) {\n var start = this.chunkIndex * this.chunkSize;\n var end = Math.min(start + this.chunkSize, this.file.size);\n var bytes = fileSlice.call(this.file, start, end);\n this.fileReader.readAsArrayBuffer(bytes);\n this.chunkIndex++;\n return true;\n } else {\n return false;\n }\n }\n }]);\n return FileChecksum;\n }();\n\n function getMetaValue(name) {\n var element = findElement(document.head, 'meta[name=\"' + name + '\"]');\n\n if (element) {\n return element.getAttribute(\"content\");\n }\n }\n\n function findElements(root, selector) {\n if (typeof root == \"string\") {\n selector = root;\n root = document;\n }\n\n var elements = root.querySelectorAll(selector);\n return toArray$1(elements);\n }\n\n function findElement(root, selector) {\n if (typeof root == \"string\") {\n selector = root;\n root = document;\n }\n\n return root.querySelector(selector);\n }\n\n function dispatchEvent(element, type) {\n var eventInit = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var disabled = element.disabled;\n var bubbles = eventInit.bubbles,\n cancelable = eventInit.cancelable,\n detail = eventInit.detail;\n var event = document.createEvent(\"Event\");\n event.initEvent(type, bubbles || true, cancelable || true);\n event.detail = detail || {};\n\n try {\n element.disabled = false;\n element.dispatchEvent(event);\n } finally {\n element.disabled = disabled;\n }\n\n return event;\n }\n\n function toArray$1(value) {\n if (Array.isArray(value)) {\n return value;\n } else if (Array.from) {\n return Array.from(value);\n } else {\n return [].slice.call(value);\n }\n }\n\n var BlobRecord = function () {\n function BlobRecord(file, checksum, url) {\n var _this = this;\n\n classCallCheck(this, BlobRecord);\n this.file = file;\n this.attributes = {\n filename: file.name,\n content_type: file.type || \"application/octet-stream\",\n byte_size: file.size,\n checksum: checksum\n };\n this.xhr = new XMLHttpRequest();\n this.xhr.open(\"POST\", url, true);\n this.xhr.responseType = \"json\";\n this.xhr.setRequestHeader(\"Content-Type\", \"application/json\");\n this.xhr.setRequestHeader(\"Accept\", \"application/json\");\n this.xhr.setRequestHeader(\"X-Requested-With\", \"XMLHttpRequest\");\n var csrfToken = getMetaValue(\"csrf-token\");\n\n if (csrfToken != undefined) {\n this.xhr.setRequestHeader(\"X-CSRF-Token\", csrfToken);\n }\n\n this.xhr.addEventListener(\"load\", function (event) {\n return _this.requestDidLoad(event);\n });\n this.xhr.addEventListener(\"error\", function (event) {\n return _this.requestDidError(event);\n });\n }\n\n createClass(BlobRecord, [{\n key: \"create\",\n value: function create(callback) {\n this.callback = callback;\n this.xhr.send(JSON.stringify({\n blob: this.attributes\n }));\n }\n }, {\n key: \"requestDidLoad\",\n value: function requestDidLoad(event) {\n if (this.status >= 200 && this.status < 300) {\n var response = this.response;\n var direct_upload = response.direct_upload;\n delete response.direct_upload;\n this.attributes = response;\n this.directUploadData = direct_upload;\n this.callback(null, this.toJSON());\n } else {\n this.requestDidError(event);\n }\n }\n }, {\n key: \"requestDidError\",\n value: function requestDidError(event) {\n this.callback('Error creating Blob for \"' + this.file.name + '\". Status: ' + this.status);\n }\n }, {\n key: \"toJSON\",\n value: function toJSON() {\n var result = {};\n\n for (var key in this.attributes) {\n result[key] = this.attributes[key];\n }\n\n return result;\n }\n }, {\n key: \"status\",\n get: function get$$1() {\n return this.xhr.status;\n }\n }, {\n key: \"response\",\n get: function get$$1() {\n var _xhr = this.xhr,\n responseType = _xhr.responseType,\n response = _xhr.response;\n\n if (responseType == \"json\") {\n return response;\n } else {\n return JSON.parse(response);\n }\n }\n }]);\n return BlobRecord;\n }();\n\n var BlobUpload = function () {\n function BlobUpload(blob) {\n var _this = this;\n\n classCallCheck(this, BlobUpload);\n this.blob = blob;\n this.file = blob.file;\n var _blob$directUploadDat = blob.directUploadData,\n url = _blob$directUploadDat.url,\n headers = _blob$directUploadDat.headers;\n this.xhr = new XMLHttpRequest();\n this.xhr.open(\"PUT\", url, true);\n this.xhr.responseType = \"text\";\n\n for (var key in headers) {\n this.xhr.setRequestHeader(key, headers[key]);\n }\n\n this.xhr.addEventListener(\"load\", function (event) {\n return _this.requestDidLoad(event);\n });\n this.xhr.addEventListener(\"error\", function (event) {\n return _this.requestDidError(event);\n });\n }\n\n createClass(BlobUpload, [{\n key: \"create\",\n value: function create(callback) {\n this.callback = callback;\n this.xhr.send(this.file.slice());\n }\n }, {\n key: \"requestDidLoad\",\n value: function requestDidLoad(event) {\n var _xhr = this.xhr,\n status = _xhr.status,\n response = _xhr.response;\n\n if (status >= 200 && status < 300) {\n this.callback(null, response);\n } else {\n this.requestDidError(event);\n }\n }\n }, {\n key: \"requestDidError\",\n value: function requestDidError(event) {\n this.callback('Error storing \"' + this.file.name + '\". Status: ' + this.xhr.status);\n }\n }]);\n return BlobUpload;\n }();\n\n var id = 0;\n\n var DirectUpload = function () {\n function DirectUpload(file, url, delegate) {\n classCallCheck(this, DirectUpload);\n this.id = ++id;\n this.file = file;\n this.url = url;\n this.delegate = delegate;\n }\n\n createClass(DirectUpload, [{\n key: \"create\",\n value: function create(callback) {\n var _this = this;\n\n FileChecksum.create(this.file, function (error, checksum) {\n if (error) {\n callback(error);\n return;\n }\n\n var blob = new BlobRecord(_this.file, checksum, _this.url);\n notify(_this.delegate, \"directUploadWillCreateBlobWithXHR\", blob.xhr);\n blob.create(function (error) {\n if (error) {\n callback(error);\n } else {\n var upload = new BlobUpload(blob);\n notify(_this.delegate, \"directUploadWillStoreFileWithXHR\", upload.xhr);\n upload.create(function (error) {\n if (error) {\n callback(error);\n } else {\n callback(null, blob.toJSON());\n }\n });\n }\n });\n });\n }\n }]);\n return DirectUpload;\n }();\n\n function notify(object, methodName) {\n if (object && typeof object[methodName] == \"function\") {\n for (var _len = arguments.length, messages = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n messages[_key - 2] = arguments[_key];\n }\n\n return object[methodName].apply(object, messages);\n }\n }\n\n var DirectUploadController = function () {\n function DirectUploadController(input, file) {\n classCallCheck(this, DirectUploadController);\n this.input = input;\n this.file = file;\n this.directUpload = new DirectUpload(this.file, this.url, this);\n this.dispatch(\"initialize\");\n }\n\n createClass(DirectUploadController, [{\n key: \"start\",\n value: function start(callback) {\n var _this = this;\n\n var hiddenInput = document.createElement(\"input\");\n hiddenInput.type = \"hidden\";\n hiddenInput.name = this.input.name;\n this.input.insertAdjacentElement(\"beforebegin\", hiddenInput);\n this.dispatch(\"start\");\n this.directUpload.create(function (error, attributes) {\n if (error) {\n hiddenInput.parentNode.removeChild(hiddenInput);\n\n _this.dispatchError(error);\n } else {\n hiddenInput.value = attributes.signed_id;\n }\n\n _this.dispatch(\"end\");\n\n callback(error);\n });\n }\n }, {\n key: \"uploadRequestDidProgress\",\n value: function uploadRequestDidProgress(event) {\n var progress = event.loaded / event.total * 100;\n\n if (progress) {\n this.dispatch(\"progress\", {\n progress: progress\n });\n }\n }\n }, {\n key: \"dispatch\",\n value: function dispatch(name) {\n var detail = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n detail.file = this.file;\n detail.id = this.directUpload.id;\n return dispatchEvent(this.input, \"direct-upload:\" + name, {\n detail: detail\n });\n }\n }, {\n key: \"dispatchError\",\n value: function dispatchError(error) {\n var event = this.dispatch(\"error\", {\n error: error\n });\n\n if (!event.defaultPrevented) {\n alert(error);\n }\n }\n }, {\n key: \"directUploadWillCreateBlobWithXHR\",\n value: function directUploadWillCreateBlobWithXHR(xhr) {\n this.dispatch(\"before-blob-request\", {\n xhr: xhr\n });\n }\n }, {\n key: \"directUploadWillStoreFileWithXHR\",\n value: function directUploadWillStoreFileWithXHR(xhr) {\n var _this2 = this;\n\n this.dispatch(\"before-storage-request\", {\n xhr: xhr\n });\n xhr.upload.addEventListener(\"progress\", function (event) {\n return _this2.uploadRequestDidProgress(event);\n });\n }\n }, {\n key: \"url\",\n get: function get$$1() {\n return this.input.getAttribute(\"data-direct-upload-url\");\n }\n }]);\n return DirectUploadController;\n }();\n\n var inputSelector = \"input[type=file][data-direct-upload-url]:not([disabled])\";\n\n var DirectUploadsController = function () {\n function DirectUploadsController(form) {\n classCallCheck(this, DirectUploadsController);\n this.form = form;\n this.inputs = findElements(form, inputSelector).filter(function (input) {\n return input.files.length;\n });\n }\n\n createClass(DirectUploadsController, [{\n key: \"start\",\n value: function start(callback) {\n var _this = this;\n\n var controllers = this.createDirectUploadControllers();\n\n var startNextController = function startNextController() {\n var controller = controllers.shift();\n\n if (controller) {\n controller.start(function (error) {\n if (error) {\n callback(error);\n\n _this.dispatch(\"end\");\n } else {\n startNextController();\n }\n });\n } else {\n callback();\n\n _this.dispatch(\"end\");\n }\n };\n\n this.dispatch(\"start\");\n startNextController();\n }\n }, {\n key: \"createDirectUploadControllers\",\n value: function createDirectUploadControllers() {\n var controllers = [];\n this.inputs.forEach(function (input) {\n toArray$1(input.files).forEach(function (file) {\n var controller = new DirectUploadController(input, file);\n controllers.push(controller);\n });\n });\n return controllers;\n }\n }, {\n key: \"dispatch\",\n value: function dispatch(name) {\n var detail = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return dispatchEvent(this.form, \"direct-uploads:\" + name, {\n detail: detail\n });\n }\n }]);\n return DirectUploadsController;\n }();\n\n var processingAttribute = \"data-direct-uploads-processing\";\n var submitButtonsByForm = new WeakMap();\n var started = false;\n\n function start() {\n if (!started) {\n started = true;\n document.addEventListener(\"click\", didClick, true);\n document.addEventListener(\"submit\", didSubmitForm);\n document.addEventListener(\"ajax:before\", didSubmitRemoteElement);\n }\n }\n\n function didClick(event) {\n var target = event.target;\n\n if ((target.tagName == \"INPUT\" || target.tagName == \"BUTTON\") && target.type == \"submit\" && target.form) {\n submitButtonsByForm.set(target.form, target);\n }\n }\n\n function didSubmitForm(event) {\n handleFormSubmissionEvent(event);\n }\n\n function didSubmitRemoteElement(event) {\n if (event.target.tagName == \"FORM\") {\n handleFormSubmissionEvent(event);\n }\n }\n\n function handleFormSubmissionEvent(event) {\n var form = event.target;\n\n if (form.hasAttribute(processingAttribute)) {\n event.preventDefault();\n return;\n }\n\n var controller = new DirectUploadsController(form);\n var inputs = controller.inputs;\n\n if (inputs.length) {\n event.preventDefault();\n form.setAttribute(processingAttribute, \"\");\n inputs.forEach(disable);\n controller.start(function (error) {\n form.removeAttribute(processingAttribute);\n\n if (error) {\n inputs.forEach(enable);\n } else {\n submitForm(form);\n }\n });\n }\n }\n\n function submitForm(form) {\n var button = submitButtonsByForm.get(form) || findElement(form, \"input[type=submit], button[type=submit]\");\n\n if (button) {\n var _button = button,\n disabled = _button.disabled;\n button.disabled = false;\n button.focus();\n button.click();\n button.disabled = disabled;\n } else {\n button = document.createElement(\"input\");\n button.type = \"submit\";\n button.style.display = \"none\";\n form.appendChild(button);\n button.click();\n form.removeChild(button);\n }\n\n submitButtonsByForm.delete(form);\n }\n\n function disable(input) {\n input.disabled = true;\n }\n\n function enable(input) {\n input.disabled = false;\n }\n\n function autostart() {\n if (window.ActiveStorage) {\n start();\n }\n }\n\n setTimeout(autostart, 1);\n exports.start = start;\n exports.DirectUpload = DirectUpload;\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n});","// Load all the channels within this directory and all subdirectories.\n// Channel files must be named *_channel.js.\n\nconst channels = require.context('.', true, /_channel\\.js$/)\nchannels.keys().forEach(channels)\n","function webpackEmptyContext(req) {\n\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\te.code = 'MODULE_NOT_FOUND';\n\tthrow e;\n}\nwebpackEmptyContext.keys = function() { return []; };\nwebpackEmptyContext.resolve = webpackEmptyContext;\nmodule.exports = webpackEmptyContext;\nwebpackEmptyContext.id = 39;","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n/*\nTrix 1.3.1\nCopyright © 2020 Basecamp, LLC\nhttp://trix-editor.org/\n */\n(function () {}).call(this), function () {\n var t;\n null == window.Set && (window.Set = t = function () {\n function t() {\n this.clear();\n }\n\n return t.prototype.clear = function () {\n return this.values = [];\n }, t.prototype.has = function (t) {\n return -1 !== this.values.indexOf(t);\n }, t.prototype.add = function (t) {\n return this.has(t) || this.values.push(t), this;\n }, t.prototype[\"delete\"] = function (t) {\n var e;\n return -1 === (e = this.values.indexOf(t)) ? !1 : (this.values.splice(e, 1), !0);\n }, t.prototype.forEach = function () {\n var t;\n return (t = this.values).forEach.apply(t, arguments);\n }, t;\n }());\n}.call(this), function (t) {\n function e() {}\n\n function n(t, e) {\n return function () {\n t.apply(e, arguments);\n };\n }\n\n function i(t) {\n if (\"object\" != _typeof(this)) throw new TypeError(\"Promises must be constructed via new\");\n if (\"function\" != typeof t) throw new TypeError(\"not a function\");\n this._state = 0, this._handled = !1, this._value = void 0, this._deferreds = [], c(t, this);\n }\n\n function o(t, e) {\n for (; 3 === t._state;) {\n t = t._value;\n }\n\n return 0 === t._state ? void t._deferreds.push(e) : (t._handled = !0, void h(function () {\n var n = 1 === t._state ? e.onFulfilled : e.onRejected;\n if (null === n) return void (1 === t._state ? r : s)(e.promise, t._value);\n var i;\n\n try {\n i = n(t._value);\n } catch (o) {\n return void s(e.promise, o);\n }\n\n r(e.promise, i);\n }));\n }\n\n function r(t, e) {\n try {\n if (e === t) throw new TypeError(\"A promise cannot be resolved with itself.\");\n\n if (e && (\"object\" == _typeof(e) || \"function\" == typeof e)) {\n var o = e.then;\n if (e instanceof i) return t._state = 3, t._value = e, void a(t);\n if (\"function\" == typeof o) return void c(n(o, e), t);\n }\n\n t._state = 1, t._value = e, a(t);\n } catch (r) {\n s(t, r);\n }\n }\n\n function s(t, e) {\n t._state = 2, t._value = e, a(t);\n }\n\n function a(t) {\n 2 === t._state && 0 === t._deferreds.length && setTimeout(function () {\n t._handled || p(t._value);\n }, 1);\n\n for (var e = 0, n = t._deferreds.length; n > e; e++) {\n o(t, t._deferreds[e]);\n }\n\n t._deferreds = null;\n }\n\n function u(t, e, n) {\n this.onFulfilled = \"function\" == typeof t ? t : null, this.onRejected = \"function\" == typeof e ? e : null, this.promise = n;\n }\n\n function c(t, e) {\n var n = !1;\n\n try {\n t(function (t) {\n n || (n = !0, r(e, t));\n }, function (t) {\n n || (n = !0, s(e, t));\n });\n } catch (i) {\n if (n) return;\n n = !0, s(e, i);\n }\n }\n\n var l = setTimeout,\n h = \"function\" == typeof setImmediate && setImmediate || function (t) {\n l(t, 1);\n },\n p = function p(t) {\n \"undefined\" != typeof console && console && console.warn(\"Possible Unhandled Promise Rejection:\", t);\n };\n\n i.prototype[\"catch\"] = function (t) {\n return this.then(null, t);\n }, i.prototype.then = function (t, n) {\n var r = new i(e);\n return o(this, new u(t, n, r)), r;\n }, i.all = function (t) {\n var e = Array.prototype.slice.call(t);\n return new i(function (t, n) {\n function i(r, s) {\n try {\n if (s && (\"object\" == _typeof(s) || \"function\" == typeof s)) {\n var a = s.then;\n if (\"function\" == typeof a) return void a.call(s, function (t) {\n i(r, t);\n }, n);\n }\n\n e[r] = s, 0 === --o && t(e);\n } catch (u) {\n n(u);\n }\n }\n\n if (0 === e.length) return t([]);\n\n for (var o = e.length, r = 0; r < e.length; r++) {\n i(r, e[r]);\n }\n });\n }, i.resolve = function (t) {\n return t && \"object\" == _typeof(t) && t.constructor === i ? t : new i(function (e) {\n e(t);\n });\n }, i.reject = function (t) {\n return new i(function (e, n) {\n n(t);\n });\n }, i.race = function (t) {\n return new i(function (e, n) {\n for (var i = 0, o = t.length; o > i; i++) {\n t[i].then(e, n);\n }\n });\n }, i._setImmediateFn = function (t) {\n h = t;\n }, i._setUnhandledRejectionFn = function (t) {\n p = t;\n }, \"undefined\" != typeof module && module.exports ? module.exports = i : t.Promise || (t.Promise = i);\n}(this), function () {\n var t = \"object\" == _typeof(window.customElements),\n e = \"function\" == typeof document.registerElement,\n n = t || e;\n\n n || (\n /**\n * @license\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n \"undefined\" == typeof WeakMap && !function () {\n var t = Object.defineProperty,\n e = Date.now() % 1e9,\n n = function n() {\n this.name = \"__st\" + (1e9 * Math.random() >>> 0) + (e++ + \"__\");\n };\n\n n.prototype = {\n set: function set(e, n) {\n var i = e[this.name];\n return i && i[0] === e ? i[1] = n : t(e, this.name, {\n value: [e, n],\n writable: !0\n }), this;\n },\n get: function get(t) {\n var e;\n return (e = t[this.name]) && e[0] === t ? e[1] : void 0;\n },\n \"delete\": function _delete(t) {\n var e = t[this.name];\n return e && e[0] === t ? (e[0] = e[1] = void 0, !0) : !1;\n },\n has: function has(t) {\n var e = t[this.name];\n return e ? e[0] === t : !1;\n }\n }, window.WeakMap = n;\n }(), function (t) {\n function e(t) {\n A.push(t), b || (b = !0, g(i));\n }\n\n function n(t) {\n return window.ShadowDOMPolyfill && window.ShadowDOMPolyfill.wrapIfNeeded(t) || t;\n }\n\n function i() {\n b = !1;\n var t = A;\n A = [], t.sort(function (t, e) {\n return t.uid_ - e.uid_;\n });\n var e = !1;\n t.forEach(function (t) {\n var n = t.takeRecords();\n o(t), n.length && (t.callback_(n, t), e = !0);\n }), e && i();\n }\n\n function o(t) {\n t.nodes_.forEach(function (e) {\n var n = m.get(e);\n n && n.forEach(function (e) {\n e.observer === t && e.removeTransientObservers();\n });\n });\n }\n\n function r(t, e) {\n for (var n = t; n; n = n.parentNode) {\n var i = m.get(n);\n if (i) for (var o = 0; o < i.length; o++) {\n var r = i[o],\n s = r.options;\n\n if (n === t || s.subtree) {\n var a = e(s);\n a && r.enqueue(a);\n }\n }\n }\n }\n\n function s(t) {\n this.callback_ = t, this.nodes_ = [], this.records_ = [], this.uid_ = ++C;\n }\n\n function a(t, e) {\n this.type = t, this.target = e, this.addedNodes = [], this.removedNodes = [], this.previousSibling = null, this.nextSibling = null, this.attributeName = null, this.attributeNamespace = null, this.oldValue = null;\n }\n\n function u(t) {\n var e = new a(t.type, t.target);\n return e.addedNodes = t.addedNodes.slice(), e.removedNodes = t.removedNodes.slice(), e.previousSibling = t.previousSibling, e.nextSibling = t.nextSibling, e.attributeName = t.attributeName, e.attributeNamespace = t.attributeNamespace, e.oldValue = t.oldValue, e;\n }\n\n function c(t, e) {\n return x = new a(t, e);\n }\n\n function l(t) {\n return w ? w : (w = u(x), w.oldValue = t, w);\n }\n\n function h() {\n x = w = void 0;\n }\n\n function p(t) {\n return t === w || t === x;\n }\n\n function d(t, e) {\n return t === e ? t : w && p(t) ? w : null;\n }\n\n function f(t, e, n) {\n this.observer = t, this.target = e, this.options = n, this.transientObservedNodes = [];\n }\n\n if (!t.JsMutationObserver) {\n var g,\n m = new WeakMap();\n if (/Trident|Edge/.test(navigator.userAgent)) g = setTimeout;else if (window.setImmediate) g = window.setImmediate;else {\n var v = [],\n y = String(Math.random());\n window.addEventListener(\"message\", function (t) {\n if (t.data === y) {\n var e = v;\n v = [], e.forEach(function (t) {\n t();\n });\n }\n }), g = function g(t) {\n v.push(t), window.postMessage(y, \"*\");\n };\n }\n var b = !1,\n A = [],\n C = 0;\n s.prototype = {\n observe: function observe(t, e) {\n if (t = n(t), !e.childList && !e.attributes && !e.characterData || e.attributeOldValue && !e.attributes || e.attributeFilter && e.attributeFilter.length && !e.attributes || e.characterDataOldValue && !e.characterData) throw new SyntaxError();\n var i = m.get(t);\n i || m.set(t, i = []);\n\n for (var o, r = 0; r < i.length; r++) {\n if (i[r].observer === this) {\n o = i[r], o.removeListeners(), o.options = e;\n break;\n }\n }\n\n o || (o = new f(this, t, e), i.push(o), this.nodes_.push(t)), o.addListeners();\n },\n disconnect: function disconnect() {\n this.nodes_.forEach(function (t) {\n for (var e = m.get(t), n = 0; n < e.length; n++) {\n var i = e[n];\n\n if (i.observer === this) {\n i.removeListeners(), e.splice(n, 1);\n break;\n }\n }\n }, this), this.records_ = [];\n },\n takeRecords: function takeRecords() {\n var t = this.records_;\n return this.records_ = [], t;\n }\n };\n var x, w;\n f.prototype = {\n enqueue: function enqueue(t) {\n var n = this.observer.records_,\n i = n.length;\n\n if (n.length > 0) {\n var o = n[i - 1],\n r = d(o, t);\n if (r) return void (n[i - 1] = r);\n } else e(this.observer);\n\n n[i] = t;\n },\n addListeners: function addListeners() {\n this.addListeners_(this.target);\n },\n addListeners_: function addListeners_(t) {\n var e = this.options;\n e.attributes && t.addEventListener(\"DOMAttrModified\", this, !0), e.characterData && t.addEventListener(\"DOMCharacterDataModified\", this, !0), e.childList && t.addEventListener(\"DOMNodeInserted\", this, !0), (e.childList || e.subtree) && t.addEventListener(\"DOMNodeRemoved\", this, !0);\n },\n removeListeners: function removeListeners() {\n this.removeListeners_(this.target);\n },\n removeListeners_: function removeListeners_(t) {\n var e = this.options;\n e.attributes && t.removeEventListener(\"DOMAttrModified\", this, !0), e.characterData && t.removeEventListener(\"DOMCharacterDataModified\", this, !0), e.childList && t.removeEventListener(\"DOMNodeInserted\", this, !0), (e.childList || e.subtree) && t.removeEventListener(\"DOMNodeRemoved\", this, !0);\n },\n addTransientObserver: function addTransientObserver(t) {\n if (t !== this.target) {\n this.addListeners_(t), this.transientObservedNodes.push(t);\n var e = m.get(t);\n e || m.set(t, e = []), e.push(this);\n }\n },\n removeTransientObservers: function removeTransientObservers() {\n var t = this.transientObservedNodes;\n this.transientObservedNodes = [], t.forEach(function (t) {\n this.removeListeners_(t);\n\n for (var e = m.get(t), n = 0; n < e.length; n++) {\n if (e[n] === this) {\n e.splice(n, 1);\n break;\n }\n }\n }, this);\n },\n handleEvent: function handleEvent(t) {\n switch (t.stopImmediatePropagation(), t.type) {\n case \"DOMAttrModified\":\n var e = t.attrName,\n n = t.relatedNode.namespaceURI,\n i = t.target,\n o = new c(\"attributes\", i);\n o.attributeName = e, o.attributeNamespace = n;\n var s = t.attrChange === MutationEvent.ADDITION ? null : t.prevValue;\n r(i, function (t) {\n return !t.attributes || t.attributeFilter && t.attributeFilter.length && -1 === t.attributeFilter.indexOf(e) && -1 === t.attributeFilter.indexOf(n) ? void 0 : t.attributeOldValue ? l(s) : o;\n });\n break;\n\n case \"DOMCharacterDataModified\":\n var i = t.target,\n o = c(\"characterData\", i),\n s = t.prevValue;\n r(i, function (t) {\n return t.characterData ? t.characterDataOldValue ? l(s) : o : void 0;\n });\n break;\n\n case \"DOMNodeRemoved\":\n this.addTransientObserver(t.target);\n\n case \"DOMNodeInserted\":\n var a,\n u,\n p = t.target;\n \"DOMNodeInserted\" === t.type ? (a = [p], u = []) : (a = [], u = [p]);\n var d = p.previousSibling,\n f = p.nextSibling,\n o = c(\"childList\", t.target.parentNode);\n o.addedNodes = a, o.removedNodes = u, o.previousSibling = d, o.nextSibling = f, r(t.relatedNode, function (t) {\n return t.childList ? o : void 0;\n });\n }\n\n h();\n }\n }, t.JsMutationObserver = s, t.MutationObserver || (t.MutationObserver = s, s._isPolyfilled = !0);\n }\n }(self), function () {\n \"use strict\";\n\n if (!window.performance || !window.performance.now) {\n var t = Date.now();\n window.performance = {\n now: function now() {\n return Date.now() - t;\n }\n };\n }\n\n window.requestAnimationFrame || (window.requestAnimationFrame = function () {\n var t = window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame;\n return t ? function (e) {\n return t(function () {\n e(performance.now());\n });\n } : function (t) {\n return window.setTimeout(t, 1e3 / 60);\n };\n }()), window.cancelAnimationFrame || (window.cancelAnimationFrame = function () {\n return window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || function (t) {\n clearTimeout(t);\n };\n }());\n\n var e = function () {\n var t = document.createEvent(\"Event\");\n return t.initEvent(\"foo\", !0, !0), t.preventDefault(), t.defaultPrevented;\n }();\n\n if (!e) {\n var n = Event.prototype.preventDefault;\n\n Event.prototype.preventDefault = function () {\n this.cancelable && (n.call(this), Object.defineProperty(this, \"defaultPrevented\", {\n get: function get() {\n return !0;\n },\n configurable: !0\n }));\n };\n }\n\n var i = /Trident/.test(navigator.userAgent);\n\n if ((!window.CustomEvent || i && \"function\" != typeof window.CustomEvent) && (window.CustomEvent = function (t, e) {\n e = e || {};\n var n = document.createEvent(\"CustomEvent\");\n return n.initCustomEvent(t, Boolean(e.bubbles), Boolean(e.cancelable), e.detail), n;\n }, window.CustomEvent.prototype = window.Event.prototype), !window.Event || i && \"function\" != typeof window.Event) {\n var o = window.Event;\n window.Event = function (t, e) {\n e = e || {};\n var n = document.createEvent(\"Event\");\n return n.initEvent(t, Boolean(e.bubbles), Boolean(e.cancelable)), n;\n }, window.Event.prototype = o.prototype;\n }\n }(window.WebComponents), window.CustomElements = window.CustomElements || {\n flags: {}\n }, function (t) {\n var e = t.flags,\n n = [],\n i = function i(t) {\n n.push(t);\n },\n o = function o() {\n n.forEach(function (e) {\n e(t);\n });\n };\n\n t.addModule = i, t.initializeModules = o, t.hasNative = Boolean(document.registerElement), t.isIE = /Trident/.test(navigator.userAgent), t.useNative = !e.register && t.hasNative && !window.ShadowDOMPolyfill && (!window.HTMLImports || window.HTMLImports.useNative);\n }(window.CustomElements), window.CustomElements.addModule(function (t) {\n function e(t, e) {\n n(t, function (t) {\n return e(t) ? !0 : void i(t, e);\n }), i(t, e);\n }\n\n function n(t, e, i) {\n var o = t.firstElementChild;\n if (!o) for (o = t.firstChild; o && o.nodeType !== Node.ELEMENT_NODE;) {\n o = o.nextSibling;\n }\n\n for (; o;) {\n e(o, i) !== !0 && n(o, e, i), o = o.nextElementSibling;\n }\n\n return null;\n }\n\n function i(t, n) {\n for (var i = t.shadowRoot; i;) {\n e(i, n), i = i.olderShadowRoot;\n }\n }\n\n function o(t, e) {\n r(t, e, []);\n }\n\n function r(t, e, n) {\n if (t = window.wrap(t), !(n.indexOf(t) >= 0)) {\n n.push(t);\n\n for (var i, o = t.querySelectorAll(\"link[rel=\" + s + \"]\"), a = 0, u = o.length; u > a && (i = o[a]); a++) {\n i.import && r(i.import, e, n);\n }\n\n e(t);\n }\n }\n\n var s = window.HTMLImports ? window.HTMLImports.IMPORT_LINK_TYPE : \"none\";\n t.forDocumentTree = o, t.forSubtree = e;\n }), window.CustomElements.addModule(function (t) {\n function e(t, e) {\n return n(t, e) || i(t, e);\n }\n\n function n(e, n) {\n return t.upgrade(e, n) ? !0 : void (n && s(e));\n }\n\n function i(t, e) {\n b(t, function (t) {\n return n(t, e) ? !0 : void 0;\n });\n }\n\n function o(t) {\n w.push(t), x || (x = !0, setTimeout(r));\n }\n\n function r() {\n x = !1;\n\n for (var t, e = w, n = 0, i = e.length; i > n && (t = e[n]); n++) {\n t();\n }\n\n w = [];\n }\n\n function s(t) {\n C ? o(function () {\n a(t);\n }) : a(t);\n }\n\n function a(t) {\n t.__upgraded__ && !t.__attached && (t.__attached = !0, t.attachedCallback && t.attachedCallback());\n }\n\n function u(t) {\n c(t), b(t, function (t) {\n c(t);\n });\n }\n\n function c(t) {\n C ? o(function () {\n l(t);\n }) : l(t);\n }\n\n function l(t) {\n t.__upgraded__ && t.__attached && (t.__attached = !1, t.detachedCallback && t.detachedCallback());\n }\n\n function h(t) {\n for (var e = t, n = window.wrap(document); e;) {\n if (e == n) return !0;\n e = e.parentNode || e.nodeType === Node.DOCUMENT_FRAGMENT_NODE && e.host;\n }\n }\n\n function p(t) {\n if (t.shadowRoot && !t.shadowRoot.__watched) {\n y.dom && console.log(\"watching shadow-root for: \", t.localName);\n\n for (var e = t.shadowRoot; e;) {\n g(e), e = e.olderShadowRoot;\n }\n }\n }\n\n function d(t, n) {\n if (y.dom) {\n var i = n[0];\n\n if (i && \"childList\" === i.type && i.addedNodes && i.addedNodes) {\n for (var o = i.addedNodes[0]; o && o !== document && !o.host;) {\n o = o.parentNode;\n }\n\n var r = o && (o.URL || o._URL || o.host && o.host.localName) || \"\";\n r = r.split(\"/?\").shift().split(\"/\").pop();\n }\n\n console.group(\"mutations (%d) [%s]\", n.length, r || \"\");\n }\n\n var s = h(t);\n n.forEach(function (t) {\n \"childList\" === t.type && (E(t.addedNodes, function (t) {\n t.localName && e(t, s);\n }), E(t.removedNodes, function (t) {\n t.localName && u(t);\n }));\n }), y.dom && console.groupEnd();\n }\n\n function f(t) {\n for (t = window.wrap(t), t || (t = window.wrap(document)); t.parentNode;) {\n t = t.parentNode;\n }\n\n var e = t.__observer;\n e && (d(t, e.takeRecords()), r());\n }\n\n function g(t) {\n if (!t.__observer) {\n var e = new MutationObserver(d.bind(this, t));\n e.observe(t, {\n childList: !0,\n subtree: !0\n }), t.__observer = e;\n }\n }\n\n function m(t) {\n t = window.wrap(t), y.dom && console.group(\"upgradeDocument: \", t.baseURI.split(\"/\").pop());\n var n = t === window.wrap(document);\n e(t, n), g(t), y.dom && console.groupEnd();\n }\n\n function v(t) {\n A(t, m);\n }\n\n var y = t.flags,\n b = t.forSubtree,\n A = t.forDocumentTree,\n C = window.MutationObserver._isPolyfilled && y[\"throttle-attached\"];\n t.hasPolyfillMutations = C, t.hasThrottledAttached = C;\n var x = !1,\n w = [],\n E = Array.prototype.forEach.call.bind(Array.prototype.forEach),\n S = Element.prototype.createShadowRoot;\n S && (Element.prototype.createShadowRoot = function () {\n var t = S.call(this);\n return window.CustomElements.watchShadow(this), t;\n }), t.watchShadow = p, t.upgradeDocumentTree = v, t.upgradeDocument = m, t.upgradeSubtree = i, t.upgradeAll = e, t.attached = s, t.takeRecords = f;\n }), window.CustomElements.addModule(function (t) {\n function e(e, i) {\n if (\"template\" === e.localName && window.HTMLTemplateElement && HTMLTemplateElement.decorate && HTMLTemplateElement.decorate(e), !e.__upgraded__ && e.nodeType === Node.ELEMENT_NODE) {\n var o = e.getAttribute(\"is\"),\n r = t.getRegisteredDefinition(e.localName) || t.getRegisteredDefinition(o);\n if (r && (o && r.tag == e.localName || !o && !r.extends)) return n(e, r, i);\n }\n }\n\n function n(e, n, o) {\n return s.upgrade && console.group(\"upgrade:\", e.localName), n.is && e.setAttribute(\"is\", n.is), i(e, n), e.__upgraded__ = !0, r(e), o && t.attached(e), t.upgradeSubtree(e, o), s.upgrade && console.groupEnd(), e;\n }\n\n function i(t, e) {\n Object.__proto__ ? t.__proto__ = e.prototype : (o(t, e.prototype, e.native), t.__proto__ = e.prototype);\n }\n\n function o(t, e, n) {\n for (var i = {}, o = e; o !== n && o !== HTMLElement.prototype;) {\n for (var r, s = Object.getOwnPropertyNames(o), a = 0; r = s[a]; a++) {\n i[r] || (Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(o, r)), i[r] = 1);\n }\n\n o = Object.getPrototypeOf(o);\n }\n }\n\n function r(t) {\n t.createdCallback && t.createdCallback();\n }\n\n var s = t.flags;\n t.upgrade = e, t.upgradeWithDefinition = n, t.implementPrototype = i;\n }), window.CustomElements.addModule(function (t) {\n function e(e, i) {\n var u = i || {};\n if (!e) throw new Error(\"document.registerElement: first argument `name` must not be empty\");\n if (e.indexOf(\"-\") < 0) throw new Error(\"document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '\" + String(e) + \"'.\");\n if (o(e)) throw new Error(\"Failed to execute 'registerElement' on 'Document': Registration failed for type '\" + String(e) + \"'. The type name is invalid.\");\n if (c(e)) throw new Error(\"DuplicateDefinitionError: a type with name '\" + String(e) + \"' is already registered\");\n return u.prototype || (u.prototype = Object.create(HTMLElement.prototype)), u.__name = e.toLowerCase(), u.extends && (u.extends = u.extends.toLowerCase()), u.lifecycle = u.lifecycle || {}, u.ancestry = r(u.extends), s(u), a(u), n(u.prototype), l(u.__name, u), u.ctor = h(u), u.ctor.prototype = u.prototype, u.prototype.constructor = u.ctor, t.ready && m(document), u.ctor;\n }\n\n function n(t) {\n if (!t.setAttribute._polyfilled) {\n var e = t.setAttribute;\n\n t.setAttribute = function (t, n) {\n i.call(this, t, n, e);\n };\n\n var n = t.removeAttribute;\n t.removeAttribute = function (t) {\n i.call(this, t, null, n);\n }, t.setAttribute._polyfilled = !0;\n }\n }\n\n function i(t, e, n) {\n t = t.toLowerCase();\n var i = this.getAttribute(t);\n n.apply(this, arguments);\n var o = this.getAttribute(t);\n this.attributeChangedCallback && o !== i && this.attributeChangedCallback(t, i, o);\n }\n\n function o(t) {\n for (var e = 0; e < C.length; e++) {\n if (t === C[e]) return !0;\n }\n }\n\n function r(t) {\n var e = c(t);\n return e ? r(e.extends).concat([e]) : [];\n }\n\n function s(t) {\n for (var e, n = t.extends, i = 0; e = t.ancestry[i]; i++) {\n n = e.is && e.tag;\n }\n\n t.tag = n || t.__name, n && (t.is = t.__name);\n }\n\n function a(t) {\n if (!Object.__proto__) {\n var e = HTMLElement.prototype;\n\n if (t.is) {\n var n = document.createElement(t.tag);\n e = Object.getPrototypeOf(n);\n }\n\n for (var i, o = t.prototype, r = !1; o;) {\n o == e && (r = !0), i = Object.getPrototypeOf(o), i && (o.__proto__ = i), o = i;\n }\n\n r || console.warn(t.tag + \" prototype not found in prototype chain for \" + t.is), t.native = e;\n }\n }\n\n function u(t) {\n return y(E(t.tag), t);\n }\n\n function c(t) {\n return t ? x[t.toLowerCase()] : void 0;\n }\n\n function l(t, e) {\n x[t] = e;\n }\n\n function h(t) {\n return function () {\n return u(t);\n };\n }\n\n function p(t, e, n) {\n return t === w ? d(e, n) : S(t, e);\n }\n\n function d(t, e) {\n t && (t = t.toLowerCase()), e && (e = e.toLowerCase());\n var n = c(e || t);\n\n if (n) {\n if (t == n.tag && e == n.is) return new n.ctor();\n if (!e && !n.is) return new n.ctor();\n }\n\n var i;\n return e ? (i = d(t), i.setAttribute(\"is\", e), i) : (i = E(t), t.indexOf(\"-\") >= 0 && b(i, HTMLElement), i);\n }\n\n function f(t, e) {\n var n = t[e];\n\n t[e] = function () {\n var t = n.apply(this, arguments);\n return v(t), t;\n };\n }\n\n var g,\n m = (t.isIE, t.upgradeDocumentTree),\n v = t.upgradeAll,\n y = t.upgradeWithDefinition,\n b = t.implementPrototype,\n A = t.useNative,\n C = [\"annotation-xml\", \"color-profile\", \"font-face\", \"font-face-src\", \"font-face-uri\", \"font-face-format\", \"font-face-name\", \"missing-glyph\"],\n x = {},\n w = \"http://www.w3.org/1999/xhtml\",\n E = document.createElement.bind(document),\n S = document.createElementNS.bind(document);\n g = Object.__proto__ || A ? function (t, e) {\n return t instanceof e;\n } : function (t, e) {\n if (t instanceof e) return !0;\n\n for (var n = t; n;) {\n if (n === e.prototype) return !0;\n n = n.__proto__;\n }\n\n return !1;\n }, f(Node.prototype, \"cloneNode\"), f(document, \"importNode\"), document.registerElement = e, document.createElement = d, document.createElementNS = p, t.registry = x, t.instanceof = g, t.reservedTagList = C, t.getRegisteredDefinition = c, document.register = document.registerElement;\n }), function (t) {\n function e() {\n r(window.wrap(document)), window.CustomElements.ready = !0;\n\n var t = window.requestAnimationFrame || function (t) {\n setTimeout(t, 16);\n };\n\n t(function () {\n setTimeout(function () {\n window.CustomElements.readyTime = Date.now(), window.HTMLImports && (window.CustomElements.elapsed = window.CustomElements.readyTime - window.HTMLImports.readyTime), document.dispatchEvent(new CustomEvent(\"WebComponentsReady\", {\n bubbles: !0\n }));\n });\n });\n }\n\n var n = t.useNative,\n i = t.initializeModules;\n\n if (t.isIE, n) {\n var o = function o() {};\n\n t.watchShadow = o, t.upgrade = o, t.upgradeAll = o, t.upgradeDocumentTree = o, t.upgradeSubtree = o, t.takeRecords = o, t.instanceof = function (t, e) {\n return t instanceof e;\n };\n } else i();\n\n var r = t.upgradeDocumentTree,\n s = t.upgradeDocument;\n if (window.wrap || (window.ShadowDOMPolyfill ? (window.wrap = window.ShadowDOMPolyfill.wrapIfNeeded, window.unwrap = window.ShadowDOMPolyfill.unwrapIfNeeded) : window.wrap = window.unwrap = function (t) {\n return t;\n }), window.HTMLImports && (window.HTMLImports.__importsParsingHook = function (t) {\n t.import && s(wrap(t.import));\n }), \"complete\" === document.readyState || t.flags.eager) e();else if (\"interactive\" !== document.readyState || window.attachEvent || window.HTMLImports && !window.HTMLImports.ready) {\n var a = window.HTMLImports && !window.HTMLImports.ready ? \"HTMLImportsLoaded\" : \"DOMContentLoaded\";\n window.addEventListener(a, e);\n } else e();\n }(window.CustomElements));\n}.call(this), function () {}.call(this), function () {\n var t = this;\n (function () {\n (function () {\n this.Trix = {\n VERSION: \"1.3.1\",\n ZERO_WIDTH_SPACE: \"\\uFEFF\",\n NON_BREAKING_SPACE: \"\\xa0\",\n OBJECT_REPLACEMENT_CHARACTER: \"\\uFFFC\",\n browser: {\n composesExistingText: /Android.*Chrome/.test(navigator.userAgent),\n forcesObjectResizing: /Trident.*rv:11/.test(navigator.userAgent),\n supportsInputEvents: function () {\n var t, e, n, i;\n if (\"undefined\" == typeof InputEvent) return !1;\n\n for (i = [\"data\", \"getTargetRanges\", \"inputType\"], t = 0, e = i.length; e > t; t++) {\n if (n = i[t], !(n in InputEvent.prototype)) return !1;\n }\n\n return !0;\n }()\n },\n config: {}\n };\n }).call(this);\n }).call(t);\n var e = t.Trix;\n (function () {\n (function () {\n e.BasicObject = function () {\n function t() {}\n\n var e, n, i;\n return t.proxyMethod = function (t) {\n var i, o, r, s, a;\n return r = n(t), i = r.name, s = r.toMethod, a = r.toProperty, o = r.optional, this.prototype[i] = function () {\n var t, n;\n return t = null != s ? o ? \"function\" == typeof this[s] ? this[s]() : void 0 : this[s]() : null != a ? this[a] : void 0, o ? (n = null != t ? t[i] : void 0, null != n ? e.call(n, t, arguments) : void 0) : (n = t[i], e.call(n, t, arguments));\n };\n }, n = function n(t) {\n var e, n;\n if (!(n = t.match(i))) throw new Error(\"can't parse @proxyMethod expression: \" + t);\n return e = {\n name: n[4]\n }, null != n[2] ? e.toMethod = n[1] : e.toProperty = n[1], null != n[3] && (e.optional = !0), e;\n }, e = Function.prototype.apply, i = /^(.+?)(\\(\\))?(\\?)?\\.(.+?)$/, t;\n }();\n }).call(this), function () {\n var t = function t(_t, e) {\n function i() {\n this.constructor = _t;\n }\n\n for (var o in e) {\n n.call(e, o) && (_t[o] = e[o]);\n }\n\n return i.prototype = e.prototype, _t.prototype = new i(), _t.__super__ = e.prototype, _t;\n },\n n = {}.hasOwnProperty;\n\n e.Object = function (n) {\n function i() {\n this.id = ++o;\n }\n\n var o;\n return t(i, n), o = 0, i.fromJSONString = function (t) {\n return this.fromJSON(JSON.parse(t));\n }, i.prototype.hasSameConstructorAs = function (t) {\n return this.constructor === (null != t ? t.constructor : void 0);\n }, i.prototype.isEqualTo = function (t) {\n return this === t;\n }, i.prototype.inspect = function () {\n var t, e, n;\n return t = function () {\n var t, i, o;\n i = null != (t = this.contentsForInspection()) ? t : {}, o = [];\n\n for (e in i) {\n n = i[e], o.push(e + \"=\" + n);\n }\n\n return o;\n }.call(this), \"#<\" + this.constructor.name + \":\" + this.id + (t.length ? \" \" + t.join(\", \") : \"\") + \">\";\n }, i.prototype.contentsForInspection = function () {}, i.prototype.toJSONString = function () {\n return JSON.stringify(this);\n }, i.prototype.toUTF16String = function () {\n return e.UTF16String.box(this);\n }, i.prototype.getCacheKey = function () {\n return this.id.toString();\n }, i;\n }(e.BasicObject);\n }.call(this), function () {\n e.extend = function (t) {\n var e, n;\n\n for (e in t) {\n n = t[e], this[e] = n;\n }\n\n return this;\n };\n }.call(this), function () {\n e.extend({\n defer: function defer(t) {\n return setTimeout(t, 1);\n }\n });\n }.call(this), function () {\n var t, n;\n e.extend({\n normalizeSpaces: function normalizeSpaces(t) {\n return t.replace(RegExp(\"\" + e.ZERO_WIDTH_SPACE, \"g\"), \"\").replace(RegExp(\"\" + e.NON_BREAKING_SPACE, \"g\"), \" \");\n },\n normalizeNewlines: function normalizeNewlines(t) {\n return t.replace(/\\r\\n/g, \"\\n\");\n },\n breakableWhitespacePattern: RegExp(\"[^\\\\S\" + e.NON_BREAKING_SPACE + \"]\"),\n squishBreakableWhitespace: function squishBreakableWhitespace(t) {\n return t.replace(RegExp(\"\" + e.breakableWhitespacePattern.source, \"g\"), \" \").replace(/\\ {2,}/g, \" \");\n },\n summarizeStringChange: function summarizeStringChange(t, i) {\n var o, r, s, a;\n return t = e.UTF16String.box(t), i = e.UTF16String.box(i), i.length < t.length ? (r = n(t, i), a = r[0], o = r[1]) : (s = n(i, t), o = s[0], a = s[1]), {\n added: o,\n removed: a\n };\n }\n }), n = function n(_n, i) {\n var o, r, s, a, u;\n return _n.isEqualTo(i) ? [\"\", \"\"] : (r = t(_n, i), a = r.utf16String.length, s = a ? (u = r.offset, r, o = _n.codepoints.slice(0, u).concat(_n.codepoints.slice(u + a)), t(i, e.UTF16String.fromCodepoints(o))) : t(i, _n), [r.utf16String.toString(), s.utf16String.toString()]);\n }, t = function t(_t2, e) {\n var n, i, o;\n\n for (n = 0, i = _t2.length, o = e.length; i > n && _t2.charAt(n).isEqualTo(e.charAt(n));) {\n n++;\n }\n\n for (; i > n + 1 && _t2.charAt(i - 1).isEqualTo(e.charAt(o - 1));) {\n i--, o--;\n }\n\n return {\n utf16String: _t2.slice(n, i),\n offset: n\n };\n };\n }.call(this), function () {\n e.extend({\n copyObject: function copyObject(t) {\n var e, n, i;\n null == t && (t = {}), n = {};\n\n for (e in t) {\n i = t[e], n[e] = i;\n }\n\n return n;\n },\n objectsAreEqual: function objectsAreEqual(t, e) {\n var n, i;\n if (null == t && (t = {}), null == e && (e = {}), Object.keys(t).length !== Object.keys(e).length) return !1;\n\n for (n in t) {\n if (i = t[n], i !== e[n]) return !1;\n }\n\n return !0;\n }\n });\n }.call(this), function () {\n var t = [].slice;\n e.extend({\n arraysAreEqual: function arraysAreEqual(t, e) {\n var n, i, o, r;\n if (null == t && (t = []), null == e && (e = []), t.length !== e.length) return !1;\n\n for (i = n = 0, o = t.length; o > n; i = ++n) {\n if (r = t[i], r !== e[i]) return !1;\n }\n\n return !0;\n },\n arrayStartsWith: function arrayStartsWith(t, n) {\n return null == t && (t = []), null == n && (n = []), e.arraysAreEqual(t.slice(0, n.length), n);\n },\n spliceArray: function spliceArray() {\n var e, n, i;\n return n = arguments[0], e = 2 <= arguments.length ? t.call(arguments, 1) : [], i = n.slice(0), i.splice.apply(i, e), i;\n },\n summarizeArrayChange: function summarizeArrayChange(t, e) {\n var n, i, o, r, s, a, u, c, l, h, p;\n\n for (null == t && (t = []), null == e && (e = []), n = [], h = [], o = new Set(), r = 0, u = t.length; u > r; r++) {\n p = t[r], o.add(p);\n }\n\n for (i = new Set(), s = 0, c = e.length; c > s; s++) {\n p = e[s], i.add(p), o.has(p) || n.push(p);\n }\n\n for (a = 0, l = t.length; l > a; a++) {\n p = t[a], i.has(p) || h.push(p);\n }\n\n return {\n added: n,\n removed: h\n };\n }\n });\n }.call(this), function () {\n var t, n, i, o;\n t = null, n = null, o = null, i = null, e.extend({\n getAllAttributeNames: function getAllAttributeNames() {\n return null != t ? t : t = e.getTextAttributeNames().concat(e.getBlockAttributeNames());\n },\n getBlockConfig: function getBlockConfig(t) {\n return e.config.blockAttributes[t];\n },\n getBlockAttributeNames: function getBlockAttributeNames() {\n return null != n ? n : n = Object.keys(e.config.blockAttributes);\n },\n getTextConfig: function getTextConfig(t) {\n return e.config.textAttributes[t];\n },\n getTextAttributeNames: function getTextAttributeNames() {\n return null != o ? o : o = Object.keys(e.config.textAttributes);\n },\n getListAttributeNames: function getListAttributeNames() {\n var t, n;\n return null != i ? i : i = function () {\n var i, o;\n i = e.config.blockAttributes, o = [];\n\n for (t in i) {\n n = i[t].listAttribute, null != n && o.push(n);\n }\n\n return o;\n }();\n }\n });\n }.call(this), function () {\n var t,\n n,\n i,\n o,\n r,\n s = [].indexOf || function (t) {\n for (var e = 0, n = this.length; n > e; e++) {\n if (e in this && this[e] === t) return e;\n }\n\n return -1;\n };\n\n t = document.documentElement, n = null != (i = null != (o = null != (r = t.matchesSelector) ? r : t.webkitMatchesSelector) ? o : t.msMatchesSelector) ? i : t.mozMatchesSelector, e.extend({\n handleEvent: function handleEvent(n, i) {\n var o, r, _s, a, u, c, l, h, p, d, f, g;\n\n return h = null != i ? i : {}, c = h.onElement, u = h.matchingSelector, g = h.withCallback, a = h.inPhase, l = h.preventDefault, d = h.times, r = null != c ? c : t, p = u, o = g, f = \"capturing\" === a, _s = function s(t) {\n var n;\n return null != d && 0 === --d && _s.destroy(), n = e.findClosestElementFromNode(t.target, {\n matchingSelector: p\n }), null != n && (null != g && g.call(n, t, n), l) ? t.preventDefault() : void 0;\n }, _s.destroy = function () {\n return r.removeEventListener(n, _s, f);\n }, r.addEventListener(n, _s, f), _s;\n },\n handleEventOnce: function handleEventOnce(t, n) {\n return null == n && (n = {}), n.times = 1, e.handleEvent(t, n);\n },\n triggerEvent: function triggerEvent(n, i) {\n var o, r, s, a, u, c, l;\n return l = null != i ? i : {}, c = l.onElement, r = l.bubbles, s = l.cancelable, o = l.attributes, a = null != c ? c : t, r = r !== !1, s = s !== !1, u = document.createEvent(\"Events\"), u.initEvent(n, r, s), null != o && e.extend.call(u, o), a.dispatchEvent(u);\n },\n elementMatchesSelector: function elementMatchesSelector(t, e) {\n return 1 === (null != t ? t.nodeType : void 0) ? n.call(t, e) : void 0;\n },\n findClosestElementFromNode: function findClosestElementFromNode(t, n) {\n var i, o, r;\n\n for (o = null != n ? n : {}, i = o.matchingSelector, r = o.untilNode; null != t && t.nodeType !== Node.ELEMENT_NODE;) {\n t = t.parentNode;\n }\n\n if (null != t) {\n if (null == i) return t;\n if (t.closest && null == r) return t.closest(i);\n\n for (; t && t !== r;) {\n if (e.elementMatchesSelector(t, i)) return t;\n t = t.parentNode;\n }\n }\n },\n findInnerElement: function findInnerElement(t) {\n for (; null != t ? t.firstElementChild : void 0;) {\n t = t.firstElementChild;\n }\n\n return t;\n },\n innerElementIsActive: function innerElementIsActive(t) {\n return document.activeElement !== t && e.elementContainsNode(t, document.activeElement);\n },\n elementContainsNode: function elementContainsNode(t, e) {\n if (t && e) for (; e;) {\n if (e === t) return !0;\n e = e.parentNode;\n }\n },\n findNodeFromContainerAndOffset: function findNodeFromContainerAndOffset(t, e) {\n var n;\n if (t) return t.nodeType === Node.TEXT_NODE ? t : 0 === e ? null != (n = t.firstChild) ? n : t : t.childNodes.item(e - 1);\n },\n findElementFromContainerAndOffset: function findElementFromContainerAndOffset(t, n) {\n var i;\n return i = e.findNodeFromContainerAndOffset(t, n), e.findClosestElementFromNode(i);\n },\n findChildIndexOfNode: function findChildIndexOfNode(t) {\n var e;\n\n if (null != t ? t.parentNode : void 0) {\n for (e = 0; t = t.previousSibling;) {\n e++;\n }\n\n return e;\n }\n },\n removeNode: function removeNode(t) {\n var e;\n return null != t && null != (e = t.parentNode) ? e.removeChild(t) : void 0;\n },\n walkTree: function walkTree(t, e) {\n var n, i, o, r, s;\n return o = null != e ? e : {}, i = o.onlyNodesOfType, r = o.usingFilter, n = o.expandEntityReferences, s = function () {\n switch (i) {\n case \"element\":\n return NodeFilter.SHOW_ELEMENT;\n\n case \"text\":\n return NodeFilter.SHOW_TEXT;\n\n case \"comment\":\n return NodeFilter.SHOW_COMMENT;\n\n default:\n return NodeFilter.SHOW_ALL;\n }\n }(), document.createTreeWalker(t, s, null != r ? r : null, n === !0);\n },\n tagName: function tagName(t) {\n var e;\n return null != t && null != (e = t.tagName) ? e.toLowerCase() : void 0;\n },\n makeElement: function makeElement(t, e) {\n var n, i, o, r, s, a, u, c, l, h, p, d, f, g;\n\n if (null == e && (e = {}), \"object\" == _typeof(t) ? (e = t, t = e.tagName) : e = {\n attributes: e\n }, o = document.createElement(t), null != e.editable && (null == e.attributes && (e.attributes = {}), e.attributes.contenteditable = e.editable), e.attributes) {\n l = e.attributes;\n\n for (a in l) {\n g = l[a], o.setAttribute(a, g);\n }\n }\n\n if (e.style) {\n h = e.style;\n\n for (a in h) {\n g = h[a], o.style[a] = g;\n }\n }\n\n if (e.data) {\n p = e.data;\n\n for (a in p) {\n g = p[a], o.dataset[a] = g;\n }\n }\n\n if (e.className) for (d = e.className.split(\" \"), r = 0, u = d.length; u > r; r++) {\n i = d[r], o.classList.add(i);\n }\n if (e.textContent && (o.textContent = e.textContent), e.childNodes) for (f = [].concat(e.childNodes), s = 0, c = f.length; c > s; s++) {\n n = f[s], o.appendChild(n);\n }\n return o;\n },\n getBlockTagNames: function getBlockTagNames() {\n var t, n;\n return null != e.blockTagNames ? e.blockTagNames : e.blockTagNames = function () {\n var i, o;\n i = e.config.blockAttributes, o = [];\n\n for (t in i) {\n n = i[t].tagName, n && o.push(n);\n }\n\n return o;\n }();\n },\n nodeIsBlockContainer: function nodeIsBlockContainer(t) {\n return e.nodeIsBlockStartComment(null != t ? t.firstChild : void 0);\n },\n nodeProbablyIsBlockContainer: function nodeProbablyIsBlockContainer(t) {\n var n, i;\n return n = e.tagName(t), s.call(e.getBlockTagNames(), n) >= 0 && (i = e.tagName(t.firstChild), s.call(e.getBlockTagNames(), i) < 0);\n },\n nodeIsBlockStart: function nodeIsBlockStart(t, n) {\n var i;\n return i = (null != n ? n : {\n strict: !0\n }).strict, i ? e.nodeIsBlockStartComment(t) : e.nodeIsBlockStartComment(t) || !e.nodeIsBlockStartComment(t.firstChild) && e.nodeProbablyIsBlockContainer(t);\n },\n nodeIsBlockStartComment: function nodeIsBlockStartComment(t) {\n return e.nodeIsCommentNode(t) && \"block\" === (null != t ? t.data : void 0);\n },\n nodeIsCommentNode: function nodeIsCommentNode(t) {\n return (null != t ? t.nodeType : void 0) === Node.COMMENT_NODE;\n },\n nodeIsCursorTarget: function nodeIsCursorTarget(t, n) {\n var i;\n return i = (null != n ? n : {}).name, t ? e.nodeIsTextNode(t) ? t.data === e.ZERO_WIDTH_SPACE ? i ? t.parentNode.dataset.trixCursorTarget === i : !0 : void 0 : e.nodeIsCursorTarget(t.firstChild) : void 0;\n },\n nodeIsAttachmentElement: function nodeIsAttachmentElement(t) {\n return e.elementMatchesSelector(t, e.AttachmentView.attachmentSelector);\n },\n nodeIsEmptyTextNode: function nodeIsEmptyTextNode(t) {\n return e.nodeIsTextNode(t) && \"\" === (null != t ? t.data : void 0);\n },\n nodeIsTextNode: function nodeIsTextNode(t) {\n return (null != t ? t.nodeType : void 0) === Node.TEXT_NODE;\n }\n });\n }.call(this), function () {\n var t, n, i, o, r;\n t = e.copyObject, o = e.objectsAreEqual, e.extend({\n normalizeRange: i = function i(t) {\n var e;\n if (null != t) return Array.isArray(t) || (t = [t, t]), [n(t[0]), n(null != (e = t[1]) ? e : t[0])];\n },\n rangeIsCollapsed: function rangeIsCollapsed(t) {\n var e, n, o;\n if (null != t) return n = i(t), o = n[0], e = n[1], r(o, e);\n },\n rangesAreEqual: function rangesAreEqual(t, e) {\n var n, o, s, a, u, c;\n if (null != t && null != e) return s = i(t), o = s[0], n = s[1], a = i(e), c = a[0], u = a[1], r(o, c) && r(n, u);\n }\n }), n = function n(e) {\n return \"number\" == typeof e ? e : t(e);\n }, r = function r(t, e) {\n return \"number\" == typeof t ? t === e : o(t, e);\n };\n }.call(this), function () {\n var t, n, i, o, r, s, a;\n e.registerElement = function (t, e) {\n var n, i;\n return null == e && (e = {}), t = t.toLowerCase(), e = a(e), i = s(e), (n = i.defaultCSS) && (delete i.defaultCSS, o(n, t)), r(t, i);\n }, o = function o(t, e) {\n var n;\n return n = i(e), n.textContent = t.replace(/%t/g, e);\n }, i = function i(e) {\n var n, i;\n return n = document.createElement(\"style\"), n.setAttribute(\"type\", \"text/css\"), n.setAttribute(\"data-tag-name\", e.toLowerCase()), (i = t()) && n.setAttribute(\"nonce\", i), document.head.insertBefore(n, document.head.firstChild), n;\n }, t = function t() {\n var t;\n return (t = n(\"trix-csp-nonce\") || n(\"csp-nonce\")) ? t.getAttribute(\"content\") : void 0;\n }, n = function n(t) {\n return document.head.querySelector(\"meta[name=\" + t + \"]\");\n }, s = function s(t) {\n var e, n, i;\n n = {};\n\n for (e in t) {\n i = t[e], n[e] = \"function\" == typeof i ? {\n value: i\n } : i;\n }\n\n return n;\n }, a = function () {\n var t;\n return t = function t(_t3) {\n var e, n, i, o, r;\n\n for (e = {}, r = [\"initialize\", \"connect\", \"disconnect\"], n = 0, o = r.length; o > n; n++) {\n i = r[n], e[i] = _t3[i], delete _t3[i];\n }\n\n return e;\n }, window.customElements ? function (e) {\n var n, i, o, r, s;\n return s = t(e), o = s.initialize, n = s.connect, i = s.disconnect, o && (r = n, n = function n() {\n return this.initialized || (this.initialized = !0, o.call(this)), null != r ? r.call(this) : void 0;\n }), n && (e.connectedCallback = n), i && (e.disconnectedCallback = i), e;\n } : function (e) {\n var n, i, o, r;\n return r = t(e), o = r.initialize, n = r.connect, i = r.disconnect, o && (e.createdCallback = o), n && (e.attachedCallback = n), i && (e.detachedCallback = i), e;\n };\n }(), r = function () {\n return window.customElements ? function (t, e) {\n var _n2;\n\n return _n2 = function n() {\n return \"object\" == (typeof Reflect === \"undefined\" ? \"undefined\" : _typeof(Reflect)) ? Reflect.construct(HTMLElement, [], _n2) : HTMLElement.apply(this);\n }, Object.setPrototypeOf(_n2.prototype, HTMLElement.prototype), Object.setPrototypeOf(_n2, HTMLElement), Object.defineProperties(_n2.prototype, e), window.customElements.define(t, _n2), _n2;\n } : function (t, e) {\n var n, i;\n return i = Object.create(HTMLElement.prototype, e), n = document.registerElement(t, {\n prototype: i\n }), Object.defineProperty(i, \"constructor\", {\n value: n\n }), n;\n };\n }();\n }.call(this), function () {\n var t, n;\n e.extend({\n getDOMSelection: function getDOMSelection() {\n var t;\n return t = window.getSelection(), t.rangeCount > 0 ? t : void 0;\n },\n getDOMRange: function getDOMRange() {\n var n, i;\n return (n = null != (i = e.getDOMSelection()) ? i.getRangeAt(0) : void 0) && !t(n) ? n : void 0;\n },\n setDOMRange: function setDOMRange(t) {\n var n;\n return n = window.getSelection(), n.removeAllRanges(), n.addRange(t), e.selectionChangeObserver.update();\n }\n }), t = function t(_t4) {\n return n(_t4.startContainer) || n(_t4.endContainer);\n }, n = function n(t) {\n return !Object.getPrototypeOf(t);\n };\n }.call(this), function () {\n var t;\n t = {\n \"application/x-trix-feature-detection\": \"test\"\n }, e.extend({\n dataTransferIsPlainText: function dataTransferIsPlainText(t) {\n var e, n, i;\n return i = t.getData(\"text/plain\"), n = t.getData(\"text/html\"), i && n ? (e = new DOMParser().parseFromString(n, \"text/html\").body, e.textContent === i ? !e.querySelector(\"*\") : void 0) : null != i ? i.length : void 0;\n },\n dataTransferIsWritable: function dataTransferIsWritable(e) {\n var n, i;\n\n if (null != (null != e ? e.setData : void 0)) {\n for (n in t) {\n if (i = t[n], !function () {\n try {\n return e.setData(n, i), e.getData(n) === i;\n } catch (t) {}\n }()) return;\n }\n\n return !0;\n }\n },\n keyEventIsKeyboardCommand: function () {\n return /Mac|^iP/.test(navigator.platform) ? function (t) {\n return t.metaKey;\n } : function (t) {\n return t.ctrlKey;\n };\n }()\n });\n }.call(this), function () {\n e.extend({\n RTL_PATTERN: /[\\u05BE\\u05C0\\u05C3\\u05D0-\\u05EA\\u05F0-\\u05F4\\u061B\\u061F\\u0621-\\u063A\\u0640-\\u064A\\u066D\\u0671-\\u06B7\\u06BA-\\u06BE\\u06C0-\\u06CE\\u06D0-\\u06D5\\u06E5\\u06E6\\u200F\\u202B\\u202E\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE72\\uFE74\\uFE76-\\uFEFC]/,\n getDirection: function () {\n var t, n, i, o;\n return n = e.makeElement(\"input\", {\n dir: \"auto\",\n name: \"x\",\n dirName: \"x.dir\"\n }), t = e.makeElement(\"form\"), t.appendChild(n), i = function () {\n try {\n return new FormData(t).has(n.dirName);\n } catch (e) {}\n }(), o = function () {\n try {\n return n.matches(\":dir(ltr),:dir(rtl)\");\n } catch (t) {}\n }(), i ? function (e) {\n return n.value = e, new FormData(t).get(n.dirName);\n } : o ? function (t) {\n return n.value = t, n.matches(\":dir(rtl)\") ? \"rtl\" : \"ltr\";\n } : function (t) {\n var n;\n return n = t.trim().charAt(0), e.RTL_PATTERN.test(n) ? \"rtl\" : \"ltr\";\n };\n }()\n });\n }.call(this), function () {}.call(this), function () {\n var t,\n n = function n(t, e) {\n function n() {\n this.constructor = t;\n }\n\n for (var o in e) {\n i.call(e, o) && (t[o] = e[o]);\n }\n\n return n.prototype = e.prototype, t.prototype = new n(), t.__super__ = e.prototype, t;\n },\n i = {}.hasOwnProperty;\n\n t = e.arraysAreEqual, e.Hash = function (i) {\n function o(t) {\n null == t && (t = {}), this.values = s(t), o.__super__.constructor.apply(this, arguments);\n }\n\n var r, s, a, u, c;\n return n(o, i), o.fromCommonAttributesOfObjects = function (t) {\n var e, n, i, o, s, a;\n if (null == t && (t = []), !t.length) return new this();\n\n for (e = r(t[0]), i = e.getKeys(), a = t.slice(1), n = 0, o = a.length; o > n; n++) {\n s = a[n], i = e.getKeysCommonToHash(r(s)), e = e.slice(i);\n }\n\n return e;\n }, o.box = function (t) {\n return r(t);\n }, o.prototype.add = function (t, e) {\n return this.merge(u(t, e));\n }, o.prototype.remove = function (t) {\n return new e.Hash(s(this.values, t));\n }, o.prototype.get = function (t) {\n return this.values[t];\n }, o.prototype.has = function (t) {\n return t in this.values;\n }, o.prototype.merge = function (t) {\n return new e.Hash(a(this.values, c(t)));\n }, o.prototype.slice = function (t) {\n var n, i, o, r;\n\n for (r = {}, n = 0, o = t.length; o > n; n++) {\n i = t[n], this.has(i) && (r[i] = this.values[i]);\n }\n\n return new e.Hash(r);\n }, o.prototype.getKeys = function () {\n return Object.keys(this.values);\n }, o.prototype.getKeysCommonToHash = function (t) {\n var e, n, i, o, s;\n\n for (t = r(t), o = this.getKeys(), s = [], e = 0, i = o.length; i > e; e++) {\n n = o[e], this.values[n] === t.values[n] && s.push(n);\n }\n\n return s;\n }, o.prototype.isEqualTo = function (e) {\n return t(this.toArray(), r(e).toArray());\n }, o.prototype.isEmpty = function () {\n return 0 === this.getKeys().length;\n }, o.prototype.toArray = function () {\n var t, e, n;\n return (null != this.array ? this.array : this.array = function () {\n var i;\n e = [], i = this.values;\n\n for (t in i) {\n n = i[t], e.push(t, n);\n }\n\n return e;\n }.call(this)).slice(0);\n }, o.prototype.toObject = function () {\n return s(this.values);\n }, o.prototype.toJSON = function () {\n return this.toObject();\n }, o.prototype.contentsForInspection = function () {\n return {\n values: JSON.stringify(this.values)\n };\n }, u = function u(t, e) {\n var n;\n return n = {}, n[t] = e, n;\n }, a = function a(t, e) {\n var n, i, o;\n i = s(t);\n\n for (n in e) {\n o = e[n], i[n] = o;\n }\n\n return i;\n }, s = function s(t, e) {\n var n, i, o, r, s;\n\n for (r = {}, s = Object.keys(t).sort(), n = 0, o = s.length; o > n; n++) {\n i = s[n], i !== e && (r[i] = t[i]);\n }\n\n return r;\n }, r = function r(t) {\n return t instanceof e.Hash ? t : new e.Hash(t);\n }, c = function c(t) {\n return t instanceof e.Hash ? t.values : t;\n }, o;\n }(e.Object);\n }.call(this), function () {\n e.ObjectGroup = function () {\n function t(t, e) {\n var n, i;\n this.objects = null != t ? t : [], i = e.depth, n = e.asTree, n && (this.depth = i, this.objects = this.constructor.groupObjects(this.objects, {\n asTree: n,\n depth: this.depth + 1\n }));\n }\n\n return t.groupObjects = function (t, e) {\n var n, i, o, r, s, a, u, c, l;\n\n for (null == t && (t = []), l = null != e ? e : {}, o = l.depth, n = l.asTree, n && null == o && (o = 0), c = [], s = 0, a = t.length; a > s; s++) {\n if (u = t[s], r) {\n if ((\"function\" == typeof u.canBeGrouped ? u.canBeGrouped(o) : void 0) && (\"function\" == typeof (i = r[r.length - 1]).canBeGroupedWith ? i.canBeGroupedWith(u, o) : void 0)) {\n r.push(u);\n continue;\n }\n\n c.push(new this(r, {\n depth: o,\n asTree: n\n })), r = null;\n }\n\n (\"function\" == typeof u.canBeGrouped ? u.canBeGrouped(o) : void 0) ? r = [u] : c.push(u);\n }\n\n return r && c.push(new this(r, {\n depth: o,\n asTree: n\n })), c;\n }, t.prototype.getObjects = function () {\n return this.objects;\n }, t.prototype.getDepth = function () {\n return this.depth;\n }, t.prototype.getCacheKey = function () {\n var t, e, n, i, o;\n\n for (e = [\"objectGroup\"], o = this.getObjects(), t = 0, n = o.length; n > t; t++) {\n i = o[t], e.push(i.getCacheKey());\n }\n\n return e.join(\"/\");\n }, t;\n }();\n }.call(this), function () {\n var t = function t(_t5, e) {\n function i() {\n this.constructor = _t5;\n }\n\n for (var o in e) {\n n.call(e, o) && (_t5[o] = e[o]);\n }\n\n return i.prototype = e.prototype, _t5.prototype = new i(), _t5.__super__ = e.prototype, _t5;\n },\n n = {}.hasOwnProperty;\n\n e.ObjectMap = function (e) {\n function n(t) {\n var e, n, i, o, r;\n\n for (null == t && (t = []), this.objects = {}, i = 0, o = t.length; o > i; i++) {\n r = t[i], n = JSON.stringify(r), null == (e = this.objects)[n] && (e[n] = r);\n }\n }\n\n return t(n, e), n.prototype.find = function (t) {\n var e;\n return e = JSON.stringify(t), this.objects[e];\n }, n;\n }(e.BasicObject);\n }.call(this), function () {\n e.ElementStore = function () {\n function t(t) {\n this.reset(t);\n }\n\n var e;\n return t.prototype.add = function (t) {\n var n;\n return n = e(t), this.elements[n] = t;\n }, t.prototype.remove = function (t) {\n var n, i;\n return n = e(t), (i = this.elements[n]) ? (delete this.elements[n], i) : void 0;\n }, t.prototype.reset = function (t) {\n var e, n, i;\n\n for (null == t && (t = []), this.elements = {}, n = 0, i = t.length; i > n; n++) {\n e = t[n], this.add(e);\n }\n\n return t;\n }, e = function e(t) {\n return t.dataset.trixStoreKey;\n }, t;\n }();\n }.call(this), function () {}.call(this), function () {\n var t = function t(_t6, e) {\n function i() {\n this.constructor = _t6;\n }\n\n for (var o in e) {\n n.call(e, o) && (_t6[o] = e[o]);\n }\n\n return i.prototype = e.prototype, _t6.prototype = new i(), _t6.__super__ = e.prototype, _t6;\n },\n n = {}.hasOwnProperty;\n\n e.Operation = function (e) {\n function n() {\n return n.__super__.constructor.apply(this, arguments);\n }\n\n return t(n, e), n.prototype.isPerforming = function () {\n return this.performing === !0;\n }, n.prototype.hasPerformed = function () {\n return this.performed === !0;\n }, n.prototype.hasSucceeded = function () {\n return this.performed && this.succeeded;\n }, n.prototype.hasFailed = function () {\n return this.performed && !this.succeeded;\n }, n.prototype.getPromise = function () {\n return null != this.promise ? this.promise : this.promise = new Promise(function (t) {\n return function (e, n) {\n return t.performing = !0, t.perform(function (i, o) {\n return t.succeeded = i, t.performing = !1, t.performed = !0, t.succeeded ? e(o) : n(o);\n });\n };\n }(this));\n }, n.prototype.perform = function (t) {\n return t(!1);\n }, n.prototype.release = function () {\n var t;\n return null != (t = this.promise) && \"function\" == typeof t.cancel && t.cancel(), this.promise = null, this.performing = null, this.performed = null, this.succeeded = null;\n }, n.proxyMethod(\"getPromise().then\"), n.proxyMethod(\"getPromise().catch\"), n;\n }(e.BasicObject);\n }.call(this), function () {\n var t,\n n,\n i,\n o,\n r,\n s = function s(t, e) {\n function n() {\n this.constructor = t;\n }\n\n for (var i in e) {\n a.call(e, i) && (t[i] = e[i]);\n }\n\n return n.prototype = e.prototype, t.prototype = new n(), t.__super__ = e.prototype, t;\n },\n a = {}.hasOwnProperty;\n\n e.UTF16String = function (t) {\n function e(t, e) {\n this.ucs2String = t, this.codepoints = e, this.length = this.codepoints.length, this.ucs2Length = this.ucs2String.length;\n }\n\n return s(e, t), e.box = function (t) {\n return null == t && (t = \"\"), t instanceof this ? t : this.fromUCS2String(null != t ? t.toString() : void 0);\n }, e.fromUCS2String = function (t) {\n return new this(t, o(t));\n }, e.fromCodepoints = function (t) {\n return new this(r(t), t);\n }, e.prototype.offsetToUCS2Offset = function (t) {\n return r(this.codepoints.slice(0, Math.max(0, t))).length;\n }, e.prototype.offsetFromUCS2Offset = function (t) {\n return o(this.ucs2String.slice(0, Math.max(0, t))).length;\n }, e.prototype.slice = function () {\n var t;\n return this.constructor.fromCodepoints((t = this.codepoints).slice.apply(t, arguments));\n }, e.prototype.charAt = function (t) {\n return this.slice(t, t + 1);\n }, e.prototype.isEqualTo = function (t) {\n return this.constructor.box(t).ucs2String === this.ucs2String;\n }, e.prototype.toJSON = function () {\n return this.ucs2String;\n }, e.prototype.getCacheKey = function () {\n return this.ucs2String;\n }, e.prototype.toString = function () {\n return this.ucs2String;\n }, e;\n }(e.BasicObject), t = 1 === (\"function\" == typeof Array.from ? Array.from(\"\\uD83D\\uDC7C\").length : void 0), n = null != (\"function\" == typeof \" \".codePointAt ? \" \".codePointAt(0) : void 0), i = \" \\uD83D\\uDC7C\" === (\"function\" == typeof String.fromCodePoint ? String.fromCodePoint(32, 128124) : void 0), o = t && n ? function (t) {\n return Array.from(t).map(function (t) {\n return t.codePointAt(0);\n });\n } : function (t) {\n var e, n, i, o, r;\n\n for (o = [], e = 0, i = t.length; i > e;) {\n r = t.charCodeAt(e++), r >= 55296 && 56319 >= r && i > e && (n = t.charCodeAt(e++), 56320 === (64512 & n) ? r = ((1023 & r) << 10) + (1023 & n) + 65536 : e--), o.push(r);\n }\n\n return o;\n }, r = i ? function (t) {\n return String.fromCodePoint.apply(String, t);\n } : function (t) {\n var e, n, i;\n return e = function () {\n var e, o, r;\n\n for (r = [], e = 0, o = t.length; o > e; e++) {\n i = t[e], n = \"\", i > 65535 && (i -= 65536, n += String.fromCharCode(i >>> 10 & 1023 | 55296), i = 56320 | 1023 & i), r.push(n + String.fromCharCode(i));\n }\n\n return r;\n }(), e.join(\"\");\n };\n }.call(this), function () {}.call(this), function () {}.call(this), function () {\n e.config.lang = {\n attachFiles: \"Attach Files\",\n bold: \"Bold\",\n bullets: \"Bullets\",\n \"byte\": \"Byte\",\n bytes: \"Bytes\",\n captionPlaceholder: \"Add a caption\\u2026\",\n code: \"Code\",\n heading1: \"Heading\",\n indent: \"Increase Level\",\n italic: \"Italic\",\n link: \"Link\",\n numbers: \"Numbers\",\n outdent: \"Decrease Level\",\n quote: \"Quote\",\n redo: \"Redo\",\n remove: \"Remove\",\n strike: \"Strikethrough\",\n undo: \"Undo\",\n unlink: \"Unlink\",\n url: \"URL\",\n urlPlaceholder: \"Enter a URL\\u2026\",\n GB: \"GB\",\n KB: \"KB\",\n MB: \"MB\",\n PB: \"PB\",\n TB: \"TB\"\n };\n }.call(this), function () {\n e.config.css = {\n attachment: \"attachment\",\n attachmentCaption: \"attachment__caption\",\n attachmentCaptionEditor: \"attachment__caption-editor\",\n attachmentMetadata: \"attachment__metadata\",\n attachmentMetadataContainer: \"attachment__metadata-container\",\n attachmentName: \"attachment__name\",\n attachmentProgress: \"attachment__progress\",\n attachmentSize: \"attachment__size\",\n attachmentToolbar: \"attachment__toolbar\",\n attachmentGallery: \"attachment-gallery\"\n };\n }.call(this), function () {\n var t;\n e.config.blockAttributes = t = {\n \"default\": {\n tagName: \"div\",\n parse: !1\n },\n quote: {\n tagName: \"blockquote\",\n nestable: !0\n },\n heading1: {\n tagName: \"h1\",\n terminal: !0,\n breakOnReturn: !0,\n group: !1\n },\n code: {\n tagName: \"pre\",\n terminal: !0,\n text: {\n plaintext: !0\n }\n },\n bulletList: {\n tagName: \"ul\",\n parse: !1\n },\n bullet: {\n tagName: \"li\",\n listAttribute: \"bulletList\",\n group: !1,\n nestable: !0,\n test: function test(n) {\n return e.tagName(n.parentNode) === t[this.listAttribute].tagName;\n }\n },\n numberList: {\n tagName: \"ol\",\n parse: !1\n },\n number: {\n tagName: \"li\",\n listAttribute: \"numberList\",\n group: !1,\n nestable: !0,\n test: function test(n) {\n return e.tagName(n.parentNode) === t[this.listAttribute].tagName;\n }\n },\n attachmentGallery: {\n tagName: \"div\",\n exclusive: !0,\n terminal: !0,\n parse: !1,\n group: !1\n }\n };\n }.call(this), function () {\n var t, n;\n t = e.config.lang, n = [t.bytes, t.KB, t.MB, t.GB, t.TB, t.PB], e.config.fileSize = {\n prefix: \"IEC\",\n precision: 2,\n formatter: function formatter(e) {\n var i, o, r, s, a;\n\n switch (e) {\n case 0:\n return \"0 \" + t.bytes;\n\n case 1:\n return \"1 \" + t.byte;\n\n default:\n return i = function () {\n switch (this.prefix) {\n case \"SI\":\n return 1e3;\n\n case \"IEC\":\n return 1024;\n }\n }.call(this), o = Math.floor(Math.log(e) / Math.log(i)), r = e / Math.pow(i, o), s = r.toFixed(this.precision), a = s.replace(/0*$/, \"\").replace(/\\.$/, \"\"), a + \" \" + n[o];\n }\n }\n };\n }.call(this), function () {\n e.config.textAttributes = {\n bold: {\n tagName: \"strong\",\n inheritable: !0,\n parser: function parser(t) {\n var e;\n return e = window.getComputedStyle(t), \"bold\" === e.fontWeight || e.fontWeight >= 600;\n }\n },\n italic: {\n tagName: \"em\",\n inheritable: !0,\n parser: function parser(t) {\n var e;\n return e = window.getComputedStyle(t), \"italic\" === e.fontStyle;\n }\n },\n href: {\n groupTagName: \"a\",\n parser: function parser(t) {\n var n, i, o;\n return n = e.AttachmentView.attachmentSelector, o = \"a:not(\" + n + \")\", (i = e.findClosestElementFromNode(t, {\n matchingSelector: o\n })) ? i.getAttribute(\"href\") : void 0;\n }\n },\n strike: {\n tagName: \"del\",\n inheritable: !0\n },\n frozen: {\n style: {\n backgroundColor: \"highlight\"\n }\n }\n };\n }.call(this), function () {\n var t, n, i, o, r;\n r = \"[data-trix-serialize=false]\", o = [\"contenteditable\", \"data-trix-id\", \"data-trix-store-key\", \"data-trix-mutable\", \"data-trix-placeholder\", \"tabindex\"], n = \"data-trix-serialized-attributes\", i = \"[\" + n + \"]\", t = new RegExp(\"\", \"g\"), e.extend({\n serializers: {\n \"application/json\": function applicationJson(t) {\n var n;\n if (t instanceof e.Document) n = t;else {\n if (!(t instanceof HTMLElement)) throw new Error(\"unserializable object\");\n n = e.Document.fromHTML(t.innerHTML);\n }\n return n.toSerializableDocument().toJSONString();\n },\n \"text/html\": function textHtml(s) {\n var a, u, c, l, h, p, d, f, g, m, v, y, b, A, C, x, w;\n if (s instanceof e.Document) l = e.DocumentView.render(s);else {\n if (!(s instanceof HTMLElement)) throw new Error(\"unserializable object\");\n l = s.cloneNode(!0);\n }\n\n for (A = l.querySelectorAll(r), h = 0, g = A.length; g > h; h++) {\n c = A[h], e.removeNode(c);\n }\n\n for (p = 0, m = o.length; m > p; p++) {\n for (a = o[p], C = l.querySelectorAll(\"[\" + a + \"]\"), d = 0, v = C.length; v > d; d++) {\n c = C[d], c.removeAttribute(a);\n }\n }\n\n for (x = l.querySelectorAll(i), f = 0, y = x.length; y > f; f++) {\n c = x[f];\n\n try {\n u = JSON.parse(c.getAttribute(n)), c.removeAttribute(n);\n\n for (b in u) {\n w = u[b], c.setAttribute(b, w);\n }\n } catch (E) {}\n }\n\n return l.innerHTML.replace(t, \"\");\n }\n },\n deserializers: {\n \"application/json\": function applicationJson(t) {\n return e.Document.fromJSONString(t);\n },\n \"text/html\": function textHtml(t) {\n return e.Document.fromHTML(t);\n }\n },\n serializeToContentType: function serializeToContentType(t, n) {\n var i;\n if (i = e.serializers[n]) return i(t);\n throw new Error(\"unknown content type: \" + n);\n },\n deserializeFromContentType: function deserializeFromContentType(t, n) {\n var i;\n if (i = e.deserializers[n]) return i(t);\n throw new Error(\"unknown content type: \" + n);\n }\n });\n }.call(this), function () {\n var t;\n t = e.config.lang, e.config.toolbar = {\n getDefaultHTML: function getDefaultHTML() {\n return '\\n \\n \\n \\n \\n \\n \\n\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n\\n \\n \\n \\n\\n \\n\\n \\n \\n \\n \\n
\\n\\n';\n }\n };\n }.call(this), function () {\n e.config.undoInterval = 5e3;\n }.call(this), function () {\n e.config.attachments = {\n preview: {\n presentation: \"gallery\",\n caption: {\n name: !0,\n size: !0\n }\n },\n file: {\n caption: {\n size: !0\n }\n }\n };\n }.call(this), function () {\n e.config.keyNames = {\n 8: \"backspace\",\n 9: \"tab\",\n 13: \"return\",\n 27: \"escape\",\n 37: \"left\",\n 39: \"right\",\n 46: \"delete\",\n 68: \"d\",\n 72: \"h\",\n 79: \"o\"\n };\n }.call(this), function () {\n e.config.input = {\n level2Enabled: !0,\n getLevel: function getLevel() {\n return this.level2Enabled && e.browser.supportsInputEvents ? 2 : 0;\n },\n pickFiles: function pickFiles(t) {\n var n;\n return n = e.makeElement(\"input\", {\n type: \"file\",\n multiple: !0,\n hidden: !0,\n id: this.fileInputId\n }), n.addEventListener(\"change\", function () {\n return t(n.files), e.removeNode(n);\n }), e.removeNode(document.getElementById(this.fileInputId)), document.body.appendChild(n), n.click();\n },\n fileInputId: \"trix-file-input-\" + Date.now().toString(16)\n };\n }.call(this), function () {}.call(this), function () {\n e.registerElement(\"trix-toolbar\", {\n defaultCSS: \"%t {\\n display: block;\\n}\\n\\n%t {\\n white-space: nowrap;\\n}\\n\\n%t [data-trix-dialog] {\\n display: none;\\n}\\n\\n%t [data-trix-dialog][data-trix-active] {\\n display: block;\\n}\\n\\n%t [data-trix-dialog] [data-trix-validate]:invalid {\\n background-color: #ffdddd;\\n}\",\n initialize: function initialize() {\n return \"\" === this.innerHTML ? this.innerHTML = e.config.toolbar.getDefaultHTML() : void 0;\n }\n });\n }.call(this), function () {\n var t = function t(_t7, e) {\n function i() {\n this.constructor = _t7;\n }\n\n for (var o in e) {\n n.call(e, o) && (_t7[o] = e[o]);\n }\n\n return i.prototype = e.prototype, _t7.prototype = new i(), _t7.__super__ = e.prototype, _t7;\n },\n n = {}.hasOwnProperty,\n i = [].indexOf || function (t) {\n for (var e = 0, n = this.length; n > e; e++) {\n if (e in this && this[e] === t) return e;\n }\n\n return -1;\n };\n\n e.ObjectView = function (n) {\n function o(t, e) {\n this.object = t, this.options = null != e ? e : {}, this.childViews = [], this.rootView = this;\n }\n\n return t(o, n), o.prototype.getNodes = function () {\n var t, e, n, i, o;\n\n for (null == this.nodes && (this.nodes = this.createNodes()), i = this.nodes, o = [], t = 0, e = i.length; e > t; t++) {\n n = i[t], o.push(n.cloneNode(!0));\n }\n\n return o;\n }, o.prototype.invalidate = function () {\n var t;\n return this.nodes = null, this.childViews = [], null != (t = this.parentView) ? t.invalidate() : void 0;\n }, o.prototype.invalidateViewForObject = function (t) {\n var e;\n return null != (e = this.findViewForObject(t)) ? e.invalidate() : void 0;\n }, o.prototype.findOrCreateCachedChildView = function (t, e) {\n var n;\n return (n = this.getCachedViewForObject(e)) ? this.recordChildView(n) : (n = this.createChildView.apply(this, arguments), this.cacheViewForObject(n, e)), n;\n }, o.prototype.createChildView = function (t, n, i) {\n var o;\n return null == i && (i = {}), n instanceof e.ObjectGroup && (i.viewClass = t, t = e.ObjectGroupView), o = new t(n, i), this.recordChildView(o);\n }, o.prototype.recordChildView = function (t) {\n return t.parentView = this, t.rootView = this.rootView, this.childViews.push(t), t;\n }, o.prototype.getAllChildViews = function () {\n var t, e, n, i, o;\n\n for (o = [], i = this.childViews, e = 0, n = i.length; n > e; e++) {\n t = i[e], o.push(t), o = o.concat(t.getAllChildViews());\n }\n\n return o;\n }, o.prototype.findElement = function () {\n return this.findElementForObject(this.object);\n }, o.prototype.findElementForObject = function (t) {\n var e;\n return (e = null != t ? t.id : void 0) ? this.rootView.element.querySelector(\"[data-trix-id='\" + e + \"']\") : void 0;\n }, o.prototype.findViewForObject = function (t) {\n var e, n, i, o;\n\n for (i = this.getAllChildViews(), e = 0, n = i.length; n > e; e++) {\n if (o = i[e], o.object === t) return o;\n }\n }, o.prototype.getViewCache = function () {\n return this.rootView !== this ? this.rootView.getViewCache() : this.isViewCachingEnabled() ? null != this.viewCache ? this.viewCache : this.viewCache = {} : void 0;\n }, o.prototype.isViewCachingEnabled = function () {\n return this.shouldCacheViews !== !1;\n }, o.prototype.enableViewCaching = function () {\n return this.shouldCacheViews = !0;\n }, o.prototype.disableViewCaching = function () {\n return this.shouldCacheViews = !1;\n }, o.prototype.getCachedViewForObject = function (t) {\n var e;\n return null != (e = this.getViewCache()) ? e[t.getCacheKey()] : void 0;\n }, o.prototype.cacheViewForObject = function (t, e) {\n var n;\n return null != (n = this.getViewCache()) ? n[e.getCacheKey()] = t : void 0;\n }, o.prototype.garbageCollectCachedViews = function () {\n var t, e, n, o, r, s;\n\n if (t = this.getViewCache()) {\n s = this.getAllChildViews().concat(this), n = function () {\n var t, e, n;\n\n for (n = [], t = 0, e = s.length; e > t; t++) {\n r = s[t], n.push(r.object.getCacheKey());\n }\n\n return n;\n }(), o = [];\n\n for (e in t) {\n i.call(n, e) < 0 && o.push(delete t[e]);\n }\n\n return o;\n }\n }, o;\n }(e.BasicObject);\n }.call(this), function () {\n var t = function t(_t8, e) {\n function i() {\n this.constructor = _t8;\n }\n\n for (var o in e) {\n n.call(e, o) && (_t8[o] = e[o]);\n }\n\n return i.prototype = e.prototype, _t8.prototype = new i(), _t8.__super__ = e.prototype, _t8;\n },\n n = {}.hasOwnProperty;\n\n e.ObjectGroupView = function (e) {\n function n() {\n n.__super__.constructor.apply(this, arguments), this.objectGroup = this.object, this.viewClass = this.options.viewClass, delete this.options.viewClass;\n }\n\n return t(n, e), n.prototype.getChildViews = function () {\n var t, e, n, i;\n if (!this.childViews.length) for (i = this.objectGroup.getObjects(), t = 0, e = i.length; e > t; t++) {\n n = i[t], this.findOrCreateCachedChildView(this.viewClass, n, this.options);\n }\n return this.childViews;\n }, n.prototype.createNodes = function () {\n var t, e, n, i, o, r, s, a, u;\n\n for (t = this.createContainerElement(), s = this.getChildViews(), e = 0, i = s.length; i > e; e++) {\n for (u = s[e], a = u.getNodes(), n = 0, o = a.length; o > n; n++) {\n r = a[n], t.appendChild(r);\n }\n }\n\n return [t];\n }, n.prototype.createContainerElement = function (t) {\n return null == t && (t = this.objectGroup.getDepth()), this.getChildViews()[0].createContainerElement(t);\n }, n;\n }(e.ObjectView);\n }.call(this), function () {\n var t = function t(_t9, e) {\n function i() {\n this.constructor = _t9;\n }\n\n for (var o in e) {\n n.call(e, o) && (_t9[o] = e[o]);\n }\n\n return i.prototype = e.prototype, _t9.prototype = new i(), _t9.__super__ = e.prototype, _t9;\n },\n n = {}.hasOwnProperty;\n\n e.Controller = function (e) {\n function n() {\n return n.__super__.constructor.apply(this, arguments);\n }\n\n return t(n, e), n;\n }(e.BasicObject);\n }.call(this), function () {\n var t,\n n,\n i,\n o,\n r,\n s,\n a = function a(t, e) {\n return function () {\n return t.apply(e, arguments);\n };\n },\n u = function u(t, e) {\n function n() {\n this.constructor = t;\n }\n\n for (var i in e) {\n c.call(e, i) && (t[i] = e[i]);\n }\n\n return n.prototype = e.prototype, t.prototype = new n(), t.__super__ = e.prototype, t;\n },\n c = {}.hasOwnProperty,\n l = [].indexOf || function (t) {\n for (var e = 0, n = this.length; n > e; e++) {\n if (e in this && this[e] === t) return e;\n }\n\n return -1;\n };\n\n t = e.findClosestElementFromNode, i = e.nodeIsEmptyTextNode, n = e.nodeIsBlockStartComment, o = e.normalizeSpaces, r = e.summarizeStringChange, s = e.tagName, e.MutationObserver = function (e) {\n function c(t) {\n this.element = t, this.didMutate = a(this.didMutate, this), this.observer = new window.MutationObserver(this.didMutate), this.start();\n }\n\n var _h, p, d, f;\n\n return u(c, e), p = \"data-trix-mutable\", d = \"[\" + p + \"]\", f = {\n attributes: !0,\n childList: !0,\n characterData: !0,\n characterDataOldValue: !0,\n subtree: !0\n }, c.prototype.start = function () {\n return this.reset(), this.observer.observe(this.element, f);\n }, c.prototype.stop = function () {\n return this.observer.disconnect();\n }, c.prototype.didMutate = function (t) {\n var e, n;\n return (e = this.mutations).push.apply(e, this.findSignificantMutations(t)), this.mutations.length ? (null != (n = this.delegate) && \"function\" == typeof n.elementDidMutate && n.elementDidMutate(this.getMutationSummary()), this.reset()) : void 0;\n }, c.prototype.reset = function () {\n return this.mutations = [];\n }, c.prototype.findSignificantMutations = function (t) {\n var e, n, i, o;\n\n for (o = [], e = 0, n = t.length; n > e; e++) {\n i = t[e], this.mutationIsSignificant(i) && o.push(i);\n }\n\n return o;\n }, c.prototype.mutationIsSignificant = function (t) {\n var e, n, i, o;\n if (this.nodeIsMutable(t.target)) return !1;\n\n for (o = this.nodesModifiedByMutation(t), e = 0, n = o.length; n > e; e++) {\n if (i = o[e], this.nodeIsSignificant(i)) return !0;\n }\n\n return !1;\n }, c.prototype.nodeIsSignificant = function (t) {\n return t !== this.element && !this.nodeIsMutable(t) && !i(t);\n }, c.prototype.nodeIsMutable = function (e) {\n return t(e, {\n matchingSelector: d\n });\n }, c.prototype.nodesModifiedByMutation = function (t) {\n var e;\n\n switch (e = [], t.type) {\n case \"attributes\":\n t.attributeName !== p && e.push(t.target);\n break;\n\n case \"characterData\":\n e.push(t.target.parentNode), e.push(t.target);\n break;\n\n case \"childList\":\n e.push.apply(e, t.addedNodes), e.push.apply(e, t.removedNodes);\n }\n\n return e;\n }, c.prototype.getMutationSummary = function () {\n return this.getTextMutationSummary();\n }, c.prototype.getTextMutationSummary = function () {\n var t, e, n, i, o, r, s, a, u, c, h;\n\n for (a = this.getTextChangesFromCharacterData(), n = a.additions, o = a.deletions, h = this.getTextChangesFromChildList(), u = h.additions, r = 0, s = u.length; s > r; r++) {\n e = u[r], l.call(n, e) < 0 && n.push(e);\n }\n\n return o.push.apply(o, h.deletions), c = {}, (t = n.join(\"\")) && (c.textAdded = t), (i = o.join(\"\")) && (c.textDeleted = i), c;\n }, c.prototype.getMutationsByType = function (t) {\n var e, n, i, o, r;\n\n for (o = this.mutations, r = [], e = 0, n = o.length; n > e; e++) {\n i = o[e], i.type === t && r.push(i);\n }\n\n return r;\n }, c.prototype.getTextChangesFromChildList = function () {\n var t, e, i, r, s, a, u, c, l, p, d;\n\n for (t = [], u = [], a = this.getMutationsByType(\"childList\"), e = 0, r = a.length; r > e; e++) {\n s = a[e], t.push.apply(t, s.addedNodes), u.push.apply(u, s.removedNodes);\n }\n\n return c = 0 === t.length && 1 === u.length && n(u[0]), c ? (p = [], d = [\"\\n\"]) : (p = _h(t), d = _h(u)), {\n additions: function () {\n var t, e, n;\n\n for (n = [], i = t = 0, e = p.length; e > t; i = ++t) {\n l = p[i], l !== d[i] && n.push(o(l));\n }\n\n return n;\n }(),\n deletions: function () {\n var t, e, n;\n\n for (n = [], i = t = 0, e = d.length; e > t; i = ++t) {\n l = d[i], l !== p[i] && n.push(o(l));\n }\n\n return n;\n }()\n };\n }, c.prototype.getTextChangesFromCharacterData = function () {\n var t, e, n, i, s, a, u, c;\n return e = this.getMutationsByType(\"characterData\"), e.length && (c = e[0], n = e[e.length - 1], s = o(c.oldValue), i = o(n.target.data), a = r(s, i), t = a.added, u = a.removed), {\n additions: t ? [t] : [],\n deletions: u ? [u] : []\n };\n }, _h = function h(t) {\n var e, n, i, o;\n\n for (null == t && (t = []), o = [], e = 0, n = t.length; n > e; e++) {\n switch (i = t[e], i.nodeType) {\n case Node.TEXT_NODE:\n o.push(i.data);\n break;\n\n case Node.ELEMENT_NODE:\n \"br\" === s(i) ? o.push(\"\\n\") : o.push.apply(o, _h(i.childNodes));\n }\n }\n\n return o;\n }, c;\n }(e.BasicObject);\n }.call(this), function () {\n var t = function t(_t10, e) {\n function i() {\n this.constructor = _t10;\n }\n\n for (var o in e) {\n n.call(e, o) && (_t10[o] = e[o]);\n }\n\n return i.prototype = e.prototype, _t10.prototype = new i(), _t10.__super__ = e.prototype, _t10;\n },\n n = {}.hasOwnProperty;\n\n e.FileVerificationOperation = function (e) {\n function n(t) {\n this.file = t;\n }\n\n return t(n, e), n.prototype.perform = function (t) {\n var e;\n return e = new FileReader(), e.onerror = function () {\n return t(!1);\n }, e.onload = function (n) {\n return function () {\n e.onerror = null;\n\n try {\n e.abort();\n } catch (i) {}\n\n return t(!0, n.file);\n };\n }(this), e.readAsArrayBuffer(this.file);\n }, n;\n }(e.Operation);\n }.call(this), function () {\n var t,\n n,\n i = function i(t, e) {\n function n() {\n this.constructor = t;\n }\n\n for (var i in e) {\n o.call(e, i) && (t[i] = e[i]);\n }\n\n return n.prototype = e.prototype, t.prototype = new n(), t.__super__ = e.prototype, t;\n },\n o = {}.hasOwnProperty;\n\n t = e.handleEvent, n = e.innerElementIsActive, e.InputController = function (o) {\n function r(n) {\n var i;\n this.element = n, this.mutationObserver = new e.MutationObserver(this.element), this.mutationObserver.delegate = this;\n\n for (i in this.events) {\n t(i, {\n onElement: this.element,\n withCallback: this.handlerFor(i)\n });\n }\n }\n\n return i(r, o), r.prototype.events = {}, r.prototype.elementDidMutate = function () {}, r.prototype.editorWillSyncDocumentView = function () {\n return this.mutationObserver.stop();\n }, r.prototype.editorDidSyncDocumentView = function () {\n return this.mutationObserver.start();\n }, r.prototype.requestRender = function () {\n var t;\n return null != (t = this.delegate) && \"function\" == typeof t.inputControllerDidRequestRender ? t.inputControllerDidRequestRender() : void 0;\n }, r.prototype.requestReparse = function () {\n var t;\n return null != (t = this.delegate) && \"function\" == typeof t.inputControllerDidRequestReparse && t.inputControllerDidRequestReparse(), this.requestRender();\n }, r.prototype.attachFiles = function (t) {\n var n, i;\n return i = function () {\n var i, o, r;\n\n for (r = [], i = 0, o = t.length; o > i; i++) {\n n = t[i], r.push(new e.FileVerificationOperation(n));\n }\n\n return r;\n }(), Promise.all(i).then(function (t) {\n return function (e) {\n return t.handleInput(function () {\n var t, n;\n return null != (t = this.delegate) && t.inputControllerWillAttachFiles(), null != (n = this.responder) && n.insertFiles(e), this.requestRender();\n });\n };\n }(this));\n }, r.prototype.handlerFor = function (t) {\n return function (e) {\n return function (i) {\n return i.defaultPrevented ? void 0 : e.handleInput(function () {\n return n(this.element) ? void 0 : (this.eventName = t, this.events[t].call(this, i));\n });\n };\n }(this);\n }, r.prototype.handleInput = function (t) {\n var e, n;\n\n try {\n return null != (e = this.delegate) && e.inputControllerWillHandleInput(), t.call(this);\n } finally {\n null != (n = this.delegate) && n.inputControllerDidHandleInput();\n }\n }, r.prototype.createLinkHTML = function (t, e) {\n var n;\n return n = document.createElement(\"a\"), n.href = t, n.textContent = null != e ? e : t, n.outerHTML;\n }, r;\n }(e.BasicObject);\n }.call(this), function () {\n var t,\n n,\n i,\n o,\n r,\n s,\n a,\n u,\n c,\n l,\n h,\n p,\n d,\n f = function f(t, e) {\n function n() {\n this.constructor = t;\n }\n\n for (var i in e) {\n g.call(e, i) && (t[i] = e[i]);\n }\n\n return n.prototype = e.prototype, t.prototype = new n(), t.__super__ = e.prototype, t;\n },\n g = {}.hasOwnProperty,\n m = [].indexOf || function (t) {\n for (var e = 0, n = this.length; n > e; e++) {\n if (e in this && this[e] === t) return e;\n }\n\n return -1;\n };\n\n c = e.makeElement, l = e.objectsAreEqual, d = e.tagName, n = e.browser, a = e.keyEventIsKeyboardCommand, o = e.dataTransferIsWritable, i = e.dataTransferIsPlainText, u = e.config.keyNames, e.Level0InputController = function (n) {\n function s() {\n s.__super__.constructor.apply(this, arguments), this.resetInputSummary();\n }\n\n var d;\n return f(s, n), d = 0, s.prototype.setInputSummary = function (t) {\n var e, n;\n null == t && (t = {}), this.inputSummary.eventName = this.eventName;\n\n for (e in t) {\n n = t[e], this.inputSummary[e] = n;\n }\n\n return this.inputSummary;\n }, s.prototype.resetInputSummary = function () {\n return this.inputSummary = {};\n }, s.prototype.reset = function () {\n return this.resetInputSummary(), e.selectionChangeObserver.reset();\n }, s.prototype.elementDidMutate = function (t) {\n var e;\n return this.isComposing() ? null != (e = this.delegate) && \"function\" == typeof e.inputControllerDidAllowUnhandledInput ? e.inputControllerDidAllowUnhandledInput() : void 0 : this.handleInput(function () {\n return this.mutationIsSignificant(t) && (this.mutationIsExpected(t) ? this.requestRender() : this.requestReparse()), this.reset();\n });\n }, s.prototype.mutationIsExpected = function (t) {\n var e, n, i, o, r, s, a, u, c, l;\n return a = t.textAdded, u = t.textDeleted, this.inputSummary.preferDocument ? !0 : (e = null != a ? a === this.inputSummary.textAdded : !this.inputSummary.textAdded, n = null != u ? this.inputSummary.didDelete : !this.inputSummary.didDelete, c = (\"\\n\" === a || \" \\n\" === a) && !e, l = \"\\n\" === u && !n, s = c && !l || l && !c, s && (o = this.getSelectedRange()) && (i = c ? a.replace(/\\n$/, \"\").length || -1 : (null != a ? a.length : void 0) || 1, null != (r = this.responder) ? r.positionIsBlockBreak(o[1] + i) : void 0) ? !0 : e && n);\n }, s.prototype.mutationIsSignificant = function (t) {\n var e, n, i;\n return i = Object.keys(t).length > 0, e = \"\" === (null != (n = this.compositionInput) ? n.getEndData() : void 0), i || !e;\n }, s.prototype.events = {\n keydown: function keydown(t) {\n var n, i, o, r, s, c, l, h, p;\n\n if (this.isComposing() || this.resetInputSummary(), this.inputSummary.didInput = !0, r = u[t.keyCode]) {\n for (i = this.keys, h = [\"ctrl\", \"alt\", \"shift\", \"meta\"], o = 0, c = h.length; c > o; o++) {\n l = h[o], t[l + \"Key\"] && (\"ctrl\" === l && (l = \"control\"), i = null != i ? i[l] : void 0);\n }\n\n null != (null != i ? i[r] : void 0) && (this.setInputSummary({\n keyName: r\n }), e.selectionChangeObserver.reset(), i[r].call(this, t));\n }\n\n return a(t) && (n = String.fromCharCode(t.keyCode).toLowerCase()) && (s = function () {\n var e, n, i, o;\n\n for (i = [\"alt\", \"shift\"], o = [], e = 0, n = i.length; n > e; e++) {\n l = i[e], t[l + \"Key\"] && o.push(l);\n }\n\n return o;\n }(), s.push(n), null != (p = this.delegate) ? p.inputControllerDidReceiveKeyboardCommand(s) : void 0) ? t.preventDefault() : void 0;\n },\n keypress: function keypress(t) {\n var e, n, i;\n if (null == this.inputSummary.eventName && !t.metaKey && (!t.ctrlKey || t.altKey)) return (i = p(t)) ? (null != (e = this.delegate) && e.inputControllerWillPerformTyping(), null != (n = this.responder) && n.insertString(i), this.setInputSummary({\n textAdded: i,\n didDelete: this.selectionIsExpanded()\n })) : void 0;\n },\n textInput: function textInput(t) {\n var e, n, i, o;\n return e = t.data, o = this.inputSummary.textAdded, o && o !== e && o.toUpperCase() === e ? (n = this.getSelectedRange(), this.setSelectedRange([n[0], n[1] + o.length]), null != (i = this.responder) && i.insertString(e), this.setInputSummary({\n textAdded: e\n }), this.setSelectedRange(n)) : void 0;\n },\n dragenter: function dragenter(t) {\n return t.preventDefault();\n },\n dragstart: function dragstart(t) {\n var e, n;\n return n = t.target, this.serializeSelectionToDataTransfer(t.dataTransfer), this.draggedRange = this.getSelectedRange(), null != (e = this.delegate) && \"function\" == typeof e.inputControllerDidStartDrag ? e.inputControllerDidStartDrag() : void 0;\n },\n dragover: function dragover(t) {\n var e, n;\n return !this.draggedRange && !this.canAcceptDataTransfer(t.dataTransfer) || (t.preventDefault(), e = {\n x: t.clientX,\n y: t.clientY\n }, l(e, this.draggingPoint)) ? void 0 : (this.draggingPoint = e, null != (n = this.delegate) && \"function\" == typeof n.inputControllerDidReceiveDragOverPoint ? n.inputControllerDidReceiveDragOverPoint(this.draggingPoint) : void 0);\n },\n dragend: function dragend() {\n var t;\n return null != (t = this.delegate) && \"function\" == typeof t.inputControllerDidCancelDrag && t.inputControllerDidCancelDrag(), this.draggedRange = null, this.draggingPoint = null;\n },\n drop: function drop(t) {\n var n, i, o, r, s, a, u, c, l;\n return t.preventDefault(), o = null != (s = t.dataTransfer) ? s.files : void 0, r = {\n x: t.clientX,\n y: t.clientY\n }, null != (a = this.responder) && a.setLocationRangeFromPointRange(r), (null != o ? o.length : void 0) ? this.attachFiles(o) : this.draggedRange ? (null != (u = this.delegate) && u.inputControllerWillMoveText(), null != (c = this.responder) && c.moveTextFromRange(this.draggedRange), this.draggedRange = null, this.requestRender()) : (i = t.dataTransfer.getData(\"application/x-trix-document\")) && (n = e.Document.fromJSONString(i), null != (l = this.responder) && l.insertDocument(n), this.requestRender()), this.draggedRange = null, this.draggingPoint = null;\n },\n cut: function cut(t) {\n var e, n;\n return (null != (e = this.responder) ? e.selectionIsExpanded() : void 0) && (this.serializeSelectionToDataTransfer(t.clipboardData) && t.preventDefault(), null != (n = this.delegate) && n.inputControllerWillCutText(), this.deleteInDirection(\"backward\"), t.defaultPrevented) ? this.requestRender() : void 0;\n },\n copy: function copy(t) {\n var e;\n return (null != (e = this.responder) ? e.selectionIsExpanded() : void 0) && this.serializeSelectionToDataTransfer(t.clipboardData) ? t.preventDefault() : void 0;\n },\n paste: function paste(t) {\n var n, o, s, a, u, c, l, p, f, g, v, y, b, A, C, x, w, E, S, R, k, D, L;\n return n = null != (p = t.clipboardData) ? p : t.testClipboardData, l = {\n clipboard: n\n }, null == n || h(t) ? void this.getPastedHTMLUsingHiddenElement(function (t) {\n return function (e) {\n var n, i, o;\n return l.type = \"text/html\", l.html = e, null != (n = t.delegate) && n.inputControllerWillPaste(l), null != (i = t.responder) && i.insertHTML(l.html), t.requestRender(), null != (o = t.delegate) ? o.inputControllerDidPaste(l) : void 0;\n };\n }(this)) : ((a = n.getData(\"URL\")) ? (l.type = \"text/html\", L = (c = n.getData(\"public.url-name\")) ? e.squishBreakableWhitespace(c).trim() : a, l.html = this.createLinkHTML(a, L), null != (f = this.delegate) && f.inputControllerWillPaste(l), this.setInputSummary({\n textAdded: L,\n didDelete: this.selectionIsExpanded()\n }), null != (C = this.responder) && C.insertHTML(l.html), this.requestRender(), null != (x = this.delegate) && x.inputControllerDidPaste(l)) : i(n) ? (l.type = \"text/plain\", l.string = n.getData(\"text/plain\"), null != (w = this.delegate) && w.inputControllerWillPaste(l), this.setInputSummary({\n textAdded: l.string,\n didDelete: this.selectionIsExpanded()\n }), null != (E = this.responder) && E.insertString(l.string), this.requestRender(), null != (S = this.delegate) && S.inputControllerDidPaste(l)) : (u = n.getData(\"text/html\")) ? (l.type = \"text/html\", l.html = u, null != (R = this.delegate) && R.inputControllerWillPaste(l), null != (k = this.responder) && k.insertHTML(l.html), this.requestRender(), null != (D = this.delegate) && D.inputControllerDidPaste(l)) : m.call(n.types, \"Files\") >= 0 && (s = null != (g = n.items) && null != (v = g[0]) && \"function\" == typeof v.getAsFile ? v.getAsFile() : void 0) && (!s.name && (o = r(s)) && (s.name = \"pasted-file-\" + ++d + \".\" + o), l.type = \"File\", l.file = s, null != (y = this.delegate) && y.inputControllerWillAttachFiles(), null != (b = this.responder) && b.insertFile(l.file), this.requestRender(), null != (A = this.delegate) && A.inputControllerDidPaste(l)), t.preventDefault());\n },\n compositionstart: function compositionstart(t) {\n return this.getCompositionInput().start(t.data);\n },\n compositionupdate: function compositionupdate(t) {\n return this.getCompositionInput().update(t.data);\n },\n compositionend: function compositionend(t) {\n return this.getCompositionInput().end(t.data);\n },\n beforeinput: function beforeinput() {\n return this.inputSummary.didInput = !0;\n },\n input: function input(t) {\n return this.inputSummary.didInput = !0, t.stopPropagation();\n }\n }, s.prototype.keys = {\n backspace: function backspace(t) {\n var e;\n return null != (e = this.delegate) && e.inputControllerWillPerformTyping(), this.deleteInDirection(\"backward\", t);\n },\n \"delete\": function _delete(t) {\n var e;\n return null != (e = this.delegate) && e.inputControllerWillPerformTyping(), this.deleteInDirection(\"forward\", t);\n },\n \"return\": function _return() {\n var t, e;\n return this.setInputSummary({\n preferDocument: !0\n }), null != (t = this.delegate) && t.inputControllerWillPerformTyping(), null != (e = this.responder) ? e.insertLineBreak() : void 0;\n },\n tab: function tab(t) {\n var e, n;\n return (null != (e = this.responder) ? e.canIncreaseNestingLevel() : void 0) ? (null != (n = this.responder) && n.increaseNestingLevel(), this.requestRender(), t.preventDefault()) : void 0;\n },\n left: function left(t) {\n var e;\n return this.selectionIsInCursorTarget() ? (t.preventDefault(), null != (e = this.responder) ? e.moveCursorInDirection(\"backward\") : void 0) : void 0;\n },\n right: function right(t) {\n var e;\n return this.selectionIsInCursorTarget() ? (t.preventDefault(), null != (e = this.responder) ? e.moveCursorInDirection(\"forward\") : void 0) : void 0;\n },\n control: {\n d: function d(t) {\n var e;\n return null != (e = this.delegate) && e.inputControllerWillPerformTyping(), this.deleteInDirection(\"forward\", t);\n },\n h: function h(t) {\n var e;\n return null != (e = this.delegate) && e.inputControllerWillPerformTyping(), this.deleteInDirection(\"backward\", t);\n },\n o: function o(t) {\n var e, n;\n return t.preventDefault(), null != (e = this.delegate) && e.inputControllerWillPerformTyping(), null != (n = this.responder) && n.insertString(\"\\n\", {\n updatePosition: !1\n }), this.requestRender();\n }\n },\n shift: {\n \"return\": function _return(t) {\n var e, n;\n return null != (e = this.delegate) && e.inputControllerWillPerformTyping(), null != (n = this.responder) && n.insertString(\"\\n\"), this.requestRender(), t.preventDefault();\n },\n tab: function tab(t) {\n var e, n;\n return (null != (e = this.responder) ? e.canDecreaseNestingLevel() : void 0) ? (null != (n = this.responder) && n.decreaseNestingLevel(), this.requestRender(), t.preventDefault()) : void 0;\n },\n left: function left(t) {\n return this.selectionIsInCursorTarget() ? (t.preventDefault(), this.expandSelectionInDirection(\"backward\")) : void 0;\n },\n right: function right(t) {\n return this.selectionIsInCursorTarget() ? (t.preventDefault(), this.expandSelectionInDirection(\"forward\")) : void 0;\n }\n },\n alt: {\n backspace: function backspace() {\n var t;\n return this.setInputSummary({\n preferDocument: !1\n }), null != (t = this.delegate) ? t.inputControllerWillPerformTyping() : void 0;\n }\n },\n meta: {\n backspace: function backspace() {\n var t;\n return this.setInputSummary({\n preferDocument: !1\n }), null != (t = this.delegate) ? t.inputControllerWillPerformTyping() : void 0;\n }\n }\n }, s.prototype.getCompositionInput = function () {\n return this.isComposing() ? this.compositionInput : this.compositionInput = new t(this);\n }, s.prototype.isComposing = function () {\n return null != this.compositionInput && !this.compositionInput.isEnded();\n }, s.prototype.deleteInDirection = function (t, e) {\n var n;\n return (null != (n = this.responder) ? n.deleteInDirection(t) : void 0) !== !1 ? this.setInputSummary({\n didDelete: !0\n }) : e ? (e.preventDefault(), this.requestRender()) : void 0;\n }, s.prototype.serializeSelectionToDataTransfer = function (t) {\n var n, i;\n if (o(t)) return n = null != (i = this.responder) ? i.getSelectedDocument().toSerializableDocument() : void 0, t.setData(\"application/x-trix-document\", JSON.stringify(n)), t.setData(\"text/html\", e.DocumentView.render(n).innerHTML), t.setData(\"text/plain\", n.toString().replace(/\\n$/, \"\")), !0;\n }, s.prototype.canAcceptDataTransfer = function (t) {\n var e, n, i, o, r, s;\n\n for (s = {}, o = null != (i = null != t ? t.types : void 0) ? i : [], e = 0, n = o.length; n > e; e++) {\n r = o[e], s[r] = !0;\n }\n\n return s.Files || s[\"application/x-trix-document\"] || s[\"text/html\"] || s[\"text/plain\"];\n }, s.prototype.getPastedHTMLUsingHiddenElement = function (t) {\n var n, i, o;\n return i = this.getSelectedRange(), o = {\n position: \"absolute\",\n left: window.pageXOffset + \"px\",\n top: window.pageYOffset + \"px\",\n opacity: 0\n }, n = c({\n style: o,\n tagName: \"div\",\n editable: !0\n }), document.body.appendChild(n), n.focus(), requestAnimationFrame(function (o) {\n return function () {\n var r;\n return r = n.innerHTML, e.removeNode(n), o.setSelectedRange(i), t(r);\n };\n }(this));\n }, s.proxyMethod(\"responder?.getSelectedRange\"), s.proxyMethod(\"responder?.setSelectedRange\"), s.proxyMethod(\"responder?.expandSelectionInDirection\"), s.proxyMethod(\"responder?.selectionIsInCursorTarget\"), s.proxyMethod(\"responder?.selectionIsExpanded\"), s;\n }(e.InputController), r = function r(t) {\n var e, n;\n return null != (e = t.type) && null != (n = e.match(/\\/(\\w+)$/)) ? n[1] : void 0;\n }, s = null != (\"function\" == typeof \" \".codePointAt ? \" \".codePointAt(0) : void 0), p = function p(t) {\n var n;\n return t.key && s && t.key.codePointAt(0) === t.keyCode ? t.key : (null === t.which ? n = t.keyCode : 0 !== t.which && 0 !== t.charCode && (n = t.charCode), null != n && \"escape\" !== u[n] ? e.UTF16String.fromCodepoints([n]).toString() : void 0);\n }, h = function h(t) {\n var e, n, i, o, r, s, a, u, c, l;\n\n if (u = t.clipboardData) {\n if (m.call(u.types, \"text/html\") >= 0) {\n for (c = u.types, i = 0, s = c.length; s > i; i++) {\n if (l = c[i], e = /^CorePasteboardFlavorType/.test(l), n = /^dyn\\./.test(l) && u.getData(l), a = e || n) return !0;\n }\n\n return !1;\n }\n\n return o = m.call(u.types, \"com.apple.webarchive\") >= 0, r = m.call(u.types, \"com.apple.flat-rtfd\") >= 0, o || r;\n }\n }, t = function (t) {\n function e(t) {\n var e;\n this.inputController = t, e = this.inputController, this.responder = e.responder, this.delegate = e.delegate, this.inputSummary = e.inputSummary, this.data = {};\n }\n\n return f(e, t), e.prototype.start = function (t) {\n var e, n;\n return this.data.start = t, this.isSignificant() ? (\"keypress\" === this.inputSummary.eventName && this.inputSummary.textAdded && null != (e = this.responder) && e.deleteInDirection(\"left\"), this.selectionIsExpanded() || (this.insertPlaceholder(), this.requestRender()), this.range = null != (n = this.responder) ? n.getSelectedRange() : void 0) : void 0;\n }, e.prototype.update = function (t) {\n var e;\n return this.data.update = t, this.isSignificant() && (e = this.selectPlaceholder()) ? (this.forgetPlaceholder(), this.range = e) : void 0;\n }, e.prototype.end = function (t) {\n var e, n, i, o;\n return this.data.end = t, this.isSignificant() ? (this.forgetPlaceholder(), this.canApplyToDocument() ? (this.setInputSummary({\n preferDocument: !0,\n didInput: !1\n }), null != (e = this.delegate) && e.inputControllerWillPerformTyping(), null != (n = this.responder) && n.setSelectedRange(this.range), null != (i = this.responder) && i.insertString(this.data.end), null != (o = this.responder) ? o.setSelectedRange(this.range[0] + this.data.end.length) : void 0) : null != this.data.start || null != this.data.update ? (this.requestReparse(), this.inputController.reset()) : void 0) : this.inputController.reset();\n }, e.prototype.getEndData = function () {\n return this.data.end;\n }, e.prototype.isEnded = function () {\n return null != this.getEndData();\n }, e.prototype.isSignificant = function () {\n return n.composesExistingText ? this.inputSummary.didInput : !0;\n }, e.prototype.canApplyToDocument = function () {\n var t, e;\n return 0 === (null != (t = this.data.start) ? t.length : void 0) && (null != (e = this.data.end) ? e.length : void 0) > 0 && null != this.range;\n }, e.proxyMethod(\"inputController.setInputSummary\"), e.proxyMethod(\"inputController.requestRender\"), e.proxyMethod(\"inputController.requestReparse\"), e.proxyMethod(\"responder?.selectionIsExpanded\"), e.proxyMethod(\"responder?.insertPlaceholder\"), e.proxyMethod(\"responder?.selectPlaceholder\"), e.proxyMethod(\"responder?.forgetPlaceholder\"), e;\n }(e.BasicObject);\n }.call(this), function () {\n var t,\n n,\n i,\n o = function o(t, e) {\n return function () {\n return t.apply(e, arguments);\n };\n },\n r = function r(t, e) {\n function n() {\n this.constructor = t;\n }\n\n for (var i in e) {\n s.call(e, i) && (t[i] = e[i]);\n }\n\n return n.prototype = e.prototype, t.prototype = new n(), t.__super__ = e.prototype, t;\n },\n s = {}.hasOwnProperty,\n a = [].indexOf || function (t) {\n for (var e = 0, n = this.length; n > e; e++) {\n if (e in this && this[e] === t) return e;\n }\n\n return -1;\n };\n\n t = e.dataTransferIsPlainText, n = e.keyEventIsKeyboardCommand, i = e.objectsAreEqual, e.Level2InputController = function (s) {\n function u() {\n return this.render = o(this.render, this), u.__super__.constructor.apply(this, arguments);\n }\n\n var c, l, h, p, d, f;\n return r(u, s), u.prototype.elementDidMutate = function () {\n var t;\n return this.scheduledRender ? this.composing && null != (t = this.delegate) && \"function\" == typeof t.inputControllerDidAllowUnhandledInput ? t.inputControllerDidAllowUnhandledInput() : void 0 : this.reparse();\n }, u.prototype.scheduleRender = function () {\n return null != this.scheduledRender ? this.scheduledRender : this.scheduledRender = requestAnimationFrame(this.render);\n }, u.prototype.render = function () {\n var t;\n return cancelAnimationFrame(this.scheduledRender), this.scheduledRender = null, this.composing || null != (t = this.delegate) && t.render(), \"function\" == typeof this.afterRender && this.afterRender(), this.afterRender = null;\n }, u.prototype.reparse = function () {\n var t;\n return null != (t = this.delegate) ? t.reparse() : void 0;\n }, u.prototype.events = {\n keydown: function keydown(t) {\n var e, i, o, r;\n\n if (n(t)) {\n if (e = l(t), null != (r = this.delegate) ? r.inputControllerDidReceiveKeyboardCommand(e) : void 0) return t.preventDefault();\n } else if (o = t.key, t.altKey && (o += \"+Alt\"), t.shiftKey && (o += \"+Shift\"), i = this.keys[o]) return this.withEvent(t, i);\n },\n paste: function paste(t) {\n var e, n, i, o, r, s, a, u, c;\n return h(t) ? (t.preventDefault(), this.attachFiles(t.clipboardData.files)) : p(t) ? (t.preventDefault(), n = {\n type: \"text/plain\",\n string: t.clipboardData.getData(\"text/plain\")\n }, null != (i = this.delegate) && i.inputControllerWillPaste(n), null != (o = this.responder) && o.insertString(n.string), this.render(), null != (r = this.delegate) ? r.inputControllerDidPaste(n) : void 0) : (e = null != (s = t.clipboardData) ? s.getData(\"URL\") : void 0) ? (t.preventDefault(), n = {\n type: \"text/html\",\n html: this.createLinkHTML(e)\n }, null != (a = this.delegate) && a.inputControllerWillPaste(n), null != (u = this.responder) && u.insertHTML(n.html), this.render(), null != (c = this.delegate) ? c.inputControllerDidPaste(n) : void 0) : void 0;\n },\n beforeinput: function beforeinput(t) {\n var e;\n return (e = this.inputTypes[t.inputType]) ? (this.withEvent(t, e), this.scheduleRender()) : void 0;\n },\n input: function input() {\n return e.selectionChangeObserver.reset();\n },\n dragstart: function dragstart(t) {\n var e, n;\n return (null != (e = this.responder) ? e.selectionContainsAttachments() : void 0) ? (t.dataTransfer.setData(\"application/x-trix-dragging\", !0), this.dragging = {\n range: null != (n = this.responder) ? n.getSelectedRange() : void 0,\n point: d(t)\n }) : void 0;\n },\n dragenter: function dragenter(t) {\n return c(t) ? t.preventDefault() : void 0;\n },\n dragover: function dragover(t) {\n var e, n;\n\n if (this.dragging) {\n if (t.preventDefault(), e = d(t), !i(e, this.dragging.point)) return this.dragging.point = e, null != (n = this.responder) ? n.setLocationRangeFromPointRange(e) : void 0;\n } else if (c(t)) return t.preventDefault();\n },\n drop: function drop(t) {\n var e, n, i, o;\n return this.dragging ? (t.preventDefault(), null != (n = this.delegate) && n.inputControllerWillMoveText(), null != (i = this.responder) && i.moveTextFromRange(this.dragging.range), this.dragging = null, this.scheduleRender()) : c(t) ? (t.preventDefault(), e = d(t), null != (o = this.responder) && o.setLocationRangeFromPointRange(e), this.attachFiles(t.dataTransfer.files)) : void 0;\n },\n dragend: function dragend() {\n var t;\n return this.dragging ? (null != (t = this.responder) && t.setSelectedRange(this.dragging.range), this.dragging = null) : void 0;\n },\n compositionend: function compositionend() {\n return this.composing ? (this.composing = !1, this.scheduleRender()) : void 0;\n }\n }, u.prototype.keys = {\n ArrowLeft: function ArrowLeft() {\n var t, e;\n return (null != (t = this.responder) ? t.shouldManageMovingCursorInDirection(\"backward\") : void 0) ? (this.event.preventDefault(), null != (e = this.responder) ? e.moveCursorInDirection(\"backward\") : void 0) : void 0;\n },\n ArrowRight: function ArrowRight() {\n var t, e;\n return (null != (t = this.responder) ? t.shouldManageMovingCursorInDirection(\"forward\") : void 0) ? (this.event.preventDefault(), null != (e = this.responder) ? e.moveCursorInDirection(\"forward\") : void 0) : void 0;\n },\n Backspace: function Backspace() {\n var t, e, n;\n return (null != (t = this.responder) ? t.shouldManageDeletingInDirection(\"backward\") : void 0) ? (this.event.preventDefault(), null != (e = this.delegate) && e.inputControllerWillPerformTyping(), null != (n = this.responder) && n.deleteInDirection(\"backward\"), this.render()) : void 0;\n },\n Tab: function Tab() {\n var t, e;\n return (null != (t = this.responder) ? t.canIncreaseNestingLevel() : void 0) ? (this.event.preventDefault(), null != (e = this.responder) && e.increaseNestingLevel(), this.render()) : void 0;\n },\n \"Tab+Shift\": function TabShift() {\n var t, e;\n return (null != (t = this.responder) ? t.canDecreaseNestingLevel() : void 0) ? (this.event.preventDefault(), null != (e = this.responder) && e.decreaseNestingLevel(), this.render()) : void 0;\n }\n }, u.prototype.inputTypes = {\n deleteByComposition: function deleteByComposition() {\n return this.deleteInDirection(\"backward\", {\n recordUndoEntry: !1\n });\n },\n deleteByCut: function deleteByCut() {\n return this.deleteInDirection(\"backward\");\n },\n deleteByDrag: function deleteByDrag() {\n return this.event.preventDefault(), this.withTargetDOMRange(function () {\n var t;\n return this.deleteByDragRange = null != (t = this.responder) ? t.getSelectedRange() : void 0;\n });\n },\n deleteCompositionText: function deleteCompositionText() {\n return this.deleteInDirection(\"backward\", {\n recordUndoEntry: !1\n });\n },\n deleteContent: function deleteContent() {\n return this.deleteInDirection(\"backward\");\n },\n deleteContentBackward: function deleteContentBackward() {\n return this.deleteInDirection(\"backward\");\n },\n deleteContentForward: function deleteContentForward() {\n return this.deleteInDirection(\"forward\");\n },\n deleteEntireSoftLine: function deleteEntireSoftLine() {\n return this.deleteInDirection(\"forward\");\n },\n deleteHardLineBackward: function deleteHardLineBackward() {\n return this.deleteInDirection(\"backward\");\n },\n deleteHardLineForward: function deleteHardLineForward() {\n return this.deleteInDirection(\"forward\");\n },\n deleteSoftLineBackward: function deleteSoftLineBackward() {\n return this.deleteInDirection(\"backward\");\n },\n deleteSoftLineForward: function deleteSoftLineForward() {\n return this.deleteInDirection(\"forward\");\n },\n deleteWordBackward: function deleteWordBackward() {\n return this.deleteInDirection(\"backward\");\n },\n deleteWordForward: function deleteWordForward() {\n return this.deleteInDirection(\"forward\");\n },\n formatBackColor: function formatBackColor() {\n return this.activateAttributeIfSupported(\"backgroundColor\", this.event.data);\n },\n formatBold: function formatBold() {\n return this.toggleAttributeIfSupported(\"bold\");\n },\n formatFontColor: function formatFontColor() {\n return this.activateAttributeIfSupported(\"color\", this.event.data);\n },\n formatFontName: function formatFontName() {\n return this.activateAttributeIfSupported(\"font\", this.event.data);\n },\n formatIndent: function formatIndent() {\n var t;\n return (null != (t = this.responder) ? t.canIncreaseNestingLevel() : void 0) ? this.withTargetDOMRange(function () {\n var t;\n return null != (t = this.responder) ? t.increaseNestingLevel() : void 0;\n }) : void 0;\n },\n formatItalic: function formatItalic() {\n return this.toggleAttributeIfSupported(\"italic\");\n },\n formatJustifyCenter: function formatJustifyCenter() {\n return this.toggleAttributeIfSupported(\"justifyCenter\");\n },\n formatJustifyFull: function formatJustifyFull() {\n return this.toggleAttributeIfSupported(\"justifyFull\");\n },\n formatJustifyLeft: function formatJustifyLeft() {\n return this.toggleAttributeIfSupported(\"justifyLeft\");\n },\n formatJustifyRight: function formatJustifyRight() {\n return this.toggleAttributeIfSupported(\"justifyRight\");\n },\n formatOutdent: function formatOutdent() {\n var t;\n return (null != (t = this.responder) ? t.canDecreaseNestingLevel() : void 0) ? this.withTargetDOMRange(function () {\n var t;\n return null != (t = this.responder) ? t.decreaseNestingLevel() : void 0;\n }) : void 0;\n },\n formatRemove: function formatRemove() {\n return this.withTargetDOMRange(function () {\n var t, e, n, i;\n i = [];\n\n for (t in null != (e = this.responder) ? e.getCurrentAttributes() : void 0) {\n i.push(null != (n = this.responder) ? n.removeCurrentAttribute(t) : void 0);\n }\n\n return i;\n });\n },\n formatSetBlockTextDirection: function formatSetBlockTextDirection() {\n return this.activateAttributeIfSupported(\"blockDir\", this.event.data);\n },\n formatSetInlineTextDirection: function formatSetInlineTextDirection() {\n return this.activateAttributeIfSupported(\"textDir\", this.event.data);\n },\n formatStrikeThrough: function formatStrikeThrough() {\n return this.toggleAttributeIfSupported(\"strike\");\n },\n formatSubscript: function formatSubscript() {\n return this.toggleAttributeIfSupported(\"sub\");\n },\n formatSuperscript: function formatSuperscript() {\n return this.toggleAttributeIfSupported(\"sup\");\n },\n formatUnderline: function formatUnderline() {\n return this.toggleAttributeIfSupported(\"underline\");\n },\n historyRedo: function historyRedo() {\n var t;\n return null != (t = this.delegate) ? t.inputControllerWillPerformRedo() : void 0;\n },\n historyUndo: function historyUndo() {\n var t;\n return null != (t = this.delegate) ? t.inputControllerWillPerformUndo() : void 0;\n },\n insertCompositionText: function insertCompositionText() {\n return this.composing = !0, this.insertString(this.event.data);\n },\n insertFromComposition: function insertFromComposition() {\n return this.composing = !1, this.insertString(this.event.data);\n },\n insertFromDrop: function insertFromDrop() {\n var t, e;\n return (t = this.deleteByDragRange) ? (this.deleteByDragRange = null, null != (e = this.delegate) && e.inputControllerWillMoveText(), this.withTargetDOMRange(function () {\n var e;\n return null != (e = this.responder) ? e.moveTextFromRange(t) : void 0;\n })) : void 0;\n },\n insertFromPaste: function insertFromPaste() {\n var n, i, o, r, s, a, u, c, l, h, p;\n return n = this.event.dataTransfer, s = {\n dataTransfer: n\n }, (i = n.getData(\"URL\")) ? (this.event.preventDefault(), s.type = \"text/html\", p = (r = n.getData(\"public.url-name\")) ? e.squishBreakableWhitespace(r).trim() : i, s.html = this.createLinkHTML(i, p), null != (a = this.delegate) && a.inputControllerWillPaste(s), this.withTargetDOMRange(function () {\n var t;\n return null != (t = this.responder) ? t.insertHTML(s.html) : void 0;\n }), this.afterRender = function (t) {\n return function () {\n var e;\n return null != (e = t.delegate) ? e.inputControllerDidPaste(s) : void 0;\n };\n }(this)) : t(n) ? (s.type = \"text/plain\", s.string = n.getData(\"text/plain\"), null != (u = this.delegate) && u.inputControllerWillPaste(s), this.withTargetDOMRange(function () {\n var t;\n return null != (t = this.responder) ? t.insertString(s.string) : void 0;\n }), this.afterRender = function (t) {\n return function () {\n var e;\n return null != (e = t.delegate) ? e.inputControllerDidPaste(s) : void 0;\n };\n }(this)) : (o = n.getData(\"text/html\")) ? (this.event.preventDefault(), s.type = \"text/html\", s.html = o, null != (c = this.delegate) && c.inputControllerWillPaste(s), this.withTargetDOMRange(function () {\n var t;\n return null != (t = this.responder) ? t.insertHTML(s.html) : void 0;\n }), this.afterRender = function (t) {\n return function () {\n var e;\n return null != (e = t.delegate) ? e.inputControllerDidPaste(s) : void 0;\n };\n }(this)) : (null != (l = n.files) ? l.length : void 0) ? (s.type = \"File\", s.file = n.files[0], null != (h = this.delegate) && h.inputControllerWillPaste(s), this.withTargetDOMRange(function () {\n var t;\n return null != (t = this.responder) ? t.insertFile(s.file) : void 0;\n }), this.afterRender = function (t) {\n return function () {\n var e;\n return null != (e = t.delegate) ? e.inputControllerDidPaste(s) : void 0;\n };\n }(this)) : void 0;\n },\n insertFromYank: function insertFromYank() {\n return this.insertString(this.event.data);\n },\n insertLineBreak: function insertLineBreak() {\n return this.insertString(\"\\n\");\n },\n insertLink: function insertLink() {\n return this.activateAttributeIfSupported(\"href\", this.event.data);\n },\n insertOrderedList: function insertOrderedList() {\n return this.toggleAttributeIfSupported(\"number\");\n },\n insertParagraph: function insertParagraph() {\n var t;\n return null != (t = this.delegate) && t.inputControllerWillPerformTyping(), this.withTargetDOMRange(function () {\n var t;\n return null != (t = this.responder) ? t.insertLineBreak() : void 0;\n });\n },\n insertReplacementText: function insertReplacementText() {\n return this.insertString(this.event.dataTransfer.getData(\"text/plain\"), {\n updatePosition: !1\n });\n },\n insertText: function insertText() {\n var t, e;\n return this.insertString(null != (t = this.event.data) ? t : null != (e = this.event.dataTransfer) ? e.getData(\"text/plain\") : void 0);\n },\n insertTranspose: function insertTranspose() {\n return this.insertString(this.event.data);\n },\n insertUnorderedList: function insertUnorderedList() {\n return this.toggleAttributeIfSupported(\"bullet\");\n }\n }, u.prototype.insertString = function (t, e) {\n var n;\n return null == t && (t = \"\"), null != (n = this.delegate) && n.inputControllerWillPerformTyping(), this.withTargetDOMRange(function () {\n var n;\n return null != (n = this.responder) ? n.insertString(t, e) : void 0;\n });\n }, u.prototype.toggleAttributeIfSupported = function (t) {\n var n;\n return a.call(e.getAllAttributeNames(), t) >= 0 ? (null != (n = this.delegate) && n.inputControllerWillPerformFormatting(t), this.withTargetDOMRange(function () {\n var e;\n return null != (e = this.responder) ? e.toggleCurrentAttribute(t) : void 0;\n })) : void 0;\n }, u.prototype.activateAttributeIfSupported = function (t, n) {\n var i;\n return a.call(e.getAllAttributeNames(), t) >= 0 ? (null != (i = this.delegate) && i.inputControllerWillPerformFormatting(t), this.withTargetDOMRange(function () {\n var e;\n return null != (e = this.responder) ? e.setCurrentAttribute(t, n) : void 0;\n })) : void 0;\n }, u.prototype.deleteInDirection = function (t, e) {\n var n, i, o, r;\n return o = (null != e ? e : {\n recordUndoEntry: !0\n }).recordUndoEntry, o && null != (r = this.delegate) && r.inputControllerWillPerformTyping(), i = function (e) {\n return function () {\n var n;\n return null != (n = e.responder) ? n.deleteInDirection(t) : void 0;\n };\n }(this), (n = this.getTargetDOMRange({\n minLength: 2\n })) ? this.withTargetDOMRange(n, i) : i();\n }, u.prototype.withTargetDOMRange = function (t, n) {\n var i;\n return \"function\" == typeof t && (n = t, t = this.getTargetDOMRange()), t ? null != (i = this.responder) ? i.withTargetDOMRange(t, n.bind(this)) : void 0 : (e.selectionChangeObserver.reset(), n.call(this));\n }, u.prototype.getTargetDOMRange = function (t) {\n var e, n, i, o;\n return i = (null != t ? t : {\n minLength: 0\n }).minLength, (o = \"function\" == typeof (e = this.event).getTargetRanges ? e.getTargetRanges() : void 0) && o.length && (n = f(o[0]), 0 === i || n.toString().length >= i) ? n : void 0;\n }, f = function f(t) {\n var e;\n return e = document.createRange(), e.setStart(t.startContainer, t.startOffset), e.setEnd(t.endContainer, t.endOffset), e;\n }, u.prototype.withEvent = function (t, e) {\n var n;\n this.event = t;\n\n try {\n n = e.call(this);\n } finally {\n this.event = null;\n }\n\n return n;\n }, c = function c(t) {\n var e, n;\n return a.call(null != (e = null != (n = t.dataTransfer) ? n.types : void 0) ? e : [], \"Files\") >= 0;\n }, h = function h(t) {\n var e;\n return (e = t.clipboardData) ? a.call(e.types, \"Files\") >= 0 && 1 === e.types.length && e.files.length >= 1 : void 0;\n }, p = function p(t) {\n var e;\n return (e = t.clipboardData) ? a.call(e.types, \"text/plain\") >= 0 && 1 === e.types.length : void 0;\n }, l = function l(t) {\n var e;\n return e = [], t.altKey && e.push(\"alt\"), t.shiftKey && e.push(\"shift\"), e.push(t.key), e;\n }, d = function d(t) {\n return {\n x: t.clientX,\n y: t.clientY\n };\n }, u;\n }(e.InputController);\n }.call(this), function () {\n var t,\n n,\n i,\n o,\n r,\n s,\n a,\n u,\n c = function c(t, e) {\n return function () {\n return t.apply(e, arguments);\n };\n },\n l = function l(t, e) {\n function n() {\n this.constructor = t;\n }\n\n for (var i in e) {\n h.call(e, i) && (t[i] = e[i]);\n }\n\n return n.prototype = e.prototype, t.prototype = new n(), t.__super__ = e.prototype, t;\n },\n h = {}.hasOwnProperty;\n\n n = e.defer, i = e.handleEvent, s = e.makeElement, u = e.tagName, a = e.config, r = a.lang, t = a.css, o = a.keyNames, e.AttachmentEditorController = function (a) {\n function h(t, e, n, i) {\n this.attachmentPiece = t, this.element = e, this.container = n, this.options = null != i ? i : {}, this.didBlurCaption = c(this.didBlurCaption, this), this.didChangeCaption = c(this.didChangeCaption, this), this.didInputCaption = c(this.didInputCaption, this), this.didKeyDownCaption = c(this.didKeyDownCaption, this), this.didClickActionButton = c(this.didClickActionButton, this), this.didClickToolbar = c(this.didClickToolbar, this), this.attachment = this.attachmentPiece.attachment, \"a\" === u(this.element) && (this.element = this.element.firstChild), this.install();\n }\n\n var p;\n return l(h, a), p = function p(t) {\n return function () {\n var e;\n return e = t.apply(this, arguments), e[\"do\"](), null == this.undos && (this.undos = []), this.undos.push(e.undo);\n };\n }, h.prototype.install = function () {\n return this.makeElementMutable(), this.addToolbar(), this.attachment.isPreviewable() ? this.installCaptionEditor() : void 0;\n }, h.prototype.uninstall = function () {\n var t, e;\n\n for (this.savePendingCaption(); e = this.undos.pop();) {\n e();\n }\n\n return null != (t = this.delegate) ? t.didUninstallAttachmentEditor(this) : void 0;\n }, h.prototype.savePendingCaption = function () {\n var t, e, n;\n return null != this.pendingCaption ? (t = this.pendingCaption, this.pendingCaption = null, t ? null != (e = this.delegate) && \"function\" == typeof e.attachmentEditorDidRequestUpdatingAttributesForAttachment ? e.attachmentEditorDidRequestUpdatingAttributesForAttachment({\n caption: t\n }, this.attachment) : void 0 : null != (n = this.delegate) && \"function\" == typeof n.attachmentEditorDidRequestRemovingAttributeForAttachment ? n.attachmentEditorDidRequestRemovingAttributeForAttachment(\"caption\", this.attachment) : void 0) : void 0;\n }, h.prototype.makeElementMutable = p(function () {\n return {\n \"do\": function (t) {\n return function () {\n return t.element.dataset.trixMutable = !0;\n };\n }(this),\n undo: function (t) {\n return function () {\n return delete t.element.dataset.trixMutable;\n };\n }(this)\n };\n }), h.prototype.addToolbar = p(function () {\n var n;\n return n = s({\n tagName: \"div\",\n className: t.attachmentToolbar,\n data: {\n trixMutable: !0\n },\n childNodes: s({\n tagName: \"div\",\n className: \"trix-button-row\",\n childNodes: s({\n tagName: \"span\",\n className: \"trix-button-group trix-button-group--actions\",\n childNodes: s({\n tagName: \"button\",\n className: \"trix-button trix-button--remove\",\n textContent: r.remove,\n attributes: {\n title: r.remove\n },\n data: {\n trixAction: \"remove\"\n }\n })\n })\n })\n }), this.attachment.isPreviewable() && n.appendChild(s({\n tagName: \"div\",\n className: t.attachmentMetadataContainer,\n childNodes: s({\n tagName: \"span\",\n className: t.attachmentMetadata,\n childNodes: [s({\n tagName: \"span\",\n className: t.attachmentName,\n textContent: this.attachment.getFilename(),\n attributes: {\n title: this.attachment.getFilename()\n }\n }), s({\n tagName: \"span\",\n className: t.attachmentSize,\n textContent: this.attachment.getFormattedFilesize()\n })]\n })\n })), i(\"click\", {\n onElement: n,\n withCallback: this.didClickToolbar\n }), i(\"click\", {\n onElement: n,\n matchingSelector: \"[data-trix-action]\",\n withCallback: this.didClickActionButton\n }), {\n \"do\": function (t) {\n return function () {\n return t.element.appendChild(n);\n };\n }(this),\n undo: function () {\n return function () {\n return e.removeNode(n);\n };\n }(this)\n };\n }), h.prototype.installCaptionEditor = p(function () {\n var o, a, u, c, l;\n return c = s({\n tagName: \"textarea\",\n className: t.attachmentCaptionEditor,\n attributes: {\n placeholder: r.captionPlaceholder\n },\n data: {\n trixMutable: !0\n }\n }), c.value = this.attachmentPiece.getCaption(), l = c.cloneNode(), l.classList.add(\"trix-autoresize-clone\"), l.tabIndex = -1, o = function o() {\n return l.value = c.value, c.style.height = l.scrollHeight + \"px\";\n }, i(\"input\", {\n onElement: c,\n withCallback: o\n }), i(\"input\", {\n onElement: c,\n withCallback: this.didInputCaption\n }), i(\"keydown\", {\n onElement: c,\n withCallback: this.didKeyDownCaption\n }), i(\"change\", {\n onElement: c,\n withCallback: this.didChangeCaption\n }), i(\"blur\", {\n onElement: c,\n withCallback: this.didBlurCaption\n }), u = this.element.querySelector(\"figcaption\"), a = u.cloneNode(), {\n \"do\": function (e) {\n return function () {\n return u.style.display = \"none\", a.appendChild(c), a.appendChild(l), a.classList.add(t.attachmentCaption + \"--editing\"), u.parentElement.insertBefore(a, u), o(), e.options.editCaption ? n(function () {\n return c.focus();\n }) : void 0;\n };\n }(this),\n undo: function undo() {\n return e.removeNode(a), u.style.display = null;\n }\n };\n }), h.prototype.didClickToolbar = function (t) {\n return t.preventDefault(), t.stopPropagation();\n }, h.prototype.didClickActionButton = function (t) {\n var e, n;\n\n switch (e = t.target.getAttribute(\"data-trix-action\")) {\n case \"remove\":\n return null != (n = this.delegate) ? n.attachmentEditorDidRequestRemovalOfAttachment(this.attachment) : void 0;\n }\n }, h.prototype.didKeyDownCaption = function (t) {\n var e;\n return \"return\" === o[t.keyCode] ? (t.preventDefault(), this.savePendingCaption(), null != (e = this.delegate) && \"function\" == typeof e.attachmentEditorDidRequestDeselectingAttachment ? e.attachmentEditorDidRequestDeselectingAttachment(this.attachment) : void 0) : void 0;\n }, h.prototype.didInputCaption = function (t) {\n return this.pendingCaption = t.target.value.replace(/\\s/g, \" \").trim();\n }, h.prototype.didChangeCaption = function () {\n return this.savePendingCaption();\n }, h.prototype.didBlurCaption = function () {\n return this.savePendingCaption();\n }, h;\n }(e.BasicObject);\n }.call(this), function () {\n var t,\n n,\n i,\n o = function o(t, e) {\n function n() {\n this.constructor = t;\n }\n\n for (var i in e) {\n r.call(e, i) && (t[i] = e[i]);\n }\n\n return n.prototype = e.prototype, t.prototype = new n(), t.__super__ = e.prototype, t;\n },\n r = {}.hasOwnProperty;\n\n i = e.makeElement, t = e.config.css, e.AttachmentView = function (r) {\n function s() {\n s.__super__.constructor.apply(this, arguments), this.attachment = this.object, this.attachment.uploadProgressDelegate = this, this.attachmentPiece = this.options.piece;\n }\n\n var a;\n return o(s, r), s.attachmentSelector = \"[data-trix-attachment]\", s.prototype.createContentNodes = function () {\n return [];\n }, s.prototype.createNodes = function () {\n var e, n, o, r, s, u, c;\n if (e = r = i({\n tagName: \"figure\",\n className: this.getClassName(),\n data: this.getData(),\n editable: !1\n }), (n = this.getHref()) && (r = i({\n tagName: \"a\",\n editable: !1,\n attributes: {\n href: n,\n tabindex: -1\n }\n }), e.appendChild(r)), this.attachment.hasContent()) r.innerHTML = this.attachment.getContent();else for (c = this.createContentNodes(), o = 0, s = c.length; s > o; o++) {\n u = c[o], r.appendChild(u);\n }\n return r.appendChild(this.createCaptionElement()), this.attachment.isPending() && (this.progressElement = i({\n tagName: \"progress\",\n attributes: {\n \"class\": t.attachmentProgress,\n value: this.attachment.getUploadProgress(),\n max: 100\n },\n data: {\n trixMutable: !0,\n trixStoreKey: [\"progressElement\", this.attachment.id].join(\"/\")\n }\n }), e.appendChild(this.progressElement)), [a(\"left\"), e, a(\"right\")];\n }, s.prototype.createCaptionElement = function () {\n var e, n, o, r, s, a, u;\n return o = i({\n tagName: \"figcaption\",\n className: t.attachmentCaption\n }), (e = this.attachmentPiece.getCaption()) ? (o.classList.add(t.attachmentCaption + \"--edited\"), o.textContent = e) : (n = this.getCaptionConfig(), n.name && (r = this.attachment.getFilename()), n.size && (a = this.attachment.getFormattedFilesize()), r && (s = i({\n tagName: \"span\",\n className: t.attachmentName,\n textContent: r\n }), o.appendChild(s)), a && (r && o.appendChild(document.createTextNode(\" \")), u = i({\n tagName: \"span\",\n className: t.attachmentSize,\n textContent: a\n }), o.appendChild(u))), o;\n }, s.prototype.getClassName = function () {\n var e, n;\n return n = [t.attachment, t.attachment + \"--\" + this.attachment.getType()], (e = this.attachment.getExtension()) && n.push(t.attachment + \"--\" + e), n.join(\" \");\n }, s.prototype.getData = function () {\n var t, e;\n return e = {\n trixAttachment: JSON.stringify(this.attachment),\n trixContentType: this.attachment.getContentType(),\n trixId: this.attachment.id\n }, t = this.attachmentPiece.attributes, t.isEmpty() || (e.trixAttributes = JSON.stringify(t)), this.attachment.isPending() && (e.trixSerialize = !1), e;\n }, s.prototype.getHref = function () {\n return n(this.attachment.getContent(), \"a\") ? void 0 : this.attachment.getHref();\n }, s.prototype.getCaptionConfig = function () {\n var t, n, i;\n return i = this.attachment.getType(), t = e.copyObject(null != (n = e.config.attachments[i]) ? n.caption : void 0), \"file\" === i && (t.name = !0), t;\n }, s.prototype.findProgressElement = function () {\n var t;\n return null != (t = this.findElement()) ? t.querySelector(\"progress\") : void 0;\n }, a = function a(t) {\n return i({\n tagName: \"span\",\n textContent: e.ZERO_WIDTH_SPACE,\n data: {\n trixCursorTarget: t,\n trixSerialize: !1\n }\n });\n }, s.prototype.attachmentDidChangeUploadProgress = function () {\n var t, e;\n return e = this.attachment.getUploadProgress(), null != (t = this.findProgressElement()) ? t.value = e : void 0;\n }, s;\n }(e.ObjectView), n = function n(t, e) {\n var n;\n return n = i(\"div\"), n.innerHTML = null != t ? t : \"\", n.querySelector(e);\n };\n }.call(this), function () {\n var t,\n n = function n(t, e) {\n function n() {\n this.constructor = t;\n }\n\n for (var o in e) {\n i.call(e, o) && (t[o] = e[o]);\n }\n\n return n.prototype = e.prototype, t.prototype = new n(), t.__super__ = e.prototype, t;\n },\n i = {}.hasOwnProperty;\n\n t = e.makeElement, e.PreviewableAttachmentView = function (i) {\n function o() {\n o.__super__.constructor.apply(this, arguments), this.attachment.previewDelegate = this;\n }\n\n return n(o, i), o.prototype.createContentNodes = function () {\n return this.image = t({\n tagName: \"img\",\n attributes: {\n src: \"\"\n },\n data: {\n trixMutable: !0\n }\n }), this.refresh(this.image), [this.image];\n }, o.prototype.createCaptionElement = function () {\n var t;\n return t = o.__super__.createCaptionElement.apply(this, arguments), t.textContent || t.setAttribute(\"data-trix-placeholder\", e.config.lang.captionPlaceholder), t;\n }, o.prototype.refresh = function (t) {\n var e;\n return null == t && (t = null != (e = this.findElement()) ? e.querySelector(\"img\") : void 0), t ? this.updateAttributesForImage(t) : void 0;\n }, o.prototype.updateAttributesForImage = function (t) {\n var e, n, i, o, r, s;\n return r = this.attachment.getURL(), n = this.attachment.getPreviewURL(), t.src = n || r, n === r ? t.removeAttribute(\"data-trix-serialized-attributes\") : (i = JSON.stringify({\n src: r\n }), t.setAttribute(\"data-trix-serialized-attributes\", i)), s = this.attachment.getWidth(), e = this.attachment.getHeight(), null != s && (t.width = s), null != e && (t.height = e), o = [\"imageElement\", this.attachment.id, t.src, t.width, t.height].join(\"/\"), t.dataset.trixStoreKey = o;\n }, o.prototype.attachmentDidChangeAttributes = function () {\n return this.refresh(this.image), this.refresh();\n }, o;\n }(e.AttachmentView);\n }.call(this), function () {\n var t,\n n,\n i,\n o = function o(t, e) {\n function n() {\n this.constructor = t;\n }\n\n for (var i in e) {\n r.call(e, i) && (t[i] = e[i]);\n }\n\n return n.prototype = e.prototype, t.prototype = new n(), t.__super__ = e.prototype, t;\n },\n r = {}.hasOwnProperty;\n\n i = e.makeElement, t = e.findInnerElement, n = e.getTextConfig, e.PieceView = function (r) {\n function s() {\n var t;\n s.__super__.constructor.apply(this, arguments), this.piece = this.object, this.attributes = this.piece.getAttributes(), t = this.options, this.textConfig = t.textConfig, this.context = t.context, this.piece.attachment ? this.attachment = this.piece.attachment : this.string = this.piece.toString();\n }\n\n var a;\n return o(s, r), s.prototype.createNodes = function () {\n var e, n, i, o, r, s;\n\n if (s = this.attachment ? this.createAttachmentNodes() : this.createStringNodes(), e = this.createElement()) {\n for (i = t(e), n = 0, o = s.length; o > n; n++) {\n r = s[n], i.appendChild(r);\n }\n\n s = [e];\n }\n\n return s;\n }, s.prototype.createAttachmentNodes = function () {\n var t, n;\n return t = this.attachment.isPreviewable() ? e.PreviewableAttachmentView : e.AttachmentView, n = this.createChildView(t, this.piece.attachment, {\n piece: this.piece\n }), n.getNodes();\n }, s.prototype.createStringNodes = function () {\n var t, e, n, o, r, s, a, u, c, l;\n if (null != (u = this.textConfig) ? u.plaintext : void 0) return [document.createTextNode(this.string)];\n\n for (a = [], c = this.string.split(\"\\n\"), n = e = 0, o = c.length; o > e; n = ++e) {\n l = c[n], n > 0 && (t = i(\"br\"), a.push(t)), (r = l.length) && (s = document.createTextNode(this.preserveSpaces(l)), a.push(s));\n }\n\n return a;\n }, s.prototype.createElement = function () {\n var t, e, o, r, s, a, u, c, l;\n c = {}, a = this.attributes;\n\n for (r in a) {\n if (l = a[r], (t = n(r)) && (t.tagName && (s = i(t.tagName), o ? (o.appendChild(s), o = s) : e = o = s), t.styleProperty && (c[t.styleProperty] = l), t.style)) {\n u = t.style;\n\n for (r in u) {\n l = u[r], c[r] = l;\n }\n }\n }\n\n if (Object.keys(c).length) {\n null == e && (e = i(\"span\"));\n\n for (r in c) {\n l = c[r], e.style[r] = l;\n }\n }\n\n return e;\n }, s.prototype.createContainerElement = function () {\n var t, e, o, r, s;\n r = this.attributes;\n\n for (o in r) {\n if (s = r[o], (e = n(o)) && e.groupTagName) return t = {}, t[o] = s, i(e.groupTagName, t);\n }\n }, a = e.NON_BREAKING_SPACE, s.prototype.preserveSpaces = function (t) {\n return this.context.isLast && (t = t.replace(/\\ $/, a)), t = t.replace(/(\\S)\\ {3}(\\S)/g, \"$1 \" + a + \" $2\").replace(/\\ {2}/g, a + \" \").replace(/\\ {2}/g, \" \" + a), (this.context.isFirst || this.context.followsWhitespace) && (t = t.replace(/^\\ /, a)), t;\n }, s;\n }(e.ObjectView);\n }.call(this), function () {\n var t = function t(_t11, e) {\n function i() {\n this.constructor = _t11;\n }\n\n for (var o in e) {\n n.call(e, o) && (_t11[o] = e[o]);\n }\n\n return i.prototype = e.prototype, _t11.prototype = new i(), _t11.__super__ = e.prototype, _t11;\n },\n n = {}.hasOwnProperty;\n\n e.TextView = function (n) {\n function i() {\n i.__super__.constructor.apply(this, arguments), this.text = this.object, this.textConfig = this.options.textConfig;\n }\n\n var o;\n return t(i, n), i.prototype.createNodes = function () {\n var t, n, i, r, s, a, u, c, l, h;\n\n for (a = [], c = e.ObjectGroup.groupObjects(this.getPieces()), r = c.length - 1, i = n = 0, s = c.length; s > n; i = ++n) {\n u = c[i], t = {}, 0 === i && (t.isFirst = !0), i === r && (t.isLast = !0), o(l) && (t.followsWhitespace = !0), h = this.findOrCreateCachedChildView(e.PieceView, u, {\n textConfig: this.textConfig,\n context: t\n }), a.push.apply(a, h.getNodes()), l = u;\n }\n\n return a;\n }, i.prototype.getPieces = function () {\n var t, e, n, i, o;\n\n for (i = this.text.getPieces(), o = [], t = 0, e = i.length; e > t; t++) {\n n = i[t], n.hasAttribute(\"blockBreak\") || o.push(n);\n }\n\n return o;\n }, o = function o(t) {\n return /\\s$/.test(null != t ? t.toString() : void 0);\n }, i;\n }(e.ObjectView);\n }.call(this), function () {\n var t,\n n,\n i,\n o = function o(t, e) {\n function n() {\n this.constructor = t;\n }\n\n for (var i in e) {\n r.call(e, i) && (t[i] = e[i]);\n }\n\n return n.prototype = e.prototype, t.prototype = new n(), t.__super__ = e.prototype, t;\n },\n r = {}.hasOwnProperty;\n\n i = e.makeElement, n = e.getBlockConfig, t = e.config.css, e.BlockView = function (r) {\n function s() {\n s.__super__.constructor.apply(this, arguments), this.block = this.object, this.attributes = this.block.getAttributes();\n }\n\n return o(s, r), s.prototype.createNodes = function () {\n var t, o, r, s, a, u, c, l, h, p, d;\n if (o = document.createComment(\"block\"), c = [o], this.block.isEmpty() ? c.push(i(\"br\")) : (p = null != (l = n(this.block.getLastAttribute())) ? l.text : void 0, d = this.findOrCreateCachedChildView(e.TextView, this.block.text, {\n textConfig: p\n }), c.push.apply(c, d.getNodes()), this.shouldAddExtraNewlineElement() && c.push(i(\"br\"))), this.attributes.length) return c;\n\n for (h = e.config.blockAttributes[\"default\"].tagName, this.block.isRTL() && (t = {\n dir: \"rtl\"\n }), r = i({\n tagName: h,\n attributes: t\n }), s = 0, a = c.length; a > s; s++) {\n u = c[s], r.appendChild(u);\n }\n\n return [r];\n }, s.prototype.createContainerElement = function (e) {\n var o, r, s, a, u;\n return o = this.attributes[e], u = n(o).tagName, 0 === e && this.block.isRTL() && (r = {\n dir: \"rtl\"\n }), \"attachmentGallery\" === o && (a = this.block.getBlockBreakPosition(), s = t.attachmentGallery + \" \" + t.attachmentGallery + \"--\" + a), i({\n tagName: u,\n className: s,\n attributes: r\n });\n }, s.prototype.shouldAddExtraNewlineElement = function () {\n return /\\n\\n$/.test(this.block.toString());\n }, s;\n }(e.ObjectView);\n }.call(this), function () {\n var t,\n n,\n i = function i(t, e) {\n function n() {\n this.constructor = t;\n }\n\n for (var i in e) {\n o.call(e, i) && (t[i] = e[i]);\n }\n\n return n.prototype = e.prototype, t.prototype = new n(), t.__super__ = e.prototype, t;\n },\n o = {}.hasOwnProperty;\n\n t = e.defer, n = e.makeElement, e.DocumentView = function (o) {\n function r() {\n r.__super__.constructor.apply(this, arguments), this.element = this.options.element, this.elementStore = new e.ElementStore(), this.setDocument(this.object);\n }\n\n var s, a, u;\n return i(r, o), r.render = function (t) {\n var e, i;\n return e = n(\"div\"), i = new this(t, {\n element: e\n }), i.render(), i.sync(), e;\n }, r.prototype.setDocument = function (t) {\n return t.isEqualTo(this.document) ? void 0 : this.document = this.object = t;\n }, r.prototype.render = function () {\n var t, i, o, r, s, a, u;\n\n if (this.childViews = [], this.shadowElement = n(\"div\"), !this.document.isEmpty()) {\n for (s = e.ObjectGroup.groupObjects(this.document.getBlocks(), {\n asTree: !0\n }), a = [], t = 0, i = s.length; i > t; t++) {\n r = s[t], u = this.findOrCreateCachedChildView(e.BlockView, r), a.push(function () {\n var t, e, n, i;\n\n for (n = u.getNodes(), i = [], t = 0, e = n.length; e > t; t++) {\n o = n[t], i.push(this.shadowElement.appendChild(o));\n }\n\n return i;\n }.call(this));\n }\n\n return a;\n }\n }, r.prototype.isSynced = function () {\n return s(this.shadowElement, this.element);\n }, r.prototype.sync = function () {\n var t;\n\n for (t = this.createDocumentFragmentForSync(); this.element.lastChild;) {\n this.element.removeChild(this.element.lastChild);\n }\n\n return this.element.appendChild(t), this.didSync();\n }, r.prototype.didSync = function () {\n return this.elementStore.reset(a(this.element)), t(function (t) {\n return function () {\n return t.garbageCollectCachedViews();\n };\n }(this));\n }, r.prototype.createDocumentFragmentForSync = function () {\n var t, e, n, i, o, r, s, u, c, l;\n\n for (e = document.createDocumentFragment(), u = this.shadowElement.childNodes, n = 0, o = u.length; o > n; n++) {\n s = u[n], e.appendChild(s.cloneNode(!0));\n }\n\n for (c = a(e), i = 0, r = c.length; r > i; i++) {\n t = c[i], (l = this.elementStore.remove(t)) && t.parentNode.replaceChild(l, t);\n }\n\n return e;\n }, a = function a(t) {\n return t.querySelectorAll(\"[data-trix-store-key]\");\n }, s = function s(t, e) {\n return u(t.innerHTML) === u(e.innerHTML);\n }, u = function u(t) {\n return t.replace(/ /g, \" \");\n }, r;\n }(e.ObjectView);\n }.call(this), function () {\n var t,\n n,\n i,\n o,\n r,\n s = function s(t, e) {\n return function () {\n return t.apply(e, arguments);\n };\n },\n a = function a(t, e) {\n function n() {\n this.constructor = t;\n }\n\n for (var i in e) {\n u.call(e, i) && (t[i] = e[i]);\n }\n\n return n.prototype = e.prototype, t.prototype = new n(), t.__super__ = e.prototype, t;\n },\n u = {}.hasOwnProperty;\n\n i = e.findClosestElementFromNode, o = e.handleEvent, r = e.innerElementIsActive, n = e.defer, t = e.AttachmentView.attachmentSelector, e.CompositionController = function (u) {\n function c(n, i) {\n this.element = n, this.composition = i, this.didClickAttachment = s(this.didClickAttachment, this), this.didBlur = s(this.didBlur, this), this.didFocus = s(this.didFocus, this), this.documentView = new e.DocumentView(this.composition.document, {\n element: this.element\n }), o(\"focus\", {\n onElement: this.element,\n withCallback: this.didFocus\n }), o(\"blur\", {\n onElement: this.element,\n withCallback: this.didBlur\n }), o(\"click\", {\n onElement: this.element,\n matchingSelector: \"a[contenteditable=false]\",\n preventDefault: !0\n }), o(\"mousedown\", {\n onElement: this.element,\n matchingSelector: t,\n withCallback: this.didClickAttachment\n }), o(\"click\", {\n onElement: this.element,\n matchingSelector: \"a\" + t,\n preventDefault: !0\n });\n }\n\n return a(c, u), c.prototype.didFocus = function () {\n var t, e, n;\n return t = function (t) {\n return function () {\n var e;\n return t.focused ? void 0 : (t.focused = !0, null != (e = t.delegate) && \"function\" == typeof e.compositionControllerDidFocus ? e.compositionControllerDidFocus() : void 0);\n };\n }(this), null != (e = null != (n = this.blurPromise) ? n.then(t) : void 0) ? e : t();\n }, c.prototype.didBlur = function () {\n return this.blurPromise = new Promise(function (t) {\n return function (e) {\n return n(function () {\n var n;\n return r(t.element) || (t.focused = null, null != (n = t.delegate) && \"function\" == typeof n.compositionControllerDidBlur && n.compositionControllerDidBlur()), t.blurPromise = null, e();\n });\n };\n }(this));\n }, c.prototype.didClickAttachment = function (t, e) {\n var n, o, r;\n return n = this.findAttachmentForElement(e), o = null != i(t.target, {\n matchingSelector: \"figcaption\"\n }), null != (r = this.delegate) && \"function\" == typeof r.compositionControllerDidSelectAttachment ? r.compositionControllerDidSelectAttachment(n, {\n editCaption: o\n }) : void 0;\n }, c.prototype.getSerializableElement = function () {\n return this.isEditingAttachment() ? this.documentView.shadowElement : this.element;\n }, c.prototype.render = function () {\n var t, e, n;\n return this.revision !== this.composition.revision && (this.documentView.setDocument(this.composition.document), this.documentView.render(), this.revision = this.composition.revision), this.canSyncDocumentView() && !this.documentView.isSynced() && (null != (t = this.delegate) && \"function\" == typeof t.compositionControllerWillSyncDocumentView && t.compositionControllerWillSyncDocumentView(), this.documentView.sync(), null != (e = this.delegate) && \"function\" == typeof e.compositionControllerDidSyncDocumentView && e.compositionControllerDidSyncDocumentView()), null != (n = this.delegate) && \"function\" == typeof n.compositionControllerDidRender ? n.compositionControllerDidRender() : void 0;\n }, c.prototype.rerenderViewForObject = function (t) {\n return this.invalidateViewForObject(t), this.render();\n }, c.prototype.invalidateViewForObject = function (t) {\n return this.documentView.invalidateViewForObject(t);\n }, c.prototype.isViewCachingEnabled = function () {\n return this.documentView.isViewCachingEnabled();\n }, c.prototype.enableViewCaching = function () {\n return this.documentView.enableViewCaching();\n }, c.prototype.disableViewCaching = function () {\n return this.documentView.disableViewCaching();\n }, c.prototype.refreshViewCache = function () {\n return this.documentView.garbageCollectCachedViews();\n }, c.prototype.isEditingAttachment = function () {\n return null != this.attachmentEditor;\n }, c.prototype.installAttachmentEditorForAttachment = function (t, n) {\n var i, o, r;\n if ((null != (r = this.attachmentEditor) ? r.attachment : void 0) !== t && (o = this.documentView.findElementForObject(t))) return this.uninstallAttachmentEditor(), i = this.composition.document.getAttachmentPieceForAttachment(t), this.attachmentEditor = new e.AttachmentEditorController(i, o, this.element, n), this.attachmentEditor.delegate = this;\n }, c.prototype.uninstallAttachmentEditor = function () {\n var t;\n return null != (t = this.attachmentEditor) ? t.uninstall() : void 0;\n }, c.prototype.didUninstallAttachmentEditor = function () {\n return this.attachmentEditor = null, this.render();\n }, c.prototype.attachmentEditorDidRequestUpdatingAttributesForAttachment = function (t, e) {\n var n;\n return null != (n = this.delegate) && \"function\" == typeof n.compositionControllerWillUpdateAttachment && n.compositionControllerWillUpdateAttachment(e), this.composition.updateAttributesForAttachment(t, e);\n }, c.prototype.attachmentEditorDidRequestRemovingAttributeForAttachment = function (t, e) {\n var n;\n return null != (n = this.delegate) && \"function\" == typeof n.compositionControllerWillUpdateAttachment && n.compositionControllerWillUpdateAttachment(e), this.composition.removeAttributeForAttachment(t, e);\n }, c.prototype.attachmentEditorDidRequestRemovalOfAttachment = function (t) {\n var e;\n return null != (e = this.delegate) && \"function\" == typeof e.compositionControllerDidRequestRemovalOfAttachment ? e.compositionControllerDidRequestRemovalOfAttachment(t) : void 0;\n }, c.prototype.attachmentEditorDidRequestDeselectingAttachment = function (t) {\n var e;\n return null != (e = this.delegate) && \"function\" == typeof e.compositionControllerDidRequestDeselectingAttachment ? e.compositionControllerDidRequestDeselectingAttachment(t) : void 0;\n }, c.prototype.canSyncDocumentView = function () {\n return !this.isEditingAttachment();\n }, c.prototype.findAttachmentForElement = function (t) {\n return this.composition.document.getAttachmentById(parseInt(t.dataset.trixId, 10));\n }, c;\n }(e.BasicObject);\n }.call(this), function () {\n var t,\n n,\n i,\n o = function o(t, e) {\n return function () {\n return t.apply(e, arguments);\n };\n },\n r = function r(t, e) {\n function n() {\n this.constructor = t;\n }\n\n for (var i in e) {\n s.call(e, i) && (t[i] = e[i]);\n }\n\n return n.prototype = e.prototype, t.prototype = new n(), t.__super__ = e.prototype, t;\n },\n s = {}.hasOwnProperty;\n\n n = e.handleEvent, i = e.triggerEvent, t = e.findClosestElementFromNode, e.ToolbarController = function (e) {\n function s(t) {\n this.element = t, this.didKeyDownDialogInput = o(this.didKeyDownDialogInput, this), this.didClickDialogButton = o(this.didClickDialogButton, this), this.didClickAttributeButton = o(this.didClickAttributeButton, this), this.didClickActionButton = o(this.didClickActionButton, this), this.attributes = {}, this.actions = {}, this.resetDialogInputs(), n(\"mousedown\", {\n onElement: this.element,\n matchingSelector: a,\n withCallback: this.didClickActionButton\n }), n(\"mousedown\", {\n onElement: this.element,\n matchingSelector: c,\n withCallback: this.didClickAttributeButton\n }), n(\"click\", {\n onElement: this.element,\n matchingSelector: v,\n preventDefault: !0\n }), n(\"click\", {\n onElement: this.element,\n matchingSelector: l,\n withCallback: this.didClickDialogButton\n }), n(\"keydown\", {\n onElement: this.element,\n matchingSelector: h,\n withCallback: this.didKeyDownDialogInput\n });\n }\n\n var a, u, c, l, h, p, d, f, g, m, v;\n return r(s, e), c = \"[data-trix-attribute]\", a = \"[data-trix-action]\", v = c + \", \" + a, p = \"[data-trix-dialog]\", u = p + \"[data-trix-active]\", l = p + \" [data-trix-method]\", h = p + \" [data-trix-input]\", s.prototype.didClickActionButton = function (t, e) {\n var n, i, o;\n return null != (i = this.delegate) && i.toolbarDidClickButton(), t.preventDefault(), n = d(e), this.getDialog(n) ? this.toggleDialog(n) : null != (o = this.delegate) ? o.toolbarDidInvokeAction(n) : void 0;\n }, s.prototype.didClickAttributeButton = function (t, e) {\n var n, i, o;\n return null != (i = this.delegate) && i.toolbarDidClickButton(), t.preventDefault(), n = f(e), this.getDialog(n) ? this.toggleDialog(n) : null != (o = this.delegate) && o.toolbarDidToggleAttribute(n), this.refreshAttributeButtons();\n }, s.prototype.didClickDialogButton = function (e, n) {\n var i, o;\n return i = t(n, {\n matchingSelector: p\n }), o = n.getAttribute(\"data-trix-method\"), this[o].call(this, i);\n }, s.prototype.didKeyDownDialogInput = function (t, e) {\n var n, i;\n return 13 === t.keyCode && (t.preventDefault(), n = e.getAttribute(\"name\"), i = this.getDialog(n), this.setAttribute(i)), 27 === t.keyCode ? (t.preventDefault(), this.hideDialog()) : void 0;\n }, s.prototype.updateActions = function (t) {\n return this.actions = t, this.refreshActionButtons();\n }, s.prototype.refreshActionButtons = function () {\n return this.eachActionButton(function (t) {\n return function (e, n) {\n return e.disabled = t.actions[n] === !1;\n };\n }(this));\n }, s.prototype.eachActionButton = function (t) {\n var e, n, i, o, r;\n\n for (o = this.element.querySelectorAll(a), r = [], n = 0, i = o.length; i > n; n++) {\n e = o[n], r.push(t(e, d(e)));\n }\n\n return r;\n }, s.prototype.updateAttributes = function (t) {\n return this.attributes = t, this.refreshAttributeButtons();\n }, s.prototype.refreshAttributeButtons = function () {\n return this.eachAttributeButton(function (t) {\n return function (e, n) {\n return e.disabled = t.attributes[n] === !1, t.attributes[n] || t.dialogIsVisible(n) ? (e.setAttribute(\"data-trix-active\", \"\"), e.classList.add(\"trix-active\")) : (e.removeAttribute(\"data-trix-active\"), e.classList.remove(\"trix-active\"));\n };\n }(this));\n }, s.prototype.eachAttributeButton = function (t) {\n var e, n, i, o, r;\n\n for (o = this.element.querySelectorAll(c), r = [], n = 0, i = o.length; i > n; n++) {\n e = o[n], r.push(t(e, f(e)));\n }\n\n return r;\n }, s.prototype.applyKeyboardCommand = function (t) {\n var e, n, o, r, s, a, u;\n\n for (s = JSON.stringify(t.sort()), u = this.element.querySelectorAll(\"[data-trix-key]\"), r = 0, a = u.length; a > r; r++) {\n if (e = u[r], o = e.getAttribute(\"data-trix-key\").split(\"+\"), n = JSON.stringify(o.sort()), n === s) return i(\"mousedown\", {\n onElement: e\n }), !0;\n }\n\n return !1;\n }, s.prototype.dialogIsVisible = function (t) {\n var e;\n return (e = this.getDialog(t)) ? e.hasAttribute(\"data-trix-active\") : void 0;\n }, s.prototype.toggleDialog = function (t) {\n return this.dialogIsVisible(t) ? this.hideDialog() : this.showDialog(t);\n }, s.prototype.showDialog = function (t) {\n var e, n, i, o, r, s, a, u, c, l;\n\n for (this.hideDialog(), null != (a = this.delegate) && a.toolbarWillShowDialog(), i = this.getDialog(t), i.setAttribute(\"data-trix-active\", \"\"), i.classList.add(\"trix-active\"), u = i.querySelectorAll(\"input[disabled]\"), o = 0, s = u.length; s > o; o++) {\n n = u[o], n.removeAttribute(\"disabled\");\n }\n\n return (e = f(i)) && (r = m(i, t)) && (r.value = null != (c = this.attributes[e]) ? c : \"\", r.select()), null != (l = this.delegate) ? l.toolbarDidShowDialog(t) : void 0;\n }, s.prototype.setAttribute = function (t) {\n var e, n, i;\n return e = f(t), n = m(t, e), n.willValidate && !n.checkValidity() ? (n.setAttribute(\"data-trix-validate\", \"\"), n.classList.add(\"trix-validate\"), n.focus()) : (null != (i = this.delegate) && i.toolbarDidUpdateAttribute(e, n.value), this.hideDialog());\n }, s.prototype.removeAttribute = function (t) {\n var e, n;\n return e = f(t), null != (n = this.delegate) && n.toolbarDidRemoveAttribute(e), this.hideDialog();\n }, s.prototype.hideDialog = function () {\n var t, e;\n return (t = this.element.querySelector(u)) ? (t.removeAttribute(\"data-trix-active\"), t.classList.remove(\"trix-active\"), this.resetDialogInputs(), null != (e = this.delegate) ? e.toolbarDidHideDialog(g(t)) : void 0) : void 0;\n }, s.prototype.resetDialogInputs = function () {\n var t, e, n, i, o;\n\n for (i = this.element.querySelectorAll(h), o = [], t = 0, n = i.length; n > t; t++) {\n e = i[t], e.setAttribute(\"disabled\", \"disabled\"), e.removeAttribute(\"data-trix-validate\"), o.push(e.classList.remove(\"trix-validate\"));\n }\n\n return o;\n }, s.prototype.getDialog = function (t) {\n return this.element.querySelector(\"[data-trix-dialog=\" + t + \"]\");\n }, m = function m(t, e) {\n return null == e && (e = f(t)), t.querySelector(\"[data-trix-input][name='\" + e + \"']\");\n }, d = function d(t) {\n return t.getAttribute(\"data-trix-action\");\n }, f = function f(t) {\n var e;\n return null != (e = t.getAttribute(\"data-trix-attribute\")) ? e : t.getAttribute(\"data-trix-dialog-attribute\");\n }, g = function g(t) {\n return t.getAttribute(\"data-trix-dialog\");\n }, s;\n }(e.BasicObject);\n }.call(this), function () {\n var t = function t(_t12, e) {\n function i() {\n this.constructor = _t12;\n }\n\n for (var o in e) {\n n.call(e, o) && (_t12[o] = e[o]);\n }\n\n return i.prototype = e.prototype, _t12.prototype = new i(), _t12.__super__ = e.prototype, _t12;\n },\n n = {}.hasOwnProperty;\n\n e.ImagePreloadOperation = function (e) {\n function n(t) {\n this.url = t;\n }\n\n return t(n, e), n.prototype.perform = function (t) {\n var e;\n return e = new Image(), e.onload = function (n) {\n return function () {\n return e.width = n.width = e.naturalWidth, e.height = n.height = e.naturalHeight, t(!0, e);\n };\n }(this), e.onerror = function () {\n return t(!1);\n }, e.src = this.url;\n }, n;\n }(e.Operation);\n }.call(this), function () {\n var t = function t(_t13, e) {\n return function () {\n return _t13.apply(e, arguments);\n };\n },\n n = function n(t, e) {\n function n() {\n this.constructor = t;\n }\n\n for (var o in e) {\n i.call(e, o) && (t[o] = e[o]);\n }\n\n return n.prototype = e.prototype, t.prototype = new n(), t.__super__ = e.prototype, t;\n },\n i = {}.hasOwnProperty;\n\n e.Attachment = function (i) {\n function o(n) {\n null == n && (n = {}), this.releaseFile = t(this.releaseFile, this), o.__super__.constructor.apply(this, arguments), this.attributes = e.Hash.box(n), this.didChangeAttributes();\n }\n\n return n(o, i), o.previewablePattern = /^image(\\/(gif|png|jpe?g)|$)/, o.attachmentForFile = function (t) {\n var e, n;\n return n = this.attributesForFile(t), e = new this(n), e.setFile(t), e;\n }, o.attributesForFile = function (t) {\n return new e.Hash({\n filename: t.name,\n filesize: t.size,\n contentType: t.type\n });\n }, o.fromJSON = function (t) {\n return new this(t);\n }, o.prototype.getAttribute = function (t) {\n return this.attributes.get(t);\n }, o.prototype.hasAttribute = function (t) {\n return this.attributes.has(t);\n }, o.prototype.getAttributes = function () {\n return this.attributes.toObject();\n }, o.prototype.setAttributes = function (t) {\n var e, n, i;\n return null == t && (t = {}), e = this.attributes.merge(t), this.attributes.isEqualTo(e) ? void 0 : (this.attributes = e, this.didChangeAttributes(), null != (n = this.previewDelegate) && \"function\" == typeof n.attachmentDidChangeAttributes && n.attachmentDidChangeAttributes(this), null != (i = this.delegate) && \"function\" == typeof i.attachmentDidChangeAttributes ? i.attachmentDidChangeAttributes(this) : void 0);\n }, o.prototype.didChangeAttributes = function () {\n return this.isPreviewable() ? this.preloadURL() : void 0;\n }, o.prototype.isPending = function () {\n return null != this.file && !(this.getURL() || this.getHref());\n }, o.prototype.isPreviewable = function () {\n return this.attributes.has(\"previewable\") ? this.attributes.get(\"previewable\") : this.constructor.previewablePattern.test(this.getContentType());\n }, o.prototype.getType = function () {\n return this.hasContent() ? \"content\" : this.isPreviewable() ? \"preview\" : \"file\";\n }, o.prototype.getURL = function () {\n return this.attributes.get(\"url\");\n }, o.prototype.getHref = function () {\n return this.attributes.get(\"href\");\n }, o.prototype.getFilename = function () {\n var t;\n return null != (t = this.attributes.get(\"filename\")) ? t : \"\";\n }, o.prototype.getFilesize = function () {\n return this.attributes.get(\"filesize\");\n }, o.prototype.getFormattedFilesize = function () {\n var t;\n return t = this.attributes.get(\"filesize\"), \"number\" == typeof t ? e.config.fileSize.formatter(t) : \"\";\n }, o.prototype.getExtension = function () {\n var t;\n return null != (t = this.getFilename().match(/\\.(\\w+)$/)) ? t[1].toLowerCase() : void 0;\n }, o.prototype.getContentType = function () {\n return this.attributes.get(\"contentType\");\n }, o.prototype.hasContent = function () {\n return this.attributes.has(\"content\");\n }, o.prototype.getContent = function () {\n return this.attributes.get(\"content\");\n }, o.prototype.getWidth = function () {\n return this.attributes.get(\"width\");\n }, o.prototype.getHeight = function () {\n return this.attributes.get(\"height\");\n }, o.prototype.getFile = function () {\n return this.file;\n }, o.prototype.setFile = function (t) {\n return this.file = t, this.isPreviewable() ? this.preloadFile() : void 0;\n }, o.prototype.releaseFile = function () {\n return this.releasePreloadedFile(), this.file = null;\n }, o.prototype.getUploadProgress = function () {\n var t;\n return null != (t = this.uploadProgress) ? t : 0;\n }, o.prototype.setUploadProgress = function (t) {\n var e;\n return this.uploadProgress !== t ? (this.uploadProgress = t, null != (e = this.uploadProgressDelegate) && \"function\" == typeof e.attachmentDidChangeUploadProgress ? e.attachmentDidChangeUploadProgress(this) : void 0) : void 0;\n }, o.prototype.toJSON = function () {\n return this.getAttributes();\n }, o.prototype.getCacheKey = function () {\n return [o.__super__.getCacheKey.apply(this, arguments), this.attributes.getCacheKey(), this.getPreviewURL()].join(\"/\");\n }, o.prototype.getPreviewURL = function () {\n return this.previewURL || this.preloadingURL;\n }, o.prototype.setPreviewURL = function (t) {\n var e, n;\n return t !== this.getPreviewURL() ? (this.previewURL = t, null != (e = this.previewDelegate) && \"function\" == typeof e.attachmentDidChangeAttributes && e.attachmentDidChangeAttributes(this), null != (n = this.delegate) && \"function\" == typeof n.attachmentDidChangePreviewURL ? n.attachmentDidChangePreviewURL(this) : void 0) : void 0;\n }, o.prototype.preloadURL = function () {\n return this.preload(this.getURL(), this.releaseFile);\n }, o.prototype.preloadFile = function () {\n return this.file ? (this.fileObjectURL = URL.createObjectURL(this.file), this.preload(this.fileObjectURL)) : void 0;\n }, o.prototype.releasePreloadedFile = function () {\n return this.fileObjectURL ? (URL.revokeObjectURL(this.fileObjectURL), this.fileObjectURL = null) : void 0;\n }, o.prototype.preload = function (t, n) {\n var i;\n return t && t !== this.getPreviewURL() ? (this.preloadingURL = t, i = new e.ImagePreloadOperation(t), i.then(function (e) {\n return function (i) {\n var o, r;\n return r = i.width, o = i.height, e.getWidth() && e.getHeight() || e.setAttributes({\n width: r,\n height: o\n }), e.preloadingURL = null, e.setPreviewURL(t), \"function\" == typeof n ? n() : void 0;\n };\n }(this))[\"catch\"](function (t) {\n return function () {\n return t.preloadingURL = null, \"function\" == typeof n ? n() : void 0;\n };\n }(this))) : void 0;\n }, o;\n }(e.Object);\n }.call(this), function () {\n var t = function t(_t14, e) {\n function i() {\n this.constructor = _t14;\n }\n\n for (var o in e) {\n n.call(e, o) && (_t14[o] = e[o]);\n }\n\n return i.prototype = e.prototype, _t14.prototype = new i(), _t14.__super__ = e.prototype, _t14;\n },\n n = {}.hasOwnProperty;\n\n e.Piece = function (n) {\n function i(t, n) {\n null == n && (n = {}), i.__super__.constructor.apply(this, arguments), this.attributes = e.Hash.box(n);\n }\n\n return t(i, n), i.types = {}, i.registerType = function (t, e) {\n return e.type = t, this.types[t] = e;\n }, i.fromJSON = function (t) {\n var e;\n return (e = this.types[t.type]) ? e.fromJSON(t) : void 0;\n }, i.prototype.copyWithAttributes = function (t) {\n return new this.constructor(this.getValue(), t);\n }, i.prototype.copyWithAdditionalAttributes = function (t) {\n return this.copyWithAttributes(this.attributes.merge(t));\n }, i.prototype.copyWithoutAttribute = function (t) {\n return this.copyWithAttributes(this.attributes.remove(t));\n }, i.prototype.copy = function () {\n return this.copyWithAttributes(this.attributes);\n }, i.prototype.getAttribute = function (t) {\n return this.attributes.get(t);\n }, i.prototype.getAttributesHash = function () {\n return this.attributes;\n }, i.prototype.getAttributes = function () {\n return this.attributes.toObject();\n }, i.prototype.getCommonAttributes = function () {\n var t, e, n;\n return (n = pieceList.getPieceAtIndex(0)) ? (t = n.attributes, e = t.getKeys(), pieceList.eachPiece(function (n) {\n return e = t.getKeysCommonToHash(n.attributes), t = t.slice(e);\n }), t.toObject()) : {};\n }, i.prototype.hasAttribute = function (t) {\n return this.attributes.has(t);\n }, i.prototype.hasSameStringValueAsPiece = function (t) {\n return null != t && this.toString() === t.toString();\n }, i.prototype.hasSameAttributesAsPiece = function (t) {\n return null != t && (this.attributes === t.attributes || this.attributes.isEqualTo(t.attributes));\n }, i.prototype.isBlockBreak = function () {\n return !1;\n }, i.prototype.isEqualTo = function (t) {\n return i.__super__.isEqualTo.apply(this, arguments) || this.hasSameConstructorAs(t) && this.hasSameStringValueAsPiece(t) && this.hasSameAttributesAsPiece(t);\n }, i.prototype.isEmpty = function () {\n return 0 === this.length;\n }, i.prototype.isSerializable = function () {\n return !0;\n }, i.prototype.toJSON = function () {\n return {\n type: this.constructor.type,\n attributes: this.getAttributes()\n };\n }, i.prototype.contentsForInspection = function () {\n return {\n type: this.constructor.type,\n attributes: this.attributes.inspect()\n };\n }, i.prototype.canBeGrouped = function () {\n return this.hasAttribute(\"href\");\n }, i.prototype.canBeGroupedWith = function (t) {\n return this.getAttribute(\"href\") === t.getAttribute(\"href\");\n }, i.prototype.getLength = function () {\n return this.length;\n }, i.prototype.canBeConsolidatedWith = function () {\n return !1;\n }, i;\n }(e.Object);\n }.call(this), function () {\n var t = function t(_t15, e) {\n function i() {\n this.constructor = _t15;\n }\n\n for (var o in e) {\n n.call(e, o) && (_t15[o] = e[o]);\n }\n\n return i.prototype = e.prototype, _t15.prototype = new i(), _t15.__super__ = e.prototype, _t15;\n },\n n = {}.hasOwnProperty;\n\n e.Piece.registerType(\"attachment\", e.AttachmentPiece = function (n) {\n function i(t) {\n this.attachment = t, i.__super__.constructor.apply(this, arguments), this.length = 1, this.ensureAttachmentExclusivelyHasAttribute(\"href\"), this.attachment.hasContent() || this.removeProhibitedAttributes();\n }\n\n return t(i, n), i.fromJSON = function (t) {\n return new this(e.Attachment.fromJSON(t.attachment), t.attributes);\n }, i.permittedAttributes = [\"caption\", \"presentation\"], i.prototype.ensureAttachmentExclusivelyHasAttribute = function (t) {\n return this.hasAttribute(t) ? (this.attachment.hasAttribute(t) || this.attachment.setAttributes(this.attributes.slice(t)), this.attributes = this.attributes.remove(t)) : void 0;\n }, i.prototype.removeProhibitedAttributes = function () {\n var t;\n return t = this.attributes.slice(this.constructor.permittedAttributes), t.isEqualTo(this.attributes) ? void 0 : this.attributes = t;\n }, i.prototype.getValue = function () {\n return this.attachment;\n }, i.prototype.isSerializable = function () {\n return !this.attachment.isPending();\n }, i.prototype.getCaption = function () {\n var t;\n return null != (t = this.attributes.get(\"caption\")) ? t : \"\";\n }, i.prototype.isEqualTo = function (t) {\n var e;\n return i.__super__.isEqualTo.apply(this, arguments) && this.attachment.id === (null != t && null != (e = t.attachment) ? e.id : void 0);\n }, i.prototype.toString = function () {\n return e.OBJECT_REPLACEMENT_CHARACTER;\n }, i.prototype.toJSON = function () {\n var t;\n return t = i.__super__.toJSON.apply(this, arguments), t.attachment = this.attachment, t;\n }, i.prototype.getCacheKey = function () {\n return [i.__super__.getCacheKey.apply(this, arguments), this.attachment.getCacheKey()].join(\"/\");\n }, i.prototype.toConsole = function () {\n return JSON.stringify(this.toString());\n }, i;\n }(e.Piece));\n }.call(this), function () {\n var t,\n n = function n(t, e) {\n function n() {\n this.constructor = t;\n }\n\n for (var o in e) {\n i.call(e, o) && (t[o] = e[o]);\n }\n\n return n.prototype = e.prototype, t.prototype = new n(), t.__super__ = e.prototype, t;\n },\n i = {}.hasOwnProperty;\n\n t = e.normalizeNewlines, e.Piece.registerType(\"string\", e.StringPiece = function (e) {\n function i(e) {\n i.__super__.constructor.apply(this, arguments), this.string = t(e), this.length = this.string.length;\n }\n\n return n(i, e), i.fromJSON = function (t) {\n return new this(t.string, t.attributes);\n }, i.prototype.getValue = function () {\n return this.string;\n }, i.prototype.toString = function () {\n return this.string.toString();\n }, i.prototype.isBlockBreak = function () {\n return \"\\n\" === this.toString() && this.getAttribute(\"blockBreak\") === !0;\n }, i.prototype.toJSON = function () {\n var t;\n return t = i.__super__.toJSON.apply(this, arguments), t.string = this.string, t;\n }, i.prototype.canBeConsolidatedWith = function (t) {\n return null != t && this.hasSameConstructorAs(t) && this.hasSameAttributesAsPiece(t);\n }, i.prototype.consolidateWith = function (t) {\n return new this.constructor(this.toString() + t.toString(), this.attributes);\n }, i.prototype.splitAtOffset = function (t) {\n var e, n;\n return 0 === t ? (e = null, n = this) : t === this.length ? (e = this, n = null) : (e = new this.constructor(this.string.slice(0, t), this.attributes), n = new this.constructor(this.string.slice(t), this.attributes)), [e, n];\n }, i.prototype.toConsole = function () {\n var t;\n return t = this.string, t.length > 15 && (t = t.slice(0, 14) + \"\\u2026\"), JSON.stringify(t.toString());\n }, i;\n }(e.Piece));\n }.call(this), function () {\n var t,\n n = function n(t, e) {\n function n() {\n this.constructor = t;\n }\n\n for (var o in e) {\n i.call(e, o) && (t[o] = e[o]);\n }\n\n return n.prototype = e.prototype, t.prototype = new n(), t.__super__ = e.prototype, t;\n },\n i = {}.hasOwnProperty,\n o = [].slice;\n\n t = e.spliceArray, e.SplittableList = function (e) {\n function i(t) {\n null == t && (t = []), i.__super__.constructor.apply(this, arguments), this.objects = t.slice(0), this.length = this.objects.length;\n }\n\n var r, s, a;\n return n(i, e), i.box = function (t) {\n return t instanceof this ? t : new this(t);\n }, i.prototype.indexOf = function (t) {\n return this.objects.indexOf(t);\n }, i.prototype.splice = function () {\n var e;\n return e = 1 <= arguments.length ? o.call(arguments, 0) : [], new this.constructor(t.apply(null, [this.objects].concat(o.call(e))));\n }, i.prototype.eachObject = function (t) {\n var e, n, i, o, r, s;\n\n for (r = this.objects, s = [], n = e = 0, i = r.length; i > e; n = ++e) {\n o = r[n], s.push(t(o, n));\n }\n\n return s;\n }, i.prototype.insertObjectAtIndex = function (t, e) {\n return this.splice(e, 0, t);\n }, i.prototype.insertSplittableListAtIndex = function (t, e) {\n return this.splice.apply(this, [e, 0].concat(o.call(t.objects)));\n }, i.prototype.insertSplittableListAtPosition = function (t, e) {\n var n, i, o;\n return o = this.splitObjectAtPosition(e), i = o[0], n = o[1], new this.constructor(i).insertSplittableListAtIndex(t, n);\n }, i.prototype.editObjectAtIndex = function (t, e) {\n return this.replaceObjectAtIndex(e(this.objects[t]), t);\n }, i.prototype.replaceObjectAtIndex = function (t, e) {\n return this.splice(e, 1, t);\n }, i.prototype.removeObjectAtIndex = function (t) {\n return this.splice(t, 1);\n }, i.prototype.getObjectAtIndex = function (t) {\n return this.objects[t];\n }, i.prototype.getSplittableListInRange = function (t) {\n var e, n, i, o;\n return i = this.splitObjectsAtRange(t), n = i[0], e = i[1], o = i[2], new this.constructor(n.slice(e, o + 1));\n }, i.prototype.selectSplittableList = function (t) {\n var e, n;\n return n = function () {\n var n, i, o, r;\n\n for (o = this.objects, r = [], n = 0, i = o.length; i > n; n++) {\n e = o[n], t(e) && r.push(e);\n }\n\n return r;\n }.call(this), new this.constructor(n);\n }, i.prototype.removeObjectsInRange = function (t) {\n var e, n, i, o;\n return i = this.splitObjectsAtRange(t), n = i[0], e = i[1], o = i[2], new this.constructor(n).splice(e, o - e + 1);\n }, i.prototype.transformObjectsInRange = function (t, e) {\n var n, i, o, r, s, a, u;\n return s = this.splitObjectsAtRange(t), r = s[0], i = s[1], a = s[2], u = function () {\n var t, s, u;\n\n for (u = [], n = t = 0, s = r.length; s > t; n = ++t) {\n o = r[n], u.push(n >= i && a >= n ? e(o) : o);\n }\n\n return u;\n }(), new this.constructor(u);\n }, i.prototype.splitObjectsAtRange = function (t) {\n var e, n, i, o, s, u;\n return o = this.splitObjectAtPosition(a(t)), n = o[0], e = o[1], i = o[2], s = new this.constructor(n).splitObjectAtPosition(r(t) + i), n = s[0], u = s[1], [n, e, u - 1];\n }, i.prototype.getObjectAtPosition = function (t) {\n var e, n, i;\n return i = this.findIndexAndOffsetAtPosition(t), e = i.index, n = i.offset, this.objects[e];\n }, i.prototype.splitObjectAtPosition = function (t) {\n var e, n, i, o, r, s, a, u, c, l;\n return s = this.findIndexAndOffsetAtPosition(t), e = s.index, r = s.offset, o = this.objects.slice(0), null != e ? 0 === r ? (c = e, l = 0) : (i = this.getObjectAtIndex(e), a = i.splitAtOffset(r), n = a[0], u = a[1], o.splice(e, 1, n, u), c = e + 1, l = n.getLength() - r) : (c = o.length, l = 0), [o, c, l];\n }, i.prototype.consolidate = function () {\n var t, e, n, i, o, r;\n\n for (i = [], o = this.objects[0], r = this.objects.slice(1), t = 0, e = r.length; e > t; t++) {\n n = r[t], (\"function\" == typeof o.canBeConsolidatedWith ? o.canBeConsolidatedWith(n) : void 0) ? o = o.consolidateWith(n) : (i.push(o), o = n);\n }\n\n return null != o && i.push(o), new this.constructor(i);\n }, i.prototype.consolidateFromIndexToIndex = function (t, e) {\n var n, i, r;\n return i = this.objects.slice(0), r = i.slice(t, e + 1), n = new this.constructor(r).consolidate().toArray(), this.splice.apply(this, [t, r.length].concat(o.call(n)));\n }, i.prototype.findIndexAndOffsetAtPosition = function (t) {\n var e, n, i, o, r, s, a;\n\n for (e = 0, a = this.objects, i = n = 0, o = a.length; o > n; i = ++n) {\n if (s = a[i], r = e + s.getLength(), t >= e && r > t) return {\n index: i,\n offset: t - e\n };\n e = r;\n }\n\n return {\n index: null,\n offset: null\n };\n }, i.prototype.findPositionAtIndexAndOffset = function (t, e) {\n var n, i, o, r, s, a;\n\n for (s = 0, a = this.objects, n = i = 0, o = a.length; o > i; n = ++i) {\n if (r = a[n], t > n) s += r.getLength();else if (n === t) {\n s += e;\n break;\n }\n }\n\n return s;\n }, i.prototype.getEndPosition = function () {\n var t, e;\n return null != this.endPosition ? this.endPosition : this.endPosition = function () {\n var n, i, o;\n\n for (e = 0, o = this.objects, n = 0, i = o.length; i > n; n++) {\n t = o[n], e += t.getLength();\n }\n\n return e;\n }.call(this);\n }, i.prototype.toString = function () {\n return this.objects.join(\"\");\n }, i.prototype.toArray = function () {\n return this.objects.slice(0);\n }, i.prototype.toJSON = function () {\n return this.toArray();\n }, i.prototype.isEqualTo = function (t) {\n return i.__super__.isEqualTo.apply(this, arguments) || s(this.objects, null != t ? t.objects : void 0);\n }, s = function s(t, e) {\n var n, i, o, r, s;\n if (null == e && (e = []), t.length !== e.length) return !1;\n\n for (s = !0, i = n = 0, o = t.length; o > n; i = ++n) {\n r = t[i], s && !r.isEqualTo(e[i]) && (s = !1);\n }\n\n return s;\n }, i.prototype.contentsForInspection = function () {\n var t;\n return {\n objects: \"[\" + function () {\n var e, n, i, o;\n\n for (i = this.objects, o = [], e = 0, n = i.length; n > e; e++) {\n t = i[e], o.push(t.inspect());\n }\n\n return o;\n }.call(this).join(\", \") + \"]\"\n };\n }, a = function a(t) {\n return t[0];\n }, r = function r(t) {\n return t[1];\n }, i;\n }(e.Object);\n }.call(this), function () {\n var t = function t(_t16, e) {\n function i() {\n this.constructor = _t16;\n }\n\n for (var o in e) {\n n.call(e, o) && (_t16[o] = e[o]);\n }\n\n return i.prototype = e.prototype, _t16.prototype = new i(), _t16.__super__ = e.prototype, _t16;\n },\n n = {}.hasOwnProperty;\n\n e.Text = function (n) {\n function i(t) {\n var n;\n null == t && (t = []), i.__super__.constructor.apply(this, arguments), this.pieceList = new e.SplittableList(function () {\n var e, i, o;\n\n for (o = [], e = 0, i = t.length; i > e; e++) {\n n = t[e], n.isEmpty() || o.push(n);\n }\n\n return o;\n }());\n }\n\n return t(i, n), i.textForAttachmentWithAttributes = function (t, n) {\n var i;\n return i = new e.AttachmentPiece(t, n), new this([i]);\n }, i.textForStringWithAttributes = function (t, n) {\n var i;\n return i = new e.StringPiece(t, n), new this([i]);\n }, i.fromJSON = function (t) {\n var n, i;\n return i = function () {\n var i, o, r;\n\n for (r = [], i = 0, o = t.length; o > i; i++) {\n n = t[i], r.push(e.Piece.fromJSON(n));\n }\n\n return r;\n }(), new this(i);\n }, i.prototype.copy = function () {\n return this.copyWithPieceList(this.pieceList);\n }, i.prototype.copyWithPieceList = function (t) {\n return new this.constructor(t.consolidate().toArray());\n }, i.prototype.copyUsingObjectMap = function (t) {\n var e, n;\n return n = function () {\n var n, i, o, r, s;\n\n for (o = this.getPieces(), s = [], n = 0, i = o.length; i > n; n++) {\n e = o[n], s.push(null != (r = t.find(e)) ? r : e);\n }\n\n return s;\n }.call(this), new this.constructor(n);\n }, i.prototype.appendText = function (t) {\n return this.insertTextAtPosition(t, this.getLength());\n }, i.prototype.insertTextAtPosition = function (t, e) {\n return this.copyWithPieceList(this.pieceList.insertSplittableListAtPosition(t.pieceList, e));\n }, i.prototype.removeTextAtRange = function (t) {\n return this.copyWithPieceList(this.pieceList.removeObjectsInRange(t));\n }, i.prototype.replaceTextAtRange = function (t, e) {\n return this.removeTextAtRange(e).insertTextAtPosition(t, e[0]);\n }, i.prototype.moveTextFromRangeToPosition = function (t, e) {\n var n, i;\n if (!(t[0] <= e && e <= t[1])) return i = this.getTextAtRange(t), n = i.getLength(), t[0] < e && (e -= n), this.removeTextAtRange(t).insertTextAtPosition(i, e);\n }, i.prototype.addAttributeAtRange = function (t, e, n) {\n var i;\n return i = {}, i[t] = e, this.addAttributesAtRange(i, n);\n }, i.prototype.addAttributesAtRange = function (t, e) {\n return this.copyWithPieceList(this.pieceList.transformObjectsInRange(e, function (e) {\n return e.copyWithAdditionalAttributes(t);\n }));\n }, i.prototype.removeAttributeAtRange = function (t, e) {\n return this.copyWithPieceList(this.pieceList.transformObjectsInRange(e, function (e) {\n return e.copyWithoutAttribute(t);\n }));\n }, i.prototype.setAttributesAtRange = function (t, e) {\n return this.copyWithPieceList(this.pieceList.transformObjectsInRange(e, function (e) {\n return e.copyWithAttributes(t);\n }));\n }, i.prototype.getAttributesAtPosition = function (t) {\n var e, n;\n return null != (e = null != (n = this.pieceList.getObjectAtPosition(t)) ? n.getAttributes() : void 0) ? e : {};\n }, i.prototype.getCommonAttributes = function () {\n var t, n;\n return t = function () {\n var t, e, i, o;\n\n for (i = this.pieceList.toArray(), o = [], t = 0, e = i.length; e > t; t++) {\n n = i[t], o.push(n.getAttributes());\n }\n\n return o;\n }.call(this), e.Hash.fromCommonAttributesOfObjects(t).toObject();\n }, i.prototype.getCommonAttributesAtRange = function (t) {\n var e;\n return null != (e = this.getTextAtRange(t).getCommonAttributes()) ? e : {};\n }, i.prototype.getExpandedRangeForAttributeAtOffset = function (t, e) {\n var n, i, o;\n\n for (n = o = e, i = this.getLength(); n > 0 && this.getCommonAttributesAtRange([n - 1, o])[t];) {\n n--;\n }\n\n for (; i > o && this.getCommonAttributesAtRange([e, o + 1])[t];) {\n o++;\n }\n\n return [n, o];\n }, i.prototype.getTextAtRange = function (t) {\n return this.copyWithPieceList(this.pieceList.getSplittableListInRange(t));\n }, i.prototype.getStringAtRange = function (t) {\n return this.pieceList.getSplittableListInRange(t).toString();\n }, i.prototype.getStringAtPosition = function (t) {\n return this.getStringAtRange([t, t + 1]);\n }, i.prototype.startsWithString = function (t) {\n return this.getStringAtRange([0, t.length]) === t;\n }, i.prototype.endsWithString = function (t) {\n var e;\n return e = this.getLength(), this.getStringAtRange([e - t.length, e]) === t;\n }, i.prototype.getAttachmentPieces = function () {\n var t, e, n, i, o;\n\n for (i = this.pieceList.toArray(), o = [], t = 0, e = i.length; e > t; t++) {\n n = i[t], null != n.attachment && o.push(n);\n }\n\n return o;\n }, i.prototype.getAttachments = function () {\n var t, e, n, i, o;\n\n for (i = this.getAttachmentPieces(), o = [], t = 0, e = i.length; e > t; t++) {\n n = i[t], o.push(n.attachment);\n }\n\n return o;\n }, i.prototype.getAttachmentAndPositionById = function (t) {\n var e, n, i, o, r, s;\n\n for (o = 0, r = this.pieceList.toArray(), e = 0, n = r.length; n > e; e++) {\n if (i = r[e], (null != (s = i.attachment) ? s.id : void 0) === t) return {\n attachment: i.attachment,\n position: o\n };\n o += i.length;\n }\n\n return {\n attachment: null,\n position: null\n };\n }, i.prototype.getAttachmentById = function (t) {\n var e, n, i;\n return i = this.getAttachmentAndPositionById(t), e = i.attachment, n = i.position, e;\n }, i.prototype.getRangeOfAttachment = function (t) {\n var e, n;\n return n = this.getAttachmentAndPositionById(t.id), t = n.attachment, e = n.position, null != t ? [e, e + 1] : void 0;\n }, i.prototype.updateAttributesForAttachment = function (t, e) {\n var n;\n return (n = this.getRangeOfAttachment(e)) ? this.addAttributesAtRange(t, n) : this;\n }, i.prototype.getLength = function () {\n return this.pieceList.getEndPosition();\n }, i.prototype.isEmpty = function () {\n return 0 === this.getLength();\n }, i.prototype.isEqualTo = function (t) {\n var e;\n return i.__super__.isEqualTo.apply(this, arguments) || (null != t && null != (e = t.pieceList) ? e.isEqualTo(this.pieceList) : void 0);\n }, i.prototype.isBlockBreak = function () {\n return 1 === this.getLength() && this.pieceList.getObjectAtIndex(0).isBlockBreak();\n }, i.prototype.eachPiece = function (t) {\n return this.pieceList.eachObject(t);\n }, i.prototype.getPieces = function () {\n return this.pieceList.toArray();\n }, i.prototype.getPieceAtPosition = function (t) {\n return this.pieceList.getObjectAtPosition(t);\n }, i.prototype.contentsForInspection = function () {\n return {\n pieceList: this.pieceList.inspect()\n };\n }, i.prototype.toSerializableText = function () {\n var t;\n return t = this.pieceList.selectSplittableList(function (t) {\n return t.isSerializable();\n }), this.copyWithPieceList(t);\n }, i.prototype.toString = function () {\n return this.pieceList.toString();\n }, i.prototype.toJSON = function () {\n return this.pieceList.toJSON();\n }, i.prototype.toConsole = function () {\n var t;\n return JSON.stringify(function () {\n var e, n, i, o;\n\n for (i = this.pieceList.toArray(), o = [], e = 0, n = i.length; n > e; e++) {\n t = i[e], o.push(JSON.parse(t.toConsole()));\n }\n\n return o;\n }.call(this));\n }, i.prototype.getDirection = function () {\n return e.getDirection(this.toString());\n }, i.prototype.isRTL = function () {\n return \"rtl\" === this.getDirection();\n }, i;\n }(e.Object);\n }.call(this), function () {\n var t,\n n,\n i,\n o,\n r,\n s = function s(t, e) {\n function n() {\n this.constructor = t;\n }\n\n for (var i in e) {\n a.call(e, i) && (t[i] = e[i]);\n }\n\n return n.prototype = e.prototype, t.prototype = new n(), t.__super__ = e.prototype, t;\n },\n a = {}.hasOwnProperty,\n u = [].indexOf || function (t) {\n for (var e = 0, n = this.length; n > e; e++) {\n if (e in this && this[e] === t) return e;\n }\n\n return -1;\n },\n c = [].slice;\n\n t = e.arraysAreEqual, r = e.spliceArray, i = e.getBlockConfig, n = e.getBlockAttributeNames, o = e.getListAttributeNames, e.Block = function (n) {\n function a(t, n) {\n null == t && (t = new e.Text()), null == n && (n = []), a.__super__.constructor.apply(this, arguments), this.text = h(t), this.attributes = n;\n }\n\n var l, h, p, d, f, g, m, v, y;\n return s(a, n), a.fromJSON = function (t) {\n var n;\n return n = e.Text.fromJSON(t.text), new this(n, t.attributes);\n }, a.prototype.isEmpty = function () {\n return this.text.isBlockBreak();\n }, a.prototype.isEqualTo = function (e) {\n return a.__super__.isEqualTo.apply(this, arguments) || this.text.isEqualTo(null != e ? e.text : void 0) && t(this.attributes, null != e ? e.attributes : void 0);\n }, a.prototype.copyWithText = function (t) {\n return new this.constructor(t, this.attributes);\n }, a.prototype.copyWithoutText = function () {\n return this.copyWithText(null);\n }, a.prototype.copyWithAttributes = function (t) {\n return new this.constructor(this.text, t);\n }, a.prototype.copyWithoutAttributes = function () {\n return this.copyWithAttributes(null);\n }, a.prototype.copyUsingObjectMap = function (t) {\n var e;\n return this.copyWithText((e = t.find(this.text)) ? e : this.text.copyUsingObjectMap(t));\n }, a.prototype.addAttribute = function (t) {\n var e;\n return e = this.attributes.concat(d(t)), this.copyWithAttributes(e);\n }, a.prototype.removeAttribute = function (t) {\n var e, n;\n return n = i(t).listAttribute, e = g(g(this.attributes, t), n), this.copyWithAttributes(e);\n }, a.prototype.removeLastAttribute = function () {\n return this.removeAttribute(this.getLastAttribute());\n }, a.prototype.getLastAttribute = function () {\n return f(this.attributes);\n }, a.prototype.getAttributes = function () {\n return this.attributes.slice(0);\n }, a.prototype.getAttributeLevel = function () {\n return this.attributes.length;\n }, a.prototype.getAttributeAtLevel = function (t) {\n return this.attributes[t - 1];\n }, a.prototype.hasAttribute = function (t) {\n return u.call(this.attributes, t) >= 0;\n }, a.prototype.hasAttributes = function () {\n return this.getAttributeLevel() > 0;\n }, a.prototype.getLastNestableAttribute = function () {\n return f(this.getNestableAttributes());\n }, a.prototype.getNestableAttributes = function () {\n var t, e, n, o, r;\n\n for (o = this.attributes, r = [], e = 0, n = o.length; n > e; e++) {\n t = o[e], i(t).nestable && r.push(t);\n }\n\n return r;\n }, a.prototype.getNestingLevel = function () {\n return this.getNestableAttributes().length;\n }, a.prototype.decreaseNestingLevel = function () {\n var t;\n return (t = this.getLastNestableAttribute()) ? this.removeAttribute(t) : this;\n }, a.prototype.increaseNestingLevel = function () {\n var t, e, n;\n return (t = this.getLastNestableAttribute()) ? (n = this.attributes.lastIndexOf(t), e = r.apply(null, [this.attributes, n + 1, 0].concat(c.call(d(t)))), this.copyWithAttributes(e)) : this;\n }, a.prototype.getListItemAttributes = function () {\n var t, e, n, o, r;\n\n for (o = this.attributes, r = [], e = 0, n = o.length; n > e; e++) {\n t = o[e], i(t).listAttribute && r.push(t);\n }\n\n return r;\n }, a.prototype.isListItem = function () {\n var t;\n return null != (t = i(this.getLastAttribute())) ? t.listAttribute : void 0;\n }, a.prototype.isTerminalBlock = function () {\n var t;\n return null != (t = i(this.getLastAttribute())) ? t.terminal : void 0;\n }, a.prototype.breaksOnReturn = function () {\n var t;\n return null != (t = i(this.getLastAttribute())) ? t.breakOnReturn : void 0;\n }, a.prototype.findLineBreakInDirectionFromPosition = function (t, e) {\n var n, i;\n return i = this.toString(), n = function () {\n switch (t) {\n case \"forward\":\n return i.indexOf(\"\\n\", e);\n\n case \"backward\":\n return i.slice(0, e).lastIndexOf(\"\\n\");\n }\n }(), -1 !== n ? n : void 0;\n }, a.prototype.contentsForInspection = function () {\n return {\n text: this.text.inspect(),\n attributes: this.attributes\n };\n }, a.prototype.toString = function () {\n return this.text.toString();\n }, a.prototype.toJSON = function () {\n return {\n text: this.text,\n attributes: this.attributes\n };\n }, a.prototype.getDirection = function () {\n return this.text.getDirection();\n }, a.prototype.isRTL = function () {\n return this.text.isRTL();\n }, a.prototype.getLength = function () {\n return this.text.getLength();\n }, a.prototype.canBeConsolidatedWith = function (t) {\n return !this.hasAttributes() && !t.hasAttributes() && this.getDirection() === t.getDirection();\n }, a.prototype.consolidateWith = function (t) {\n var n, i;\n return n = e.Text.textForStringWithAttributes(\"\\n\"), i = this.getTextWithoutBlockBreak().appendText(n), this.copyWithText(i.appendText(t.text));\n }, a.prototype.splitAtOffset = function (t) {\n var e, n;\n return 0 === t ? (e = null, n = this) : t === this.getLength() ? (e = this, n = null) : (e = this.copyWithText(this.text.getTextAtRange([0, t])), n = this.copyWithText(this.text.getTextAtRange([t, this.getLength()]))), [e, n];\n }, a.prototype.getBlockBreakPosition = function () {\n return this.text.getLength() - 1;\n }, a.prototype.getTextWithoutBlockBreak = function () {\n return m(this.text) ? this.text.getTextAtRange([0, this.getBlockBreakPosition()]) : this.text.copy();\n }, a.prototype.canBeGrouped = function (t) {\n return this.attributes[t];\n }, a.prototype.canBeGroupedWith = function (t, e) {\n var n, r, s, a;\n return s = t.getAttributes(), r = s[e], n = this.attributes[e], !(n !== r || i(n).group === !1 && (a = s[e + 1], u.call(o(), a) < 0) || this.getDirection() !== t.getDirection() && !t.isEmpty());\n }, h = function h(t) {\n return t = y(t), t = l(t);\n }, y = function y(t) {\n var n, i, o, r, s, a;\n return r = !1, a = t.getPieces(), i = 2 <= a.length ? c.call(a, 0, n = a.length - 1) : (n = 0, []), o = a[n++], null == o ? t : (i = function () {\n var t, e, n;\n\n for (n = [], t = 0, e = i.length; e > t; t++) {\n s = i[t], s.isBlockBreak() ? (r = !0, n.push(v(s))) : n.push(s);\n }\n\n return n;\n }(), r ? new e.Text(c.call(i).concat([o])) : t);\n }, p = e.Text.textForStringWithAttributes(\"\\n\", {\n blockBreak: !0\n }), l = function l(t) {\n return m(t) ? t : t.appendText(p);\n }, m = function m(t) {\n var e, n;\n return n = t.getLength(), 0 === n ? !1 : (e = t.getTextAtRange([n - 1, n]), e.isBlockBreak());\n }, v = function v(t) {\n return t.copyWithoutAttribute(\"blockBreak\");\n }, d = function d(t) {\n var e;\n return e = i(t).listAttribute, null != e ? [e, t] : [t];\n }, f = function f(t) {\n return t.slice(-1)[0];\n }, g = function g(t, e) {\n var n;\n return n = t.lastIndexOf(e), -1 === n ? t : r(t, n, 1);\n }, a;\n }(e.Object);\n }.call(this), function () {\n var t,\n n,\n i,\n o = function o(t, e) {\n function n() {\n this.constructor = t;\n }\n\n for (var i in e) {\n r.call(e, i) && (t[i] = e[i]);\n }\n\n return n.prototype = e.prototype, t.prototype = new n(), t.__super__ = e.prototype, t;\n },\n r = {}.hasOwnProperty,\n s = [].indexOf || function (t) {\n for (var e = 0, n = this.length; n > e; e++) {\n if (e in this && this[e] === t) return e;\n }\n\n return -1;\n },\n a = [].slice;\n\n n = e.tagName, i = e.walkTree, t = e.nodeIsAttachmentElement, e.HTMLSanitizer = function (r) {\n function u(t, e) {\n var n;\n n = null != e ? e : {}, this.allowedAttributes = n.allowedAttributes, this.forbiddenProtocols = n.forbiddenProtocols, this.forbiddenElements = n.forbiddenElements, null == this.allowedAttributes && (this.allowedAttributes = c), null == this.forbiddenProtocols && (this.forbiddenProtocols = h), null == this.forbiddenElements && (this.forbiddenElements = l), this.body = p(t);\n }\n\n var c, l, h, p;\n return o(u, r), c = \"style href src width height class\".split(\" \"), h = \"javascript:\".split(\" \"), l = \"script iframe\".split(\" \"), u.sanitize = function (t, e) {\n var n;\n return n = new this(t, e), n.sanitize(), n;\n }, u.prototype.sanitize = function () {\n return this.sanitizeElements(), this.normalizeListElementNesting();\n }, u.prototype.getHTML = function () {\n return this.body.innerHTML;\n }, u.prototype.getBody = function () {\n return this.body;\n }, u.prototype.sanitizeElements = function () {\n var t, n, o, r, s;\n\n for (s = i(this.body), r = []; s.nextNode();) {\n switch (o = s.currentNode, o.nodeType) {\n case Node.ELEMENT_NODE:\n this.elementIsRemovable(o) ? r.push(o) : this.sanitizeElement(o);\n break;\n\n case Node.COMMENT_NODE:\n r.push(o);\n }\n }\n\n for (t = 0, n = r.length; n > t; t++) {\n o = r[t], e.removeNode(o);\n }\n\n return this.body;\n }, u.prototype.sanitizeElement = function (t) {\n var e, n, i, o, r;\n\n for (t.hasAttribute(\"href\") && (o = t.protocol, s.call(this.forbiddenProtocols, o) >= 0 && t.removeAttribute(\"href\")), r = a.call(t.attributes), e = 0, n = r.length; n > e; e++) {\n i = r[e].name, s.call(this.allowedAttributes, i) >= 0 || 0 === i.indexOf(\"data-trix\") || t.removeAttribute(i);\n }\n\n return t;\n }, u.prototype.normalizeListElementNesting = function () {\n var t, e, i, o, r;\n\n for (r = a.call(this.body.querySelectorAll(\"ul,ol\")), t = 0, e = r.length; e > t; t++) {\n i = r[t], (o = i.previousElementSibling) && \"li\" === n(o) && o.appendChild(i);\n }\n\n return this.body;\n }, u.prototype.elementIsRemovable = function (t) {\n return (null != t ? t.nodeType : void 0) === Node.ELEMENT_NODE ? this.elementIsForbidden(t) || this.elementIsntSerializable(t) : void 0;\n }, u.prototype.elementIsForbidden = function (t) {\n var e;\n return e = n(t), s.call(this.forbiddenElements, e) >= 0;\n }, u.prototype.elementIsntSerializable = function (e) {\n return \"false\" === e.getAttribute(\"data-trix-serialize\") && !t(e);\n }, p = function p(t) {\n var e, n, i, o, r;\n\n for (null == t && (t = \"\"), t = t.replace(/<\\/html[^>]*>[^]*$/i, \"