From 712256e23d167de15e0c339d8ba5f5731f9ce1b8 Mon Sep 17 00:00:00 2001 From: George Berezhnoy Date: Tue, 26 Feb 2019 00:38:45 +0300 Subject: [PATCH] Handle paste only on initial Blocks (#623) --- build/codex-editor.js.map | 1 - dist/codex-editor.js | 6 +++--- docs/CHANGELOG.md | 4 ++++ package.json | 2 +- src/components/modules/paste.ts | 10 ++++++---- 5 files changed, 14 insertions(+), 9 deletions(-) delete mode 100644 build/codex-editor.js.map diff --git a/build/codex-editor.js.map b/build/codex-editor.js.map deleted file mode 100644 index fc83ed5a..00000000 --- a/build/codex-editor.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["webpack://CodexEditor/webpack/universalModuleDefinition","webpack://CodexEditor/webpack/bootstrap","webpack://CodexEditor/./build/sprite.svg","webpack://CodexEditor/./node_modules/@babel/polyfill/lib/index.js","webpack://CodexEditor/./node_modules/@babel/register/lib/browser.js","webpack://CodexEditor/./node_modules/@babel/register/lib/index.js","webpack://CodexEditor/./node_modules/@babel/runtime/helpers/arrayWithHoles.js","webpack://CodexEditor/./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js","webpack://CodexEditor/./node_modules/@babel/runtime/helpers/assertThisInitialized.js","webpack://CodexEditor/./node_modules/@babel/runtime/helpers/asyncToGenerator.js","webpack://CodexEditor/./node_modules/@babel/runtime/helpers/classCallCheck.js","webpack://CodexEditor/./node_modules/@babel/runtime/helpers/createClass.js","webpack://CodexEditor/./node_modules/@babel/runtime/helpers/getPrototypeOf.js","webpack://CodexEditor/./node_modules/@babel/runtime/helpers/inherits.js","webpack://CodexEditor/./node_modules/@babel/runtime/helpers/interopRequireDefault.js","webpack://CodexEditor/./node_modules/@babel/runtime/helpers/iterableToArray.js","webpack://CodexEditor/./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js","webpack://CodexEditor/./node_modules/@babel/runtime/helpers/nonIterableRest.js","webpack://CodexEditor/./node_modules/@babel/runtime/helpers/nonIterableSpread.js","webpack://CodexEditor/./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js","webpack://CodexEditor/./node_modules/@babel/runtime/helpers/setPrototypeOf.js","webpack://CodexEditor/./node_modules/@babel/runtime/helpers/slicedToArray.js","webpack://CodexEditor/./node_modules/@babel/runtime/helpers/toConsumableArray.js","webpack://CodexEditor/./node_modules/@babel/runtime/helpers/typeof.js","webpack://CodexEditor/./node_modules/@babel/runtime/node_modules/regenerator-runtime/runtime-module.js","webpack://CodexEditor/./node_modules/@babel/runtime/node_modules/regenerator-runtime/runtime.js","webpack://CodexEditor/./node_modules/@babel/runtime/regenerator/index.js","webpack://CodexEditor/./node_modules/@codexteam/shortcuts/lib/shortcuts.js","webpack://CodexEditor/./node_modules/codex-notifier/dist/bundle.js","webpack://CodexEditor/./node_modules/core-js/es6/index.js","webpack://CodexEditor/./node_modules/core-js/fn/array/includes.js","webpack://CodexEditor/./node_modules/core-js/fn/object/entries.js","webpack://CodexEditor/./node_modules/core-js/fn/object/get-own-property-descriptors.js","webpack://CodexEditor/./node_modules/core-js/fn/object/values.js","webpack://CodexEditor/./node_modules/core-js/fn/promise/finally.js","webpack://CodexEditor/./node_modules/core-js/fn/string/pad-end.js","webpack://CodexEditor/./node_modules/core-js/fn/string/pad-start.js","webpack://CodexEditor/./node_modules/core-js/fn/symbol/async-iterator.js","webpack://CodexEditor/./node_modules/core-js/modules/_a-function.js","webpack://CodexEditor/./node_modules/core-js/modules/_a-number-value.js","webpack://CodexEditor/./node_modules/core-js/modules/_add-to-unscopables.js","webpack://CodexEditor/./node_modules/core-js/modules/_an-instance.js","webpack://CodexEditor/./node_modules/core-js/modules/_an-object.js","webpack://CodexEditor/./node_modules/core-js/modules/_array-copy-within.js","webpack://CodexEditor/./node_modules/core-js/modules/_array-fill.js","webpack://CodexEditor/./node_modules/core-js/modules/_array-includes.js","webpack://CodexEditor/./node_modules/core-js/modules/_array-methods.js","webpack://CodexEditor/./node_modules/core-js/modules/_array-reduce.js","webpack://CodexEditor/./node_modules/core-js/modules/_array-species-constructor.js","webpack://CodexEditor/./node_modules/core-js/modules/_array-species-create.js","webpack://CodexEditor/./node_modules/core-js/modules/_bind.js","webpack://CodexEditor/./node_modules/core-js/modules/_classof.js","webpack://CodexEditor/./node_modules/core-js/modules/_cof.js","webpack://CodexEditor/./node_modules/core-js/modules/_collection-strong.js","webpack://CodexEditor/./node_modules/core-js/modules/_collection-weak.js","webpack://CodexEditor/./node_modules/core-js/modules/_collection.js","webpack://CodexEditor/./node_modules/core-js/modules/_core.js","webpack://CodexEditor/./node_modules/core-js/modules/_create-property.js","webpack://CodexEditor/./node_modules/core-js/modules/_ctx.js","webpack://CodexEditor/./node_modules/core-js/modules/_date-to-iso-string.js","webpack://CodexEditor/./node_modules/core-js/modules/_date-to-primitive.js","webpack://CodexEditor/./node_modules/core-js/modules/_defined.js","webpack://CodexEditor/./node_modules/core-js/modules/_descriptors.js","webpack://CodexEditor/./node_modules/core-js/modules/_dom-create.js","webpack://CodexEditor/./node_modules/core-js/modules/_enum-bug-keys.js","webpack://CodexEditor/./node_modules/core-js/modules/_enum-keys.js","webpack://CodexEditor/./node_modules/core-js/modules/_export.js","webpack://CodexEditor/./node_modules/core-js/modules/_fails-is-regexp.js","webpack://CodexEditor/./node_modules/core-js/modules/_fails.js","webpack://CodexEditor/./node_modules/core-js/modules/_fix-re-wks.js","webpack://CodexEditor/./node_modules/core-js/modules/_flags.js","webpack://CodexEditor/./node_modules/core-js/modules/_for-of.js","webpack://CodexEditor/./node_modules/core-js/modules/_global.js","webpack://CodexEditor/./node_modules/core-js/modules/_has.js","webpack://CodexEditor/./node_modules/core-js/modules/_hide.js","webpack://CodexEditor/./node_modules/core-js/modules/_html.js","webpack://CodexEditor/./node_modules/core-js/modules/_ie8-dom-define.js","webpack://CodexEditor/./node_modules/core-js/modules/_inherit-if-required.js","webpack://CodexEditor/./node_modules/core-js/modules/_invoke.js","webpack://CodexEditor/./node_modules/core-js/modules/_iobject.js","webpack://CodexEditor/./node_modules/core-js/modules/_is-array-iter.js","webpack://CodexEditor/./node_modules/core-js/modules/_is-array.js","webpack://CodexEditor/./node_modules/core-js/modules/_is-integer.js","webpack://CodexEditor/./node_modules/core-js/modules/_is-object.js","webpack://CodexEditor/./node_modules/core-js/modules/_is-regexp.js","webpack://CodexEditor/./node_modules/core-js/modules/_iter-call.js","webpack://CodexEditor/./node_modules/core-js/modules/_iter-create.js","webpack://CodexEditor/./node_modules/core-js/modules/_iter-define.js","webpack://CodexEditor/./node_modules/core-js/modules/_iter-detect.js","webpack://CodexEditor/./node_modules/core-js/modules/_iter-step.js","webpack://CodexEditor/./node_modules/core-js/modules/_iterators.js","webpack://CodexEditor/./node_modules/core-js/modules/_library.js","webpack://CodexEditor/./node_modules/core-js/modules/_math-expm1.js","webpack://CodexEditor/./node_modules/core-js/modules/_math-fround.js","webpack://CodexEditor/./node_modules/core-js/modules/_math-log1p.js","webpack://CodexEditor/./node_modules/core-js/modules/_math-sign.js","webpack://CodexEditor/./node_modules/core-js/modules/_meta.js","webpack://CodexEditor/./node_modules/core-js/modules/_microtask.js","webpack://CodexEditor/./node_modules/core-js/modules/_new-promise-capability.js","webpack://CodexEditor/./node_modules/core-js/modules/_object-assign.js","webpack://CodexEditor/./node_modules/core-js/modules/_object-create.js","webpack://CodexEditor/./node_modules/core-js/modules/_object-dp.js","webpack://CodexEditor/./node_modules/core-js/modules/_object-dps.js","webpack://CodexEditor/./node_modules/core-js/modules/_object-gopd.js","webpack://CodexEditor/./node_modules/core-js/modules/_object-gopn-ext.js","webpack://CodexEditor/./node_modules/core-js/modules/_object-gopn.js","webpack://CodexEditor/./node_modules/core-js/modules/_object-gops.js","webpack://CodexEditor/./node_modules/core-js/modules/_object-gpo.js","webpack://CodexEditor/./node_modules/core-js/modules/_object-keys-internal.js","webpack://CodexEditor/./node_modules/core-js/modules/_object-keys.js","webpack://CodexEditor/./node_modules/core-js/modules/_object-pie.js","webpack://CodexEditor/./node_modules/core-js/modules/_object-sap.js","webpack://CodexEditor/./node_modules/core-js/modules/_object-to-array.js","webpack://CodexEditor/./node_modules/core-js/modules/_own-keys.js","webpack://CodexEditor/./node_modules/core-js/modules/_parse-float.js","webpack://CodexEditor/./node_modules/core-js/modules/_parse-int.js","webpack://CodexEditor/./node_modules/core-js/modules/_perform.js","webpack://CodexEditor/./node_modules/core-js/modules/_promise-resolve.js","webpack://CodexEditor/./node_modules/core-js/modules/_property-desc.js","webpack://CodexEditor/./node_modules/core-js/modules/_redefine-all.js","webpack://CodexEditor/./node_modules/core-js/modules/_redefine.js","webpack://CodexEditor/./node_modules/core-js/modules/_same-value.js","webpack://CodexEditor/./node_modules/core-js/modules/_set-proto.js","webpack://CodexEditor/./node_modules/core-js/modules/_set-species.js","webpack://CodexEditor/./node_modules/core-js/modules/_set-to-string-tag.js","webpack://CodexEditor/./node_modules/core-js/modules/_shared-key.js","webpack://CodexEditor/./node_modules/core-js/modules/_shared.js","webpack://CodexEditor/./node_modules/core-js/modules/_species-constructor.js","webpack://CodexEditor/./node_modules/core-js/modules/_strict-method.js","webpack://CodexEditor/./node_modules/core-js/modules/_string-at.js","webpack://CodexEditor/./node_modules/core-js/modules/_string-context.js","webpack://CodexEditor/./node_modules/core-js/modules/_string-html.js","webpack://CodexEditor/./node_modules/core-js/modules/_string-pad.js","webpack://CodexEditor/./node_modules/core-js/modules/_string-repeat.js","webpack://CodexEditor/./node_modules/core-js/modules/_string-trim.js","webpack://CodexEditor/./node_modules/core-js/modules/_string-ws.js","webpack://CodexEditor/./node_modules/core-js/modules/_task.js","webpack://CodexEditor/./node_modules/core-js/modules/_to-absolute-index.js","webpack://CodexEditor/./node_modules/core-js/modules/_to-index.js","webpack://CodexEditor/./node_modules/core-js/modules/_to-integer.js","webpack://CodexEditor/./node_modules/core-js/modules/_to-iobject.js","webpack://CodexEditor/./node_modules/core-js/modules/_to-length.js","webpack://CodexEditor/./node_modules/core-js/modules/_to-object.js","webpack://CodexEditor/./node_modules/core-js/modules/_to-primitive.js","webpack://CodexEditor/./node_modules/core-js/modules/_typed-array.js","webpack://CodexEditor/./node_modules/core-js/modules/_typed-buffer.js","webpack://CodexEditor/./node_modules/core-js/modules/_typed.js","webpack://CodexEditor/./node_modules/core-js/modules/_uid.js","webpack://CodexEditor/./node_modules/core-js/modules/_user-agent.js","webpack://CodexEditor/./node_modules/core-js/modules/_validate-collection.js","webpack://CodexEditor/./node_modules/core-js/modules/_wks-define.js","webpack://CodexEditor/./node_modules/core-js/modules/_wks-ext.js","webpack://CodexEditor/./node_modules/core-js/modules/_wks.js","webpack://CodexEditor/./node_modules/core-js/modules/core.get-iterator-method.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.array.copy-within.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.array.every.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.array.fill.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.array.filter.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.array.find-index.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.array.find.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.array.for-each.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.array.from.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.array.index-of.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.array.is-array.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.array.iterator.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.array.join.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.array.last-index-of.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.array.map.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.array.of.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.array.reduce-right.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.array.reduce.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.array.slice.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.array.some.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.array.sort.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.array.species.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.date.now.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.date.to-iso-string.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.date.to-json.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.date.to-primitive.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.date.to-string.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.function.bind.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.function.has-instance.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.function.name.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.map.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.math.acosh.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.math.asinh.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.math.atanh.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.math.cbrt.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.math.clz32.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.math.cosh.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.math.expm1.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.math.fround.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.math.hypot.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.math.imul.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.math.log10.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.math.log1p.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.math.log2.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.math.sign.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.math.sinh.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.math.tanh.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.math.trunc.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.number.constructor.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.number.epsilon.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.number.is-finite.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.number.is-integer.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.number.is-nan.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.number.is-safe-integer.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.number.max-safe-integer.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.number.min-safe-integer.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.number.parse-float.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.number.parse-int.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.number.to-fixed.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.number.to-precision.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.object.assign.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.object.create.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.object.define-properties.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.object.define-property.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.object.freeze.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.object.get-own-property-descriptor.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.object.get-own-property-names.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.object.get-prototype-of.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.object.is-extensible.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.object.is-frozen.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.object.is-sealed.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.object.is.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.object.keys.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.object.prevent-extensions.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.object.seal.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.object.set-prototype-of.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.object.to-string.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.parse-float.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.parse-int.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.promise.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.reflect.apply.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.reflect.construct.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.reflect.define-property.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.reflect.delete-property.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.reflect.enumerate.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.reflect.get-own-property-descriptor.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.reflect.get-prototype-of.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.reflect.get.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.reflect.has.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.reflect.is-extensible.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.reflect.own-keys.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.reflect.prevent-extensions.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.reflect.set-prototype-of.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.reflect.set.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.regexp.constructor.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.regexp.flags.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.regexp.match.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.regexp.replace.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.regexp.search.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.regexp.split.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.regexp.to-string.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.set.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.string.anchor.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.string.big.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.string.blink.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.string.bold.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.string.code-point-at.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.string.ends-with.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.string.fixed.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.string.fontcolor.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.string.fontsize.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.string.from-code-point.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.string.includes.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.string.italics.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.string.iterator.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.string.link.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.string.raw.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.string.repeat.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.string.small.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.string.starts-with.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.string.strike.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.string.sub.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.string.sup.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.string.trim.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.symbol.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.typed.array-buffer.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.typed.data-view.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.typed.float32-array.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.typed.float64-array.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.typed.int16-array.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.typed.int32-array.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.typed.int8-array.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.typed.uint16-array.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.typed.uint32-array.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.typed.uint8-array.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.typed.uint8-clamped-array.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.weak-map.js","webpack://CodexEditor/./node_modules/core-js/modules/es6.weak-set.js","webpack://CodexEditor/./node_modules/core-js/modules/es7.array.includes.js","webpack://CodexEditor/./node_modules/core-js/modules/es7.object.entries.js","webpack://CodexEditor/./node_modules/core-js/modules/es7.object.get-own-property-descriptors.js","webpack://CodexEditor/./node_modules/core-js/modules/es7.object.values.js","webpack://CodexEditor/./node_modules/core-js/modules/es7.promise.finally.js","webpack://CodexEditor/./node_modules/core-js/modules/es7.string.pad-end.js","webpack://CodexEditor/./node_modules/core-js/modules/es7.string.pad-start.js","webpack://CodexEditor/./node_modules/core-js/modules/es7.symbol.async-iterator.js","webpack://CodexEditor/./node_modules/core-js/modules/web.dom.iterable.js","webpack://CodexEditor/./node_modules/core-js/modules/web.immediate.js","webpack://CodexEditor/./node_modules/core-js/modules/web.timers.js","webpack://CodexEditor/./node_modules/core-js/web/index.js","webpack://CodexEditor/./node_modules/css-loader/lib/css-base.js","webpack://CodexEditor/./node_modules/html-janitor/src/html-janitor.js","webpack://CodexEditor/./node_modules/regenerator-runtime/runtime.js","webpack://CodexEditor/(webpack)/buildin/global.js","webpack://CodexEditor/./src/codex.js","webpack://CodexEditor/./src/components/__module.ts","webpack://CodexEditor/./src/components/block-tunes/block-tune-delete.ts","webpack://CodexEditor/./src/components/block-tunes/block-tune-move-down.ts","webpack://CodexEditor/./src/components/block-tunes/block-tune-move-up.ts","webpack://CodexEditor/./src/components/block.ts","webpack://CodexEditor/./src/components/core.js","webpack://CodexEditor/./src/components/dom.ts","webpack://CodexEditor/./src/components/inline-tools/inline-tool-bold.ts","webpack://CodexEditor/./src/components/inline-tools/inline-tool-italic.ts","webpack://CodexEditor/./src/components/inline-tools/inline-tool-link.ts","webpack://CodexEditor/./src/components/modules sync ^\\.\\/.*$","webpack://CodexEditor/./src/components/modules/_notifications.js","webpack://CodexEditor/./src/components/modules/api-blocks.ts","webpack://CodexEditor/./src/components/modules/api-caret.ts","webpack://CodexEditor/./src/components/modules/api-events.ts","webpack://CodexEditor/./src/components/modules/api-listener.ts","webpack://CodexEditor/./src/components/modules/api-notifier.ts","webpack://CodexEditor/./src/components/modules/api-sanitizer.ts","webpack://CodexEditor/./src/components/modules/api-saver.ts","webpack://CodexEditor/./src/components/modules/api-selection.ts","webpack://CodexEditor/./src/components/modules/api-styles.ts","webpack://CodexEditor/./src/components/modules/api-toolbar.ts","webpack://CodexEditor/./src/components/modules/api.ts","webpack://CodexEditor/./src/components/modules/block-events.ts","webpack://CodexEditor/./src/components/modules/blockManager.js","webpack://CodexEditor/./src/components/modules/blockSelection.ts","webpack://CodexEditor/./src/components/modules/caret.js","webpack://CodexEditor/./src/components/modules/dragNDrop.ts","webpack://CodexEditor/./src/components/modules/events.js","webpack://CodexEditor/./src/components/modules/listeners.js","webpack://CodexEditor/./src/components/modules/modificationsObserver.ts","webpack://CodexEditor/./src/components/modules/notifier.ts","webpack://CodexEditor/./src/components/modules/paste.ts","webpack://CodexEditor/./src/components/modules/renderer.js","webpack://CodexEditor/./src/components/modules/sanitizer.ts","webpack://CodexEditor/./src/components/modules/saver.ts","webpack://CodexEditor/./src/components/modules/shortcuts.ts","webpack://CodexEditor/./src/components/modules/toolbar-blockSettings.js","webpack://CodexEditor/./src/components/modules/toolbar-inline.ts","webpack://CodexEditor/./src/components/modules/toolbar-toolbox.js","webpack://CodexEditor/./src/components/modules/toolbar.js","webpack://CodexEditor/./src/components/modules/tools.js","webpack://CodexEditor/./src/components/modules/ui.js","webpack://CodexEditor/./src/components/polyfills.ts","webpack://CodexEditor/./src/components/selection.ts","webpack://CodexEditor/./src/components/tools/paragraph/dist/bundle.js","webpack://CodexEditor/./src/components/utils.ts","webpack://CodexEditor/./src/styles/main.css"],"names":["window","_babelPolyfill","require","CodexEditor","VERSION","configuration","onReady","editor","Core","isReady","then","exportAPI","fieldsToExport","destroy","moduleInstances","Listeners","removeAll","UI","ModificationsObserver","field","Object","setPrototypeOf","forEach","API","methods","modules","editorModules","map","module","config","onFail","Promise","resolve","reject","validate","init","start","_","log","setTimeout","catch","error","holderId","$","get","toolName","tools","tool","isFunction","class","constructModules","configureModules","Module","displayName","e","console","name","state","getModulesDiff","diff","moduleName","modulesToPrepare","reduce","promise","prepare","Renderer","render","data","blocks","initialBlock","initialBlockData","type","placeholder","sanitizer","p","b","a","hideToolbar","onChange","isEmpty","length","exports","notifications","codex","queue","addToQueue","settings","push","index","close","splice","createHolder","holder","draw","node","nodes","document","body","appendChild","errorThrown","errorMsg","event","notification","message","constructorSettings","cancel","confirm","inputField","confirmHandler","value","cancelHandler","create","core","time","wrapper","input","okBtn","cancelBtn","textContent","okMsg","cancelMsg","listeners","add","classList","dataset","send","focus","remove","clear","innerHTML","BlockManager","_blocks","currentBlockIndex","Blocks","Editor","redactor","Proxy","set","toolInstance","Tools","construct","toolClass","available","block","Block","bindEvents","on","BlockEvents","keydown","mouseUp","keyup","dragOver","dragLeave","newIndex","composeBlock","insert","targetBlock","blockToMerge","blockToMergeIndex","indexOf","blockToMergeInfo","mergeWith","removeBlock","currentBlock","firstInput","extractedFragment","Caret","extractFragmentFromCaretPosition","make","append","text","element","isElement","parentNode","firstLevelBlock","closest","CSS","clearFocused","focused","childNode","caretPosition","parentFirstLevelBlock","setToInput","Error","find","fromIndex","toIndex","swap","needAddInitialBlock","dropPointer","isLastBlock","nextBlocks","slice","inputs","previousBlocks","reverse","isFirstBlock","array","workingArea","first","second","secondBlock","replace","deleteCount","previousBlock","insertAdjacentElement","nextBlock","isNaN","newBlock","children","instance","Number","position","positions","DEFAULT","offset","START","END","lastInput","currentInput","nodeToSet","getDeepestNode","contentLength","getContentLength","delay","setCurrentBlockByChildNode","range","createRange","selection","Selection","isNativeInput","selectionStart","selectionEnd","setStart","setEnd","removeAllRanges","addRange","getBoundingClientRect","top","bottom","innerHeight","scrollBy","lastBlock","setToBlock","insertAtEnd","rangeCount","selectRange","getRangeAt","currentBlockInput","deleteContents","cloneRange","selectNodeContents","endContainer","endOffset","extractContents","from","direction","current","siblings","contentEditable","sibling","force","nextContentfulBlock","nextInput","isAtEnd","previousContentfulBlock","previousInput","isAtStart","shadowCaret","createElement","querySelector","sel","expandToTag","newRange","selectNode","isCollapsed","anchorNode","firstNode","firstLetterPosition","search","leftSiblings","getHigherLevelSiblings","nothingAtLeft","every","anchorOffset","lastNode","nothingAtRight","rightTrimmedText","Events","subscribers","eventName","callback","previousData","currentHandler","newData","i","allListeners","eventType","handler","useCapture","assignedEventData","alreadyExist","findOne","addEventListener","existingListeners","findAll","removeEventListener","listenersOnElement","listener","listenersWithType","listenersWithHandler","foundListeners","found","foundByElements","findByElement","filter","chainData","function","insertBlock","sequence","item","BlockSettings","toolSettings","defaultSettings","renderSettings","renderTunes","wrapperOpened","addToolSettings","addDefaultSettings","emit","events","opened","closed","contains","button","Toolbox","toolbox","buttons","activeButtonIndex","displayedToolsCount","Toolbar","content","addTools","toolsAvailable","addTool","api","apiSettings","IS_DISPLAYED_IN_TOOLBOX","TOOLBAR_ICON","toolboxButton","title","toolboxIcon","toolButtonActivate","getToolSettings","SHORTCUT","enableShortcut","shortcut","Shortcuts","preventDefault","insertNewBlock","IS_IRREPLACEBLE_TOOL","call","toolsClasses","toolboxOpened","activeButton","toolboxButtonActive","open","childNodes","actions","plusButton","blockActionsButtons","settingsToggler","toolbar","el","svg","plusButtonClicked","settingsIcon","forceClose","contentOffset","Math","floor","offsetHeight","style","transform","offsetTop","move","toolbarOpened","toggle","settingsTogglerClicked","hide","plusButtonHidden","show","Paragraph","toolsSettings","toolsUnavailable","_inlineTools","assign","internalTools","hasOwnProperty","keys","sequenceData","getListOfPrepareFunctions","success","fallback","toolPreparationList","CONFIG","plugin","constructorOptions","entries","IS_INLINE","inlineToolRequiredMethods","notImplementedMethods","method","constructInline","result","IS_CONTENTLESS","IS_ENABLED_INLINE_TOOLBAR","IS_ENABLED_LINE_BREAKS","IS_PASTE_DISALLOWED","SANITIZE_CONFIG","bold","BoldInlineTool","italic","ItalicInlineTool","link","LinkInlineTool","paragraph","inlineToolbar","appendSVGSprite","InlineToolbar","loadStyles","getElementById","editorWrapper","editorZone","styles","tag","toString","prepend","head","redactorClicked","documentKeydown","documentClicked","keyCode","keyCodes","ENTER","enterPressed","defaultBehaviour","keyDownOnEditor","target","hasPointerToBlock","tagName","highlightCurrentNode","BlockSelection","clearSelection","clickedOnInlineToolbarButton","clickedInsideofEditor","isAtEditor","handleShowingEvent","clickedNode","setToTheLastBlock","stopImmediatePropagation","stopPropagation","isInitialBlock","isInitial","isEmptyBlock","spriteHolder","hidden","display","sprite"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kDAA0C,gCAAgC;AAC1E;AACA;;AAEA;AACA;AACA;AACA,gEAAwD,kBAAkB;AAC1E;AACA,yDAAiD,cAAc;AAC/D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAyC,iCAAiC;AAC1E,wHAAgH,mBAAmB,EAAE;AACrI;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;;AAGA;AACA;;;;;;;;;;;;AClFA,whI;;;;;;;;;;;;ACAA,8CAAa;;AAEb,mBAAO,CAAC,wDAAa;;AAErB,mBAAO,CAAC,8EAA2B;;AAEnC,mBAAO,CAAC,kFAA6B;;AAErC,mBAAO,CAAC,8EAA2B;;AAEnC,mBAAO,CAAC,4FAAkC;;AAE1C,mBAAO,CAAC,wHAAgD;;AAExD,mBAAO,CAAC,4EAA0B;;AAElC,mBAAO,CAAC,8EAA2B;;AAEnC,mBAAO,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;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd,KAAK;AACL,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,yDAAyD;AACzD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,WAAW;AACX;;AAEA;AACA;AACA,wCAAwC,WAAW;AACnD;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,SAAS;AACT;AACA;AACA;AACA;;AAEA;;AAEA,SAAS;AACT;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,oCAAoC,cAAc;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,iCAAiC,kBAAkB;AACnD;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB;;AAEjB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,YAAY;AACZ;AACA;;AAEA;AACA,YAAY;AACZ;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,8CAA8C,QAAQ;AACtD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa;AACb;AACA;;AAEA,WAAW;AACX;AACA;AACA;;AAEA,WAAW;AACX;AACA;AACA;;AAEA,WAAW;AACX;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA,8CAA8C,QAAQ;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA,KAAK;;AAEL;AACA,8CAA8C,QAAQ;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA,8CAA8C,QAAQ;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;AChtBA,iBAAiB,mBAAO,CAAC,6GAAqB;;;;;;;;;;;;ACA9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,GAAG,IAAiD,oBAAoB,KAAK,aAAiI,CAAC,+CAA+C,mBAAmB,cAAc,4BAA4B,YAAY,qBAAqB,2DAA2D,SAAS,uCAAuC,qCAAqC,oCAAoC,EAAE,iBAAiB,iCAAiC,iBAAiB,YAAY,UAAU,sBAAsB,mBAAmB,iDAAiD,iBAAiB,kBAAkB,aAA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;AAC1B,qBAAqB;AACrB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,8EAA8E,OAAO;AACrF;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC,qBAAqB;AACrB,0BAA0B;AAC1B,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;;;;;;;;;;;;AC/Ia;AACb,kBAAkB,mBAAO,CAAC,wEAAiB;AAC3C,cAAc,mBAAO,CAAC,wDAAS;AAC/B,eAAe,mBAAO,CAAC,kEAAc;AACrC,eAAe,mBAAO,CAAC,kEAAc;AACrC,iBAAiB,mBAAO,CAAC,sEAAgB;AACzC,YAAY,mBAAO,CAAC,4DAAW;AAC/B,wBAAwB,mBAAO,CAAC,0EAAkB;AAClD,WAAW,mBAAO,CAAC,sDAAQ;AAC3B,eAAe,mBAAO,CAAC,sFAAwB;AAC/C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,q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CAAiC,aAAa;AAC9C;AACA,GAAG,YAAY;AACf;AACA;;;;;;;;;;;;ACrBA;AACA,UAAU;AACV;;;;;;;;;;;;ACFA;;;;;;;;;;;;ACAA;;;;;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;;;;;ACTD;AACA,WAAW,mBAAO,CAAC,kEAAc;AACjC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA;;;;;;;;;;;;ACHA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACJA,WAAW,mBAAO,CAAC,sDAAQ;AAC3B,eAAe,mBAAO,CAAC,kEAAc;AACrC,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,cAAc,mBAAO,CAAC,kEAAc;AACpC;AACA;AACA;AACA;AACA,cAAc,mBAAO,CAAC,0DAAU;AAChC,iDAAiD;AACjD,CAAC;AACD;AACA,qBAAqB;AACrB;AACA,SAAS;AACT,GAAG,EAAE;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpDA,aAAa,mBAAO,CAAC,4DAAW;AAChC,gBAAgB,mBAAO,CAAC,wDAAS;AACjC;AACA;AACA;AACA,aAAa,mBAAO,CAAC,sDAAQ;;AAE7B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,uCAAuC,sBAAsB,EAAE;AAC/D;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;;;;;;;;;;;;ACpEa;AACb;AACA,gBAAgB,mBAAO,CAAC,oEAAe;;AAEvC;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;;ACjBa;AACb;AACA,cAAc,mBAAO,CAAC,sEAAgB;AACtC,WAAW,mBAAO,CAAC,sEAAgB;AACnC,UAAU,mBAAO,CAAC,oEAAe;AACjC,eAAe,mBAAO,CAAC,kEAAc;AACrC,cAAc,mBAAO,CAAC,8DAAY;AAClC;;AAEA;AACA,6BAA6B,mBAAO,CAAC,0DAAU;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,UAAU,EAAE;AAChD,mBAAmB,sCAAsC;AACzD,CAAC,qCAAqC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;;;;;;;;;;;;ACjCD;AACA,eAAe,mBAAO,CAAC,kEAAc;AACrC,UAAU,mBAAO,CAAC,oEAAe;AACjC,kBAAkB,mBAAO,CAAC,0EAAkB;AAC5C,eAAe,mBAAO,CAAC,oEAAe;AACtC,yBAAyB;AACzB;;AAEA;AACA;AACA;AACA,eAAe,mBAAO,CAAC,oEAAe;AACtC;AACA;AACA;AACA;AACA;AACA,EAAE,mBAAO,CAAC,wDAAS;AACnB,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;;;;;;;;;;ACxCA,eAAe,mBAAO,CAAC,kEAAc;AACrC,qBAAqB,mBAAO,CAAC,4EAAmB;AAChD,kBAAkB,mBAAO,CAAC,wEAAiB;AAC3C;;AAE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d;AACA;;;;;;;;;;;;ACXA,cAAc,mBAAO,CAAC,4DAAW;AACjC,cAAc,mBAAO,CAAC,8DAAY;AAClC,YAAY,mBAAO,CAAC,0DAAU;AAC9B,aAAa,mBAAO,CAAC,kEAAc;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC7BA;AACA;;;;;;;;;;;;ACDA,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,aAAa,mBAAO,CAAC,4DAAW;AAChC,WAAW,mBAAO,CAAC,wDAAS;AAC5B,UAAU,mBAAO,CAAC,oEAAe;AACjC,aAAa,mBAAO,CAAC,4DAAW;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,mBAAO,CAAC,sDAAQ;AACtB;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnFA,gBAAgB,mBAAO,CAAC,oEAAe;AACvC;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACNA;AACA,gBAAgB,mBAAO,CAAC,oEAAe;AACvC,eAAe,mBAAO,CAAC,kEAAc;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACLA;AACA,cAAc,mBAAO,CAAC,8DAAY;AAClC,cAAc,mBAA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,CAAC,sDAAQ;AAC5B,YAAY,mBAAO,CAAC,sDAAQ;AAC5B,0BAA0B,mBAAO,CAAC,0EAAkB;AACpD,4BAA4B,mBAAO,CAAC,4EAAmB;AACvD,2BAA2B,mBAAO,CAAC,sFAAwB;AAC3D,uBAAuB,mBAAO,CAAC,kFAAsB;AACrD,kBAAkB,mBAAO,CAAC,kEAAc;AACxC,oBAAoB,mBAAO,CAAC,sEAAgB;AAC5C,mBAAmB,mBAAO,CAAC,sEAAgB;AAC3C,kBAAkB,mBAAO,CAAC,oEAAe;AACzC,wBAAwB,mBAAO,CAAC,kFAAsB;AACtD,YAAY,mBAAO,CAAC,kEAAc;AAClC,cAAc,mBAAO,CAAC,sEAAgB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,GAAG;;AAEH;AACA,4BAA4B;AAC5B,GAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iBAAiB,mBAAmB,0BAA0B,EAAE,EAAE;AAClE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,gCAAgC;AACzF;AACA,OAAO;AACP;AACA;AACA,6EAA6E,YAAY;AACzF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,yDAAyD,6CAA6C,EAAE;;AAExG;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,mDAAmD;AACnD;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,oCAAoC;AACpC;AACA,KAAK;AACL,wEAAwE;AACxE;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,8DAA8D;AAC9D;AACA,KAAK;AACL,wEAAwE;AACxE;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH,yBAAyB,sBAAsB,EAAE,EAAE;AACnD;AACA;AACA;AACA;;AAEA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA,8BAA8B,aAAa;AAC3C;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,sBAAsB,0BAA0B;AAChD,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;A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nD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,QAAQ,WAAW;AACnB;AACA;AACA,QAAQ,UAAU;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,WAAW;AACnB;AACA;AACA;AACA,QAAQ,WAAW;AACnB;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,yBAAyB,mBAAmB,uBAAuB,EAAE,EAAE;AACvE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,WAAW;AAC5B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA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GAAG,YAAY;AACf,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,WAAW;AACX,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,mBAAmB,kCAAkC;AACrD,SAAS;AACT;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,eAAe,uCAAuC;AACtD;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,uBAAuB,0BAA0B;AACjD;AACA;AACA,SAAS;AACT;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA,GAAG;AACH,kBAAkB,yBAAyB,KAAK;AAChD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,wBAAwB;AACxB,gBAAgB;AAChB,oBAAoB;AACpB,wBAAwB;AACxB,gBAAgB;AAChB,oBAAoB;AACpB;AACA,uBAAuB,mBAAO,CAAC,wEAAiB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,0DAA0D,oBAAoB;AAC9E,mBAAO,CAAC,kFAAsB;AAC9B,mBAAO,CAAC,sEAAgB;AACxB,UAAU,mBAAO,CAAC,wDAAS;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,gDAAgD,mBAAO,CAAC,sEAAgB;AACxE;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA,CAAC;;;;;;;;;;;;AC7RD;AACA,cAAc,mBAAO,CAAC,4DAAW;AACjC,gBAAgB,mBAAO,CAAC,oEAAe;AACvC,eAAe,mBAAO,CAAC,kEAAc;AACrC,cAAc,mBAAO,CAAC,4DAAW,eAAe;AAChD;AACA;AACA,iCAAiC,mBAAO,CAAC,0DAAU;AACnD,sBAAsB,cAAc;AACpC,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;;;;;ACfD;AACA,cAAc,mBAAO,CAAC,4DAAW;AACjC,aAAa,mBAAO,CAAC,0EAAkB;AACvC,gBAAgB,mBAAO,CAAC,oEAAe;AACvC,eAAe,mBAAO,CAAC,kEAAc;AACrC,eAAe,mBAAO,CAAC,kEAAc;AACrC,YAAY,mBAAO,CAAC,0DAAU;AAC9B,WAAW,mBAAO,CAAC,wDAAS;AAC5B,kBAAkB,mBAAO,CAAC,4DAAW,eAAe;;AAEpD;AACA;AACA;AACA,gBAAgB;AAChB,mCAAmC,cAAc;AACjD,CAAC;AACD;AACA,0BAA0B,cAAc;AACxC,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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CAAC,sDAAQ;AAC1B,aAAa,mBAAO,CAAC,8DAAY;AACjC,gBAAgB,mBAAO,CAAC,oEAAe;AACvC,eAAe,mBAAO,CAAC,kEAAc;AACrC,cAAc,mBAAO,CAAC,gEAAa;AACnC,eAAe,mBAAO,CAAC,kEAAc;AACrC,eAAe,mBAAO,CAAC,kEAAc;AACrC,gBAAgB,mBAAO,CAAC,oEAAe;AACvC,kBAAkB,mBAAO,CAAC,wEAAiB;AAC3C,iBAAiB,mBAAO,CAAC,0EAAkB;AAC3C,cAAc,mBAAO,CAAC,0EAAkB;AACxC,cAAc,mBAAO,CAAC,8EAAoB;AAC1C,YAAY,mBAAO,CAAC,sEAAgB;AACpC,UAAU,mBAAO,CAAC,kEAAc;AAChC,YAAY,mBAAO,CAAC,sEAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,sBAAsB;AACtB,sBAAsB,uBAAuB,WAAW,IAAI;AAC5D,GAAG;AACH,CAAC;AACD;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;AACD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D;AAC3D;AACA,KAAK;AACL;AACA,sBAAsB,mCAAmC;AACzD,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE,gCAAgC;AAChG;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,EAAE,mBA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AsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;;;;;ACnBD,mBAAO,CAAC,2EAAuB;AAC/B,mBAAO,CAAC,iFAA0B;AAClC,mBAAO,CAAC,uFAA6B;AACrC,iBAAiB,mBAAO,CAAC,iEAAkB;;;;;;;;;;;;ACH3C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mCAAmC,gBAAgB;AACnD,IAAI;AACJ;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,oDAAoD,cAAc;;AAElE;AACA;;;;;;;;;;;;AC3EA;AACA,MAAM,IAA0C;AAChD,IAAI,oCAAuB,OAAO;AAAA;AAAA;AAAA;AAAA,oGAAC;AACnC,GAAG,MAAM,EAIN;AACH,CAAC;;AAED;AACA,aAAa,OAAO;AACpB,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;;AAEA;AACA,wBAAwB,iCAAiC,EAAE;AAC3D,6BAA6B,uEAAuE,EAAE;;AAEtG;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,gBAAgB,QAAQ;;AAExB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,+DAA+D;AAC/D;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,qBAAqB,4BAA4B;AACjD;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;;AAEA,CAAC;;;;;;;;;;;;ACnLD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd,KAAK;AACL,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,yDAAyD;AACzD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,WAAW;AACX;;AAEA;AACA;AACA,wCAAwC,WAAW;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,SAAS;AACT;AACA;AACA;AACA;;AAEA;;AAEA,SAAS;AACT;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,oCAAoC,cAAc;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,iCAAiC,kBAAkB;AACnD;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB;;AAEjB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,YAAY;AACZ;AACA;;AAEA;AACA,YAAY;AACZ;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,8CAA8C,QAAQ;AACtD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa;AACb;AACA;;AAEA,WAAW;AACX;AACA;AACA;;AAEA,WAAW;AACX;AACA;AACA;;AAEA,WAAW;AACX;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA,8CAA8C,QAAQ;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;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mBAAmB,SAAS,kCAAkC,qBAAqB,sCAAsC,SAAS,kCAAkC,uBAAuB,wCAAwC,OAAO,4CAA4C,yBAAyB,kDAAkD,qDAAqD,yBAAyB,oBAAoB,2BAA2B,kBAAkB,iBAAiB,oBAAoB,qBAAqB,gCAAgC,oDAAoD,mDAAmD,mCAAmC,oDAAoD,2BAA2B,4DAA4D,4DAA4D,OAAO,oCAAoC,UAAU,wCAAwC,wCAAwC,OAAO,YAAY,0CAA0C,0CAA0C,OAAO,KAAK,4BAA4B,UAAU,wCAAwC,wCAAwC,OAAO,YAAY,0CAA0C,0CAA0C,OAAO,KAAK,4CAA4C,oBAAoB,yBAAyB,kDAAkD,iDAAiD,wBAAwB,uBAAuB,0DAA0D,0DAA0D,qBAAqB,6BAA6B,yBAAyB,0BAA0B,uBAAuB,4BAA4B,4DAA4D,4DAA4D,OAAO,qBAAqB,qBAAqB,4BAA4B,yBAAyB,OAAO;;AAEj0tB","file":"codex-editor.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"CodexEditor\"] = factory();\n\telse\n\t\troot[\"CodexEditor\"] = factory();\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","module.exports = \"\\n\\n\\r\\n \\r\\n\\n\\n\\r\\n \\r\\n\\n\\n\\r\\n \\r\\n\\n\\n\\r\\n \\r\\n\\n\\n\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n\\n\\n\\r\\n \\r\\n\\n\\n\\r\\n \\r\\n\\n\\n\\r\\n \\r\\n\\n\\n\\r\\n \\r\\n\\n\"","\"use strict\";\n\nrequire(\"core-js/es6\");\n\nrequire(\"core-js/fn/array/includes\");\n\nrequire(\"core-js/fn/string/pad-start\");\n\nrequire(\"core-js/fn/string/pad-end\");\n\nrequire(\"core-js/fn/symbol/async-iterator\");\n\nrequire(\"core-js/fn/object/get-own-property-descriptors\");\n\nrequire(\"core-js/fn/object/values\");\n\nrequire(\"core-js/fn/object/entries\");\n\nrequire(\"core-js/fn/promise/finally\");\n\nrequire(\"core-js/web\");\n\nrequire(\"regenerator-runtime/runtime\");\n\nif (global._babelPolyfill && typeof console !== \"undefined\" && console.warn) {\n console.warn(\"@babel/polyfill is loaded more than once on this page. This is probably not desirable/intended \" + \"and may have consequences if different versions of the polyfills are applied sequentially. \" + \"If you do need to load the polyfill more than once, use @babel/polyfill/noConflict \" + \"instead to bypass the warning.\");\n}\n\nglobal._babelPolyfill = true;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = register;\nexports.revert = revert;\n\nfunction register() {}\n\nfunction revert() {}","exports = module.exports = function (...args) {\n return register(...args);\n};\n\nexports.__esModule = true;\n\nconst node = require(\"./node\");\n\nconst register = node.default;\nObject.assign(exports, node);","function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nmodule.exports = _arrayWithHoles;","function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n }\n}\n\nmodule.exports = _arrayWithoutHoles;","function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nmodule.exports = _assertThisInitialized;","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\n\nfunction _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n\n _next(undefined);\n });\n };\n}\n\nmodule.exports = _asyncToGenerator;","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nmodule.exports = _classCallCheck;","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\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nmodule.exports = _createClass;","function _getPrototypeOf(o) {\n module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nmodule.exports = _getPrototypeOf;","var setPrototypeOf = require(\"./setPrototypeOf\");\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}\n\nmodule.exports = _inherits;","function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\n\nmodule.exports = _interopRequireDefault;","function _iterableToArray(iter) {\n if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter);\n}\n\nmodule.exports = _iterableToArray;","function _iterableToArrayLimit(arr, i) {\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nmodule.exports = _iterableToArrayLimit;","function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n}\n\nmodule.exports = _nonIterableRest;","function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n}\n\nmodule.exports = _nonIterableSpread;","var _typeof = require(\"../helpers/typeof\");\n\nvar assertThisInitialized = require(\"./assertThisInitialized\");\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return assertThisInitialized(self);\n}\n\nmodule.exports = _possibleConstructorReturn;","function _setPrototypeOf(o, p) {\n module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nmodule.exports = _setPrototypeOf;","var arrayWithHoles = require(\"./arrayWithHoles\");\n\nvar iterableToArrayLimit = require(\"./iterableToArrayLimit\");\n\nvar nonIterableRest = require(\"./nonIterableRest\");\n\nfunction _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || nonIterableRest();\n}\n\nmodule.exports = _slicedToArray;","var arrayWithoutHoles = require(\"./arrayWithoutHoles\");\n\nvar iterableToArray = require(\"./iterableToArray\");\n\nvar nonIterableSpread = require(\"./nonIterableSpread\");\n\nfunction _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || nonIterableSpread();\n}\n\nmodule.exports = _toConsumableArray;","function _typeof2(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof2(obj); }\n\nfunction _typeof(obj) {\n if (typeof Symbol === \"function\" && _typeof2(Symbol.iterator) === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return _typeof2(obj);\n };\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : _typeof2(obj);\n };\n }\n\n return _typeof(obj);\n}\n\nmodule.exports = _typeof;","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n// This method of obtaining a reference to the global object needs to be\n// kept identical to the way it is obtained in runtime.js\nvar g = (function() {\n return this || (typeof self === \"object\" && self);\n})() || Function(\"return this\")();\n\n// Use `getOwnPropertyNames` because not all browsers support calling\n// `hasOwnProperty` on the global `self` object in a worker. See #183.\nvar hadRuntime = g.regeneratorRuntime &&\n Object.getOwnPropertyNames(g).indexOf(\"regeneratorRuntime\") >= 0;\n\n// Save the old regeneratorRuntime in case it needs to be restored later.\nvar oldRuntime = hadRuntime && g.regeneratorRuntime;\n\n// Force reevalutation of runtime.js.\ng.regeneratorRuntime = undefined;\n\nmodule.exports = require(\"./runtime\");\n\nif (hadRuntime) {\n // Restore the original runtime.\n g.regeneratorRuntime = oldRuntime;\n} else {\n // Remove the global property added by runtime.js.\n try {\n delete g.regeneratorRuntime;\n } catch(e) {\n g.regeneratorRuntime = undefined;\n }\n}\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n!(function(global) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n var inModule = typeof module === \"object\";\n var runtime = global.regeneratorRuntime;\n if (runtime) {\n if (inModule) {\n // If regeneratorRuntime is defined globally and we're in a module,\n // make the exports object identical to regeneratorRuntime.\n module.exports = runtime;\n }\n // Don't bother evaluating the rest of this file if the runtime was\n // already defined globally.\n return;\n }\n\n // Define the runtime globally (as expected by generated code) as either\n // module.exports (if we're in a module) or a new, empty object.\n runtime = global.regeneratorRuntime = inModule ? module.exports : {};\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n runtime.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n IteratorPrototype[iteratorSymbol] = function () {\n return this;\n };\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n GeneratorFunctionPrototype.constructor = GeneratorFunction;\n GeneratorFunctionPrototype[toStringTagSymbol] =\n GeneratorFunction.displayName = \"GeneratorFunction\";\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n prototype[method] = function(arg) {\n return this._invoke(method, arg);\n };\n });\n }\n\n runtime.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n runtime.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n if (!(toStringTagSymbol in genFun)) {\n genFun[toStringTagSymbol] = \"GeneratorFunction\";\n }\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n runtime.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return Promise.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return Promise.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new Promise(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n AsyncIterator.prototype[asyncIteratorSymbol] = function () {\n return this;\n };\n runtime.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n runtime.async = function(innerFn, outerFn, self, tryLocsList) {\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList)\n );\n\n return runtime.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n if (delegate.iterator.return) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n Gp[toStringTagSymbol] = \"Generator\";\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n Gp[iteratorSymbol] = function() {\n return this;\n };\n\n Gp.toString = function() {\n return \"[object Generator]\";\n };\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n runtime.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n runtime.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n})(\n // In sloppy mode, unbound `this` refers to the global object, fallback to\n // Function constructor if we're in global strict mode. That is sadly a form\n // of indirect eval which violates Content Security Policy.\n (function() {\n return this || (typeof self === \"object\" && self);\n })() || Function(\"return this\")()\n);\n","module.exports = require(\"regenerator-runtime\");\n","/*!\n * Library for handling keyboard shortcuts\n * @copyright undefined\n * @license MIT\n * @author CodeX (https://ifmo.su)\n * @version 1.0.0\n */\n!function(e,t){if(\"object\"==typeof exports&&\"object\"==typeof module)module.exports=t();else if(\"function\"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)(\"object\"==typeof exports?exports:e)[r]=n[r]}}(\"undefined\"!=typeof self?self:this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,\"a\",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p=\"\",t(t.s=0)}([function(e,t,n){\"use strict\";function r(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}Object.defineProperty(t,\"__esModule\",{value:!0});var o=function(){function e(e,t){for(var n=0;n1)for(var n in u)u[n].includes(e[t])&&(this.commands[n]=!0);else this.keys[e[t]]=!0}},{key:\"execute\",value:function(e){var t=e.ctrlKey||e.metaKey,n=e.shiftKey,r=e.altKey,o={CMD:t,SHIFT:n,ALT:r},u=void 0,c=!0;for(u in this.commands)c=c&&o[u];var a=void 0,s=!0;for(a in this.keys)s=s&&e.keyCode===i[a];c&&s&&this.callback(e)}},{key:\"remove\",value:function(){this.element.removeEventListener(\"keydown\",this.executeShortcut)}}]),e}();t.default=c}])});","!function(t,e){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define([],e):\"object\"==typeof exports?exports.notifier=e():t.notifier=e()}(window,function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(t,\"__esModule\",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&\"object\"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,\"default\",{enumerable:!0,value:t}),2&e&&\"string\"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,\"a\",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p=\"/\",n(n.s=0)}([function(t,e,n){\"use strict\";n(1),\n/*!\n * Codex JavaScript Notification module\n * https://github.com/codex-team/js-notifier\n */\nt.exports=function(){var t=n(6),e=\"cdx-notify--bounce-in\",r=null;return{show:function(n){if(n.message){!function(){if(r)return!0;r=t.getWrapper(),document.body.appendChild(r)}();var o=null,i=n.time||8e3;switch(n.type){case\"confirm\":o=t.confirm(n);break;case\"prompt\":o=t.prompt(n);break;default:o=t.alert(n),window.setTimeout(function(){o.remove()},i)}r.appendChild(o),o.classList.add(e)}}}}()},function(t,e,n){var r=n(2);\"string\"==typeof r&&(r=[[t.i,r,\"\"]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(4)(r,o);r.locals&&(t.exports=r.locals)},function(t,e,n){(t.exports=n(3)(!1)).push([t.i,'.cdx-notify--error{background:#fffbfb!important}.cdx-notify--error::before{background:#fb5d5d!important}.cdx-notify__input{max-width:130px;padding:5px 10px;background:#f7f7f7;border:0;border-radius:3px;font-size:13px;color:#656b7c;outline:0}.cdx-notify__input:-ms-input-placeholder{color:#656b7c}.cdx-notify__input::placeholder{color:#656b7c}.cdx-notify__input:focus:-ms-input-placeholder{color:rgba(101,107,124,.3)}.cdx-notify__input:focus::placeholder{color:rgba(101,107,124,.3)}.cdx-notify__button{border:none;border-radius:3px;font-size:13px;padding:5px 10px;cursor:pointer}.cdx-notify__button:last-child{margin-left:10px}.cdx-notify__button--cancel{background:#f2f5f7;box-shadow:0 2px 1px 0 rgba(16,19,29,0);color:#656b7c}.cdx-notify__button--cancel:hover{background:#eee}.cdx-notify__button--confirm{background:#34c992;box-shadow:0 1px 1px 0 rgba(18,49,35,.05);color:#fff}.cdx-notify__button--confirm:hover{background:#33b082}.cdx-notify__btns-wrapper{display:-ms-flexbox;display:flex;-ms-flex-flow:row nowrap;flex-flow:row nowrap;margin-top:5px}.cdx-notify__cross{position:absolute;top:5px;right:5px;width:10px;height:10px;padding:5px;opacity:.54;cursor:pointer}.cdx-notify__cross::after,.cdx-notify__cross::before{content:\\'\\';position:absolute;left:9px;top:5px;height:12px;width:2px;background:#575d67}.cdx-notify__cross::before{transform:rotate(-45deg)}.cdx-notify__cross::after{transform:rotate(45deg)}.cdx-notify__cross:hover{opacity:1}.cdx-notifies{position:fixed;z-index:2;bottom:20px;left:20px;font-family:-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Oxygen,Ubuntu,Cantarell,\"Fira Sans\",\"Droid Sans\",\"Helvetica Neue\",sans-serif}.cdx-notify{position:relative;width:220px;margin-top:15px;padding:13px 16px;background:#fff;box-shadow:0 11px 17px 0 rgba(23,32,61,.13);border-radius:5px;font-size:14px;line-height:1.4em;word-wrap:break-word}.cdx-notify::before{content:\\'\\';position:absolute;display:block;top:0;left:0;width:3px;height:calc(100% - 6px);margin:3px;border-radius:5px;background:0 0}@keyframes bounceIn{0%{opacity:0;transform:scale(.3)}50%{opacity:1;transform:scale(1.05)}70%{transform:scale(.9)}100%{transform:scale(1)}}.cdx-notify--bounce-in{animation-name:bounceIn;animation-duration:.6s;animation-iteration-count:1}.cdx-notify--success{background:#fafffe!important}.cdx-notify--success::before{background:#41ffb1!important}',\"\"])},function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n=function(t,e){var n=t[1]||\"\",r=t[3];if(!r)return n;if(e&&\"function\"==typeof btoa){var o=function(t){return\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,\"+btoa(unescape(encodeURIComponent(JSON.stringify(t))))+\" */\"}(r),i=r.sources.map(function(t){return\"/*# sourceURL=\"+r.sourceRoot+t+\" */\"});return[n].concat(i).concat([o]).join(\"\\n\")}return[n].join(\"\\n\")}(e,t);return e[2]?\"@media \"+e[2]+\"{\"+n+\"}\":n}).join(\"\")},e.i=function(t,n){\"string\"==typeof t&&(t=[[null,t,\"\"]]);for(var r={},o=0;o=0&&s.splice(e,1)}function b(t){var e=document.createElement(\"style\");return void 0===t.attrs.type&&(t.attrs.type=\"text/css\"),m(e,t.attrs),l(t,e),e}function m(t,e){Object.keys(e).forEach(function(n){t.setAttribute(n,e[n])})}function x(t,e){var n,r,o,i;if(e.transform&&t.css){if(!(i=e.transform(t.css)))return function(){};t.css=i}if(e.singleton){var s=c++;n=a||(a=b(e)),r=h.bind(null,n,s,!1),o=h.bind(null,n,s,!0)}else t.sourceMap&&\"function\"==typeof URL&&\"function\"==typeof URL.createObjectURL&&\"function\"==typeof URL.revokeObjectURL&&\"function\"==typeof Blob&&\"function\"==typeof btoa?(n=function(t){var e=document.createElement(\"link\");return void 0===t.attrs.type&&(t.attrs.type=\"text/css\"),t.attrs.rel=\"stylesheet\",m(e,t.attrs),l(t,e),e}(e),r=function(t,e,n){var r=n.css,o=n.sourceMap,i=void 0===e.convertToAbsoluteUrls&&o;(e.convertToAbsoluteUrls||i)&&(r=f(r));o&&(r+=\"\\n/*# sourceMappingURL=data:application/json;base64,\"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+\" */\");var a=new Blob([r],{type:\"text/css\"}),c=t.href;t.href=URL.createObjectURL(a),c&&URL.revokeObjectURL(c)}.bind(null,n,e),o=function(){p(n),n.href&&URL.revokeObjectURL(n.href)}):(n=b(e),r=function(t,e){var n=e.css,r=e.media;r&&t.setAttribute(\"media\",r);if(t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}.bind(null,n),o=function(){p(n)});return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else o()}}t.exports=function(t,e){if(\"undefined\"!=typeof DEBUG&&DEBUG&&\"object\"!=typeof document)throw new Error(\"The style-loader cannot be used in a non-browser environment\");(e=e||{}).attrs=\"object\"==typeof e.attrs?e.attrs:{},e.singleton||\"boolean\"==typeof e.singleton||(e.singleton=o()),e.insertInto||(e.insertInto=\"head\"),e.insertAt||(e.insertAt=\"bottom\");var n=u(t,e);return d(n,e),function(t){for(var o=[],i=0;i 2 ? arguments[2] : undefined;\n var count = Math.min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to);\n var inc = 1;\n if (from < to && to < from + count) {\n inc = -1;\n from += count - 1;\n to += count - 1;\n }\n while (count-- > 0) {\n if (from in O) O[to] = O[from];\n else delete O[to];\n to += inc;\n from += inc;\n } return O;\n};\n","// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)\n'use strict';\nvar toObject = require('./_to-object');\nvar toAbsoluteIndex = require('./_to-absolute-index');\nvar toLength = require('./_to-length');\nmodule.exports = function fill(value /* , start = 0, end = @length */) {\n var O = toObject(this);\n var length = toLength(O.length);\n var aLen = arguments.length;\n var index = toAbsoluteIndex(aLen > 1 ? arguments[1] : undefined, length);\n var end = aLen > 2 ? arguments[2] : undefined;\n var endPos = end === undefined ? length : toAbsoluteIndex(end, length);\n while (endPos > index) O[index++] = value;\n return O;\n};\n","// false -> Array#indexOf\n// true -> Array#includes\nvar toIObject = require('./_to-iobject');\nvar toLength = require('./_to-length');\nvar toAbsoluteIndex = require('./_to-absolute-index');\nmodule.exports = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) if (IS_INCLUDES || index in O) {\n if (O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n","// 0 -> Array#forEach\n// 1 -> Array#map\n// 2 -> Array#filter\n// 3 -> Array#some\n// 4 -> Array#every\n// 5 -> Array#find\n// 6 -> Array#findIndex\nvar ctx = require('./_ctx');\nvar IObject = require('./_iobject');\nvar toObject = require('./_to-object');\nvar toLength = require('./_to-length');\nvar asc = require('./_array-species-create');\nmodule.exports = function (TYPE, $create) {\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 NO_HOLES = TYPE == 5 || IS_FIND_INDEX;\n var create = $create || asc;\n return function ($this, callbackfn, that) {\n var O = toObject($this);\n var self = IObject(O);\n var f = ctx(callbackfn, that, 3);\n var length = toLength(self.length);\n var index = 0;\n var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;\n var val, res;\n for (;length > index; index++) if (NO_HOLES || index in self) {\n val = self[index];\n res = f(val, index, O);\n if (TYPE) {\n if (IS_MAP) result[index] = res; // map\n else if (res) switch (TYPE) {\n case 3: return true; // some\n case 5: return val; // find\n case 6: return index; // findIndex\n case 2: result.push(val); // filter\n } else if (IS_EVERY) return false; // every\n }\n }\n return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;\n };\n};\n","var aFunction = require('./_a-function');\nvar toObject = require('./_to-object');\nvar IObject = require('./_iobject');\nvar toLength = require('./_to-length');\n\nmodule.exports = function (that, callbackfn, aLen, memo, isRight) {\n aFunction(callbackfn);\n var O = toObject(that);\n var self = IObject(O);\n var length = toLength(O.length);\n var index = isRight ? length - 1 : 0;\n var i = isRight ? -1 : 1;\n if (aLen < 2) for (;;) {\n if (index in self) {\n memo = self[index];\n index += i;\n break;\n }\n index += i;\n if (isRight ? index < 0 : length <= index) {\n throw TypeError('Reduce of empty array with no initial value');\n }\n }\n for (;isRight ? index >= 0 : length > index; index += i) if (index in self) {\n memo = callbackfn(memo, self[index], index, O);\n }\n return memo;\n};\n","var isObject = require('./_is-object');\nvar isArray = require('./_is-array');\nvar SPECIES = require('./_wks')('species');\n\nmodule.exports = function (original) {\n var C;\n if (isArray(original)) {\n C = original.constructor;\n // cross-realm fallback\n if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;\n if (isObject(C)) {\n C = C[SPECIES];\n if (C === null) C = undefined;\n }\n } return C === undefined ? Array : C;\n};\n","// 9.4.2.3 ArraySpeciesCreate(originalArray, length)\nvar speciesConstructor = require('./_array-species-constructor');\n\nmodule.exports = function (original, length) {\n return new (speciesConstructor(original))(length);\n};\n","'use strict';\nvar aFunction = require('./_a-function');\nvar isObject = require('./_is-object');\nvar invoke = require('./_invoke');\nvar arraySlice = [].slice;\nvar factories = {};\n\nvar construct = function (F, len, args) {\n if (!(len in factories)) {\n for (var n = [], i = 0; i < len; i++) n[i] = 'a[' + i + ']';\n // eslint-disable-next-line no-new-func\n factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')');\n } return factories[len](F, args);\n};\n\nmodule.exports = Function.bind || function bind(that /* , ...args */) {\n var fn = aFunction(this);\n var partArgs = arraySlice.call(arguments, 1);\n var bound = function (/* args... */) {\n var args = partArgs.concat(arraySlice.call(arguments));\n return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that);\n };\n if (isObject(fn.prototype)) bound.prototype = fn.prototype;\n return bound;\n};\n","// getting tag from 19.1.3.6 Object.prototype.toString()\nvar cof = require('./_cof');\nvar TAG = require('./_wks')('toStringTag');\n// ES3 wrong here\nvar ARG = cof(function () { return arguments; }()) == 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (e) { /* empty */ }\n};\n\nmodule.exports = function (it) {\n var O, T, B;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T\n // builtinTag case\n : ARG ? cof(O)\n // ES3 arguments fallback\n : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;\n};\n","var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n","'use strict';\nvar dP = require('./_object-dp').f;\nvar create = require('./_object-create');\nvar redefineAll = require('./_redefine-all');\nvar ctx = require('./_ctx');\nvar anInstance = require('./_an-instance');\nvar forOf = require('./_for-of');\nvar $iterDefine = require('./_iter-define');\nvar step = require('./_iter-step');\nvar setSpecies = require('./_set-species');\nvar DESCRIPTORS = require('./_descriptors');\nvar fastKey = require('./_meta').fastKey;\nvar validate = require('./_validate-collection');\nvar SIZE = DESCRIPTORS ? '_s' : 'size';\n\nvar getEntry = function (that, key) {\n // fast case\n var index = fastKey(key);\n var entry;\n if (index !== 'F') return that._i[index];\n // frozen object case\n for (entry = that._f; entry; entry = entry.n) {\n if (entry.k == key) return entry;\n }\n};\n\nmodule.exports = {\n getConstructor: function (wrapper, NAME, IS_MAP, ADDER) {\n var C = wrapper(function (that, iterable) {\n anInstance(that, C, NAME, '_i');\n that._t = NAME; // collection type\n that._i = create(null); // index\n that._f = undefined; // first entry\n that._l = undefined; // last entry\n that[SIZE] = 0; // size\n if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);\n });\n redefineAll(C.prototype, {\n // 23.1.3.1 Map.prototype.clear()\n // 23.2.3.2 Set.prototype.clear()\n clear: function clear() {\n for (var that = validate(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) {\n entry.r = true;\n if (entry.p) entry.p = entry.p.n = undefined;\n delete data[entry.i];\n }\n that._f = that._l = undefined;\n that[SIZE] = 0;\n },\n // 23.1.3.3 Map.prototype.delete(key)\n // 23.2.3.4 Set.prototype.delete(value)\n 'delete': function (key) {\n var that = validate(this, NAME);\n var entry = getEntry(that, key);\n if (entry) {\n var next = entry.n;\n var prev = entry.p;\n delete that._i[entry.i];\n entry.r = true;\n if (prev) prev.n = next;\n if (next) next.p = prev;\n if (that._f == entry) that._f = next;\n if (that._l == entry) that._l = prev;\n that[SIZE]--;\n } return !!entry;\n },\n // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined)\n // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined)\n forEach: function forEach(callbackfn /* , that = undefined */) {\n validate(this, NAME);\n var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);\n var entry;\n while (entry = entry ? entry.n : this._f) {\n f(entry.v, entry.k, this);\n // revert to the last existing entry\n while (entry && entry.r) entry = entry.p;\n }\n },\n // 23.1.3.7 Map.prototype.has(key)\n // 23.2.3.7 Set.prototype.has(value)\n has: function has(key) {\n return !!getEntry(validate(this, NAME), key);\n }\n });\n if (DESCRIPTORS) dP(C.prototype, 'size', {\n get: function () {\n return validate(this, NAME)[SIZE];\n }\n });\n return C;\n },\n def: function (that, key, value) {\n var entry = getEntry(that, key);\n var prev, index;\n // change existing entry\n if (entry) {\n entry.v = value;\n // create new entry\n } else {\n that._l = entry = {\n i: index = fastKey(key, true), // <- index\n k: key, // <- key\n v: value, // <- value\n p: prev = that._l, // <- previous entry\n n: undefined, // <- next entry\n r: false // <- removed\n };\n if (!that._f) that._f = entry;\n if (prev) prev.n = entry;\n that[SIZE]++;\n // add to index\n if (index !== 'F') that._i[index] = entry;\n } return that;\n },\n getEntry: getEntry,\n setStrong: function (C, NAME, IS_MAP) {\n // add .keys, .values, .entries, [@@iterator]\n // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11\n $iterDefine(C, NAME, function (iterated, kind) {\n this._t = validate(iterated, NAME); // target\n this._k = kind; // kind\n this._l = undefined; // previous\n }, function () {\n var that = this;\n var kind = that._k;\n var entry = that._l;\n // revert to the last existing entry\n while (entry && entry.r) entry = entry.p;\n // get next entry\n if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) {\n // or finish the iteration\n that._t = undefined;\n return step(1);\n }\n // return step by kind\n if (kind == 'keys') return step(0, entry.k);\n if (kind == 'values') return step(0, entry.v);\n return step(0, [entry.k, entry.v]);\n }, IS_MAP ? 'entries' : 'values', !IS_MAP, true);\n\n // add [@@species], 23.1.2.2, 23.2.2.2\n setSpecies(NAME);\n }\n};\n","'use strict';\nvar redefineAll = require('./_redefine-all');\nvar getWeak = require('./_meta').getWeak;\nvar anObject = require('./_an-object');\nvar isObject = require('./_is-object');\nvar anInstance = require('./_an-instance');\nvar forOf = require('./_for-of');\nvar createArrayMethod = require('./_array-methods');\nvar $has = require('./_has');\nvar validate = require('./_validate-collection');\nvar arrayFind = createArrayMethod(5);\nvar arrayFindIndex = createArrayMethod(6);\nvar id = 0;\n\n// fallback for uncaught frozen keys\nvar uncaughtFrozenStore = function (that) {\n return that._l || (that._l = new UncaughtFrozenStore());\n};\nvar UncaughtFrozenStore = function () {\n this.a = [];\n};\nvar findUncaughtFrozen = function (store, key) {\n return arrayFind(store.a, function (it) {\n return it[0] === key;\n });\n};\nUncaughtFrozenStore.prototype = {\n get: function (key) {\n var entry = findUncaughtFrozen(this, key);\n if (entry) return entry[1];\n },\n has: function (key) {\n return !!findUncaughtFrozen(this, key);\n },\n set: function (key, value) {\n var entry = findUncaughtFrozen(this, key);\n if (entry) entry[1] = value;\n else this.a.push([key, value]);\n },\n 'delete': function (key) {\n var index = arrayFindIndex(this.a, function (it) {\n return it[0] === key;\n });\n if (~index) this.a.splice(index, 1);\n return !!~index;\n }\n};\n\nmodule.exports = {\n getConstructor: function (wrapper, NAME, IS_MAP, ADDER) {\n var C = wrapper(function (that, iterable) {\n anInstance(that, C, NAME, '_i');\n that._t = NAME; // collection type\n that._i = id++; // collection id\n that._l = undefined; // leak store for uncaught frozen objects\n if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);\n });\n redefineAll(C.prototype, {\n // 23.3.3.2 WeakMap.prototype.delete(key)\n // 23.4.3.3 WeakSet.prototype.delete(value)\n 'delete': function (key) {\n if (!isObject(key)) return false;\n var data = getWeak(key);\n if (data === true) return uncaughtFrozenStore(validate(this, NAME))['delete'](key);\n return data && $has(data, this._i) && delete data[this._i];\n },\n // 23.3.3.4 WeakMap.prototype.has(key)\n // 23.4.3.4 WeakSet.prototype.has(value)\n has: function has(key) {\n if (!isObject(key)) return false;\n var data = getWeak(key);\n if (data === true) return uncaughtFrozenStore(validate(this, NAME)).has(key);\n return data && $has(data, this._i);\n }\n });\n return C;\n },\n def: function (that, key, value) {\n var data = getWeak(anObject(key), true);\n if (data === true) uncaughtFrozenStore(that).set(key, value);\n else data[that._i] = value;\n return that;\n },\n ufstore: uncaughtFrozenStore\n};\n","'use strict';\nvar global = require('./_global');\nvar $export = require('./_export');\nvar redefine = require('./_redefine');\nvar redefineAll = require('./_redefine-all');\nvar meta = require('./_meta');\nvar forOf = require('./_for-of');\nvar anInstance = require('./_an-instance');\nvar isObject = require('./_is-object');\nvar fails = require('./_fails');\nvar $iterDetect = require('./_iter-detect');\nvar setToStringTag = require('./_set-to-string-tag');\nvar inheritIfRequired = require('./_inherit-if-required');\n\nmodule.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) {\n var Base = global[NAME];\n var C = Base;\n var ADDER = IS_MAP ? 'set' : 'add';\n var proto = C && C.prototype;\n var O = {};\n var fixMethod = function (KEY) {\n var fn = proto[KEY];\n redefine(proto, KEY,\n KEY == 'delete' ? function (a) {\n return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);\n } : KEY == 'has' ? function has(a) {\n return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);\n } : KEY == 'get' ? function get(a) {\n return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a);\n } : KEY == 'add' ? function add(a) { fn.call(this, a === 0 ? 0 : a); return this; }\n : function set(a, b) { fn.call(this, a === 0 ? 0 : a, b); return this; }\n );\n };\n if (typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function () {\n new C().entries().next();\n }))) {\n // create collection constructor\n C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER);\n redefineAll(C.prototype, methods);\n meta.NEED = true;\n } else {\n var instance = new C();\n // early implementations not supports chaining\n var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance;\n // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false\n var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); });\n // most early implementations doesn't supports iterables, most modern - not close it correctly\n var ACCEPT_ITERABLES = $iterDetect(function (iter) { new C(iter); }); // eslint-disable-line no-new\n // for early implementations -0 and +0 not the same\n var BUGGY_ZERO = !IS_WEAK && fails(function () {\n // V8 ~ Chromium 42- fails only with 5+ elements\n var $instance = new C();\n var index = 5;\n while (index--) $instance[ADDER](index, index);\n return !$instance.has(-0);\n });\n if (!ACCEPT_ITERABLES) {\n C = wrapper(function (target, iterable) {\n anInstance(target, C, NAME);\n var that = inheritIfRequired(new Base(), target, C);\n if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);\n return that;\n });\n C.prototype = proto;\n proto.constructor = C;\n }\n if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) {\n fixMethod('delete');\n fixMethod('has');\n IS_MAP && fixMethod('get');\n }\n if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER);\n // weak collections should not contains .clear method\n if (IS_WEAK && proto.clear) delete proto.clear;\n }\n\n setToStringTag(C, NAME);\n\n O[NAME] = C;\n $export($export.G + $export.W + $export.F * (C != Base), O);\n\n if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP);\n\n return C;\n};\n","var core = module.exports = { version: '2.5.7' };\nif (typeof __e == 'number') __e = core; // eslint-disable-line no-undef\n","'use strict';\nvar $defineProperty = require('./_object-dp');\nvar createDesc = require('./_property-desc');\n\nmodule.exports = function (object, index, value) {\n if (index in object) $defineProperty.f(object, index, createDesc(0, value));\n else object[index] = value;\n};\n","// optional / simple context binding\nvar aFunction = require('./_a-function');\nmodule.exports = function (fn, that, length) {\n aFunction(fn);\n if (that === undefined) return fn;\n switch (length) {\n case 1: return function (a) {\n return fn.call(that, a);\n };\n case 2: return function (a, b) {\n return fn.call(that, a, b);\n };\n case 3: return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n return function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n","'use strict';\n// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString()\nvar fails = require('./_fails');\nvar getTime = Date.prototype.getTime;\nvar $toISOString = Date.prototype.toISOString;\n\nvar lz = function (num) {\n return num > 9 ? num : '0' + num;\n};\n\n// PhantomJS / old WebKit has a broken implementations\nmodule.exports = (fails(function () {\n return $toISOString.call(new Date(-5e13 - 1)) != '0385-07-25T07:06:39.999Z';\n}) || !fails(function () {\n $toISOString.call(new Date(NaN));\n})) ? function toISOString() {\n if (!isFinite(getTime.call(this))) throw RangeError('Invalid time value');\n var d = this;\n var y = d.getUTCFullYear();\n var m = d.getUTCMilliseconds();\n var s = y < 0 ? '-' : y > 9999 ? '+' : '';\n return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) +\n '-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) +\n 'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) +\n ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z';\n} : $toISOString;\n","'use strict';\nvar anObject = require('./_an-object');\nvar toPrimitive = require('./_to-primitive');\nvar NUMBER = 'number';\n\nmodule.exports = function (hint) {\n if (hint !== 'string' && hint !== NUMBER && hint !== 'default') throw TypeError('Incorrect hint');\n return toPrimitive(anObject(this), hint != NUMBER);\n};\n","// 7.2.1 RequireObjectCoercible(argument)\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n","// Thank's IE8 for his funny defineProperty\nmodule.exports = !require('./_fails')(function () {\n return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;\n});\n","var isObject = require('./_is-object');\nvar document = require('./_global').document;\n// typeof document.createElement is 'object' in old IE\nvar is = isObject(document) && isObject(document.createElement);\nmodule.exports = function (it) {\n return is ? document.createElement(it) : {};\n};\n","// IE 8- don't enum bug keys\nmodule.exports = (\n 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'\n).split(',');\n","// all enumerable object keys, includes symbols\nvar getKeys = require('./_object-keys');\nvar gOPS = require('./_object-gops');\nvar pIE = require('./_object-pie');\nmodule.exports = function (it) {\n var result = getKeys(it);\n var getSymbols = gOPS.f;\n if (getSymbols) {\n var symbols = getSymbols(it);\n var isEnum = pIE.f;\n var i = 0;\n var key;\n while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);\n } return result;\n};\n","var global = require('./_global');\nvar core = require('./_core');\nvar hide = require('./_hide');\nvar redefine = require('./_redefine');\nvar ctx = require('./_ctx');\nvar PROTOTYPE = 'prototype';\n\nvar $export = function (type, name, source) {\n var IS_FORCED = type & $export.F;\n var IS_GLOBAL = type & $export.G;\n var IS_STATIC = type & $export.S;\n var IS_PROTO = type & $export.P;\n var IS_BIND = type & $export.B;\n var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE];\n var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});\n var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {});\n var key, own, out, exp;\n if (IS_GLOBAL) source = name;\n for (key in source) {\n // contains in native\n own = !IS_FORCED && target && target[key] !== undefined;\n // export native or passed\n out = (own ? target : source)[key];\n // bind timers to global for call from export context\n exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n // extend global\n if (target) redefine(target, key, out, type & $export.U);\n // export\n if (exports[key] != out) hide(exports, key, exp);\n if (IS_PROTO && expProto[key] != out) expProto[key] = out;\n }\n};\nglobal.core = core;\n// type bitmap\n$export.F = 1; // forced\n$export.G = 2; // global\n$export.S = 4; // static\n$export.P = 8; // proto\n$export.B = 16; // bind\n$export.W = 32; // wrap\n$export.U = 64; // safe\n$export.R = 128; // real proto method for `library`\nmodule.exports = $export;\n","var MATCH = require('./_wks')('match');\nmodule.exports = function (KEY) {\n var re = /./;\n try {\n '/./'[KEY](re);\n } catch (e) {\n try {\n re[MATCH] = false;\n return !'/./'[KEY](re);\n } catch (f) { /* empty */ }\n } return true;\n};\n","module.exports = function (exec) {\n try {\n return !!exec();\n } catch (e) {\n return true;\n }\n};\n","'use strict';\nvar hide = require('./_hide');\nvar redefine = require('./_redefine');\nvar fails = require('./_fails');\nvar defined = require('./_defined');\nvar wks = require('./_wks');\n\nmodule.exports = function (KEY, length, exec) {\n var SYMBOL = wks(KEY);\n var fns = exec(defined, SYMBOL, ''[KEY]);\n var strfn = fns[0];\n var rxfn = fns[1];\n if (fails(function () {\n var O = {};\n O[SYMBOL] = function () { return 7; };\n return ''[KEY](O) != 7;\n })) {\n redefine(String.prototype, KEY, strfn);\n hide(RegExp.prototype, SYMBOL, length == 2\n // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)\n // 21.2.5.11 RegExp.prototype[@@split](string, limit)\n ? function (string, arg) { return rxfn.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) { return rxfn.call(string, this); }\n );\n }\n};\n","'use strict';\n// 21.2.5.3 get RegExp.prototype.flags\nvar anObject = require('./_an-object');\nmodule.exports = function () {\n var that = anObject(this);\n var result = '';\n if (that.global) result += 'g';\n if (that.ignoreCase) result += 'i';\n if (that.multiline) result += 'm';\n if (that.unicode) result += 'u';\n if (that.sticky) result += 'y';\n return result;\n};\n","var ctx = require('./_ctx');\nvar call = require('./_iter-call');\nvar isArrayIter = require('./_is-array-iter');\nvar anObject = require('./_an-object');\nvar toLength = require('./_to-length');\nvar getIterFn = require('./core.get-iterator-method');\nvar BREAK = {};\nvar RETURN = {};\nvar exports = module.exports = function (iterable, entries, fn, that, ITERATOR) {\n var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable);\n var f = ctx(fn, that, entries ? 2 : 1);\n var index = 0;\n var length, step, iterator, result;\n if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!');\n // fast case for arrays with default iterator\n if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) {\n result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);\n if (result === BREAK || result === RETURN) return result;\n } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) {\n result = call(iterator, f, step.value, entries);\n if (result === BREAK || result === RETURN) return result;\n }\n};\nexports.BREAK = BREAK;\nexports.RETURN = RETURN;\n","// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n ? window : typeof self != 'undefined' && self.Math == Math ? self\n // eslint-disable-next-line no-new-func\n : Function('return this')();\nif (typeof __g == 'number') __g = global; // eslint-disable-line no-undef\n","var hasOwnProperty = {}.hasOwnProperty;\nmodule.exports = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n","var dP = require('./_object-dp');\nvar createDesc = require('./_property-desc');\nmodule.exports = require('./_descriptors') ? function (object, key, value) {\n return dP.f(object, key, createDesc(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n","var document = require('./_global').document;\nmodule.exports = document && document.documentElement;\n","module.exports = !require('./_descriptors') && !require('./_fails')(function () {\n return Object.defineProperty(require('./_dom-create')('div'), 'a', { get: function () { return 7; } }).a != 7;\n});\n","var isObject = require('./_is-object');\nvar setPrototypeOf = require('./_set-proto').set;\nmodule.exports = function (that, target, C) {\n var S = target.constructor;\n var P;\n if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) {\n setPrototypeOf(that, P);\n } return that;\n};\n","// fast apply, http://jsperf.lnkit.com/fast-apply/5\nmodule.exports = function (fn, args, that) {\n var un = that === undefined;\n switch (args.length) {\n case 0: return un ? fn()\n : fn.call(that);\n case 1: return un ? fn(args[0])\n : fn.call(that, args[0]);\n case 2: return un ? fn(args[0], args[1])\n : fn.call(that, args[0], args[1]);\n case 3: return un ? fn(args[0], args[1], args[2])\n : fn.call(that, args[0], args[1], args[2]);\n case 4: return un ? fn(args[0], args[1], args[2], args[3])\n : fn.call(that, args[0], args[1], args[2], args[3]);\n } return fn.apply(that, args);\n};\n","// fallback for non-array-like ES3 and non-enumerable old V8 strings\nvar cof = require('./_cof');\n// eslint-disable-next-line no-prototype-builtins\nmodule.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {\n return cof(it) == 'String' ? it.split('') : Object(it);\n};\n","// check on default Array iterator\nvar Iterators = require('./_iterators');\nvar ITERATOR = require('./_wks')('iterator');\nvar ArrayProto = Array.prototype;\n\nmodule.exports = function (it) {\n return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);\n};\n","// 7.2.2 IsArray(argument)\nvar cof = require('./_cof');\nmodule.exports = Array.isArray || function isArray(arg) {\n return cof(arg) == 'Array';\n};\n","// 20.1.2.3 Number.isInteger(number)\nvar isObject = require('./_is-object');\nvar floor = Math.floor;\nmodule.exports = function isInteger(it) {\n return !isObject(it) && isFinite(it) && floor(it) === it;\n};\n","module.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n","// 7.2.8 IsRegExp(argument)\nvar isObject = require('./_is-object');\nvar cof = require('./_cof');\nvar MATCH = require('./_wks')('match');\nmodule.exports = function (it) {\n var isRegExp;\n return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp');\n};\n","// call something on iterator step with safe closing on error\nvar anObject = require('./_an-object');\nmodule.exports = function (iterator, fn, value, entries) {\n try {\n return entries ? fn(anObject(value)[0], value[1]) : fn(value);\n // 7.4.6 IteratorClose(iterator, completion)\n } catch (e) {\n var ret = iterator['return'];\n if (ret !== undefined) anObject(ret.call(iterator));\n throw e;\n }\n};\n","'use strict';\nvar create = require('./_object-create');\nvar descriptor = require('./_property-desc');\nvar setToStringTag = require('./_set-to-string-tag');\nvar IteratorPrototype = {};\n\n// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\nrequire('./_hide')(IteratorPrototype, require('./_wks')('iterator'), function () { return this; });\n\nmodule.exports = function (Constructor, NAME, next) {\n Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });\n setToStringTag(Constructor, NAME + ' Iterator');\n};\n","'use strict';\nvar LIBRARY = require('./_library');\nvar $export = require('./_export');\nvar redefine = require('./_redefine');\nvar hide = require('./_hide');\nvar Iterators = require('./_iterators');\nvar $iterCreate = require('./_iter-create');\nvar setToStringTag = require('./_set-to-string-tag');\nvar getPrototypeOf = require('./_object-gpo');\nvar ITERATOR = require('./_wks')('iterator');\nvar BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`\nvar FF_ITERATOR = '@@iterator';\nvar KEYS = 'keys';\nvar VALUES = 'values';\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {\n $iterCreate(Constructor, NAME, next);\n var getMethod = function (kind) {\n if (!BUGGY && kind in proto) return proto[kind];\n switch (kind) {\n case KEYS: return function keys() { return new Constructor(this, kind); };\n case VALUES: return function values() { return new Constructor(this, kind); };\n } return function entries() { return new Constructor(this, kind); };\n };\n var TAG = NAME + ' Iterator';\n var DEF_VALUES = DEFAULT == VALUES;\n var VALUES_BUG = false;\n var proto = Base.prototype;\n var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];\n var $default = $native || getMethod(DEFAULT);\n var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;\n var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;\n var methods, key, IteratorPrototype;\n // Fix native\n if ($anyNative) {\n IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));\n if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {\n // Set @@toStringTag to native iterators\n setToStringTag(IteratorPrototype, TAG, true);\n // fix for some old engines\n if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis);\n }\n }\n // fix Array#{values, @@iterator}.name in V8 / FF\n if (DEF_VALUES && $native && $native.name !== VALUES) {\n VALUES_BUG = true;\n $default = function values() { return $native.call(this); };\n }\n // Define iterator\n if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {\n hide(proto, ITERATOR, $default);\n }\n // Plug for library\n Iterators[NAME] = $default;\n Iterators[TAG] = returnThis;\n if (DEFAULT) {\n methods = {\n values: DEF_VALUES ? $default : getMethod(VALUES),\n keys: IS_SET ? $default : getMethod(KEYS),\n entries: $entries\n };\n if (FORCED) for (key in methods) {\n if (!(key in proto)) redefine(proto, key, methods[key]);\n } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);\n }\n return methods;\n};\n","var ITERATOR = require('./_wks')('iterator');\nvar SAFE_CLOSING = false;\n\ntry {\n var riter = [7][ITERATOR]();\n riter['return'] = function () { SAFE_CLOSING = true; };\n // eslint-disable-next-line no-throw-literal\n Array.from(riter, function () { throw 2; });\n} catch (e) { /* empty */ }\n\nmodule.exports = function (exec, skipClosing) {\n if (!skipClosing && !SAFE_CLOSING) return false;\n var safe = false;\n try {\n var arr = [7];\n var iter = arr[ITERATOR]();\n iter.next = function () { return { done: safe = true }; };\n arr[ITERATOR] = function () { return iter; };\n exec(arr);\n } catch (e) { /* empty */ }\n return safe;\n};\n","module.exports = function (done, value) {\n return { value: value, done: !!done };\n};\n","module.exports = {};\n","module.exports = false;\n","// 20.2.2.14 Math.expm1(x)\nvar $expm1 = Math.expm1;\nmodule.exports = (!$expm1\n // Old FF bug\n || $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168\n // Tor Browser bug\n || $expm1(-2e-17) != -2e-17\n) ? function expm1(x) {\n return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1;\n} : $expm1;\n","// 20.2.2.16 Math.fround(x)\nvar sign = require('./_math-sign');\nvar pow = Math.pow;\nvar EPSILON = pow(2, -52);\nvar EPSILON32 = pow(2, -23);\nvar MAX32 = pow(2, 127) * (2 - EPSILON32);\nvar MIN32 = pow(2, -126);\n\nvar roundTiesToEven = function (n) {\n return n + 1 / EPSILON - 1 / EPSILON;\n};\n\nmodule.exports = Math.fround || function fround(x) {\n var $abs = Math.abs(x);\n var $sign = sign(x);\n var a, result;\n if ($abs < MIN32) return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32;\n a = (1 + EPSILON32 / EPSILON) * $abs;\n result = a - (a - $abs);\n // eslint-disable-next-line no-self-compare\n if (result > MAX32 || result != result) return $sign * Infinity;\n return $sign * result;\n};\n","// 20.2.2.20 Math.log1p(x)\nmodule.exports = Math.log1p || function log1p(x) {\n return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : Math.log(1 + x);\n};\n","// 20.2.2.28 Math.sign(x)\nmodule.exports = Math.sign || function sign(x) {\n // eslint-disable-next-line no-self-compare\n return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1;\n};\n","var META = require('./_uid')('meta');\nvar isObject = require('./_is-object');\nvar has = require('./_has');\nvar setDesc = require('./_object-dp').f;\nvar id = 0;\nvar isExtensible = Object.isExtensible || function () {\n return true;\n};\nvar FREEZE = !require('./_fails')(function () {\n return isExtensible(Object.preventExtensions({}));\n});\nvar setMeta = function (it) {\n setDesc(it, META, { value: {\n i: 'O' + ++id, // object ID\n w: {} // weak collections IDs\n } });\n};\nvar fastKey = function (it, create) {\n // return primitive with prefix\n if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\n if (!has(it, META)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return 'F';\n // not necessary to add metadata\n if (!create) return 'E';\n // add missing metadata\n setMeta(it);\n // return object ID\n } return it[META].i;\n};\nvar getWeak = function (it, create) {\n if (!has(it, META)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return true;\n // not necessary to add metadata\n if (!create) return false;\n // add missing metadata\n setMeta(it);\n // return hash weak collections IDs\n } return it[META].w;\n};\n// add metadata on freeze-family methods calling\nvar onFreeze = function (it) {\n if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it);\n return it;\n};\nvar meta = module.exports = {\n KEY: META,\n NEED: false,\n fastKey: fastKey,\n getWeak: getWeak,\n onFreeze: onFreeze\n};\n","var global = require('./_global');\nvar macrotask = require('./_task').set;\nvar Observer = global.MutationObserver || global.WebKitMutationObserver;\nvar process = global.process;\nvar Promise = global.Promise;\nvar isNode = require('./_cof')(process) == 'process';\n\nmodule.exports = function () {\n var head, last, notify;\n\n var flush = function () {\n var parent, fn;\n if (isNode && (parent = process.domain)) parent.exit();\n while (head) {\n fn = head.fn;\n head = head.next;\n try {\n fn();\n } catch (e) {\n if (head) notify();\n else last = undefined;\n throw e;\n }\n } last = undefined;\n if (parent) parent.enter();\n };\n\n // Node.js\n if (isNode) {\n notify = function () {\n process.nextTick(flush);\n };\n // browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339\n } else if (Observer && !(global.navigator && global.navigator.standalone)) {\n var toggle = true;\n var node = document.createTextNode('');\n new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new\n notify = function () {\n node.data = toggle = !toggle;\n };\n // environments with maybe non-completely correct, but existent Promise\n } else if (Promise && Promise.resolve) {\n // Promise.resolve without an argument throws an error in LG WebOS 2\n var promise = Promise.resolve(undefined);\n notify = function () {\n promise.then(flush);\n };\n // for other environments - macrotask based on:\n // - setImmediate\n // - MessageChannel\n // - window.postMessag\n // - onreadystatechange\n // - setTimeout\n } else {\n notify = function () {\n // strange IE + webpack dev server bug - use .call(global)\n macrotask.call(global, flush);\n };\n }\n\n return function (fn) {\n var task = { fn: fn, next: undefined };\n if (last) last.next = task;\n if (!head) {\n head = task;\n notify();\n } last = task;\n };\n};\n","'use strict';\n// 25.4.1.5 NewPromiseCapability(C)\nvar aFunction = require('./_a-function');\n\nfunction PromiseCapability(C) {\n var resolve, reject;\n this.promise = new C(function ($$resolve, $$reject) {\n if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');\n resolve = $$resolve;\n reject = $$reject;\n });\n this.resolve = aFunction(resolve);\n this.reject = aFunction(reject);\n}\n\nmodule.exports.f = function (C) {\n return new PromiseCapability(C);\n};\n","'use strict';\n// 19.1.2.1 Object.assign(target, source, ...)\nvar getKeys = require('./_object-keys');\nvar gOPS = require('./_object-gops');\nvar pIE = require('./_object-pie');\nvar toObject = require('./_to-object');\nvar IObject = require('./_iobject');\nvar $assign = Object.assign;\n\n// should work with symbols and should have deterministic property order (V8 bug)\nmodule.exports = !$assign || require('./_fails')(function () {\n var A = {};\n var B = {};\n // eslint-disable-next-line no-undef\n var S = Symbol();\n var K = 'abcdefghijklmnopqrst';\n A[S] = 7;\n K.split('').forEach(function (k) { B[k] = k; });\n return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;\n}) ? function assign(target, source) { // eslint-disable-line no-unused-vars\n var T = toObject(target);\n var aLen = arguments.length;\n var index = 1;\n var getSymbols = gOPS.f;\n var isEnum = pIE.f;\n while (aLen > index) {\n var S = IObject(arguments[index++]);\n var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);\n var length = keys.length;\n var j = 0;\n var key;\n while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key];\n } return T;\n} : $assign;\n","// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\nvar anObject = require('./_an-object');\nvar dPs = require('./_object-dps');\nvar enumBugKeys = require('./_enum-bug-keys');\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\nvar Empty = function () { /* empty */ };\nvar PROTOTYPE = 'prototype';\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar createDict = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = require('./_dom-create')('iframe');\n var i = enumBugKeys.length;\n var lt = '<';\n var gt = '>';\n var iframeDocument;\n iframe.style.display = 'none';\n require('./_html').appendChild(iframe);\n iframe.src = 'javascript:'; // eslint-disable-line no-script-url\n // createDict = iframe.contentWindow.Object;\n // html.removeChild(iframe);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);\n iframeDocument.close();\n createDict = iframeDocument.F;\n while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];\n return createDict();\n};\n\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n Empty[PROTOTYPE] = anObject(O);\n result = new Empty();\n Empty[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = createDict();\n return Properties === undefined ? result : dPs(result, Properties);\n};\n","var anObject = require('./_an-object');\nvar IE8_DOM_DEFINE = require('./_ie8-dom-define');\nvar toPrimitive = require('./_to-primitive');\nvar dP = Object.defineProperty;\n\nexports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return dP(O, P, Attributes);\n } catch (e) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n","var dP = require('./_object-dp');\nvar anObject = require('./_an-object');\nvar getKeys = require('./_object-keys');\n\nmodule.exports = require('./_descriptors') ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var keys = getKeys(Properties);\n var length = keys.length;\n var i = 0;\n var P;\n while (length > i) dP.f(O, P = keys[i++], Properties[P]);\n return O;\n};\n","var pIE = require('./_object-pie');\nvar createDesc = require('./_property-desc');\nvar toIObject = require('./_to-iobject');\nvar toPrimitive = require('./_to-primitive');\nvar has = require('./_has');\nvar IE8_DOM_DEFINE = require('./_ie8-dom-define');\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nexports.f = require('./_descriptors') ? gOPD : function getOwnPropertyDescriptor(O, P) {\n O = toIObject(O);\n P = toPrimitive(P, true);\n if (IE8_DOM_DEFINE) try {\n return gOPD(O, P);\n } catch (e) { /* empty */ }\n if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);\n};\n","// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\nvar toIObject = require('./_to-iobject');\nvar gOPN = require('./_object-gopn').f;\nvar toString = {}.toString;\n\nvar windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames\n ? Object.getOwnPropertyNames(window) : [];\n\nvar getWindowNames = function (it) {\n try {\n return gOPN(it);\n } catch (e) {\n return windowNames.slice();\n }\n};\n\nmodule.exports.f = function getOwnPropertyNames(it) {\n return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));\n};\n","// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)\nvar $keys = require('./_object-keys-internal');\nvar hiddenKeys = require('./_enum-bug-keys').concat('length', 'prototype');\n\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return $keys(O, hiddenKeys);\n};\n","exports.f = Object.getOwnPropertySymbols;\n","// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)\nvar has = require('./_has');\nvar toObject = require('./_to-object');\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\nvar ObjectProto = Object.prototype;\n\nmodule.exports = Object.getPrototypeOf || function (O) {\n O = toObject(O);\n if (has(O, IE_PROTO)) return O[IE_PROTO];\n if (typeof O.constructor == 'function' && O instanceof O.constructor) {\n return O.constructor.prototype;\n } return O instanceof Object ? ObjectProto : null;\n};\n","var has = require('./_has');\nvar toIObject = require('./_to-iobject');\nvar arrayIndexOf = require('./_array-includes')(false);\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\n\nmodule.exports = function (object, names) {\n var O = toIObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (has(O, key = names[i++])) {\n ~arrayIndexOf(result, key) || result.push(key);\n }\n return result;\n};\n","// 19.1.2.14 / 15.2.3.14 Object.keys(O)\nvar $keys = require('./_object-keys-internal');\nvar enumBugKeys = require('./_enum-bug-keys');\n\nmodule.exports = Object.keys || function keys(O) {\n return $keys(O, enumBugKeys);\n};\n","exports.f = {}.propertyIsEnumerable;\n","// most Object methods by ES6 should accept primitives\nvar $export = require('./_export');\nvar core = require('./_core');\nvar fails = require('./_fails');\nmodule.exports = function (KEY, exec) {\n var fn = (core.Object || {})[KEY] || Object[KEY];\n var exp = {};\n exp[KEY] = exec(fn);\n $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp);\n};\n","var getKeys = require('./_object-keys');\nvar toIObject = require('./_to-iobject');\nvar isEnum = require('./_object-pie').f;\nmodule.exports = function (isEntries) {\n return function (it) {\n var O = toIObject(it);\n var keys = getKeys(O);\n var length = keys.length;\n var i = 0;\n var result = [];\n var key;\n while (length > i) if (isEnum.call(O, key = keys[i++])) {\n result.push(isEntries ? [key, O[key]] : O[key]);\n } return result;\n };\n};\n","// all object keys, includes non-enumerable and symbols\nvar gOPN = require('./_object-gopn');\nvar gOPS = require('./_object-gops');\nvar anObject = require('./_an-object');\nvar Reflect = require('./_global').Reflect;\nmodule.exports = Reflect && Reflect.ownKeys || function ownKeys(it) {\n var keys = gOPN.f(anObject(it));\n var getSymbols = gOPS.f;\n return getSymbols ? keys.concat(getSymbols(it)) : keys;\n};\n","var $parseFloat = require('./_global').parseFloat;\nvar $trim = require('./_string-trim').trim;\n\nmodule.exports = 1 / $parseFloat(require('./_string-ws') + '-0') !== -Infinity ? function parseFloat(str) {\n var string = $trim(String(str), 3);\n var result = $parseFloat(string);\n return result === 0 && string.charAt(0) == '-' ? -0 : result;\n} : $parseFloat;\n","var $parseInt = require('./_global').parseInt;\nvar $trim = require('./_string-trim').trim;\nvar ws = require('./_string-ws');\nvar hex = /^[-+]?0[xX]/;\n\nmodule.exports = $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 ? function parseInt(str, radix) {\n var string = $trim(String(str), 3);\n return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10));\n} : $parseInt;\n","module.exports = function (exec) {\n try {\n return { e: false, v: exec() };\n } catch (e) {\n return { e: true, v: e };\n }\n};\n","var anObject = require('./_an-object');\nvar isObject = require('./_is-object');\nvar newPromiseCapability = require('./_new-promise-capability');\n\nmodule.exports = function (C, x) {\n anObject(C);\n if (isObject(x) && x.constructor === C) return x;\n var promiseCapability = newPromiseCapability.f(C);\n var resolve = promiseCapability.resolve;\n resolve(x);\n return promiseCapability.promise;\n};\n","module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n","var redefine = require('./_redefine');\nmodule.exports = function (target, src, safe) {\n for (var key in src) redefine(target, key, src[key], safe);\n return target;\n};\n","var global = require('./_global');\nvar hide = require('./_hide');\nvar has = require('./_has');\nvar SRC = require('./_uid')('src');\nvar TO_STRING = 'toString';\nvar $toString = Function[TO_STRING];\nvar TPL = ('' + $toString).split(TO_STRING);\n\nrequire('./_core').inspectSource = function (it) {\n return $toString.call(it);\n};\n\n(module.exports = function (O, key, val, safe) {\n var isFunction = typeof val == 'function';\n if (isFunction) has(val, 'name') || hide(val, 'name', key);\n if (O[key] === val) return;\n if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));\n if (O === global) {\n O[key] = val;\n } else if (!safe) {\n delete O[key];\n hide(O, key, val);\n } else if (O[key]) {\n O[key] = val;\n } else {\n hide(O, key, val);\n }\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n})(Function.prototype, TO_STRING, function toString() {\n return typeof this == 'function' && this[SRC] || $toString.call(this);\n});\n","// 7.2.9 SameValue(x, y)\nmodule.exports = Object.is || function is(x, y) {\n // eslint-disable-next-line no-self-compare\n return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;\n};\n","// Works with __proto__ only. Old v8 can't work with null proto objects.\n/* eslint-disable no-proto */\nvar isObject = require('./_is-object');\nvar anObject = require('./_an-object');\nvar check = function (O, proto) {\n anObject(O);\n if (!isObject(proto) && proto !== null) throw TypeError(proto + \": can't set as prototype!\");\n};\nmodule.exports = {\n set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line\n function (test, buggy, set) {\n try {\n set = require('./_ctx')(Function.call, require('./_object-gopd').f(Object.prototype, '__proto__').set, 2);\n set(test, []);\n buggy = !(test instanceof Array);\n } catch (e) { buggy = true; }\n return function setPrototypeOf(O, proto) {\n check(O, proto);\n if (buggy) O.__proto__ = proto;\n else set(O, proto);\n return O;\n };\n }({}, false) : undefined),\n check: check\n};\n","'use strict';\nvar global = require('./_global');\nvar dP = require('./_object-dp');\nvar DESCRIPTORS = require('./_descriptors');\nvar SPECIES = require('./_wks')('species');\n\nmodule.exports = function (KEY) {\n var C = global[KEY];\n if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, {\n configurable: true,\n get: function () { return this; }\n });\n};\n","var def = require('./_object-dp').f;\nvar has = require('./_has');\nvar TAG = require('./_wks')('toStringTag');\n\nmodule.exports = function (it, tag, stat) {\n if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });\n};\n","var shared = require('./_shared')('keys');\nvar uid = require('./_uid');\nmodule.exports = function (key) {\n return shared[key] || (shared[key] = uid(key));\n};\n","var core = require('./_core');\nvar global = require('./_global');\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || (global[SHARED] = {});\n\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: core.version,\n mode: require('./_library') ? 'pure' : 'global',\n copyright: '© 2018 Denis Pushkarev (zloirock.ru)'\n});\n","// 7.3.20 SpeciesConstructor(O, defaultConstructor)\nvar anObject = require('./_an-object');\nvar aFunction = require('./_a-function');\nvar SPECIES = require('./_wks')('species');\nmodule.exports = function (O, D) {\n var C = anObject(O).constructor;\n var S;\n return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);\n};\n","'use strict';\nvar fails = require('./_fails');\n\nmodule.exports = function (method, arg) {\n return !!method && fails(function () {\n // eslint-disable-next-line no-useless-call\n arg ? method.call(null, function () { /* empty */ }, 1) : method.call(null);\n });\n};\n","var toInteger = require('./_to-integer');\nvar defined = require('./_defined');\n// true -> String#at\n// false -> String#codePointAt\nmodule.exports = function (TO_STRING) {\n return function (that, pos) {\n var s = String(defined(that));\n var i = toInteger(pos);\n var l = s.length;\n var a, b;\n if (i < 0 || i >= l) return TO_STRING ? '' : undefined;\n a = s.charCodeAt(i);\n return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff\n ? TO_STRING ? s.charAt(i) : a\n : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;\n };\n};\n","// helper for String#{startsWith, endsWith, includes}\nvar isRegExp = require('./_is-regexp');\nvar defined = require('./_defined');\n\nmodule.exports = function (that, searchString, NAME) {\n if (isRegExp(searchString)) throw TypeError('String#' + NAME + \" doesn't accept regex!\");\n return String(defined(that));\n};\n","var $export = require('./_export');\nvar fails = require('./_fails');\nvar defined = require('./_defined');\nvar quot = /\"/g;\n// B.2.3.2.1 CreateHTML(string, tag, attribute, value)\nvar createHTML = function (string, tag, attribute, value) {\n var S = String(defined(string));\n var p1 = '<' + tag;\n if (attribute !== '') p1 += ' ' + attribute + '=\"' + String(value).replace(quot, '"') + '\"';\n return p1 + '>' + S + '';\n};\nmodule.exports = function (NAME, exec) {\n var O = {};\n O[NAME] = exec(createHTML);\n $export($export.P + $export.F * fails(function () {\n var test = ''[NAME]('\"');\n return test !== test.toLowerCase() || test.split('\"').length > 3;\n }), 'String', O);\n};\n","// https://github.com/tc39/proposal-string-pad-start-end\nvar toLength = require('./_to-length');\nvar repeat = require('./_string-repeat');\nvar defined = require('./_defined');\n\nmodule.exports = function (that, maxLength, fillString, left) {\n var S = String(defined(that));\n var stringLength = S.length;\n var fillStr = fillString === undefined ? ' ' : String(fillString);\n var intMaxLength = toLength(maxLength);\n if (intMaxLength <= stringLength || fillStr == '') return S;\n var fillLen = intMaxLength - stringLength;\n var stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length));\n if (stringFiller.length > fillLen) stringFiller = stringFiller.slice(0, fillLen);\n return left ? stringFiller + S : S + stringFiller;\n};\n","'use strict';\nvar toInteger = require('./_to-integer');\nvar defined = require('./_defined');\n\nmodule.exports = function repeat(count) {\n var str = String(defined(this));\n var res = '';\n var n = toInteger(count);\n if (n < 0 || n == Infinity) throw RangeError(\"Count can't be negative\");\n for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) res += str;\n return res;\n};\n","var $export = require('./_export');\nvar defined = require('./_defined');\nvar fails = require('./_fails');\nvar spaces = require('./_string-ws');\nvar space = '[' + spaces + ']';\nvar non = '\\u200b\\u0085';\nvar ltrim = RegExp('^' + space + space + '*');\nvar rtrim = RegExp(space + space + '*$');\n\nvar exporter = function (KEY, exec, ALIAS) {\n var exp = {};\n var FORCE = fails(function () {\n return !!spaces[KEY]() || non[KEY]() != non;\n });\n var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY];\n if (ALIAS) exp[ALIAS] = fn;\n $export($export.P + $export.F * FORCE, 'String', exp);\n};\n\n// 1 -> String#trimLeft\n// 2 -> String#trimRight\n// 3 -> String#trim\nvar trim = exporter.trim = function (string, TYPE) {\n string = String(defined(string));\n if (TYPE & 1) string = string.replace(ltrim, '');\n if (TYPE & 2) string = string.replace(rtrim, '');\n return string;\n};\n\nmodule.exports = exporter;\n","module.exports = '\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003' +\n '\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF';\n","var ctx = require('./_ctx');\nvar invoke = require('./_invoke');\nvar html = require('./_html');\nvar cel = require('./_dom-create');\nvar global = require('./_global');\nvar process = global.process;\nvar setTask = global.setImmediate;\nvar clearTask = global.clearImmediate;\nvar MessageChannel = global.MessageChannel;\nvar Dispatch = global.Dispatch;\nvar counter = 0;\nvar queue = {};\nvar ONREADYSTATECHANGE = 'onreadystatechange';\nvar defer, channel, port;\nvar run = function () {\n var id = +this;\n // eslint-disable-next-line no-prototype-builtins\n if (queue.hasOwnProperty(id)) {\n var fn = queue[id];\n delete queue[id];\n fn();\n }\n};\nvar listener = function (event) {\n run.call(event.data);\n};\n// Node.js 0.9+ & IE10+ has setImmediate, otherwise:\nif (!setTask || !clearTask) {\n setTask = function setImmediate(fn) {\n var args = [];\n var i = 1;\n while (arguments.length > i) args.push(arguments[i++]);\n queue[++counter] = function () {\n // eslint-disable-next-line no-new-func\n invoke(typeof fn == 'function' ? fn : Function(fn), args);\n };\n defer(counter);\n return counter;\n };\n clearTask = function clearImmediate(id) {\n delete queue[id];\n };\n // Node.js 0.8-\n if (require('./_cof')(process) == 'process') {\n defer = function (id) {\n process.nextTick(ctx(run, id, 1));\n };\n // Sphere (JS game engine) Dispatch API\n } else if (Dispatch && Dispatch.now) {\n defer = function (id) {\n Dispatch.now(ctx(run, id, 1));\n };\n // Browsers with MessageChannel, includes WebWorkers\n } else if (MessageChannel) {\n channel = new MessageChannel();\n port = channel.port2;\n channel.port1.onmessage = listener;\n defer = ctx(port.postMessage, port, 1);\n // Browsers with postMessage, skip WebWorkers\n // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'\n } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) {\n defer = function (id) {\n global.postMessage(id + '', '*');\n };\n global.addEventListener('message', listener, false);\n // IE8-\n } else if (ONREADYSTATECHANGE in cel('script')) {\n defer = function (id) {\n html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () {\n html.removeChild(this);\n run.call(id);\n };\n };\n // Rest old browsers\n } else {\n defer = function (id) {\n setTimeout(ctx(run, id, 1), 0);\n };\n }\n}\nmodule.exports = {\n set: setTask,\n clear: clearTask\n};\n","var toInteger = require('./_to-integer');\nvar max = Math.max;\nvar min = Math.min;\nmodule.exports = function (index, length) {\n index = toInteger(index);\n return index < 0 ? max(index + length, 0) : min(index, length);\n};\n","// https://tc39.github.io/ecma262/#sec-toindex\nvar toInteger = require('./_to-integer');\nvar toLength = require('./_to-length');\nmodule.exports = function (it) {\n if (it === undefined) return 0;\n var number = toInteger(it);\n var length = toLength(number);\n if (number !== length) throw RangeError('Wrong length!');\n return length;\n};\n","// 7.1.4 ToInteger\nvar ceil = Math.ceil;\nvar floor = Math.floor;\nmodule.exports = function (it) {\n return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);\n};\n","// to indexed object, toObject with fallback for non-array-like ES3 strings\nvar IObject = require('./_iobject');\nvar defined = require('./_defined');\nmodule.exports = function (it) {\n return IObject(defined(it));\n};\n","// 7.1.15 ToLength\nvar toInteger = require('./_to-integer');\nvar min = Math.min;\nmodule.exports = function (it) {\n return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991\n};\n","// 7.1.13 ToObject(argument)\nvar defined = require('./_defined');\nmodule.exports = function (it) {\n return Object(defined(it));\n};\n","// 7.1.1 ToPrimitive(input [, PreferredType])\nvar isObject = require('./_is-object');\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (it, S) {\n if (!isObject(it)) return it;\n var fn, val;\n if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;\n if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n","'use strict';\nif (require('./_descriptors')) {\n var LIBRARY = require('./_library');\n var global = require('./_global');\n var fails = require('./_fails');\n var $export = require('./_export');\n var $typed = require('./_typed');\n var $buffer = require('./_typed-buffer');\n var ctx = require('./_ctx');\n var anInstance = require('./_an-instance');\n var propertyDesc = require('./_property-desc');\n var hide = require('./_hide');\n var redefineAll = require('./_redefine-all');\n var toInteger = require('./_to-integer');\n var toLength = require('./_to-length');\n var toIndex = require('./_to-index');\n var toAbsoluteIndex = require('./_to-absolute-index');\n var toPrimitive = require('./_to-primitive');\n var has = require('./_has');\n var classof = require('./_classof');\n var isObject = require('./_is-object');\n var toObject = require('./_to-object');\n var isArrayIter = require('./_is-array-iter');\n var create = require('./_object-create');\n var getPrototypeOf = require('./_object-gpo');\n var gOPN = require('./_object-gopn').f;\n var getIterFn = require('./core.get-iterator-method');\n var uid = require('./_uid');\n var wks = require('./_wks');\n var createArrayMethod = require('./_array-methods');\n var createArrayIncludes = require('./_array-includes');\n var speciesConstructor = require('./_species-constructor');\n var ArrayIterators = require('./es6.array.iterator');\n var Iterators = require('./_iterators');\n var $iterDetect = require('./_iter-detect');\n var setSpecies = require('./_set-species');\n var arrayFill = require('./_array-fill');\n var arrayCopyWithin = require('./_array-copy-within');\n var $DP = require('./_object-dp');\n var $GOPD = require('./_object-gopd');\n var dP = $DP.f;\n var gOPD = $GOPD.f;\n var RangeError = global.RangeError;\n var TypeError = global.TypeError;\n var Uint8Array = global.Uint8Array;\n var ARRAY_BUFFER = 'ArrayBuffer';\n var SHARED_BUFFER = 'Shared' + ARRAY_BUFFER;\n var BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT';\n var PROTOTYPE = 'prototype';\n var ArrayProto = Array[PROTOTYPE];\n var $ArrayBuffer = $buffer.ArrayBuffer;\n var $DataView = $buffer.DataView;\n var arrayForEach = createArrayMethod(0);\n var arrayFilter = createArrayMethod(2);\n var arraySome = createArrayMethod(3);\n var arrayEvery = createArrayMethod(4);\n var arrayFind = createArrayMethod(5);\n var arrayFindIndex = createArrayMethod(6);\n var arrayIncludes = createArrayIncludes(true);\n var arrayIndexOf = createArrayIncludes(false);\n var arrayValues = ArrayIterators.values;\n var arrayKeys = ArrayIterators.keys;\n var arrayEntries = ArrayIterators.entries;\n var arrayLastIndexOf = ArrayProto.lastIndexOf;\n var arrayReduce = ArrayProto.reduce;\n var arrayReduceRight = ArrayProto.reduceRight;\n var arrayJoin = ArrayProto.join;\n var arraySort = ArrayProto.sort;\n var arraySlice = ArrayProto.slice;\n var arrayToString = ArrayProto.toString;\n var arrayToLocaleString = ArrayProto.toLocaleString;\n var ITERATOR = wks('iterator');\n var TAG = wks('toStringTag');\n var TYPED_CONSTRUCTOR = uid('typed_constructor');\n var DEF_CONSTRUCTOR = uid('def_constructor');\n var ALL_CONSTRUCTORS = $typed.CONSTR;\n var TYPED_ARRAY = $typed.TYPED;\n var VIEW = $typed.VIEW;\n var WRONG_LENGTH = 'Wrong length!';\n\n var $map = createArrayMethod(1, function (O, length) {\n return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length);\n });\n\n var LITTLE_ENDIAN = fails(function () {\n // eslint-disable-next-line no-undef\n return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1;\n });\n\n var FORCED_SET = !!Uint8Array && !!Uint8Array[PROTOTYPE].set && fails(function () {\n new Uint8Array(1).set({});\n });\n\n var toOffset = function (it, BYTES) {\n var offset = toInteger(it);\n if (offset < 0 || offset % BYTES) throw RangeError('Wrong offset!');\n return offset;\n };\n\n var validate = function (it) {\n if (isObject(it) && TYPED_ARRAY in it) return it;\n throw TypeError(it + ' is not a typed array!');\n };\n\n var allocate = function (C, length) {\n if (!(isObject(C) && TYPED_CONSTRUCTOR in C)) {\n throw TypeError('It is not a typed array constructor!');\n } return new C(length);\n };\n\n var speciesFromList = function (O, list) {\n return fromList(speciesConstructor(O, O[DEF_CONSTRUCTOR]), list);\n };\n\n var fromList = function (C, list) {\n var index = 0;\n var length = list.length;\n var result = allocate(C, length);\n while (length > index) result[index] = list[index++];\n return result;\n };\n\n var addGetter = function (it, key, internal) {\n dP(it, key, { get: function () { return this._d[internal]; } });\n };\n\n var $from = function from(source /* , mapfn, thisArg */) {\n var O = toObject(source);\n var aLen = arguments.length;\n var mapfn = aLen > 1 ? arguments[1] : undefined;\n var mapping = mapfn !== undefined;\n var iterFn = getIterFn(O);\n var i, length, values, result, step, iterator;\n if (iterFn != undefined && !isArrayIter(iterFn)) {\n for (iterator = iterFn.call(O), values = [], i = 0; !(step = iterator.next()).done; i++) {\n values.push(step.value);\n } O = values;\n }\n if (mapping && aLen > 2) mapfn = ctx(mapfn, arguments[2], 2);\n for (i = 0, length = toLength(O.length), result = allocate(this, length); length > i; i++) {\n result[i] = mapping ? mapfn(O[i], i) : O[i];\n }\n return result;\n };\n\n var $of = function of(/* ...items */) {\n var index = 0;\n var length = arguments.length;\n var result = allocate(this, length);\n while (length > index) result[index] = arguments[index++];\n return result;\n };\n\n // iOS Safari 6.x fails here\n var TO_LOCALE_BUG = !!Uint8Array && fails(function () { arrayToLocaleString.call(new Uint8Array(1)); });\n\n var $toLocaleString = function toLocaleString() {\n return arrayToLocaleString.apply(TO_LOCALE_BUG ? arraySlice.call(validate(this)) : validate(this), arguments);\n };\n\n var proto = {\n copyWithin: function copyWithin(target, start /* , end */) {\n return arrayCopyWithin.call(validate(this), target, start, arguments.length > 2 ? arguments[2] : undefined);\n },\n every: function every(callbackfn /* , thisArg */) {\n return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n },\n fill: function fill(value /* , start, end */) { // eslint-disable-line no-unused-vars\n return arrayFill.apply(validate(this), arguments);\n },\n filter: function filter(callbackfn /* , thisArg */) {\n return speciesFromList(this, arrayFilter(validate(this), callbackfn,\n arguments.length > 1 ? arguments[1] : undefined));\n },\n find: function find(predicate /* , thisArg */) {\n return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined);\n },\n findIndex: function findIndex(predicate /* , thisArg */) {\n return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined);\n },\n forEach: function forEach(callbackfn /* , thisArg */) {\n arrayForEach(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n },\n indexOf: function indexOf(searchElement /* , fromIndex */) {\n return arrayIndexOf(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);\n },\n includes: function includes(searchElement /* , fromIndex */) {\n return arrayIncludes(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);\n },\n join: function join(separator) { // eslint-disable-line no-unused-vars\n return arrayJoin.apply(validate(this), arguments);\n },\n lastIndexOf: function lastIndexOf(searchElement /* , fromIndex */) { // eslint-disable-line no-unused-vars\n return arrayLastIndexOf.apply(validate(this), arguments);\n },\n map: function map(mapfn /* , thisArg */) {\n return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined);\n },\n reduce: function reduce(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars\n return arrayReduce.apply(validate(this), arguments);\n },\n reduceRight: function reduceRight(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars\n return arrayReduceRight.apply(validate(this), arguments);\n },\n reverse: function reverse() {\n var that = this;\n var length = validate(that).length;\n var middle = Math.floor(length / 2);\n var index = 0;\n var value;\n while (index < middle) {\n value = that[index];\n that[index++] = that[--length];\n that[length] = value;\n } return that;\n },\n some: function some(callbackfn /* , thisArg */) {\n return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n },\n sort: function sort(comparefn) {\n return arraySort.call(validate(this), comparefn);\n },\n subarray: function subarray(begin, end) {\n var O = validate(this);\n var length = O.length;\n var $begin = toAbsoluteIndex(begin, length);\n return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))(\n O.buffer,\n O.byteOffset + $begin * O.BYTES_PER_ELEMENT,\n toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - $begin)\n );\n }\n };\n\n var $slice = function slice(start, end) {\n return speciesFromList(this, arraySlice.call(validate(this), start, end));\n };\n\n var $set = function set(arrayLike /* , offset */) {\n validate(this);\n var offset = toOffset(arguments[1], 1);\n var length = this.length;\n var src = toObject(arrayLike);\n var len = toLength(src.length);\n var index = 0;\n if (len + offset > length) throw RangeError(WRONG_LENGTH);\n while (index < len) this[offset + index] = src[index++];\n };\n\n var $iterators = {\n entries: function entries() {\n return arrayEntries.call(validate(this));\n },\n keys: function keys() {\n return arrayKeys.call(validate(this));\n },\n values: function values() {\n return arrayValues.call(validate(this));\n }\n };\n\n var isTAIndex = function (target, key) {\n return isObject(target)\n && target[TYPED_ARRAY]\n && typeof key != 'symbol'\n && key in target\n && String(+key) == String(key);\n };\n var $getDesc = function getOwnPropertyDescriptor(target, key) {\n return isTAIndex(target, key = toPrimitive(key, true))\n ? propertyDesc(2, target[key])\n : gOPD(target, key);\n };\n var $setDesc = function defineProperty(target, key, desc) {\n if (isTAIndex(target, key = toPrimitive(key, true))\n && isObject(desc)\n && has(desc, 'value')\n && !has(desc, 'get')\n && !has(desc, 'set')\n // TODO: add validation descriptor w/o calling accessors\n && !desc.configurable\n && (!has(desc, 'writable') || desc.writable)\n && (!has(desc, 'enumerable') || desc.enumerable)\n ) {\n target[key] = desc.value;\n return target;\n } return dP(target, key, desc);\n };\n\n if (!ALL_CONSTRUCTORS) {\n $GOPD.f = $getDesc;\n $DP.f = $setDesc;\n }\n\n $export($export.S + $export.F * !ALL_CONSTRUCTORS, 'Object', {\n getOwnPropertyDescriptor: $getDesc,\n defineProperty: $setDesc\n });\n\n if (fails(function () { arrayToString.call({}); })) {\n arrayToString = arrayToLocaleString = function toString() {\n return arrayJoin.call(this);\n };\n }\n\n var $TypedArrayPrototype$ = redefineAll({}, proto);\n redefineAll($TypedArrayPrototype$, $iterators);\n hide($TypedArrayPrototype$, ITERATOR, $iterators.values);\n redefineAll($TypedArrayPrototype$, {\n slice: $slice,\n set: $set,\n constructor: function () { /* noop */ },\n toString: arrayToString,\n toLocaleString: $toLocaleString\n });\n addGetter($TypedArrayPrototype$, 'buffer', 'b');\n addGetter($TypedArrayPrototype$, 'byteOffset', 'o');\n addGetter($TypedArrayPrototype$, 'byteLength', 'l');\n addGetter($TypedArrayPrototype$, 'length', 'e');\n dP($TypedArrayPrototype$, TAG, {\n get: function () { return this[TYPED_ARRAY]; }\n });\n\n // eslint-disable-next-line max-statements\n module.exports = function (KEY, BYTES, wrapper, CLAMPED) {\n CLAMPED = !!CLAMPED;\n var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array';\n var GETTER = 'get' + KEY;\n var SETTER = 'set' + KEY;\n var TypedArray = global[NAME];\n var Base = TypedArray || {};\n var TAC = TypedArray && getPrototypeOf(TypedArray);\n var FORCED = !TypedArray || !$typed.ABV;\n var O = {};\n var TypedArrayPrototype = TypedArray && TypedArray[PROTOTYPE];\n var getter = function (that, index) {\n var data = that._d;\n return data.v[GETTER](index * BYTES + data.o, LITTLE_ENDIAN);\n };\n var setter = function (that, index, value) {\n var data = that._d;\n if (CLAMPED) value = (value = Math.round(value)) < 0 ? 0 : value > 0xff ? 0xff : value & 0xff;\n data.v[SETTER](index * BYTES + data.o, value, LITTLE_ENDIAN);\n };\n var addElement = function (that, index) {\n dP(that, index, {\n get: function () {\n return getter(this, index);\n },\n set: function (value) {\n return setter(this, index, value);\n },\n enumerable: true\n });\n };\n if (FORCED) {\n TypedArray = wrapper(function (that, data, $offset, $length) {\n anInstance(that, TypedArray, NAME, '_d');\n var index = 0;\n var offset = 0;\n var buffer, byteLength, length, klass;\n if (!isObject(data)) {\n length = toIndex(data);\n byteLength = length * BYTES;\n buffer = new $ArrayBuffer(byteLength);\n } else if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) {\n buffer = data;\n offset = toOffset($offset, BYTES);\n var $len = data.byteLength;\n if ($length === undefined) {\n if ($len % BYTES) throw RangeError(WRONG_LENGTH);\n byteLength = $len - offset;\n if (byteLength < 0) throw RangeError(WRONG_LENGTH);\n } else {\n byteLength = toLength($length) * BYTES;\n if (byteLength + offset > $len) throw RangeError(WRONG_LENGTH);\n }\n length = byteLength / BYTES;\n } else if (TYPED_ARRAY in data) {\n return fromList(TypedArray, data);\n } else {\n return $from.call(TypedArray, data);\n }\n hide(that, '_d', {\n b: buffer,\n o: offset,\n l: byteLength,\n e: length,\n v: new $DataView(buffer)\n });\n while (index < length) addElement(that, index++);\n });\n TypedArrayPrototype = TypedArray[PROTOTYPE] = create($TypedArrayPrototype$);\n hide(TypedArrayPrototype, 'constructor', TypedArray);\n } else if (!fails(function () {\n TypedArray(1);\n }) || !fails(function () {\n new TypedArray(-1); // eslint-disable-line no-new\n }) || !$iterDetect(function (iter) {\n new TypedArray(); // eslint-disable-line no-new\n new TypedArray(null); // eslint-disable-line no-new\n new TypedArray(1.5); // eslint-disable-line no-new\n new TypedArray(iter); // eslint-disable-line no-new\n }, true)) {\n TypedArray = wrapper(function (that, data, $offset, $length) {\n anInstance(that, TypedArray, NAME);\n var klass;\n // `ws` module bug, temporarily remove validation length for Uint8Array\n // https://github.com/websockets/ws/pull/645\n if (!isObject(data)) return new Base(toIndex(data));\n if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) {\n return $length !== undefined\n ? new Base(data, toOffset($offset, BYTES), $length)\n : $offset !== undefined\n ? new Base(data, toOffset($offset, BYTES))\n : new Base(data);\n }\n if (TYPED_ARRAY in data) return fromList(TypedArray, data);\n return $from.call(TypedArray, data);\n });\n arrayForEach(TAC !== Function.prototype ? gOPN(Base).concat(gOPN(TAC)) : gOPN(Base), function (key) {\n if (!(key in TypedArray)) hide(TypedArray, key, Base[key]);\n });\n TypedArray[PROTOTYPE] = TypedArrayPrototype;\n if (!LIBRARY) TypedArrayPrototype.constructor = TypedArray;\n }\n var $nativeIterator = TypedArrayPrototype[ITERATOR];\n var CORRECT_ITER_NAME = !!$nativeIterator\n && ($nativeIterator.name == 'values' || $nativeIterator.name == undefined);\n var $iterator = $iterators.values;\n hide(TypedArray, TYPED_CONSTRUCTOR, true);\n hide(TypedArrayPrototype, TYPED_ARRAY, NAME);\n hide(TypedArrayPrototype, VIEW, true);\n hide(TypedArrayPrototype, DEF_CONSTRUCTOR, TypedArray);\n\n if (CLAMPED ? new TypedArray(1)[TAG] != NAME : !(TAG in TypedArrayPrototype)) {\n dP(TypedArrayPrototype, TAG, {\n get: function () { return NAME; }\n });\n }\n\n O[NAME] = TypedArray;\n\n $export($export.G + $export.W + $export.F * (TypedArray != Base), O);\n\n $export($export.S, NAME, {\n BYTES_PER_ELEMENT: BYTES\n });\n\n $export($export.S + $export.F * fails(function () { Base.of.call(TypedArray, 1); }), NAME, {\n from: $from,\n of: $of\n });\n\n if (!(BYTES_PER_ELEMENT in TypedArrayPrototype)) hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES);\n\n $export($export.P, NAME, proto);\n\n setSpecies(NAME);\n\n $export($export.P + $export.F * FORCED_SET, NAME, { set: $set });\n\n $export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators);\n\n if (!LIBRARY && TypedArrayPrototype.toString != arrayToString) TypedArrayPrototype.toString = arrayToString;\n\n $export($export.P + $export.F * fails(function () {\n new TypedArray(1).slice();\n }), NAME, { slice: $slice });\n\n $export($export.P + $export.F * (fails(function () {\n return [1, 2].toLocaleString() != new TypedArray([1, 2]).toLocaleString();\n }) || !fails(function () {\n TypedArrayPrototype.toLocaleString.call([1, 2]);\n })), NAME, { toLocaleString: $toLocaleString });\n\n Iterators[NAME] = CORRECT_ITER_NAME ? $nativeIterator : $iterator;\n if (!LIBRARY && !CORRECT_ITER_NAME) hide(TypedArrayPrototype, ITERATOR, $iterator);\n };\n} else module.exports = function () { /* empty */ };\n","'use strict';\nvar global = require('./_global');\nvar DESCRIPTORS = require('./_descriptors');\nvar LIBRARY = require('./_library');\nvar $typed = require('./_typed');\nvar hide = require('./_hide');\nvar redefineAll = require('./_redefine-all');\nvar fails = require('./_fails');\nvar anInstance = require('./_an-instance');\nvar toInteger = require('./_to-integer');\nvar toLength = require('./_to-length');\nvar toIndex = require('./_to-index');\nvar gOPN = require('./_object-gopn').f;\nvar dP = require('./_object-dp').f;\nvar arrayFill = require('./_array-fill');\nvar setToStringTag = require('./_set-to-string-tag');\nvar ARRAY_BUFFER = 'ArrayBuffer';\nvar DATA_VIEW = 'DataView';\nvar PROTOTYPE = 'prototype';\nvar WRONG_LENGTH = 'Wrong length!';\nvar WRONG_INDEX = 'Wrong index!';\nvar $ArrayBuffer = global[ARRAY_BUFFER];\nvar $DataView = global[DATA_VIEW];\nvar Math = global.Math;\nvar RangeError = global.RangeError;\n// eslint-disable-next-line no-shadow-restricted-names\nvar Infinity = global.Infinity;\nvar BaseBuffer = $ArrayBuffer;\nvar abs = Math.abs;\nvar pow = Math.pow;\nvar floor = Math.floor;\nvar log = Math.log;\nvar LN2 = Math.LN2;\nvar BUFFER = 'buffer';\nvar BYTE_LENGTH = 'byteLength';\nvar BYTE_OFFSET = 'byteOffset';\nvar $BUFFER = DESCRIPTORS ? '_b' : BUFFER;\nvar $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH;\nvar $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET;\n\n// IEEE754 conversions based on https://github.com/feross/ieee754\nfunction packIEEE754(value, mLen, nBytes) {\n var buffer = new Array(nBytes);\n var eLen = nBytes * 8 - mLen - 1;\n var eMax = (1 << eLen) - 1;\n var eBias = eMax >> 1;\n var rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0;\n var i = 0;\n var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;\n var e, m, c;\n value = abs(value);\n // eslint-disable-next-line no-self-compare\n if (value != value || value === Infinity) {\n // eslint-disable-next-line no-self-compare\n m = value != value ? 1 : 0;\n e = eMax;\n } else {\n e = floor(log(value) / LN2);\n if (value * (c = pow(2, -e)) < 1) {\n e--;\n c *= 2;\n }\n if (e + eBias >= 1) {\n value += rt / c;\n } else {\n value += rt * pow(2, 1 - eBias);\n }\n if (value * c >= 2) {\n e++;\n c /= 2;\n }\n if (e + eBias >= eMax) {\n m = 0;\n e = eMax;\n } else if (e + eBias >= 1) {\n m = (value * c - 1) * pow(2, mLen);\n e = e + eBias;\n } else {\n m = value * pow(2, eBias - 1) * pow(2, mLen);\n e = 0;\n }\n }\n for (; mLen >= 8; buffer[i++] = m & 255, m /= 256, mLen -= 8);\n e = e << mLen | m;\n eLen += mLen;\n for (; eLen > 0; buffer[i++] = e & 255, e /= 256, eLen -= 8);\n buffer[--i] |= s * 128;\n return buffer;\n}\nfunction unpackIEEE754(buffer, mLen, nBytes) {\n var eLen = nBytes * 8 - mLen - 1;\n var eMax = (1 << eLen) - 1;\n var eBias = eMax >> 1;\n var nBits = eLen - 7;\n var i = nBytes - 1;\n var s = buffer[i--];\n var e = s & 127;\n var m;\n s >>= 7;\n for (; nBits > 0; e = e * 256 + buffer[i], i--, nBits -= 8);\n m = e & (1 << -nBits) - 1;\n e >>= -nBits;\n nBits += mLen;\n for (; nBits > 0; m = m * 256 + buffer[i], i--, nBits -= 8);\n if (e === 0) {\n e = 1 - eBias;\n } else if (e === eMax) {\n return m ? NaN : s ? -Infinity : Infinity;\n } else {\n m = m + pow(2, mLen);\n e = e - eBias;\n } return (s ? -1 : 1) * m * pow(2, e - mLen);\n}\n\nfunction unpackI32(bytes) {\n return bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0];\n}\nfunction packI8(it) {\n return [it & 0xff];\n}\nfunction packI16(it) {\n return [it & 0xff, it >> 8 & 0xff];\n}\nfunction packI32(it) {\n return [it & 0xff, it >> 8 & 0xff, it >> 16 & 0xff, it >> 24 & 0xff];\n}\nfunction packF64(it) {\n return packIEEE754(it, 52, 8);\n}\nfunction packF32(it) {\n return packIEEE754(it, 23, 4);\n}\n\nfunction addGetter(C, key, internal) {\n dP(C[PROTOTYPE], key, { get: function () { return this[internal]; } });\n}\n\nfunction get(view, bytes, index, isLittleEndian) {\n var numIndex = +index;\n var intIndex = toIndex(numIndex);\n if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX);\n var store = view[$BUFFER]._b;\n var start = intIndex + view[$OFFSET];\n var pack = store.slice(start, start + bytes);\n return isLittleEndian ? pack : pack.reverse();\n}\nfunction set(view, bytes, index, conversion, value, isLittleEndian) {\n var numIndex = +index;\n var intIndex = toIndex(numIndex);\n if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX);\n var store = view[$BUFFER]._b;\n var start = intIndex + view[$OFFSET];\n var pack = conversion(+value);\n for (var i = 0; i < bytes; i++) store[start + i] = pack[isLittleEndian ? i : bytes - i - 1];\n}\n\nif (!$typed.ABV) {\n $ArrayBuffer = function ArrayBuffer(length) {\n anInstance(this, $ArrayBuffer, ARRAY_BUFFER);\n var byteLength = toIndex(length);\n this._b = arrayFill.call(new Array(byteLength), 0);\n this[$LENGTH] = byteLength;\n };\n\n $DataView = function DataView(buffer, byteOffset, byteLength) {\n anInstance(this, $DataView, DATA_VIEW);\n anInstance(buffer, $ArrayBuffer, DATA_VIEW);\n var bufferLength = buffer[$LENGTH];\n var offset = toInteger(byteOffset);\n if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset!');\n byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength);\n if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH);\n this[$BUFFER] = buffer;\n this[$OFFSET] = offset;\n this[$LENGTH] = byteLength;\n };\n\n if (DESCRIPTORS) {\n addGetter($ArrayBuffer, BYTE_LENGTH, '_l');\n addGetter($DataView, BUFFER, '_b');\n addGetter($DataView, BYTE_LENGTH, '_l');\n addGetter($DataView, BYTE_OFFSET, '_o');\n }\n\n redefineAll($DataView[PROTOTYPE], {\n getInt8: function getInt8(byteOffset) {\n return get(this, 1, byteOffset)[0] << 24 >> 24;\n },\n getUint8: function getUint8(byteOffset) {\n return get(this, 1, byteOffset)[0];\n },\n getInt16: function getInt16(byteOffset /* , littleEndian */) {\n var bytes = get(this, 2, byteOffset, arguments[1]);\n return (bytes[1] << 8 | bytes[0]) << 16 >> 16;\n },\n getUint16: function getUint16(byteOffset /* , littleEndian */) {\n var bytes = get(this, 2, byteOffset, arguments[1]);\n return bytes[1] << 8 | bytes[0];\n },\n getInt32: function getInt32(byteOffset /* , littleEndian */) {\n return unpackI32(get(this, 4, byteOffset, arguments[1]));\n },\n getUint32: function getUint32(byteOffset /* , littleEndian */) {\n return unpackI32(get(this, 4, byteOffset, arguments[1])) >>> 0;\n },\n getFloat32: function getFloat32(byteOffset /* , littleEndian */) {\n return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23, 4);\n },\n getFloat64: function getFloat64(byteOffset /* , littleEndian */) {\n return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52, 8);\n },\n setInt8: function setInt8(byteOffset, value) {\n set(this, 1, byteOffset, packI8, value);\n },\n setUint8: function setUint8(byteOffset, value) {\n set(this, 1, byteOffset, packI8, value);\n },\n setInt16: function setInt16(byteOffset, value /* , littleEndian */) {\n set(this, 2, byteOffset, packI16, value, arguments[2]);\n },\n setUint16: function setUint16(byteOffset, value /* , littleEndian */) {\n set(this, 2, byteOffset, packI16, value, arguments[2]);\n },\n setInt32: function setInt32(byteOffset, value /* , littleEndian */) {\n set(this, 4, byteOffset, packI32, value, arguments[2]);\n },\n setUint32: function setUint32(byteOffset, value /* , littleEndian */) {\n set(this, 4, byteOffset, packI32, value, arguments[2]);\n },\n setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) {\n set(this, 4, byteOffset, packF32, value, arguments[2]);\n },\n setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) {\n set(this, 8, byteOffset, packF64, value, arguments[2]);\n }\n });\n} else {\n if (!fails(function () {\n $ArrayBuffer(1);\n }) || !fails(function () {\n new $ArrayBuffer(-1); // eslint-disable-line no-new\n }) || fails(function () {\n new $ArrayBuffer(); // eslint-disable-line no-new\n new $ArrayBuffer(1.5); // eslint-disable-line no-new\n new $ArrayBuffer(NaN); // eslint-disable-line no-new\n return $ArrayBuffer.name != ARRAY_BUFFER;\n })) {\n $ArrayBuffer = function ArrayBuffer(length) {\n anInstance(this, $ArrayBuffer);\n return new BaseBuffer(toIndex(length));\n };\n var ArrayBufferProto = $ArrayBuffer[PROTOTYPE] = BaseBuffer[PROTOTYPE];\n for (var keys = gOPN(BaseBuffer), j = 0, key; keys.length > j;) {\n if (!((key = keys[j++]) in $ArrayBuffer)) hide($ArrayBuffer, key, BaseBuffer[key]);\n }\n if (!LIBRARY) ArrayBufferProto.constructor = $ArrayBuffer;\n }\n // iOS Safari 7.x bug\n var view = new $DataView(new $ArrayBuffer(2));\n var $setInt8 = $DataView[PROTOTYPE].setInt8;\n view.setInt8(0, 2147483648);\n view.setInt8(1, 2147483649);\n if (view.getInt8(0) || !view.getInt8(1)) redefineAll($DataView[PROTOTYPE], {\n setInt8: function setInt8(byteOffset, value) {\n $setInt8.call(this, byteOffset, value << 24 >> 24);\n },\n setUint8: function setUint8(byteOffset, value) {\n $setInt8.call(this, byteOffset, value << 24 >> 24);\n }\n }, true);\n}\nsetToStringTag($ArrayBuffer, ARRAY_BUFFER);\nsetToStringTag($DataView, DATA_VIEW);\nhide($DataView[PROTOTYPE], $typed.VIEW, true);\nexports[ARRAY_BUFFER] = $ArrayBuffer;\nexports[DATA_VIEW] = $DataView;\n","var global = require('./_global');\nvar hide = require('./_hide');\nvar uid = require('./_uid');\nvar TYPED = uid('typed_array');\nvar VIEW = uid('view');\nvar ABV = !!(global.ArrayBuffer && global.DataView);\nvar CONSTR = ABV;\nvar i = 0;\nvar l = 9;\nvar Typed;\n\nvar TypedArrayConstructors = (\n 'Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array'\n).split(',');\n\nwhile (i < l) {\n if (Typed = global[TypedArrayConstructors[i++]]) {\n hide(Typed.prototype, TYPED, true);\n hide(Typed.prototype, VIEW, true);\n } else CONSTR = false;\n}\n\nmodule.exports = {\n ABV: ABV,\n CONSTR: CONSTR,\n TYPED: TYPED,\n VIEW: VIEW\n};\n","var id = 0;\nvar px = Math.random();\nmodule.exports = function (key) {\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n};\n","var global = require('./_global');\nvar navigator = global.navigator;\n\nmodule.exports = navigator && navigator.userAgent || '';\n","var isObject = require('./_is-object');\nmodule.exports = function (it, TYPE) {\n if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!');\n return it;\n};\n","var global = require('./_global');\nvar core = require('./_core');\nvar LIBRARY = require('./_library');\nvar wksExt = require('./_wks-ext');\nvar defineProperty = require('./_object-dp').f;\nmodule.exports = function (name) {\n var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});\n if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });\n};\n","exports.f = require('./_wks');\n","var store = require('./_shared')('wks');\nvar uid = require('./_uid');\nvar Symbol = require('./_global').Symbol;\nvar USE_SYMBOL = typeof Symbol == 'function';\n\nvar $exports = module.exports = function (name) {\n return store[name] || (store[name] =\n USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));\n};\n\n$exports.store = store;\n","var classof = require('./_classof');\nvar ITERATOR = require('./_wks')('iterator');\nvar Iterators = require('./_iterators');\nmodule.exports = require('./_core').getIteratorMethod = function (it) {\n if (it != undefined) return it[ITERATOR]\n || it['@@iterator']\n || Iterators[classof(it)];\n};\n","// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)\nvar $export = require('./_export');\n\n$export($export.P, 'Array', { copyWithin: require('./_array-copy-within') });\n\nrequire('./_add-to-unscopables')('copyWithin');\n","'use strict';\nvar $export = require('./_export');\nvar $every = require('./_array-methods')(4);\n\n$export($export.P + $export.F * !require('./_strict-method')([].every, true), 'Array', {\n // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg])\n every: function every(callbackfn /* , thisArg */) {\n return $every(this, callbackfn, arguments[1]);\n }\n});\n","// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)\nvar $export = require('./_export');\n\n$export($export.P, 'Array', { fill: require('./_array-fill') });\n\nrequire('./_add-to-unscopables')('fill');\n","'use strict';\nvar $export = require('./_export');\nvar $filter = require('./_array-methods')(2);\n\n$export($export.P + $export.F * !require('./_strict-method')([].filter, true), 'Array', {\n // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg])\n filter: function filter(callbackfn /* , thisArg */) {\n return $filter(this, callbackfn, arguments[1]);\n }\n});\n","'use strict';\n// 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined)\nvar $export = require('./_export');\nvar $find = require('./_array-methods')(6);\nvar KEY = 'findIndex';\nvar forced = true;\n// Shouldn't skip holes\nif (KEY in []) Array(1)[KEY](function () { forced = false; });\n$export($export.P + $export.F * forced, 'Array', {\n findIndex: function findIndex(callbackfn /* , that = undefined */) {\n return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\nrequire('./_add-to-unscopables')(KEY);\n","'use strict';\n// 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined)\nvar $export = require('./_export');\nvar $find = require('./_array-methods')(5);\nvar KEY = 'find';\nvar forced = true;\n// Shouldn't skip holes\nif (KEY in []) Array(1)[KEY](function () { forced = false; });\n$export($export.P + $export.F * forced, 'Array', {\n find: function find(callbackfn /* , that = undefined */) {\n return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\nrequire('./_add-to-unscopables')(KEY);\n","'use strict';\nvar $export = require('./_export');\nvar $forEach = require('./_array-methods')(0);\nvar STRICT = require('./_strict-method')([].forEach, true);\n\n$export($export.P + $export.F * !STRICT, 'Array', {\n // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg])\n forEach: function forEach(callbackfn /* , thisArg */) {\n return $forEach(this, callbackfn, arguments[1]);\n }\n});\n","'use strict';\nvar ctx = require('./_ctx');\nvar $export = require('./_export');\nvar toObject = require('./_to-object');\nvar call = require('./_iter-call');\nvar isArrayIter = require('./_is-array-iter');\nvar toLength = require('./_to-length');\nvar createProperty = require('./_create-property');\nvar getIterFn = require('./core.get-iterator-method');\n\n$export($export.S + $export.F * !require('./_iter-detect')(function (iter) { Array.from(iter); }), 'Array', {\n // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)\n from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {\n var O = toObject(arrayLike);\n var C = typeof this == 'function' ? this : Array;\n var aLen = arguments.length;\n var mapfn = aLen > 1 ? arguments[1] : undefined;\n var mapping = mapfn !== undefined;\n var index = 0;\n var iterFn = getIterFn(O);\n var length, result, step, iterator;\n if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2);\n // if object isn't iterable or it's array with default iterator - use simple case\n if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) {\n for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) {\n createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value);\n }\n } else {\n length = toLength(O.length);\n for (result = new C(length); length > index; index++) {\n createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);\n }\n }\n result.length = index;\n return result;\n }\n});\n","'use strict';\nvar $export = require('./_export');\nvar $indexOf = require('./_array-includes')(false);\nvar $native = [].indexOf;\nvar NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0;\n\n$export($export.P + $export.F * (NEGATIVE_ZERO || !require('./_strict-method')($native)), 'Array', {\n // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex])\n indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {\n return NEGATIVE_ZERO\n // convert -0 to +0\n ? $native.apply(this, arguments) || 0\n : $indexOf(this, searchElement, arguments[1]);\n }\n});\n","// 22.1.2.2 / 15.4.3.2 Array.isArray(arg)\nvar $export = require('./_export');\n\n$export($export.S, 'Array', { isArray: require('./_is-array') });\n","'use strict';\nvar addToUnscopables = require('./_add-to-unscopables');\nvar step = require('./_iter-step');\nvar Iterators = require('./_iterators');\nvar toIObject = require('./_to-iobject');\n\n// 22.1.3.4 Array.prototype.entries()\n// 22.1.3.13 Array.prototype.keys()\n// 22.1.3.29 Array.prototype.values()\n// 22.1.3.30 Array.prototype[@@iterator]()\nmodule.exports = require('./_iter-define')(Array, 'Array', function (iterated, kind) {\n this._t = toIObject(iterated); // target\n this._i = 0; // next index\n this._k = kind; // kind\n// 22.1.5.2.1 %ArrayIteratorPrototype%.next()\n}, function () {\n var O = this._t;\n var kind = this._k;\n var index = this._i++;\n if (!O || index >= O.length) {\n this._t = undefined;\n return step(1);\n }\n if (kind == 'keys') return step(0, index);\n if (kind == 'values') return step(0, O[index]);\n return step(0, [index, O[index]]);\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)\nIterators.Arguments = Iterators.Array;\n\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\n","'use strict';\n// 22.1.3.13 Array.prototype.join(separator)\nvar $export = require('./_export');\nvar toIObject = require('./_to-iobject');\nvar arrayJoin = [].join;\n\n// fallback for not array-like strings\n$export($export.P + $export.F * (require('./_iobject') != Object || !require('./_strict-method')(arrayJoin)), 'Array', {\n join: function join(separator) {\n return arrayJoin.call(toIObject(this), separator === undefined ? ',' : separator);\n }\n});\n","'use strict';\nvar $export = require('./_export');\nvar toIObject = require('./_to-iobject');\nvar toInteger = require('./_to-integer');\nvar toLength = require('./_to-length');\nvar $native = [].lastIndexOf;\nvar NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0;\n\n$export($export.P + $export.F * (NEGATIVE_ZERO || !require('./_strict-method')($native)), 'Array', {\n // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex])\n lastIndexOf: function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {\n // convert -0 to +0\n if (NEGATIVE_ZERO) return $native.apply(this, arguments) || 0;\n var O = toIObject(this);\n var length = toLength(O.length);\n var index = length - 1;\n if (arguments.length > 1) index = Math.min(index, toInteger(arguments[1]));\n if (index < 0) index = length + index;\n for (;index >= 0; index--) if (index in O) if (O[index] === searchElement) return index || 0;\n return -1;\n }\n});\n","'use strict';\nvar $export = require('./_export');\nvar $map = require('./_array-methods')(1);\n\n$export($export.P + $export.F * !require('./_strict-method')([].map, true), 'Array', {\n // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg])\n map: function map(callbackfn /* , thisArg */) {\n return $map(this, callbackfn, arguments[1]);\n }\n});\n","'use strict';\nvar $export = require('./_export');\nvar createProperty = require('./_create-property');\n\n// WebKit Array.of isn't generic\n$export($export.S + $export.F * require('./_fails')(function () {\n function F() { /* empty */ }\n return !(Array.of.call(F) instanceof F);\n}), 'Array', {\n // 22.1.2.3 Array.of( ...items)\n of: function of(/* ...args */) {\n var index = 0;\n var aLen = arguments.length;\n var result = new (typeof this == 'function' ? this : Array)(aLen);\n while (aLen > index) createProperty(result, index, arguments[index++]);\n result.length = aLen;\n return result;\n }\n});\n","'use strict';\nvar $export = require('./_export');\nvar $reduce = require('./_array-reduce');\n\n$export($export.P + $export.F * !require('./_strict-method')([].reduceRight, true), 'Array', {\n // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue])\n reduceRight: function reduceRight(callbackfn /* , initialValue */) {\n return $reduce(this, callbackfn, arguments.length, arguments[1], true);\n }\n});\n","'use strict';\nvar $export = require('./_export');\nvar $reduce = require('./_array-reduce');\n\n$export($export.P + $export.F * !require('./_strict-method')([].reduce, true), 'Array', {\n // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue])\n reduce: function reduce(callbackfn /* , initialValue */) {\n return $reduce(this, callbackfn, arguments.length, arguments[1], false);\n }\n});\n","'use strict';\nvar $export = require('./_export');\nvar html = require('./_html');\nvar cof = require('./_cof');\nvar toAbsoluteIndex = require('./_to-absolute-index');\nvar toLength = require('./_to-length');\nvar arraySlice = [].slice;\n\n// fallback for not array-like ES3 strings and DOM objects\n$export($export.P + $export.F * require('./_fails')(function () {\n if (html) arraySlice.call(html);\n}), 'Array', {\n slice: function slice(begin, end) {\n var len = toLength(this.length);\n var klass = cof(this);\n end = end === undefined ? len : end;\n if (klass == 'Array') return arraySlice.call(this, begin, end);\n var start = toAbsoluteIndex(begin, len);\n var upTo = toAbsoluteIndex(end, len);\n var size = toLength(upTo - start);\n var cloned = new Array(size);\n var i = 0;\n for (; i < size; i++) cloned[i] = klass == 'String'\n ? this.charAt(start + i)\n : this[start + i];\n return cloned;\n }\n});\n","'use strict';\nvar $export = require('./_export');\nvar $some = require('./_array-methods')(3);\n\n$export($export.P + $export.F * !require('./_strict-method')([].some, true), 'Array', {\n // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg])\n some: function some(callbackfn /* , thisArg */) {\n return $some(this, callbackfn, arguments[1]);\n }\n});\n","'use strict';\nvar $export = require('./_export');\nvar aFunction = require('./_a-function');\nvar toObject = require('./_to-object');\nvar fails = require('./_fails');\nvar $sort = [].sort;\nvar test = [1, 2, 3];\n\n$export($export.P + $export.F * (fails(function () {\n // IE8-\n test.sort(undefined);\n}) || !fails(function () {\n // V8 bug\n test.sort(null);\n // Old WebKit\n}) || !require('./_strict-method')($sort)), 'Array', {\n // 22.1.3.25 Array.prototype.sort(comparefn)\n sort: function sort(comparefn) {\n return comparefn === undefined\n ? $sort.call(toObject(this))\n : $sort.call(toObject(this), aFunction(comparefn));\n }\n});\n","require('./_set-species')('Array');\n","// 20.3.3.1 / 15.9.4.4 Date.now()\nvar $export = require('./_export');\n\n$export($export.S, 'Date', { now: function () { return new Date().getTime(); } });\n","// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString()\nvar $export = require('./_export');\nvar toISOString = require('./_date-to-iso-string');\n\n// PhantomJS / old WebKit has a broken implementations\n$export($export.P + $export.F * (Date.prototype.toISOString !== toISOString), 'Date', {\n toISOString: toISOString\n});\n","'use strict';\nvar $export = require('./_export');\nvar toObject = require('./_to-object');\nvar toPrimitive = require('./_to-primitive');\n\n$export($export.P + $export.F * require('./_fails')(function () {\n return new Date(NaN).toJSON() !== null\n || Date.prototype.toJSON.call({ toISOString: function () { return 1; } }) !== 1;\n}), 'Date', {\n // eslint-disable-next-line no-unused-vars\n toJSON: function toJSON(key) {\n var O = toObject(this);\n var pv = toPrimitive(O);\n return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString();\n }\n});\n","var TO_PRIMITIVE = require('./_wks')('toPrimitive');\nvar proto = Date.prototype;\n\nif (!(TO_PRIMITIVE in proto)) require('./_hide')(proto, TO_PRIMITIVE, require('./_date-to-primitive'));\n","var DateProto = Date.prototype;\nvar INVALID_DATE = 'Invalid Date';\nvar TO_STRING = 'toString';\nvar $toString = DateProto[TO_STRING];\nvar getTime = DateProto.getTime;\nif (new Date(NaN) + '' != INVALID_DATE) {\n require('./_redefine')(DateProto, TO_STRING, function toString() {\n var value = getTime.call(this);\n // eslint-disable-next-line no-self-compare\n return value === value ? $toString.call(this) : INVALID_DATE;\n });\n}\n","// 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...)\nvar $export = require('./_export');\n\n$export($export.P, 'Function', { bind: require('./_bind') });\n","'use strict';\nvar isObject = require('./_is-object');\nvar getPrototypeOf = require('./_object-gpo');\nvar HAS_INSTANCE = require('./_wks')('hasInstance');\nvar FunctionProto = Function.prototype;\n// 19.2.3.6 Function.prototype[@@hasInstance](V)\nif (!(HAS_INSTANCE in FunctionProto)) require('./_object-dp').f(FunctionProto, HAS_INSTANCE, { value: function (O) {\n if (typeof this != 'function' || !isObject(O)) return false;\n if (!isObject(this.prototype)) return O instanceof this;\n // for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this:\n while (O = getPrototypeOf(O)) if (this.prototype === O) return true;\n return false;\n} });\n","var dP = require('./_object-dp').f;\nvar FProto = Function.prototype;\nvar nameRE = /^\\s*function ([^ (]*)/;\nvar NAME = 'name';\n\n// 19.2.4.2 name\nNAME in FProto || require('./_descriptors') && dP(FProto, NAME, {\n configurable: true,\n get: function () {\n try {\n return ('' + this).match(nameRE)[1];\n } catch (e) {\n return '';\n }\n }\n});\n","'use strict';\nvar strong = require('./_collection-strong');\nvar validate = require('./_validate-collection');\nvar MAP = 'Map';\n\n// 23.1 Map Objects\nmodule.exports = require('./_collection')(MAP, function (get) {\n return function Map() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };\n}, {\n // 23.1.3.6 Map.prototype.get(key)\n get: function get(key) {\n var entry = strong.getEntry(validate(this, MAP), key);\n return entry && entry.v;\n },\n // 23.1.3.9 Map.prototype.set(key, value)\n set: function set(key, value) {\n return strong.def(validate(this, MAP), key === 0 ? 0 : key, value);\n }\n}, strong, true);\n","// 20.2.2.3 Math.acosh(x)\nvar $export = require('./_export');\nvar log1p = require('./_math-log1p');\nvar sqrt = Math.sqrt;\nvar $acosh = Math.acosh;\n\n$export($export.S + $export.F * !($acosh\n // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509\n && Math.floor($acosh(Number.MAX_VALUE)) == 710\n // Tor Browser bug: Math.acosh(Infinity) -> NaN\n && $acosh(Infinity) == Infinity\n), 'Math', {\n acosh: function acosh(x) {\n return (x = +x) < 1 ? NaN : x > 94906265.62425156\n ? Math.log(x) + Math.LN2\n : log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1));\n }\n});\n","// 20.2.2.5 Math.asinh(x)\nvar $export = require('./_export');\nvar $asinh = Math.asinh;\n\nfunction asinh(x) {\n return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1));\n}\n\n// Tor Browser bug: Math.asinh(0) -> -0\n$export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', { asinh: asinh });\n","// 20.2.2.7 Math.atanh(x)\nvar $export = require('./_export');\nvar $atanh = Math.atanh;\n\n// Tor Browser bug: Math.atanh(-0) -> 0\n$export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', {\n atanh: function atanh(x) {\n return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2;\n }\n});\n","// 20.2.2.9 Math.cbrt(x)\nvar $export = require('./_export');\nvar sign = require('./_math-sign');\n\n$export($export.S, 'Math', {\n cbrt: function cbrt(x) {\n return sign(x = +x) * Math.pow(Math.abs(x), 1 / 3);\n }\n});\n","// 20.2.2.11 Math.clz32(x)\nvar $export = require('./_export');\n\n$export($export.S, 'Math', {\n clz32: function clz32(x) {\n return (x >>>= 0) ? 31 - Math.floor(Math.log(x + 0.5) * Math.LOG2E) : 32;\n }\n});\n","// 20.2.2.12 Math.cosh(x)\nvar $export = require('./_export');\nvar exp = Math.exp;\n\n$export($export.S, 'Math', {\n cosh: function cosh(x) {\n return (exp(x = +x) + exp(-x)) / 2;\n }\n});\n","// 20.2.2.14 Math.expm1(x)\nvar $export = require('./_export');\nvar $expm1 = require('./_math-expm1');\n\n$export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', { expm1: $expm1 });\n","// 20.2.2.16 Math.fround(x)\nvar $export = require('./_export');\n\n$export($export.S, 'Math', { fround: require('./_math-fround') });\n","// 20.2.2.17 Math.hypot([value1[, value2[, … ]]])\nvar $export = require('./_export');\nvar abs = Math.abs;\n\n$export($export.S, 'Math', {\n hypot: function hypot(value1, value2) { // eslint-disable-line no-unused-vars\n var sum = 0;\n var i = 0;\n var aLen = arguments.length;\n var larg = 0;\n var arg, div;\n while (i < aLen) {\n arg = abs(arguments[i++]);\n if (larg < arg) {\n div = larg / arg;\n sum = sum * div * div + 1;\n larg = arg;\n } else if (arg > 0) {\n div = arg / larg;\n sum += div * div;\n } else sum += arg;\n }\n return larg === Infinity ? Infinity : larg * Math.sqrt(sum);\n }\n});\n","// 20.2.2.18 Math.imul(x, y)\nvar $export = require('./_export');\nvar $imul = Math.imul;\n\n// some WebKit versions fails with big numbers, some has wrong arity\n$export($export.S + $export.F * require('./_fails')(function () {\n return $imul(0xffffffff, 5) != -5 || $imul.length != 2;\n}), 'Math', {\n imul: function imul(x, y) {\n var UINT16 = 0xffff;\n var xn = +x;\n var yn = +y;\n var xl = UINT16 & xn;\n var yl = UINT16 & yn;\n return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0);\n }\n});\n","// 20.2.2.21 Math.log10(x)\nvar $export = require('./_export');\n\n$export($export.S, 'Math', {\n log10: function log10(x) {\n return Math.log(x) * Math.LOG10E;\n }\n});\n","// 20.2.2.20 Math.log1p(x)\nvar $export = require('./_export');\n\n$export($export.S, 'Math', { log1p: require('./_math-log1p') });\n","// 20.2.2.22 Math.log2(x)\nvar $export = require('./_export');\n\n$export($export.S, 'Math', {\n log2: function log2(x) {\n return Math.log(x) / Math.LN2;\n }\n});\n","// 20.2.2.28 Math.sign(x)\nvar $export = require('./_export');\n\n$export($export.S, 'Math', { sign: require('./_math-sign') });\n","// 20.2.2.30 Math.sinh(x)\nvar $export = require('./_export');\nvar expm1 = require('./_math-expm1');\nvar exp = Math.exp;\n\n// V8 near Chromium 38 has a problem with very small numbers\n$export($export.S + $export.F * require('./_fails')(function () {\n return !Math.sinh(-2e-17) != -2e-17;\n}), 'Math', {\n sinh: function sinh(x) {\n return Math.abs(x = +x) < 1\n ? (expm1(x) - expm1(-x)) / 2\n : (exp(x - 1) - exp(-x - 1)) * (Math.E / 2);\n }\n});\n","// 20.2.2.33 Math.tanh(x)\nvar $export = require('./_export');\nvar expm1 = require('./_math-expm1');\nvar exp = Math.exp;\n\n$export($export.S, 'Math', {\n tanh: function tanh(x) {\n var a = expm1(x = +x);\n var b = expm1(-x);\n return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x));\n }\n});\n","// 20.2.2.34 Math.trunc(x)\nvar $export = require('./_export');\n\n$export($export.S, 'Math', {\n trunc: function trunc(it) {\n return (it > 0 ? Math.floor : Math.ceil)(it);\n }\n});\n","'use strict';\nvar global = require('./_global');\nvar has = require('./_has');\nvar cof = require('./_cof');\nvar inheritIfRequired = require('./_inherit-if-required');\nvar toPrimitive = require('./_to-primitive');\nvar fails = require('./_fails');\nvar gOPN = require('./_object-gopn').f;\nvar gOPD = require('./_object-gopd').f;\nvar dP = require('./_object-dp').f;\nvar $trim = require('./_string-trim').trim;\nvar NUMBER = 'Number';\nvar $Number = global[NUMBER];\nvar Base = $Number;\nvar proto = $Number.prototype;\n// Opera ~12 has broken Object#toString\nvar BROKEN_COF = cof(require('./_object-create')(proto)) == NUMBER;\nvar TRIM = 'trim' in String.prototype;\n\n// 7.1.3 ToNumber(argument)\nvar toNumber = function (argument) {\n var it = toPrimitive(argument, false);\n if (typeof it == 'string' && it.length > 2) {\n it = TRIM ? it.trim() : $trim(it, 3);\n var first = it.charCodeAt(0);\n var third, radix, maxCode;\n if (first === 43 || first === 45) {\n third = it.charCodeAt(2);\n if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix\n } else if (first === 48) {\n switch (it.charCodeAt(1)) {\n case 66: case 98: radix = 2; maxCode = 49; break; // fast equal /^0b[01]+$/i\n case 79: case 111: radix = 8; maxCode = 55; break; // fast equal /^0o[0-7]+$/i\n default: return +it;\n }\n for (var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++) {\n code = digits.charCodeAt(i);\n // parseInt parses a string to a first unavailable symbol\n // but ToNumber should return NaN if a string contains unavailable symbols\n if (code < 48 || code > maxCode) return NaN;\n } return parseInt(digits, radix);\n }\n } return +it;\n};\n\nif (!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')) {\n $Number = function Number(value) {\n var it = arguments.length < 1 ? 0 : value;\n var that = this;\n return that instanceof $Number\n // check on 1..constructor(foo) case\n && (BROKEN_COF ? fails(function () { proto.valueOf.call(that); }) : cof(that) != NUMBER)\n ? inheritIfRequired(new Base(toNumber(it)), that, $Number) : toNumber(it);\n };\n for (var keys = require('./_descriptors') ? gOPN(Base) : (\n // ES3:\n 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +\n // ES6 (in case, if modules with ES6 Number statics required before):\n 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +\n 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger'\n ).split(','), j = 0, key; keys.length > j; j++) {\n if (has(Base, key = keys[j]) && !has($Number, key)) {\n dP($Number, key, gOPD(Base, key));\n }\n }\n $Number.prototype = proto;\n proto.constructor = $Number;\n require('./_redefine')(global, NUMBER, $Number);\n}\n","// 20.1.2.1 Number.EPSILON\nvar $export = require('./_export');\n\n$export($export.S, 'Number', { EPSILON: Math.pow(2, -52) });\n","// 20.1.2.2 Number.isFinite(number)\nvar $export = require('./_export');\nvar _isFinite = require('./_global').isFinite;\n\n$export($export.S, 'Number', {\n isFinite: function isFinite(it) {\n return typeof it == 'number' && _isFinite(it);\n }\n});\n","// 20.1.2.3 Number.isInteger(number)\nvar $export = require('./_export');\n\n$export($export.S, 'Number', { isInteger: require('./_is-integer') });\n","// 20.1.2.4 Number.isNaN(number)\nvar $export = require('./_export');\n\n$export($export.S, 'Number', {\n isNaN: function isNaN(number) {\n // eslint-disable-next-line no-self-compare\n return number != number;\n }\n});\n","// 20.1.2.5 Number.isSafeInteger(number)\nvar $export = require('./_export');\nvar isInteger = require('./_is-integer');\nvar abs = Math.abs;\n\n$export($export.S, 'Number', {\n isSafeInteger: function isSafeInteger(number) {\n return isInteger(number) && abs(number) <= 0x1fffffffffffff;\n }\n});\n","// 20.1.2.6 Number.MAX_SAFE_INTEGER\nvar $export = require('./_export');\n\n$export($export.S, 'Number', { MAX_SAFE_INTEGER: 0x1fffffffffffff });\n","// 20.1.2.10 Number.MIN_SAFE_INTEGER\nvar $export = require('./_export');\n\n$export($export.S, 'Number', { MIN_SAFE_INTEGER: -0x1fffffffffffff });\n","var $export = require('./_export');\nvar $parseFloat = require('./_parse-float');\n// 20.1.2.12 Number.parseFloat(string)\n$export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', { parseFloat: $parseFloat });\n","var $export = require('./_export');\nvar $parseInt = require('./_parse-int');\n// 20.1.2.13 Number.parseInt(string, radix)\n$export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', { parseInt: $parseInt });\n","'use strict';\nvar $export = require('./_export');\nvar toInteger = require('./_to-integer');\nvar aNumberValue = require('./_a-number-value');\nvar repeat = require('./_string-repeat');\nvar $toFixed = 1.0.toFixed;\nvar floor = Math.floor;\nvar data = [0, 0, 0, 0, 0, 0];\nvar ERROR = 'Number.toFixed: incorrect invocation!';\nvar ZERO = '0';\n\nvar multiply = function (n, c) {\n var i = -1;\n var c2 = c;\n while (++i < 6) {\n c2 += n * data[i];\n data[i] = c2 % 1e7;\n c2 = floor(c2 / 1e7);\n }\n};\nvar divide = function (n) {\n var i = 6;\n var c = 0;\n while (--i >= 0) {\n c += data[i];\n data[i] = floor(c / n);\n c = (c % n) * 1e7;\n }\n};\nvar numToString = function () {\n var i = 6;\n var s = '';\n while (--i >= 0) {\n if (s !== '' || i === 0 || data[i] !== 0) {\n var t = String(data[i]);\n s = s === '' ? t : s + repeat.call(ZERO, 7 - t.length) + t;\n }\n } return s;\n};\nvar pow = function (x, n, acc) {\n return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc);\n};\nvar log = function (x) {\n var n = 0;\n var x2 = x;\n while (x2 >= 4096) {\n n += 12;\n x2 /= 4096;\n }\n while (x2 >= 2) {\n n += 1;\n x2 /= 2;\n } return n;\n};\n\n$export($export.P + $export.F * (!!$toFixed && (\n 0.00008.toFixed(3) !== '0.000' ||\n 0.9.toFixed(0) !== '1' ||\n 1.255.toFixed(2) !== '1.25' ||\n 1000000000000000128.0.toFixed(0) !== '1000000000000000128'\n) || !require('./_fails')(function () {\n // V8 ~ Android 4.3-\n $toFixed.call({});\n})), 'Number', {\n toFixed: function toFixed(fractionDigits) {\n var x = aNumberValue(this, ERROR);\n var f = toInteger(fractionDigits);\n var s = '';\n var m = ZERO;\n var e, z, j, k;\n if (f < 0 || f > 20) throw RangeError(ERROR);\n // eslint-disable-next-line no-self-compare\n if (x != x) return 'NaN';\n if (x <= -1e21 || x >= 1e21) return String(x);\n if (x < 0) {\n s = '-';\n x = -x;\n }\n if (x > 1e-21) {\n e = log(x * pow(2, 69, 1)) - 69;\n z = e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1);\n z *= 0x10000000000000;\n e = 52 - e;\n if (e > 0) {\n multiply(0, z);\n j = f;\n while (j >= 7) {\n multiply(1e7, 0);\n j -= 7;\n }\n multiply(pow(10, j, 1), 0);\n j = e - 1;\n while (j >= 23) {\n divide(1 << 23);\n j -= 23;\n }\n divide(1 << j);\n multiply(1, 1);\n divide(2);\n m = numToString();\n } else {\n multiply(0, z);\n multiply(1 << -e, 0);\n m = numToString() + repeat.call(ZERO, f);\n }\n }\n if (f > 0) {\n k = m.length;\n m = s + (k <= f ? '0.' + repeat.call(ZERO, f - k) + m : m.slice(0, k - f) + '.' + m.slice(k - f));\n } else {\n m = s + m;\n } return m;\n }\n});\n","'use strict';\nvar $export = require('./_export');\nvar $fails = require('./_fails');\nvar aNumberValue = require('./_a-number-value');\nvar $toPrecision = 1.0.toPrecision;\n\n$export($export.P + $export.F * ($fails(function () {\n // IE7-\n return $toPrecision.call(1, undefined) !== '1';\n}) || !$fails(function () {\n // V8 ~ Android 4.3-\n $toPrecision.call({});\n})), 'Number', {\n toPrecision: function toPrecision(precision) {\n var that = aNumberValue(this, 'Number#toPrecision: incorrect invocation!');\n return precision === undefined ? $toPrecision.call(that) : $toPrecision.call(that, precision);\n }\n});\n","// 19.1.3.1 Object.assign(target, source)\nvar $export = require('./_export');\n\n$export($export.S + $export.F, 'Object', { assign: require('./_object-assign') });\n","var $export = require('./_export');\n// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\n$export($export.S, 'Object', { create: require('./_object-create') });\n","var $export = require('./_export');\n// 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties)\n$export($export.S + $export.F * !require('./_descriptors'), 'Object', { defineProperties: require('./_object-dps') });\n","var $export = require('./_export');\n// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)\n$export($export.S + $export.F * !require('./_descriptors'), 'Object', { defineProperty: require('./_object-dp').f });\n","// 19.1.2.5 Object.freeze(O)\nvar isObject = require('./_is-object');\nvar meta = require('./_meta').onFreeze;\n\nrequire('./_object-sap')('freeze', function ($freeze) {\n return function freeze(it) {\n return $freeze && isObject(it) ? $freeze(meta(it)) : it;\n };\n});\n","// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)\nvar toIObject = require('./_to-iobject');\nvar $getOwnPropertyDescriptor = require('./_object-gopd').f;\n\nrequire('./_object-sap')('getOwnPropertyDescriptor', function () {\n return function getOwnPropertyDescriptor(it, key) {\n return $getOwnPropertyDescriptor(toIObject(it), key);\n };\n});\n","// 19.1.2.7 Object.getOwnPropertyNames(O)\nrequire('./_object-sap')('getOwnPropertyNames', function () {\n return require('./_object-gopn-ext').f;\n});\n","// 19.1.2.9 Object.getPrototypeOf(O)\nvar toObject = require('./_to-object');\nvar $getPrototypeOf = require('./_object-gpo');\n\nrequire('./_object-sap')('getPrototypeOf', function () {\n return function getPrototypeOf(it) {\n return $getPrototypeOf(toObject(it));\n };\n});\n","// 19.1.2.11 Object.isExtensible(O)\nvar isObject = require('./_is-object');\n\nrequire('./_object-sap')('isExtensible', function ($isExtensible) {\n return function isExtensible(it) {\n return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false;\n };\n});\n","// 19.1.2.12 Object.isFrozen(O)\nvar isObject = require('./_is-object');\n\nrequire('./_object-sap')('isFrozen', function ($isFrozen) {\n return function isFrozen(it) {\n return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true;\n };\n});\n","// 19.1.2.13 Object.isSealed(O)\nvar isObject = require('./_is-object');\n\nrequire('./_object-sap')('isSealed', function ($isSealed) {\n return function isSealed(it) {\n return isObject(it) ? $isSealed ? $isSealed(it) : false : true;\n };\n});\n","// 19.1.3.10 Object.is(value1, value2)\nvar $export = require('./_export');\n$export($export.S, 'Object', { is: require('./_same-value') });\n","// 19.1.2.14 Object.keys(O)\nvar toObject = require('./_to-object');\nvar $keys = require('./_object-keys');\n\nrequire('./_object-sap')('keys', function () {\n return function keys(it) {\n return $keys(toObject(it));\n };\n});\n","// 19.1.2.15 Object.preventExtensions(O)\nvar isObject = require('./_is-object');\nvar meta = require('./_meta').onFreeze;\n\nrequire('./_object-sap')('preventExtensions', function ($preventExtensions) {\n return function preventExtensions(it) {\n return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it;\n };\n});\n","// 19.1.2.17 Object.seal(O)\nvar isObject = require('./_is-object');\nvar meta = require('./_meta').onFreeze;\n\nrequire('./_object-sap')('seal', function ($seal) {\n return function seal(it) {\n return $seal && isObject(it) ? $seal(meta(it)) : it;\n };\n});\n","// 19.1.3.19 Object.setPrototypeOf(O, proto)\nvar $export = require('./_export');\n$export($export.S, 'Object', { setPrototypeOf: require('./_set-proto').set });\n","'use strict';\n// 19.1.3.6 Object.prototype.toString()\nvar classof = require('./_classof');\nvar test = {};\ntest[require('./_wks')('toStringTag')] = 'z';\nif (test + '' != '[object z]') {\n require('./_redefine')(Object.prototype, 'toString', function toString() {\n return '[object ' + classof(this) + ']';\n }, true);\n}\n","var $export = require('./_export');\nvar $parseFloat = require('./_parse-float');\n// 18.2.4 parseFloat(string)\n$export($export.G + $export.F * (parseFloat != $parseFloat), { parseFloat: $parseFloat });\n","var $export = require('./_export');\nvar $parseInt = require('./_parse-int');\n// 18.2.5 parseInt(string, radix)\n$export($export.G + $export.F * (parseInt != $parseInt), { parseInt: $parseInt });\n","'use strict';\nvar LIBRARY = require('./_library');\nvar global = require('./_global');\nvar ctx = require('./_ctx');\nvar classof = require('./_classof');\nvar $export = require('./_export');\nvar isObject = require('./_is-object');\nvar aFunction = require('./_a-function');\nvar anInstance = require('./_an-instance');\nvar forOf = require('./_for-of');\nvar speciesConstructor = require('./_species-constructor');\nvar task = require('./_task').set;\nvar microtask = require('./_microtask')();\nvar newPromiseCapabilityModule = require('./_new-promise-capability');\nvar perform = require('./_perform');\nvar userAgent = require('./_user-agent');\nvar promiseResolve = require('./_promise-resolve');\nvar PROMISE = 'Promise';\nvar TypeError = global.TypeError;\nvar process = global.process;\nvar versions = process && process.versions;\nvar v8 = versions && versions.v8 || '';\nvar $Promise = global[PROMISE];\nvar isNode = classof(process) == 'process';\nvar empty = function () { /* empty */ };\nvar Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper;\nvar newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f;\n\nvar USE_NATIVE = !!function () {\n try {\n // correct subclassing with @@species support\n var promise = $Promise.resolve(1);\n var FakePromise = (promise.constructor = {})[require('./_wks')('species')] = function (exec) {\n exec(empty, empty);\n };\n // unhandled rejections tracking support, NodeJS Promise without it fails @@species test\n return (isNode || typeof PromiseRejectionEvent == 'function')\n && promise.then(empty) instanceof FakePromise\n // v8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables\n // https://bugs.chromium.org/p/chromium/issues/detail?id=830565\n // we can't detect it synchronously, so just check versions\n && v8.indexOf('6.6') !== 0\n && userAgent.indexOf('Chrome/66') === -1;\n } catch (e) { /* empty */ }\n}();\n\n// helpers\nvar isThenable = function (it) {\n var then;\n return isObject(it) && typeof (then = it.then) == 'function' ? then : false;\n};\nvar notify = function (promise, isReject) {\n if (promise._n) return;\n promise._n = true;\n var chain = promise._c;\n microtask(function () {\n var value = promise._v;\n var ok = promise._s == 1;\n var i = 0;\n var run = function (reaction) {\n var handler = ok ? reaction.ok : reaction.fail;\n var resolve = reaction.resolve;\n var reject = reaction.reject;\n var domain = reaction.domain;\n var result, then, exited;\n try {\n if (handler) {\n if (!ok) {\n if (promise._h == 2) onHandleUnhandled(promise);\n promise._h = 1;\n }\n if (handler === true) result = value;\n else {\n if (domain) domain.enter();\n result = handler(value); // may throw\n if (domain) {\n domain.exit();\n exited = true;\n }\n }\n if (result === reaction.promise) {\n reject(TypeError('Promise-chain cycle'));\n } else if (then = isThenable(result)) {\n then.call(result, resolve, reject);\n } else resolve(result);\n } else reject(value);\n } catch (e) {\n if (domain && !exited) domain.exit();\n reject(e);\n }\n };\n while (chain.length > i) run(chain[i++]); // variable length - can't use forEach\n promise._c = [];\n promise._n = false;\n if (isReject && !promise._h) onUnhandled(promise);\n });\n};\nvar onUnhandled = function (promise) {\n task.call(global, function () {\n var value = promise._v;\n var unhandled = isUnhandled(promise);\n var result, handler, console;\n if (unhandled) {\n result = perform(function () {\n if (isNode) {\n process.emit('unhandledRejection', value, promise);\n } else if (handler = global.onunhandledrejection) {\n handler({ promise: promise, reason: value });\n } else if ((console = global.console) && console.error) {\n console.error('Unhandled promise rejection', value);\n }\n });\n // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should\n promise._h = isNode || isUnhandled(promise) ? 2 : 1;\n } promise._a = undefined;\n if (unhandled && result.e) throw result.v;\n });\n};\nvar isUnhandled = function (promise) {\n return promise._h !== 1 && (promise._a || promise._c).length === 0;\n};\nvar onHandleUnhandled = function (promise) {\n task.call(global, function () {\n var handler;\n if (isNode) {\n process.emit('rejectionHandled', promise);\n } else if (handler = global.onrejectionhandled) {\n handler({ promise: promise, reason: promise._v });\n }\n });\n};\nvar $reject = function (value) {\n var promise = this;\n if (promise._d) return;\n promise._d = true;\n promise = promise._w || promise; // unwrap\n promise._v = value;\n promise._s = 2;\n if (!promise._a) promise._a = promise._c.slice();\n notify(promise, true);\n};\nvar $resolve = function (value) {\n var promise = this;\n var then;\n if (promise._d) return;\n promise._d = true;\n promise = promise._w || promise; // unwrap\n try {\n if (promise === value) throw TypeError(\"Promise can't be resolved itself\");\n if (then = isThenable(value)) {\n microtask(function () {\n var wrapper = { _w: promise, _d: false }; // wrap\n try {\n then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1));\n } catch (e) {\n $reject.call(wrapper, e);\n }\n });\n } else {\n promise._v = value;\n promise._s = 1;\n notify(promise, false);\n }\n } catch (e) {\n $reject.call({ _w: promise, _d: false }, e); // wrap\n }\n};\n\n// constructor polyfill\nif (!USE_NATIVE) {\n // 25.4.3.1 Promise(executor)\n $Promise = function Promise(executor) {\n anInstance(this, $Promise, PROMISE, '_h');\n aFunction(executor);\n Internal.call(this);\n try {\n executor(ctx($resolve, this, 1), ctx($reject, this, 1));\n } catch (err) {\n $reject.call(this, err);\n }\n };\n // eslint-disable-next-line no-unused-vars\n Internal = function Promise(executor) {\n this._c = []; // <- awaiting reactions\n this._a = undefined; // <- checked in isUnhandled reactions\n this._s = 0; // <- state\n this._d = false; // <- done\n this._v = undefined; // <- value\n this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled\n this._n = false; // <- notify\n };\n Internal.prototype = require('./_redefine-all')($Promise.prototype, {\n // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected)\n then: function then(onFulfilled, onRejected) {\n var reaction = newPromiseCapability(speciesConstructor(this, $Promise));\n reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;\n reaction.fail = typeof onRejected == 'function' && onRejected;\n reaction.domain = isNode ? process.domain : undefined;\n this._c.push(reaction);\n if (this._a) this._a.push(reaction);\n if (this._s) notify(this, false);\n return reaction.promise;\n },\n // 25.4.5.1 Promise.prototype.catch(onRejected)\n 'catch': function (onRejected) {\n return this.then(undefined, onRejected);\n }\n });\n OwnPromiseCapability = function () {\n var promise = new Internal();\n this.promise = promise;\n this.resolve = ctx($resolve, promise, 1);\n this.reject = ctx($reject, promise, 1);\n };\n newPromiseCapabilityModule.f = newPromiseCapability = function (C) {\n return C === $Promise || C === Wrapper\n ? new OwnPromiseCapability(C)\n : newGenericPromiseCapability(C);\n };\n}\n\n$export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise });\nrequire('./_set-to-string-tag')($Promise, PROMISE);\nrequire('./_set-species')(PROMISE);\nWrapper = require('./_core')[PROMISE];\n\n// statics\n$export($export.S + $export.F * !USE_NATIVE, PROMISE, {\n // 25.4.4.5 Promise.reject(r)\n reject: function reject(r) {\n var capability = newPromiseCapability(this);\n var $$reject = capability.reject;\n $$reject(r);\n return capability.promise;\n }\n});\n$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, {\n // 25.4.4.6 Promise.resolve(x)\n resolve: function resolve(x) {\n return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x);\n }\n});\n$export($export.S + $export.F * !(USE_NATIVE && require('./_iter-detect')(function (iter) {\n $Promise.all(iter)['catch'](empty);\n})), PROMISE, {\n // 25.4.4.1 Promise.all(iterable)\n all: function all(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var resolve = capability.resolve;\n var reject = capability.reject;\n var result = perform(function () {\n var values = [];\n var index = 0;\n var remaining = 1;\n forOf(iterable, false, function (promise) {\n var $index = index++;\n var alreadyCalled = false;\n values.push(undefined);\n remaining++;\n C.resolve(promise).then(function (value) {\n if (alreadyCalled) return;\n alreadyCalled = true;\n values[$index] = value;\n --remaining || resolve(values);\n }, reject);\n });\n --remaining || resolve(values);\n });\n if (result.e) reject(result.v);\n return capability.promise;\n },\n // 25.4.4.4 Promise.race(iterable)\n race: function race(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var reject = capability.reject;\n var result = perform(function () {\n forOf(iterable, false, function (promise) {\n C.resolve(promise).then(capability.resolve, reject);\n });\n });\n if (result.e) reject(result.v);\n return capability.promise;\n }\n});\n","// 26.1.1 Reflect.apply(target, thisArgument, argumentsList)\nvar $export = require('./_export');\nvar aFunction = require('./_a-function');\nvar anObject = require('./_an-object');\nvar rApply = (require('./_global').Reflect || {}).apply;\nvar fApply = Function.apply;\n// MS Edge argumentsList argument is optional\n$export($export.S + $export.F * !require('./_fails')(function () {\n rApply(function () { /* empty */ });\n}), 'Reflect', {\n apply: function apply(target, thisArgument, argumentsList) {\n var T = aFunction(target);\n var L = anObject(argumentsList);\n return rApply ? rApply(T, thisArgument, L) : fApply.call(T, thisArgument, L);\n }\n});\n","// 26.1.2 Reflect.construct(target, argumentsList [, newTarget])\nvar $export = require('./_export');\nvar create = require('./_object-create');\nvar aFunction = require('./_a-function');\nvar anObject = require('./_an-object');\nvar isObject = require('./_is-object');\nvar fails = require('./_fails');\nvar bind = require('./_bind');\nvar rConstruct = (require('./_global').Reflect || {}).construct;\n\n// MS Edge supports only 2 arguments and argumentsList argument is optional\n// FF Nightly sets third argument as `new.target`, but does not create `this` from it\nvar NEW_TARGET_BUG = fails(function () {\n function F() { /* empty */ }\n return !(rConstruct(function () { /* empty */ }, [], F) instanceof F);\n});\nvar ARGS_BUG = !fails(function () {\n rConstruct(function () { /* empty */ });\n});\n\n$export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', {\n construct: function construct(Target, args /* , newTarget */) {\n aFunction(Target);\n anObject(args);\n var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]);\n if (ARGS_BUG && !NEW_TARGET_BUG) return rConstruct(Target, args, newTarget);\n if (Target == newTarget) {\n // w/o altered newTarget, optimization for 0-4 arguments\n switch (args.length) {\n case 0: return new Target();\n case 1: return new Target(args[0]);\n case 2: return new Target(args[0], args[1]);\n case 3: return new Target(args[0], args[1], args[2]);\n case 4: return new Target(args[0], args[1], args[2], args[3]);\n }\n // w/o altered newTarget, lot of arguments case\n var $args = [null];\n $args.push.apply($args, args);\n return new (bind.apply(Target, $args))();\n }\n // with altered newTarget, not support built-in constructors\n var proto = newTarget.prototype;\n var instance = create(isObject(proto) ? proto : Object.prototype);\n var result = Function.apply.call(Target, instance, args);\n return isObject(result) ? result : instance;\n }\n});\n","// 26.1.3 Reflect.defineProperty(target, propertyKey, attributes)\nvar dP = require('./_object-dp');\nvar $export = require('./_export');\nvar anObject = require('./_an-object');\nvar toPrimitive = require('./_to-primitive');\n\n// MS Edge has broken Reflect.defineProperty - throwing instead of returning false\n$export($export.S + $export.F * require('./_fails')(function () {\n // eslint-disable-next-line no-undef\n Reflect.defineProperty(dP.f({}, 1, { value: 1 }), 1, { value: 2 });\n}), 'Reflect', {\n defineProperty: function defineProperty(target, propertyKey, attributes) {\n anObject(target);\n propertyKey = toPrimitive(propertyKey, true);\n anObject(attributes);\n try {\n dP.f(target, propertyKey, attributes);\n return true;\n } catch (e) {\n return false;\n }\n }\n});\n","// 26.1.4 Reflect.deleteProperty(target, propertyKey)\nvar $export = require('./_export');\nvar gOPD = require('./_object-gopd').f;\nvar anObject = require('./_an-object');\n\n$export($export.S, 'Reflect', {\n deleteProperty: function deleteProperty(target, propertyKey) {\n var desc = gOPD(anObject(target), propertyKey);\n return desc && !desc.configurable ? false : delete target[propertyKey];\n }\n});\n","'use strict';\n// 26.1.5 Reflect.enumerate(target)\nvar $export = require('./_export');\nvar anObject = require('./_an-object');\nvar Enumerate = function (iterated) {\n this._t = anObject(iterated); // target\n this._i = 0; // next index\n var keys = this._k = []; // keys\n var key;\n for (key in iterated) keys.push(key);\n};\nrequire('./_iter-create')(Enumerate, 'Object', function () {\n var that = this;\n var keys = that._k;\n var key;\n do {\n if (that._i >= keys.length) return { value: undefined, done: true };\n } while (!((key = keys[that._i++]) in that._t));\n return { value: key, done: false };\n});\n\n$export($export.S, 'Reflect', {\n enumerate: function enumerate(target) {\n return new Enumerate(target);\n }\n});\n","// 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey)\nvar gOPD = require('./_object-gopd');\nvar $export = require('./_export');\nvar anObject = require('./_an-object');\n\n$export($export.S, 'Reflect', {\n getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey) {\n return gOPD.f(anObject(target), propertyKey);\n }\n});\n","// 26.1.8 Reflect.getPrototypeOf(target)\nvar $export = require('./_export');\nvar getProto = require('./_object-gpo');\nvar anObject = require('./_an-object');\n\n$export($export.S, 'Reflect', {\n getPrototypeOf: function getPrototypeOf(target) {\n return getProto(anObject(target));\n }\n});\n","// 26.1.6 Reflect.get(target, propertyKey [, receiver])\nvar gOPD = require('./_object-gopd');\nvar getPrototypeOf = require('./_object-gpo');\nvar has = require('./_has');\nvar $export = require('./_export');\nvar isObject = require('./_is-object');\nvar anObject = require('./_an-object');\n\nfunction get(target, propertyKey /* , receiver */) {\n var receiver = arguments.length < 3 ? target : arguments[2];\n var desc, proto;\n if (anObject(target) === receiver) return target[propertyKey];\n if (desc = gOPD.f(target, propertyKey)) return has(desc, 'value')\n ? desc.value\n : desc.get !== undefined\n ? desc.get.call(receiver)\n : undefined;\n if (isObject(proto = getPrototypeOf(target))) return get(proto, propertyKey, receiver);\n}\n\n$export($export.S, 'Reflect', { get: get });\n","// 26.1.9 Reflect.has(target, propertyKey)\nvar $export = require('./_export');\n\n$export($export.S, 'Reflect', {\n has: function has(target, propertyKey) {\n return propertyKey in target;\n }\n});\n","// 26.1.10 Reflect.isExtensible(target)\nvar $export = require('./_export');\nvar anObject = require('./_an-object');\nvar $isExtensible = Object.isExtensible;\n\n$export($export.S, 'Reflect', {\n isExtensible: function isExtensible(target) {\n anObject(target);\n return $isExtensible ? $isExtensible(target) : true;\n }\n});\n","// 26.1.11 Reflect.ownKeys(target)\nvar $export = require('./_export');\n\n$export($export.S, 'Reflect', { ownKeys: require('./_own-keys') });\n","// 26.1.12 Reflect.preventExtensions(target)\nvar $export = require('./_export');\nvar anObject = require('./_an-object');\nvar $preventExtensions = Object.preventExtensions;\n\n$export($export.S, 'Reflect', {\n preventExtensions: function preventExtensions(target) {\n anObject(target);\n try {\n if ($preventExtensions) $preventExtensions(target);\n return true;\n } catch (e) {\n return false;\n }\n }\n});\n","// 26.1.14 Reflect.setPrototypeOf(target, proto)\nvar $export = require('./_export');\nvar setProto = require('./_set-proto');\n\nif (setProto) $export($export.S, 'Reflect', {\n setPrototypeOf: function setPrototypeOf(target, proto) {\n setProto.check(target, proto);\n try {\n setProto.set(target, proto);\n return true;\n } catch (e) {\n return false;\n }\n }\n});\n","// 26.1.13 Reflect.set(target, propertyKey, V [, receiver])\nvar dP = require('./_object-dp');\nvar gOPD = require('./_object-gopd');\nvar getPrototypeOf = require('./_object-gpo');\nvar has = require('./_has');\nvar $export = require('./_export');\nvar createDesc = require('./_property-desc');\nvar anObject = require('./_an-object');\nvar isObject = require('./_is-object');\n\nfunction set(target, propertyKey, V /* , receiver */) {\n var receiver = arguments.length < 4 ? target : arguments[3];\n var ownDesc = gOPD.f(anObject(target), propertyKey);\n var existingDescriptor, proto;\n if (!ownDesc) {\n if (isObject(proto = getPrototypeOf(target))) {\n return set(proto, propertyKey, V, receiver);\n }\n ownDesc = createDesc(0);\n }\n if (has(ownDesc, 'value')) {\n if (ownDesc.writable === false || !isObject(receiver)) return false;\n if (existingDescriptor = gOPD.f(receiver, propertyKey)) {\n if (existingDescriptor.get || existingDescriptor.set || existingDescriptor.writable === false) return false;\n existingDescriptor.value = V;\n dP.f(receiver, propertyKey, existingDescriptor);\n } else dP.f(receiver, propertyKey, createDesc(0, V));\n return true;\n }\n return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true);\n}\n\n$export($export.S, 'Reflect', { set: set });\n","var global = require('./_global');\nvar inheritIfRequired = require('./_inherit-if-required');\nvar dP = require('./_object-dp').f;\nvar gOPN = require('./_object-gopn').f;\nvar isRegExp = require('./_is-regexp');\nvar $flags = require('./_flags');\nvar $RegExp = global.RegExp;\nvar Base = $RegExp;\nvar proto = $RegExp.prototype;\nvar re1 = /a/g;\nvar re2 = /a/g;\n// \"new\" creates a new object, old webkit buggy here\nvar CORRECT_NEW = new $RegExp(re1) !== re1;\n\nif (require('./_descriptors') && (!CORRECT_NEW || require('./_fails')(function () {\n re2[require('./_wks')('match')] = false;\n // RegExp constructor can alter flags and IsRegExp works correct with @@match\n return $RegExp(re1) != re1 || $RegExp(re2) == re2 || $RegExp(re1, 'i') != '/a/i';\n}))) {\n $RegExp = function RegExp(p, f) {\n var tiRE = this instanceof $RegExp;\n var piRE = isRegExp(p);\n var fiU = f === undefined;\n return !tiRE && piRE && p.constructor === $RegExp && fiU ? p\n : inheritIfRequired(CORRECT_NEW\n ? new Base(piRE && !fiU ? p.source : p, f)\n : Base((piRE = p instanceof $RegExp) ? p.source : p, piRE && fiU ? $flags.call(p) : f)\n , tiRE ? this : proto, $RegExp);\n };\n var proxy = function (key) {\n key in $RegExp || dP($RegExp, key, {\n configurable: true,\n get: function () { return Base[key]; },\n set: function (it) { Base[key] = it; }\n });\n };\n for (var keys = gOPN(Base), i = 0; keys.length > i;) proxy(keys[i++]);\n proto.constructor = $RegExp;\n $RegExp.prototype = proto;\n require('./_redefine')(global, 'RegExp', $RegExp);\n}\n\nrequire('./_set-species')('RegExp');\n","// 21.2.5.3 get RegExp.prototype.flags()\nif (require('./_descriptors') && /./g.flags != 'g') require('./_object-dp').f(RegExp.prototype, 'flags', {\n configurable: true,\n get: require('./_flags')\n});\n","// @@match logic\nrequire('./_fix-re-wks')('match', 1, function (defined, MATCH, $match) {\n // 21.1.3.11 String.prototype.match(regexp)\n return [function match(regexp) {\n 'use strict';\n var O = defined(this);\n var fn = regexp == undefined ? undefined : regexp[MATCH];\n return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));\n }, $match];\n});\n","// @@replace logic\nrequire('./_fix-re-wks')('replace', 2, function (defined, REPLACE, $replace) {\n // 21.1.3.14 String.prototype.replace(searchValue, replaceValue)\n return [function replace(searchValue, replaceValue) {\n 'use strict';\n var O = defined(this);\n var fn = searchValue == undefined ? undefined : searchValue[REPLACE];\n return fn !== undefined\n ? fn.call(searchValue, O, replaceValue)\n : $replace.call(String(O), searchValue, replaceValue);\n }, $replace];\n});\n","// @@search logic\nrequire('./_fix-re-wks')('search', 1, function (defined, SEARCH, $search) {\n // 21.1.3.15 String.prototype.search(regexp)\n return [function search(regexp) {\n 'use strict';\n var O = defined(this);\n var fn = regexp == undefined ? undefined : regexp[SEARCH];\n return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O));\n }, $search];\n});\n","// @@split logic\nrequire('./_fix-re-wks')('split', 2, function (defined, SPLIT, $split) {\n 'use strict';\n var isRegExp = require('./_is-regexp');\n var _split = $split;\n var $push = [].push;\n var $SPLIT = 'split';\n var LENGTH = 'length';\n var LAST_INDEX = 'lastIndex';\n if (\n 'abbc'[$SPLIT](/(b)*/)[1] == 'c' ||\n 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 ||\n 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 ||\n '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 ||\n '.'[$SPLIT](/()()/)[LENGTH] > 1 ||\n ''[$SPLIT](/.?/)[LENGTH]\n ) {\n var NPCG = /()??/.exec('')[1] === undefined; // nonparticipating capturing group\n // based on es5-shim implementation, need to rework it\n $split = function (separator, limit) {\n var string = String(this);\n if (separator === undefined && limit === 0) return [];\n // If `separator` is not a regex, use native split\n if (!isRegExp(separator)) return _split.call(string, separator, limit);\n var output = [];\n var flags = (separator.ignoreCase ? 'i' : '') +\n (separator.multiline ? 'm' : '') +\n (separator.unicode ? 'u' : '') +\n (separator.sticky ? 'y' : '');\n var lastLastIndex = 0;\n var splitLimit = limit === undefined ? 4294967295 : limit >>> 0;\n // Make `global` and avoid `lastIndex` issues by working with a copy\n var separatorCopy = new RegExp(separator.source, flags + 'g');\n var separator2, match, lastIndex, lastLength, i;\n // Doesn't need flags gy, but they don't hurt\n if (!NPCG) separator2 = new RegExp('^' + separatorCopy.source + '$(?!\\\\s)', flags);\n while (match = separatorCopy.exec(string)) {\n // `separatorCopy.lastIndex` is not reliable cross-browser\n lastIndex = match.index + match[0][LENGTH];\n if (lastIndex > lastLastIndex) {\n output.push(string.slice(lastLastIndex, match.index));\n // Fix browsers whose `exec` methods don't consistently return `undefined` for NPCG\n // eslint-disable-next-line no-loop-func\n if (!NPCG && match[LENGTH] > 1) match[0].replace(separator2, function () {\n for (i = 1; i < arguments[LENGTH] - 2; i++) if (arguments[i] === undefined) match[i] = undefined;\n });\n if (match[LENGTH] > 1 && match.index < string[LENGTH]) $push.apply(output, match.slice(1));\n lastLength = match[0][LENGTH];\n lastLastIndex = lastIndex;\n if (output[LENGTH] >= splitLimit) break;\n }\n if (separatorCopy[LAST_INDEX] === match.index) separatorCopy[LAST_INDEX]++; // Avoid an infinite loop\n }\n if (lastLastIndex === string[LENGTH]) {\n if (lastLength || !separatorCopy.test('')) output.push('');\n } else output.push(string.slice(lastLastIndex));\n return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output;\n };\n // Chakra, V8\n } else if ('0'[$SPLIT](undefined, 0)[LENGTH]) {\n $split = function (separator, limit) {\n return separator === undefined && limit === 0 ? [] : _split.call(this, separator, limit);\n };\n }\n // 21.1.3.17 String.prototype.split(separator, limit)\n return [function split(separator, limit) {\n var O = defined(this);\n var fn = separator == undefined ? undefined : separator[SPLIT];\n return fn !== undefined ? fn.call(separator, O, limit) : $split.call(String(O), separator, limit);\n }, $split];\n});\n","'use strict';\nrequire('./es6.regexp.flags');\nvar anObject = require('./_an-object');\nvar $flags = require('./_flags');\nvar DESCRIPTORS = require('./_descriptors');\nvar TO_STRING = 'toString';\nvar $toString = /./[TO_STRING];\n\nvar define = function (fn) {\n require('./_redefine')(RegExp.prototype, TO_STRING, fn, true);\n};\n\n// 21.2.5.14 RegExp.prototype.toString()\nif (require('./_fails')(function () { return $toString.call({ source: 'a', flags: 'b' }) != '/a/b'; })) {\n define(function toString() {\n var R = anObject(this);\n return '/'.concat(R.source, '/',\n 'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined);\n });\n// FF44- RegExp#toString has a wrong name\n} else if ($toString.name != TO_STRING) {\n define(function toString() {\n return $toString.call(this);\n });\n}\n","'use strict';\nvar strong = require('./_collection-strong');\nvar validate = require('./_validate-collection');\nvar SET = 'Set';\n\n// 23.2 Set Objects\nmodule.exports = require('./_collection')(SET, function (get) {\n return function Set() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };\n}, {\n // 23.2.3.1 Set.prototype.add(value)\n add: function add(value) {\n return strong.def(validate(this, SET), value = value === 0 ? 0 : value, value);\n }\n}, strong);\n","'use strict';\n// B.2.3.2 String.prototype.anchor(name)\nrequire('./_string-html')('anchor', function (createHTML) {\n return function anchor(name) {\n return createHTML(this, 'a', 'name', name);\n };\n});\n","'use strict';\n// B.2.3.3 String.prototype.big()\nrequire('./_string-html')('big', function (createHTML) {\n return function big() {\n return createHTML(this, 'big', '', '');\n };\n});\n","'use strict';\n// B.2.3.4 String.prototype.blink()\nrequire('./_string-html')('blink', function (createHTML) {\n return function blink() {\n return createHTML(this, 'blink', '', '');\n };\n});\n","'use strict';\n// B.2.3.5 String.prototype.bold()\nrequire('./_string-html')('bold', function (createHTML) {\n return function bold() {\n return createHTML(this, 'b', '', '');\n };\n});\n","'use strict';\nvar $export = require('./_export');\nvar $at = require('./_string-at')(false);\n$export($export.P, 'String', {\n // 21.1.3.3 String.prototype.codePointAt(pos)\n codePointAt: function codePointAt(pos) {\n return $at(this, pos);\n }\n});\n","// 21.1.3.6 String.prototype.endsWith(searchString [, endPosition])\n'use strict';\nvar $export = require('./_export');\nvar toLength = require('./_to-length');\nvar context = require('./_string-context');\nvar ENDS_WITH = 'endsWith';\nvar $endsWith = ''[ENDS_WITH];\n\n$export($export.P + $export.F * require('./_fails-is-regexp')(ENDS_WITH), 'String', {\n endsWith: function endsWith(searchString /* , endPosition = @length */) {\n var that = context(this, searchString, ENDS_WITH);\n var endPosition = arguments.length > 1 ? arguments[1] : undefined;\n var len = toLength(that.length);\n var end = endPosition === undefined ? len : Math.min(toLength(endPosition), len);\n var search = String(searchString);\n return $endsWith\n ? $endsWith.call(that, search, end)\n : that.slice(end - search.length, end) === search;\n }\n});\n","'use strict';\n// B.2.3.6 String.prototype.fixed()\nrequire('./_string-html')('fixed', function (createHTML) {\n return function fixed() {\n return createHTML(this, 'tt', '', '');\n };\n});\n","'use strict';\n// B.2.3.7 String.prototype.fontcolor(color)\nrequire('./_string-html')('fontcolor', function (createHTML) {\n return function fontcolor(color) {\n return createHTML(this, 'font', 'color', color);\n };\n});\n","'use strict';\n// B.2.3.8 String.prototype.fontsize(size)\nrequire('./_string-html')('fontsize', function (createHTML) {\n return function fontsize(size) {\n return createHTML(this, 'font', 'size', size);\n };\n});\n","var $export = require('./_export');\nvar toAbsoluteIndex = require('./_to-absolute-index');\nvar fromCharCode = String.fromCharCode;\nvar $fromCodePoint = String.fromCodePoint;\n\n// length should be 1, old FF problem\n$export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', {\n // 21.1.2.2 String.fromCodePoint(...codePoints)\n fromCodePoint: function fromCodePoint(x) { // eslint-disable-line no-unused-vars\n var res = [];\n var aLen = arguments.length;\n var i = 0;\n var code;\n while (aLen > i) {\n code = +arguments[i++];\n if (toAbsoluteIndex(code, 0x10ffff) !== code) throw RangeError(code + ' is not a valid code point');\n res.push(code < 0x10000\n ? fromCharCode(code)\n : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00)\n );\n } return res.join('');\n }\n});\n","// 21.1.3.7 String.prototype.includes(searchString, position = 0)\n'use strict';\nvar $export = require('./_export');\nvar context = require('./_string-context');\nvar INCLUDES = 'includes';\n\n$export($export.P + $export.F * require('./_fails-is-regexp')(INCLUDES), 'String', {\n includes: function includes(searchString /* , position = 0 */) {\n return !!~context(this, searchString, INCLUDES)\n .indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n","'use strict';\n// B.2.3.9 String.prototype.italics()\nrequire('./_string-html')('italics', function (createHTML) {\n return function italics() {\n return createHTML(this, 'i', '', '');\n };\n});\n","'use strict';\nvar $at = require('./_string-at')(true);\n\n// 21.1.3.27 String.prototype[@@iterator]()\nrequire('./_iter-define')(String, 'String', function (iterated) {\n this._t = String(iterated); // target\n this._i = 0; // next index\n// 21.1.5.2.1 %StringIteratorPrototype%.next()\n}, function () {\n var O = this._t;\n var index = this._i;\n var point;\n if (index >= O.length) return { value: undefined, done: true };\n point = $at(O, index);\n this._i += point.length;\n return { value: point, done: false };\n});\n","'use strict';\n// B.2.3.10 String.prototype.link(url)\nrequire('./_string-html')('link', function (createHTML) {\n return function link(url) {\n return createHTML(this, 'a', 'href', url);\n };\n});\n","var $export = require('./_export');\nvar toIObject = require('./_to-iobject');\nvar toLength = require('./_to-length');\n\n$export($export.S, 'String', {\n // 21.1.2.4 String.raw(callSite, ...substitutions)\n raw: function raw(callSite) {\n var tpl = toIObject(callSite.raw);\n var len = toLength(tpl.length);\n var aLen = arguments.length;\n var res = [];\n var i = 0;\n while (len > i) {\n res.push(String(tpl[i++]));\n if (i < aLen) res.push(String(arguments[i]));\n } return res.join('');\n }\n});\n","var $export = require('./_export');\n\n$export($export.P, 'String', {\n // 21.1.3.13 String.prototype.repeat(count)\n repeat: require('./_string-repeat')\n});\n","'use strict';\n// B.2.3.11 String.prototype.small()\nrequire('./_string-html')('small', function (createHTML) {\n return function small() {\n return createHTML(this, 'small', '', '');\n };\n});\n","// 21.1.3.18 String.prototype.startsWith(searchString [, position ])\n'use strict';\nvar $export = require('./_export');\nvar toLength = require('./_to-length');\nvar context = require('./_string-context');\nvar STARTS_WITH = 'startsWith';\nvar $startsWith = ''[STARTS_WITH];\n\n$export($export.P + $export.F * require('./_fails-is-regexp')(STARTS_WITH), 'String', {\n startsWith: function startsWith(searchString /* , position = 0 */) {\n var that = context(this, searchString, STARTS_WITH);\n var index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length));\n var search = String(searchString);\n return $startsWith\n ? $startsWith.call(that, search, index)\n : that.slice(index, index + search.length) === search;\n }\n});\n","'use strict';\n// B.2.3.12 String.prototype.strike()\nrequire('./_string-html')('strike', function (createHTML) {\n return function strike() {\n return createHTML(this, 'strike', '', '');\n };\n});\n","'use strict';\n// B.2.3.13 String.prototype.sub()\nrequire('./_string-html')('sub', function (createHTML) {\n return function sub() {\n return createHTML(this, 'sub', '', '');\n };\n});\n","'use strict';\n// B.2.3.14 String.prototype.sup()\nrequire('./_string-html')('sup', function (createHTML) {\n return function sup() {\n return createHTML(this, 'sup', '', '');\n };\n});\n","'use strict';\n// 21.1.3.25 String.prototype.trim()\nrequire('./_string-trim')('trim', function ($trim) {\n return function trim() {\n return $trim(this, 3);\n };\n});\n","'use strict';\n// ECMAScript 6 symbols shim\nvar global = require('./_global');\nvar has = require('./_has');\nvar DESCRIPTORS = require('./_descriptors');\nvar $export = require('./_export');\nvar redefine = require('./_redefine');\nvar META = require('./_meta').KEY;\nvar $fails = require('./_fails');\nvar shared = require('./_shared');\nvar setToStringTag = require('./_set-to-string-tag');\nvar uid = require('./_uid');\nvar wks = require('./_wks');\nvar wksExt = require('./_wks-ext');\nvar wksDefine = require('./_wks-define');\nvar enumKeys = require('./_enum-keys');\nvar isArray = require('./_is-array');\nvar anObject = require('./_an-object');\nvar isObject = require('./_is-object');\nvar toIObject = require('./_to-iobject');\nvar toPrimitive = require('./_to-primitive');\nvar createDesc = require('./_property-desc');\nvar _create = require('./_object-create');\nvar gOPNExt = require('./_object-gopn-ext');\nvar $GOPD = require('./_object-gopd');\nvar $DP = require('./_object-dp');\nvar $keys = require('./_object-keys');\nvar gOPD = $GOPD.f;\nvar dP = $DP.f;\nvar gOPN = gOPNExt.f;\nvar $Symbol = global.Symbol;\nvar $JSON = global.JSON;\nvar _stringify = $JSON && $JSON.stringify;\nvar PROTOTYPE = 'prototype';\nvar HIDDEN = wks('_hidden');\nvar TO_PRIMITIVE = wks('toPrimitive');\nvar isEnum = {}.propertyIsEnumerable;\nvar SymbolRegistry = shared('symbol-registry');\nvar AllSymbols = shared('symbols');\nvar OPSymbols = shared('op-symbols');\nvar ObjectProto = Object[PROTOTYPE];\nvar USE_NATIVE = typeof $Symbol == 'function';\nvar QObject = global.QObject;\n// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173\nvar setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;\n\n// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\nvar setSymbolDesc = DESCRIPTORS && $fails(function () {\n return _create(dP({}, 'a', {\n get: function () { return dP(this, 'a', { value: 7 }).a; }\n })).a != 7;\n}) ? function (it, key, D) {\n var protoDesc = gOPD(ObjectProto, key);\n if (protoDesc) delete ObjectProto[key];\n dP(it, key, D);\n if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc);\n} : dP;\n\nvar wrap = function (tag) {\n var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);\n sym._k = tag;\n return sym;\n};\n\nvar isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) {\n return typeof it == 'symbol';\n} : function (it) {\n return it instanceof $Symbol;\n};\n\nvar $defineProperty = function defineProperty(it, key, D) {\n if (it === ObjectProto) $defineProperty(OPSymbols, key, D);\n anObject(it);\n key = toPrimitive(key, true);\n anObject(D);\n if (has(AllSymbols, key)) {\n if (!D.enumerable) {\n if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {}));\n it[HIDDEN][key] = true;\n } else {\n if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;\n D = _create(D, { enumerable: createDesc(0, false) });\n } return setSymbolDesc(it, key, D);\n } return dP(it, key, D);\n};\nvar $defineProperties = function defineProperties(it, P) {\n anObject(it);\n var keys = enumKeys(P = toIObject(P));\n var i = 0;\n var l = keys.length;\n var key;\n while (l > i) $defineProperty(it, key = keys[i++], P[key]);\n return it;\n};\nvar $create = function create(it, P) {\n return P === undefined ? _create(it) : $defineProperties(_create(it), P);\n};\nvar $propertyIsEnumerable = function propertyIsEnumerable(key) {\n var E = isEnum.call(this, key = toPrimitive(key, true));\n if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false;\n return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;\n};\nvar $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {\n it = toIObject(it);\n key = toPrimitive(key, true);\n if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return;\n var D = gOPD(it, key);\n if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;\n return D;\n};\nvar $getOwnPropertyNames = function getOwnPropertyNames(it) {\n var names = gOPN(toIObject(it));\n var result = [];\n var i = 0;\n var key;\n while (names.length > i) {\n if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);\n } return result;\n};\nvar $getOwnPropertySymbols = function getOwnPropertySymbols(it) {\n var IS_OP = it === ObjectProto;\n var names = gOPN(IS_OP ? OPSymbols : toIObject(it));\n var result = [];\n var i = 0;\n var key;\n while (names.length > i) {\n if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]);\n } return result;\n};\n\n// 19.4.1.1 Symbol([description])\nif (!USE_NATIVE) {\n $Symbol = function Symbol() {\n if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');\n var tag = uid(arguments.length > 0 ? arguments[0] : undefined);\n var $set = function (value) {\n if (this === ObjectProto) $set.call(OPSymbols, value);\n if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;\n setSymbolDesc(this, tag, createDesc(1, value));\n };\n if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set });\n return wrap(tag);\n };\n redefine($Symbol[PROTOTYPE], 'toString', function toString() {\n return this._k;\n });\n\n $GOPD.f = $getOwnPropertyDescriptor;\n $DP.f = $defineProperty;\n require('./_object-gopn').f = gOPNExt.f = $getOwnPropertyNames;\n require('./_object-pie').f = $propertyIsEnumerable;\n require('./_object-gops').f = $getOwnPropertySymbols;\n\n if (DESCRIPTORS && !require('./_library')) {\n redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);\n }\n\n wksExt.f = function (name) {\n return wrap(wks(name));\n };\n}\n\n$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol });\n\nfor (var es6Symbols = (\n // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14\n 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'\n).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]);\n\nfor (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]);\n\n$export($export.S + $export.F * !USE_NATIVE, 'Symbol', {\n // 19.4.2.1 Symbol.for(key)\n 'for': function (key) {\n return has(SymbolRegistry, key += '')\n ? SymbolRegistry[key]\n : SymbolRegistry[key] = $Symbol(key);\n },\n // 19.4.2.5 Symbol.keyFor(sym)\n keyFor: function keyFor(sym) {\n if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!');\n for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key;\n },\n useSetter: function () { setter = true; },\n useSimple: function () { setter = false; }\n});\n\n$export($export.S + $export.F * !USE_NATIVE, 'Object', {\n // 19.1.2.2 Object.create(O [, Properties])\n create: $create,\n // 19.1.2.4 Object.defineProperty(O, P, Attributes)\n defineProperty: $defineProperty,\n // 19.1.2.3 Object.defineProperties(O, Properties)\n defineProperties: $defineProperties,\n // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)\n getOwnPropertyDescriptor: $getOwnPropertyDescriptor,\n // 19.1.2.7 Object.getOwnPropertyNames(O)\n getOwnPropertyNames: $getOwnPropertyNames,\n // 19.1.2.8 Object.getOwnPropertySymbols(O)\n getOwnPropertySymbols: $getOwnPropertySymbols\n});\n\n// 24.3.2 JSON.stringify(value [, replacer [, space]])\n$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {\n var S = $Symbol();\n // MS Edge converts symbol values to JSON as {}\n // WebKit converts symbol values to JSON as null\n // V8 throws on boxed symbols\n return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}';\n})), 'JSON', {\n stringify: function stringify(it) {\n var args = [it];\n var i = 1;\n var replacer, $replacer;\n while (arguments.length > i) args.push(arguments[i++]);\n $replacer = replacer = args[1];\n if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined\n if (!isArray(replacer)) replacer = function (key, value) {\n if (typeof $replacer == 'function') value = $replacer.call(this, key, value);\n if (!isSymbol(value)) return value;\n };\n args[1] = replacer;\n return _stringify.apply($JSON, args);\n }\n});\n\n// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)\n$Symbol[PROTOTYPE][TO_PRIMITIVE] || require('./_hide')($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);\n// 19.4.3.5 Symbol.prototype[@@toStringTag]\nsetToStringTag($Symbol, 'Symbol');\n// 20.2.1.9 Math[@@toStringTag]\nsetToStringTag(Math, 'Math', true);\n// 24.3.3 JSON[@@toStringTag]\nsetToStringTag(global.JSON, 'JSON', true);\n","'use strict';\nvar $export = require('./_export');\nvar $typed = require('./_typed');\nvar buffer = require('./_typed-buffer');\nvar anObject = require('./_an-object');\nvar toAbsoluteIndex = require('./_to-absolute-index');\nvar toLength = require('./_to-length');\nvar isObject = require('./_is-object');\nvar ArrayBuffer = require('./_global').ArrayBuffer;\nvar speciesConstructor = require('./_species-constructor');\nvar $ArrayBuffer = buffer.ArrayBuffer;\nvar $DataView = buffer.DataView;\nvar $isView = $typed.ABV && ArrayBuffer.isView;\nvar $slice = $ArrayBuffer.prototype.slice;\nvar VIEW = $typed.VIEW;\nvar ARRAY_BUFFER = 'ArrayBuffer';\n\n$export($export.G + $export.W + $export.F * (ArrayBuffer !== $ArrayBuffer), { ArrayBuffer: $ArrayBuffer });\n\n$export($export.S + $export.F * !$typed.CONSTR, ARRAY_BUFFER, {\n // 24.1.3.1 ArrayBuffer.isView(arg)\n isView: function isView(it) {\n return $isView && $isView(it) || isObject(it) && VIEW in it;\n }\n});\n\n$export($export.P + $export.U + $export.F * require('./_fails')(function () {\n return !new $ArrayBuffer(2).slice(1, undefined).byteLength;\n}), ARRAY_BUFFER, {\n // 24.1.4.3 ArrayBuffer.prototype.slice(start, end)\n slice: function slice(start, end) {\n if ($slice !== undefined && end === undefined) return $slice.call(anObject(this), start); // FF fix\n var len = anObject(this).byteLength;\n var first = toAbsoluteIndex(start, len);\n var fin = toAbsoluteIndex(end === undefined ? len : end, len);\n var result = new (speciesConstructor(this, $ArrayBuffer))(toLength(fin - first));\n var viewS = new $DataView(this);\n var viewT = new $DataView(result);\n var index = 0;\n while (first < fin) {\n viewT.setUint8(index++, viewS.getUint8(first++));\n } return result;\n }\n});\n\nrequire('./_set-species')(ARRAY_BUFFER);\n","var $export = require('./_export');\n$export($export.G + $export.W + $export.F * !require('./_typed').ABV, {\n DataView: require('./_typed-buffer').DataView\n});\n","require('./_typed-array')('Float32', 4, function (init) {\n return function Float32Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n","require('./_typed-array')('Float64', 8, function (init) {\n return function Float64Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n","require('./_typed-array')('Int16', 2, function (init) {\n return function Int16Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n","require('./_typed-array')('Int32', 4, function (init) {\n return function Int32Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n","require('./_typed-array')('Int8', 1, function (init) {\n return function Int8Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n","require('./_typed-array')('Uint16', 2, function (init) {\n return function Uint16Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n","require('./_typed-array')('Uint32', 4, function (init) {\n return function Uint32Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n","require('./_typed-array')('Uint8', 1, function (init) {\n return function Uint8Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n","require('./_typed-array')('Uint8', 1, function (init) {\n return function Uint8ClampedArray(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n}, true);\n","'use strict';\nvar each = require('./_array-methods')(0);\nvar redefine = require('./_redefine');\nvar meta = require('./_meta');\nvar assign = require('./_object-assign');\nvar weak = require('./_collection-weak');\nvar isObject = require('./_is-object');\nvar fails = require('./_fails');\nvar validate = require('./_validate-collection');\nvar WEAK_MAP = 'WeakMap';\nvar getWeak = meta.getWeak;\nvar isExtensible = Object.isExtensible;\nvar uncaughtFrozenStore = weak.ufstore;\nvar tmp = {};\nvar InternalMap;\n\nvar wrapper = function (get) {\n return function WeakMap() {\n return get(this, arguments.length > 0 ? arguments[0] : undefined);\n };\n};\n\nvar methods = {\n // 23.3.3.3 WeakMap.prototype.get(key)\n get: function get(key) {\n if (isObject(key)) {\n var data = getWeak(key);\n if (data === true) return uncaughtFrozenStore(validate(this, WEAK_MAP)).get(key);\n return data ? data[this._i] : undefined;\n }\n },\n // 23.3.3.5 WeakMap.prototype.set(key, value)\n set: function set(key, value) {\n return weak.def(validate(this, WEAK_MAP), key, value);\n }\n};\n\n// 23.3 WeakMap Objects\nvar $WeakMap = module.exports = require('./_collection')(WEAK_MAP, wrapper, methods, weak, true, true);\n\n// IE11 WeakMap frozen keys fix\nif (fails(function () { return new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7; })) {\n InternalMap = weak.getConstructor(wrapper, WEAK_MAP);\n assign(InternalMap.prototype, methods);\n meta.NEED = true;\n each(['delete', 'has', 'get', 'set'], function (key) {\n var proto = $WeakMap.prototype;\n var method = proto[key];\n redefine(proto, key, function (a, b) {\n // store frozen objects on internal weakmap shim\n if (isObject(a) && !isExtensible(a)) {\n if (!this._f) this._f = new InternalMap();\n var result = this._f[key](a, b);\n return key == 'set' ? this : result;\n // store all the rest on native weakmap\n } return method.call(this, a, b);\n });\n });\n}\n","'use strict';\nvar weak = require('./_collection-weak');\nvar validate = require('./_validate-collection');\nvar WEAK_SET = 'WeakSet';\n\n// 23.4 WeakSet Objects\nrequire('./_collection')(WEAK_SET, function (get) {\n return function WeakSet() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };\n}, {\n // 23.4.3.1 WeakSet.prototype.add(value)\n add: function add(value) {\n return weak.def(validate(this, WEAK_SET), value, true);\n }\n}, weak, false, true);\n","'use strict';\n// https://github.com/tc39/Array.prototype.includes\nvar $export = require('./_export');\nvar $includes = require('./_array-includes')(true);\n\n$export($export.P, 'Array', {\n includes: function includes(el /* , fromIndex = 0 */) {\n return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\nrequire('./_add-to-unscopables')('includes');\n","// https://github.com/tc39/proposal-object-values-entries\nvar $export = require('./_export');\nvar $entries = require('./_object-to-array')(true);\n\n$export($export.S, 'Object', {\n entries: function entries(it) {\n return $entries(it);\n }\n});\n","// https://github.com/tc39/proposal-object-getownpropertydescriptors\nvar $export = require('./_export');\nvar ownKeys = require('./_own-keys');\nvar toIObject = require('./_to-iobject');\nvar gOPD = require('./_object-gopd');\nvar createProperty = require('./_create-property');\n\n$export($export.S, 'Object', {\n getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) {\n var O = toIObject(object);\n var getDesc = gOPD.f;\n var keys = ownKeys(O);\n var result = {};\n var i = 0;\n var key, desc;\n while (keys.length > i) {\n desc = getDesc(O, key = keys[i++]);\n if (desc !== undefined) createProperty(result, key, desc);\n }\n return result;\n }\n});\n","// https://github.com/tc39/proposal-object-values-entries\nvar $export = require('./_export');\nvar $values = require('./_object-to-array')(false);\n\n$export($export.S, 'Object', {\n values: function values(it) {\n return $values(it);\n }\n});\n","// https://github.com/tc39/proposal-promise-finally\n'use strict';\nvar $export = require('./_export');\nvar core = require('./_core');\nvar global = require('./_global');\nvar speciesConstructor = require('./_species-constructor');\nvar promiseResolve = require('./_promise-resolve');\n\n$export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) {\n var C = speciesConstructor(this, core.Promise || global.Promise);\n var isFunction = typeof onFinally == 'function';\n return this.then(\n isFunction ? function (x) {\n return promiseResolve(C, onFinally()).then(function () { return x; });\n } : onFinally,\n isFunction ? function (e) {\n return promiseResolve(C, onFinally()).then(function () { throw e; });\n } : onFinally\n );\n} });\n","'use strict';\n// https://github.com/tc39/proposal-string-pad-start-end\nvar $export = require('./_export');\nvar $pad = require('./_string-pad');\nvar userAgent = require('./_user-agent');\n\n// https://github.com/zloirock/core-js/issues/280\n$export($export.P + $export.F * /Version\\/10\\.\\d+(\\.\\d+)? Safari\\//.test(userAgent), 'String', {\n padEnd: function padEnd(maxLength /* , fillString = ' ' */) {\n return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false);\n }\n});\n","'use strict';\n// https://github.com/tc39/proposal-string-pad-start-end\nvar $export = require('./_export');\nvar $pad = require('./_string-pad');\nvar userAgent = require('./_user-agent');\n\n// https://github.com/zloirock/core-js/issues/280\n$export($export.P + $export.F * /Version\\/10\\.\\d+(\\.\\d+)? Safari\\//.test(userAgent), 'String', {\n padStart: function padStart(maxLength /* , fillString = ' ' */) {\n return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true);\n }\n});\n","require('./_wks-define')('asyncIterator');\n","var $iterators = require('./es6.array.iterator');\nvar getKeys = require('./_object-keys');\nvar redefine = require('./_redefine');\nvar global = require('./_global');\nvar hide = require('./_hide');\nvar Iterators = require('./_iterators');\nvar wks = require('./_wks');\nvar ITERATOR = wks('iterator');\nvar TO_STRING_TAG = wks('toStringTag');\nvar ArrayValues = Iterators.Array;\n\nvar DOMIterables = {\n CSSRuleList: true, // TODO: Not spec compliant, should be false.\n CSSStyleDeclaration: false,\n CSSValueList: false,\n ClientRectList: false,\n DOMRectList: false,\n DOMStringList: false,\n DOMTokenList: true,\n DataTransferItemList: false,\n FileList: false,\n HTMLAllCollection: false,\n HTMLCollection: false,\n HTMLFormElement: false,\n HTMLSelectElement: false,\n MediaList: true, // TODO: Not spec compliant, should be false.\n MimeTypeArray: false,\n NamedNodeMap: false,\n NodeList: true,\n PaintRequestList: false,\n Plugin: false,\n PluginArray: false,\n SVGLengthList: false,\n SVGNumberList: false,\n SVGPathSegList: false,\n SVGPointList: false,\n SVGStringList: false,\n SVGTransformList: false,\n SourceBufferList: false,\n StyleSheetList: true, // TODO: Not spec compliant, should be false.\n TextTrackCueList: false,\n TextTrackList: false,\n TouchList: false\n};\n\nfor (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) {\n var NAME = collections[i];\n var explicit = DOMIterables[NAME];\n var Collection = global[NAME];\n var proto = Collection && Collection.prototype;\n var key;\n if (proto) {\n if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues);\n if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);\n Iterators[NAME] = ArrayValues;\n if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true);\n }\n}\n","var $export = require('./_export');\nvar $task = require('./_task');\n$export($export.G + $export.B, {\n setImmediate: $task.set,\n clearImmediate: $task.clear\n});\n","// ie9- setTimeout & setInterval additional parameters fix\nvar global = require('./_global');\nvar $export = require('./_export');\nvar userAgent = require('./_user-agent');\nvar slice = [].slice;\nvar MSIE = /MSIE .\\./.test(userAgent); // <- dirty ie9- check\nvar wrap = function (set) {\n return function (fn, time /* , ...args */) {\n var boundArgs = arguments.length > 2;\n var args = boundArgs ? slice.call(arguments, 2) : false;\n return set(boundArgs ? function () {\n // eslint-disable-next-line no-new-func\n (typeof fn == 'function' ? fn : Function(fn)).apply(this, args);\n } : fn, time);\n };\n};\n$export($export.G + $export.B + $export.F * MSIE, {\n setTimeout: wrap(global.setTimeout),\n setInterval: wrap(global.setInterval)\n});\n","require('../modules/web.timers');\nrequire('../modules/web.immediate');\nrequire('../modules/web.dom.iterable');\nmodule.exports = require('../modules/_core');\n","/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\nmodule.exports = function(useSourceMap) {\n\tvar list = [];\n\n\t// return the list of modules as css string\n\tlist.toString = function toString() {\n\t\treturn this.map(function (item) {\n\t\t\tvar content = cssWithMappingToString(item, useSourceMap);\n\t\t\tif(item[2]) {\n\t\t\t\treturn \"@media \" + item[2] + \"{\" + content + \"}\";\n\t\t\t} else {\n\t\t\t\treturn content;\n\t\t\t}\n\t\t}).join(\"\");\n\t};\n\n\t// import a list of modules into the list\n\tlist.i = function(modules, mediaQuery) {\n\t\tif(typeof modules === \"string\")\n\t\t\tmodules = [[null, modules, \"\"]];\n\t\tvar alreadyImportedModules = {};\n\t\tfor(var i = 0; i < this.length; i++) {\n\t\t\tvar id = this[i][0];\n\t\t\tif(typeof id === \"number\")\n\t\t\t\talreadyImportedModules[id] = true;\n\t\t}\n\t\tfor(i = 0; i < modules.length; i++) {\n\t\t\tvar item = modules[i];\n\t\t\t// skip already imported module\n\t\t\t// this implementation is not 100% perfect for weird media query combinations\n\t\t\t// when a module is imported multiple times with different media queries.\n\t\t\t// I hope this will never occur (Hey this way we have smaller bundles)\n\t\t\tif(typeof item[0] !== \"number\" || !alreadyImportedModules[item[0]]) {\n\t\t\t\tif(mediaQuery && !item[2]) {\n\t\t\t\t\titem[2] = mediaQuery;\n\t\t\t\t} else if(mediaQuery) {\n\t\t\t\t\titem[2] = \"(\" + item[2] + \") and (\" + mediaQuery + \")\";\n\t\t\t\t}\n\t\t\t\tlist.push(item);\n\t\t\t}\n\t\t}\n\t};\n\treturn list;\n};\n\nfunction cssWithMappingToString(item, useSourceMap) {\n\tvar content = item[1] || '';\n\tvar cssMapping = item[3];\n\tif (!cssMapping) {\n\t\treturn content;\n\t}\n\n\tif (useSourceMap && typeof btoa === 'function') {\n\t\tvar sourceMapping = toComment(cssMapping);\n\t\tvar sourceURLs = cssMapping.sources.map(function (source) {\n\t\t\treturn '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */'\n\t\t});\n\n\t\treturn [content].concat(sourceURLs).concat([sourceMapping]).join('\\n');\n\t}\n\n\treturn [content].join('\\n');\n}\n\n// Adapted from convert-source-map (MIT)\nfunction toComment(sourceMap) {\n\t// eslint-disable-next-line no-undef\n\tvar base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));\n\tvar data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;\n\n\treturn '/*# ' + data + ' */';\n}\n","(function (root, factory) {\n if (typeof define === 'function' && define.amd) {\n define('html-janitor', factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.HTMLJanitor = factory();\n }\n}(this, function () {\n\n /**\n * @param {Object} config.tags Dictionary of allowed tags.\n * @param {boolean} config.keepNestedBlockElements Default false.\n */\n function HTMLJanitor(config) {\n\n var tagDefinitions = config['tags'];\n var tags = Object.keys(tagDefinitions);\n\n var validConfigValues = tags\n .map(function(k) { return typeof tagDefinitions[k]; })\n .every(function(type) { return type === 'object' || type === 'boolean' || type === 'function'; });\n\n if(!validConfigValues) {\n throw new Error(\"The configuration was invalid\");\n }\n\n this.config = config;\n }\n\n // TODO: not exhaustive?\n var blockElementNames = ['P', 'LI', 'TD', 'TH', 'DIV', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'PRE'];\n function isBlockElement(node) {\n return blockElementNames.indexOf(node.nodeName) !== -1;\n }\n\n var inlineElementNames = ['A', 'B', 'STRONG', 'I', 'EM', 'SUB', 'SUP', 'U', 'STRIKE'];\n function isInlineElement(node) {\n return inlineElementNames.indexOf(node.nodeName) !== -1;\n }\n\n HTMLJanitor.prototype.clean = function (html) {\n const sandbox = document.implementation.createHTMLDocument();\n const root = sandbox.createElement(\"div\");\n root.innerHTML = html;\n\n this._sanitize(sandbox, root);\n\n return root.innerHTML;\n };\n\n HTMLJanitor.prototype._sanitize = function (document, parentNode) {\n var treeWalker = createTreeWalker(document, parentNode);\n var node = treeWalker.firstChild();\n\n if (!node) { return; }\n\n do {\n if (node.nodeType === Node.TEXT_NODE) {\n // If this text node is just whitespace and the previous or next element\n // sibling is a block element, remove it\n // N.B.: This heuristic could change. Very specific to a bug with\n // `contenteditable` in Firefox: http://jsbin.com/EyuKase/1/edit?js,output\n // FIXME: make this an option?\n if (node.data.trim() === ''\n && ((node.previousElementSibling && isBlockElement(node.previousElementSibling))\n || (node.nextElementSibling && isBlockElement(node.nextElementSibling)))) {\n parentNode.removeChild(node);\n this._sanitize(document, parentNode);\n break;\n } else {\n continue;\n }\n }\n\n // Remove all comments\n if (node.nodeType === Node.COMMENT_NODE) {\n parentNode.removeChild(node);\n this._sanitize(document, parentNode);\n break;\n }\n\n var isInline = isInlineElement(node);\n var containsBlockElement;\n if (isInline) {\n containsBlockElement = Array.prototype.some.call(node.childNodes, isBlockElement);\n }\n\n // Block elements should not be nested (e.g.
  • ...); if\n // they are, we want to unwrap the inner block element.\n var isNotTopContainer = !! parentNode.parentNode;\n var isNestedBlockElement =\n isBlockElement(parentNode) &&\n isBlockElement(node) &&\n isNotTopContainer;\n\n var nodeName = node.nodeName.toLowerCase();\n\n var allowedAttrs = getAllowedAttrs(this.config, nodeName, node);\n\n var isInvalid = isInline && containsBlockElement;\n\n // Drop tag entirely according to the whitelist *and* if the markup\n // is invalid.\n if (isInvalid || shouldRejectNode(node, allowedAttrs)\n || (!this.config.keepNestedBlockElements && isNestedBlockElement)) {\n // Do not keep the inner text of SCRIPT/STYLE elements.\n if (! (node.nodeName === 'SCRIPT' || node.nodeName === 'STYLE')) {\n while (node.childNodes.length > 0) {\n parentNode.insertBefore(node.childNodes[0], node);\n }\n }\n parentNode.removeChild(node);\n\n this._sanitize(document, parentNode);\n break;\n }\n\n // Sanitize attributes\n for (var a = 0; a < node.attributes.length; a += 1) {\n var attr = node.attributes[a];\n\n if (shouldRejectAttr(attr, allowedAttrs, node)) {\n node.removeAttribute(attr.name);\n // Shift the array to continue looping.\n a = a - 1;\n }\n }\n\n // Sanitize children\n this._sanitize(document, node);\n\n } while ((node = treeWalker.nextSibling()));\n };\n\n function createTreeWalker(document, node) {\n return document.createTreeWalker(node,\n NodeFilter.SHOW_TEXT | NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT,\n null, false);\n }\n\n function getAllowedAttrs(config, nodeName, node){\n if (typeof config.tags[nodeName] === 'function') {\n return config.tags[nodeName](node);\n } else {\n return config.tags[nodeName];\n }\n }\n\n function shouldRejectNode(node, allowedAttrs){\n if (typeof allowedAttrs === 'undefined') {\n return true;\n } else if (typeof allowedAttrs === 'boolean') {\n return !allowedAttrs;\n }\n\n return false;\n }\n\n function shouldRejectAttr(attr, allowedAttrs, node){\n var attrName = attr.name.toLowerCase();\n\n if (allowedAttrs === true){\n return false;\n } else if (typeof allowedAttrs[attrName] === 'function'){\n return !allowedAttrs[attrName](attr.value, node);\n } else if (typeof allowedAttrs[attrName] === 'undefined'){\n return true;\n } else if (allowedAttrs[attrName] === false) {\n return true;\n } else if (typeof allowedAttrs[attrName] === 'string') {\n return (allowedAttrs[attrName] !== attr.value);\n }\n\n return false;\n }\n\n return HTMLJanitor;\n\n}));\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n!(function(global) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n var inModule = typeof module === \"object\";\n var runtime = global.regeneratorRuntime;\n if (runtime) {\n if (inModule) {\n // If regeneratorRuntime is defined globally and we're in a module,\n // make the exports object identical to regeneratorRuntime.\n module.exports = runtime;\n }\n // Don't bother evaluating the rest of this file if the runtime was\n // already defined globally.\n return;\n }\n\n // Define the runtime globally (as expected by generated code) as either\n // module.exports (if we're in a module) or a new, empty object.\n runtime = global.regeneratorRuntime = inModule ? module.exports : {};\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n runtime.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n IteratorPrototype[iteratorSymbol] = function () {\n return this;\n };\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n GeneratorFunctionPrototype.constructor = GeneratorFunction;\n GeneratorFunctionPrototype[toStringTagSymbol] =\n GeneratorFunction.displayName = \"GeneratorFunction\";\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n prototype[method] = function(arg) {\n return this._invoke(method, arg);\n };\n });\n }\n\n runtime.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n runtime.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n if (!(toStringTagSymbol in genFun)) {\n genFun[toStringTagSymbol] = \"GeneratorFunction\";\n }\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n runtime.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return Promise.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return Promise.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration. If the Promise is rejected, however, the\n // result for this iteration will be rejected with the same\n // reason. Note that rejections of yielded Promises are not\n // thrown back into the generator function, as is the case\n // when an awaited Promise is rejected. This difference in\n // behavior between yield and await is important, because it\n // allows the consumer to decide what to do with the yielded\n // rejection (swallow it and continue, manually .throw it back\n // into the generator, abandon iteration, whatever). With\n // await, by contrast, there is no opportunity to examine the\n // rejection reason outside the generator function, so the\n // only option is to throw it from the await expression, and\n // let the generator function handle the exception.\n result.value = unwrapped;\n resolve(result);\n }, reject);\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new Promise(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n AsyncIterator.prototype[asyncIteratorSymbol] = function () {\n return this;\n };\n runtime.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n runtime.async = function(innerFn, outerFn, self, tryLocsList) {\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList)\n );\n\n return runtime.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n if (delegate.iterator.return) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n Gp[toStringTagSymbol] = \"Generator\";\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n Gp[iteratorSymbol] = function() {\n return this;\n };\n\n Gp.toString = function() {\n return \"[object Generator]\";\n };\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n runtime.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n runtime.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n})(\n // In sloppy mode, unbound `this` refers to the global object, fallback to\n // Function constructor if we're in global strict mode. That is sadly a form\n // of indirect eval which violates Content Security Policy.\n (function() { return this })() || Function(\"return this\")()\n);\n","var g;\r\n\r\n// This works in non-strict mode\r\ng = (function() {\r\n\treturn this;\r\n})();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function(\"return this\")() || (1, eval)(\"this\");\r\n} catch (e) {\r\n\t// This works if the window reference is available\r\n\tif (typeof window === \"object\") g = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it's\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n","'use strict';\r\n\r\n/**\r\n * Apply polyfills\r\n */\r\nimport '@babel/register';\r\nif (!window || !window._babelPolyfill) require('@babel/polyfill');\r\nimport 'components/polyfills';\r\nimport Core from './components/core';\r\n\r\n/**\r\n * Codex Editor\r\n *\r\n * Short Description (눈_눈;)\r\n * @version 2.0\r\n *\r\n * @author CodeX-Team \r\n */\r\nexport default class CodexEditor {\r\n /** Editor version */\r\n static get version() {\r\n return VERSION;\r\n }\r\n\r\n /**\r\n * @constructor\r\n *\r\n * @param {EditorConfig|String} [configuration] - user configuration\r\n */\r\n constructor(configuration) {\r\n /**\r\n * Set default onReady function\r\n */\r\n let onReady = () => {};\r\n\r\n /**\r\n * If `onReady` was passed in `configuration` then redefine onReady function\r\n */\r\n if (typeof configuration === 'object' && typeof configuration.onReady === 'function') {\r\n onReady = configuration.onReady;\r\n }\r\n\r\n /**\r\n * Create a CodeX Editor instance\r\n */\r\n const editor = new Core(configuration);\r\n\r\n /**\r\n * We need to export isReady promise in the constructor\r\n * as it can be used before other API methods are exported\r\n * @type {Promise}\r\n */\r\n this.isReady = editor.isReady.then(() => {\r\n this.exportAPI(editor);\r\n onReady();\r\n });\r\n }\r\n\r\n /**\r\n * Export external API methods\r\n *\r\n * @param editor\r\n */\r\n exportAPI(editor) {\r\n const fieldsToExport = [ 'configuration' ];\r\n const destroy = () => {\r\n editor.moduleInstances.Listeners.removeAll();\r\n editor.moduleInstances.UI.destroy();\r\n editor.moduleInstances.ModificationsObserver.destroy();\r\n editor = null;\r\n\r\n for (const field in this) {\r\n delete this[field];\r\n }\r\n\r\n Object.setPrototypeOf(this, null);\r\n };\r\n\r\n fieldsToExport.forEach(field => {\r\n this[field] = editor[field];\r\n });\r\n\r\n this.destroy = destroy;\r\n\r\n Object.setPrototypeOf(this, editor.moduleInstances.API.methods);\r\n\r\n delete this['exportAPI'];\r\n }\r\n}\r\n","import IEditor from './interfaces/editor';\r\nimport IEditorConfig from './interfaces/editor-config';\r\nimport IModuleConfig from './interfaces/module-config';\r\n\r\n/**\r\n * @abstract\r\n * @class Module\r\n * @classdesc All modules inherits from this class.\r\n *\r\n * @typedef {Module} Module\r\n * @property {Object} config - Editor user settings\r\n * @property {IEditorConfig} Editor - List of Editor modules\r\n */\r\nexport default class Module {\r\n\r\n /**\r\n * Editor modules list\r\n * @type {IEditor}\r\n */\r\n protected Editor: IEditor;\r\n\r\n /**\r\n * Editor configuration object\r\n * @type {IEditorConfig}\r\n */\r\n protected config: IEditorConfig;\r\n\r\n /**\r\n * @constructor\r\n * @param {IModuleConfig}\r\n */\r\n constructor({config}: IModuleConfig) {\r\n if (new.target === Module) {\r\n throw new TypeError('Constructors for abstract class Module are not allowed.');\r\n }\r\n\r\n this.config = config;\r\n }\r\n\r\n /**\r\n * Editor modules setter\r\n * @param {IEditor} Editor\r\n */\r\n set state(Editor) {\r\n this.Editor = Editor;\r\n }\r\n}\r\n","/**\r\n * @class DeleteTune\r\n * @classdesc Editor's default tune that moves up selected block\r\n *\r\n * @copyright 2018\r\n */\r\nimport IBlockTune from '../interfaces/block-tune';\r\n\r\ndeclare var $: any;\r\ndeclare var _: any;\r\n\r\nexport default class DeleteTune implements IBlockTune {\r\n\r\n /**\r\n * Property that contains CodeX Editor API methods\r\n * @see {docs/api.md}\r\n */\r\n private readonly api: any;\r\n\r\n /**\r\n * Styles\r\n * @type {{wrapper: string}}\r\n */\r\n private CSS = {\r\n wrapper: 'ass',\r\n button: 'ce-settings__button',\r\n buttonDelete: 'ce-settings__button--delete',\r\n buttonConfirm: 'ce-settings__button--confirm',\r\n };\r\n\r\n /**\r\n * Delete confirmation\r\n */\r\n private needConfirmation: boolean;\r\n\r\n /**\r\n * set false confirmation state\r\n */\r\n private resetConfirmation: () => void;\r\n\r\n /**\r\n * Tune nodes\r\n */\r\n private nodes = {\r\n button: null,\r\n };\r\n\r\n /**\r\n * DeleteTune constructor\r\n *\r\n * @param {Object} api\r\n */\r\n constructor({api}) {\r\n this.api = api;\r\n\r\n this.resetConfirmation = () => {\r\n this.setConfirmation(false);\r\n };\r\n }\r\n\r\n /**\r\n * Create \"Delete\" button and add click event listener\r\n * @returns [Element}\r\n */\r\n public render() {\r\n this.nodes.button = $.make('div', [this.CSS.button, this.CSS.buttonDelete], {});\r\n this.nodes.button.appendChild($.svg('cross', 12, 12));\r\n this.api.listener.on(this.nodes.button, 'click', (event) => this.handleClick(event), false);\r\n return this.nodes.button;\r\n }\r\n\r\n /**\r\n * Delete block conditions passed\r\n * @param {MouseEvent} event\r\n */\r\n public handleClick(event: MouseEvent): void {\r\n\r\n /**\r\n * if block is not waiting the confirmation, subscribe on block-settings-closing event to reset\r\n * otherwise delete block\r\n */\r\n if (!this.needConfirmation) {\r\n this.setConfirmation(true);\r\n\r\n /**\r\n * Subscribe on event.\r\n * When toolbar block settings is closed but block deletion is not confirmed,\r\n * then reset confirmation state\r\n */\r\n this.api.events.on('block-settings-closed', this.resetConfirmation);\r\n\r\n } else {\r\n\r\n /**\r\n * Unsubscribe from block-settings closing event\r\n */\r\n this.api.events.off('block-settings-closed', this.resetConfirmation);\r\n\r\n this.api.blocks.delete();\r\n\r\n /**\r\n * Prevent firing ui~documentClicked that can drop currentBlock pointer\r\n */\r\n event.stopPropagation();\r\n }\r\n }\r\n\r\n /**\r\n * change tune state\r\n */\r\n private setConfirmation(state): void {\r\n this.needConfirmation = state;\r\n this.nodes.button.classList.add(this.CSS.buttonConfirm);\r\n }\r\n\r\n}\r\n","/**\r\n * @class MoveDownTune\r\n * @classdesc Editor's default tune - Moves down highlighted block\r\n *\r\n * @copyright 2018\r\n */\r\nimport IBlockTune from '../interfaces/block-tune';\r\n\r\ndeclare var $: any;\r\ndeclare var _: any;\r\n\r\nexport default class MoveDownTune implements IBlockTune {\r\n /**\r\n * Property that contains CodeX Editor API methods\r\n * @see {api.md}\r\n */\r\n private readonly api: any;\r\n\r\n /**\r\n * Styles\r\n * @type {{wrapper: string}}\r\n */\r\n private CSS = {\r\n button: 'ce-settings__button',\r\n wrapper: 'ce-tune-move-down',\r\n animation: 'wobble',\r\n };\r\n\r\n /**\r\n * MoveDownTune constructor\r\n *\r\n * @param {Object} api\r\n */\r\n public constructor({api}) {\r\n this.api = api;\r\n }\r\n\r\n /**\r\n * Return 'move down' button\r\n */\r\n public render() {\r\n const moveDownButton = $.make('div', [this.CSS.button, this.CSS.wrapper], {});\r\n moveDownButton.appendChild($.svg('arrow-down', 14, 14));\r\n this.api.listener.on(moveDownButton, 'click', (event) => this.handleClick(event, moveDownButton), false);\r\n return moveDownButton;\r\n }\r\n\r\n /**\r\n * Handle clicks on 'move down' button\r\n * @param {MouseEvent} event\r\n * @param {HTMLElement} button\r\n */\r\n public handleClick(event: MouseEvent, button: HTMLElement) {\r\n\r\n const currentBlockIndex = this.api.blocks.getCurrentBlockIndex();\r\n\r\n // If Block is last do nothing\r\n if (currentBlockIndex === this.api.blocks.getBlocksCount() - 1) {\r\n button.classList.add(this.CSS.animation);\r\n\r\n window.setTimeout( () => {\r\n button.classList.remove(this.CSS.animation);\r\n }, 500);\r\n return;\r\n }\r\n\r\n const nextBlockElement = this.api.blocks.getBlockByIndex(currentBlockIndex + 1).holder,\r\n nextBlockCoords = nextBlockElement.getBoundingClientRect();\r\n\r\n let scrollOffset = Math.abs(window.innerHeight - nextBlockElement.offsetHeight);\r\n\r\n /**\r\n * Next block ends on screen.\r\n * Increment scroll by next block's height to save element onscreen-position\r\n */\r\n if (nextBlockCoords.top < window.innerHeight) {\r\n\r\n scrollOffset = window.scrollY + nextBlockElement.offsetHeight;\r\n\r\n }\r\n\r\n window.scrollTo(0, scrollOffset);\r\n\r\n /** Change blocks positions */\r\n this.api.blocks.swap(currentBlockIndex, currentBlockIndex + 1);\r\n\r\n }\r\n}\r\n","/**\r\n * @class MoveUpTune\r\n * @classdesc Editor's default tune that moves up selected block\r\n *\r\n * @copyright 2018\r\n */\r\nimport IBlockTune from '../interfaces/block-tune';\r\n\r\ndeclare var $: any;\r\ndeclare var _: any;\r\n\r\nexport default class MoveUpTune implements IBlockTune {\r\n\r\n /**\r\n * Property that contains CodeX Editor API methods\r\n * @see {api.md}\r\n */\r\n private readonly api: any;\r\n\r\n /**\r\n * Styles\r\n * @type {{wrapper: string}}\r\n */\r\n private CSS = {\r\n button: 'ce-settings__button',\r\n wrapper: 'ce-tune-move-up',\r\n animation: 'wobble',\r\n };\r\n\r\n /**\r\n * MoveUpTune constructor\r\n *\r\n * @param {Object} api\r\n */\r\n public constructor({api}) {\r\n this.api = api;\r\n }\r\n\r\n /**\r\n * Create \"MoveUp\" button and add click event listener\r\n * @returns [HTMLElement}\r\n */\r\n public render(): HTMLElement {\r\n const moveUpButton = $.make('div', [this.CSS.button, this.CSS.wrapper], {});\r\n moveUpButton.appendChild($.svg('arrow-up', 14, 14));\r\n this.api.listener.on(moveUpButton, 'click', (event) => this.handleClick(event, moveUpButton), false);\r\n return moveUpButton;\r\n }\r\n\r\n /**\r\n * Move current block up\r\n * @param {MouseEvent} event\r\n * @param {HTMLElement} button\r\n */\r\n public handleClick(event: MouseEvent, button: HTMLElement): void {\r\n\r\n const currentBlockIndex = this.api.blocks.getCurrentBlockIndex();\r\n\r\n if (currentBlockIndex === 0) {\r\n button.classList.add(this.CSS.animation);\r\n\r\n window.setTimeout( () => {\r\n button.classList.remove(this.CSS.animation);\r\n }, 500);\r\n return;\r\n }\r\n\r\n const currentBlockElement = this.api.blocks.getBlockByIndex(currentBlockIndex).holder,\r\n previousBlockElement = this.api.blocks.getBlockByIndex(currentBlockIndex - 1).holder;\r\n\r\n /**\r\n * Here is two cases:\r\n * - when previous block has negative offset and part of it is visible on window, then we scroll\r\n * by window's height and add offset which is mathematically difference between two blocks\r\n *\r\n * - when previous block is visible and has offset from the window,\r\n * than we scroll window to the difference between this offsets.\r\n */\r\n const currentBlockCoords = currentBlockElement.getBoundingClientRect(),\r\n previousBlockCoords = previousBlockElement.getBoundingClientRect();\r\n\r\n let scrollUpOffset;\r\n\r\n if (previousBlockCoords.top > 0) {\r\n scrollUpOffset = Math.abs(currentBlockCoords.top) - Math.abs(previousBlockCoords.top);\r\n } else {\r\n scrollUpOffset = window.innerHeight - Math.abs(currentBlockCoords.top) + Math.abs(previousBlockCoords.top);\r\n }\r\n\r\n window.scrollBy(0, -1 * scrollUpOffset);\r\n\r\n /** Change blocks positions */\r\n this.api.blocks.swap(currentBlockIndex, currentBlockIndex - 1);\r\n }\r\n}\r\n","import IBlockTune, {IBlockTuneConstructor} from './interfaces/block-tune';\r\nimport $ from './dom';\r\nimport _ from './utils';\r\n\r\ntype Tool = any;\r\n\r\n/**\r\n * @class Block\r\n * @classdesc This class describes editor`s block, including block`s HTMLElement, data and tool\r\n *\r\n * @property {Tool} tool — current block tool (Paragraph, for example)\r\n * @property {Object} CSS — block`s css classes\r\n *\r\n */\r\n\r\n/** Import default tunes */\r\nimport MoveUpTune from './block-tunes/block-tune-move-up';\r\nimport DeleteTune from './block-tunes/block-tune-delete';\r\nimport MoveDownTune from './block-tunes/block-tune-move-down';\r\nimport {IAPI} from './interfaces/api';\r\n\r\n/**\r\n * @classdesc Abstract Block class that contains Block information, Tool name and Tool class instance\r\n *\r\n * @property tool - Tool instance\r\n * @property html - Returns HTML content of plugin\r\n * @property holder - Div element that wraps block content with Tool's content. Has `ce-block` CSS class\r\n * @property pluginsContent - HTML content that returns by Tool's render function\r\n */\r\nexport default class Block {\r\n\r\n /**\r\n * CSS classes for the Block\r\n * @return {{wrapper: string, content: string}}\r\n */\r\n static get CSS() {\r\n return {\r\n wrapper: 'ce-block',\r\n wrapperStretched: 'ce-block--stretched',\r\n content: 'ce-block__content',\r\n focused: 'ce-block--focused',\r\n selected: 'ce-block--selected',\r\n dropTarget: 'ce-block--drop-target',\r\n };\r\n }\r\n\r\n /**\r\n * Find and return all editable elements (contenteditables and native inputs) in the Tool HTML\r\n *\r\n * @returns {HTMLElement[]}\r\n */\r\n get inputs(): HTMLElement[] {\r\n const content = this.holder;\r\n const allowedInputTypes = ['text', 'password', 'email', 'number', 'search', 'tel', 'url'];\r\n\r\n const selector = '[contenteditable], textarea, input, '\r\n + allowedInputTypes.map((type) => `input[type=\"${type}\"]`).join(', ');\r\n\r\n const inputs = _.array(content.querySelectorAll(selector));\r\n\r\n /**\r\n * If inputs amount was changed we need to check if input index is bigger then inputs array length\r\n */\r\n if (this.inputIndex > inputs.length - 1) {\r\n this.inputIndex = inputs.length - 1;\r\n }\r\n\r\n return inputs;\r\n }\r\n\r\n /**\r\n * Return current Tool`s input\r\n *\r\n * @returns {HTMLElement}\r\n */\r\n get currentInput(): HTMLElement {\r\n return this.inputs[this.inputIndex];\r\n }\r\n\r\n /**\r\n * Set input index to the passed element\r\n *\r\n * @param {HTMLElement} element\r\n */\r\n set currentInput(element: HTMLElement) {\r\n const index = this.inputs.findIndex((input) => input === element || input.contains(element));\r\n\r\n if (index !== -1) {\r\n this.inputIndex = index;\r\n }\r\n }\r\n\r\n /**\r\n * Return first Tool`s input\r\n *\r\n * @returns {HTMLElement}\r\n */\r\n get firstInput(): HTMLElement {\r\n return this.inputs[0];\r\n }\r\n\r\n /**\r\n * Return first Tool`s input\r\n *\r\n * @returns {HTMLElement}\r\n */\r\n get lastInput(): HTMLElement {\r\n const inputs = this.inputs;\r\n\r\n return inputs[inputs.length - 1];\r\n }\r\n\r\n /**\r\n * Return next Tool`s input or undefined if it doesn't exist\r\n *\r\n * @returns {HTMLElement}\r\n */\r\n get nextInput(): HTMLElement {\r\n return this.inputs[this.inputIndex + 1];\r\n }\r\n\r\n /**\r\n * Return previous Tool`s input or undefined if it doesn't exist\r\n *\r\n * @returns {HTMLElement}\r\n */\r\n get previousInput(): HTMLElement {\r\n return this.inputs[this.inputIndex - 1];\r\n }\r\n\r\n /**\r\n * Returns Plugins content\r\n * @return {Node}\r\n */\r\n get pluginsContent(): Node {\r\n const pluginsContent = this.holder.querySelector(`.${Block.CSS.content}`);\r\n\r\n if (pluginsContent && pluginsContent.childNodes.length) {\r\n return pluginsContent.childNodes[0];\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Get Block's JSON data\r\n * @return {Object}\r\n */\r\n get data(): object {\r\n return this.save();\r\n }\r\n\r\n /**\r\n * Returns tool's sanitizer config\r\n * @return {object}\r\n */\r\n get sanitize(): object {\r\n return this.tool.sanitize;\r\n }\r\n\r\n /**\r\n * is block mergeable\r\n * We plugin have merge function then we call it mergable\r\n * @return {boolean}\r\n */\r\n get mergeable(): boolean {\r\n return typeof this.tool.merge === 'function';\r\n }\r\n\r\n /**\r\n * Check block for emptiness\r\n * @return {Boolean}\r\n */\r\n get isEmpty(): boolean {\r\n /**\r\n * Allow Tool to represent decorative contentless blocks: for example \"* * *\"-tool\r\n * That Tools are not empty\r\n */\r\n if (this.class.contentless) {\r\n return false;\r\n }\r\n\r\n const emptyText = $.isEmpty(this.pluginsContent),\r\n emptyMedia = !this.hasMedia;\r\n\r\n return emptyText && emptyMedia;\r\n }\r\n\r\n /**\r\n * Check if block has a media content such as images, iframes and other\r\n * @return {Boolean}\r\n */\r\n get hasMedia(): boolean {\r\n /**\r\n * This tags represents media-content\r\n * @type {string[]}\r\n */\r\n const mediaTags = [\r\n 'img',\r\n 'iframe',\r\n 'video',\r\n 'audio',\r\n 'source',\r\n 'input',\r\n 'textarea',\r\n 'twitterwidget',\r\n ];\r\n\r\n return !!this.holder.querySelector(mediaTags.join(','));\r\n }\r\n\r\n /**\r\n * Set focused state\r\n * We don't need to mark Block as focused when it is empty\r\n * @param {Boolean} state - 'true' to select, 'false' to remove selection\r\n */\r\n set focused(state: boolean) {\r\n if (state === true && !this.isEmpty) {\r\n this.holder.classList.add(Block.CSS.focused);\r\n } else {\r\n this.holder.classList.remove(Block.CSS.focused);\r\n }\r\n }\r\n\r\n /**\r\n * Set selected state\r\n * We don't need to mark Block as Selected when it is empty\r\n * @param {Boolean} state - 'true' to select, 'false' to remove selection\r\n */\r\n set selected(state: boolean) {\r\n if (state) {\r\n this.holder.classList.add(Block.CSS.selected);\r\n } else {\r\n this.holder.classList.remove(Block.CSS.selected);\r\n }\r\n }\r\n\r\n /**\r\n * Returns True if it is Selected\r\n * @return {boolean}\r\n */\r\n get selected(): boolean {\r\n return this.holder.classList.contains(Block.CSS.selected);\r\n }\r\n\r\n /**\r\n * Set stretched state\r\n * @param {Boolean} state - 'true' to enable, 'false' to disable stretched statte\r\n */\r\n set stretched(state: boolean) {\r\n this.holder.classList.toggle(Block.CSS.wrapperStretched, state);\r\n }\r\n\r\n public name: string;\r\n public tool: Tool;\r\n public class: any;\r\n public settings: object;\r\n public holder: HTMLDivElement;\r\n public tunes: IBlockTune[];\r\n private readonly api: IAPI;\r\n private inputIndex = 0;\r\n\r\n /**\r\n * @constructor\r\n * @param {String} toolName - Tool name that passed on initialization\r\n * @param {Object} toolInstance — passed Tool`s instance that rendered the Block\r\n * @param {Object} toolClass — Tool's class\r\n * @param {Object} settings - default settings\r\n * @param {Object} apiMethods - Editor API\r\n */\r\n constructor(toolName: string, toolInstance: Tool, toolClass: object, settings: object, apiMethods: IAPI) {\r\n this.name = toolName;\r\n this.tool = toolInstance;\r\n this.class = toolClass;\r\n this.settings = settings;\r\n this.api = apiMethods;\r\n this.holder = this.compose();\r\n\r\n /**\r\n * @type {IBlockTune[]}\r\n */\r\n this.tunes = this.makeTunes();\r\n }\r\n\r\n /**\r\n * Calls Tool's method\r\n *\r\n * Method checks tool property {MethodName}. Fires method with passes params If it is instance of Function\r\n *\r\n * @param {String} methodName\r\n * @param {Object} params\r\n */\r\n public call(methodName: string, params: object) {\r\n /**\r\n * call Tool's method with the instance context\r\n */\r\n if (this.tool[methodName] && this.tool[methodName] instanceof Function) {\r\n this.tool[methodName].call(this.tool, params);\r\n }\r\n }\r\n\r\n /**\r\n * Call plugins merge method\r\n * @param {Object} data\r\n */\r\n public mergeWith(data: object): Promise {\r\n return Promise.resolve()\r\n .then(() => {\r\n this.tool.merge(data);\r\n });\r\n }\r\n /**\r\n * Extracts data from Block\r\n * Groups Tool's save processing time\r\n * @return {Object}\r\n */\r\n public async save(): Promise {\r\n const extractedBlock = await this.tool.save(this.pluginsContent);\r\n\r\n /**\r\n * Measuring execution time\r\n */\r\n const measuringStart = window.performance.now();\r\n let measuringEnd;\r\n\r\n return Promise.resolve(extractedBlock)\r\n .then((finishedExtraction) => {\r\n /** measure promise execution */\r\n measuringEnd = window.performance.now();\r\n\r\n return {\r\n tool: this.name,\r\n data: finishedExtraction,\r\n time : measuringEnd - measuringStart,\r\n };\r\n })\r\n .catch(function(error) {\r\n _.log(`Saving proccess for ${this.tool.name} tool failed due to the ${error}`, 'log', 'red');\r\n });\r\n }\r\n\r\n /**\r\n * Uses Tool's validation method to check the correctness of output data\r\n * Tool's validation method is optional\r\n *\r\n * @description Method also can return data if it passed the validation\r\n *\r\n * @param {Object} data\r\n * @returns {Boolean|Object} valid\r\n */\r\n public validateData(data: object): object|false {\r\n let isValid = true;\r\n\r\n if (this.tool.validate instanceof Function) {\r\n isValid = this.tool.validate(data);\r\n }\r\n\r\n if (!isValid) {\r\n return false;\r\n }\r\n\r\n return data;\r\n }\r\n\r\n /**\r\n * Make an array with default settings\r\n * Each block has default tune instance that have states\r\n * @return {IBlockTune[]}\r\n */\r\n public makeTunes(): IBlockTune[] {\r\n const tunesList = [MoveUpTune, DeleteTune, MoveDownTune];\r\n\r\n // Pluck tunes list and return tune instances with passed Editor API and settings\r\n return tunesList.map( (tune: IBlockTuneConstructor) => {\r\n return new tune({\r\n api: this.api,\r\n settings: this.settings,\r\n });\r\n });\r\n }\r\n\r\n /**\r\n * Enumerates initialized tunes and returns fragment that can be appended to the toolbars area\r\n * @return {DocumentFragment}\r\n */\r\n public renderTunes(): DocumentFragment {\r\n const tunesElement = document.createDocumentFragment();\r\n\r\n this.tunes.forEach( (tune) => {\r\n $.append(tunesElement, tune.render());\r\n });\r\n\r\n return tunesElement;\r\n }\r\n\r\n /**\r\n * Toggle drop target state\r\n * @param {boolean} state\r\n */\r\n public set dropTarget(state) {\r\n this.holder.classList.toggle(Block.CSS.dropTarget, state);\r\n }\r\n\r\n /**\r\n * Make default Block wrappers and put Tool`s content there\r\n * @returns {HTMLDivElement}\r\n */\r\n private compose(): HTMLDivElement {\r\n const wrapper = $.make('div', Block.CSS.wrapper) as HTMLDivElement,\r\n contentNode = $.make('div', Block.CSS.content),\r\n pluginsContent = this.tool.render();\r\n\r\n contentNode.appendChild(pluginsContent);\r\n wrapper.appendChild(contentNode);\r\n return wrapper;\r\n }\r\n}\r\n","/**\r\n * @typedef {Core} Core - editor core class\r\n */\r\n\r\n/**\r\n * Dynamically imported utils\r\n *\r\n * @typedef {Dom} $ - {@link components/dom.js}\r\n * @typedef {Util} _ - {@link components/utils.js}\r\n */\r\n\r\n/**\r\n * Require Editor modules places in components/modules dir\r\n */\r\n// eslint-disable-next-line\r\nlet modules = editorModules.map( module => require('./modules/' + module ));\r\n\r\n/**\r\n * @class Core\r\n *\r\n * @classdesc CodeX Editor core class\r\n *\r\n * @property this.config - all settings\r\n * @property this.moduleInstances - constructed editor components\r\n *\r\n * @type {Core}\r\n */\r\nexport default class Core {\r\n /**\r\n * @param {EditorConfig} config - user configuration\r\n *\r\n */\r\n constructor(config) {\r\n /**\r\n * Configuration object\r\n * @type {EditorConfig}\r\n */\r\n this.config = {};\r\n\r\n /**\r\n * @typedef {Object} EditorComponents\r\n * @property {BlockManager} BlockManager\r\n * @property {Tools} Tools\r\n * @property {Events} Events\r\n * @property {UI} UI\r\n * @property {Toolbar} Toolbar\r\n * @property {Toolbox} Toolbox\r\n * @property {BlockSettings} BlockSettings\r\n * @property {Renderer} Renderer\r\n * @property {InlineToolbar} InlineToolbar\r\n */\r\n this.moduleInstances = {};\r\n\r\n /**\r\n * Ready promise. Resolved if CodeX Editor is ready to work, rejected otherwise\r\n */\r\n let onReady, onFail;\r\n\r\n this.isReady = new Promise((resolve, reject) => {\r\n onReady = resolve;\r\n onFail = reject;\r\n });\r\n\r\n Promise.resolve()\r\n .then(() => {\r\n this.configuration = config;\r\n })\r\n .then(() => this.validate())\r\n .then(() => this.init())\r\n .then(() => this.start())\r\n .then(() => {\r\n _.log('I\\'m ready! (ノ◕ヮ◕)ノ*:・゚✧');\r\n\r\n setTimeout(() => {\r\n /**\r\n * Resolve this.isReady promise\r\n */\r\n onReady();\r\n }, 500);\r\n })\r\n .catch(error => {\r\n _.log(`CodeX Editor does not ready because of ${error}`, 'error');\r\n\r\n /**\r\n * Reject this.isReady promise\r\n */\r\n onFail(error);\r\n });\r\n }\r\n\r\n /**\r\n * Setting for configuration\r\n * @param {IEditorConfig|string|null} config\r\n */\r\n set configuration(config) {\r\n /**\r\n * Process zero-configuration or with only holderId\r\n */\r\n if (typeof config === 'string' || typeof config === 'undefined') {\r\n config = {\r\n holderId: config\r\n };\r\n }\r\n\r\n /**\r\n * If initial Block's Tool was not passed, use the Paragraph Tool\r\n */\r\n this.config.initialBlock = config.initialBlock || 'paragraph';\r\n\r\n /**\r\n * Initial block type\r\n * Uses in case when there is no blocks passed\r\n * @type {{type: (*), data: {text: null}}}\r\n */\r\n let initialBlockData = {\r\n type : this.config.initialBlock,\r\n data : {}\r\n };\r\n\r\n this.config.holderId = config.holderId || 'codex-editor';\r\n this.config.placeholder = config.placeholder || 'write your story...';\r\n this.config.sanitizer = config.sanitizer || {\r\n p: true,\r\n b: true,\r\n a: true\r\n };\r\n\r\n this.config.hideToolbar = config.hideToolbar ? config.hideToolbar : false;\r\n this.config.tools = config.tools || {};\r\n this.config.data = config.data || {};\r\n this.config.onReady = config.onReady || function () {};\r\n this.config.onChange = config.onChange || function () {};\r\n\r\n /**\r\n * Initialize Blocks to pass data to the Renderer\r\n */\r\n if (_.isEmpty(this.config.data)) {\r\n this.config.data = {};\r\n this.config.data.blocks = [ initialBlockData ];\r\n } else {\r\n if (!this.config.data.blocks || this.config.data.blocks.length === 0) {\r\n this.config.data.blocks = [ initialBlockData ];\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Returns private property\r\n * @returns {EditorConfig}\r\n */\r\n get configuration() {\r\n return this.config;\r\n }\r\n\r\n /**\r\n * Checks for required fields in Editor's config\r\n * @returns {void|Promise}\r\n */\r\n validate() {\r\n /**\r\n * Check if holderId is not empty\r\n */\r\n if (!this.config.holderId) {\r\n return Promise.reject('«holderId» param must being not empty');\r\n }\r\n\r\n /**\r\n * Check for a holder element's existence\r\n */\r\n if (!$.get(this.config.holderId)) {\r\n return Promise.reject(`element with ID «${this.config.holderId}» is missing. Pass correct holder's ID.`);\r\n }\r\n\r\n /**\r\n * Check Tools for a class containing\r\n */\r\n for (let toolName in this.config.tools) {\r\n const tool = this.config.tools[toolName];\r\n\r\n if (!_.isFunction(tool) && !_.isFunction(tool.class)) {\r\n return Promise.reject(`Tool «${toolName}» must be a constructor function or an object with that function in the «class» property`);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Initializes modules:\r\n * - make and save instances\r\n * - configure\r\n */\r\n init() {\r\n /**\r\n * Make modules instances and save it to the @property this.moduleInstances\r\n */\r\n this.constructModules();\r\n\r\n /**\r\n * Modules configuration\r\n */\r\n this.configureModules();\r\n }\r\n\r\n /**\r\n * Make modules instances and save it to the @property this.moduleInstances\r\n */\r\n constructModules() {\r\n modules.forEach( Module => {\r\n try {\r\n /**\r\n * We use class name provided by displayName property\r\n *\r\n * On build, Babel will transform all Classes to the Functions so, name will always be 'Function'\r\n * To prevent this, we use 'babel-plugin-class-display-name' plugin\r\n * @see https://www.npmjs.com/package/babel-plugin-class-display-name\r\n */\r\n this.moduleInstances[Module.displayName] = new Module({\r\n config : this.configuration\r\n });\r\n } catch ( e ) {\r\n console.log('Module %o skipped because %o', Module, e);\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Modules instances configuration:\r\n * - pass other modules to the 'state' property\r\n * - ...\r\n */\r\n configureModules() {\r\n for(let name in this.moduleInstances) {\r\n /**\r\n * Module does not need self-instance\r\n */\r\n this.moduleInstances[name].state = this.getModulesDiff( name );\r\n }\r\n }\r\n\r\n /**\r\n * Return modules without passed name\r\n */\r\n getModulesDiff( name ) {\r\n let diff = {};\r\n\r\n for(let moduleName in this.moduleInstances) {\r\n /**\r\n * Skip module with passed name\r\n */\r\n if (moduleName === name) {\r\n continue;\r\n }\r\n diff[moduleName] = this.moduleInstances[moduleName];\r\n }\r\n\r\n return diff;\r\n }\r\n\r\n /**\r\n * Start Editor!\r\n *\r\n * Get list of modules that needs to be prepared and return a sequence (Promise)\r\n * @return {Promise}\r\n */\r\n async start() {\r\n const modulesToPrepare = ['Tools', 'UI', 'BlockManager', 'Paste', 'DragNDrop', 'ModificationsObserver', 'BlockSelection'];\r\n\r\n await modulesToPrepare.reduce(\r\n (promise, module) => promise.then(async () => {\r\n _.log(`Preparing ${module} module`, 'time');\r\n\r\n try {\r\n await this.moduleInstances[module].prepare();\r\n } catch (e) {\r\n _.log(`Module ${module} was skipped because of %o`, 'warn', e);\r\n }\r\n _.log(`Preparing ${module} module`, 'timeEnd');\r\n }),\r\n Promise.resolve()\r\n );\r\n\r\n return this.moduleInstances.Renderer.render(this.config.data.blocks);\r\n }\r\n};\r\n","/**\r\n * DOM manipulations helper\r\n */\r\nexport default class Dom {\r\n /**\r\n * Check if passed tag has no closed tag\r\n * @param {HTMLElement} tag\r\n * @return {Boolean}\r\n */\r\n public static isSingleTag(tag: HTMLElement): boolean {\r\n return tag.tagName && [\r\n 'AREA',\r\n 'BASE',\r\n 'BR',\r\n 'COL',\r\n 'COMMAND',\r\n 'EMBED',\r\n 'HR',\r\n 'IMG',\r\n 'INPUT',\r\n 'KEYGEN',\r\n 'LINK',\r\n 'META',\r\n 'PARAM',\r\n 'SOURCE',\r\n 'TRACK',\r\n 'WBR',\r\n ].includes(tag.tagName);\r\n }\r\n\r\n /**\r\n * Helper for making Elements with classname and attributes\r\n *\r\n * @param {string} tagName - new Element tag name\r\n * @param {array|string} classNames - list or name of CSS classname(s)\r\n * @param {Object} attributes - any attributes\r\n * @return {Element}\r\n */\r\n public static make(tagName: string, classNames: string|string[] = null, attributes: object = {}): Element {\r\n const el = document.createElement(tagName);\r\n\r\n if ( Array.isArray(classNames) ) {\r\n el.classList.add(...classNames);\r\n } else if ( classNames ) {\r\n el.classList.add(classNames);\r\n }\r\n\r\n for (const attrName in attributes) {\r\n if (attributes.hasOwnProperty(attrName)) {\r\n el[attrName] = attributes[attrName];\r\n }\r\n }\r\n\r\n return el;\r\n }\r\n\r\n /**\r\n * Creates Text Node with the passed content\r\n * @param {String} content - text content\r\n * @return {Text}\r\n */\r\n public static text(content: string): Text {\r\n return document.createTextNode(content);\r\n }\r\n\r\n /**\r\n * Creates SVG icon linked to the sprite\r\n * @param {string} name - name (id) of icon from sprite\r\n * @param {number} width\r\n * @param {number} height\r\n * @return {SVGElement}\r\n */\r\n public static svg(name: string, width: number = 14, height: number = 14): SVGElement {\r\n const icon = document.createElementNS('http://www.w3.org/2000/svg', 'svg');\r\n\r\n icon.classList.add('icon', 'icon--' + name);\r\n icon.setAttribute('width', width + 'px');\r\n icon.setAttribute('height', height + 'px');\r\n icon.innerHTML = ``;\r\n\r\n return icon;\r\n }\r\n\r\n /**\r\n * Append one or several elements to the parent\r\n *\r\n * @param {Element|DocumentFragment} parent - where to append\r\n * @param {Element|Element[]} elements - element or elements list\r\n */\r\n public static append(parent: Element|DocumentFragment, elements: Element|Element[]): void {\r\n if ( Array.isArray(elements) ) {\r\n elements.forEach( (el) => parent.appendChild(el) );\r\n } else {\r\n parent.appendChild(elements);\r\n }\r\n }\r\n\r\n /**\r\n * Append element or a couple to the beginning of the parent elements\r\n *\r\n * @param {Element} parent - where to append\r\n * @param {Element|Element[]} elements - element or elements list\r\n */\r\n public static prepend(parent: Element, elements: Element|Element[]): void {\r\n if ( Array.isArray(elements) ) {\r\n elements = elements.reverse();\r\n elements.forEach( (el) => parent.prepend(el) );\r\n } else {\r\n parent.prepend(elements);\r\n }\r\n }\r\n\r\n /**\r\n * Swap two elements in parent\r\n * @param {HTMLElement} el1 - from\r\n * @param {HTMLElement} el2 - to\r\n */\r\n public static swap(el1: HTMLElement, el2: HTMLElement): void {\r\n // create marker element and insert it where el1 is\r\n const temp = document.createElement('div'),\r\n parent = el1.parentNode;\r\n\r\n parent.insertBefore(temp, el1);\r\n\r\n // move el1 to right before el2\r\n parent.insertBefore(el1, el2);\r\n\r\n // move el2 to right before where el1 used to be\r\n parent.insertBefore(el2, temp);\r\n\r\n // remove temporary marker node\r\n parent.removeChild(temp);\r\n }\r\n\r\n /**\r\n * Selector Decorator\r\n *\r\n * Returns first match\r\n *\r\n * @param {Element} el - element we searching inside. Default - DOM Document\r\n * @param {String} selector - searching string\r\n *\r\n * @returns {Element}\r\n */\r\n public static find(el: Element|Document = document, selector: string): Element {\r\n return el.querySelector(selector);\r\n }\r\n\r\n /**\r\n * Get Element by Id\r\n *\r\n * @param {string} id\r\n * @returns {HTMLElement | null}\r\n */\r\n public static get(id: string): HTMLElement {\r\n return document.getElementById(id);\r\n }\r\n\r\n /**\r\n * Selector Decorator.\r\n *\r\n * Returns all matches\r\n *\r\n * @param {Element} el - element we searching inside. Default - DOM Document\r\n * @param {String} selector - searching string\r\n * @returns {NodeList}\r\n */\r\n public static findAll(el: Element|Document = document, selector: string): NodeList {\r\n return el.querySelectorAll(selector);\r\n }\r\n\r\n /**\r\n * Search for deepest node which is Leaf.\r\n * Leaf is the vertex that doesn't have any child nodes\r\n *\r\n * @description Method recursively goes throw the all Node until it finds the Leaf\r\n *\r\n * @param {Node} node - root Node. From this vertex we start Deep-first search\r\n * {@link https://en.wikipedia.org/wiki/Depth-first_search}\r\n * @param {Boolean} atLast - find last text node\r\n * @return {Node} - it can be text Node or Element Node, so that caret will able to work with it\r\n */\r\n public static getDeepestNode(node: Node, atLast: boolean = false): Node {\r\n /**\r\n * Current function have two directions:\r\n * - starts from first child and every time gets first or nextSibling in special cases\r\n * - starts from last child and gets last or previousSibling\r\n * @type {string}\r\n */\r\n const child = atLast ? 'lastChild' : 'firstChild',\r\n sibling = atLast ? 'previousSibling' : 'nextSibling';\r\n\r\n if (node && node.nodeType === Node.ELEMENT_NODE && node[child]) {\r\n let nodeChild = node[child];\r\n\r\n /**\r\n * special case when child is single tag that can't contain any content\r\n */\r\n if (Dom.isSingleTag(nodeChild as HTMLElement) && !Dom.isNativeInput(nodeChild)) {\r\n /**\r\n * 1) We need to check the next sibling. If it is Node Element then continue searching for deepest\r\n * from sibling\r\n *\r\n * 2) If single tag's next sibling is null, then go back to parent and check his sibling\r\n * In case of Node Element continue searching\r\n *\r\n * 3) If none of conditions above happened return parent Node Element\r\n */\r\n if (nodeChild[sibling]) {\r\n nodeChild = nodeChild[sibling];\r\n } else if (nodeChild.parentNode[sibling]) {\r\n nodeChild = nodeChild.parentNode[sibling];\r\n } else {\r\n return nodeChild.parentNode;\r\n }\r\n }\r\n\r\n return this.getDeepestNode(nodeChild, atLast);\r\n }\r\n\r\n return node;\r\n }\r\n\r\n /**\r\n * Check if object is DOM node\r\n *\r\n * @param {Object} node\r\n * @returns {boolean}\r\n */\r\n public static isElement(node: any): boolean {\r\n return node && typeof node === 'object' && node.nodeType && node.nodeType === Node.ELEMENT_NODE;\r\n }\r\n\r\n /**\r\n * Check if object is DocumentFragmemt node\r\n *\r\n * @param {Object} node\r\n * @returns {boolean}\r\n */\r\n public static isFragment(node: any): boolean {\r\n return node && typeof node === 'object' && node.nodeType && node.nodeType === Node.DOCUMENT_FRAGMENT_NODE;\r\n }\r\n\r\n /**\r\n * Checks target if it is native input\r\n * @param {Element|String|Node} target - HTML element or string\r\n * @return {Boolean}\r\n */\r\n public static isNativeInput(target: any): boolean {\r\n const nativeInputs = [\r\n 'INPUT',\r\n 'TEXTAREA',\r\n ];\r\n\r\n return target && target.tagName ? nativeInputs.includes(target.tagName) : false;\r\n }\r\n\r\n /**\r\n * Checks node if it is empty\r\n *\r\n * @description Method checks simple Node without any childs for emptiness\r\n * If you have Node with 2 or more children id depth, you better use {@link Dom#isEmpty} method\r\n *\r\n * @param {Node} node\r\n * @return {Boolean} true if it is empty\r\n */\r\n public static isNodeEmpty(node: Node): boolean {\r\n let nodeText;\r\n\r\n if ( this.isElement(node) && this.isNativeInput(node) ) {\r\n nodeText = (node as HTMLInputElement).value;\r\n } else {\r\n nodeText = node.textContent.replace('\\u200B', '');\r\n }\r\n\r\n return nodeText.trim().length === 0;\r\n }\r\n\r\n /**\r\n * checks node if it is doesn't have any child nodes\r\n * @param {Node} node\r\n * @return {boolean}\r\n */\r\n public static isLeaf(node: Node): boolean {\r\n if (!node) {\r\n return false;\r\n }\r\n\r\n return node.childNodes.length === 0;\r\n }\r\n\r\n /**\r\n * breadth-first search (BFS)\r\n * {@link https://en.wikipedia.org/wiki/Breadth-first_search}\r\n *\r\n * @description Pushes to stack all DOM leafs and checks for emptiness\r\n *\r\n * @param {Node} node\r\n * @return {boolean}\r\n */\r\n public static isEmpty(node: Node): boolean {\r\n const treeWalker = [],\r\n leafs = [];\r\n\r\n if (!node) {\r\n return true;\r\n }\r\n\r\n if (!node.childNodes.length) {\r\n return this.isNodeEmpty(node);\r\n }\r\n\r\n treeWalker.push(node.firstChild);\r\n\r\n while ( treeWalker.length > 0 ) {\r\n node = treeWalker.shift();\r\n\r\n if (!node) { continue; }\r\n\r\n if ( this.isLeaf(node) ) {\r\n leafs.push(node);\r\n } else {\r\n treeWalker.push(node.firstChild);\r\n }\r\n\r\n while ( node && node.nextSibling ) {\r\n node = node.nextSibling;\r\n\r\n if (!node) { continue; }\r\n\r\n treeWalker.push(node);\r\n }\r\n\r\n /**\r\n * If one of childs is not empty, checked Node is not empty too\r\n */\r\n if (node && !this.isNodeEmpty(node)) {\r\n return false;\r\n }\r\n }\r\n\r\n return leafs.every( (leaf) => this.isNodeEmpty(leaf) );\r\n }\r\n\r\n /**\r\n * Check if string contains html elements\r\n *\r\n * @returns {boolean}\r\n * @param {String} str\r\n */\r\n public static isHTMLString(str: string): boolean {\r\n const wrapper = Dom.make('div');\r\n\r\n wrapper.innerHTML = str;\r\n\r\n return wrapper.childElementCount > 0;\r\n }\r\n\r\n /**\r\n * Return length of node`s text content\r\n *\r\n * @param {Node} node\r\n * @returns {number}\r\n */\r\n public static getContentLength(node: Node): number {\r\n if (Dom.isNativeInput(node)) {\r\n return (node as HTMLInputElement).value.length;\r\n }\r\n\r\n if (node.nodeType === Node.TEXT_NODE) {\r\n return (node as Text).length;\r\n }\r\n\r\n return node.textContent.length;\r\n }\r\n\r\n /**\r\n * Return array of names of block html elements\r\n *\r\n * @returns {string[]}\r\n */\r\n static get blockElements(): string[] {\r\n return [\r\n 'address',\r\n 'article',\r\n 'aside',\r\n 'blockquote',\r\n 'canvas',\r\n 'div',\r\n 'dl',\r\n 'dt',\r\n 'fieldset',\r\n 'figcaption',\r\n 'figure',\r\n 'footer',\r\n 'form',\r\n 'h1',\r\n 'h2',\r\n 'h3',\r\n 'h4',\r\n 'h5',\r\n 'h6',\r\n 'header',\r\n 'hgroup',\r\n 'hr',\r\n 'li',\r\n 'main',\r\n 'nav',\r\n 'noscript',\r\n 'ol',\r\n 'output',\r\n 'p',\r\n 'pre',\r\n 'ruby',\r\n 'section',\r\n 'table',\r\n 'tr',\r\n 'tfoot',\r\n 'ul',\r\n 'video',\r\n ];\r\n }\r\n}\r\n","import InlineTool from '../interfaces/tools/inline-tool';\r\nimport ISanitizerConfig from '../interfaces/sanitizer-config';\r\n\r\ndeclare var $: any;\r\n\r\n/**\r\n * Bold Tool\r\n *\r\n * Inline Toolbar Tool\r\n *\r\n * Makes selected text bolder\r\n */\r\nexport default class BoldInlineTool implements InlineTool {\r\n\r\n /**\r\n * Specifies Tool as Inline Toolbar Tool\r\n *\r\n * @return {boolean}\r\n */\r\n public static isInline = true;\r\n\r\n /**\r\n * Sanitizer Rule\r\n * Leave tags\r\n * @return {object}\r\n */\r\n static get sanitize(): ISanitizerConfig {\r\n return {\r\n b: {},\r\n };\r\n }\r\n\r\n /**\r\n * Native Document's command that uses for Bold\r\n */\r\n private readonly commandName: string = 'bold';\r\n\r\n /**\r\n * Styles\r\n */\r\n private readonly CSS = {\r\n button: 'ce-inline-tool',\r\n buttonActive: 'ce-inline-tool--active',\r\n buttonModifier: 'ce-inline-tool--bold',\r\n };\r\n\r\n /**\r\n * Elements\r\n */\r\n private nodes: {button: HTMLButtonElement} = {\r\n button: undefined,\r\n };\r\n\r\n /**\r\n * @param {{api: IAPI}} - CodeX Editor API\r\n */\r\n constructor({api}) {\r\n }\r\n\r\n /**\r\n * Create button for Inline Toolbar\r\n */\r\n public render(): HTMLElement {\r\n this.nodes.button = document.createElement('button');\r\n this.nodes.button.type = 'button';\r\n this.nodes.button.classList.add(this.CSS.button, this.CSS.buttonModifier);\r\n this.nodes.button.appendChild($.svg('bold', 13, 15));\r\n return this.nodes.button;\r\n }\r\n\r\n /**\r\n * Wrap range with tag\r\n * @param {Range} range\r\n */\r\n public surround(range: Range): void {\r\n document.execCommand(this.commandName);\r\n }\r\n\r\n /**\r\n * Check selection and set activated state to button if there are tag\r\n * @param {Selection} selection\r\n */\r\n public checkState(selection: Selection): boolean {\r\n const isActive = document.queryCommandState(this.commandName);\r\n\r\n this.nodes.button.classList.toggle(this.CSS.buttonActive, isActive);\r\n return isActive;\r\n }\r\n\r\n /**\r\n * Set a shortcut\r\n */\r\n public get shortcut(): string {\r\n return 'CMD+B';\r\n }\r\n}\r\n","import InlineTool from '../interfaces/tools/inline-tool';\r\nimport ISanitizerConfig from '../interfaces/sanitizer-config';\r\n\r\ndeclare var $: any;\r\n\r\n/**\r\n * Italic Tool\r\n *\r\n * Inline Toolbar Tool\r\n *\r\n * Style selected text with italic\r\n */\r\nexport default class ItalicInlineTool implements InlineTool {\r\n\r\n /**\r\n * Specifies Tool as Inline Toolbar Tool\r\n *\r\n * @return {boolean}\r\n */\r\n public static isInline = true;\r\n\r\n /**\r\n * Sanitizer Rule\r\n * Leave tags\r\n * @return {object}\r\n */\r\n static get sanitize(): ISanitizerConfig {\r\n return {\r\n i: {},\r\n };\r\n }\r\n\r\n /**\r\n * Native Document's command that uses for Italic\r\n */\r\n private readonly commandName: string = 'italic';\r\n\r\n /**\r\n * Styles\r\n */\r\n private readonly CSS = {\r\n button: 'ce-inline-tool',\r\n buttonActive: 'ce-inline-tool--active',\r\n buttonModifier: 'ce-inline-tool--italic',\r\n };\r\n\r\n /**\r\n * Elements\r\n */\r\n private nodes: {button: HTMLButtonElement} = {\r\n button: null,\r\n };\r\n\r\n /**\r\n * @param {{api: IAPI}} - CodeX Editor API\r\n */\r\n constructor({api}) {\r\n }\r\n\r\n /**\r\n * Create button for Inline Toolbar\r\n */\r\n public render(): HTMLElement {\r\n this.nodes.button = document.createElement('button');\r\n this.nodes.button.type = 'button';\r\n this.nodes.button.classList.add(this.CSS.button, this.CSS.buttonModifier);\r\n this.nodes.button.appendChild($.svg('italic', 6, 15));\r\n return this.nodes.button;\r\n }\r\n\r\n /**\r\n * Wrap range with tag\r\n * @param {Range} range\r\n */\r\n public surround(range: Range): void {\r\n document.execCommand(this.commandName);\r\n }\r\n\r\n /**\r\n * Check selection and set activated state to button if there are tag\r\n * @param {Selection} selection\r\n */\r\n public checkState(selection: Selection): boolean {\r\n const isActive = document.queryCommandState(this.commandName);\r\n\r\n this.nodes.button.classList.toggle(this.CSS.buttonActive, isActive);\r\n return isActive;\r\n }\r\n\r\n /**\r\n * Set a shortcut\r\n */\r\n public get shortcut(): string {\r\n return 'CMD+I';\r\n }\r\n}\r\n","import InlineTool from '../interfaces/tools/inline-tool';\r\nimport SelectionUtils from '../selection';\r\nimport ISanitizerConfig from '../interfaces/sanitizer-config';\r\n\r\ndeclare var $: any;\r\ndeclare var _: any;\r\n\r\n/**\r\n * Link Tool\r\n *\r\n * Inline Toolbar Tool\r\n *\r\n * Wrap selected text with tag\r\n */\r\nexport default class LinkInlineTool implements InlineTool {\r\n\r\n /**\r\n * Specifies Tool as Inline Toolbar Tool\r\n *\r\n * @return {boolean}\r\n */\r\n public static isInline = true;\r\n\r\n /**\r\n * Sanitizer Rule\r\n * Leave tags\r\n * @return {object}\r\n */\r\n static get sanitize(): ISanitizerConfig {\r\n return {\r\n a: {\r\n href: true,\r\n target: '_blank',\r\n rel: 'nofollow',\r\n },\r\n };\r\n }\r\n\r\n /**\r\n * Native Document's commands for link/unlink\r\n */\r\n private readonly commandLink: string = 'createLink';\r\n private readonly commandUnlink: string = 'unlink';\r\n\r\n /**\r\n * Enter key code\r\n */\r\n private readonly ENTER_KEY: number = 13;\r\n\r\n /**\r\n * Styles\r\n */\r\n private readonly CSS = {\r\n button: 'ce-inline-tool',\r\n buttonActive: 'ce-inline-tool--active',\r\n buttonModifier: 'ce-inline-tool--link',\r\n buttonUnlink: 'ce-inline-tool--unlink',\r\n input: 'ce-inline-tool-input',\r\n inputShowed: 'ce-inline-tool-input--showed',\r\n };\r\n\r\n /**\r\n * Elements\r\n */\r\n private nodes: {button: HTMLButtonElement, input: HTMLInputElement} = {\r\n button: null,\r\n input: null,\r\n };\r\n\r\n /**\r\n * SelectionUtils instance\r\n */\r\n private selection: SelectionUtils;\r\n\r\n /**\r\n * Input opening state\r\n */\r\n private inputOpened: boolean = false;\r\n\r\n /**\r\n * Available Inline Toolbar methods (open/close)\r\n */\r\n private inlineToolbar: any;\r\n\r\n /**\r\n * @param {{api: IAPI}} - CodeX Editor API\r\n */\r\n constructor({api}) {\r\n this.inlineToolbar = api.toolbar;\r\n this.selection = new SelectionUtils();\r\n }\r\n\r\n /**\r\n * Create button for Inline Toolbar\r\n */\r\n public render(): HTMLElement {\r\n this.nodes.button = document.createElement('button');\r\n this.nodes.button.type = 'button';\r\n this.nodes.button.classList.add(this.CSS.button, this.CSS.buttonModifier);\r\n this.nodes.button.appendChild($.svg('link', 15, 14));\r\n this.nodes.button.appendChild($.svg('unlink', 16, 18));\r\n return this.nodes.button;\r\n }\r\n\r\n /**\r\n * Input for the link\r\n */\r\n public renderActions(): HTMLElement {\r\n this.nodes.input = document.createElement('input');\r\n this.nodes.input.placeholder = 'Add a link';\r\n this.nodes.input.classList.add(this.CSS.input);\r\n this.nodes.input.addEventListener('keydown', (event) => {\r\n if (event.keyCode === this.ENTER_KEY ) {\r\n this.enterPressed(event);\r\n }\r\n });\r\n return this.nodes.input;\r\n }\r\n\r\n /**\r\n * Handle clicks on the Inline Toolbar icon\r\n * @param {Range} range\r\n */\r\n public surround(range: Range): void {\r\n /**\r\n * Range will be null when user makes second click on the 'link icon' to close opened input\r\n */\r\n if (range) {\r\n /**\r\n * Save selection before change focus to the input\r\n */\r\n this.selection.save();\r\n const parentAnchor = this.selection.findParentTag('A');\r\n\r\n /**\r\n * Unlink icon pressed\r\n */\r\n if (parentAnchor) {\r\n this.selection.expandToTag(parentAnchor);\r\n this.unlink();\r\n this.closeActions();\r\n this.checkState();\r\n this.inlineToolbar.close();\r\n return;\r\n }\r\n }\r\n\r\n this.toggleActions();\r\n }\r\n\r\n /**\r\n * Check selection and set activated state to button if there are tag\r\n * @param {Selection} selection\r\n */\r\n public checkState(selection?: Selection): boolean {\r\n const anchorTag = this.selection.findParentTag('A');\r\n\r\n if (anchorTag) {\r\n this.nodes.button.classList.add(this.CSS.buttonUnlink);\r\n this.nodes.button.classList.add(this.CSS.buttonActive);\r\n this.openActions();\r\n\r\n /**\r\n * Fill input value with link href\r\n */\r\n const hrefAttr = anchorTag.getAttribute('href');\r\n this.nodes.input.value = hrefAttr !== 'null' ? hrefAttr : '';\r\n\r\n this.selection.save();\r\n } else {\r\n this.nodes.button.classList.remove(this.CSS.buttonUnlink);\r\n this.nodes.button.classList.remove(this.CSS.buttonActive);\r\n }\r\n\r\n return !!anchorTag;\r\n }\r\n\r\n /**\r\n * Function called with Inline Toolbar closing\r\n */\r\n public clear(): void {\r\n this.closeActions();\r\n }\r\n\r\n /**\r\n * Set a shortcut\r\n */\r\n public get shortcut(): string {\r\n return 'CMD+K';\r\n }\r\n\r\n private toggleActions(): void {\r\n if (!this.inputOpened) {\r\n this.openActions(true);\r\n } else {\r\n this.closeActions(false);\r\n }\r\n }\r\n\r\n /**\r\n * @param {boolean} needFocus - on link creation we need to focus input. On editing - nope.\r\n */\r\n private openActions(needFocus: boolean = false): void {\r\n this.nodes.input.classList.add(this.CSS.inputShowed);\r\n if (needFocus) {\r\n this.nodes.input.focus();\r\n }\r\n this.inputOpened = true;\r\n }\r\n\r\n /**\r\n * Close input\r\n * @param {boolean} clearSavedSelection — we don't need to clear saved selection\r\n * on toggle-clicks on the icon of opened Toolbar\r\n */\r\n private closeActions(clearSavedSelection: boolean = true): void {\r\n this.nodes.input.classList.remove(this.CSS.inputShowed);\r\n this.nodes.input.value = '';\r\n if (clearSavedSelection) {\r\n this.selection.clearSaved();\r\n }\r\n this.inputOpened = false;\r\n }\r\n\r\n /**\r\n * Enter pressed on input\r\n * @param {KeyboardEvent} event\r\n */\r\n private enterPressed(event: KeyboardEvent): void {\r\n let value = this.nodes.input.value || '';\r\n\r\n if (!value.trim()) {\r\n this.selection.restore();\r\n this.unlink();\r\n event.preventDefault();\r\n this.closeActions();\r\n }\r\n\r\n if (!this.validateURL(value)) {\r\n /**\r\n * @todo show notification 'Incorrect Link'\r\n */\r\n _.log('Incorrect Link pasted', 'warn', value);\r\n return;\r\n }\r\n\r\n value = this.prepareLink(value);\r\n\r\n this.selection.restore();\r\n this.insertLink(value);\r\n\r\n /**\r\n * Preventing events that will be able to happen\r\n */\r\n event.preventDefault();\r\n event.stopPropagation();\r\n event.stopImmediatePropagation();\r\n\r\n this.closeActions();\r\n this.inlineToolbar.close();\r\n this.checkState();\r\n }\r\n\r\n /**\r\n * Detects if passed string is URL\r\n * @param {string} str\r\n * @return {Boolean}\r\n */\r\n private validateURL(str: string): boolean {\r\n /**\r\n * Don't allow spaces\r\n */\r\n return !/\\s/.test(str);\r\n }\r\n\r\n /**\r\n * Process link before injection\r\n * - sanitize\r\n * - add protocol for links like 'google.com'\r\n * @param {string} link - raw user input\r\n */\r\n private prepareLink(link: string): string {\r\n link = link.trim();\r\n link = this.addProtocol(link);\r\n return link;\r\n }\r\n\r\n /**\r\n * Add 'http' protocol to the links like 'vc.ru', 'google.com'\r\n * @param {String} link\r\n */\r\n private addProtocol(link: string): string {\r\n /**\r\n * If protocol already exists, do nothing\r\n */\r\n if (/^(\\w+):\\/\\//.test(link)) {\r\n return link;\r\n }\r\n\r\n /**\r\n * We need to add missed HTTP protocol to the link, but skip 2 cases:\r\n * 1) Internal links like \"/general\"\r\n * 2) Anchors looks like \"#results\"\r\n * 3) Protocol-relative URLs like \"//google.com\"\r\n */\r\n const isInternal = /^\\/[^\\/\\s]/.test(link),\r\n isAnchor = link.substring(0, 1) === '#',\r\n isProtocolRelative = /^\\/\\/[^\\/\\s]/.test(link);\r\n\r\n if (!isInternal && !isAnchor && !isProtocolRelative) {\r\n link = 'http://' + link;\r\n }\r\n\r\n return link;\r\n }\r\n\r\n /**\r\n * Inserts tag with \"href\"\r\n * @param {string} link - \"href\" value\r\n */\r\n private insertLink(link: string): void {\r\n\r\n /**\r\n * Edit all link, not selected part\r\n */\r\n const anchorTag = this.selection.findParentTag('A');\r\n\r\n if (anchorTag) {\r\n this.selection.expandToTag(anchorTag);\r\n }\r\n\r\n document.execCommand(this.commandLink, false, link);\r\n }\r\n\r\n /**\r\n * Removes tag\r\n */\r\n private unlink(): void {\r\n document.execCommand(this.commandUnlink);\r\n }\r\n}\r\n","var map = {\n\t\"./_notifications\": \"./src/components/modules/_notifications.js\",\n\t\"./_notifications.js\": \"./src/components/modules/_notifications.js\",\n\t\"./api\": \"./src/components/modules/api.ts\",\n\t\"./api-blocks\": \"./src/components/modules/api-blocks.ts\",\n\t\"./api-blocks.ts\": \"./src/components/modules/api-blocks.ts\",\n\t\"./api-caret\": \"./src/components/modules/api-caret.ts\",\n\t\"./api-caret.ts\": \"./src/components/modules/api-caret.ts\",\n\t\"./api-events\": \"./src/components/modules/api-events.ts\",\n\t\"./api-events.ts\": \"./src/components/modules/api-events.ts\",\n\t\"./api-listener\": \"./src/components/modules/api-listener.ts\",\n\t\"./api-listener.ts\": \"./src/components/modules/api-listener.ts\",\n\t\"./api-notifier\": \"./src/components/modules/api-notifier.ts\",\n\t\"./api-notifier.ts\": \"./src/components/modules/api-notifier.ts\",\n\t\"./api-sanitizer\": \"./src/components/modules/api-sanitizer.ts\",\n\t\"./api-sanitizer.ts\": \"./src/components/modules/api-sanitizer.ts\",\n\t\"./api-saver\": \"./src/components/modules/api-saver.ts\",\n\t\"./api-saver.ts\": \"./src/components/modules/api-saver.ts\",\n\t\"./api-selection\": \"./src/components/modules/api-selection.ts\",\n\t\"./api-selection.ts\": \"./src/components/modules/api-selection.ts\",\n\t\"./api-styles\": \"./src/components/modules/api-styles.ts\",\n\t\"./api-styles.ts\": \"./src/components/modules/api-styles.ts\",\n\t\"./api-toolbar\": \"./src/components/modules/api-toolbar.ts\",\n\t\"./api-toolbar.ts\": \"./src/components/modules/api-toolbar.ts\",\n\t\"./api.ts\": \"./src/components/modules/api.ts\",\n\t\"./block-events\": \"./src/components/modules/block-events.ts\",\n\t\"./block-events.ts\": \"./src/components/modules/block-events.ts\",\n\t\"./blockManager\": \"./src/components/modules/blockManager.js\",\n\t\"./blockManager.js\": \"./src/components/modules/blockManager.js\",\n\t\"./blockSelection\": \"./src/components/modules/blockSelection.ts\",\n\t\"./blockSelection.ts\": \"./src/components/modules/blockSelection.ts\",\n\t\"./caret\": \"./src/components/modules/caret.js\",\n\t\"./caret.js\": \"./src/components/modules/caret.js\",\n\t\"./dragNDrop\": \"./src/components/modules/dragNDrop.ts\",\n\t\"./dragNDrop.ts\": \"./src/components/modules/dragNDrop.ts\",\n\t\"./events\": \"./src/components/modules/events.js\",\n\t\"./events.js\": \"./src/components/modules/events.js\",\n\t\"./listeners\": \"./src/components/modules/listeners.js\",\n\t\"./listeners.js\": \"./src/components/modules/listeners.js\",\n\t\"./modificationsObserver\": \"./src/components/modules/modificationsObserver.ts\",\n\t\"./modificationsObserver.ts\": \"./src/components/modules/modificationsObserver.ts\",\n\t\"./notifier\": \"./src/components/modules/notifier.ts\",\n\t\"./notifier.ts\": \"./src/components/modules/notifier.ts\",\n\t\"./paste\": \"./src/components/modules/paste.ts\",\n\t\"./paste.ts\": \"./src/components/modules/paste.ts\",\n\t\"./renderer\": \"./src/components/modules/renderer.js\",\n\t\"./renderer.js\": \"./src/components/modules/renderer.js\",\n\t\"./sanitizer\": \"./src/components/modules/sanitizer.ts\",\n\t\"./sanitizer.ts\": \"./src/components/modules/sanitizer.ts\",\n\t\"./saver\": \"./src/components/modules/saver.ts\",\n\t\"./saver.ts\": \"./src/components/modules/saver.ts\",\n\t\"./shortcuts\": \"./src/components/modules/shortcuts.ts\",\n\t\"./shortcuts.ts\": \"./src/components/modules/shortcuts.ts\",\n\t\"./toolbar\": \"./src/components/modules/toolbar.js\",\n\t\"./toolbar-blockSettings\": \"./src/components/modules/toolbar-blockSettings.js\",\n\t\"./toolbar-blockSettings.js\": \"./src/components/modules/toolbar-blockSettings.js\",\n\t\"./toolbar-inline\": \"./src/components/modules/toolbar-inline.ts\",\n\t\"./toolbar-inline.ts\": \"./src/components/modules/toolbar-inline.ts\",\n\t\"./toolbar-toolbox\": \"./src/components/modules/toolbar-toolbox.js\",\n\t\"./toolbar-toolbox.js\": \"./src/components/modules/toolbar-toolbox.js\",\n\t\"./toolbar.js\": \"./src/components/modules/toolbar.js\",\n\t\"./tools\": \"./src/components/modules/tools.js\",\n\t\"./tools.js\": \"./src/components/modules/tools.js\",\n\t\"./ui\": \"./src/components/modules/ui.js\",\n\t\"./ui.js\": \"./src/components/modules/ui.js\"\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tvar id = map[req];\n\tif(!(id + 1)) { // check for number or string\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn id;\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = \"./src/components/modules sync recursive ^\\\\.\\\\/.*$\";","/**\r\n * Codex Editor Notification Module\r\n *\r\n * @author Codex Team\r\n * @version 1.0\r\n */\r\n\r\nmodule.exports = (function (notifications) {\r\n let editor = codex.editor;\r\n\r\n var queue = [];\r\n\r\n var addToQueue = function (settings) {\r\n queue.push(settings);\r\n\r\n var index = 0;\r\n\r\n while ( index < queue.length && queue.length > 5) {\r\n if (queue[index].type == 'confirm' || queue[index].type == 'prompt') {\r\n index++;\r\n continue;\r\n }\r\n\r\n queue[index].close();\r\n queue.splice(index, 1);\r\n }\r\n };\r\n\r\n notifications.createHolder = function () {\r\n var holder = editor.draw.node('DIV', 'cdx-notifications-block');\r\n\r\n editor.nodes.notifications = document.body.appendChild(holder);\r\n\r\n return holder;\r\n };\r\n\r\n\r\n /**\r\n * Error notificator. Shows block with message\r\n * @protected\r\n */\r\n notifications.errorThrown = function (errorMsg, event) {\r\n editor.notifications.notification({message: 'This action is not available currently', type: event.type});\r\n };\r\n\r\n /**\r\n *\r\n * Appends notification\r\n *\r\n * settings = {\r\n * type - notification type (reserved types: alert, confirm, prompt). Just add class 'cdx-notification-'+type\r\n * message - notification message\r\n * okMsg - confirm button text (default - 'Ok')\r\n * cancelBtn - cancel button text (default - 'Cancel'). Only for confirm and prompt types\r\n * confirm - function-handler for ok button click\r\n * cancel - function-handler for cancel button click. Only for confirm and prompt types\r\n * time - time (in seconds) after which notification will close (default - 10s)\r\n * }\r\n *\r\n * @param settings\r\n */\r\n notifications.notification = function (constructorSettings) {\r\n /** Private vars and methods */\r\n var notification = null,\r\n cancel = null,\r\n type = null,\r\n confirm = null,\r\n inputField = null;\r\n\r\n var confirmHandler = function () {\r\n close();\r\n\r\n if (typeof confirm !== 'function' ) {\r\n return;\r\n }\r\n\r\n if (type == 'prompt') {\r\n confirm(inputField.value);\r\n return;\r\n }\r\n\r\n confirm();\r\n };\r\n\r\n var cancelHandler = function () {\r\n close();\r\n\r\n if (typeof cancel !== 'function' ) {\r\n return;\r\n }\r\n\r\n cancel();\r\n };\r\n\r\n\r\n /** Public methods */\r\n function create(settings) {\r\n if (!(settings && settings.message)) {\r\n editor.core.log('Can\\'t create notification. Message is missed');\r\n return;\r\n }\r\n\r\n settings.type = settings.type || 'alert';\r\n settings.time = settings.time*1000 || 10000;\r\n\r\n var wrapper = editor.draw.node('DIV', 'cdx-notification'),\r\n message = editor.draw.node('DIV', 'cdx-notification__message'),\r\n input = editor.draw.node('INPUT', 'cdx-notification__input'),\r\n okBtn = editor.draw.node('SPAN', 'cdx-notification__ok-btn'),\r\n cancelBtn = editor.draw.node('SPAN', 'cdx-notification__cancel-btn');\r\n\r\n message.textContent = settings.message;\r\n okBtn.textContent = settings.okMsg || 'ОК';\r\n cancelBtn.textContent = settings.cancelMsg || 'Отмена';\r\n\r\n editor.listeners.add(okBtn, 'click', confirmHandler);\r\n editor.listeners.add(cancelBtn, 'click', cancelHandler);\r\n\r\n wrapper.appendChild(message);\r\n\r\n if (settings.type == 'prompt') {\r\n wrapper.appendChild(input);\r\n }\r\n\r\n wrapper.appendChild(okBtn);\r\n\r\n if (settings.type == 'prompt' || settings.type == 'confirm') {\r\n wrapper.appendChild(cancelBtn);\r\n }\r\n\r\n wrapper.classList.add('cdx-notification-' + settings.type);\r\n wrapper.dataset.type = settings.type;\r\n\r\n notification = wrapper;\r\n type = settings.type;\r\n confirm = settings.confirm;\r\n cancel = settings.cancel;\r\n inputField = input;\r\n\r\n if (settings.type != 'prompt' && settings.type != 'confirm') {\r\n window.setTimeout(close, settings.time);\r\n }\r\n };\r\n\r\n /**\r\n * Show notification block\r\n */\r\n function send() {\r\n editor.nodes.notifications.appendChild(notification);\r\n inputField.focus();\r\n\r\n editor.nodes.notifications.classList.add('cdx-notification__notification-appending');\r\n\r\n window.setTimeout(function () {\r\n editor.nodes.notifications.classList.remove('cdx-notification__notification-appending');\r\n }, 100);\r\n\r\n addToQueue({type: type, close: close});\r\n };\r\n\r\n /**\r\n * Remove notification block\r\n */\r\n function close() {\r\n notification.remove();\r\n };\r\n\r\n\r\n if (constructorSettings) {\r\n create(constructorSettings);\r\n send();\r\n }\r\n\r\n return {\r\n create: create,\r\n send: send,\r\n close: close\r\n };\r\n };\r\n\r\n notifications.clear = function () {\r\n editor.nodes.notifications.innerHTML = '';\r\n queue = [];\r\n };\r\n\r\n return notifications;\r\n})({});","declare var Module: any;\r\n\r\nimport { IBlocksAPI } from '../interfaces/api';\r\nimport IInputOutputData from '../interfaces/input-output-data';\r\nimport IModuleConfig from '../interfaces/module-config';\r\n\r\n/**\r\n * @class BlocksAPI\r\n * provides with methods working with Block\r\n */\r\nexport default class BlocksAPI extends Module implements IBlocksAPI {\r\n\r\n /**\r\n * Save Editor config. API provides passed configuration to the Blocks\r\n */\r\n constructor({config}: IModuleConfig) {\r\n super({config});\r\n }\r\n\r\n /**\r\n * Available methods\r\n * @return {IBlocksAPI}\r\n */\r\n get methods(): IBlocksAPI {\r\n return {\r\n clear: () => this.clear(),\r\n render: (data: IInputOutputData) => this.render(data),\r\n delete: () => this.delete(),\r\n swap: (fromIndex: number, toIndex: number) => this.swap(fromIndex, toIndex),\r\n getBlockByIndex: (index: number) => this.getBlockByIndex(index),\r\n getCurrentBlockIndex: () => this.getCurrentBlockIndex(),\r\n getBlocksCount: () => this.getBlocksCount(),\r\n stretchBlock: (index: number, status: boolean) => this.stretchBlock(index, status),\r\n insertNewBlock: () => this.insertNewBlock(),\r\n };\r\n }\r\n\r\n /**\r\n * Returns Blocks count\r\n * @return {number}\r\n */\r\n public getBlocksCount(): number {\r\n return this.Editor.BlockManager.blocks.length;\r\n }\r\n\r\n /**\r\n * Returns current block index\r\n * @return {number}\r\n */\r\n public getCurrentBlockIndex(): number {\r\n return this.Editor.BlockManager.currentBlockIndex;\r\n }\r\n\r\n /**\r\n * Returns Current Block\r\n * @param {Number} index\r\n *\r\n * @return {Object}\r\n */\r\n public getBlockByIndex(index: number): object {\r\n return this.Editor.BlockManager.getBlockByIndex(index);\r\n }\r\n\r\n /**\r\n * Call Block Manager method that swap Blocks\r\n * @param {number} fromIndex - position of first Block\r\n * @param {number} toIndex - position of second Block\r\n */\r\n public swap(fromIndex: number, toIndex: number): void {\r\n this.Editor.BlockManager.swap(fromIndex, toIndex);\r\n\r\n /**\r\n * Move toolbar\r\n * DO not close the settings\r\n */\r\n this.Editor.Toolbar.move(false);\r\n }\r\n\r\n /**\r\n * Deletes Block\r\n * @param blockIndex\r\n */\r\n public delete(blockIndex?: number): void {\r\n this.Editor.BlockManager.removeBlock(blockIndex);\r\n\r\n /**\r\n * in case of last block deletion\r\n * Insert new initial empty block\r\n */\r\n if (this.Editor.BlockManager.blocks.length === 0) {\r\n this.Editor.BlockManager.insert();\r\n }\r\n\r\n /**\r\n * In case of deletion first block we need to set caret to the current Block\r\n */\r\n if (this.Editor.BlockManager.currentBlockIndex === 0) {\r\n this.Editor.Caret.setToBlock(this.Editor.BlockManager.currentBlock);\r\n } else {\r\n this.Editor.Caret.navigatePrevious(true);\r\n }\r\n\r\n this.Editor.Toolbar.close();\r\n }\r\n\r\n /**\r\n * Clear Editor's area\r\n */\r\n public clear(): void {\r\n this.Editor.BlockManager.clear(true);\r\n }\r\n\r\n /**\r\n * Fills Editor with Blocks data\r\n * @param {IInputOutputData} data — Saved Editor data\r\n */\r\n public render(data: IInputOutputData): void {\r\n this.Editor.BlockManager.clear();\r\n this.Editor.Renderer.render(data.blocks);\r\n }\r\n\r\n /**\r\n * Stretch Block's content\r\n * @param {number} index\r\n * @param {boolean} status - true to enable, false to disable\r\n */\r\n public stretchBlock(index: number, status: boolean): void {\r\n const block = this.Editor.BlockManager.getBlockByIndex(index);\r\n\r\n if (!block) {\r\n return;\r\n }\r\n\r\n block.stretched = status !== undefined ? status : true;\r\n }\r\n\r\n /**\r\n * Insert new Block\r\n * After set caret to this Block\r\n */\r\n public insertNewBlock() {\r\n const newBlock = this.Editor.BlockManager.insert();\r\n this.Editor.Caret.setToBlock(newBlock);\r\n }\r\n}\r\n","declare var Module: any;\r\n\r\nimport {ICaretAPI} from '../interfaces/api';\r\nimport IModuleConfig from '../interfaces/module-config';\r\n\r\n/**\r\n * @class CaretAPI\r\n * provides with methods to work with caret\r\n */\r\nexport default class CaretAPI extends Module implements ICaretAPI {\r\n\r\n /**\r\n * Save Editor config. API provides passed configuration to the Blocks\r\n */\r\n constructor({config}: IModuleConfig) {\r\n super({config});\r\n }\r\n\r\n /**\r\n * Available methods\r\n * @return {ICaretAPI}\r\n */\r\n get methods(): ICaretAPI {\r\n return {};\r\n }\r\n}\r\n","declare var Module: any;\r\n\r\nimport {IEventsAPI} from '../interfaces/api';\r\nimport IModuleConfig from '../interfaces/module-config';\r\n\r\n/**\r\n * @class EventsAPI\r\n * provides with methods working with Toolbar\r\n */\r\nexport default class EventsAPI extends Module implements IEventsAPI {\r\n\r\n /**\r\n * Save Editor config. API provides passed configuration to the Blocks\r\n */\r\n constructor({config}: IModuleConfig) {\r\n super({config});\r\n }\r\n\r\n /**\r\n * Available methods\r\n * @return {IEventsAPI}\r\n */\r\n get methods(): IEventsAPI {\r\n return {\r\n emit: (eventName: string, data: object) => this.emit(eventName, data),\r\n off: (eventName: string, callback: () => void) => this.off(eventName, callback),\r\n on: (eventName: string, callback: () => void) => this.on(eventName, callback),\r\n };\r\n }\r\n\r\n /**\r\n * Subscribe on Events\r\n * @param {String} eventName\r\n * @param {Function} callback\r\n */\r\n public on(eventName, callback): void {\r\n this.Editor.Events.on(eventName, callback);\r\n }\r\n\r\n /**\r\n * Emit event with data\r\n * @param {String} eventName\r\n * @param {Object} data\r\n */\r\n public emit(eventName, data): void {\r\n this.Editor.Events.emit(eventName, data);\r\n }\r\n\r\n /**\r\n * Unsubscribe from Event\r\n * @param {String} eventName\r\n * @param {Function} callback\r\n */\r\n public off(eventName, callback): void {\r\n this.Editor.Events.off(eventName, callback);\r\n }\r\n\r\n}\r\n","declare var Module: any;\r\n\r\nimport {IListenerAPI} from '../interfaces/api';\r\nimport IModuleConfig from '../interfaces/module-config';\r\n\r\n/**\r\n * @class API\r\n * Provides with methods working with DOM Listener\r\n */\r\nexport default class ListenerAPI extends Module implements IListenerAPI {\r\n\r\n /**\r\n * Save Editor config. API provides passed configuration to the Blocks\r\n */\r\n constructor({config}: IModuleConfig) {\r\n super({config});\r\n }\r\n\r\n /**\r\n * Available methods\r\n * @return {IToolbarAPI}\r\n */\r\n get methods(): IListenerAPI {\r\n return {\r\n on: (element, eventType, handler, useCapture) => this.on(element, eventType, handler, useCapture),\r\n off: (element, eventType, handler) => this.off(element, eventType, handler),\r\n };\r\n }\r\n\r\n /**\r\n * adds DOM event listener\r\n *\r\n * @param {HTMLElement} element\r\n * @param {string} eventType\r\n * @param {() => void} handler\r\n * @param {boolean} useCapture\r\n */\r\n public on(element: HTMLElement, eventType: string, handler: () => void, useCapture?: boolean): void {\r\n this.Editor.Listeners.on(element, eventType, handler, useCapture);\r\n }\r\n\r\n /**\r\n * Removes DOM listener from element\r\n *\r\n * @param element\r\n * @param eventType\r\n * @param handler\r\n */\r\n public off(element, eventType, handler): void {\r\n this.Editor.Listeners.off(element, eventType, handler);\r\n }\r\n}\r\n","import Module from '../__module';\r\nimport {ConfirmNotifierOptions, NotifierOptions, PromptNotifierOptions} from 'codex-notifier';\r\n\r\nexport default class NotifierAPI extends Module {\r\n\r\n /**\r\n * Available methods\r\n */\r\n get methods() {\r\n return {\r\n show: (options: NotifierOptions | ConfirmNotifierOptions | PromptNotifierOptions) => this.show(options),\r\n };\r\n }\r\n\r\n public show(options: NotifierOptions | ConfirmNotifierOptions | PromptNotifierOptions) {\r\n return this.Editor.Notifier.show(options);\r\n }\r\n}\r\n","declare var Module: any;\r\n\r\nimport {ISanitizerAPI} from '../interfaces/api';\r\nimport IModuleConfig from '../interfaces/module-config';\r\n\r\n/**\r\n * @class API\r\n * Provides CodeX Editor Sanitizer that allows developers to clean their HTML\r\n */\r\nexport default class SanitizerAPI extends Module implements ISanitizerAPI {\r\n\r\n /**\r\n * Save Editor config. API provides passed configuration to the Blocks\r\n */\r\n constructor({config}: IModuleConfig) {\r\n super({config});\r\n }\r\n\r\n /**\r\n * Available methods\r\n * @return {ISanitizerAPI}\r\n */\r\n get methods(): ISanitizerAPI {\r\n return {\r\n clean: (taintString, config) => this.clean(taintString, config),\r\n };\r\n }\r\n\r\n public clean(taintString, config) {\r\n return this.Editor.Sanitizer.clean(taintString, config);\r\n }\r\n\r\n}\r\n","declare var Module: any;\r\n\r\nimport {ISaverAPI} from '../interfaces/api';\r\nimport IInputOutputData from '../interfaces/input-output-data';\r\nimport IModuleConfig from '../interfaces/module-config';\r\n\r\n/**\r\n * @class SaverAPI\r\n * provides with methods to save data\r\n */\r\nexport default class SaverAPI extends Module implements ISaverAPI {\r\n\r\n /**\r\n * Save Editor config. API provides passed configuration to the Blocks\r\n */\r\n constructor({config}: IModuleConfig) {\r\n super({config});\r\n }\r\n\r\n /**\r\n * Available methods\r\n * @return {ISaverAPI}\r\n */\r\n get methods(): ISaverAPI {\r\n return {\r\n save: () => this.save(),\r\n };\r\n }\r\n\r\n /**\r\n * Return Editor's data\r\n */\r\n public save(): IInputOutputData {\r\n return this.Editor.Saver.save();\r\n }\r\n}\r\n","declare var Module: any;\r\n\r\nimport {ISelectionAPI} from '../interfaces/api';\r\nimport IModuleConfig from '../interfaces/module-config';\r\nimport Selection from '../selection';\r\n\r\n/**\r\n * @class API\r\n * Provides with methods working with SelectionUtils\r\n */\r\nexport default class SelectionAPI extends Module implements ISelectionAPI {\r\n\r\n /**\r\n * Save Editor config. API provides passed configuration to the Blocks\r\n */\r\n constructor({config}: IModuleConfig) {\r\n super({config});\r\n }\r\n\r\n /**\r\n * Available methods\r\n * @return {ISelectionAPI}\r\n */\r\n get methods(): ISelectionAPI {\r\n return {\r\n findParentTag: (tagName: string, className: string) => this.findParentTag(tagName, className),\r\n expandToTag: (node: HTMLElement) => this.expandToTag(node),\r\n };\r\n }\r\n\r\n /**\r\n * Looks ahead from selection and find passed tag with class name\r\n * @param {string} tagName - tag to find\r\n * @param {string} className - tag's class name\r\n * @return {HTMLElement|null}\r\n */\r\n public findParentTag(tagName: string, className: string): HTMLElement|null {\r\n return new Selection().findParentTag(tagName, className);\r\n }\r\n\r\n /**\r\n * Expand selection to passed tag\r\n * @param {HTMLElement} node - tag that should contain selection\r\n */\r\n public expandToTag(node: HTMLElement): void {\r\n new Selection().expandToTag(node);\r\n }\r\n\r\n}\r\n","declare var Module: any;\r\n\r\nimport IModuleConfig from '../interfaces/module-config';\r\nimport {IStylesAPI} from '../interfaces/api';\r\n\r\n/**\r\n *\r\n */\r\nexport default class StylesAPI extends Module {\r\n\r\n /**\r\n * Save Editor config\r\n * API provides passed configuration to the Blocks\r\n */\r\n constructor({config}: IModuleConfig) {\r\n super({config});\r\n }\r\n\r\n get classes(): IStylesAPI {\r\n return {\r\n /**\r\n * Base Block styles\r\n */\r\n block: 'cdx-block',\r\n\r\n /**\r\n * Inline Tools styles\r\n */\r\n inlineToolButton: 'ce-inline-tool',\r\n inlineToolButtonActive: 'ce-inline-tool--active',\r\n\r\n /**\r\n * UI elements\r\n */\r\n input: 'cdx-input',\r\n loader: 'cdx-loader',\r\n button: 'cdx-button',\r\n\r\n /**\r\n * Settings styles\r\n */\r\n settingsButton: 'cdx-settings-button',\r\n settingsButtonActive: 'cdx-settings-button--active',\r\n };\r\n }\r\n}\r\n","declare var Module: any;\r\n\r\nimport {IToolbarAPI} from '../interfaces/api';\r\nimport IModuleConfig from '../interfaces/module-config';\r\n\r\n/**\r\n * @class ToolbarsAPI\r\n * provides with methods working with Toolbar\r\n */\r\nexport default class ToolbarAPI extends Module implements IToolbarAPI {\r\n\r\n /**\r\n * Save Editor config. API provides passed configuration to the Blocks\r\n */\r\n constructor({config}: IModuleConfig) {\r\n super({config});\r\n }\r\n\r\n /**\r\n * Available methods\r\n * @return {IToolbarAPI}\r\n */\r\n get methods(): IToolbarAPI {\r\n return {\r\n close: () => this.close(),\r\n open: () => this.open(),\r\n };\r\n }\r\n\r\n /**\r\n * Open toolbar\r\n */\r\n public open(): void {\r\n this.Editor.Toolbar.open();\r\n }\r\n\r\n /**\r\n * Close toolbar and all included elements\r\n */\r\n public close(): void {\r\n this.Editor.Toolbar.close();\r\n }\r\n\r\n}\r\n","/**\r\n * @module API\r\n * @copyright 2018\r\n *\r\n * Each block has an Editor API instance to use provided public methods\r\n * if you cant to read more about how API works, please see docs\r\n */\r\ndeclare var Module: any;\r\ndeclare var $: any;\r\ndeclare var _: any;\r\n\r\nimport { IAPI } from '../interfaces/api';\r\n\r\n/**\r\n * @class API\r\n */\r\nexport default class API extends Module {\r\n\r\n /**\r\n * Save Editor config. API provides passed configuration to the Blocks\r\n * @param {EditorConfig} config\r\n */\r\n constructor({config}) {\r\n super({config});\r\n }\r\n\r\n public get methods(): IAPI {\r\n return {\r\n blocks: this.Editor.BlocksAPI.methods,\r\n caret: this.Editor.CaretAPI.methods,\r\n events: this.Editor.EventsAPI.methods,\r\n listener: this.Editor.ListenerAPI.methods,\r\n notifier: this.Editor.NotifierAPI.methods,\r\n sanitizer: this.Editor.SanitizerAPI.methods,\r\n saver: this.Editor.SaverAPI.methods,\r\n selection: this.Editor.SelectionAPI.methods,\r\n styles: this.Editor.StylesAPI.classes,\r\n toolbar: this.Editor.ToolbarAPI.methods,\r\n };\r\n }\r\n}\r\n","/**\r\n * Contains keyboard and mouse events binded on each Block by Block Manager\r\n */\r\ndeclare var Module: any;\r\ndeclare var $: any;\r\ndeclare var _: any;\r\n\r\nexport default class BlockEvents extends Module {\r\n /**\r\n * @constructor\r\n */\r\n constructor({config}) {\r\n super({config});\r\n }\r\n\r\n /**\r\n * All keydowns on Block\r\n * @param {KeyboardEvent} event - keydown\r\n */\r\n public keydown(event: KeyboardEvent): void {\r\n /**\r\n * Run common method for all keydown events\r\n */\r\n this.beforeKeydownProcessing(event);\r\n\r\n /**\r\n * Fire keydown processor by event.keyCode\r\n */\r\n switch (event.keyCode) {\r\n case _.keyCodes.BACKSPACE:\r\n this.backspace(event);\r\n break;\r\n\r\n case _.keyCodes.ENTER:\r\n this.enter(event);\r\n break;\r\n\r\n case _.keyCodes.DOWN:\r\n case _.keyCodes.RIGHT:\r\n this.arrowRightAndDown(event);\r\n break;\r\n\r\n case _.keyCodes.UP:\r\n case _.keyCodes.LEFT:\r\n this.arrowLeftAndUp(event);\r\n break;\r\n\r\n case _.keyCodes.TAB:\r\n this.tabPressed(event);\r\n break;\r\n\r\n case _.keyCodes.ESC:\r\n this.escapePressed(event);\r\n break;\r\n default:\r\n this.defaultHandler();\r\n break;\r\n }\r\n }\r\n\r\n /**\r\n * Fires on keydown before event processing\r\n * @param {KeyboardEvent} event - keydown\r\n */\r\n public beforeKeydownProcessing(event): void {\r\n /**\r\n * Do not close Toolbox on Tabs or on Enter with opened Toolbox\r\n */\r\n if (!this.needToolbarClosing(event)) {\r\n return;\r\n }\r\n\r\n this.Editor.Toolbar.close();\r\n\r\n const cmdKey = event.ctrlKey || event.metaKey;\r\n const altKey = event.altKey;\r\n const shiftKey = event.shiftKey;\r\n\r\n /** clear selecton when it is not CMD, SHIFT, ALT keys */\r\n if (cmdKey || altKey || shiftKey) {\r\n return;\r\n }\r\n\r\n /**\r\n * Clear all highlightings\r\n */\r\n this.Editor.BlockManager.clearFocused();\r\n\r\n /** Clear Block selection and restore caret */\r\n this.Editor.BlockSelection.clearSelection(true);\r\n }\r\n\r\n /**\r\n * Key up on Block:\r\n * - shows Inline Toolbar if something selected\r\n */\r\n public keyup(event): void {\r\n this.Editor.InlineToolbar.handleShowingEvent(event);\r\n }\r\n\r\n /**\r\n * Mouse up on Block:\r\n * - shows Inline Toolbar if something selected\r\n */\r\n public mouseUp(event): void {\r\n this.Editor.InlineToolbar.handleShowingEvent(event);\r\n }\r\n\r\n /**\r\n * Open Toolbox to leaf Tools\r\n * @param {KeyboardEvent} event\r\n */\r\n public tabPressed(event): void {\r\n\r\n const {currentBlock} = this.Editor.BlockManager;\r\n\r\n /** Prevent Default behaviour */\r\n event.preventDefault();\r\n event.stopPropagation();\r\n\r\n /** this property defines leaf direction */\r\n const shiftKey = event.shiftKey,\r\n direction = shiftKey ? 'left' : 'right';\r\n\r\n if (this.Editor.Toolbar.opened && currentBlock.isEmpty) {\r\n this.Editor.Toolbox.open();\r\n } else if (currentBlock.isEmpty) {\r\n this.Editor.Toolbar.open();\r\n this.Editor.Toolbar.plusButton.show();\r\n this.Editor.Toolbox.open();\r\n }\r\n\r\n if (this.Editor.Toolbox.opened) {\r\n this.Editor.Toolbox.leaf(direction);\r\n }\r\n }\r\n\r\n /**\r\n * Escape pressed\r\n * @param event\r\n */\r\n public escapePressed(event): void { }\r\n\r\n /**\r\n * Add drop target styles\r\n *\r\n * @param {DragEvent} e\r\n */\r\n public dragOver(e: DragEvent) {\r\n const block = this.Editor.BlockManager.getBlockByChildNode(e.target);\r\n\r\n block.dropTarget = true;\r\n }\r\n\r\n /**\r\n * Remove drop target style\r\n *\r\n * @param {DragEvent} e\r\n */\r\n public dragLeave(e: DragEvent) {\r\n const block = this.Editor.BlockManager.getBlockByChildNode(e.target);\r\n\r\n block.dropTarget = false;\r\n }\r\n\r\n /**\r\n * ENTER pressed on block\r\n * @param {KeyboardEvent} event - keydown\r\n */\r\n private enter(event: KeyboardEvent): void {\r\n const currentBlock = this.Editor.BlockManager.currentBlock,\r\n tool = this.Editor.Tools.toolsAvailable[currentBlock.name];\r\n\r\n /**\r\n * Don't handle Enter keydowns when Tool sets enableLineBreaks to true.\r\n * Uses for Tools like where line breaks should be handled by default behaviour.\r\n */\r\n if (tool && tool[this.Editor.Tools.apiSettings.IS_ENABLED_LINE_BREAKS]) {\r\n return;\r\n }\r\n\r\n if (this.Editor.Toolbox.opened && this.Editor.Toolbox.getActiveTool) {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n event.stopImmediatePropagation();\r\n this.Editor.Toolbox.toolButtonActivate(event, this.Editor.Toolbox.getActiveTool);\r\n return;\r\n }\r\n\r\n /**\r\n * Allow to create linebreaks by Shift+Enter\r\n */\r\n if (event.shiftKey) {\r\n return;\r\n }\r\n /**\r\n * Split the Current Block into two blocks\r\n * Renew local current node after split\r\n */\r\n const newCurrent = this.Editor.BlockManager.split();\r\n\r\n this.Editor.Caret.setToBlock(newCurrent);\r\n\r\n /**\r\n * If new Block is empty\r\n */\r\n if (this.Editor.Tools.isInitial(newCurrent.tool) && newCurrent.isEmpty) {\r\n /**\r\n * Show Toolbar\r\n */\r\n this.Editor.Toolbar.open();\r\n\r\n /**\r\n * Show Plus Button\r\n */\r\n this.Editor.Toolbar.plusButton.show();\r\n }\r\n\r\n event.preventDefault();\r\n event.stopPropagation();\r\n event.stopImmediatePropagation();\r\n }\r\n\r\n /**\r\n * Handle backspace keydown on Block\r\n * @param {KeyboardEvent} event - keydown\r\n */\r\n private backspace(event: KeyboardEvent): void {\r\n const BM = this.Editor.BlockManager;\r\n const currentBlock = this.Editor.BlockManager.currentBlock,\r\n tool = this.Editor.Tools.toolsAvailable[currentBlock.name];\r\n\r\n /**\r\n * Don't handle Backspaces when Tool sets enableLineBreaks to true.\r\n * Uses for Tools like where line breaks should be handled by default behaviour.\r\n */\r\n if (tool && tool[this.Editor.Tools.apiSettings.IS_ENABLED_LINE_BREAKS]) {\r\n return;\r\n }\r\n\r\n const isFirstBlock = BM.currentBlockIndex === 0,\r\n canMergeBlocks = this.Editor.Caret.isAtStart && !isFirstBlock;\r\n\r\n /** If current Block is empty just remove this Block */\r\n if (this.Editor.BlockManager.currentBlock.isEmpty) {\r\n this.Editor.BlockManager.removeBlock();\r\n\r\n /**\r\n * in case of last block deletion\r\n * Insert new initial empty block\r\n */\r\n if (this.Editor.BlockManager.blocks.length === 0) {\r\n this.Editor.BlockManager.insert();\r\n }\r\n\r\n /**\r\n * In case of deletion first block we need to set caret to the current Block\r\n * After BlockManager removes the Block (which is current now),\r\n * pointer that references to the current Block, now points to the Next\r\n */\r\n if (this.Editor.BlockManager.currentBlockIndex === 0) {\r\n this.Editor.Caret.setToBlock(this.Editor.BlockManager.currentBlock);\r\n } else {\r\n this.Editor.Caret.navigatePrevious(true);\r\n }\r\n\r\n this.Editor.Toolbar.close();\r\n return;\r\n }\r\n\r\n if (!canMergeBlocks) {\r\n return;\r\n }\r\n\r\n // preventing browser default behaviour\r\n event.preventDefault();\r\n\r\n const targetBlock = BM.getBlockByIndex(BM.currentBlockIndex - 1),\r\n blockToMerge = BM.currentBlock;\r\n\r\n /**\r\n * Blocks that can be merged:\r\n * 1) with the same Name\r\n * 2) Tool has 'merge' method\r\n *\r\n * other case will handle as usual ARROW LEFT behaviour\r\n */\r\n if (blockToMerge.name !== targetBlock.name || !targetBlock.mergeable) {\r\n if (this.Editor.Caret.navigatePrevious()) {\r\n this.Editor.Toolbar.close();\r\n }\r\n\r\n return;\r\n }\r\n\r\n this.Editor.Caret.createShadow(targetBlock.pluginsContent);\r\n BM.mergeBlocks(targetBlock, blockToMerge)\r\n .then( () => {\r\n /** Restore caret position after merge */\r\n this.Editor.Caret.restoreCaret(targetBlock.pluginsContent);\r\n targetBlock.pluginsContent.normalize();\r\n this.Editor.Toolbar.close();\r\n });\r\n }\r\n\r\n /**\r\n * Handle right and down keyboard keys\r\n */\r\n private arrowRightAndDown(event: KeyboardEvent): void {\r\n if (this.Editor.Caret.navigateNext()) {\r\n /**\r\n * Default behaviour moves cursor by 1 character, we need to prevent it\r\n */\r\n event.preventDefault();\r\n }\r\n }\r\n\r\n /**\r\n * Handle left and up keyboard keys\r\n */\r\n private arrowLeftAndUp(event: KeyboardEvent): void {\r\n if (this.Editor.Caret.navigatePrevious()) {\r\n /**\r\n * Default behaviour moves cursor by 1 character, we need to prevent it\r\n */\r\n event.preventDefault();\r\n }\r\n }\r\n\r\n /**\r\n * Default keydown handler\r\n */\r\n private defaultHandler(): void {}\r\n\r\n /**\r\n * Cases when we need to close Toolbar\r\n */\r\n private needToolbarClosing(event) {\r\n const toolboxItemSelected = (event.keyCode === _.keyCodes.ENTER && this.Editor.Toolbox.opened),\r\n flippingToolboxItems = event.keyCode === _.keyCodes.TAB;\r\n\r\n return !(event.shiftKey || flippingToolboxItems || toolboxItemSelected);\r\n }\r\n\r\n}\r\n","/**\r\n * @class BlockManager\r\n * @classdesc Manage editor`s blocks storage and appearance\r\n *\r\n * @module BlockManager\r\n *\r\n * @version 2.0.0\r\n */\r\n\r\nimport Block from '../block';\r\n\r\n/**\r\n * @typedef {BlockManager} BlockManager\r\n * @property {Number} currentBlockIndex - Index of current working block\r\n * @property {Proxy} _blocks - Proxy for Blocks instance {@link Blocks}\r\n */\r\nexport default class BlockManager extends Module {\r\n /**\r\n * @constructor\r\n * @param {EditorConfig} config\r\n */\r\n constructor({config}) {\r\n super({config});\r\n\r\n /**\r\n * Proxy for Blocks instance {@link Blocks}\r\n *\r\n * @type {Proxy}\r\n * @private\r\n */\r\n this._blocks = null;\r\n\r\n /**\r\n * Index of current working block\r\n *\r\n * @type {number}\r\n * @private\r\n */\r\n this.currentBlockIndex = -1;\r\n }\r\n\r\n /**\r\n * Should be called after Editor.UI preparation\r\n * Define this._blocks property\r\n *\r\n * @returns {Promise}\r\n */\r\n prepare() {\r\n return new Promise(resolve => {\r\n let blocks = new Blocks(this.Editor.UI.nodes.redactor);\r\n\r\n /**\r\n * We need to use Proxy to overload set/get [] operator.\r\n * So we can use array-like syntax to access blocks\r\n *\r\n * @example\r\n * this._blocks[0] = new Block(...);\r\n *\r\n * block = this._blocks[0];\r\n *\r\n * @todo proxy the enumerate method\r\n *\r\n * @type {Proxy}\r\n * @private\r\n */\r\n this._blocks = new Proxy(blocks, {\r\n set: Blocks.set,\r\n get: Blocks.get\r\n });\r\n\r\n resolve();\r\n });\r\n }\r\n\r\n /**\r\n * Creates Block instance by tool name\r\n *\r\n * @param {String} toolName - tools passed in editor config {@link EditorConfig#tools}\r\n * @param {Object} data - constructor params\r\n * @param {Object} settings - block settings\r\n *\r\n * @return {Block}\r\n */\r\n composeBlock(toolName, data, settings) {\r\n let toolInstance = this.Editor.Tools.construct(toolName, data),\r\n toolClass = this.Editor.Tools.available[toolName],\r\n block = new Block(toolName, toolInstance, toolClass, settings, this.Editor.API.methods);\r\n\r\n this.bindEvents(block);\r\n return block;\r\n }\r\n\r\n /**\r\n * Bind Events\r\n * @param {Object} block\r\n */\r\n bindEvents(block) {\r\n this.Editor.Listeners.on(block.holder, 'keydown', (event) => this.Editor.BlockEvents.keydown(event), true);\r\n this.Editor.Listeners.on(block.holder, 'mouseup', (event) => this.Editor.BlockEvents.mouseUp(event));\r\n this.Editor.Listeners.on(block.holder, 'keyup', (event) => this.Editor.BlockEvents.keyup(event));\r\n this.Editor.Listeners.on(block.holder, 'dragover', (event) => this.Editor.BlockEvents.dragOver(event));\r\n this.Editor.Listeners.on(block.holder, 'dragleave', (event) => this.Editor.BlockEvents.dragLeave(event));\r\n }\r\n\r\n /**\r\n * Insert new block into _blocks\r\n *\r\n * @param {String} toolName — plugin name, by default method inserts initial block type\r\n * @param {Object} data — plugin data\r\n * @param {Object} settings - default settings\r\n *\r\n * @return {Block}\r\n */\r\n insert(toolName = this.config.initialBlock, data = {}, settings = {}) {\r\n // Increment index before construct,\r\n // because developers can use API/Blocks/getCurrentInputIndex on the render() method\r\n const newIndex = ++this.currentBlockIndex;\r\n const block = this.composeBlock(toolName, data, settings);\r\n\r\n this._blocks[newIndex] = block;\r\n return block;\r\n }\r\n\r\n /**\r\n * Always inserts at the end\r\n * @return {Block}\r\n */\r\n insertAtEnd() {\r\n /**\r\n * Define new value for current block index\r\n */\r\n this.currentBlockIndex = this.blocks.length - 1;\r\n\r\n /**\r\n * Insert initial typed block\r\n */\r\n return this.insert();\r\n }\r\n\r\n /**\r\n * Merge two blocks\r\n * @param {Block} targetBlock - previous block will be append to this block\r\n * @param {Block} blockToMerge - block that will be merged with target block\r\n *\r\n * @return {Promise} - the sequence that can be continued\r\n */\r\n mergeBlocks(targetBlock, blockToMerge) {\r\n let blockToMergeIndex = this._blocks.indexOf(blockToMerge);\r\n\r\n return Promise.resolve()\r\n .then( () => {\r\n if (blockToMerge.isEmpty) {\r\n return;\r\n }\r\n\r\n return blockToMerge.data\r\n .then((blockToMergeInfo) => {\r\n targetBlock.mergeWith(blockToMergeInfo.data);\r\n });\r\n })\r\n .then( () => {\r\n this.removeBlock(blockToMergeIndex);\r\n this.currentBlockIndex = this._blocks.indexOf(targetBlock);\r\n });\r\n }\r\n\r\n /**\r\n * Remove block with passed index or remove last\r\n * @param {Number|null} index\r\n */\r\n removeBlock(index) {\r\n if (!index) {\r\n index = this.currentBlockIndex;\r\n }\r\n this._blocks.remove(index);\r\n\r\n /**\r\n * If first Block was removed, insert new Initial Block and set focus on it`s first input\r\n */\r\n if (!this.blocks.length) {\r\n this.currentBlockIndex = -1;\r\n this.insert();\r\n this.currentBlock.firstInput.focus();\r\n }\r\n }\r\n\r\n /**\r\n * Split current Block\r\n * 1. Extract content from Caret position to the Block`s end\r\n * 2. Insert a new Block below current one with extracted content\r\n *\r\n * @return {Block}\r\n */\r\n split() {\r\n let extractedFragment = this.Editor.Caret.extractFragmentFromCaretPosition(),\r\n wrapper = $.make('div');\r\n\r\n wrapper.append(extractedFragment);\r\n\r\n /**\r\n * @todo make object in accordance with Tool\r\n */\r\n let data = {\r\n text: $.isEmpty(wrapper) ? '' : wrapper.innerHTML,\r\n };\r\n\r\n /**\r\n * Renew current Block\r\n * @type {Block}\r\n */\r\n return this.insert(this.config.initialBlock, data);\r\n }\r\n\r\n /**\r\n * Replace current working block\r\n *\r\n * @param {String} toolName — plugin name\r\n * @param {Object} data — plugin data\r\n *\r\n * @return {Block}\r\n */\r\n replace(toolName, data = {}) {\r\n let block = this.composeBlock(toolName, data);\r\n\r\n this._blocks.insert(this.currentBlockIndex, block, true);\r\n\r\n return block;\r\n }\r\n\r\n /**\r\n * returns last Block\r\n * @return {Block}\r\n */\r\n get lastBlock() {\r\n return this._blocks[this._blocks.length - 1];\r\n }\r\n\r\n /**\r\n * Returns Block by passed index\r\n * @param {Number} index\r\n * @return {Block}\r\n */\r\n getBlockByIndex(index) {\r\n return this._blocks[index];\r\n }\r\n\r\n /**\r\n * Get Block instance by html element\r\n * @param {Node} element\r\n * @returns {Block}\r\n */\r\n getBlock(element) {\r\n if (!$.isElement(element)) {\r\n element = element.parentNode;\r\n }\r\n\r\n let nodes = this._blocks.nodes,\r\n firstLevelBlock = element.closest(`.${Block.CSS.wrapper}`),\r\n index = nodes.indexOf(firstLevelBlock);\r\n\r\n if (index >= 0) {\r\n return this._blocks[index];\r\n }\r\n }\r\n\r\n /**\r\n * Get current Block instance\r\n *\r\n * @return {Block}\r\n */\r\n get currentBlock() {\r\n return this._blocks[this.currentBlockIndex];\r\n }\r\n\r\n /**\r\n * Returns next Block instance\r\n * @return {Block|null}\r\n */\r\n get nextBlock() {\r\n let isLastBlock = this.currentBlockIndex === (this._blocks.length - 1);\r\n\r\n if (isLastBlock) {\r\n return null;\r\n }\r\n\r\n return this._blocks[this.currentBlockIndex + 1];\r\n }\r\n\r\n /**\r\n * Return first Block with inputs after current Block\r\n *\r\n * @returns {Block | undefined}\r\n */\r\n get nextContentfulBlock() {\r\n const nextBlocks = this.blocks.slice(this.currentBlockIndex + 1);\r\n\r\n return nextBlocks.find(block => !!block.inputs.length);\r\n }\r\n\r\n /**\r\n * Return first Block with inputs before current Block\r\n *\r\n * @returns {Block | undefined}\r\n */\r\n get previousContentfulBlock() {\r\n const previousBlocks = this.blocks.slice(0, this.currentBlockIndex).reverse();\r\n\r\n return previousBlocks.find(block => !!block.inputs.length);\r\n }\r\n\r\n /**\r\n * Returns previous Block instance\r\n * @return {Block|null}\r\n */\r\n get previousBlock() {\r\n let isFirstBlock = this.currentBlockIndex === 0;\r\n\r\n if (isFirstBlock) {\r\n return null;\r\n }\r\n\r\n return this._blocks[this.currentBlockIndex - 1];\r\n }\r\n\r\n /**\r\n * Remove selection from all Blocks then highlight only Current Block\r\n */\r\n highlightCurrentNode() {\r\n /**\r\n * Remove previous selected Block's state\r\n */\r\n this.clearFocused();\r\n\r\n /**\r\n * Mark current Block as selected\r\n * @type {boolean}\r\n */\r\n this.currentBlock.focused = true;\r\n }\r\n\r\n /**\r\n * Remove selection from all Blocks\r\n */\r\n clearFocused() {\r\n this.blocks.forEach( block => block.focused = false);\r\n }\r\n\r\n /**\r\n * Get array of Block instances\r\n *\r\n * @returns {Block[]} {@link Blocks#array}\r\n */\r\n get blocks() {\r\n return this._blocks.array;\r\n }\r\n\r\n /**\r\n * 1) Find first-level Block from passed child Node\r\n * 2) Mark it as current\r\n *\r\n * @param {Element|Text} childNode - look ahead from this node.\r\n * @param {string} caretPosition - position where to set caret\r\n * @throws Error - when passed Node is not included at the Block\r\n */\r\n setCurrentBlockByChildNode(childNode, caretPosition = 'default') {\r\n /**\r\n * If node is Text TextNode\r\n */\r\n if (!$.isElement(childNode)) {\r\n childNode = childNode.parentNode;\r\n }\r\n\r\n const parentFirstLevelBlock = childNode.closest(`.${Block.CSS.wrapper}`);\r\n\r\n if (parentFirstLevelBlock) {\r\n /**\r\n * Update current Block's index\r\n * @type {number}\r\n */\r\n this.currentBlockIndex = this._blocks.nodes.indexOf(parentFirstLevelBlock);\r\n\r\n this.Editor.Caret.setToInput(childNode, caretPosition);\r\n } else {\r\n throw new Error('Can not find a Block from this child Node');\r\n }\r\n }\r\n\r\n /**\r\n * Return block which contents passed node\r\n *\r\n * @param {Node} childNode\r\n * @return {Block}\r\n */\r\n getBlockByChildNode(childNode) {\r\n /**\r\n * If node is Text TextNode\r\n */\r\n if (!$.isElement(childNode)) {\r\n childNode = childNode.parentNode;\r\n }\r\n\r\n const firstLevelBlock = childNode.closest(`.${Block.CSS.wrapper}`);\r\n\r\n return this.blocks.find(block => block.holder === firstLevelBlock);\r\n }\r\n\r\n /**\r\n * Swap Blocks Position\r\n * @param {Number} fromIndex\r\n * @param {Number} toIndex\r\n */\r\n swap(fromIndex, toIndex) {\r\n /** Move up current Block */\r\n this._blocks.swap(fromIndex, toIndex);\r\n\r\n /** Now actual block moved up so that current block index decreased */\r\n this.currentBlockIndex = toIndex;\r\n }\r\n\r\n /**\r\n * Sets current Block Index -1 which means unknown\r\n * and clear highlightings\r\n */\r\n dropPointer() {\r\n this.currentBlockIndex = -1;\r\n this.clearFocused();\r\n }\r\n\r\n /**\r\n * Clears Editor\r\n * @param {boolean} needAddInitialBlock - 1) in internal calls (for example, in api.blocks.render)\r\n * we don't need to add empty initial block\r\n * 2) in api.blocks.clear we should add empty block\r\n */\r\n clear(needAddInitialBlock = false) {\r\n this._blocks.removeAll();\r\n this.dropPointer();\r\n\r\n if (needAddInitialBlock) {\r\n this.insert(this.config.initialBlock);\r\n }\r\n }\r\n};\r\n\r\n/**\r\n * @class Blocks\r\n * @classdesc Class to work with Block instances array\r\n *\r\n * @private\r\n *\r\n * @property {HTMLElement} workingArea — editor`s working node\r\n *\r\n */\r\nclass Blocks {\r\n /**\r\n * @constructor\r\n *\r\n * @param {HTMLElement} workingArea — editor`s working node\r\n */\r\n constructor(workingArea) {\r\n this.blocks = [];\r\n this.workingArea = workingArea;\r\n }\r\n\r\n /**\r\n * Push back new Block\r\n *\r\n * @param {Block} block\r\n */\r\n push(block) {\r\n this.blocks.push(block);\r\n this.workingArea.appendChild(block.holder);\r\n }\r\n\r\n /**\r\n * Swaps blocks with indexes first and second\r\n * @param {Number} first - first block index\r\n * @param {Number} second - second block index\r\n */\r\n swap(first, second) {\r\n let secondBlock = this.blocks[second];\r\n\r\n /**\r\n * Change in DOM\r\n */\r\n $.swap(this.blocks[first].holder, secondBlock.holder);\r\n\r\n /**\r\n * Change in array\r\n */\r\n this.blocks[second] = this.blocks[first];\r\n this.blocks[first] = secondBlock;\r\n }\r\n\r\n /**\r\n * Insert new Block at passed index\r\n *\r\n * @param {Number} index — index to insert Block\r\n * @param {Block} block — Block to insert\r\n * @param {Boolean} replace — it true, replace block on given index\r\n */\r\n insert(index, block, replace = false) {\r\n if (!this.length) {\r\n this.push(block);\r\n return;\r\n }\r\n\r\n if (index > this.length) {\r\n index = this.length;\r\n }\r\n\r\n if (replace) {\r\n this.blocks[index].holder.remove();\r\n }\r\n\r\n let deleteCount = replace ? 1 : 0;\r\n\r\n this.blocks.splice(index, deleteCount, block);\r\n\r\n if (index > 0) {\r\n let previousBlock = this.blocks[index - 1];\r\n\r\n previousBlock.holder.insertAdjacentElement('afterend', block.holder);\r\n } else {\r\n let nextBlock = this.blocks[index + 1];\r\n\r\n if (nextBlock) {\r\n nextBlock.holder.insertAdjacentElement('beforebegin', block.holder);\r\n } else {\r\n this.workingArea.appendChild(block.holder);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Remove block\r\n * @param {Number|null} index\r\n */\r\n remove(index) {\r\n if (isNaN(index)) {\r\n index = this.length - 1;\r\n }\r\n\r\n this.blocks[index].holder.remove();\r\n this.blocks.splice(index, 1);\r\n }\r\n\r\n /**\r\n * Remove all blocks\r\n */\r\n removeAll() {\r\n this.workingArea.innerHTML = '';\r\n this.blocks.length = 0;\r\n }\r\n\r\n /**\r\n * Insert Block after passed target\r\n *\r\n * @todo decide if this method is necessary\r\n *\r\n * @param {Block} targetBlock — target after wich Block should be inserted\r\n * @param {Block} newBlock — Block to insert\r\n */\r\n insertAfter(targetBlock, newBlock) {\r\n let index = this.blocks.indexOf(targetBlock);\r\n\r\n this.insert(index + 1, newBlock);\r\n }\r\n\r\n /**\r\n * Get Block by index\r\n *\r\n * @param {Number} index — Block index\r\n * @returns {Block}\r\n */\r\n get(index) {\r\n return this.blocks[index];\r\n }\r\n\r\n /**\r\n * Return index of passed Block\r\n *\r\n * @param {Block} block\r\n * @returns {Number}\r\n */\r\n indexOf(block) {\r\n return this.blocks.indexOf(block);\r\n }\r\n\r\n /**\r\n * Get length of Block instances array\r\n *\r\n * @returns {Number}\r\n */\r\n get length() {\r\n return this.blocks.length;\r\n }\r\n\r\n /**\r\n * Get Block instances array\r\n *\r\n * @returns {Block[]}\r\n */\r\n get array() {\r\n return this.blocks;\r\n }\r\n\r\n /**\r\n * Get blocks html elements array\r\n *\r\n * @returns {HTMLElement[]}\r\n */\r\n get nodes() {\r\n return _.array(this.workingArea.children);\r\n }\r\n\r\n /**\r\n * Proxy trap to implement array-like setter\r\n *\r\n * @example\r\n * blocks[0] = new Block(...)\r\n *\r\n * @param {Blocks} instance — Blocks instance\r\n * @param {Number|String} index — block index\r\n * @param {Block} block — Block to set\r\n * @returns {Boolean}\r\n */\r\n static set(instance, index, block) {\r\n if (isNaN(Number(index))) {\r\n return false;\r\n }\r\n\r\n instance.insert(index, block);\r\n\r\n return true;\r\n }\r\n\r\n /**\r\n * Proxy trap to implement array-like getter\r\n *\r\n * @param {Blocks} instance — Blocks instance\r\n * @param {Number|String} index — Block index\r\n * @returns {Block|*}\r\n */\r\n static get(instance, index) {\r\n if (isNaN(Number(index))) {\r\n return instance[index];\r\n }\r\n\r\n return instance.get(index);\r\n }\r\n}\r\n","/**\n * @class BlockSelection\n * @classdesc Manages Block selection with shortcut CMD+A and with mouse\n *\n * @module BlockSelection\n * @version 1.0.0\n */\ndeclare var Module: any;\ndeclare var _: any;\ndeclare var $: any;\n\nimport SelectionUtils from '../selection';\n\nexport default class BlockSelection extends Module {\n /**\n * Flag used to define block selection\n * First CMD+A defines it as true and then second CMD+A selects all Blocks\n * @type {boolean}\n */\n private needToSelectAll: boolean = false;\n\n /**\n * SelectionUtils instance\n * @type {SelectionUtils}\n */\n private selection: SelectionUtils;\n\n /**\n * Module Preparation\n * Registers Shortcuts CMD+A and CMD+C\n * to select all and copy them\n */\n public prepare(): void {\n const {Shortcuts, Listener} = this.Editor;\n\n /** Selection shortcut */\n Shortcuts.add({\n name: 'CMD+A',\n handler: (event) => {\n this.handleCommandA(event);\n },\n });\n\n /** shortcut to copy all selected blocks */\n Shortcuts.add({\n name: 'CMD+C',\n handler: (event) => {\n this.handleCommandC(event);\n },\n });\n\n this.selection = new SelectionUtils();\n\n /** Mouse Selection */\n const overlay = $.make('div', 'codex-editor-overlay', {});\n const overlayContainer = $.make('div', 'codex-editor-overlay__container', {});\n const overlayRectangle = $.make('div', 'codex-editor-overlay__rectangle', {});\n const overlayTopScrollZone = $.make('div', 'codex-editor-overlay__scroll-zone--top', {});\n const overlayBottomScrollZone = $.make('div', 'codex-editor-overlay__scroll-zone--bottom', {});\n\n overlay.appendChild(overlayContainer);\n overlay.appendChild(overlayTopScrollZone);\n overlay.appendChild(overlayBottomScrollZone);\n document.body.appendChild(overlay);\n\n const scrollSpeed = 3;\n let mousedown = false;\n let inScrollZone = false;\n let startX = 0;\n let startY = 0;\n\n let options = {\n root: this.Editor.UI.nodes.redactor,\n };\n\n let callback = function (entries, observer) {\n /* Content excerpted, show below */\n console.log('entries', entries);\n console.log('observer', observer);\n };\n\n const observer = new IntersectionObserver(callback, options);\n observer.observe(overlayRectangle);\n\n // activates scrolling if blockSelection is active and mouse is in scroll zone\n function scrollVertical(n) {\n if (inScrollZone && mousedown) {\n window.scrollBy(0, n);\n setTimeout(scrollVertical.bind(this, n), 0);\n }\n }\n\n overlayBottomScrollZone.addEventListener('mouseenter', (event) => {\n inScrollZone = true;\n scrollVertical(scrollSpeed);\n });\n\n overlayTopScrollZone.addEventListener('mouseenter', (event) => {\n inScrollZone = true;\n scrollVertical(-scrollSpeed);\n });\n\n overlayBottomScrollZone.addEventListener('mouseleave', (event) => {\n inScrollZone = false;\n });\n\n overlayTopScrollZone.addEventListener('mouseleave', (event) => {\n inScrollZone = false;\n });\n\n document.body.addEventListener('mousedown', (event) => {\n mousedown = true;\n startX = event.pageX;\n startY = event.pageY;\n\n overlayRectangle.style.left = `${startX}px`;\n overlayRectangle.style.top = `${startY}px`;\n overlayRectangle.style.bottom = `calc(100% - ${startY}px`;\n overlayRectangle.style.right = `calc(100% - ${startX}px`;\n\n overlayContainer.appendChild(overlayRectangle);\n }, false);\n\n document.body.addEventListener('mousemove', (event) => {\n if (mousedown) {\n event.preventDefault();\n\n // Depending on the position of the mouse relative to the starting point,\n // change the distance from the desired edge of the screen*/\n if (event.pageY >= startY) {\n overlayRectangle.style.top = `${startY - window.pageYOffset}px`;\n overlayRectangle.style.bottom = `calc(100% - ${event.clientY}px`;\n } else {\n overlayRectangle.style.bottom = `calc(100% - ${startY - window.pageYOffset}px`;\n overlayRectangle.style.top = `${event.clientY}px`;\n }\n\n if (event.pageX >= startX) {\n overlayRectangle.style.left = `${startX - window.pageXOffset}px`;\n overlayRectangle.style.right = `calc(100% - ${event.clientX}px`;\n } else {\n overlayRectangle.style.right = `calc(100% - ${startX - window.pageXOffset}px`;\n overlayRectangle.style.left = `${event.clientX}px`;\n }\n }\n }, false);\n\n document.body.addEventListener('mouseup', (event) => {\n mousedown = false;\n overlayContainer.removeChild(overlayRectangle);\n\n startX = 0;\n startY = 0;\n }, false);\n\n }\n\n /**\n * Clear selection from Blocks\n */\n public clearSelection(restoreSelection = false) {\n const {BlockManager} = this.Editor;\n const anyBlockSelected = BlockManager.blocks.findIndex((block) => block.selected === true) !== -1;\n\n if (!anyBlockSelected) {\n return;\n }\n\n this.needToSelectAll = false;\n BlockManager.blocks.forEach((block) => block.selected = false);\n\n /**\n * restore selection when Block is already selected\n * but someone tries to write something.\n */\n if (restoreSelection) {\n this.selection.restore();\n }\n }\n\n /**\n * First CMD+A Selects current focused blocks,\n * and consequent second CMD+A keypress selects all blocks\n *\n * @param {keydown} event\n */\n private handleCommandA(event): void {\n /** Prevent default selection */\n event.preventDefault();\n\n if (this.needToSelectAll) {\n this.selectAllBlocks();\n this.needToSelectAll = false;\n } else {\n this.selectBlockByIndex();\n this.needToSelectAll = true;\n }\n }\n\n /**\n * Copying selected blocks\n * Before putting to the clipboard we sanitize all blocks and then copy to the clipboard\n *\n * @param event\n */\n private handleCommandC(event): void {\n const {BlockManager, Sanitizer} = this.Editor;\n const anyBlockSelected = BlockManager.blocks.some((block) => block.selected === true);\n\n if (!anyBlockSelected) {\n return;\n }\n\n const fakeClipboard = $.make('div');\n\n BlockManager.blocks.filter((block) => block.selected)\n .forEach((block) => {\n /**\n * Make

    tag that holds clean HTML\n */\n const cleanHTML = Sanitizer.clean(block.holder.innerHTML, this.sanitizerConfig);\n const fragment = $.make('p');\n\n fragment.innerHTML = cleanHTML;\n fakeClipboard.appendChild(fragment);\n });\n\n _.copyTextToClipboard(fakeClipboard.innerHTML);\n }\n\n /**\n * Select All Blocks\n * Each Block has selected setter that makes Block copyable\n */\n private selectAllBlocks() {\n const {BlockManager} = this.Editor;\n\n BlockManager.blocks.forEach((block) => block.selected = true);\n }\n\n /**\n * select Block\n * @param {number?} index - Block index according to the BlockManager's indexes\n */\n private selectBlockByIndex(index?) {\n const {BlockManager} = this.Editor;\n\n /**\n * Remove previous focused Block's state\n */\n BlockManager.clearFocused();\n\n let block;\n\n if (isNaN(index)) {\n block = BlockManager.currentBlock;\n } else {\n block = BlockManager.getBlockByIndex(index);\n }\n\n /** Save selection */\n this.selection.save();\n SelectionUtils.get()\n .removeAllRanges();\n\n block.selected = true;\n }\n\n /**\n * Sanitizer Config\n * @return {SanitizerConfig}\n */\n private get sanitizerConfig() {\n return {\n p: {},\n h1: {},\n h2: {},\n h3: {},\n h4: {},\n h5: {},\n h6: {},\n ol: {},\n ul: {},\n li: {},\n br: true,\n img: {\n src: true,\n width: true,\n height: true,\n },\n a: {\n href: true,\n },\n b: {},\n i: {},\n u: {},\n };\n }\n}\n","/**\r\n * @class Caret\r\n * @classdesc Contains methods for working Caret\r\n *\r\n * Uses Range methods to manipulate with caret\r\n *\r\n * @module Caret\r\n *\r\n * @version 2.0.0\r\n */\r\n\r\nimport Selection from '../selection';\r\n\r\n/**\r\n * @typedef {Caret} Caret\r\n */\r\nexport default class Caret extends Module {\r\n /**\r\n * @constructor\r\n */\r\n constructor({config}) {\r\n super({config});\r\n }\r\n\r\n /**\r\n * Elements styles that can be useful for Caret Module\r\n */\r\n static get CSS() {\r\n return {\r\n shadowCaret: 'cdx-shadow-caret'\r\n };\r\n };\r\n\r\n /**\r\n * Allowed caret positions in input\r\n *\r\n * @static\r\n * @returns {{START: string, END: string, DEFAULT: string}}\r\n */\r\n static get positions() {\r\n return {\r\n START: 'start',\r\n END: 'end',\r\n DEFAULT: 'default'\r\n };\r\n }\r\n\r\n /**\r\n * Method gets Block instance and puts caret to the text node with offset\r\n * There two ways that method applies caret position:\r\n * - first found text node: sets at the beginning, but you can pass an offset\r\n * - last found text node: sets at the end of the node. Also, you can customize the behaviour\r\n *\r\n * @param {Block} block - Block class\r\n * @param {String} position - position where to set caret. If default - leave default behaviour and apply offset if it's passed\r\n * @param {Number} offset - caret offset regarding to the text node\r\n */\r\n setToBlock(block, position = Caret.positions.DEFAULT, offset = 0) {\r\n const {BlockManager} = this.Editor;\r\n let element;\r\n\r\n switch(position) {\r\n case Caret.positions.START:\r\n element = block.firstInput;\r\n break;\r\n case Caret.positions.END:\r\n element = block.lastInput;\r\n break;\r\n default:\r\n element = block.currentInput;\r\n }\r\n\r\n if (!element) {\r\n return;\r\n }\r\n\r\n const nodeToSet = $.getDeepestNode(element, position === Caret.positions.END);\r\n const contentLength = $.getContentLength(nodeToSet);\r\n\r\n switch (true) {\r\n case position === Caret.positions.START:\r\n offset = 0;\r\n break;\r\n case position === Caret.positions.END:\r\n case offset > contentLength:\r\n offset = contentLength;\r\n break;\r\n }\r\n\r\n /**\r\n * @todo try to fix via Promises or use querySelectorAll to not to use timeout\r\n */\r\n _.delay( () => {\r\n this.set(nodeToSet, offset);\r\n }, 20)();\r\n\r\n BlockManager.setCurrentBlockByChildNode(block.holder);\r\n BlockManager.currentBlock.currentInput = element;\r\n }\r\n\r\n /**\r\n * Set caret to the current input of current Block.\r\n *\r\n * @param {HTMLElement} input - input where caret should be set\r\n * @param {String} position - position of the caret. If default - leave default behaviour and apply offset if it's passed\r\n * @param {number} offset - caret offset regarding to the text node\r\n */\r\n setToInput(input, position = Caret.positions.DEFAULT, offset = 0) {\r\n const {currentBlock} = this.Editor.BlockManager;\r\n const nodeToSet = $.getDeepestNode(input);\r\n\r\n switch (position) {\r\n case Caret.positions.START:\r\n this.set(nodeToSet, 0);\r\n break;\r\n\r\n case Caret.positions.END:\r\n const contentLength = $.getContentLength(nodeToSet);\r\n\r\n this.set(nodeToSet, contentLength);\r\n break;\r\n\r\n default:\r\n if (offset) {\r\n this.set(nodeToSet, offset);\r\n }\r\n }\r\n\r\n currentBlock.currentInput = input;\r\n }\r\n\r\n /**\r\n * Creates Document Range and sets caret to the element with offset\r\n * @param {Element} element - target node.\r\n * @param {Number} offset - offset\r\n */\r\n set( element, offset = 0) {\r\n const range = document.createRange(),\r\n selection = Selection.get();\r\n\r\n /** if found deepest node is native input */\r\n if ($.isNativeInput(element)) {\r\n element.focus();\r\n element.selectionStart = element.selectionEnd = offset;\r\n return;\r\n }\r\n\r\n range.setStart(element, offset);\r\n range.setEnd(element, offset);\r\n\r\n selection.removeAllRanges();\r\n selection.addRange(range);\r\n\r\n\r\n /** If new cursor position is not visible, scroll to it */\r\n const {top, bottom} = range.getBoundingClientRect();\r\n const {innerHeight} = window;\r\n\r\n if (top < 0) window.scrollBy(0, top);\r\n if (bottom > innerHeight) window.scrollBy(0, bottom - innerHeight);\r\n };\r\n\r\n /**\r\n * Set Caret to the last Block\r\n * If last block is not empty, append another empty block\r\n */\r\n setToTheLastBlock() {\r\n let lastBlock = this.Editor.BlockManager.lastBlock;\r\n\r\n if (!lastBlock) return;\r\n\r\n /**\r\n * If last block is empty and it is an initialBlock, set to that.\r\n * Otherwise, append new empty block and set to that\r\n */\r\n if (lastBlock.isEmpty) {\r\n this.setToBlock(lastBlock);\r\n } else {\r\n const newBlock = this.Editor.BlockManager.insertAtEnd();\r\n\r\n this.setToBlock(newBlock);\r\n }\r\n }\r\n\r\n /**\r\n * Extract content fragment of current Block from Caret position to the end of the Block\r\n */\r\n extractFragmentFromCaretPosition() {\r\n let selection = Selection.get();\r\n\r\n if (selection.rangeCount) {\r\n const selectRange = selection.getRangeAt(0);\r\n const currentBlockInput = this.Editor.BlockManager.currentBlock.currentInput;\r\n\r\n\r\n selectRange.deleteContents();\r\n\r\n if (currentBlockInput) {\r\n let range = selectRange.cloneRange(true);\r\n\r\n range.selectNodeContents(currentBlockInput);\r\n range.setStart(selectRange.endContainer, selectRange.endOffset);\r\n return range.extractContents();\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Get all first-level (first child of [contenteditabel]) siblings from passed node\r\n * Then you can check it for emptiness\r\n *\r\n * @example\r\n *

    \r\n *\r\n * @return {Element[]}\r\n */\r\n getHigherLevelSiblings(from, direction ) {\r\n let current = from,\r\n siblings = [];\r\n\r\n /**\r\n * Find passed node's firs-level parent (in example - blockquote)\r\n */\r\n while (current.parentNode && current.parentNode.contentEditable !== 'true') {\r\n current = current.parentNode;\r\n }\r\n\r\n let sibling = direction === 'left' ? 'previousSibling' : 'nextSibling';\r\n\r\n /**\r\n * Find all left/right siblings\r\n */\r\n while (current[sibling]) {\r\n current = current[sibling];\r\n siblings.push(current);\r\n }\r\n\r\n return siblings;\r\n }\r\n\r\n /**\r\n * Set's caret to the next Block or Tool`s input\r\n * Before moving caret, we should check if caret position is at the end of Plugins node\r\n * Using {@link Dom#getDeepestNode} to get a last node and match with current selection\r\n *\r\n * @param {Boolean} force - force navigation even if caret is not at the end\r\n *\r\n * @return {Boolean}\r\n */\r\n navigateNext(force = false) {\r\n const {currentBlock, nextContentfulBlock} = this.Editor.BlockManager;\r\n const {nextInput} = currentBlock;\r\n\r\n if (!nextContentfulBlock && !nextInput) {\r\n return false;\r\n }\r\n\r\n if (force) {\r\n this.setToBlock(nextContentfulBlock, Caret.positions.START);\r\n return true;\r\n }\r\n\r\n if (this.isAtEnd) {\r\n /** If next Tool`s input exists, focus on it. Otherwise set caret to the next Block */\r\n if (!nextInput) {\r\n this.setToBlock(nextContentfulBlock, Caret.positions.START);\r\n } else {\r\n this.setToInput(nextInput, Caret.positions.START);\r\n }\r\n\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n /**\r\n * Set's caret to the previous Tool`s input or Block\r\n * Before moving caret, we should check if caret position is start of the Plugins node\r\n * Using {@link Dom#getDeepestNode} to get a last node and match with current selection\r\n *\r\n * @param {Boolean} force - force navigation even if caret is not at the start\r\n *\r\n * @return {Boolean}\r\n */\r\n navigatePrevious(force = false) {\r\n const {currentBlock, previousContentfulBlock} = this.Editor.BlockManager;\r\n const {previousInput} = currentBlock || {};\r\n\r\n if (!previousContentfulBlock && !previousInput) {\r\n return false;\r\n }\r\n\r\n if (force) {\r\n this.setToBlock( previousContentfulBlock, Caret.positions.END );\r\n }\r\n\r\n if (this.isAtStart) {\r\n /** If previous Tool`s input exists, focus on it. Otherwise set caret to the previous Block */\r\n if (!previousInput) {\r\n this.setToBlock( previousContentfulBlock, Caret.positions.END );\r\n } else {\r\n this.setToInput(previousInput, Caret.positions.END);\r\n }\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n /**\r\n * Get's deepest first node and checks if offset is zero\r\n * @return {boolean}\r\n */\r\n get isAtStart() {\r\n /**\r\n * Don't handle ranges\r\n */\r\n if (!Selection.isCollapsed) {\r\n return false;\r\n }\r\n\r\n let selection = Selection.get(),\r\n anchorNode = selection.anchorNode,\r\n firstNode = $.getDeepestNode(this.Editor.BlockManager.currentBlock.currentInput);\r\n\r\n /** In case lastNode is native input */\r\n if ($.isNativeInput(firstNode)) {\r\n return firstNode.selectionEnd === 0;\r\n }\r\n\r\n /**\r\n * Workaround case when caret in the text like \" |Hello!\"\r\n * selection.anchorOffset is 1, but real caret visible position is 0\r\n * @type {number}\r\n */\r\n let firstLetterPosition = anchorNode.textContent.search(/\\S/);\r\n\r\n if (firstLetterPosition === -1) { // empty text\r\n firstLetterPosition = 0;\r\n }\r\n\r\n /**\r\n * In case of\r\n *
    \r\n *

    <-- first (and deepest) node is \r\n * |adaddad <-- anchor node\r\n *
    \r\n */\r\n if ($.isEmpty(firstNode)) {\r\n let leftSiblings = this.getHigherLevelSiblings(anchorNode, 'left'),\r\n nothingAtLeft = leftSiblings.every( node => $.isEmpty(node) );\r\n\r\n\r\n\r\n if (nothingAtLeft && selection.anchorOffset === firstLetterPosition) {\r\n return true;\r\n }\r\n }\r\n\r\n /**\r\n * We use <= comparison for case:\r\n * \"| Hello\" <--- selection.anchorOffset is 0, but firstLetterPosition is 1\r\n */\r\n return firstNode === null || anchorNode === firstNode && selection.anchorOffset <= firstLetterPosition;\r\n }\r\n\r\n /**\r\n * Get's deepest last node and checks if offset is last node text length\r\n * @return {boolean}\r\n */\r\n get isAtEnd() {\r\n /**\r\n * Don't handle ranges\r\n */\r\n if (!Selection.isCollapsed) {\r\n return false;\r\n }\r\n\r\n let selection = Selection.get(),\r\n anchorNode = selection.anchorNode,\r\n lastNode = $.getDeepestNode(this.Editor.BlockManager.currentBlock.currentInput, true);\r\n\r\n /** In case lastNode is native input */\r\n if ($.isNativeInput(lastNode)) {\r\n return lastNode.selectionEnd === lastNode.value.length;\r\n }\r\n\r\n /**\r\n * In case of\r\n *
    \r\n * adaddad| <-- anchor node\r\n *

    <-- first (and deepest) node is \r\n *
    \r\n */\r\n if ($.isEmpty(lastNode)) {\r\n let leftSiblings = this.getHigherLevelSiblings(anchorNode, 'right'),\r\n nothingAtRight = leftSiblings.every( node => $.isEmpty(node) );\r\n\r\n if (nothingAtRight && selection.anchorOffset === anchorNode.textContent.length) {\r\n return true;\r\n }\r\n }\r\n\r\n /**\r\n * Workaround case:\r\n * hello | <--- anchorOffset will be 5, but textContent.length will be 6.\r\n * Why not regular .trim():\r\n * in case of ' hello |' trim() will also remove space at the beginning, so length will be lower than anchorOffset\r\n */\r\n let rightTrimmedText = lastNode.textContent.replace(/\\s+$/, '');\r\n\r\n /**\r\n * We use >= comparison for case:\r\n * \"Hello |\" <--- selection.anchorOffset is 7, but rightTrimmedText is 6\r\n */\r\n return anchorNode === lastNode && selection.anchorOffset >= rightTrimmedText.length;\r\n }\r\n\r\n /**\r\n * Inserts shadow element after passed element where caret can be placed\r\n * @param {Node} element\r\n */\r\n createShadow(element) {\r\n let shadowCaret = document.createElement('span');\r\n\r\n shadowCaret.classList.add(Caret.CSS.shadowCaret);\r\n element.insertAdjacentElement('beforeEnd', shadowCaret);\r\n }\r\n\r\n /**\r\n * Restores caret position\r\n * @param {Node} element\r\n */\r\n restoreCaret(element) {\r\n let shadowCaret = element.querySelector(`.${Caret.CSS.shadowCaret}`);\r\n\r\n if (!shadowCaret) {\r\n return;\r\n }\r\n\r\n /**\r\n * After we set the caret to the required place\r\n * we need to clear shadow caret\r\n *\r\n * - make new range\r\n * - select shadowed span\r\n * - use extractContent to remove it from DOM\r\n */\r\n let sel = new Selection();\r\n\r\n sel.expandToTag(shadowCaret);\r\n\r\n setTimeout(() => {\r\n let newRange = document.createRange();\r\n\r\n newRange.selectNode(shadowCaret);\r\n newRange.extractContents();\r\n }, 50);\r\n }\r\n}\r\n","import SelectionUtils from '../selection';\r\n\r\ndeclare var Module: any;\r\n\r\nexport default class DragNDrop extends Module {\r\n\r\n /**\r\n * If drag has been started at editor, we save it\r\n *\r\n * @type Boolean\r\n * @private\r\n */\r\n private isStartedAtEditor = false;\r\n\r\n /**\r\n * Bind events\r\n *\r\n * @private\r\n */\r\n public prepare(): void {\r\n this.bindEvents();\r\n }\r\n\r\n /**\r\n * Add drag events listeners to editor zone\r\n * @private\r\n */\r\n private bindEvents(): void {\r\n this.Editor.Listeners.on(this.Editor.UI.nodes.holder, 'drop', this.processDrop, true);\r\n\r\n this.Editor.Listeners.on(this.Editor.UI.nodes.holder, 'dragstart', (dragEvent: DragEvent) => {\r\n\r\n if (SelectionUtils.isAtEditor && !SelectionUtils.isCollapsed) {\r\n this.isStartedAtEditor = true;\r\n }\r\n\r\n this.Editor.InlineToolbar.close();\r\n });\r\n\r\n /* Prevent default browser behavior to allow drop on non-contenteditable elements */\r\n this.Editor.Listeners.on(this.Editor.UI.nodes.holder, 'dragover', (e) => e.preventDefault(), true);\r\n }\r\n\r\n /**\r\n * Handle drop event\r\n *\r\n * @param {DragEvent} dropEvent\r\n */\r\n private processDrop = async (dropEvent: DragEvent): Promise => {\r\n const {\r\n BlockManager,\r\n Paste,\r\n } = this.Editor;\r\n\r\n dropEvent.preventDefault();\r\n\r\n BlockManager.blocks.forEach((block) => block.dropTarget = false);\r\n\r\n if (SelectionUtils.isAtEditor && !SelectionUtils.isCollapsed && this.isStartedAtEditor) {\r\n document.execCommand('delete');\r\n }\r\n\r\n this.isStartedAtEditor = false;\r\n\r\n /**\r\n * Try to set current block by drop target.\r\n * If drop target (error will be thrown) is not part of the Block, set last Block as current.\r\n */\r\n try {\r\n BlockManager.setCurrentBlockByChildNode(dropEvent.target, 'end');\r\n } catch (e) {\r\n BlockManager.setCurrentBlockByChildNode(BlockManager.lastBlock.holder, 'end');\r\n }\r\n\r\n Paste.processDataTransfer(dropEvent.dataTransfer, true);\r\n }\r\n}\r\n","/**\r\n * @module eventDispatcher\r\n *\r\n * Has two important methods:\r\n * - {Function} on - appends subscriber to the event. If event doesn't exist - creates new one\r\n * - {Function} emit - fires all subscribers with data\r\n * - {Function off - unsubsribes callback\r\n *\r\n * @version 1.0.0\r\n *\r\n * @typedef {Events} Events\r\n * @property {Object} subscribers - all subscribers grouped by event name\r\n */\r\nexport default class Events extends Module {\r\n /**\r\n * @constructor\r\n */\r\n constructor({config}) {\r\n super({config});\r\n this.subscribers = {};\r\n }\r\n\r\n /**\r\n * Subscribe any event on callback\r\n *\r\n * @param {String} eventName - event name\r\n * @param {Function} callback - subscriber\r\n */\r\n on(eventName, callback) {\r\n if (!(eventName in this.subscribers)) {\r\n this.subscribers[eventName] = [];\r\n }\r\n\r\n // group by events\r\n this.subscribers[eventName].push(callback);\r\n }\r\n\r\n /**\r\n * Emit callbacks with passed data\r\n *\r\n * @param {String} eventName - event name\r\n * @param {Object} data - subscribers get this data when they were fired\r\n */\r\n emit(eventName, data) {\r\n if (!this.subscribers[eventName]) {\r\n return;\r\n }\r\n\r\n this.subscribers[eventName].reduce(function (previousData, currentHandler) {\r\n let newData = currentHandler(previousData);\r\n\r\n return newData ? newData : previousData;\r\n }, data);\r\n }\r\n\r\n /**\r\n * Unsubsribe callback from event\r\n *\r\n * @param eventName\r\n * @param callback\r\n */\r\n off(eventName, callback) {\r\n for(let i = 0; i < this.subscribers[eventName].length; i++) {\r\n if (this.subscribers[eventName][i] === callback) {\r\n delete this.subscribers[eventName][i];\r\n break;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Destroyer\r\n * clears subsribers list\r\n */\r\n destroy() {\r\n this.subscribers = null;\r\n }\r\n}\r\n","/**\r\n * Codex Editor Listeners module\r\n *\r\n * @module Listeners\r\n *\r\n * Module-decorator for event listeners assignment\r\n *\r\n * @author Codex Team\r\n * @version 2.0.0\r\n */\r\n\r\n/**\r\n * @typedef {Listeners} Listeners\r\n * @property {Array} allListeners\r\n */\r\nexport default class Listeners extends Module {\r\n /**\r\n * @constructor\r\n * @param {EditorConfig} config\r\n */\r\n constructor({config}) {\r\n super({config});\r\n this.allListeners = [];\r\n }\r\n\r\n /**\r\n * Assigns event listener on element\r\n *\r\n * @param {Element} element - DOM element that needs to be listened\r\n * @param {String} eventType - event type\r\n * @param {Function} handler - method that will be fired on event\r\n * @param {Boolean} useCapture - use event bubbling\r\n */\r\n on(element, eventType, handler, useCapture = false) {\r\n let assignedEventData = {\r\n element,\r\n eventType,\r\n handler,\r\n useCapture\r\n };\r\n\r\n let alreadyExist = this.findOne(element, eventType, handler);\r\n\r\n if (alreadyExist) return;\r\n\r\n this.allListeners.push(assignedEventData);\r\n element.addEventListener(eventType, handler, useCapture);\r\n }\r\n\r\n /**\r\n * Removes event listener from element\r\n *\r\n * @param {Element} element - DOM element that we removing listener\r\n * @param {String} eventType - event type\r\n * @param {Function} handler - remove handler, if element listens several handlers on the same event type\r\n * @param {Boolean} useCapture - use event bubbling\r\n */\r\n off(element, eventType, handler, useCapture = false) {\r\n let existingListeners = this.findAll(element, eventType, handler);\r\n\r\n for (let i = 0; i < existingListeners.length; i++) {\r\n let index = this.allListeners.indexOf(existingListeners[i]);\r\n\r\n if (index > 0) {\r\n this.allListeners.splice(index, 1);\r\n }\r\n }\r\n\r\n element.removeEventListener(eventType, handler, useCapture);\r\n }\r\n\r\n /**\r\n * Search method: looks for listener by passed element\r\n * @param {Element} element - searching element\r\n * @returns {Array} listeners that found on element\r\n */\r\n findByElement(element) {\r\n let listenersOnElement = [];\r\n\r\n for (let i = 0; i < this.allListeners.length; i++) {\r\n let listener = this.allListeners[i];\r\n\r\n if (listener.element === element) {\r\n listenersOnElement.push(listener);\r\n }\r\n }\r\n\r\n return listenersOnElement;\r\n }\r\n\r\n /**\r\n * Search method: looks for listener by passed event type\r\n * @param {String} eventType\r\n * @return {Array} listeners that found on element\r\n */\r\n findByType(eventType) {\r\n let listenersWithType = [];\r\n\r\n for (let i = 0; i < this.allListeners.length; i++) {\r\n let listener = this.allListeners[i];\r\n\r\n if (listener.type === eventType) {\r\n listenersWithType.push(listener);\r\n }\r\n }\r\n\r\n return listenersWithType;\r\n }\r\n\r\n /**\r\n * Search method: looks for listener by passed handler\r\n * @param {Function} handler\r\n * @return {Array} listeners that found on element\r\n */\r\n findByHandler(handler) {\r\n let listenersWithHandler = [];\r\n\r\n for (let i = 0; i < this.allListeners.length; i++) {\r\n let listener = this.allListeners[i];\r\n\r\n if (listener.handler === handler) {\r\n listenersWithHandler.push(listener);\r\n }\r\n }\r\n\r\n return listenersWithHandler;\r\n }\r\n\r\n /**\r\n * @param {Element} element\r\n * @param {String} eventType\r\n * @param {Function} handler\r\n * @return {Element|null}\r\n */\r\n findOne(element, eventType, handler) {\r\n let foundListeners = this.findAll(element, eventType, handler);\r\n\r\n return foundListeners.length > 0 ? foundListeners[0] : null;\r\n }\r\n\r\n /**\r\n * @param {Element} element\r\n * @param {String} eventType\r\n * @param {Function} handler\r\n * @return {Array}\r\n */\r\n findAll(element, eventType, handler) {\r\n let found,\r\n foundByElements = element ? this.findByElement(element) : [];\r\n // foundByEventType = eventType ? this.findByType(eventType) : [],\r\n // foundByHandler = handler ? this.findByHandler(handler) : [];\r\n\r\n if (element && eventType && handler) {\r\n found = foundByElements.filter( event => event.eventType === eventType && event.handler === handler );\r\n } else if (element && eventType) {\r\n found = foundByElements.filter( event => event.eventType === eventType);\r\n } else {\r\n found = foundByElements;\r\n }\r\n\r\n return found;\r\n }\r\n\r\n /**\r\n * Removes all listeners\r\n */\r\n removeAll() {\r\n this.allListeners.map( (current) => {\r\n current.element.removeEventListener(current.eventType, current.handler);\r\n });\r\n\r\n this.allListeners = [];\r\n }\r\n}\r\n","/**\r\n * @module ModificationsObserver\r\n *\r\n * Handles any mutations\r\n * and gives opportunity to handle outside\r\n */\r\n\r\nimport IEditorConfig from '../interfaces/editor-config';\r\n\r\ndeclare const Module: any;\r\ndeclare const _: any;\r\n\r\nexport default class ModificationsObserver extends Module {\r\n\r\n /**\r\n * Debounce Timer\r\n * @type {number}\r\n */\r\n public static readonly DebounceTimer = 450;\r\n\r\n /**\r\n * Used to prevent several mutation callback execution\r\n * @type {Function}\r\n */\r\n private mutationDebouncer = _.debounce( () => {\r\n this.config.onChange.call();\r\n }, ModificationsObserver.DebounceTimer);\r\n\r\n /**\r\n * Constructor\r\n * @param {IEditorConfig} config\r\n */\r\n constructor({config}) {\r\n super({config});\r\n }\r\n\r\n /**\r\n * Clear timeout and set null to mutationDebouncer property\r\n */\r\n public destroy() {\r\n this.mutationDebouncer = null;\r\n }\r\n\r\n /**\r\n * Preparation method\r\n * @return {Promise}\r\n */\r\n public async prepare(): Promise {\r\n /**\r\n * wait till Browser render Editor's Blocks\r\n */\r\n window.setTimeout( () => {\r\n this.setObserver();\r\n }, 1000);\r\n }\r\n\r\n /**\r\n * setObserver\r\n *\r\n * sets 'DOMSubtreeModified' listener on Editor's UI.nodes.redactor\r\n * so that User can handle outside from API\r\n */\r\n private setObserver(): void {\r\n const {Listeners, UI} = this.Editor;\r\n\r\n /**\r\n * Set Listener to the Editor
    element that holds only Blocks\r\n */\r\n Listeners.on(UI.nodes.redactor, 'DOMSubtreeModified', () => {\r\n this.mutationDebouncer();\r\n }, false);\r\n }\r\n}\r\n","import Module from '../__module';\r\n\r\n/**\r\n * Use external package module for notifications\r\n *\r\n * @see https://github.com/codex-team/js-notifier\r\n */\r\nimport notifier, {ConfirmNotifierOptions, NotifierOptions, PromptNotifierOptions} from 'codex-notifier';\r\n\r\n/**\r\n * Notifier module\r\n */\r\nexport default class Notifier extends Module {\r\n\r\n /**\r\n * Show web notification\r\n *\r\n * @param {NotifierOptions | ConfirmNotifierOptions | PromptNotifierOptions} options\r\n */\r\n public show(options: NotifierOptions | ConfirmNotifierOptions | PromptNotifierOptions) {\r\n notifier.show(options);\r\n }\r\n}\r\n","import IBlockToolData from '../interfaces/tools/block-tool';\r\nimport IEditorConfig from '../interfaces/editor-config';\r\nimport CaretClass from './caret';\r\nimport SelectionUtils from '../selection';\r\n\r\ndeclare const Module: any;\r\ndeclare const $: any;\r\ndeclare const _: any;\r\n\r\n/**\r\n * Tag substitute object.\r\n *\r\n * @param {string} tool - name of related Tool\r\n * @param {Function} handler - callback to handle pasted element\r\n */\r\ninterface ITagSubstitute {\r\n tool: string;\r\n handler: (element: HTMLElement) => IBlockToolData;\r\n}\r\n\r\n/**\r\n * Pattern substitute object.\r\n *\r\n * @param {string} key - pattern`s key\r\n * @param {RegExp} pattern - pasted pattern\r\n * @param {Function} handler - callback to handle pasted pattern\r\n * @param {string} tool - name of related Tool\r\n */\r\ninterface IPatternSubstitute {\r\n key: string;\r\n pattern: RegExp;\r\n handler: (text: string, key: string) => IBlockToolData;\r\n tool: string;\r\n}\r\n\r\n/**\r\n * Files` types substitutions object.\r\n *\r\n * @param {string[]} extensions - array of extenstions Tool can handle\r\n * @param {string[]} mimeTypes - array of MIME types Tool can handle\r\n * @param {Function} handler - callback to handle pasted File\r\n */\r\ninterface IFilesSubstitution {\r\n extensions: string[];\r\n mimeTypes: string[];\r\n handler: (file: File) => IBlockToolData;\r\n}\r\n\r\n/**\r\n * Processed paste data object.\r\n *\r\n * @param {string} tool - name of related Tool\r\n * @param {HTMLElement} content - processed pasted content\r\n * @param {boolean} isBlock - true if content should be inserted as new Block\r\n * @param {Function} handler - callback that returns pasted data in IBlockToolData format\r\n */\r\ninterface IPasteData {\r\n tool: string;\r\n content: HTMLElement;\r\n isBlock: boolean;\r\n handler: (content: HTMLElement|string, patten?: RegExp) => IBlockToolData;\r\n}\r\n\r\n/**\r\n * Tool onPaste configuration object\r\n */\r\ninterface IPasteConfig {\r\n tags?: string[];\r\n handler?: (element: HTMLElement) => IBlockToolData;\r\n patterns?: {[key: string]: RegExp};\r\n patternHandler?: (text: string, key: string) => IBlockToolData;\r\n files?: {extensions?: string[], mimeTypes?: string[]};\r\n fileHandler?: (file: File) => IBlockToolData;\r\n}\r\n\r\n/**\r\n * @class Paste\r\n * @classdesc Contains methods to handle paste on editor\r\n *\r\n * @module Paste\r\n *\r\n * @version 2.0.0\r\n */\r\nexport default class Paste extends Module {\r\n\r\n /** If string`s length is greater than this number we don't check paste patterns */\r\n public static readonly PATTERN_PROCESSING_MAX_LENGTH = 450;\r\n\r\n /**\r\n * Tags` substitutions parameters\r\n */\r\n private toolsTags: {[tag: string]: ITagSubstitute} = {};\r\n\r\n /**\r\n * Store tags to substitute by tool name\r\n */\r\n private tagsByTool: {[tools: string]: string[]} = {};\r\n\r\n /** Patterns` substitutions parameters */\r\n private toolsPatterns: IPatternSubstitute[] = [];\r\n\r\n /** Files` substitutions parameters */\r\n private toolsFiles: {\r\n [tool: string]: IFilesSubstitution,\r\n } = {};\r\n\r\n /**\r\n * @constructor\r\n * @param {IEditorConfig} config\r\n */\r\n constructor({config}) {\r\n super({config});\r\n }\r\n\r\n /**\r\n * Set onPaste callback and collect tools` paste configurations\r\n *\r\n * @public\r\n */\r\n public async prepare(): Promise {\r\n this.setCallback();\r\n this.processTools();\r\n }\r\n\r\n /**\r\n * Handle pasted or dropped data transfer object\r\n *\r\n * @param {DataTransfer} dataTransfer - pasted or dropped data transfer object\r\n */\r\n public async processDataTransfer(dataTransfer: DataTransfer, isDragNDrop = false): Promise {\r\n const { Sanitizer } = this.Editor;\r\n\r\n if (dataTransfer.types.includes('Files')) {\r\n await this.processFiles(dataTransfer.items);\r\n return;\r\n }\r\n\r\n const plainData = dataTransfer.getData('text/plain');\r\n let htmlData = dataTransfer.getData('text/html');\r\n\r\n /**\r\n * If text was drag'n'dropped, wrap content with P tag to insert it as the new Block\r\n */\r\n if (isDragNDrop && plainData.trim() && htmlData.trim()) {\r\n htmlData = '

    ' + ( htmlData.trim() ? htmlData : plainData ) + '

    ';\r\n }\r\n\r\n /** Add all tags that can be substituted to sanitizer configuration */\r\n const toolsTags = Object.keys(this.toolsTags).reduce((result, tag) => {\r\n result[tag.toLowerCase()] = true;\r\n\r\n return result;\r\n }, {});\r\n\r\n const customConfig = Object.assign({}, toolsTags, Sanitizer.getAllInlineToolsConfig());\r\n\r\n const cleanData = Sanitizer.clean(htmlData, customConfig);\r\n\r\n /** If there is no HTML or HTML string is equal to plain one, process it as plain text */\r\n if (!cleanData.trim() || cleanData.trim() === plainData || !$.isHTMLString(cleanData)) {\r\n await this.processText(plainData);\r\n } else {\r\n await this.processText(cleanData, true);\r\n }\r\n }\r\n\r\n /**\r\n * Set onPaste callback handler\r\n */\r\n private setCallback(): void {\r\n const {Listeners, UI} = this.Editor;\r\n\r\n Listeners.on(UI.nodes.redactor, 'paste', this.handlePasteEvent);\r\n }\r\n\r\n /**\r\n * Get and process tool`s paste configs\r\n */\r\n private processTools(): void {\r\n const tools = this.Editor.Tools.blockTools;\r\n\r\n Object.entries(tools).forEach(this.processTool);\r\n }\r\n\r\n /**\r\n * Process paste config for each tool\r\n *\r\n * @param {string} name\r\n * @param {Tool} tool\r\n */\r\n private processTool = ([name, tool]) => {\r\n try {\r\n const toolPasteConfig = tool.onPaste || {};\r\n\r\n this.getTagsConfig(name, toolPasteConfig);\r\n this.getFilesConfig(name, toolPasteConfig);\r\n this.getPatternsConfig(name, toolPasteConfig);\r\n } catch (e) {\r\n _.log(\r\n `Paste handling for «${name}» Tool hasn't been set up because of the error`,\r\n 'warn',\r\n e,\r\n );\r\n }\r\n }\r\n\r\n /**\r\n * Get tags to substitute by Tool\r\n *\r\n * @param {string} name - Tool name\r\n * @param {IPasteConfig} toolPasteConfig - Tool onPaste configuration\r\n */\r\n private getTagsConfig(name: string, toolPasteConfig: IPasteConfig): void {\r\n if (this.config.initialBlock === name && !toolPasteConfig.handler) {\r\n _.log(\r\n `«${name}» Tool must provide a paste handler.`,\r\n 'warn',\r\n );\r\n }\r\n\r\n if (!toolPasteConfig.handler) {\r\n return;\r\n }\r\n\r\n if (typeof toolPasteConfig.handler !== 'function') {\r\n _.log(\r\n `Paste handler for «${name}» Tool should be a function.`,\r\n 'warn',\r\n );\r\n\r\n return;\r\n }\r\n\r\n const tags = toolPasteConfig.tags || [];\r\n\r\n tags.forEach((tag) => {\r\n if (this.toolsTags.hasOwnProperty(tag)) {\r\n _.log(\r\n `Paste handler for «${name}» Tool on «${tag}» tag is skipped ` +\r\n `because it is already used by «${this.toolsTags[tag].tool}» Tool.`,\r\n 'warn',\r\n );\r\n return;\r\n }\r\n\r\n this.toolsTags[tag.toUpperCase()] = {\r\n handler: toolPasteConfig.handler,\r\n tool: name,\r\n };\r\n });\r\n\r\n this.tagsByTool[name] = tags.map((t) => t.toUpperCase());\r\n }\r\n\r\n /**\r\n * Get files` types and extensions to substitute by Tool\r\n *\r\n * @param {string} name - Tool name\r\n * @param {IPasteConfig} toolPasteConfig - Tool onPaste configuration\r\n */\r\n private getFilesConfig(name: string, toolPasteConfig: IPasteConfig): void {\r\n\r\n const {fileHandler, files = {}} = toolPasteConfig;\r\n let {extensions, mimeTypes} = files;\r\n\r\n if (!fileHandler || (!extensions && !mimeTypes)) {\r\n return;\r\n }\r\n\r\n if (typeof fileHandler !== 'function') {\r\n _.log(`Drop handler for «${name}» Tool should be a function.`);\r\n return;\r\n }\r\n\r\n if (extensions && !Array.isArray(extensions)) {\r\n _.log(`«extensions» property of the onDrop config for «${name}» Tool should be an array`);\r\n extensions = [];\r\n }\r\n\r\n if (mimeTypes && !Array.isArray(mimeTypes)) {\r\n _.log(`«mimeTypes» property of the onDrop config for «${name}» Tool should be an array`);\r\n mimeTypes = [];\r\n }\r\n\r\n if (mimeTypes) {\r\n mimeTypes = mimeTypes.filter((type) => {\r\n if (!_.isValidMimeType(type)) {\r\n _.log(`MIME type value «${type}» for the «${name}» Tool is not a valid MIME type`, 'warn');\r\n return false;\r\n }\r\n\r\n return true;\r\n });\r\n }\r\n\r\n this.toolsFiles[name] = {\r\n extensions: extensions || [],\r\n mimeTypes: mimeTypes || [],\r\n handler: fileHandler,\r\n };\r\n }\r\n\r\n /**\r\n * Get RegExp patterns to substitute by Tool\r\n *\r\n * @param {string} name - Tool name\r\n * @param {IPasteConfig} toolPasteConfig - Tool onPaste configuration\r\n */\r\n private getPatternsConfig(name: string, toolPasteConfig: IPasteConfig): void {\r\n if (!toolPasteConfig.patternHandler || _.isEmpty(toolPasteConfig.patterns)) {\r\n return;\r\n }\r\n\r\n if (typeof toolPasteConfig.patternHandler !== 'function') {\r\n _.log(\r\n `Pattern parser for «${name}» Tool should be a function.`,\r\n 'warn',\r\n );\r\n\r\n return;\r\n }\r\n\r\n Object.entries(toolPasteConfig.patterns).forEach(([key, pattern]: [string, RegExp]) => {\r\n /** Still need to validate pattern as it provided by user */\r\n if (!(pattern instanceof RegExp)) {\r\n _.log(\r\n `Pattern ${pattern} for «${name}» Tool is skipped because it should be a Regexp instance.`,\r\n 'warn',\r\n );\r\n }\r\n\r\n this.toolsPatterns.push({\r\n key,\r\n pattern,\r\n handler: toolPasteConfig.patternHandler,\r\n tool: name,\r\n });\r\n });\r\n }\r\n\r\n /**\r\n * Check if browser behavior suits better\r\n *\r\n * @param {EventTarget} element - element where content has been pasted\r\n * @returns {boolean}\r\n */\r\n private isNativeBehaviour(element: EventTarget): boolean {\r\n const {Editor: {BlockManager}} = this;\r\n\r\n if ( $.isNativeInput(element) ) {\r\n return true;\r\n }\r\n\r\n const block = BlockManager.getBlock(element);\r\n\r\n return !block;\r\n }\r\n\r\n /**\r\n * Check if Editor should process pasted data and pass data transfer object to handler\r\n *\r\n * @param {ClipboardEvent} event\r\n */\r\n private handlePasteEvent = async (event: ClipboardEvent): Promise => {\r\n const {\r\n Editor: {Sanitizer, BlockManager, Tools, Caret},\r\n } = this;\r\n\r\n /** If target is native input or is not Block, use browser behaviour */\r\n if (\r\n this.isNativeBehaviour(event.target) && !event.clipboardData.types.includes('Files')\r\n ) {\r\n return;\r\n }\r\n\r\n event.preventDefault();\r\n this.processDataTransfer(event.clipboardData);\r\n }\r\n\r\n /**\r\n * Get files from data transfer object and insert related Tools\r\n *\r\n * @param {DataTransferItemList} items - pasted or dropped items\r\n */\r\n private async processFiles(items: DataTransferItemList) {\r\n const {BlockManager} = this.Editor;\r\n\r\n let dataToInsert: Array<{type: string, data: IBlockToolData}>;\r\n\r\n dataToInsert = await Promise.all(\r\n Array\r\n .from(items)\r\n .map((item) => this.processFile(item)),\r\n );\r\n dataToInsert = dataToInsert.filter((data) => !!data);\r\n\r\n dataToInsert.forEach(\r\n (data, i) => {\r\n if (i === 0 && BlockManager.currentBlock && BlockManager.currentBlock.isEmpty) {\r\n BlockManager.replace(data.type, data.data);\r\n return;\r\n }\r\n\r\n BlockManager.insert(data.type, data.data);\r\n },\r\n );\r\n }\r\n\r\n /**\r\n * Get information about file and find Tool to handle it\r\n *\r\n * @param {DataTransferItem} item\r\n */\r\n private async processFile(item: DataTransferItem) {\r\n if (item.kind === 'string') {\r\n return;\r\n }\r\n\r\n const file = item.getAsFile();\r\n const extension = _.getFileExtension(file);\r\n\r\n const foundConfig = Object\r\n .entries(this.toolsFiles)\r\n .find(([toolName, {mimeTypes, extensions}]) => {\r\n const [fileType, fileSubtype] = file.type.split('/');\r\n\r\n const foundExt = extensions.find((ext) => ext.toLowerCase() === extension.toLowerCase());\r\n const foundMimeType = mimeTypes.find((mime) => {\r\n const [type, subtype] = mime.split('/');\r\n\r\n return type === fileType && (subtype === fileSubtype || subtype === '*');\r\n });\r\n\r\n return !!foundExt || !!foundMimeType;\r\n });\r\n\r\n if (!foundConfig) {\r\n return;\r\n }\r\n\r\n const [tool, {handler}] = foundConfig;\r\n return {\r\n data: await handler(file),\r\n type: tool,\r\n };\r\n }\r\n\r\n /**\r\n * Process pasted text and divide them into Blocks\r\n *\r\n * @param {string} data - text to process. Can be HTML or plain.\r\n * @param {boolean} isHTML - if passed string is HTML, this parameter should be true\r\n */\r\n private async processText(data: string, isHTML: boolean = false) {\r\n const {Caret, BlockManager} = this.Editor;\r\n const dataToInsert = isHTML ? this.processHTML(data) : this.processPlain(data);\r\n\r\n if (!dataToInsert.length) {\r\n return;\r\n }\r\n\r\n if (dataToInsert.length === 1 && !dataToInsert[0].isBlock) {\r\n this.processSingleBlock(dataToInsert.pop());\r\n return;\r\n }\r\n\r\n /**\r\n * If caret not at the end of of the Block and there is no selection,\r\n * we split the Block and insert content at the middle.\r\n */\r\n if (SelectionUtils.isAtEditor && !Caret.isAtEnd && SelectionUtils.isCollapsed) {\r\n this.splitBlock();\r\n }\r\n\r\n await Promise.all(dataToInsert.map(\r\n async (content, i) => await this.insertBlock(content, i === 0),\r\n ));\r\n\r\n Caret.setToBlock(BlockManager.currentBlock, CaretClass.positions.END);\r\n }\r\n\r\n /**\r\n * Split HTML string to blocks and return it as array of Block data\r\n *\r\n * @param {string} innerHTML\r\n * @returns {IPasteData[]}\r\n */\r\n private processHTML(innerHTML: string): IPasteData[] {\r\n const {Tools, Sanitizer} = this.Editor,\r\n initialTool = this.config.initialBlock,\r\n wrapper = $.make('DIV');\r\n\r\n wrapper.innerHTML = innerHTML;\r\n\r\n const nodes = this.getNodes(wrapper);\r\n\r\n return nodes\r\n .map((node) => {\r\n let content, tool = initialTool, isBlock = false;\r\n\r\n switch (node.nodeType) {\r\n /** If node is a document fragment, use temp wrapper to get innerHTML */\r\n case Node.DOCUMENT_FRAGMENT_NODE:\r\n content = $.make('div');\r\n content.appendChild(node);\r\n break;\r\n\r\n /** If node is an element, then there might be a substitution */\r\n case Node.ELEMENT_NODE:\r\n content = node as HTMLElement;\r\n isBlock = true;\r\n\r\n if (this.toolsTags[content.tagName]) {\r\n tool = this.toolsTags[content.tagName].tool;\r\n }\r\n break;\r\n }\r\n\r\n const {handler, tags} = Tools.blockTools[tool].onPaste;\r\n\r\n const toolTags = tags.reduce((result, tag) => {\r\n result[tag.toLowerCase()] = {};\r\n\r\n return result;\r\n }, {});\r\n const customConfig = Object.assign({}, toolTags, Sanitizer.getInlineToolsConfig(tool));\r\n\r\n content.innerHTML = Sanitizer.clean(content.innerHTML, customConfig);\r\n\r\n return {content, isBlock, handler, tool};\r\n })\r\n .filter((data) => !$.isNodeEmpty(data.content) || $.isSingleTag(data.content));\r\n }\r\n\r\n /**\r\n * Split plain text by new line symbols and return it as array of Block data\r\n *\r\n * @param {string} plain\r\n * @returns {IPasteData[]}\r\n */\r\n private processPlain(plain: string): IPasteData[] {\r\n const {initialBlock} = this.config as {initialBlock: string},\r\n {Tools} = this.Editor;\r\n\r\n if (!plain) {\r\n return [];\r\n }\r\n\r\n const tool = initialBlock,\r\n handler = Tools.blockTools[tool].onPaste.handler;\r\n\r\n return plain\r\n .split(/\\r?\\n/)\r\n .filter((text) => text.trim())\r\n .map((text) => {\r\n const content = $.make('div');\r\n\r\n content.innerHTML = text;\r\n\r\n return {content, tool, isBlock: false, handler};\r\n });\r\n }\r\n\r\n /**\r\n * Process paste to single Block:\r\n * 1. Find patterns` matches\r\n * 2. Insert new block if it is not the same type as current one\r\n * 3. Just insert text if there is no substitutions\r\n *\r\n * @param {IPasteData} dataToInsert\r\n */\r\n private async processSingleBlock(dataToInsert: IPasteData): Promise {\r\n const initialTool = this.config.initialBlock,\r\n {BlockManager, Caret, Sanitizer} = this.Editor,\r\n {content, tool} = dataToInsert;\r\n\r\n if (tool === initialTool && content.textContent.length < Paste.PATTERN_PROCESSING_MAX_LENGTH) {\r\n const blockData = await this.processPattern(content.textContent);\r\n\r\n if (blockData) {\r\n this.splitBlock();\r\n let insertedBlock;\r\n\r\n const sanitizeConfig = Sanitizer.composeToolConfig(tool);\r\n\r\n if (!_.isEmpty(sanitizeConfig)) {\r\n blockData.data = Sanitizer.deepSanitize(blockData.data, sanitizeConfig);\r\n }\r\n\r\n if (BlockManager.currentBlock && BlockManager.currentBlock.isEmpty) {\r\n insertedBlock = BlockManager.replace(blockData.tool, blockData.data);\r\n } else {\r\n insertedBlock = BlockManager.insert(blockData.tool, blockData.data);\r\n }\r\n Caret.setToBlock(insertedBlock, CaretClass.positions.END);\r\n return;\r\n }\r\n }\r\n\r\n const currentToolSanitizeConfig = Sanitizer.getInlineToolsConfig(BlockManager.currentBlock.name);\r\n\r\n /** If there is no pattern substitute - insert string as it is */\r\n document.execCommand('insertHTML', false, Sanitizer.clean(content.innerHTML, currentToolSanitizeConfig));\r\n }\r\n\r\n /**\r\n * Get patterns` matches\r\n *\r\n * @param {string} text\r\n * @returns Promise<{data: IBlockToolData, tool: string}>\r\n */\r\n private async processPattern(text: string): Promise<{data: IBlockToolData, tool: string}> {\r\n const pattern = this.toolsPatterns.find((substitute) => {\r\n const execResult = substitute.pattern.exec(text);\r\n\r\n if (!execResult) {\r\n return false;\r\n }\r\n\r\n return text === execResult.shift();\r\n });\r\n\r\n const data = pattern && await pattern.handler(text, pattern.key);\r\n\r\n return data && {\r\n data,\r\n tool: pattern.tool,\r\n };\r\n }\r\n\r\n /**\r\n *\r\n * @param {IPasteData} data\r\n * @param {Boolean} canReplaceCurrentBlock - if true and is current Block is empty, will replace current Block\r\n * @returns {Promise}\r\n */\r\n private async insertBlock(data: IPasteData, canReplaceCurrentBlock: boolean = false): Promise {\r\n const blockData = await data.handler(data.content),\r\n {BlockManager, Caret} = this.Editor,\r\n {currentBlock} = BlockManager;\r\n\r\n if (canReplaceCurrentBlock && currentBlock && currentBlock.isEmpty) {\r\n BlockManager.replace(data.tool, blockData);\r\n return;\r\n }\r\n\r\n const Block = BlockManager.insert(data.tool, blockData);\r\n\r\n Caret.setToBlock(Block);\r\n }\r\n\r\n /**\r\n * Split current block if paste isn't in the end of the block\r\n */\r\n private splitBlock() {\r\n const {BlockManager, Caret} = this.Editor;\r\n\r\n if (!BlockManager.currentBlock) {\r\n return;\r\n }\r\n\r\n /** If we paste into middle of the current block:\r\n * 1. Split\r\n * 2. Navigate to the first part\r\n */\r\n if (!BlockManager.currentBlock.isEmpty && !Caret.isAtEnd) {\r\n BlockManager.split();\r\n BlockManager.currentBlockIndex--;\r\n }\r\n }\r\n\r\n /**\r\n * Recursively divide HTML string to two types of nodes:\r\n * 1. Block element\r\n * 2. Document Fragments contained text and markup tags like a, b, i etc.\r\n *\r\n * @param {Node} wrapper\r\n * @returns {Node[]}\r\n */\r\n private getNodes(wrapper: Node): Node[] {\r\n const children = Array.from(wrapper.childNodes),\r\n tags = Object.keys(this.toolsTags);\r\n\r\n const reducer = (nodes: Node[], node: Node): Node[] => {\r\n if ($.isEmpty(node) && !$.isSingleTag(node as HTMLElement)) {\r\n return nodes;\r\n }\r\n\r\n const lastNode = nodes[nodes.length - 1];\r\n\r\n let destNode: Node = new DocumentFragment();\r\n\r\n if (lastNode && $.isFragment(lastNode)) {\r\n destNode = nodes.pop();\r\n }\r\n\r\n switch (node.nodeType) {\r\n /**\r\n * If node is HTML element:\r\n * 1. Check if it is inline element\r\n * 2. Check if it contains another block or substitutable elements\r\n */\r\n case Node.ELEMENT_NODE:\r\n const element = node as HTMLElement;\r\n\r\n const {tool = ''} = this.toolsTags[element.tagName] || {};\r\n const toolTags = this.tagsByTool[tool] || [];\r\n\r\n const isSubstitutable = tags.includes(element.tagName);\r\n const isBlockElement = $.blockElements.includes(element.tagName.toLowerCase());\r\n const containsAnotherToolTags = Array\r\n .from(element.children)\r\n .some(\r\n ({tagName}) => tags.includes(tagName) && !toolTags.includes(tagName),\r\n );\r\n\r\n const containsBlockElements = Array.from(element.children).some(\r\n ({tagName}) => $.blockElements.includes(tagName.toLowerCase()),\r\n );\r\n\r\n /** Append inline elements to previous fragment */\r\n if (!isBlockElement && !isSubstitutable) {\r\n destNode.appendChild(element);\r\n return [...nodes, destNode];\r\n }\r\n\r\n if (\r\n (isSubstitutable && !containsAnotherToolTags) ||\r\n (isBlockElement && !containsBlockElements && !containsAnotherToolTags )\r\n ) {\r\n return [...nodes, destNode, element];\r\n }\r\n break;\r\n\r\n /**\r\n * If node is text node, wrap it with DocumentFragment\r\n */\r\n case Node.TEXT_NODE:\r\n destNode.appendChild(node);\r\n return [...nodes, destNode];\r\n\r\n default:\r\n return [...nodes, destNode];\r\n }\r\n\r\n return [...nodes, ...Array.from(node.childNodes).reduce(reducer, [])];\r\n };\r\n\r\n return children.reduce(reducer, []);\r\n }\r\n}\r\n","/**\r\n * Codex Editor Renderer Module\r\n *\r\n * @module Renderer\r\n * @author CodeX Team\r\n *\r\n * @version 2.0.0\r\n */\r\nexport default class Renderer extends Module {\r\n /**\r\n * @constructor\r\n * @param {EditorConfig} config\r\n */\r\n constructor({config}) {\r\n super({config});\r\n }\r\n\r\n /**\r\n * @typedef {Object} RendererBlocks\r\n * @property {String} type - tool name\r\n * @property {Object} data - tool data\r\n */\r\n\r\n /**\r\n * @example\r\n *\r\n * blocks: [\r\n * {\r\n * type : 'paragraph',\r\n * data : {\r\n * text : 'Hello from Codex!'\r\n * }\r\n * },\r\n * {\r\n * type : 'paragraph',\r\n * data : {\r\n * text : 'Leave feedback if you like it!'\r\n * }\r\n * },\r\n * ]\r\n *\r\n */\r\n\r\n /**\r\n * Make plugin blocks from array of plugin`s data\r\n * @param {RendererBlocks[]} blocks\r\n */\r\n render(blocks) {\r\n let chainData = [];\r\n\r\n for (let i = 0; i < blocks.length; i++) {\r\n chainData.push({\r\n function: () => this.insertBlock(blocks[i])\r\n });\r\n }\r\n\r\n return _.sequence(chainData);\r\n }\r\n\r\n /**\r\n * Get plugin instance\r\n * Add plugin instance to BlockManager\r\n * Insert block to working zone\r\n *\r\n * @param {Object} item\r\n * @returns {Promise.}\r\n * @private\r\n */\r\n insertBlock(item) {\r\n let tool = item.type,\r\n data = item.data,\r\n settings = item.settings;\r\n\r\n if (tool in this.Editor.Tools.available) {\r\n try {\r\n this.Editor.BlockManager.insert(tool, data, settings);\r\n } catch (error) {\r\n _.log(`Block «${tool}» skipped because of plugins error`, 'warn', data);\r\n Promise.reject(error);\r\n }\r\n } else {\r\n /**\r\n * @todo show warning notification message\r\n *\r\n * `${tool} blocks was skipped.`\r\n */\r\n _.log(`Tool «${tool}» is not found. Check 'tools' property at your initial CodeX Editor config.`, 'warn');\r\n }\r\n\r\n return Promise.resolve();\r\n }\r\n}\r\n","/**\r\n * CodeX Sanitizer\r\n *\r\n * @module Sanitizer\r\n * Clears HTML from taint tags\r\n *\r\n * @version 2.0.0\r\n *\r\n * @example\r\n * Module can be used within two ways:\r\n * 1) When you have an instance\r\n * - this.Editor.Sanitizer.clean(yourTaintString);\r\n * 2) As static method\r\n * - CodexEditor.Sanitizer.clean(yourTaintString, yourCustomConfiguration);\r\n *\r\n * {@link SanitizerConfig}\r\n */\r\n\r\nimport ISanitizerConfig from '../interfaces/sanitizer-config';\r\n\r\n/**\r\n * @typedef {Object} SanitizerConfig\r\n * @property {Object} tags - define tags restrictions\r\n *\r\n * @example\r\n *\r\n * tags : {\r\n * p: true,\r\n * a: {\r\n * href: true,\r\n * rel: \"nofollow\",\r\n * target: \"_blank\"\r\n * }\r\n * }\r\n */\r\n\r\ndeclare const Module: any;\r\ndeclare const _: any;\r\n\r\nimport HTMLJanitor from 'html-janitor';\r\nimport IBlockToolData from '../interfaces/tools/block-tool-data';\r\nimport IInlineTool from '../interfaces/tools/inline-tool';\r\n\r\nexport default class Sanitizer extends Module {\r\n /**\r\n * Memoize tools config\r\n */\r\n private configCache: {[toolName: string]: ISanitizerConfig} = {};\r\n\r\n /**\r\n * Cached inline tools config\r\n */\r\n private inlineToolsConfigCache: ISanitizerConfig | null = null;\r\n\r\n /**\r\n * Initializes Sanitizer module\r\n * Sets default configuration if custom not exists\r\n *\r\n * @property {HTMLJanitor} this._sanitizerInstance - Sanitizer library\r\n *\r\n * @param {IEditorConfig} config\r\n */\r\n constructor({config}) {\r\n super({config});\r\n }\r\n\r\n /**\r\n * Sanitize Blocks\r\n *\r\n * Enumerate blocks and clean data\r\n *\r\n * @param {{tool, data: IBlockToolData}[]} blocksData[]\r\n */\r\n public sanitizeBlocks(\r\n blocksData: Array<{tool: string, data: IBlockToolData}>,\r\n ): Array<{tool: string, data: IBlockToolData}> {\r\n\r\n return blocksData.map((block) => {\r\n const toolConfig = this.composeToolConfig(block.tool);\r\n\r\n if (_.isEmpty(toolConfig)) {\r\n return block;\r\n }\r\n\r\n block.data = this.deepSanitize(block.data, toolConfig);\r\n\r\n return block;\r\n });\r\n }\r\n\r\n /**\r\n * Method recursively reduces Block's data and cleans with passed rules\r\n *\r\n * @param {IBlockToolData|object|*} dataToSanitize - taint string or object/array that contains taint string\r\n * @param {ISanitizerConfig} rules - object with sanitizer rules\r\n */\r\n public deepSanitize(dataToSanitize: any, rules: ISanitizerConfig): any {\r\n /**\r\n * BlockData It may contain 3 types:\r\n * - Array\r\n * - Object\r\n * - Primitive\r\n */\r\n if (Array.isArray(dataToSanitize)) {\r\n /**\r\n * Array: call sanitize for each item\r\n */\r\n return this.cleanArray(dataToSanitize, rules);\r\n } else if (typeof dataToSanitize === 'object') {\r\n /**\r\n * Objects: just clean object deeper.\r\n */\r\n return this.cleanObject(dataToSanitize, rules);\r\n } else {\r\n /**\r\n * Primitives (number|string|boolean): clean this item\r\n *\r\n * Clean only strings\r\n */\r\n if (typeof dataToSanitize === 'string') {\r\n return this.cleanOneItem(dataToSanitize, rules);\r\n }\r\n return dataToSanitize;\r\n }\r\n }\r\n\r\n /**\r\n * Cleans string from unwanted tags\r\n * Method allows to use default config\r\n *\r\n * @param {string} taintString - taint string\r\n * @param {SanitizerConfig} customConfig - allowed tags\r\n *\r\n * @return {string} clean HTML\r\n */\r\n public clean(taintString: string, customConfig: ISanitizerConfig = {}): string {\r\n\r\n const sanitizerConfig = {\r\n tags: customConfig,\r\n };\r\n\r\n /**\r\n * API client can use custom config to manage sanitize process\r\n */\r\n const sanitizerInstance = this.createHTMLJanitorInstance(sanitizerConfig);\r\n return sanitizerInstance.clean(taintString);\r\n }\r\n\r\n /**\r\n * Merge with inline tool config\r\n *\r\n * @param {string} toolName\r\n * @param {ISanitizerConfig} toolRules\r\n * @return {ISanitizerConfig}\r\n */\r\n public composeToolConfig(toolName: string): ISanitizerConfig {\r\n /**\r\n * If cache is empty, then compose tool config and put it to the cache object\r\n */\r\n if (this.configCache[toolName]) {\r\n return this.configCache[toolName];\r\n }\r\n\r\n const sanitizeGetter = this.Editor.Tools.apiSettings.SANITIZE_CONFIG;\r\n const toolClass = this.Editor.Tools.available[toolName];\r\n const baseConfig = this.getInlineToolsConfig(toolName);\r\n\r\n /**\r\n * If Tools doesn't provide sanitizer config or it is empty\r\n */\r\n if (!toolClass.sanitize || (toolClass[sanitizeGetter] && _.isEmpty(toolClass[sanitizeGetter]))) {\r\n return baseConfig;\r\n }\r\n\r\n const toolRules = toolClass.sanitize;\r\n\r\n const toolConfig = {};\r\n for (const fieldName in toolRules) {\r\n if (toolRules.hasOwnProperty(fieldName)) {\r\n const rule = toolRules[fieldName];\r\n if (typeof rule === 'object') {\r\n toolConfig[fieldName] = Object.assign({}, baseConfig, rule);\r\n } else {\r\n toolConfig[fieldName] = rule;\r\n }\r\n }\r\n }\r\n this.configCache[toolName] = toolConfig;\r\n\r\n return toolConfig;\r\n }\r\n\r\n /**\r\n * Returns Sanitizer config\r\n * When Tool's \"inlineToolbar\" value is True, get all sanitizer rules from all tools,\r\n * otherwise get only enabled\r\n */\r\n public getInlineToolsConfig(name: string): ISanitizerConfig {\r\n const {Tools} = this.Editor;\r\n\r\n const toolsConfig = Tools.getToolSettings(name),\r\n enableInlineTools = toolsConfig.inlineToolbar || [];\r\n\r\n let config = {};\r\n\r\n if (typeof enableInlineTools === 'boolean' && enableInlineTools) {\r\n /**\r\n * getting all tools sanitizer rule\r\n */\r\n config = this.getAllInlineToolsConfig();\r\n } else {\r\n /**\r\n * getting only enabled\r\n */\r\n enableInlineTools.map( (inlineToolName) => {\r\n config = Object.assign(config, Tools.inline[inlineToolName][Tools.apiSettings.SANITIZE_CONFIG]);\r\n });\r\n }\r\n\r\n return config;\r\n }\r\n\r\n /**\r\n * Return general config for all inline tools\r\n */\r\n public getAllInlineToolsConfig(): ISanitizerConfig {\r\n const {Tools} = this.Editor;\r\n\r\n if (this.inlineToolsConfigCache) {\r\n return this.inlineToolsConfigCache;\r\n }\r\n\r\n const config: ISanitizerConfig = {};\r\n\r\n Object.entries(Tools.inline)\r\n .forEach( ([name, inlineTool]: [string, IInlineTool]) => {\r\n Object.assign(config, inlineTool[Tools.apiSettings.SANITIZE_CONFIG]);\r\n });\r\n\r\n this.inlineToolsConfigCache = config;\r\n\r\n return this.inlineToolsConfigCache;\r\n }\r\n\r\n /**\r\n * Clean array\r\n * @param {array} array - [1, 2, {}, []]\r\n * @param {object} ruleForItem\r\n */\r\n private cleanArray(array: any[], ruleForItem: ISanitizerConfig): any[] {\r\n return array.map( (arrayItem) => this.deepSanitize(arrayItem, ruleForItem));\r\n }\r\n\r\n /**\r\n * Clean object\r\n * @param {object} object - {level: 0, text: 'adada', items: [1,2,3]}}\r\n * @param {object} rules - { b: true } or true|false\r\n * @return {object}\r\n */\r\n private cleanObject(object: any, rules: ISanitizerConfig|{[field: string]: ISanitizerConfig}): any {\r\n const cleanData = {};\r\n\r\n for (const fieldName in object) {\r\n if (!object.hasOwnProperty(fieldName)) {\r\n continue;\r\n }\r\n\r\n const currentIterationItem = object[fieldName];\r\n\r\n /**\r\n * Get object from config by field name\r\n * - if it is a HTML Janitor rule, call with this rule\r\n * - otherwise, call with parent's config\r\n */\r\n const ruleForItem = this.isRule(rules[fieldName] as ISanitizerConfig) ? rules[fieldName] : rules;\r\n\r\n cleanData[fieldName] = this.deepSanitize(currentIterationItem, ruleForItem as ISanitizerConfig);\r\n }\r\n return cleanData;\r\n }\r\n\r\n /**\r\n * @param {string} taintString\r\n * @param {ISanitizerConfig|boolean} rule\r\n * @return {string}\r\n */\r\n private cleanOneItem(taintString: string, rule: ISanitizerConfig|boolean): string {\r\n if (typeof rule === 'object') {\r\n return this.clean(taintString, rule);\r\n } else if (rule === false) {\r\n return this.clean(taintString, {});\r\n } else {\r\n return taintString;\r\n }\r\n }\r\n\r\n /**\r\n * Check if passed item is a HTML Janitor rule:\r\n * { a : true }, {}, false, true, function(){} — correct rules\r\n * undefined, null, 0, 1, 2 — not a rules\r\n * @param config\r\n */\r\n private isRule(config: ISanitizerConfig): boolean {\r\n return typeof config === 'object' || typeof config === 'boolean' || typeof config === 'function';\r\n }\r\n\r\n /**\r\n * If developer uses editor's API, then he can customize sanitize restrictions.\r\n * Or, sanitizing config can be defined globally in editors initialization. That config will be used everywhere\r\n * At least, if there is no config overrides, that API uses Default configuration\r\n *\r\n * @uses https://www.npmjs.com/package/html-janitor\r\n *\r\n * @param {SanitizerConfig} config - sanitizer extension\r\n */\r\n private createHTMLJanitorInstance(config: {tags: ISanitizerConfig}): any {\r\n if (config) {\r\n return new HTMLJanitor(config);\r\n }\r\n return null;\r\n }\r\n}\r\n","/**\r\n * Codex Editor Saver\r\n *\r\n * @module Saver\r\n * @author Codex Team\r\n * @version 2.0.0\r\n */\r\n\r\n/**\r\n * @typedef {Object} SavedData\r\n * @property {Date} time - saving proccess time\r\n * @property {Object} blocks - extracted data\r\n * @property {String} version - CodexEditor version\r\n */\r\ninterface SavedData {\r\n time: number;\r\n blocks: object[];\r\n version: string;\r\n}\r\n\r\n/**\r\n * @classdesc This method reduces all Blocks asyncronically and calls Block's save method to extract data\r\n *\r\n * @typedef {Saver} Saver\r\n * @property {Element} html - Editor HTML content\r\n * @property {String} json - Editor JSON output\r\n */\r\n\r\ndeclare const Module: any;\r\ndeclare const VERSION: string;\r\n\r\nexport default class Saver extends Module {\r\n /**\r\n * @constructor\r\n * @param config\r\n */\r\n constructor({config}) {\r\n super({config});\r\n\r\n this.output = null;\r\n this.blocksData = [];\r\n }\r\n\r\n /**\r\n * Composes new chain of Promises to fire them alternatelly\r\n * @return {SavedData}\r\n */\r\n public save(): Promise {\r\n const blocks = this.Editor.BlockManager.blocks,\r\n chainData = [];\r\n\r\n blocks.forEach((block) => {\r\n chainData.push(block.data);\r\n });\r\n\r\n return Promise.all(chainData)\r\n .then((extractedData) => this.Editor.Sanitizer.sanitizeBlocks(extractedData))\r\n .then((allExtractedData) => this.makeOutput(allExtractedData))\r\n .then((outputData) => {\r\n return outputData;\r\n });\r\n }\r\n\r\n /**\r\n * Creates output object with saved data, time and version of editor\r\n * @param {Object} allExtractedData\r\n * @return {SavedData}\r\n */\r\n private makeOutput(allExtractedData): SavedData {\r\n let totalTime = 0;\r\n const blocks = [];\r\n\r\n console.groupCollapsed('[CodexEditor saving]:');\r\n\r\n allExtractedData.forEach((extraction) => {\r\n /** Group process info */\r\n console.log(`«${extraction.tool}» saving info`, extraction);\r\n totalTime += extraction.time;\r\n blocks.push({\r\n type: extraction.tool,\r\n data: extraction.data,\r\n });\r\n });\r\n\r\n console.log('Total', totalTime);\r\n console.groupEnd();\r\n\r\n return {\r\n time: +new Date(),\r\n version: VERSION,\r\n blocks,\r\n };\r\n }\r\n}\r\n","\r\nimport Shortcut from '@codexteam/shortcuts';\r\nimport {IShortcut, IShortcuts} from '../interfaces/shortcuts';\r\nimport IEditorConfig from '../interfaces/editor-config';\r\n\r\n/**\r\n * Contains keyboard and mouse events binded on each Block by Block Manager\r\n */\r\ndeclare var Module: any;\r\n\r\n/**\r\n * @class Shortcut\r\n * @classdesc Allows to register new shortcut\r\n *\r\n * Internal Shortcuts Module\r\n */\r\nexport default class Shortcuts extends Module implements IShortcuts {\r\n /**\r\n * All registered shortcuts\r\n * @type {IShortcut[]}\r\n */\r\n private registeredShortcuts: IShortcut[];\r\n\r\n /**\r\n * @constructor\r\n * @param {IEditorConfig} config\r\n */\r\n constructor({config}) {\r\n super({config});\r\n this.registeredShortcuts = [];\r\n }\r\n\r\n /**\r\n * Register shortcut\r\n * @param {IShortcut} shortcut\r\n */\r\n public add(shortcut: IShortcut): void {\r\n const { UI } = this.Editor;\r\n\r\n const newShortcut = new Shortcut({\r\n name: shortcut.name,\r\n on: UI.nodes.redactor,\r\n callback: shortcut.handler,\r\n });\r\n\r\n this.registeredShortcuts.push(newShortcut);\r\n }\r\n\r\n /**\r\n * Remove shortcut\r\n * @param {IShortcut} shortcut\r\n */\r\n public remove(shortcut: string): void {\r\n // Remove\r\n }\r\n}\r\n","/**\r\n * Block Settings\r\n *\r\n * ____ Settings Panel ____\r\n * | ...................... |\r\n * | . Tool Settings . |\r\n * | ...................... |\r\n * | . Default Settings . |\r\n * | ...................... |\r\n * |________________________|\r\n */\r\nexport default class BlockSettings extends Module {\r\n /**\r\n * @constructor\r\n */\r\n constructor({config}) {\r\n super({config});\r\n\r\n this.nodes = {\r\n wrapper: null,\r\n toolSettings: null,\r\n defaultSettings: null\r\n };\r\n }\r\n\r\n /**\r\n * Module Events\r\n * @return {{opened: string, closed: string}}\r\n */\r\n get events() {\r\n return {\r\n opened: 'block-settings-opened',\r\n closed: 'block-settings-closed',\r\n };\r\n }\r\n\r\n /**\r\n * Block Settings CSS\r\n * @return {{wrapper, wrapperOpened, toolSettings, defaultSettings, button}}\r\n */\r\n static get CSS() {\r\n return {\r\n // Settings Panel\r\n wrapper: 'ce-settings',\r\n wrapperOpened: 'ce-settings--opened',\r\n toolSettings: 'ce-settings__plugin-zone',\r\n defaultSettings: 'ce-settings__default-zone',\r\n\r\n button: 'ce-settings__button'\r\n };\r\n }\r\n\r\n /**\r\n * Panel with block settings with 2 sections:\r\n * - Tool's Settings\r\n * - Default Settings [Move, Remove, etc]\r\n *\r\n * @return {Element}\r\n */\r\n make() {\r\n this.nodes.wrapper = $.make('div', BlockSettings.CSS.wrapper);\r\n\r\n this.nodes.toolSettings = $.make('div', BlockSettings.CSS.toolSettings);\r\n this.nodes.defaultSettings = $.make('div', BlockSettings.CSS.defaultSettings);\r\n\r\n $.append(this.nodes.wrapper, [this.nodes.toolSettings, this.nodes.defaultSettings]);\r\n }\r\n\r\n /**\r\n * Add Tool's settings\r\n */\r\n addToolSettings() {\r\n if (typeof this.Editor.BlockManager.currentBlock.tool.renderSettings === 'function') {\r\n $.append(this.nodes.toolSettings, this.Editor.BlockManager.currentBlock.tool.renderSettings());\r\n }\r\n }\r\n\r\n /**\r\n * Add default settings\r\n */\r\n addDefaultSettings() {\r\n $.append(this.nodes.defaultSettings, this.Editor.BlockManager.currentBlock.renderTunes());\r\n }\r\n\r\n /**\r\n * Is Block Settings opened or not\r\n * @returns {boolean}\r\n */\r\n get opened() {\r\n return this.nodes.wrapper.classList.contains(BlockSettings.CSS.wrapperOpened);\r\n }\r\n\r\n /**\r\n * Open Block Settings pane\r\n */\r\n open() {\r\n this.nodes.wrapper.classList.add(BlockSettings.CSS.wrapperOpened);\r\n\r\n /**\r\n * Fill Tool's settings\r\n */\r\n this.addToolSettings();\r\n\r\n /**\r\n * Add default settings that presents for all Blocks\r\n */\r\n this.addDefaultSettings();\r\n\r\n /** Tell to subscribers that block settings is opened */\r\n this.Editor.Events.emit(this.events.opened);\r\n }\r\n\r\n /**\r\n * Close Block Settings pane\r\n */\r\n close() {\r\n this.nodes.wrapper.classList.remove(BlockSettings.CSS.wrapperOpened);\r\n\r\n /** Clear settings */\r\n this.nodes.toolSettings.innerHTML = '';\r\n this.nodes.defaultSettings.innerHTML = '';\r\n\r\n /** Tell to subscribers that block settings is closed */\r\n this.Editor.Events.emit(this.events.closed);\r\n }\r\n}\r\n","import ITool from '../interfaces/tools/tool';\r\n\r\ndeclare var Module: any;\r\ndeclare var $: any;\r\n\r\nimport EditorConfig from '../interfaces/editor-config';\r\nimport InlineTool from '../interfaces/tools/inline-tool';\r\nimport SelectionUtils from '../selection';\r\nimport _ from '../utils';\r\n\r\n/**\r\n * Inline toolbar with actions that modifies selected text fragment\r\n *\r\n * |¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|\r\n * | B i [link] [mark] |\r\n * |________________________|\r\n */\r\nexport default class InlineToolbar extends Module {\r\n\r\n /**\r\n * CSS styles\r\n */\r\n public CSS = {\r\n inlineToolbar: 'ce-inline-toolbar',\r\n inlineToolbarShowed: 'ce-inline-toolbar--showed',\r\n buttonsWrapper: 'ce-inline-toolbar__buttons',\r\n actionsWrapper: 'ce-inline-toolbar__actions',\r\n inlineToolButton: 'ce-inline-tool',\r\n inlineToolButtonLast: 'ce-inline-tool--last',\r\n };\r\n\r\n /**\r\n * Inline Toolbar elements\r\n */\r\n private nodes = {\r\n wrapper: null,\r\n buttons: null,\r\n /**\r\n * Zone below the buttons where Tools can create additional actions by 'renderActions()' method\r\n * For example, input for the 'link' tool or textarea for the 'comment' tool\r\n */\r\n actions: null,\r\n };\r\n\r\n /**\r\n * Margin above/below the Toolbar\r\n */\r\n private readonly toolbarVerticalMargin: number = 20;\r\n\r\n /**\r\n * Tools instances\r\n */\r\n private toolsInstances: Map;\r\n\r\n /**\r\n * @constructor\r\n * @param {EditorConfig} config\r\n */\r\n constructor({config}) {\r\n super({config});\r\n }\r\n\r\n /**\r\n * Inline Toolbar Tools\r\n *\r\n * @returns Map\r\n */\r\n get tools(): Map {\r\n if (!this.toolsInstances || this.toolsInstances.size === 0) {\r\n const allTools = this.inlineTools;\r\n\r\n this.toolsInstances = new Map();\r\n for (const tool in allTools) {\r\n if (allTools.hasOwnProperty(tool)) {\r\n this.toolsInstances.set(tool, allTools[tool]);\r\n }\r\n }\r\n }\r\n\r\n return this.toolsInstances;\r\n }\r\n\r\n /**\r\n * Making DOM\r\n */\r\n public make() {\r\n this.nodes.wrapper = $.make('div', this.CSS.inlineToolbar);\r\n this.nodes.buttons = $.make('div', this.CSS.buttonsWrapper);\r\n this.nodes.actions = $.make('div', this.CSS.actionsWrapper);\r\n\r\n /**\r\n * Append Inline Toolbar to the Editor\r\n */\r\n $.append(this.nodes.wrapper, [this.nodes.buttons, this.nodes.actions]);\r\n $.append(this.Editor.UI.nodes.wrapper, this.nodes.wrapper);\r\n\r\n /**\r\n * Append Inline Toolbar Tools\r\n */\r\n this.addTools();\r\n\r\n }\r\n\r\n /**\r\n * Moving / appearance\r\n * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n */\r\n\r\n /**\r\n * Shows Inline Toolbar by keyup/mouseup\r\n * @param {KeyboardEvent|MouseEvent} event\r\n */\r\n public handleShowingEvent(event): void {\r\n if (!this.allowedToShow(event)) {\r\n this.close();\r\n return;\r\n }\r\n\r\n this.move();\r\n this.open();\r\n\r\n /** Check Tools state for selected fragment */\r\n this.checkToolsState();\r\n\r\n /** Clear selection */\r\n this.Editor.BlockSelection.clearSelection();\r\n }\r\n\r\n /**\r\n * Move Toolbar to the selected text\r\n */\r\n public move(): void {\r\n const selectionRect = SelectionUtils.rect as DOMRect;\r\n const wrapperOffset = this.Editor.UI.nodes.wrapper.getBoundingClientRect();\r\n const newCoords = {\r\n x: selectionRect.x - wrapperOffset.left,\r\n y: selectionRect.y\r\n + selectionRect.height\r\n // + window.scrollY\r\n - wrapperOffset.top\r\n + this.toolbarVerticalMargin,\r\n };\r\n\r\n /**\r\n * If we know selections width, place InlineToolbar to center\r\n */\r\n if (selectionRect.width) {\r\n newCoords.x += Math.floor(selectionRect.width / 2);\r\n }\r\n\r\n this.nodes.wrapper.style.left = Math.floor(newCoords.x) + 'px';\r\n this.nodes.wrapper.style.top = Math.floor(newCoords.y) + 'px';\r\n }\r\n\r\n /**\r\n * Shows Inline Toolbar\r\n */\r\n private open() {\r\n /**\r\n * Filter inline-tools and show only allowed by Block's Tool\r\n */\r\n this.filterTools();\r\n\r\n /**\r\n * Show Inline Toolbar\r\n */\r\n this.nodes.wrapper.classList.add(this.CSS.inlineToolbarShowed);\r\n\r\n /**\r\n * Call 'clear' method for Inline Tools (for example, 'link' want to clear input)\r\n */\r\n this.tools.forEach( (toolInstance, toolName) => {\r\n if (typeof toolInstance.clear === 'function') {\r\n toolInstance.clear();\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Hides Inline Toolbar\r\n */\r\n private close() {\r\n this.nodes.wrapper.classList.remove(this.CSS.inlineToolbarShowed);\r\n this.tools.forEach( (toolInstance, toolName) => {\r\n if (typeof toolInstance.clear === 'function') {\r\n toolInstance.clear();\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Need to show Inline Toolbar or not\r\n * @param {KeyboardEvent|MouseEvent} event\r\n */\r\n private allowedToShow(event): boolean {\r\n /**\r\n * Tags conflicts with window.selection function.\r\n * Ex. IMG tag returns null (Firefox) or Redactors wrapper (Chrome)\r\n */\r\n const tagsConflictsWithSelection = ['IMG', 'INPUT'];\r\n\r\n if (event && tagsConflictsWithSelection.includes(event.target.tagName)) {\r\n return false;\r\n }\r\n\r\n const currentSelection = SelectionUtils.get(),\r\n selectedText = SelectionUtils.text;\r\n\r\n // old browsers\r\n if (!currentSelection || !currentSelection.anchorNode) {\r\n return false;\r\n }\r\n\r\n // empty selection\r\n if (currentSelection.isCollapsed || selectedText.length < 1) {\r\n return false;\r\n }\r\n\r\n // is enabled by current Block's Tool\r\n const currentBlock = this.Editor.BlockManager.getBlock(currentSelection.anchorNode);\r\n\r\n if (!currentBlock) {\r\n return false;\r\n }\r\n\r\n const toolSettings = this.Editor.Tools.getToolSettings(currentBlock.name);\r\n\r\n return toolSettings && toolSettings[this.Editor.Tools.apiSettings.IS_ENABLED_INLINE_TOOLBAR];\r\n }\r\n\r\n /**\r\n * Show only allowed Tools\r\n */\r\n private filterTools(): void {\r\n const currentSelection = SelectionUtils.get(),\r\n currentBlock = this.Editor.BlockManager.getBlock(currentSelection.anchorNode);\r\n\r\n const toolSettings = this.Editor.Tools.getToolSettings(currentBlock.name),\r\n inlineToolbarSettings = toolSettings && toolSettings[this.Editor.Tools.apiSettings.IS_ENABLED_INLINE_TOOLBAR];\r\n\r\n /**\r\n * All Inline Toolbar buttons\r\n * @type {HTMLElement[]}\r\n */\r\n const buttons = Array.from(this.nodes.buttons.querySelectorAll(`.${this.CSS.inlineToolButton}`)) as HTMLElement[];\r\n\r\n /**\r\n * Show previously hided\r\n */\r\n buttons.forEach((button) => {\r\n button.hidden = false;\r\n button.classList.remove(this.CSS.inlineToolButtonLast);\r\n });\r\n\r\n /**\r\n * Filter buttons if Block Tool pass config like inlineToolbar=['link']\r\n */\r\n if (Array.isArray(inlineToolbarSettings)) {\r\n buttons.forEach((button) => {\r\n button.hidden = !inlineToolbarSettings.includes(button.dataset.tool);\r\n });\r\n }\r\n\r\n /**\r\n * Tick for removing right-margin from last visible button.\r\n * Current generation of CSS does not allow to filter :visible elements\r\n */\r\n const lastVisibleButton = buttons.filter((button) => !button.hidden).pop();\r\n\r\n if (lastVisibleButton) {\r\n lastVisibleButton.classList.add(this.CSS.inlineToolButtonLast);\r\n }\r\n }\r\n\r\n /**\r\n * Working with Tools\r\n * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n */\r\n\r\n /**\r\n * Fill Inline Toolbar with Tools\r\n */\r\n private addTools(): void {\r\n this.tools.forEach( (toolInstance, toolName) => {\r\n this.addTool(toolName, toolInstance);\r\n });\r\n }\r\n\r\n /**\r\n * Add tool button and activate clicks\r\n */\r\n private addTool(toolName: string, tool: InlineTool): void {\r\n const {\r\n Listeners,\r\n Tools,\r\n } = this.Editor;\r\n\r\n const button = tool.render();\r\n\r\n if (!button) {\r\n _.log('Render method must return an instance of Node', 'warn', toolName);\r\n return;\r\n }\r\n\r\n button.dataset.tool = toolName;\r\n this.nodes.buttons.appendChild(button);\r\n\r\n if (typeof tool.renderActions === 'function') {\r\n const actions = tool.renderActions();\r\n this.nodes.actions.appendChild(actions);\r\n }\r\n\r\n Listeners.on(button, 'click', (event) => {\r\n this.toolClicked(tool);\r\n event.preventDefault();\r\n });\r\n\r\n /**\r\n * Enable shortcuts\r\n * Ignore tool that doesn't have shortcut or empty string\r\n */\r\n const toolSettings = Tools.getToolSettings(toolName);\r\n\r\n let shortcut = null;\r\n\r\n /**\r\n * Get internal inline tools\r\n */\r\n const internalTools: string[] = Object\r\n .entries(Tools.internalTools)\r\n .filter(([name, toolClass]: [string, ITool]) => toolClass[Tools.apiSettings.IS_INLINE])\r\n .map(([name, toolClass]: [string, ITool]) => name);\r\n\r\n /**\r\n * 1) For internal tools, check public getter 'shortcut'\r\n * 2) For external tools, check tool's settings\r\n */\r\n if (internalTools.includes(toolName)) {\r\n shortcut = this.inlineTools[toolName].shortcut;\r\n } else if (toolSettings && toolSettings[Tools.apiSettings.SHORTCUT]) {\r\n shortcut = toolSettings[Tools.apiSettings.SHORTCUT];\r\n }\r\n\r\n if (shortcut) {\r\n this.enableShortcuts(tool, shortcut);\r\n }\r\n }\r\n\r\n /**\r\n * Enable Tool shortcut with Editor Shortcuts Module\r\n * @param {InlineTool} tool - Tool instance\r\n * @param {string} shortcut - shortcut according to the Shortcut Module format\r\n */\r\n private enableShortcuts(tool: InlineTool, shortcut: string): void {\r\n this.Editor.Shortcuts.add({\r\n name: shortcut,\r\n handler: (event) => {\r\n const {currentBlock} = this.Editor.BlockManager;\r\n\r\n /**\r\n * Editor is not focused\r\n */\r\n if (!currentBlock) {\r\n return;\r\n }\r\n\r\n /**\r\n * We allow to fire shortcut with empty selection (isCollapsed=true)\r\n * it can be used by tools like «Mention» that works without selection:\r\n * Example: by SHIFT+@ show dropdown and insert selected username\r\n */\r\n // if (SelectionUtils.isCollapsed) return;\r\n\r\n const toolSettings = this.Editor.Tools.getToolSettings(currentBlock.name);\r\n\r\n if (!toolSettings || !toolSettings[this.Editor.Tools.apiSettings.IS_ENABLED_INLINE_TOOLBAR]) {\r\n return;\r\n }\r\n\r\n event.preventDefault();\r\n this.toolClicked(tool);\r\n },\r\n });\r\n }\r\n\r\n /**\r\n * Inline Tool button clicks\r\n * @param {InlineTool} tool - Tool's instance\r\n */\r\n private toolClicked(tool: InlineTool): void {\r\n const range = SelectionUtils.range;\r\n\r\n tool.surround(range);\r\n this.checkToolsState();\r\n }\r\n\r\n /**\r\n * Check Tools` state by selection\r\n */\r\n private checkToolsState(): void {\r\n this.tools.forEach( (toolInstance, toolName) => {\r\n toolInstance.checkState(SelectionUtils.get());\r\n });\r\n }\r\n\r\n /**\r\n * Get inline tools tools\r\n * Tools that has isInline is true\r\n */\r\n private get inlineTools(): {[name: string]: InlineTool} {\r\n const result = {};\r\n\r\n for (const tool in this.Editor.Tools.inline) {\r\n if (this.Editor.Tools.inline.hasOwnProperty(tool)) {\r\n result[tool] = this.Editor.Tools.constructInline(this.Editor.Tools.inline[tool]);\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n}\r\n","import IEditorConfig from '../interfaces/editor-config';\r\n\r\n/**\r\n * @class Toolbox\r\n * @classdesc Holder for Tools\r\n *\r\n * @typedef {Toolbox} Toolbox\r\n * @property {Boolean} opened - opening state\r\n * @property {Object} nodes - Toolbox nodes\r\n * @property {Object} CSS - CSS class names\r\n *\r\n */\r\nexport default class Toolbox extends Module {\r\n /**\r\n * @constructor\r\n * @param {IEditorConfig} config\r\n */\r\n constructor({config}) {\r\n super({config});\r\n\r\n this.nodes = {\r\n toolbox: null,\r\n buttons: []\r\n };\r\n\r\n /**\r\n * Opening state\r\n * @type {boolean}\r\n */\r\n this.opened = false;\r\n\r\n /**\r\n * Active button index\r\n * -1 equals no chosen Tool\r\n * @type {number}\r\n */\r\n this.activeButtonIndex = -1;\r\n\r\n /**\r\n * How many tools displayed in Toolbox\r\n * @type {number}\r\n */\r\n this.displayedToolsCount = 0;\r\n }\r\n\r\n /**\r\n * CSS styles\r\n * @return {{toolbox: string, toolboxButton: string, toolboxOpened: string}}\r\n */\r\n static get CSS() {\r\n return {\r\n toolbox: 'ce-toolbox',\r\n toolboxButton: 'ce-toolbox__button',\r\n toolboxButtonActive : 'ce-toolbox__button--active',\r\n toolboxOpened: 'ce-toolbox--opened',\r\n };\r\n }\r\n\r\n /**\r\n * Makes the Toolbox\r\n */\r\n make() {\r\n this.nodes.toolbox = $.make('div', Toolbox.CSS.toolbox);\r\n $.append(this.Editor.Toolbar.nodes.content, this.nodes.toolbox);\r\n\r\n this.addTools();\r\n }\r\n\r\n /**\r\n * Iterates available tools and appends them to the Toolbox\r\n */\r\n addTools() {\r\n let tools = this.Editor.Tools.toolsAvailable;\r\n\r\n for (let toolName in tools) {\r\n this.addTool(toolName, tools[toolName]);\r\n }\r\n }\r\n\r\n /**\r\n * Append Tool to the Toolbox\r\n *\r\n * @param {string} toolName - tool name\r\n * @param {IBlockTool} tool - tool class\r\n */\r\n addTool(toolName, tool) {\r\n const api = this.Editor.Tools.apiSettings;\r\n\r\n if (tool[api.IS_DISPLAYED_IN_TOOLBOX] && !tool[api.TOOLBAR_ICON]) {\r\n _.log('Toolbar icon is missed. Tool %o skipped', 'warn', toolName);\r\n return;\r\n }\r\n\r\n /**\r\n * @todo Add checkup for the render method\r\n */\r\n // if (typeof tool.render !== 'function') {\r\n // _.log('render method missed. Tool %o skipped', 'warn', tool);\r\n // return;\r\n // }\r\n\r\n /**\r\n * Skip tools that pass 'displayInToolbox=false'\r\n */\r\n if (!tool[api.IS_DISPLAYED_IN_TOOLBOX]) {\r\n return;\r\n }\r\n\r\n let button = $.make('li', [ Toolbox.CSS.toolboxButton ], {\r\n title: toolName\r\n });\r\n\r\n button.innerHTML = tool.toolboxIcon;\r\n\r\n $.append(this.nodes.toolbox, button);\r\n\r\n this.nodes.toolbox.appendChild(button);\r\n this.nodes.buttons.push(button);\r\n\r\n /**\r\n * Add click listener\r\n */\r\n this.Editor.Listeners.on(button, 'click', (event) => {\r\n this.toolButtonActivate(event, toolName);\r\n });\r\n\r\n /**\r\n * Enable shortcut\r\n */\r\n const toolSettings = this.Editor.Tools.getToolSettings(toolName);\r\n\r\n if (toolSettings && toolSettings[this.Editor.Tools.apiSettings.SHORTCUT]) {\r\n this.enableShortcut(tool, toolName, toolSettings[this.Editor.Tools.apiSettings.SHORTCUT]);\r\n }\r\n\r\n /** Increment Tools count */\r\n this.displayedToolsCount++;\r\n }\r\n\r\n /**\r\n * Enable shortcut Block Tool implemented shortcut\r\n * @param {IBlockTool} tool - Tool class\r\n * @param {String} toolName - Tool name\r\n * @param {String} shortcut - shortcut according to the Shortcut Module format\r\n */\r\n enableShortcut(tool, toolName, shortcut) {\r\n this.Editor.Shortcuts.add({\r\n name: shortcut,\r\n handler: (event) => {\r\n event.preventDefault();\r\n this.insertNewBlock(tool, toolName);\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Inserts new block\r\n * Can be called when button clicked on Toolbox or by Shortcut\r\n *\r\n * @param {IBlockTool} tool - Tool Class\r\n * @param {String} toolName - Tool name\r\n */\r\n insertNewBlock(tool, toolName) {\r\n /**\r\n * @type {Block}\r\n */\r\n const currentBlock = this.Editor.BlockManager.currentBlock;\r\n\r\n /**\r\n * We do replace if:\r\n * - block is empty\r\n * - block is not irreplaceable\r\n * @type {Array}\r\n */\r\n let newBlock;\r\n\r\n if (!tool[this.Editor.Tools.apiSettings.IS_IRREPLACEBLE_TOOL] && currentBlock.isEmpty) {\r\n newBlock = this.Editor.BlockManager.replace(toolName);\r\n } else {\r\n newBlock = this.Editor.BlockManager.insert(toolName);\r\n }\r\n\r\n /**\r\n * Apply callback before inserting html\r\n */\r\n newBlock.call('appendCallback', {});\r\n\r\n this.Editor.Caret.setToBlock(newBlock);\r\n\r\n /**\r\n * close toolbar when node is changed\r\n */\r\n this.Editor.Toolbar.close();\r\n }\r\n\r\n /**\r\n * Toolbox Tool's button click handler\r\n *\r\n * @param {MouseEvent|KeyboardEvent} event\r\n * @param {string} toolName\r\n */\r\n toolButtonActivate(event, toolName) {\r\n const tool = this.Editor.Tools.toolsClasses[toolName];\r\n\r\n this.insertNewBlock(tool, toolName);\r\n }\r\n\r\n /**\r\n * Open Toolbox with Tools\r\n */\r\n open() {\r\n if (this.isEmpty) {\r\n return;\r\n }\r\n\r\n this.nodes.toolbox.classList.add(Toolbox.CSS.toolboxOpened);\r\n this.opened = true;\r\n }\r\n\r\n /**\r\n * Close Toolbox\r\n */\r\n close() {\r\n this.nodes.toolbox.classList.remove(Toolbox.CSS.toolboxOpened);\r\n this.opened = false;\r\n\r\n /** remove active item pointer */\r\n this.activeButtonIndex = -1;\r\n const activeButton = this.nodes.toolbox.querySelector(`.${Toolbox.CSS.toolboxButtonActive}`);\r\n\r\n if (activeButton) {\r\n activeButton.classList.remove(Toolbox.CSS.toolboxButtonActive);\r\n }\r\n }\r\n\r\n /**\r\n * Close Toolbox\r\n */\r\n toggle() {\r\n if (!this.opened) {\r\n this.open();\r\n } else {\r\n this.close();\r\n }\r\n }\r\n\r\n /**\r\n * Leaf\r\n * flip through the toolbox items\r\n * @param {String} direction - leaf direction, right is default\r\n */\r\n leaf(direction = 'right') {\r\n const childNodes = this.nodes.toolbox.childNodes;\r\n\r\n /**\r\n * If activeButtonIndex === -1 then we have no chosen Tool in Toolbox\r\n */\r\n if (this.activeButtonIndex === -1) {\r\n /**\r\n * Normalize \"previous\" Tool index depending on direction.\r\n * We need to do this to highlight \"first\" Tool correctly\r\n *\r\n * Order of Tools: [0] [1] ... [n - 1]\r\n * [0 = n] because of: n % n = 0 % n\r\n *\r\n * Direction 'right': for [0] the [n - 1] is a previous index\r\n * [n - 1] -> [0]\r\n *\r\n * Direction 'left': for [n - 1] the [0] is a previous index\r\n * [n - 1] <- [0]\r\n *\r\n * @type {number}\r\n */\r\n this.activeButtonIndex = direction === 'right' ? -1 : 0;\r\n } else {\r\n /**\r\n * If we have chosen Tool then remove highlighting\r\n */\r\n childNodes[this.activeButtonIndex].classList.remove(Toolbox.CSS.toolboxButtonActive);\r\n }\r\n\r\n /**\r\n * Count index for next Tool\r\n */\r\n if (direction === 'right') {\r\n /**\r\n * If we go right then choose next (+1) Tool\r\n * @type {number}\r\n */\r\n this.activeButtonIndex = (this.activeButtonIndex + 1) % childNodes.length;\r\n } else {\r\n /**\r\n * If we go left then choose previous (-1) Tool\r\n * Before counting module we need to add length before because of \"The JavaScript Modulo Bug\"\r\n * @type {number}\r\n */\r\n this.activeButtonIndex = (childNodes.length + this.activeButtonIndex - 1) % childNodes.length;\r\n }\r\n\r\n /**\r\n * Highlight new chosen Tool\r\n */\r\n childNodes[this.activeButtonIndex].classList.add(Toolbox.CSS.toolboxButtonActive);\r\n }\r\n\r\n /**\r\n * get tool name when it is selected\r\n * In case when nothing selection returns null\r\n *\r\n * @return {String|null}\r\n */\r\n get getActiveTool() {\r\n const childNodes = this.nodes.toolbox.childNodes;\r\n\r\n if (this.activeButtonIndex === -1) {\r\n return null;\r\n }\r\n\r\n return childNodes[this.activeButtonIndex].title;\r\n }\r\n\r\n /**\r\n * Returns True if Toolbox is Empty and nothing to show\r\n * @return {boolean}\r\n */\r\n get isEmpty() {\r\n return this.displayedToolsCount === 0;\r\n }\r\n}\r\n","/**\r\n *\r\n * «Toolbar» is the node that moves up/down over current block\r\n *\r\n * ______________________________________ Toolbar ____________________________________________\r\n * | |\r\n * | ..................... Content .................... ......... Block Actions .......... |\r\n * | . . . . |\r\n * | . . . [Open Settings] . |\r\n * | . [Plus Button] [Toolbox: {Tool1}, {Tool2}] . . . |\r\n * | . . . [Settings Panel] . |\r\n * | .................................................. .................................. |\r\n * | |\r\n * |___________________________________________________________________________________________|\r\n *\r\n *\r\n * Toolbox — its an Element contains tools buttons. Can be shown by Plus Button.\r\n *\r\n * _______________ Toolbox _______________\r\n * | |\r\n * | [Header] [Image] [List] [Quote] ... |\r\n * |_______________________________________|\r\n *\r\n *\r\n * Settings Panel — is an Element with block settings:\r\n *\r\n * ____ Settings Panel ____\r\n * | ...................... |\r\n * | . Tool Settings . |\r\n * | ...................... |\r\n * | . Default Settings . |\r\n * | ...................... |\r\n * |________________________|\r\n *\r\n *\r\n * @class\r\n * @classdesc Toolbar module\r\n *\r\n * @typedef {Toolbar} Toolbar\r\n * @property {Object} nodes\r\n * @property {Element} nodes.wrapper - Toolbar main element\r\n * @property {Element} nodes.content - Zone with Plus button and toolbox.\r\n * @property {Element} nodes.actions - Zone with Block Settings and Remove Button\r\n * @property {Element} nodes.blockActionsButtons - Zone with Block Buttons: [Settings]\r\n * @property {Element} nodes.plusButton - Button that opens or closes Toolbox\r\n * @property {Element} nodes.toolbox - Container for tools\r\n * @property {Element} nodes.settingsToggler - open/close Settings Panel button\r\n * @property {Element} nodes.settings - Settings Panel\r\n * @property {Element} nodes.pluginSettings - Plugin Settings section of Settings Panel\r\n * @property {Element} nodes.defaultSettings - Default Settings section of Settings Panel\r\n */\r\nexport default class Toolbar extends Module {\r\n /**\r\n * @constructor\r\n */\r\n constructor({config}) {\r\n super({config});\r\n\r\n this.nodes = {\r\n wrapper : null,\r\n content : null,\r\n actions : null,\r\n\r\n // Content Zone\r\n plusButton : null,\r\n\r\n // Actions Zone\r\n blockActionsButtons: null,\r\n settingsToggler : null,\r\n };\r\n }\r\n\r\n /**\r\n * CSS styles\r\n * @return {Object}\r\n * @constructor\r\n */\r\n static get CSS() {\r\n return {\r\n toolbar: 'ce-toolbar',\r\n content: 'ce-toolbar__content',\r\n actions: 'ce-toolbar__actions',\r\n\r\n toolbarOpened: 'ce-toolbar--opened',\r\n\r\n // Content Zone\r\n plusButton: 'ce-toolbar__plus',\r\n plusButtonHidden: 'ce-toolbar__plus--hidden',\r\n\r\n // Actions Zone\r\n blockActionsButtons: 'ce-toolbar__actions-buttons',\r\n settingsToggler: 'ce-toolbar__settings-btn',\r\n };\r\n }\r\n\r\n /**\r\n * Makes toolbar\r\n */\r\n make() {\r\n this.nodes.wrapper = $.make('div', Toolbar.CSS.toolbar);\r\n\r\n /**\r\n * Make Content Zone and Actions Zone\r\n */\r\n ['content', 'actions'].forEach( el => {\r\n this.nodes[el] = $.make('div', Toolbar.CSS[el]);\r\n $.append(this.nodes.wrapper, this.nodes[el]);\r\n });\r\n\r\n\r\n /**\r\n * Fill Content Zone:\r\n * - Plus Button\r\n * - Toolbox\r\n */\r\n this.nodes.plusButton = $.make('div', Toolbar.CSS.plusButton);\r\n $.append(this.nodes.plusButton, $.svg('plus', 14, 14));\r\n $.append(this.nodes.content, this.nodes.plusButton);\r\n this.nodes.plusButton.addEventListener('click', event => this.plusButtonClicked(event), false);\r\n\r\n\r\n /**\r\n * Make a Toolbox\r\n */\r\n this.Editor.Toolbox.make();\r\n\r\n /**\r\n * Fill Actions Zone:\r\n * - Settings Toggler\r\n * - Remove Block Button\r\n * - Settings Panel\r\n */\r\n this.nodes.blockActionsButtons = $.make('div', Toolbar.CSS.blockActionsButtons);\r\n this.nodes.settingsToggler = $.make('span', Toolbar.CSS.settingsToggler);\r\n const settingsIcon = $.svg('dots', 18, 4);\r\n\r\n $.append(this.nodes.settingsToggler, settingsIcon);\r\n $.append(this.nodes.blockActionsButtons, this.nodes.settingsToggler);\r\n $.append(this.nodes.actions, this.nodes.blockActionsButtons);\r\n\r\n /**\r\n * Make and append Settings Panel\r\n */\r\n this.Editor.BlockSettings.make();\r\n $.append(this.nodes.actions, this.Editor.BlockSettings.nodes.wrapper);\r\n\r\n /**\r\n * Append toolbar to the Editor\r\n */\r\n $.append(this.Editor.UI.nodes.wrapper, this.nodes.wrapper);\r\n\r\n /**\r\n * Bind events on the Toolbar elements\r\n */\r\n this.bindEvents();\r\n }\r\n\r\n /**\r\n * Move Toolbar to the Current Block\r\n * @param {Boolean} forceClose - force close Toolbar Settings and Toolbar\r\n */\r\n move(forceClose = true) {\r\n if (forceClose) {\r\n /** Close Toolbox when we move toolbar */\r\n this.Editor.Toolbox.close();\r\n this.Editor.BlockSettings.close();\r\n }\r\n\r\n let currentBlock = this.Editor.BlockManager.currentBlock.holder;\r\n\r\n /**\r\n * If no one Block selected as a Current\r\n */\r\n if (!currentBlock) {\r\n return;\r\n }\r\n\r\n /**\r\n * Set Toolbar Min Height as Block's height\r\n * Plus Button and Toolbox positioned at the center of the Toolbar\r\n */\r\n const contentOffset = Math.floor(currentBlock.offsetHeight / 2);\r\n\r\n this.nodes.plusButton.style.transform = `translate3d(0, calc(${contentOffset}px - 50%), 0)`;\r\n this.Editor.Toolbox.nodes.toolbox.style.transform = `translate3d(0, calc(${contentOffset}px - 50%), 0)`;\r\n /**\r\n * Move Toolbar to the Top coordinate of Block\r\n */\r\n this.nodes.wrapper.style.transform = `translate3D(0, ${Math.floor(currentBlock.offsetTop)}px, 0)`;\r\n }\r\n\r\n /**\r\n * Open Toolbar with Plus Button\r\n */\r\n open() {\r\n /**\r\n * Wait Block rendering for correct height computing\r\n */\r\n setTimeout(() => {\r\n this.move();\r\n this.nodes.wrapper.classList.add(Toolbar.CSS.toolbarOpened);\r\n }, 50);\r\n }\r\n\r\n /**\r\n * returns toolbar opened state\r\n * @return {Boolean}\r\n */\r\n get opened() {\r\n return this.nodes.wrapper.classList.contains(Toolbar.CSS.toolbarOpened);\r\n }\r\n\r\n /**\r\n * Close the Toolbar\r\n */\r\n close() {\r\n this.nodes.wrapper.classList.remove(Toolbar.CSS.toolbarOpened);\r\n\r\n /** Close components */\r\n this.Editor.Toolbox.close();\r\n this.Editor.BlockSettings.close();\r\n }\r\n\r\n /**\r\n * Plus Button public methods\r\n * @return {{hide: function(): void, show: function(): void}}\r\n */\r\n get plusButton() {\r\n return {\r\n hide: () => this.nodes.plusButton.classList.add(Toolbar.CSS.plusButtonHidden),\r\n show: () => {\r\n if (this.Editor.Toolbox.isEmpty) {\r\n return;\r\n }\r\n this.nodes.plusButton.classList.remove(Toolbar.CSS.plusButtonHidden);\r\n }\r\n };\r\n }\r\n\r\n /**\r\n * Handler for Plus Button\r\n * @param {MouseEvent} event\r\n */\r\n plusButtonClicked() {\r\n this.Editor.Toolbox.toggle();\r\n }\r\n\r\n /**\r\n * Bind events on the Toolbar Elements:\r\n * - Block Settings\r\n */\r\n bindEvents() {\r\n /**\r\n * Settings toggler\r\n */\r\n this.Editor.Listeners.on(this.nodes.settingsToggler, 'click', (event) => {\r\n this.settingsTogglerClicked(event);\r\n });\r\n }\r\n\r\n /**\r\n * Clicks on the Block Settings toggler\r\n */\r\n settingsTogglerClicked() {\r\n if (this.Editor.BlockSettings.opened) {\r\n this.Editor.BlockSettings.close();\r\n } else {\r\n this.Editor.BlockSettings.open();\r\n }\r\n }\r\n}\r\n","import BoldInlineTool from '../inline-tools/inline-tool-bold';\r\nimport ItalicInlineTool from '../inline-tools/inline-tool-italic';\r\nimport LinkInlineTool from '../inline-tools/inline-tool-link';\r\n\r\nconst Paragraph = require('../tools/paragraph/dist/bundle');\r\n\r\n/**\r\n * @module Codex Editor Tools Submodule\r\n *\r\n * Creates Instances from Plugins and binds external config to the instances\r\n */\r\n\r\n/**\r\n * Each Tool must contain the following important objects:\r\n *\r\n * @typedef {Object} ToolConfig {@link docs/tools.md}\r\n * @property {String} iconClassname - this a icon in toolbar\r\n * @property {Boolean} displayInToolbox - will be displayed in toolbox. Default value is TRUE\r\n * @property {Boolean} enableLineBreaks - inserts new block or break lines. Default value is FALSE\r\n * @property {Boolean|String[]} inlineToolbar - Pass `true` to enable the Inline Toolbar with all Tools, all pass an array with specified Tools list |\r\n * @property render @todo add description\r\n * @property save @todo add description\r\n * @property settings @todo add description\r\n * @property validate - method that validates output data before saving\r\n */\r\n\r\n/**\r\n * @typedef {Function} Tool {@link docs/tools.md}\r\n * @property {Boolean} displayInToolbox - By default, tools won't be added in the Toolbox. Pass true to add.\r\n * @property {String} iconClassName - CSS class name for the Toolbox button\r\n * @property {Boolean} irreplaceable - Toolbox behaviour: replace or add new block below\r\n * @property render\r\n * @property save\r\n * @property settings\r\n * @property validate\r\n *\r\n * @todo update according to current API\r\n * @todo describe Tool in the {@link docs/tools.md}\r\n */\r\n\r\n/**\r\n * Class properties:\r\n *\r\n * @typedef {Tools} Tools\r\n * @property {Tools[]} toolsAvailable - available Tools\r\n * @property {Tools[]} toolsUnavailable - unavailable Tools\r\n * @property {object} toolsClasses - all classes\r\n * @property {object} toolsSettings - Tools settings\r\n * @property {EditorConfig} config - Editor config\r\n */\r\nexport default class Tools extends Module {\r\n /**\r\n * @constructor\r\n *\r\n * @param {EditorConfig} config\r\n */\r\n constructor({config}) {\r\n super({config});\r\n\r\n /**\r\n * Map {name: Class, ...} where:\r\n * name — block type name in JSON. Got from EditorConfig.tools keys\r\n * @type {Object}\r\n */\r\n this.toolsClasses = {};\r\n\r\n /**\r\n * Tools settings in a map {name: settings, ...}\r\n * @type {Object}\r\n */\r\n this.toolsSettings = {};\r\n\r\n /**\r\n * Available tools list\r\n * {name: Class, ...}\r\n * @type {Object}\r\n */\r\n this.toolsAvailable = {};\r\n\r\n /**\r\n * Tools that rejected a prepare method\r\n * {name: Class, ... }\r\n * @type {Object}\r\n */\r\n this.toolsUnavailable = {};\r\n\r\n /**\r\n * Cache for the prepared inline tools\r\n * @type {null|object}\r\n * @private\r\n */\r\n this._inlineTools = null;\r\n }\r\n\r\n /**\r\n * Returns available Tools\r\n * @return {Tool[]}\r\n */\r\n get available() {\r\n return this.toolsAvailable;\r\n }\r\n\r\n /**\r\n * Returns unavailable Tools\r\n * @return {Tool[]}\r\n */\r\n get unavailable() {\r\n return this.toolsUnavailable;\r\n }\r\n\r\n /**\r\n * Return Tools for the Inline Toolbar\r\n * @return {Object} - object of Inline Tool's classes\r\n */\r\n get inline() {\r\n if (this._inlineTools) {\r\n return this._inlineTools;\r\n }\r\n\r\n const tools = Object.entries(this.available).filter( ([name, tool]) => {\r\n if (!tool[this.apiSettings.IS_INLINE]) {\r\n return false;\r\n }\r\n\r\n /**\r\n * Some Tools validation\r\n */\r\n const inlineToolRequiredMethods = ['render', 'surround', 'checkState'];\r\n const notImplementedMethods = inlineToolRequiredMethods.filter( method => !this.constructInline(tool)[method]);\r\n\r\n if (notImplementedMethods.length) {\r\n _.log(`Incorrect Inline Tool: ${tool.name}. Some of required methods is not implemented %o`, 'warn', notImplementedMethods);\r\n return false;\r\n }\r\n\r\n return true;\r\n });\r\n\r\n /**\r\n * collected inline tools with key of tool name\r\n */\r\n const result = {};\r\n\r\n tools.forEach(([name, tool]) => result[name] = tool);\r\n\r\n /**\r\n * Cache prepared Tools\r\n */\r\n this._inlineTools = result;\r\n\r\n return this._inlineTools;\r\n }\r\n\r\n /**\r\n * Return editor block tools\r\n */\r\n get blockTools() {\r\n // eslint-disable-next-line no-unused-vars\r\n const tools = Object.entries(this.available).filter( ([name, tool]) => {\r\n if (tool[this.apiSettings.IS_INLINE]) {\r\n return false;\r\n }\r\n\r\n return true;\r\n });\r\n\r\n /**\r\n * collected block tools with key of tool name\r\n */\r\n const result = {};\r\n\r\n tools.forEach(([name, tool]) => result[name] = tool);\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * Constant for available Tools Settings\r\n * @return {object}\r\n */\r\n get apiSettings() {\r\n return {\r\n CONFIG: 'config',\r\n IS_CONTENTLESS: 'contentless',\r\n IS_DISPLAYED_IN_TOOLBOX: 'displayInToolbox',\r\n IS_ENABLED_INLINE_TOOLBAR: 'inlineToolbar',\r\n IS_ENABLED_LINE_BREAKS: 'enableLineBreaks',\r\n IS_INLINE: 'isInline',\r\n IS_IRREPLACEBLE_TOOL: 'irreplaceable',\r\n IS_PASTE_DISALLOWED: 'disallowPaste',\r\n SHORTCUT: 'shortcut',\r\n TOOLBAR_ICON: 'toolboxIcon',\r\n SANITIZE_CONFIG: 'sanitize'\r\n };\r\n }\r\n\r\n /**\r\n * Creates instances via passed or default configuration\r\n * @return {Promise}\r\n */\r\n prepare() {\r\n /**\r\n * Assign internal tools\r\n */\r\n Object.assign(this.config.tools, this.internalTools);\r\n\r\n if (!this.config.hasOwnProperty('tools') || Object.keys(this.config.tools).length === 0) {\r\n return Promise.reject('Can\\'t start without tools');\r\n }\r\n\r\n /**\r\n * Save Tools settings to a map\r\n */\r\n for(let toolName in this.config.tools) {\r\n /**\r\n * If Tool is an object not a Tool's class then\r\n * save class and settings separately\r\n */\r\n if (typeof this.config.tools[toolName] === 'object') {\r\n /**\r\n * Save Tool's class from 'class' field\r\n * @type {ITool}\r\n */\r\n this.toolsClasses[toolName] = this.config.tools[toolName].class;\r\n\r\n /**\r\n * Save Tool's settings\r\n * @type {IToolSettings}\r\n */\r\n this.toolsSettings[toolName] = this.config.tools[toolName];\r\n\r\n /**\r\n * Remove Tool's class from settings\r\n */\r\n delete this.toolsSettings[toolName].class;\r\n } else {\r\n /**\r\n * Save Tool's class\r\n * @type {ITool}\r\n */\r\n this.toolsClasses[toolName] = this.config.tools[toolName];\r\n\r\n /**\r\n * Set empty settings for Block by default\r\n * @type {{}}\r\n */\r\n this.toolsSettings[toolName] = {};\r\n }\r\n }\r\n\r\n /**\r\n * getting classes that has prepare method\r\n */\r\n let sequenceData = this.getListOfPrepareFunctions();\r\n\r\n /**\r\n * if sequence data contains nothing then resolve current chain and run other module prepare\r\n */\r\n if (sequenceData.length === 0) {\r\n return Promise.resolve();\r\n }\r\n\r\n /**\r\n * to see how it works {@link Util#sequence}\r\n */\r\n return _.sequence(sequenceData, (data) => {\r\n this.success(data);\r\n }, (data) => {\r\n this.fallback(data);\r\n });\r\n }\r\n\r\n /**\r\n * Binds prepare function of plugins with user or default config\r\n * @return {Array} list of functions that needs to be fired sequentially\r\n */\r\n getListOfPrepareFunctions() {\r\n let toolPreparationList = [];\r\n\r\n for(let toolName in this.toolsClasses) {\r\n let toolClass = this.toolsClasses[toolName];\r\n\r\n if (typeof toolClass.prepare === 'function') {\r\n toolPreparationList.push({\r\n function : toolClass.prepare,\r\n data : {\r\n toolName,\r\n config: this.toolsSettings[toolName][this.apiSettings.CONFIG]\r\n }\r\n });\r\n } else {\r\n /**\r\n * If Tool hasn't a prepare method, mark it as available\r\n */\r\n this.toolsAvailable[toolName] = toolClass;\r\n }\r\n }\r\n\r\n return toolPreparationList;\r\n }\r\n\r\n /**\r\n * @param {ChainData.data} data - append tool to available list\r\n */\r\n success(data) {\r\n this.toolsAvailable[data.toolName] = this.toolsClasses[data.toolName];\r\n }\r\n\r\n /**\r\n * @param {ChainData.data} data - append tool to unavailable list\r\n */\r\n fallback(data) {\r\n this.toolsUnavailable[data.toolName] = this.toolsClasses[data.toolName];\r\n }\r\n\r\n /**\r\n * Return Tool`s instance\r\n *\r\n * @param {String} tool — tool name\r\n * @param {IBlockToolData} data — initial data\r\n * @return {IBlockTool}\r\n */\r\n construct(tool, data) {\r\n const plugin = this.toolsClasses[tool];\r\n\r\n /**\r\n * Configuration to be passed to the Tool's constructor\r\n */\r\n const config = this.toolsSettings[tool][this.apiSettings.CONFIG];\r\n\r\n /**\r\n * @type {{api: IAPI, config: ({}), data: IBlockToolData}}\r\n */\r\n const constructorOptions = {\r\n api: this.Editor.API.methods,\r\n config: config || {},\r\n data: data\r\n };\r\n\r\n return new plugin(constructorOptions);\r\n }\r\n\r\n /**\r\n * Return Inline Tool's instance\r\n *\r\n * @param {IInlineTool} tool\r\n * @return {IInlineTool} — instance\r\n */\r\n constructInline(tool) {\r\n /**\r\n * @type {{api: IAPI}}\r\n */\r\n const constructorOptions = {\r\n api: this.Editor.API.methods\r\n };\r\n\r\n return new tool(constructorOptions);\r\n }\r\n\r\n /**\r\n * Check if passed Tool is an instance of Initial Block Tool\r\n * @param {Tool} tool - Tool to check\r\n * @return {Boolean}\r\n */\r\n isInitial(tool) {\r\n return tool instanceof this.available[this.config.initialBlock];\r\n }\r\n\r\n /**\r\n * Return Tool's config by name\r\n * @param {string} toolName\r\n * @return {IToolSettings}\r\n */\r\n getToolSettings(toolName) {\r\n return this.toolsSettings[toolName];\r\n }\r\n\r\n /**\r\n * Returns internal tools\r\n * Includes Bold, Italic, Link and Paragraph\r\n */\r\n get internalTools() {\r\n return {\r\n bold: BoldInlineTool,\r\n italic: ItalicInlineTool,\r\n link: LinkInlineTool,\r\n paragraph: {\r\n class: Paragraph,\r\n inlineToolbar: true\r\n }\r\n };\r\n }\r\n}\r\n","/**\r\n * Module UI\r\n *\r\n * @type {UI}\r\n */\r\n\r\n/**\r\n * Prebuilded sprite of SVG icons\r\n */\r\nimport sprite from '../../../build/sprite.svg';\r\n\r\nimport Selection from '../selection';\r\n\r\n/**\r\n * @class\r\n *\r\n * @classdesc Makes CodeX Editor UI:\r\n * \r\n * \r\n * \r\n * \r\n * \r\n *\r\n * @typedef {UI} UI\r\n * @property {EditorConfig} config - editor configuration {@link CodexEditor#configuration}\r\n * @property {Object} Editor - available editor modules {@link CodexEditor#moduleInstances}\r\n * @property {Object} nodes -\r\n * @property {Element} nodes.holder - element where we need to append redactor\r\n * @property {Element} nodes.wrapper - \r\n * @property {Element} nodes.redactor - \r\n */\r\nexport default class UI extends Module {\r\n /**\r\n * @constructor\r\n *\r\n * @param {EditorConfig} config\r\n */\r\n constructor({config}) {\r\n super({config});\r\n\r\n this.nodes = {\r\n holder: null,\r\n wrapper: null,\r\n redactor: null\r\n };\r\n }\r\n\r\n /**\r\n * Making main interface\r\n */\r\n async prepare() {\r\n await this.make();\r\n\r\n /**\r\n * Append SVG sprite\r\n */\r\n await this.appendSVGSprite();\r\n\r\n /**\r\n * Make toolbar\r\n */\r\n await this.Editor.Toolbar.make();\r\n\r\n /**\r\n * Make the Inline toolbar\r\n */\r\n await this.Editor.InlineToolbar.make();\r\n\r\n /**\r\n * Load and append CSS\r\n */\r\n await this.loadStyles();\r\n\r\n /**\r\n * Bind events for the UI elements\r\n */\r\n await this.bindEvents();\r\n }\r\n\r\n /**\r\n * CodeX Editor UI CSS class names\r\n * @return {{editorWrapper: string, editorZone: string, block: string}}\r\n */\r\n get CSS() {\r\n return {\r\n editorWrapper : 'codex-editor',\r\n editorZone : 'codex-editor__redactor',\r\n };\r\n }\r\n\r\n /**\r\n * Makes CodeX Editor interface\r\n * @return {Promise}\r\n */\r\n async make() {\r\n /**\r\n * Element where we need to append CodeX Editor\r\n * @type {Element}\r\n */\r\n this.nodes.holder = document.getElementById(this.config.holderId);\r\n\r\n if (!this.nodes.holder) {\r\n throw Error(\"Holder wasn't found by ID: #\" + this.config.holderId);\r\n }\r\n\r\n /**\r\n * Create and save main UI elements\r\n */\r\n this.nodes.wrapper = $.make('div', this.CSS.editorWrapper);\r\n this.nodes.redactor = $.make('div', this.CSS.editorZone);\r\n\r\n this.nodes.wrapper.appendChild(this.nodes.redactor);\r\n this.nodes.holder.appendChild(this.nodes.wrapper);\r\n }\r\n\r\n /**\r\n * Appends CSS\r\n */\r\n loadStyles() {\r\n /**\r\n * Load CSS\r\n */\r\n let styles = require('../../styles/main.css');\r\n\r\n /**\r\n * Make tag\r\n */\r\n let tag = $.make('style', null, {\r\n textContent: styles.toString()\r\n });\r\n\r\n /**\r\n * Append styles at the top of HEAD tag\r\n */\r\n $.prepend(document.head, tag);\r\n }\r\n\r\n /**\r\n * Bind events on the CodeX Editor interface\r\n */\r\n bindEvents() {\r\n this.Editor.Listeners.on(this.nodes.redactor, 'click', event => this.redactorClicked(event), false );\r\n this.Editor.Listeners.on(document, 'keydown', event => this.documentKeydown(event), true );\r\n this.Editor.Listeners.on(document, 'click', event => this.documentClicked(event), false );\r\n }\r\n\r\n /**\r\n * All keydowns on document\r\n * @param {Event} event\r\n */\r\n documentKeydown(event) {\r\n switch (event.keyCode) {\r\n case _.keyCodes.ENTER:\r\n this.enterPressed(event);\r\n break;\r\n default:\r\n this.defaultBehaviour(event);\r\n break;\r\n }\r\n }\r\n\r\n /**\r\n * Ignore all other document's keydown events\r\n * @param {KeyboardEvent} event\r\n */\r\n defaultBehaviour(event) {\r\n const keyDownOnEditor = event.target.closest(`.${this.CSS.editorWrapper}`);\r\n\r\n /**\r\n * Ignore keydowns on document\r\n * clear pointer and close toolbar\r\n */\r\n if (!keyDownOnEditor) {\r\n /**\r\n * Remove all highlights and remove caret\r\n */\r\n this.Editor.BlockManager.dropPointer();\r\n\r\n /**\r\n * Close Toolbar\r\n */\r\n this.Editor.Toolbar.close();\r\n }\r\n }\r\n\r\n /**\r\n * Enter pressed on document\r\n * @param event\r\n */\r\n enterPressed(event) {\r\n let hasPointerToBlock = this.Editor.BlockManager.currentBlockIndex >= 0;\r\n\r\n /**\r\n * If Caret is not set anywhere, event target on Enter is always Element that we handle\r\n * In our case it is document.body\r\n *\r\n * So, BlockManager points some Block and Enter press is on Body\r\n * We can create a new block\r\n */\r\n if (hasPointerToBlock && event.target.tagName === 'BODY') {\r\n /**\r\n * Insert initial typed Block\r\n */\r\n const newBlock = this.Editor.BlockManager.insert();\r\n\r\n this.Editor.Caret.setToBlock(newBlock);\r\n\r\n /**\r\n * And highlight\r\n */\r\n this.Editor.BlockManager.highlightCurrentNode();\r\n\r\n /**\r\n * Move toolbar and show plus button because new Block is empty\r\n */\r\n this.Editor.Toolbar.move();\r\n this.Editor.Toolbar.plusButton.show();\r\n }\r\n\r\n this.Editor.BlockSelection.clearSelection();\r\n }\r\n\r\n /**\r\n * All clicks on document\r\n * @param {MouseEvent} event - Click\r\n */\r\n documentClicked(event) {\r\n /**\r\n * Close Inline Toolbar when nothing selected\r\n * Do not fire check on clicks at the Inline Toolbar buttons\r\n */\r\n const clickedOnInlineToolbarButton = event.target.closest(`.${this.Editor.InlineToolbar.CSS.inlineToolbar}`);\r\n const clickedInsideofEditor = event.target.closest(`.${this.CSS.editorWrapper}`);\r\n\r\n /** Clear highlightings and pointer on BlockManager */\r\n if (!clickedInsideofEditor && !Selection.isAtEditor) {\r\n this.Editor.BlockManager.dropPointer();\r\n this.Editor.Toolbar.close();\r\n }\r\n\r\n if (!clickedOnInlineToolbarButton) {\r\n this.Editor.InlineToolbar.handleShowingEvent(event);\r\n }\r\n\r\n if (Selection.isAtEditor) {\r\n this.Editor.BlockManager.setCurrentBlockByChildNode(Selection.anchorNode);\r\n }\r\n\r\n /** Clear selection */\r\n this.Editor.BlockSelection.clearSelection();\r\n }\r\n\r\n /**\r\n * All clicks on the redactor zone\r\n *\r\n * @param {MouseEvent} event\r\n *\r\n * @description\r\n * 1. Save clicked Block as a current {@link BlockManager#currentNode}\r\n * it uses for the following:\r\n * - add CSS modifier for the selected Block\r\n * - on Enter press, we make a new Block under that\r\n *\r\n * 2. Move and show the Toolbar\r\n *\r\n * 3. Set a Caret\r\n *\r\n * 4. By clicks on the Editor's bottom zone:\r\n * - if last Block is empty, set a Caret to this\r\n * - otherwise, add a new empty Block and set a Caret to that\r\n *\r\n * 5. Hide the Inline Toolbar\r\n *\r\n * @see selectClickedBlock\r\n *\r\n */\r\n redactorClicked(event) {\r\n const clickedNode = event.target;\r\n\r\n /**\r\n * Select clicked Block as Current\r\n */\r\n try {\r\n /**\r\n * Renew Current Block\r\n */\r\n this.Editor.BlockManager.setCurrentBlockByChildNode(clickedNode);\r\n\r\n /**\r\n * Highlight Current Node\r\n */\r\n this.Editor.BlockManager.highlightCurrentNode();\r\n } catch (e) {\r\n /**\r\n * If clicked outside first-level Blocks, set Caret to the last empty Block\r\n */\r\n this.Editor.Caret.setToTheLastBlock();\r\n }\r\n\r\n event.stopImmediatePropagation();\r\n event.stopPropagation();\r\n\r\n /**\r\n * Move and open toolbar\r\n */\r\n this.Editor.Toolbar.open();\r\n\r\n /**\r\n * Hide the Plus Button\r\n */\r\n this.Editor.Toolbar.plusButton.hide();\r\n\r\n if (!this.Editor.BlockManager.currentBlock) {\r\n this.Editor.BlockManager.insert();\r\n }\r\n\r\n /**\r\n * Show the Plus Button if:\r\n * - Block is an initial-block (Text)\r\n * - Block is empty\r\n */\r\n let isInitialBlock = this.Editor.Tools.isInitial(this.Editor.BlockManager.currentBlock.tool),\r\n isEmptyBlock = this.Editor.BlockManager.currentBlock.isEmpty;\r\n\r\n if (isInitialBlock && isEmptyBlock) {\r\n this.Editor.Toolbar.plusButton.show();\r\n }\r\n\r\n /** Clear selection */\r\n this.Editor.BlockSelection.clearSelection();\r\n }\r\n\r\n /**\r\n * Append prebuilded sprite with SVG icons\r\n */\r\n appendSVGSprite() {\r\n let spriteHolder = $.make('div');\r\n\r\n spriteHolder.hidden = true;\r\n spriteHolder.style.display = 'none';\r\n spriteHolder.innerHTML = sprite;\r\n\r\n $.append(this.nodes.wrapper, spriteHolder);\r\n }\r\n\r\n /**\r\n * Clean editor`s UI\r\n */\r\n destroy() {\r\n this.nodes.holder.innerHTML = '';\r\n }\r\n}\r\n","'use strict';\r\n\r\n/**\r\n * Extend Element interface to include prefixed and experimental properties\r\n */\r\ninterface Element {\r\n matchesSelector: (selector: string) => boolean;\r\n mozMatchesSelector: (selector: string) => boolean;\r\n oMatchesSelector: (selector: string) => boolean;\r\n\r\n prepend: (nodes: Node|Node[]|any) => void;\r\n}\r\n\r\n/**\r\n * The Element.matches() method returns true if the element\r\n * would be selected by the specified selector string;\r\n * otherwise, returns false.\r\n *\r\n * {@link https://developer.mozilla.org/en-US/docs/Web/API/Element/matches#Polyfill}\r\n */\r\nif (!Element.prototype.matches) {\r\n Element.prototype.matches = Element.prototype.matchesSelector ||\r\n Element.prototype.mozMatchesSelector ||\r\n Element.prototype.msMatchesSelector ||\r\n Element.prototype.oMatchesSelector ||\r\n Element.prototype.webkitMatchesSelector ||\r\n function(s) {\r\n const matches = (this.document || this.ownerDocument).querySelectorAll(s);\r\n let i = matches.length;\r\n\r\n while (--i >= 0 && matches.item(i) !== this) {\r\n }\r\n\r\n return i > -1;\r\n };\r\n}\r\n\r\n/**\r\n * The Element.closest() method returns the closest ancestor\r\n * of the current element (or the current element itself) which\r\n * matches the selectors given in parameter.\r\n * If there isn't such an ancestor, it returns null.\r\n *\r\n * {@link https://developer.mozilla.org/en-US/docs/Web/API/Element/closest#Polyfill}\r\n */\r\nif (!Element.prototype.closest) {\r\n Element.prototype.closest = function(s) {\r\n let el = this;\r\n\r\n if (!document.documentElement.contains(el)) {\r\n return null;\r\n }\r\n\r\n do {\r\n if (el.matches(s)) {\r\n return el;\r\n }\r\n\r\n el = el.parentElement || el.parentNode;\r\n } while (el !== null);\r\n\r\n return null;\r\n };\r\n}\r\n\r\n/**\r\n * The ParentNode.prepend method inserts a set of Node objects\r\n * or DOMString objects before the first child of the ParentNode.\r\n * DOMString objects are inserted as equivalent Text nodes.\r\n *\r\n * {@link https://developer.mozilla.org/en-US/docs/Web/API/ParentNode/prepend#Polyfill}\r\n */\r\nif (!Element.prototype.prepend) {\r\n Element.prototype.prepend = function prepend(nodes: Node|Node[]|any) {\r\n const docFrag = document.createDocumentFragment();\r\n\r\n if (!Array.isArray(nodes)) {\r\n nodes = [ nodes ];\r\n }\r\n\r\n nodes.forEach((node: Node|any) => {\r\n const isNode = node instanceof Node;\r\n\r\n docFrag.appendChild(isNode ? node : document.createTextNode(String(node)));\r\n });\r\n\r\n this.insertBefore(docFrag, this.firstChild);\r\n };\r\n}\r\n","/**\r\n * TextRange interface fot IE9-\r\n */\r\nimport _ from './utils';\r\n\r\ninterface TextRange {\r\n boundingTop: number;\r\n boundingLeft: number;\r\n boundingBottom: number;\r\n boundingRight: number;\r\n boundingHeight: number;\r\n boundingWidth: number;\r\n}\r\n\r\n/**\r\n * Interface for object returned by document.selection in IE9-\r\n */\r\ninterface MSSelection {\r\n createRange: () => TextRange;\r\n type: string;\r\n}\r\n\r\n/**\r\n * Extends Document interface for IE9-\r\n */\r\ninterface Document {\r\n selection?: MSSelection;\r\n}\r\n\r\n/**\r\n * Working with selection\r\n * @typedef {Selection} Selection\r\n */\r\nexport default class SelectionUtils {\r\n\r\n /**\r\n * Editor styles\r\n * @return {{editorWrapper: string, editorZone: string}}\r\n * @constructor\r\n */\r\n static get CSS(): {editorWrapper: string, editorZone: string} {\r\n return {\r\n editorWrapper : 'codex-editor',\r\n editorZone : 'codex-editor__redactor',\r\n };\r\n }\r\n\r\n /**\r\n * Returns selected anchor\r\n * {@link https://developer.mozilla.org/ru/docs/Web/API/Selection/anchorNode}\r\n * @return {Node|null}\r\n */\r\n static get anchorNode(): Node|null {\r\n const selection = window.getSelection();\r\n\r\n return selection ? selection.anchorNode : null;\r\n }\r\n\r\n /**\r\n * Returns selection offset according to the anchor node\r\n * {@link https://developer.mozilla.org/ru/docs/Web/API/Selection/anchorOffset}\r\n * @return {Number|null}\r\n */\r\n static get anchorOffset(): number|null {\r\n const selection = window.getSelection();\r\n\r\n return selection ? selection.anchorOffset : null;\r\n }\r\n\r\n /**\r\n * Is current selection range collapsed\r\n * @return {boolean|null}\r\n */\r\n static get isCollapsed(): boolean|null {\r\n const selection = window.getSelection();\r\n\r\n return selection ? selection.isCollapsed : null;\r\n }\r\n\r\n /**\r\n * Check current selection if it is at Editor's zone\r\n * @return {boolean}\r\n */\r\n static get isAtEditor(): boolean {\r\n const selection = SelectionUtils.get();\r\n\r\n /**\r\n * Something selected on document\r\n */\r\n let selectedNode = (selection.anchorNode || selection.focusNode) as HTMLElement;\r\n\r\n if (selectedNode && selectedNode.nodeType === Node.TEXT_NODE) {\r\n selectedNode = selectedNode.parentNode as HTMLElement;\r\n }\r\n\r\n let editorZone = null;\r\n if (selectedNode) {\r\n editorZone = selectedNode.closest(`.${SelectionUtils.CSS.editorZone}`);\r\n }\r\n\r\n /**\r\n * SelectionUtils is not out of Editor because Editor's wrapper was found\r\n */\r\n return editorZone && editorZone.nodeType === Node.ELEMENT_NODE;\r\n }\r\n\r\n /**\r\n * Return first range\r\n * @return {Range|null}\r\n */\r\n static get range(): Range {\r\n const selection = window.getSelection();\r\n\r\n return selection && selection.rangeCount ? selection.getRangeAt(0) : null;\r\n }\r\n\r\n /**\r\n * Calculates position and size of selected text\r\n * @return {{x, y, width, height, top?, left?, bottom?, right?}}\r\n */\r\n static get rect(): DOMRect|ClientRect {\r\n let sel: Selection|MSSelection = (document as Document).selection,\r\n range: TextRange|Range;\r\n\r\n let rect = {\r\n x: 0,\r\n y: 0,\r\n width: 0,\r\n height: 0,\r\n } as DOMRect;\r\n\r\n if (sel && sel.type !== 'Control') {\r\n sel = sel as MSSelection;\r\n range = sel.createRange() as TextRange;\r\n rect.x = range.boundingLeft;\r\n rect.y = range.boundingTop;\r\n rect.width = range.boundingWidth;\r\n rect.height = range.boundingHeight;\r\n\r\n return rect;\r\n }\r\n\r\n if (!window.getSelection) {\r\n _.log('Method window.getSelection is not supported', 'warn');\r\n return rect;\r\n }\r\n\r\n sel = window.getSelection();\r\n\r\n if (!sel.rangeCount) {\r\n _.log('Method SelectionUtils.rangeCount() is not supported', 'warn');\r\n return rect;\r\n }\r\n\r\n range = sel.getRangeAt(0).cloneRange() as Range;\r\n\r\n if (range.getBoundingClientRect) {\r\n rect = range.getBoundingClientRect() as DOMRect;\r\n }\r\n // Fall back to inserting a temporary element\r\n if (rect.x === 0 && rect.y === 0) {\r\n const span = document.createElement('span');\r\n\r\n if (span.getBoundingClientRect) {\r\n // Ensure span has dimensions and position by\r\n // adding a zero-width space character\r\n span.appendChild( document.createTextNode('\\u200b') );\r\n range.insertNode(span);\r\n rect = span.getBoundingClientRect() as DOMRect;\r\n\r\n const spanParent = span.parentNode;\r\n\r\n spanParent.removeChild(span);\r\n\r\n // Glue any broken text nodes back together\r\n spanParent.normalize();\r\n }\r\n }\r\n\r\n return rect;\r\n }\r\n\r\n /**\r\n * Returns selected text as String\r\n * @returns {string}\r\n */\r\n static get text(): string {\r\n return window.getSelection ? window.getSelection().toString() : '';\r\n }\r\n\r\n /**\r\n * Returns window SelectionUtils\r\n * {@link https://developer.mozilla.org/ru/docs/Web/API/Window/getSelection}\r\n * @return {Selection}\r\n */\r\n public static get(): Selection {\r\n return window.getSelection();\r\n }\r\n\r\n public instance: Selection = null;\r\n public selection: Selection = null;\r\n\r\n /**\r\n * This property can store SelectionUtils's range for restoring later\r\n * @type {Range|null}\r\n */\r\n public savedSelectionRange: Range = null;\r\n\r\n /**\r\n * Save SelectionUtils's range\r\n */\r\n public save(): void {\r\n this.savedSelectionRange = SelectionUtils.range;\r\n }\r\n\r\n /**\r\n * Restore saved SelectionUtils's range\r\n */\r\n public restore(): void {\r\n if (!this.savedSelectionRange) {\r\n return;\r\n }\r\n\r\n const sel = window.getSelection();\r\n\r\n sel.removeAllRanges();\r\n sel.addRange(this.savedSelectionRange);\r\n }\r\n\r\n /**\r\n * Clears saved selection\r\n */\r\n public clearSaved(): void {\r\n this.savedSelectionRange = null;\r\n }\r\n\r\n /**\r\n * Looks ahead to find passed tag from current selection\r\n *\r\n * @param {String} tagName - tag to found\r\n * @param {String} [className] - tag's class name\r\n * @param {Number} [searchDepth] - count of tags that can be included. For better performance.\r\n * @return {HTMLElement|null}\r\n */\r\n public findParentTag(tagName: string, className?: string, searchDepth = 10): HTMLElement|null {\r\n const selection = window.getSelection();\r\n let parentTag = null;\r\n\r\n /**\r\n * If selection is missing or no anchorNode or focusNode were found then return null\r\n */\r\n if (!selection || !selection.anchorNode || !selection.focusNode) {\r\n return null;\r\n }\r\n\r\n /**\r\n * Define Nodes for start and end of selection\r\n */\r\n const boundNodes = [\r\n /** the Node in which the selection begins */\r\n selection.anchorNode as HTMLElement,\r\n /** the Node in which the selection ends */\r\n selection.focusNode as HTMLElement,\r\n ];\r\n\r\n /**\r\n * For each selection parent Nodes we try to find target tag [with target class name]\r\n * It would be saved in parentTag variable\r\n */\r\n boundNodes.forEach((parent) => {\r\n /** Reset tags limit */\r\n let searchDepthIterable = searchDepth;\r\n\r\n while (searchDepthIterable > 0 && parent.parentNode) {\r\n /**\r\n * Check tag's name\r\n */\r\n if (parent.tagName === tagName) {\r\n /**\r\n * Save the result\r\n */\r\n parentTag = parent;\r\n\r\n /**\r\n * Optional additional check for class-name mismatching\r\n */\r\n if (className && parent.classList && !parent.classList.contains(className)) {\r\n parentTag = null;\r\n }\r\n\r\n /**\r\n * If we have found required tag with class then go out from the cycle\r\n */\r\n if (parentTag) {\r\n break;\r\n }\r\n }\r\n\r\n /**\r\n * Target tag was not found. Go up to the parent and check it\r\n */\r\n parent = parent.parentNode as HTMLElement;\r\n searchDepthIterable--;\r\n }\r\n });\r\n\r\n /**\r\n * Return found tag or null\r\n */\r\n return parentTag;\r\n }\r\n\r\n /**\r\n * Expands selection range to the passed parent node\r\n *\r\n * @param {HTMLElement} element\r\n */\r\n public expandToTag(element: HTMLElement): void {\r\n const selection = window.getSelection();\r\n\r\n selection.removeAllRanges();\r\n const range = document.createRange();\r\n\r\n range.selectNodeContents(element);\r\n selection.addRange(range);\r\n }\r\n}\r\n","!function(t,e){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define([],e):\"object\"==typeof exports?exports.Paragraph=e():t.Paragraph=e()}(window,function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(t,\"__esModule\",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&\"object\"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,\"default\",{enumerable:!0,value:t}),2&e&&\"string\"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,\"a\",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p=\"/\",n(n.s=0)}([function(t,e,n){\"use strict\";var r=function(){function t(t,e){for(var n=0;n=0&&u.splice(e,1)}function h(t){var e=document.createElement(\"style\");return void 0===t.attrs.type&&(t.attrs.type=\"text/css\"),v(e,t.attrs),p(t,e),e}function v(t,e){Object.keys(e).forEach(function(n){t.setAttribute(n,e[n])})}function b(t,e){var n,r,o,i;if(e.transform&&t.css){if(!(i=e.transform(t.css)))return function(){};t.css=i}if(e.singleton){var u=s++;n=a||(a=h(e)),r=m.bind(null,n,u,!1),o=m.bind(null,n,u,!0)}else t.sourceMap&&\"function\"==typeof URL&&\"function\"==typeof URL.createObjectURL&&\"function\"==typeof URL.revokeObjectURL&&\"function\"==typeof Blob&&\"function\"==typeof btoa?(n=function(t){var e=document.createElement(\"link\");return void 0===t.attrs.type&&(t.attrs.type=\"text/css\"),t.attrs.rel=\"stylesheet\",v(e,t.attrs),p(t,e),e}(e),r=function(t,e,n){var r=n.css,o=n.sourceMap,i=void 0===e.convertToAbsoluteUrls&&o;(e.convertToAbsoluteUrls||i)&&(r=f(r));o&&(r+=\"\\n/*# sourceMappingURL=data:application/json;base64,\"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+\" */\");var a=new Blob([r],{type:\"text/css\"}),s=t.href;t.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,n,e),o=function(){d(n),n.href&&URL.revokeObjectURL(n.href)}):(n=h(e),r=function(t,e){var n=e.css,r=e.media;r&&t.setAttribute(\"media\",r);if(t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}.bind(null,n),o=function(){d(n)});return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else o()}}t.exports=function(t,e){if(\"undefined\"!=typeof DEBUG&&DEBUG&&\"object\"!=typeof document)throw new Error(\"The style-loader cannot be used in a non-browser environment\");(e=e||{}).attrs=\"object\"==typeof e.attrs?e.attrs:{},e.singleton||\"boolean\"==typeof e.singleton||(e.singleton=o()),e.insertInto||(e.insertInto=\"head\"),e.insertAt||(e.insertAt=\"bottom\");var n=l(t,e);return c(n,e),function(t){for(var o=[],i=0;i any;\r\n}\r\n\r\n/**\r\n * Codex Editor Util\r\n */\r\nexport default class Util {\r\n /**\r\n * Custom logger\r\n *\r\n * @param {string} msg - message\r\n * @param {string} type - logging type 'log'|'warn'|'error'|'info'\r\n * @param {*} args - argument to log with a message\r\n */\r\n public static log(msg: string, type: string = 'log', args?: any): void {\r\n\r\n if (!args) {\r\n if (['time', 'timeEnd'].includes(type)) {\r\n msg = `[codex-editor]: ${msg}`;\r\n } else {\r\n args = msg || 'undefined';\r\n msg = '[codex-editor]: %o';\r\n }\r\n } else {\r\n msg = '[codex-editor]: ' + msg;\r\n }\r\n\r\n try {\r\n if ( 'console' in window && window.console[ type ] ) {\r\n if ( args ) { window.console[ type ]( msg, args ); } else { window.console[ type ]( msg ); }\r\n }\r\n } catch (e) {\r\n // do nothing\r\n }\r\n }\r\n\r\n /**\r\n * Returns basic keycodes as constants\r\n * @return {{}}\r\n */\r\n static get keyCodes(): object {\r\n return {\r\n BACKSPACE: 8,\r\n TAB: 9,\r\n ENTER: 13,\r\n SHIFT: 16,\r\n CTRL: 17,\r\n ALT: 18,\r\n ESC: 27,\r\n SPACE: 32,\r\n LEFT: 37,\r\n UP: 38,\r\n DOWN: 40,\r\n RIGHT: 39,\r\n DELETE: 46,\r\n META: 91,\r\n };\r\n }\r\n\r\n /**\r\n * Fires a promise sequence asyncronically\r\n *\r\n * @param {ChainData[]} chains - list or ChainData's\r\n * @param {Function} success - success callback\r\n * @param {Function} fallback - callback that fires in case of errors\r\n *\r\n * @return {Promise}\r\n */\r\n public static async sequence(chains: ChainData[], success = () => {}, fallback = () => {}): Promise {\r\n /**\r\n * Decorator\r\n *\r\n * @param {ChainData} chainData\r\n *\r\n * @param {Function} successCallback\r\n * @param {Function} fallbackCallback\r\n *\r\n * @return {Promise}\r\n */\r\n async function waitNextBlock(\r\n chainData: ChainData,\r\n successCallback: (data: any) => void,\r\n fallbackCallback: (data: any) => void,\r\n ): Promise {\r\n try {\r\n await chainData.function(chainData.data);\r\n await successCallback(typeof chainData.data !== 'undefined' ? chainData.data : {});\r\n } catch (e) {\r\n fallbackCallback(typeof chainData.data !== 'undefined' ? chainData.data : {});\r\n }\r\n }\r\n\r\n /**\r\n * pluck each element from queue\r\n * First, send resolved Promise as previous value\r\n * Each plugins \"prepare\" method returns a Promise, that's why\r\n * reduce current element will not be able to continue while can't get\r\n * a resolved Promise\r\n */\r\n return await chains.reduce(async (previousValue, currentValue) => {\r\n await previousValue;\r\n return waitNextBlock(currentValue, success, fallback);\r\n }, Promise.resolve());\r\n }\r\n\r\n /**\r\n * Make array from array-like collection\r\n *\r\n * @param {ArrayLike} collection\r\n *\r\n * @return {Array}\r\n */\r\n public static array(collection: ArrayLike): any[] {\r\n return Array.prototype.slice.call(collection);\r\n }\r\n\r\n /**\r\n * Check if passed variable is a function\r\n * @param {*} fn\r\n * @return {boolean}\r\n */\r\n public static isFunction(fn: any): boolean {\r\n return typeof fn === 'function';\r\n }\r\n\r\n /**\r\n * Check if passed function is a class\r\n * @param {function} fn\r\n * @return {boolean}\r\n */\r\n public static isClass(fn: any): boolean {\r\n return typeof fn === 'function' && /^\\s*class\\s+/.test(fn.toString());\r\n }\r\n\r\n /**\r\n * Checks if object is empty\r\n *\r\n * @param {Object} object\r\n * @return {boolean}\r\n */\r\n public static isEmpty(object: object): boolean {\r\n return Object.keys(object).length === 0 && object.constructor === Object;\r\n }\r\n\r\n /**\r\n * Check if passed object is a Promise\r\n * @param {*} object - object to check\r\n * @return {Boolean}\r\n */\r\n public static isPromise(object: any): boolean {\r\n return Promise.resolve(object) === object;\r\n }\r\n\r\n /**\r\n * Check if passed element is contenteditable\r\n * @param {HTMLElement} element\r\n * @return {boolean}\r\n */\r\n public static isContentEditable(element: HTMLElement): boolean {\r\n return element.contentEditable === 'true';\r\n }\r\n\r\n /**\r\n * Delays method execution\r\n *\r\n * @param {Function} method\r\n * @param {Number} timeout\r\n */\r\n public static delay(method: (...args: any[]) => any, timeout: number) {\r\n return function() {\r\n const context = this,\r\n args = arguments;\r\n\r\n window.setTimeout(() => method.apply(context, args), timeout);\r\n };\r\n }\r\n\r\n /**\r\n * Get file extension\r\n *\r\n * @param {File} file\r\n * @return string\r\n */\r\n public static getFileExtension(file: File): string {\r\n return file.name.split('.').pop();\r\n }\r\n\r\n /**\r\n * Check if string is MIME type\r\n *\r\n * @param {string} type\r\n * @return boolean\r\n */\r\n public static isValidMimeType(type: string): boolean {\r\n return /^[-\\w]+\\/([-+\\w]+|\\*)$/.test(type);\r\n }\r\n\r\n /**\r\n * Debouncing method\r\n * Call method after passed time\r\n *\r\n * Note that this method returns Function and declared variable need to be called\r\n *\r\n * @param {Function} func - function that we're throttling\r\n * @param {Number} wait - time in milliseconds\r\n * @param {Boolean} immediate - call now\r\n * @return {Function}\r\n */\r\n public static debounce(func: () => void, wait: number , immediate: boolean): () => void {\r\n let timeout;\r\n\r\n return () => {\r\n const context = this,\r\n args = arguments;\r\n\r\n const later = () => {\r\n timeout = null;\r\n if (!immediate) {\r\n func.apply(context, args);\r\n }\r\n };\r\n\r\n const callNow = immediate && !timeout;\r\n\r\n window.clearTimeout(timeout);\r\n timeout = window.setTimeout(later, wait);\r\n if (callNow) {\r\n func.apply(context, args);\r\n }\r\n };\r\n }\r\n\r\n /**\r\n * Copies passed text to the clipboard\r\n * @param text\r\n */\r\n public static copyTextToClipboard(text) {\r\n const el = Dom.make('div', 'codex-editor-clipboard', {\r\n innerHTML: text,\r\n });\r\n\r\n document.body.appendChild(el);\r\n\r\n const selection = window.getSelection();\r\n const range = document.createRange();\r\n range.selectNode(el);\r\n\r\n window.getSelection().removeAllRanges();\r\n selection.addRange(range);\r\n\r\n document.execCommand('copy');\r\n document.body.removeChild(el);\r\n }\r\n}\r\n","exports = module.exports = require(\"../../node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \":root {\\r\\n /**\\r\\n * Selection color\\r\\n */\\r\\n --selectionColor: #a8d6ff;\\r\\n\\r\\n /**\\r\\n * Toolbar buttons\\r\\n */\\r\\n --bg-light: #eff2f5;\\r\\n\\r\\n /**\\r\\n * All gray texts: placeholders, settings\\r\\n */\\r\\n --grayText: #707684;\\r\\n\\r\\n /**\\r\\n * Blue icons\\r\\n */\\r\\n --color-active-icon: #388AE5;\\r\\n\\r\\n /**\\r\\n * Gray border, loaders\\r\\n */\\r\\n --color-gray-border: rgba(201, 201, 204, 0.48);\\r\\n\\r\\n /**\\r\\n * Block content width\\r\\n */\\r\\n --content-width: 650px;\\r\\n\\r\\n /**\\r\\n * Toolbar buttons height and width\\r\\n */\\r\\n --toolbar-buttons-size: 34px;\\r\\n\\r\\n /**\\r\\n * Toolbar Plus Button and Toolbox buttons height and width\\r\\n */\\r\\n --toolbox-buttons-size: 24px;\\r\\n\\r\\n /**\\r\\n * Confirm deletion bg\\r\\n */\\r\\n --color-confirm: #E24A4A;\\r\\n}\\r\\n/**\\n* Editor wrapper\\n*/\\r\\n.codex-editor {\\n position: relative;\\n -webkit-box-sizing: border-box;\\n box-sizing: border-box;\\n}\\r\\n.codex-editor .hide {\\n display: none;\\n }\\r\\n.codex-editor__redactor {\\n padding-bottom: 300px;\\n }\\r\\n.codex-editor-copyable {\\n position: absolute;\\n height: 1px;\\n width: 1px;\\n top: -400%;\\n opacity: 0.001;\\n }\\r\\n.codex-editor-overlay {\\n position: fixed;\\n top: 0px;\\n left: 0px;\\n right: 0px;\\n bottom: 0px;\\n z-index: 999;\\n pointer-events: none;\\n overflow: hidden;\\n }\\r\\n.codex-editor-overlay__container {\\n position: relative;\\n pointer-events: auto;\\n z-index: 0;\\n }\\r\\n.codex-editor-overlay__rectangle {\\n position: absolute;\\n pointer-events: none;\\n background-color: rgba(46, 170, 220, 0.2);\\n border: 1px solid transparent;\\n }\\r\\n.codex-editor-overlay__scroll-zone--top {\\n top: 0;\\n width: 100%;\\n height: 10%;\\n position: absolute;\\n pointer-events: auto;\\n }\\r\\n.codex-editor-overlay__scroll-zone--bottom {\\n bottom: 0;\\n width: 100%;\\n height: 10%;\\n position: absolute;\\n pointer-events: auto;\\n }\\r\\n.codex-editor svg {\\n fill: currentColor;\\n vertical-align: middle;\\n max-height: 100%;\\n }\\r\\n/**\\n * Set color for native selection\\n */\\r\\n::-moz-selection{\\n background-color: #a8d6ff;\\n background-color: var(--selectionColor);\\n}\\r\\n::selection{\\n background-color: #a8d6ff;\\n background-color: var(--selectionColor);\\n}\\r\\n/**\\n * Add placeholder to content editable elements with data attribute\\n * data-placeholder=\\\"Hello world!\\\"\\n */\\r\\n[contentEditable=true][data-placeholder]:empty::before{\\n content: attr(data-placeholder);\\n color: #707684;\\n color: var(--grayText);\\n font-weight: normal;\\n}\\r\\n[contentEditable=true][data-placeholder]:empty:focus::before {\\n opacity: 0.3;\\n}\\r\\n.ce-toolbar {\\r\\n position: absolute;\\r\\n left: 0;\\r\\n right: 0;\\r\\n top: 0;\\r\\n /*opacity: 0;*/\\r\\n /*visibility: hidden;*/\\r\\n -webkit-transition: opacity 100ms ease;\\r\\n transition: opacity 100ms ease;\\r\\n will-change: opacity, transform;\\r\\n display: none;\\r\\n}\\r\\n.ce-toolbar--opened {\\r\\n display: block;\\r\\n /*opacity: 1;*/\\r\\n /*visibility: visible;*/\\r\\n }\\r\\n.ce-toolbar__content {\\r\\n max-width: 650px;\\r\\n max-width: var(--content-width);\\r\\n margin: 0 auto;\\r\\n position: relative;\\r\\n }\\r\\n.ce-toolbar__plus {\\r\\n color: #707684;\\r\\n color: var(--grayText);\\r\\n cursor: pointer;\\r\\n width: 24px;\\r\\n width: var(--toolbox-buttons-size);\\r\\n height: 24px;\\r\\n height: var(--toolbox-buttons-size);\\r\\n display: -webkit-inline-box;\\r\\n display: -ms-inline-flexbox;\\r\\n display: inline-flex;\\r\\n -webkit-box-pack: center;\\r\\n -ms-flex-pack: center;\\r\\n justify-content: center;\\r\\n -webkit-box-align: center;\\r\\n -ms-flex-align: center;\\r\\n align-items: center\\r\\n }\\r\\n.ce-toolbar__plus:not(:last-of-type){\\r\\n margin-right: 10px;\\r\\n }\\r\\n.ce-toolbar__plus {\\r\\n\\r\\n position: absolute;\\r\\n left: calc(calc(24px + 10px) * -1);\\r\\n left: calc(calc(var(--toolbox-buttons-size) + 10px) * -1);\\r\\n }\\r\\n.ce-toolbar__plus:hover,\\r\\n .ce-toolbar__plus--active {\\r\\n color: #388AE5;\\r\\n color: var(--color-active-icon);\\r\\n }\\r\\n.ce-toolbar__plus--active{\\r\\n -webkit-animation: bounceIn 0.75s 1;\\r\\n animation: bounceIn 0.75s 1;\\r\\n -webkit-animation-fill-mode: forwards;\\r\\n animation-fill-mode: forwards;\\r\\n }\\r\\n.ce-toolbar__plus--hidden {\\r\\n display: none;\\r\\n }\\r\\n.ce-toolbar__plus,\\r\\n .ce-toolbar .ce-toolbox {\\r\\n top: 50%;\\r\\n -webkit-transform: translateY(-50%);\\r\\n transform: translateY(-50%);\\r\\n }\\r\\n/**\\r\\n * Block actions Zone\\r\\n * -------------------------\\r\\n */\\r\\n.ce-toolbar__actions {\\r\\n position: absolute;\\r\\n right: 0;\\r\\n top: 10px;\\r\\n padding-right: 16px;\\r\\n }\\r\\n.ce-toolbar__actions-buttons {\\r\\n text-align: right;\\r\\n }\\r\\n.ce-toolbar__settings-btn {\\r\\n display: inline-block;\\r\\n width: 24px;\\r\\n height: 24px;\\r\\n color: #707684;\\r\\n color: var(--grayText);\\r\\n cursor: pointer;\\r\\n }\\r\\n.ce-toolbox {\\r\\n position: absolute;\\r\\n visibility: hidden;\\r\\n -webkit-transition: opacity 100ms ease;\\r\\n transition: opacity 100ms ease;\\r\\n will-change: opacity;\\r\\n display: -webkit-box;\\r\\n display: -ms-flexbox;\\r\\n display: flex;\\r\\n -webkit-box-orient: horizontal;\\r\\n -webkit-box-direction: normal;\\r\\n -ms-flex-direction: row;\\r\\n flex-direction: row;\\r\\n}\\r\\n.ce-toolbox--opened {\\r\\n opacity: 1;\\r\\n visibility: visible;\\r\\n }\\r\\n.ce-toolbox__button {\\r\\n color: #707684;\\r\\n color: var(--grayText);\\r\\n cursor: pointer;\\r\\n width: 24px;\\r\\n width: var(--toolbox-buttons-size);\\r\\n height: 24px;\\r\\n height: var(--toolbox-buttons-size);\\r\\n display: -webkit-inline-box;\\r\\n display: -ms-inline-flexbox;\\r\\n display: inline-flex;\\r\\n -webkit-box-pack: center;\\r\\n -ms-flex-pack: center;\\r\\n justify-content: center;\\r\\n -webkit-box-align: center;\\r\\n -ms-flex-align: center;\\r\\n align-items: center;\\r\\n }\\r\\n.ce-toolbox__button:not(:last-of-type){\\r\\n margin-right: 10px;\\r\\n }\\r\\n.ce-toolbox__button:hover,\\r\\n .ce-toolbox__button--active {\\r\\n color: #388AE5;\\r\\n color: var(--color-active-icon);\\r\\n }\\r\\n.ce-toolbox__button--active{\\r\\n -webkit-animation: bounceIn 0.75s 1;\\r\\n animation: bounceIn 0.75s 1;\\r\\n -webkit-animation-fill-mode: forwards;\\r\\n animation-fill-mode: forwards;\\r\\n }\\r\\n.ce-inline-toolbar {\\r\\n position: absolute;\\r\\n background-color: #FFFFFF;\\r\\n -webkit-box-shadow: 0 8px 23px -6px rgba(21,40,54,0.31), 22px -14px 34px -18px rgba(33,48,73,0.26);\\r\\n box-shadow: 0 8px 23px -6px rgba(21,40,54,0.31), 22px -14px 34px -18px rgba(33,48,73,0.26);\\r\\n border-radius: 4px;\\r\\n z-index: 2\\r\\n}\\r\\n.ce-inline-toolbar::before {\\r\\n content: '';\\r\\n width: 15px;\\r\\n height: 15px;\\r\\n position: absolute;\\r\\n top: -7px;\\r\\n left: 50%;\\r\\n margin-left: -7px;\\r\\n -webkit-transform: rotate(-45deg);\\r\\n transform: rotate(-45deg);\\r\\n background-color: #fff;\\r\\n z-index: -1;\\r\\n }\\r\\n.ce-inline-toolbar {\\r\\n padding: 6px;\\r\\n -webkit-transform: translateX(-50%);\\r\\n transform: translateX(-50%);\\r\\n display: none;\\r\\n -webkit-box-shadow: 0 6px 12px -6px rgba(131, 147, 173, 0.46),\\r\\n 5px -12px 34px -13px rgba(97, 105, 134, 0.6),\\r\\n 0 26px 52px 3px rgba(147, 165, 186, 0.24);\\r\\n box-shadow: 0 6px 12px -6px rgba(131, 147, 173, 0.46),\\r\\n 5px -12px 34px -13px rgba(97, 105, 134, 0.6),\\r\\n 0 26px 52px 3px rgba(147, 165, 186, 0.24);\\r\\n}\\r\\n.ce-inline-toolbar--showed {\\r\\n display: block;\\r\\n }\\r\\n.ce-inline-toolbar [hidden] {\\r\\n display: none !important;\\r\\n }\\r\\n.ce-inline-tool {\\r\\n display: -webkit-inline-box;\\r\\n display: -ms-inline-flexbox;\\r\\n display: inline-flex;\\r\\n width: 34px;\\r\\n height: 34px;\\r\\n line-height: 34px;\\r\\n text-align: center;\\r\\n border-radius: 3px;\\r\\n cursor: pointer;\\r\\n border: 0;\\r\\n outline: none;\\r\\n background-color: transparent;\\r\\n vertical-align: bottom;\\r\\n color: #707684;\\r\\n color: var(--grayText)\\r\\n}\\r\\n.ce-inline-tool:not(:last-of-type){\\r\\n margin-right: 5px;\\r\\n }\\r\\n.ce-inline-tool:hover {\\r\\n background-color: #eff2f5;\\r\\n background-color: var(--bg-light);\\r\\n }\\r\\n.ce-inline-tool {\\r\\n line-height: normal;\\r\\n}\\r\\n.ce-inline-tool > svg,\\r\\n .ce-inline-tool .icon {\\r\\n margin: auto;\\r\\n }\\r\\n.ce-inline-tool--active {\\r\\n color: #388AE5;\\r\\n color: var(--color-active-icon);\\r\\n }\\r\\n.ce-inline-tool--last {\\r\\n margin-right: 0 !important;\\r\\n }\\r\\n.ce-inline-tool--link .icon {\\r\\n margin-top: -2px;\\r\\n }\\r\\n.ce-inline-tool--link .icon--unlink {\\r\\n display: none;\\r\\n }\\r\\n.ce-inline-tool--unlink .icon--link {\\r\\n display: none;\\r\\n }\\r\\n.ce-inline-tool--unlink .icon--unlink {\\r\\n display: inline-block;\\r\\n }\\r\\n.ce-inline-tool-input {\\r\\n background-color: #eff2f5;\\r\\n background-color: var(--bg-light);\\r\\n outline: none;\\r\\n border: 0;\\r\\n border-radius: 3px;\\r\\n margin: 6px 0 0;\\r\\n font-size: 13px;\\r\\n padding: 8px;\\r\\n width: 100%;\\r\\n -webkit-box-sizing: border-box;\\r\\n box-sizing: border-box;\\r\\n display: none\\r\\n }\\r\\n.ce-inline-tool-input::-webkit-input-placeholder {\\r\\n color: #707684;\\r\\n color: var(--grayText);\\r\\n }\\r\\n.ce-inline-tool-input::-ms-input-placeholder {\\r\\n color: #707684;\\r\\n color: var(--grayText);\\r\\n }\\r\\n.ce-inline-tool-input::placeholder {\\r\\n color: #707684;\\r\\n color: var(--grayText);\\r\\n }\\r\\n.ce-inline-tool-input--showed {\\r\\n display: block;\\r\\n }\\r\\n.ce-settings {\\r\\n position: absolute;\\r\\n background-color: #FFFFFF;\\r\\n -webkit-box-shadow: 0 8px 23px -6px rgba(21,40,54,0.31), 22px -14px 34px -18px rgba(33,48,73,0.26);\\r\\n box-shadow: 0 8px 23px -6px rgba(21,40,54,0.31), 22px -14px 34px -18px rgba(33,48,73,0.26);\\r\\n border-radius: 4px;\\r\\n z-index: 2\\r\\n}\\r\\n.ce-settings::before {\\r\\n content: '';\\r\\n width: 15px;\\r\\n height: 15px;\\r\\n position: absolute;\\r\\n top: -7px;\\r\\n left: 50%;\\r\\n margin-left: -7px;\\r\\n -webkit-transform: rotate(-45deg);\\r\\n transform: rotate(-45deg);\\r\\n background-color: #fff;\\r\\n z-index: -1;\\r\\n }\\r\\n.ce-settings {\\r\\n right: 5px;\\r\\n top: 35px;\\r\\n min-width: 124px\\r\\n}\\r\\n.ce-settings::before{\\r\\n left: auto;\\r\\n right: 12px;\\r\\n }\\r\\n.ce-settings {\\r\\n\\r\\n display: none;\\r\\n}\\r\\n.ce-settings--opened {\\r\\n display: block;\\r\\n -webkit-animation-duration: 0.5s;\\r\\n animation-duration: 0.5s;\\r\\n -webkit-animation-name: bounceIn;\\r\\n animation-name: bounceIn;\\r\\n }\\r\\n.ce-settings__plugin-zone:not(:empty){\\r\\n padding: 6px 6px 0;\\r\\n }\\r\\n.ce-settings__default-zone:not(:empty){\\r\\n padding: 6px;\\r\\n }\\r\\n.ce-settings__button {\\r\\n display: -webkit-inline-box;\\r\\n display: -ms-inline-flexbox;\\r\\n display: inline-flex;\\r\\n width: 34px;\\r\\n height: 34px;\\r\\n line-height: 34px;\\r\\n text-align: center;\\r\\n border-radius: 3px;\\r\\n cursor: pointer;\\r\\n border: 0;\\r\\n outline: none;\\r\\n background-color: transparent;\\r\\n vertical-align: bottom;\\r\\n color: #707684;\\r\\n color: var(--grayText)\\r\\n }\\r\\n.ce-settings__button:not(:last-of-type){\\r\\n margin-right: 5px;\\r\\n }\\r\\n.ce-settings__button:hover {\\r\\n background-color: #eff2f5;\\r\\n background-color: var(--bg-light);\\r\\n }\\r\\n.ce-settings__button {\\r\\n line-height: 32px;\\r\\n }\\r\\n.ce-settings__button > svg,\\r\\n .ce-settings__button .icon {\\r\\n margin: auto;\\r\\n }\\r\\n.ce-settings__button--active {\\r\\n color: #388AE5;\\r\\n color: var(--color-active-icon);\\r\\n }\\r\\n.ce-settings__button--disabled {\\r\\n cursor: not-allowed !important;\\r\\n opacity: .3;\\r\\n }\\r\\n.ce-settings__button--selected {\\r\\n color: #388AE5;\\r\\n color: var(--color-active-icon);\\r\\n }\\r\\n.ce-settings__button--delete {\\r\\n -webkit-transition: background-color 300ms ease;\\r\\n transition: background-color 300ms ease;\\r\\n will-change: background-color;\\r\\n }\\r\\n.ce-settings__button--delete .icon {\\r\\n -webkit-transition: -webkit-transform 200ms ease-out;\\r\\n transition: -webkit-transform 200ms ease-out;\\r\\n transition: transform 200ms ease-out;\\r\\n transition: transform 200ms ease-out, -webkit-transform 200ms ease-out;\\r\\n will-change: transform;\\r\\n }\\r\\n.ce-settings__button--confirm {\\r\\n background-color: #E24A4A;\\r\\n background-color: var(--color-confirm);\\r\\n color: #fff\\r\\n }\\r\\n.ce-settings__button--confirm:hover {\\r\\n background-color: rgb(213, 74, 74) !important;\\r\\n background-color: rgb(213, 74, 74) !important;\\r\\n }\\r\\n.ce-settings__button--confirm .icon {\\r\\n -webkit-transform: rotate(90deg);\\r\\n transform: rotate(90deg);\\r\\n }\\r\\n.ce-block:first-of-type {\\r\\n margin-top: 0;\\r\\n }\\r\\n.ce-block--focused {\\r\\n background-image: linear-gradient(17deg, rgba(243, 248, 255, 0.03) 63.45%, rgba(207, 214, 229, 0.27) 98%);\\r\\n border-radius: 3px;\\r\\n }\\r\\n.ce-block--selected .ce-block__content {\\r\\n background: #a8d6ff;\\r\\n background: var(--selectionColor);\\r\\n -webkit-box-shadow: 0 31px 23px -22px rgba(175, 220, 255, 1);\\r\\n box-shadow: 0 31px 23px -22px rgba(175, 220, 255, 1);\\r\\n -webkit-animation: selectionBounce 0.2s 1;\\r\\n animation: selectionBounce 0.2s 1;\\r\\n -webkit-animation-fill-mode: forwards;\\r\\n animation-fill-mode: forwards;\\r\\n }\\r\\n.ce-block--selected .ce-block__content img {\\r\\n opacity: 0.55;\\r\\n }\\r\\n.ce-block--stretched .ce-block__content {\\r\\n max-width: none;\\r\\n }\\r\\n.ce-block__content {\\r\\n position: relative;\\r\\n max-width: 650px;\\r\\n max-width: var(--content-width);\\r\\n margin: 0 auto;\\r\\n }\\r\\n.ce-block--drop-target .ce-block__content:before {\\r\\n content: '';\\r\\n position: absolute;\\r\\n top: 100%;\\r\\n left: -20px;\\r\\n margin-top: -1px;\\r\\n height: 8px;\\r\\n width: 8px;\\r\\n border: solid #388AE5;\\r\\n border: solid var(--color-active-icon);\\r\\n border-width: 1px 1px 0 0;\\r\\n -webkit-transform-origin: right;\\r\\n transform-origin: right;\\r\\n -webkit-transform: rotate(45deg);\\r\\n transform: rotate(45deg);\\r\\n }\\r\\n.ce-block--drop-target .ce-block__content:after {\\r\\n content: '';\\r\\n position: absolute;\\r\\n top: 100%;\\r\\n height: 1px;\\r\\n width: 100%;\\r\\n color: #388AE5;\\r\\n color: var(--color-active-icon);\\r\\n background: repeating-linear-gradient(\\r\\n 90deg,\\r\\n #388AE5,\\r\\n #388AE5 1px,\\r\\n #fff 1px,\\r\\n #fff 6px\\r\\n );\\r\\n background: repeating-linear-gradient(\\r\\n 90deg,\\r\\n var(--color-active-icon),\\r\\n var(--color-active-icon) 1px,\\r\\n #fff 1px,\\r\\n #fff 6px\\r\\n );\\r\\n }\\r\\n.wobble {\\r\\n -webkit-animation-name: wobble;\\r\\n animation-name: wobble;\\r\\n -webkit-animation-duration: 400ms;\\r\\n animation-duration: 400ms;\\r\\n}\\r\\n/**\\r\\n * @author Nick Pettit - https://github.com/nickpettit/glide\\r\\n */\\r\\n@-webkit-keyframes wobble {\\r\\n from {\\r\\n -webkit-transform: translate3d(0, 0, 0);\\r\\n transform: translate3d(0, 0, 0);\\r\\n }\\r\\n\\r\\n 15% {\\r\\n -webkit-transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -5deg);\\r\\n transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -5deg);\\r\\n }\\r\\n\\r\\n 30% {\\r\\n -webkit-transform: translate3d(2%, 0, 0) rotate3d(0, 0, 1, 3deg);\\r\\n transform: translate3d(2%, 0, 0) rotate3d(0, 0, 1, 3deg);\\r\\n }\\r\\n\\r\\n 45% {\\r\\n -webkit-transform: translate3d(-3%, 0, 0) rotate3d(0, 0, 1, -3deg);\\r\\n transform: translate3d(-3%, 0, 0) rotate3d(0, 0, 1, -3deg);\\r\\n }\\r\\n\\r\\n 60% {\\r\\n -webkit-transform: translate3d(2%, 0, 0) rotate3d(0, 0, 1, 2deg);\\r\\n transform: translate3d(2%, 0, 0) rotate3d(0, 0, 1, 2deg);\\r\\n }\\r\\n\\r\\n 75% {\\r\\n -webkit-transform: translate3d(-1%, 0, 0) rotate3d(0, 0, 1, -1deg);\\r\\n transform: translate3d(-1%, 0, 0) rotate3d(0, 0, 1, -1deg);\\r\\n }\\r\\n\\r\\n to {\\r\\n -webkit-transform: translate3d(0, 0, 0);\\r\\n transform: translate3d(0, 0, 0);\\r\\n }\\r\\n}\\r\\n@keyframes wobble {\\r\\n from {\\r\\n -webkit-transform: translate3d(0, 0, 0);\\r\\n transform: translate3d(0, 0, 0);\\r\\n }\\r\\n\\r\\n 15% {\\r\\n -webkit-transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -5deg);\\r\\n transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -5deg);\\r\\n }\\r\\n\\r\\n 30% {\\r\\n -webkit-transform: translate3d(2%, 0, 0) rotate3d(0, 0, 1, 3deg);\\r\\n transform: translate3d(2%, 0, 0) rotate3d(0, 0, 1, 3deg);\\r\\n }\\r\\n\\r\\n 45% {\\r\\n -webkit-transform: translate3d(-3%, 0, 0) rotate3d(0, 0, 1, -3deg);\\r\\n transform: translate3d(-3%, 0, 0) rotate3d(0, 0, 1, -3deg);\\r\\n }\\r\\n\\r\\n 60% {\\r\\n -webkit-transform: translate3d(2%, 0, 0) rotate3d(0, 0, 1, 2deg);\\r\\n transform: translate3d(2%, 0, 0) rotate3d(0, 0, 1, 2deg);\\r\\n }\\r\\n\\r\\n 75% {\\r\\n -webkit-transform: translate3d(-1%, 0, 0) rotate3d(0, 0, 1, -1deg);\\r\\n transform: translate3d(-1%, 0, 0) rotate3d(0, 0, 1, -1deg);\\r\\n }\\r\\n\\r\\n to {\\r\\n -webkit-transform: translate3d(0, 0, 0);\\r\\n transform: translate3d(0, 0, 0);\\r\\n }\\r\\n}\\r\\n@-webkit-keyframes bounceIn {\\r\\n from,\\r\\n 20%,\\r\\n 40%,\\r\\n 60%,\\r\\n 80%,\\r\\n to {\\r\\n -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\\r\\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\\r\\n }\\r\\n\\r\\n 0% {\\r\\n -webkit-transform: scale3d(0.9, 0.9, 0.9);\\r\\n transform: scale3d(0.9, 0.9, 0.9);\\r\\n }\\r\\n\\r\\n 20% {\\r\\n -webkit-transform: scale3d(1.03, 1.03, 1.03);\\r\\n transform: scale3d(1.03, 1.03, 1.03);\\r\\n }\\r\\n\\r\\n 60% {\\r\\n -webkit-transform: scale3d(1, 1, 1);\\r\\n transform: scale3d(1, 1, 1);\\r\\n }\\r\\n}\\r\\n@keyframes bounceIn {\\r\\n from,\\r\\n 20%,\\r\\n 40%,\\r\\n 60%,\\r\\n 80%,\\r\\n to {\\r\\n -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\\r\\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\\r\\n }\\r\\n\\r\\n 0% {\\r\\n -webkit-transform: scale3d(0.9, 0.9, 0.9);\\r\\n transform: scale3d(0.9, 0.9, 0.9);\\r\\n }\\r\\n\\r\\n 20% {\\r\\n -webkit-transform: scale3d(1.03, 1.03, 1.03);\\r\\n transform: scale3d(1.03, 1.03, 1.03);\\r\\n }\\r\\n\\r\\n 60% {\\r\\n -webkit-transform: scale3d(1, 1, 1);\\r\\n transform: scale3d(1, 1, 1);\\r\\n }\\r\\n}\\r\\n@-webkit-keyframes selectionBounce {\\r\\n from,\\r\\n 20%,\\r\\n 40%,\\r\\n 60%,\\r\\n 80%,\\r\\n to {\\r\\n -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\\r\\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\\r\\n }\\r\\n\\r\\n 50% {\\r\\n -webkit-transform: scale3d(1.01, 1.01, 1.01);\\r\\n transform: scale3d(1.01, 1.01, 1.01);\\r\\n }\\r\\n\\r\\n 70% {\\r\\n -webkit-transform: scale3d(1, 1, 1);\\r\\n transform: scale3d(1, 1, 1);\\r\\n }\\r\\n}\\r\\n@keyframes selectionBounce {\\r\\n from,\\r\\n 20%,\\r\\n 40%,\\r\\n 60%,\\r\\n 80%,\\r\\n to {\\r\\n -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\\r\\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\\r\\n }\\r\\n\\r\\n 50% {\\r\\n -webkit-transform: scale3d(1.01, 1.01, 1.01);\\r\\n transform: scale3d(1.01, 1.01, 1.01);\\r\\n }\\r\\n\\r\\n 70% {\\r\\n -webkit-transform: scale3d(1, 1, 1);\\r\\n transform: scale3d(1, 1, 1);\\r\\n }\\r\\n}\\r\\n/**\\r\\n * Block Tool wrapper\\r\\n */\\r\\n.cdx-block {\\r\\n padding: 0.7em 0;\\r\\n}\\r\\n/**\\r\\n * Input\\r\\n */\\r\\n.cdx-input {\\r\\n border: 1px solid rgba(201, 201, 204, 0.48);\\r\\n border: 1px solid var(--color-gray-border);\\r\\n -webkit-box-shadow: inset 0 1px 2px 0 rgba(35, 44, 72, 0.06);\\r\\n box-shadow: inset 0 1px 2px 0 rgba(35, 44, 72, 0.06);\\r\\n border-radius: 3px;\\r\\n padding: 10px 12px;\\r\\n outline: none;\\r\\n width: 100%;\\r\\n -webkit-box-sizing: border-box;\\r\\n box-sizing: border-box;\\r\\n}\\r\\n/**\\r\\n * Settings\\r\\n */\\r\\n.cdx-settings-button {\\r\\n display: -webkit-inline-box;\\r\\n display: -ms-inline-flexbox;\\r\\n display: inline-flex;\\r\\n width: 34px;\\r\\n height: 34px;\\r\\n line-height: 34px;\\r\\n text-align: center;\\r\\n border-radius: 3px;\\r\\n cursor: pointer;\\r\\n border: 0;\\r\\n outline: none;\\r\\n background-color: transparent;\\r\\n vertical-align: bottom;\\r\\n color: #707684;\\r\\n color: var(--grayText)\\r\\n}\\r\\n.cdx-settings-button:not(:last-of-type){\\r\\n margin-right: 5px;\\r\\n }\\r\\n.cdx-settings-button:hover {\\r\\n background-color: #eff2f5;\\r\\n background-color: var(--bg-light);\\r\\n }\\r\\n.cdx-settings-button > svg,\\r\\n .cdx-settings-button .icon {\\r\\n margin: auto;\\r\\n }\\r\\n.cdx-settings-button--active {\\r\\n color: #388AE5;\\r\\n color: var(--color-active-icon);\\r\\n }\\r\\n.cdx-settings-button--active {\\r\\n color: #388AE5;\\r\\n color: var(--color-active-icon);\\r\\n }\\r\\n/**\\r\\n * Loader\\r\\n */\\r\\n.cdx-loader {\\r\\n position: relative;\\r\\n border: 1px solid rgba(201, 201, 204, 0.48);\\r\\n border: 1px solid var(--color-gray-border)\\r\\n}\\r\\n.cdx-loader::before {\\r\\n content: '';\\r\\n position: absolute;\\r\\n left: 50%;\\r\\n top: 50%;\\r\\n width: 18px;\\r\\n height: 18px;\\r\\n margin: -11px 0 0 -11px;\\r\\n border: 2px solid rgba(201, 201, 204, 0.48);\\r\\n border: 2px solid var(--color-gray-border);\\r\\n border-left-color: #388AE5;\\r\\n border-left-color: var(--color-active-icon);\\r\\n border-radius: 50%;\\r\\n -webkit-animation: cdxRotation 1.2s infinite linear;\\r\\n animation: cdxRotation 1.2s infinite linear;\\r\\n }\\r\\n@-webkit-keyframes cdxRotation {\\r\\n 0% {\\r\\n -webkit-transform: rotate(0deg);\\r\\n transform: rotate(0deg);\\r\\n }\\r\\n 100% {\\r\\n -webkit-transform: rotate(360deg);\\r\\n transform: rotate(360deg);\\r\\n }\\r\\n}\\r\\n@keyframes cdxRotation {\\r\\n 0% {\\r\\n -webkit-transform: rotate(0deg);\\r\\n transform: rotate(0deg);\\r\\n }\\r\\n 100% {\\r\\n -webkit-transform: rotate(360deg);\\r\\n transform: rotate(360deg);\\r\\n }\\r\\n}\\r\\n/**\\r\\n * Button\\r\\n */\\r\\n.cdx-button {\\r\\n padding: 13px;\\r\\n border-radius: 3px;\\r\\n border: 1px solid rgba(201, 201, 204, 0.48);\\r\\n border: 1px solid var(--color-gray-border);\\r\\n font-size: 14.9px;\\r\\n background: #fff;\\r\\n -webkit-box-shadow: 0 2px 2px 0 rgba(18,30,57,0.04);\\r\\n box-shadow: 0 2px 2px 0 rgba(18,30,57,0.04);\\r\\n color: #707684;\\r\\n color: var(--grayText);\\r\\n text-align: center;\\r\\n cursor: pointer\\r\\n}\\r\\n.cdx-button:hover {\\r\\n background: #FBFCFE;\\r\\n -webkit-box-shadow: 0 1px 3px 0 rgba(18,30,57,0.08);\\r\\n box-shadow: 0 1px 3px 0 rgba(18,30,57,0.08);\\r\\n }\\r\\n.cdx-button svg {\\r\\n height: 20px;\\r\\n margin-right: 0.2em;\\r\\n margin-top: -2px;\\r\\n }\\r\\n\", \"\"]);\n\n// exports\n"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/codex-editor.js b/dist/codex-editor.js index 331d7277..58aa1be9 100644 --- a/dist/codex-editor.js +++ b/dist/codex-editor.js @@ -1,7 +1,7 @@ /*! * Codex Editor * - * @version 2.9.2 + * @version 2.9.3 * * @licence Apache-2.0 * @author CodeX-Team @@ -9,7 +9,7 @@ * @uses html-janitor * @licence Apache-2.0 (https://github.com/guardian/html-janitor/blob/master/LICENSE) */ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.CodexEditor=e():t.CodexEditor=e()}(window,function(){return function(t){var e={};function n(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(o,r,function(e){return t[e]}.bind(null,r));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=161)}([function(t,e,n){var o=n(9),r=n(16),i=n(22),a=n(19),s=n(31),u=function(t,e,n){var c,l,f,d,h=t&u.F,p=t&u.G,v=t&u.S,g=t&u.P,y=t&u.B,m=p?o:v?o[e]||(o[e]={}):(o[e]||{}).prototype,b=p?r:r[e]||(r[e]={}),k=b.prototype||(b.prototype={});for(c in p&&(n=e),n)f=((l=!h&&m&&void 0!==m[c])?m:n)[c],d=y&&l?s(f,o):g&&"function"==typeof f?s(Function.call,f):f,m&&a(m,c,f,t&u.U),b[c]!=f&&i(b,c,d),g&&k[c]!=f&&(k[c]=f)};o.core=r,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e){function n(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=document.createElement(t);for(var a in Array.isArray(n)?(e=r.classList).add.apply(e,(0,i.default)(n)):n&&r.classList.add(n),o)o.hasOwnProperty(a)&&(r[a]=o[a]);return r}},{key:"text",value:function(t){return document.createTextNode(t)}},{key:"svg",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:14,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:14,o=document.createElementNS("http://www.w3.org/2000/svg","svg");return o.classList.add("icon","icon--"+t),o.setAttribute("width",e+"px"),o.setAttribute("height",n+"px"),o.innerHTML=''),o}},{key:"append",value:function(t,e){Array.isArray(e)?e.forEach(function(e){return t.appendChild(e)}):t.appendChild(e)}},{key:"prepend",value:function(t,e){Array.isArray(e)?(e=e.reverse()).forEach(function(e){return t.prepend(e)}):t.prepend(e)}},{key:"swap",value:function(t,e){var n=document.createElement("div"),o=t.parentNode;o.insertBefore(n,t),o.insertBefore(t,e),o.insertBefore(e,n),o.removeChild(n)}},{key:"find",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,e=arguments.length>1?arguments[1]:void 0;return t.querySelector(e)}},{key:"get",value:function(t){return document.getElementById(t)}},{key:"findAll",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,e=arguments.length>1?arguments[1]:void 0;return t.querySelectorAll(e)}},{key:"getDeepestNode",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=n?"lastChild":"firstChild",r=n?"previousSibling":"nextSibling";if(e&&e.nodeType===Node.ELEMENT_NODE&&e[o]){var i=e[o];if(t.isSingleTag(i)&&!t.isNativeInput(i)&&!t.isLineBreakTag(i))if(i[r])i=i[r];else{if(!i.parentNode[r])return i.parentNode;i=i.parentNode[r]}return this.getDeepestNode(i,n)}return e}},{key:"isElement",value:function(t){return t&&"object"===(0,r.default)(t)&&t.nodeType&&t.nodeType===Node.ELEMENT_NODE}},{key:"isFragment",value:function(t){return t&&"object"===(0,r.default)(t)&&t.nodeType&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE}},{key:"isContentEditable",value:function(t){return"true"===t.contentEditable}},{key:"isNativeInput",value:function(t){return!(!t||!t.tagName)&&["INPUT","TEXTAREA"].includes(t.tagName)}},{key:"canSetCaret",value:function(e){var n=!0;if(t.isNativeInput(e)){var o=e;switch(o.type){case"file":case"checkbox":case"radio":case"hidden":case"submit":case"button":case"image":case"reset":n=!1}}else n=t.isContentEditable(e);return n}},{key:"isNodeEmpty",value:function(t){return!(this.isSingleTag(t)&&!this.isLineBreakTag(t))&&0===(this.isElement(t)&&this.isNativeInput(t)?t.value:t.textContent.replace("​","")).trim().length}},{key:"isLeaf",value:function(t){return!!t&&0===t.childNodes.length}},{key:"isEmpty",value:function(t){var e=this,n=[],o=[];if(!t)return!0;if(!t.childNodes.length)return this.isNodeEmpty(t);for(n.push(t.firstChild);n.length>0;)if(t=n.shift()){for(this.isLeaf(t)?o.push(t):n.push(t.firstChild);t&&t.nextSibling;)(t=t.nextSibling)&&n.push(t);if(t&&!this.isNodeEmpty(t))return!1}return o.every(function(t){return e.isNodeEmpty(t)})}},{key:"isHTMLString",value:function(e){var n=t.make("div");return n.innerHTML=e,n.childElementCount>0}},{key:"getContentLength",value:function(e){return t.isNativeInput(e)?e.value.length:e.nodeType===Node.TEXT_NODE?e.length:e.textContent.length}},{key:"containsOnlyInlineElements",value:function(e){var n;return"string"==typeof e?(n=document.createElement("div")).innerHTML=e:n=e,Array.from(n.children).every(function e(n){return!t.blockElements.includes(n.tagName.toLowerCase())&&Array.from(n.children).every(e)})}},{key:"getDeepestBlockElements",value:function(e){return t.containsOnlyInlineElements(e)?[e]:Array.from(e.children).reduce(function(e,n){return(0,i.default)(e).concat((0,i.default)(t.getDeepestBlockElements(n)))},[])}},{key:"blockElements",get:function(){return["address","article","aside","blockquote","canvas","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","li","main","nav","noscript","ol","output","p","pre","ruby","section","table","tr","tfoot","ul","video"]}}]),t}();o.default=c,c.displayName="Dom",t.exports=e.default})?o.apply(e,r):o)||(t.exports=i)},function(t,e,n){var o=n(11),r=n(100),i=n(38),a=Object.defineProperty;e.f=n(15)?Object.defineProperty:function(t,e,n){if(o(t),e=i(e,!0),o(n),r)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){t.exports=!n(8)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){var n=t.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)},function(t,e,n){var o=n(35),r=Math.min;t.exports=function(t){return t>0?r(o(t),9007199254740991):0}},function(t,e,n){var o,r,i;r=[e,n(29),n(30),n(1),n(2),n(13)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,u){"use strict";var c=n(3);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=c(r),i=c(i),a=c(a),s=c(s),u=c(u);var l=function(){function t(){(0,a.default)(this,t)}var e;return(0,s.default)(t,null,[{key:"log",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"log",n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"color: inherit";if("console"in window&&window.console[e]){var r="Editor.js ".concat("2.9.2"),i="line-height: 1em;\n color: #006FEA;\n display: inline-block;\n font-size: 11px;\n line-height: 1em;\n background-color: #fff;\n padding: 4px 9px;\n border-radius: 30px;\n border: 1px solid rgba(56, 138, 229, 0.16);\n margin: 4px 5px 4px 0;";try{["time","timeEnd"].includes(e)?console[e]("( ".concat(r," ) ").concat(t)):n?console[e]("%c".concat(r,"%c ").concat(t," %o"),i,o,n):console[e]("%c".concat(r,"%c ").concat(t),i,o)}catch(t){}}}},{key:"sequence",value:(e=(0,i.default)(r.default.mark(function t(e){var n,o,a,s,u=arguments;return r.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return s=function(){return(s=(0,i.default)(r.default.mark(function t(e,n,o){return r.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.function(e.data);case 3:return t.next=5,n(void 0!==e.data?e.data:{});case 5:t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),o(void 0!==e.data?e.data:{});case 10:case"end":return t.stop()}},t,this,[[0,7]])}))).apply(this,arguments)},a=function(t,e,n){return s.apply(this,arguments)},n=u.length>1&&void 0!==u[1]?u[1]:function(){},o=u.length>2&&void 0!==u[2]?u[2]:function(){},t.next=6,e.reduce(function(){var t=(0,i.default)(r.default.mark(function t(e,i){return r.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e;case 2:return t.abrupt("return",a(i,n,o));case 3:case"end":return t.stop()}},t,this)}));return function(e,n){return t.apply(this,arguments)}}(),Promise.resolve());case 6:return t.abrupt("return",t.sent);case 7:case"end":return t.stop()}},t,this)})),function(t){return e.apply(this,arguments)})},{key:"array",value:function(t){return Array.prototype.slice.call(t)}},{key:"isFunction",value:function(t){return"function"==typeof t}},{key:"isClass",value:function(t){return"function"==typeof t&&/^\s*class\s+/.test(t.toString())}},{key:"isEmpty",value:function(t){return!t||0===Object.keys(t).length&&t.constructor===Object}},{key:"isPromise",value:function(t){return Promise.resolve(t)===t}},{key:"delay",value:function(t,e){return function(){var n=this,o=arguments;window.setTimeout(function(){return t.apply(n,o)},e)}}},{key:"getFileExtension",value:function(t){return t.name.split(".").pop()}},{key:"isValidMimeType",value:function(t){return/^[-\w]+\/([-+\w]+|\*)$/.test(t)}},{key:"debounce",value:function(t,e,n){var o,r=this,i=arguments;return function(){var a=r,s=i,u=n&&!o;window.clearTimeout(o),o=window.setTimeout(function(){o=null,n||t.apply(a,s)},e),u&&t.apply(a,s)}}},{key:"copyTextToClipboard",value:function(t){var e=u.default.make("div","codex-editor-clipboard",{innerHTML:t});document.body.appendChild(e);var n=window.getSelection(),o=document.createRange();o.selectNode(e),window.getSelection().removeAllRanges(),n.addRange(o),document.execCommand("copy"),document.body.removeChild(e)}},{key:"keyCodes",get:function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,LEFT:37,UP:38,DOWN:40,RIGHT:39,DELETE:46,META:91}}}]),t}();o.default=l,l.displayName="Util",t.exports=e.default})?o.apply(e,r):o)||(t.exports=i)},function(t,e,n){var o=n(9),r=n(22),i=n(21),a=n(41)("src"),s=Function.toString,u=(""+s).split("toString");n(16).inspectSource=function(t){return s.call(t)},(t.exports=function(t,e,n,s){var c="function"==typeof n;c&&(i(n,"name")||r(n,"name",e)),t[e]!==n&&(c&&(i(n,a)||r(n,a,t[e]?""+t[e]:u.join(String(e)))),t===o?t[e]=n:s?t[e]?t[e]=n:r(t,e,n):(delete t[e],r(t,e,n)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[a]||s.call(this)})},function(t,e,n){var o=n(0),r=n(8),i=n(34),a=/"/g,s=function(t,e,n,o){var r=String(i(t)),s="<"+e;return""!==n&&(s+=" "+n+'="'+String(o).replace(a,""")+'"'),s+">"+r+""};t.exports=function(t,e){var n={};n[t]=e(s),o(o.P+o.F*r(function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}),"String",n)}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var o=n(14),r=n(40);t.exports=n(15)?function(t,e,n){return o.f(t,e,r(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var o=n(56),r=n(34);t.exports=function(t){return o(r(t))}},function(t,e,n){var o=n(34);t.exports=function(t){return Object(o(t))}},function(t,e,n){"use strict";var o=n(8);t.exports=function(t,e){return!!t&&o(function(){e?t.call(null,function(){},1):t.call(null)})}},function(t,e,n){var o=n(57),r=n(40),i=n(23),a=n(38),s=n(21),u=n(100),c=Object.getOwnPropertyDescriptor;e.f=n(15)?c:function(t,e){if(t=i(t),e=a(e,!0),u)try{return c(t,e)}catch(t){}if(s(t,e))return r(!o.f.call(t,e),t[e])}},function(t,e,n){var o=n(0),r=n(16),i=n(8);t.exports=function(t,e){var n=(r.Object||{})[t]||Object[t],a={};a[t]=e(n),o(o.S+o.F*i(function(){n(1)}),"Object",a)}},function(t,e,n){var o=n(31),r=n(56),i=n(24),a=n(17),s=n(256);t.exports=function(t,e){var n=1==t,u=2==t,c=3==t,l=4==t,f=6==t,d=5==t||f,h=e||s;return function(e,s,p){for(var v,g,y=i(e),m=r(y),b=o(s,p,3),k=a(m.length),x=0,S=n?h(e,k):u?h(e,0):void 0;k>x;x++)if((d||x in m)&&(g=b(v=m[x],x,y),t))if(n)S[x]=g;else if(g)switch(t){case 3:return!0;case 5:return v;case 6:return x;case 2:S.push(v)}else if(l)return!1;return f?-1:c||l?l:S}}},function(t,e,n){t.exports=n(331)},function(t,e){function n(t,e,n,o,r,i,a){try{var s=t[i](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(o,r)}t.exports=function(t){return function(){var e=this,o=arguments;return new Promise(function(r,i){var a=t.apply(e,o);function s(t){n(a,r,i,s,u,"next",t)}function u(t){n(a,r,i,s,u,"throw",t)}s(void 0)})}}},function(t,e,n){var o=n(32);t.exports=function(t,e,n){if(o(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,o){return t.call(e,n,o)};case 3:return function(n,o,r){return t.call(e,n,o,r)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){var n=Math.ceil,o=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?o:n)(t)}},function(t,e,n){"use strict";if(n(15)){var o=n(42),r=n(9),i=n(8),a=n(0),s=n(68),u=n(96),c=n(31),l=n(52),f=n(40),d=n(22),h=n(53),p=n(35),v=n(17),g=n(125),y=n(44),m=n(38),b=n(21),k=n(60),x=n(10),S=n(24),E=n(89),w=n(45),T=n(47),_=n(46).f,B=n(91),C=n(41),O=n(12),I=n(28),N=n(58),L=n(65),M=n(93),A=n(49),P=n(62),R=n(51),j=n(92),F=n(117),D=n(14),U=n(26),H=D.f,z=U.f,W=r.RangeError,G=r.TypeError,V=r.Uint8Array,X=Array.prototype,Y=u.ArrayBuffer,K=u.DataView,Z=I(0),q=I(2),J=I(3),$=I(4),Q=I(5),tt=I(6),et=N(!0),nt=N(!1),ot=M.values,rt=M.keys,it=M.entries,at=X.lastIndexOf,st=X.reduce,ut=X.reduceRight,ct=X.join,lt=X.sort,ft=X.slice,dt=X.toString,ht=X.toLocaleString,pt=O("iterator"),vt=O("toStringTag"),gt=C("typed_constructor"),yt=C("def_constructor"),mt=s.CONSTR,bt=s.TYPED,kt=s.VIEW,xt=I(1,function(t,e){return _t(L(t,t[yt]),e)}),St=i(function(){return 1===new V(new Uint16Array([1]).buffer)[0]}),Et=!!V&&!!V.prototype.set&&i(function(){new V(1).set({})}),wt=function(t,e){var n=p(t);if(n<0||n%e)throw W("Wrong offset!");return n},Tt=function(t){if(x(t)&&bt in t)return t;throw G(t+" is not a typed array!")},_t=function(t,e){if(!(x(t)&> in t))throw G("It is not a typed array constructor!");return new t(e)},Bt=function(t,e){return Ct(L(t,t[yt]),e)},Ct=function(t,e){for(var n=0,o=e.length,r=_t(t,o);o>n;)r[n]=e[n++];return r},Ot=function(t,e,n){H(t,e,{get:function(){return this._d[n]}})},It=function(t){var e,n,o,r,i,a,s=S(t),u=arguments.length,l=u>1?arguments[1]:void 0,f=void 0!==l,d=B(s);if(null!=d&&!E(d)){for(a=d.call(s),o=[],e=0;!(i=a.next()).done;e++)o.push(i.value);s=o}for(f&&u>2&&(l=c(l,arguments[2],2)),e=0,n=v(s.length),r=_t(this,n);n>e;e++)r[e]=f?l(s[e],e):s[e];return r},Nt=function(){for(var t=0,e=arguments.length,n=_t(this,e);e>t;)n[t]=arguments[t++];return n},Lt=!!V&&i(function(){ht.call(new V(1))}),Mt=function(){return ht.apply(Lt?ft.call(Tt(this)):Tt(this),arguments)},At={copyWithin:function(t,e){return F.call(Tt(this),t,e,arguments.length>2?arguments[2]:void 0)},every:function(t){return $(Tt(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return j.apply(Tt(this),arguments)},filter:function(t){return Bt(this,q(Tt(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return Q(Tt(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return tt(Tt(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){Z(Tt(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return nt(Tt(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return et(Tt(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return ct.apply(Tt(this),arguments)},lastIndexOf:function(t){return at.apply(Tt(this),arguments)},map:function(t){return xt(Tt(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return st.apply(Tt(this),arguments)},reduceRight:function(t){return ut.apply(Tt(this),arguments)},reverse:function(){for(var t,e=Tt(this).length,n=Math.floor(e/2),o=0;o1?arguments[1]:void 0)},sort:function(t){return lt.call(Tt(this),t)},subarray:function(t,e){var n=Tt(this),o=n.length,r=y(t,o);return new(L(n,n[yt]))(n.buffer,n.byteOffset+r*n.BYTES_PER_ELEMENT,v((void 0===e?o:y(e,o))-r))}},Pt=function(t,e){return Bt(this,ft.call(Tt(this),t,e))},Rt=function(t){Tt(this);var e=wt(arguments[1],1),n=this.length,o=S(t),r=v(o.length),i=0;if(r+e>n)throw W("Wrong length!");for(;i255?255:255&o),r.v[h](n*e+r.o,o,St)}(this,n,t)},enumerable:!0})};b?(p=n(function(t,n,o,r){l(t,p,c,"_d");var i,a,s,u,f=0,h=0;if(x(n)){if(!(n instanceof Y||"ArrayBuffer"==(u=k(n))||"SharedArrayBuffer"==u))return bt in n?Ct(p,n):It.call(p,n);i=n,h=wt(o,e);var y=n.byteLength;if(void 0===r){if(y%e)throw W("Wrong length!");if((a=y-h)<0)throw W("Wrong length!")}else if((a=v(r)*e)+h>y)throw W("Wrong length!");s=a/e}else s=g(n),i=new Y(a=s*e);for(d(t,"_d",{b:i,o:h,l:a,e:s,v:new K(i)});f2&&void 0!==arguments[2]?arguments[2]:10,o=window.getSelection(),r=null;if(!o||!o.anchorNode||!o.focusNode)return null;var i=[o.anchorNode,o.focusNode];return i.forEach(function(o){for(var i=n;i>0&&o.parentNode&&(o.tagName!==t||(r=o,e&&o.classList&&!o.classList.contains(e)&&(r=null),!r));)o=o.parentNode,i--}),r}},{key:"expandToTag",value:function(t){var e=window.getSelection();e.removeAllRanges();var n=document.createRange();n.selectNodeContents(t),e.addRange(n)}}],[{key:"get",value:function(){return window.getSelection()}},{key:"CSS",get:function(){return{editorWrapper:"codex-editor",editorZone:"codex-editor__redactor"}}},{key:"anchorNode",get:function(){var t=window.getSelection();return t?t.anchorNode:null}},{key:"anchorOffset",get:function(){var t=window.getSelection();return t?t.anchorOffset:null}},{key:"isCollapsed",get:function(){var t=window.getSelection();return t?t.isCollapsed:null}},{key:"isAtEditor",get:function(){var e=t.get(),n=e.anchorNode||e.focusNode;n&&n.nodeType===Node.TEXT_NODE&&(n=n.parentNode);var o=null;return n&&(o=n.closest(".".concat(t.CSS.editorZone))),o&&o.nodeType===Node.ELEMENT_NODE}},{key:"range",get:function(){var t=window.getSelection();return t&&t.rangeCount?t.getRangeAt(0):null}},{key:"rect",get:function(){var t,e=document.selection,n={x:0,y:0,width:0,height:0};if(e&&"Control"!==e.type)return t=(e=e).createRange(),n.x=t.boundingLeft,n.y=t.boundingTop,n.width=t.boundingWidth,n.height=t.boundingHeight,n;if(!window.getSelection)return a.default.log("Method window.getSelection is not supported","warn"),n;if(null===(e=window.getSelection()).rangeCount||isNaN(e.rangeCount))return a.default.log("Method SelectionUtils.rangeCount is not supported","warn"),n;if((t=e.getRangeAt(0).cloneRange()).getBoundingClientRect&&(n=t.getBoundingClientRect()),0===n.x&&0===n.y){var o=document.createElement("span");if(o.getBoundingClientRect){o.appendChild(document.createTextNode("​")),t.insertNode(o),n=o.getBoundingClientRect();var r=o.parentNode;r.removeChild(o),r.normalize()}}return n}},{key:"text",get:function(){return window.getSelection?window.getSelection().toString():""}}]),t}();o.default=u,u.displayName="SelectionUtils",t.exports=e.default})?o.apply(e,r):o)||(t.exports=i)},function(t,e,n){var o=n(10);t.exports=function(t,e){if(!o(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!o(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!o(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!o(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){var o=n(41)("meta"),r=n(10),i=n(21),a=n(14).f,s=0,u=Object.isExtensible||function(){return!0},c=!n(8)(function(){return u(Object.preventExtensions({}))}),l=function(t){a(t,o,{value:{i:"O"+ ++s,w:{}}})},f=t.exports={KEY:o,NEED:!1,fastKey:function(t,e){if(!r(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,o)){if(!u(t))return"F";if(!e)return"E";l(t)}return t[o].i},getWeak:function(t,e){if(!i(t,o)){if(!u(t))return!0;if(!e)return!1;l(t)}return t[o].w},onFreeze:function(t){return c&&f.NEED&&u(t)&&!i(t,o)&&l(t),t}}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){var n=0,o=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+o).toString(36))}},function(t,e){t.exports=!1},function(t,e,n){var o=n(102),r=n(76);t.exports=Object.keys||function(t){return o(t,r)}},function(t,e,n){var o=n(35),r=Math.max,i=Math.min;t.exports=function(t,e){return(t=o(t))<0?r(t+e,0):i(t,e)}},function(t,e,n){var o=n(11),r=n(103),i=n(76),a=n(75)("IE_PROTO"),s=function(){},u=function(){var t,e=n(72)("iframe"),o=i.length;for(e.style.display="none",n(78).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("