Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

15010 rindas
1.4MB

  1. (self["webpackChunk"] = self["webpackChunk"] || []).push([["canvg"],{
  2. /***/ "./node_modules/@amcharts/amcharts4/.internal/canvg/index.js":
  3. /*!*******************************************************************!*\
  4. !*** ./node_modules/@amcharts/amcharts4/.internal/canvg/index.js ***!
  5. \*******************************************************************/
  6. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  7. "use strict";
  8. __webpack_require__.r(__webpack_exports__);
  9. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  10. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
  11. /* harmony export */ "AElement": () => (/* binding */ AElement),
  12. /* harmony export */ "AnimateColorElement": () => (/* binding */ AnimateColorElement),
  13. /* harmony export */ "AnimateElement": () => (/* binding */ AnimateElement),
  14. /* harmony export */ "AnimateTransformElement": () => (/* binding */ AnimateTransformElement),
  15. /* harmony export */ "BoundingBox": () => (/* binding */ BoundingBox),
  16. /* harmony export */ "CB1": () => (/* binding */ CB1),
  17. /* harmony export */ "CB2": () => (/* binding */ CB2),
  18. /* harmony export */ "CB3": () => (/* binding */ CB3),
  19. /* harmony export */ "CB4": () => (/* binding */ CB4),
  20. /* harmony export */ "Canvg": () => (/* binding */ Canvg),
  21. /* harmony export */ "CircleElement": () => (/* binding */ CircleElement),
  22. /* harmony export */ "ClipPathElement": () => (/* binding */ ClipPathElement),
  23. /* harmony export */ "DefsElement": () => (/* binding */ DefsElement),
  24. /* harmony export */ "DescElement": () => (/* binding */ DescElement),
  25. /* harmony export */ "Document": () => (/* binding */ Document),
  26. /* harmony export */ "Element": () => (/* binding */ Element),
  27. /* harmony export */ "EllipseElement": () => (/* binding */ EllipseElement),
  28. /* harmony export */ "FeColorMatrixElement": () => (/* binding */ FeColorMatrixElement),
  29. /* harmony export */ "FeCompositeElement": () => (/* binding */ FeCompositeElement),
  30. /* harmony export */ "FeDropShadowElement": () => (/* binding */ FeDropShadowElement),
  31. /* harmony export */ "FeGaussianBlurElement": () => (/* binding */ FeGaussianBlurElement),
  32. /* harmony export */ "FeMorphologyElement": () => (/* binding */ FeMorphologyElement),
  33. /* harmony export */ "FilterElement": () => (/* binding */ FilterElement),
  34. /* harmony export */ "Font": () => (/* binding */ Font),
  35. /* harmony export */ "FontElement": () => (/* binding */ FontElement),
  36. /* harmony export */ "FontFaceElement": () => (/* binding */ FontFaceElement),
  37. /* harmony export */ "GElement": () => (/* binding */ GElement),
  38. /* harmony export */ "GlyphElement": () => (/* binding */ GlyphElement),
  39. /* harmony export */ "GradientElement": () => (/* binding */ GradientElement),
  40. /* harmony export */ "ImageElement": () => (/* binding */ ImageElement),
  41. /* harmony export */ "LineElement": () => (/* binding */ LineElement),
  42. /* harmony export */ "LinearGradientElement": () => (/* binding */ LinearGradientElement),
  43. /* harmony export */ "MarkerElement": () => (/* binding */ MarkerElement),
  44. /* harmony export */ "MaskElement": () => (/* binding */ MaskElement),
  45. /* harmony export */ "Matrix": () => (/* binding */ Matrix),
  46. /* harmony export */ "MissingGlyphElement": () => (/* binding */ MissingGlyphElement),
  47. /* harmony export */ "Mouse": () => (/* binding */ Mouse),
  48. /* harmony export */ "PSEUDO_ZERO": () => (/* binding */ PSEUDO_ZERO),
  49. /* harmony export */ "Parser": () => (/* binding */ Parser),
  50. /* harmony export */ "PathElement": () => (/* binding */ PathElement),
  51. /* harmony export */ "PathParser": () => (/* binding */ PathParser),
  52. /* harmony export */ "PatternElement": () => (/* binding */ PatternElement),
  53. /* harmony export */ "Point": () => (/* binding */ Point),
  54. /* harmony export */ "PolygonElement": () => (/* binding */ PolygonElement),
  55. /* harmony export */ "PolylineElement": () => (/* binding */ PolylineElement),
  56. /* harmony export */ "Property": () => (/* binding */ Property),
  57. /* harmony export */ "QB1": () => (/* binding */ QB1),
  58. /* harmony export */ "QB2": () => (/* binding */ QB2),
  59. /* harmony export */ "QB3": () => (/* binding */ QB3),
  60. /* harmony export */ "RadialGradientElement": () => (/* binding */ RadialGradientElement),
  61. /* harmony export */ "RectElement": () => (/* binding */ RectElement),
  62. /* harmony export */ "RenderedElement": () => (/* binding */ RenderedElement),
  63. /* harmony export */ "Rotate": () => (/* binding */ Rotate),
  64. /* harmony export */ "SVGElement": () => (/* binding */ SVGElement),
  65. /* harmony export */ "SVGFontLoader": () => (/* binding */ SVGFontLoader),
  66. /* harmony export */ "Scale": () => (/* binding */ Scale),
  67. /* harmony export */ "Screen": () => (/* binding */ Screen),
  68. /* harmony export */ "Skew": () => (/* binding */ Skew),
  69. /* harmony export */ "SkewX": () => (/* binding */ SkewX),
  70. /* harmony export */ "SkewY": () => (/* binding */ SkewY),
  71. /* harmony export */ "StopElement": () => (/* binding */ StopElement),
  72. /* harmony export */ "StyleElement": () => (/* binding */ StyleElement),
  73. /* harmony export */ "SymbolElement": () => (/* binding */ SymbolElement),
  74. /* harmony export */ "TRefElement": () => (/* binding */ TRefElement),
  75. /* harmony export */ "TSpanElement": () => (/* binding */ TSpanElement),
  76. /* harmony export */ "TextElement": () => (/* binding */ TextElement),
  77. /* harmony export */ "TextPathElement": () => (/* binding */ TextPathElement),
  78. /* harmony export */ "TitleElement": () => (/* binding */ TitleElement),
  79. /* harmony export */ "Transform": () => (/* binding */ Transform),
  80. /* harmony export */ "Translate": () => (/* binding */ Translate),
  81. /* harmony export */ "UnknownElement": () => (/* binding */ UnknownElement),
  82. /* harmony export */ "UseElement": () => (/* binding */ UseElement),
  83. /* harmony export */ "ViewPort": () => (/* binding */ ViewPort),
  84. /* harmony export */ "compressSpaces": () => (/* binding */ compressSpaces),
  85. /* harmony export */ "getSelectorSpecificity": () => (/* binding */ getSelectorSpecificity),
  86. /* harmony export */ "normalizeAttributeName": () => (/* binding */ normalizeAttributeName),
  87. /* harmony export */ "normalizeColor": () => (/* binding */ normalizeColor),
  88. /* harmony export */ "parseExternalUrl": () => (/* binding */ parseExternalUrl),
  89. /* harmony export */ "presets": () => (/* binding */ index),
  90. /* harmony export */ "toNumbers": () => (/* binding */ toNumbers),
  91. /* harmony export */ "trimLeft": () => (/* binding */ trimLeft),
  92. /* harmony export */ "trimRight": () => (/* binding */ trimRight),
  93. /* harmony export */ "vectorMagnitude": () => (/* binding */ vectorMagnitude),
  94. /* harmony export */ "vectorsAngle": () => (/* binding */ vectorsAngle),
  95. /* harmony export */ "vectorsRatio": () => (/* binding */ vectorsRatio)
  96. /* harmony export */ });
  97. /* harmony import */ var core_js_modules_es_array_map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.map */ "./node_modules/core-js/modules/es.array.map.js");
  98. /* harmony import */ var core_js_modules_es_array_map__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_map__WEBPACK_IMPORTED_MODULE_0__);
  99. /* harmony import */ var core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.regexp.exec */ "./node_modules/core-js/modules/es.regexp.exec.js");
  100. /* harmony import */ var core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_1__);
  101. /* harmony import */ var core_js_modules_es_string_match__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.string.match */ "./node_modules/core-js/modules/es.string.match.js");
  102. /* harmony import */ var core_js_modules_es_string_match__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_match__WEBPACK_IMPORTED_MODULE_2__);
  103. /* harmony import */ var core_js_modules_es_string_replace__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.string.replace */ "./node_modules/core-js/modules/es.string.replace.js");
  104. /* harmony import */ var core_js_modules_es_string_replace__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_replace__WEBPACK_IMPORTED_MODULE_3__);
  105. /* harmony import */ var core_js_modules_es_string_starts_with__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.string.starts-with */ "./node_modules/core-js/modules/es.string.starts-with.js");
  106. /* harmony import */ var core_js_modules_es_string_starts_with__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_starts_with__WEBPACK_IMPORTED_MODULE_4__);
  107. /* harmony import */ var core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.array.join */ "./node_modules/core-js/modules/es.array.join.js");
  108. /* harmony import */ var core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_5__);
  109. /* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js");
  110. /* harmony import */ var core_js_modules_es_symbol__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.symbol */ "./node_modules/core-js/modules/es.symbol.js");
  111. /* harmony import */ var core_js_modules_es_symbol__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol__WEBPACK_IMPORTED_MODULE_7__);
  112. /* harmony import */ var core_js_modules_es_array_filter__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.array.filter */ "./node_modules/core-js/modules/es.array.filter.js");
  113. /* harmony import */ var core_js_modules_es_array_filter__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_filter__WEBPACK_IMPORTED_MODULE_8__);
  114. /* harmony import */ var core_js_modules_es_array_for_each__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.array.for-each */ "./node_modules/core-js/modules/es.array.for-each.js");
  115. /* harmony import */ var core_js_modules_es_array_for_each__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_for_each__WEBPACK_IMPORTED_MODULE_9__);
  116. /* harmony import */ var core_js_modules_es_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
  117. /* harmony import */ var core_js_modules_es_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_10__);
  118. /* harmony import */ var core_js_modules_es_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors */ "./node_modules/core-js/modules/es.object.get-own-property-descriptors.js");
  119. /* harmony import */ var core_js_modules_es_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_11__);
  120. /* harmony import */ var core_js_modules_es_object_keys__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.object.keys */ "./node_modules/core-js/modules/es.object.keys.js");
  121. /* harmony import */ var core_js_modules_es_object_keys__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_keys__WEBPACK_IMPORTED_MODULE_12__);
  122. /* harmony import */ var core_js_modules_web_dom_collections_for_each__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each */ "./node_modules/core-js/modules/web.dom-collections.for-each.js");
  123. /* harmony import */ var core_js_modules_web_dom_collections_for_each__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each__WEBPACK_IMPORTED_MODULE_13__);
  124. /* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js");
  125. /* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14__);
  126. /* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js");
  127. /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js");
  128. /* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js");
  129. /* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js");
  130. /* harmony import */ var core_js_modules_es_array_concat__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! core-js/modules/es.array.concat */ "./node_modules/core-js/modules/es.array.concat.js");
  131. /* harmony import */ var core_js_modules_es_array_concat__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat__WEBPACK_IMPORTED_MODULE_19__);
  132. /* harmony import */ var core_js_modules_es_array_every__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! core-js/modules/es.array.every */ "./node_modules/core-js/modules/es.array.every.js");
  133. /* harmony import */ var core_js_modules_es_array_every__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_every__WEBPACK_IMPORTED_MODULE_20__);
  134. /* harmony import */ var core_js_modules_es_array_reduce__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! core-js/modules/es.array.reduce */ "./node_modules/core-js/modules/es.array.reduce.js");
  135. /* harmony import */ var core_js_modules_es_array_reduce__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_reduce__WEBPACK_IMPORTED_MODULE_21__);
  136. /* harmony import */ var core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! core-js/modules/es.object.to-string */ "./node_modules/core-js/modules/es.object.to-string.js");
  137. /* harmony import */ var core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_22__);
  138. /* harmony import */ var core_js_modules_es_promise__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! core-js/modules/es.promise */ "./node_modules/core-js/modules/es.promise.js");
  139. /* harmony import */ var core_js_modules_es_promise__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_promise__WEBPACK_IMPORTED_MODULE_23__);
  140. /* harmony import */ var core_js_modules_es_string_split__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! core-js/modules/es.string.split */ "./node_modules/core-js/modules/es.string.split.js");
  141. /* harmony import */ var core_js_modules_es_string_split__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_split__WEBPACK_IMPORTED_MODULE_24__);
  142. /* harmony import */ var raf__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! raf */ "./node_modules/raf/index.js");
  143. /* harmony import */ var raf__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(raf__WEBPACK_IMPORTED_MODULE_25__);
  144. /* harmony import */ var core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! core-js/modules/es.function.name */ "./node_modules/core-js/modules/es.function.name.js");
  145. /* harmony import */ var core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_26__);
  146. /* harmony import */ var rgbcolor__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! rgbcolor */ "./node_modules/rgbcolor/index.js");
  147. /* harmony import */ var rgbcolor__WEBPACK_IMPORTED_MODULE_27___default = /*#__PURE__*/__webpack_require__.n(rgbcolor__WEBPACK_IMPORTED_MODULE_27__);
  148. /* harmony import */ var core_js_modules_es_reflect_construct__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! core-js/modules/es.reflect.construct */ "./node_modules/core-js/modules/es.reflect.construct.js");
  149. /* harmony import */ var core_js_modules_es_reflect_construct__WEBPACK_IMPORTED_MODULE_28___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct__WEBPACK_IMPORTED_MODULE_28__);
  150. /* harmony import */ var core_js_modules_es_regexp_to_string__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! core-js/modules/es.regexp.to-string */ "./node_modules/core-js/modules/es.regexp.to-string.js");
  151. /* harmony import */ var core_js_modules_es_regexp_to_string__WEBPACK_IMPORTED_MODULE_29___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_to_string__WEBPACK_IMPORTED_MODULE_29__);
  152. /* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js");
  153. /* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js");
  154. /* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js");
  155. /* harmony import */ var core_js_modules_es_array_from__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! core-js/modules/es.array.from */ "./node_modules/core-js/modules/es.array.from.js");
  156. /* harmony import */ var core_js_modules_es_array_from__WEBPACK_IMPORTED_MODULE_33___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_from__WEBPACK_IMPORTED_MODULE_33__);
  157. /* harmony import */ var core_js_modules_es_array_includes__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! core-js/modules/es.array.includes */ "./node_modules/core-js/modules/es.array.includes.js");
  158. /* harmony import */ var core_js_modules_es_array_includes__WEBPACK_IMPORTED_MODULE_34___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_includes__WEBPACK_IMPORTED_MODULE_34__);
  159. /* harmony import */ var core_js_modules_es_array_some__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! core-js/modules/es.array.some */ "./node_modules/core-js/modules/es.array.some.js");
  160. /* harmony import */ var core_js_modules_es_array_some__WEBPACK_IMPORTED_MODULE_35___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_some__WEBPACK_IMPORTED_MODULE_35__);
  161. /* harmony import */ var core_js_modules_es_string_includes__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! core-js/modules/es.string.includes */ "./node_modules/core-js/modules/es.string.includes.js");
  162. /* harmony import */ var core_js_modules_es_string_includes__WEBPACK_IMPORTED_MODULE_36___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_includes__WEBPACK_IMPORTED_MODULE_36__);
  163. /* harmony import */ var core_js_modules_es_string_iterator__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! core-js/modules/es.string.iterator */ "./node_modules/core-js/modules/es.string.iterator.js");
  164. /* harmony import */ var core_js_modules_es_string_iterator__WEBPACK_IMPORTED_MODULE_37___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator__WEBPACK_IMPORTED_MODULE_37__);
  165. /* harmony import */ var core_js_modules_es_string_trim__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! core-js/modules/es.string.trim */ "./node_modules/core-js/modules/es.string.trim.js");
  166. /* harmony import */ var core_js_modules_es_string_trim__WEBPACK_IMPORTED_MODULE_38___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_trim__WEBPACK_IMPORTED_MODULE_38__);
  167. /* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js");
  168. /* harmony import */ var core_js_modules_es_array_index_of__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! core-js/modules/es.array.index-of */ "./node_modules/core-js/modules/es.array.index-of.js");
  169. /* harmony import */ var core_js_modules_es_array_index_of__WEBPACK_IMPORTED_MODULE_40___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_index_of__WEBPACK_IMPORTED_MODULE_40__);
  170. /* harmony import */ var core_js_modules_es_array_reverse__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! core-js/modules/es.array.reverse */ "./node_modules/core-js/modules/es.array.reverse.js");
  171. /* harmony import */ var core_js_modules_es_array_reverse__WEBPACK_IMPORTED_MODULE_41___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_reverse__WEBPACK_IMPORTED_MODULE_41__);
  172. /* harmony import */ var _babel_runtime_helpers_get__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! @babel/runtime/helpers/get */ "./node_modules/@babel/runtime/helpers/esm/get.js");
  173. /* harmony import */ var core_js_modules_es_number_constructor__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! core-js/modules/es.number.constructor */ "./node_modules/core-js/modules/es.number.constructor.js");
  174. /* harmony import */ var core_js_modules_es_number_constructor__WEBPACK_IMPORTED_MODULE_43___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_number_constructor__WEBPACK_IMPORTED_MODULE_43__);
  175. /* harmony import */ var core_js_modules_es_array_fill__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! core-js/modules/es.array.fill */ "./node_modules/core-js/modules/es.array.fill.js");
  176. /* harmony import */ var core_js_modules_es_array_fill__WEBPACK_IMPORTED_MODULE_44___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_fill__WEBPACK_IMPORTED_MODULE_44__);
  177. /* harmony import */ var core_js_modules_es_reflect_delete_property__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! core-js/modules/es.reflect.delete-property */ "./node_modules/core-js/modules/es.reflect.delete-property.js");
  178. /* harmony import */ var core_js_modules_es_reflect_delete_property__WEBPACK_IMPORTED_MODULE_45___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_delete_property__WEBPACK_IMPORTED_MODULE_45__);
  179. /* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js");
  180. /* harmony import */ var core_js_modules_es_array_iterator__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! core-js/modules/es.array.iterator */ "./node_modules/core-js/modules/es.array.iterator.js");
  181. /* harmony import */ var core_js_modules_es_array_iterator__WEBPACK_IMPORTED_MODULE_47___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator__WEBPACK_IMPORTED_MODULE_47__);
  182. /* harmony import */ var core_js_modules_web_dom_collections_iterator__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
  183. /* harmony import */ var core_js_modules_web_dom_collections_iterator__WEBPACK_IMPORTED_MODULE_48___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator__WEBPACK_IMPORTED_MODULE_48__);
  184. /* harmony import */ var core_js_modules_es_symbol_description__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! core-js/modules/es.symbol.description */ "./node_modules/core-js/modules/es.symbol.description.js");
  185. /* harmony import */ var core_js_modules_es_symbol_description__WEBPACK_IMPORTED_MODULE_49___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description__WEBPACK_IMPORTED_MODULE_49__);
  186. /* harmony import */ var core_js_modules_es_symbol_iterator__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator */ "./node_modules/core-js/modules/es.symbol.iterator.js");
  187. /* harmony import */ var core_js_modules_es_symbol_iterator__WEBPACK_IMPORTED_MODULE_50___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator__WEBPACK_IMPORTED_MODULE_50__);
  188. /* harmony import */ var core_js_modules_es_array_slice__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! core-js/modules/es.array.slice */ "./node_modules/core-js/modules/es.array.slice.js");
  189. /* harmony import */ var core_js_modules_es_array_slice__WEBPACK_IMPORTED_MODULE_51___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_slice__WEBPACK_IMPORTED_MODULE_51__);
  190. /* harmony import */ var core_js_modules_es_map__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! core-js/modules/es.map */ "./node_modules/core-js/modules/es.map.js");
  191. /* harmony import */ var core_js_modules_es_map__WEBPACK_IMPORTED_MODULE_52___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_map__WEBPACK_IMPORTED_MODULE_52__);
  192. /* harmony import */ var core_js_modules_es_reflect_apply__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! core-js/modules/es.reflect.apply */ "./node_modules/core-js/modules/es.reflect.apply.js");
  193. /* harmony import */ var core_js_modules_es_reflect_apply__WEBPACK_IMPORTED_MODULE_53___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_apply__WEBPACK_IMPORTED_MODULE_53__);
  194. /* harmony import */ var core_js_modules_es_reflect_get_prototype_of__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! core-js/modules/es.reflect.get-prototype-of */ "./node_modules/core-js/modules/es.reflect.get-prototype-of.js");
  195. /* harmony import */ var core_js_modules_es_reflect_get_prototype_of__WEBPACK_IMPORTED_MODULE_54___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_get_prototype_of__WEBPACK_IMPORTED_MODULE_54__);
  196. /* harmony import */ var stackblur_canvas__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! stackblur-canvas */ "./node_modules/stackblur-canvas/dist/stackblur-es.js");
  197. /**
  198. * HTML-safe compress white-spaces.
  199. * @param str - String to compress.
  200. */
  201. function compressSpaces(str) {
  202. return str.replace(/(?!\u3000)\s+/gm, ' ');
  203. }
  204. /**
  205. * HTML-safe left trim.
  206. * @param str - String to trim.
  207. */
  208. function trimLeft(str) {
  209. return str.replace(/^[\n \t]+/, '');
  210. }
  211. /**
  212. * HTML-safe right trim.
  213. * @param str - String to trim.
  214. */
  215. function trimRight(str) {
  216. return str.replace(/[\n \t]+$/, '');
  217. }
  218. /**
  219. * String to numbers array.
  220. * @param str - Numbers string.
  221. */
  222. function toNumbers(str) {
  223. var matches = (str || '').match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\d+)(?=\D|$)/gm) || [];
  224. return matches.map(parseFloat);
  225. } // Microsoft Edge fix
  226. var allUppercase = /^[A-Z-]+$/;
  227. /**
  228. * Normalize attribute name.
  229. * @param name - Attribute name.
  230. */
  231. function normalizeAttributeName(name) {
  232. if (allUppercase.test(name)) {
  233. return name.toLowerCase();
  234. }
  235. return name;
  236. }
  237. /**
  238. * Parse external URL.
  239. * @param url - CSS url string.
  240. */
  241. function parseExternalUrl(url) {
  242. // single quotes [2]
  243. // v double quotes [3]
  244. // v v no quotes [4]
  245. // v v v
  246. var urlMatch = url.match(/url\(('([^']+)'|"([^"]+)"|([^'"\)]+))\)/) || [];
  247. return urlMatch[2] || urlMatch[3] || urlMatch[4];
  248. }
  249. /**
  250. * Transform floats to integers in rgb colors.
  251. * @param color - Color to normalize.
  252. */
  253. function normalizeColor(color) {
  254. if (!color.startsWith('rgb')) {
  255. return color;
  256. }
  257. var rgbParts = 3;
  258. var normalizedColor = color.replace(/\d+(\.\d+)?/g, function (num, isFloat) {
  259. return rgbParts-- && isFloat ? String(Math.round(parseFloat(num))) : num;
  260. });
  261. return normalizedColor;
  262. }
  263. // slightly modified version of https://github.com/keeganstreet/specificity/blob/master/specificity.js
  264. var attributeRegex = /(\[[^\]]+\])/g;
  265. var idRegex = /(#[^\s\+>~\.\[:]+)/g;
  266. var classRegex = /(\.[^\s\+>~\.\[:]+)/g;
  267. var pseudoElementRegex = /(::[^\s\+>~\.\[:]+|:first-line|:first-letter|:before|:after)/gi;
  268. var pseudoClassWithBracketsRegex = /(:[\w-]+\([^\)]*\))/gi;
  269. var pseudoClassRegex = /(:[^\s\+>~\.\[:]+)/g;
  270. var elementRegex = /([^\s\+>~\.\[:]+)/g;
  271. function findSelectorMatch(selector, regex) {
  272. var matches = selector.match(regex);
  273. if (!matches) {
  274. return [selector, 0];
  275. }
  276. return [selector.replace(regex, ' '), matches.length];
  277. }
  278. /**
  279. * Measure selector specificity.
  280. * @param selector - Selector to measure.
  281. */
  282. function getSelectorSpecificity(selector) {
  283. var specificity = [0, 0, 0];
  284. var currentSelector = selector.replace(/:not\(([^\)]*)\)/g, ' $1 ').replace(/{[\s\S]*/gm, ' ');
  285. var delta = 0;
  286. var _findSelectorMatch = findSelectorMatch(currentSelector, attributeRegex);
  287. var _findSelectorMatch2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_findSelectorMatch, 2);
  288. currentSelector = _findSelectorMatch2[0];
  289. delta = _findSelectorMatch2[1];
  290. specificity[1] += delta;
  291. var _findSelectorMatch3 = findSelectorMatch(currentSelector, idRegex);
  292. var _findSelectorMatch4 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_findSelectorMatch3, 2);
  293. currentSelector = _findSelectorMatch4[0];
  294. delta = _findSelectorMatch4[1];
  295. specificity[0] += delta;
  296. var _findSelectorMatch5 = findSelectorMatch(currentSelector, classRegex);
  297. var _findSelectorMatch6 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_findSelectorMatch5, 2);
  298. currentSelector = _findSelectorMatch6[0];
  299. delta = _findSelectorMatch6[1];
  300. specificity[1] += delta;
  301. var _findSelectorMatch7 = findSelectorMatch(currentSelector, pseudoElementRegex);
  302. var _findSelectorMatch8 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_findSelectorMatch7, 2);
  303. currentSelector = _findSelectorMatch8[0];
  304. delta = _findSelectorMatch8[1];
  305. specificity[2] += delta;
  306. var _findSelectorMatch9 = findSelectorMatch(currentSelector, pseudoClassWithBracketsRegex);
  307. var _findSelectorMatch10 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_findSelectorMatch9, 2);
  308. currentSelector = _findSelectorMatch10[0];
  309. delta = _findSelectorMatch10[1];
  310. specificity[1] += delta;
  311. var _findSelectorMatch11 = findSelectorMatch(currentSelector, pseudoClassRegex);
  312. var _findSelectorMatch12 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_findSelectorMatch11, 2);
  313. currentSelector = _findSelectorMatch12[0];
  314. delta = _findSelectorMatch12[1];
  315. specificity[1] += delta;
  316. currentSelector = currentSelector.replace(/[\*\s\+>~]/g, ' ').replace(/[#\.]/g, ' ');
  317. var _findSelectorMatch13 = findSelectorMatch(currentSelector, elementRegex);
  318. var _findSelectorMatch14 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_findSelectorMatch13, 2);
  319. currentSelector = _findSelectorMatch14[0];
  320. delta = _findSelectorMatch14[1];
  321. // lgtm [js/useless-assignment-to-local]
  322. specificity[2] += delta;
  323. return specificity.join('');
  324. }
  325. var PSEUDO_ZERO = .00000001;
  326. /**
  327. * Vector magnitude.
  328. */
  329. function vectorMagnitude(v) {
  330. return Math.sqrt(Math.pow(v[0], 2) + Math.pow(v[1], 2));
  331. }
  332. /**
  333. * Ratio between two vectors.
  334. */
  335. function vectorsRatio(u, v) {
  336. return (u[0] * v[0] + u[1] * v[1]) / (vectorMagnitude(u) * vectorMagnitude(v));
  337. }
  338. /**
  339. * Angle between two vectors.
  340. */
  341. function vectorsAngle(u, v) {
  342. return (u[0] * v[1] < u[1] * v[0] ? -1 : 1) * Math.acos(vectorsRatio(u, v));
  343. }
  344. function CB1(t) {
  345. return t * t * t;
  346. }
  347. function CB2(t) {
  348. return 3 * t * t * (1 - t);
  349. }
  350. function CB3(t) {
  351. return 3 * t * (1 - t) * (1 - t);
  352. }
  353. function CB4(t) {
  354. return (1 - t) * (1 - t) * (1 - t);
  355. }
  356. function QB1(t) {
  357. return t * t;
  358. }
  359. function QB2(t) {
  360. return 2 * t * (1 - t);
  361. }
  362. function QB3(t) {
  363. return (1 - t) * (1 - t);
  364. }
  365. function createCommonjsModule(fn, module) {
  366. return module = { exports: {} }, fn(module, module.exports), module.exports;
  367. }
  368. var runtime_1 = createCommonjsModule(function (module) {
  369. /**
  370. * Copyright (c) 2014-present, Facebook, Inc.
  371. *
  372. * This source code is licensed under the MIT license found in the
  373. * LICENSE file in the root directory of this source tree.
  374. */
  375. var runtime = function (exports) {
  376. var Op = Object.prototype;
  377. var hasOwn = Op.hasOwnProperty;
  378. var undefined$1; // More compressible than void 0.
  379. var $Symbol = typeof Symbol === "function" ? Symbol : {};
  380. var iteratorSymbol = $Symbol.iterator || "@@iterator";
  381. var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
  382. var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
  383. function wrap(innerFn, outerFn, self, tryLocsList) {
  384. // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
  385. var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
  386. var generator = Object.create(protoGenerator.prototype);
  387. var context = new Context(tryLocsList || []); // The ._invoke method unifies the implementations of the .next,
  388. // .throw, and .return methods.
  389. generator._invoke = makeInvokeMethod(innerFn, self, context);
  390. return generator;
  391. }
  392. exports.wrap = wrap; // Try/catch helper to minimize deoptimizations. Returns a completion
  393. // record like context.tryEntries[i].completion. This interface could
  394. // have been (and was previously) designed to take a closure to be
  395. // invoked without arguments, but in all the cases we care about we
  396. // already have an existing method we want to call, so there's no need
  397. // to create a new function object. We can even get away with assuming
  398. // the method takes exactly one argument, since that happens to be true
  399. // in every case, so we don't have to touch the arguments object. The
  400. // only additional allocation required is the completion record, which
  401. // has a stable shape and so hopefully should be cheap to allocate.
  402. function tryCatch(fn, obj, arg) {
  403. try {
  404. return {
  405. type: "normal",
  406. arg: fn.call(obj, arg)
  407. };
  408. } catch (err) {
  409. return {
  410. type: "throw",
  411. arg: err
  412. };
  413. }
  414. }
  415. var GenStateSuspendedStart = "suspendedStart";
  416. var GenStateSuspendedYield = "suspendedYield";
  417. var GenStateExecuting = "executing";
  418. var GenStateCompleted = "completed"; // Returning this object from the innerFn has the same effect as
  419. // breaking out of the dispatch switch statement.
  420. var ContinueSentinel = {}; // Dummy constructor functions that we use as the .constructor and
  421. // .constructor.prototype properties for functions that return Generator
  422. // objects. For full spec compliance, you may wish to configure your
  423. // minifier not to mangle the names of these two functions.
  424. function Generator() {}
  425. function GeneratorFunction() {}
  426. function GeneratorFunctionPrototype() {} // This is a polyfill for %IteratorPrototype% for environments that
  427. // don't natively support it.
  428. var IteratorPrototype = {};
  429. IteratorPrototype[iteratorSymbol] = function () {
  430. return this;
  431. };
  432. var getProto = Object.getPrototypeOf;
  433. var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
  434. if (NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
  435. // This environment has a native %IteratorPrototype%; use it instead
  436. // of the polyfill.
  437. IteratorPrototype = NativeIteratorPrototype;
  438. }
  439. var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
  440. GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
  441. GeneratorFunctionPrototype.constructor = GeneratorFunction;
  442. GeneratorFunctionPrototype[toStringTagSymbol] = GeneratorFunction.displayName = "GeneratorFunction"; // Helper for defining the .next, .throw, and .return methods of the
  443. // Iterator interface in terms of a single ._invoke method.
  444. function defineIteratorMethods(prototype) {
  445. ["next", "throw", "return"].forEach(function (method) {
  446. prototype[method] = function (arg) {
  447. return this._invoke(method, arg);
  448. };
  449. });
  450. }
  451. exports.isGeneratorFunction = function (genFun) {
  452. var ctor = typeof genFun === "function" && genFun.constructor;
  453. return ctor ? ctor === GeneratorFunction || // For the native GeneratorFunction constructor, the best we can
  454. // do is to check its .name property.
  455. (ctor.displayName || ctor.name) === "GeneratorFunction" : false;
  456. };
  457. exports.mark = function (genFun) {
  458. if (Object.setPrototypeOf) {
  459. Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
  460. } else {
  461. genFun.__proto__ = GeneratorFunctionPrototype;
  462. if (!(toStringTagSymbol in genFun)) {
  463. genFun[toStringTagSymbol] = "GeneratorFunction";
  464. }
  465. }
  466. genFun.prototype = Object.create(Gp);
  467. return genFun;
  468. }; // Within the body of any async function, `await x` is transformed to
  469. // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
  470. // `hasOwn.call(value, "__await")` to determine if the yielded value is
  471. // meant to be awaited.
  472. exports.awrap = function (arg) {
  473. return {
  474. __await: arg
  475. };
  476. };
  477. function AsyncIterator(generator, PromiseImpl) {
  478. function invoke(method, arg, resolve, reject) {
  479. var record = tryCatch(generator[method], generator, arg);
  480. if (record.type === "throw") {
  481. reject(record.arg);
  482. } else {
  483. var result = record.arg;
  484. var value = result.value;
  485. if (value && typeof value === "object" && hasOwn.call(value, "__await")) {
  486. return PromiseImpl.resolve(value.__await).then(function (value) {
  487. invoke("next", value, resolve, reject);
  488. }, function (err) {
  489. invoke("throw", err, resolve, reject);
  490. });
  491. }
  492. return PromiseImpl.resolve(value).then(function (unwrapped) {
  493. // When a yielded Promise is resolved, its final value becomes
  494. // the .value of the Promise<{value,done}> result for the
  495. // current iteration.
  496. result.value = unwrapped;
  497. resolve(result);
  498. }, function (error) {
  499. // If a rejected Promise was yielded, throw the rejection back
  500. // into the async generator function so it can be handled there.
  501. return invoke("throw", error, resolve, reject);
  502. });
  503. }
  504. }
  505. var previousPromise;
  506. function enqueue(method, arg) {
  507. function callInvokeWithMethodAndArg() {
  508. return new PromiseImpl(function (resolve, reject) {
  509. invoke(method, arg, resolve, reject);
  510. });
  511. }
  512. return previousPromise = // If enqueue has been called before, then we want to wait until
  513. // all previous Promises have been resolved before calling invoke,
  514. // so that results are always delivered in the correct order. If
  515. // enqueue has not been called before, then it is important to
  516. // call invoke immediately, without waiting on a callback to fire,
  517. // so that the async generator function has the opportunity to do
  518. // any necessary setup in a predictable way. This predictability
  519. // is why the Promise constructor synchronously invokes its
  520. // executor callback, and why async functions synchronously
  521. // execute code before the first await. Since we implement simple
  522. // async functions in terms of async generators, it is especially
  523. // important to get this right, even though it requires care.
  524. previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, // Avoid propagating failures to Promises returned by later
  525. // invocations of the iterator.
  526. callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
  527. } // Define the unified helper method that is used to implement .next,
  528. // .throw, and .return (see defineIteratorMethods).
  529. this._invoke = enqueue;
  530. }
  531. defineIteratorMethods(AsyncIterator.prototype);
  532. AsyncIterator.prototype[asyncIteratorSymbol] = function () {
  533. return this;
  534. };
  535. exports.AsyncIterator = AsyncIterator; // Note that simple async functions are implemented on top of
  536. // AsyncIterator objects; they just return a Promise for the value of
  537. // the final result produced by the iterator.
  538. exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
  539. if (PromiseImpl === void 0) PromiseImpl = Promise;
  540. var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
  541. return exports.isGeneratorFunction(outerFn) ? iter // If outerFn is a generator, return the full iterator.
  542. : iter.next().then(function (result) {
  543. return result.done ? result.value : iter.next();
  544. });
  545. };
  546. function makeInvokeMethod(innerFn, self, context) {
  547. var state = GenStateSuspendedStart;
  548. return function invoke(method, arg) {
  549. if (state === GenStateExecuting) {
  550. throw new Error("Generator is already running");
  551. }
  552. if (state === GenStateCompleted) {
  553. if (method === "throw") {
  554. throw arg;
  555. } // Be forgiving, per 25.3.3.3.3 of the spec:
  556. // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
  557. return doneResult();
  558. }
  559. context.method = method;
  560. context.arg = arg;
  561. while (true) {
  562. var delegate = context.delegate;
  563. if (delegate) {
  564. var delegateResult = maybeInvokeDelegate(delegate, context);
  565. if (delegateResult) {
  566. if (delegateResult === ContinueSentinel) continue;
  567. return delegateResult;
  568. }
  569. }
  570. if (context.method === "next") {
  571. // Setting context._sent for legacy support of Babel's
  572. // function.sent implementation.
  573. context.sent = context._sent = context.arg;
  574. } else if (context.method === "throw") {
  575. if (state === GenStateSuspendedStart) {
  576. state = GenStateCompleted;
  577. throw context.arg;
  578. }
  579. context.dispatchException(context.arg);
  580. } else if (context.method === "return") {
  581. context.abrupt("return", context.arg);
  582. }
  583. state = GenStateExecuting;
  584. var record = tryCatch(innerFn, self, context);
  585. if (record.type === "normal") {
  586. // If an exception is thrown from innerFn, we leave state ===
  587. // GenStateExecuting and loop back for another invocation.
  588. state = context.done ? GenStateCompleted : GenStateSuspendedYield;
  589. if (record.arg === ContinueSentinel) {
  590. continue;
  591. }
  592. return {
  593. value: record.arg,
  594. done: context.done
  595. };
  596. } else if (record.type === "throw") {
  597. state = GenStateCompleted; // Dispatch the exception by looping back around to the
  598. // context.dispatchException(context.arg) call above.
  599. context.method = "throw";
  600. context.arg = record.arg;
  601. }
  602. }
  603. };
  604. } // Call delegate.iterator[context.method](context.arg) and handle the
  605. // result, either by returning a { value, done } result from the
  606. // delegate iterator, or by modifying context.method and context.arg,
  607. // setting context.delegate to null, and returning the ContinueSentinel.
  608. function maybeInvokeDelegate(delegate, context) {
  609. var method = delegate.iterator[context.method];
  610. if (method === undefined$1) {
  611. // A .throw or .return when the delegate iterator has no .throw
  612. // method always terminates the yield* loop.
  613. context.delegate = null;
  614. if (context.method === "throw") {
  615. // Note: ["return"] must be used for ES3 parsing compatibility.
  616. if (delegate.iterator["return"]) {
  617. // If the delegate iterator has a return method, give it a
  618. // chance to clean up.
  619. context.method = "return";
  620. context.arg = undefined$1;
  621. maybeInvokeDelegate(delegate, context);
  622. if (context.method === "throw") {
  623. // If maybeInvokeDelegate(context) changed context.method from
  624. // "return" to "throw", let that override the TypeError below.
  625. return ContinueSentinel;
  626. }
  627. }
  628. context.method = "throw";
  629. context.arg = new TypeError("The iterator does not provide a 'throw' method");
  630. }
  631. return ContinueSentinel;
  632. }
  633. var record = tryCatch(method, delegate.iterator, context.arg);
  634. if (record.type === "throw") {
  635. context.method = "throw";
  636. context.arg = record.arg;
  637. context.delegate = null;
  638. return ContinueSentinel;
  639. }
  640. var info = record.arg;
  641. if (!info) {
  642. context.method = "throw";
  643. context.arg = new TypeError("iterator result is not an object");
  644. context.delegate = null;
  645. return ContinueSentinel;
  646. }
  647. if (info.done) {
  648. // Assign the result of the finished delegate to the temporary
  649. // variable specified by delegate.resultName (see delegateYield).
  650. context[delegate.resultName] = info.value; // Resume execution at the desired location (see delegateYield).
  651. context.next = delegate.nextLoc; // If context.method was "throw" but the delegate handled the
  652. // exception, let the outer generator proceed normally. If
  653. // context.method was "next", forget context.arg since it has been
  654. // "consumed" by the delegate iterator. If context.method was
  655. // "return", allow the original .return call to continue in the
  656. // outer generator.
  657. if (context.method !== "return") {
  658. context.method = "next";
  659. context.arg = undefined$1;
  660. }
  661. } else {
  662. // Re-yield the result returned by the delegate method.
  663. return info;
  664. } // The delegate iterator is finished, so forget it and continue with
  665. // the outer generator.
  666. context.delegate = null;
  667. return ContinueSentinel;
  668. } // Define Generator.prototype.{next,throw,return} in terms of the
  669. // unified ._invoke helper method.
  670. defineIteratorMethods(Gp);
  671. Gp[toStringTagSymbol] = "Generator"; // A Generator should always return itself as the iterator object when the
  672. // @@iterator function is called on it. Some browsers' implementations of the
  673. // iterator prototype chain incorrectly implement this, causing the Generator
  674. // object to not be returned from this call. This ensures that doesn't happen.
  675. // See https://github.com/facebook/regenerator/issues/274 for more details.
  676. Gp[iteratorSymbol] = function () {
  677. return this;
  678. };
  679. Gp.toString = function () {
  680. return "[object Generator]";
  681. };
  682. function pushTryEntry(locs) {
  683. var entry = {
  684. tryLoc: locs[0]
  685. };
  686. if (1 in locs) {
  687. entry.catchLoc = locs[1];
  688. }
  689. if (2 in locs) {
  690. entry.finallyLoc = locs[2];
  691. entry.afterLoc = locs[3];
  692. }
  693. this.tryEntries.push(entry);
  694. }
  695. function resetTryEntry(entry) {
  696. var record = entry.completion || {};
  697. record.type = "normal";
  698. delete record.arg;
  699. entry.completion = record;
  700. }
  701. function Context(tryLocsList) {
  702. // The root entry object (effectively a try statement without a catch
  703. // or a finally block) gives us a place to store values thrown from
  704. // locations where there is no enclosing try statement.
  705. this.tryEntries = [{
  706. tryLoc: "root"
  707. }];
  708. tryLocsList.forEach(pushTryEntry, this);
  709. this.reset(true);
  710. }
  711. exports.keys = function (object) {
  712. var keys = [];
  713. for (var key in object) {
  714. keys.push(key);
  715. }
  716. keys.reverse(); // Rather than returning an object with a next method, we keep
  717. // things simple and return the next function itself.
  718. return function next() {
  719. while (keys.length) {
  720. var key = keys.pop();
  721. if (key in object) {
  722. next.value = key;
  723. next.done = false;
  724. return next;
  725. }
  726. } // To avoid creating an additional object, we just hang the .value
  727. // and .done properties off the next function object itself. This
  728. // also ensures that the minifier will not anonymize the function.
  729. next.done = true;
  730. return next;
  731. };
  732. };
  733. function values(iterable) {
  734. if (iterable) {
  735. var iteratorMethod = iterable[iteratorSymbol];
  736. if (iteratorMethod) {
  737. return iteratorMethod.call(iterable);
  738. }
  739. if (typeof iterable.next === "function") {
  740. return iterable;
  741. }
  742. if (!isNaN(iterable.length)) {
  743. var i = -1,
  744. next = function next() {
  745. while (++i < iterable.length) {
  746. if (hasOwn.call(iterable, i)) {
  747. next.value = iterable[i];
  748. next.done = false;
  749. return next;
  750. }
  751. }
  752. next.value = undefined$1;
  753. next.done = true;
  754. return next;
  755. };
  756. return next.next = next;
  757. }
  758. } // Return an iterator with no values.
  759. return {
  760. next: doneResult
  761. };
  762. }
  763. exports.values = values;
  764. function doneResult() {
  765. return {
  766. value: undefined$1,
  767. done: true
  768. };
  769. }
  770. Context.prototype = {
  771. constructor: Context,
  772. reset: function (skipTempReset) {
  773. this.prev = 0;
  774. this.next = 0; // Resetting context._sent for legacy support of Babel's
  775. // function.sent implementation.
  776. this.sent = this._sent = undefined$1;
  777. this.done = false;
  778. this.delegate = null;
  779. this.method = "next";
  780. this.arg = undefined$1;
  781. this.tryEntries.forEach(resetTryEntry);
  782. if (!skipTempReset) {
  783. for (var name in this) {
  784. // Not sure about the optimal order of these conditions:
  785. if (name.charAt(0) === "t" && hasOwn.call(this, name) && !isNaN(+name.slice(1))) {
  786. this[name] = undefined$1;
  787. }
  788. }
  789. }
  790. },
  791. stop: function () {
  792. this.done = true;
  793. var rootEntry = this.tryEntries[0];
  794. var rootRecord = rootEntry.completion;
  795. if (rootRecord.type === "throw") {
  796. throw rootRecord.arg;
  797. }
  798. return this.rval;
  799. },
  800. dispatchException: function (exception) {
  801. if (this.done) {
  802. throw exception;
  803. }
  804. var context = this;
  805. function handle(loc, caught) {
  806. record.type = "throw";
  807. record.arg = exception;
  808. context.next = loc;
  809. if (caught) {
  810. // If the dispatched exception was caught by a catch block,
  811. // then let that catch block handle the exception normally.
  812. context.method = "next";
  813. context.arg = undefined$1;
  814. }
  815. return !!caught;
  816. }
  817. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  818. var entry = this.tryEntries[i];
  819. var record = entry.completion;
  820. if (entry.tryLoc === "root") {
  821. // Exception thrown outside of any try block that could handle
  822. // it, so set the completion value of the entire function to
  823. // throw the exception.
  824. return handle("end");
  825. }
  826. if (entry.tryLoc <= this.prev) {
  827. var hasCatch = hasOwn.call(entry, "catchLoc");
  828. var hasFinally = hasOwn.call(entry, "finallyLoc");
  829. if (hasCatch && hasFinally) {
  830. if (this.prev < entry.catchLoc) {
  831. return handle(entry.catchLoc, true);
  832. } else if (this.prev < entry.finallyLoc) {
  833. return handle(entry.finallyLoc);
  834. }
  835. } else if (hasCatch) {
  836. if (this.prev < entry.catchLoc) {
  837. return handle(entry.catchLoc, true);
  838. }
  839. } else if (hasFinally) {
  840. if (this.prev < entry.finallyLoc) {
  841. return handle(entry.finallyLoc);
  842. }
  843. } else {
  844. throw new Error("try statement without catch or finally");
  845. }
  846. }
  847. }
  848. },
  849. abrupt: function (type, arg) {
  850. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  851. var entry = this.tryEntries[i];
  852. if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
  853. var finallyEntry = entry;
  854. break;
  855. }
  856. }
  857. if (finallyEntry && (type === "break" || type === "continue") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) {
  858. // Ignore the finally entry if control is not jumping to a
  859. // location outside the try/catch block.
  860. finallyEntry = null;
  861. }
  862. var record = finallyEntry ? finallyEntry.completion : {};
  863. record.type = type;
  864. record.arg = arg;
  865. if (finallyEntry) {
  866. this.method = "next";
  867. this.next = finallyEntry.finallyLoc;
  868. return ContinueSentinel;
  869. }
  870. return this.complete(record);
  871. },
  872. complete: function (record, afterLoc) {
  873. if (record.type === "throw") {
  874. throw record.arg;
  875. }
  876. if (record.type === "break" || record.type === "continue") {
  877. this.next = record.arg;
  878. } else if (record.type === "return") {
  879. this.rval = this.arg = record.arg;
  880. this.method = "return";
  881. this.next = "end";
  882. } else if (record.type === "normal" && afterLoc) {
  883. this.next = afterLoc;
  884. }
  885. return ContinueSentinel;
  886. },
  887. finish: function (finallyLoc) {
  888. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  889. var entry = this.tryEntries[i];
  890. if (entry.finallyLoc === finallyLoc) {
  891. this.complete(entry.completion, entry.afterLoc);
  892. resetTryEntry(entry);
  893. return ContinueSentinel;
  894. }
  895. }
  896. },
  897. "catch": function (tryLoc) {
  898. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  899. var entry = this.tryEntries[i];
  900. if (entry.tryLoc === tryLoc) {
  901. var record = entry.completion;
  902. if (record.type === "throw") {
  903. var thrown = record.arg;
  904. resetTryEntry(entry);
  905. }
  906. return thrown;
  907. }
  908. } // The context.catch method must only be called with a location
  909. // argument that corresponds to a known catch block.
  910. throw new Error("illegal catch attempt");
  911. },
  912. delegateYield: function (iterable, resultName, nextLoc) {
  913. this.delegate = {
  914. iterator: values(iterable),
  915. resultName: resultName,
  916. nextLoc: nextLoc
  917. };
  918. if (this.method === "next") {
  919. // Deliberately forget the last sent value so that we don't
  920. // accidentally pass it on to the delegate.
  921. this.arg = undefined$1;
  922. }
  923. return ContinueSentinel;
  924. }
  925. }; // Regardless of whether this script is executing as a CommonJS module
  926. // or not, return the runtime object so that we can declare the variable
  927. // regeneratorRuntime in the outer scope, which allows this module to be
  928. // injected easily by `bin/regenerator --include-runtime script.js`.
  929. return exports;
  930. }( // If this script is executing as a CommonJS module, use module.exports
  931. // as the regeneratorRuntime namespace. Otherwise create a new empty
  932. // object. Either way, the resulting object will be used to initialize
  933. // the regeneratorRuntime variable at the top of this file.
  934. module.exports );
  935. try {
  936. regeneratorRuntime = runtime;
  937. } catch (accidentalStrictMode) {
  938. // This module should not be running in strict mode, so the above
  939. // assignment should always work unless something is misconfigured. Just
  940. // in case runtime.js accidentally runs in strict mode, we can escape
  941. // strict mode using a global Function call. This could conceivably fail
  942. // if a Content Security Policy forbids using Function, but in that case
  943. // the proper solution is to fix the accidental strict mode problem. If
  944. // you've misconfigured your bundler to force strict mode and applied a
  945. // CSP to forbid Function, and you're not willing to fix either of those
  946. // problems, please detail your unique predicament in a GitHub issue.
  947. Function("r", "regeneratorRuntime = r")(runtime);
  948. }
  949. });
  950. var Property = /*#__PURE__*/function () {
  951. function Property(document, name, value) {
  952. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Property);
  953. this.document = document;
  954. this.name = name;
  955. this.value = value;
  956. this.isNormalizedColor = false;
  957. }
  958. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Property, [{
  959. key: "hasValue",
  960. value: function hasValue() {
  961. var value = this.value;
  962. return value !== null && value !== '' && value !== 0 && typeof value !== 'undefined';
  963. }
  964. }, {
  965. key: "isString",
  966. value: function isString(regexp) {
  967. var value = this.value;
  968. var result = typeof value === 'string';
  969. if (!result || !regexp) {
  970. return result;
  971. }
  972. return regexp.test(value);
  973. }
  974. }, {
  975. key: "isUrlDefinition",
  976. value: function isUrlDefinition() {
  977. return this.isString(/^url\(/);
  978. }
  979. }, {
  980. key: "isPixels",
  981. value: function isPixels() {
  982. if (!this.hasValue()) {
  983. return false;
  984. }
  985. var asString = this.getString();
  986. switch (true) {
  987. case /px$/.test(asString):
  988. case /^[0-9]+$/.test(asString):
  989. return true;
  990. default:
  991. return false;
  992. }
  993. }
  994. }, {
  995. key: "setValue",
  996. value: function setValue(value) {
  997. this.value = value;
  998. return this;
  999. }
  1000. }, {
  1001. key: "getValue",
  1002. value: function getValue(def) {
  1003. if (typeof def === 'undefined' || this.hasValue()) {
  1004. return this.value;
  1005. }
  1006. return def;
  1007. }
  1008. }, {
  1009. key: "getNumber",
  1010. value: function getNumber(def) {
  1011. if (!this.hasValue()) {
  1012. if (typeof def === 'undefined') {
  1013. return 0;
  1014. }
  1015. return parseFloat(def);
  1016. }
  1017. var value = this.value;
  1018. var n = parseFloat(value);
  1019. if (this.isString(/%$/)) {
  1020. n = n / 100.0;
  1021. }
  1022. return n;
  1023. }
  1024. }, {
  1025. key: "getString",
  1026. value: function getString(def) {
  1027. if (typeof def === 'undefined' || this.hasValue()) {
  1028. return typeof this.value === 'undefined' ? '' : String(this.value);
  1029. }
  1030. return String(def);
  1031. }
  1032. }, {
  1033. key: "getColor",
  1034. value: function getColor(def) {
  1035. var color = this.getString(def);
  1036. if (this.isNormalizedColor) {
  1037. return color;
  1038. }
  1039. this.isNormalizedColor = true;
  1040. color = normalizeColor(color);
  1041. this.value = color;
  1042. return color;
  1043. }
  1044. }, {
  1045. key: "getDpi",
  1046. value: function getDpi() {
  1047. return 96.0; // TODO: compute?
  1048. }
  1049. }, {
  1050. key: "getRem",
  1051. value: function getRem() {
  1052. return this.document.rootEmSize;
  1053. }
  1054. }, {
  1055. key: "getEm",
  1056. value: function getEm() {
  1057. return this.document.emSize;
  1058. }
  1059. }, {
  1060. key: "getUnits",
  1061. value: function getUnits() {
  1062. return this.getString().replace(/[0-9\.\-]/g, '');
  1063. }
  1064. }, {
  1065. key: "getPixels",
  1066. value: function getPixels(axisOrIsFontSize) {
  1067. var processPercent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  1068. if (!this.hasValue()) {
  1069. return 0;
  1070. }
  1071. var _ref = typeof axisOrIsFontSize === 'boolean' ? [undefined, axisOrIsFontSize] : [axisOrIsFontSize],
  1072. _ref2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_ref, 2),
  1073. axis = _ref2[0],
  1074. isFontSize = _ref2[1];
  1075. var viewPort = this.document.screen.viewPort;
  1076. switch (true) {
  1077. case this.isString(/vmin$/):
  1078. return this.getNumber() / 100.0 * Math.min(viewPort.computeSize('x'), viewPort.computeSize('y'));
  1079. case this.isString(/vmax$/):
  1080. return this.getNumber() / 100.0 * Math.max(viewPort.computeSize('x'), viewPort.computeSize('y'));
  1081. case this.isString(/vw$/):
  1082. return this.getNumber() / 100.0 * viewPort.computeSize('x');
  1083. case this.isString(/vh$/):
  1084. return this.getNumber() / 100.0 * viewPort.computeSize('y');
  1085. case this.isString(/rem$/):
  1086. return this.getNumber() * this.getRem();
  1087. case this.isString(/em$/):
  1088. return this.getNumber() * this.getEm();
  1089. case this.isString(/ex$/):
  1090. return this.getNumber() * this.getEm() / 2.0;
  1091. case this.isString(/px$/):
  1092. return this.getNumber();
  1093. case this.isString(/pt$/):
  1094. return this.getNumber() * this.getDpi() * (1.0 / 72.0);
  1095. case this.isString(/pc$/):
  1096. return this.getNumber() * 15;
  1097. case this.isString(/cm$/):
  1098. return this.getNumber() * this.getDpi() / 2.54;
  1099. case this.isString(/mm$/):
  1100. return this.getNumber() * this.getDpi() / 25.4;
  1101. case this.isString(/in$/):
  1102. return this.getNumber() * this.getDpi();
  1103. case this.isString(/%$/) && isFontSize:
  1104. return this.getNumber() * this.getEm();
  1105. case this.isString(/%$/):
  1106. return this.getNumber() * viewPort.computeSize(axis);
  1107. default:
  1108. {
  1109. var n = this.getNumber();
  1110. if (processPercent && n < 1.0) {
  1111. return n * viewPort.computeSize(axis);
  1112. }
  1113. return n;
  1114. }
  1115. }
  1116. }
  1117. }, {
  1118. key: "getMilliseconds",
  1119. value: function getMilliseconds() {
  1120. if (!this.hasValue()) {
  1121. return 0;
  1122. }
  1123. if (this.isString(/ms$/)) {
  1124. return this.getNumber();
  1125. }
  1126. return this.getNumber() * 1000;
  1127. }
  1128. }, {
  1129. key: "getRadians",
  1130. value: function getRadians() {
  1131. if (!this.hasValue()) {
  1132. return 0;
  1133. }
  1134. switch (true) {
  1135. case this.isString(/deg$/):
  1136. return this.getNumber() * (Math.PI / 180.0);
  1137. case this.isString(/grad$/):
  1138. return this.getNumber() * (Math.PI / 200.0);
  1139. case this.isString(/rad$/):
  1140. return this.getNumber();
  1141. default:
  1142. return this.getNumber() * (Math.PI / 180.0);
  1143. }
  1144. }
  1145. }, {
  1146. key: "getDefinition",
  1147. value: function getDefinition() {
  1148. var asString = this.getString();
  1149. var name = asString.match(/#([^\)'"]+)/);
  1150. if (name) {
  1151. name = name[1];
  1152. }
  1153. if (!name) {
  1154. name = asString;
  1155. }
  1156. return this.document.definitions[name];
  1157. }
  1158. }, {
  1159. key: "getFillStyleDefinition",
  1160. value: function getFillStyleDefinition(element, opacity) {
  1161. var def = this.getDefinition();
  1162. if (!def) {
  1163. return null;
  1164. } // gradient
  1165. if (typeof def.createGradient === 'function') {
  1166. return def.createGradient(this.document.ctx, element, opacity);
  1167. } // pattern
  1168. if (typeof def.createPattern === 'function') {
  1169. if (def.getHrefAttribute().hasValue()) {
  1170. var patternTransform = def.getAttribute('patternTransform');
  1171. def = def.getHrefAttribute().getDefinition();
  1172. if (patternTransform.hasValue()) {
  1173. def.getAttribute('patternTransform', true).setValue(patternTransform.value);
  1174. }
  1175. }
  1176. return def.createPattern(this.document.ctx, element, opacity);
  1177. }
  1178. return null;
  1179. }
  1180. }, {
  1181. key: "getTextBaseline",
  1182. value: function getTextBaseline() {
  1183. if (!this.hasValue()) {
  1184. return null;
  1185. }
  1186. return Property.textBaselineMapping[this.getString()];
  1187. }
  1188. }, {
  1189. key: "addOpacity",
  1190. value: function addOpacity(opacity) {
  1191. var value = this.getColor();
  1192. var len = value.length;
  1193. var commas = 0; // Simulate old RGBColor version, which can't parse rgba.
  1194. for (var i = 0; i < len; i++) {
  1195. if (value[i] === ',') {
  1196. commas++;
  1197. }
  1198. if (commas === 3) {
  1199. break;
  1200. }
  1201. }
  1202. if (opacity.hasValue() && this.isString() && commas !== 3) {
  1203. var color = new (rgbcolor__WEBPACK_IMPORTED_MODULE_27___default())(value);
  1204. if (color.ok) {
  1205. color.alpha = opacity.getNumber();
  1206. value = color.toRGBA();
  1207. }
  1208. }
  1209. return new Property(this.document, this.name, value);
  1210. }
  1211. }], [{
  1212. key: "empty",
  1213. value: function empty(document) {
  1214. return new Property(document, 'EMPTY', '');
  1215. }
  1216. }]);
  1217. return Property;
  1218. }();
  1219. Property.textBaselineMapping = {
  1220. 'baseline': 'alphabetic',
  1221. 'before-edge': 'top',
  1222. 'text-before-edge': 'top',
  1223. 'middle': 'middle',
  1224. 'central': 'middle',
  1225. 'after-edge': 'bottom',
  1226. 'text-after-edge': 'bottom',
  1227. 'ideographic': 'ideographic',
  1228. 'alphabetic': 'alphabetic',
  1229. 'hanging': 'hanging',
  1230. 'mathematical': 'alphabetic'
  1231. };
  1232. var ViewPort = /*#__PURE__*/function () {
  1233. function ViewPort() {
  1234. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, ViewPort);
  1235. this.viewPorts = [];
  1236. }
  1237. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(ViewPort, [{
  1238. key: "clear",
  1239. value: function clear() {
  1240. this.viewPorts = [];
  1241. }
  1242. }, {
  1243. key: "setCurrent",
  1244. value: function setCurrent(width, height) {
  1245. this.viewPorts.push({
  1246. width: width,
  1247. height: height
  1248. });
  1249. }
  1250. }, {
  1251. key: "removeCurrent",
  1252. value: function removeCurrent() {
  1253. this.viewPorts.pop();
  1254. }
  1255. }, {
  1256. key: "getCurrent",
  1257. value: function getCurrent() {
  1258. var viewPorts = this.viewPorts;
  1259. return viewPorts[viewPorts.length - 1];
  1260. }
  1261. }, {
  1262. key: "computeSize",
  1263. value: function computeSize(d) {
  1264. if (typeof d === 'number') {
  1265. return d;
  1266. }
  1267. if (d === 'x') {
  1268. return this.width;
  1269. }
  1270. if (d === 'y') {
  1271. return this.height;
  1272. }
  1273. return Math.sqrt(Math.pow(this.width, 2) + Math.pow(this.height, 2)) / Math.sqrt(2);
  1274. }
  1275. }, {
  1276. key: "width",
  1277. get: function get() {
  1278. return this.getCurrent().width;
  1279. }
  1280. }, {
  1281. key: "height",
  1282. get: function get() {
  1283. return this.getCurrent().height;
  1284. }
  1285. }]);
  1286. return ViewPort;
  1287. }();
  1288. var Point = /*#__PURE__*/function () {
  1289. function Point(x, y) {
  1290. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Point);
  1291. this.x = x;
  1292. this.y = y;
  1293. }
  1294. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Point, [{
  1295. key: "angleTo",
  1296. value: function angleTo(point) {
  1297. return Math.atan2(point.y - this.y, point.x - this.x);
  1298. }
  1299. }, {
  1300. key: "applyTransform",
  1301. value: function applyTransform(transform) {
  1302. var x = this.x,
  1303. y = this.y;
  1304. var xp = x * transform[0] + y * transform[2] + transform[4];
  1305. var yp = x * transform[1] + y * transform[3] + transform[5];
  1306. this.x = xp;
  1307. this.y = yp;
  1308. }
  1309. }], [{
  1310. key: "parse",
  1311. value: function parse(point) {
  1312. var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
  1313. var _toNumbers = toNumbers(point),
  1314. _toNumbers2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_toNumbers, 2),
  1315. _toNumbers2$ = _toNumbers2[0],
  1316. x = _toNumbers2$ === void 0 ? defaultValue : _toNumbers2$,
  1317. _toNumbers2$2 = _toNumbers2[1],
  1318. y = _toNumbers2$2 === void 0 ? defaultValue : _toNumbers2$2;
  1319. return new Point(x, y);
  1320. }
  1321. }, {
  1322. key: "parseScale",
  1323. value: function parseScale(scale) {
  1324. var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
  1325. var _toNumbers3 = toNumbers(scale),
  1326. _toNumbers4 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_toNumbers3, 2),
  1327. _toNumbers4$ = _toNumbers4[0],
  1328. x = _toNumbers4$ === void 0 ? defaultValue : _toNumbers4$,
  1329. _toNumbers4$2 = _toNumbers4[1],
  1330. y = _toNumbers4$2 === void 0 ? x : _toNumbers4$2;
  1331. return new Point(x, y);
  1332. }
  1333. }, {
  1334. key: "parsePath",
  1335. value: function parsePath(path) {
  1336. var points = toNumbers(path);
  1337. var len = points.length;
  1338. var pathPoints = [];
  1339. for (var i = 0; i < len; i += 2) {
  1340. pathPoints.push(new Point(points[i], points[i + 1]));
  1341. }
  1342. return pathPoints;
  1343. }
  1344. }]);
  1345. return Point;
  1346. }();
  1347. var Mouse = /*#__PURE__*/function () {
  1348. function Mouse(screen) {
  1349. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Mouse);
  1350. this.screen = screen;
  1351. this.working = false;
  1352. this.events = [];
  1353. this.eventElements = [];
  1354. this.onClick = this.onClick.bind(this);
  1355. this.onMouseMove = this.onMouseMove.bind(this);
  1356. }
  1357. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Mouse, [{
  1358. key: "isWorking",
  1359. value: function isWorking() {
  1360. return this.working;
  1361. }
  1362. }, {
  1363. key: "start",
  1364. value: function start() {
  1365. if (this.working) {
  1366. return;
  1367. }
  1368. var screen = this.screen,
  1369. onClick = this.onClick,
  1370. onMouseMove = this.onMouseMove;
  1371. var canvas = screen.ctx.canvas;
  1372. canvas.onclick = onClick;
  1373. canvas.onmousemove = onMouseMove;
  1374. this.working = true;
  1375. }
  1376. }, {
  1377. key: "stop",
  1378. value: function stop() {
  1379. if (!this.working) {
  1380. return;
  1381. }
  1382. var canvas = this.screen.ctx.canvas;
  1383. this.working = false;
  1384. canvas.onclick = null;
  1385. canvas.onmousemove = null;
  1386. }
  1387. }, {
  1388. key: "hasEvents",
  1389. value: function hasEvents() {
  1390. return this.working && this.events.length > 0;
  1391. }
  1392. }, {
  1393. key: "runEvents",
  1394. value: function runEvents() {
  1395. if (!this.working) {
  1396. return;
  1397. }
  1398. var document = this.screen,
  1399. events = this.events,
  1400. eventElements = this.eventElements;
  1401. var style = document.ctx.canvas.style;
  1402. if (style) {
  1403. style.cursor = '';
  1404. }
  1405. events.forEach(function (_ref, i) {
  1406. var run = _ref.run;
  1407. var element = eventElements[i];
  1408. while (element) {
  1409. run(element);
  1410. element = element.parent;
  1411. }
  1412. }); // done running, clear
  1413. this.events = [];
  1414. this.eventElements = [];
  1415. }
  1416. }, {
  1417. key: "checkPath",
  1418. value: function checkPath(element, ctx) {
  1419. if (!this.working || !ctx) {
  1420. return;
  1421. }
  1422. var events = this.events,
  1423. eventElements = this.eventElements;
  1424. events.forEach(function (_ref2, i) {
  1425. var x = _ref2.x,
  1426. y = _ref2.y;
  1427. if (!eventElements[i] && ctx.isPointInPath && ctx.isPointInPath(x, y)) {
  1428. eventElements[i] = element;
  1429. }
  1430. });
  1431. }
  1432. }, {
  1433. key: "checkBoundingBox",
  1434. value: function checkBoundingBox(element, boundingBox) {
  1435. if (!this.working || !boundingBox) {
  1436. return;
  1437. }
  1438. var events = this.events,
  1439. eventElements = this.eventElements;
  1440. events.forEach(function (_ref3, i) {
  1441. var x = _ref3.x,
  1442. y = _ref3.y;
  1443. if (!eventElements[i] && boundingBox.isPointInBox(x, y)) {
  1444. eventElements[i] = element;
  1445. }
  1446. });
  1447. }
  1448. }, {
  1449. key: "mapXY",
  1450. value: function mapXY(x, y) {
  1451. var _this$screen = this.screen,
  1452. window = _this$screen.window,
  1453. ctx = _this$screen.ctx;
  1454. var point = new Point(x, y);
  1455. var element = ctx.canvas;
  1456. while (element) {
  1457. point.x -= element.offsetLeft;
  1458. point.y -= element.offsetTop;
  1459. element = element.offsetParent;
  1460. }
  1461. if (window.scrollX) {
  1462. point.x += window.scrollX;
  1463. }
  1464. if (window.scrollY) {
  1465. point.y += window.scrollY;
  1466. }
  1467. return point;
  1468. }
  1469. }, {
  1470. key: "onClick",
  1471. value: function onClick(evt) {
  1472. var _this$mapXY = this.mapXY((evt || event).clientX, (evt || event).clientY),
  1473. x = _this$mapXY.x,
  1474. y = _this$mapXY.y;
  1475. this.events.push({
  1476. type: 'onclick',
  1477. x: x,
  1478. y: y,
  1479. run: function run(event) {
  1480. if (event.onClick) {
  1481. event.onClick();
  1482. }
  1483. }
  1484. });
  1485. }
  1486. }, {
  1487. key: "onMouseMove",
  1488. value: function onMouseMove(evt) {
  1489. var _this$mapXY2 = this.mapXY((evt || event).clientX, (evt || event).clientY),
  1490. x = _this$mapXY2.x,
  1491. y = _this$mapXY2.y;
  1492. this.events.push({
  1493. type: 'onmousemove',
  1494. x: x,
  1495. y: y,
  1496. run: function run(event) {
  1497. if (event.onMouseMove) {
  1498. event.onMouseMove();
  1499. }
  1500. }
  1501. });
  1502. }
  1503. }]);
  1504. return Mouse;
  1505. }();
  1506. var defaultWindow = typeof window !== 'undefined' ? window : null;
  1507. var defaultFetch = typeof fetch !== 'undefined' ? fetch.bind(void 0) // `fetch` depends on context: `someObject.fetch(...)` will throw error.
  1508. : null;
  1509. var Screen = /*#__PURE__*/function () {
  1510. function Screen(ctx) {
  1511. var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
  1512. _ref$fetch = _ref.fetch,
  1513. fetch = _ref$fetch === void 0 ? defaultFetch : _ref$fetch,
  1514. _ref$window = _ref.window,
  1515. window = _ref$window === void 0 ? defaultWindow : _ref$window;
  1516. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Screen);
  1517. this.ctx = ctx;
  1518. this.FRAMERATE = 30;
  1519. this.MAX_VIRTUAL_PIXELS = 30000;
  1520. this.CLIENT_WIDTH = 800;
  1521. this.CLIENT_HEIGHT = 600;
  1522. this.viewPort = new ViewPort();
  1523. this.mouse = new Mouse(this);
  1524. this.animations = [];
  1525. this.waits = [];
  1526. this.frameDuration = 0;
  1527. this.isReadyLock = false;
  1528. this.isFirstRender = true;
  1529. this.intervalId = null;
  1530. this.window = window;
  1531. this.fetch = fetch;
  1532. }
  1533. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Screen, [{
  1534. key: "wait",
  1535. value: function wait(checker) {
  1536. this.waits.push(checker);
  1537. }
  1538. }, {
  1539. key: "ready",
  1540. value: function ready() {
  1541. if (!this.readyPromise) {
  1542. return Promise.resolve();
  1543. }
  1544. return this.readyPromise;
  1545. }
  1546. }, {
  1547. key: "isReady",
  1548. value: function isReady() {
  1549. if (this.isReadyLock) {
  1550. return true;
  1551. }
  1552. var isReadyLock = this.waits.every(function (_) {
  1553. return _();
  1554. });
  1555. if (isReadyLock) {
  1556. this.waits = [];
  1557. if (this.resolveReady) {
  1558. this.resolveReady();
  1559. }
  1560. }
  1561. this.isReadyLock = isReadyLock;
  1562. return isReadyLock;
  1563. }
  1564. }, {
  1565. key: "setDefaults",
  1566. value: function setDefaults(ctx) {
  1567. // initial values and defaults
  1568. ctx.strokeStyle = 'rgba(0,0,0,0)';
  1569. ctx.lineCap = 'butt';
  1570. ctx.lineJoin = 'miter';
  1571. ctx.miterLimit = 4;
  1572. }
  1573. }, {
  1574. key: "setViewBox",
  1575. value: function setViewBox(_ref2) {
  1576. var document = _ref2.document,
  1577. ctx = _ref2.ctx,
  1578. aspectRatio = _ref2.aspectRatio,
  1579. width = _ref2.width,
  1580. desiredWidth = _ref2.desiredWidth,
  1581. height = _ref2.height,
  1582. desiredHeight = _ref2.desiredHeight,
  1583. _ref2$minX = _ref2.minX,
  1584. minX = _ref2$minX === void 0 ? 0 : _ref2$minX,
  1585. _ref2$minY = _ref2.minY,
  1586. minY = _ref2$minY === void 0 ? 0 : _ref2$minY,
  1587. refX = _ref2.refX,
  1588. refY = _ref2.refY,
  1589. _ref2$clip = _ref2.clip,
  1590. clip = _ref2$clip === void 0 ? false : _ref2$clip,
  1591. _ref2$clipX = _ref2.clipX,
  1592. clipX = _ref2$clipX === void 0 ? 0 : _ref2$clipX,
  1593. _ref2$clipY = _ref2.clipY,
  1594. clipY = _ref2$clipY === void 0 ? 0 : _ref2$clipY;
  1595. // aspect ratio - http://www.w3.org/TR/SVG/coords.html#PreserveAspectRatioAttribute
  1596. var cleanAspectRatio = compressSpaces(aspectRatio).replace(/^defer\s/, ''); // ignore defer
  1597. var _cleanAspectRatio$spl = cleanAspectRatio.split(' '),
  1598. _cleanAspectRatio$spl2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_cleanAspectRatio$spl, 2),
  1599. aspectRatioAlign = _cleanAspectRatio$spl2[0],
  1600. aspectRatioMeetOrSlice = _cleanAspectRatio$spl2[1];
  1601. var align = aspectRatioAlign || 'xMidYMid';
  1602. var meetOrSlice = aspectRatioMeetOrSlice || 'meet'; // calculate scale
  1603. var scaleX = width / desiredWidth;
  1604. var scaleY = height / desiredHeight;
  1605. var scaleMin = Math.min(scaleX, scaleY);
  1606. var scaleMax = Math.max(scaleX, scaleY);
  1607. var finalDesiredWidth = desiredWidth;
  1608. var finalDesiredHeight = desiredHeight;
  1609. if (meetOrSlice === 'meet') {
  1610. finalDesiredWidth *= scaleMin;
  1611. finalDesiredHeight *= scaleMin;
  1612. }
  1613. if (meetOrSlice === 'slice') {
  1614. finalDesiredWidth *= scaleMax;
  1615. finalDesiredHeight *= scaleMax;
  1616. }
  1617. var refXProp = new Property(document, 'refX', refX);
  1618. var refYProp = new Property(document, 'refY', refY);
  1619. var hasRefs = refXProp.hasValue() && refYProp.hasValue();
  1620. if (hasRefs) {
  1621. ctx.translate(-scaleMin * refXProp.getPixels('x'), -scaleMin * refYProp.getPixels('y'));
  1622. }
  1623. if (clip) {
  1624. var scaledClipX = scaleMin * clipX;
  1625. var scaledClipY = scaleMin * clipY;
  1626. ctx.beginPath();
  1627. ctx.moveTo(scaledClipX, scaledClipY);
  1628. ctx.lineTo(width, scaledClipY);
  1629. ctx.lineTo(width, height);
  1630. ctx.lineTo(scaledClipX, height);
  1631. ctx.closePath();
  1632. ctx.clip();
  1633. }
  1634. if (!hasRefs) {
  1635. var isMeetMinY = meetOrSlice === 'meet' && scaleMin === scaleY;
  1636. var isSliceMaxY = meetOrSlice === 'slice' && scaleMax === scaleY;
  1637. var isMeetMinX = meetOrSlice === 'meet' && scaleMin === scaleX;
  1638. var isSliceMaxX = meetOrSlice === 'slice' && scaleMax === scaleX;
  1639. if (/^xMid/.test(align) && (isMeetMinY || isSliceMaxY)) {
  1640. ctx.translate(width / 2.0 - finalDesiredWidth / 2.0, 0);
  1641. }
  1642. if (/YMid$/.test(align) && (isMeetMinX || isSliceMaxX)) {
  1643. ctx.translate(0, height / 2.0 - finalDesiredHeight / 2.0);
  1644. }
  1645. if (/^xMax/.test(align) && (isMeetMinY || isSliceMaxY)) {
  1646. ctx.translate(width - finalDesiredWidth, 0);
  1647. }
  1648. if (/YMax$/.test(align) && (isMeetMinX || isSliceMaxX)) {
  1649. ctx.translate(0, height - finalDesiredHeight);
  1650. }
  1651. } // scale
  1652. switch (true) {
  1653. case align === 'none':
  1654. ctx.scale(scaleX, scaleY);
  1655. break;
  1656. case meetOrSlice === 'meet':
  1657. ctx.scale(scaleMin, scaleMin);
  1658. break;
  1659. case meetOrSlice === 'slice':
  1660. ctx.scale(scaleMax, scaleMax);
  1661. break;
  1662. } // translate
  1663. ctx.translate(-minX, -minY);
  1664. }
  1665. }, {
  1666. key: "start",
  1667. value: function start(element) {
  1668. var _this = this;
  1669. var _ref3 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
  1670. _ref3$enableRedraw = _ref3.enableRedraw,
  1671. enableRedraw = _ref3$enableRedraw === void 0 ? false : _ref3$enableRedraw,
  1672. _ref3$ignoreMouse = _ref3.ignoreMouse,
  1673. ignoreMouse = _ref3$ignoreMouse === void 0 ? false : _ref3$ignoreMouse,
  1674. _ref3$ignoreAnimation = _ref3.ignoreAnimation,
  1675. ignoreAnimation = _ref3$ignoreAnimation === void 0 ? false : _ref3$ignoreAnimation,
  1676. _ref3$ignoreDimension = _ref3.ignoreDimensions,
  1677. ignoreDimensions = _ref3$ignoreDimension === void 0 ? false : _ref3$ignoreDimension,
  1678. _ref3$ignoreClear = _ref3.ignoreClear,
  1679. ignoreClear = _ref3$ignoreClear === void 0 ? false : _ref3$ignoreClear,
  1680. forceRedraw = _ref3.forceRedraw,
  1681. scaleWidth = _ref3.scaleWidth,
  1682. scaleHeight = _ref3.scaleHeight,
  1683. offsetX = _ref3.offsetX,
  1684. offsetY = _ref3.offsetY;
  1685. var FRAMERATE = this.FRAMERATE,
  1686. mouse = this.mouse;
  1687. var frameDuration = 1000 / FRAMERATE;
  1688. this.frameDuration = frameDuration;
  1689. this.readyPromise = new Promise(function (resolve) {
  1690. _this.resolveReady = resolve;
  1691. });
  1692. if (this.isReady()) {
  1693. this.render(element, ignoreDimensions, ignoreClear, scaleWidth, scaleHeight, offsetX, offsetY);
  1694. }
  1695. if (!enableRedraw) {
  1696. return;
  1697. }
  1698. var now = Date.now();
  1699. var then = now;
  1700. var delta = 0;
  1701. var tick = function tick() {
  1702. now = Date.now();
  1703. delta = now - then;
  1704. if (delta >= frameDuration) {
  1705. then = now - delta % frameDuration;
  1706. if (_this.shouldUpdate(ignoreAnimation, forceRedraw)) {
  1707. _this.render(element, ignoreDimensions, ignoreClear, scaleWidth, scaleHeight, offsetX, offsetY);
  1708. mouse.runEvents();
  1709. }
  1710. }
  1711. _this.intervalId = raf__WEBPACK_IMPORTED_MODULE_25___default()(tick);
  1712. };
  1713. if (!ignoreMouse) {
  1714. mouse.start();
  1715. }
  1716. this.intervalId = raf__WEBPACK_IMPORTED_MODULE_25___default()(tick);
  1717. }
  1718. }, {
  1719. key: "stop",
  1720. value: function stop() {
  1721. if (this.intervalId) {
  1722. raf__WEBPACK_IMPORTED_MODULE_25___default().cancel(this.intervalId);
  1723. this.intervalId = null;
  1724. }
  1725. this.mouse.stop();
  1726. }
  1727. }, {
  1728. key: "shouldUpdate",
  1729. value: function shouldUpdate(ignoreAnimation, forceRedraw) {
  1730. // need update from animations?
  1731. if (!ignoreAnimation) {
  1732. var frameDuration = this.frameDuration;
  1733. var shouldUpdate = this.animations.reduce(function (shouldUpdate, animation) {
  1734. return animation.update(frameDuration) || shouldUpdate;
  1735. }, false);
  1736. if (shouldUpdate) {
  1737. return true;
  1738. }
  1739. } // need update from redraw?
  1740. if (typeof forceRedraw === 'function' && forceRedraw()) {
  1741. return true;
  1742. }
  1743. if (!this.isReadyLock && this.isReady()) {
  1744. return true;
  1745. } // need update from mouse events?
  1746. if (this.mouse.hasEvents()) {
  1747. return true;
  1748. }
  1749. return false;
  1750. }
  1751. }, {
  1752. key: "render",
  1753. value: function render(element, ignoreDimensions, ignoreClear, scaleWidth, scaleHeight, offsetX, offsetY) {
  1754. var CLIENT_WIDTH = this.CLIENT_WIDTH,
  1755. CLIENT_HEIGHT = this.CLIENT_HEIGHT,
  1756. viewPort = this.viewPort,
  1757. ctx = this.ctx,
  1758. isFirstRender = this.isFirstRender;
  1759. var canvas = ctx.canvas;
  1760. viewPort.clear();
  1761. if (canvas.width && canvas.height) {
  1762. viewPort.setCurrent(canvas.width, canvas.height);
  1763. } else {
  1764. viewPort.setCurrent(CLIENT_WIDTH, CLIENT_HEIGHT);
  1765. }
  1766. var widthStyle = element.getStyle('width');
  1767. var heightStyle = element.getStyle('height');
  1768. if (!ignoreDimensions && (isFirstRender || typeof scaleWidth !== 'number' && typeof scaleHeight !== 'number')) {
  1769. // set canvas size
  1770. if (widthStyle.hasValue()) {
  1771. canvas.width = widthStyle.getPixels('x');
  1772. if (canvas.style) {
  1773. canvas.style.width = "".concat(canvas.width, "px");
  1774. }
  1775. }
  1776. if (heightStyle.hasValue()) {
  1777. canvas.height = heightStyle.getPixels('y');
  1778. if (canvas.style) {
  1779. canvas.style.height = "".concat(canvas.height, "px");
  1780. }
  1781. }
  1782. }
  1783. var cWidth = canvas.clientWidth || canvas.width;
  1784. var cHeight = canvas.clientHeight || canvas.height;
  1785. if (ignoreDimensions && widthStyle.hasValue() && heightStyle.hasValue()) {
  1786. cWidth = widthStyle.getPixels('x');
  1787. cHeight = heightStyle.getPixels('y');
  1788. }
  1789. viewPort.setCurrent(cWidth, cHeight);
  1790. if (typeof offsetX === 'number') {
  1791. element.getAttribute('x', true).setValue(offsetX);
  1792. }
  1793. if (typeof offsetY === 'number') {
  1794. element.getAttribute('y', true).setValue(offsetY);
  1795. }
  1796. if (typeof scaleWidth === 'number' || typeof scaleHeight === 'number') {
  1797. var viewBox = toNumbers(element.getAttribute('viewBox').getString());
  1798. var xRatio = 0;
  1799. var yRatio = 0;
  1800. if (typeof scaleWidth === 'number') {
  1801. var _widthStyle = element.getStyle('width');
  1802. if (_widthStyle.hasValue()) {
  1803. xRatio = _widthStyle.getPixels('x') / scaleWidth;
  1804. } else if (!isNaN(viewBox[2])) {
  1805. xRatio = viewBox[2] / scaleWidth;
  1806. }
  1807. }
  1808. if (typeof scaleHeight === 'number') {
  1809. var _heightStyle = element.getStyle('height');
  1810. if (_heightStyle.hasValue()) {
  1811. yRatio = _heightStyle.getPixels('y') / scaleHeight;
  1812. } else if (!isNaN(viewBox[3])) {
  1813. yRatio = viewBox[3] / scaleHeight;
  1814. }
  1815. }
  1816. if (!xRatio) {
  1817. xRatio = yRatio;
  1818. }
  1819. if (!yRatio) {
  1820. yRatio = xRatio;
  1821. }
  1822. element.getAttribute('width', true).setValue(scaleWidth);
  1823. element.getAttribute('height', true).setValue(scaleHeight);
  1824. var transformStyle = element.getStyle('transform', true, true);
  1825. transformStyle.setValue("".concat(transformStyle.getString(), " scale(").concat(1.0 / xRatio, ", ").concat(1.0 / yRatio, ")"));
  1826. } // clear and render
  1827. if (!ignoreClear) {
  1828. ctx.clearRect(0, 0, cWidth, cHeight);
  1829. }
  1830. element.render(ctx);
  1831. if (isFirstRender) {
  1832. this.isFirstRender = false;
  1833. }
  1834. }
  1835. }]);
  1836. return Screen;
  1837. }();
  1838. Screen.defaultWindow = defaultWindow;
  1839. Screen.defaultFetch = defaultFetch;
  1840. var defaultFetch$1 = Screen.defaultFetch;
  1841. var DefaultDOMParser = typeof DOMParser !== 'undefined' ? DOMParser : null;
  1842. var Parser = /*#__PURE__*/function () {
  1843. function Parser() {
  1844. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  1845. _ref$fetch = _ref.fetch,
  1846. fetch = _ref$fetch === void 0 ? defaultFetch$1 : _ref$fetch,
  1847. _ref$DOMParser = _ref.DOMParser,
  1848. DOMParser = _ref$DOMParser === void 0 ? DefaultDOMParser : _ref$DOMParser;
  1849. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Parser);
  1850. this.fetch = fetch;
  1851. this.DOMParser = DOMParser;
  1852. }
  1853. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Parser, [{
  1854. key: "parse",
  1855. value: function () {
  1856. var _parse = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_15__.default)( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().mark(function _callee(resource) {
  1857. return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().wrap(function _callee$(_context) {
  1858. while (1) {
  1859. switch (_context.prev = _context.next) {
  1860. case 0:
  1861. if (!/^</.test(resource)) {
  1862. _context.next = 2;
  1863. break;
  1864. }
  1865. return _context.abrupt("return", this.parseFromString(resource));
  1866. case 2:
  1867. return _context.abrupt("return", this.load(resource));
  1868. case 3:
  1869. case "end":
  1870. return _context.stop();
  1871. }
  1872. }
  1873. }, _callee, this);
  1874. }));
  1875. function parse(_x) {
  1876. return _parse.apply(this, arguments);
  1877. }
  1878. return parse;
  1879. }()
  1880. }, {
  1881. key: "parseFromString",
  1882. value: function parseFromString(xml) {
  1883. var parser = new this.DOMParser();
  1884. try {
  1885. return this.checkDocument(parser.parseFromString(xml, 'image/svg+xml'));
  1886. } catch (err) {
  1887. return this.checkDocument(parser.parseFromString(xml, 'text/xml'));
  1888. }
  1889. }
  1890. }, {
  1891. key: "checkDocument",
  1892. value: function checkDocument(document) {
  1893. var parserError = document.getElementsByTagName('parsererror')[0];
  1894. if (parserError) {
  1895. throw new Error(parserError.textContent);
  1896. }
  1897. return document;
  1898. }
  1899. }, {
  1900. key: "load",
  1901. value: function () {
  1902. var _load = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_15__.default)( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().mark(function _callee2(url) {
  1903. var response, xml;
  1904. return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().wrap(function _callee2$(_context2) {
  1905. while (1) {
  1906. switch (_context2.prev = _context2.next) {
  1907. case 0:
  1908. _context2.next = 2;
  1909. return this.fetch(url);
  1910. case 2:
  1911. response = _context2.sent;
  1912. _context2.next = 5;
  1913. return response.text();
  1914. case 5:
  1915. xml = _context2.sent;
  1916. return _context2.abrupt("return", this.parseFromString(xml));
  1917. case 7:
  1918. case "end":
  1919. return _context2.stop();
  1920. }
  1921. }
  1922. }, _callee2, this);
  1923. }));
  1924. function load(_x2) {
  1925. return _load.apply(this, arguments);
  1926. }
  1927. return load;
  1928. }()
  1929. }]);
  1930. return Parser;
  1931. }();
  1932. var Translate = /*#__PURE__*/function () {
  1933. function Translate(_, point) {
  1934. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Translate);
  1935. this.type = 'translate';
  1936. this.point = null;
  1937. this.point = Point.parse(point);
  1938. }
  1939. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Translate, [{
  1940. key: "apply",
  1941. value: function apply(ctx) {
  1942. var _this$point = this.point,
  1943. x = _this$point.x,
  1944. y = _this$point.y;
  1945. ctx.translate(x || 0.0, y || 0.0);
  1946. }
  1947. }, {
  1948. key: "unapply",
  1949. value: function unapply(ctx) {
  1950. var _this$point2 = this.point,
  1951. x = _this$point2.x,
  1952. y = _this$point2.y;
  1953. ctx.translate(-1.0 * x || 0.0, -1.0 * y || 0.0);
  1954. }
  1955. }, {
  1956. key: "applyToPoint",
  1957. value: function applyToPoint(point) {
  1958. var _this$point3 = this.point,
  1959. x = _this$point3.x,
  1960. y = _this$point3.y;
  1961. point.applyTransform([1, 0, 0, 1, x || 0.0, y || 0.0]);
  1962. }
  1963. }]);
  1964. return Translate;
  1965. }();
  1966. var Rotate = /*#__PURE__*/function () {
  1967. function Rotate(document, rotate) {
  1968. var transformOrigin = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  1969. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Rotate);
  1970. this.type = 'rotate';
  1971. this.angle = null;
  1972. this.cx = 0;
  1973. this.cy = 0;
  1974. var numbers = toNumbers(rotate);
  1975. this.angle = new Property(document, 'angle', numbers[0]);
  1976. this.cx = (numbers[1] || 0) + (transformOrigin[0] || 0);
  1977. this.cy = (numbers[2] || 0) + (transformOrigin[1] || 0);
  1978. }
  1979. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Rotate, [{
  1980. key: "apply",
  1981. value: function apply(ctx) {
  1982. var cx = this.cx,
  1983. cy = this.cy,
  1984. angle = this.angle;
  1985. ctx.translate(cx, cy);
  1986. ctx.rotate(angle.getRadians());
  1987. ctx.translate(-cx, -cy);
  1988. }
  1989. }, {
  1990. key: "unapply",
  1991. value: function unapply(ctx) {
  1992. var cx = this.cx,
  1993. cy = this.cy,
  1994. angle = this.angle;
  1995. ctx.translate(cx, cy);
  1996. ctx.rotate(-1.0 * angle.getRadians());
  1997. ctx.translate(-cx, -cy);
  1998. }
  1999. }, {
  2000. key: "applyToPoint",
  2001. value: function applyToPoint(point) {
  2002. var cx = this.cx,
  2003. cy = this.cy,
  2004. angle = this.angle;
  2005. var rad = angle.getRadians();
  2006. point.applyTransform([1, 0, 0, 1, cx || 0.0, cy || 0.0 // this.p.y
  2007. ]);
  2008. point.applyTransform([Math.cos(rad), Math.sin(rad), -Math.sin(rad), Math.cos(rad), 0, 0]);
  2009. point.applyTransform([1, 0, 0, 1, -cx || 0.0, -cy || 0.0 // -this.p.y
  2010. ]);
  2011. }
  2012. }]);
  2013. return Rotate;
  2014. }();
  2015. var Scale = /*#__PURE__*/function () {
  2016. function Scale(_, scale) {
  2017. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Scale);
  2018. this.type = 'scale';
  2019. this.scale = null;
  2020. var scaleSize = Point.parseScale(scale); // Workaround for node-canvas
  2021. if (scaleSize.x === 0 || scaleSize.y === 0) {
  2022. scaleSize.x = PSEUDO_ZERO;
  2023. scaleSize.y = PSEUDO_ZERO;
  2024. }
  2025. this.scale = scaleSize;
  2026. }
  2027. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Scale, [{
  2028. key: "apply",
  2029. value: function apply(ctx) {
  2030. var _this$scale = this.scale,
  2031. x = _this$scale.x,
  2032. y = _this$scale.y;
  2033. ctx.scale(x, y || x);
  2034. }
  2035. }, {
  2036. key: "unapply",
  2037. value: function unapply(ctx) {
  2038. var _this$scale2 = this.scale,
  2039. x = _this$scale2.x,
  2040. y = _this$scale2.y;
  2041. ctx.scale(1.0 / x, 1.0 / y || x);
  2042. }
  2043. }, {
  2044. key: "applyToPoint",
  2045. value: function applyToPoint(point) {
  2046. var _this$scale3 = this.scale,
  2047. x = _this$scale3.x,
  2048. y = _this$scale3.y;
  2049. point.applyTransform([x || 0.0, 0, 0, y || 0.0, 0, 0]);
  2050. }
  2051. }]);
  2052. return Scale;
  2053. }();
  2054. var Matrix = /*#__PURE__*/function () {
  2055. function Matrix(_, matrix) {
  2056. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Matrix);
  2057. this.type = 'matrix';
  2058. this.matrix = [];
  2059. this.matrix = toNumbers(matrix);
  2060. }
  2061. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Matrix, [{
  2062. key: "apply",
  2063. value: function apply(ctx) {
  2064. var matrix = this.matrix;
  2065. ctx.transform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);
  2066. }
  2067. }, {
  2068. key: "unapply",
  2069. value: function unapply(ctx) {
  2070. var matrix = this.matrix;
  2071. var a = matrix[0];
  2072. var b = matrix[2];
  2073. var c = matrix[4];
  2074. var d = matrix[1];
  2075. var e = matrix[3];
  2076. var f = matrix[5];
  2077. var g = 0.0;
  2078. var h = 0.0;
  2079. var i = 1.0;
  2080. var det = 1 / (a * (e * i - f * h) - b * (d * i - f * g) + c * (d * h - e * g));
  2081. ctx.transform(det * (e * i - f * h), det * (f * g - d * i), det * (c * h - b * i), det * (a * i - c * g), det * (b * f - c * e), det * (c * d - a * f));
  2082. }
  2083. }, {
  2084. key: "applyToPoint",
  2085. value: function applyToPoint(point) {
  2086. point.applyTransform(this.matrix);
  2087. }
  2088. }]);
  2089. return Matrix;
  2090. }();
  2091. function _createSuper(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
  2092. function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  2093. var Skew = /*#__PURE__*/function (_Matrix) {
  2094. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(Skew, _Matrix);
  2095. var _super = _createSuper(Skew);
  2096. function Skew(document, skew) {
  2097. var _this;
  2098. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Skew);
  2099. _this = _super.call(this, document, skew);
  2100. _this.type = 'skew';
  2101. _this.angle = null;
  2102. _this.angle = new Property(document, 'angle', skew);
  2103. return _this;
  2104. }
  2105. return Skew;
  2106. }(Matrix);
  2107. function _createSuper$1(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$1()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
  2108. function _isNativeReflectConstruct$1() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  2109. var SkewX = /*#__PURE__*/function (_Skew) {
  2110. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(SkewX, _Skew);
  2111. var _super = _createSuper$1(SkewX);
  2112. function SkewX(document, skew) {
  2113. var _this;
  2114. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, SkewX);
  2115. _this = _super.call(this, document, skew);
  2116. _this.type = 'skewX';
  2117. _this.matrix = [1, 0, Math.tan(_this.angle.getRadians()), 1, 0, 0];
  2118. return _this;
  2119. }
  2120. return SkewX;
  2121. }(Skew);
  2122. function _createSuper$2(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$2()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
  2123. function _isNativeReflectConstruct$2() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  2124. var SkewY = /*#__PURE__*/function (_Skew) {
  2125. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(SkewY, _Skew);
  2126. var _super = _createSuper$2(SkewY);
  2127. function SkewY(document, skew) {
  2128. var _this;
  2129. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, SkewY);
  2130. _this = _super.call(this, document, skew);
  2131. _this.type = 'skewY';
  2132. _this.matrix = [1, Math.tan(_this.angle.getRadians()), 0, 1, 0, 0];
  2133. return _this;
  2134. }
  2135. return SkewY;
  2136. }(Skew);
  2137. function parseTransforms(transform) {
  2138. return compressSpaces(transform).trim().replace(/\)([a-zA-Z])/g, ') $1').replace(/\)(\s?,\s?)/g, ') ').split(/\s(?=[a-z])/);
  2139. }
  2140. function parseTransform(transform) {
  2141. var _transform$split = transform.split('('),
  2142. _transform$split2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_transform$split, 2),
  2143. type = _transform$split2[0],
  2144. value = _transform$split2[1];
  2145. return [type.trim(), value.trim().replace(')', '')];
  2146. }
  2147. var Transform = /*#__PURE__*/function () {
  2148. function Transform(document, transform, transformOrigin) {
  2149. var _this = this;
  2150. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Transform);
  2151. this.document = document;
  2152. this.transforms = [];
  2153. var data = parseTransforms(transform);
  2154. var originCoords = transformOrigin ? toNumbers(transformOrigin) : [];
  2155. data.forEach(function (transform) {
  2156. if (transform === 'none') {
  2157. return;
  2158. }
  2159. var _parseTransform = parseTransform(transform),
  2160. _parseTransform2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_parseTransform, 2),
  2161. type = _parseTransform2[0],
  2162. value = _parseTransform2[1];
  2163. var TransformType = Transform.transformTypes[type];
  2164. if (typeof TransformType !== 'undefined') {
  2165. _this.transforms.push(new TransformType(_this.document, value, originCoords));
  2166. }
  2167. });
  2168. }
  2169. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Transform, [{
  2170. key: "apply",
  2171. value: function apply(ctx) {
  2172. var transforms = this.transforms;
  2173. var len = transforms.length;
  2174. for (var i = 0; i < len; i++) {
  2175. transforms[i].apply(ctx);
  2176. }
  2177. }
  2178. }, {
  2179. key: "unapply",
  2180. value: function unapply(ctx) {
  2181. var transforms = this.transforms;
  2182. var len = transforms.length;
  2183. for (var i = len - 1; i >= 0; i--) {
  2184. transforms[i].unapply(ctx);
  2185. }
  2186. } // TODO: applyToPoint unused ... remove?
  2187. }, {
  2188. key: "applyToPoint",
  2189. value: function applyToPoint(point) {
  2190. var transforms = this.transforms;
  2191. var len = transforms.length;
  2192. for (var i = 0; i < len; i++) {
  2193. transforms[i].applyToPoint(point);
  2194. }
  2195. }
  2196. }], [{
  2197. key: "fromElement",
  2198. value: function fromElement(document, element) {
  2199. var transformStyle = element.getStyle('transform', false, true);
  2200. var transformOriginStyle = element.getStyle('transform-origin', false, true);
  2201. if (transformStyle.hasValue()) {
  2202. return new Transform(document, transformStyle.getString(), transformOriginStyle.getString());
  2203. }
  2204. return null;
  2205. }
  2206. }]);
  2207. return Transform;
  2208. }();
  2209. Transform.transformTypes = {
  2210. translate: Translate,
  2211. rotate: Rotate,
  2212. scale: Scale,
  2213. matrix: Matrix,
  2214. skewX: SkewX,
  2215. skewY: SkewY
  2216. };
  2217. var Element = /*#__PURE__*/function () {
  2218. function Element(document, node) {
  2219. var _this = this;
  2220. var captureTextNodes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  2221. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Element);
  2222. this.document = document;
  2223. this.node = node;
  2224. this.captureTextNodes = captureTextNodes;
  2225. this.attributes = {};
  2226. this.styles = {};
  2227. this.stylesSpecificity = {};
  2228. this.animationFrozen = false;
  2229. this.animationFrozenValue = '';
  2230. this.parent = null;
  2231. this.children = [];
  2232. if (!node || node.nodeType !== 1) {
  2233. // ELEMENT_NODE
  2234. return;
  2235. } // add attributes
  2236. Array.from(node.attributes).forEach(function (attribute) {
  2237. var nodeName = normalizeAttributeName(attribute.nodeName);
  2238. _this.attributes[nodeName] = new Property(document, nodeName, attribute.value);
  2239. });
  2240. this.addStylesFromStyleDefinition(); // add inline styles
  2241. if (this.getAttribute('style').hasValue()) {
  2242. var styles = this.getAttribute('style').getString().split(';').map(function (_) {
  2243. return _.trim();
  2244. });
  2245. styles.forEach(function (style) {
  2246. if (!style) {
  2247. return;
  2248. }
  2249. var _style$split$map = style.split(':').map(function (_) {
  2250. return _.trim();
  2251. }),
  2252. _style$split$map2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_style$split$map, 2),
  2253. name = _style$split$map2[0],
  2254. value = _style$split$map2[1];
  2255. _this.styles[name] = new Property(document, name, value);
  2256. });
  2257. }
  2258. var definitions = document.definitions;
  2259. var id = this.getAttribute('id'); // add id
  2260. if (id.hasValue()) {
  2261. if (!definitions[id.getValue()]) {
  2262. definitions[id.getValue()] = this;
  2263. }
  2264. }
  2265. Array.from(node.childNodes).forEach(function (childNode) {
  2266. if (childNode.nodeType === 1) {
  2267. _this.addChild(childNode); // ELEMENT_NODE
  2268. } else if (captureTextNodes && (childNode.nodeType === 3 || childNode.nodeType === 4)) {
  2269. var textNode = document.createTextNode(childNode);
  2270. if (textNode.getText().length > 0) {
  2271. _this.addChild(textNode); // TEXT_NODE
  2272. }
  2273. }
  2274. });
  2275. }
  2276. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Element, [{
  2277. key: "getAttribute",
  2278. value: function getAttribute(name) {
  2279. var createIfNotExists = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  2280. var attr = this.attributes[name];
  2281. if (!attr && createIfNotExists) {
  2282. var _attr = new Property(this.document, name, '');
  2283. this.attributes[name] = _attr;
  2284. return _attr;
  2285. }
  2286. return attr || Property.empty(this.document);
  2287. }
  2288. }, {
  2289. key: "getHrefAttribute",
  2290. value: function getHrefAttribute() {
  2291. for (var key in this.attributes) {
  2292. if (key === 'href' || /:href$/.test(key)) {
  2293. return this.attributes[key];
  2294. }
  2295. }
  2296. return Property.empty(this.document);
  2297. }
  2298. }, {
  2299. key: "getStyle",
  2300. value: function getStyle(name) {
  2301. var createIfNotExists = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  2302. var skipAncestors = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  2303. var style = this.styles[name];
  2304. if (style) {
  2305. return style;
  2306. }
  2307. var attr = this.getAttribute(name);
  2308. if (attr && attr.hasValue()) {
  2309. this.styles[name] = attr; // move up to me to cache
  2310. return attr;
  2311. }
  2312. if (!skipAncestors) {
  2313. var parent = this.parent;
  2314. if (parent) {
  2315. var parentStyle = parent.getStyle(name);
  2316. if (parentStyle && parentStyle.hasValue()) {
  2317. return parentStyle;
  2318. }
  2319. }
  2320. }
  2321. if (createIfNotExists) {
  2322. var _style = new Property(this.document, name, '');
  2323. this.styles[name] = _style;
  2324. return _style;
  2325. }
  2326. return style || Property.empty(this.document);
  2327. }
  2328. }, {
  2329. key: "render",
  2330. value: function render(ctx) {
  2331. // don't render display=none
  2332. // don't render visibility=hidden
  2333. if (this.getStyle('display').getString() === 'none' || this.getStyle('visibility').getString() === 'hidden') {
  2334. return;
  2335. }
  2336. ctx.save();
  2337. if (this.getStyle('mask').hasValue()) {
  2338. // mask
  2339. var mask = this.getStyle('mask').getDefinition();
  2340. if (mask) {
  2341. this.applyEffects(ctx);
  2342. mask.apply(ctx, this);
  2343. }
  2344. } else if (this.getStyle('filter').getValue('none') !== 'none') {
  2345. // filter
  2346. var filter = this.getStyle('filter').getDefinition();
  2347. if (filter) {
  2348. this.applyEffects(ctx);
  2349. filter.apply(ctx, this);
  2350. }
  2351. } else {
  2352. this.setContext(ctx);
  2353. this.renderChildren(ctx);
  2354. this.clearContext(ctx);
  2355. }
  2356. ctx.restore();
  2357. }
  2358. }, {
  2359. key: "setContext",
  2360. value: function setContext(_) {}
  2361. }, {
  2362. key: "applyEffects",
  2363. value: function applyEffects(ctx) {
  2364. // transform
  2365. var transform = Transform.fromElement(this.document, this);
  2366. if (transform) {
  2367. transform.apply(ctx);
  2368. } // clip
  2369. var clipPathStyleProp = this.getStyle('clip-path', false, true);
  2370. if (clipPathStyleProp.hasValue()) {
  2371. var clip = clipPathStyleProp.getDefinition();
  2372. if (clip) {
  2373. clip.apply(ctx);
  2374. }
  2375. }
  2376. }
  2377. }, {
  2378. key: "clearContext",
  2379. value: function clearContext(_) {}
  2380. }, {
  2381. key: "renderChildren",
  2382. value: function renderChildren(ctx) {
  2383. this.children.forEach(function (child) {
  2384. child.render(ctx);
  2385. });
  2386. }
  2387. }, {
  2388. key: "addChild",
  2389. value: function addChild(childNode) {
  2390. var child = childNode instanceof Element ? childNode : this.document.createElement(childNode);
  2391. child.parent = this;
  2392. if (!Element.ignoreChildTypes.includes(child.type)) {
  2393. this.children.push(child);
  2394. }
  2395. }
  2396. }, {
  2397. key: "matchesSelector",
  2398. value: function matchesSelector(selector) {
  2399. var node = this.node;
  2400. if (typeof node.matches === 'function') {
  2401. return node.matches(selector);
  2402. }
  2403. var styleClasses = node.getAttribute('class');
  2404. if (!styleClasses || styleClasses === '') {
  2405. return false;
  2406. }
  2407. return styleClasses.split(' ').some(function (styleClass) {
  2408. if (".".concat(styleClass) === selector) {
  2409. return true;
  2410. }
  2411. });
  2412. }
  2413. }, {
  2414. key: "addStylesFromStyleDefinition",
  2415. value: function addStylesFromStyleDefinition() {
  2416. var _this$document = this.document,
  2417. styles = _this$document.styles,
  2418. stylesSpecificity = _this$document.stylesSpecificity;
  2419. for (var selector in styles) {
  2420. if (selector[0] !== '@' && this.matchesSelector(selector)) {
  2421. var style = styles[selector];
  2422. var specificity = stylesSpecificity[selector];
  2423. if (style) {
  2424. for (var name in style) {
  2425. var existingSpecificity = this.stylesSpecificity[name];
  2426. if (typeof existingSpecificity === 'undefined') {
  2427. existingSpecificity = '000';
  2428. }
  2429. if (specificity >= existingSpecificity) {
  2430. this.styles[name] = style[name];
  2431. this.stylesSpecificity[name] = specificity;
  2432. }
  2433. }
  2434. }
  2435. }
  2436. }
  2437. }
  2438. }, {
  2439. key: "removeStyles",
  2440. value: function removeStyles(element, ignoreStyles) {
  2441. var toRestore = ignoreStyles.reduce(function (toRestore, name) {
  2442. var styleProp = element.getStyle(name);
  2443. if (!styleProp.hasValue()) {
  2444. return toRestore;
  2445. }
  2446. var value = styleProp.getString();
  2447. styleProp.setValue('');
  2448. return [].concat((0,_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_39__.default)(toRestore), [[name, value]]);
  2449. }, []);
  2450. return toRestore;
  2451. }
  2452. }, {
  2453. key: "restoreStyles",
  2454. value: function restoreStyles(element, styles) {
  2455. styles.forEach(function (_ref) {
  2456. var _ref2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_ref, 2),
  2457. name = _ref2[0],
  2458. value = _ref2[1];
  2459. element.getStyle(name, true).setValue(value);
  2460. });
  2461. }
  2462. }]);
  2463. return Element;
  2464. }();
  2465. Element.ignoreChildTypes = ['title'];
  2466. function _createSuper$3(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$3()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
  2467. function _isNativeReflectConstruct$3() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  2468. var UnknownElement = /*#__PURE__*/function (_Element) {
  2469. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(UnknownElement, _Element);
  2470. var _super = _createSuper$3(UnknownElement);
  2471. function UnknownElement(document, node, captureTextNodes) {
  2472. var _this;
  2473. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, UnknownElement);
  2474. _this = _super.call(this, document, node, captureTextNodes);
  2475. return _this;
  2476. }
  2477. return UnknownElement;
  2478. }(Element);
  2479. function wrapFontFamily(fontFamily) {
  2480. var trimmed = fontFamily.trim();
  2481. return /^('|")/.test(trimmed) ? trimmed : "\"".concat(trimmed, "\"");
  2482. }
  2483. function prepareFontFamily(fontFamily) {
  2484. return typeof process === 'undefined' ? fontFamily : fontFamily.trim().split(',').map(wrapFontFamily).join(',');
  2485. }
  2486. /**
  2487. * https://developer.mozilla.org/en-US/docs/Web/CSS/font-style
  2488. */
  2489. function prepareFontStyle(fontStyle) {
  2490. if (!fontStyle) {
  2491. return '';
  2492. }
  2493. var targetFontStyle = fontStyle.trim().toLowerCase();
  2494. switch (targetFontStyle) {
  2495. case 'normal':
  2496. case 'italic':
  2497. case 'oblique':
  2498. case 'inherit':
  2499. case 'initial':
  2500. case 'unset':
  2501. return targetFontStyle;
  2502. default:
  2503. if (/^oblique\s+(-|)\d+deg$/.test(targetFontStyle)) {
  2504. return targetFontStyle;
  2505. }
  2506. return '';
  2507. }
  2508. }
  2509. /**
  2510. * https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight
  2511. */
  2512. function prepareFontWeight(fontWeight) {
  2513. if (!fontWeight) {
  2514. return '';
  2515. }
  2516. var targetFontWeight = fontWeight.trim().toLowerCase();
  2517. switch (targetFontWeight) {
  2518. case 'normal':
  2519. case 'bold':
  2520. case 'lighter':
  2521. case 'bolder':
  2522. case 'inherit':
  2523. case 'initial':
  2524. case 'unset':
  2525. return targetFontWeight;
  2526. default:
  2527. if (/^[\d.]+$/.test(targetFontWeight)) {
  2528. return targetFontWeight;
  2529. }
  2530. return '';
  2531. }
  2532. }
  2533. var Font = /*#__PURE__*/function () {
  2534. function Font(fontStyle, fontVariant, fontWeight, fontSize, fontFamily, inherit) {
  2535. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Font);
  2536. var inheritFont = inherit ? typeof inherit === 'string' ? Font.parse(inherit) : inherit : {};
  2537. this.fontFamily = fontFamily || inheritFont.fontFamily;
  2538. this.fontSize = fontSize || inheritFont.fontSize;
  2539. this.fontStyle = fontStyle || inheritFont.fontStyle;
  2540. this.fontWeight = fontWeight || inheritFont.fontWeight;
  2541. this.fontVariant = fontVariant || inheritFont.fontVariant;
  2542. }
  2543. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Font, [{
  2544. key: "toString",
  2545. value: function toString() {
  2546. return [prepareFontStyle(this.fontStyle), this.fontVariant, prepareFontWeight(this.fontWeight), this.fontSize, // Wrap fontFamily only on nodejs and only for canvas.ctx
  2547. prepareFontFamily(this.fontFamily)].join(' ').trim();
  2548. }
  2549. }], [{
  2550. key: "parse",
  2551. value: function parse() {
  2552. var font = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  2553. var inherit = arguments.length > 1 ? arguments[1] : undefined;
  2554. var fontStyle = '';
  2555. var fontVariant = '';
  2556. var fontWeight = '';
  2557. var fontSize = '';
  2558. var fontFamily = '';
  2559. var parts = compressSpaces(font).trim().split(' ');
  2560. var set = {
  2561. fontSize: false,
  2562. fontStyle: false,
  2563. fontWeight: false,
  2564. fontVariant: false
  2565. };
  2566. parts.forEach(function (part) {
  2567. switch (true) {
  2568. case !set.fontStyle && Font.styles.includes(part):
  2569. if (part !== 'inherit') {
  2570. fontStyle = part;
  2571. }
  2572. set.fontStyle = true;
  2573. break;
  2574. case !set.fontVariant && Font.variants.includes(part):
  2575. if (part !== 'inherit') {
  2576. fontVariant = part;
  2577. }
  2578. set.fontStyle = true;
  2579. set.fontVariant = true;
  2580. break;
  2581. case !set.fontWeight && Font.weights.includes(part):
  2582. if (part !== 'inherit') {
  2583. fontWeight = part;
  2584. }
  2585. set.fontStyle = true;
  2586. set.fontVariant = true;
  2587. set.fontWeight = true;
  2588. break;
  2589. case !set.fontSize:
  2590. if (part !== 'inherit') {
  2591. var _part$split = part.split('/');
  2592. var _part$split2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_part$split, 1);
  2593. fontSize = _part$split2[0];
  2594. }
  2595. set.fontStyle = true;
  2596. set.fontVariant = true;
  2597. set.fontWeight = true;
  2598. set.fontSize = true;
  2599. break;
  2600. default:
  2601. if (part !== 'inherit') {
  2602. fontFamily += part;
  2603. }
  2604. }
  2605. });
  2606. return new Font(fontStyle, fontVariant, fontWeight, fontSize, fontFamily, inherit);
  2607. }
  2608. }]);
  2609. return Font;
  2610. }();
  2611. Font.styles = 'normal|italic|oblique|inherit';
  2612. Font.variants = 'normal|small-caps|inherit';
  2613. Font.weights = 'normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit';
  2614. var BoundingBox = /*#__PURE__*/function () {
  2615. function BoundingBox() {
  2616. var x1 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Number.NaN;
  2617. var y1 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Number.NaN;
  2618. var x2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : Number.NaN;
  2619. var y2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : Number.NaN;
  2620. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, BoundingBox);
  2621. this.x1 = x1;
  2622. this.y1 = y1;
  2623. this.x2 = x2;
  2624. this.y2 = y2;
  2625. this.addPoint(x1, y1);
  2626. this.addPoint(x2, y2);
  2627. }
  2628. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(BoundingBox, [{
  2629. key: "addPoint",
  2630. value: function addPoint(x, y) {
  2631. if (typeof x !== 'undefined') {
  2632. if (isNaN(this.x1) || isNaN(this.x2)) {
  2633. this.x1 = x;
  2634. this.x2 = x;
  2635. }
  2636. if (x < this.x1) {
  2637. this.x1 = x;
  2638. }
  2639. if (x > this.x2) {
  2640. this.x2 = x;
  2641. }
  2642. }
  2643. if (typeof y !== 'undefined') {
  2644. if (isNaN(this.y1) || isNaN(this.y2)) {
  2645. this.y1 = y;
  2646. this.y2 = y;
  2647. }
  2648. if (y < this.y1) {
  2649. this.y1 = y;
  2650. }
  2651. if (y > this.y2) {
  2652. this.y2 = y;
  2653. }
  2654. }
  2655. }
  2656. }, {
  2657. key: "addX",
  2658. value: function addX(x) {
  2659. this.addPoint(x, null);
  2660. }
  2661. }, {
  2662. key: "addY",
  2663. value: function addY(y) {
  2664. this.addPoint(null, y);
  2665. }
  2666. }, {
  2667. key: "addBoundingBox",
  2668. value: function addBoundingBox(boundingBox) {
  2669. if (!boundingBox) {
  2670. return;
  2671. }
  2672. var x1 = boundingBox.x1,
  2673. y1 = boundingBox.y1,
  2674. x2 = boundingBox.x2,
  2675. y2 = boundingBox.y2;
  2676. this.addPoint(x1, y1);
  2677. this.addPoint(x2, y2);
  2678. }
  2679. }, {
  2680. key: "sumCubic",
  2681. value: function sumCubic(t, p0, p1, p2, p3) {
  2682. return Math.pow(1 - t, 3) * p0 + 3 * Math.pow(1 - t, 2) * t * p1 + 3 * (1 - t) * Math.pow(t, 2) * p2 + Math.pow(t, 3) * p3;
  2683. }
  2684. }, {
  2685. key: "bezierCurveAdd",
  2686. value: function bezierCurveAdd(forX, p0, p1, p2, p3) {
  2687. var b = 6 * p0 - 12 * p1 + 6 * p2;
  2688. var a = -3 * p0 + 9 * p1 - 9 * p2 + 3 * p3;
  2689. var c = 3 * p1 - 3 * p0;
  2690. if (a === 0) {
  2691. if (b === 0) {
  2692. return;
  2693. }
  2694. var t = -c / b;
  2695. if (0 < t && t < 1) {
  2696. if (forX) {
  2697. this.addX(this.sumCubic(t, p0, p1, p2, p3));
  2698. } else {
  2699. this.addY(this.sumCubic(t, p0, p1, p2, p3));
  2700. }
  2701. }
  2702. return;
  2703. }
  2704. var b2ac = Math.pow(b, 2) - 4 * c * a;
  2705. if (b2ac < 0) {
  2706. return;
  2707. }
  2708. var t1 = (-b + Math.sqrt(b2ac)) / (2 * a);
  2709. if (0 < t1 && t1 < 1) {
  2710. if (forX) {
  2711. this.addX(this.sumCubic(t1, p0, p1, p2, p3));
  2712. } else {
  2713. this.addY(this.sumCubic(t1, p0, p1, p2, p3));
  2714. }
  2715. }
  2716. var t2 = (-b - Math.sqrt(b2ac)) / (2 * a);
  2717. if (0 < t2 && t2 < 1) {
  2718. if (forX) {
  2719. this.addX(this.sumCubic(t2, p0, p1, p2, p3));
  2720. } else {
  2721. this.addY(this.sumCubic(t2, p0, p1, p2, p3));
  2722. }
  2723. }
  2724. } // from http://blog.hackers-cafe.net/2009/06/how-to-calculate-bezier-curves-bounding.html
  2725. }, {
  2726. key: "addBezierCurve",
  2727. value: function addBezierCurve(p0x, p0y, p1x, p1y, p2x, p2y, p3x, p3y) {
  2728. this.addPoint(p0x, p0y);
  2729. this.addPoint(p3x, p3y);
  2730. this.bezierCurveAdd(true, p0x, p1x, p2x, p3x);
  2731. this.bezierCurveAdd(false, p0y, p1y, p2y, p3y);
  2732. }
  2733. }, {
  2734. key: "addQuadraticCurve",
  2735. value: function addQuadraticCurve(p0x, p0y, p1x, p1y, p2x, p2y) {
  2736. var cp1x = p0x + 2 / 3 * (p1x - p0x); // CP1 = QP0 + 2/3 *(QP1-QP0)
  2737. var cp1y = p0y + 2 / 3 * (p1y - p0y); // CP1 = QP0 + 2/3 *(QP1-QP0)
  2738. var cp2x = cp1x + 1 / 3 * (p2x - p0x); // CP2 = CP1 + 1/3 *(QP2-QP0)
  2739. var cp2y = cp1y + 1 / 3 * (p2y - p0y); // CP2 = CP1 + 1/3 *(QP2-QP0)
  2740. this.addBezierCurve(p0x, p0y, cp1x, cp2x, cp1y, cp2y, p2x, p2y);
  2741. }
  2742. }, {
  2743. key: "isPointInBox",
  2744. value: function isPointInBox(x, y) {
  2745. var x1 = this.x1,
  2746. y1 = this.y1,
  2747. x2 = this.x2,
  2748. y2 = this.y2;
  2749. return x1 <= x && x <= x2 && y1 <= y && y <= y2;
  2750. }
  2751. }, {
  2752. key: "x",
  2753. get: function get() {
  2754. return this.x1;
  2755. }
  2756. }, {
  2757. key: "y",
  2758. get: function get() {
  2759. return this.y1;
  2760. }
  2761. }, {
  2762. key: "width",
  2763. get: function get() {
  2764. return this.x2 - this.x1;
  2765. }
  2766. }, {
  2767. key: "height",
  2768. get: function get() {
  2769. return this.y2 - this.y1;
  2770. }
  2771. }]);
  2772. return BoundingBox;
  2773. }();
  2774. function _createSuper$4(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$4()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
  2775. function _isNativeReflectConstruct$4() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  2776. var RenderedElement = /*#__PURE__*/function (_Element) {
  2777. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(RenderedElement, _Element);
  2778. var _super = _createSuper$4(RenderedElement);
  2779. function RenderedElement() {
  2780. var _this;
  2781. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, RenderedElement);
  2782. _this = _super.apply(this, arguments);
  2783. _this.modifiedEmSizeStack = false;
  2784. return _this;
  2785. }
  2786. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(RenderedElement, [{
  2787. key: "calculateOpacity",
  2788. value: function calculateOpacity() {
  2789. var opacity = 1.0; // tslint:disable-next-line: no-this-assignment
  2790. var element = this;
  2791. while (element) {
  2792. var opacityStyle = element.getStyle('opacity', false, true); // no ancestors on style call
  2793. if (opacityStyle.hasValue()) {
  2794. opacity *= opacityStyle.getNumber();
  2795. }
  2796. element = element.parent;
  2797. }
  2798. return opacity;
  2799. }
  2800. }, {
  2801. key: "setContext",
  2802. value: function setContext(ctx) {
  2803. var fromMeasure = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  2804. if (!fromMeasure) {
  2805. // causes stack overflow when measuring text with gradients
  2806. // fill
  2807. var fillStyleProp = this.getStyle('fill');
  2808. var fillOpacityStyleProp = this.getStyle('fill-opacity');
  2809. var strokeStyleProp = this.getStyle('stroke');
  2810. var strokeOpacityProp = this.getStyle('stroke-opacity');
  2811. if (fillStyleProp.isUrlDefinition()) {
  2812. var fillStyle = fillStyleProp.getFillStyleDefinition(this, fillOpacityStyleProp);
  2813. if (fillStyle) {
  2814. ctx.fillStyle = fillStyle;
  2815. }
  2816. } else if (fillStyleProp.hasValue()) {
  2817. if (fillStyleProp.getString() === 'currentColor') {
  2818. fillStyleProp.setValue(this.getStyle('color').getColor());
  2819. }
  2820. var _fillStyle = fillStyleProp.getColor();
  2821. if (_fillStyle !== 'inherit') {
  2822. ctx.fillStyle = _fillStyle === 'none' ? 'rgba(0,0,0,0)' : _fillStyle;
  2823. }
  2824. }
  2825. if (fillOpacityStyleProp.hasValue()) {
  2826. var _fillStyle2 = new Property(this.document, 'fill', ctx.fillStyle).addOpacity(fillOpacityStyleProp).getColor();
  2827. ctx.fillStyle = _fillStyle2;
  2828. } // stroke
  2829. if (strokeStyleProp.isUrlDefinition()) {
  2830. var strokeStyle = strokeStyleProp.getFillStyleDefinition(this, strokeOpacityProp);
  2831. if (strokeStyle) {
  2832. ctx.strokeStyle = strokeStyle;
  2833. }
  2834. } else if (strokeStyleProp.hasValue()) {
  2835. if (strokeStyleProp.getString() === 'currentColor') {
  2836. strokeStyleProp.setValue(this.getStyle('color').getColor());
  2837. }
  2838. var _strokeStyle = strokeStyleProp.getString();
  2839. if (_strokeStyle !== 'inherit') {
  2840. ctx.strokeStyle = _strokeStyle === 'none' ? 'rgba(0,0,0,0)' : _strokeStyle;
  2841. }
  2842. }
  2843. if (strokeOpacityProp.hasValue()) {
  2844. var _strokeStyle2 = new Property(this.document, 'stroke', ctx.strokeStyle).addOpacity(strokeOpacityProp).getString();
  2845. ctx.strokeStyle = _strokeStyle2;
  2846. }
  2847. var strokeWidthStyleProp = this.getStyle('stroke-width');
  2848. if (strokeWidthStyleProp.hasValue()) {
  2849. var newLineWidth = strokeWidthStyleProp.getPixels();
  2850. ctx.lineWidth = !newLineWidth ? PSEUDO_ZERO // browsers don't respect 0 (or node-canvas? :-)
  2851. : newLineWidth;
  2852. }
  2853. var strokeLinecapStyleProp = this.getStyle('stroke-linecap');
  2854. var strokeLinejoinStyleProp = this.getStyle('stroke-linejoin');
  2855. var strokeMiterlimitProp = this.getStyle('stroke-miterlimit');
  2856. var pointOrderStyleProp = this.getStyle('paint-order');
  2857. var strokeDasharrayStyleProp = this.getStyle('stroke-dasharray');
  2858. var strokeDashoffsetProp = this.getStyle('stroke-dashoffset');
  2859. if (strokeLinecapStyleProp.hasValue()) {
  2860. ctx.lineCap = strokeLinecapStyleProp.getString();
  2861. }
  2862. if (strokeLinejoinStyleProp.hasValue()) {
  2863. ctx.lineJoin = strokeLinejoinStyleProp.getString();
  2864. }
  2865. if (strokeMiterlimitProp.hasValue()) {
  2866. ctx.miterLimit = strokeMiterlimitProp.getNumber();
  2867. }
  2868. if (pointOrderStyleProp.hasValue()) {
  2869. // ?
  2870. ctx.paintOrder = pointOrderStyleProp.getValue();
  2871. }
  2872. if (strokeDasharrayStyleProp.hasValue() && strokeDasharrayStyleProp.getString() !== 'none') {
  2873. var gaps = toNumbers(strokeDasharrayStyleProp.getString());
  2874. if (typeof ctx.setLineDash !== 'undefined') {
  2875. ctx.setLineDash(gaps);
  2876. } else if (typeof ctx.webkitLineDash !== 'undefined') {
  2877. ctx.webkitLineDash = gaps;
  2878. } else if (typeof ctx.mozDash !== 'undefined' && !(gaps.length === 1 && gaps[0] === 0)) {
  2879. ctx.mozDash = gaps;
  2880. }
  2881. var offset = strokeDashoffsetProp.getPixels();
  2882. if (typeof ctx.lineDashOffset !== 'undefined') {
  2883. ctx.lineDashOffset = offset;
  2884. } else if (typeof ctx.webkitLineDashOffset !== 'undefined') {
  2885. ctx.webkitLineDashOffset = offset;
  2886. } else if (typeof ctx.mozDashOffset !== 'undefined') {
  2887. ctx.mozDashOffset = offset;
  2888. }
  2889. }
  2890. } // font
  2891. this.modifiedEmSizeStack = false;
  2892. if (typeof ctx.font !== 'undefined') {
  2893. var fontStyleProp = this.getStyle('font');
  2894. var fontStyleStyleProp = this.getStyle('font-style');
  2895. var fontVariantStyleProp = this.getStyle('font-variant');
  2896. var fontWeightStyleProp = this.getStyle('font-weight');
  2897. var fontSizeStyleProp = this.getStyle('font-size');
  2898. var fontFamilyStyleProp = this.getStyle('font-family');
  2899. var font = new Font(fontStyleStyleProp.getString(), fontVariantStyleProp.getString(), fontWeightStyleProp.getString(), fontSizeStyleProp.hasValue() ? "".concat(fontSizeStyleProp.getPixels(true), "px") : '', fontFamilyStyleProp.getString(), Font.parse(fontStyleProp.getString(), ctx.font));
  2900. fontStyleStyleProp.setValue(font.fontStyle);
  2901. fontVariantStyleProp.setValue(font.fontVariant);
  2902. fontWeightStyleProp.setValue(font.fontWeight);
  2903. fontSizeStyleProp.setValue(font.fontSize);
  2904. fontFamilyStyleProp.setValue(font.fontFamily);
  2905. ctx.font = font.toString();
  2906. if (fontSizeStyleProp.isPixels()) {
  2907. this.document.emSize = fontSizeStyleProp.getPixels();
  2908. this.modifiedEmSizeStack = true;
  2909. }
  2910. }
  2911. if (!fromMeasure) {
  2912. // effects
  2913. this.applyEffects(ctx); // opacity
  2914. ctx.globalAlpha = this.calculateOpacity();
  2915. }
  2916. }
  2917. }, {
  2918. key: "clearContext",
  2919. value: function clearContext(ctx) {
  2920. (0,_babel_runtime_helpers_get__WEBPACK_IMPORTED_MODULE_42__.default)((0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(RenderedElement.prototype), "clearContext", this).call(this, ctx);
  2921. if (this.modifiedEmSizeStack) {
  2922. this.document.popEmSize();
  2923. }
  2924. }
  2925. }]);
  2926. return RenderedElement;
  2927. }(Element);
  2928. function _createSuper$5(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$5()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
  2929. function _isNativeReflectConstruct$5() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  2930. var TextElement = /*#__PURE__*/function (_RenderedElement) {
  2931. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(TextElement, _RenderedElement);
  2932. var _super = _createSuper$5(TextElement);
  2933. function TextElement(document, node, captureTextNodes) {
  2934. var _this;
  2935. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, TextElement);
  2936. _this = _super.call(this, document, node, (this instanceof TextElement ? this.constructor : void 0) === TextElement ? true : captureTextNodes);
  2937. _this.type = 'text';
  2938. _this.x = 0;
  2939. _this.y = 0;
  2940. _this.measureCache = -1;
  2941. return _this;
  2942. }
  2943. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(TextElement, [{
  2944. key: "setContext",
  2945. value: function setContext(ctx) {
  2946. var fromMeasure = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  2947. (0,_babel_runtime_helpers_get__WEBPACK_IMPORTED_MODULE_42__.default)((0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(TextElement.prototype), "setContext", this).call(this, ctx, fromMeasure);
  2948. var textBaseline = this.getStyle('dominant-baseline').getTextBaseline() || this.getStyle('alignment-baseline').getTextBaseline();
  2949. if (textBaseline) {
  2950. ctx.textBaseline = textBaseline;
  2951. }
  2952. }
  2953. }, {
  2954. key: "initializeCoordinates",
  2955. value: function initializeCoordinates(ctx) {
  2956. this.x = this.getAttribute('x').getPixels('x');
  2957. this.y = this.getAttribute('y').getPixels('y');
  2958. var dxAttr = this.getAttribute('dx');
  2959. var dyAttr = this.getAttribute('dy');
  2960. if (dxAttr.hasValue()) {
  2961. this.x += dxAttr.getPixels('x');
  2962. }
  2963. if (dyAttr.hasValue()) {
  2964. this.y += dyAttr.getPixels('y');
  2965. }
  2966. this.x += this.getAnchorDelta(ctx, this, 0);
  2967. }
  2968. }, {
  2969. key: "getBoundingBox",
  2970. value: function getBoundingBox(ctx) {
  2971. var _this2 = this;
  2972. if (this.type !== 'text') {
  2973. return this.getTElementBoundingBox(ctx);
  2974. }
  2975. this.initializeCoordinates(ctx);
  2976. var boundingBox = null;
  2977. this.children.forEach(function (_, i) {
  2978. var childBoundingBox = _this2.getChildBoundingBox(ctx, _this2, _this2, i);
  2979. if (!boundingBox) {
  2980. boundingBox = childBoundingBox;
  2981. } else {
  2982. boundingBox.addBoundingBox(childBoundingBox);
  2983. }
  2984. });
  2985. return boundingBox;
  2986. }
  2987. }, {
  2988. key: "getFontSize",
  2989. value: function getFontSize() {
  2990. var document = this.document,
  2991. parent = this.parent;
  2992. var inheritFontSize = Font.parse(document.ctx.font).fontSize;
  2993. var fontSize = parent.getStyle('font-size').getNumber(inheritFontSize);
  2994. return fontSize;
  2995. }
  2996. }, {
  2997. key: "getTElementBoundingBox",
  2998. value: function getTElementBoundingBox(ctx) {
  2999. var fontSize = this.getFontSize();
  3000. return new BoundingBox(this.x, this.y - fontSize, this.x + this.measureText(ctx), this.y);
  3001. }
  3002. }, {
  3003. key: "getGlyph",
  3004. value: function getGlyph(font, text, i) {
  3005. var char = text[i];
  3006. var glyph = null;
  3007. if (font.isArabic) {
  3008. var len = text.length;
  3009. var prevChar = text[i - 1];
  3010. var nextChar = text[i + 1];
  3011. var arabicForm = 'isolated';
  3012. if ((i === 0 || prevChar === ' ') && i < len - 2 && nextChar !== ' ') {
  3013. arabicForm = 'terminal';
  3014. }
  3015. if (i > 0 && prevChar !== ' ' && i < len - 2 && nextChar !== ' ') {
  3016. arabicForm = 'medial';
  3017. }
  3018. if (i > 0 && prevChar !== ' ' && (i === len - 1 || nextChar === ' ')) {
  3019. arabicForm = 'initial';
  3020. }
  3021. if (typeof font.glyphs[char] !== 'undefined') {
  3022. glyph = font.glyphs[char][arabicForm];
  3023. if (!glyph && font.glyphs[char].type === 'glyph') {
  3024. glyph = font.glyphs[char];
  3025. }
  3026. }
  3027. } else {
  3028. glyph = font.glyphs[char];
  3029. }
  3030. if (!glyph) {
  3031. glyph = font.missingGlyph;
  3032. }
  3033. return glyph;
  3034. }
  3035. }, {
  3036. key: "getText",
  3037. value: function getText() {
  3038. return '';
  3039. }
  3040. }, {
  3041. key: "getTextFromNode",
  3042. value: function getTextFromNode(node) {
  3043. var textNode = node || this.node;
  3044. var childNodes = Array.from(textNode.parentNode.childNodes);
  3045. var index = childNodes.indexOf(textNode);
  3046. var lastIndex = childNodes.length - 1;
  3047. var text = compressSpaces(textNode.value || textNode.text || textNode.textContent || '');
  3048. if (index === 0) {
  3049. text = trimLeft(text);
  3050. }
  3051. if (index === lastIndex) {
  3052. text = trimRight(text);
  3053. }
  3054. return text;
  3055. }
  3056. }, {
  3057. key: "renderChildren",
  3058. value: function renderChildren(ctx) {
  3059. var _this3 = this;
  3060. if (this.type !== 'text') {
  3061. this.renderTElementChildren(ctx);
  3062. return;
  3063. }
  3064. this.initializeCoordinates(ctx);
  3065. this.children.forEach(function (_, i) {
  3066. _this3.renderChild(ctx, _this3, _this3, i);
  3067. });
  3068. var mouse = this.document.screen.mouse; // Do not calc bounding box if mouse is not working.
  3069. if (mouse.isWorking()) {
  3070. mouse.checkBoundingBox(this, this.getBoundingBox(ctx));
  3071. }
  3072. }
  3073. }, {
  3074. key: "renderTElementChildren",
  3075. value: function renderTElementChildren(ctx) {
  3076. var document = this.document,
  3077. parent = this.parent;
  3078. var renderText = this.getText();
  3079. var customFont = parent.getStyle('font-family').getDefinition();
  3080. if (customFont) {
  3081. var unitsPerEm = customFont.fontFace.unitsPerEm;
  3082. var ctxFont = Font.parse(document.ctx.font);
  3083. var fontSize = parent.getStyle('font-size').getNumber(ctxFont.fontSize);
  3084. var fontStyle = parent.getStyle('font-style').getString(ctxFont.fontStyle);
  3085. var scale = fontSize / unitsPerEm;
  3086. var text = customFont.isRTL ? renderText.split('').reverse().join('') : renderText;
  3087. var dx = toNumbers(parent.getAttribute('dx').getString());
  3088. var len = text.length;
  3089. for (var i = 0; i < len; i++) {
  3090. var glyph = this.getGlyph(customFont, text, i);
  3091. ctx.translate(this.x, this.y);
  3092. ctx.scale(scale, -scale);
  3093. var lw = ctx.lineWidth;
  3094. ctx.lineWidth = ctx.lineWidth * unitsPerEm / fontSize;
  3095. if (fontStyle === 'italic') {
  3096. ctx.transform(1, 0, .4, 1, 0, 0);
  3097. }
  3098. glyph.render(ctx);
  3099. if (fontStyle === 'italic') {
  3100. ctx.transform(1, 0, -.4, 1, 0, 0);
  3101. }
  3102. ctx.lineWidth = lw;
  3103. ctx.scale(1 / scale, -1 / scale);
  3104. ctx.translate(-this.x, -this.y);
  3105. this.x += fontSize * (glyph.horizAdvX || customFont.horizAdvX) / unitsPerEm;
  3106. if (typeof dx[i] !== 'undefined' && !isNaN(dx[i])) {
  3107. this.x += dx[i];
  3108. }
  3109. }
  3110. return;
  3111. }
  3112. var x = this.x,
  3113. y = this.y;
  3114. if (ctx.paintOrder === 'stroke') {
  3115. if (ctx.strokeStyle) {
  3116. ctx.strokeText(renderText, x, y);
  3117. }
  3118. if (ctx.fillStyle) {
  3119. ctx.fillText(renderText, x, y);
  3120. }
  3121. } else {
  3122. if (ctx.fillStyle) {
  3123. ctx.fillText(renderText, x, y);
  3124. }
  3125. if (ctx.strokeStyle) {
  3126. ctx.strokeText(renderText, x, y);
  3127. }
  3128. }
  3129. }
  3130. }, {
  3131. key: "getAnchorDelta",
  3132. value: function getAnchorDelta(ctx, parent, startI) {
  3133. var textAnchor = this.getStyle('text-anchor').getString('start');
  3134. if (textAnchor !== 'start') {
  3135. var children = parent.children;
  3136. var len = children.length;
  3137. var child = null;
  3138. var width = 0;
  3139. for (var i = startI; i < len; i++) {
  3140. child = children[i];
  3141. if (i > startI && child.getAttribute('x').hasValue() || child.getAttribute('text-anchor').hasValue()) {
  3142. break; // new group
  3143. }
  3144. width += child.measureTextRecursive(ctx);
  3145. }
  3146. return -1 * (textAnchor === 'end' ? width : width / 2.0);
  3147. }
  3148. return 0;
  3149. }
  3150. }, {
  3151. key: "adjustChildCoordinates",
  3152. value: function adjustChildCoordinates(ctx, textParent, parent, i) {
  3153. var child = parent.children[i];
  3154. if (typeof child.measureText !== 'function') {
  3155. return child;
  3156. }
  3157. ctx.save();
  3158. child.setContext(ctx, true);
  3159. var xAttr = child.getAttribute('x');
  3160. var yAttr = child.getAttribute('y');
  3161. var dxAttr = child.getAttribute('dx');
  3162. var dyAttr = child.getAttribute('dy');
  3163. var textAnchor = child.getAttribute('text-anchor').getString('start');
  3164. if (i === 0 && child.type !== 'textNode') {
  3165. if (!xAttr.hasValue()) {
  3166. xAttr.setValue(textParent.getAttribute('x').getValue('0'));
  3167. }
  3168. if (!yAttr.hasValue()) {
  3169. yAttr.setValue(textParent.getAttribute('y').getValue('0'));
  3170. }
  3171. if (!dxAttr.hasValue()) {
  3172. dxAttr.setValue(textParent.getAttribute('dx').getValue('0'));
  3173. }
  3174. if (!dyAttr.hasValue()) {
  3175. dyAttr.setValue(textParent.getAttribute('dy').getValue('0'));
  3176. }
  3177. }
  3178. if (xAttr.hasValue()) {
  3179. child.x = xAttr.getPixels('x') + textParent.getAnchorDelta(ctx, parent, i);
  3180. if (textAnchor !== 'start') {
  3181. var width = child.measureTextRecursive(ctx);
  3182. child.x += -1 * (textAnchor === 'end' ? width : width / 2.0);
  3183. }
  3184. if (dxAttr.hasValue()) {
  3185. child.x += dxAttr.getPixels('x');
  3186. }
  3187. } else {
  3188. if (textAnchor !== 'start') {
  3189. var _width = child.measureTextRecursive(ctx);
  3190. textParent.x += -1 * (textAnchor === 'end' ? _width : _width / 2.0);
  3191. }
  3192. if (dxAttr.hasValue()) {
  3193. textParent.x += dxAttr.getPixels('x');
  3194. }
  3195. child.x = textParent.x;
  3196. }
  3197. textParent.x = child.x + child.measureText(ctx);
  3198. if (yAttr.hasValue()) {
  3199. child.y = yAttr.getPixels('y');
  3200. if (dyAttr.hasValue()) {
  3201. child.y += dyAttr.getPixels('y');
  3202. }
  3203. } else {
  3204. if (dyAttr.hasValue()) {
  3205. textParent.y += dyAttr.getPixels('y');
  3206. }
  3207. child.y = textParent.y;
  3208. }
  3209. textParent.y = child.y;
  3210. child.clearContext(ctx);
  3211. ctx.restore();
  3212. return child;
  3213. }
  3214. }, {
  3215. key: "getChildBoundingBox",
  3216. value: function getChildBoundingBox(ctx, textParent, parent, i) {
  3217. var child = this.adjustChildCoordinates(ctx, textParent, parent, i);
  3218. var boundingBox = child.getBoundingBox(ctx);
  3219. if (!boundingBox) {
  3220. return null;
  3221. }
  3222. child.children.forEach(function (_, i) {
  3223. var childBoundingBox = textParent.getChildBoundingBox(ctx, textParent, child, i);
  3224. boundingBox.addBoundingBox(childBoundingBox);
  3225. });
  3226. return boundingBox;
  3227. }
  3228. }, {
  3229. key: "renderChild",
  3230. value: function renderChild(ctx, textParent, parent, i) {
  3231. var child = this.adjustChildCoordinates(ctx, textParent, parent, i);
  3232. child.render(ctx);
  3233. child.children.forEach(function (_, i) {
  3234. textParent.renderChild(ctx, textParent, child, i);
  3235. });
  3236. }
  3237. }, {
  3238. key: "measureTextRecursive",
  3239. value: function measureTextRecursive(ctx) {
  3240. var width = this.children.reduce(function (width, child) {
  3241. return width + child.measureTextRecursive(ctx);
  3242. }, this.measureText(ctx));
  3243. return width;
  3244. }
  3245. }, {
  3246. key: "measureText",
  3247. value: function measureText(ctx) {
  3248. var measureCache = this.measureCache;
  3249. if (~measureCache) {
  3250. return measureCache;
  3251. }
  3252. var renderText = this.getText();
  3253. var measure = this.measureTargetText(ctx, renderText);
  3254. this.measureCache = measure;
  3255. return measure;
  3256. }
  3257. }, {
  3258. key: "measureTargetText",
  3259. value: function measureTargetText(ctx, targetText) {
  3260. if (!targetText.length) {
  3261. return 0;
  3262. }
  3263. var parent = this.parent;
  3264. var customFont = parent.getStyle('font-family').getDefinition();
  3265. if (customFont) {
  3266. var fontSize = this.getFontSize();
  3267. var text = customFont.isRTL ? targetText.split('').reverse().join('') : targetText;
  3268. var dx = toNumbers(parent.getAttribute('dx').getString());
  3269. var len = text.length;
  3270. var _measure = 0;
  3271. for (var i = 0; i < len; i++) {
  3272. var glyph = this.getGlyph(customFont, text, i);
  3273. _measure += (glyph.horizAdvX || customFont.horizAdvX) * fontSize / customFont.fontFace.unitsPerEm;
  3274. if (typeof dx[i] !== 'undefined' && !isNaN(dx[i])) {
  3275. _measure += dx[i];
  3276. }
  3277. }
  3278. return _measure;
  3279. }
  3280. if (!ctx.measureText) {
  3281. return targetText.length * 10;
  3282. }
  3283. ctx.save();
  3284. this.setContext(ctx, true);
  3285. var _ctx$measureText = ctx.measureText(targetText),
  3286. measure = _ctx$measureText.width;
  3287. this.clearContext(ctx);
  3288. ctx.restore();
  3289. return measure;
  3290. }
  3291. }]);
  3292. return TextElement;
  3293. }(RenderedElement);
  3294. function _createSuper$6(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$6()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
  3295. function _isNativeReflectConstruct$6() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  3296. var TSpanElement = /*#__PURE__*/function (_TextElement) {
  3297. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(TSpanElement, _TextElement);
  3298. var _super = _createSuper$6(TSpanElement);
  3299. function TSpanElement(document, node, captureTextNodes) {
  3300. var _this;
  3301. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, TSpanElement);
  3302. _this = _super.call(this, document, node, (this instanceof TSpanElement ? this.constructor : void 0) === TSpanElement ? true : captureTextNodes);
  3303. _this.type = 'tspan'; // if this node has children, then they own the text
  3304. _this.text = _this.children.length > 0 ? '' : _this.getTextFromNode();
  3305. return _this;
  3306. }
  3307. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(TSpanElement, [{
  3308. key: "getText",
  3309. value: function getText() {
  3310. return this.text;
  3311. }
  3312. }]);
  3313. return TSpanElement;
  3314. }(TextElement);
  3315. function _createSuper$7(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$7()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
  3316. function _isNativeReflectConstruct$7() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  3317. var TextNode = /*#__PURE__*/function (_TSpanElement) {
  3318. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(TextNode, _TSpanElement);
  3319. var _super = _createSuper$7(TextNode);
  3320. function TextNode() {
  3321. var _this;
  3322. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, TextNode);
  3323. _this = _super.apply(this, arguments);
  3324. _this.type = 'textNode';
  3325. return _this;
  3326. }
  3327. return TextNode;
  3328. }(TSpanElement);
  3329. function preparePath(path) {
  3330. var d = path.replace(/,/gm, ' ') // get rid of all commas
  3331. // As the end of a match can also be the start of the next match, we need to run this replace twice.
  3332. .replace(/([MmZzLlHhVvCcSsQqTtAa])([^\s])/gm, '$1 $2') // suffix commands with spaces
  3333. .replace(/([MmZzLlHhVvCcSsQqTtAa])([^\s])/gm, '$1 $2') // suffix commands with spaces
  3334. .replace(/([^\s])([MmZzLlHhVvCcSsQqTtAa])/gm, '$1 $2') // prefix commands with spaces
  3335. .replace(/([0-9])([+\-])/gm, '$1 $2') // separate digits on +- signs
  3336. // Again, we need to run this twice to find all occurances
  3337. .replace(/(\.[0-9]*)(\.)/gm, '$1 $2') // separate digits when they start with a comma
  3338. .replace(/(\.[0-9]*)(\.)/gm, '$1 $2') // separate digits when they start with a comma
  3339. .replace(/([Aa](?:\s+(?:[0-9]*\.)?[0-9]+){3})\s+([01])\s*([01])/gm, '$1 $2 $3 '); // shorthand elliptical arc path syntax
  3340. return compressSpaces(d).trim();
  3341. }
  3342. var PathParser = /*#__PURE__*/function () {
  3343. function PathParser(path) {
  3344. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, PathParser);
  3345. this.control = null;
  3346. this.start = null;
  3347. this.current = null;
  3348. this.command = '';
  3349. this.tokens = [];
  3350. this.i = -1;
  3351. this.previousCommand = '';
  3352. this.points = [];
  3353. this.angles = [];
  3354. this.tokens = preparePath(path).split(' ');
  3355. }
  3356. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(PathParser, [{
  3357. key: "reset",
  3358. value: function reset() {
  3359. this.i = -1;
  3360. this.command = '';
  3361. this.previousCommand = '';
  3362. this.start = new Point(0, 0);
  3363. this.control = new Point(0, 0);
  3364. this.current = new Point(0, 0);
  3365. this.points = [];
  3366. this.angles = [];
  3367. }
  3368. }, {
  3369. key: "isEnd",
  3370. value: function isEnd() {
  3371. var i = this.i,
  3372. tokens = this.tokens;
  3373. return i >= tokens.length - 1;
  3374. }
  3375. }, {
  3376. key: "isCommandOrEnd",
  3377. value: function isCommandOrEnd() {
  3378. if (this.isEnd()) {
  3379. return true;
  3380. }
  3381. var i = this.i,
  3382. tokens = this.tokens;
  3383. return /^[A-Za-z]$/.test(tokens[i + 1]);
  3384. }
  3385. }, {
  3386. key: "isRelativeCommand",
  3387. value: function isRelativeCommand() {
  3388. switch (this.command) {
  3389. case 'm':
  3390. case 'l':
  3391. case 'h':
  3392. case 'v':
  3393. case 'c':
  3394. case 's':
  3395. case 'q':
  3396. case 't':
  3397. case 'a':
  3398. case 'z':
  3399. return true;
  3400. default:
  3401. return false;
  3402. }
  3403. }
  3404. }, {
  3405. key: "getToken",
  3406. value: function getToken() {
  3407. this.i++;
  3408. return this.tokens[this.i];
  3409. }
  3410. }, {
  3411. key: "getScalar",
  3412. value: function getScalar() {
  3413. return parseFloat(this.getToken());
  3414. }
  3415. }, {
  3416. key: "nextCommand",
  3417. value: function nextCommand() {
  3418. this.previousCommand = this.command;
  3419. this.command = this.getToken();
  3420. }
  3421. }, {
  3422. key: "getPoint",
  3423. value: function getPoint() {
  3424. var point = new Point(this.getScalar(), this.getScalar());
  3425. return this.makeAbsolute(point);
  3426. }
  3427. }, {
  3428. key: "getAsControlPoint",
  3429. value: function getAsControlPoint() {
  3430. var point = this.getPoint();
  3431. this.control = point;
  3432. return point;
  3433. }
  3434. }, {
  3435. key: "getAsCurrentPoint",
  3436. value: function getAsCurrentPoint() {
  3437. var point = this.getPoint();
  3438. this.current = point;
  3439. return point;
  3440. }
  3441. }, {
  3442. key: "getReflectedControlPoint",
  3443. value: function getReflectedControlPoint() {
  3444. var previousCommand = this.previousCommand.toLowerCase();
  3445. if (previousCommand !== 'c' && previousCommand !== 's' && previousCommand !== 'q' && previousCommand !== 't') {
  3446. return this.current;
  3447. } // reflect point
  3448. var _this$current = this.current,
  3449. cx = _this$current.x,
  3450. cy = _this$current.y,
  3451. _this$control = this.control,
  3452. ox = _this$control.x,
  3453. oy = _this$control.y;
  3454. var point = new Point(2 * cx - ox, 2 * cy - oy);
  3455. return point;
  3456. }
  3457. }, {
  3458. key: "makeAbsolute",
  3459. value: function makeAbsolute(point) {
  3460. if (this.isRelativeCommand()) {
  3461. var _this$current2 = this.current,
  3462. x = _this$current2.x,
  3463. y = _this$current2.y;
  3464. point.x += x;
  3465. point.y += y;
  3466. }
  3467. return point;
  3468. }
  3469. }, {
  3470. key: "addMarker",
  3471. value: function addMarker(point, from, priorTo) {
  3472. var points = this.points,
  3473. angles = this.angles; // if the last angle isn't filled in because we didn't have this point yet ...
  3474. if (priorTo && angles.length > 0 && !angles[angles.length - 1]) {
  3475. angles[angles.length - 1] = points[points.length - 1].angleTo(priorTo);
  3476. }
  3477. this.addMarkerAngle(point, from ? from.angleTo(point) : null);
  3478. }
  3479. }, {
  3480. key: "addMarkerAngle",
  3481. value: function addMarkerAngle(point, angle) {
  3482. this.points.push(point);
  3483. this.angles.push(angle);
  3484. }
  3485. }, {
  3486. key: "getMarkerPoints",
  3487. value: function getMarkerPoints() {
  3488. return this.points;
  3489. }
  3490. }, {
  3491. key: "getMarkerAngles",
  3492. value: function getMarkerAngles() {
  3493. var angles = this.angles;
  3494. var len = angles.length;
  3495. for (var i = 0; i < len; i++) {
  3496. if (!angles[i]) {
  3497. for (var j = i + 1; j < len; j++) {
  3498. if (angles[j]) {
  3499. angles[i] = angles[j];
  3500. break;
  3501. }
  3502. }
  3503. }
  3504. }
  3505. return angles;
  3506. }
  3507. }]);
  3508. return PathParser;
  3509. }();
  3510. function _createSuper$8(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$8()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
  3511. function _isNativeReflectConstruct$8() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  3512. var PathElement = /*#__PURE__*/function (_RenderedElement) {
  3513. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(PathElement, _RenderedElement);
  3514. var _super = _createSuper$8(PathElement);
  3515. function PathElement(document, node, captureTextNodes) {
  3516. var _this;
  3517. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, PathElement);
  3518. _this = _super.call(this, document, node, captureTextNodes);
  3519. _this.type = 'path';
  3520. _this.pathParser = null;
  3521. _this.pathParser = new PathParser(_this.getAttribute('d').getString());
  3522. return _this;
  3523. }
  3524. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(PathElement, [{
  3525. key: "path",
  3526. value: function path(ctx) {
  3527. var pathParser = this.pathParser;
  3528. var boundingBox = new BoundingBox();
  3529. pathParser.reset();
  3530. if (ctx) {
  3531. ctx.beginPath();
  3532. }
  3533. while (!pathParser.isEnd()) {
  3534. pathParser.nextCommand();
  3535. switch (pathParser.command) {
  3536. case 'M':
  3537. case 'm':
  3538. this.pathM(ctx, boundingBox);
  3539. break;
  3540. case 'L':
  3541. case 'l':
  3542. this.pathL(ctx, boundingBox);
  3543. break;
  3544. case 'H':
  3545. case 'h':
  3546. this.pathH(ctx, boundingBox);
  3547. break;
  3548. case 'V':
  3549. case 'v':
  3550. this.pathV(ctx, boundingBox);
  3551. break;
  3552. case 'C':
  3553. case 'c':
  3554. this.pathC(ctx, boundingBox);
  3555. break;
  3556. case 'S':
  3557. case 's':
  3558. this.pathS(ctx, boundingBox);
  3559. break;
  3560. case 'Q':
  3561. case 'q':
  3562. this.pathQ(ctx, boundingBox);
  3563. break;
  3564. case 'T':
  3565. case 't':
  3566. this.pathT(ctx, boundingBox);
  3567. break;
  3568. case 'A':
  3569. case 'a':
  3570. this.pathA(ctx, boundingBox);
  3571. break;
  3572. case 'Z':
  3573. case 'z':
  3574. this.pathZ(ctx, boundingBox);
  3575. break;
  3576. }
  3577. }
  3578. return boundingBox;
  3579. }
  3580. }, {
  3581. key: "getBoundingBox",
  3582. value: function getBoundingBox(_) {
  3583. return this.path();
  3584. }
  3585. }, {
  3586. key: "getMarkers",
  3587. value: function getMarkers() {
  3588. var pathParser = this.pathParser;
  3589. var points = pathParser.getMarkerPoints();
  3590. var angles = pathParser.getMarkerAngles();
  3591. var markers = points.map(function (point, i) {
  3592. return [point, angles[i]];
  3593. });
  3594. return markers;
  3595. }
  3596. }, {
  3597. key: "renderChildren",
  3598. value: function renderChildren(ctx) {
  3599. this.path(ctx);
  3600. this.document.screen.mouse.checkPath(this, ctx);
  3601. var fillRuleStyleProp = this.getStyle('fill-rule');
  3602. if (ctx.fillStyle !== '') {
  3603. if (fillRuleStyleProp.getString('inherit') !== 'inherit') {
  3604. ctx.fill(fillRuleStyleProp.getString());
  3605. } else {
  3606. ctx.fill();
  3607. }
  3608. }
  3609. if (ctx.strokeStyle !== '') {
  3610. ctx.stroke();
  3611. }
  3612. var markers = this.getMarkers();
  3613. if (markers) {
  3614. var markersLastIndex = markers.length - 1;
  3615. var markerStartStyleProp = this.getStyle('marker-start');
  3616. var markerMidStyleProp = this.getStyle('marker-mid');
  3617. var markerEndStyleProp = this.getStyle('marker-end');
  3618. if (markerStartStyleProp.isUrlDefinition()) {
  3619. var marker = markerStartStyleProp.getDefinition();
  3620. var _markers$ = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(markers[0], 2),
  3621. point = _markers$[0],
  3622. angle = _markers$[1];
  3623. marker.render(ctx, point, angle);
  3624. }
  3625. if (markerMidStyleProp.isUrlDefinition()) {
  3626. var _marker = markerMidStyleProp.getDefinition();
  3627. for (var i = 1; i < markersLastIndex; i++) {
  3628. var _markers$i = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(markers[i], 2),
  3629. _point = _markers$i[0],
  3630. _angle = _markers$i[1];
  3631. _marker.render(ctx, _point, _angle);
  3632. }
  3633. }
  3634. if (markerEndStyleProp.isUrlDefinition()) {
  3635. var _marker2 = markerEndStyleProp.getDefinition();
  3636. var _markers$markersLastI = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(markers[markersLastIndex], 2),
  3637. _point2 = _markers$markersLastI[0],
  3638. _angle2 = _markers$markersLastI[1];
  3639. _marker2.render(ctx, _point2, _angle2);
  3640. }
  3641. }
  3642. }
  3643. }, {
  3644. key: "pathM",
  3645. value: function pathM(ctx, boundingBox) {
  3646. var pathParser = this.pathParser;
  3647. var point = pathParser.getAsCurrentPoint();
  3648. var x = point.x,
  3649. y = point.y;
  3650. pathParser.addMarker(point);
  3651. boundingBox.addPoint(x, y);
  3652. if (ctx) {
  3653. ctx.moveTo(x, y);
  3654. }
  3655. pathParser.start = pathParser.current;
  3656. while (!pathParser.isCommandOrEnd()) {
  3657. var _point3 = pathParser.getAsCurrentPoint();
  3658. var _x = _point3.x,
  3659. _y = _point3.y;
  3660. pathParser.addMarker(_point3, pathParser.start);
  3661. boundingBox.addPoint(_x, _y);
  3662. if (ctx) {
  3663. ctx.lineTo(_x, _y);
  3664. }
  3665. }
  3666. }
  3667. }, {
  3668. key: "pathL",
  3669. value: function pathL(ctx, boundingBox) {
  3670. var pathParser = this.pathParser;
  3671. while (!pathParser.isCommandOrEnd()) {
  3672. var current = pathParser.current;
  3673. var point = pathParser.getAsCurrentPoint();
  3674. var x = point.x,
  3675. y = point.y;
  3676. pathParser.addMarker(point, current);
  3677. boundingBox.addPoint(x, y);
  3678. if (ctx) {
  3679. ctx.lineTo(x, y);
  3680. }
  3681. }
  3682. }
  3683. }, {
  3684. key: "pathH",
  3685. value: function pathH(ctx, boundingBox) {
  3686. var pathParser = this.pathParser;
  3687. while (!pathParser.isCommandOrEnd()) {
  3688. var current = pathParser.current;
  3689. var point = new Point((pathParser.isRelativeCommand() ? current.x : 0) + pathParser.getScalar(), current.y);
  3690. pathParser.addMarker(point, current);
  3691. pathParser.current = point;
  3692. boundingBox.addPoint(point.x, point.y);
  3693. if (ctx) {
  3694. ctx.lineTo(point.x, point.y);
  3695. }
  3696. }
  3697. }
  3698. }, {
  3699. key: "pathV",
  3700. value: function pathV(ctx, boundingBox) {
  3701. var pathParser = this.pathParser;
  3702. while (!pathParser.isCommandOrEnd()) {
  3703. var current = pathParser.current;
  3704. var point = new Point(current.x, (pathParser.isRelativeCommand() ? current.y : 0) + pathParser.getScalar());
  3705. pathParser.addMarker(point, current);
  3706. pathParser.current = point;
  3707. boundingBox.addPoint(point.x, point.y);
  3708. if (ctx) {
  3709. ctx.lineTo(point.x, point.y);
  3710. }
  3711. }
  3712. }
  3713. }, {
  3714. key: "pathC",
  3715. value: function pathC(ctx, boundingBox) {
  3716. var pathParser = this.pathParser;
  3717. while (!pathParser.isCommandOrEnd()) {
  3718. var current = pathParser.current;
  3719. var point = pathParser.getPoint();
  3720. var controlPoint = pathParser.getAsControlPoint();
  3721. var currentPoint = pathParser.getAsCurrentPoint();
  3722. pathParser.addMarker(currentPoint, controlPoint, point);
  3723. boundingBox.addBezierCurve(current.x, current.y, point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
  3724. if (ctx) {
  3725. ctx.bezierCurveTo(point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
  3726. }
  3727. }
  3728. }
  3729. }, {
  3730. key: "pathS",
  3731. value: function pathS(ctx, boundingBox) {
  3732. var pathParser = this.pathParser;
  3733. while (!pathParser.isCommandOrEnd()) {
  3734. var current = pathParser.current;
  3735. var point = pathParser.getReflectedControlPoint();
  3736. var controlPoint = pathParser.getAsControlPoint();
  3737. var currentPoint = pathParser.getAsCurrentPoint();
  3738. pathParser.addMarker(currentPoint, controlPoint, point);
  3739. boundingBox.addBezierCurve(current.x, current.y, point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
  3740. if (ctx) {
  3741. ctx.bezierCurveTo(point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
  3742. }
  3743. }
  3744. }
  3745. }, {
  3746. key: "pathQ",
  3747. value: function pathQ(ctx, boundingBox) {
  3748. var pathParser = this.pathParser;
  3749. while (!pathParser.isCommandOrEnd()) {
  3750. var current = pathParser.current;
  3751. var controlPoint = pathParser.getAsControlPoint();
  3752. var currentPoint = pathParser.getAsCurrentPoint();
  3753. pathParser.addMarker(currentPoint, controlPoint, controlPoint);
  3754. boundingBox.addQuadraticCurve(current.x, current.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
  3755. if (ctx) {
  3756. ctx.quadraticCurveTo(controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
  3757. }
  3758. }
  3759. }
  3760. }, {
  3761. key: "pathT",
  3762. value: function pathT(ctx, boundingBox) {
  3763. var pathParser = this.pathParser;
  3764. while (!pathParser.isCommandOrEnd()) {
  3765. var current = pathParser.current;
  3766. var controlPoint = pathParser.getReflectedControlPoint();
  3767. pathParser.control = controlPoint;
  3768. var currentPoint = pathParser.getAsCurrentPoint();
  3769. pathParser.addMarker(currentPoint, controlPoint, controlPoint);
  3770. boundingBox.addQuadraticCurve(current.x, current.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
  3771. if (ctx) {
  3772. ctx.quadraticCurveTo(controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
  3773. }
  3774. }
  3775. }
  3776. }, {
  3777. key: "pathA",
  3778. value: function pathA(ctx, boundingBox) {
  3779. var pathParser = this.pathParser;
  3780. while (!pathParser.isCommandOrEnd()) {
  3781. var current = pathParser.current;
  3782. var rx = pathParser.getScalar();
  3783. var ry = pathParser.getScalar();
  3784. var xAxisRotation = pathParser.getScalar() * (Math.PI / 180.0);
  3785. var largeArcFlag = pathParser.getScalar();
  3786. var sweepFlag = pathParser.getScalar();
  3787. var currentPoint = pathParser.getAsCurrentPoint(); // Conversion from endpoint to center parameterization
  3788. // http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes
  3789. // x1', y1'
  3790. var currp = new Point(Math.cos(xAxisRotation) * (current.x - currentPoint.x) / 2.0 + Math.sin(xAxisRotation) * (current.y - currentPoint.y) / 2.0, -Math.sin(xAxisRotation) * (current.x - currentPoint.x) / 2.0 + Math.cos(xAxisRotation) * (current.y - currentPoint.y) / 2.0); // adjust radii
  3791. var l = Math.pow(currp.x, 2) / Math.pow(rx, 2) + Math.pow(currp.y, 2) / Math.pow(ry, 2);
  3792. if (l > 1) {
  3793. rx *= Math.sqrt(l);
  3794. ry *= Math.sqrt(l);
  3795. } // cx', cy'
  3796. var s = (largeArcFlag === sweepFlag ? -1 : 1) * Math.sqrt((Math.pow(rx, 2) * Math.pow(ry, 2) - Math.pow(rx, 2) * Math.pow(currp.y, 2) - Math.pow(ry, 2) * Math.pow(currp.x, 2)) / (Math.pow(rx, 2) * Math.pow(currp.y, 2) + Math.pow(ry, 2) * Math.pow(currp.x, 2)));
  3797. if (isNaN(s)) {
  3798. s = 0;
  3799. }
  3800. var cpp = new Point(s * rx * currp.y / ry, s * -ry * currp.x / rx); // cx, cy
  3801. var centp = new Point((current.x + currentPoint.x) / 2.0 + Math.cos(xAxisRotation) * cpp.x - Math.sin(xAxisRotation) * cpp.y, (current.y + currentPoint.y) / 2.0 + Math.sin(xAxisRotation) * cpp.x + Math.cos(xAxisRotation) * cpp.y); // initial angle
  3802. var a1 = vectorsAngle([1, 0], [(currp.x - cpp.x) / rx, (currp.y - cpp.y) / ry]); // angle delta
  3803. var u = [(currp.x - cpp.x) / rx, (currp.y - cpp.y) / ry];
  3804. var v = [(-currp.x - cpp.x) / rx, (-currp.y - cpp.y) / ry];
  3805. var ad = vectorsAngle(u, v);
  3806. if (vectorsRatio(u, v) <= -1) {
  3807. ad = Math.PI;
  3808. }
  3809. if (vectorsRatio(u, v) >= 1) {
  3810. ad = 0;
  3811. } // for markers
  3812. var dir = 1 - sweepFlag ? 1.0 : -1.0;
  3813. var ah = a1 + dir * (ad / 2.0);
  3814. var halfWay = new Point(centp.x + rx * Math.cos(ah), centp.y + ry * Math.sin(ah));
  3815. pathParser.addMarkerAngle(halfWay, ah - dir * Math.PI / 2);
  3816. pathParser.addMarkerAngle(currentPoint, ah - dir * Math.PI);
  3817. boundingBox.addPoint(currentPoint.x, currentPoint.y); // TODO: this is too naive, make it better
  3818. if (ctx && !isNaN(a1) && !isNaN(ad)) {
  3819. var r = rx > ry ? rx : ry;
  3820. var sx = rx > ry ? 1 : rx / ry;
  3821. var sy = rx > ry ? ry / rx : 1;
  3822. ctx.translate(centp.x, centp.y);
  3823. ctx.rotate(xAxisRotation);
  3824. ctx.scale(sx, sy);
  3825. ctx.arc(0, 0, r, a1, a1 + ad, Boolean(1 - sweepFlag));
  3826. ctx.scale(1 / sx, 1 / sy);
  3827. ctx.rotate(-xAxisRotation);
  3828. ctx.translate(-centp.x, -centp.y);
  3829. }
  3830. }
  3831. }
  3832. }, {
  3833. key: "pathZ",
  3834. value: function pathZ(ctx, boundingBox) {
  3835. var pathParser = this.pathParser;
  3836. if (ctx) {
  3837. // only close path if it is not a straight line
  3838. if (boundingBox.x1 !== boundingBox.x2 && boundingBox.y1 !== boundingBox.y2) {
  3839. ctx.closePath();
  3840. }
  3841. }
  3842. pathParser.current = pathParser.start;
  3843. }
  3844. }]);
  3845. return PathElement;
  3846. }(RenderedElement);
  3847. function _createSuper$9(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$9()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
  3848. function _isNativeReflectConstruct$9() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  3849. var SVGElement = /*#__PURE__*/function (_RenderedElement) {
  3850. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(SVGElement, _RenderedElement);
  3851. var _super = _createSuper$9(SVGElement);
  3852. function SVGElement() {
  3853. var _this;
  3854. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, SVGElement);
  3855. _this = _super.apply(this, arguments);
  3856. _this.type = 'svg';
  3857. _this.root = false;
  3858. return _this;
  3859. }
  3860. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(SVGElement, [{
  3861. key: "clearContext",
  3862. value: function clearContext(ctx) {
  3863. (0,_babel_runtime_helpers_get__WEBPACK_IMPORTED_MODULE_42__.default)((0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(SVGElement.prototype), "clearContext", this).call(this, ctx);
  3864. this.document.screen.viewPort.removeCurrent();
  3865. }
  3866. }, {
  3867. key: "setContext",
  3868. value: function setContext(ctx) {
  3869. var document = this.document;
  3870. var screen = document.screen,
  3871. window = document.window;
  3872. var canvas = ctx.canvas;
  3873. screen.setDefaults(ctx);
  3874. if (canvas.style && typeof ctx.font !== 'undefined' && window && typeof window.getComputedStyle !== 'undefined') {
  3875. ctx.font = window.getComputedStyle(canvas).getPropertyValue('font');
  3876. var fontSizeProp = new Property(document, 'fontSize', Font.parse(ctx.font).fontSize);
  3877. if (fontSizeProp.hasValue()) {
  3878. document.rootEmSize = fontSizeProp.getPixels('y');
  3879. document.emSize = document.rootEmSize;
  3880. }
  3881. }
  3882. (0,_babel_runtime_helpers_get__WEBPACK_IMPORTED_MODULE_42__.default)((0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(SVGElement.prototype), "setContext", this).call(this, ctx); // create new view port
  3883. if (!this.getAttribute('x').hasValue()) {
  3884. this.getAttribute('x', true).setValue(0);
  3885. }
  3886. if (!this.getAttribute('y').hasValue()) {
  3887. this.getAttribute('y', true).setValue(0);
  3888. }
  3889. ctx.translate(this.getAttribute('x').getPixels('x'), this.getAttribute('y').getPixels('y'));
  3890. var _screen$viewPort = screen.viewPort,
  3891. width = _screen$viewPort.width,
  3892. height = _screen$viewPort.height;
  3893. if (!this.getStyle('width').hasValue()) {
  3894. this.getStyle('width', true).setValue('100%');
  3895. }
  3896. if (!this.getStyle('height').hasValue()) {
  3897. this.getStyle('height', true).setValue('100%');
  3898. }
  3899. if (!this.getStyle('color').hasValue()) {
  3900. this.getStyle('color', true).setValue('black');
  3901. }
  3902. var refXAttr = this.getAttribute('refX');
  3903. var refYAttr = this.getAttribute('refY');
  3904. var viewBoxAttr = this.getAttribute('viewBox');
  3905. var viewBox = viewBoxAttr.hasValue() ? toNumbers(viewBoxAttr.getString()) : null;
  3906. var clip = !this.root && this.getAttribute('overflow').getValue('hidden') !== 'visible';
  3907. var minX = 0;
  3908. var minY = 0;
  3909. var clipX = 0;
  3910. var clipY = 0;
  3911. if (viewBox) {
  3912. minX = viewBox[0];
  3913. minY = viewBox[1];
  3914. }
  3915. if (!this.root) {
  3916. width = this.getStyle('width').getPixels('x');
  3917. height = this.getStyle('height').getPixels('y');
  3918. if (this.type === 'marker') {
  3919. clipX = minX;
  3920. clipY = minY;
  3921. minX = 0;
  3922. minY = 0;
  3923. }
  3924. }
  3925. screen.viewPort.setCurrent(width, height);
  3926. if (viewBox) {
  3927. width = viewBox[2];
  3928. height = viewBox[3];
  3929. }
  3930. document.setViewBox({
  3931. ctx: ctx,
  3932. aspectRatio: this.getAttribute('preserveAspectRatio').getString(),
  3933. width: screen.viewPort.width,
  3934. desiredWidth: width,
  3935. height: screen.viewPort.height,
  3936. desiredHeight: height,
  3937. minX: minX,
  3938. minY: minY,
  3939. refX: refXAttr.getValue(),
  3940. refY: refYAttr.getValue(),
  3941. clip: clip,
  3942. clipX: clipX,
  3943. clipY: clipY
  3944. });
  3945. if (viewBox) {
  3946. screen.viewPort.removeCurrent();
  3947. screen.viewPort.setCurrent(width, height);
  3948. }
  3949. }
  3950. /**
  3951. * Resize SVG to fit in given size.
  3952. * @param width
  3953. * @param height
  3954. * @param preserveAspectRatio
  3955. */
  3956. }, {
  3957. key: "resize",
  3958. value: function resize(width) {
  3959. var height = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : width;
  3960. var preserveAspectRatio = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  3961. var widthAttr = this.getAttribute('width', true);
  3962. var heightAttr = this.getAttribute('height', true);
  3963. var viewBoxAttr = this.getAttribute('viewBox');
  3964. var styleAttr = this.getAttribute('style');
  3965. var originWidth = widthAttr.getNumber(0);
  3966. var originHeight = heightAttr.getNumber(0);
  3967. if (preserveAspectRatio) {
  3968. if (typeof preserveAspectRatio === 'string') {
  3969. this.getAttribute('preserveAspectRatio', true).setValue(preserveAspectRatio);
  3970. } else {
  3971. var preserveAspectRatioAttr = this.getAttribute('preserveAspectRatio');
  3972. if (preserveAspectRatioAttr.hasValue()) {
  3973. preserveAspectRatioAttr.setValue(preserveAspectRatioAttr.getString().replace(/^\s*(\S.*\S)\s*$/, '$1'));
  3974. }
  3975. }
  3976. }
  3977. widthAttr.setValue(width);
  3978. heightAttr.setValue(height);
  3979. if (!viewBoxAttr.hasValue()) {
  3980. viewBoxAttr.setValue("0 0 ".concat(originWidth || width, " ").concat(originHeight || height));
  3981. }
  3982. if (styleAttr.hasValue()) {
  3983. var widthStyle = this.getStyle('width');
  3984. var heightStyle = this.getStyle('height');
  3985. if (widthStyle.hasValue()) {
  3986. widthStyle.setValue("".concat(width, "px"));
  3987. }
  3988. if (heightStyle.hasValue()) {
  3989. heightStyle.setValue("".concat(height, "px"));
  3990. }
  3991. }
  3992. }
  3993. }]);
  3994. return SVGElement;
  3995. }(RenderedElement);
  3996. function _createSuper$a(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$a()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
  3997. function _isNativeReflectConstruct$a() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  3998. var RectElement = /*#__PURE__*/function (_PathElement) {
  3999. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(RectElement, _PathElement);
  4000. var _super = _createSuper$a(RectElement);
  4001. function RectElement() {
  4002. var _this;
  4003. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, RectElement);
  4004. _this = _super.apply(this, arguments);
  4005. _this.type = 'rect';
  4006. return _this;
  4007. }
  4008. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(RectElement, [{
  4009. key: "path",
  4010. value: function path(ctx) {
  4011. var x = this.getAttribute('x').getPixels('x');
  4012. var y = this.getAttribute('y').getPixels('y');
  4013. var width = this.getStyle('width').getPixels('x');
  4014. var height = this.getStyle('height').getPixels('y');
  4015. var rxAttr = this.getAttribute('rx');
  4016. var ryAttr = this.getAttribute('ry');
  4017. var rx = rxAttr.getPixels('x');
  4018. var ry = ryAttr.getPixels('y');
  4019. if (rxAttr.hasValue() && !ryAttr.hasValue()) {
  4020. ry = rx;
  4021. }
  4022. if (ryAttr.hasValue() && !rxAttr.hasValue()) {
  4023. rx = ry;
  4024. }
  4025. rx = Math.min(rx, width / 2.0);
  4026. ry = Math.min(ry, height / 2.0);
  4027. if (ctx) {
  4028. var KAPPA = 4 * ((Math.sqrt(2) - 1) / 3);
  4029. ctx.beginPath(); // always start the path so we don't fill prior paths
  4030. if (height > 0 && width > 0) {
  4031. ctx.moveTo(x + rx, y);
  4032. ctx.lineTo(x + width - rx, y);
  4033. ctx.bezierCurveTo(x + width - rx + KAPPA * rx, y, x + width, y + ry - KAPPA * ry, x + width, y + ry);
  4034. ctx.lineTo(x + width, y + height - ry);
  4035. ctx.bezierCurveTo(x + width, y + height - ry + KAPPA * ry, x + width - rx + KAPPA * rx, y + height, x + width - rx, y + height);
  4036. ctx.lineTo(x + rx, y + height);
  4037. ctx.bezierCurveTo(x + rx - KAPPA * rx, y + height, x, y + height - ry + KAPPA * ry, x, y + height - ry);
  4038. ctx.lineTo(x, y + ry);
  4039. ctx.bezierCurveTo(x, y + ry - KAPPA * ry, x + rx - KAPPA * rx, y, x + rx, y);
  4040. ctx.closePath();
  4041. }
  4042. }
  4043. return new BoundingBox(x, y, x + width, y + height);
  4044. }
  4045. }, {
  4046. key: "getMarkers",
  4047. value: function getMarkers() {
  4048. return null;
  4049. }
  4050. }]);
  4051. return RectElement;
  4052. }(PathElement);
  4053. function _createSuper$b(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$b()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
  4054. function _isNativeReflectConstruct$b() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  4055. var CircleElement = /*#__PURE__*/function (_PathElement) {
  4056. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(CircleElement, _PathElement);
  4057. var _super = _createSuper$b(CircleElement);
  4058. function CircleElement() {
  4059. var _this;
  4060. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, CircleElement);
  4061. _this = _super.apply(this, arguments);
  4062. _this.type = 'circle';
  4063. return _this;
  4064. }
  4065. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(CircleElement, [{
  4066. key: "path",
  4067. value: function path(ctx) {
  4068. var cx = this.getAttribute('cx').getPixels('x');
  4069. var cy = this.getAttribute('cy').getPixels('y');
  4070. var r = this.getAttribute('r').getPixels();
  4071. if (ctx && r > 0) {
  4072. ctx.beginPath();
  4073. ctx.arc(cx, cy, r, 0, Math.PI * 2, false);
  4074. ctx.closePath();
  4075. }
  4076. return new BoundingBox(cx - r, cy - r, cx + r, cy + r);
  4077. }
  4078. }, {
  4079. key: "getMarkers",
  4080. value: function getMarkers() {
  4081. return null;
  4082. }
  4083. }]);
  4084. return CircleElement;
  4085. }(PathElement);
  4086. function _createSuper$c(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$c()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
  4087. function _isNativeReflectConstruct$c() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  4088. var EllipseElement = /*#__PURE__*/function (_PathElement) {
  4089. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(EllipseElement, _PathElement);
  4090. var _super = _createSuper$c(EllipseElement);
  4091. function EllipseElement() {
  4092. var _this;
  4093. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, EllipseElement);
  4094. _this = _super.apply(this, arguments);
  4095. _this.type = 'ellipse';
  4096. return _this;
  4097. }
  4098. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(EllipseElement, [{
  4099. key: "path",
  4100. value: function path(ctx) {
  4101. var KAPPA = 4 * ((Math.sqrt(2) - 1) / 3);
  4102. var rx = this.getAttribute('rx').getPixels('x');
  4103. var ry = this.getAttribute('ry').getPixels('y');
  4104. var cx = this.getAttribute('cx').getPixels('x');
  4105. var cy = this.getAttribute('cy').getPixels('y');
  4106. if (ctx && rx > 0 && ry > 0) {
  4107. ctx.beginPath();
  4108. ctx.moveTo(cx + rx, cy);
  4109. ctx.bezierCurveTo(cx + rx, cy + KAPPA * ry, cx + KAPPA * rx, cy + ry, cx, cy + ry);
  4110. ctx.bezierCurveTo(cx - KAPPA * rx, cy + ry, cx - rx, cy + KAPPA * ry, cx - rx, cy);
  4111. ctx.bezierCurveTo(cx - rx, cy - KAPPA * ry, cx - KAPPA * rx, cy - ry, cx, cy - ry);
  4112. ctx.bezierCurveTo(cx + KAPPA * rx, cy - ry, cx + rx, cy - KAPPA * ry, cx + rx, cy);
  4113. ctx.closePath();
  4114. }
  4115. return new BoundingBox(cx - rx, cy - ry, cx + rx, cy + ry);
  4116. }
  4117. }, {
  4118. key: "getMarkers",
  4119. value: function getMarkers() {
  4120. return null;
  4121. }
  4122. }]);
  4123. return EllipseElement;
  4124. }(PathElement);
  4125. function _createSuper$d(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$d()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
  4126. function _isNativeReflectConstruct$d() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  4127. var LineElement = /*#__PURE__*/function (_PathElement) {
  4128. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(LineElement, _PathElement);
  4129. var _super = _createSuper$d(LineElement);
  4130. function LineElement() {
  4131. var _this;
  4132. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, LineElement);
  4133. _this = _super.apply(this, arguments);
  4134. _this.type = 'line';
  4135. return _this;
  4136. }
  4137. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(LineElement, [{
  4138. key: "getPoints",
  4139. value: function getPoints() {
  4140. return [new Point(this.getAttribute('x1').getPixels('x'), this.getAttribute('y1').getPixels('y')), new Point(this.getAttribute('x2').getPixels('x'), this.getAttribute('y2').getPixels('y'))];
  4141. }
  4142. }, {
  4143. key: "path",
  4144. value: function path(ctx) {
  4145. var _this$getPoints = this.getPoints(),
  4146. _this$getPoints2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_this$getPoints, 2),
  4147. _this$getPoints2$ = _this$getPoints2[0],
  4148. x0 = _this$getPoints2$.x,
  4149. y0 = _this$getPoints2$.y,
  4150. _this$getPoints2$2 = _this$getPoints2[1],
  4151. x1 = _this$getPoints2$2.x,
  4152. y1 = _this$getPoints2$2.y;
  4153. if (ctx) {
  4154. ctx.beginPath();
  4155. ctx.moveTo(x0, y0);
  4156. ctx.lineTo(x1, y1);
  4157. }
  4158. return new BoundingBox(x0, y0, x1, y1);
  4159. }
  4160. }, {
  4161. key: "getMarkers",
  4162. value: function getMarkers() {
  4163. var _this$getPoints3 = this.getPoints(),
  4164. _this$getPoints4 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_this$getPoints3, 2),
  4165. p0 = _this$getPoints4[0],
  4166. p1 = _this$getPoints4[1];
  4167. var a = p0.angleTo(p1);
  4168. return [[p0, a], [p1, a]];
  4169. }
  4170. }]);
  4171. return LineElement;
  4172. }(PathElement);
  4173. function _createSuper$e(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$e()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
  4174. function _isNativeReflectConstruct$e() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  4175. var PolylineElement = /*#__PURE__*/function (_PathElement) {
  4176. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(PolylineElement, _PathElement);
  4177. var _super = _createSuper$e(PolylineElement);
  4178. function PolylineElement(document, node, captureTextNodes) {
  4179. var _this;
  4180. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, PolylineElement);
  4181. _this = _super.call(this, document, node, captureTextNodes);
  4182. _this.type = 'polyline';
  4183. _this.points = [];
  4184. _this.points = Point.parsePath(_this.getAttribute('points').getString());
  4185. return _this;
  4186. }
  4187. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(PolylineElement, [{
  4188. key: "path",
  4189. value: function path(ctx) {
  4190. var points = this.points;
  4191. var _points = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(points, 1),
  4192. _points$ = _points[0],
  4193. x0 = _points$.x,
  4194. y0 = _points$.y;
  4195. var boundingBox = new BoundingBox(x0, y0);
  4196. if (ctx) {
  4197. ctx.beginPath();
  4198. ctx.moveTo(x0, y0);
  4199. }
  4200. points.forEach(function (_ref) {
  4201. var x = _ref.x,
  4202. y = _ref.y;
  4203. boundingBox.addPoint(x, y);
  4204. if (ctx) {
  4205. ctx.lineTo(x, y);
  4206. }
  4207. });
  4208. return boundingBox;
  4209. }
  4210. }, {
  4211. key: "getMarkers",
  4212. value: function getMarkers() {
  4213. var points = this.points;
  4214. var lastIndex = points.length - 1;
  4215. var markers = [];
  4216. points.forEach(function (point, i) {
  4217. if (i === lastIndex) {
  4218. return;
  4219. }
  4220. markers.push([point, point.angleTo(points[i + 1])]);
  4221. });
  4222. if (markers.length > 0) {
  4223. markers.push([points[points.length - 1], markers[markers.length - 1][1]]);
  4224. }
  4225. return markers;
  4226. }
  4227. }]);
  4228. return PolylineElement;
  4229. }(PathElement);
  4230. function _createSuper$f(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$f()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
  4231. function _isNativeReflectConstruct$f() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  4232. var PolygonElement = /*#__PURE__*/function (_PolylineElement) {
  4233. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(PolygonElement, _PolylineElement);
  4234. var _super = _createSuper$f(PolygonElement);
  4235. function PolygonElement() {
  4236. var _this;
  4237. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, PolygonElement);
  4238. _this = _super.apply(this, arguments);
  4239. _this.type = 'polygon';
  4240. return _this;
  4241. }
  4242. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(PolygonElement, [{
  4243. key: "path",
  4244. value: function path(ctx) {
  4245. var boundingBox = (0,_babel_runtime_helpers_get__WEBPACK_IMPORTED_MODULE_42__.default)((0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(PolygonElement.prototype), "path", this).call(this, ctx);
  4246. var _this$points = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(this.points, 1),
  4247. _this$points$ = _this$points[0],
  4248. x = _this$points$.x,
  4249. y = _this$points$.y;
  4250. if (ctx) {
  4251. ctx.lineTo(x, y);
  4252. ctx.closePath();
  4253. }
  4254. return boundingBox;
  4255. }
  4256. }]);
  4257. return PolygonElement;
  4258. }(PolylineElement);
  4259. function _createSuper$g(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$g()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
  4260. function _isNativeReflectConstruct$g() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  4261. var PatternElement = /*#__PURE__*/function (_Element) {
  4262. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(PatternElement, _Element);
  4263. var _super = _createSuper$g(PatternElement);
  4264. function PatternElement() {
  4265. var _this;
  4266. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, PatternElement);
  4267. _this = _super.apply(this, arguments);
  4268. _this.type = 'pattern';
  4269. return _this;
  4270. }
  4271. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(PatternElement, [{
  4272. key: "createPattern",
  4273. value: function createPattern(ctx, _, parentOpacityProp) {
  4274. var width = this.getStyle('width').getPixels('x', true);
  4275. var height = this.getStyle('height').getPixels('y', true); // render me using a temporary svg element
  4276. var patternSvg = new SVGElement(this.document, null);
  4277. patternSvg.attributes.viewBox = new Property(this.document, 'viewBox', this.getAttribute('viewBox').getValue());
  4278. patternSvg.attributes.width = new Property(this.document, 'width', "".concat(width, "px"));
  4279. patternSvg.attributes.height = new Property(this.document, 'height', "".concat(height, "px"));
  4280. patternSvg.attributes.transform = new Property(this.document, 'transform', this.getAttribute('patternTransform').getValue());
  4281. patternSvg.children = this.children;
  4282. var patternCanvas = this.document.createCanvas(width, height);
  4283. var patternCtx = patternCanvas.getContext('2d');
  4284. var xAttr = this.getAttribute('x');
  4285. var yAttr = this.getAttribute('y');
  4286. if (xAttr.hasValue() && yAttr.hasValue()) {
  4287. patternCtx.translate(xAttr.getPixels('x', true), yAttr.getPixels('y', true));
  4288. }
  4289. if (parentOpacityProp.hasValue()) {
  4290. this.styles['fill-opacity'] = parentOpacityProp;
  4291. } else {
  4292. Reflect.deleteProperty(this.styles, 'fill-opacity');
  4293. } // render 3x3 grid so when we transform there's no white space on edges
  4294. for (var x = -1; x <= 1; x++) {
  4295. for (var y = -1; y <= 1; y++) {
  4296. patternCtx.save();
  4297. patternSvg.attributes.x = new Property(this.document, 'x', x * patternCanvas.width);
  4298. patternSvg.attributes.y = new Property(this.document, 'y', y * patternCanvas.height);
  4299. patternSvg.render(patternCtx);
  4300. patternCtx.restore();
  4301. }
  4302. }
  4303. var pattern = ctx.createPattern(patternCanvas, 'repeat');
  4304. return pattern;
  4305. }
  4306. }]);
  4307. return PatternElement;
  4308. }(Element);
  4309. function _createSuper$h(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$h()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
  4310. function _isNativeReflectConstruct$h() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  4311. var MarkerElement = /*#__PURE__*/function (_Element) {
  4312. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(MarkerElement, _Element);
  4313. var _super = _createSuper$h(MarkerElement);
  4314. function MarkerElement() {
  4315. var _this;
  4316. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, MarkerElement);
  4317. _this = _super.apply(this, arguments);
  4318. _this.type = 'marker';
  4319. return _this;
  4320. }
  4321. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(MarkerElement, [{
  4322. key: "render",
  4323. value: function render(ctx, point, angle) {
  4324. if (!point) {
  4325. return;
  4326. }
  4327. var x = point.x,
  4328. y = point.y;
  4329. var orient = this.getAttribute('orient').getValue('auto');
  4330. var markerUnits = this.getAttribute('markerUnits').getValue('strokeWidth');
  4331. ctx.translate(x, y);
  4332. if (orient === 'auto') {
  4333. ctx.rotate(angle);
  4334. }
  4335. if (markerUnits === 'strokeWidth') {
  4336. ctx.scale(ctx.lineWidth, ctx.lineWidth);
  4337. }
  4338. ctx.save(); // render me using a temporary svg element
  4339. var markerSvg = new SVGElement(this.document, null);
  4340. markerSvg.type = this.type;
  4341. markerSvg.attributes.viewBox = new Property(this.document, 'viewBox', this.getAttribute('viewBox').getValue());
  4342. markerSvg.attributes.refX = new Property(this.document, 'refX', this.getAttribute('refX').getValue());
  4343. markerSvg.attributes.refY = new Property(this.document, 'refY', this.getAttribute('refY').getValue());
  4344. markerSvg.attributes.width = new Property(this.document, 'width', this.getAttribute('markerWidth').getValue());
  4345. markerSvg.attributes.height = new Property(this.document, 'height', this.getAttribute('markerHeight').getValue());
  4346. markerSvg.attributes.overflow = new Property(this.document, 'overflow', this.getAttribute('overflow').getValue());
  4347. markerSvg.attributes.fill = new Property(this.document, 'fill', this.getAttribute('fill').getColor('black'));
  4348. markerSvg.attributes.stroke = new Property(this.document, 'stroke', this.getAttribute('stroke').getValue('none'));
  4349. markerSvg.children = this.children;
  4350. markerSvg.render(ctx);
  4351. ctx.restore();
  4352. if (markerUnits === 'strokeWidth') {
  4353. ctx.scale(1 / ctx.lineWidth, 1 / ctx.lineWidth);
  4354. }
  4355. if (orient === 'auto') {
  4356. ctx.rotate(-angle);
  4357. }
  4358. ctx.translate(-x, -y);
  4359. }
  4360. }]);
  4361. return MarkerElement;
  4362. }(Element);
  4363. function _createSuper$i(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$i()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
  4364. function _isNativeReflectConstruct$i() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  4365. var DefsElement = /*#__PURE__*/function (_Element) {
  4366. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(DefsElement, _Element);
  4367. var _super = _createSuper$i(DefsElement);
  4368. function DefsElement() {
  4369. var _this;
  4370. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, DefsElement);
  4371. _this = _super.apply(this, arguments);
  4372. _this.type = 'defs';
  4373. return _this;
  4374. }
  4375. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(DefsElement, [{
  4376. key: "render",
  4377. value: function render() {// NOOP
  4378. }
  4379. }]);
  4380. return DefsElement;
  4381. }(Element);
  4382. function _createSuper$j(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$j()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
  4383. function _isNativeReflectConstruct$j() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  4384. var GElement = /*#__PURE__*/function (_RenderedElement) {
  4385. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(GElement, _RenderedElement);
  4386. var _super = _createSuper$j(GElement);
  4387. function GElement() {
  4388. var _this;
  4389. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, GElement);
  4390. _this = _super.apply(this, arguments);
  4391. _this.type = 'g';
  4392. return _this;
  4393. }
  4394. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(GElement, [{
  4395. key: "getBoundingBox",
  4396. value: function getBoundingBox(ctx) {
  4397. var boundingBox = new BoundingBox();
  4398. this.children.forEach(function (child) {
  4399. boundingBox.addBoundingBox(child.getBoundingBox(ctx));
  4400. });
  4401. return boundingBox;
  4402. }
  4403. }]);
  4404. return GElement;
  4405. }(RenderedElement);
  4406. function _createSuper$k(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$k()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
  4407. function _isNativeReflectConstruct$k() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  4408. var GradientElement = /*#__PURE__*/function (_Element) {
  4409. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(GradientElement, _Element);
  4410. var _super = _createSuper$k(GradientElement);
  4411. function GradientElement(document, node, captureTextNodes) {
  4412. var _this;
  4413. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, GradientElement);
  4414. _this = _super.call(this, document, node, captureTextNodes);
  4415. _this.attributesToInherit = ['gradientUnits'];
  4416. _this.stops = [];
  4417. var _assertThisInitialize = (0,_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_46__.default)(_this),
  4418. stops = _assertThisInitialize.stops,
  4419. children = _assertThisInitialize.children;
  4420. children.forEach(function (child) {
  4421. if (child.type === 'stop') {
  4422. stops.push(child);
  4423. }
  4424. });
  4425. return _this;
  4426. }
  4427. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(GradientElement, [{
  4428. key: "getGradientUnits",
  4429. value: function getGradientUnits() {
  4430. return this.getAttribute('gradientUnits').getString('objectBoundingBox');
  4431. }
  4432. }, {
  4433. key: "createGradient",
  4434. value: function createGradient(ctx, element, parentOpacityProp) {
  4435. var _this2 = this;
  4436. // tslint:disable-next-line: no-this-assignment
  4437. var stopsContainer = this;
  4438. if (this.getHrefAttribute().hasValue()) {
  4439. stopsContainer = this.getHrefAttribute().getDefinition();
  4440. this.inheritStopContainer(stopsContainer);
  4441. }
  4442. var _stopsContainer = stopsContainer,
  4443. stops = _stopsContainer.stops;
  4444. var gradient = this.getGradient(ctx, element);
  4445. if (!gradient) {
  4446. return this.addParentOpacity(parentOpacityProp, stops[stops.length - 1].color);
  4447. }
  4448. stops.forEach(function (stop) {
  4449. gradient.addColorStop(stop.offset, _this2.addParentOpacity(parentOpacityProp, stop.color));
  4450. });
  4451. if (this.getAttribute('gradientTransform').hasValue()) {
  4452. // render as transformed pattern on temporary canvas
  4453. var document = this.document;
  4454. var _document$screen = document.screen,
  4455. MAX_VIRTUAL_PIXELS = _document$screen.MAX_VIRTUAL_PIXELS,
  4456. viewPort = _document$screen.viewPort;
  4457. var _viewPort$viewPorts = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(viewPort.viewPorts, 1),
  4458. rootView = _viewPort$viewPorts[0];
  4459. var rect = new RectElement(document, null);
  4460. rect.attributes.x = new Property(document, 'x', -MAX_VIRTUAL_PIXELS / 3.0);
  4461. rect.attributes.y = new Property(document, 'y', -MAX_VIRTUAL_PIXELS / 3.0);
  4462. rect.attributes.width = new Property(document, 'width', MAX_VIRTUAL_PIXELS);
  4463. rect.attributes.height = new Property(document, 'height', MAX_VIRTUAL_PIXELS);
  4464. var group = new GElement(document, null);
  4465. group.attributes.transform = new Property(document, 'transform', this.getAttribute('gradientTransform').getValue());
  4466. group.children = [rect];
  4467. var patternSvg = new SVGElement(document, null);
  4468. patternSvg.attributes.x = new Property(document, 'x', 0);
  4469. patternSvg.attributes.y = new Property(document, 'y', 0);
  4470. patternSvg.attributes.width = new Property(document, 'width', rootView.width);
  4471. patternSvg.attributes.height = new Property(document, 'height', rootView.height);
  4472. patternSvg.children = [group];
  4473. var patternCanvas = document.createCanvas(rootView.width, rootView.height);
  4474. var patternCtx = patternCanvas.getContext('2d');
  4475. patternCtx.fillStyle = gradient;
  4476. patternSvg.render(patternCtx);
  4477. return patternCtx.createPattern(patternCanvas, 'no-repeat');
  4478. }
  4479. return gradient;
  4480. }
  4481. }, {
  4482. key: "inheritStopContainer",
  4483. value: function inheritStopContainer(stopsContainer) {
  4484. var _this3 = this;
  4485. this.attributesToInherit.forEach(function (attributeToInherit) {
  4486. if (!_this3.getAttribute(attributeToInherit).hasValue() && stopsContainer.getAttribute(attributeToInherit).hasValue()) {
  4487. _this3.getAttribute(attributeToInherit, true).setValue(stopsContainer.getAttribute(attributeToInherit).getValue());
  4488. }
  4489. });
  4490. }
  4491. }, {
  4492. key: "addParentOpacity",
  4493. value: function addParentOpacity(parentOpacityProp, color) {
  4494. if (parentOpacityProp.hasValue()) {
  4495. var colorProp = new Property(this.document, 'color', color);
  4496. return colorProp.addOpacity(parentOpacityProp).getColor();
  4497. }
  4498. return color;
  4499. }
  4500. }]);
  4501. return GradientElement;
  4502. }(Element);
  4503. function _createSuper$l(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$l()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
  4504. function _isNativeReflectConstruct$l() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  4505. var LinearGradientElement = /*#__PURE__*/function (_GradientElement) {
  4506. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(LinearGradientElement, _GradientElement);
  4507. var _super = _createSuper$l(LinearGradientElement);
  4508. function LinearGradientElement(document, node, captureTextNodes) {
  4509. var _this;
  4510. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, LinearGradientElement);
  4511. _this = _super.call(this, document, node, captureTextNodes);
  4512. _this.type = 'linearGradient';
  4513. _this.attributesToInherit.push('x1', 'y1', 'x2', 'y2');
  4514. return _this;
  4515. }
  4516. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(LinearGradientElement, [{
  4517. key: "getGradient",
  4518. value: function getGradient(ctx, element) {
  4519. var isBoundingBoxUnits = this.getGradientUnits() === 'objectBoundingBox';
  4520. var boundingBox = isBoundingBoxUnits ? element.getBoundingBox(ctx) : null;
  4521. if (isBoundingBoxUnits && !boundingBox) {
  4522. return null;
  4523. }
  4524. if (!this.getAttribute('x1').hasValue() && !this.getAttribute('y1').hasValue() && !this.getAttribute('x2').hasValue() && !this.getAttribute('y2').hasValue()) {
  4525. this.getAttribute('x1', true).setValue(0);
  4526. this.getAttribute('y1', true).setValue(0);
  4527. this.getAttribute('x2', true).setValue(1);
  4528. this.getAttribute('y2', true).setValue(0);
  4529. }
  4530. var x1 = isBoundingBoxUnits ? boundingBox.x + boundingBox.width * this.getAttribute('x1').getNumber() : this.getAttribute('x1').getPixels('x');
  4531. var y1 = isBoundingBoxUnits ? boundingBox.y + boundingBox.height * this.getAttribute('y1').getNumber() : this.getAttribute('y1').getPixels('y');
  4532. var x2 = isBoundingBoxUnits ? boundingBox.x + boundingBox.width * this.getAttribute('x2').getNumber() : this.getAttribute('x2').getPixels('x');
  4533. var y2 = isBoundingBoxUnits ? boundingBox.y + boundingBox.height * this.getAttribute('y2').getNumber() : this.getAttribute('y2').getPixels('y');
  4534. if (x1 === x2 && y1 === y2) {
  4535. return null;
  4536. }
  4537. return ctx.createLinearGradient(x1, y1, x2, y2);
  4538. }
  4539. }]);
  4540. return LinearGradientElement;
  4541. }(GradientElement);
  4542. function _createSuper$m(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$m()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
  4543. function _isNativeReflectConstruct$m() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  4544. var RadialGradientElement = /*#__PURE__*/function (_GradientElement) {
  4545. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(RadialGradientElement, _GradientElement);
  4546. var _super = _createSuper$m(RadialGradientElement);
  4547. function RadialGradientElement(document, node, captureTextNodes) {
  4548. var _this;
  4549. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, RadialGradientElement);
  4550. _this = _super.call(this, document, node, captureTextNodes);
  4551. _this.type = 'radialGradient';
  4552. _this.attributesToInherit.push('cx', 'cy', 'r', 'fx', 'fy', 'fr');
  4553. return _this;
  4554. }
  4555. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(RadialGradientElement, [{
  4556. key: "getGradient",
  4557. value: function getGradient(ctx, element) {
  4558. var isBoundingBoxUnits = this.getGradientUnits() === 'objectBoundingBox';
  4559. var boundingBox = element.getBoundingBox(ctx);
  4560. if (isBoundingBoxUnits && !boundingBox) {
  4561. return null;
  4562. }
  4563. if (!this.getAttribute('cx').hasValue()) {
  4564. this.getAttribute('cx', true).setValue('50%');
  4565. }
  4566. if (!this.getAttribute('cy').hasValue()) {
  4567. this.getAttribute('cy', true).setValue('50%');
  4568. }
  4569. if (!this.getAttribute('r').hasValue()) {
  4570. this.getAttribute('r', true).setValue('50%');
  4571. }
  4572. var cx = isBoundingBoxUnits ? boundingBox.x + boundingBox.width * this.getAttribute('cx').getNumber() : this.getAttribute('cx').getPixels('x');
  4573. var cy = isBoundingBoxUnits ? boundingBox.y + boundingBox.height * this.getAttribute('cy').getNumber() : this.getAttribute('cy').getPixels('y');
  4574. var fx = cx;
  4575. var fy = cy;
  4576. if (this.getAttribute('fx').hasValue()) {
  4577. fx = isBoundingBoxUnits ? boundingBox.x + boundingBox.width * this.getAttribute('fx').getNumber() : this.getAttribute('fx').getPixels('x');
  4578. }
  4579. if (this.getAttribute('fy').hasValue()) {
  4580. fy = isBoundingBoxUnits ? boundingBox.y + boundingBox.height * this.getAttribute('fy').getNumber() : this.getAttribute('fy').getPixels('y');
  4581. }
  4582. var r = isBoundingBoxUnits ? (boundingBox.width + boundingBox.height) / 2.0 * this.getAttribute('r').getNumber() : this.getAttribute('r').getPixels();
  4583. var fr = this.getAttribute('fr').getPixels();
  4584. return ctx.createRadialGradient(fx, fy, fr, cx, cy, r);
  4585. }
  4586. }]);
  4587. return RadialGradientElement;
  4588. }(GradientElement);
  4589. function _createSuper$n(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$n()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
  4590. function _isNativeReflectConstruct$n() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  4591. var StopElement = /*#__PURE__*/function (_Element) {
  4592. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(StopElement, _Element);
  4593. var _super = _createSuper$n(StopElement);
  4594. function StopElement(document, node, captureTextNodes) {
  4595. var _this;
  4596. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, StopElement);
  4597. _this = _super.call(this, document, node, captureTextNodes);
  4598. _this.type = 'stop';
  4599. var offset = Math.max(0, Math.min(1, _this.getAttribute('offset').getNumber()));
  4600. var stopOpacity = _this.getStyle('stop-opacity');
  4601. var stopColor = _this.getStyle('stop-color', true);
  4602. if (stopColor.getString() === '') {
  4603. stopColor.setValue('#000');
  4604. }
  4605. if (stopOpacity.hasValue()) {
  4606. stopColor = stopColor.addOpacity(stopOpacity);
  4607. }
  4608. _this.offset = offset;
  4609. _this.color = stopColor.getColor();
  4610. return _this;
  4611. }
  4612. return StopElement;
  4613. }(Element);
  4614. function _createSuper$o(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$o()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
  4615. function _isNativeReflectConstruct$o() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  4616. var AnimateElement = /*#__PURE__*/function (_Element) {
  4617. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(AnimateElement, _Element);
  4618. var _super = _createSuper$o(AnimateElement);
  4619. function AnimateElement(document, node, captureTextNodes) {
  4620. var _this;
  4621. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, AnimateElement);
  4622. _this = _super.call(this, document, node, captureTextNodes);
  4623. _this.type = 'animate';
  4624. _this.duration = 0;
  4625. _this.initialValue = null;
  4626. _this.initialUnits = '';
  4627. _this.removed = false;
  4628. _this.frozen = false;
  4629. document.screen.animations.push((0,_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_46__.default)(_this));
  4630. _this.begin = _this.getAttribute('begin').getMilliseconds();
  4631. _this.maxDuration = _this.begin + _this.getAttribute('dur').getMilliseconds();
  4632. _this.from = _this.getAttribute('from');
  4633. _this.to = _this.getAttribute('to');
  4634. _this.values = _this.getAttribute('values');
  4635. if (_this.values.hasValue()) {
  4636. _this.values.setValue(_this.values.getString().split(';'));
  4637. }
  4638. return _this;
  4639. }
  4640. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(AnimateElement, [{
  4641. key: "getProperty",
  4642. value: function getProperty() {
  4643. var attributeType = this.getAttribute('attributeType').getString();
  4644. var attributeName = this.getAttribute('attributeName').getString();
  4645. if (attributeType === 'CSS') {
  4646. return this.parent.getStyle(attributeName, true);
  4647. }
  4648. return this.parent.getAttribute(attributeName, true);
  4649. }
  4650. }, {
  4651. key: "calcValue",
  4652. value: function calcValue() {
  4653. var initialUnits = this.initialUnits;
  4654. var _this$getProgress = this.getProgress(),
  4655. progress = _this$getProgress.progress,
  4656. from = _this$getProgress.from,
  4657. to = _this$getProgress.to; // tween value linearly
  4658. var newValue = from.getNumber() + (to.getNumber() - from.getNumber()) * progress;
  4659. if (initialUnits === '%') {
  4660. newValue *= 100.0; // numValue() returns 0-1 whereas properties are 0-100
  4661. }
  4662. return "".concat(newValue).concat(initialUnits);
  4663. }
  4664. }, {
  4665. key: "update",
  4666. value: function update(delta) {
  4667. var parent = this.parent;
  4668. var prop = this.getProperty(); // set initial value
  4669. if (!this.initialValue) {
  4670. this.initialValue = prop.getString();
  4671. this.initialUnits = prop.getUnits();
  4672. } // if we're past the end time
  4673. if (this.duration > this.maxDuration) {
  4674. var fill = this.getAttribute('fill').getString('remove'); // loop for indefinitely repeating animations
  4675. if (this.getAttribute('repeatCount').getString() === 'indefinite' || this.getAttribute('repeatDur').getString() === 'indefinite') {
  4676. this.duration = 0;
  4677. } else if (fill === 'freeze' && !this.frozen) {
  4678. this.frozen = true;
  4679. parent.animationFrozen = true;
  4680. parent.animationFrozenValue = prop.getString();
  4681. } else if (fill === 'remove' && !this.removed) {
  4682. this.removed = true;
  4683. prop.setValue(parent.animationFrozen ? parent.animationFrozenValue : this.initialValue);
  4684. return true;
  4685. }
  4686. return false;
  4687. }
  4688. this.duration += delta; // if we're past the begin time
  4689. var updated = false;
  4690. if (this.begin < this.duration) {
  4691. var newValue = this.calcValue(); // tween
  4692. var typeAttr = this.getAttribute('type');
  4693. if (typeAttr.hasValue()) {
  4694. // for transform, etc.
  4695. var type = typeAttr.getString();
  4696. newValue = "".concat(type, "(").concat(newValue, ")");
  4697. }
  4698. prop.setValue(newValue);
  4699. updated = true;
  4700. }
  4701. return updated;
  4702. }
  4703. }, {
  4704. key: "getProgress",
  4705. value: function getProgress() {
  4706. var document = this.document,
  4707. values = this.values;
  4708. var result = {
  4709. progress: (this.duration - this.begin) / (this.maxDuration - this.begin)
  4710. };
  4711. if (values.hasValue()) {
  4712. var p = result.progress * (values.getValue().length - 1);
  4713. var lb = Math.floor(p);
  4714. var ub = Math.ceil(p);
  4715. result.from = new Property(document, 'from', parseFloat(values.getValue()[lb]));
  4716. result.to = new Property(document, 'to', parseFloat(values.getValue()[ub]));
  4717. result.progress = (p - lb) / (ub - lb);
  4718. } else {
  4719. result.from = this.from;
  4720. result.to = this.to;
  4721. }
  4722. return result;
  4723. }
  4724. }]);
  4725. return AnimateElement;
  4726. }(Element);
  4727. function _createSuper$p(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$p()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
  4728. function _isNativeReflectConstruct$p() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  4729. var AnimateColorElement = /*#__PURE__*/function (_AnimateElement) {
  4730. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(AnimateColorElement, _AnimateElement);
  4731. var _super = _createSuper$p(AnimateColorElement);
  4732. function AnimateColorElement() {
  4733. var _this;
  4734. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, AnimateColorElement);
  4735. _this = _super.apply(this, arguments);
  4736. _this.type = 'animateColor';
  4737. return _this;
  4738. }
  4739. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(AnimateColorElement, [{
  4740. key: "calcValue",
  4741. value: function calcValue() {
  4742. var _this$getProgress = this.getProgress(),
  4743. progress = _this$getProgress.progress,
  4744. from = _this$getProgress.from,
  4745. to = _this$getProgress.to;
  4746. var colorFrom = new (rgbcolor__WEBPACK_IMPORTED_MODULE_27___default())(from.getColor());
  4747. var colorTo = new (rgbcolor__WEBPACK_IMPORTED_MODULE_27___default())(to.getColor());
  4748. if (colorFrom.ok && colorTo.ok) {
  4749. // tween color linearly
  4750. var r = colorFrom.r + (colorTo.r - colorFrom.r) * progress;
  4751. var g = colorFrom.g + (colorTo.g - colorFrom.g) * progress;
  4752. var b = colorFrom.b + (colorTo.b - colorFrom.b) * progress; // ? alpha
  4753. return "rgb(".concat(parseInt(r, 10), ", ").concat(parseInt(g, 10), ", ").concat(parseInt(b, 10), ")");
  4754. }
  4755. return this.getAttribute('from').getColor();
  4756. }
  4757. }]);
  4758. return AnimateColorElement;
  4759. }(AnimateElement);
  4760. function _createSuper$q(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$q()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
  4761. function _isNativeReflectConstruct$q() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  4762. var AnimateTransformElement = /*#__PURE__*/function (_AnimateElement) {
  4763. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(AnimateTransformElement, _AnimateElement);
  4764. var _super = _createSuper$q(AnimateTransformElement);
  4765. function AnimateTransformElement() {
  4766. var _this;
  4767. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, AnimateTransformElement);
  4768. _this = _super.apply(this, arguments);
  4769. _this.type = 'animateTransform';
  4770. return _this;
  4771. }
  4772. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(AnimateTransformElement, [{
  4773. key: "calcValue",
  4774. value: function calcValue() {
  4775. var _this$getProgress = this.getProgress(),
  4776. progress = _this$getProgress.progress,
  4777. from = _this$getProgress.from,
  4778. to = _this$getProgress.to; // tween value linearly
  4779. var transformFrom = toNumbers(from.getString());
  4780. var transformTo = toNumbers(to.getString());
  4781. var newValue = transformFrom.map(function (from, i) {
  4782. var to = transformTo[i];
  4783. return from + (to - from) * progress;
  4784. }).join(' ');
  4785. return newValue;
  4786. }
  4787. }]);
  4788. return AnimateTransformElement;
  4789. }(AnimateElement);
  4790. function _createForOfIteratorHelper(o) { if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) { var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var it, normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
  4791. function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
  4792. function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
  4793. function _createSuper$r(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$r()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
  4794. function _isNativeReflectConstruct$r() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  4795. var FontElement = /*#__PURE__*/function (_Element) {
  4796. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(FontElement, _Element);
  4797. var _super = _createSuper$r(FontElement);
  4798. function FontElement(document, node, captureTextNodes) {
  4799. var _this;
  4800. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, FontElement);
  4801. _this = _super.call(this, document, node, captureTextNodes);
  4802. _this.type = 'font';
  4803. _this.glyphs = {};
  4804. _this.horizAdvX = _this.getAttribute('horiz-adv-x').getNumber();
  4805. var definitions = document.definitions;
  4806. var _assertThisInitialize = (0,_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_46__.default)(_this),
  4807. children = _assertThisInitialize.children;
  4808. var _iterator = _createForOfIteratorHelper(children),
  4809. _step;
  4810. try {
  4811. for (_iterator.s(); !(_step = _iterator.n()).done;) {
  4812. var child = _step.value;
  4813. switch (child.type) {
  4814. case 'font-face':
  4815. {
  4816. _this.fontFace = child;
  4817. var fontFamilyStyle = child.getStyle('font-family');
  4818. if (fontFamilyStyle.hasValue()) {
  4819. definitions[fontFamilyStyle.getString()] = (0,_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_46__.default)(_this);
  4820. }
  4821. break;
  4822. }
  4823. case 'missing-glyph':
  4824. _this.missingGlyph = child;
  4825. break;
  4826. case 'glyph':
  4827. {
  4828. var glyph = child;
  4829. if (glyph.arabicForm) {
  4830. _this.isRTL = true;
  4831. _this.isArabic = true;
  4832. if (typeof _this.glyphs[glyph.unicode] === 'undefined') {
  4833. _this.glyphs[glyph.unicode] = {};
  4834. }
  4835. _this.glyphs[glyph.unicode][glyph.arabicForm] = glyph;
  4836. } else {
  4837. _this.glyphs[glyph.unicode] = glyph;
  4838. }
  4839. break;
  4840. }
  4841. default:
  4842. }
  4843. }
  4844. } catch (err) {
  4845. _iterator.e(err);
  4846. } finally {
  4847. _iterator.f();
  4848. }
  4849. return _this;
  4850. }
  4851. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(FontElement, [{
  4852. key: "render",
  4853. value: function render() {// NO RENDER
  4854. }
  4855. }]);
  4856. return FontElement;
  4857. }(Element);
  4858. function _createSuper$s(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$s()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
  4859. function _isNativeReflectConstruct$s() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  4860. var FontFaceElement = /*#__PURE__*/function (_Element) {
  4861. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(FontFaceElement, _Element);
  4862. var _super = _createSuper$s(FontFaceElement);
  4863. function FontFaceElement(document, node, captureTextNodes) {
  4864. var _this;
  4865. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, FontFaceElement);
  4866. _this = _super.call(this, document, node, captureTextNodes);
  4867. _this.type = 'font-face';
  4868. _this.ascent = _this.getAttribute('ascent').getNumber();
  4869. _this.descent = _this.getAttribute('descent').getNumber();
  4870. _this.unitsPerEm = _this.getAttribute('units-per-em').getNumber();
  4871. return _this;
  4872. }
  4873. return FontFaceElement;
  4874. }(Element);
  4875. function _createSuper$t(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$t()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
  4876. function _isNativeReflectConstruct$t() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  4877. var MissingGlyphElement = /*#__PURE__*/function (_PathElement) {
  4878. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(MissingGlyphElement, _PathElement);
  4879. var _super = _createSuper$t(MissingGlyphElement);
  4880. function MissingGlyphElement() {
  4881. var _this;
  4882. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, MissingGlyphElement);
  4883. _this = _super.apply(this, arguments);
  4884. _this.type = 'missing-glyph';
  4885. _this.horizAdvX = 0;
  4886. return _this;
  4887. }
  4888. return MissingGlyphElement;
  4889. }(PathElement);
  4890. function _createSuper$u(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$u()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
  4891. function _isNativeReflectConstruct$u() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  4892. var GlyphElement = /*#__PURE__*/function (_PathElement) {
  4893. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(GlyphElement, _PathElement);
  4894. var _super = _createSuper$u(GlyphElement);
  4895. function GlyphElement(document, node, captureTextNodes) {
  4896. var _this;
  4897. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, GlyphElement);
  4898. _this = _super.call(this, document, node, captureTextNodes);
  4899. _this.type = 'glyph';
  4900. _this.horizAdvX = _this.getAttribute('horiz-adv-x').getNumber();
  4901. _this.unicode = _this.getAttribute('unicode').getString();
  4902. _this.arabicForm = _this.getAttribute('arabic-form').getString();
  4903. return _this;
  4904. }
  4905. return GlyphElement;
  4906. }(PathElement);
  4907. function _createSuper$v(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$v()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
  4908. function _isNativeReflectConstruct$v() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  4909. var TRefElement = /*#__PURE__*/function (_TextElement) {
  4910. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(TRefElement, _TextElement);
  4911. var _super = _createSuper$v(TRefElement);
  4912. function TRefElement() {
  4913. var _this;
  4914. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, TRefElement);
  4915. _this = _super.apply(this, arguments);
  4916. _this.type = 'tref';
  4917. return _this;
  4918. }
  4919. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(TRefElement, [{
  4920. key: "getText",
  4921. value: function getText() {
  4922. var element = this.getHrefAttribute().getDefinition();
  4923. if (element) {
  4924. var firstChild = element.children[0];
  4925. if (firstChild) {
  4926. return firstChild.getText();
  4927. }
  4928. }
  4929. return '';
  4930. }
  4931. }]);
  4932. return TRefElement;
  4933. }(TextElement);
  4934. function _createSuper$w(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$w()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
  4935. function _isNativeReflectConstruct$w() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  4936. var AElement = /*#__PURE__*/function (_TextElement) {
  4937. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(AElement, _TextElement);
  4938. var _super = _createSuper$w(AElement);
  4939. function AElement(document, node, captureTextNodes) {
  4940. var _this;
  4941. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, AElement);
  4942. _this = _super.call(this, document, node, captureTextNodes);
  4943. _this.type = 'a';
  4944. var childNodes = node.childNodes;
  4945. var firstChild = childNodes[0];
  4946. var hasText = childNodes.length > 0 && Array.from(childNodes).every(function (node) {
  4947. return node.nodeType === 3;
  4948. });
  4949. _this.hasText = hasText;
  4950. _this.text = hasText ? _this.getTextFromNode(firstChild) : '';
  4951. return _this;
  4952. }
  4953. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(AElement, [{
  4954. key: "getText",
  4955. value: function getText() {
  4956. return this.text;
  4957. }
  4958. }, {
  4959. key: "renderChildren",
  4960. value: function renderChildren(ctx) {
  4961. if (this.hasText) {
  4962. // render as text element
  4963. (0,_babel_runtime_helpers_get__WEBPACK_IMPORTED_MODULE_42__.default)((0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(AElement.prototype), "renderChildren", this).call(this, ctx);
  4964. var document = this.document,
  4965. x = this.x,
  4966. y = this.y;
  4967. var mouse = document.screen.mouse;
  4968. var fontSize = new Property(document, 'fontSize', Font.parse(document.ctx.font).fontSize); // Do not calc bounding box if mouse is not working.
  4969. if (mouse.isWorking()) {
  4970. mouse.checkBoundingBox(this, new BoundingBox(x, y - fontSize.getPixels('y'), x + this.measureText(ctx), y));
  4971. }
  4972. } else if (this.children.length > 0) {
  4973. // render as temporary group
  4974. var g = new GElement(this.document, null);
  4975. g.children = this.children;
  4976. g.parent = this;
  4977. g.render(ctx);
  4978. }
  4979. }
  4980. }, {
  4981. key: "onClick",
  4982. value: function onClick() {
  4983. var window = this.document.window;
  4984. if (window) {
  4985. window.open(this.getHrefAttribute().getString());
  4986. }
  4987. }
  4988. }, {
  4989. key: "onMouseMove",
  4990. value: function onMouseMove() {
  4991. var ctx = this.document.ctx;
  4992. ctx.canvas.style.cursor = 'pointer';
  4993. }
  4994. }]);
  4995. return AElement;
  4996. }(TextElement);
  4997. function _createForOfIteratorHelper$1(o) { if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (o = _unsupportedIterableToArray$1(o))) { var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var it, normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
  4998. function _unsupportedIterableToArray$1(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$1(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen); }
  4999. function _arrayLikeToArray$1(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
  5000. function _createSuper$x(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$x()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
  5001. function _isNativeReflectConstruct$x() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  5002. var TextPathElement = /*#__PURE__*/function (_TextElement) {
  5003. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(TextPathElement, _TextElement);
  5004. var _super = _createSuper$x(TextPathElement);
  5005. function TextPathElement(document, node, captureTextNodes) {
  5006. var _this;
  5007. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, TextPathElement);
  5008. _this = _super.call(this, document, node, captureTextNodes);
  5009. _this.type = 'textPath';
  5010. _this.textWidth = 0;
  5011. _this.textHeight = 0;
  5012. _this.pathLength = -1;
  5013. _this.glyphInfo = null;
  5014. _this.letterSpacingCache = [];
  5015. _this.measuresCache = new Map([['', 0]]);
  5016. var pathElement = _this.getHrefAttribute().getDefinition();
  5017. _this.text = _this.getTextFromNode();
  5018. _this.dataArray = _this.parsePathData(pathElement);
  5019. return _this;
  5020. }
  5021. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(TextPathElement, [{
  5022. key: "getText",
  5023. value: function getText() {
  5024. return this.text;
  5025. }
  5026. }, {
  5027. key: "path",
  5028. value: function path(ctx) {
  5029. var dataArray = this.dataArray;
  5030. if (ctx) {
  5031. ctx.beginPath();
  5032. }
  5033. dataArray.forEach(function (_ref) {
  5034. var command = _ref.command,
  5035. points = _ref.points;
  5036. switch (command) {
  5037. case 'L':
  5038. if (ctx) {
  5039. ctx.lineTo(points[0], points[1]);
  5040. }
  5041. break;
  5042. case 'M':
  5043. if (ctx) {
  5044. ctx.moveTo(points[0], points[1]);
  5045. }
  5046. break;
  5047. case 'C':
  5048. if (ctx) {
  5049. ctx.bezierCurveTo(points[0], points[1], points[2], points[3], points[4], points[5]);
  5050. }
  5051. break;
  5052. case 'Q':
  5053. if (ctx) {
  5054. ctx.quadraticCurveTo(points[0], points[1], points[2], points[3]);
  5055. }
  5056. break;
  5057. case 'A':
  5058. {
  5059. var cx = points[0];
  5060. var cy = points[1];
  5061. var rx = points[2];
  5062. var ry = points[3];
  5063. var theta = points[4];
  5064. var dTheta = points[5];
  5065. var psi = points[6];
  5066. var fs = points[7];
  5067. var r = rx > ry ? rx : ry;
  5068. var scaleX = rx > ry ? 1 : rx / ry;
  5069. var scaleY = rx > ry ? ry / rx : 1;
  5070. if (ctx) {
  5071. ctx.translate(cx, cy);
  5072. ctx.rotate(psi);
  5073. ctx.scale(scaleX, scaleY);
  5074. ctx.arc(0, 0, r, theta, theta + dTheta, Boolean(1 - fs));
  5075. ctx.scale(1 / scaleX, 1 / scaleY);
  5076. ctx.rotate(-psi);
  5077. ctx.translate(-cx, -cy);
  5078. }
  5079. break;
  5080. }
  5081. case 'z':
  5082. if (ctx) {
  5083. ctx.closePath();
  5084. }
  5085. break;
  5086. }
  5087. });
  5088. }
  5089. }, {
  5090. key: "renderChildren",
  5091. value: function renderChildren(ctx) {
  5092. this.setTextData(ctx);
  5093. ctx.save();
  5094. var textDecoration = this.parent.getStyle('text-decoration').getString();
  5095. var fontSize = this.getFontSize();
  5096. var glyphInfo = this.glyphInfo;
  5097. var fill = ctx.fillStyle;
  5098. if (textDecoration === 'underline') {
  5099. ctx.beginPath();
  5100. }
  5101. glyphInfo.forEach(function (glyph, i) {
  5102. var p0 = glyph.p0,
  5103. p1 = glyph.p1,
  5104. partialText = glyph.text;
  5105. ctx.save();
  5106. ctx.translate(p0.x, p0.y);
  5107. ctx.rotate(glyphInfo[i].rotation);
  5108. if (ctx.fillStyle) {
  5109. ctx.fillText(partialText, 0, 0);
  5110. }
  5111. if (ctx.strokeStyle) {
  5112. ctx.strokeText(partialText, 0, 0);
  5113. }
  5114. ctx.restore();
  5115. if (textDecoration === 'underline') {
  5116. if (i === 0) {
  5117. ctx.moveTo(p0.x, p0.y + fontSize / 8);
  5118. }
  5119. ctx.lineTo(p1.x, p1.y + fontSize / 5);
  5120. } //// To assist with debugging visually, uncomment following
  5121. //
  5122. // ctx.beginPath();
  5123. // if (i % 2)
  5124. // ctx.strokeStyle = 'red';
  5125. // else
  5126. // ctx.strokeStyle = 'green';
  5127. // ctx.moveTo(p0.x, p0.y);
  5128. // ctx.lineTo(p1.x, p1.y);
  5129. // ctx.stroke();
  5130. // ctx.closePath();
  5131. });
  5132. if (textDecoration === 'underline') {
  5133. ctx.lineWidth = fontSize / 20;
  5134. ctx.strokeStyle = fill;
  5135. ctx.stroke();
  5136. ctx.closePath();
  5137. }
  5138. ctx.restore();
  5139. }
  5140. }, {
  5141. key: "getLetterSpacingAt",
  5142. value: function getLetterSpacingAt() {
  5143. var idx = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
  5144. return this.letterSpacingCache[idx] || 0;
  5145. }
  5146. }, {
  5147. key: "findSegmentToFitChar",
  5148. value: function findSegmentToFitChar(ctx, anchor, textFullWidth, fullPathWidth, spacesNumber, inputOffset, c, charI) {
  5149. var offset = inputOffset;
  5150. var glyphWidth = this.measureText(ctx, c);
  5151. if (c === ' ' && anchor === 'justify' && textFullWidth < fullPathWidth) {
  5152. glyphWidth += (fullPathWidth - textFullWidth) / spacesNumber;
  5153. }
  5154. if (charI > -1) {
  5155. offset += this.getLetterSpacingAt(charI);
  5156. }
  5157. var splineStep = this.textHeight / 20;
  5158. var segment = {
  5159. p0: this.getEquidistantPointOnPath(offset, splineStep),
  5160. p1: this.getEquidistantPointOnPath(offset + glyphWidth, splineStep)
  5161. };
  5162. offset += glyphWidth;
  5163. return {
  5164. offset: offset,
  5165. segment: segment
  5166. };
  5167. }
  5168. }, {
  5169. key: "measureText",
  5170. value: function measureText(ctx, text) {
  5171. var measuresCache = this.measuresCache;
  5172. var targetText = text || this.getText();
  5173. if (measuresCache.has(targetText)) {
  5174. return measuresCache.get(targetText);
  5175. }
  5176. var measure = this.measureTargetText(ctx, targetText);
  5177. measuresCache.set(targetText, measure);
  5178. return measure;
  5179. } // This method supposes what all custom fonts already loaded.
  5180. // If some font will be loaded after this method call, <textPath> will not be rendered correctly.
  5181. // You need to call this method manually to update glyphs cache.
  5182. }, {
  5183. key: "setTextData",
  5184. value: function setTextData(ctx) {
  5185. var _this2 = this;
  5186. if (this.glyphInfo) {
  5187. return;
  5188. }
  5189. var renderText = this.getText();
  5190. var chars = renderText.split('');
  5191. var spacesNumber = renderText.split(' ').length - 1;
  5192. var dx = toNumbers(this.parent.getAttribute('dx').getString('0'));
  5193. var anchor = this.parent.getStyle('text-anchor').getString('start');
  5194. var thisSpacing = this.getStyle('letter-spacing');
  5195. var parentSpacing = this.parent.getStyle('letter-spacing');
  5196. var letterSpacing = 0;
  5197. if (!thisSpacing.hasValue() || thisSpacing.getValue() === 'inherit') {
  5198. letterSpacing = parentSpacing.getPixels();
  5199. } else if (thisSpacing.hasValue()) {
  5200. if (thisSpacing.getValue() !== 'initial' && thisSpacing.getValue() !== 'unset') {
  5201. letterSpacing = thisSpacing.getPixels();
  5202. }
  5203. } // fill letter-spacing cache
  5204. var letterSpacingCache = [];
  5205. var textLen = renderText.length;
  5206. this.letterSpacingCache = letterSpacingCache;
  5207. for (var i = 0; i < textLen; i++) {
  5208. letterSpacingCache.push(typeof dx[i] !== 'undefined' ? dx[i] : letterSpacing);
  5209. }
  5210. var dxSum = letterSpacingCache.reduce(function (acc, cur) {
  5211. return acc + cur || 0;
  5212. }, 0);
  5213. this.textWidth = this.measureText(ctx);
  5214. this.textHeight = this.getFontSize();
  5215. var textFullWidth = Math.max(this.textWidth + dxSum, 0);
  5216. this.glyphInfo = [];
  5217. var fullPathWidth = this.getPathLength();
  5218. var startOffset = this.getStyle('startOffset').getNumber(0) * fullPathWidth;
  5219. var offset = 0;
  5220. if (anchor === 'middle' || anchor === 'center') {
  5221. offset = -textFullWidth / 2;
  5222. }
  5223. if (anchor === 'end' || anchor === 'right') {
  5224. offset = -textFullWidth;
  5225. }
  5226. offset += startOffset;
  5227. chars.forEach(function (char, i) {
  5228. // Find such segment what distance between p0 and p1 is approx. width of glyph
  5229. var _this2$findSegmentToF = _this2.findSegmentToFitChar(ctx, anchor, textFullWidth, fullPathWidth, spacesNumber, offset, char, i),
  5230. nextOffset = _this2$findSegmentToF.offset,
  5231. segment = _this2$findSegmentToF.segment;
  5232. offset = nextOffset;
  5233. if (!segment.p0 || !segment.p1) {
  5234. return;
  5235. }
  5236. var width = _this2.getLineLength(segment.p0.x, segment.p0.y, segment.p1.x, segment.p1.y); // Note: Since glyphs are rendered one at a time, any kerning pair data built into the font will not be used.
  5237. // Can foresee having a rough pair table built in that the developer can override as needed.
  5238. // Or use "dx" attribute of the <text> node as a naive replacement
  5239. var kern = 0; // placeholder for future implementation
  5240. var midpoint = _this2.getPointOnLine(kern + width / 2.0, segment.p0.x, segment.p0.y, segment.p1.x, segment.p1.y);
  5241. var rotation = Math.atan2(segment.p1.y - segment.p0.y, segment.p1.x - segment.p0.x);
  5242. _this2.glyphInfo.push({
  5243. transposeX: midpoint.x,
  5244. transposeY: midpoint.y,
  5245. text: chars[i],
  5246. p0: segment.p0,
  5247. p1: segment.p1,
  5248. rotation: rotation
  5249. });
  5250. });
  5251. }
  5252. }, {
  5253. key: "parsePathData",
  5254. value: function parsePathData(path) {
  5255. this.pathLength = -1; // reset path length
  5256. if (!path) {
  5257. return [];
  5258. }
  5259. var pathCommands = [];
  5260. var pathParser = path.pathParser;
  5261. pathParser.reset(); // convert l, H, h, V, and v to L
  5262. while (!pathParser.isEnd()) {
  5263. var current = pathParser.current;
  5264. var startX = current ? current.x : 0;
  5265. var startY = current ? current.y : 0;
  5266. var cmd = '';
  5267. var points = [];
  5268. pathParser.nextCommand();
  5269. var upperCommand = pathParser.command.toUpperCase();
  5270. switch (pathParser.command) {
  5271. case 'M':
  5272. case 'm':
  5273. cmd = this.pathM(pathParser, points);
  5274. break;
  5275. case 'L':
  5276. case 'l':
  5277. cmd = this.pathL(pathParser, points);
  5278. break;
  5279. case 'H':
  5280. case 'h':
  5281. cmd = this.pathH(pathParser, points);
  5282. break;
  5283. case 'V':
  5284. case 'v':
  5285. cmd = this.pathV(pathParser, points);
  5286. break;
  5287. case 'C':
  5288. case 'c':
  5289. this.pathC(pathParser, points);
  5290. break;
  5291. case 'S':
  5292. case 's':
  5293. cmd = this.pathS(pathParser, points);
  5294. break;
  5295. case 'Q':
  5296. case 'q':
  5297. this.pathQ(pathParser, points);
  5298. break;
  5299. case 'T':
  5300. case 't':
  5301. cmd = this.pathT(pathParser, points);
  5302. break;
  5303. case 'A':
  5304. case 'a':
  5305. points = this.pathA(pathParser);
  5306. break;
  5307. case 'Z':
  5308. case 'z':
  5309. pathParser.current = pathParser.start;
  5310. break;
  5311. }
  5312. if (upperCommand !== 'Z') {
  5313. pathCommands.push({
  5314. command: cmd || upperCommand,
  5315. points: points,
  5316. start: {
  5317. x: startX,
  5318. y: startY
  5319. },
  5320. pathLength: this.calcLength(startX, startY, cmd || upperCommand, points)
  5321. });
  5322. } else {
  5323. pathCommands.push({
  5324. command: 'z',
  5325. points: [],
  5326. pathLength: 0
  5327. });
  5328. }
  5329. }
  5330. return pathCommands;
  5331. }
  5332. }, {
  5333. key: "pathM",
  5334. value: function pathM(pathParser, points) {
  5335. var p = pathParser.getAsCurrentPoint(); // pathParser.addMarker(p);
  5336. points.push(p.x, p.y);
  5337. pathParser.start = pathParser.current;
  5338. while (!pathParser.isCommandOrEnd()) {
  5339. var _p = pathParser.getAsCurrentPoint();
  5340. points.push(_p.x, _p.y);
  5341. return 'L';
  5342. }
  5343. }
  5344. }, {
  5345. key: "pathL",
  5346. value: function pathL(pathParser, points) {
  5347. while (!pathParser.isCommandOrEnd()) {
  5348. var p = pathParser.getAsCurrentPoint();
  5349. points.push(p.x, p.y);
  5350. }
  5351. return 'L';
  5352. }
  5353. }, {
  5354. key: "pathH",
  5355. value: function pathH(pathParser, points) {
  5356. while (!pathParser.isCommandOrEnd()) {
  5357. var current = pathParser.current;
  5358. var point = new Point((pathParser.isRelativeCommand() ? current.x : 0) + pathParser.getScalar(), current.y);
  5359. points.push(point.x, point.y);
  5360. pathParser.current = point;
  5361. }
  5362. return 'L';
  5363. }
  5364. }, {
  5365. key: "pathV",
  5366. value: function pathV(pathParser, points) {
  5367. while (!pathParser.isCommandOrEnd()) {
  5368. var current = pathParser.current;
  5369. var point = new Point(current.x, (pathParser.isRelativeCommand() ? current.y : 0) + pathParser.getScalar());
  5370. points.push(point.x, point.y);
  5371. pathParser.current = point;
  5372. }
  5373. return 'L';
  5374. }
  5375. }, {
  5376. key: "pathC",
  5377. value: function pathC(pathParser, points) {
  5378. while (!pathParser.isCommandOrEnd()) {
  5379. var point = pathParser.getPoint();
  5380. var controlPoint = pathParser.getAsControlPoint();
  5381. var currentPoint = pathParser.getAsCurrentPoint();
  5382. points.push(point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
  5383. }
  5384. }
  5385. }, {
  5386. key: "pathS",
  5387. value: function pathS(pathParser, points) {
  5388. while (!pathParser.isCommandOrEnd()) {
  5389. var point = pathParser.getReflectedControlPoint();
  5390. var controlPoint = pathParser.getAsControlPoint();
  5391. var currentPoint = pathParser.getAsCurrentPoint();
  5392. points.push(point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
  5393. }
  5394. return 'C';
  5395. }
  5396. }, {
  5397. key: "pathQ",
  5398. value: function pathQ(pathParser, points) {
  5399. while (!pathParser.isCommandOrEnd()) {
  5400. var controlPoint = pathParser.getAsControlPoint();
  5401. var currentPoint = pathParser.getAsCurrentPoint();
  5402. points.push(controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
  5403. }
  5404. }
  5405. }, {
  5406. key: "pathT",
  5407. value: function pathT(pathParser, points) {
  5408. while (!pathParser.isCommandOrEnd()) {
  5409. var controlPoint = pathParser.getReflectedControlPoint();
  5410. pathParser.control = controlPoint;
  5411. var currentPoint = pathParser.getAsCurrentPoint();
  5412. points.push(controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
  5413. }
  5414. return 'Q';
  5415. }
  5416. }, {
  5417. key: "pathA",
  5418. value: function pathA(pathParser) {
  5419. while (!pathParser.isCommandOrEnd()) {
  5420. var current = pathParser.current; // x1, y1
  5421. var rx = pathParser.getScalar();
  5422. var ry = pathParser.getScalar();
  5423. var xAxisRotation = pathParser.getScalar() * (Math.PI / 180.0); // φ
  5424. var largeArcFlag = pathParser.getScalar(); // fA
  5425. var sweepFlag = pathParser.getScalar(); // fS
  5426. var currentPoint = pathParser.getAsCurrentPoint(); // x2, y2
  5427. // Conversion from endpoint to center parameterization
  5428. // http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes
  5429. // x1', y1'
  5430. var currp = new Point(Math.cos(xAxisRotation) * (current.x - currentPoint.x) / 2.0 + Math.sin(xAxisRotation) * (current.y - currentPoint.y) / 2.0, -Math.sin(xAxisRotation) * (current.x - currentPoint.x) / 2.0 + Math.cos(xAxisRotation) * (current.y - currentPoint.y) / 2.0); // adjust radii
  5431. var l = Math.pow(currp.x, 2) / Math.pow(rx, 2) + Math.pow(currp.y, 2) / Math.pow(ry, 2);
  5432. if (l > 1) {
  5433. rx *= Math.sqrt(l);
  5434. ry *= Math.sqrt(l);
  5435. } // cx', cy'
  5436. var s = (largeArcFlag === sweepFlag ? -1 : 1) * Math.sqrt((Math.pow(rx, 2) * Math.pow(ry, 2) - Math.pow(rx, 2) * Math.pow(currp.y, 2) - Math.pow(ry, 2) * Math.pow(currp.x, 2)) / (Math.pow(rx, 2) * Math.pow(currp.y, 2) + Math.pow(ry, 2) * Math.pow(currp.x, 2)));
  5437. if (isNaN(s)) {
  5438. s = 0;
  5439. }
  5440. var cpp = new Point(s * rx * currp.y / ry, s * -ry * currp.x / rx); // cx, cy
  5441. var centp = new Point((current.x + currentPoint.x) / 2.0 + Math.cos(xAxisRotation) * cpp.x - Math.sin(xAxisRotation) * cpp.y, (current.y + currentPoint.y) / 2.0 + Math.sin(xAxisRotation) * cpp.x + Math.cos(xAxisRotation) * cpp.y); // initial angle
  5442. var a1 = vectorsAngle([1, 0], [(currp.x - cpp.x) / rx, (currp.y - cpp.y) / ry]); // θ1
  5443. // angle delta
  5444. var u = [(currp.x - cpp.x) / rx, (currp.y - cpp.y) / ry];
  5445. var v = [(-currp.x - cpp.x) / rx, (-currp.y - cpp.y) / ry];
  5446. var ad = vectorsAngle(u, v); // Δθ
  5447. if (vectorsRatio(u, v) <= -1) {
  5448. ad = Math.PI;
  5449. }
  5450. if (vectorsRatio(u, v) >= 1) {
  5451. ad = 0;
  5452. }
  5453. if (sweepFlag === 0 && ad > 0) {
  5454. ad = ad - 2 * Math.PI;
  5455. }
  5456. if (sweepFlag === 1 && ad < 0) {
  5457. ad = ad + 2 * Math.PI;
  5458. }
  5459. return [centp.x, centp.y, rx, ry, a1, ad, xAxisRotation, sweepFlag];
  5460. }
  5461. }
  5462. }, {
  5463. key: "calcLength",
  5464. value: function calcLength(x, y, cmd, points) {
  5465. var len = 0;
  5466. var p1 = null;
  5467. var p2 = null;
  5468. var t = 0;
  5469. switch (cmd) {
  5470. case 'L':
  5471. return this.getLineLength(x, y, points[0], points[1]);
  5472. case 'C':
  5473. // Approximates by breaking curve into 100 line segments
  5474. len = 0.0;
  5475. p1 = this.getPointOnCubicBezier(0, x, y, points[0], points[1], points[2], points[3], points[4], points[5]);
  5476. for (t = 0.01; t <= 1; t += 0.01) {
  5477. p2 = this.getPointOnCubicBezier(t, x, y, points[0], points[1], points[2], points[3], points[4], points[5]);
  5478. len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);
  5479. p1 = p2;
  5480. }
  5481. return len;
  5482. case 'Q':
  5483. // Approximates by breaking curve into 100 line segments
  5484. len = 0.0;
  5485. p1 = this.getPointOnQuadraticBezier(0, x, y, points[0], points[1], points[2], points[3]);
  5486. for (t = 0.01; t <= 1; t += 0.01) {
  5487. p2 = this.getPointOnQuadraticBezier(t, x, y, points[0], points[1], points[2], points[3]);
  5488. len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);
  5489. p1 = p2;
  5490. }
  5491. return len;
  5492. case 'A':
  5493. // Approximates by breaking curve into line segments
  5494. len = 0.0;
  5495. var start = points[4]; // 4 = theta
  5496. var dTheta = points[5]; // 5 = dTheta
  5497. var end = points[4] + dTheta;
  5498. var inc = Math.PI / 180.0; // 1 degree resolution
  5499. if (Math.abs(start - end) < inc) {
  5500. inc = Math.abs(start - end);
  5501. } // Note: for purpose of calculating arc length, not going to worry about rotating X-axis by angle psi
  5502. p1 = this.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], start, 0);
  5503. if (dTheta < 0) {
  5504. // clockwise
  5505. for (t = start - inc; t > end; t -= inc) {
  5506. p2 = this.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], t, 0);
  5507. len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);
  5508. p1 = p2;
  5509. }
  5510. } else {
  5511. // counter-clockwise
  5512. for (t = start + inc; t < end; t += inc) {
  5513. p2 = this.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], t, 0);
  5514. len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);
  5515. p1 = p2;
  5516. }
  5517. }
  5518. p2 = this.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], end, 0);
  5519. len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);
  5520. return len;
  5521. }
  5522. return 0;
  5523. }
  5524. }, {
  5525. key: "getPointOnLine",
  5526. value: function getPointOnLine(dist, P1x, P1y, P2x, P2y) {
  5527. var fromX = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : P1x;
  5528. var fromY = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : P1y;
  5529. var m = (P2y - P1y) / (P2x - P1x + PSEUDO_ZERO);
  5530. var run = Math.sqrt(dist * dist / (1 + m * m));
  5531. if (P2x < P1x) {
  5532. run *= -1;
  5533. }
  5534. var rise = m * run;
  5535. var pt = null;
  5536. if (P2x === P1x) {
  5537. // vertical line
  5538. pt = {
  5539. x: fromX,
  5540. y: fromY + rise
  5541. };
  5542. } else if ((fromY - P1y) / (fromX - P1x + PSEUDO_ZERO) === m) {
  5543. pt = {
  5544. x: fromX + run,
  5545. y: fromY + rise
  5546. };
  5547. } else {
  5548. var ix = 0;
  5549. var iy = 0;
  5550. var len = this.getLineLength(P1x, P1y, P2x, P2y);
  5551. if (len < PSEUDO_ZERO) {
  5552. return null;
  5553. }
  5554. var u = (fromX - P1x) * (P2x - P1x) + (fromY - P1y) * (P2y - P1y);
  5555. u = u / (len * len);
  5556. ix = P1x + u * (P2x - P1x);
  5557. iy = P1y + u * (P2y - P1y);
  5558. var pRise = this.getLineLength(fromX, fromY, ix, iy);
  5559. var pRun = Math.sqrt(dist * dist - pRise * pRise);
  5560. run = Math.sqrt(pRun * pRun / (1 + m * m));
  5561. if (P2x < P1x) {
  5562. run *= -1;
  5563. }
  5564. rise = m * run;
  5565. pt = {
  5566. x: ix + run,
  5567. y: iy + rise
  5568. };
  5569. }
  5570. return pt;
  5571. }
  5572. }, {
  5573. key: "getPointOnPath",
  5574. value: function getPointOnPath(distance) {
  5575. var fullLen = this.getPathLength();
  5576. var cumulativePathLength = 0;
  5577. var p = null;
  5578. if (distance < -0.00005 || distance - 0.00005 > fullLen) {
  5579. return null;
  5580. }
  5581. var dataArray = this.dataArray;
  5582. var _iterator = _createForOfIteratorHelper$1(dataArray),
  5583. _step;
  5584. try {
  5585. for (_iterator.s(); !(_step = _iterator.n()).done;) {
  5586. var pathCmd = _step.value;
  5587. if (pathCmd && (pathCmd.pathLength < 0.00005 || cumulativePathLength + pathCmd.pathLength + 0.00005 < distance)) {
  5588. cumulativePathLength += pathCmd.pathLength;
  5589. continue;
  5590. }
  5591. var delta = distance - cumulativePathLength;
  5592. var currentT = 0;
  5593. switch (pathCmd.command) {
  5594. case 'L':
  5595. p = this.getPointOnLine(delta, pathCmd.start.x, pathCmd.start.y, pathCmd.points[0], pathCmd.points[1], pathCmd.start.x, pathCmd.start.y);
  5596. break;
  5597. case 'A':
  5598. var start = pathCmd.points[4]; // 4 = theta
  5599. var dTheta = pathCmd.points[5]; // 5 = dTheta
  5600. var end = pathCmd.points[4] + dTheta;
  5601. currentT = start + delta / pathCmd.pathLength * dTheta;
  5602. if (dTheta < 0 && currentT < end || dTheta >= 0 && currentT > end) {
  5603. break;
  5604. }
  5605. p = this.getPointOnEllipticalArc(pathCmd.points[0], pathCmd.points[1], pathCmd.points[2], pathCmd.points[3], currentT, pathCmd.points[6]);
  5606. break;
  5607. case 'C':
  5608. currentT = delta / pathCmd.pathLength;
  5609. if (currentT > 1) {
  5610. currentT = 1;
  5611. }
  5612. p = this.getPointOnCubicBezier(currentT, pathCmd.start.x, pathCmd.start.y, pathCmd.points[0], pathCmd.points[1], pathCmd.points[2], pathCmd.points[3], pathCmd.points[4], pathCmd.points[5]);
  5613. break;
  5614. case 'Q':
  5615. currentT = delta / pathCmd.pathLength;
  5616. if (currentT > 1) {
  5617. currentT = 1;
  5618. }
  5619. p = this.getPointOnQuadraticBezier(currentT, pathCmd.start.x, pathCmd.start.y, pathCmd.points[0], pathCmd.points[1], pathCmd.points[2], pathCmd.points[3]);
  5620. break;
  5621. default:
  5622. }
  5623. if (p) {
  5624. return p;
  5625. }
  5626. break;
  5627. }
  5628. } catch (err) {
  5629. _iterator.e(err);
  5630. } finally {
  5631. _iterator.f();
  5632. }
  5633. return null;
  5634. }
  5635. }, {
  5636. key: "getLineLength",
  5637. value: function getLineLength(x1, y1, x2, y2) {
  5638. return Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
  5639. }
  5640. }, {
  5641. key: "getPathLength",
  5642. value: function getPathLength() {
  5643. if (this.pathLength === -1) {
  5644. this.pathLength = this.dataArray.reduce(function (length, command) {
  5645. return command.pathLength > 0 ? length + command.pathLength : length;
  5646. }, 0);
  5647. }
  5648. return this.pathLength;
  5649. }
  5650. }, {
  5651. key: "getPointOnCubicBezier",
  5652. value: function getPointOnCubicBezier(pct, P1x, P1y, P2x, P2y, P3x, P3y, P4x, P4y) {
  5653. var x = P4x * CB1(pct) + P3x * CB2(pct) + P2x * CB3(pct) + P1x * CB4(pct);
  5654. var y = P4y * CB1(pct) + P3y * CB2(pct) + P2y * CB3(pct) + P1y * CB4(pct);
  5655. return {
  5656. x: x,
  5657. y: y
  5658. };
  5659. }
  5660. }, {
  5661. key: "getPointOnQuadraticBezier",
  5662. value: function getPointOnQuadraticBezier(pct, P1x, P1y, P2x, P2y, P3x, P3y) {
  5663. var x = P3x * QB1(pct) + P2x * QB2(pct) + P1x * QB3(pct);
  5664. var y = P3y * QB1(pct) + P2y * QB2(pct) + P1y * QB3(pct);
  5665. return {
  5666. x: x,
  5667. y: y
  5668. };
  5669. }
  5670. }, {
  5671. key: "getPointOnEllipticalArc",
  5672. value: function getPointOnEllipticalArc(cx, cy, rx, ry, theta, psi) {
  5673. var cosPsi = Math.cos(psi);
  5674. var sinPsi = Math.sin(psi);
  5675. var pt = {
  5676. x: rx * Math.cos(theta),
  5677. y: ry * Math.sin(theta)
  5678. };
  5679. return {
  5680. x: cx + (pt.x * cosPsi - pt.y * sinPsi),
  5681. y: cy + (pt.x * sinPsi + pt.y * cosPsi)
  5682. };
  5683. } // TODO need some optimisations. possibly build cache only for curved segments?
  5684. }, {
  5685. key: "buildEquidistantCache",
  5686. value: function buildEquidistantCache(inputStep, inputPrecision) {
  5687. var fullLen = this.getPathLength();
  5688. var precision = inputPrecision || 0.25; // accuracy vs performance
  5689. var step = inputStep || fullLen / 100;
  5690. if (!this.equidistantCache || this.equidistantCache.step !== step || this.equidistantCache.precision !== precision) {
  5691. // Prepare cache
  5692. this.equidistantCache = {
  5693. step: step,
  5694. precision: precision,
  5695. points: []
  5696. }; // Calculate points
  5697. var s = 0;
  5698. for (var l = 0; l <= fullLen; l += precision) {
  5699. var p0 = this.getPointOnPath(l);
  5700. var p1 = this.getPointOnPath(l + precision);
  5701. if (!p0 || !p1) {
  5702. continue;
  5703. }
  5704. s += this.getLineLength(p0.x, p0.y, p1.x, p1.y);
  5705. if (s >= step) {
  5706. this.equidistantCache.points.push({
  5707. x: p0.x,
  5708. y: p0.y,
  5709. distance: l
  5710. });
  5711. s -= step;
  5712. }
  5713. }
  5714. }
  5715. }
  5716. }, {
  5717. key: "getEquidistantPointOnPath",
  5718. value: function getEquidistantPointOnPath(targetDistance, step, precision) {
  5719. this.buildEquidistantCache(step, precision);
  5720. if (targetDistance < 0 || targetDistance - this.getPathLength() > 0.00005) {
  5721. return null;
  5722. }
  5723. var idx = Math.round(targetDistance / this.getPathLength() * (this.equidistantCache.points.length - 1));
  5724. return this.equidistantCache.points[idx] || null;
  5725. }
  5726. }]);
  5727. return TextPathElement;
  5728. }(TextElement);
  5729. function _createSuper$y(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$y()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
  5730. function _isNativeReflectConstruct$y() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  5731. var ImageElement = /*#__PURE__*/function (_RenderedElement) {
  5732. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(ImageElement, _RenderedElement);
  5733. var _super = _createSuper$y(ImageElement);
  5734. function ImageElement(document, node, captureTextNodes) {
  5735. var _this;
  5736. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, ImageElement);
  5737. _this = _super.call(this, document, node, captureTextNodes);
  5738. _this.type = 'image';
  5739. _this.loaded = false;
  5740. var href = _this.getHrefAttribute().getString();
  5741. if (!href) {
  5742. return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(_this);
  5743. }
  5744. var isSvg = /\.svg$/.test(href);
  5745. document.images.push((0,_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_46__.default)(_this));
  5746. if (!isSvg) {
  5747. _this.loadImage(href);
  5748. } else {
  5749. _this.loadSvg(href);
  5750. }
  5751. _this.isSvg = isSvg;
  5752. return _this;
  5753. }
  5754. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(ImageElement, [{
  5755. key: "loadImage",
  5756. value: function () {
  5757. var _loadImage = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_15__.default)( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().mark(function _callee(href) {
  5758. var image;
  5759. return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().wrap(function _callee$(_context) {
  5760. while (1) {
  5761. switch (_context.prev = _context.next) {
  5762. case 0:
  5763. _context.prev = 0;
  5764. _context.next = 3;
  5765. return this.document.createImage(href);
  5766. case 3:
  5767. image = _context.sent;
  5768. this.image = image;
  5769. _context.next = 10;
  5770. break;
  5771. case 7:
  5772. _context.prev = 7;
  5773. _context.t0 = _context["catch"](0);
  5774. // tslint:disable-next-line: no-console
  5775. console.error("Error while loading image \"".concat(href, "\":"), _context.t0);
  5776. case 10:
  5777. this.loaded = true;
  5778. case 11:
  5779. case "end":
  5780. return _context.stop();
  5781. }
  5782. }
  5783. }, _callee, this, [[0, 7]]);
  5784. }));
  5785. function loadImage(_x) {
  5786. return _loadImage.apply(this, arguments);
  5787. }
  5788. return loadImage;
  5789. }()
  5790. }, {
  5791. key: "loadSvg",
  5792. value: function () {
  5793. var _loadSvg = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_15__.default)( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().mark(function _callee2(href) {
  5794. var response, svg;
  5795. return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().wrap(function _callee2$(_context2) {
  5796. while (1) {
  5797. switch (_context2.prev = _context2.next) {
  5798. case 0:
  5799. _context2.prev = 0;
  5800. _context2.next = 3;
  5801. return this.document.fetch(href);
  5802. case 3:
  5803. response = _context2.sent;
  5804. _context2.next = 6;
  5805. return response.text();
  5806. case 6:
  5807. svg = _context2.sent;
  5808. this.image = svg;
  5809. _context2.next = 13;
  5810. break;
  5811. case 10:
  5812. _context2.prev = 10;
  5813. _context2.t0 = _context2["catch"](0);
  5814. // tslint:disable-next-line: no-console
  5815. console.error("Error while loading image \"".concat(href, "\":"), _context2.t0);
  5816. case 13:
  5817. this.loaded = true;
  5818. case 14:
  5819. case "end":
  5820. return _context2.stop();
  5821. }
  5822. }
  5823. }, _callee2, this, [[0, 10]]);
  5824. }));
  5825. function loadSvg(_x2) {
  5826. return _loadSvg.apply(this, arguments);
  5827. }
  5828. return loadSvg;
  5829. }()
  5830. }, {
  5831. key: "renderChildren",
  5832. value: function renderChildren(ctx) {
  5833. var document = this.document,
  5834. image = this.image,
  5835. loaded = this.loaded;
  5836. var x = this.getAttribute('x').getPixels('x');
  5837. var y = this.getAttribute('y').getPixels('y');
  5838. var width = this.getStyle('width').getPixels('x');
  5839. var height = this.getStyle('height').getPixels('y');
  5840. if (!loaded || !image || !width || !height) {
  5841. return;
  5842. }
  5843. ctx.save();
  5844. if (this.isSvg) {
  5845. document.canvg.forkString(ctx, this.image, {
  5846. ignoreMouse: true,
  5847. ignoreAnimation: true,
  5848. ignoreDimensions: true,
  5849. ignoreClear: true,
  5850. offsetX: x,
  5851. offsetY: y,
  5852. scaleWidth: width,
  5853. scaleHeight: height
  5854. }).render();
  5855. } else {
  5856. var _image = this.image;
  5857. ctx.translate(x, y);
  5858. document.setViewBox({
  5859. ctx: ctx,
  5860. aspectRatio: this.getAttribute('preserveAspectRatio').getString(),
  5861. width: width,
  5862. desiredWidth: _image.width,
  5863. height: height,
  5864. desiredHeight: _image.height
  5865. });
  5866. if (this.loaded) {
  5867. if (typeof _image.complete === 'undefined' || _image.complete) {
  5868. ctx.drawImage(_image, 0, 0);
  5869. }
  5870. }
  5871. }
  5872. ctx.restore();
  5873. }
  5874. }, {
  5875. key: "getBoundingBox",
  5876. value: function getBoundingBox() {
  5877. var x = this.getAttribute('x').getPixels('x');
  5878. var y = this.getAttribute('y').getPixels('y');
  5879. var width = this.getStyle('width').getPixels('x');
  5880. var height = this.getStyle('height').getPixels('y');
  5881. return new BoundingBox(x, y, x + width, y + height);
  5882. }
  5883. }]);
  5884. return ImageElement;
  5885. }(RenderedElement);
  5886. function _createSuper$z(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$z()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
  5887. function _isNativeReflectConstruct$z() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  5888. var SymbolElement = /*#__PURE__*/function (_RenderedElement) {
  5889. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(SymbolElement, _RenderedElement);
  5890. var _super = _createSuper$z(SymbolElement);
  5891. function SymbolElement() {
  5892. var _this;
  5893. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, SymbolElement);
  5894. _this = _super.apply(this, arguments);
  5895. _this.type = 'symbol';
  5896. return _this;
  5897. }
  5898. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(SymbolElement, [{
  5899. key: "render",
  5900. value: function render(_) {// NO RENDER
  5901. }
  5902. }]);
  5903. return SymbolElement;
  5904. }(RenderedElement);
  5905. var SVGFontLoader = /*#__PURE__*/function () {
  5906. function SVGFontLoader(document) {
  5907. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, SVGFontLoader);
  5908. this.document = document;
  5909. this.loaded = false;
  5910. document.fonts.push(this);
  5911. }
  5912. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(SVGFontLoader, [{
  5913. key: "load",
  5914. value: function () {
  5915. var _load = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_15__.default)( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().mark(function _callee(fontFamily, url) {
  5916. var document, svgDocument, fonts;
  5917. return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().wrap(function _callee$(_context) {
  5918. while (1) {
  5919. switch (_context.prev = _context.next) {
  5920. case 0:
  5921. _context.prev = 0;
  5922. document = this.document;
  5923. _context.next = 4;
  5924. return document.canvg.parser.load(url);
  5925. case 4:
  5926. svgDocument = _context.sent;
  5927. fonts = svgDocument.getElementsByTagName('font');
  5928. Array.from(fonts).forEach(function (fontNode) {
  5929. var font = document.createElement(fontNode);
  5930. document.definitions[fontFamily] = font;
  5931. });
  5932. _context.next = 12;
  5933. break;
  5934. case 9:
  5935. _context.prev = 9;
  5936. _context.t0 = _context["catch"](0);
  5937. // tslint:disable-next-line: no-console
  5938. console.error("Error while loading font \"".concat(url, "\":"), _context.t0);
  5939. case 12:
  5940. this.loaded = true;
  5941. case 13:
  5942. case "end":
  5943. return _context.stop();
  5944. }
  5945. }
  5946. }, _callee, this, [[0, 9]]);
  5947. }));
  5948. function load(_x, _x2) {
  5949. return _load.apply(this, arguments);
  5950. }
  5951. return load;
  5952. }()
  5953. }]);
  5954. return SVGFontLoader;
  5955. }();
  5956. function _createSuper$A(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$A()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
  5957. function _isNativeReflectConstruct$A() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  5958. var StyleElement = /*#__PURE__*/function (_Element) {
  5959. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(StyleElement, _Element);
  5960. var _super = _createSuper$A(StyleElement);
  5961. function StyleElement(document, node, captureTextNodes) {
  5962. var _this;
  5963. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, StyleElement);
  5964. _this = _super.call(this, document, node, captureTextNodes);
  5965. _this.type = 'style';
  5966. var css = compressSpaces(Array.from(node.childNodes).map(function (_) {
  5967. return _.data;
  5968. }).join('').replace(/(\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm, '') // remove comments
  5969. .replace(/@import.*;/g, '') // remove imports
  5970. );
  5971. var cssDefs = css.split('}');
  5972. cssDefs.forEach(function (_) {
  5973. var def = _.trim();
  5974. if (!def) {
  5975. return;
  5976. }
  5977. var cssParts = def.split('{');
  5978. var cssClasses = cssParts[0].split(',');
  5979. var cssProps = cssParts[1].split(';');
  5980. cssClasses.forEach(function (_) {
  5981. var cssClass = _.trim();
  5982. if (!cssClass) {
  5983. return;
  5984. }
  5985. var props = document.styles[cssClass] || {};
  5986. cssProps.forEach(function (cssProp) {
  5987. var prop = cssProp.indexOf(':');
  5988. var name = cssProp.substr(0, prop).trim();
  5989. var value = cssProp.substr(prop + 1, cssProp.length - prop).trim();
  5990. if (name && value) {
  5991. props[name] = new Property(document, name, value);
  5992. }
  5993. });
  5994. document.styles[cssClass] = props;
  5995. document.stylesSpecificity[cssClass] = getSelectorSpecificity(cssClass);
  5996. if (cssClass === '@font-face') {
  5997. // && !nodeEnv
  5998. var fontFamily = props['font-family'].getString().replace(/"|'/g, '');
  5999. var srcs = props.src.getString().split(',');
  6000. srcs.forEach(function (src) {
  6001. if (src.indexOf('format("svg")') > 0) {
  6002. var url = parseExternalUrl(src);
  6003. if (url) {
  6004. new SVGFontLoader(document).load(fontFamily, url);
  6005. }
  6006. }
  6007. });
  6008. }
  6009. });
  6010. });
  6011. return _this;
  6012. }
  6013. return StyleElement;
  6014. }(Element);
  6015. StyleElement.parseExternalUrl = parseExternalUrl;
  6016. function _createSuper$B(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$B()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
  6017. function _isNativeReflectConstruct$B() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  6018. var UseElement = /*#__PURE__*/function (_RenderedElement) {
  6019. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(UseElement, _RenderedElement);
  6020. var _super = _createSuper$B(UseElement);
  6021. function UseElement() {
  6022. var _this;
  6023. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, UseElement);
  6024. _this = _super.apply(this, arguments);
  6025. _this.type = 'use';
  6026. return _this;
  6027. }
  6028. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(UseElement, [{
  6029. key: "setContext",
  6030. value: function setContext(ctx) {
  6031. (0,_babel_runtime_helpers_get__WEBPACK_IMPORTED_MODULE_42__.default)((0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(UseElement.prototype), "setContext", this).call(this, ctx);
  6032. var xAttr = this.getAttribute('x');
  6033. var yAttr = this.getAttribute('y');
  6034. if (xAttr.hasValue()) {
  6035. ctx.translate(xAttr.getPixels('x'), 0);
  6036. }
  6037. if (yAttr.hasValue()) {
  6038. ctx.translate(0, yAttr.getPixels('y'));
  6039. }
  6040. }
  6041. }, {
  6042. key: "path",
  6043. value: function path(ctx) {
  6044. var element = this.element;
  6045. if (element) {
  6046. element.path(ctx);
  6047. }
  6048. }
  6049. }, {
  6050. key: "renderChildren",
  6051. value: function renderChildren(ctx) {
  6052. var document = this.document,
  6053. element = this.element;
  6054. if (element) {
  6055. var tempSvg = element;
  6056. if (element.type === 'symbol') {
  6057. // render me using a temporary svg element in symbol cases (http://www.w3.org/TR/SVG/struct.html#UseElement)
  6058. tempSvg = new SVGElement(document, null);
  6059. tempSvg.attributes.viewBox = new Property(document, 'viewBox', element.getAttribute('viewBox').getString());
  6060. tempSvg.attributes.preserveAspectRatio = new Property(document, 'preserveAspectRatio', element.getAttribute('preserveAspectRatio').getString());
  6061. tempSvg.attributes.overflow = new Property(document, 'overflow', element.getAttribute('overflow').getString());
  6062. tempSvg.children = element.children;
  6063. }
  6064. if (tempSvg.type === 'svg') {
  6065. var widthStyle = this.getStyle('width', false, true);
  6066. var heightStyle = this.getStyle('height', false, true); // if symbol or svg, inherit width/height from me
  6067. if (widthStyle.hasValue()) {
  6068. tempSvg.attributes.width = new Property(document, 'width', widthStyle.getString());
  6069. }
  6070. if (heightStyle.hasValue()) {
  6071. tempSvg.attributes.height = new Property(document, 'height', heightStyle.getString());
  6072. }
  6073. }
  6074. var oldParent = tempSvg.parent;
  6075. tempSvg.parent = this;
  6076. tempSvg.render(ctx);
  6077. tempSvg.parent = oldParent;
  6078. }
  6079. }
  6080. }, {
  6081. key: "getBoundingBox",
  6082. value: function getBoundingBox(ctx) {
  6083. var element = this.element;
  6084. if (element) {
  6085. return element.getBoundingBox(ctx);
  6086. }
  6087. return null;
  6088. }
  6089. }, {
  6090. key: "elementTransform",
  6091. value: function elementTransform() {
  6092. var document = this.document,
  6093. element = this.element;
  6094. return Transform.fromElement(document, element);
  6095. }
  6096. }, {
  6097. key: "element",
  6098. get: function get() {
  6099. if (!this._element) {
  6100. this._element = this.getHrefAttribute().getDefinition();
  6101. }
  6102. return this._element;
  6103. }
  6104. }]);
  6105. return UseElement;
  6106. }(RenderedElement);
  6107. function _createSuper$C(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$C()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
  6108. function _isNativeReflectConstruct$C() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  6109. function imGet(img, x, y, width, _, rgba) {
  6110. return img[y * width * 4 + x * 4 + rgba];
  6111. }
  6112. function imSet(img, x, y, width, _, rgba, val) {
  6113. img[y * width * 4 + x * 4 + rgba] = val;
  6114. }
  6115. function m(matrix, i, v) {
  6116. var mi = matrix[i];
  6117. return mi * (mi < 0 ? v - 255 : v);
  6118. }
  6119. function c(a, m1, m2, m3) {
  6120. return m1 + Math.cos(a) * m2 + Math.sin(a) * m3;
  6121. }
  6122. var FeColorMatrixElement = /*#__PURE__*/function (_Element) {
  6123. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(FeColorMatrixElement, _Element);
  6124. var _super = _createSuper$C(FeColorMatrixElement);
  6125. function FeColorMatrixElement(document, node, captureTextNodes) {
  6126. var _this;
  6127. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, FeColorMatrixElement);
  6128. _this = _super.call(this, document, node, captureTextNodes);
  6129. _this.type = 'feColorMatrix';
  6130. var matrix = toNumbers(_this.getAttribute('values').getString());
  6131. switch (_this.getAttribute('type').getString('matrix')) {
  6132. // http://www.w3.org/TR/SVG/filters.html#feColorMatrixElement
  6133. case 'saturate':
  6134. {
  6135. var s = matrix[0];
  6136. matrix = [0.213 + 0.787 * s, 0.715 - 0.715 * s, 0.072 - 0.072 * s, 0, 0, 0.213 - 0.213 * s, 0.715 + 0.285 * s, 0.072 - 0.072 * s, 0, 0, 0.213 - 0.213 * s, 0.715 - 0.715 * s, 0.072 + 0.928 * s, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1];
  6137. break;
  6138. }
  6139. case 'hueRotate':
  6140. {
  6141. var a = matrix[0] * Math.PI / 180.0;
  6142. matrix = [c(a, 0.213, 0.787, -0.213), c(a, 0.715, -0.715, -0.715), c(a, 0.072, -0.072, 0.928), 0, 0, c(a, 0.213, -0.213, 0.143), c(a, 0.715, 0.285, 0.140), c(a, 0.072, -0.072, -0.283), 0, 0, c(a, 0.213, -0.213, -0.787), c(a, 0.715, -0.715, 0.715), c(a, 0.072, 0.928, 0.072), 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1];
  6143. break;
  6144. }
  6145. case 'luminanceToAlpha':
  6146. matrix = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.2125, 0.7154, 0.0721, 0, 0, 0, 0, 0, 0, 1];
  6147. break;
  6148. }
  6149. _this.matrix = matrix;
  6150. _this.includeOpacity = _this.getAttribute('includeOpacity').hasValue();
  6151. return _this;
  6152. }
  6153. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(FeColorMatrixElement, [{
  6154. key: "apply",
  6155. value: function apply(ctx, _, __, width, height) {
  6156. // assuming x==0 && y==0 for now
  6157. var includeOpacity = this.includeOpacity,
  6158. matrix = this.matrix;
  6159. var srcData = ctx.getImageData(0, 0, width, height);
  6160. for (var y = 0; y < height; y++) {
  6161. for (var x = 0; x < width; x++) {
  6162. var r = imGet(srcData.data, x, y, width, height, 0);
  6163. var g = imGet(srcData.data, x, y, width, height, 1);
  6164. var b = imGet(srcData.data, x, y, width, height, 2);
  6165. var a = imGet(srcData.data, x, y, width, height, 3);
  6166. var nr = m(matrix, 0, r) + m(matrix, 1, g) + m(matrix, 2, b) + m(matrix, 3, a) + m(matrix, 4, 1);
  6167. var ng = m(matrix, 5, r) + m(matrix, 6, g) + m(matrix, 7, b) + m(matrix, 8, a) + m(matrix, 9, 1);
  6168. var nb = m(matrix, 10, r) + m(matrix, 11, g) + m(matrix, 12, b) + m(matrix, 13, a) + m(matrix, 14, 1);
  6169. var na = m(matrix, 15, r) + m(matrix, 16, g) + m(matrix, 17, b) + m(matrix, 18, a) + m(matrix, 19, 1);
  6170. if (includeOpacity) {
  6171. nr = ng = nb = 0;
  6172. na *= a / 255;
  6173. }
  6174. imSet(srcData.data, x, y, width, height, 0, nr);
  6175. imSet(srcData.data, x, y, width, height, 1, ng);
  6176. imSet(srcData.data, x, y, width, height, 2, nb);
  6177. imSet(srcData.data, x, y, width, height, 3, na);
  6178. }
  6179. }
  6180. ctx.clearRect(0, 0, width, height);
  6181. ctx.putImageData(srcData, 0, 0);
  6182. }
  6183. }]);
  6184. return FeColorMatrixElement;
  6185. }(Element);
  6186. function _createSuper$D(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$D()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
  6187. function _isNativeReflectConstruct$D() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  6188. var MaskElement = /*#__PURE__*/function (_Element) {
  6189. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(MaskElement, _Element);
  6190. var _super = _createSuper$D(MaskElement);
  6191. function MaskElement() {
  6192. var _this;
  6193. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, MaskElement);
  6194. _this = _super.apply(this, arguments);
  6195. _this.type = 'mask';
  6196. return _this;
  6197. }
  6198. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(MaskElement, [{
  6199. key: "apply",
  6200. value: function apply(ctx, element) {
  6201. var document = this.document; // render as temp svg
  6202. var x = this.getAttribute('x').getPixels('x');
  6203. var y = this.getAttribute('y').getPixels('y');
  6204. var width = this.getStyle('width').getPixels('x');
  6205. var height = this.getStyle('height').getPixels('y');
  6206. if (!width && !height) {
  6207. var boundingBox = new BoundingBox();
  6208. this.children.forEach(function (child) {
  6209. boundingBox.addBoundingBox(child.getBoundingBox(ctx));
  6210. });
  6211. x = Math.floor(boundingBox.x1);
  6212. y = Math.floor(boundingBox.y1);
  6213. width = Math.floor(boundingBox.width);
  6214. height = Math.floor(boundingBox.height);
  6215. }
  6216. var ignoredStyles = this.removeStyles(element, MaskElement.ignoreStyles);
  6217. var maskCanvas = document.createCanvas(x + width, y + height);
  6218. var maskCtx = maskCanvas.getContext('2d');
  6219. document.screen.setDefaults(maskCtx);
  6220. this.renderChildren(maskCtx); // convert mask to alpha with a fake node
  6221. // TODO: refactor out apply from feColorMatrix
  6222. new FeColorMatrixElement(document, {
  6223. nodeType: 1,
  6224. childNodes: [],
  6225. attributes: [{
  6226. nodeName: 'type',
  6227. value: 'luminanceToAlpha'
  6228. }, {
  6229. nodeName: 'includeOpacity',
  6230. value: 'true'
  6231. }]
  6232. }).apply(maskCtx, 0, 0, x + width, y + height);
  6233. var tmpCanvas = document.createCanvas(x + width, y + height);
  6234. var tmpCtx = tmpCanvas.getContext('2d');
  6235. document.screen.setDefaults(tmpCtx);
  6236. element.render(tmpCtx);
  6237. tmpCtx.globalCompositeOperation = 'destination-in';
  6238. tmpCtx.fillStyle = maskCtx.createPattern(maskCanvas, 'no-repeat');
  6239. tmpCtx.fillRect(0, 0, x + width, y + height);
  6240. ctx.fillStyle = tmpCtx.createPattern(tmpCanvas, 'no-repeat');
  6241. ctx.fillRect(0, 0, x + width, y + height); // reassign mask
  6242. this.restoreStyles(element, ignoredStyles);
  6243. }
  6244. }, {
  6245. key: "render",
  6246. value: function render(_) {// NO RENDER
  6247. }
  6248. }]);
  6249. return MaskElement;
  6250. }(Element);
  6251. MaskElement.ignoreStyles = ['mask', 'transform', 'clip-path'];
  6252. function _createSuper$E(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$E()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
  6253. function _isNativeReflectConstruct$E() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  6254. var noop = function noop() {};
  6255. var ClipPathElement = /*#__PURE__*/function (_Element) {
  6256. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(ClipPathElement, _Element);
  6257. var _super = _createSuper$E(ClipPathElement);
  6258. function ClipPathElement() {
  6259. var _this;
  6260. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, ClipPathElement);
  6261. _this = _super.apply(this, arguments);
  6262. _this.type = 'clipPath';
  6263. return _this;
  6264. }
  6265. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(ClipPathElement, [{
  6266. key: "apply",
  6267. value: function apply(ctx) {
  6268. var document = this.document;
  6269. var contextProto = Reflect.getPrototypeOf(ctx);
  6270. var beginPath = ctx.beginPath,
  6271. closePath = ctx.closePath;
  6272. if (contextProto) {
  6273. contextProto.beginPath = noop;
  6274. contextProto.closePath = noop;
  6275. }
  6276. Reflect.apply(beginPath, ctx, []);
  6277. this.children.forEach(function (child) {
  6278. if (typeof child.path === 'undefined') {
  6279. return;
  6280. }
  6281. var transform = typeof child.elementTransform !== 'undefined' ? child.elementTransform() : null; // handle <use />
  6282. if (!transform) {
  6283. transform = Transform.fromElement(document, child);
  6284. }
  6285. if (transform) {
  6286. transform.apply(ctx);
  6287. }
  6288. child.path(ctx);
  6289. if (contextProto) {
  6290. contextProto.closePath = closePath;
  6291. }
  6292. if (transform) {
  6293. transform.unapply(ctx);
  6294. }
  6295. });
  6296. Reflect.apply(closePath, ctx, []);
  6297. ctx.clip();
  6298. if (contextProto) {
  6299. contextProto.beginPath = beginPath;
  6300. contextProto.closePath = closePath;
  6301. }
  6302. }
  6303. }, {
  6304. key: "render",
  6305. value: function render(_) {// NO RENDER
  6306. }
  6307. }]);
  6308. return ClipPathElement;
  6309. }(Element);
  6310. function _createSuper$F(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$F()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
  6311. function _isNativeReflectConstruct$F() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  6312. var FilterElement = /*#__PURE__*/function (_Element) {
  6313. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(FilterElement, _Element);
  6314. var _super = _createSuper$F(FilterElement);
  6315. function FilterElement() {
  6316. var _this;
  6317. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, FilterElement);
  6318. _this = _super.apply(this, arguments);
  6319. _this.type = 'filter';
  6320. return _this;
  6321. }
  6322. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(FilterElement, [{
  6323. key: "apply",
  6324. value: function apply(ctx, element) {
  6325. // render as temp svg
  6326. var document = this.document,
  6327. children = this.children;
  6328. var boundingBox = element.getBoundingBox(ctx);
  6329. if (!boundingBox) {
  6330. return;
  6331. }
  6332. var px = 0;
  6333. var py = 0;
  6334. children.forEach(function (child) {
  6335. var efd = child.extraFilterDistance || 0;
  6336. px = Math.max(px, efd);
  6337. py = Math.max(py, efd);
  6338. });
  6339. var width = Math.floor(boundingBox.width);
  6340. var height = Math.floor(boundingBox.height);
  6341. var tmpCanvasWidth = width + 2 * px;
  6342. var tmpCanvasHeight = height + 2 * py;
  6343. if (tmpCanvasWidth < 1 || tmpCanvasHeight < 1) {
  6344. return;
  6345. }
  6346. var x = Math.floor(boundingBox.x);
  6347. var y = Math.floor(boundingBox.y);
  6348. var ignoredStyles = this.removeStyles(element, FilterElement.ignoreStyles);
  6349. var tmpCanvas = document.createCanvas(tmpCanvasWidth, tmpCanvasHeight);
  6350. var tmpCtx = tmpCanvas.getContext('2d');
  6351. document.screen.setDefaults(tmpCtx);
  6352. tmpCtx.translate(-x + px, -y + py);
  6353. element.render(tmpCtx); // apply filters
  6354. children.forEach(function (child) {
  6355. if (typeof child.apply === 'function') {
  6356. child.apply(tmpCtx, 0, 0, tmpCanvasWidth, tmpCanvasHeight);
  6357. }
  6358. }); // render on me
  6359. ctx.drawImage(tmpCanvas, 0, 0, tmpCanvasWidth, tmpCanvasHeight, x - px, y - py, tmpCanvasWidth, tmpCanvasHeight);
  6360. this.restoreStyles(element, ignoredStyles);
  6361. }
  6362. }, {
  6363. key: "render",
  6364. value: function render(_) {// NO RENDER
  6365. }
  6366. }]);
  6367. return FilterElement;
  6368. }(Element);
  6369. FilterElement.ignoreStyles = ['filter', 'transform', 'clip-path'];
  6370. function _createSuper$G(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$G()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
  6371. function _isNativeReflectConstruct$G() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  6372. var FeDropShadowElement = /*#__PURE__*/function (_Element) {
  6373. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(FeDropShadowElement, _Element);
  6374. var _super = _createSuper$G(FeDropShadowElement);
  6375. function FeDropShadowElement(document, node, captureTextNodes) {
  6376. var _this;
  6377. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, FeDropShadowElement);
  6378. _this = _super.call(this, document, node, captureTextNodes);
  6379. _this.type = 'feDropShadow';
  6380. _this.addStylesFromStyleDefinition();
  6381. return _this;
  6382. }
  6383. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(FeDropShadowElement, [{
  6384. key: "apply",
  6385. value: function apply(_, __, ___, ____, _____) {// TODO: implement
  6386. }
  6387. }]);
  6388. return FeDropShadowElement;
  6389. }(Element);
  6390. function _createSuper$H(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$H()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
  6391. function _isNativeReflectConstruct$H() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  6392. var FeMorphologyElement = /*#__PURE__*/function (_Element) {
  6393. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(FeMorphologyElement, _Element);
  6394. var _super = _createSuper$H(FeMorphologyElement);
  6395. function FeMorphologyElement() {
  6396. var _this;
  6397. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, FeMorphologyElement);
  6398. _this = _super.apply(this, arguments);
  6399. _this.type = 'feMorphology';
  6400. return _this;
  6401. }
  6402. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(FeMorphologyElement, [{
  6403. key: "apply",
  6404. value: function apply(_, __, ___, ____, _____) {// TODO: implement
  6405. }
  6406. }]);
  6407. return FeMorphologyElement;
  6408. }(Element);
  6409. function _createSuper$I(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$I()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
  6410. function _isNativeReflectConstruct$I() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  6411. var FeCompositeElement = /*#__PURE__*/function (_Element) {
  6412. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(FeCompositeElement, _Element);
  6413. var _super = _createSuper$I(FeCompositeElement);
  6414. function FeCompositeElement() {
  6415. var _this;
  6416. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, FeCompositeElement);
  6417. _this = _super.apply(this, arguments);
  6418. _this.type = 'feComposite';
  6419. return _this;
  6420. }
  6421. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(FeCompositeElement, [{
  6422. key: "apply",
  6423. value: function apply(_, __, ___, ____, _____) {// TODO: implement
  6424. }
  6425. }]);
  6426. return FeCompositeElement;
  6427. }(Element);
  6428. function _createSuper$J(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$J()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
  6429. function _isNativeReflectConstruct$J() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  6430. var FeGaussianBlurElement = /*#__PURE__*/function (_Element) {
  6431. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(FeGaussianBlurElement, _Element);
  6432. var _super = _createSuper$J(FeGaussianBlurElement);
  6433. function FeGaussianBlurElement(document, node, captureTextNodes) {
  6434. var _this;
  6435. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, FeGaussianBlurElement);
  6436. _this = _super.call(this, document, node, captureTextNodes);
  6437. _this.type = 'feGaussianBlur';
  6438. _this.blurRadius = Math.floor(_this.getAttribute('stdDeviation').getNumber());
  6439. _this.extraFilterDistance = _this.blurRadius;
  6440. return _this;
  6441. }
  6442. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(FeGaussianBlurElement, [{
  6443. key: "apply",
  6444. value: function apply(ctx, x, y, width, height) {
  6445. var document = this.document,
  6446. blurRadius = this.blurRadius;
  6447. var body = document.window ? document.window.document.body : null;
  6448. var canvas = ctx.canvas; // StackBlur requires canvas be on document
  6449. canvas.id = document.getUniqueId();
  6450. if (body) {
  6451. canvas.style.display = 'none';
  6452. body.appendChild(canvas);
  6453. }
  6454. (0,stackblur_canvas__WEBPACK_IMPORTED_MODULE_55__.canvasRGBA)(canvas, x, y, width, height, blurRadius);
  6455. if (body) {
  6456. body.removeChild(canvas);
  6457. }
  6458. }
  6459. }]);
  6460. return FeGaussianBlurElement;
  6461. }(Element);
  6462. function _createSuper$K(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$K()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
  6463. function _isNativeReflectConstruct$K() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  6464. var TitleElement = /*#__PURE__*/function (_Element) {
  6465. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(TitleElement, _Element);
  6466. var _super = _createSuper$K(TitleElement);
  6467. function TitleElement() {
  6468. var _this;
  6469. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, TitleElement);
  6470. _this = _super.apply(this, arguments);
  6471. _this.type = 'title';
  6472. return _this;
  6473. }
  6474. return TitleElement;
  6475. }(Element);
  6476. function _createSuper$L(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$L()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
  6477. function _isNativeReflectConstruct$L() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  6478. var DescElement = /*#__PURE__*/function (_Element) {
  6479. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(DescElement, _Element);
  6480. var _super = _createSuper$L(DescElement);
  6481. function DescElement() {
  6482. var _this;
  6483. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, DescElement);
  6484. _this = _super.apply(this, arguments);
  6485. _this.type = 'desc';
  6486. return _this;
  6487. }
  6488. return DescElement;
  6489. }(Element);
  6490. var elementTypes = {
  6491. 'svg': SVGElement,
  6492. 'rect': RectElement,
  6493. 'circle': CircleElement,
  6494. 'ellipse': EllipseElement,
  6495. 'line': LineElement,
  6496. 'polyline': PolylineElement,
  6497. 'polygon': PolygonElement,
  6498. 'path': PathElement,
  6499. 'pattern': PatternElement,
  6500. 'marker': MarkerElement,
  6501. 'defs': DefsElement,
  6502. 'linearGradient': LinearGradientElement,
  6503. 'radialGradient': RadialGradientElement,
  6504. 'stop': StopElement,
  6505. 'animate': AnimateElement,
  6506. 'animateColor': AnimateColorElement,
  6507. 'animateTransform': AnimateTransformElement,
  6508. 'font': FontElement,
  6509. 'font-face': FontFaceElement,
  6510. 'missing-glyph': MissingGlyphElement,
  6511. 'glyph': GlyphElement,
  6512. 'text': TextElement,
  6513. 'tspan': TSpanElement,
  6514. 'tref': TRefElement,
  6515. 'a': AElement,
  6516. 'textPath': TextPathElement,
  6517. 'image': ImageElement,
  6518. 'g': GElement,
  6519. 'symbol': SymbolElement,
  6520. 'style': StyleElement,
  6521. 'use': UseElement,
  6522. 'mask': MaskElement,
  6523. 'clipPath': ClipPathElement,
  6524. 'filter': FilterElement,
  6525. 'feDropShadow': FeDropShadowElement,
  6526. 'feMorphology': FeMorphologyElement,
  6527. 'feComposite': FeCompositeElement,
  6528. 'feColorMatrix': FeColorMatrixElement,
  6529. 'feGaussianBlur': FeGaussianBlurElement,
  6530. 'title': TitleElement,
  6531. 'desc': DescElement
  6532. };
  6533. function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
  6534. function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_16__.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
  6535. function createCanvas(width, height) {
  6536. var canvas = document.createElement('canvas');
  6537. canvas.width = width;
  6538. canvas.height = height;
  6539. return canvas;
  6540. }
  6541. function createImage(_x) {
  6542. return _createImage.apply(this, arguments);
  6543. }
  6544. function _createImage() {
  6545. _createImage = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_15__.default)( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().mark(function _callee(src) {
  6546. var anonymousCrossOrigin,
  6547. image,
  6548. _args = arguments;
  6549. return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().wrap(function _callee$(_context) {
  6550. while (1) {
  6551. switch (_context.prev = _context.next) {
  6552. case 0:
  6553. anonymousCrossOrigin = _args.length > 1 && _args[1] !== undefined ? _args[1] : false;
  6554. image = document.createElement('img');
  6555. if (anonymousCrossOrigin) {
  6556. image.crossOrigin = 'Anonymous';
  6557. }
  6558. return _context.abrupt("return", new Promise(function (resolve, reject) {
  6559. image.onload = function () {
  6560. resolve(image);
  6561. };
  6562. image.onerror = function () {
  6563. reject();
  6564. };
  6565. image.src = src;
  6566. }));
  6567. case 4:
  6568. case "end":
  6569. return _context.stop();
  6570. }
  6571. }
  6572. }, _callee);
  6573. }));
  6574. return _createImage.apply(this, arguments);
  6575. }
  6576. var Document = /*#__PURE__*/function () {
  6577. function Document(canvg) {
  6578. var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
  6579. _ref$rootEmSize = _ref.rootEmSize,
  6580. rootEmSize = _ref$rootEmSize === void 0 ? 12 : _ref$rootEmSize,
  6581. _ref$emSize = _ref.emSize,
  6582. emSize = _ref$emSize === void 0 ? 12 : _ref$emSize,
  6583. _ref$createCanvas = _ref.createCanvas,
  6584. createCanvas = _ref$createCanvas === void 0 ? Document.createCanvas : _ref$createCanvas,
  6585. _ref$createImage = _ref.createImage,
  6586. createImage = _ref$createImage === void 0 ? Document.createImage : _ref$createImage,
  6587. anonymousCrossOrigin = _ref.anonymousCrossOrigin;
  6588. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Document);
  6589. this.canvg = canvg;
  6590. this.definitions = {};
  6591. this.styles = {};
  6592. this.stylesSpecificity = {};
  6593. this.images = [];
  6594. this.fonts = [];
  6595. this.emSizeStack = [];
  6596. this.uniqueId = 0;
  6597. this.screen = canvg.screen;
  6598. this.rootEmSize = rootEmSize;
  6599. this.emSize = emSize;
  6600. this.createCanvas = createCanvas;
  6601. this.createImage = this.bindCreateImage(createImage, anonymousCrossOrigin);
  6602. this.screen.wait(this.isImagesLoaded.bind(this));
  6603. this.screen.wait(this.isFontsLoaded.bind(this));
  6604. }
  6605. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Document, [{
  6606. key: "bindCreateImage",
  6607. value: function bindCreateImage(createImage, anonymousCrossOrigin) {
  6608. if (typeof anonymousCrossOrigin === 'boolean') {
  6609. return function (source, forceAnonymousCrossOrigin) {
  6610. return createImage(source, typeof forceAnonymousCrossOrigin === 'boolean' ? forceAnonymousCrossOrigin : anonymousCrossOrigin);
  6611. };
  6612. }
  6613. return createImage;
  6614. }
  6615. }, {
  6616. key: "popEmSize",
  6617. value: function popEmSize() {
  6618. var emSizeStack = this.emSizeStack;
  6619. emSizeStack.pop();
  6620. }
  6621. }, {
  6622. key: "getUniqueId",
  6623. value: function getUniqueId() {
  6624. return "canvg".concat(++this.uniqueId);
  6625. }
  6626. }, {
  6627. key: "isImagesLoaded",
  6628. value: function isImagesLoaded() {
  6629. return this.images.every(function (_) {
  6630. return _.loaded;
  6631. });
  6632. }
  6633. }, {
  6634. key: "isFontsLoaded",
  6635. value: function isFontsLoaded() {
  6636. return this.fonts.every(function (_) {
  6637. return _.loaded;
  6638. });
  6639. }
  6640. }, {
  6641. key: "createDocumentElement",
  6642. value: function createDocumentElement(document) {
  6643. var documentElement = this.createElement(document.documentElement);
  6644. documentElement.root = true;
  6645. documentElement.addStylesFromStyleDefinition();
  6646. this.documentElement = documentElement;
  6647. return documentElement;
  6648. }
  6649. }, {
  6650. key: "createElement",
  6651. value: function createElement(node) {
  6652. var elementType = node.nodeName.replace(/^[^:]+:/, '');
  6653. var ElementType = Document.elementTypes[elementType];
  6654. if (typeof ElementType !== 'undefined') {
  6655. return new ElementType(this, node);
  6656. }
  6657. return new UnknownElement(this, node);
  6658. }
  6659. }, {
  6660. key: "createTextNode",
  6661. value: function createTextNode(node) {
  6662. return new TextNode(this, node);
  6663. }
  6664. }, {
  6665. key: "setViewBox",
  6666. value: function setViewBox(config) {
  6667. this.screen.setViewBox(_objectSpread({
  6668. document: this
  6669. }, config));
  6670. }
  6671. }, {
  6672. key: "window",
  6673. get: function get() {
  6674. return this.screen.window;
  6675. }
  6676. }, {
  6677. key: "fetch",
  6678. get: function get() {
  6679. return this.screen.fetch;
  6680. }
  6681. }, {
  6682. key: "ctx",
  6683. get: function get() {
  6684. return this.screen.ctx;
  6685. }
  6686. }, {
  6687. key: "emSize",
  6688. get: function get() {
  6689. var emSizeStack = this.emSizeStack;
  6690. return emSizeStack[emSizeStack.length - 1];
  6691. },
  6692. set: function set(value) {
  6693. var emSizeStack = this.emSizeStack;
  6694. emSizeStack.push(value);
  6695. }
  6696. }]);
  6697. return Document;
  6698. }();
  6699. Document.createCanvas = createCanvas;
  6700. Document.createImage = createImage;
  6701. Document.elementTypes = elementTypes;
  6702. function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
  6703. function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$1(Object(source), true).forEach(function (key) { (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_16__.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
  6704. /**
  6705. * SVG renderer on canvas.
  6706. */
  6707. var Canvg = /*#__PURE__*/function () {
  6708. /**
  6709. * Main constructor.
  6710. * @param ctx - Rendering context.
  6711. * @param svg - SVG Document.
  6712. * @param options - Rendering options.
  6713. */
  6714. function Canvg(ctx, svg) {
  6715. var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  6716. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Canvg);
  6717. this.parser = new Parser(options);
  6718. this.screen = new Screen(ctx, options);
  6719. this.options = options;
  6720. var document = new Document(this, options);
  6721. var documentElement = document.createDocumentElement(svg);
  6722. this.document = document;
  6723. this.documentElement = documentElement;
  6724. }
  6725. /**
  6726. * Create Canvg isntance from SVG source string or URL.
  6727. * @param ctx - Rendering context.
  6728. * @param svg - SVG source string or URL.
  6729. * @param options - Rendering options.
  6730. */
  6731. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Canvg, [{
  6732. key: "fork",
  6733. /**
  6734. * Create new Canvg instance with inherited options.
  6735. * @param ctx - Rendering context.
  6736. * @param svg - SVG source string or URL.
  6737. * @param options - Rendering options.
  6738. */
  6739. value: function fork(ctx, svg) {
  6740. var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  6741. return Canvg.from(ctx, svg, _objectSpread$1({}, this.options, {}, options));
  6742. }
  6743. /**
  6744. * Create new Canvg instance with inherited options.
  6745. * @param ctx - Rendering context.
  6746. * @param svg - SVG source string.
  6747. * @param options - Rendering options.
  6748. */
  6749. }, {
  6750. key: "forkString",
  6751. value: function forkString(ctx, svg) {
  6752. var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  6753. return Canvg.fromString(ctx, svg, _objectSpread$1({}, this.options, {}, options));
  6754. }
  6755. /**
  6756. * Document is ready promise.
  6757. */
  6758. }, {
  6759. key: "ready",
  6760. value: function ready() {
  6761. return this.screen.ready();
  6762. }
  6763. /**
  6764. * Document is ready value.
  6765. */
  6766. }, {
  6767. key: "isReady",
  6768. value: function isReady() {
  6769. return this.screen.isReady();
  6770. }
  6771. /**
  6772. * Render only first frame, ignoring animations and mouse.
  6773. * @param options - Rendering options.
  6774. */
  6775. }, {
  6776. key: "render",
  6777. value: function () {
  6778. var _render = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_15__.default)( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().mark(function _callee() {
  6779. var options,
  6780. _args = arguments;
  6781. return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().wrap(function _callee$(_context) {
  6782. while (1) {
  6783. switch (_context.prev = _context.next) {
  6784. case 0:
  6785. options = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
  6786. this.start(_objectSpread$1({
  6787. enableRedraw: true,
  6788. ignoreAnimation: true,
  6789. ignoreMouse: true
  6790. }, options));
  6791. _context.next = 4;
  6792. return this.ready();
  6793. case 4:
  6794. this.stop();
  6795. case 5:
  6796. case "end":
  6797. return _context.stop();
  6798. }
  6799. }
  6800. }, _callee, this);
  6801. }));
  6802. function render() {
  6803. return _render.apply(this, arguments);
  6804. }
  6805. return render;
  6806. }()
  6807. /**
  6808. * Start rendering.
  6809. * @param options - Render options.
  6810. */
  6811. }, {
  6812. key: "start",
  6813. value: function start() {
  6814. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  6815. var documentElement = this.documentElement,
  6816. screen = this.screen,
  6817. baseOptions = this.options;
  6818. screen.start(documentElement, _objectSpread$1({
  6819. enableRedraw: true
  6820. }, baseOptions, {}, options));
  6821. }
  6822. /**
  6823. * Stop rendering.
  6824. */
  6825. }, {
  6826. key: "stop",
  6827. value: function stop() {
  6828. this.screen.stop();
  6829. }
  6830. /**
  6831. * Resize SVG to fit in given size.
  6832. * @param width
  6833. * @param height
  6834. * @param preserveAspectRatio
  6835. */
  6836. }, {
  6837. key: "resize",
  6838. value: function resize(width) {
  6839. var height = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : width;
  6840. var preserveAspectRatio = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  6841. this.documentElement.resize(width, height, preserveAspectRatio);
  6842. }
  6843. }], [{
  6844. key: "from",
  6845. value: function () {
  6846. var _from = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_15__.default)( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().mark(function _callee2(ctx, svg) {
  6847. var options,
  6848. parser,
  6849. svgDocument,
  6850. _args2 = arguments;
  6851. return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().wrap(function _callee2$(_context2) {
  6852. while (1) {
  6853. switch (_context2.prev = _context2.next) {
  6854. case 0:
  6855. options = _args2.length > 2 && _args2[2] !== undefined ? _args2[2] : {};
  6856. parser = new Parser(options);
  6857. _context2.next = 4;
  6858. return parser.parse(svg);
  6859. case 4:
  6860. svgDocument = _context2.sent;
  6861. return _context2.abrupt("return", new Canvg(ctx, svgDocument, options));
  6862. case 6:
  6863. case "end":
  6864. return _context2.stop();
  6865. }
  6866. }
  6867. }, _callee2);
  6868. }));
  6869. function from(_x, _x2) {
  6870. return _from.apply(this, arguments);
  6871. }
  6872. return from;
  6873. }()
  6874. /**
  6875. * Create Canvg isntance from SVG source string.
  6876. * @param ctx - Rendering context.
  6877. * @param svg - SVG source string.
  6878. * @param options - Rendering options.
  6879. */
  6880. }, {
  6881. key: "fromString",
  6882. value: function fromString(ctx, svg) {
  6883. var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  6884. var parser = new Parser(options);
  6885. var svgDocument = parser.parseFromString(svg);
  6886. return new Canvg(ctx, svgDocument, options);
  6887. }
  6888. }]);
  6889. return Canvg;
  6890. }();
  6891. /**
  6892. * Options preset for `OffscreenCanvas`.
  6893. * @param config - Preset requirements.
  6894. * @param config.DOMParser - XML/HTML parser from string into DOM Document.
  6895. */
  6896. function offscreen() {
  6897. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  6898. DOMParserFallback = _ref.DOMParser;
  6899. var preset = {
  6900. window: null,
  6901. ignoreAnimation: true,
  6902. ignoreMouse: true,
  6903. DOMParser: DOMParserFallback,
  6904. createCanvas: function createCanvas(width, height) {
  6905. return new OffscreenCanvas(width, height);
  6906. },
  6907. createImage: function createImage(url) {
  6908. return (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_15__.default)( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().mark(function _callee() {
  6909. var response, blob, img;
  6910. return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().wrap(function _callee$(_context) {
  6911. while (1) {
  6912. switch (_context.prev = _context.next) {
  6913. case 0:
  6914. _context.next = 2;
  6915. return fetch(url);
  6916. case 2:
  6917. response = _context.sent;
  6918. _context.next = 5;
  6919. return response.blob();
  6920. case 5:
  6921. blob = _context.sent;
  6922. _context.next = 8;
  6923. return createImageBitmap(blob);
  6924. case 8:
  6925. img = _context.sent;
  6926. return _context.abrupt("return", img);
  6927. case 10:
  6928. case "end":
  6929. return _context.stop();
  6930. }
  6931. }
  6932. }, _callee);
  6933. }))();
  6934. }
  6935. };
  6936. if (typeof DOMParser !== 'undefined' || typeof DOMParserFallback === 'undefined') {
  6937. Reflect.deleteProperty(preset, 'DOMParser');
  6938. }
  6939. return preset;
  6940. }
  6941. /**
  6942. * Options preset for `node-canvas`.
  6943. * @param config - Preset requirements.
  6944. * @param config.DOMParser - XML/HTML parser from string into DOM Document.
  6945. * @param config.canvas - `node-canvas` exports.
  6946. * @param config.fetch - WHATWG-compatible `fetch` function.
  6947. */
  6948. function node(_ref) {
  6949. var DOMParser = _ref.DOMParser,
  6950. canvas = _ref.canvas,
  6951. fetch = _ref.fetch;
  6952. return {
  6953. window: null,
  6954. ignoreAnimation: true,
  6955. ignoreMouse: true,
  6956. DOMParser: DOMParser,
  6957. fetch: fetch,
  6958. createCanvas: canvas.createCanvas,
  6959. createImage: canvas.loadImage
  6960. };
  6961. }
  6962. var index = /*#__PURE__*/Object.freeze({
  6963. __proto__: null,
  6964. offscreen: offscreen,
  6965. node: node
  6966. });
  6967. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Canvg);
  6968. //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZXMuanMiLCJzb3VyY2VzIjpbIi4uL25vZGVfbW9kdWxlcy9yZWdlbmVyYXRvci1ydW50aW1lL3J1bnRpbWUuanMiXSwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBDb3B5cmlnaHQgKGMpIDIwMTQtcHJlc2VudCwgRmFjZWJvb2ssIEluYy5cbiAqXG4gKiBUaGlzIHNvdXJjZSBjb2RlIGlzIGxpY2Vuc2VkIHVuZGVyIHRoZSBNSVQgbGljZW5zZSBmb3VuZCBpbiB0aGVcbiAqIExJQ0VOU0UgZmlsZSBpbiB0aGUgcm9vdCBkaXJlY3Rvcnkgb2YgdGhpcyBzb3VyY2UgdHJlZS5cbiAqL1xuXG52YXIgcnVudGltZSA9IChmdW5jdGlvbiAoZXhwb3J0cykge1xuICBcInVzZSBzdHJpY3RcIjtcblxuICB2YXIgT3AgPSBPYmplY3QucHJvdG90eXBlO1xuICB2YXIgaGFzT3duID0gT3AuaGFzT3duUHJvcGVydHk7XG4gIHZhciB1bmRlZmluZWQ7IC8vIE1vcmUgY29tcHJlc3NpYmxlIHRoYW4gdm9pZCAwLlxuICB2YXIgJFN5bWJvbCA9IHR5cGVvZiBTeW1ib2wgPT09IFwiZnVuY3Rpb25cIiA/IFN5bWJvbCA6IHt9O1xuICB2YXIgaXRlcmF0b3JTeW1ib2wgPSAkU3ltYm9sLml0ZXJhdG9yIHx8IFwiQEBpdGVyYXRvclwiO1xuICB2YXIgYXN5bmNJdGVyYXRvclN5bWJvbCA9ICRTeW1ib2wuYXN5bmNJdGVyYXRvciB8fCBcIkBAYXN5bmNJdGVyYXRvclwiO1xuICB2YXIgdG9T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l0ZXJhdG9yKGdlbmVyYXRvciwgUHJvbWlzZUltcGwpIHtcbiAgICBmdW5jdGlvbiBpbnZva2UobWV0aG9kLCBhcmcsIHJlc29sdmUsIHJlamVjdCkge1xuICAgICAgdmFyIHJlY29yZCA9IHRyeUNhdGNoKGdlbmVyYXRvclttZXRob2RdLCBnZW5lcmF0b3IsIGFyZyk7XG4gICAgICBpZiAocmVjb3JkLnR5cGUgPT09IFwidGhyb3dcIikge1xuICAgICAgICByZWplY3QocmVjb3JkLmFyZyk7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICB2YXIgcmVzdWx0ID0gcmVjb3JkLmFyZztcbiAgICAgICAgdmFyIHZhbHVlID0gcmVzdWx0LnZhbHVlO1xuICAgICAgICBpZiAodmFsdWUgJiZcbiAgICAgICAgICAgIHR5cGVvZiB2YWx1ZSA9PT0gXCJvYmplY3RcIiAmJlxuICAgICAgICAgICAgaGFzT3duLmNhbGwodmFsdWUsIFwiX19hd2FpdFwiKSkge1xuICAgICAgICAgIHJldHVybiBQcm9taXNlSW1wbC5yZXNvbHZlKHZhbHVlLl9fYXdhaXQpLnRoZW4oZnVuY3Rpb24odmFsdWUpIHtcbiAgICAgICAgICAgIGludm9rZShcIm5leHRcIiwgdmFsdWUsIHJlc29sdmUsIHJlamVjdCk7XG4gICAgICAgICAgfSwgZnVuY3Rpb24oZXJyKSB7XG4gICAgICAgICAgICBpbnZva2UoXCJ0aHJvd1wiLCBlcnIsIHJlc29sdmUsIHJlamVjdCk7XG4gICAgICAgICAgfSk7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gUHJvbWlzZUltcGwucmVzb2x2ZSh2YWx1ZSkudGhlbihmdW5jdGlvbih1bndyYXBwZWQpIHtcbiAgICAgICAgICAvLyBXaGVuIGEgeWllbGRlZCBQcm9taXNlIGlzIHJlc29sdmVkLCBpdHMgZmluYWwgdmFsdWUgYmVjb21lc1xuICAgICAgICAgIC8vIHRoZSAudmFsdWUgb2YgdGhlIFByb21pc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uZGVkU3RhcnQpIHtcbiAgICAgICAgICAgIHN0YXRlID0gR2VuU3RhdGVDb21wbGV0ZWQ7XG4gICAgICAgICAgICB0aHJvdyBjb250ZXh0LmFyZztcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBjb250ZXh0LmRpc3BhdGNoRXhjZXB0aW9uKGNvbnRleHQuYXJnKTtcblxuICAgICAgICB9IGVsc2UgaWYgKGNvbnRleHQubWV0aG9kID09PSBcInJldHVyblwiKSB7XG4gICAgICAgICAgY29udGV4dC5hYnJ1cHQoXCJyZXR1cm5cIiwgY29udGV4dC5hcmcpO1xuICAgICAgICB9XG5cbiAgICAgICAgc3RhdGUgPSBHZW5TdGF0ZUV4ZWN1dGluZztcblxuICAgICAgICB2YXIgcmVjb3JkID0gdHJ5Q2F0Y2goaW5uZXJGbiwgc2VsZiwgY29udGV4dCk7XG4gICAgICAgIGlmIChyZWNvcmQudHlwZSA9PT0gXCJub3JtYWxcIikge1xuICAgICAgICAgIC8vIElmIGFuIGV4Y2VwdGlvbiBpcyB0aHJvd24gZnJvbSBpbm5lckZuLCB3ZSBsZWF2ZSBzdGF0ZSA9PT1cbiAgICAgICAgICAvLyBHZW5TdGF0ZUV4ZWN1dGluZyBhbmQgbG9vcCBiYWNrIGZvciBhbm90aGVyIGludm9jYXRpb24uXG4gICAgICAgICAgc3RhdGUgPSBjb250ZXh0LmRvbmVcbiAgICAgICAgICAgID8gR2VuU3RhdGVDb21wbGV0ZWRcbiAgICAgICAgICAgIDogR2VuU3RhdGVTdXNwZW5kZWRZaWVsZDtcblxuICAgICAgICAgIGlmIChyZWNvcmQuYXJnID09PSBDb250aW51ZVNlbnRpbmVsKSB7XG4gICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgdmFsdWU6IHJlY29yZC5hcmcsXG4gICAgICAgICAgICBkb25lOiBjb250ZXh0LmRvbmVcbiAgICAgICAgICB9O1xuXG4gICAg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YXRvclN5bWJvbF07XG4gICAgICBpZiAoaXRlcmF0b3JNZXRob2QpIHtcbiAgICAgICAgcmV0dXJuIGl0ZXJhdG9yTWV0aG9kLmNhbGwoaXRlcmFibGUpO1xuICAgICAgfVxuXG4gICAgICBpZiAodHlwZW9mIGl0ZXJhYmxlLm5leHQgPT09IFwiZnVuY3Rpb25cIikge1xuICAgICAgICByZXR1cm4gaXRlcmFibGU7XG4gICAgICB9XG5cbiAgICAgIGlmICghaXNOYU4oaXRlcmFibGUubGVuZ3RoKSkge1xuICAgICAgICB2YXIgaSA9IC0xLCBuZXh0ID0gZnVuY3Rpb24gbmV4dCgpIHtcbiAgICAgICAgICB3aGlsZSAoKytpIDwgaXRlcmFibGUubGVuZ3RoKSB7XG4gICAgICAgICAgICBpZiAoaGFzT3duLmNhbGwoaXRlcmFibGUsIGkpKSB7XG4gICAgICAgICAgICAgIG5leHQudmFsdWUgPSBpdGVyYWJsZVtpXTtcbiAgICAgICAgICAgICAgbmV4dC5kb25lID0gZmFsc2U7XG4gICAgICAgICAgICAgIHJldHVybiBuZXh0O1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cblxuICAgICAgICAgIG5leHQudmFsdWUgPSB1bmRlZmluZWQ7XG4gICAgICAgICAgbmV4dC5kb25lID0gdHJ1ZTtcblxuICAgICAgICAgIHJldHVybiBuZXh0O1xuICAgICAgICB9O1xuXG4gICAgICAgIHJldHVybiBuZXh0Lm5leHQgPSBuZXh0O1xuICAgICAgfVxuICAgIH1cblxuICAgIC8vIFJldHVybiBhbiBpdGVyYXRvciB3aXRoIG5vIHZhbHVlcy5cbiAgICByZXR1cm4geyBuZXh0OiBkb25lUmVzdWx0IH07XG4gIH1cbiAgZXhwb3J0cy52YWx1ZXMgPSB2YWx1ZXM7XG5cbiAgZnVuY3Rpb24gZG9uZVJlc3VsdCgpIHtcbiAgICByZXR1cm4geyB2YWx1ZTogdW5kZWZpbmVkLCBkb25lOiB0cnVlIH07XG4gIH1cblxuICBDb250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uY2F0Y2hMb2MpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShlbnRyeS5jYXRjaExvYywgdHJ1ZSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICB9IGVsc2UgaWYgKGhhc0ZpbmFsbHkpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLnByZXYgPCBlbnRyeS5maW5hbGx5TG9jKSB7XG4gICAgICAgICAgICAgIHJldHVybiBoYW5kbGUoZW50cnkuZmluYWxseUxvYyk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFwidHJ5IHN0YXRlbWVudCB3aXRob3V0IGNhdGNoIG9yIGZpbmFsbHlcIik7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgfSxcblxuICAgIGFicnVwdDogZnVuY3Rpb24odHlwZSwgYXJnKSB7XG4gICAgICBmb3IgKHZhciBpID0gdGhpcy50cnlFbnRyaWVzLmxlbmd0aCAtIDE7IGkgPj0gMDsgLS1pKSB7XG4gICAgICAgIHZhciBlbnRyeSA9IHRoaXMudHJ5RW50cmllc1tpXTtcbiAgICAgICAgaWYgKGVudHJ5LnRyeUxvYyA8PSB0aGlzLnByZXYgJiZcbiAgICAgICAgICAgIGhhc093bi5jYWxsKGVudHJ5LCBcImZpbmFsbHlMb2NcIikgJiZcbiAgICAgICAgICAgIHRoaXMucHJldiA8IGVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgICB2YXIgZmluYWxseUVudHJ5ID0gZW50cnk7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgaWYgKGZpbmFsbHlFbnRyeSAmJlxuICAgICAgICAgICh0eXBlID09PSBcImJyZWFrXCIgfHxcbiAgICAgICAgICAgdHlwZSA9PT0gXCJjb250aW51ZVwiKSAmJlxuICAgICAgICAgIGZpbmFsbHlFbnRyeS50cnlMb2MgPD0gYXJnICYmXG4gICAgICAgICAgYXJnIDw9IGZpbmFsbHlFbnRyeS5maW5hbGx5TG9jKSB7XG4gICAgICAgIC8vIElnbm9yZSB0aGUgZmluYWxseSBlbnRyeSBpZiBjb250cm9sIGlzIG5vdCBqdW1waW5nIHRvIGFcbiAgICAgICAgLy8gbG9jYXRpb24gb3V0c2lkZSB0aGUgdHJ5L2NhdGNoIGJsb2NrLlxuICAgICAgICBmaW5hbGx5RW50cnkgPSBudWxsO1xuICAgICAgfVxuXG4gICAgICB2YXIgcmVjb3JkID0gZmluYWxseUVudHJ5ID8gZmluYWxseUVudHJ5LmNvbXBsZXRpb24gOiB7fTtcbiAgICAgIHJlY29yZC50eXBlID0gdHlwZTtcbiAgICAgIHJlY29yZC5hcmcgPSBhcmc7XG5cbiAgICAgIGlmIChmaW5hbGx5RW50cnkpIHtcbiAgICAgICAgdGhpcy5tZXRob2QgPSBcIm5leHRcIjtcbiAgICAgICAgdGhpcy5uZXh0ID0gZmluYWxseUVudHJ5LmZpbmFsbHlMb2M7XG4gICAgICAgIHJldHVybiBDb250aW51ZVNlbnRpbmVsO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gdGhpcy5jb21wbGV0ZShyZWNvcmQpO1xuICAgIH0sXG5cbiAgICBjb21wbGV0ZTogZnVuY3Rpb24ocmVjb3JkLCBhZnRlckxvYykge1xuICAgICAgaWYgKHJlY29yZC50eXBlID09PSBcInRocm93XCIpIHtcbiAgICAgICAgdGhyb3cgcmVjb3JkLmFyZztcbiAgICAgIH1cblxuICAgICAgaWYgKHJlY29yZC50eXBlID09PSBcImJyZWFrXCIgfHxcbiAgICAgICAgICByZWNvcmQudHlwZSA9PT0gXCJjb250aW51ZVwiKSB7XG4gICAgICAgIHRoaXMubmV4dCA9IHJlY29yZC5hcmc7XG4gICAgICB9IGVsc2UgaWYgKHJlY29yZC50eXBlID09PSBcInJldHVyblwiKSB7XG4gICAgICAgIHRoaXMucnZhbCA9IHRoaXMuYXJnID0gcmVjb3JkLmFyZztcbiAgICAgICAgdGhpcy5tZXRob2QgPSBcInJldHVyblwiO1xuICAgICAgICB0aGlzLm5leHQgPSBcImVuZFwiO1xuICAgICAgfSBlbHNlIGlmIChyZWNvcmQudHlwZSA9PT0gXCJub3JtYWxcIiAmJiBhZnRlckxvYykge1xuICAgICAgICB0aGlzLm5leHQgPSBhZnRlckxvYztcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG4gICAgfSxcblxuICAgIGZpbmlzaDogZnVuY3Rpb24oZmluYWxseUxvYykge1xuICAgICAgZm9yICh2YXIgaSA9IHRoaXMudHJ5RW50cmllcy5sZW5ndGggLSAxOyBpID49IDA7IC0taSkge1xuICAgICAgICB2YXIgZW50cnkgPSB0aGlzLnRyeUVudHJpZXNbaV07XG4gICAgICAgIGlmIChlbnRyeS5maW5hbGx5TG9jID09PSBmaW5hbGx5TG9jKSB7XG4gICAgICAgICAgdGhpcy5jb21wbGV0ZShlbnRyeS5jb21wbGV0aW9uLCBlbnRyeS5hZnRlckxvYyk7XG4gICAgICAgICAgcmVzZXRUcnlFbnRyeShlbnRyeSk7XG4gICAgICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9LFxuXG4gICAgXCJjYXRjaFwiOiBmdW5jdGlvbih0cnlMb2MpIHtcbiAgICAgIGZvciAodmFyIGkgPSB0aGlzLnRyeUVudHJpZXMubGVuZ3RoIC0gMTsgaSA+PSAwOyAtLWkpIHtcbiAgICAgICAgdmFyIGVudHJ5ID0gdGhpcy50cnlFbnRyaWVzW2ldO1xuICAgICAgICBpZiAoZW50cnkudHJ5TG9jID09PSB0cnlMb2MpIHtcbiAgICAgICAgICB2YXIgcmVjb3JkID0gZW50cnkuY29tcGxldGlvbjtcbiAgICAgICAgICBpZiAocmVjb3JkLnR5cGUgPT09IFwidGhyb3dcIikge1xuICAgICAgICAgICAgdmFyIHRocm93biA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used_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  6975. "use strict";
  6976. __webpack_require__.r(__webpack_exports__);
  6977. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  6978. /* harmony export */ "default": () => (/* binding */ _arrayLikeToArray)
  6979. /* harmony export */ });
  6980. function _arrayLikeToArray(arr, len) {
  6981. if (len == null || len > arr.length) len = arr.length;
  6982. for (var i = 0, arr2 = new Array(len); i < len; i++) {
  6983. arr2[i] = arr[i];
  6984. }
  6985. return arr2;
  6986. }
  6987. /***/ }),
  6988. /***/ "./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js":
  6989. /*!*******************************************************************!*\
  6990. !*** ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js ***!
  6991. \*******************************************************************/
  6992. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  6993. "use strict";
  6994. __webpack_require__.r(__webpack_exports__);
  6995. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  6996. /* harmony export */ "default": () => (/* binding */ _arrayWithHoles)
  6997. /* harmony export */ });
  6998. function _arrayWithHoles(arr) {
  6999. if (Array.isArray(arr)) return arr;
  7000. }
  7001. /***/ }),
  7002. /***/ "./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js":
  7003. /*!**********************************************************************!*\
  7004. !*** ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js ***!
  7005. \**********************************************************************/
  7006. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  7007. "use strict";
  7008. __webpack_require__.r(__webpack_exports__);
  7009. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7010. /* harmony export */ "default": () => (/* binding */ _arrayWithoutHoles)
  7011. /* harmony export */ });
  7012. /* harmony import */ var _arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayLikeToArray.js */ "./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js");
  7013. function _arrayWithoutHoles(arr) {
  7014. if (Array.isArray(arr)) return (0,_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__.default)(arr);
  7015. }
  7016. /***/ }),
  7017. /***/ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js":
  7018. /*!**************************************************************************!*\
  7019. !*** ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js ***!
  7020. \**************************************************************************/
  7021. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  7022. "use strict";
  7023. __webpack_require__.r(__webpack_exports__);
  7024. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7025. /* harmony export */ "default": () => (/* binding */ _assertThisInitialized)
  7026. /* harmony export */ });
  7027. function _assertThisInitialized(self) {
  7028. if (self === void 0) {
  7029. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  7030. }
  7031. return self;
  7032. }
  7033. /***/ }),
  7034. /***/ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js":
  7035. /*!*********************************************************************!*\
  7036. !*** ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js ***!
  7037. \*********************************************************************/
  7038. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  7039. "use strict";
  7040. __webpack_require__.r(__webpack_exports__);
  7041. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7042. /* harmony export */ "default": () => (/* binding */ _asyncToGenerator)
  7043. /* harmony export */ });
  7044. function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
  7045. try {
  7046. var info = gen[key](arg);
  7047. var value = info.value;
  7048. } catch (error) {
  7049. reject(error);
  7050. return;
  7051. }
  7052. if (info.done) {
  7053. resolve(value);
  7054. } else {
  7055. Promise.resolve(value).then(_next, _throw);
  7056. }
  7057. }
  7058. function _asyncToGenerator(fn) {
  7059. return function () {
  7060. var self = this,
  7061. args = arguments;
  7062. return new Promise(function (resolve, reject) {
  7063. var gen = fn.apply(self, args);
  7064. function _next(value) {
  7065. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
  7066. }
  7067. function _throw(err) {
  7068. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
  7069. }
  7070. _next(undefined);
  7071. });
  7072. };
  7073. }
  7074. /***/ }),
  7075. /***/ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js":
  7076. /*!*******************************************************************!*\
  7077. !*** ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js ***!
  7078. \*******************************************************************/
  7079. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  7080. "use strict";
  7081. __webpack_require__.r(__webpack_exports__);
  7082. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7083. /* harmony export */ "default": () => (/* binding */ _classCallCheck)
  7084. /* harmony export */ });
  7085. function _classCallCheck(instance, Constructor) {
  7086. if (!(instance instanceof Constructor)) {
  7087. throw new TypeError("Cannot call a class as a function");
  7088. }
  7089. }
  7090. /***/ }),
  7091. /***/ "./node_modules/@babel/runtime/helpers/esm/createClass.js":
  7092. /*!****************************************************************!*\
  7093. !*** ./node_modules/@babel/runtime/helpers/esm/createClass.js ***!
  7094. \****************************************************************/
  7095. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  7096. "use strict";
  7097. __webpack_require__.r(__webpack_exports__);
  7098. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7099. /* harmony export */ "default": () => (/* binding */ _createClass)
  7100. /* harmony export */ });
  7101. function _defineProperties(target, props) {
  7102. for (var i = 0; i < props.length; i++) {
  7103. var descriptor = props[i];
  7104. descriptor.enumerable = descriptor.enumerable || false;
  7105. descriptor.configurable = true;
  7106. if ("value" in descriptor) descriptor.writable = true;
  7107. Object.defineProperty(target, descriptor.key, descriptor);
  7108. }
  7109. }
  7110. function _createClass(Constructor, protoProps, staticProps) {
  7111. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  7112. if (staticProps) _defineProperties(Constructor, staticProps);
  7113. return Constructor;
  7114. }
  7115. /***/ }),
  7116. /***/ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js":
  7117. /*!*******************************************************************!*\
  7118. !*** ./node_modules/@babel/runtime/helpers/esm/defineProperty.js ***!
  7119. \*******************************************************************/
  7120. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  7121. "use strict";
  7122. __webpack_require__.r(__webpack_exports__);
  7123. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7124. /* harmony export */ "default": () => (/* binding */ _defineProperty)
  7125. /* harmony export */ });
  7126. function _defineProperty(obj, key, value) {
  7127. if (key in obj) {
  7128. Object.defineProperty(obj, key, {
  7129. value: value,
  7130. enumerable: true,
  7131. configurable: true,
  7132. writable: true
  7133. });
  7134. } else {
  7135. obj[key] = value;
  7136. }
  7137. return obj;
  7138. }
  7139. /***/ }),
  7140. /***/ "./node_modules/@babel/runtime/helpers/esm/get.js":
  7141. /*!********************************************************!*\
  7142. !*** ./node_modules/@babel/runtime/helpers/esm/get.js ***!
  7143. \********************************************************/
  7144. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  7145. "use strict";
  7146. __webpack_require__.r(__webpack_exports__);
  7147. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7148. /* harmony export */ "default": () => (/* binding */ _get)
  7149. /* harmony export */ });
  7150. /* harmony import */ var _superPropBase_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./superPropBase.js */ "./node_modules/@babel/runtime/helpers/esm/superPropBase.js");
  7151. function _get(target, property, receiver) {
  7152. if (typeof Reflect !== "undefined" && Reflect.get) {
  7153. _get = Reflect.get;
  7154. } else {
  7155. _get = function _get(target, property, receiver) {
  7156. var base = (0,_superPropBase_js__WEBPACK_IMPORTED_MODULE_0__.default)(target, property);
  7157. if (!base) return;
  7158. var desc = Object.getOwnPropertyDescriptor(base, property);
  7159. if (desc.get) {
  7160. return desc.get.call(receiver);
  7161. }
  7162. return desc.value;
  7163. };
  7164. }
  7165. return _get(target, property, receiver || target);
  7166. }
  7167. /***/ }),
  7168. /***/ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js":
  7169. /*!*******************************************************************!*\
  7170. !*** ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js ***!
  7171. \*******************************************************************/
  7172. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  7173. "use strict";
  7174. __webpack_require__.r(__webpack_exports__);
  7175. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7176. /* harmony export */ "default": () => (/* binding */ _getPrototypeOf)
  7177. /* harmony export */ });
  7178. function _getPrototypeOf(o) {
  7179. _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
  7180. return o.__proto__ || Object.getPrototypeOf(o);
  7181. };
  7182. return _getPrototypeOf(o);
  7183. }
  7184. /***/ }),
  7185. /***/ "./node_modules/@babel/runtime/helpers/esm/inherits.js":
  7186. /*!*************************************************************!*\
  7187. !*** ./node_modules/@babel/runtime/helpers/esm/inherits.js ***!
  7188. \*************************************************************/
  7189. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  7190. "use strict";
  7191. __webpack_require__.r(__webpack_exports__);
  7192. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7193. /* harmony export */ "default": () => (/* binding */ _inherits)
  7194. /* harmony export */ });
  7195. /* harmony import */ var _setPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./setPrototypeOf.js */ "./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js");
  7196. function _inherits(subClass, superClass) {
  7197. if (typeof superClass !== "function" && superClass !== null) {
  7198. throw new TypeError("Super expression must either be null or a function");
  7199. }
  7200. subClass.prototype = Object.create(superClass && superClass.prototype, {
  7201. constructor: {
  7202. value: subClass,
  7203. writable: true,
  7204. configurable: true
  7205. }
  7206. });
  7207. if (superClass) (0,_setPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__.default)(subClass, superClass);
  7208. }
  7209. /***/ }),
  7210. /***/ "./node_modules/@babel/runtime/helpers/esm/iterableToArray.js":
  7211. /*!********************************************************************!*\
  7212. !*** ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js ***!
  7213. \********************************************************************/
  7214. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  7215. "use strict";
  7216. __webpack_require__.r(__webpack_exports__);
  7217. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7218. /* harmony export */ "default": () => (/* binding */ _iterableToArray)
  7219. /* harmony export */ });
  7220. function _iterableToArray(iter) {
  7221. if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
  7222. }
  7223. /***/ }),
  7224. /***/ "./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js":
  7225. /*!*************************************************************************!*\
  7226. !*** ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js ***!
  7227. \*************************************************************************/
  7228. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  7229. "use strict";
  7230. __webpack_require__.r(__webpack_exports__);
  7231. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7232. /* harmony export */ "default": () => (/* binding */ _iterableToArrayLimit)
  7233. /* harmony export */ });
  7234. function _iterableToArrayLimit(arr, i) {
  7235. var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
  7236. if (_i == null) return;
  7237. var _arr = [];
  7238. var _n = true;
  7239. var _d = false;
  7240. var _s, _e;
  7241. try {
  7242. for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
  7243. _arr.push(_s.value);
  7244. if (i && _arr.length === i) break;
  7245. }
  7246. } catch (err) {
  7247. _d = true;
  7248. _e = err;
  7249. } finally {
  7250. try {
  7251. if (!_n && _i["return"] != null) _i["return"]();
  7252. } finally {
  7253. if (_d) throw _e;
  7254. }
  7255. }
  7256. return _arr;
  7257. }
  7258. /***/ }),
  7259. /***/ "./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js":
  7260. /*!********************************************************************!*\
  7261. !*** ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js ***!
  7262. \********************************************************************/
  7263. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  7264. "use strict";
  7265. __webpack_require__.r(__webpack_exports__);
  7266. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7267. /* harmony export */ "default": () => (/* binding */ _nonIterableRest)
  7268. /* harmony export */ });
  7269. function _nonIterableRest() {
  7270. throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  7271. }
  7272. /***/ }),
  7273. /***/ "./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js":
  7274. /*!**********************************************************************!*\
  7275. !*** ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js ***!
  7276. \**********************************************************************/
  7277. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  7278. "use strict";
  7279. __webpack_require__.r(__webpack_exports__);
  7280. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7281. /* harmony export */ "default": () => (/* binding */ _nonIterableSpread)
  7282. /* harmony export */ });
  7283. function _nonIterableSpread() {
  7284. throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  7285. }
  7286. /***/ }),
  7287. /***/ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js":
  7288. /*!******************************************************************************!*\
  7289. !*** ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js ***!
  7290. \******************************************************************************/
  7291. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  7292. "use strict";
  7293. __webpack_require__.r(__webpack_exports__);
  7294. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7295. /* harmony export */ "default": () => (/* binding */ _possibleConstructorReturn)
  7296. /* harmony export */ });
  7297. /* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "./node_modules/@babel/runtime/helpers/esm/typeof.js");
  7298. /* harmony import */ var _assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./assertThisInitialized.js */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js");
  7299. function _possibleConstructorReturn(self, call) {
  7300. if (call && ((0,_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__.default)(call) === "object" || typeof call === "function")) {
  7301. return call;
  7302. } else if (call !== void 0) {
  7303. throw new TypeError("Derived constructors may only return object or undefined");
  7304. }
  7305. return (0,_assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_1__.default)(self);
  7306. }
  7307. /***/ }),
  7308. /***/ "./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js":
  7309. /*!*******************************************************************!*\
  7310. !*** ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js ***!
  7311. \*******************************************************************/
  7312. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  7313. "use strict";
  7314. __webpack_require__.r(__webpack_exports__);
  7315. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7316. /* harmony export */ "default": () => (/* binding */ _setPrototypeOf)
  7317. /* harmony export */ });
  7318. function _setPrototypeOf(o, p) {
  7319. _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
  7320. o.__proto__ = p;
  7321. return o;
  7322. };
  7323. return _setPrototypeOf(o, p);
  7324. }
  7325. /***/ }),
  7326. /***/ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js":
  7327. /*!******************************************************************!*\
  7328. !*** ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js ***!
  7329. \******************************************************************/
  7330. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  7331. "use strict";
  7332. __webpack_require__.r(__webpack_exports__);
  7333. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7334. /* harmony export */ "default": () => (/* binding */ _slicedToArray)
  7335. /* harmony export */ });
  7336. /* harmony import */ var _arrayWithHoles_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayWithHoles.js */ "./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js");
  7337. /* harmony import */ var _iterableToArrayLimit_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./iterableToArrayLimit.js */ "./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js");
  7338. /* harmony import */ var _unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js");
  7339. /* harmony import */ var _nonIterableRest_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./nonIterableRest.js */ "./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js");
  7340. function _slicedToArray(arr, i) {
  7341. return (0,_arrayWithHoles_js__WEBPACK_IMPORTED_MODULE_0__.default)(arr) || (0,_iterableToArrayLimit_js__WEBPACK_IMPORTED_MODULE_1__.default)(arr, i) || (0,_unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__.default)(arr, i) || (0,_nonIterableRest_js__WEBPACK_IMPORTED_MODULE_3__.default)();
  7342. }
  7343. /***/ }),
  7344. /***/ "./node_modules/@babel/runtime/helpers/esm/superPropBase.js":
  7345. /*!******************************************************************!*\
  7346. !*** ./node_modules/@babel/runtime/helpers/esm/superPropBase.js ***!
  7347. \******************************************************************/
  7348. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  7349. "use strict";
  7350. __webpack_require__.r(__webpack_exports__);
  7351. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7352. /* harmony export */ "default": () => (/* binding */ _superPropBase)
  7353. /* harmony export */ });
  7354. /* harmony import */ var _getPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getPrototypeOf.js */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js");
  7355. function _superPropBase(object, property) {
  7356. while (!Object.prototype.hasOwnProperty.call(object, property)) {
  7357. object = (0,_getPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__.default)(object);
  7358. if (object === null) break;
  7359. }
  7360. return object;
  7361. }
  7362. /***/ }),
  7363. /***/ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js":
  7364. /*!**********************************************************************!*\
  7365. !*** ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js ***!
  7366. \**********************************************************************/
  7367. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  7368. "use strict";
  7369. __webpack_require__.r(__webpack_exports__);
  7370. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7371. /* harmony export */ "default": () => (/* binding */ _toConsumableArray)
  7372. /* harmony export */ });
  7373. /* harmony import */ var _arrayWithoutHoles_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayWithoutHoles.js */ "./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js");
  7374. /* harmony import */ var _iterableToArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./iterableToArray.js */ "./node_modules/@babel/runtime/helpers/esm/iterableToArray.js");
  7375. /* harmony import */ var _unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js");
  7376. /* harmony import */ var _nonIterableSpread_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./nonIterableSpread.js */ "./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js");
  7377. function _toConsumableArray(arr) {
  7378. return (0,_arrayWithoutHoles_js__WEBPACK_IMPORTED_MODULE_0__.default)(arr) || (0,_iterableToArray_js__WEBPACK_IMPORTED_MODULE_1__.default)(arr) || (0,_unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__.default)(arr) || (0,_nonIterableSpread_js__WEBPACK_IMPORTED_MODULE_3__.default)();
  7379. }
  7380. /***/ }),
  7381. /***/ "./node_modules/@babel/runtime/helpers/esm/typeof.js":
  7382. /*!***********************************************************!*\
  7383. !*** ./node_modules/@babel/runtime/helpers/esm/typeof.js ***!
  7384. \***********************************************************/
  7385. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  7386. "use strict";
  7387. __webpack_require__.r(__webpack_exports__);
  7388. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7389. /* harmony export */ "default": () => (/* binding */ _typeof)
  7390. /* harmony export */ });
  7391. function _typeof(obj) {
  7392. "@babel/helpers - typeof";
  7393. if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
  7394. _typeof = function _typeof(obj) {
  7395. return typeof obj;
  7396. };
  7397. } else {
  7398. _typeof = function _typeof(obj) {
  7399. return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
  7400. };
  7401. }
  7402. return _typeof(obj);
  7403. }
  7404. /***/ }),
  7405. /***/ "./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js":
  7406. /*!*******************************************************************************!*\
  7407. !*** ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js ***!
  7408. \*******************************************************************************/
  7409. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  7410. "use strict";
  7411. __webpack_require__.r(__webpack_exports__);
  7412. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7413. /* harmony export */ "default": () => (/* binding */ _unsupportedIterableToArray)
  7414. /* harmony export */ });
  7415. /* harmony import */ var _arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayLikeToArray.js */ "./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js");
  7416. function _unsupportedIterableToArray(o, minLen) {
  7417. if (!o) return;
  7418. if (typeof o === "string") return (0,_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__.default)(o, minLen);
  7419. var n = Object.prototype.toString.call(o).slice(8, -1);
  7420. if (n === "Object" && o.constructor) n = o.constructor.name;
  7421. if (n === "Map" || n === "Set") return Array.from(o);
  7422. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return (0,_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__.default)(o, minLen);
  7423. }
  7424. /***/ }),
  7425. /***/ "./node_modules/@babel/runtime/regenerator/index.js":
  7426. /*!**********************************************************!*\
  7427. !*** ./node_modules/@babel/runtime/regenerator/index.js ***!
  7428. \**********************************************************/
  7429. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  7430. module.exports = __webpack_require__(/*! regenerator-runtime */ "./node_modules/regenerator-runtime/runtime.js");
  7431. /***/ }),
  7432. /***/ "./node_modules/core-js/internals/a-function.js":
  7433. /*!******************************************************!*\
  7434. !*** ./node_modules/core-js/internals/a-function.js ***!
  7435. \******************************************************/
  7436. /***/ ((module) => {
  7437. module.exports = function (it) {
  7438. if (typeof it != 'function') {
  7439. throw TypeError(String(it) + ' is not a function');
  7440. } return it;
  7441. };
  7442. /***/ }),
  7443. /***/ "./node_modules/core-js/internals/a-possible-prototype.js":
  7444. /*!****************************************************************!*\
  7445. !*** ./node_modules/core-js/internals/a-possible-prototype.js ***!
  7446. \****************************************************************/
  7447. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  7448. var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
  7449. module.exports = function (it) {
  7450. if (!isObject(it) && it !== null) {
  7451. throw TypeError("Can't set " + String(it) + ' as a prototype');
  7452. } return it;
  7453. };
  7454. /***/ }),
  7455. /***/ "./node_modules/core-js/internals/add-to-unscopables.js":
  7456. /*!**************************************************************!*\
  7457. !*** ./node_modules/core-js/internals/add-to-unscopables.js ***!
  7458. \**************************************************************/
  7459. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  7460. var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
  7461. var create = __webpack_require__(/*! ../internals/object-create */ "./node_modules/core-js/internals/object-create.js");
  7462. var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js");
  7463. var UNSCOPABLES = wellKnownSymbol('unscopables');
  7464. var ArrayPrototype = Array.prototype;
  7465. // Array.prototype[@@unscopables]
  7466. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  7467. if (ArrayPrototype[UNSCOPABLES] == undefined) {
  7468. definePropertyModule.f(ArrayPrototype, UNSCOPABLES, {
  7469. configurable: true,
  7470. value: create(null)
  7471. });
  7472. }
  7473. // add a key to Array.prototype[@@unscopables]
  7474. module.exports = function (key) {
  7475. ArrayPrototype[UNSCOPABLES][key] = true;
  7476. };
  7477. /***/ }),
  7478. /***/ "./node_modules/core-js/internals/an-instance.js":
  7479. /*!*******************************************************!*\
  7480. !*** ./node_modules/core-js/internals/an-instance.js ***!
  7481. \*******************************************************/
  7482. /***/ ((module) => {
  7483. module.exports = function (it, Constructor, name) {
  7484. if (!(it instanceof Constructor)) {
  7485. throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation');
  7486. } return it;
  7487. };
  7488. /***/ }),
  7489. /***/ "./node_modules/core-js/internals/array-fill.js":
  7490. /*!******************************************************!*\
  7491. !*** ./node_modules/core-js/internals/array-fill.js ***!
  7492. \******************************************************/
  7493. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  7494. "use strict";
  7495. var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js");
  7496. var toAbsoluteIndex = __webpack_require__(/*! ../internals/to-absolute-index */ "./node_modules/core-js/internals/to-absolute-index.js");
  7497. var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js");
  7498. // `Array.prototype.fill` method implementation
  7499. // https://tc39.es/ecma262/#sec-array.prototype.fill
  7500. module.exports = function fill(value /* , start = 0, end = @length */) {
  7501. var O = toObject(this);
  7502. var length = toLength(O.length);
  7503. var argumentsLength = arguments.length;
  7504. var index = toAbsoluteIndex(argumentsLength > 1 ? arguments[1] : undefined, length);
  7505. var end = argumentsLength > 2 ? arguments[2] : undefined;
  7506. var endPos = end === undefined ? length : toAbsoluteIndex(end, length);
  7507. while (endPos > index) O[index++] = value;
  7508. return O;
  7509. };
  7510. /***/ }),
  7511. /***/ "./node_modules/core-js/internals/array-for-each.js":
  7512. /*!**********************************************************!*\
  7513. !*** ./node_modules/core-js/internals/array-for-each.js ***!
  7514. \**********************************************************/
  7515. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  7516. "use strict";
  7517. var $forEach = __webpack_require__(/*! ../internals/array-iteration */ "./node_modules/core-js/internals/array-iteration.js").forEach;
  7518. var arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ "./node_modules/core-js/internals/array-method-is-strict.js");
  7519. var STRICT_METHOD = arrayMethodIsStrict('forEach');
  7520. // `Array.prototype.forEach` method implementation
  7521. // https://tc39.es/ecma262/#sec-array.prototype.foreach
  7522. module.exports = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {
  7523. return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  7524. // eslint-disable-next-line es/no-array-prototype-foreach -- safe
  7525. } : [].forEach;
  7526. /***/ }),
  7527. /***/ "./node_modules/core-js/internals/array-from.js":
  7528. /*!******************************************************!*\
  7529. !*** ./node_modules/core-js/internals/array-from.js ***!
  7530. \******************************************************/
  7531. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  7532. "use strict";
  7533. var bind = __webpack_require__(/*! ../internals/function-bind-context */ "./node_modules/core-js/internals/function-bind-context.js");
  7534. var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js");
  7535. var callWithSafeIterationClosing = __webpack_require__(/*! ../internals/call-with-safe-iteration-closing */ "./node_modules/core-js/internals/call-with-safe-iteration-closing.js");
  7536. var isArrayIteratorMethod = __webpack_require__(/*! ../internals/is-array-iterator-method */ "./node_modules/core-js/internals/is-array-iterator-method.js");
  7537. var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js");
  7538. var createProperty = __webpack_require__(/*! ../internals/create-property */ "./node_modules/core-js/internals/create-property.js");
  7539. var getIteratorMethod = __webpack_require__(/*! ../internals/get-iterator-method */ "./node_modules/core-js/internals/get-iterator-method.js");
  7540. // `Array.from` method implementation
  7541. // https://tc39.es/ecma262/#sec-array.from
  7542. module.exports = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
  7543. var O = toObject(arrayLike);
  7544. var C = typeof this == 'function' ? this : Array;
  7545. var argumentsLength = arguments.length;
  7546. var mapfn = argumentsLength > 1 ? arguments[1] : undefined;
  7547. var mapping = mapfn !== undefined;
  7548. var iteratorMethod = getIteratorMethod(O);
  7549. var index = 0;
  7550. var length, result, step, iterator, next, value;
  7551. if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : undefined, 2);
  7552. // if the target is not iterable or it's an array with the default iterator - use a simple case
  7553. if (iteratorMethod != undefined && !(C == Array && isArrayIteratorMethod(iteratorMethod))) {
  7554. iterator = iteratorMethod.call(O);
  7555. next = iterator.next;
  7556. result = new C();
  7557. for (;!(step = next.call(iterator)).done; index++) {
  7558. value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;
  7559. createProperty(result, index, value);
  7560. }
  7561. } else {
  7562. length = toLength(O.length);
  7563. result = new C(length);
  7564. for (;length > index; index++) {
  7565. value = mapping ? mapfn(O[index], index) : O[index];
  7566. createProperty(result, index, value);
  7567. }
  7568. }
  7569. result.length = index;
  7570. return result;
  7571. };
  7572. /***/ }),
  7573. /***/ "./node_modules/core-js/internals/array-iteration.js":
  7574. /*!***********************************************************!*\
  7575. !*** ./node_modules/core-js/internals/array-iteration.js ***!
  7576. \***********************************************************/
  7577. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  7578. var bind = __webpack_require__(/*! ../internals/function-bind-context */ "./node_modules/core-js/internals/function-bind-context.js");
  7579. var IndexedObject = __webpack_require__(/*! ../internals/indexed-object */ "./node_modules/core-js/internals/indexed-object.js");
  7580. var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js");
  7581. var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js");
  7582. var arraySpeciesCreate = __webpack_require__(/*! ../internals/array-species-create */ "./node_modules/core-js/internals/array-species-create.js");
  7583. var push = [].push;
  7584. // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterOut }` methods implementation
  7585. var createMethod = function (TYPE) {
  7586. var IS_MAP = TYPE == 1;
  7587. var IS_FILTER = TYPE == 2;
  7588. var IS_SOME = TYPE == 3;
  7589. var IS_EVERY = TYPE == 4;
  7590. var IS_FIND_INDEX = TYPE == 6;
  7591. var IS_FILTER_OUT = TYPE == 7;
  7592. var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
  7593. return function ($this, callbackfn, that, specificCreate) {
  7594. var O = toObject($this);
  7595. var self = IndexedObject(O);
  7596. var boundFunction = bind(callbackfn, that, 3);
  7597. var length = toLength(self.length);
  7598. var index = 0;
  7599. var create = specificCreate || arraySpeciesCreate;
  7600. var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_OUT ? create($this, 0) : undefined;
  7601. var value, result;
  7602. for (;length > index; index++) if (NO_HOLES || index in self) {
  7603. value = self[index];
  7604. result = boundFunction(value, index, O);
  7605. if (TYPE) {
  7606. if (IS_MAP) target[index] = result; // map
  7607. else if (result) switch (TYPE) {
  7608. case 3: return true; // some
  7609. case 5: return value; // find
  7610. case 6: return index; // findIndex
  7611. case 2: push.call(target, value); // filter
  7612. } else switch (TYPE) {
  7613. case 4: return false; // every
  7614. case 7: push.call(target, value); // filterOut
  7615. }
  7616. }
  7617. }
  7618. return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
  7619. };
  7620. };
  7621. module.exports = {
  7622. // `Array.prototype.forEach` method
  7623. // https://tc39.es/ecma262/#sec-array.prototype.foreach
  7624. forEach: createMethod(0),
  7625. // `Array.prototype.map` method
  7626. // https://tc39.es/ecma262/#sec-array.prototype.map
  7627. map: createMethod(1),
  7628. // `Array.prototype.filter` method
  7629. // https://tc39.es/ecma262/#sec-array.prototype.filter
  7630. filter: createMethod(2),
  7631. // `Array.prototype.some` method
  7632. // https://tc39.es/ecma262/#sec-array.prototype.some
  7633. some: createMethod(3),
  7634. // `Array.prototype.every` method
  7635. // https://tc39.es/ecma262/#sec-array.prototype.every
  7636. every: createMethod(4),
  7637. // `Array.prototype.find` method
  7638. // https://tc39.es/ecma262/#sec-array.prototype.find
  7639. find: createMethod(5),
  7640. // `Array.prototype.findIndex` method
  7641. // https://tc39.es/ecma262/#sec-array.prototype.findIndex
  7642. findIndex: createMethod(6),
  7643. // `Array.prototype.filterOut` method
  7644. // https://github.com/tc39/proposal-array-filtering
  7645. filterOut: createMethod(7)
  7646. };
  7647. /***/ }),
  7648. /***/ "./node_modules/core-js/internals/array-reduce.js":
  7649. /*!********************************************************!*\
  7650. !*** ./node_modules/core-js/internals/array-reduce.js ***!
  7651. \********************************************************/
  7652. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  7653. var aFunction = __webpack_require__(/*! ../internals/a-function */ "./node_modules/core-js/internals/a-function.js");
  7654. var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js");
  7655. var IndexedObject = __webpack_require__(/*! ../internals/indexed-object */ "./node_modules/core-js/internals/indexed-object.js");
  7656. var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js");
  7657. // `Array.prototype.{ reduce, reduceRight }` methods implementation
  7658. var createMethod = function (IS_RIGHT) {
  7659. return function (that, callbackfn, argumentsLength, memo) {
  7660. aFunction(callbackfn);
  7661. var O = toObject(that);
  7662. var self = IndexedObject(O);
  7663. var length = toLength(O.length);
  7664. var index = IS_RIGHT ? length - 1 : 0;
  7665. var i = IS_RIGHT ? -1 : 1;
  7666. if (argumentsLength < 2) while (true) {
  7667. if (index in self) {
  7668. memo = self[index];
  7669. index += i;
  7670. break;
  7671. }
  7672. index += i;
  7673. if (IS_RIGHT ? index < 0 : length <= index) {
  7674. throw TypeError('Reduce of empty array with no initial value');
  7675. }
  7676. }
  7677. for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
  7678. memo = callbackfn(memo, self[index], index, O);
  7679. }
  7680. return memo;
  7681. };
  7682. };
  7683. module.exports = {
  7684. // `Array.prototype.reduce` method
  7685. // https://tc39.es/ecma262/#sec-array.prototype.reduce
  7686. left: createMethod(false),
  7687. // `Array.prototype.reduceRight` method
  7688. // https://tc39.es/ecma262/#sec-array.prototype.reduceright
  7689. right: createMethod(true)
  7690. };
  7691. /***/ }),
  7692. /***/ "./node_modules/core-js/internals/array-species-create.js":
  7693. /*!****************************************************************!*\
  7694. !*** ./node_modules/core-js/internals/array-species-create.js ***!
  7695. \****************************************************************/
  7696. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  7697. var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
  7698. var isArray = __webpack_require__(/*! ../internals/is-array */ "./node_modules/core-js/internals/is-array.js");
  7699. var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
  7700. var SPECIES = wellKnownSymbol('species');
  7701. // `ArraySpeciesCreate` abstract operation
  7702. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  7703. module.exports = function (originalArray, length) {
  7704. var C;
  7705. if (isArray(originalArray)) {
  7706. C = originalArray.constructor;
  7707. // cross-realm fallback
  7708. if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
  7709. else if (isObject(C)) {
  7710. C = C[SPECIES];
  7711. if (C === null) C = undefined;
  7712. }
  7713. } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
  7714. };
  7715. /***/ }),
  7716. /***/ "./node_modules/core-js/internals/call-with-safe-iteration-closing.js":
  7717. /*!****************************************************************************!*\
  7718. !*** ./node_modules/core-js/internals/call-with-safe-iteration-closing.js ***!
  7719. \****************************************************************************/
  7720. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  7721. var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
  7722. var iteratorClose = __webpack_require__(/*! ../internals/iterator-close */ "./node_modules/core-js/internals/iterator-close.js");
  7723. // call something on iterator step with safe closing on error
  7724. module.exports = function (iterator, fn, value, ENTRIES) {
  7725. try {
  7726. return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);
  7727. } catch (error) {
  7728. iteratorClose(iterator);
  7729. throw error;
  7730. }
  7731. };
  7732. /***/ }),
  7733. /***/ "./node_modules/core-js/internals/check-correctness-of-iteration.js":
  7734. /*!**************************************************************************!*\
  7735. !*** ./node_modules/core-js/internals/check-correctness-of-iteration.js ***!
  7736. \**************************************************************************/
  7737. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  7738. var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
  7739. var ITERATOR = wellKnownSymbol('iterator');
  7740. var SAFE_CLOSING = false;
  7741. try {
  7742. var called = 0;
  7743. var iteratorWithReturn = {
  7744. next: function () {
  7745. return { done: !!called++ };
  7746. },
  7747. 'return': function () {
  7748. SAFE_CLOSING = true;
  7749. }
  7750. };
  7751. iteratorWithReturn[ITERATOR] = function () {
  7752. return this;
  7753. };
  7754. // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing
  7755. Array.from(iteratorWithReturn, function () { throw 2; });
  7756. } catch (error) { /* empty */ }
  7757. module.exports = function (exec, SKIP_CLOSING) {
  7758. if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
  7759. var ITERATION_SUPPORT = false;
  7760. try {
  7761. var object = {};
  7762. object[ITERATOR] = function () {
  7763. return {
  7764. next: function () {
  7765. return { done: ITERATION_SUPPORT = true };
  7766. }
  7767. };
  7768. };
  7769. exec(object);
  7770. } catch (error) { /* empty */ }
  7771. return ITERATION_SUPPORT;
  7772. };
  7773. /***/ }),
  7774. /***/ "./node_modules/core-js/internals/collection-strong.js":
  7775. /*!*************************************************************!*\
  7776. !*** ./node_modules/core-js/internals/collection-strong.js ***!
  7777. \*************************************************************/
  7778. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  7779. "use strict";
  7780. var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js").f;
  7781. var create = __webpack_require__(/*! ../internals/object-create */ "./node_modules/core-js/internals/object-create.js");
  7782. var redefineAll = __webpack_require__(/*! ../internals/redefine-all */ "./node_modules/core-js/internals/redefine-all.js");
  7783. var bind = __webpack_require__(/*! ../internals/function-bind-context */ "./node_modules/core-js/internals/function-bind-context.js");
  7784. var anInstance = __webpack_require__(/*! ../internals/an-instance */ "./node_modules/core-js/internals/an-instance.js");
  7785. var iterate = __webpack_require__(/*! ../internals/iterate */ "./node_modules/core-js/internals/iterate.js");
  7786. var defineIterator = __webpack_require__(/*! ../internals/define-iterator */ "./node_modules/core-js/internals/define-iterator.js");
  7787. var setSpecies = __webpack_require__(/*! ../internals/set-species */ "./node_modules/core-js/internals/set-species.js");
  7788. var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
  7789. var fastKey = __webpack_require__(/*! ../internals/internal-metadata */ "./node_modules/core-js/internals/internal-metadata.js").fastKey;
  7790. var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "./node_modules/core-js/internals/internal-state.js");
  7791. var setInternalState = InternalStateModule.set;
  7792. var internalStateGetterFor = InternalStateModule.getterFor;
  7793. module.exports = {
  7794. getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {
  7795. var C = wrapper(function (that, iterable) {
  7796. anInstance(that, C, CONSTRUCTOR_NAME);
  7797. setInternalState(that, {
  7798. type: CONSTRUCTOR_NAME,
  7799. index: create(null),
  7800. first: undefined,
  7801. last: undefined,
  7802. size: 0
  7803. });
  7804. if (!DESCRIPTORS) that.size = 0;
  7805. if (iterable != undefined) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });
  7806. });
  7807. var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);
  7808. var define = function (that, key, value) {
  7809. var state = getInternalState(that);
  7810. var entry = getEntry(that, key);
  7811. var previous, index;
  7812. // change existing entry
  7813. if (entry) {
  7814. entry.value = value;
  7815. // create new entry
  7816. } else {
  7817. state.last = entry = {
  7818. index: index = fastKey(key, true),
  7819. key: key,
  7820. value: value,
  7821. previous: previous = state.last,
  7822. next: undefined,
  7823. removed: false
  7824. };
  7825. if (!state.first) state.first = entry;
  7826. if (previous) previous.next = entry;
  7827. if (DESCRIPTORS) state.size++;
  7828. else that.size++;
  7829. // add to index
  7830. if (index !== 'F') state.index[index] = entry;
  7831. } return that;
  7832. };
  7833. var getEntry = function (that, key) {
  7834. var state = getInternalState(that);
  7835. // fast case
  7836. var index = fastKey(key);
  7837. var entry;
  7838. if (index !== 'F') return state.index[index];
  7839. // frozen object case
  7840. for (entry = state.first; entry; entry = entry.next) {
  7841. if (entry.key == key) return entry;
  7842. }
  7843. };
  7844. redefineAll(C.prototype, {
  7845. // `{ Map, Set }.prototype.clear()` methods
  7846. // https://tc39.es/ecma262/#sec-map.prototype.clear
  7847. // https://tc39.es/ecma262/#sec-set.prototype.clear
  7848. clear: function clear() {
  7849. var that = this;
  7850. var state = getInternalState(that);
  7851. var data = state.index;
  7852. var entry = state.first;
  7853. while (entry) {
  7854. entry.removed = true;
  7855. if (entry.previous) entry.previous = entry.previous.next = undefined;
  7856. delete data[entry.index];
  7857. entry = entry.next;
  7858. }
  7859. state.first = state.last = undefined;
  7860. if (DESCRIPTORS) state.size = 0;
  7861. else that.size = 0;
  7862. },
  7863. // `{ Map, Set }.prototype.delete(key)` methods
  7864. // https://tc39.es/ecma262/#sec-map.prototype.delete
  7865. // https://tc39.es/ecma262/#sec-set.prototype.delete
  7866. 'delete': function (key) {
  7867. var that = this;
  7868. var state = getInternalState(that);
  7869. var entry = getEntry(that, key);
  7870. if (entry) {
  7871. var next = entry.next;
  7872. var prev = entry.previous;
  7873. delete state.index[entry.index];
  7874. entry.removed = true;
  7875. if (prev) prev.next = next;
  7876. if (next) next.previous = prev;
  7877. if (state.first == entry) state.first = next;
  7878. if (state.last == entry) state.last = prev;
  7879. if (DESCRIPTORS) state.size--;
  7880. else that.size--;
  7881. } return !!entry;
  7882. },
  7883. // `{ Map, Set }.prototype.forEach(callbackfn, thisArg = undefined)` methods
  7884. // https://tc39.es/ecma262/#sec-map.prototype.foreach
  7885. // https://tc39.es/ecma262/#sec-set.prototype.foreach
  7886. forEach: function forEach(callbackfn /* , that = undefined */) {
  7887. var state = getInternalState(this);
  7888. var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);
  7889. var entry;
  7890. while (entry = entry ? entry.next : state.first) {
  7891. boundFunction(entry.value, entry.key, this);
  7892. // revert to the last existing entry
  7893. while (entry && entry.removed) entry = entry.previous;
  7894. }
  7895. },
  7896. // `{ Map, Set}.prototype.has(key)` methods
  7897. // https://tc39.es/ecma262/#sec-map.prototype.has
  7898. // https://tc39.es/ecma262/#sec-set.prototype.has
  7899. has: function has(key) {
  7900. return !!getEntry(this, key);
  7901. }
  7902. });
  7903. redefineAll(C.prototype, IS_MAP ? {
  7904. // `Map.prototype.get(key)` method
  7905. // https://tc39.es/ecma262/#sec-map.prototype.get
  7906. get: function get(key) {
  7907. var entry = getEntry(this, key);
  7908. return entry && entry.value;
  7909. },
  7910. // `Map.prototype.set(key, value)` method
  7911. // https://tc39.es/ecma262/#sec-map.prototype.set
  7912. set: function set(key, value) {
  7913. return define(this, key === 0 ? 0 : key, value);
  7914. }
  7915. } : {
  7916. // `Set.prototype.add(value)` method
  7917. // https://tc39.es/ecma262/#sec-set.prototype.add
  7918. add: function add(value) {
  7919. return define(this, value = value === 0 ? 0 : value, value);
  7920. }
  7921. });
  7922. if (DESCRIPTORS) defineProperty(C.prototype, 'size', {
  7923. get: function () {
  7924. return getInternalState(this).size;
  7925. }
  7926. });
  7927. return C;
  7928. },
  7929. setStrong: function (C, CONSTRUCTOR_NAME, IS_MAP) {
  7930. var ITERATOR_NAME = CONSTRUCTOR_NAME + ' Iterator';
  7931. var getInternalCollectionState = internalStateGetterFor(CONSTRUCTOR_NAME);
  7932. var getInternalIteratorState = internalStateGetterFor(ITERATOR_NAME);
  7933. // `{ Map, Set }.prototype.{ keys, values, entries, @@iterator }()` methods
  7934. // https://tc39.es/ecma262/#sec-map.prototype.entries
  7935. // https://tc39.es/ecma262/#sec-map.prototype.keys
  7936. // https://tc39.es/ecma262/#sec-map.prototype.values
  7937. // https://tc39.es/ecma262/#sec-map.prototype-@@iterator
  7938. // https://tc39.es/ecma262/#sec-set.prototype.entries
  7939. // https://tc39.es/ecma262/#sec-set.prototype.keys
  7940. // https://tc39.es/ecma262/#sec-set.prototype.values
  7941. // https://tc39.es/ecma262/#sec-set.prototype-@@iterator
  7942. defineIterator(C, CONSTRUCTOR_NAME, function (iterated, kind) {
  7943. setInternalState(this, {
  7944. type: ITERATOR_NAME,
  7945. target: iterated,
  7946. state: getInternalCollectionState(iterated),
  7947. kind: kind,
  7948. last: undefined
  7949. });
  7950. }, function () {
  7951. var state = getInternalIteratorState(this);
  7952. var kind = state.kind;
  7953. var entry = state.last;
  7954. // revert to the last existing entry
  7955. while (entry && entry.removed) entry = entry.previous;
  7956. // get next entry
  7957. if (!state.target || !(state.last = entry = entry ? entry.next : state.state.first)) {
  7958. // or finish the iteration
  7959. state.target = undefined;
  7960. return { value: undefined, done: true };
  7961. }
  7962. // return step by kind
  7963. if (kind == 'keys') return { value: entry.key, done: false };
  7964. if (kind == 'values') return { value: entry.value, done: false };
  7965. return { value: [entry.key, entry.value], done: false };
  7966. }, IS_MAP ? 'entries' : 'values', !IS_MAP, true);
  7967. // `{ Map, Set }.prototype[@@species]` accessors
  7968. // https://tc39.es/ecma262/#sec-get-map-@@species
  7969. // https://tc39.es/ecma262/#sec-get-set-@@species
  7970. setSpecies(CONSTRUCTOR_NAME);
  7971. }
  7972. };
  7973. /***/ }),
  7974. /***/ "./node_modules/core-js/internals/collection.js":
  7975. /*!******************************************************!*\
  7976. !*** ./node_modules/core-js/internals/collection.js ***!
  7977. \******************************************************/
  7978. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  7979. "use strict";
  7980. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  7981. var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
  7982. var isForced = __webpack_require__(/*! ../internals/is-forced */ "./node_modules/core-js/internals/is-forced.js");
  7983. var redefine = __webpack_require__(/*! ../internals/redefine */ "./node_modules/core-js/internals/redefine.js");
  7984. var InternalMetadataModule = __webpack_require__(/*! ../internals/internal-metadata */ "./node_modules/core-js/internals/internal-metadata.js");
  7985. var iterate = __webpack_require__(/*! ../internals/iterate */ "./node_modules/core-js/internals/iterate.js");
  7986. var anInstance = __webpack_require__(/*! ../internals/an-instance */ "./node_modules/core-js/internals/an-instance.js");
  7987. var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
  7988. var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
  7989. var checkCorrectnessOfIteration = __webpack_require__(/*! ../internals/check-correctness-of-iteration */ "./node_modules/core-js/internals/check-correctness-of-iteration.js");
  7990. var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ "./node_modules/core-js/internals/set-to-string-tag.js");
  7991. var inheritIfRequired = __webpack_require__(/*! ../internals/inherit-if-required */ "./node_modules/core-js/internals/inherit-if-required.js");
  7992. module.exports = function (CONSTRUCTOR_NAME, wrapper, common) {
  7993. var IS_MAP = CONSTRUCTOR_NAME.indexOf('Map') !== -1;
  7994. var IS_WEAK = CONSTRUCTOR_NAME.indexOf('Weak') !== -1;
  7995. var ADDER = IS_MAP ? 'set' : 'add';
  7996. var NativeConstructor = global[CONSTRUCTOR_NAME];
  7997. var NativePrototype = NativeConstructor && NativeConstructor.prototype;
  7998. var Constructor = NativeConstructor;
  7999. var exported = {};
  8000. var fixMethod = function (KEY) {
  8001. var nativeMethod = NativePrototype[KEY];
  8002. redefine(NativePrototype, KEY,
  8003. KEY == 'add' ? function add(value) {
  8004. nativeMethod.call(this, value === 0 ? 0 : value);
  8005. return this;
  8006. } : KEY == 'delete' ? function (key) {
  8007. return IS_WEAK && !isObject(key) ? false : nativeMethod.call(this, key === 0 ? 0 : key);
  8008. } : KEY == 'get' ? function get(key) {
  8009. return IS_WEAK && !isObject(key) ? undefined : nativeMethod.call(this, key === 0 ? 0 : key);
  8010. } : KEY == 'has' ? function has(key) {
  8011. return IS_WEAK && !isObject(key) ? false : nativeMethod.call(this, key === 0 ? 0 : key);
  8012. } : function set(key, value) {
  8013. nativeMethod.call(this, key === 0 ? 0 : key, value);
  8014. return this;
  8015. }
  8016. );
  8017. };
  8018. var REPLACE = isForced(
  8019. CONSTRUCTOR_NAME,
  8020. typeof NativeConstructor != 'function' || !(IS_WEAK || NativePrototype.forEach && !fails(function () {
  8021. new NativeConstructor().entries().next();
  8022. }))
  8023. );
  8024. if (REPLACE) {
  8025. // create collection constructor
  8026. Constructor = common.getConstructor(wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER);
  8027. InternalMetadataModule.REQUIRED = true;
  8028. } else if (isForced(CONSTRUCTOR_NAME, true)) {
  8029. var instance = new Constructor();
  8030. // early implementations not supports chaining
  8031. var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance;
  8032. // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false
  8033. var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); });
  8034. // most early implementations doesn't supports iterables, most modern - not close it correctly
  8035. // eslint-disable-next-line no-new -- required for testing
  8036. var ACCEPT_ITERABLES = checkCorrectnessOfIteration(function (iterable) { new NativeConstructor(iterable); });
  8037. // for early implementations -0 and +0 not the same
  8038. var BUGGY_ZERO = !IS_WEAK && fails(function () {
  8039. // V8 ~ Chromium 42- fails only with 5+ elements
  8040. var $instance = new NativeConstructor();
  8041. var index = 5;
  8042. while (index--) $instance[ADDER](index, index);
  8043. return !$instance.has(-0);
  8044. });
  8045. if (!ACCEPT_ITERABLES) {
  8046. Constructor = wrapper(function (dummy, iterable) {
  8047. anInstance(dummy, Constructor, CONSTRUCTOR_NAME);
  8048. var that = inheritIfRequired(new NativeConstructor(), dummy, Constructor);
  8049. if (iterable != undefined) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });
  8050. return that;
  8051. });
  8052. Constructor.prototype = NativePrototype;
  8053. NativePrototype.constructor = Constructor;
  8054. }
  8055. if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) {
  8056. fixMethod('delete');
  8057. fixMethod('has');
  8058. IS_MAP && fixMethod('get');
  8059. }
  8060. if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER);
  8061. // weak collections should not contains .clear method
  8062. if (IS_WEAK && NativePrototype.clear) delete NativePrototype.clear;
  8063. }
  8064. exported[CONSTRUCTOR_NAME] = Constructor;
  8065. $({ global: true, forced: Constructor != NativeConstructor }, exported);
  8066. setToStringTag(Constructor, CONSTRUCTOR_NAME);
  8067. if (!IS_WEAK) common.setStrong(Constructor, CONSTRUCTOR_NAME, IS_MAP);
  8068. return Constructor;
  8069. };
  8070. /***/ }),
  8071. /***/ "./node_modules/core-js/internals/correct-is-regexp-logic.js":
  8072. /*!*******************************************************************!*\
  8073. !*** ./node_modules/core-js/internals/correct-is-regexp-logic.js ***!
  8074. \*******************************************************************/
  8075. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8076. var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
  8077. var MATCH = wellKnownSymbol('match');
  8078. module.exports = function (METHOD_NAME) {
  8079. var regexp = /./;
  8080. try {
  8081. '/./'[METHOD_NAME](regexp);
  8082. } catch (error1) {
  8083. try {
  8084. regexp[MATCH] = false;
  8085. return '/./'[METHOD_NAME](regexp);
  8086. } catch (error2) { /* empty */ }
  8087. } return false;
  8088. };
  8089. /***/ }),
  8090. /***/ "./node_modules/core-js/internals/correct-prototype-getter.js":
  8091. /*!********************************************************************!*\
  8092. !*** ./node_modules/core-js/internals/correct-prototype-getter.js ***!
  8093. \********************************************************************/
  8094. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8095. var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
  8096. module.exports = !fails(function () {
  8097. function F() { /* empty */ }
  8098. F.prototype.constructor = null;
  8099. // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
  8100. return Object.getPrototypeOf(new F()) !== F.prototype;
  8101. });
  8102. /***/ }),
  8103. /***/ "./node_modules/core-js/internals/create-iterator-constructor.js":
  8104. /*!***********************************************************************!*\
  8105. !*** ./node_modules/core-js/internals/create-iterator-constructor.js ***!
  8106. \***********************************************************************/
  8107. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8108. "use strict";
  8109. var IteratorPrototype = __webpack_require__(/*! ../internals/iterators-core */ "./node_modules/core-js/internals/iterators-core.js").IteratorPrototype;
  8110. var create = __webpack_require__(/*! ../internals/object-create */ "./node_modules/core-js/internals/object-create.js");
  8111. var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "./node_modules/core-js/internals/create-property-descriptor.js");
  8112. var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ "./node_modules/core-js/internals/set-to-string-tag.js");
  8113. var Iterators = __webpack_require__(/*! ../internals/iterators */ "./node_modules/core-js/internals/iterators.js");
  8114. var returnThis = function () { return this; };
  8115. module.exports = function (IteratorConstructor, NAME, next) {
  8116. var TO_STRING_TAG = NAME + ' Iterator';
  8117. IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(1, next) });
  8118. setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);
  8119. Iterators[TO_STRING_TAG] = returnThis;
  8120. return IteratorConstructor;
  8121. };
  8122. /***/ }),
  8123. /***/ "./node_modules/core-js/internals/create-property.js":
  8124. /*!***********************************************************!*\
  8125. !*** ./node_modules/core-js/internals/create-property.js ***!
  8126. \***********************************************************/
  8127. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8128. "use strict";
  8129. var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ "./node_modules/core-js/internals/to-primitive.js");
  8130. var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js");
  8131. var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "./node_modules/core-js/internals/create-property-descriptor.js");
  8132. module.exports = function (object, key, value) {
  8133. var propertyKey = toPrimitive(key);
  8134. if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));
  8135. else object[propertyKey] = value;
  8136. };
  8137. /***/ }),
  8138. /***/ "./node_modules/core-js/internals/define-iterator.js":
  8139. /*!***********************************************************!*\
  8140. !*** ./node_modules/core-js/internals/define-iterator.js ***!
  8141. \***********************************************************/
  8142. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8143. "use strict";
  8144. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  8145. var createIteratorConstructor = __webpack_require__(/*! ../internals/create-iterator-constructor */ "./node_modules/core-js/internals/create-iterator-constructor.js");
  8146. var getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ "./node_modules/core-js/internals/object-get-prototype-of.js");
  8147. var setPrototypeOf = __webpack_require__(/*! ../internals/object-set-prototype-of */ "./node_modules/core-js/internals/object-set-prototype-of.js");
  8148. var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ "./node_modules/core-js/internals/set-to-string-tag.js");
  8149. var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "./node_modules/core-js/internals/create-non-enumerable-property.js");
  8150. var redefine = __webpack_require__(/*! ../internals/redefine */ "./node_modules/core-js/internals/redefine.js");
  8151. var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
  8152. var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "./node_modules/core-js/internals/is-pure.js");
  8153. var Iterators = __webpack_require__(/*! ../internals/iterators */ "./node_modules/core-js/internals/iterators.js");
  8154. var IteratorsCore = __webpack_require__(/*! ../internals/iterators-core */ "./node_modules/core-js/internals/iterators-core.js");
  8155. var IteratorPrototype = IteratorsCore.IteratorPrototype;
  8156. var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
  8157. var ITERATOR = wellKnownSymbol('iterator');
  8158. var KEYS = 'keys';
  8159. var VALUES = 'values';
  8160. var ENTRIES = 'entries';
  8161. var returnThis = function () { return this; };
  8162. module.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
  8163. createIteratorConstructor(IteratorConstructor, NAME, next);
  8164. var getIterationMethod = function (KIND) {
  8165. if (KIND === DEFAULT && defaultIterator) return defaultIterator;
  8166. if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];
  8167. switch (KIND) {
  8168. case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
  8169. case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
  8170. case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
  8171. } return function () { return new IteratorConstructor(this); };
  8172. };
  8173. var TO_STRING_TAG = NAME + ' Iterator';
  8174. var INCORRECT_VALUES_NAME = false;
  8175. var IterablePrototype = Iterable.prototype;
  8176. var nativeIterator = IterablePrototype[ITERATOR]
  8177. || IterablePrototype['@@iterator']
  8178. || DEFAULT && IterablePrototype[DEFAULT];
  8179. var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
  8180. var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
  8181. var CurrentIteratorPrototype, methods, KEY;
  8182. // fix native
  8183. if (anyNativeIterator) {
  8184. CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
  8185. if (IteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
  8186. if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
  8187. if (setPrototypeOf) {
  8188. setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
  8189. } else if (typeof CurrentIteratorPrototype[ITERATOR] != 'function') {
  8190. createNonEnumerableProperty(CurrentIteratorPrototype, ITERATOR, returnThis);
  8191. }
  8192. }
  8193. // Set @@toStringTag to native iterators
  8194. setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);
  8195. if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;
  8196. }
  8197. }
  8198. // fix Array.prototype.{ values, @@iterator }.name in V8 / FF
  8199. if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
  8200. INCORRECT_VALUES_NAME = true;
  8201. defaultIterator = function values() { return nativeIterator.call(this); };
  8202. }
  8203. // define iterator
  8204. if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {
  8205. createNonEnumerableProperty(IterablePrototype, ITERATOR, defaultIterator);
  8206. }
  8207. Iterators[NAME] = defaultIterator;
  8208. // export additional methods
  8209. if (DEFAULT) {
  8210. methods = {
  8211. values: getIterationMethod(VALUES),
  8212. keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
  8213. entries: getIterationMethod(ENTRIES)
  8214. };
  8215. if (FORCED) for (KEY in methods) {
  8216. if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
  8217. redefine(IterablePrototype, KEY, methods[KEY]);
  8218. }
  8219. } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
  8220. }
  8221. return methods;
  8222. };
  8223. /***/ }),
  8224. /***/ "./node_modules/core-js/internals/define-well-known-symbol.js":
  8225. /*!********************************************************************!*\
  8226. !*** ./node_modules/core-js/internals/define-well-known-symbol.js ***!
  8227. \********************************************************************/
  8228. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8229. var path = __webpack_require__(/*! ../internals/path */ "./node_modules/core-js/internals/path.js");
  8230. var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js");
  8231. var wrappedWellKnownSymbolModule = __webpack_require__(/*! ../internals/well-known-symbol-wrapped */ "./node_modules/core-js/internals/well-known-symbol-wrapped.js");
  8232. var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js").f;
  8233. module.exports = function (NAME) {
  8234. var Symbol = path.Symbol || (path.Symbol = {});
  8235. if (!has(Symbol, NAME)) defineProperty(Symbol, NAME, {
  8236. value: wrappedWellKnownSymbolModule.f(NAME)
  8237. });
  8238. };
  8239. /***/ }),
  8240. /***/ "./node_modules/core-js/internals/dom-iterables.js":
  8241. /*!*********************************************************!*\
  8242. !*** ./node_modules/core-js/internals/dom-iterables.js ***!
  8243. \*********************************************************/
  8244. /***/ ((module) => {
  8245. // iterable DOM collections
  8246. // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
  8247. module.exports = {
  8248. CSSRuleList: 0,
  8249. CSSStyleDeclaration: 0,
  8250. CSSValueList: 0,
  8251. ClientRectList: 0,
  8252. DOMRectList: 0,
  8253. DOMStringList: 0,
  8254. DOMTokenList: 1,
  8255. DataTransferItemList: 0,
  8256. FileList: 0,
  8257. HTMLAllCollection: 0,
  8258. HTMLCollection: 0,
  8259. HTMLFormElement: 0,
  8260. HTMLSelectElement: 0,
  8261. MediaList: 0,
  8262. MimeTypeArray: 0,
  8263. NamedNodeMap: 0,
  8264. NodeList: 1,
  8265. PaintRequestList: 0,
  8266. Plugin: 0,
  8267. PluginArray: 0,
  8268. SVGLengthList: 0,
  8269. SVGNumberList: 0,
  8270. SVGPathSegList: 0,
  8271. SVGPointList: 0,
  8272. SVGStringList: 0,
  8273. SVGTransformList: 0,
  8274. SourceBufferList: 0,
  8275. StyleSheetList: 0,
  8276. TextTrackCueList: 0,
  8277. TextTrackList: 0,
  8278. TouchList: 0
  8279. };
  8280. /***/ }),
  8281. /***/ "./node_modules/core-js/internals/engine-is-browser.js":
  8282. /*!*************************************************************!*\
  8283. !*** ./node_modules/core-js/internals/engine-is-browser.js ***!
  8284. \*************************************************************/
  8285. /***/ ((module) => {
  8286. module.exports = typeof window == 'object';
  8287. /***/ }),
  8288. /***/ "./node_modules/core-js/internals/engine-is-ios.js":
  8289. /*!*********************************************************!*\
  8290. !*** ./node_modules/core-js/internals/engine-is-ios.js ***!
  8291. \*********************************************************/
  8292. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8293. var userAgent = __webpack_require__(/*! ../internals/engine-user-agent */ "./node_modules/core-js/internals/engine-user-agent.js");
  8294. module.exports = /(?:iphone|ipod|ipad).*applewebkit/i.test(userAgent);
  8295. /***/ }),
  8296. /***/ "./node_modules/core-js/internals/engine-is-node.js":
  8297. /*!**********************************************************!*\
  8298. !*** ./node_modules/core-js/internals/engine-is-node.js ***!
  8299. \**********************************************************/
  8300. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8301. var classof = __webpack_require__(/*! ../internals/classof-raw */ "./node_modules/core-js/internals/classof-raw.js");
  8302. var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
  8303. module.exports = classof(global.process) == 'process';
  8304. /***/ }),
  8305. /***/ "./node_modules/core-js/internals/engine-is-webos-webkit.js":
  8306. /*!******************************************************************!*\
  8307. !*** ./node_modules/core-js/internals/engine-is-webos-webkit.js ***!
  8308. \******************************************************************/
  8309. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8310. var userAgent = __webpack_require__(/*! ../internals/engine-user-agent */ "./node_modules/core-js/internals/engine-user-agent.js");
  8311. module.exports = /web0s(?!.*chrome)/i.test(userAgent);
  8312. /***/ }),
  8313. /***/ "./node_modules/core-js/internals/freezing.js":
  8314. /*!****************************************************!*\
  8315. !*** ./node_modules/core-js/internals/freezing.js ***!
  8316. \****************************************************/
  8317. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8318. var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
  8319. module.exports = !fails(function () {
  8320. // eslint-disable-next-line es/no-object-isextensible, es/no-object-preventextensions -- required for testing
  8321. return Object.isExtensible(Object.preventExtensions({}));
  8322. });
  8323. /***/ }),
  8324. /***/ "./node_modules/core-js/internals/function-bind-context.js":
  8325. /*!*****************************************************************!*\
  8326. !*** ./node_modules/core-js/internals/function-bind-context.js ***!
  8327. \*****************************************************************/
  8328. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8329. var aFunction = __webpack_require__(/*! ../internals/a-function */ "./node_modules/core-js/internals/a-function.js");
  8330. // optional / simple context binding
  8331. module.exports = function (fn, that, length) {
  8332. aFunction(fn);
  8333. if (that === undefined) return fn;
  8334. switch (length) {
  8335. case 0: return function () {
  8336. return fn.call(that);
  8337. };
  8338. case 1: return function (a) {
  8339. return fn.call(that, a);
  8340. };
  8341. case 2: return function (a, b) {
  8342. return fn.call(that, a, b);
  8343. };
  8344. case 3: return function (a, b, c) {
  8345. return fn.call(that, a, b, c);
  8346. };
  8347. }
  8348. return function (/* ...args */) {
  8349. return fn.apply(that, arguments);
  8350. };
  8351. };
  8352. /***/ }),
  8353. /***/ "./node_modules/core-js/internals/function-bind.js":
  8354. /*!*********************************************************!*\
  8355. !*** ./node_modules/core-js/internals/function-bind.js ***!
  8356. \*********************************************************/
  8357. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8358. "use strict";
  8359. var aFunction = __webpack_require__(/*! ../internals/a-function */ "./node_modules/core-js/internals/a-function.js");
  8360. var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
  8361. var slice = [].slice;
  8362. var factories = {};
  8363. var construct = function (C, argsLength, args) {
  8364. if (!(argsLength in factories)) {
  8365. for (var list = [], i = 0; i < argsLength; i++) list[i] = 'a[' + i + ']';
  8366. // eslint-disable-next-line no-new-func -- we have no proper alternatives, IE8- only
  8367. factories[argsLength] = Function('C,a', 'return new C(' + list.join(',') + ')');
  8368. } return factories[argsLength](C, args);
  8369. };
  8370. // `Function.prototype.bind` method implementation
  8371. // https://tc39.es/ecma262/#sec-function.prototype.bind
  8372. module.exports = Function.bind || function bind(that /* , ...args */) {
  8373. var fn = aFunction(this);
  8374. var partArgs = slice.call(arguments, 1);
  8375. var boundFunction = function bound(/* args... */) {
  8376. var args = partArgs.concat(slice.call(arguments));
  8377. return this instanceof boundFunction ? construct(fn, args.length, args) : fn.apply(that, args);
  8378. };
  8379. if (isObject(fn.prototype)) boundFunction.prototype = fn.prototype;
  8380. return boundFunction;
  8381. };
  8382. /***/ }),
  8383. /***/ "./node_modules/core-js/internals/get-iterator-method.js":
  8384. /*!***************************************************************!*\
  8385. !*** ./node_modules/core-js/internals/get-iterator-method.js ***!
  8386. \***************************************************************/
  8387. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8388. var classof = __webpack_require__(/*! ../internals/classof */ "./node_modules/core-js/internals/classof.js");
  8389. var Iterators = __webpack_require__(/*! ../internals/iterators */ "./node_modules/core-js/internals/iterators.js");
  8390. var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
  8391. var ITERATOR = wellKnownSymbol('iterator');
  8392. module.exports = function (it) {
  8393. if (it != undefined) return it[ITERATOR]
  8394. || it['@@iterator']
  8395. || Iterators[classof(it)];
  8396. };
  8397. /***/ }),
  8398. /***/ "./node_modules/core-js/internals/host-report-errors.js":
  8399. /*!**************************************************************!*\
  8400. !*** ./node_modules/core-js/internals/host-report-errors.js ***!
  8401. \**************************************************************/
  8402. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8403. var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
  8404. module.exports = function (a, b) {
  8405. var console = global.console;
  8406. if (console && console.error) {
  8407. arguments.length === 1 ? console.error(a) : console.error(a, b);
  8408. }
  8409. };
  8410. /***/ }),
  8411. /***/ "./node_modules/core-js/internals/html.js":
  8412. /*!************************************************!*\
  8413. !*** ./node_modules/core-js/internals/html.js ***!
  8414. \************************************************/
  8415. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8416. var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "./node_modules/core-js/internals/get-built-in.js");
  8417. module.exports = getBuiltIn('document', 'documentElement');
  8418. /***/ }),
  8419. /***/ "./node_modules/core-js/internals/inherit-if-required.js":
  8420. /*!***************************************************************!*\
  8421. !*** ./node_modules/core-js/internals/inherit-if-required.js ***!
  8422. \***************************************************************/
  8423. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8424. var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
  8425. var setPrototypeOf = __webpack_require__(/*! ../internals/object-set-prototype-of */ "./node_modules/core-js/internals/object-set-prototype-of.js");
  8426. // makes subclassing work correct for wrapped built-ins
  8427. module.exports = function ($this, dummy, Wrapper) {
  8428. var NewTarget, NewTargetPrototype;
  8429. if (
  8430. // it can work only with native `setPrototypeOf`
  8431. setPrototypeOf &&
  8432. // we haven't completely correct pre-ES6 way for getting `new.target`, so use this
  8433. typeof (NewTarget = dummy.constructor) == 'function' &&
  8434. NewTarget !== Wrapper &&
  8435. isObject(NewTargetPrototype = NewTarget.prototype) &&
  8436. NewTargetPrototype !== Wrapper.prototype
  8437. ) setPrototypeOf($this, NewTargetPrototype);
  8438. return $this;
  8439. };
  8440. /***/ }),
  8441. /***/ "./node_modules/core-js/internals/internal-metadata.js":
  8442. /*!*************************************************************!*\
  8443. !*** ./node_modules/core-js/internals/internal-metadata.js ***!
  8444. \*************************************************************/
  8445. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8446. var hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ "./node_modules/core-js/internals/hidden-keys.js");
  8447. var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
  8448. var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js");
  8449. var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js").f;
  8450. var uid = __webpack_require__(/*! ../internals/uid */ "./node_modules/core-js/internals/uid.js");
  8451. var FREEZING = __webpack_require__(/*! ../internals/freezing */ "./node_modules/core-js/internals/freezing.js");
  8452. var METADATA = uid('meta');
  8453. var id = 0;
  8454. // eslint-disable-next-line es/no-object-isextensible -- safe
  8455. var isExtensible = Object.isExtensible || function () {
  8456. return true;
  8457. };
  8458. var setMetadata = function (it) {
  8459. defineProperty(it, METADATA, { value: {
  8460. objectID: 'O' + ++id, // object ID
  8461. weakData: {} // weak collections IDs
  8462. } });
  8463. };
  8464. var fastKey = function (it, create) {
  8465. // return a primitive with prefix
  8466. if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
  8467. if (!has(it, METADATA)) {
  8468. // can't set metadata to uncaught frozen object
  8469. if (!isExtensible(it)) return 'F';
  8470. // not necessary to add metadata
  8471. if (!create) return 'E';
  8472. // add missing metadata
  8473. setMetadata(it);
  8474. // return object ID
  8475. } return it[METADATA].objectID;
  8476. };
  8477. var getWeakData = function (it, create) {
  8478. if (!has(it, METADATA)) {
  8479. // can't set metadata to uncaught frozen object
  8480. if (!isExtensible(it)) return true;
  8481. // not necessary to add metadata
  8482. if (!create) return false;
  8483. // add missing metadata
  8484. setMetadata(it);
  8485. // return the store of weak collections IDs
  8486. } return it[METADATA].weakData;
  8487. };
  8488. // add metadata on freeze-family methods calling
  8489. var onFreeze = function (it) {
  8490. if (FREEZING && meta.REQUIRED && isExtensible(it) && !has(it, METADATA)) setMetadata(it);
  8491. return it;
  8492. };
  8493. var meta = module.exports = {
  8494. REQUIRED: false,
  8495. fastKey: fastKey,
  8496. getWeakData: getWeakData,
  8497. onFreeze: onFreeze
  8498. };
  8499. hiddenKeys[METADATA] = true;
  8500. /***/ }),
  8501. /***/ "./node_modules/core-js/internals/is-array-iterator-method.js":
  8502. /*!********************************************************************!*\
  8503. !*** ./node_modules/core-js/internals/is-array-iterator-method.js ***!
  8504. \********************************************************************/
  8505. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8506. var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
  8507. var Iterators = __webpack_require__(/*! ../internals/iterators */ "./node_modules/core-js/internals/iterators.js");
  8508. var ITERATOR = wellKnownSymbol('iterator');
  8509. var ArrayPrototype = Array.prototype;
  8510. // check on default Array iterator
  8511. module.exports = function (it) {
  8512. return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);
  8513. };
  8514. /***/ }),
  8515. /***/ "./node_modules/core-js/internals/is-array.js":
  8516. /*!****************************************************!*\
  8517. !*** ./node_modules/core-js/internals/is-array.js ***!
  8518. \****************************************************/
  8519. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8520. var classof = __webpack_require__(/*! ../internals/classof-raw */ "./node_modules/core-js/internals/classof-raw.js");
  8521. // `IsArray` abstract operation
  8522. // https://tc39.es/ecma262/#sec-isarray
  8523. // eslint-disable-next-line es/no-array-isarray -- safe
  8524. module.exports = Array.isArray || function isArray(arg) {
  8525. return classof(arg) == 'Array';
  8526. };
  8527. /***/ }),
  8528. /***/ "./node_modules/core-js/internals/iterate.js":
  8529. /*!***************************************************!*\
  8530. !*** ./node_modules/core-js/internals/iterate.js ***!
  8531. \***************************************************/
  8532. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8533. var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
  8534. var isArrayIteratorMethod = __webpack_require__(/*! ../internals/is-array-iterator-method */ "./node_modules/core-js/internals/is-array-iterator-method.js");
  8535. var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js");
  8536. var bind = __webpack_require__(/*! ../internals/function-bind-context */ "./node_modules/core-js/internals/function-bind-context.js");
  8537. var getIteratorMethod = __webpack_require__(/*! ../internals/get-iterator-method */ "./node_modules/core-js/internals/get-iterator-method.js");
  8538. var iteratorClose = __webpack_require__(/*! ../internals/iterator-close */ "./node_modules/core-js/internals/iterator-close.js");
  8539. var Result = function (stopped, result) {
  8540. this.stopped = stopped;
  8541. this.result = result;
  8542. };
  8543. module.exports = function (iterable, unboundFunction, options) {
  8544. var that = options && options.that;
  8545. var AS_ENTRIES = !!(options && options.AS_ENTRIES);
  8546. var IS_ITERATOR = !!(options && options.IS_ITERATOR);
  8547. var INTERRUPTED = !!(options && options.INTERRUPTED);
  8548. var fn = bind(unboundFunction, that, 1 + AS_ENTRIES + INTERRUPTED);
  8549. var iterator, iterFn, index, length, result, next, step;
  8550. var stop = function (condition) {
  8551. if (iterator) iteratorClose(iterator);
  8552. return new Result(true, condition);
  8553. };
  8554. var callFn = function (value) {
  8555. if (AS_ENTRIES) {
  8556. anObject(value);
  8557. return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
  8558. } return INTERRUPTED ? fn(value, stop) : fn(value);
  8559. };
  8560. if (IS_ITERATOR) {
  8561. iterator = iterable;
  8562. } else {
  8563. iterFn = getIteratorMethod(iterable);
  8564. if (typeof iterFn != 'function') throw TypeError('Target is not iterable');
  8565. // optimisation for array iterators
  8566. if (isArrayIteratorMethod(iterFn)) {
  8567. for (index = 0, length = toLength(iterable.length); length > index; index++) {
  8568. result = callFn(iterable[index]);
  8569. if (result && result instanceof Result) return result;
  8570. } return new Result(false);
  8571. }
  8572. iterator = iterFn.call(iterable);
  8573. }
  8574. next = iterator.next;
  8575. while (!(step = next.call(iterator)).done) {
  8576. try {
  8577. result = callFn(step.value);
  8578. } catch (error) {
  8579. iteratorClose(iterator);
  8580. throw error;
  8581. }
  8582. if (typeof result == 'object' && result && result instanceof Result) return result;
  8583. } return new Result(false);
  8584. };
  8585. /***/ }),
  8586. /***/ "./node_modules/core-js/internals/iterator-close.js":
  8587. /*!**********************************************************!*\
  8588. !*** ./node_modules/core-js/internals/iterator-close.js ***!
  8589. \**********************************************************/
  8590. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8591. var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
  8592. module.exports = function (iterator) {
  8593. var returnMethod = iterator['return'];
  8594. if (returnMethod !== undefined) {
  8595. return anObject(returnMethod.call(iterator)).value;
  8596. }
  8597. };
  8598. /***/ }),
  8599. /***/ "./node_modules/core-js/internals/iterators-core.js":
  8600. /*!**********************************************************!*\
  8601. !*** ./node_modules/core-js/internals/iterators-core.js ***!
  8602. \**********************************************************/
  8603. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8604. "use strict";
  8605. var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
  8606. var getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ "./node_modules/core-js/internals/object-get-prototype-of.js");
  8607. var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "./node_modules/core-js/internals/create-non-enumerable-property.js");
  8608. var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js");
  8609. var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
  8610. var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "./node_modules/core-js/internals/is-pure.js");
  8611. var ITERATOR = wellKnownSymbol('iterator');
  8612. var BUGGY_SAFARI_ITERATORS = false;
  8613. var returnThis = function () { return this; };
  8614. // `%IteratorPrototype%` object
  8615. // https://tc39.es/ecma262/#sec-%iteratorprototype%-object
  8616. var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;
  8617. /* eslint-disable es/no-array-prototype-keys -- safe */
  8618. if ([].keys) {
  8619. arrayIterator = [].keys();
  8620. // Safari 8 has buggy iterators w/o `next`
  8621. if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;
  8622. else {
  8623. PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));
  8624. if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;
  8625. }
  8626. }
  8627. var NEW_ITERATOR_PROTOTYPE = IteratorPrototype == undefined || fails(function () {
  8628. var test = {};
  8629. // FF44- legacy iterators case
  8630. return IteratorPrototype[ITERATOR].call(test) !== test;
  8631. });
  8632. if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {};
  8633. // `%IteratorPrototype%[@@iterator]()` method
  8634. // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
  8635. if ((!IS_PURE || NEW_ITERATOR_PROTOTYPE) && !has(IteratorPrototype, ITERATOR)) {
  8636. createNonEnumerableProperty(IteratorPrototype, ITERATOR, returnThis);
  8637. }
  8638. module.exports = {
  8639. IteratorPrototype: IteratorPrototype,
  8640. BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS
  8641. };
  8642. /***/ }),
  8643. /***/ "./node_modules/core-js/internals/iterators.js":
  8644. /*!*****************************************************!*\
  8645. !*** ./node_modules/core-js/internals/iterators.js ***!
  8646. \*****************************************************/
  8647. /***/ ((module) => {
  8648. module.exports = {};
  8649. /***/ }),
  8650. /***/ "./node_modules/core-js/internals/microtask.js":
  8651. /*!*****************************************************!*\
  8652. !*** ./node_modules/core-js/internals/microtask.js ***!
  8653. \*****************************************************/
  8654. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8655. var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
  8656. var getOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "./node_modules/core-js/internals/object-get-own-property-descriptor.js").f;
  8657. var macrotask = __webpack_require__(/*! ../internals/task */ "./node_modules/core-js/internals/task.js").set;
  8658. var IS_IOS = __webpack_require__(/*! ../internals/engine-is-ios */ "./node_modules/core-js/internals/engine-is-ios.js");
  8659. var IS_WEBOS_WEBKIT = __webpack_require__(/*! ../internals/engine-is-webos-webkit */ "./node_modules/core-js/internals/engine-is-webos-webkit.js");
  8660. var IS_NODE = __webpack_require__(/*! ../internals/engine-is-node */ "./node_modules/core-js/internals/engine-is-node.js");
  8661. var MutationObserver = global.MutationObserver || global.WebKitMutationObserver;
  8662. var document = global.document;
  8663. var process = global.process;
  8664. var Promise = global.Promise;
  8665. // Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`
  8666. var queueMicrotaskDescriptor = getOwnPropertyDescriptor(global, 'queueMicrotask');
  8667. var queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;
  8668. var flush, head, last, notify, toggle, node, promise, then;
  8669. // modern engines have queueMicrotask method
  8670. if (!queueMicrotask) {
  8671. flush = function () {
  8672. var parent, fn;
  8673. if (IS_NODE && (parent = process.domain)) parent.exit();
  8674. while (head) {
  8675. fn = head.fn;
  8676. head = head.next;
  8677. try {
  8678. fn();
  8679. } catch (error) {
  8680. if (head) notify();
  8681. else last = undefined;
  8682. throw error;
  8683. }
  8684. } last = undefined;
  8685. if (parent) parent.enter();
  8686. };
  8687. // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339
  8688. // also except WebOS Webkit https://github.com/zloirock/core-js/issues/898
  8689. if (!IS_IOS && !IS_NODE && !IS_WEBOS_WEBKIT && MutationObserver && document) {
  8690. toggle = true;
  8691. node = document.createTextNode('');
  8692. new MutationObserver(flush).observe(node, { characterData: true });
  8693. notify = function () {
  8694. node.data = toggle = !toggle;
  8695. };
  8696. // environments with maybe non-completely correct, but existent Promise
  8697. } else if (Promise && Promise.resolve) {
  8698. // Promise.resolve without an argument throws an error in LG WebOS 2
  8699. promise = Promise.resolve(undefined);
  8700. // workaround of WebKit ~ iOS Safari 10.1 bug
  8701. promise.constructor = Promise;
  8702. then = promise.then;
  8703. notify = function () {
  8704. then.call(promise, flush);
  8705. };
  8706. // Node.js without promises
  8707. } else if (IS_NODE) {
  8708. notify = function () {
  8709. process.nextTick(flush);
  8710. };
  8711. // for other environments - macrotask based on:
  8712. // - setImmediate
  8713. // - MessageChannel
  8714. // - window.postMessag
  8715. // - onreadystatechange
  8716. // - setTimeout
  8717. } else {
  8718. notify = function () {
  8719. // strange IE + webpack dev server bug - use .call(global)
  8720. macrotask.call(global, flush);
  8721. };
  8722. }
  8723. }
  8724. module.exports = queueMicrotask || function (fn) {
  8725. var task = { fn: fn, next: undefined };
  8726. if (last) last.next = task;
  8727. if (!head) {
  8728. head = task;
  8729. notify();
  8730. } last = task;
  8731. };
  8732. /***/ }),
  8733. /***/ "./node_modules/core-js/internals/native-promise-constructor.js":
  8734. /*!**********************************************************************!*\
  8735. !*** ./node_modules/core-js/internals/native-promise-constructor.js ***!
  8736. \**********************************************************************/
  8737. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8738. var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
  8739. module.exports = global.Promise;
  8740. /***/ }),
  8741. /***/ "./node_modules/core-js/internals/new-promise-capability.js":
  8742. /*!******************************************************************!*\
  8743. !*** ./node_modules/core-js/internals/new-promise-capability.js ***!
  8744. \******************************************************************/
  8745. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8746. "use strict";
  8747. var aFunction = __webpack_require__(/*! ../internals/a-function */ "./node_modules/core-js/internals/a-function.js");
  8748. var PromiseCapability = function (C) {
  8749. var resolve, reject;
  8750. this.promise = new C(function ($$resolve, $$reject) {
  8751. if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');
  8752. resolve = $$resolve;
  8753. reject = $$reject;
  8754. });
  8755. this.resolve = aFunction(resolve);
  8756. this.reject = aFunction(reject);
  8757. };
  8758. // `NewPromiseCapability` abstract operation
  8759. // https://tc39.es/ecma262/#sec-newpromisecapability
  8760. module.exports.f = function (C) {
  8761. return new PromiseCapability(C);
  8762. };
  8763. /***/ }),
  8764. /***/ "./node_modules/core-js/internals/not-a-regexp.js":
  8765. /*!********************************************************!*\
  8766. !*** ./node_modules/core-js/internals/not-a-regexp.js ***!
  8767. \********************************************************/
  8768. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8769. var isRegExp = __webpack_require__(/*! ../internals/is-regexp */ "./node_modules/core-js/internals/is-regexp.js");
  8770. module.exports = function (it) {
  8771. if (isRegExp(it)) {
  8772. throw TypeError("The method doesn't accept regular expressions");
  8773. } return it;
  8774. };
  8775. /***/ }),
  8776. /***/ "./node_modules/core-js/internals/object-create.js":
  8777. /*!*********************************************************!*\
  8778. !*** ./node_modules/core-js/internals/object-create.js ***!
  8779. \*********************************************************/
  8780. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8781. var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
  8782. var defineProperties = __webpack_require__(/*! ../internals/object-define-properties */ "./node_modules/core-js/internals/object-define-properties.js");
  8783. var enumBugKeys = __webpack_require__(/*! ../internals/enum-bug-keys */ "./node_modules/core-js/internals/enum-bug-keys.js");
  8784. var hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ "./node_modules/core-js/internals/hidden-keys.js");
  8785. var html = __webpack_require__(/*! ../internals/html */ "./node_modules/core-js/internals/html.js");
  8786. var documentCreateElement = __webpack_require__(/*! ../internals/document-create-element */ "./node_modules/core-js/internals/document-create-element.js");
  8787. var sharedKey = __webpack_require__(/*! ../internals/shared-key */ "./node_modules/core-js/internals/shared-key.js");
  8788. var GT = '>';
  8789. var LT = '<';
  8790. var PROTOTYPE = 'prototype';
  8791. var SCRIPT = 'script';
  8792. var IE_PROTO = sharedKey('IE_PROTO');
  8793. var EmptyConstructor = function () { /* empty */ };
  8794. var scriptTag = function (content) {
  8795. return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
  8796. };
  8797. // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
  8798. var NullProtoObjectViaActiveX = function (activeXDocument) {
  8799. activeXDocument.write(scriptTag(''));
  8800. activeXDocument.close();
  8801. var temp = activeXDocument.parentWindow.Object;
  8802. activeXDocument = null; // avoid memory leak
  8803. return temp;
  8804. };
  8805. // Create object with fake `null` prototype: use iframe Object with cleared prototype
  8806. var NullProtoObjectViaIFrame = function () {
  8807. // Thrash, waste and sodomy: IE GC bug
  8808. var iframe = documentCreateElement('iframe');
  8809. var JS = 'java' + SCRIPT + ':';
  8810. var iframeDocument;
  8811. iframe.style.display = 'none';
  8812. html.appendChild(iframe);
  8813. // https://github.com/zloirock/core-js/issues/475
  8814. iframe.src = String(JS);
  8815. iframeDocument = iframe.contentWindow.document;
  8816. iframeDocument.open();
  8817. iframeDocument.write(scriptTag('document.F=Object'));
  8818. iframeDocument.close();
  8819. return iframeDocument.F;
  8820. };
  8821. // Check for document.domain and active x support
  8822. // No need to use active x approach when document.domain is not set
  8823. // see https://github.com/es-shims/es5-shim/issues/150
  8824. // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
  8825. // avoid IE GC bug
  8826. var activeXDocument;
  8827. var NullProtoObject = function () {
  8828. try {
  8829. /* global ActiveXObject -- old IE */
  8830. activeXDocument = document.domain && new ActiveXObject('htmlfile');
  8831. } catch (error) { /* ignore */ }
  8832. NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();
  8833. var length = enumBugKeys.length;
  8834. while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
  8835. return NullProtoObject();
  8836. };
  8837. hiddenKeys[IE_PROTO] = true;
  8838. // `Object.create` method
  8839. // https://tc39.es/ecma262/#sec-object.create
  8840. module.exports = Object.create || function create(O, Properties) {
  8841. var result;
  8842. if (O !== null) {
  8843. EmptyConstructor[PROTOTYPE] = anObject(O);
  8844. result = new EmptyConstructor();
  8845. EmptyConstructor[PROTOTYPE] = null;
  8846. // add "__proto__" for Object.getPrototypeOf polyfill
  8847. result[IE_PROTO] = O;
  8848. } else result = NullProtoObject();
  8849. return Properties === undefined ? result : defineProperties(result, Properties);
  8850. };
  8851. /***/ }),
  8852. /***/ "./node_modules/core-js/internals/object-define-properties.js":
  8853. /*!********************************************************************!*\
  8854. !*** ./node_modules/core-js/internals/object-define-properties.js ***!
  8855. \********************************************************************/
  8856. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8857. var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
  8858. var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js");
  8859. var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
  8860. var objectKeys = __webpack_require__(/*! ../internals/object-keys */ "./node_modules/core-js/internals/object-keys.js");
  8861. // `Object.defineProperties` method
  8862. // https://tc39.es/ecma262/#sec-object.defineproperties
  8863. // eslint-disable-next-line es/no-object-defineproperties -- safe
  8864. module.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) {
  8865. anObject(O);
  8866. var keys = objectKeys(Properties);
  8867. var length = keys.length;
  8868. var index = 0;
  8869. var key;
  8870. while (length > index) definePropertyModule.f(O, key = keys[index++], Properties[key]);
  8871. return O;
  8872. };
  8873. /***/ }),
  8874. /***/ "./node_modules/core-js/internals/object-get-own-property-names-external.js":
  8875. /*!**********************************************************************************!*\
  8876. !*** ./node_modules/core-js/internals/object-get-own-property-names-external.js ***!
  8877. \**********************************************************************************/
  8878. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8879. /* eslint-disable es/no-object-getownpropertynames -- safe */
  8880. var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/core-js/internals/to-indexed-object.js");
  8881. var $getOwnPropertyNames = __webpack_require__(/*! ../internals/object-get-own-property-names */ "./node_modules/core-js/internals/object-get-own-property-names.js").f;
  8882. var toString = {}.toString;
  8883. var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
  8884. ? Object.getOwnPropertyNames(window) : [];
  8885. var getWindowNames = function (it) {
  8886. try {
  8887. return $getOwnPropertyNames(it);
  8888. } catch (error) {
  8889. return windowNames.slice();
  8890. }
  8891. };
  8892. // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
  8893. module.exports.f = function getOwnPropertyNames(it) {
  8894. return windowNames && toString.call(it) == '[object Window]'
  8895. ? getWindowNames(it)
  8896. : $getOwnPropertyNames(toIndexedObject(it));
  8897. };
  8898. /***/ }),
  8899. /***/ "./node_modules/core-js/internals/object-get-prototype-of.js":
  8900. /*!*******************************************************************!*\
  8901. !*** ./node_modules/core-js/internals/object-get-prototype-of.js ***!
  8902. \*******************************************************************/
  8903. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8904. var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js");
  8905. var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js");
  8906. var sharedKey = __webpack_require__(/*! ../internals/shared-key */ "./node_modules/core-js/internals/shared-key.js");
  8907. var CORRECT_PROTOTYPE_GETTER = __webpack_require__(/*! ../internals/correct-prototype-getter */ "./node_modules/core-js/internals/correct-prototype-getter.js");
  8908. var IE_PROTO = sharedKey('IE_PROTO');
  8909. var ObjectPrototype = Object.prototype;
  8910. // `Object.getPrototypeOf` method
  8911. // https://tc39.es/ecma262/#sec-object.getprototypeof
  8912. // eslint-disable-next-line es/no-object-getprototypeof -- safe
  8913. module.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) {
  8914. O = toObject(O);
  8915. if (has(O, IE_PROTO)) return O[IE_PROTO];
  8916. if (typeof O.constructor == 'function' && O instanceof O.constructor) {
  8917. return O.constructor.prototype;
  8918. } return O instanceof Object ? ObjectPrototype : null;
  8919. };
  8920. /***/ }),
  8921. /***/ "./node_modules/core-js/internals/object-keys.js":
  8922. /*!*******************************************************!*\
  8923. !*** ./node_modules/core-js/internals/object-keys.js ***!
  8924. \*******************************************************/
  8925. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8926. var internalObjectKeys = __webpack_require__(/*! ../internals/object-keys-internal */ "./node_modules/core-js/internals/object-keys-internal.js");
  8927. var enumBugKeys = __webpack_require__(/*! ../internals/enum-bug-keys */ "./node_modules/core-js/internals/enum-bug-keys.js");
  8928. // `Object.keys` method
  8929. // https://tc39.es/ecma262/#sec-object.keys
  8930. // eslint-disable-next-line es/no-object-keys -- safe
  8931. module.exports = Object.keys || function keys(O) {
  8932. return internalObjectKeys(O, enumBugKeys);
  8933. };
  8934. /***/ }),
  8935. /***/ "./node_modules/core-js/internals/object-set-prototype-of.js":
  8936. /*!*******************************************************************!*\
  8937. !*** ./node_modules/core-js/internals/object-set-prototype-of.js ***!
  8938. \*******************************************************************/
  8939. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8940. /* eslint-disable no-proto -- safe */
  8941. var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
  8942. var aPossiblePrototype = __webpack_require__(/*! ../internals/a-possible-prototype */ "./node_modules/core-js/internals/a-possible-prototype.js");
  8943. // `Object.setPrototypeOf` method
  8944. // https://tc39.es/ecma262/#sec-object.setprototypeof
  8945. // Works with __proto__ only. Old v8 can't work with null proto objects.
  8946. // eslint-disable-next-line es/no-object-setprototypeof -- safe
  8947. module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {
  8948. var CORRECT_SETTER = false;
  8949. var test = {};
  8950. var setter;
  8951. try {
  8952. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  8953. setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;
  8954. setter.call(test, []);
  8955. CORRECT_SETTER = test instanceof Array;
  8956. } catch (error) { /* empty */ }
  8957. return function setPrototypeOf(O, proto) {
  8958. anObject(O);
  8959. aPossiblePrototype(proto);
  8960. if (CORRECT_SETTER) setter.call(O, proto);
  8961. else O.__proto__ = proto;
  8962. return O;
  8963. };
  8964. }() : undefined);
  8965. /***/ }),
  8966. /***/ "./node_modules/core-js/internals/perform.js":
  8967. /*!***************************************************!*\
  8968. !*** ./node_modules/core-js/internals/perform.js ***!
  8969. \***************************************************/
  8970. /***/ ((module) => {
  8971. module.exports = function (exec) {
  8972. try {
  8973. return { error: false, value: exec() };
  8974. } catch (error) {
  8975. return { error: true, value: error };
  8976. }
  8977. };
  8978. /***/ }),
  8979. /***/ "./node_modules/core-js/internals/promise-resolve.js":
  8980. /*!***********************************************************!*\
  8981. !*** ./node_modules/core-js/internals/promise-resolve.js ***!
  8982. \***********************************************************/
  8983. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8984. var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
  8985. var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
  8986. var newPromiseCapability = __webpack_require__(/*! ../internals/new-promise-capability */ "./node_modules/core-js/internals/new-promise-capability.js");
  8987. module.exports = function (C, x) {
  8988. anObject(C);
  8989. if (isObject(x) && x.constructor === C) return x;
  8990. var promiseCapability = newPromiseCapability.f(C);
  8991. var resolve = promiseCapability.resolve;
  8992. resolve(x);
  8993. return promiseCapability.promise;
  8994. };
  8995. /***/ }),
  8996. /***/ "./node_modules/core-js/internals/redefine-all.js":
  8997. /*!********************************************************!*\
  8998. !*** ./node_modules/core-js/internals/redefine-all.js ***!
  8999. \********************************************************/
  9000. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  9001. var redefine = __webpack_require__(/*! ../internals/redefine */ "./node_modules/core-js/internals/redefine.js");
  9002. module.exports = function (target, src, options) {
  9003. for (var key in src) redefine(target, key, src[key], options);
  9004. return target;
  9005. };
  9006. /***/ }),
  9007. /***/ "./node_modules/core-js/internals/set-species.js":
  9008. /*!*******************************************************!*\
  9009. !*** ./node_modules/core-js/internals/set-species.js ***!
  9010. \*******************************************************/
  9011. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  9012. "use strict";
  9013. var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "./node_modules/core-js/internals/get-built-in.js");
  9014. var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js");
  9015. var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
  9016. var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
  9017. var SPECIES = wellKnownSymbol('species');
  9018. module.exports = function (CONSTRUCTOR_NAME) {
  9019. var Constructor = getBuiltIn(CONSTRUCTOR_NAME);
  9020. var defineProperty = definePropertyModule.f;
  9021. if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) {
  9022. defineProperty(Constructor, SPECIES, {
  9023. configurable: true,
  9024. get: function () { return this; }
  9025. });
  9026. }
  9027. };
  9028. /***/ }),
  9029. /***/ "./node_modules/core-js/internals/set-to-string-tag.js":
  9030. /*!*************************************************************!*\
  9031. !*** ./node_modules/core-js/internals/set-to-string-tag.js ***!
  9032. \*************************************************************/
  9033. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  9034. var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js").f;
  9035. var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js");
  9036. var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
  9037. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  9038. module.exports = function (it, TAG, STATIC) {
  9039. if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {
  9040. defineProperty(it, TO_STRING_TAG, { configurable: true, value: TAG });
  9041. }
  9042. };
  9043. /***/ }),
  9044. /***/ "./node_modules/core-js/internals/string-trim-forced.js":
  9045. /*!**************************************************************!*\
  9046. !*** ./node_modules/core-js/internals/string-trim-forced.js ***!
  9047. \**************************************************************/
  9048. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  9049. var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
  9050. var whitespaces = __webpack_require__(/*! ../internals/whitespaces */ "./node_modules/core-js/internals/whitespaces.js");
  9051. var non = '\u200B\u0085\u180E';
  9052. // check that a method works with the correct list
  9053. // of whitespaces and has a correct name
  9054. module.exports = function (METHOD_NAME) {
  9055. return fails(function () {
  9056. return !!whitespaces[METHOD_NAME]() || non[METHOD_NAME]() != non || whitespaces[METHOD_NAME].name !== METHOD_NAME;
  9057. });
  9058. };
  9059. /***/ }),
  9060. /***/ "./node_modules/core-js/internals/string-trim.js":
  9061. /*!*******************************************************!*\
  9062. !*** ./node_modules/core-js/internals/string-trim.js ***!
  9063. \*******************************************************/
  9064. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  9065. var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "./node_modules/core-js/internals/require-object-coercible.js");
  9066. var whitespaces = __webpack_require__(/*! ../internals/whitespaces */ "./node_modules/core-js/internals/whitespaces.js");
  9067. var whitespace = '[' + whitespaces + ']';
  9068. var ltrim = RegExp('^' + whitespace + whitespace + '*');
  9069. var rtrim = RegExp(whitespace + whitespace + '*$');
  9070. // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
  9071. var createMethod = function (TYPE) {
  9072. return function ($this) {
  9073. var string = String(requireObjectCoercible($this));
  9074. if (TYPE & 1) string = string.replace(ltrim, '');
  9075. if (TYPE & 2) string = string.replace(rtrim, '');
  9076. return string;
  9077. };
  9078. };
  9079. module.exports = {
  9080. // `String.prototype.{ trimLeft, trimStart }` methods
  9081. // https://tc39.es/ecma262/#sec-string.prototype.trimstart
  9082. start: createMethod(1),
  9083. // `String.prototype.{ trimRight, trimEnd }` methods
  9084. // https://tc39.es/ecma262/#sec-string.prototype.trimend
  9085. end: createMethod(2),
  9086. // `String.prototype.trim` method
  9087. // https://tc39.es/ecma262/#sec-string.prototype.trim
  9088. trim: createMethod(3)
  9089. };
  9090. /***/ }),
  9091. /***/ "./node_modules/core-js/internals/task.js":
  9092. /*!************************************************!*\
  9093. !*** ./node_modules/core-js/internals/task.js ***!
  9094. \************************************************/
  9095. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  9096. var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
  9097. var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
  9098. var bind = __webpack_require__(/*! ../internals/function-bind-context */ "./node_modules/core-js/internals/function-bind-context.js");
  9099. var html = __webpack_require__(/*! ../internals/html */ "./node_modules/core-js/internals/html.js");
  9100. var createElement = __webpack_require__(/*! ../internals/document-create-element */ "./node_modules/core-js/internals/document-create-element.js");
  9101. var IS_IOS = __webpack_require__(/*! ../internals/engine-is-ios */ "./node_modules/core-js/internals/engine-is-ios.js");
  9102. var IS_NODE = __webpack_require__(/*! ../internals/engine-is-node */ "./node_modules/core-js/internals/engine-is-node.js");
  9103. var location = global.location;
  9104. var set = global.setImmediate;
  9105. var clear = global.clearImmediate;
  9106. var process = global.process;
  9107. var MessageChannel = global.MessageChannel;
  9108. var Dispatch = global.Dispatch;
  9109. var counter = 0;
  9110. var queue = {};
  9111. var ONREADYSTATECHANGE = 'onreadystatechange';
  9112. var defer, channel, port;
  9113. var run = function (id) {
  9114. // eslint-disable-next-line no-prototype-builtins -- safe
  9115. if (queue.hasOwnProperty(id)) {
  9116. var fn = queue[id];
  9117. delete queue[id];
  9118. fn();
  9119. }
  9120. };
  9121. var runner = function (id) {
  9122. return function () {
  9123. run(id);
  9124. };
  9125. };
  9126. var listener = function (event) {
  9127. run(event.data);
  9128. };
  9129. var post = function (id) {
  9130. // old engines have not location.origin
  9131. global.postMessage(id + '', location.protocol + '//' + location.host);
  9132. };
  9133. // Node.js 0.9+ & IE10+ has setImmediate, otherwise:
  9134. if (!set || !clear) {
  9135. set = function setImmediate(fn) {
  9136. var args = [];
  9137. var i = 1;
  9138. while (arguments.length > i) args.push(arguments[i++]);
  9139. queue[++counter] = function () {
  9140. // eslint-disable-next-line no-new-func -- spec requirement
  9141. (typeof fn == 'function' ? fn : Function(fn)).apply(undefined, args);
  9142. };
  9143. defer(counter);
  9144. return counter;
  9145. };
  9146. clear = function clearImmediate(id) {
  9147. delete queue[id];
  9148. };
  9149. // Node.js 0.8-
  9150. if (IS_NODE) {
  9151. defer = function (id) {
  9152. process.nextTick(runner(id));
  9153. };
  9154. // Sphere (JS game engine) Dispatch API
  9155. } else if (Dispatch && Dispatch.now) {
  9156. defer = function (id) {
  9157. Dispatch.now(runner(id));
  9158. };
  9159. // Browsers with MessageChannel, includes WebWorkers
  9160. // except iOS - https://github.com/zloirock/core-js/issues/624
  9161. } else if (MessageChannel && !IS_IOS) {
  9162. channel = new MessageChannel();
  9163. port = channel.port2;
  9164. channel.port1.onmessage = listener;
  9165. defer = bind(port.postMessage, port, 1);
  9166. // Browsers with postMessage, skip WebWorkers
  9167. // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
  9168. } else if (
  9169. global.addEventListener &&
  9170. typeof postMessage == 'function' &&
  9171. !global.importScripts &&
  9172. location && location.protocol !== 'file:' &&
  9173. !fails(post)
  9174. ) {
  9175. defer = post;
  9176. global.addEventListener('message', listener, false);
  9177. // IE8-
  9178. } else if (ONREADYSTATECHANGE in createElement('script')) {
  9179. defer = function (id) {
  9180. html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {
  9181. html.removeChild(this);
  9182. run(id);
  9183. };
  9184. };
  9185. // Rest old browsers
  9186. } else {
  9187. defer = function (id) {
  9188. setTimeout(runner(id), 0);
  9189. };
  9190. }
  9191. }
  9192. module.exports = {
  9193. set: set,
  9194. clear: clear
  9195. };
  9196. /***/ }),
  9197. /***/ "./node_modules/core-js/internals/well-known-symbol-wrapped.js":
  9198. /*!*********************************************************************!*\
  9199. !*** ./node_modules/core-js/internals/well-known-symbol-wrapped.js ***!
  9200. \*********************************************************************/
  9201. /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
  9202. var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
  9203. exports.f = wellKnownSymbol;
  9204. /***/ }),
  9205. /***/ "./node_modules/core-js/internals/whitespaces.js":
  9206. /*!*******************************************************!*\
  9207. !*** ./node_modules/core-js/internals/whitespaces.js ***!
  9208. \*******************************************************/
  9209. /***/ ((module) => {
  9210. // a string of all valid unicode whitespaces
  9211. module.exports = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
  9212. '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
  9213. /***/ }),
  9214. /***/ "./node_modules/core-js/modules/es.array.concat.js":
  9215. /*!*********************************************************!*\
  9216. !*** ./node_modules/core-js/modules/es.array.concat.js ***!
  9217. \*********************************************************/
  9218. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  9219. "use strict";
  9220. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  9221. var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
  9222. var isArray = __webpack_require__(/*! ../internals/is-array */ "./node_modules/core-js/internals/is-array.js");
  9223. var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
  9224. var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js");
  9225. var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js");
  9226. var createProperty = __webpack_require__(/*! ../internals/create-property */ "./node_modules/core-js/internals/create-property.js");
  9227. var arraySpeciesCreate = __webpack_require__(/*! ../internals/array-species-create */ "./node_modules/core-js/internals/array-species-create.js");
  9228. var arrayMethodHasSpeciesSupport = __webpack_require__(/*! ../internals/array-method-has-species-support */ "./node_modules/core-js/internals/array-method-has-species-support.js");
  9229. var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
  9230. var V8_VERSION = __webpack_require__(/*! ../internals/engine-v8-version */ "./node_modules/core-js/internals/engine-v8-version.js");
  9231. var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
  9232. var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
  9233. var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
  9234. // We can't use this feature detection in V8 since it causes
  9235. // deoptimization and serious performance degradation
  9236. // https://github.com/zloirock/core-js/issues/679
  9237. var IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails(function () {
  9238. var array = [];
  9239. array[IS_CONCAT_SPREADABLE] = false;
  9240. return array.concat()[0] !== array;
  9241. });
  9242. var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
  9243. var isConcatSpreadable = function (O) {
  9244. if (!isObject(O)) return false;
  9245. var spreadable = O[IS_CONCAT_SPREADABLE];
  9246. return spreadable !== undefined ? !!spreadable : isArray(O);
  9247. };
  9248. var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
  9249. // `Array.prototype.concat` method
  9250. // https://tc39.es/ecma262/#sec-array.prototype.concat
  9251. // with adding support of @@isConcatSpreadable and @@species
  9252. $({ target: 'Array', proto: true, forced: FORCED }, {
  9253. // eslint-disable-next-line no-unused-vars -- required for `.length`
  9254. concat: function concat(arg) {
  9255. var O = toObject(this);
  9256. var A = arraySpeciesCreate(O, 0);
  9257. var n = 0;
  9258. var i, k, length, len, E;
  9259. for (i = -1, length = arguments.length; i < length; i++) {
  9260. E = i === -1 ? O : arguments[i];
  9261. if (isConcatSpreadable(E)) {
  9262. len = toLength(E.length);
  9263. if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
  9264. for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
  9265. } else {
  9266. if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
  9267. createProperty(A, n++, E);
  9268. }
  9269. }
  9270. A.length = n;
  9271. return A;
  9272. }
  9273. });
  9274. /***/ }),
  9275. /***/ "./node_modules/core-js/modules/es.array.every.js":
  9276. /*!********************************************************!*\
  9277. !*** ./node_modules/core-js/modules/es.array.every.js ***!
  9278. \********************************************************/
  9279. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  9280. "use strict";
  9281. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  9282. var $every = __webpack_require__(/*! ../internals/array-iteration */ "./node_modules/core-js/internals/array-iteration.js").every;
  9283. var arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ "./node_modules/core-js/internals/array-method-is-strict.js");
  9284. var STRICT_METHOD = arrayMethodIsStrict('every');
  9285. // `Array.prototype.every` method
  9286. // https://tc39.es/ecma262/#sec-array.prototype.every
  9287. $({ target: 'Array', proto: true, forced: !STRICT_METHOD }, {
  9288. every: function every(callbackfn /* , thisArg */) {
  9289. return $every(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  9290. }
  9291. });
  9292. /***/ }),
  9293. /***/ "./node_modules/core-js/modules/es.array.fill.js":
  9294. /*!*******************************************************!*\
  9295. !*** ./node_modules/core-js/modules/es.array.fill.js ***!
  9296. \*******************************************************/
  9297. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  9298. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  9299. var fill = __webpack_require__(/*! ../internals/array-fill */ "./node_modules/core-js/internals/array-fill.js");
  9300. var addToUnscopables = __webpack_require__(/*! ../internals/add-to-unscopables */ "./node_modules/core-js/internals/add-to-unscopables.js");
  9301. // `Array.prototype.fill` method
  9302. // https://tc39.es/ecma262/#sec-array.prototype.fill
  9303. $({ target: 'Array', proto: true }, {
  9304. fill: fill
  9305. });
  9306. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  9307. addToUnscopables('fill');
  9308. /***/ }),
  9309. /***/ "./node_modules/core-js/modules/es.array.for-each.js":
  9310. /*!***********************************************************!*\
  9311. !*** ./node_modules/core-js/modules/es.array.for-each.js ***!
  9312. \***********************************************************/
  9313. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  9314. "use strict";
  9315. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  9316. var forEach = __webpack_require__(/*! ../internals/array-for-each */ "./node_modules/core-js/internals/array-for-each.js");
  9317. // `Array.prototype.forEach` method
  9318. // https://tc39.es/ecma262/#sec-array.prototype.foreach
  9319. // eslint-disable-next-line es/no-array-prototype-foreach -- safe
  9320. $({ target: 'Array', proto: true, forced: [].forEach != forEach }, {
  9321. forEach: forEach
  9322. });
  9323. /***/ }),
  9324. /***/ "./node_modules/core-js/modules/es.array.from.js":
  9325. /*!*******************************************************!*\
  9326. !*** ./node_modules/core-js/modules/es.array.from.js ***!
  9327. \*******************************************************/
  9328. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  9329. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  9330. var from = __webpack_require__(/*! ../internals/array-from */ "./node_modules/core-js/internals/array-from.js");
  9331. var checkCorrectnessOfIteration = __webpack_require__(/*! ../internals/check-correctness-of-iteration */ "./node_modules/core-js/internals/check-correctness-of-iteration.js");
  9332. var INCORRECT_ITERATION = !checkCorrectnessOfIteration(function (iterable) {
  9333. // eslint-disable-next-line es/no-array-from -- required for testing
  9334. Array.from(iterable);
  9335. });
  9336. // `Array.from` method
  9337. // https://tc39.es/ecma262/#sec-array.from
  9338. $({ target: 'Array', stat: true, forced: INCORRECT_ITERATION }, {
  9339. from: from
  9340. });
  9341. /***/ }),
  9342. /***/ "./node_modules/core-js/modules/es.array.includes.js":
  9343. /*!***********************************************************!*\
  9344. !*** ./node_modules/core-js/modules/es.array.includes.js ***!
  9345. \***********************************************************/
  9346. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  9347. "use strict";
  9348. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  9349. var $includes = __webpack_require__(/*! ../internals/array-includes */ "./node_modules/core-js/internals/array-includes.js").includes;
  9350. var addToUnscopables = __webpack_require__(/*! ../internals/add-to-unscopables */ "./node_modules/core-js/internals/add-to-unscopables.js");
  9351. // `Array.prototype.includes` method
  9352. // https://tc39.es/ecma262/#sec-array.prototype.includes
  9353. $({ target: 'Array', proto: true }, {
  9354. includes: function includes(el /* , fromIndex = 0 */) {
  9355. return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
  9356. }
  9357. });
  9358. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  9359. addToUnscopables('includes');
  9360. /***/ }),
  9361. /***/ "./node_modules/core-js/modules/es.array.iterator.js":
  9362. /*!***********************************************************!*\
  9363. !*** ./node_modules/core-js/modules/es.array.iterator.js ***!
  9364. \***********************************************************/
  9365. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  9366. "use strict";
  9367. var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/core-js/internals/to-indexed-object.js");
  9368. var addToUnscopables = __webpack_require__(/*! ../internals/add-to-unscopables */ "./node_modules/core-js/internals/add-to-unscopables.js");
  9369. var Iterators = __webpack_require__(/*! ../internals/iterators */ "./node_modules/core-js/internals/iterators.js");
  9370. var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "./node_modules/core-js/internals/internal-state.js");
  9371. var defineIterator = __webpack_require__(/*! ../internals/define-iterator */ "./node_modules/core-js/internals/define-iterator.js");
  9372. var ARRAY_ITERATOR = 'Array Iterator';
  9373. var setInternalState = InternalStateModule.set;
  9374. var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);
  9375. // `Array.prototype.entries` method
  9376. // https://tc39.es/ecma262/#sec-array.prototype.entries
  9377. // `Array.prototype.keys` method
  9378. // https://tc39.es/ecma262/#sec-array.prototype.keys
  9379. // `Array.prototype.values` method
  9380. // https://tc39.es/ecma262/#sec-array.prototype.values
  9381. // `Array.prototype[@@iterator]` method
  9382. // https://tc39.es/ecma262/#sec-array.prototype-@@iterator
  9383. // `CreateArrayIterator` internal method
  9384. // https://tc39.es/ecma262/#sec-createarrayiterator
  9385. module.exports = defineIterator(Array, 'Array', function (iterated, kind) {
  9386. setInternalState(this, {
  9387. type: ARRAY_ITERATOR,
  9388. target: toIndexedObject(iterated), // target
  9389. index: 0, // next index
  9390. kind: kind // kind
  9391. });
  9392. // `%ArrayIteratorPrototype%.next` method
  9393. // https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
  9394. }, function () {
  9395. var state = getInternalState(this);
  9396. var target = state.target;
  9397. var kind = state.kind;
  9398. var index = state.index++;
  9399. if (!target || index >= target.length) {
  9400. state.target = undefined;
  9401. return { value: undefined, done: true };
  9402. }
  9403. if (kind == 'keys') return { value: index, done: false };
  9404. if (kind == 'values') return { value: target[index], done: false };
  9405. return { value: [index, target[index]], done: false };
  9406. }, 'values');
  9407. // argumentsList[@@iterator] is %ArrayProto_values%
  9408. // https://tc39.es/ecma262/#sec-createunmappedargumentsobject
  9409. // https://tc39.es/ecma262/#sec-createmappedargumentsobject
  9410. Iterators.Arguments = Iterators.Array;
  9411. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  9412. addToUnscopables('keys');
  9413. addToUnscopables('values');
  9414. addToUnscopables('entries');
  9415. /***/ }),
  9416. /***/ "./node_modules/core-js/modules/es.array.map.js":
  9417. /*!******************************************************!*\
  9418. !*** ./node_modules/core-js/modules/es.array.map.js ***!
  9419. \******************************************************/
  9420. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  9421. "use strict";
  9422. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  9423. var $map = __webpack_require__(/*! ../internals/array-iteration */ "./node_modules/core-js/internals/array-iteration.js").map;
  9424. var arrayMethodHasSpeciesSupport = __webpack_require__(/*! ../internals/array-method-has-species-support */ "./node_modules/core-js/internals/array-method-has-species-support.js");
  9425. var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map');
  9426. // `Array.prototype.map` method
  9427. // https://tc39.es/ecma262/#sec-array.prototype.map
  9428. // with adding support of @@species
  9429. $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  9430. map: function map(callbackfn /* , thisArg */) {
  9431. return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  9432. }
  9433. });
  9434. /***/ }),
  9435. /***/ "./node_modules/core-js/modules/es.array.reduce.js":
  9436. /*!*********************************************************!*\
  9437. !*** ./node_modules/core-js/modules/es.array.reduce.js ***!
  9438. \*********************************************************/
  9439. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  9440. "use strict";
  9441. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  9442. var $reduce = __webpack_require__(/*! ../internals/array-reduce */ "./node_modules/core-js/internals/array-reduce.js").left;
  9443. var arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ "./node_modules/core-js/internals/array-method-is-strict.js");
  9444. var CHROME_VERSION = __webpack_require__(/*! ../internals/engine-v8-version */ "./node_modules/core-js/internals/engine-v8-version.js");
  9445. var IS_NODE = __webpack_require__(/*! ../internals/engine-is-node */ "./node_modules/core-js/internals/engine-is-node.js");
  9446. var STRICT_METHOD = arrayMethodIsStrict('reduce');
  9447. // Chrome 80-82 has a critical bug
  9448. // https://bugs.chromium.org/p/chromium/issues/detail?id=1049982
  9449. var CHROME_BUG = !IS_NODE && CHROME_VERSION > 79 && CHROME_VERSION < 83;
  9450. // `Array.prototype.reduce` method
  9451. // https://tc39.es/ecma262/#sec-array.prototype.reduce
  9452. $({ target: 'Array', proto: true, forced: !STRICT_METHOD || CHROME_BUG }, {
  9453. reduce: function reduce(callbackfn /* , initialValue */) {
  9454. return $reduce(this, callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);
  9455. }
  9456. });
  9457. /***/ }),
  9458. /***/ "./node_modules/core-js/modules/es.array.reverse.js":
  9459. /*!**********************************************************!*\
  9460. !*** ./node_modules/core-js/modules/es.array.reverse.js ***!
  9461. \**********************************************************/
  9462. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  9463. "use strict";
  9464. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  9465. var isArray = __webpack_require__(/*! ../internals/is-array */ "./node_modules/core-js/internals/is-array.js");
  9466. var nativeReverse = [].reverse;
  9467. var test = [1, 2];
  9468. // `Array.prototype.reverse` method
  9469. // https://tc39.es/ecma262/#sec-array.prototype.reverse
  9470. // fix for Safari 12.0 bug
  9471. // https://bugs.webkit.org/show_bug.cgi?id=188794
  9472. $({ target: 'Array', proto: true, forced: String(test) === String(test.reverse()) }, {
  9473. reverse: function reverse() {
  9474. // eslint-disable-next-line no-self-assign -- dirty hack
  9475. if (isArray(this)) this.length = this.length;
  9476. return nativeReverse.call(this);
  9477. }
  9478. });
  9479. /***/ }),
  9480. /***/ "./node_modules/core-js/modules/es.array.slice.js":
  9481. /*!********************************************************!*\
  9482. !*** ./node_modules/core-js/modules/es.array.slice.js ***!
  9483. \********************************************************/
  9484. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  9485. "use strict";
  9486. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  9487. var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
  9488. var isArray = __webpack_require__(/*! ../internals/is-array */ "./node_modules/core-js/internals/is-array.js");
  9489. var toAbsoluteIndex = __webpack_require__(/*! ../internals/to-absolute-index */ "./node_modules/core-js/internals/to-absolute-index.js");
  9490. var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js");
  9491. var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/core-js/internals/to-indexed-object.js");
  9492. var createProperty = __webpack_require__(/*! ../internals/create-property */ "./node_modules/core-js/internals/create-property.js");
  9493. var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
  9494. var arrayMethodHasSpeciesSupport = __webpack_require__(/*! ../internals/array-method-has-species-support */ "./node_modules/core-js/internals/array-method-has-species-support.js");
  9495. var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice');
  9496. var SPECIES = wellKnownSymbol('species');
  9497. var nativeSlice = [].slice;
  9498. var max = Math.max;
  9499. // `Array.prototype.slice` method
  9500. // https://tc39.es/ecma262/#sec-array.prototype.slice
  9501. // fallback for not array-like ES3 strings and DOM objects
  9502. $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  9503. slice: function slice(start, end) {
  9504. var O = toIndexedObject(this);
  9505. var length = toLength(O.length);
  9506. var k = toAbsoluteIndex(start, length);
  9507. var fin = toAbsoluteIndex(end === undefined ? length : end, length);
  9508. // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible
  9509. var Constructor, result, n;
  9510. if (isArray(O)) {
  9511. Constructor = O.constructor;
  9512. // cross-realm fallback
  9513. if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) {
  9514. Constructor = undefined;
  9515. } else if (isObject(Constructor)) {
  9516. Constructor = Constructor[SPECIES];
  9517. if (Constructor === null) Constructor = undefined;
  9518. }
  9519. if (Constructor === Array || Constructor === undefined) {
  9520. return nativeSlice.call(O, k, fin);
  9521. }
  9522. }
  9523. result = new (Constructor === undefined ? Array : Constructor)(max(fin - k, 0));
  9524. for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);
  9525. result.length = n;
  9526. return result;
  9527. }
  9528. });
  9529. /***/ }),
  9530. /***/ "./node_modules/core-js/modules/es.array.some.js":
  9531. /*!*******************************************************!*\
  9532. !*** ./node_modules/core-js/modules/es.array.some.js ***!
  9533. \*******************************************************/
  9534. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  9535. "use strict";
  9536. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  9537. var $some = __webpack_require__(/*! ../internals/array-iteration */ "./node_modules/core-js/internals/array-iteration.js").some;
  9538. var arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ "./node_modules/core-js/internals/array-method-is-strict.js");
  9539. var STRICT_METHOD = arrayMethodIsStrict('some');
  9540. // `Array.prototype.some` method
  9541. // https://tc39.es/ecma262/#sec-array.prototype.some
  9542. $({ target: 'Array', proto: true, forced: !STRICT_METHOD }, {
  9543. some: function some(callbackfn /* , thisArg */) {
  9544. return $some(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  9545. }
  9546. });
  9547. /***/ }),
  9548. /***/ "./node_modules/core-js/modules/es.map.js":
  9549. /*!************************************************!*\
  9550. !*** ./node_modules/core-js/modules/es.map.js ***!
  9551. \************************************************/
  9552. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  9553. "use strict";
  9554. var collection = __webpack_require__(/*! ../internals/collection */ "./node_modules/core-js/internals/collection.js");
  9555. var collectionStrong = __webpack_require__(/*! ../internals/collection-strong */ "./node_modules/core-js/internals/collection-strong.js");
  9556. // `Map` constructor
  9557. // https://tc39.es/ecma262/#sec-map-objects
  9558. module.exports = collection('Map', function (init) {
  9559. return function Map() { return init(this, arguments.length ? arguments[0] : undefined); };
  9560. }, collectionStrong);
  9561. /***/ }),
  9562. /***/ "./node_modules/core-js/modules/es.number.constructor.js":
  9563. /*!***************************************************************!*\
  9564. !*** ./node_modules/core-js/modules/es.number.constructor.js ***!
  9565. \***************************************************************/
  9566. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  9567. "use strict";
  9568. var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
  9569. var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
  9570. var isForced = __webpack_require__(/*! ../internals/is-forced */ "./node_modules/core-js/internals/is-forced.js");
  9571. var redefine = __webpack_require__(/*! ../internals/redefine */ "./node_modules/core-js/internals/redefine.js");
  9572. var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js");
  9573. var classof = __webpack_require__(/*! ../internals/classof-raw */ "./node_modules/core-js/internals/classof-raw.js");
  9574. var inheritIfRequired = __webpack_require__(/*! ../internals/inherit-if-required */ "./node_modules/core-js/internals/inherit-if-required.js");
  9575. var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ "./node_modules/core-js/internals/to-primitive.js");
  9576. var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
  9577. var create = __webpack_require__(/*! ../internals/object-create */ "./node_modules/core-js/internals/object-create.js");
  9578. var getOwnPropertyNames = __webpack_require__(/*! ../internals/object-get-own-property-names */ "./node_modules/core-js/internals/object-get-own-property-names.js").f;
  9579. var getOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "./node_modules/core-js/internals/object-get-own-property-descriptor.js").f;
  9580. var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js").f;
  9581. var trim = __webpack_require__(/*! ../internals/string-trim */ "./node_modules/core-js/internals/string-trim.js").trim;
  9582. var NUMBER = 'Number';
  9583. var NativeNumber = global[NUMBER];
  9584. var NumberPrototype = NativeNumber.prototype;
  9585. // Opera ~12 has broken Object#toString
  9586. var BROKEN_CLASSOF = classof(create(NumberPrototype)) == NUMBER;
  9587. // `ToNumber` abstract operation
  9588. // https://tc39.es/ecma262/#sec-tonumber
  9589. var toNumber = function (argument) {
  9590. var it = toPrimitive(argument, false);
  9591. var first, third, radix, maxCode, digits, length, index, code;
  9592. if (typeof it == 'string' && it.length > 2) {
  9593. it = trim(it);
  9594. first = it.charCodeAt(0);
  9595. if (first === 43 || first === 45) {
  9596. third = it.charCodeAt(2);
  9597. if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix
  9598. } else if (first === 48) {
  9599. switch (it.charCodeAt(1)) {
  9600. case 66: case 98: radix = 2; maxCode = 49; break; // fast equal of /^0b[01]+$/i
  9601. case 79: case 111: radix = 8; maxCode = 55; break; // fast equal of /^0o[0-7]+$/i
  9602. default: return +it;
  9603. }
  9604. digits = it.slice(2);
  9605. length = digits.length;
  9606. for (index = 0; index < length; index++) {
  9607. code = digits.charCodeAt(index);
  9608. // parseInt parses a string to a first unavailable symbol
  9609. // but ToNumber should return NaN if a string contains unavailable symbols
  9610. if (code < 48 || code > maxCode) return NaN;
  9611. } return parseInt(digits, radix);
  9612. }
  9613. } return +it;
  9614. };
  9615. // `Number` constructor
  9616. // https://tc39.es/ecma262/#sec-number-constructor
  9617. if (isForced(NUMBER, !NativeNumber(' 0o1') || !NativeNumber('0b1') || NativeNumber('+0x1'))) {
  9618. var NumberWrapper = function Number(value) {
  9619. var it = arguments.length < 1 ? 0 : value;
  9620. var dummy = this;
  9621. return dummy instanceof NumberWrapper
  9622. // check on 1..constructor(foo) case
  9623. && (BROKEN_CLASSOF ? fails(function () { NumberPrototype.valueOf.call(dummy); }) : classof(dummy) != NUMBER)
  9624. ? inheritIfRequired(new NativeNumber(toNumber(it)), dummy, NumberWrapper) : toNumber(it);
  9625. };
  9626. for (var keys = DESCRIPTORS ? getOwnPropertyNames(NativeNumber) : (
  9627. // ES3:
  9628. 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +
  9629. // ES2015 (in case, if modules with ES2015 Number statics required before):
  9630. 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +
  9631. 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,' +
  9632. // ESNext
  9633. 'fromString,range'
  9634. ).split(','), j = 0, key; keys.length > j; j++) {
  9635. if (has(NativeNumber, key = keys[j]) && !has(NumberWrapper, key)) {
  9636. defineProperty(NumberWrapper, key, getOwnPropertyDescriptor(NativeNumber, key));
  9637. }
  9638. }
  9639. NumberWrapper.prototype = NumberPrototype;
  9640. NumberPrototype.constructor = NumberWrapper;
  9641. redefine(global, NUMBER, NumberWrapper);
  9642. }
  9643. /***/ }),
  9644. /***/ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js":
  9645. /*!*******************************************************************************!*\
  9646. !*** ./node_modules/core-js/modules/es.object.get-own-property-descriptor.js ***!
  9647. \*******************************************************************************/
  9648. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  9649. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  9650. var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
  9651. var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/core-js/internals/to-indexed-object.js");
  9652. var nativeGetOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "./node_modules/core-js/internals/object-get-own-property-descriptor.js").f;
  9653. var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
  9654. var FAILS_ON_PRIMITIVES = fails(function () { nativeGetOwnPropertyDescriptor(1); });
  9655. var FORCED = !DESCRIPTORS || FAILS_ON_PRIMITIVES;
  9656. // `Object.getOwnPropertyDescriptor` method
  9657. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
  9658. $({ target: 'Object', stat: true, forced: FORCED, sham: !DESCRIPTORS }, {
  9659. getOwnPropertyDescriptor: function getOwnPropertyDescriptor(it, key) {
  9660. return nativeGetOwnPropertyDescriptor(toIndexedObject(it), key);
  9661. }
  9662. });
  9663. /***/ }),
  9664. /***/ "./node_modules/core-js/modules/es.object.get-own-property-descriptors.js":
  9665. /*!********************************************************************************!*\
  9666. !*** ./node_modules/core-js/modules/es.object.get-own-property-descriptors.js ***!
  9667. \********************************************************************************/
  9668. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  9669. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  9670. var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
  9671. var ownKeys = __webpack_require__(/*! ../internals/own-keys */ "./node_modules/core-js/internals/own-keys.js");
  9672. var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/core-js/internals/to-indexed-object.js");
  9673. var getOwnPropertyDescriptorModule = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "./node_modules/core-js/internals/object-get-own-property-descriptor.js");
  9674. var createProperty = __webpack_require__(/*! ../internals/create-property */ "./node_modules/core-js/internals/create-property.js");
  9675. // `Object.getOwnPropertyDescriptors` method
  9676. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptors
  9677. $({ target: 'Object', stat: true, sham: !DESCRIPTORS }, {
  9678. getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) {
  9679. var O = toIndexedObject(object);
  9680. var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
  9681. var keys = ownKeys(O);
  9682. var result = {};
  9683. var index = 0;
  9684. var key, descriptor;
  9685. while (keys.length > index) {
  9686. descriptor = getOwnPropertyDescriptor(O, key = keys[index++]);
  9687. if (descriptor !== undefined) createProperty(result, key, descriptor);
  9688. }
  9689. return result;
  9690. }
  9691. });
  9692. /***/ }),
  9693. /***/ "./node_modules/core-js/modules/es.object.keys.js":
  9694. /*!********************************************************!*\
  9695. !*** ./node_modules/core-js/modules/es.object.keys.js ***!
  9696. \********************************************************/
  9697. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  9698. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  9699. var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js");
  9700. var nativeKeys = __webpack_require__(/*! ../internals/object-keys */ "./node_modules/core-js/internals/object-keys.js");
  9701. var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
  9702. var FAILS_ON_PRIMITIVES = fails(function () { nativeKeys(1); });
  9703. // `Object.keys` method
  9704. // https://tc39.es/ecma262/#sec-object.keys
  9705. $({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
  9706. keys: function keys(it) {
  9707. return nativeKeys(toObject(it));
  9708. }
  9709. });
  9710. /***/ }),
  9711. /***/ "./node_modules/core-js/modules/es.promise.js":
  9712. /*!****************************************************!*\
  9713. !*** ./node_modules/core-js/modules/es.promise.js ***!
  9714. \****************************************************/
  9715. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  9716. "use strict";
  9717. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  9718. var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "./node_modules/core-js/internals/is-pure.js");
  9719. var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
  9720. var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "./node_modules/core-js/internals/get-built-in.js");
  9721. var NativePromise = __webpack_require__(/*! ../internals/native-promise-constructor */ "./node_modules/core-js/internals/native-promise-constructor.js");
  9722. var redefine = __webpack_require__(/*! ../internals/redefine */ "./node_modules/core-js/internals/redefine.js");
  9723. var redefineAll = __webpack_require__(/*! ../internals/redefine-all */ "./node_modules/core-js/internals/redefine-all.js");
  9724. var setPrototypeOf = __webpack_require__(/*! ../internals/object-set-prototype-of */ "./node_modules/core-js/internals/object-set-prototype-of.js");
  9725. var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ "./node_modules/core-js/internals/set-to-string-tag.js");
  9726. var setSpecies = __webpack_require__(/*! ../internals/set-species */ "./node_modules/core-js/internals/set-species.js");
  9727. var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
  9728. var aFunction = __webpack_require__(/*! ../internals/a-function */ "./node_modules/core-js/internals/a-function.js");
  9729. var anInstance = __webpack_require__(/*! ../internals/an-instance */ "./node_modules/core-js/internals/an-instance.js");
  9730. var inspectSource = __webpack_require__(/*! ../internals/inspect-source */ "./node_modules/core-js/internals/inspect-source.js");
  9731. var iterate = __webpack_require__(/*! ../internals/iterate */ "./node_modules/core-js/internals/iterate.js");
  9732. var checkCorrectnessOfIteration = __webpack_require__(/*! ../internals/check-correctness-of-iteration */ "./node_modules/core-js/internals/check-correctness-of-iteration.js");
  9733. var speciesConstructor = __webpack_require__(/*! ../internals/species-constructor */ "./node_modules/core-js/internals/species-constructor.js");
  9734. var task = __webpack_require__(/*! ../internals/task */ "./node_modules/core-js/internals/task.js").set;
  9735. var microtask = __webpack_require__(/*! ../internals/microtask */ "./node_modules/core-js/internals/microtask.js");
  9736. var promiseResolve = __webpack_require__(/*! ../internals/promise-resolve */ "./node_modules/core-js/internals/promise-resolve.js");
  9737. var hostReportErrors = __webpack_require__(/*! ../internals/host-report-errors */ "./node_modules/core-js/internals/host-report-errors.js");
  9738. var newPromiseCapabilityModule = __webpack_require__(/*! ../internals/new-promise-capability */ "./node_modules/core-js/internals/new-promise-capability.js");
  9739. var perform = __webpack_require__(/*! ../internals/perform */ "./node_modules/core-js/internals/perform.js");
  9740. var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "./node_modules/core-js/internals/internal-state.js");
  9741. var isForced = __webpack_require__(/*! ../internals/is-forced */ "./node_modules/core-js/internals/is-forced.js");
  9742. var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
  9743. var IS_BROWSER = __webpack_require__(/*! ../internals/engine-is-browser */ "./node_modules/core-js/internals/engine-is-browser.js");
  9744. var IS_NODE = __webpack_require__(/*! ../internals/engine-is-node */ "./node_modules/core-js/internals/engine-is-node.js");
  9745. var V8_VERSION = __webpack_require__(/*! ../internals/engine-v8-version */ "./node_modules/core-js/internals/engine-v8-version.js");
  9746. var SPECIES = wellKnownSymbol('species');
  9747. var PROMISE = 'Promise';
  9748. var getInternalState = InternalStateModule.get;
  9749. var setInternalState = InternalStateModule.set;
  9750. var getInternalPromiseState = InternalStateModule.getterFor(PROMISE);
  9751. var NativePromisePrototype = NativePromise && NativePromise.prototype;
  9752. var PromiseConstructor = NativePromise;
  9753. var PromiseConstructorPrototype = NativePromisePrototype;
  9754. var TypeError = global.TypeError;
  9755. var document = global.document;
  9756. var process = global.process;
  9757. var newPromiseCapability = newPromiseCapabilityModule.f;
  9758. var newGenericPromiseCapability = newPromiseCapability;
  9759. var DISPATCH_EVENT = !!(document && document.createEvent && global.dispatchEvent);
  9760. var NATIVE_REJECTION_EVENT = typeof PromiseRejectionEvent == 'function';
  9761. var UNHANDLED_REJECTION = 'unhandledrejection';
  9762. var REJECTION_HANDLED = 'rejectionhandled';
  9763. var PENDING = 0;
  9764. var FULFILLED = 1;
  9765. var REJECTED = 2;
  9766. var HANDLED = 1;
  9767. var UNHANDLED = 2;
  9768. var SUBCLASSING = false;
  9769. var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
  9770. var FORCED = isForced(PROMISE, function () {
  9771. var GLOBAL_CORE_JS_PROMISE = inspectSource(PromiseConstructor) !== String(PromiseConstructor);
  9772. // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
  9773. // https://bugs.chromium.org/p/chromium/issues/detail?id=830565
  9774. // We can't detect it synchronously, so just check versions
  9775. if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) return true;
  9776. // We need Promise#finally in the pure version for preventing prototype pollution
  9777. if (IS_PURE && !PromiseConstructorPrototype['finally']) return true;
  9778. // We can't use @@species feature detection in V8 since it causes
  9779. // deoptimization and performance degradation
  9780. // https://github.com/zloirock/core-js/issues/679
  9781. if (V8_VERSION >= 51 && /native code/.test(PromiseConstructor)) return false;
  9782. // Detect correctness of subclassing with @@species support
  9783. var promise = new PromiseConstructor(function (resolve) { resolve(1); });
  9784. var FakePromise = function (exec) {
  9785. exec(function () { /* empty */ }, function () { /* empty */ });
  9786. };
  9787. var constructor = promise.constructor = {};
  9788. constructor[SPECIES] = FakePromise;
  9789. SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;
  9790. if (!SUBCLASSING) return true;
  9791. // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
  9792. return !GLOBAL_CORE_JS_PROMISE && IS_BROWSER && !NATIVE_REJECTION_EVENT;
  9793. });
  9794. var INCORRECT_ITERATION = FORCED || !checkCorrectnessOfIteration(function (iterable) {
  9795. PromiseConstructor.all(iterable)['catch'](function () { /* empty */ });
  9796. });
  9797. // helpers
  9798. var isThenable = function (it) {
  9799. var then;
  9800. return isObject(it) && typeof (then = it.then) == 'function' ? then : false;
  9801. };
  9802. var notify = function (state, isReject) {
  9803. if (state.notified) return;
  9804. state.notified = true;
  9805. var chain = state.reactions;
  9806. microtask(function () {
  9807. var value = state.value;
  9808. var ok = state.state == FULFILLED;
  9809. var index = 0;
  9810. // variable length - can't use forEach
  9811. while (chain.length > index) {
  9812. var reaction = chain[index++];
  9813. var handler = ok ? reaction.ok : reaction.fail;
  9814. var resolve = reaction.resolve;
  9815. var reject = reaction.reject;
  9816. var domain = reaction.domain;
  9817. var result, then, exited;
  9818. try {
  9819. if (handler) {
  9820. if (!ok) {
  9821. if (state.rejection === UNHANDLED) onHandleUnhandled(state);
  9822. state.rejection = HANDLED;
  9823. }
  9824. if (handler === true) result = value;
  9825. else {
  9826. if (domain) domain.enter();
  9827. result = handler(value); // can throw
  9828. if (domain) {
  9829. domain.exit();
  9830. exited = true;
  9831. }
  9832. }
  9833. if (result === reaction.promise) {
  9834. reject(TypeError('Promise-chain cycle'));
  9835. } else if (then = isThenable(result)) {
  9836. then.call(result, resolve, reject);
  9837. } else resolve(result);
  9838. } else reject(value);
  9839. } catch (error) {
  9840. if (domain && !exited) domain.exit();
  9841. reject(error);
  9842. }
  9843. }
  9844. state.reactions = [];
  9845. state.notified = false;
  9846. if (isReject && !state.rejection) onUnhandled(state);
  9847. });
  9848. };
  9849. var dispatchEvent = function (name, promise, reason) {
  9850. var event, handler;
  9851. if (DISPATCH_EVENT) {
  9852. event = document.createEvent('Event');
  9853. event.promise = promise;
  9854. event.reason = reason;
  9855. event.initEvent(name, false, true);
  9856. global.dispatchEvent(event);
  9857. } else event = { promise: promise, reason: reason };
  9858. if (!NATIVE_REJECTION_EVENT && (handler = global['on' + name])) handler(event);
  9859. else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
  9860. };
  9861. var onUnhandled = function (state) {
  9862. task.call(global, function () {
  9863. var promise = state.facade;
  9864. var value = state.value;
  9865. var IS_UNHANDLED = isUnhandled(state);
  9866. var result;
  9867. if (IS_UNHANDLED) {
  9868. result = perform(function () {
  9869. if (IS_NODE) {
  9870. process.emit('unhandledRejection', value, promise);
  9871. } else dispatchEvent(UNHANDLED_REJECTION, promise, value);
  9872. });
  9873. // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
  9874. state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;
  9875. if (result.error) throw result.value;
  9876. }
  9877. });
  9878. };
  9879. var isUnhandled = function (state) {
  9880. return state.rejection !== HANDLED && !state.parent;
  9881. };
  9882. var onHandleUnhandled = function (state) {
  9883. task.call(global, function () {
  9884. var promise = state.facade;
  9885. if (IS_NODE) {
  9886. process.emit('rejectionHandled', promise);
  9887. } else dispatchEvent(REJECTION_HANDLED, promise, state.value);
  9888. });
  9889. };
  9890. var bind = function (fn, state, unwrap) {
  9891. return function (value) {
  9892. fn(state, value, unwrap);
  9893. };
  9894. };
  9895. var internalReject = function (state, value, unwrap) {
  9896. if (state.done) return;
  9897. state.done = true;
  9898. if (unwrap) state = unwrap;
  9899. state.value = value;
  9900. state.state = REJECTED;
  9901. notify(state, true);
  9902. };
  9903. var internalResolve = function (state, value, unwrap) {
  9904. if (state.done) return;
  9905. state.done = true;
  9906. if (unwrap) state = unwrap;
  9907. try {
  9908. if (state.facade === value) throw TypeError("Promise can't be resolved itself");
  9909. var then = isThenable(value);
  9910. if (then) {
  9911. microtask(function () {
  9912. var wrapper = { done: false };
  9913. try {
  9914. then.call(value,
  9915. bind(internalResolve, wrapper, state),
  9916. bind(internalReject, wrapper, state)
  9917. );
  9918. } catch (error) {
  9919. internalReject(wrapper, error, state);
  9920. }
  9921. });
  9922. } else {
  9923. state.value = value;
  9924. state.state = FULFILLED;
  9925. notify(state, false);
  9926. }
  9927. } catch (error) {
  9928. internalReject({ done: false }, error, state);
  9929. }
  9930. };
  9931. // constructor polyfill
  9932. if (FORCED) {
  9933. // 25.4.3.1 Promise(executor)
  9934. PromiseConstructor = function Promise(executor) {
  9935. anInstance(this, PromiseConstructor, PROMISE);
  9936. aFunction(executor);
  9937. Internal.call(this);
  9938. var state = getInternalState(this);
  9939. try {
  9940. executor(bind(internalResolve, state), bind(internalReject, state));
  9941. } catch (error) {
  9942. internalReject(state, error);
  9943. }
  9944. };
  9945. PromiseConstructorPrototype = PromiseConstructor.prototype;
  9946. // eslint-disable-next-line no-unused-vars -- required for `.length`
  9947. Internal = function Promise(executor) {
  9948. setInternalState(this, {
  9949. type: PROMISE,
  9950. done: false,
  9951. notified: false,
  9952. parent: false,
  9953. reactions: [],
  9954. rejection: false,
  9955. state: PENDING,
  9956. value: undefined
  9957. });
  9958. };
  9959. Internal.prototype = redefineAll(PromiseConstructorPrototype, {
  9960. // `Promise.prototype.then` method
  9961. // https://tc39.es/ecma262/#sec-promise.prototype.then
  9962. then: function then(onFulfilled, onRejected) {
  9963. var state = getInternalPromiseState(this);
  9964. var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor));
  9965. reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;
  9966. reaction.fail = typeof onRejected == 'function' && onRejected;
  9967. reaction.domain = IS_NODE ? process.domain : undefined;
  9968. state.parent = true;
  9969. state.reactions.push(reaction);
  9970. if (state.state != PENDING) notify(state, false);
  9971. return reaction.promise;
  9972. },
  9973. // `Promise.prototype.catch` method
  9974. // https://tc39.es/ecma262/#sec-promise.prototype.catch
  9975. 'catch': function (onRejected) {
  9976. return this.then(undefined, onRejected);
  9977. }
  9978. });
  9979. OwnPromiseCapability = function () {
  9980. var promise = new Internal();
  9981. var state = getInternalState(promise);
  9982. this.promise = promise;
  9983. this.resolve = bind(internalResolve, state);
  9984. this.reject = bind(internalReject, state);
  9985. };
  9986. newPromiseCapabilityModule.f = newPromiseCapability = function (C) {
  9987. return C === PromiseConstructor || C === PromiseWrapper
  9988. ? new OwnPromiseCapability(C)
  9989. : newGenericPromiseCapability(C);
  9990. };
  9991. if (!IS_PURE && typeof NativePromise == 'function' && NativePromisePrototype !== Object.prototype) {
  9992. nativeThen = NativePromisePrototype.then;
  9993. if (!SUBCLASSING) {
  9994. // make `Promise#then` return a polyfilled `Promise` for native promise-based APIs
  9995. redefine(NativePromisePrototype, 'then', function then(onFulfilled, onRejected) {
  9996. var that = this;
  9997. return new PromiseConstructor(function (resolve, reject) {
  9998. nativeThen.call(that, resolve, reject);
  9999. }).then(onFulfilled, onRejected);
  10000. // https://github.com/zloirock/core-js/issues/640
  10001. }, { unsafe: true });
  10002. // makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`
  10003. redefine(NativePromisePrototype, 'catch', PromiseConstructorPrototype['catch'], { unsafe: true });
  10004. }
  10005. // make `.constructor === Promise` work for native promise-based APIs
  10006. try {
  10007. delete NativePromisePrototype.constructor;
  10008. } catch (error) { /* empty */ }
  10009. // make `instanceof Promise` work for native promise-based APIs
  10010. if (setPrototypeOf) {
  10011. setPrototypeOf(NativePromisePrototype, PromiseConstructorPrototype);
  10012. }
  10013. }
  10014. }
  10015. $({ global: true, wrap: true, forced: FORCED }, {
  10016. Promise: PromiseConstructor
  10017. });
  10018. setToStringTag(PromiseConstructor, PROMISE, false, true);
  10019. setSpecies(PROMISE);
  10020. PromiseWrapper = getBuiltIn(PROMISE);
  10021. // statics
  10022. $({ target: PROMISE, stat: true, forced: FORCED }, {
  10023. // `Promise.reject` method
  10024. // https://tc39.es/ecma262/#sec-promise.reject
  10025. reject: function reject(r) {
  10026. var capability = newPromiseCapability(this);
  10027. capability.reject.call(undefined, r);
  10028. return capability.promise;
  10029. }
  10030. });
  10031. $({ target: PROMISE, stat: true, forced: IS_PURE || FORCED }, {
  10032. // `Promise.resolve` method
  10033. // https://tc39.es/ecma262/#sec-promise.resolve
  10034. resolve: function resolve(x) {
  10035. return promiseResolve(IS_PURE && this === PromiseWrapper ? PromiseConstructor : this, x);
  10036. }
  10037. });
  10038. $({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {
  10039. // `Promise.all` method
  10040. // https://tc39.es/ecma262/#sec-promise.all
  10041. all: function all(iterable) {
  10042. var C = this;
  10043. var capability = newPromiseCapability(C);
  10044. var resolve = capability.resolve;
  10045. var reject = capability.reject;
  10046. var result = perform(function () {
  10047. var $promiseResolve = aFunction(C.resolve);
  10048. var values = [];
  10049. var counter = 0;
  10050. var remaining = 1;
  10051. iterate(iterable, function (promise) {
  10052. var index = counter++;
  10053. var alreadyCalled = false;
  10054. values.push(undefined);
  10055. remaining++;
  10056. $promiseResolve.call(C, promise).then(function (value) {
  10057. if (alreadyCalled) return;
  10058. alreadyCalled = true;
  10059. values[index] = value;
  10060. --remaining || resolve(values);
  10061. }, reject);
  10062. });
  10063. --remaining || resolve(values);
  10064. });
  10065. if (result.error) reject(result.value);
  10066. return capability.promise;
  10067. },
  10068. // `Promise.race` method
  10069. // https://tc39.es/ecma262/#sec-promise.race
  10070. race: function race(iterable) {
  10071. var C = this;
  10072. var capability = newPromiseCapability(C);
  10073. var reject = capability.reject;
  10074. var result = perform(function () {
  10075. var $promiseResolve = aFunction(C.resolve);
  10076. iterate(iterable, function (promise) {
  10077. $promiseResolve.call(C, promise).then(capability.resolve, reject);
  10078. });
  10079. });
  10080. if (result.error) reject(result.value);
  10081. return capability.promise;
  10082. }
  10083. });
  10084. /***/ }),
  10085. /***/ "./node_modules/core-js/modules/es.reflect.apply.js":
  10086. /*!**********************************************************!*\
  10087. !*** ./node_modules/core-js/modules/es.reflect.apply.js ***!
  10088. \**********************************************************/
  10089. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  10090. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  10091. var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "./node_modules/core-js/internals/get-built-in.js");
  10092. var aFunction = __webpack_require__(/*! ../internals/a-function */ "./node_modules/core-js/internals/a-function.js");
  10093. var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
  10094. var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
  10095. var nativeApply = getBuiltIn('Reflect', 'apply');
  10096. var functionApply = Function.apply;
  10097. // MS Edge argumentsList argument is optional
  10098. var OPTIONAL_ARGUMENTS_LIST = !fails(function () {
  10099. nativeApply(function () { /* empty */ });
  10100. });
  10101. // `Reflect.apply` method
  10102. // https://tc39.es/ecma262/#sec-reflect.apply
  10103. $({ target: 'Reflect', stat: true, forced: OPTIONAL_ARGUMENTS_LIST }, {
  10104. apply: function apply(target, thisArgument, argumentsList) {
  10105. aFunction(target);
  10106. anObject(argumentsList);
  10107. return nativeApply
  10108. ? nativeApply(target, thisArgument, argumentsList)
  10109. : functionApply.call(target, thisArgument, argumentsList);
  10110. }
  10111. });
  10112. /***/ }),
  10113. /***/ "./node_modules/core-js/modules/es.reflect.construct.js":
  10114. /*!**************************************************************!*\
  10115. !*** ./node_modules/core-js/modules/es.reflect.construct.js ***!
  10116. \**************************************************************/
  10117. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  10118. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  10119. var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "./node_modules/core-js/internals/get-built-in.js");
  10120. var aFunction = __webpack_require__(/*! ../internals/a-function */ "./node_modules/core-js/internals/a-function.js");
  10121. var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
  10122. var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
  10123. var create = __webpack_require__(/*! ../internals/object-create */ "./node_modules/core-js/internals/object-create.js");
  10124. var bind = __webpack_require__(/*! ../internals/function-bind */ "./node_modules/core-js/internals/function-bind.js");
  10125. var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
  10126. var nativeConstruct = getBuiltIn('Reflect', 'construct');
  10127. // `Reflect.construct` method
  10128. // https://tc39.es/ecma262/#sec-reflect.construct
  10129. // MS Edge supports only 2 arguments and argumentsList argument is optional
  10130. // FF Nightly sets third argument as `new.target`, but does not create `this` from it
  10131. var NEW_TARGET_BUG = fails(function () {
  10132. function F() { /* empty */ }
  10133. return !(nativeConstruct(function () { /* empty */ }, [], F) instanceof F);
  10134. });
  10135. var ARGS_BUG = !fails(function () {
  10136. nativeConstruct(function () { /* empty */ });
  10137. });
  10138. var FORCED = NEW_TARGET_BUG || ARGS_BUG;
  10139. $({ target: 'Reflect', stat: true, forced: FORCED, sham: FORCED }, {
  10140. construct: function construct(Target, args /* , newTarget */) {
  10141. aFunction(Target);
  10142. anObject(args);
  10143. var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]);
  10144. if (ARGS_BUG && !NEW_TARGET_BUG) return nativeConstruct(Target, args, newTarget);
  10145. if (Target == newTarget) {
  10146. // w/o altered newTarget, optimization for 0-4 arguments
  10147. switch (args.length) {
  10148. case 0: return new Target();
  10149. case 1: return new Target(args[0]);
  10150. case 2: return new Target(args[0], args[1]);
  10151. case 3: return new Target(args[0], args[1], args[2]);
  10152. case 4: return new Target(args[0], args[1], args[2], args[3]);
  10153. }
  10154. // w/o altered newTarget, lot of arguments case
  10155. var $args = [null];
  10156. $args.push.apply($args, args);
  10157. return new (bind.apply(Target, $args))();
  10158. }
  10159. // with altered newTarget, not support built-in constructors
  10160. var proto = newTarget.prototype;
  10161. var instance = create(isObject(proto) ? proto : Object.prototype);
  10162. var result = Function.apply.call(Target, instance, args);
  10163. return isObject(result) ? result : instance;
  10164. }
  10165. });
  10166. /***/ }),
  10167. /***/ "./node_modules/core-js/modules/es.reflect.delete-property.js":
  10168. /*!********************************************************************!*\
  10169. !*** ./node_modules/core-js/modules/es.reflect.delete-property.js ***!
  10170. \********************************************************************/
  10171. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  10172. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  10173. var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
  10174. var getOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "./node_modules/core-js/internals/object-get-own-property-descriptor.js").f;
  10175. // `Reflect.deleteProperty` method
  10176. // https://tc39.es/ecma262/#sec-reflect.deleteproperty
  10177. $({ target: 'Reflect', stat: true }, {
  10178. deleteProperty: function deleteProperty(target, propertyKey) {
  10179. var descriptor = getOwnPropertyDescriptor(anObject(target), propertyKey);
  10180. return descriptor && !descriptor.configurable ? false : delete target[propertyKey];
  10181. }
  10182. });
  10183. /***/ }),
  10184. /***/ "./node_modules/core-js/modules/es.reflect.get-prototype-of.js":
  10185. /*!*********************************************************************!*\
  10186. !*** ./node_modules/core-js/modules/es.reflect.get-prototype-of.js ***!
  10187. \*********************************************************************/
  10188. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  10189. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  10190. var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
  10191. var objectGetPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ "./node_modules/core-js/internals/object-get-prototype-of.js");
  10192. var CORRECT_PROTOTYPE_GETTER = __webpack_require__(/*! ../internals/correct-prototype-getter */ "./node_modules/core-js/internals/correct-prototype-getter.js");
  10193. // `Reflect.getPrototypeOf` method
  10194. // https://tc39.es/ecma262/#sec-reflect.getprototypeof
  10195. $({ target: 'Reflect', stat: true, sham: !CORRECT_PROTOTYPE_GETTER }, {
  10196. getPrototypeOf: function getPrototypeOf(target) {
  10197. return objectGetPrototypeOf(anObject(target));
  10198. }
  10199. });
  10200. /***/ }),
  10201. /***/ "./node_modules/core-js/modules/es.string.includes.js":
  10202. /*!************************************************************!*\
  10203. !*** ./node_modules/core-js/modules/es.string.includes.js ***!
  10204. \************************************************************/
  10205. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  10206. "use strict";
  10207. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  10208. var notARegExp = __webpack_require__(/*! ../internals/not-a-regexp */ "./node_modules/core-js/internals/not-a-regexp.js");
  10209. var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "./node_modules/core-js/internals/require-object-coercible.js");
  10210. var correctIsRegExpLogic = __webpack_require__(/*! ../internals/correct-is-regexp-logic */ "./node_modules/core-js/internals/correct-is-regexp-logic.js");
  10211. // `String.prototype.includes` method
  10212. // https://tc39.es/ecma262/#sec-string.prototype.includes
  10213. $({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
  10214. includes: function includes(searchString /* , position = 0 */) {
  10215. return !!~String(requireObjectCoercible(this))
  10216. .indexOf(notARegExp(searchString), arguments.length > 1 ? arguments[1] : undefined);
  10217. }
  10218. });
  10219. /***/ }),
  10220. /***/ "./node_modules/core-js/modules/es.string.iterator.js":
  10221. /*!************************************************************!*\
  10222. !*** ./node_modules/core-js/modules/es.string.iterator.js ***!
  10223. \************************************************************/
  10224. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  10225. "use strict";
  10226. var charAt = __webpack_require__(/*! ../internals/string-multibyte */ "./node_modules/core-js/internals/string-multibyte.js").charAt;
  10227. var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "./node_modules/core-js/internals/internal-state.js");
  10228. var defineIterator = __webpack_require__(/*! ../internals/define-iterator */ "./node_modules/core-js/internals/define-iterator.js");
  10229. var STRING_ITERATOR = 'String Iterator';
  10230. var setInternalState = InternalStateModule.set;
  10231. var getInternalState = InternalStateModule.getterFor(STRING_ITERATOR);
  10232. // `String.prototype[@@iterator]` method
  10233. // https://tc39.es/ecma262/#sec-string.prototype-@@iterator
  10234. defineIterator(String, 'String', function (iterated) {
  10235. setInternalState(this, {
  10236. type: STRING_ITERATOR,
  10237. string: String(iterated),
  10238. index: 0
  10239. });
  10240. // `%StringIteratorPrototype%.next` method
  10241. // https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next
  10242. }, function next() {
  10243. var state = getInternalState(this);
  10244. var string = state.string;
  10245. var index = state.index;
  10246. var point;
  10247. if (index >= string.length) return { value: undefined, done: true };
  10248. point = charAt(string, index);
  10249. state.index += point.length;
  10250. return { value: point, done: false };
  10251. });
  10252. /***/ }),
  10253. /***/ "./node_modules/core-js/modules/es.string.match.js":
  10254. /*!*********************************************************!*\
  10255. !*** ./node_modules/core-js/modules/es.string.match.js ***!
  10256. \*********************************************************/
  10257. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  10258. "use strict";
  10259. var fixRegExpWellKnownSymbolLogic = __webpack_require__(/*! ../internals/fix-regexp-well-known-symbol-logic */ "./node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js");
  10260. var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
  10261. var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js");
  10262. var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "./node_modules/core-js/internals/require-object-coercible.js");
  10263. var advanceStringIndex = __webpack_require__(/*! ../internals/advance-string-index */ "./node_modules/core-js/internals/advance-string-index.js");
  10264. var regExpExec = __webpack_require__(/*! ../internals/regexp-exec-abstract */ "./node_modules/core-js/internals/regexp-exec-abstract.js");
  10265. // @@match logic
  10266. fixRegExpWellKnownSymbolLogic('match', 1, function (MATCH, nativeMatch, maybeCallNative) {
  10267. return [
  10268. // `String.prototype.match` method
  10269. // https://tc39.es/ecma262/#sec-string.prototype.match
  10270. function match(regexp) {
  10271. var O = requireObjectCoercible(this);
  10272. var matcher = regexp == undefined ? undefined : regexp[MATCH];
  10273. return matcher !== undefined ? matcher.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));
  10274. },
  10275. // `RegExp.prototype[@@match]` method
  10276. // https://tc39.es/ecma262/#sec-regexp.prototype-@@match
  10277. function (regexp) {
  10278. var res = maybeCallNative(nativeMatch, regexp, this);
  10279. if (res.done) return res.value;
  10280. var rx = anObject(regexp);
  10281. var S = String(this);
  10282. if (!rx.global) return regExpExec(rx, S);
  10283. var fullUnicode = rx.unicode;
  10284. rx.lastIndex = 0;
  10285. var A = [];
  10286. var n = 0;
  10287. var result;
  10288. while ((result = regExpExec(rx, S)) !== null) {
  10289. var matchStr = String(result[0]);
  10290. A[n] = matchStr;
  10291. if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
  10292. n++;
  10293. }
  10294. return n === 0 ? null : A;
  10295. }
  10296. ];
  10297. });
  10298. /***/ }),
  10299. /***/ "./node_modules/core-js/modules/es.string.starts-with.js":
  10300. /*!***************************************************************!*\
  10301. !*** ./node_modules/core-js/modules/es.string.starts-with.js ***!
  10302. \***************************************************************/
  10303. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  10304. "use strict";
  10305. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  10306. var getOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "./node_modules/core-js/internals/object-get-own-property-descriptor.js").f;
  10307. var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js");
  10308. var notARegExp = __webpack_require__(/*! ../internals/not-a-regexp */ "./node_modules/core-js/internals/not-a-regexp.js");
  10309. var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "./node_modules/core-js/internals/require-object-coercible.js");
  10310. var correctIsRegExpLogic = __webpack_require__(/*! ../internals/correct-is-regexp-logic */ "./node_modules/core-js/internals/correct-is-regexp-logic.js");
  10311. var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "./node_modules/core-js/internals/is-pure.js");
  10312. // eslint-disable-next-line es/no-string-prototype-startswith -- safe
  10313. var $startsWith = ''.startsWith;
  10314. var min = Math.min;
  10315. var CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('startsWith');
  10316. // https://github.com/zloirock/core-js/pull/702
  10317. var MDN_POLYFILL_BUG = !IS_PURE && !CORRECT_IS_REGEXP_LOGIC && !!function () {
  10318. var descriptor = getOwnPropertyDescriptor(String.prototype, 'startsWith');
  10319. return descriptor && !descriptor.writable;
  10320. }();
  10321. // `String.prototype.startsWith` method
  10322. // https://tc39.es/ecma262/#sec-string.prototype.startswith
  10323. $({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {
  10324. startsWith: function startsWith(searchString /* , position = 0 */) {
  10325. var that = String(requireObjectCoercible(this));
  10326. notARegExp(searchString);
  10327. var index = toLength(min(arguments.length > 1 ? arguments[1] : undefined, that.length));
  10328. var search = String(searchString);
  10329. return $startsWith
  10330. ? $startsWith.call(that, search, index)
  10331. : that.slice(index, index + search.length) === search;
  10332. }
  10333. });
  10334. /***/ }),
  10335. /***/ "./node_modules/core-js/modules/es.string.trim.js":
  10336. /*!********************************************************!*\
  10337. !*** ./node_modules/core-js/modules/es.string.trim.js ***!
  10338. \********************************************************/
  10339. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  10340. "use strict";
  10341. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  10342. var $trim = __webpack_require__(/*! ../internals/string-trim */ "./node_modules/core-js/internals/string-trim.js").trim;
  10343. var forcedStringTrimMethod = __webpack_require__(/*! ../internals/string-trim-forced */ "./node_modules/core-js/internals/string-trim-forced.js");
  10344. // `String.prototype.trim` method
  10345. // https://tc39.es/ecma262/#sec-string.prototype.trim
  10346. $({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {
  10347. trim: function trim() {
  10348. return $trim(this);
  10349. }
  10350. });
  10351. /***/ }),
  10352. /***/ "./node_modules/core-js/modules/es.symbol.description.js":
  10353. /*!***************************************************************!*\
  10354. !*** ./node_modules/core-js/modules/es.symbol.description.js ***!
  10355. \***************************************************************/
  10356. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  10357. "use strict";
  10358. // `Symbol.prototype.description` getter
  10359. // https://tc39.es/ecma262/#sec-symbol.prototype.description
  10360. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  10361. var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
  10362. var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
  10363. var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js");
  10364. var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
  10365. var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js").f;
  10366. var copyConstructorProperties = __webpack_require__(/*! ../internals/copy-constructor-properties */ "./node_modules/core-js/internals/copy-constructor-properties.js");
  10367. var NativeSymbol = global.Symbol;
  10368. if (DESCRIPTORS && typeof NativeSymbol == 'function' && (!('description' in NativeSymbol.prototype) ||
  10369. // Safari 12 bug
  10370. NativeSymbol().description !== undefined
  10371. )) {
  10372. var EmptyStringDescriptionStore = {};
  10373. // wrap Symbol constructor for correct work with undefined description
  10374. var SymbolWrapper = function Symbol() {
  10375. var description = arguments.length < 1 || arguments[0] === undefined ? undefined : String(arguments[0]);
  10376. var result = this instanceof SymbolWrapper
  10377. ? new NativeSymbol(description)
  10378. // in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'
  10379. : description === undefined ? NativeSymbol() : NativeSymbol(description);
  10380. if (description === '') EmptyStringDescriptionStore[result] = true;
  10381. return result;
  10382. };
  10383. copyConstructorProperties(SymbolWrapper, NativeSymbol);
  10384. var symbolPrototype = SymbolWrapper.prototype = NativeSymbol.prototype;
  10385. symbolPrototype.constructor = SymbolWrapper;
  10386. var symbolToString = symbolPrototype.toString;
  10387. var native = String(NativeSymbol('test')) == 'Symbol(test)';
  10388. var regexp = /^Symbol\((.*)\)[^)]+$/;
  10389. defineProperty(symbolPrototype, 'description', {
  10390. configurable: true,
  10391. get: function description() {
  10392. var symbol = isObject(this) ? this.valueOf() : this;
  10393. var string = symbolToString.call(symbol);
  10394. if (has(EmptyStringDescriptionStore, symbol)) return '';
  10395. var desc = native ? string.slice(7, -1) : string.replace(regexp, '$1');
  10396. return desc === '' ? undefined : desc;
  10397. }
  10398. });
  10399. $({ global: true, forced: true }, {
  10400. Symbol: SymbolWrapper
  10401. });
  10402. }
  10403. /***/ }),
  10404. /***/ "./node_modules/core-js/modules/es.symbol.iterator.js":
  10405. /*!************************************************************!*\
  10406. !*** ./node_modules/core-js/modules/es.symbol.iterator.js ***!
  10407. \************************************************************/
  10408. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  10409. var defineWellKnownSymbol = __webpack_require__(/*! ../internals/define-well-known-symbol */ "./node_modules/core-js/internals/define-well-known-symbol.js");
  10410. // `Symbol.iterator` well-known symbol
  10411. // https://tc39.es/ecma262/#sec-symbol.iterator
  10412. defineWellKnownSymbol('iterator');
  10413. /***/ }),
  10414. /***/ "./node_modules/core-js/modules/es.symbol.js":
  10415. /*!***************************************************!*\
  10416. !*** ./node_modules/core-js/modules/es.symbol.js ***!
  10417. \***************************************************/
  10418. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  10419. "use strict";
  10420. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  10421. var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
  10422. var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "./node_modules/core-js/internals/get-built-in.js");
  10423. var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "./node_modules/core-js/internals/is-pure.js");
  10424. var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
  10425. var NATIVE_SYMBOL = __webpack_require__(/*! ../internals/native-symbol */ "./node_modules/core-js/internals/native-symbol.js");
  10426. var USE_SYMBOL_AS_UID = __webpack_require__(/*! ../internals/use-symbol-as-uid */ "./node_modules/core-js/internals/use-symbol-as-uid.js");
  10427. var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
  10428. var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js");
  10429. var isArray = __webpack_require__(/*! ../internals/is-array */ "./node_modules/core-js/internals/is-array.js");
  10430. var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
  10431. var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
  10432. var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js");
  10433. var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/core-js/internals/to-indexed-object.js");
  10434. var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ "./node_modules/core-js/internals/to-primitive.js");
  10435. var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "./node_modules/core-js/internals/create-property-descriptor.js");
  10436. var nativeObjectCreate = __webpack_require__(/*! ../internals/object-create */ "./node_modules/core-js/internals/object-create.js");
  10437. var objectKeys = __webpack_require__(/*! ../internals/object-keys */ "./node_modules/core-js/internals/object-keys.js");
  10438. var getOwnPropertyNamesModule = __webpack_require__(/*! ../internals/object-get-own-property-names */ "./node_modules/core-js/internals/object-get-own-property-names.js");
  10439. var getOwnPropertyNamesExternal = __webpack_require__(/*! ../internals/object-get-own-property-names-external */ "./node_modules/core-js/internals/object-get-own-property-names-external.js");
  10440. var getOwnPropertySymbolsModule = __webpack_require__(/*! ../internals/object-get-own-property-symbols */ "./node_modules/core-js/internals/object-get-own-property-symbols.js");
  10441. var getOwnPropertyDescriptorModule = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "./node_modules/core-js/internals/object-get-own-property-descriptor.js");
  10442. var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js");
  10443. var propertyIsEnumerableModule = __webpack_require__(/*! ../internals/object-property-is-enumerable */ "./node_modules/core-js/internals/object-property-is-enumerable.js");
  10444. var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "./node_modules/core-js/internals/create-non-enumerable-property.js");
  10445. var redefine = __webpack_require__(/*! ../internals/redefine */ "./node_modules/core-js/internals/redefine.js");
  10446. var shared = __webpack_require__(/*! ../internals/shared */ "./node_modules/core-js/internals/shared.js");
  10447. var sharedKey = __webpack_require__(/*! ../internals/shared-key */ "./node_modules/core-js/internals/shared-key.js");
  10448. var hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ "./node_modules/core-js/internals/hidden-keys.js");
  10449. var uid = __webpack_require__(/*! ../internals/uid */ "./node_modules/core-js/internals/uid.js");
  10450. var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
  10451. var wrappedWellKnownSymbolModule = __webpack_require__(/*! ../internals/well-known-symbol-wrapped */ "./node_modules/core-js/internals/well-known-symbol-wrapped.js");
  10452. var defineWellKnownSymbol = __webpack_require__(/*! ../internals/define-well-known-symbol */ "./node_modules/core-js/internals/define-well-known-symbol.js");
  10453. var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ "./node_modules/core-js/internals/set-to-string-tag.js");
  10454. var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "./node_modules/core-js/internals/internal-state.js");
  10455. var $forEach = __webpack_require__(/*! ../internals/array-iteration */ "./node_modules/core-js/internals/array-iteration.js").forEach;
  10456. var HIDDEN = sharedKey('hidden');
  10457. var SYMBOL = 'Symbol';
  10458. var PROTOTYPE = 'prototype';
  10459. var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
  10460. var setInternalState = InternalStateModule.set;
  10461. var getInternalState = InternalStateModule.getterFor(SYMBOL);
  10462. var ObjectPrototype = Object[PROTOTYPE];
  10463. var $Symbol = global.Symbol;
  10464. var $stringify = getBuiltIn('JSON', 'stringify');
  10465. var nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
  10466. var nativeDefineProperty = definePropertyModule.f;
  10467. var nativeGetOwnPropertyNames = getOwnPropertyNamesExternal.f;
  10468. var nativePropertyIsEnumerable = propertyIsEnumerableModule.f;
  10469. var AllSymbols = shared('symbols');
  10470. var ObjectPrototypeSymbols = shared('op-symbols');
  10471. var StringToSymbolRegistry = shared('string-to-symbol-registry');
  10472. var SymbolToStringRegistry = shared('symbol-to-string-registry');
  10473. var WellKnownSymbolsStore = shared('wks');
  10474. var QObject = global.QObject;
  10475. // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
  10476. var USE_SETTER = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
  10477. // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
  10478. var setSymbolDescriptor = DESCRIPTORS && fails(function () {
  10479. return nativeObjectCreate(nativeDefineProperty({}, 'a', {
  10480. get: function () { return nativeDefineProperty(this, 'a', { value: 7 }).a; }
  10481. })).a != 7;
  10482. }) ? function (O, P, Attributes) {
  10483. var ObjectPrototypeDescriptor = nativeGetOwnPropertyDescriptor(ObjectPrototype, P);
  10484. if (ObjectPrototypeDescriptor) delete ObjectPrototype[P];
  10485. nativeDefineProperty(O, P, Attributes);
  10486. if (ObjectPrototypeDescriptor && O !== ObjectPrototype) {
  10487. nativeDefineProperty(ObjectPrototype, P, ObjectPrototypeDescriptor);
  10488. }
  10489. } : nativeDefineProperty;
  10490. var wrap = function (tag, description) {
  10491. var symbol = AllSymbols[tag] = nativeObjectCreate($Symbol[PROTOTYPE]);
  10492. setInternalState(symbol, {
  10493. type: SYMBOL,
  10494. tag: tag,
  10495. description: description
  10496. });
  10497. if (!DESCRIPTORS) symbol.description = description;
  10498. return symbol;
  10499. };
  10500. var isSymbol = USE_SYMBOL_AS_UID ? function (it) {
  10501. return typeof it == 'symbol';
  10502. } : function (it) {
  10503. return Object(it) instanceof $Symbol;
  10504. };
  10505. var $defineProperty = function defineProperty(O, P, Attributes) {
  10506. if (O === ObjectPrototype) $defineProperty(ObjectPrototypeSymbols, P, Attributes);
  10507. anObject(O);
  10508. var key = toPrimitive(P, true);
  10509. anObject(Attributes);
  10510. if (has(AllSymbols, key)) {
  10511. if (!Attributes.enumerable) {
  10512. if (!has(O, HIDDEN)) nativeDefineProperty(O, HIDDEN, createPropertyDescriptor(1, {}));
  10513. O[HIDDEN][key] = true;
  10514. } else {
  10515. if (has(O, HIDDEN) && O[HIDDEN][key]) O[HIDDEN][key] = false;
  10516. Attributes = nativeObjectCreate(Attributes, { enumerable: createPropertyDescriptor(0, false) });
  10517. } return setSymbolDescriptor(O, key, Attributes);
  10518. } return nativeDefineProperty(O, key, Attributes);
  10519. };
  10520. var $defineProperties = function defineProperties(O, Properties) {
  10521. anObject(O);
  10522. var properties = toIndexedObject(Properties);
  10523. var keys = objectKeys(properties).concat($getOwnPropertySymbols(properties));
  10524. $forEach(keys, function (key) {
  10525. if (!DESCRIPTORS || $propertyIsEnumerable.call(properties, key)) $defineProperty(O, key, properties[key]);
  10526. });
  10527. return O;
  10528. };
  10529. var $create = function create(O, Properties) {
  10530. return Properties === undefined ? nativeObjectCreate(O) : $defineProperties(nativeObjectCreate(O), Properties);
  10531. };
  10532. var $propertyIsEnumerable = function propertyIsEnumerable(V) {
  10533. var P = toPrimitive(V, true);
  10534. var enumerable = nativePropertyIsEnumerable.call(this, P);
  10535. if (this === ObjectPrototype && has(AllSymbols, P) && !has(ObjectPrototypeSymbols, P)) return false;
  10536. return enumerable || !has(this, P) || !has(AllSymbols, P) || has(this, HIDDEN) && this[HIDDEN][P] ? enumerable : true;
  10537. };
  10538. var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(O, P) {
  10539. var it = toIndexedObject(O);
  10540. var key = toPrimitive(P, true);
  10541. if (it === ObjectPrototype && has(AllSymbols, key) && !has(ObjectPrototypeSymbols, key)) return;
  10542. var descriptor = nativeGetOwnPropertyDescriptor(it, key);
  10543. if (descriptor && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) {
  10544. descriptor.enumerable = true;
  10545. }
  10546. return descriptor;
  10547. };
  10548. var $getOwnPropertyNames = function getOwnPropertyNames(O) {
  10549. var names = nativeGetOwnPropertyNames(toIndexedObject(O));
  10550. var result = [];
  10551. $forEach(names, function (key) {
  10552. if (!has(AllSymbols, key) && !has(hiddenKeys, key)) result.push(key);
  10553. });
  10554. return result;
  10555. };
  10556. var $getOwnPropertySymbols = function getOwnPropertySymbols(O) {
  10557. var IS_OBJECT_PROTOTYPE = O === ObjectPrototype;
  10558. var names = nativeGetOwnPropertyNames(IS_OBJECT_PROTOTYPE ? ObjectPrototypeSymbols : toIndexedObject(O));
  10559. var result = [];
  10560. $forEach(names, function (key) {
  10561. if (has(AllSymbols, key) && (!IS_OBJECT_PROTOTYPE || has(ObjectPrototype, key))) {
  10562. result.push(AllSymbols[key]);
  10563. }
  10564. });
  10565. return result;
  10566. };
  10567. // `Symbol` constructor
  10568. // https://tc39.es/ecma262/#sec-symbol-constructor
  10569. if (!NATIVE_SYMBOL) {
  10570. $Symbol = function Symbol() {
  10571. if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor');
  10572. var description = !arguments.length || arguments[0] === undefined ? undefined : String(arguments[0]);
  10573. var tag = uid(description);
  10574. var setter = function (value) {
  10575. if (this === ObjectPrototype) setter.call(ObjectPrototypeSymbols, value);
  10576. if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
  10577. setSymbolDescriptor(this, tag, createPropertyDescriptor(1, value));
  10578. };
  10579. if (DESCRIPTORS && USE_SETTER) setSymbolDescriptor(ObjectPrototype, tag, { configurable: true, set: setter });
  10580. return wrap(tag, description);
  10581. };
  10582. redefine($Symbol[PROTOTYPE], 'toString', function toString() {
  10583. return getInternalState(this).tag;
  10584. });
  10585. redefine($Symbol, 'withoutSetter', function (description) {
  10586. return wrap(uid(description), description);
  10587. });
  10588. propertyIsEnumerableModule.f = $propertyIsEnumerable;
  10589. definePropertyModule.f = $defineProperty;
  10590. getOwnPropertyDescriptorModule.f = $getOwnPropertyDescriptor;
  10591. getOwnPropertyNamesModule.f = getOwnPropertyNamesExternal.f = $getOwnPropertyNames;
  10592. getOwnPropertySymbolsModule.f = $getOwnPropertySymbols;
  10593. wrappedWellKnownSymbolModule.f = function (name) {
  10594. return wrap(wellKnownSymbol(name), name);
  10595. };
  10596. if (DESCRIPTORS) {
  10597. // https://github.com/tc39/proposal-Symbol-description
  10598. nativeDefineProperty($Symbol[PROTOTYPE], 'description', {
  10599. configurable: true,
  10600. get: function description() {
  10601. return getInternalState(this).description;
  10602. }
  10603. });
  10604. if (!IS_PURE) {
  10605. redefine(ObjectPrototype, 'propertyIsEnumerable', $propertyIsEnumerable, { unsafe: true });
  10606. }
  10607. }
  10608. }
  10609. $({ global: true, wrap: true, forced: !NATIVE_SYMBOL, sham: !NATIVE_SYMBOL }, {
  10610. Symbol: $Symbol
  10611. });
  10612. $forEach(objectKeys(WellKnownSymbolsStore), function (name) {
  10613. defineWellKnownSymbol(name);
  10614. });
  10615. $({ target: SYMBOL, stat: true, forced: !NATIVE_SYMBOL }, {
  10616. // `Symbol.for` method
  10617. // https://tc39.es/ecma262/#sec-symbol.for
  10618. 'for': function (key) {
  10619. var string = String(key);
  10620. if (has(StringToSymbolRegistry, string)) return StringToSymbolRegistry[string];
  10621. var symbol = $Symbol(string);
  10622. StringToSymbolRegistry[string] = symbol;
  10623. SymbolToStringRegistry[symbol] = string;
  10624. return symbol;
  10625. },
  10626. // `Symbol.keyFor` method
  10627. // https://tc39.es/ecma262/#sec-symbol.keyfor
  10628. keyFor: function keyFor(sym) {
  10629. if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol');
  10630. if (has(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym];
  10631. },
  10632. useSetter: function () { USE_SETTER = true; },
  10633. useSimple: function () { USE_SETTER = false; }
  10634. });
  10635. $({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL, sham: !DESCRIPTORS }, {
  10636. // `Object.create` method
  10637. // https://tc39.es/ecma262/#sec-object.create
  10638. create: $create,
  10639. // `Object.defineProperty` method
  10640. // https://tc39.es/ecma262/#sec-object.defineproperty
  10641. defineProperty: $defineProperty,
  10642. // `Object.defineProperties` method
  10643. // https://tc39.es/ecma262/#sec-object.defineproperties
  10644. defineProperties: $defineProperties,
  10645. // `Object.getOwnPropertyDescriptor` method
  10646. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptors
  10647. getOwnPropertyDescriptor: $getOwnPropertyDescriptor
  10648. });
  10649. $({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL }, {
  10650. // `Object.getOwnPropertyNames` method
  10651. // https://tc39.es/ecma262/#sec-object.getownpropertynames
  10652. getOwnPropertyNames: $getOwnPropertyNames,
  10653. // `Object.getOwnPropertySymbols` method
  10654. // https://tc39.es/ecma262/#sec-object.getownpropertysymbols
  10655. getOwnPropertySymbols: $getOwnPropertySymbols
  10656. });
  10657. // Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives
  10658. // https://bugs.chromium.org/p/v8/issues/detail?id=3443
  10659. $({ target: 'Object', stat: true, forced: fails(function () { getOwnPropertySymbolsModule.f(1); }) }, {
  10660. getOwnPropertySymbols: function getOwnPropertySymbols(it) {
  10661. return getOwnPropertySymbolsModule.f(toObject(it));
  10662. }
  10663. });
  10664. // `JSON.stringify` method behavior with symbols
  10665. // https://tc39.es/ecma262/#sec-json.stringify
  10666. if ($stringify) {
  10667. var FORCED_JSON_STRINGIFY = !NATIVE_SYMBOL || fails(function () {
  10668. var symbol = $Symbol();
  10669. // MS Edge converts symbol values to JSON as {}
  10670. return $stringify([symbol]) != '[null]'
  10671. // WebKit converts symbol values to JSON as null
  10672. || $stringify({ a: symbol }) != '{}'
  10673. // V8 throws on boxed symbols
  10674. || $stringify(Object(symbol)) != '{}';
  10675. });
  10676. $({ target: 'JSON', stat: true, forced: FORCED_JSON_STRINGIFY }, {
  10677. // eslint-disable-next-line no-unused-vars -- required for `.length`
  10678. stringify: function stringify(it, replacer, space) {
  10679. var args = [it];
  10680. var index = 1;
  10681. var $replacer;
  10682. while (arguments.length > index) args.push(arguments[index++]);
  10683. $replacer = replacer;
  10684. if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
  10685. if (!isArray(replacer)) replacer = function (key, value) {
  10686. if (typeof $replacer == 'function') value = $replacer.call(this, key, value);
  10687. if (!isSymbol(value)) return value;
  10688. };
  10689. args[1] = replacer;
  10690. return $stringify.apply(null, args);
  10691. }
  10692. });
  10693. }
  10694. // `Symbol.prototype[@@toPrimitive]` method
  10695. // https://tc39.es/ecma262/#sec-symbol.prototype-@@toprimitive
  10696. if (!$Symbol[PROTOTYPE][TO_PRIMITIVE]) {
  10697. createNonEnumerableProperty($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
  10698. }
  10699. // `Symbol.prototype[@@toStringTag]` property
  10700. // https://tc39.es/ecma262/#sec-symbol.prototype-@@tostringtag
  10701. setToStringTag($Symbol, SYMBOL);
  10702. hiddenKeys[HIDDEN] = true;
  10703. /***/ }),
  10704. /***/ "./node_modules/core-js/modules/web.dom-collections.for-each.js":
  10705. /*!**********************************************************************!*\
  10706. !*** ./node_modules/core-js/modules/web.dom-collections.for-each.js ***!
  10707. \**********************************************************************/
  10708. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  10709. var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
  10710. var DOMIterables = __webpack_require__(/*! ../internals/dom-iterables */ "./node_modules/core-js/internals/dom-iterables.js");
  10711. var forEach = __webpack_require__(/*! ../internals/array-for-each */ "./node_modules/core-js/internals/array-for-each.js");
  10712. var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "./node_modules/core-js/internals/create-non-enumerable-property.js");
  10713. for (var COLLECTION_NAME in DOMIterables) {
  10714. var Collection = global[COLLECTION_NAME];
  10715. var CollectionPrototype = Collection && Collection.prototype;
  10716. // some Chrome versions have non-configurable methods on DOMTokenList
  10717. if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {
  10718. createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach);
  10719. } catch (error) {
  10720. CollectionPrototype.forEach = forEach;
  10721. }
  10722. }
  10723. /***/ }),
  10724. /***/ "./node_modules/core-js/modules/web.dom-collections.iterator.js":
  10725. /*!**********************************************************************!*\
  10726. !*** ./node_modules/core-js/modules/web.dom-collections.iterator.js ***!
  10727. \**********************************************************************/
  10728. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  10729. var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
  10730. var DOMIterables = __webpack_require__(/*! ../internals/dom-iterables */ "./node_modules/core-js/internals/dom-iterables.js");
  10731. var ArrayIteratorMethods = __webpack_require__(/*! ../modules/es.array.iterator */ "./node_modules/core-js/modules/es.array.iterator.js");
  10732. var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "./node_modules/core-js/internals/create-non-enumerable-property.js");
  10733. var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
  10734. var ITERATOR = wellKnownSymbol('iterator');
  10735. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  10736. var ArrayValues = ArrayIteratorMethods.values;
  10737. for (var COLLECTION_NAME in DOMIterables) {
  10738. var Collection = global[COLLECTION_NAME];
  10739. var CollectionPrototype = Collection && Collection.prototype;
  10740. if (CollectionPrototype) {
  10741. // some Chrome versions have non-configurable methods on DOMTokenList
  10742. if (CollectionPrototype[ITERATOR] !== ArrayValues) try {
  10743. createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);
  10744. } catch (error) {
  10745. CollectionPrototype[ITERATOR] = ArrayValues;
  10746. }
  10747. if (!CollectionPrototype[TO_STRING_TAG]) {
  10748. createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);
  10749. }
  10750. if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
  10751. // some Chrome versions have non-configurable methods on DOMTokenList
  10752. if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
  10753. createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
  10754. } catch (error) {
  10755. CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
  10756. }
  10757. }
  10758. }
  10759. }
  10760. /***/ }),
  10761. /***/ "./node_modules/performance-now/lib/performance-now.js":
  10762. /*!*************************************************************!*\
  10763. !*** ./node_modules/performance-now/lib/performance-now.js ***!
  10764. \*************************************************************/
  10765. /***/ (function(module) {
  10766. // Generated by CoffeeScript 1.12.2
  10767. (function() {
  10768. var getNanoSeconds, hrtime, loadTime, moduleLoadTime, nodeLoadTime, upTime;
  10769. if ((typeof performance !== "undefined" && performance !== null) && performance.now) {
  10770. module.exports = function() {
  10771. return performance.now();
  10772. };
  10773. } else if ((typeof process !== "undefined" && process !== null) && process.hrtime) {
  10774. module.exports = function() {
  10775. return (getNanoSeconds() - nodeLoadTime) / 1e6;
  10776. };
  10777. hrtime = process.hrtime;
  10778. getNanoSeconds = function() {
  10779. var hr;
  10780. hr = hrtime();
  10781. return hr[0] * 1e9 + hr[1];
  10782. };
  10783. moduleLoadTime = getNanoSeconds();
  10784. upTime = process.uptime() * 1e9;
  10785. nodeLoadTime = moduleLoadTime - upTime;
  10786. } else if (Date.now) {
  10787. module.exports = function() {
  10788. return Date.now() - loadTime;
  10789. };
  10790. loadTime = Date.now();
  10791. } else {
  10792. module.exports = function() {
  10793. return new Date().getTime() - loadTime;
  10794. };
  10795. loadTime = new Date().getTime();
  10796. }
  10797. }).call(this);
  10798. //# sourceMappingURL=performance-now.js.map
  10799. /***/ }),
  10800. /***/ "./node_modules/raf/index.js":
  10801. /*!***********************************!*\
  10802. !*** ./node_modules/raf/index.js ***!
  10803. \***********************************/
  10804. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  10805. var now = __webpack_require__(/*! performance-now */ "./node_modules/performance-now/lib/performance-now.js")
  10806. , root = typeof window === 'undefined' ? __webpack_require__.g : window
  10807. , vendors = ['moz', 'webkit']
  10808. , suffix = 'AnimationFrame'
  10809. , raf = root['request' + suffix]
  10810. , caf = root['cancel' + suffix] || root['cancelRequest' + suffix]
  10811. for(var i = 0; !raf && i < vendors.length; i++) {
  10812. raf = root[vendors[i] + 'Request' + suffix]
  10813. caf = root[vendors[i] + 'Cancel' + suffix]
  10814. || root[vendors[i] + 'CancelRequest' + suffix]
  10815. }
  10816. // Some versions of FF have rAF but not cAF
  10817. if(!raf || !caf) {
  10818. var last = 0
  10819. , id = 0
  10820. , queue = []
  10821. , frameDuration = 1000 / 60
  10822. raf = function(callback) {
  10823. if(queue.length === 0) {
  10824. var _now = now()
  10825. , next = Math.max(0, frameDuration - (_now - last))
  10826. last = next + _now
  10827. setTimeout(function() {
  10828. var cp = queue.slice(0)
  10829. // Clear queue here to prevent
  10830. // callbacks from appending listeners
  10831. // to the current frame's queue
  10832. queue.length = 0
  10833. for(var i = 0; i < cp.length; i++) {
  10834. if(!cp[i].cancelled) {
  10835. try{
  10836. cp[i].callback(last)
  10837. } catch(e) {
  10838. setTimeout(function() { throw e }, 0)
  10839. }
  10840. }
  10841. }
  10842. }, Math.round(next))
  10843. }
  10844. queue.push({
  10845. handle: ++id,
  10846. callback: callback,
  10847. cancelled: false
  10848. })
  10849. return id
  10850. }
  10851. caf = function(handle) {
  10852. for(var i = 0; i < queue.length; i++) {
  10853. if(queue[i].handle === handle) {
  10854. queue[i].cancelled = true
  10855. }
  10856. }
  10857. }
  10858. }
  10859. module.exports = function(fn) {
  10860. // Wrap in a new function to prevent
  10861. // `cancel` potentially being assigned
  10862. // to the native rAF function
  10863. return raf.call(root, fn)
  10864. }
  10865. module.exports.cancel = function() {
  10866. caf.apply(root, arguments)
  10867. }
  10868. module.exports.polyfill = function(object) {
  10869. if (!object) {
  10870. object = root;
  10871. }
  10872. object.requestAnimationFrame = raf
  10873. object.cancelAnimationFrame = caf
  10874. }
  10875. /***/ }),
  10876. /***/ "./node_modules/regenerator-runtime/runtime.js":
  10877. /*!*****************************************************!*\
  10878. !*** ./node_modules/regenerator-runtime/runtime.js ***!
  10879. \*****************************************************/
  10880. /***/ ((module) => {
  10881. /**
  10882. * Copyright (c) 2014-present, Facebook, Inc.
  10883. *
  10884. * This source code is licensed under the MIT license found in the
  10885. * LICENSE file in the root directory of this source tree.
  10886. */
  10887. var runtime = (function (exports) {
  10888. "use strict";
  10889. var Op = Object.prototype;
  10890. var hasOwn = Op.hasOwnProperty;
  10891. var undefined; // More compressible than void 0.
  10892. var $Symbol = typeof Symbol === "function" ? Symbol : {};
  10893. var iteratorSymbol = $Symbol.iterator || "@@iterator";
  10894. var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
  10895. var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
  10896. function define(obj, key, value) {
  10897. Object.defineProperty(obj, key, {
  10898. value: value,
  10899. enumerable: true,
  10900. configurable: true,
  10901. writable: true
  10902. });
  10903. return obj[key];
  10904. }
  10905. try {
  10906. // IE 8 has a broken Object.defineProperty that only works on DOM objects.
  10907. define({}, "");
  10908. } catch (err) {
  10909. define = function(obj, key, value) {
  10910. return obj[key] = value;
  10911. };
  10912. }
  10913. function wrap(innerFn, outerFn, self, tryLocsList) {
  10914. // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
  10915. var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
  10916. var generator = Object.create(protoGenerator.prototype);
  10917. var context = new Context(tryLocsList || []);
  10918. // The ._invoke method unifies the implementations of the .next,
  10919. // .throw, and .return methods.
  10920. generator._invoke = makeInvokeMethod(innerFn, self, context);
  10921. return generator;
  10922. }
  10923. exports.wrap = wrap;
  10924. // Try/catch helper to minimize deoptimizations. Returns a completion
  10925. // record like context.tryEntries[i].completion. This interface could
  10926. // have been (and was previously) designed to take a closure to be
  10927. // invoked without arguments, but in all the cases we care about we
  10928. // already have an existing method we want to call, so there's no need
  10929. // to create a new function object. We can even get away with assuming
  10930. // the method takes exactly one argument, since that happens to be true
  10931. // in every case, so we don't have to touch the arguments object. The
  10932. // only additional allocation required is the completion record, which
  10933. // has a stable shape and so hopefully should be cheap to allocate.
  10934. function tryCatch(fn, obj, arg) {
  10935. try {
  10936. return { type: "normal", arg: fn.call(obj, arg) };
  10937. } catch (err) {
  10938. return { type: "throw", arg: err };
  10939. }
  10940. }
  10941. var GenStateSuspendedStart = "suspendedStart";
  10942. var GenStateSuspendedYield = "suspendedYield";
  10943. var GenStateExecuting = "executing";
  10944. var GenStateCompleted = "completed";
  10945. // Returning this object from the innerFn has the same effect as
  10946. // breaking out of the dispatch switch statement.
  10947. var ContinueSentinel = {};
  10948. // Dummy constructor functions that we use as the .constructor and
  10949. // .constructor.prototype properties for functions that return Generator
  10950. // objects. For full spec compliance, you may wish to configure your
  10951. // minifier not to mangle the names of these two functions.
  10952. function Generator() {}
  10953. function GeneratorFunction() {}
  10954. function GeneratorFunctionPrototype() {}
  10955. // This is a polyfill for %IteratorPrototype% for environments that
  10956. // don't natively support it.
  10957. var IteratorPrototype = {};
  10958. IteratorPrototype[iteratorSymbol] = function () {
  10959. return this;
  10960. };
  10961. var getProto = Object.getPrototypeOf;
  10962. var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
  10963. if (NativeIteratorPrototype &&
  10964. NativeIteratorPrototype !== Op &&
  10965. hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
  10966. // This environment has a native %IteratorPrototype%; use it instead
  10967. // of the polyfill.
  10968. IteratorPrototype = NativeIteratorPrototype;
  10969. }
  10970. var Gp = GeneratorFunctionPrototype.prototype =
  10971. Generator.prototype = Object.create(IteratorPrototype);
  10972. GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
  10973. GeneratorFunctionPrototype.constructor = GeneratorFunction;
  10974. GeneratorFunction.displayName = define(
  10975. GeneratorFunctionPrototype,
  10976. toStringTagSymbol,
  10977. "GeneratorFunction"
  10978. );
  10979. // Helper for defining the .next, .throw, and .return methods of the
  10980. // Iterator interface in terms of a single ._invoke method.
  10981. function defineIteratorMethods(prototype) {
  10982. ["next", "throw", "return"].forEach(function(method) {
  10983. define(prototype, method, function(arg) {
  10984. return this._invoke(method, arg);
  10985. });
  10986. });
  10987. }
  10988. exports.isGeneratorFunction = function(genFun) {
  10989. var ctor = typeof genFun === "function" && genFun.constructor;
  10990. return ctor
  10991. ? ctor === GeneratorFunction ||
  10992. // For the native GeneratorFunction constructor, the best we can
  10993. // do is to check its .name property.
  10994. (ctor.displayName || ctor.name) === "GeneratorFunction"
  10995. : false;
  10996. };
  10997. exports.mark = function(genFun) {
  10998. if (Object.setPrototypeOf) {
  10999. Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
  11000. } else {
  11001. genFun.__proto__ = GeneratorFunctionPrototype;
  11002. define(genFun, toStringTagSymbol, "GeneratorFunction");
  11003. }
  11004. genFun.prototype = Object.create(Gp);
  11005. return genFun;
  11006. };
  11007. // Within the body of any async function, `await x` is transformed to
  11008. // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
  11009. // `hasOwn.call(value, "__await")` to determine if the yielded value is
  11010. // meant to be awaited.
  11011. exports.awrap = function(arg) {
  11012. return { __await: arg };
  11013. };
  11014. function AsyncIterator(generator, PromiseImpl) {
  11015. function invoke(method, arg, resolve, reject) {
  11016. var record = tryCatch(generator[method], generator, arg);
  11017. if (record.type === "throw") {
  11018. reject(record.arg);
  11019. } else {
  11020. var result = record.arg;
  11021. var value = result.value;
  11022. if (value &&
  11023. typeof value === "object" &&
  11024. hasOwn.call(value, "__await")) {
  11025. return PromiseImpl.resolve(value.__await).then(function(value) {
  11026. invoke("next", value, resolve, reject);
  11027. }, function(err) {
  11028. invoke("throw", err, resolve, reject);
  11029. });
  11030. }
  11031. return PromiseImpl.resolve(value).then(function(unwrapped) {
  11032. // When a yielded Promise is resolved, its final value becomes
  11033. // the .value of the Promise<{value,done}> result for the
  11034. // current iteration.
  11035. result.value = unwrapped;
  11036. resolve(result);
  11037. }, function(error) {
  11038. // If a rejected Promise was yielded, throw the rejection back
  11039. // into the async generator function so it can be handled there.
  11040. return invoke("throw", error, resolve, reject);
  11041. });
  11042. }
  11043. }
  11044. var previousPromise;
  11045. function enqueue(method, arg) {
  11046. function callInvokeWithMethodAndArg() {
  11047. return new PromiseImpl(function(resolve, reject) {
  11048. invoke(method, arg, resolve, reject);
  11049. });
  11050. }
  11051. return previousPromise =
  11052. // If enqueue has been called before, then we want to wait until
  11053. // all previous Promises have been resolved before calling invoke,
  11054. // so that results are always delivered in the correct order. If
  11055. // enqueue has not been called before, then it is important to
  11056. // call invoke immediately, without waiting on a callback to fire,
  11057. // so that the async generator function has the opportunity to do
  11058. // any necessary setup in a predictable way. This predictability
  11059. // is why the Promise constructor synchronously invokes its
  11060. // executor callback, and why async functions synchronously
  11061. // execute code before the first await. Since we implement simple
  11062. // async functions in terms of async generators, it is especially
  11063. // important to get this right, even though it requires care.
  11064. previousPromise ? previousPromise.then(
  11065. callInvokeWithMethodAndArg,
  11066. // Avoid propagating failures to Promises returned by later
  11067. // invocations of the iterator.
  11068. callInvokeWithMethodAndArg
  11069. ) : callInvokeWithMethodAndArg();
  11070. }
  11071. // Define the unified helper method that is used to implement .next,
  11072. // .throw, and .return (see defineIteratorMethods).
  11073. this._invoke = enqueue;
  11074. }
  11075. defineIteratorMethods(AsyncIterator.prototype);
  11076. AsyncIterator.prototype[asyncIteratorSymbol] = function () {
  11077. return this;
  11078. };
  11079. exports.AsyncIterator = AsyncIterator;
  11080. // Note that simple async functions are implemented on top of
  11081. // AsyncIterator objects; they just return a Promise for the value of
  11082. // the final result produced by the iterator.
  11083. exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
  11084. if (PromiseImpl === void 0) PromiseImpl = Promise;
  11085. var iter = new AsyncIterator(
  11086. wrap(innerFn, outerFn, self, tryLocsList),
  11087. PromiseImpl
  11088. );
  11089. return exports.isGeneratorFunction(outerFn)
  11090. ? iter // If outerFn is a generator, return the full iterator.
  11091. : iter.next().then(function(result) {
  11092. return result.done ? result.value : iter.next();
  11093. });
  11094. };
  11095. function makeInvokeMethod(innerFn, self, context) {
  11096. var state = GenStateSuspendedStart;
  11097. return function invoke(method, arg) {
  11098. if (state === GenStateExecuting) {
  11099. throw new Error("Generator is already running");
  11100. }
  11101. if (state === GenStateCompleted) {
  11102. if (method === "throw") {
  11103. throw arg;
  11104. }
  11105. // Be forgiving, per 25.3.3.3.3 of the spec:
  11106. // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
  11107. return doneResult();
  11108. }
  11109. context.method = method;
  11110. context.arg = arg;
  11111. while (true) {
  11112. var delegate = context.delegate;
  11113. if (delegate) {
  11114. var delegateResult = maybeInvokeDelegate(delegate, context);
  11115. if (delegateResult) {
  11116. if (delegateResult === ContinueSentinel) continue;
  11117. return delegateResult;
  11118. }
  11119. }
  11120. if (context.method === "next") {
  11121. // Setting context._sent for legacy support of Babel's
  11122. // function.sent implementation.
  11123. context.sent = context._sent = context.arg;
  11124. } else if (context.method === "throw") {
  11125. if (state === GenStateSuspendedStart) {
  11126. state = GenStateCompleted;
  11127. throw context.arg;
  11128. }
  11129. context.dispatchException(context.arg);
  11130. } else if (context.method === "return") {
  11131. context.abrupt("return", context.arg);
  11132. }
  11133. state = GenStateExecuting;
  11134. var record = tryCatch(innerFn, self, context);
  11135. if (record.type === "normal") {
  11136. // If an exception is thrown from innerFn, we leave state ===
  11137. // GenStateExecuting and loop back for another invocation.
  11138. state = context.done
  11139. ? GenStateCompleted
  11140. : GenStateSuspendedYield;
  11141. if (record.arg === ContinueSentinel) {
  11142. continue;
  11143. }
  11144. return {
  11145. value: record.arg,
  11146. done: context.done
  11147. };
  11148. } else if (record.type === "throw") {
  11149. state = GenStateCompleted;
  11150. // Dispatch the exception by looping back around to the
  11151. // context.dispatchException(context.arg) call above.
  11152. context.method = "throw";
  11153. context.arg = record.arg;
  11154. }
  11155. }
  11156. };
  11157. }
  11158. // Call delegate.iterator[context.method](context.arg) and handle the
  11159. // result, either by returning a { value, done } result from the
  11160. // delegate iterator, or by modifying context.method and context.arg,
  11161. // setting context.delegate to null, and returning the ContinueSentinel.
  11162. function maybeInvokeDelegate(delegate, context) {
  11163. var method = delegate.iterator[context.method];
  11164. if (method === undefined) {
  11165. // A .throw or .return when the delegate iterator has no .throw
  11166. // method always terminates the yield* loop.
  11167. context.delegate = null;
  11168. if (context.method === "throw") {
  11169. // Note: ["return"] must be used for ES3 parsing compatibility.
  11170. if (delegate.iterator["return"]) {
  11171. // If the delegate iterator has a return method, give it a
  11172. // chance to clean up.
  11173. context.method = "return";
  11174. context.arg = undefined;
  11175. maybeInvokeDelegate(delegate, context);
  11176. if (context.method === "throw") {
  11177. // If maybeInvokeDelegate(context) changed context.method from
  11178. // "return" to "throw", let that override the TypeError below.
  11179. return ContinueSentinel;
  11180. }
  11181. }
  11182. context.method = "throw";
  11183. context.arg = new TypeError(
  11184. "The iterator does not provide a 'throw' method");
  11185. }
  11186. return ContinueSentinel;
  11187. }
  11188. var record = tryCatch(method, delegate.iterator, context.arg);
  11189. if (record.type === "throw") {
  11190. context.method = "throw";
  11191. context.arg = record.arg;
  11192. context.delegate = null;
  11193. return ContinueSentinel;
  11194. }
  11195. var info = record.arg;
  11196. if (! info) {
  11197. context.method = "throw";
  11198. context.arg = new TypeError("iterator result is not an object");
  11199. context.delegate = null;
  11200. return ContinueSentinel;
  11201. }
  11202. if (info.done) {
  11203. // Assign the result of the finished delegate to the temporary
  11204. // variable specified by delegate.resultName (see delegateYield).
  11205. context[delegate.resultName] = info.value;
  11206. // Resume execution at the desired location (see delegateYield).
  11207. context.next = delegate.nextLoc;
  11208. // If context.method was "throw" but the delegate handled the
  11209. // exception, let the outer generator proceed normally. If
  11210. // context.method was "next", forget context.arg since it has been
  11211. // "consumed" by the delegate iterator. If context.method was
  11212. // "return", allow the original .return call to continue in the
  11213. // outer generator.
  11214. if (context.method !== "return") {
  11215. context.method = "next";
  11216. context.arg = undefined;
  11217. }
  11218. } else {
  11219. // Re-yield the result returned by the delegate method.
  11220. return info;
  11221. }
  11222. // The delegate iterator is finished, so forget it and continue with
  11223. // the outer generator.
  11224. context.delegate = null;
  11225. return ContinueSentinel;
  11226. }
  11227. // Define Generator.prototype.{next,throw,return} in terms of the
  11228. // unified ._invoke helper method.
  11229. defineIteratorMethods(Gp);
  11230. define(Gp, toStringTagSymbol, "Generator");
  11231. // A Generator should always return itself as the iterator object when the
  11232. // @@iterator function is called on it. Some browsers' implementations of the
  11233. // iterator prototype chain incorrectly implement this, causing the Generator
  11234. // object to not be returned from this call. This ensures that doesn't happen.
  11235. // See https://github.com/facebook/regenerator/issues/274 for more details.
  11236. Gp[iteratorSymbol] = function() {
  11237. return this;
  11238. };
  11239. Gp.toString = function() {
  11240. return "[object Generator]";
  11241. };
  11242. function pushTryEntry(locs) {
  11243. var entry = { tryLoc: locs[0] };
  11244. if (1 in locs) {
  11245. entry.catchLoc = locs[1];
  11246. }
  11247. if (2 in locs) {
  11248. entry.finallyLoc = locs[2];
  11249. entry.afterLoc = locs[3];
  11250. }
  11251. this.tryEntries.push(entry);
  11252. }
  11253. function resetTryEntry(entry) {
  11254. var record = entry.completion || {};
  11255. record.type = "normal";
  11256. delete record.arg;
  11257. entry.completion = record;
  11258. }
  11259. function Context(tryLocsList) {
  11260. // The root entry object (effectively a try statement without a catch
  11261. // or a finally block) gives us a place to store values thrown from
  11262. // locations where there is no enclosing try statement.
  11263. this.tryEntries = [{ tryLoc: "root" }];
  11264. tryLocsList.forEach(pushTryEntry, this);
  11265. this.reset(true);
  11266. }
  11267. exports.keys = function(object) {
  11268. var keys = [];
  11269. for (var key in object) {
  11270. keys.push(key);
  11271. }
  11272. keys.reverse();
  11273. // Rather than returning an object with a next method, we keep
  11274. // things simple and return the next function itself.
  11275. return function next() {
  11276. while (keys.length) {
  11277. var key = keys.pop();
  11278. if (key in object) {
  11279. next.value = key;
  11280. next.done = false;
  11281. return next;
  11282. }
  11283. }
  11284. // To avoid creating an additional object, we just hang the .value
  11285. // and .done properties off the next function object itself. This
  11286. // also ensures that the minifier will not anonymize the function.
  11287. next.done = true;
  11288. return next;
  11289. };
  11290. };
  11291. function values(iterable) {
  11292. if (iterable) {
  11293. var iteratorMethod = iterable[iteratorSymbol];
  11294. if (iteratorMethod) {
  11295. return iteratorMethod.call(iterable);
  11296. }
  11297. if (typeof iterable.next === "function") {
  11298. return iterable;
  11299. }
  11300. if (!isNaN(iterable.length)) {
  11301. var i = -1, next = function next() {
  11302. while (++i < iterable.length) {
  11303. if (hasOwn.call(iterable, i)) {
  11304. next.value = iterable[i];
  11305. next.done = false;
  11306. return next;
  11307. }
  11308. }
  11309. next.value = undefined;
  11310. next.done = true;
  11311. return next;
  11312. };
  11313. return next.next = next;
  11314. }
  11315. }
  11316. // Return an iterator with no values.
  11317. return { next: doneResult };
  11318. }
  11319. exports.values = values;
  11320. function doneResult() {
  11321. return { value: undefined, done: true };
  11322. }
  11323. Context.prototype = {
  11324. constructor: Context,
  11325. reset: function(skipTempReset) {
  11326. this.prev = 0;
  11327. this.next = 0;
  11328. // Resetting context._sent for legacy support of Babel's
  11329. // function.sent implementation.
  11330. this.sent = this._sent = undefined;
  11331. this.done = false;
  11332. this.delegate = null;
  11333. this.method = "next";
  11334. this.arg = undefined;
  11335. this.tryEntries.forEach(resetTryEntry);
  11336. if (!skipTempReset) {
  11337. for (var name in this) {
  11338. // Not sure about the optimal order of these conditions:
  11339. if (name.charAt(0) === "t" &&
  11340. hasOwn.call(this, name) &&
  11341. !isNaN(+name.slice(1))) {
  11342. this[name] = undefined;
  11343. }
  11344. }
  11345. }
  11346. },
  11347. stop: function() {
  11348. this.done = true;
  11349. var rootEntry = this.tryEntries[0];
  11350. var rootRecord = rootEntry.completion;
  11351. if (rootRecord.type === "throw") {
  11352. throw rootRecord.arg;
  11353. }
  11354. return this.rval;
  11355. },
  11356. dispatchException: function(exception) {
  11357. if (this.done) {
  11358. throw exception;
  11359. }
  11360. var context = this;
  11361. function handle(loc, caught) {
  11362. record.type = "throw";
  11363. record.arg = exception;
  11364. context.next = loc;
  11365. if (caught) {
  11366. // If the dispatched exception was caught by a catch block,
  11367. // then let that catch block handle the exception normally.
  11368. context.method = "next";
  11369. context.arg = undefined;
  11370. }
  11371. return !! caught;
  11372. }
  11373. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  11374. var entry = this.tryEntries[i];
  11375. var record = entry.completion;
  11376. if (entry.tryLoc === "root") {
  11377. // Exception thrown outside of any try block that could handle
  11378. // it, so set the completion value of the entire function to
  11379. // throw the exception.
  11380. return handle("end");
  11381. }
  11382. if (entry.tryLoc <= this.prev) {
  11383. var hasCatch = hasOwn.call(entry, "catchLoc");
  11384. var hasFinally = hasOwn.call(entry, "finallyLoc");
  11385. if (hasCatch && hasFinally) {
  11386. if (this.prev < entry.catchLoc) {
  11387. return handle(entry.catchLoc, true);
  11388. } else if (this.prev < entry.finallyLoc) {
  11389. return handle(entry.finallyLoc);
  11390. }
  11391. } else if (hasCatch) {
  11392. if (this.prev < entry.catchLoc) {
  11393. return handle(entry.catchLoc, true);
  11394. }
  11395. } else if (hasFinally) {
  11396. if (this.prev < entry.finallyLoc) {
  11397. return handle(entry.finallyLoc);
  11398. }
  11399. } else {
  11400. throw new Error("try statement without catch or finally");
  11401. }
  11402. }
  11403. }
  11404. },
  11405. abrupt: function(type, arg) {
  11406. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  11407. var entry = this.tryEntries[i];
  11408. if (entry.tryLoc <= this.prev &&
  11409. hasOwn.call(entry, "finallyLoc") &&
  11410. this.prev < entry.finallyLoc) {
  11411. var finallyEntry = entry;
  11412. break;
  11413. }
  11414. }
  11415. if (finallyEntry &&
  11416. (type === "break" ||
  11417. type === "continue") &&
  11418. finallyEntry.tryLoc <= arg &&
  11419. arg <= finallyEntry.finallyLoc) {
  11420. // Ignore the finally entry if control is not jumping to a
  11421. // location outside the try/catch block.
  11422. finallyEntry = null;
  11423. }
  11424. var record = finallyEntry ? finallyEntry.completion : {};
  11425. record.type = type;
  11426. record.arg = arg;
  11427. if (finallyEntry) {
  11428. this.method = "next";
  11429. this.next = finallyEntry.finallyLoc;
  11430. return ContinueSentinel;
  11431. }
  11432. return this.complete(record);
  11433. },
  11434. complete: function(record, afterLoc) {
  11435. if (record.type === "throw") {
  11436. throw record.arg;
  11437. }
  11438. if (record.type === "break" ||
  11439. record.type === "continue") {
  11440. this.next = record.arg;
  11441. } else if (record.type === "return") {
  11442. this.rval = this.arg = record.arg;
  11443. this.method = "return";
  11444. this.next = "end";
  11445. } else if (record.type === "normal" && afterLoc) {
  11446. this.next = afterLoc;
  11447. }
  11448. return ContinueSentinel;
  11449. },
  11450. finish: function(finallyLoc) {
  11451. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  11452. var entry = this.tryEntries[i];
  11453. if (entry.finallyLoc === finallyLoc) {
  11454. this.complete(entry.completion, entry.afterLoc);
  11455. resetTryEntry(entry);
  11456. return ContinueSentinel;
  11457. }
  11458. }
  11459. },
  11460. "catch": function(tryLoc) {
  11461. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  11462. var entry = this.tryEntries[i];
  11463. if (entry.tryLoc === tryLoc) {
  11464. var record = entry.completion;
  11465. if (record.type === "throw") {
  11466. var thrown = record.arg;
  11467. resetTryEntry(entry);
  11468. }
  11469. return thrown;
  11470. }
  11471. }
  11472. // The context.catch method must only be called with a location
  11473. // argument that corresponds to a known catch block.
  11474. throw new Error("illegal catch attempt");
  11475. },
  11476. delegateYield: function(iterable, resultName, nextLoc) {
  11477. this.delegate = {
  11478. iterator: values(iterable),
  11479. resultName: resultName,
  11480. nextLoc: nextLoc
  11481. };
  11482. if (this.method === "next") {
  11483. // Deliberately forget the last sent value so that we don't
  11484. // accidentally pass it on to the delegate.
  11485. this.arg = undefined;
  11486. }
  11487. return ContinueSentinel;
  11488. }
  11489. };
  11490. // Regardless of whether this script is executing as a CommonJS module
  11491. // or not, return the runtime object so that we can declare the variable
  11492. // regeneratorRuntime in the outer scope, which allows this module to be
  11493. // injected easily by `bin/regenerator --include-runtime script.js`.
  11494. return exports;
  11495. }(
  11496. // If this script is executing as a CommonJS module, use module.exports
  11497. // as the regeneratorRuntime namespace. Otherwise create a new empty
  11498. // object. Either way, the resulting object will be used to initialize
  11499. // the regeneratorRuntime variable at the top of this file.
  11500. true ? module.exports : 0
  11501. ));
  11502. try {
  11503. regeneratorRuntime = runtime;
  11504. } catch (accidentalStrictMode) {
  11505. // This module should not be running in strict mode, so the above
  11506. // assignment should always work unless something is misconfigured. Just
  11507. // in case runtime.js accidentally runs in strict mode, we can escape
  11508. // strict mode using a global Function call. This could conceivably fail
  11509. // if a Content Security Policy forbids using Function, but in that case
  11510. // the proper solution is to fix the accidental strict mode problem. If
  11511. // you've misconfigured your bundler to force strict mode and applied a
  11512. // CSP to forbid Function, and you're not willing to fix either of those
  11513. // problems, please detail your unique predicament in a GitHub issue.
  11514. Function("r", "regeneratorRuntime = r")(runtime);
  11515. }
  11516. /***/ }),
  11517. /***/ "./node_modules/rgbcolor/index.js":
  11518. /*!****************************************!*\
  11519. !*** ./node_modules/rgbcolor/index.js ***!
  11520. \****************************************/
  11521. /***/ ((module) => {
  11522. /*
  11523. Based on rgbcolor.js by Stoyan Stefanov <sstoo@gmail.com>
  11524. http://www.phpied.com/rgb-color-parser-in-javascript/
  11525. */
  11526. module.exports = function(color_string) {
  11527. this.ok = false;
  11528. this.alpha = 1.0;
  11529. // strip any leading #
  11530. if (color_string.charAt(0) == '#') { // remove # if any
  11531. color_string = color_string.substr(1,6);
  11532. }
  11533. color_string = color_string.replace(/ /g,'');
  11534. color_string = color_string.toLowerCase();
  11535. // before getting into regexps, try simple matches
  11536. // and overwrite the input
  11537. var simple_colors = {
  11538. aliceblue: 'f0f8ff',
  11539. antiquewhite: 'faebd7',
  11540. aqua: '00ffff',
  11541. aquamarine: '7fffd4',
  11542. azure: 'f0ffff',
  11543. beige: 'f5f5dc',
  11544. bisque: 'ffe4c4',
  11545. black: '000000',
  11546. blanchedalmond: 'ffebcd',
  11547. blue: '0000ff',
  11548. blueviolet: '8a2be2',
  11549. brown: 'a52a2a',
  11550. burlywood: 'deb887',
  11551. cadetblue: '5f9ea0',
  11552. chartreuse: '7fff00',
  11553. chocolate: 'd2691e',
  11554. coral: 'ff7f50',
  11555. cornflowerblue: '6495ed',
  11556. cornsilk: 'fff8dc',
  11557. crimson: 'dc143c',
  11558. cyan: '00ffff',
  11559. darkblue: '00008b',
  11560. darkcyan: '008b8b',
  11561. darkgoldenrod: 'b8860b',
  11562. darkgray: 'a9a9a9',
  11563. darkgreen: '006400',
  11564. darkkhaki: 'bdb76b',
  11565. darkmagenta: '8b008b',
  11566. darkolivegreen: '556b2f',
  11567. darkorange: 'ff8c00',
  11568. darkorchid: '9932cc',
  11569. darkred: '8b0000',
  11570. darksalmon: 'e9967a',
  11571. darkseagreen: '8fbc8f',
  11572. darkslateblue: '483d8b',
  11573. darkslategray: '2f4f4f',
  11574. darkturquoise: '00ced1',
  11575. darkviolet: '9400d3',
  11576. deeppink: 'ff1493',
  11577. deepskyblue: '00bfff',
  11578. dimgray: '696969',
  11579. dodgerblue: '1e90ff',
  11580. feldspar: 'd19275',
  11581. firebrick: 'b22222',
  11582. floralwhite: 'fffaf0',
  11583. forestgreen: '228b22',
  11584. fuchsia: 'ff00ff',
  11585. gainsboro: 'dcdcdc',
  11586. ghostwhite: 'f8f8ff',
  11587. gold: 'ffd700',
  11588. goldenrod: 'daa520',
  11589. gray: '808080',
  11590. green: '008000',
  11591. greenyellow: 'adff2f',
  11592. honeydew: 'f0fff0',
  11593. hotpink: 'ff69b4',
  11594. indianred : 'cd5c5c',
  11595. indigo : '4b0082',
  11596. ivory: 'fffff0',
  11597. khaki: 'f0e68c',
  11598. lavender: 'e6e6fa',
  11599. lavenderblush: 'fff0f5',
  11600. lawngreen: '7cfc00',
  11601. lemonchiffon: 'fffacd',
  11602. lightblue: 'add8e6',
  11603. lightcoral: 'f08080',
  11604. lightcyan: 'e0ffff',
  11605. lightgoldenrodyellow: 'fafad2',
  11606. lightgrey: 'd3d3d3',
  11607. lightgreen: '90ee90',
  11608. lightpink: 'ffb6c1',
  11609. lightsalmon: 'ffa07a',
  11610. lightseagreen: '20b2aa',
  11611. lightskyblue: '87cefa',
  11612. lightslateblue: '8470ff',
  11613. lightslategray: '778899',
  11614. lightsteelblue: 'b0c4de',
  11615. lightyellow: 'ffffe0',
  11616. lime: '00ff00',
  11617. limegreen: '32cd32',
  11618. linen: 'faf0e6',
  11619. magenta: 'ff00ff',
  11620. maroon: '800000',
  11621. mediumaquamarine: '66cdaa',
  11622. mediumblue: '0000cd',
  11623. mediumorchid: 'ba55d3',
  11624. mediumpurple: '9370d8',
  11625. mediumseagreen: '3cb371',
  11626. mediumslateblue: '7b68ee',
  11627. mediumspringgreen: '00fa9a',
  11628. mediumturquoise: '48d1cc',
  11629. mediumvioletred: 'c71585',
  11630. midnightblue: '191970',
  11631. mintcream: 'f5fffa',
  11632. mistyrose: 'ffe4e1',
  11633. moccasin: 'ffe4b5',
  11634. navajowhite: 'ffdead',
  11635. navy: '000080',
  11636. oldlace: 'fdf5e6',
  11637. olive: '808000',
  11638. olivedrab: '6b8e23',
  11639. orange: 'ffa500',
  11640. orangered: 'ff4500',
  11641. orchid: 'da70d6',
  11642. palegoldenrod: 'eee8aa',
  11643. palegreen: '98fb98',
  11644. paleturquoise: 'afeeee',
  11645. palevioletred: 'd87093',
  11646. papayawhip: 'ffefd5',
  11647. peachpuff: 'ffdab9',
  11648. peru: 'cd853f',
  11649. pink: 'ffc0cb',
  11650. plum: 'dda0dd',
  11651. powderblue: 'b0e0e6',
  11652. purple: '800080',
  11653. rebeccapurple: '663399',
  11654. red: 'ff0000',
  11655. rosybrown: 'bc8f8f',
  11656. royalblue: '4169e1',
  11657. saddlebrown: '8b4513',
  11658. salmon: 'fa8072',
  11659. sandybrown: 'f4a460',
  11660. seagreen: '2e8b57',
  11661. seashell: 'fff5ee',
  11662. sienna: 'a0522d',
  11663. silver: 'c0c0c0',
  11664. skyblue: '87ceeb',
  11665. slateblue: '6a5acd',
  11666. slategray: '708090',
  11667. snow: 'fffafa',
  11668. springgreen: '00ff7f',
  11669. steelblue: '4682b4',
  11670. tan: 'd2b48c',
  11671. teal: '008080',
  11672. thistle: 'd8bfd8',
  11673. tomato: 'ff6347',
  11674. turquoise: '40e0d0',
  11675. violet: 'ee82ee',
  11676. violetred: 'd02090',
  11677. wheat: 'f5deb3',
  11678. white: 'ffffff',
  11679. whitesmoke: 'f5f5f5',
  11680. yellow: 'ffff00',
  11681. yellowgreen: '9acd32'
  11682. };
  11683. color_string = simple_colors[color_string] || color_string;
  11684. // emd of simple type-in colors
  11685. // array of color definition objects
  11686. var color_defs = [
  11687. {
  11688. re: /^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*((?:\d?\.)?\d)\)$/,
  11689. example: ['rgba(123, 234, 45, 0.8)', 'rgba(255,234,245,1.0)'],
  11690. process: function (bits){
  11691. return [
  11692. parseInt(bits[1]),
  11693. parseInt(bits[2]),
  11694. parseInt(bits[3]),
  11695. parseFloat(bits[4])
  11696. ];
  11697. }
  11698. },
  11699. {
  11700. re: /^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,
  11701. example: ['rgb(123, 234, 45)', 'rgb(255,234,245)'],
  11702. process: function (bits){
  11703. return [
  11704. parseInt(bits[1]),
  11705. parseInt(bits[2]),
  11706. parseInt(bits[3])
  11707. ];
  11708. }
  11709. },
  11710. {
  11711. re: /^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
  11712. example: ['#00ff00', '336699'],
  11713. process: function (bits){
  11714. return [
  11715. parseInt(bits[1], 16),
  11716. parseInt(bits[2], 16),
  11717. parseInt(bits[3], 16)
  11718. ];
  11719. }
  11720. },
  11721. {
  11722. re: /^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
  11723. example: ['#fb0', 'f0f'],
  11724. process: function (bits){
  11725. return [
  11726. parseInt(bits[1] + bits[1], 16),
  11727. parseInt(bits[2] + bits[2], 16),
  11728. parseInt(bits[3] + bits[3], 16)
  11729. ];
  11730. }
  11731. }
  11732. ];
  11733. // search through the definitions to find a match
  11734. for (var i = 0; i < color_defs.length; i++) {
  11735. var re = color_defs[i].re;
  11736. var processor = color_defs[i].process;
  11737. var bits = re.exec(color_string);
  11738. if (bits) {
  11739. var channels = processor(bits);
  11740. this.r = channels[0];
  11741. this.g = channels[1];
  11742. this.b = channels[2];
  11743. if (channels.length > 3) {
  11744. this.alpha = channels[3];
  11745. }
  11746. this.ok = true;
  11747. }
  11748. }
  11749. // validate/cleanup values
  11750. this.r = (this.r < 0 || isNaN(this.r)) ? 0 : ((this.r > 255) ? 255 : this.r);
  11751. this.g = (this.g < 0 || isNaN(this.g)) ? 0 : ((this.g > 255) ? 255 : this.g);
  11752. this.b = (this.b < 0 || isNaN(this.b)) ? 0 : ((this.b > 255) ? 255 : this.b);
  11753. this.alpha = (this.alpha < 0) ? 0 : ((this.alpha > 1.0 || isNaN(this.alpha)) ? 1.0 : this.alpha);
  11754. // some getters
  11755. this.toRGB = function () {
  11756. return 'rgb(' + this.r + ', ' + this.g + ', ' + this.b + ')';
  11757. }
  11758. this.toRGBA = function () {
  11759. return 'rgba(' + this.r + ', ' + this.g + ', ' + this.b + ', ' + this.alpha + ')';
  11760. }
  11761. this.toHex = function () {
  11762. var r = this.r.toString(16);
  11763. var g = this.g.toString(16);
  11764. var b = this.b.toString(16);
  11765. if (r.length == 1) r = '0' + r;
  11766. if (g.length == 1) g = '0' + g;
  11767. if (b.length == 1) b = '0' + b;
  11768. return '#' + r + g + b;
  11769. }
  11770. // help
  11771. this.getHelpXML = function () {
  11772. var examples = new Array();
  11773. // add regexps
  11774. for (var i = 0; i < color_defs.length; i++) {
  11775. var example = color_defs[i].example;
  11776. for (var j = 0; j < example.length; j++) {
  11777. examples[examples.length] = example[j];
  11778. }
  11779. }
  11780. // add type-in colors
  11781. for (var sc in simple_colors) {
  11782. examples[examples.length] = sc;
  11783. }
  11784. var xml = document.createElement('ul');
  11785. xml.setAttribute('id', 'rgbcolor-examples');
  11786. for (var i = 0; i < examples.length; i++) {
  11787. try {
  11788. var list_item = document.createElement('li');
  11789. var list_color = new RGBColor(examples[i]);
  11790. var example_div = document.createElement('div');
  11791. example_div.style.cssText =
  11792. 'margin: 3px; '
  11793. + 'border: 1px solid black; '
  11794. + 'background:' + list_color.toHex() + '; '
  11795. + 'color:' + list_color.toHex()
  11796. ;
  11797. example_div.appendChild(document.createTextNode('test'));
  11798. var list_item_value = document.createTextNode(
  11799. ' ' + examples[i] + ' -> ' + list_color.toRGB() + ' -> ' + list_color.toHex()
  11800. );
  11801. list_item.appendChild(example_div);
  11802. list_item.appendChild(list_item_value);
  11803. xml.appendChild(list_item);
  11804. } catch(e){}
  11805. }
  11806. return xml;
  11807. }
  11808. }
  11809. /***/ }),
  11810. /***/ "./node_modules/stackblur-canvas/dist/stackblur-es.js":
  11811. /*!************************************************************!*\
  11812. !*** ./node_modules/stackblur-canvas/dist/stackblur-es.js ***!
  11813. \************************************************************/
  11814. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  11815. "use strict";
  11816. __webpack_require__.r(__webpack_exports__);
  11817. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  11818. /* harmony export */ "BlurStack": () => (/* binding */ BlurStack),
  11819. /* harmony export */ "canvasRGB": () => (/* binding */ processCanvasRGB),
  11820. /* harmony export */ "canvasRGBA": () => (/* binding */ processCanvasRGBA),
  11821. /* harmony export */ "image": () => (/* binding */ processImage),
  11822. /* harmony export */ "imageDataRGB": () => (/* binding */ processImageDataRGB),
  11823. /* harmony export */ "imageDataRGBA": () => (/* binding */ processImageDataRGBA)
  11824. /* harmony export */ });
  11825. function _typeof(obj) {
  11826. "@babel/helpers - typeof";
  11827. if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
  11828. _typeof = function (obj) {
  11829. return typeof obj;
  11830. };
  11831. } else {
  11832. _typeof = function (obj) {
  11833. return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
  11834. };
  11835. }
  11836. return _typeof(obj);
  11837. }
  11838. function _classCallCheck(instance, Constructor) {
  11839. if (!(instance instanceof Constructor)) {
  11840. throw new TypeError("Cannot call a class as a function");
  11841. }
  11842. }
  11843. /* eslint-disable no-bitwise -- used for calculations */
  11844. /* eslint-disable unicorn/prefer-query-selector -- aiming at
  11845. backward-compatibility */
  11846. /**
  11847. * StackBlur - a fast almost Gaussian Blur For Canvas
  11848. *
  11849. * In case you find this class useful - especially in commercial projects -
  11850. * I am not totally unhappy for a small donation to my PayPal account
  11851. * mario@quasimondo.de
  11852. *
  11853. * Or support me on flattr:
  11854. * {@link https://flattr.com/thing/72791/StackBlur-a-fast-almost-Gaussian-Blur-Effect-for-CanvasJavascript}.
  11855. *
  11856. * @module StackBlur
  11857. * @author Mario Klingemann
  11858. * Contact: mario@quasimondo.com
  11859. * Website: {@link http://www.quasimondo.com/StackBlurForCanvas/StackBlurDemo.html}
  11860. * Twitter: @quasimondo
  11861. *
  11862. * @copyright (c) 2010 Mario Klingemann
  11863. *
  11864. * Permission is hereby granted, free of charge, to any person
  11865. * obtaining a copy of this software and associated documentation
  11866. * files (the "Software"), to deal in the Software without
  11867. * restriction, including without limitation the rights to use,
  11868. * copy, modify, merge, publish, distribute, sublicense, and/or sell
  11869. * copies of the Software, and to permit persons to whom the
  11870. * Software is furnished to do so, subject to the following
  11871. * conditions:
  11872. *
  11873. * The above copyright notice and this permission notice shall be
  11874. * included in all copies or substantial portions of the Software.
  11875. *
  11876. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  11877. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  11878. * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  11879. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  11880. * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  11881. * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  11882. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  11883. * OTHER DEALINGS IN THE SOFTWARE.
  11884. */
  11885. var mulTable = [512, 512, 456, 512, 328, 456, 335, 512, 405, 328, 271, 456, 388, 335, 292, 512, 454, 405, 364, 328, 298, 271, 496, 456, 420, 388, 360, 335, 312, 292, 273, 512, 482, 454, 428, 405, 383, 364, 345, 328, 312, 298, 284, 271, 259, 496, 475, 456, 437, 420, 404, 388, 374, 360, 347, 335, 323, 312, 302, 292, 282, 273, 265, 512, 497, 482, 468, 454, 441, 428, 417, 405, 394, 383, 373, 364, 354, 345, 337, 328, 320, 312, 305, 298, 291, 284, 278, 271, 265, 259, 507, 496, 485, 475, 465, 456, 446, 437, 428, 420, 412, 404, 396, 388, 381, 374, 367, 360, 354, 347, 341, 335, 329, 323, 318, 312, 307, 302, 297, 292, 287, 282, 278, 273, 269, 265, 261, 512, 505, 497, 489, 482, 475, 468, 461, 454, 447, 441, 435, 428, 422, 417, 411, 405, 399, 394, 389, 383, 378, 373, 368, 364, 359, 354, 350, 345, 341, 337, 332, 328, 324, 320, 316, 312, 309, 305, 301, 298, 294, 291, 287, 284, 281, 278, 274, 271, 268, 265, 262, 259, 257, 507, 501, 496, 491, 485, 480, 475, 470, 465, 460, 456, 451, 446, 442, 437, 433, 428, 424, 420, 416, 412, 408, 404, 400, 396, 392, 388, 385, 381, 377, 374, 370, 367, 363, 360, 357, 354, 350, 347, 344, 341, 338, 335, 332, 329, 326, 323, 320, 318, 315, 312, 310, 307, 304, 302, 299, 297, 294, 292, 289, 287, 285, 282, 280, 278, 275, 273, 271, 269, 267, 265, 263, 261, 259];
  11886. var shgTable = [9, 11, 12, 13, 13, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24];
  11887. /**
  11888. * @param {string|HTMLImageElement} img
  11889. * @param {string|HTMLCanvasElement} canvas
  11890. * @param {Float} radius
  11891. * @param {boolean} blurAlphaChannel
  11892. * @param {boolean} useOffset
  11893. * @param {boolean} skipStyles
  11894. * @returns {undefined}
  11895. */
  11896. function processImage(img, canvas, radius, blurAlphaChannel, useOffset, skipStyles) {
  11897. if (typeof img === 'string') {
  11898. img = document.getElementById(img);
  11899. }
  11900. if (!img || !('naturalWidth' in img)) {
  11901. return;
  11902. }
  11903. var dimensionType = useOffset ? 'offset' : 'natural';
  11904. var w = img[dimensionType + 'Width'];
  11905. var h = img[dimensionType + 'Height'];
  11906. if (typeof canvas === 'string') {
  11907. canvas = document.getElementById(canvas);
  11908. }
  11909. if (!canvas || !('getContext' in canvas)) {
  11910. return;
  11911. }
  11912. if (!skipStyles) {
  11913. canvas.style.width = w + 'px';
  11914. canvas.style.height = h + 'px';
  11915. }
  11916. canvas.width = w;
  11917. canvas.height = h;
  11918. var context = canvas.getContext('2d');
  11919. context.clearRect(0, 0, w, h);
  11920. context.drawImage(img, 0, 0, img.naturalWidth, img.naturalHeight, 0, 0, w, h);
  11921. if (isNaN(radius) || radius < 1) {
  11922. return;
  11923. }
  11924. if (blurAlphaChannel) {
  11925. processCanvasRGBA(canvas, 0, 0, w, h, radius);
  11926. } else {
  11927. processCanvasRGB(canvas, 0, 0, w, h, radius);
  11928. }
  11929. }
  11930. /**
  11931. * @param {string|HTMLCanvasElement} canvas
  11932. * @param {Integer} topX
  11933. * @param {Integer} topY
  11934. * @param {Integer} width
  11935. * @param {Integer} height
  11936. * @throws {Error|TypeError}
  11937. * @returns {ImageData} See {@link https://html.spec.whatwg.org/multipage/canvas.html#imagedata}
  11938. */
  11939. function getImageDataFromCanvas(canvas, topX, topY, width, height) {
  11940. if (typeof canvas === 'string') {
  11941. canvas = document.getElementById(canvas);
  11942. }
  11943. if (!canvas || _typeof(canvas) !== 'object' || !('getContext' in canvas)) {
  11944. throw new TypeError('Expecting canvas with `getContext` method ' + 'in processCanvasRGB(A) calls!');
  11945. }
  11946. var context = canvas.getContext('2d');
  11947. try {
  11948. return context.getImageData(topX, topY, width, height);
  11949. } catch (e) {
  11950. throw new Error('unable to access image data: ' + e);
  11951. }
  11952. }
  11953. /**
  11954. * @param {HTMLCanvasElement} canvas
  11955. * @param {Integer} topX
  11956. * @param {Integer} topY
  11957. * @param {Integer} width
  11958. * @param {Integer} height
  11959. * @param {Float} radius
  11960. * @returns {undefined}
  11961. */
  11962. function processCanvasRGBA(canvas, topX, topY, width, height, radius) {
  11963. if (isNaN(radius) || radius < 1) {
  11964. return;
  11965. }
  11966. radius |= 0;
  11967. var imageData = getImageDataFromCanvas(canvas, topX, topY, width, height);
  11968. imageData = processImageDataRGBA(imageData, topX, topY, width, height, radius);
  11969. canvas.getContext('2d').putImageData(imageData, topX, topY);
  11970. }
  11971. /**
  11972. * @param {ImageData} imageData
  11973. * @param {Integer} topX
  11974. * @param {Integer} topY
  11975. * @param {Integer} width
  11976. * @param {Integer} height
  11977. * @param {Float} radius
  11978. * @returns {ImageData}
  11979. */
  11980. function processImageDataRGBA(imageData, topX, topY, width, height, radius) {
  11981. var pixels = imageData.data;
  11982. var div = 2 * radius + 1; // const w4 = width << 2;
  11983. var widthMinus1 = width - 1;
  11984. var heightMinus1 = height - 1;
  11985. var radiusPlus1 = radius + 1;
  11986. var sumFactor = radiusPlus1 * (radiusPlus1 + 1) / 2;
  11987. var stackStart = new BlurStack();
  11988. var stack = stackStart;
  11989. var stackEnd;
  11990. for (var i = 1; i < div; i++) {
  11991. stack = stack.next = new BlurStack();
  11992. if (i === radiusPlus1) {
  11993. stackEnd = stack;
  11994. }
  11995. }
  11996. stack.next = stackStart;
  11997. var stackIn = null,
  11998. stackOut = null,
  11999. yw = 0,
  12000. yi = 0;
  12001. var mulSum = mulTable[radius];
  12002. var shgSum = shgTable[radius];
  12003. for (var y = 0; y < height; y++) {
  12004. stack = stackStart;
  12005. var pr = pixels[yi],
  12006. pg = pixels[yi + 1],
  12007. pb = pixels[yi + 2],
  12008. pa = pixels[yi + 3];
  12009. for (var _i = 0; _i < radiusPlus1; _i++) {
  12010. stack.r = pr;
  12011. stack.g = pg;
  12012. stack.b = pb;
  12013. stack.a = pa;
  12014. stack = stack.next;
  12015. }
  12016. var rInSum = 0,
  12017. gInSum = 0,
  12018. bInSum = 0,
  12019. aInSum = 0,
  12020. rOutSum = radiusPlus1 * pr,
  12021. gOutSum = radiusPlus1 * pg,
  12022. bOutSum = radiusPlus1 * pb,
  12023. aOutSum = radiusPlus1 * pa,
  12024. rSum = sumFactor * pr,
  12025. gSum = sumFactor * pg,
  12026. bSum = sumFactor * pb,
  12027. aSum = sumFactor * pa;
  12028. for (var _i2 = 1; _i2 < radiusPlus1; _i2++) {
  12029. var p = yi + ((widthMinus1 < _i2 ? widthMinus1 : _i2) << 2);
  12030. var r = pixels[p],
  12031. g = pixels[p + 1],
  12032. b = pixels[p + 2],
  12033. a = pixels[p + 3];
  12034. var rbs = radiusPlus1 - _i2;
  12035. rSum += (stack.r = r) * rbs;
  12036. gSum += (stack.g = g) * rbs;
  12037. bSum += (stack.b = b) * rbs;
  12038. aSum += (stack.a = a) * rbs;
  12039. rInSum += r;
  12040. gInSum += g;
  12041. bInSum += b;
  12042. aInSum += a;
  12043. stack = stack.next;
  12044. }
  12045. stackIn = stackStart;
  12046. stackOut = stackEnd;
  12047. for (var x = 0; x < width; x++) {
  12048. var paInitial = aSum * mulSum >> shgSum;
  12049. pixels[yi + 3] = paInitial;
  12050. if (paInitial !== 0) {
  12051. var _a2 = 255 / paInitial;
  12052. pixels[yi] = (rSum * mulSum >> shgSum) * _a2;
  12053. pixels[yi + 1] = (gSum * mulSum >> shgSum) * _a2;
  12054. pixels[yi + 2] = (bSum * mulSum >> shgSum) * _a2;
  12055. } else {
  12056. pixels[yi] = pixels[yi + 1] = pixels[yi + 2] = 0;
  12057. }
  12058. rSum -= rOutSum;
  12059. gSum -= gOutSum;
  12060. bSum -= bOutSum;
  12061. aSum -= aOutSum;
  12062. rOutSum -= stackIn.r;
  12063. gOutSum -= stackIn.g;
  12064. bOutSum -= stackIn.b;
  12065. aOutSum -= stackIn.a;
  12066. var _p = x + radius + 1;
  12067. _p = yw + (_p < widthMinus1 ? _p : widthMinus1) << 2;
  12068. rInSum += stackIn.r = pixels[_p];
  12069. gInSum += stackIn.g = pixels[_p + 1];
  12070. bInSum += stackIn.b = pixels[_p + 2];
  12071. aInSum += stackIn.a = pixels[_p + 3];
  12072. rSum += rInSum;
  12073. gSum += gInSum;
  12074. bSum += bInSum;
  12075. aSum += aInSum;
  12076. stackIn = stackIn.next;
  12077. var _stackOut = stackOut,
  12078. _r = _stackOut.r,
  12079. _g = _stackOut.g,
  12080. _b = _stackOut.b,
  12081. _a = _stackOut.a;
  12082. rOutSum += _r;
  12083. gOutSum += _g;
  12084. bOutSum += _b;
  12085. aOutSum += _a;
  12086. rInSum -= _r;
  12087. gInSum -= _g;
  12088. bInSum -= _b;
  12089. aInSum -= _a;
  12090. stackOut = stackOut.next;
  12091. yi += 4;
  12092. }
  12093. yw += width;
  12094. }
  12095. for (var _x = 0; _x < width; _x++) {
  12096. yi = _x << 2;
  12097. var _pr = pixels[yi],
  12098. _pg = pixels[yi + 1],
  12099. _pb = pixels[yi + 2],
  12100. _pa = pixels[yi + 3],
  12101. _rOutSum = radiusPlus1 * _pr,
  12102. _gOutSum = radiusPlus1 * _pg,
  12103. _bOutSum = radiusPlus1 * _pb,
  12104. _aOutSum = radiusPlus1 * _pa,
  12105. _rSum = sumFactor * _pr,
  12106. _gSum = sumFactor * _pg,
  12107. _bSum = sumFactor * _pb,
  12108. _aSum = sumFactor * _pa;
  12109. stack = stackStart;
  12110. for (var _i3 = 0; _i3 < radiusPlus1; _i3++) {
  12111. stack.r = _pr;
  12112. stack.g = _pg;
  12113. stack.b = _pb;
  12114. stack.a = _pa;
  12115. stack = stack.next;
  12116. }
  12117. var yp = width;
  12118. var _gInSum = 0,
  12119. _bInSum = 0,
  12120. _aInSum = 0,
  12121. _rInSum = 0;
  12122. for (var _i4 = 1; _i4 <= radius; _i4++) {
  12123. yi = yp + _x << 2;
  12124. var _rbs = radiusPlus1 - _i4;
  12125. _rSum += (stack.r = _pr = pixels[yi]) * _rbs;
  12126. _gSum += (stack.g = _pg = pixels[yi + 1]) * _rbs;
  12127. _bSum += (stack.b = _pb = pixels[yi + 2]) * _rbs;
  12128. _aSum += (stack.a = _pa = pixels[yi + 3]) * _rbs;
  12129. _rInSum += _pr;
  12130. _gInSum += _pg;
  12131. _bInSum += _pb;
  12132. _aInSum += _pa;
  12133. stack = stack.next;
  12134. if (_i4 < heightMinus1) {
  12135. yp += width;
  12136. }
  12137. }
  12138. yi = _x;
  12139. stackIn = stackStart;
  12140. stackOut = stackEnd;
  12141. for (var _y = 0; _y < height; _y++) {
  12142. var _p2 = yi << 2;
  12143. pixels[_p2 + 3] = _pa = _aSum * mulSum >> shgSum;
  12144. if (_pa > 0) {
  12145. _pa = 255 / _pa;
  12146. pixels[_p2] = (_rSum * mulSum >> shgSum) * _pa;
  12147. pixels[_p2 + 1] = (_gSum * mulSum >> shgSum) * _pa;
  12148. pixels[_p2 + 2] = (_bSum * mulSum >> shgSum) * _pa;
  12149. } else {
  12150. pixels[_p2] = pixels[_p2 + 1] = pixels[_p2 + 2] = 0;
  12151. }
  12152. _rSum -= _rOutSum;
  12153. _gSum -= _gOutSum;
  12154. _bSum -= _bOutSum;
  12155. _aSum -= _aOutSum;
  12156. _rOutSum -= stackIn.r;
  12157. _gOutSum -= stackIn.g;
  12158. _bOutSum -= stackIn.b;
  12159. _aOutSum -= stackIn.a;
  12160. _p2 = _x + ((_p2 = _y + radiusPlus1) < heightMinus1 ? _p2 : heightMinus1) * width << 2;
  12161. _rSum += _rInSum += stackIn.r = pixels[_p2];
  12162. _gSum += _gInSum += stackIn.g = pixels[_p2 + 1];
  12163. _bSum += _bInSum += stackIn.b = pixels[_p2 + 2];
  12164. _aSum += _aInSum += stackIn.a = pixels[_p2 + 3];
  12165. stackIn = stackIn.next;
  12166. _rOutSum += _pr = stackOut.r;
  12167. _gOutSum += _pg = stackOut.g;
  12168. _bOutSum += _pb = stackOut.b;
  12169. _aOutSum += _pa = stackOut.a;
  12170. _rInSum -= _pr;
  12171. _gInSum -= _pg;
  12172. _bInSum -= _pb;
  12173. _aInSum -= _pa;
  12174. stackOut = stackOut.next;
  12175. yi += width;
  12176. }
  12177. }
  12178. return imageData;
  12179. }
  12180. /**
  12181. * @param {HTMLCanvasElement} canvas
  12182. * @param {Integer} topX
  12183. * @param {Integer} topY
  12184. * @param {Integer} width
  12185. * @param {Integer} height
  12186. * @param {Float} radius
  12187. * @returns {undefined}
  12188. */
  12189. function processCanvasRGB(canvas, topX, topY, width, height, radius) {
  12190. if (isNaN(radius) || radius < 1) {
  12191. return;
  12192. }
  12193. radius |= 0;
  12194. var imageData = getImageDataFromCanvas(canvas, topX, topY, width, height);
  12195. imageData = processImageDataRGB(imageData, topX, topY, width, height, radius);
  12196. canvas.getContext('2d').putImageData(imageData, topX, topY);
  12197. }
  12198. /**
  12199. * @param {ImageData} imageData
  12200. * @param {Integer} topX
  12201. * @param {Integer} topY
  12202. * @param {Integer} width
  12203. * @param {Integer} height
  12204. * @param {Float} radius
  12205. * @returns {ImageData}
  12206. */
  12207. function processImageDataRGB(imageData, topX, topY, width, height, radius) {
  12208. var pixels = imageData.data;
  12209. var div = 2 * radius + 1; // const w4 = width << 2;
  12210. var widthMinus1 = width - 1;
  12211. var heightMinus1 = height - 1;
  12212. var radiusPlus1 = radius + 1;
  12213. var sumFactor = radiusPlus1 * (radiusPlus1 + 1) / 2;
  12214. var stackStart = new BlurStack();
  12215. var stack = stackStart;
  12216. var stackEnd;
  12217. for (var i = 1; i < div; i++) {
  12218. stack = stack.next = new BlurStack();
  12219. if (i === radiusPlus1) {
  12220. stackEnd = stack;
  12221. }
  12222. }
  12223. stack.next = stackStart;
  12224. var stackIn = null;
  12225. var stackOut = null;
  12226. var mulSum = mulTable[radius];
  12227. var shgSum = shgTable[radius];
  12228. var p, rbs;
  12229. var yw = 0,
  12230. yi = 0;
  12231. for (var y = 0; y < height; y++) {
  12232. var pr = pixels[yi],
  12233. pg = pixels[yi + 1],
  12234. pb = pixels[yi + 2],
  12235. rOutSum = radiusPlus1 * pr,
  12236. gOutSum = radiusPlus1 * pg,
  12237. bOutSum = radiusPlus1 * pb,
  12238. rSum = sumFactor * pr,
  12239. gSum = sumFactor * pg,
  12240. bSum = sumFactor * pb;
  12241. stack = stackStart;
  12242. for (var _i5 = 0; _i5 < radiusPlus1; _i5++) {
  12243. stack.r = pr;
  12244. stack.g = pg;
  12245. stack.b = pb;
  12246. stack = stack.next;
  12247. }
  12248. var rInSum = 0,
  12249. gInSum = 0,
  12250. bInSum = 0;
  12251. for (var _i6 = 1; _i6 < radiusPlus1; _i6++) {
  12252. p = yi + ((widthMinus1 < _i6 ? widthMinus1 : _i6) << 2);
  12253. rSum += (stack.r = pr = pixels[p]) * (rbs = radiusPlus1 - _i6);
  12254. gSum += (stack.g = pg = pixels[p + 1]) * rbs;
  12255. bSum += (stack.b = pb = pixels[p + 2]) * rbs;
  12256. rInSum += pr;
  12257. gInSum += pg;
  12258. bInSum += pb;
  12259. stack = stack.next;
  12260. }
  12261. stackIn = stackStart;
  12262. stackOut = stackEnd;
  12263. for (var x = 0; x < width; x++) {
  12264. pixels[yi] = rSum * mulSum >> shgSum;
  12265. pixels[yi + 1] = gSum * mulSum >> shgSum;
  12266. pixels[yi + 2] = bSum * mulSum >> shgSum;
  12267. rSum -= rOutSum;
  12268. gSum -= gOutSum;
  12269. bSum -= bOutSum;
  12270. rOutSum -= stackIn.r;
  12271. gOutSum -= stackIn.g;
  12272. bOutSum -= stackIn.b;
  12273. p = yw + ((p = x + radius + 1) < widthMinus1 ? p : widthMinus1) << 2;
  12274. rInSum += stackIn.r = pixels[p];
  12275. gInSum += stackIn.g = pixels[p + 1];
  12276. bInSum += stackIn.b = pixels[p + 2];
  12277. rSum += rInSum;
  12278. gSum += gInSum;
  12279. bSum += bInSum;
  12280. stackIn = stackIn.next;
  12281. rOutSum += pr = stackOut.r;
  12282. gOutSum += pg = stackOut.g;
  12283. bOutSum += pb = stackOut.b;
  12284. rInSum -= pr;
  12285. gInSum -= pg;
  12286. bInSum -= pb;
  12287. stackOut = stackOut.next;
  12288. yi += 4;
  12289. }
  12290. yw += width;
  12291. }
  12292. for (var _x2 = 0; _x2 < width; _x2++) {
  12293. yi = _x2 << 2;
  12294. var _pr2 = pixels[yi],
  12295. _pg2 = pixels[yi + 1],
  12296. _pb2 = pixels[yi + 2],
  12297. _rOutSum2 = radiusPlus1 * _pr2,
  12298. _gOutSum2 = radiusPlus1 * _pg2,
  12299. _bOutSum2 = radiusPlus1 * _pb2,
  12300. _rSum2 = sumFactor * _pr2,
  12301. _gSum2 = sumFactor * _pg2,
  12302. _bSum2 = sumFactor * _pb2;
  12303. stack = stackStart;
  12304. for (var _i7 = 0; _i7 < radiusPlus1; _i7++) {
  12305. stack.r = _pr2;
  12306. stack.g = _pg2;
  12307. stack.b = _pb2;
  12308. stack = stack.next;
  12309. }
  12310. var _rInSum2 = 0,
  12311. _gInSum2 = 0,
  12312. _bInSum2 = 0;
  12313. for (var _i8 = 1, yp = width; _i8 <= radius; _i8++) {
  12314. yi = yp + _x2 << 2;
  12315. _rSum2 += (stack.r = _pr2 = pixels[yi]) * (rbs = radiusPlus1 - _i8);
  12316. _gSum2 += (stack.g = _pg2 = pixels[yi + 1]) * rbs;
  12317. _bSum2 += (stack.b = _pb2 = pixels[yi + 2]) * rbs;
  12318. _rInSum2 += _pr2;
  12319. _gInSum2 += _pg2;
  12320. _bInSum2 += _pb2;
  12321. stack = stack.next;
  12322. if (_i8 < heightMinus1) {
  12323. yp += width;
  12324. }
  12325. }
  12326. yi = _x2;
  12327. stackIn = stackStart;
  12328. stackOut = stackEnd;
  12329. for (var _y2 = 0; _y2 < height; _y2++) {
  12330. p = yi << 2;
  12331. pixels[p] = _rSum2 * mulSum >> shgSum;
  12332. pixels[p + 1] = _gSum2 * mulSum >> shgSum;
  12333. pixels[p + 2] = _bSum2 * mulSum >> shgSum;
  12334. _rSum2 -= _rOutSum2;
  12335. _gSum2 -= _gOutSum2;
  12336. _bSum2 -= _bOutSum2;
  12337. _rOutSum2 -= stackIn.r;
  12338. _gOutSum2 -= stackIn.g;
  12339. _bOutSum2 -= stackIn.b;
  12340. p = _x2 + ((p = _y2 + radiusPlus1) < heightMinus1 ? p : heightMinus1) * width << 2;
  12341. _rSum2 += _rInSum2 += stackIn.r = pixels[p];
  12342. _gSum2 += _gInSum2 += stackIn.g = pixels[p + 1];
  12343. _bSum2 += _bInSum2 += stackIn.b = pixels[p + 2];
  12344. stackIn = stackIn.next;
  12345. _rOutSum2 += _pr2 = stackOut.r;
  12346. _gOutSum2 += _pg2 = stackOut.g;
  12347. _bOutSum2 += _pb2 = stackOut.b;
  12348. _rInSum2 -= _pr2;
  12349. _gInSum2 -= _pg2;
  12350. _bInSum2 -= _pb2;
  12351. stackOut = stackOut.next;
  12352. yi += width;
  12353. }
  12354. }
  12355. return imageData;
  12356. }
  12357. /**
  12358. *
  12359. */
  12360. var BlurStack =
  12361. /**
  12362. * Set properties.
  12363. */
  12364. function BlurStack() {
  12365. _classCallCheck(this, BlurStack);
  12366. this.r = 0;
  12367. this.g = 0;
  12368. this.b = 0;
  12369. this.a = 0;
  12370. this.next = null;
  12371. };
  12372. /***/ })
  12373. }]);
  12374. //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvQGFtY2hhcnRzL2FtY2hhcnRzNC8uaW50ZXJuYWwvY2FudmcvaW5kZXguanMiLCJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL0BiYWJlbC9ydW50aW1lL2hlbHBlcnMvZXNtL2FycmF5TGlrZVRvQXJyYXkuanMiLCJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL0BiYWJlbC9ydW50aW1lL2hlbHBlcnMvZXNtL2FycmF5V2l0aEhvbGVzLmpzIiwid2VicGFjazovLy8uL25vZGVfbW9kdWxlcy9AYmFiZWwvcnVudGltZS9oZWxwZXJzL2VzbS9hcnJheVdpdGhvdXRIb2xlcy5qcyIsIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvQGJhYmVsL3J1bnRpbWUvaGVscGVycy9lc20vYXNzZXJ0VGhpc0luaXRpYWxpemVkLmpzIiw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gZXJyLCByZXNvbHZlLCByZWplY3QpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgcmV0dXJuIFByb21pc2VJbXBsLnJlc29sdmUodmFsdWUpLnRoZW4oZnVuY3Rpb24gKHVud3JhcHBlZCkge1xuICAgICAgICAgICAgLy8gV2hlbiBhIHlpZWxkZWQgUHJvbWlzZSBpcyByZXNvbHZlZCwgaXRzIGZpbmFsIHZhbHVlIGJlY29tZXNcbiAgICAgICAgICAgIC8vIHRoZSAudmFsdWUgb2YgdGhlIFByb21pc2U8e3ZhbHVlLGRvbmV9PiByZXN1bHQgZm9yIHRoZVxuICAgICAgICAgICAgLy8gY3VycmVudCBpdGVyYXRpb24uXG4gICAgICAgICAgICByZXN1bHQudmFsdWUgPSB1bndyYXBwZWQ7XG4gICAgICAgICAgICByZXNvbHZlKHJlc3VsdCk7XG4gICAgICAgICAgfSwgZnVuY3Rpb24gKGVycm9yKSB7XG4gICAgICAgICAgICAvLyBJZiBhIHJlamVjdGVkIFByb21pc2Ugd2FzIHlpZWxkZWQsIHRocm93IHRoZSByZWplY3Rpb24gYmFja1xuICAgICAgICAgICAgLy8gaW50byB0aGUgYXN5bmMgZ2VuZXJhdG9yIGZ1bmN0aW9uIHNvIGl0IGNhbiBiZSBoYW5kbGVkIHRoZXJlLlxuICAgICAgICAgICAgcmV0dXJuIGludm9rZShcInRocm93XCIsIGVycm9yLCByZXNvbHZlLCByZWplY3QpO1xuICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIHZhciBwcmV2aW91c1Byb21pc2U7XG5cbiAgICAgIGZ1bmN0aW9uIGVucXVldWUobWV0aG9kLCBhcmcpIHtcbiAgICAgICAgZnVuY3Rpb24gY2FsbEludm9rZVdpdGhNZXRob2RBbmRBcmcoKSB7XG4gICAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlSW1wbChmdW5jdGlvbiAocmVzb2x2ZSwgcmVqZWN0KSB7XG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gIC8vIFNldHRpbmcgY29udGV4dC5fc2VudCBmb3IgbGVnYWN5IHN1cHBvcnQgb2YgQmFiZWwnc1xuICAgICAgICAgICAgLy8gZnVuY3Rpb24uc2VudCBpbXBsZW1lbnRhdGlvbi5cbiAgICAgICAgICAgIGNvbnRleHQuc2VudCA9IGNvbnRleHQuX3NlbnQgPSBjb250ZXh0LmFyZztcbiAgICAgICAgICB9IGVsc2UgaWYgKGNvbnRleHQubWV0aG9kID09PSBcInRocm93XCIpIHtcbiAgICAgICAgICAgIGlmIChzdGF0ZSA9PT0gR2VuU3RhdGVTdXNwZW5kZWRTdGFydCkge1xuICAgICAgICAgICAgICBzdGF0ZSA9IEdlblN0YXRlQ29tcGxldGVkO1xuICAgICAgICAgICAgICB0aHJvdyBjb250ZXh0LmFyZztcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgY29udGV4dC5kaXNwYXRjaEV4Y2VwdGlvbihjb250ZXh0LmFyZyk7XG4gICAgICAgICAgfSBlbHNlIGlmIChjb250ZXh0Lm1ldGhvZCA9PT0gXCJyZXR1cm5cIikge1xuICAgICAgICAgICAgY29udGV4dC5hYnJ1cHQoXCJyZXR1cm5cIiwgY29udGV4dC5hcmcpO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIHN0YXRlID0gR2VuU3RhdGVFeGVjdXRpbmc7XG4gICAgICAgICAgdmFyIHJlY29yZCA9IHRyeUNhdGNoKGlubmVyRm4sIHNlbGYsIGNvbnRleHQpO1xuXG4gICAgICAgICAgaWYgKHJlY29yZC50eXBlID09PSBcIm5vcm1hbFwiKSB7XG4gICAgICAgICAgICAvLyBJZiBhbiBleGNlcHRpb24gaXMgdGhyb3duIGZyb20gaW5uZXJGbiwgd2UgbGVhdmUgc3RhdGUgPT09XG4gICAgICAgICAgICAvLyBHZW5TdGF0ZUV4ZWN1dGluZyBhbmQgbG9vcCBiYWNrIGZvciBhbm90aGVyIGludm9jYXRpb24uXG4gICAgICAgICAgICBzdGF0ZSA9IGNvb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XG4gICAgICAgICAgICAgIC8vIElmIG1heWJlSW52b2tlRGVsZWdhdGUoY29udGV4dCkgY2hhbmdlZCBjb250ZXh0Lm1ldGhvZCBmcm9tXG4gICAgICAgICAgICAgIC8vIFwicmV0dXJuXCIgdG8gXCJ0aHJvd1wiLCBsZXQgdGhhdCBvdmVycmlkZSB0aGUgVHlwZUVycm9yIGJlbG93LlxuICAgICAgICAgICAgICByZXR1cm4gQ29udGludWVTZW50aW5lbDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG5cbiAgICAgICAgICBjb250ZXh0Lm1ldGhvZCA9IFwidGhyb3dcIjtcbiAgICAgICAgICBjb250ZXh0LmFyZyA9IG5ldyBUeXBlRXJyb3IoXCJUaGUgaXRlcmF0b3IgZG9lcyBub3QgcHJvdmlkZSBhICd0aHJvdycgbWV0aG9kXCIpO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG4gICAgICB9XG5cbiAgICAgIHZhciByZWNvcmQgPSB0cnlDYXRjaChtZXRob2QsIGRlbGVnYXRlLml0ZXJhdG9yLCBjb250ZXh0LmFyZyk7XG5cbiAgICAgIGlmIChyZWNvcmQudHlwZSA9PT0gXCJ0aHJvd1wiKSB7XG4gICAgICAgIGNvbnRleHQubWV0aG9kID0gXCJ0aHJvd1wiO1xuICAgICAgICBjb250ZXh0LmFyZyA9IHJlY29yZC5hcmc7XG4gICAgICAgIGNvbnRleHQuZGVsZWdhdGUgPSBudWxsO1xuICAgICAgICByZXR1cm4gQ29udGludWVTZW50aW5lbDtcbiAgICAgIH1cblxuICAgICAgdmFyIGluZm8gPSByZWNvcmQuYXJnO1xuXG4gICAgICBpZiAoIWluZm8pIHtcbiAgICAgICAgY29udGV4dC5tZXRob2QgPSBcInRocm93XCI7XG4gICAgICAgIGNvbnRleHQuYXJnID0gbmV3IFR5cGVFcnJvcihcIml0ZXJhdG9yIHJlc3VsdCBpcyBub3QgYW4gb2JqZWN0XCIpO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xlLmxlbmd0aCkge1xuICAgICAgICAgICAgICBpZiAoaGFzT3duLmNhbGwoaXRlcmFibGUsIGkpKSB7XG4gICAgICAgICAgICAgICAgbmV4dC52YWx1ZSA9IGl0ZXJhYmxlW2ldO1xuICAgICAgICAgICAgICAgIG5leHQuZG9uZSA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIHJldHVybiBuZXh0O1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIG5leHQudmFsdWUgPSB1bmRlZmluZWQkMTtcbiAgICAgICAgICAgIG5leHQuZG9uZSA9IHRydWU7XG4gICAgICAgICAgICByZXR1cm4gbmV4dDtcbiAgICAgICAgICB9O1xuXG4gICAgICAgICAgcmV0dXJuIG5leHQubmV4dCA9IG5leHQ7XG4gICAgICAgIH1cbiAgICAgIH0gLy8gUmV0dXJuIGFuIGl0ZXJhdG9yIHdpdGggbm8gdmFsdWVzLlxuXG5cbiAgICAgIHJldHVybiB7XG4gICAgICAgIG5leHQ6IGRvbmVSZXN1bHRcbiAgICAgIH07XG4gICAgfVxuXG4gICAgZXhwb3J0cy52YWx1ZXMgPSB2YWx1ZXM7XG5cbiAgICBmdW5jdGlvbiBkb25lUmVzdWx0KCkge1xuICAgICAgcmV0dXJuIHtcbiAgICAgICAgdmFsdWU6IHVuZGVmaW5lZCQxLFxuICAgICAgICBkb25lOiB0cnVlXG4gICAgICB9O1xuICAgIH1cblxuICAgIENvbnRleHQucHJvdG90eXBlID0ge1xuICAgICAgY29uc3RydWN0b3I6IENvbnRleHQsXG4gICAgICByZXNldDogZnVuY3Rpb24gKHNraXBUZW1wUmVzZXQpIHtcbiAgICAgICAgdGhpcy5wcmV2ID0gMDtcbiAgICAgICAgdGhpcy5uZXh0ID0gMDsgLy8gUmVzZXR0aW5nIGNvbnRleHQuX3NlbnQgZm9yIGxlZ2FjeSBzdXBwb3J0IG9mIEJhYmVsJ3NcbiAgICAgICAgLy8gZnVuY3Rpb24uc2VudCBpbX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AgICAgIGRpc3BhdGNoRXhjZXB0aW9uOiBmdW5jdGlvbiAoZXhjZXB0aW9uKSB7XG4gICAgICAgIGlmICh0aGlzLmRvbmUpIHtcbiAgICAgICAgICB0aHJvdyBleGNlcHRpb247XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgY29udGV4dCA9IHRoaXM7XG5cbiAgICAgICAgZnVuY3Rpb24gaGFuZGxlKGxvYywgY2F1Z2h0KSB7XG4gICAgICAgICAgcmVjb3JkLnR5cGUgPSBcInRocm93XCI7XG4gICAgICAgICAgcmVjb3JkLmFyZyA9IGV4Y2VwdGlvbjtcbiAgICAgICAgICBjb250ZXh0Lm5leHQgPSBsb2M7XG5cbiAgICAgICAgICBpZiAoY2F1Z2h0KSB7XG4gICAgICAgICAgICAvLyBJZiB0aGUgZGlzcGF0Y2hlZCBleGNlcHRpb24gd2FzIGNhdWdodCBieSBhIGNhdGNoIGJsb2NrLFxuICAgICAgICAgICAgLy8gdGhlbiBsZXQgdGhhdCBjYXRjaCBibG9jayBoYW5kbGUgdGhlIGV4Y2VwdGlvbiBub3JtYWxseS5cbiAgICAgICAgICAgIGNvbnRleHQubWV0aG9kID0gXCJuZXh0XCI7XG4gICAgICAgICAgICBjb250ZXh0LmFyZyA9IHVuZGVmaW5lZCQxO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIHJldHVybiAhIWNhdWdodDtcbiAgICAgICAgfVxuXG4gICAgICAgIGZvciAodmFyIGkgPSB0aGlzLnRyeUVudHJpZXMubGVuZ3RoIC0gMTsgaSA+PSAwOyAtLWkpIHtcbiAgICAgICAgICB2YXIgZW50cnkgPSB0aGlzLnRyeUVudHJpZXNbaV07XG4gICAgICAgICAgdmFyIHJlY29yZCA9IGVudHJ5LmNvbXBsZXRpb247XG5cbiAgICAgICAgICBpZiAoZW50cnkudHJ5TG9jID09PSBcInJvb3RcIikge1xuICAgICAgICAgICAgLy8gRXhjZXB0aW9uIHRocm93biBvdXRzaWRlIG9mIGFueSB0cnkgYmx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0aGlzLnByZXYgPCBlbnRyeS5maW5hbGx5TG9jKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShlbnRyeS5maW5hbGx5TG9jKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFwidHJ5IHN0YXRlbWVudCB3aXRob3V0IGNhdGNoIG9yIGZpbmFsbHlcIik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9LFxuICAgICAgYWJydXB0OiBmdW5jdGlvbiAodHlwZSwgYXJnKSB7XG4gICAgICAgIGZvciAodmFyIGkgPSB0aGlzLnRyeUVudHJpZXMubGVuZ3RoIC0gMTsgaSA+PSAwOyAtLWkpIHtcbiAgICAgICAgICB2YXIgZW50cnkgPSB0aGlzLnRyeUVudHJpZXNbaV07XG5cbiAgICAgICAgICBpZiAoZW50cnkudHJ5TG9jIDw9IHRoaXMucHJldiAmJiBoYXNPd24uY2FsbChlbnRyeSwgXCJmaW5hbGx5TG9jXCIpICYmIHRoaXMucHJldiA8IGVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgICAgIHZhciBmaW5hbGx5RW50cnkgPSBlbnRyeTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChmaW5hbGx5RW50cnkgJiYgKHR5cGUgPT09IFwiYnJlYWtcIiB8fCB0eXBlID09PSBcImNvbnRpbnVlXCIpICYmIGZpbmFsbHlFbnRyeS50cnlMb2MgPD0gYXJnICYmIGFyZyA8PSBmaW5hbGx5RW50cnkuZmluYWxseUxvYykge1xuICAgICAgICAgIC8vIElnbm9yZSB0aGUgZmluYWxseSBlbnRyeSBpZiBjb250cm9sIGlzIG5vdCBqdW1waW5nIHRvIGFcbiAgICAgICAgICAvLyBsb2NhdGlvbiBvdXRzaWRlIHRoZSB0cnkvY2F0Y2ggYmxvY2suXG4gICAgICAgICAgZmluYWxseUVudHJ5ID0gbnVsbDtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciByZWNvcmQgPSBmaW5hbGx5RW50cnkgPyBmaW5hbGx5RW50cnkuY29tcGxldGlvbiA6IHt9O1xuICAgICAgICByZWNvcmQudHlwZSA9IHR5cGU7XG4gICAgICAgIHJlY29yZC5hcmcgPSBhcmc7XG5cbiAgICAgICAgaWYgKGZpbmFsbHlFbnRyeSkge1xuICAgICAgICAgIHRoaXMubWV0aG9kID0gXCJuZXh0XCI7XG4gICAgICAgICAgdGhpcy5uZXh0ID0gZmluYWxseUVudHJ5LmZpbmFsbHlMb2M7XG4gICAgICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gdGhpcy5jb21wbGV0ZShyZWNvcmQpO1xuICAgICAgfSxcbiAgICAgIGNvbXBsZXRlOiBmdW5jdGlvbiAocmVjb3JkLCBhZnRlckxvYykge1xuICAgICAgICBpZiAocmVjb3JkLnR5cGUgPT09IFwidGhyb3dcIikge1xuICAgICAgICAgIHRocm93IHJlY29yZC5hcmc7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAocmVjb3JkLnR5cGUgPT09IFwiYnJlYWtcIiB8fCByZWNvcmQudHlwZSA9PT0gXCJjb250aW51ZVwiKSB7XG4gICAgICAgICAgdGhpcy5uZXh0ID0gcmVjb3JkLmFyZztcbiAgICAgICAgfSBlbHNlIGlmIChyZWNvcmQudHlwZSA9PT0gXCJyZXR1cm5cIikge1xuICAgICAgICAgIHRoaXMucnZhbCA9IHRoaXMuYXJnID0gcmVjb3JkLmFyZztcbiAgICAgICAgICB0aGlzLm1ldGhvZCA9IFwicmV0dXJuXCI7XG4gICAgICAgICAgdGhpcy5uZXh0ID0gXCJlbmRcIjtcbiAgICAgICAgfSBlbHNlIGlmIChyZWNvcmQudHlwZSA9PT0gXCJub3JtYWxcIiAmJiBhZnRlckxvYykge1xuICAgICAgICAgIHRoaXMubmV4dCA9IGFmdGVyTG9jO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG4gICAgICB9LFxuICAgICAgZmluaXNoOiBmdW5jdGlvbiAoZmluYWxseUxvYykge1xuICAgICAgICBmb3IgKHZhciBpID0gdGhpcy50cnlFbnRyaWVzLmxlbmd0aCAtIDE7IGkgPj0gMDsgLS1pKSB7XG4gICAgICAgICAgdmFyIGVudHJ5ID0gdGhpcy50cnlFbnRyaWVzW2ldO1xuXG4gICAgICAgICAgaWYgKGVudHJ5LmZpbmFsbHlMb2MgPT09IGZpbmFsbHlMb2MpIHtcbiAgICAgICAgICAgIHRoaXMuY29tcGxldGUoZW50cnkuY29tcGxldGlvbiwgZW50cnkuYWZ0ZXJMb2MpO1xuICAgICAgICAgICAgcmVzZXRUcnlFbnRyeShlbnRyeSk7XG4gICAgICAgICAgICByZXR1cm4gQ29udGludWVTZW50aW5lbDtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH0sXG4gICAgICBcImNhdGNoXCI6IGZ1bmN0aW9uICh0cnlMb2MpIHtcbiAgICAgICAgZm9yICh2YXIgaSA9IHRoaXMudHJ5RW50cmllcy5sZW5ndGggLSAxOyBpID49IDA7IC0taSkge1xuICAgICAgICAgIHZhciBlbnRyeSA9IHRoaXMudHJ5RW50cmllc1tpXTtcblxuICAgICAgICAgIGlmIChlbnRyeS50cnlMb2MgPT09IHRyeUxvYykge1xuICAgICAgICAgICAgdmFyIHJlY29yZCA9IGVudHJ5LmNvbXBsZXRpb247XG5cbiAgICAgICAgICAgIGlmIChyZWNvcmQudHlwZSA9PT0gXCJ0aHJvd1wiKSB7XG4gICAgICAgICAgICAgIHZhciB0aHJvd24gPSByZWNvcmQuYXJnO1xuICAgICAgICAgICAgICByZXNldFRyeUVudHJ5KGVudHJ5KTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmV0dXJuIHRoc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oc3R5bGUpIHtcbiAgICAgICAgc3R5bGUuY3Vyc29yID0gJyc7XG4gICAgICB9XG5cbiAgICAgIGV2ZW50cy5mb3JFYWNoKGZ1bmN0aW9uIChfcmVmLCBpKSB7XG4gICAgICAgIHZhciBydW4gPSBfcmVmLnJ1bjtcbiAgICAgICAgdmFyIGVsZW1lbnQgPSBldmVudEVsZW1lbnRzW2ldO1xuXG4gICAgICAgIHdoaWxlIChlbGVtZW50KSB7XG4gICAgICAgICAgcnVuKGVsZW1lbnQpO1xuICAgICAgICAgIGVsZW1lbnQgPSBlbGVtZW50LnBhcmVudDtcbiAgICAgICAgfVxuICAgICAgfSk7IC8vIGRvbmUgcnVubmluZywgY2xlYXJcblxuICAgICAgdGhpcy5ldmVudHMgPSBbXTtcbiAgICAgIHRoaXMuZXZlbnRFbGVtZW50cyA9IFtdO1xuICAgIH1cbiAgfSwge1xuICAgIGtleTogXCJjaGVja1BhdGhcIixcbiAgICB2YWx1ZTogZnVuY3Rpb24gY2hlY2tQYXRoKGVsZW1lbnQsIGN0eCkge1xuICAgICAgaWYgKCF0aGlzLndvcmtpbmcgfHwgIWN0eCkge1xuICAgICAgICByZXR1cm47XG4gICAgICB9XG5cbiAgICAgIHZhciBldmVudHMgPSB0aGlzLmV2ZW50cyxcbiAgICAgICAgICBldmVudEVsZW1lbnRzID0gdGhpcy5ldmVudEVsZW1lbnRzO1xuICAgICAgZXZlbnRzLmZvckVhY2goZnVuY3Rpb24gKF9yZWYyLCBpKSB7XG4gICAgICAgIHZhciB4ID0gX3JlZjIueCxcbiAgICAgICAgICAgIHkgPSBfcmVmMi55O1xuXG4gICAgICAgIGlmICghZXZlbnRFbGVtZW50c1tpXSAmJiBjdHguaXNQb2ludEluUGF0aCAmJiBjdHguaXNQb2ludEluUGF0aCh4LCB5KSkge1xuICAgICAgICAgIGV2ZW50RWxlbWVudHNbaV0gPSBlbGVtZW50O1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICB9XG4gIH0sIHtcbiA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ZWxlbWVudCA9IGVsZW1lbnQub2Zmc2V0UGFyZW50O1xuICAgICAgfVxuXG4gICAgICBpZiAod2luZG93LnNjcm9sbFgpIHtcbiAgICAgICAgcG9pbnQueCArPSB3aW5kb3cuc2Nyb2xsWDtcbiAgICAgIH1cblxuICAgICAgaWYgKHdpbmRvdy5zY3JvbGxZKSB7XG4gICAgICAgIHBvaW50LnkgKz0gd2luZG93LnNjcm9sbFk7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBwb2ludDtcbiAgICB9XG4gIH0sIHtcbiAgICBrZXk6IFwib25DbGlja1wiLFxuICAgIHZhbHVlOiBmdW5jdGlvbiBvbkNsaWNrKGV2dCkge1xuICAgICAgdmFyIF90aGlzJG1hcFhZID0gdGhpcy5tYXBYWSgoZXZ0IHx8IGV2ZW50KS5jbGllbnRYLCAoZXZ0IHx8IGV2ZW50KS5jbGllbnRZKSxcbiAgICAgICAgICB4ID0gX3RoaXMkbWFwWFkueCxcbiAgICAgICAgICB5ID0gX3RoaXMkbWFwWFkueTtcblxuICAgICAgdGhpcy5ldmVudHMucHVzaCh7XG4gICAgICAgIHR5cGU6ICdvbmNsaWNrJyxcbiAgICAgICAgeDogeCxcbiAgICAgICAgeTogeSxcbiAgICAgICAgcnVuOiBmdW5jdGlvbiBydW4oZXZlbnQpIHtcbiAgICAgICAgICBpZiAoZXZlbnQub25DbGljaykge1xuICAgICAgICAgICAgZXZlbnQub25DbGljaygpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfVxuICB9LCB7XG4gICAga2V5OiBcIm9uTW91c2VNb3ZlXCIsXG4gICAgdmFsdWU6IGZ1bmN0aW9uIG9uTW91c2VNb3ZlKGV2dCkge1xuICAgICAgdmFyIF90aGlzJG1hcFhZMiA9IHRoaXMubWFwWFkoKGV2dCB8fCBldmVudCkuY2xpZW50WCwgKGV2dCB8fCBldmVudCkuY2xpZW50WSksXG4gICAgICAgICAgeCA9IF90aGlzJG1hcFhZM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vclJ1bnRpbWUud3JhcChmdW5jdGlvbiBfY2FsbGVlJChfY29udGV4dCkge1xuICAgICAgICAgIHdoaWxlICgxKSB7XG4gICAgICAgICAgICBzd2l0Y2ggKF9jb250ZXh0LnByZXYgPSBfY29udGV4dC5uZXh0KSB7XG4gICAgICAgICAgICAgIGNhc2UgMDpcbiAgICAgICAgICAgICAgICBpZiAoIS9ePC8udGVzdChyZXNvdXJjZSkpIHtcbiAgICAgICAgICAgICAgICAgIF9jb250ZXh0Lm5leHQgPSAyO1xuICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgcmV0dXJuIF9jb250ZXh0LmFicnVwdChcInJldHVyblwiLCB0aGlzLnBhcnNlRnJvbVN0cmluZyhyZXNvdXJjZSkpO1xuXG4gICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICByZXR1cm4gX2NvbnRleHQuYWJydXB0KFwicmV0dXJuXCIsIHRoaXMubG9hZChyZXNvdXJjZSkpO1xuXG4gICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgY2FzZSBcImVuZFwiOlxuICAgICAgICAgICAgICAgIHJldHVybiBfY29udGV4dC5zdG9wKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9LCBfY2FsbGVlLCB0aGlzKTtcbiAgICAgIH0pKTtcblxuICAgICAgZnVuY3Rpb24gcGFyc2UoX3gpIHtcbiAgICAgICAgcmV0dXJuIF9wYXJzZS5hcHBseSh0aGlzLCBhcmd1bWVudHMpO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gcGFyc2U7XG4gICAgfSgpXG4gIH0sIHtcbiAgICBrZXk6IFwicGFyc2VGcm9tU3RyaW5nXCIsXG4gICAgdmFsdWU6IGZ1bmN0aW9uIHBhcnNlRnJvbVN0cmluZyh4bWwpIHtcbiAgICAgIHZhciBwYXJzZXIgPSBuZXcgdGhpcy5ET01QYXJ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ubmV4dCkge1xuICAgICAgICAgICAgICBjYXNlIDA6XG4gICAgICAgICAgICAgICAgX2NvbnRleHQyLm5leHQgPSAyO1xuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLmZldGNoKHVybCk7XG5cbiAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgIHJlc3BvbnNlID0gX2NvbnRleHQyLnNlbnQ7XG4gICAgICAgICAgICAgICAgX2NvbnRleHQyLm5leHQgPSA1O1xuICAgICAgICAgICAgICAgIHJldHVybiByZXNwb25zZS50ZXh0KCk7XG5cbiAgICAgICAgICAgICAgY2FzZSA1OlxuICAgICAgICAgICAgICAgIHhtbCA9IF9jb250ZXh0Mi5zZW50O1xuICAgICAgICAgICAgICAgIHJldHVybiBfY29udGV4dDIuYWJydXB0KFwicmV0dXJuXCIsIHRoaXMucGFyc2VGcm9tU3RyaW5nKHhtbCkpO1xuXG4gICAgICAgICAgICAgIGNhc2UgNzpcbiAgICAgICAgICAgICAgY2FzZSBcImVuZFwiOlxuICAgICAgICAgICAgICAgIHJldHVybiBfY29udGV4dDIuc3RvcCgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfSwgX2NhbGxlZTIsIHRoaXMpO1xuICAgICAgfSkpO1xuXG4gICAgICBmdW5jdGlvbiBsb2FkKF94Mikge1xuICAgICAgICByZXR1cm4gX2xvYWQuYXBwbHkodGhpcywgYXJndW1lbnRzKTtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIGxvYWQ7XG4gICAgfSgpXG4gIH1dKTtcblxuICByZXR1cm4gUGFyc2VyO1xufSgpO1xuXG52YXIgVHJhbnNsYXRlID0gLyojX19QVVJFX18qL2Z1bmN0aW9uICgpIHtcbiAgZnVuY3Rpb24gVHJhbnNsYXRlKF8sIHBvaW50KSB7XG4gICAgX2NsYXNzQ2FsbENoZWNrKHRoaXMsIFRyYW5zbGF0ZSk7XG5cbiAgICB0aGlzLnR5cGUgPSAndHJhbnNsYX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G4gICAgICAgIGlmIChmaWx0ZXIpIHtcbiAgICAgICAgICB0aGlzLmFwcGx5RWZmZWN0cyhjdHgpO1xuICAgICAgICAgIGZpbHRlci5hcHBseShjdHgsIHRoaXMpO1xuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICB0aGlzLnNldENvbnRleHQoY3R4KTtcbiAgICAgICAgdGhpcy5yZW5kZXJDaGlsZHJlbihjdHgpO1xuICAgICAgICB0aGlzLmNsZWFyQ29udGV4dChjdHgpO1xuICAgICAgfVxuXG4gICAgICBjdHgucmVzdG9yZSgpO1xuICAgIH1cbiAgfSwge1xuICAgIGtleTogXCJzZXRDb250ZXh0XCIsXG4gICAgdmFsdWU6IGZ1bmN0aW9uIHNldENvbnRleHQoXykge31cbiAgfSwge1xuICAgIGtleTogXCJhcHBseUVmZmVjdHNcIixcbiAgICB2YWx1ZTogZnVuY3Rpb24gYXBwbHlFZmZlY3RzKGN0eCkge1xuICAgICAgLy8gdHJhbnNmb3JtXG4gICAgICB2YXIgdHJhbnNmb3JtID0gVHJhbnNmb3JtLmZyb21FbGVtZW50KHRoaXMuZG9jdW1lbnQsIHRoaXMpO1xuXG4gICAgICBpZiAodHJhbnNmb3JtKSB7XG4gICAgICAgIHRyYW5zZm9ybS5hcHBseShjdHgpO1xuICAgICAgfSAvLyBjbGlwXG5cblxuICAgICAgdmFyIGNsaXBQYXRoU3R5bGVQcm9wID0gdGhpcy5nZXRTdHlsZSgnY2xpcC1wYXRoJywgZmFsc2UsIHRydWUpO1xuXG4gICAgICBpZiAoY2xpcFBhdGhTdHlsZVByb3AuaGFzVmFsdWUoKSkge1xuICAgICAgICB2YXIgY2xpcCA9IGNsaXBQYXRoU3R5bGVQcm9wLmdldERlZmluaXRpb24oKTtcblxuICAgICAgICBpZiAoY2xpcCkge1xuICAgICAgICAgIGNsaXAuYXBwbHkoY3R4KTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cbiAgfSwge1xuICAgIGtleTogXCJjbG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nRzWzFdIDogdW5kZWZpbmVkO1xuICAgICAgdmFyIGZvbnRTdHlsZSA9ICcnO1xuICAgICAgdmFyIGZvbnRWYXJpYW50ID0gJyc7XG4gICAgICB2YXIgZm9udFdlaWdodCA9ICcnO1xuICAgICAgdmFyIGZvbnRTaXplID0gJyc7XG4gICAgICB2YXIgZm9udEZhbWlseSA9ICcnO1xuICAgICAgdmFyIHBhcnRzID0gY29tcHJlc3NTcGFjZXMoZm9udCkudHJpbSgpLnNwbGl0KCcgJyk7XG4gICAgICB2YXIgc2V0ID0ge1xuICAgICAgICBmb250U2l6ZTogZmFsc2UsXG4gICAgICAgIGZvbnRTdHlsZTogZmFsc2UsXG4gICAgICAgIGZvbnRXZWlnaHQ6IGZhbHNlLFxuICAgICAgICBmb250VmFyaWFudDogZmFsc2VcbiAgICAgIH07XG4gICAgICBwYXJ0cy5mb3JFYWNoKGZ1bmN0aW9uIChwYXJ0KSB7XG4gICAgICAgIHN3aXRjaCAodHJ1ZSkge1xuICAgICAgICAgIGNhc2UgIXNldC5mb250U3R5bGUgJiYgRm9udC5zdHlsZXMuaW5jbHVkZXMocGFydCk6XG4gICAgICAgICAgICBpZiAocGFydCAhPT0gJ2luaGVyaXQnKSB7XG4gICAgICAgICAgICAgIGZvbnRTdHlsZSA9IHBhcnQ7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHNldC5mb250U3R5bGUgPSB0cnVlO1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICBjYXNlICFzZXQuZm9udFZhcmlhbnQgJiYgRm9udC52YXJpYW50cy5pbmNsdWRlcyhwYXJ0KTpcbiAgICAgICAgICAgIGlmIChwYXJ0ICE9PSAnaW5oZXJpdCcpIHtcbiAgICAgICAgICAgICAgZm9udFZhcmlhbnQgPSBwYXJ0O1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBzZXQuZm9udFN0eWxlID0gdHJ1ZTtcbiAgICAgICAgICAgIHNldC5mb250VmFyaWFudCA9IHRydWU7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgIGNhc2UgIXNldC5mb250V2VpZ2h0ICYmIEZvbnQud2VpZ2h0cy5pbmNsdWRlcyhwYXJ0KTpcbiAgICAgICAgICAgIGlmIChwYXJ0ICE9PSAnaW5oZXJpdCcpIHtcbiAgICAgICAgICAgICAgZm9udFdlaWdodCA9IHBhcnQ7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHNldC5mb250U3R5bGUgPSB0cnVlO1xuICAgICAgICAgICAgc2V0LmZvbnRWYXJpYW50ID0gdHJ1ZTtcbiAgICAgICAgICAgIHNldC5mb250V2VpZ2h0ID0gdHJ1ZTtcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgY2FzZSAhc2V0LmZvbnRTaXplOlxuICAgICAgICAgICAgaWYgKHBhcnQgIT09ICdpbmhlcml0Jykge1xuICAgICAgICAgICAgICB2YXIgX3BhcnQkc3BsaXQgPSBwYXJ0LnNwbGl0KCcvJyk7XG5cbiAgICAgICAgICAgICAgdmFyIF9wYXJ0JHNwbGl0MiA9IF9zbGljZWRUb0FycmF5KF9wYXJ0JHNwbGl0LCAxKTtcblxuICAgICAgICAgICAgICBmb250U2l6ZSA9IF9wYXJ0JHNwbGl0MlswXTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgc2V0LmZvbnRTdHlsZSA9IHRydWU7XG4gICAgICAgICAgICBzZXQuZm9udFZhcmlhbnQgPSB0cnVlO1xuICAgICAgICAgICAgc2V0LmZvbnRXZWlnaHQgPSB0cnVlO1xuICAgICAgICAgICAgc2V0LmZvbnRTaXplID0gdHJ1ZTtcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgIGlmIChwYXJ0ICE9PSAnaW5oZXJpdCcpIHtcbiAgICAgICAgICAgICAgZm9udEZhbWlseSArPSBwYXJ0O1xuICAgICAgICAgICAgfVxuXG4gICAgICAgIH1c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ZGluZ0JveCk7XG5cbiAgICB0aGlzLngxID0geDE7XG4gICAgdGhpcy55MSA9IHkxO1xuICAgIHRoaXMueDIgPSB4MjtcbiAgICB0aGlzLnkyID0geTI7XG4gICAgdGhpcy5hZGRQb2ludCh4MSwgeTEpO1xuICAgIHRoaXMuYWRkUG9pbnQoeDIsIHkyKTtcbiAgfVxuXG4gIF9jcmVhdGVDbGFzcyhCb3VuZGluZ0JveCwgW3tcbiAgICBrZXk6IFwiYWRkUG9pbnRcIixcbiAgICB2YWx1ZTogZnVuY3Rpb24gYWRkUG9pbnQoeCwgeSkge1xuICAgICAgaWYgKHR5cGVvZiB4ICE9PSAndW5kZWZpbmVkJykge1xuICAgICAgICBpZiAoaXNOYU4odGhpcy54MSkgfHwgaXNOYU4odGhpcy54MikpIHtcbiAgICAgICAgICB0aGlzLngxID0geDtcbiAgICAgICAgICB0aGlzLngyID0geDtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICh4IDwgdGhpcy54MSkge1xuICAgICAgICAgIHRoaXMueDEgPSB4O1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHggPiB0aGlzLngyKSB7XG4gICAgICAgICAgdGhpcy54MiA9IHg7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgaWYgKHR5cGVvZiB5ICE9PSAndW5kZWZpbmVkJykge1xuICAgICAgICBpZiAoaXNOYU4odGhpcy55MSkgfHwgaXNOYU4odGhpcy55MikpIHtcbiAgICAgICAgICB0aGlzLnkxID0geTtcbiAgICAgICAgICB0aGlzLnkyID0geTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICh5IDwgdGhpcy55MSkge1xuICAgICAgICAgIHRoaXMueTEgPSB5O1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHkgPiB0aGlzLnkyKSB7XG4gICAgICAgICAgdGhpcy55MiA9IHk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG4gIH0sIHtcbiAgICBrZXk6IFwiYWRkWFwiLFxuICAgIHZhbHVlOiBmdW5jdGlvbiBhZGRYKHgpIHtcbiAgICAgIHRoaXMuYWRkUG9pbnQoeCwgbnVsbCk7XG4gICAgfVxuICB9LCB7XG4gICAga2V5OiBcImFkZFlcIixcbiAgICB2YWx1ZTogZnVuY3Rpb24gYWRkWSh5KSB7XG4gICAgICB0aGlzLmFkZFBvaW50KG51bGwsIHkpO1xuICAgIH1cbiAgfSwge1xuICAgIGtleTogXCJhZGRCb3VuZGluZ0JveFwiLFxuICAgIHZhbHVlOiBmdW5jdGlvbiBhZGRCb3VuZGluZ0JveChib3VuZGluZ0JveCkge1xuICAgICAgaWYgKCFib3VuZGluZ0JveCkge1xuICAgICAgICByZXR1cm47XG4gICAgICB9XG5cbiAgICAgIHZhciB4MSA9IGJvdW5kaW5nQm94LngxLFxuICAgICAgICAgIHkxID0gYm91bmRpbmdCb3gueTEsXG4gICAgICAgICAgeDIgPSBib3VuZGluZ0JveC54MixcbiAgICAgICAgICB5MiA9IGJvdW5kaW5nQm94LnkyO1xuICAgICAgdGhpcy5hZGRQb2ludCh4MSwgeTEpO1xuICAgICAgdGhpcy5hZGRQb2ludCh4MiwgeTIpO1xuICAgIH1cbiAgfSwge1xuICAgIGtleTogXCJzdW1DdWJpY1wiLFxuICAgIHZhbHVlOiBmdW5jdGlvbiBzdW1DdWJpYyh0LCBwMCwgcDEsIHAyLCBwMykge1xuICAgICAgcmV0dXJuIE1hdGgucG93KDEgLSB0LCAzKSAqIHAwICsgMyAqIE1hdGgucG93KDEgLSB0LCAyKSAqIHQgKiBwMSArIDMgKiAoMSAtIHQpICogTWF0aC5wb3codCwgMikgKiBwMiArIE1hdGgucG93KHQsIDMpICogcDM7XG4gICAgfVxuICB9LCB7XG4gICAga2V5OiBcImJlemllckN1cnZlQWRkXCIsXG4gICAgdmFsdWU6IGZ1bmN0aW9uIGJlemllckN1cnZlQWRkKGZvclgsIHAwLCBwMSwgcDIsIHAzKSB7XG4gICAgICB2YXIgYiA9IDYgKiBwMCAtIDEyICogcDEgKyA2ICogcDI7XG4gICAgICB2YXIgYSA9IC0zICogcDAgKyA5ICogcDEgLSA5ICogcDIgKyAzICogcDM7XG4gICAgICB2YXIgYyA9IDMgKiBwMSAtIDMgKiBwMDtcblxuICAgICAgaWYgKGEgPT09IDApIHtcbiAgICAgICAgaWYgKGIgPT09IDApIHtcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgdCA9IC1jIC8gYjtcblxuICAgICAgICBpZiAoMCA8IHQgJiYgdCA8IDEpIHtcbiAgICAgICAgICBpZiAoZm9yWCkge1xuICAgICAgICAgICAgdGhpcy5hZGRYKHRoaXMuc3VtQ3ViaWModCwgcDAsIHAxLCBwMiwgcDMpKTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdGhpcy5hZGRZKHRoaXMuc3VtQ3ViaWModCwgcDAsIHAxLCBwMiwgcDMpKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm47XG4gICAgICB9XG5cbiAgICAgIHZhciBiMmFjID0gTWF0aC5wb3coYiwgMikgLSA0ICogYyAqIGE7XG5cbiAgICAgIGlmIChiMmFjIDwgMCkge1xuICAgICAgICByZXR1cm47XG4gICAgICB9XG5cbiAgICAgIHZhciB0MSA9ICgtYiArIE1hdGguc3FydChiMmFjKSkgLyAoMiAqIGEpO1xuXG4gICAgICBpZiAoMCA8IHQxICYmIHQxIDwgMSkge1xuICAgICAgICBpZiAoZm9yWCkge1xuICAgICAgICAgIHRoaXMuYWRkWCh0aGlzLnN1bUN1YmljKHQxLCBwMCwgcDEsIHAyLCBwMykpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHRoaXMuYWRkWSh0aGlzLnN1bUN1YmljKHQxLCBwMCwgcDEsIHAyLCBwMykpO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIHZhciB0MiA9ICgtYiAtIE1hdGguc3FydChiMmFjKSkgLyAoMiAqIGEpO1x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XG4gICAgICAgICAgICBjdHgudHJhbnNmb3JtKDEsIDAsIC40LCAxLCAwLCAwKTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBnbHlwaC5yZW5kZXIoY3R4KTtcblxuICAgICAgICAgIGlmIChmb250U3R5bGUgPT09ICdpdGFsaWMnKSB7XG4gICAgICAgICAgICBjdHgudHJhbnNmb3JtKDEsIDAsIC0uNCwgMSwgMCwgMCk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgY3R4LmxpbmVXaWR0aCA9IGx3O1xuICAgICAgICAgIGN0eC5zY2FsZSgxIC8gc2NhbGUsIC0xIC8gc2NhbGUpO1xuICAgICAgICAgIGN0eC50cmFuc2xhdGUoLXRoaXMueCwgLXRoaXMueSk7XG4gICAgICAgICAgdGhpcy54ICs9IGZvbnRTaXplICogKGdseXBoLmhvcml6QWR2WCB8fCBjdXN0b21Gb250Lmhvcml6QWR2WCkgLyB1bml0c1BlckVtO1xuXG4gICAgICAgICAgaWYgKHR5cGVvZiBkeFtpXSAhPT0gJ3VuZGVmaW5lZCcgJiYgIWlzTmFOKGR4W2ldKSkge1xuICAgICAgICAgICAgdGhpcy54ICs9IGR4W2ldO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybjtcbiAgICAgIH1cblxuICAgICAgdmFyIHggPSB0aGlzLngsXG4gICAgICAgICAgeSA9IHRoaXMueTtcblxuICAgICAgaWYgKGN0eC5wYWludE9yZGVyID09PSAnc3Ryb2tlJykge1xuICAgICAgICBpZiAoY3R4LnN0cm9rZVN0eWxlKSB7XG4gICAgICAgICAgY3R4LnN0cm9rZVRleHQocmVuZGVyVGV4dCwgeCwgeSk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoY3R4LmZpbGxTdHlsZSkge1xuICAgICAgICAgIGN0eC5maWxsVGV4dChyZW5kZXJUZXh0LCB4LCB5KTtcbiAgICAgICAgfVxuICAgICAgfSBlbHNlIHtcbiAgICAgICAgaWYgKGN0eC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gICAgY3R4LmJlZ2luUGF0aCgpO1xuICAgICAgfVxuXG4gICAgICB3aGlsZSAoIXBhdGhQYXJzZXIuaXNFbmQoKSkge1xuICAgICAgICBwYXRoUGFyc2VyLm5leHRDb21tYW5kKCk7XG5cbiAgICAgICAgc3dpdGNoIChwYXRoUGFyc2VyLmNvbW1hbmQpIHtcbiAgICAgICAgICBjYXNlICdNJzpcbiAgICAgICAgICBjYXNlICdtJzpcbiAgICAgICAgICAgIHRoaXMucGF0aE0oY3R4LCBib3VuZGluZ0JveCk7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgIGNhc2UgJ0wnOlxuICAgICAgICAgIGNhc2UgJ2wnOlxuICAgICAgICAgICAgdGhpcy5wYXRoTChjdHgsIGJvdW5kaW5nQm94KTtcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgY2FzZSAnSCc6XG4gICAgICAgICAgY2FzZSAnaCc6XG4gICAgICAgICAgICB0aGlzLnBhdGhIKGN0eCwgYm91bmRpbmdCb3gpO1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICBjYXNlICdWJzpcbiAgICAgICAgICBjYXNlICd2JzpcbiAgICAgICAgICAgIHRoaXMucGF0aFYoY3R4LCBib3VuZGluZ0JveCk7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgIGNhc2UgJ0MnOlxuICAgICAgICAgIGNhc2UgJ2MnOlxuICAgICAgICAgICAgdGhpcy5wYXRoQyhjdHgsIGJvdW5kaW5nQm94KTtcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgY2FzZSAnUyc6XG4gICAgICAgICAgY2FzZSAncyc6XG4gICAgICAgICAgICB0aGlzLnBhdGhTKGN0eCwgYm91bmRpbmdCb3gpO1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICBjYXNlICdRJzpcbiAgICAgICAgICBjYXNlICdxJzpcbiAgICAgICAgICAgIHRoaXMucGF0aFEoY3R4LCBib3VuZGluZ0JveCk7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgIGNhc2UgJ1QnOlxuICAgICAgICAgIGNhc2UgJ3QnOlxuICAgICAgICAgICAgdGhpcy5wYXRoVChjdHgsIGJvdW5kaW5nQm94KTtcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgY2FzZSAnQSc6XG4gICAgICAgICAgY2FzZSAnYSc6XG4gICAgICAgICAgICB0aGlzLnBhdGhBKGN0eCwgYm91bmRpbmdCb3gpO1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICBjYXNlICdaJzpcbiAgICAgICAgICBjYXNlICd6JzpcbiAgICAgICAgICAgIHRoaXMucGF0aFooY3R4LCBib3VuZGluZ0JveCk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICByZXR1cm4gYm91bmRpbmdCb3g7XG4gICAgfVxuICB9LCB7XG4gICAga2V5OiBcImdldEJvdW5kaW5nQm94XCIsXG4gICAgdmFsdWU6IGZ1bmN0aW9uIGdldEJvdW5kaW5nQm94KF8pIHtcbiAgICAgIHJldHVybiB0aGlzLnBhdGgoKTtcbiAgICB9XG4gIH0sIHtcbiAgICBrZXk6IFwiZ2V0TWFya2Vyc1wiLFxuICAgIHZhbHVlOiBmdW5jdGlvbiBnZXRNYXJrZXJzKCkge1xuICAgICAgdmFyIHBhdGhQYXJzZXIgPSB0aGlzLnBhdGhQYXJzZXI7XG4gICAgICB2YXIgcG9pbnRzID0gcGF0aFBhcnNlci5nZXRNYXJrZXJQb2ludHMoKTtcbiAgICAgIHZhciBhbmdsZXMgPSBwYXRoUGFyc2VyLmdldE1hcmtlckFuZ2xlcygpO1xuICAgICAgdmFyIG1hcmtlcnMgPSBwb2ludHMubWFwKGZ1bmN0aW9uIChwb2ludCwgaSkge1xuICAgICAgICByZXR1cm4gW3BvaW50LCBhbmdsZXNbaV1dO1xuICAgICAgfSk7XG4gICAgICByZXR1cm4gbWF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LWVuZCcpO1xuXG4gICAgICAgIGlmIChtYXJrZXJTdGFydFN0eWxlUHJvcC5pc1VybERlZmluaXRpb24oKSkge1xuICAgICAgICAgIHZhciBtYXJrZXIgPSBtYXJrZXJTdGFydFN0eWxlUHJvcC5nZXREZWZpbml0aW9uKCk7XG5cbiAgICAgICAgICB2YXIgX21hcmtlcnMkID0gX3NsaWNlZFRvQXJyYXkobWFya2Vyc1swXSwgMiksXG4gICAgICAgICAgICAgIHBvaW50ID0gX21hcmtlcnMkWzBdLFxuICAgICAgICAgICAgICBhbmdsZSA9IF9tYXJrZXJzJFsxXTtcblxuICAgICAgICAgIG1hcmtlci5yZW5kZXIoY3R4LCBwb2ludCwgYW5nbGUpO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKG1hcmtlck1pZFN0eWxlUHJvcC5pc1VybERlZmluaXRpb24oKSkge1xuICAgICAgICAgIHZhciBfbWFya2VyID0gbWFya2VyTWlkU3R5bGVQcm9wLmdldERlZmluaXRpb24oKTtcblxuICAgICAgICAgIGZvciAodmFyIGkgPSAxOyBpIDwgbWFya2Vyc0xhc3RJbmRleDsgaSsrKSB7XG4gICAgICAgICAgICB2YXIgX21hcmtlcnMkaSA9IF9zbGljZWRUb0FycmF5KG1hcmtlcnNbaV0sIDIpLFxuICAgICAgICAgICAgICAgIF9wb2ludCA9IF9tYXJrZXJzJGlbMF0sXG4gICAgICAgICAgICAgICAgX2FuZ2xlID0gX21hcmtlcnMkaVsxXTtcblxuICAgICAgICAgICAgX21hcmtlci5yZW5kZXIoY3R4LCBfcG9pbnQsIF9hbmdsZSk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKG1hcmtlckVuZFN0eWxlUHJvcC5pc1VybERlZmluaXRpb24oKSkge1xuICAgICAgICAgIHZhciBfbWFya2VyMiA9IG1hcmtlckVuZFN0eWxlUHJvcC5nZXREZWZpbml0aW9uKCk7XG5cbiAgICAgICAgICB2YXIgX21hcmtlcnMkbWFya2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A9IG5ldyBQb2ludCgocGF0aFBhcnNlci5pc1JlbGF0aXZlQ29tbWFuZCgpID8gY3VycmVudC54IDogMCkgKyBwYXRoUGFyc2VyLmdldFNjYWxhcigpLCBjdXJyZW50LnkpO1xuICAgICAgICBwYXRoUGFyc2VyLmFkZE1hcmtlcihwb2ludCwgY3VycmVudCk7XG4gICAgICAgIHBhdGhQYXJzZXIuY3VycmVudCA9IHBvaW50O1xuICAgICAgICBib3VuZGluZ0JveC5hZGRQb2ludChwb2ludC54LCBwb2ludC55KTtcblxuICAgICAgICBpZiAoY3R4KSB7XG4gICAgICAgICAgY3R4LmxpbmVUbyhwb2ludC54LCBwb2ludC55KTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cbiAgfSwge1xuICAgIGtleTogXCJwYXRoVlwiLFxuICAgIHZhbHVlOiBmdW5jdGlvbiBwYXRoVihjdHgsIGJvdW5kaW5nQm94KSB7XG4gICAgICB2YXIgcGF0aFBhcnNlciA9IHRoaXMucGF0aFBhcnNlcjtcblxuICAgICAgd2hpbGUgKCFwYXRoUGFyc2VyLmlzQ29tbWFuZE9yRW5kKCkpIHtcbiAgICAgICAgdmFyIGN1cnJlbnQgPSBwYXRoUGFyc2VyLmN1cnJlbnQ7XG4gICAgICAgIHZhciBwb2ludCA9IG5ldyBQb2ludChjdXJyZW50LngsIChwYXRoUGFyc2VyLmlzUmVsYXRpdmVDb21tYW5kKCkgPyBjdXJyZW50LnkgOiAwKSArIHBhdGhQYXJzZXIuZ2V0U2NhbGFyKCkpO1xuICAgICAgICBwYXRoUGFyc2VyLmFkZE1hcmtlcihwb2ludCwgY3VycmVudCk7XG4gICAgICAgIHBhdGhQYXJzZXIuY3VycmVudCA9IHBvaW50O1xuICAgICAgICBib3VuZGluZ0JveC5hZGRQb2ludChwb2ludC54LCBwb2ludC55KTtcblxuICAgICAgICBpZiAoY3R4KSB7XG4gICAgICAgICAgY3R4LmxpbmVUbyhwb2ludC54LCBwb2ludC55KTtcbiAgICAgIC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SBwYXRoUGFyc2VyLmdldFNjYWxhcigpO1xuICAgICAgICB2YXIgY3VycmVudFBvaW50ID0gcGF0aFBhcnNlci5nZXRBc0N1cnJlbnRQb2ludCgpOyAvLyBDb252ZXJzaW9uIGZyb20gZW5kcG9pbnQgdG8gY2VudGVyIHBhcmFtZXRlcml6YXRpb25cbiAgICAgICAgLy8gaHR0cDovL3d3dy53My5vcmcvVFIvU1ZHMTEvaW1wbG5vdGUuaHRtbCNBcmNJbXBsZW1lbnRhdGlvbk5vdGVzXG4gICAgICAgIC8vIHgxJywgeTEnXG5cbiAgICAgICAgdmFyIGN1cnJwID0gbmV3IFBvaW50KE1hdGguY29zKHhBeGlzUm90YXRpb24pICogKGN1cnJlbnQueCAtIGN1cnJlbnRQb2ludC54KSAvIDIuMCArIE1hdGguc2luKHhBeGlzUm90YXRpb24pICogKGN1cnJlbnQueSAtIGN1cnJlbnRQb2ludC55KSAvIDIuMCwgLU1hdGguc2luKHhBeGlzUm90YXRpb24pICogKGN1cnJlbnQueCAtIGN1cnJlbnRQb2ludC54KSAvIDIuMCArIE1hdGguY29zKHhBeGlzUm90YXRpb24pICogKGN1cnJlbnQueSAtIGN1cnJlbnRQb2ludC55KSAvIDIuMCk7IC8vIGFkanVzdCByYWRpaVxuXG4gICAgICAgIHZhciBsID0gTWF0aC5wb3coY3VycnAueCwgMikgLyBNYXRoLnBvdyhyeCwgMikgKyBNYXRoLnBvdyhjdXJycC55LCAyKSAvIE1hdGgucG93KHJ5LCAyKTtcblxuICAgICAgICBpZiAobCA+IDEpIHtcbiAgICAgICAgICByeCAqPSBNYXRoLnNxcnQobCk7XG4gICAgICAgICAgcnkgKj0gTWF0aC5zcXJ0KGwpO1xuICAgICAgICB9IC8vIGN4JywgY3knXG5cblxuICAgICAgICB2YXIgcyA9IChsYXJnZUFyY0ZsYWcgPT09IHN3ZWVwRmxhZyA/IC0xIDogMSkgKiBNYXRoLnNxcnQoKE1hdGgucG93KHJ4LCAyKSAqIE1hdGgucG93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XBoJzpcbiAgICAgICAgICAgIF90aGlzLm1pc3NpbmdHbHlwaCA9IGNoaWxkO1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICBjYXNlICdnbHlwaCc6XG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIHZhciBnbHlwaCA9IGNoaWxkO1xuXG4gICAgICAgICAgICAgIGlmIChnbHlwaC5hcmFiaWNGb3JtKSB7XG4gICAgICAgICAgICAgICAgX3RoaXMuaXNSVEwgPSB0cnVlO1xuICAgICAgICAgICAgICAgIF90aGlzLmlzQXJhYmljID0gdHJ1ZTtcblxuICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgX3RoaXMuZ2x5cGhzW2dseXBoLnVuaWNvZGVdID09PSAndW5kZWZpbmVkJykge1xuICAgICAgICAgICAgICAgICAgX3RoaXMuZ2x5cGhzW2dseXBoLnVuaWNvZGVdID0ge307XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgX3RoaXMuZ2x5cGhzW2dseXBoLnVuaWNvZGVdW2dseXBoLmFyYWJpY0Zvcm1dID0gZ2x5cGg7XG4gICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgX3RoaXMuZ2x5cGhzW2dseXBoLnVuaWNvZGVdID0gZ2x5cGg7XG4gICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9IGNhdGNoIChlcnIpIHtcbiAgICAgIF9pdGVyYXRvci5lKGVycik7XG4gICAgfSBmaW5hbGx5IHtcbiAgICAgIF9pdGVyYXRvci5mKCk7XG4gICAgfVxuXG4gICAgcmV0dXJuIF90aGlzO1xuICB9XG5cbiAgX2NyZWF0ZUNsYXNzKEZvbnRFbGVtZW50LCBbe1xuICAgIGtleTogXCJyZW5kZXJcIixcbiAgICB2YWx1ZTogZnVuY3Rpb24gc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xuICAgICAgaWYgKGN0eCkge1xuICAgICAgICBjdHguYmVnaW5QYXRoKCk7XG4gICAgICB9XG5cbiAgICAgIGRhdGFBcnJheS5mb3JFYWNoKGZ1bmN0aW9uIChfcmVmKSB7XG4gICAgICAgIHZhciBjb21tYW5kID0gX3JlZi5jb21tYW5kLFxuICAgICAgICAgICAgcG9pbnRzID0gX3JlZi5wb2ludHM7XG5cbiAgICAgICAgc3dpdGNoIChjb21tYW5kKSB7XG4gICAgICAgICAgY2FzZSAnTCc6XG4gICAgICAgICAgICBpZiAoY3R4KSB7XG4gICAgICAgICAgICAgIGN0eC5saW5lVG8ocG9pbnRzWzBdLCBwb2ludHNbMV0pO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgIGNhc2UgJ00nOlxuICAgICAgICAgICAgaWYgKGN0eCkge1xuICAgICAgICAgICAgICBjdHgubW92ZVRvKHBvaW50c1swXSwgcG9pbnRzWzFdKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICBjYXNlICdDJzpcbiAgICAgICAgICAgIGlmIChjdHgpIHtcbiAgICAgICAgICAgICAgY3R4LmJlemllckN1cnZlVG8ocG9pbnRzWzBdLCBwb2ludHNbMV0sIHBvaW50c1syXSwgcG9pbnRzWzNdLCBwb2ludHNbNF0sIHBvaW50c1s1XSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgY2FzZSAnUSc6XG4gICAgICAgICAgICBpZiAoY3R4KSB7XG4gICAgICAgICAgICAgIGN0eC5xdWFkcmF0aWNDdXJ2ZVRvKHBvaW50c1swXSwgcG9pbnRzWzFdLCBwb2ludHNbMl0sIHBvaW50c1szXSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgY2FzZSAnQSc6XG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIHZhciBjeCA9IHBvaW50c1swXTtcbiAgICAgICAgICAgICAgdmFyIGN5ID0gcG9pbnRzWzFdO1xuICAgICAgICAgICAgICB2YXIgcnggPSBwb2ludHNbMl07XG4gICAgICAgICAgICAgIHZhciByeSA9IHBvaW50c1szXTtcbiAgICAgICAgICAgICAgdmFyIHRoZXRhID0gcG9pbnRzWzRdO1xuICAgICAgICAgICAgICB2YXIgZFRoZXRhID0gcG9pbnRzWzVdO1xuICAgICAgICAgICAgICB2YXIgcHNpID0gcG9pbnRzWzZdO1xuICAgICAgICAgICAgICB2YXIgZnMgPSBwb2ludHNbN107XG4gICAgICAgICAgICAgIHZhciByID0gcnggPiByeSA/IHJ4IDogcnk7XG4gICAgICAgICAgICAgIHZhciBzY2FsZVggPSByeCA+IHJ5ID8gMSA6IHJ4IC8gcnk7XG4gICAgICAgICAgICAgIHZhciBzY2FsZVkgPSByeCA+IHJ5ID8gcnkgLyByeCA6IDE7XG5cbiAgICAgICAgICAgICAgaWYgKGN0eCkge1xuICAgICAgICAgICAgICAgIGN0eC50cmFuc2xhdGUoY3gsIGN5KTtcbiAgICAgICAgICAgICAgICBjdHgucm90YXRlKHBzaSk7XG4gICAgICAgICAgICAgICAgY3R4LnNjYWxlKHNjYWxlWCwgc2NhbGVZKTtcbiAgICAgICAgICAgICAgICBjdHguYXJjKDAsIDAsIHIsIHRoZXRhLCB0aGV0YSArIGRUaGV0YSwgQm9vbGVhbigxIC0gZnMpKTtcbiAgICAgICAgICAgICAgICBjdHguc2NhbGUoMSAvIHNjYWxlWCwgMSAvIHNjYWxlWSk7XG4gICAgICAgICAgICAgICAgY3R4LnJvdGF0ZSgtcHNpKTtcbiAgICAgICAgICAgICAgICBjdHgudHJhbnNsYXRlKC1jeCwgLWN5KTtcbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgY2FzZSAneic6XG4gICAgICAgICAgICBpZiAoY3R4KSB7XG4gICAgICAgICAgICAgIGN0eC5jbG9zZVBhdGgoKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgIH1cbiAgfSwge1xuICAgIGtleTogXCJyZW5kZXJDaGlsZHJlblwiLFxuICAgIHZhbHVlOiBmdW5jdGlvbiByZW5kZXJDaGlsZHJlbihjdHgpIHtcbiAgICAgIHRoaXMuc2V0VGV4dERhdGEoY3R4KTtcbiAgICAgIGN0eC5zYXZlKCk7XG4gICAgICB2YXIgdGV4dERlY29yYXRpb24gPSB0aGlzLnBhcmVudC5nZXRTdHlsZSgndGV4dC1kZWNvcmF0aW9uJykuZ2V0U3RyaW5nKCk7XG4gICAgICB2YXIgZm9udFNpemUgPSB0aGlzLmdldEZvbnRTaXplKCk7XG4gICAgICB2YXIgZ2x5cGhJbmZvID0gdGhpcy5nbHlwaEluZm87XG4gICAgICB2YXIgZmlsbCA9IGN0eC5maWxsU3R5bGU7XG5cbiAgICAgIGlmICh0ZXh0RGVjb3JhdGlvbiA9PT0gJ3VuZGVybGluZScpIHtcbiAgICAgICAgY3R4LmJlZ2luUGF0aCgpO1xuICAgICAgfVxuXG4gICAgICBnbHlwaEluZm8uZm9yRWFjaChmdW5jdGlvbiAoZ2x5cGgsIGkpIHtcbiAgICAgICAgdmFyIHAwID0gZ2x5cGgucDAsXG4gICAgICAgICAgICBwMSA9IGdseXBoLnAxLFxuICAgICAgICAgICAgcGFydGlhbFRleHQgPSBnbHlwaC50ZXh0O1xuICAgICAgICBjdHguc2F2ZSgpO1xuICAgICAgICBjdHgudHJhbnNsYXRlKHAwLngsIHAwLnkpO1xuICAgICAgICBjdHgucm90YXRlKGdseXBoSW5mb1tpXS5yb3RhdGlvbik7XG5cbiAgICAgICAgaWYgKGN0eC5maWxsU3R5bGUpIHtcbiAgICAgICAgICBjdHguZmlsbFRleHQocGFydGlhbFRleHQsIDAsIDApO1xuICAgICAgICB9XG5cbiAgICAgICA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LnB1c2goe1xuICAgICAgICAgIHRyYW5zcG9zZVg6IG1pZHBvaW50LngsXG4gICAgICAgICAgdHJhbnNwb3NlWTogbWlkcG9pbnQueSxcbiAgICAgICAgICB0ZXh0OiBjaGFyc1tpXSxcbiAgICAgICAgICBwMDogc2VnbWVudC5wMCxcbiAgICAgICAgICBwMTogc2VnbWVudC5wMSxcbiAgICAgICAgICByb3RhdGlvbjogcm90YXRpb25cbiAgICAgICAgfSk7XG4gICAgICB9KTtcbiAgICB9XG4gIH0sIHtcbiAgICBrZXk6IFwicGFyc2VQYXRoRGF0YVwiLFxuICAgIHZhbHVlOiBmdW5jdGlvbiBwYXJzZVBhdGhEYXRhKHBhdGgpIHtcbiAgICAgIHRoaXMucGF0aExlbmd0aCA9IC0xOyAvLyByZXNldCBwYXRoIGxlbmd0aFxuXG4gICAgICBpZiAoIXBhdGgpIHtcbiAgICAgICAgcmV0dXJuIFtdO1xuICAgICAgfVxuXG4gICAgICB2YXIgcGF0aENvbW1hbmRzID0gW107XG4gICAgICB2YXIgcGF0aFBhcnNlciA9IHBhdGgucGF0aFBhcnNlcjtcbiAgICAgIHBhdGhQYXJzZXIucmVzZXQoKTsgLy8gY29udmVydCBsLCBILCBoLCBWLCBhbmQgdiB0byBMXG5cbiAgICAgIHdoaWxlICghcGF0aFBhcnNlci5pc0VuZCgpKSB7XG4gICAgICAgIHZhciBjdXJyZW50ID0gcGF0aFBhcnNlci5jdXJyZW50O1xuICAgICAgICB2YXIgc3RhcnRYID0gY3VycmVudCA/IGN1cnJlbnQueCA6IDA7XG4gICAgICAgIHZhciBzdGFydFkgPSBjdXJyZW50ID8gY3VycmVudC55IDogMDtcbiAgICAgICAgdmFyIGNtZCA9ICcnO1xuICAgICAgICB2YXIgcG9pbnRzID0gW107XG4gICAgICAgIHBhdGhQYXJzZXIubmV4dENvbW1hbmQoKTtcbiAgICAgICAgdmFyIHVwcGVyQ29tbWFuZCA9IHBhdGhQYXJzZXIuY29tbWFuZC50b1VwcGVyQ2FzZSgpO1xuXG4gICAgICAgIHN3aXRjaCAocGF0aFBhcnNlci5jb21tYW5kKSB7XG4gICAgICAgICAgY2FzZSAnTSc6XG4gICAgICAgICAgY2FzZSAnbSc6XG4gICAgICAgICAgICBjbWQgPSB0aGlzLnBhdGhNKHBhdGhQYXJzZXIsIHBvaW50cyk7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgIGNhc2UgJ0wnOlxuICAgICAgICAgIGNhc2UgJ2wnOlxuICAgICAgICAgICAgY21kID0gdGhpcy5wYXRoTChwYXRoUGFyc2VyLCBwb2ludHMpO1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICBjYXNlICdIJzpcbiAgICAgICAgICBjYXNlICdoJzpcbiAgICAgICAgICAgIGNtZCA9IHRoaXMucGF0aEgocGF0aFBhcnNlciwgcG9pbnRzKTtcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgY2FzZSAnVic6XG4gICAgICAgICAgY2FzZSAndic6XG4gICAgICAgICAgICBjbWQgPSB0aGlzLnBhdGhWKHBhdGhQYXJzZXIsIHBvaW50cyk7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgIGNhc2UgJ0MnOlxuICAgICAgICAgIGNhc2UgJ2MnOlxuICAgICAgICAgICAgdGhpcy5wYXRoQyhwYXRoUGFyc2VyLCBwb2ludHMpO1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICBjYXNlICdTJzpcbiAgICAgICAgICBjYXNlICdzJzpcbiAgICAgICAgICAgIGNtZCA9IHRoaXMucGF0aFMocGF0aFBhcnNlciwgcG9pbnRzKTtcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgY2FzZSAnUSc6XG4gICAgICAgICAgY2FzZSAncSc6XG4gICAgICAgICAgICB0aGlzLnBhdGhRKHBhdGhQYXJzZXIsIHBvaW50cyk7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgIGNhc2UgJ1QnOlxuICAgICAgICAgIGNhc2UgJ3QnOlxuICAgICAgICAgICAgY21kID0gdGhpcy5wYXRoVChwYXRoUGFyc2VyLCBwb2ludHMpO1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICBjYXNlICdBJzpcbiAgICAgICAgICBjYXNlICdhJzpcbiAgICAgICAgICAgIHBvaW50cyA9IHRoaXMucGF0aEEocGF0aFBhcnNlcik7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgIGNhc2UgJ1onOlxuICAgICAgICAgIGNhc2UgJ3onOlxuICAgICAgICAgICAgcGF0aFBhcnNlci5jdXJyZW50ID0gcGF0aFBhcnNlci5zdGFydDtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHVwcGVyQ29tbWFuZCAhPT0gJ1onKSB7XG4gICAgICAgICAgcGF0aENvbW1hbmRzLnB1c2goe1xuICAgICAgICAgICAgY29tbWFuZDogY21kIHx8IHVwcGVyQ29tbWFuZCxcbiAgICAgICAgICAgIHBvaW50czogcG9pbnRzLFxuICAgICAgICAgICAgc3RhcnQ6IHtcbiAgICAgICAgICAgICAgeDogc3RhcnRYLFxuICAgICAgICAgICAgICB5OiBzdGFydFlcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBwYXRoTGVuZ3RoOiB0aGlzLmNhbGNMZW5ndGgoc3RhcnRYLCBzdGFydFksIGNtZCB8fCB1cHBlckNvbW1hbmQsIHBvaW50cylcbiAgICAgICAgICB9KTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBwYXRoQ29tbWFuZHMucHVzaCh7XG4gICAgICAgICAgICBjb21tYW5kOiAneicsXG4gICAgICAgICAgICBwb2ludHM6IFtdLFxuICAgICAgICAgICAgcGF0aExlbmd0aDogMFxuICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBwYXRoQ29tbWFuZHM7XG4gICAgfVxuICB9LCB7XG4gICAga2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iAgICAgICAgICByeSAqPSBNYXRoLnNxcnQobCk7XG4gICAgICAgIH0gLy8gY3gnLCBjeSdcblxuXG4gICAgICAgIHZhciBzID0gKGxhcmdlQXJjRmxhZyA9PT0gc3dlZXBGbGFnID8gLTEgOiAxKSAqIE1hdGguc3FydCgoTWF0aC5wb3cocngsIDIpICogTWF0aC5wb3cocnksIDIpIC0gTWF0aC5wb3cocngsIDIpICogTWF0aC5wb3coY3VycnAueSwgMikgLSBNYXRoLnBvdyhyeSwgMikgKiBNYXRoLnBvdyhjdXJycC54LCAyKSkgLyAoTWF0aC5wb3cocngsIDIpICogTWF0aC5wb3coY3VycnAueSwgMikgKyBNYXRoLnBvdyhyeSwgMikgKiBNYXRoLnBvdyhjdXJycC54LCAyKSkpO1xuXG4gICAgICAgIGlmIChpc05hTihzKSkge1xuICAgICAgICAgIHMgPSAwO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIGNwcCA9IG5ldyBQb2ludChzICogcnggKiBjdXJycC55IC8gcnksIHMgKiAtcnkgKiBjdXJycC54IC8gcngpOyAvLyBjeCwgY3lcblxuICAgICAgICB2YXIgY2VudHAgPSBuZXcgUG9pbnQoKGN1cnJlbnQueCArIGN1cnJlbnRQb2ludC54KSAvIDIuMCArIE1hdGguY29zKHhBeGlzUm90YXRpb24pICogY3BwLnggLSBNYXRoLnNpbih4QXhpc1JvdGF0aW9uKSAqIGNwcC55LCAoY3VycmVudC55ICsgY3VycmVudFBvaW50LnkpIC8gMi4wICsgTWF0aC5zaW4oeEF4aXNSb3RhdGlvbikgKiBjcHAueCArIE1hdGguY29zKHhBeGlzUm90YXRpb24pICogY3BwLnkpOyAvLyBpbml0aWFsIGFuZ2xlXG5cbiAgICAgICAgdmFyIGExID0gdmVjdG9yc0FuZ2xlKFsxLCAwXSwgWyhjdXJycC54IC0gY3BwLngpIC8gcngsIChjdXJycC55IC0gY3BwLnkpIC8gcnldKTsgLy8gzrgxXG4gICAgICAgIC8vIGFuZ2xlIGRlbHRhXG5cbiAgICAgICAgdmFyIHUgPSBbKGN1cnJwLnggLSBjcHAueCkgLyByeCwgKGN1cnJwLnkgLSBjcHAueSkgLyByeV07XG4gICAgICAgIHZhciB2ID0gWygtY3VycnAueCAtIGNwcC54KSAvIHJ4LCAoLWN1cnJwLnkgLSBjcHAueSkgLyByeV07XG4gICAgICAgIHZhciBhZCA9IHZlY3RvcnNBbmdsZSh1LCB2KTsgLy8gzpTOuFxuXG4gICAgICAgIGlmICh2ZWN0b3JzUmF0aW8odSwgdikgPD0gLTEpIHtcbiAgICAgICAgICBhZCA9IE1hdGguUEk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAodmVjdG9yc1JhdGlvKHUsIHYpID49IDEpIHtcbiAgICAgICAgICBhZCA9IDA7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoc3dlZXBGbGFnID09PSAwICYmIGFkID4gMCkge1xuICAgICAgICAgIGFkID0gYWQgLSAyICogTWF0aC5QSTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChzd2VlcEZsYWcgPT09IDEgJiYgYWQgPCAwKSB7XG4gICAgICAgICAgYWQgPSBhZCArIDIgKiBNYXRoLlBJO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIFtjZW50cC54LCBjZW50cC55LCByeCwgcnksIGExLCBhZCwgeEF4aXNSb3RhdGlvbiwgc3dlZXBGbGFnXTtcbiAgICAgIH1cbiAgICB9XG4gIH0sIHtcbiAgICBrZXk6IFwiY2FsY0xlbmd0aFwiLFxuICAgIHZhbHVlOiBmdW5jdGlvbiBjYWxjTGVuZ3RoKHgsIHksIGNtZCwgcG9pbnRzKSB7XG4gICAgICB2YXIgbGVuID0gMDtcbiAgICAgIHZhciBwMSA9IG51bGw7XG4gICAgICB2YXIgcDIgPSBudWxsO1xuICAgICAgdmFyIHQgPSAwO1xuXG4gICAgICBzd2l0Y2ggKGNtZCkge1xuICAgICAgICBjYXNlICdMJzpcbiAgICAgICAgICByZXR1cm4gdGhpcy5n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7XG5cbiAgICAgICAgICBpZiAoZFRoZXRhIDwgMCkge1xuICAgICAgICAgICAgLy8gY2xvY2t3aXNlXG4gICAgICAgICAgICBmb3IgKHQgPSBzdGFydCAtIGluYzsgdCA+IGVuZDsgdCAtPSBpbmMpIHtcbiAgICAgICAgICAgICAgcDIgPSB0aGlzLmdldFBvaW50T25FbGxpcHRpY2FsQXJjKHBvaW50c1swXSwgcG9pbnRzWzFdLCBwb2ludHNbMl0sIHBvaW50c1szXSwgdCwgMCk7XG4gICAgICAgICAgICAgIGxlbiArPSB0aGlzLmdldExpbmVMZW5ndGgocDEueCwgcDEueSwgcDIueCwgcDIueSk7XG4gICAgICAgICAgICAgIHAxID0gcDI7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIC8vIGNvdW50ZXItY2xvY2t3aXNlXG4gICAgICAgICAgICBmb3IgKHQgPSBzdGFydCArIGluYzsgdCA8IGVuZDsgdCArPSBpbmMpIHtcbiAgICAgICAgICAgICAgcDIgPSB0aGlzLmdldFBvaW50T25FbGxpcHRpY2FsQXJjKHBvaW50c1swXSwgcG9pbnRzWzFdLCBwb2ludHNbMl0sIHBvaW50c1szXSwgdCwgMCk7XG4gICAgICAgICAgICAgIGxlbiArPSB0aGlzLmdldExpbmVMZW5ndGgocDEueCwgcDEueSwgcDIueCwgcDIueSk7XG4gICAgICAgICAgICAgIHAxID0gcDI7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgcDIgPSB0aGlzLmdldFBvaW50T25FbGxpcHRpY2FsQXJjKHBvaW50c1swXSwgcG9pbnRzWzFdLCBwb2ludHNbMl0sIHBvaW50c1szXSwgZW5kLCAwKTtcbiAgICAgICAgICBsZW4gKz0gdGhpcy5nZXRMaW5lTGVuZ3RoKHAxLngsIHAxLnksIHAyLngsIHAyLnkpO1xuICAgICAgICAgIHJldHVybiBsZW47XG4gICAgICB9XG5cbiAgICAgIHJldHVybiAwO1xu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BwYXRoQ21kLnBvaW50c1swXSwgcGF0aENtZC5wb2ludHNbMV0sIHBhdGhDbWQuc3RhcnQueCwgcGF0aENtZC5zdGFydC55KTtcbiAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgIGNhc2UgJ0EnOlxuICAgICAgICAgICAgICB2YXIgc3RhcnQgPSBwYXRoQ21kLnBvaW50c1s0XTsgLy8gNCA9IHRoZXRhXG5cbiAgICAgICAgICAgICAgdmFyIGRUaGV0YSA9IHBhdGhDbWQucG9pbnRzWzVdOyAvLyA1ID0gZFRoZXRhXG5cbiAgICAgICAgICAgICAgdmFyIGVuZCA9IHBhdGhDbWQucG9pbnRzWzRdICsgZFRoZXRhO1xuICAgICAgICAgICAgICBjdXJyZW50VCA9IHN0YXJ0ICsgZGVsdGEgLyBwYXRoQ21kLnBhdGhMZW5ndGggKiBkVGhldGE7XG5cbiAgICAgICAgICAgICAgaWYgKGRUaGV0YSA8IDAgJiYgY3VycmVudFQgPCBlbmQgfHwgZFRoZXRhID49IDAgJiYgY3VycmVudFQgPiBlbmQpIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgIHAgPSB0aGlzLmdldFBvaW50T25FbGxpcHRpY2FsQXJjKHBhdGhDbWQucG9pbnRzWzBdLCBwYXRoQ21kLnBvaW50c1sxXSwgcGF0aENtZC5wb2ludHNbMl0sIHBhdGhDbWQucG9pbnRzWzNdLCBjdXJyZW50VCwgcGF0aENtZC5wb2ludHNbNl0pO1xuICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgY2FzZSAnQyc6XG4gICAgICAgICAgICAgIGN1cnJlbnRUID0gZGVsdGEgLyBwYXRoQ21kLnBhdGhMZW5ndGg7XG5cbiAgICAgICAgICAgICAgaWYgKGN1cnJlbnRUID4gMSkge1xuICAgICAgICAgICAgICAgIGN1cnJlbnRUID0gMTtcbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgIHAgPSB0aGlzLmdldFBvaW50T25DdWJpY0JlemllcihjdXJyZW50VCwgcGF0aENtZC5zdGFydC54LCBwYXRoQ21kLnN0YXJ0LnksIHBhdGhDbWQucG9pbnRzWzBdLCBwYXRoQ21kLnBvaW50c1sxXSwgcGF0aENtZC5wb2ludHNbMl0sIHBhdGhDbWQucG9pbnRzWzNdLCBwYXRoQ21kLnBvaW50c1s0XSwgcGF0aENtZC5wb2ludHNbNV0pO1xuICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgY2FzZSAnUSc6XG4gICAgICAgICAgICAgIGN1cnJlbnRUID0gZGVsdGEgLyBwYXRoQ21kLnBhdGhMZW5ndGg7XG5cbiAgICAgICAgICAgICAgaWYgKGN1cnJlbnRUID4gMSkge1xuICAgICAgICAgICAgICAgIGN1cnJlbnRUID0gMTtcbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgIHAgPSB0aGlzLmdldFBvaW50T25RdWFkcmF0aWNCZXppZXIoY3VycmVudFQsIHBhdGhDbWQuc3RhcnQueCwgcGF0aENtZC5zdGFydC55LCBwYXRoQ21kLnBvaW50c1swXSwgcGF0aENtZC5wb2ludHNbMV0sIHBhdGhDbWQucG9pbnRzWzJdLCBwYXRoQ21kLnBvaW50c1szXSk7XG4gICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgIH1cblxuICAgICAgICAgIGlmIChwKSB7XG4gICAgICAgICAgICByZXR1cm4gcDtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgfSBjYXRjaCAoZXJyKSB7XG4gICAgICAgIF9pdGVyYXRvci5lKGVycik7XG4gICAgICB9IGZpbmFsbHkge1xuICAgICAgICBfaXRlcmF0b3IuZigpO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbnVsbDtcbiAgICB9XG4gIH0sIHtcbiAgICBrZXk6IFwiZ2V0TGluZUxlb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X3JlZ2VuZXJhdG9yUnVudGltZS5tYXJrKGZ1bmN0aW9uIF9jYWxsZWUoaHJlZikge1xuICAgICAgICB2YXIgaW1hZ2U7XG4gICAgICAgIHJldHVybiBfcmVnZW5lcmF0b3JSdW50aW1lLndyYXAoZnVuY3Rpb24gX2NhbGxlZSQoX2NvbnRleHQpIHtcbiAgICAgICAgICB3aGlsZSAoMSkge1xuICAgICAgICAgICAgc3dpdGNoIChfY29udGV4dC5wcmV2ID0gX2NvbnRleHQubmV4dCkge1xuICAgICAgICAgICAgICBjYXNlIDA6XG4gICAgICAgICAgICAgICAgX2NvbnRleHQucHJldiA9IDA7XG4gICAgICAgICAgICAgICAgX2NvbnRleHQubmV4dCA9IDM7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuZG9jdW1lbnQuY3JlYXRlSW1hZ2UoaHJlZik7XG5cbiAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgIGltYWdlID0gX2NvbnRleHQuc2VudDtcbiAgICAgICAgICAgICAgICB0aGlzLmltYWdlID0gaW1hZ2U7XG4gICAgICAgICAgICAgICAgX2NvbnRleHQubmV4dCA9IDEwO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICAgIGNhc2UgNzpcbiAgICAgICAgICAgICAgICBfY29udGV4dC5wcmV2ID0gNztcbiAgICAgICAgICAgICAgICBfY29udGV4dC50MCA9IF9jb250ZXh0W1wiY2F0Y2hcIl0oMCk7XG4gICAgICAgICAgICAgICAgLy8gdHNsaW50OmRpc2FibGUtbmV4dC1saW5lOiBuby1jb25zb2xlXG4gICAgICAgICAgICAgICAgY29uc29sZS5lcnJvcihcIkVycm9yIHdoaWxlIGxvYWRpbmcgaW1hZ2UgXFxcIlwiLmNvbmNhdChocmVmLCBcIlxcXCI6XCIpLCBfY29udGV4dC50MCk7XG5cbiAgICAgICAgICAgICAgY2FzZSAxMDpcbiAgICAgICAgICAgICAgICB0aGlzLmxvYWRlZCA9IHRydWU7XG5cbiAgICAgICAgICAgICAgY2FzZSAxMTpcbiAgICAgICAgICAgICAgY2FzZSBcImVuZFwiOlxuICAgICAgICAgICAgICAgIHJldHVybiBfY29udGV4dC5zdG9wKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9LCBfY2FsbGVlLCB0aGlzLCBbWzAsIDddXSk7XG4gICAgICB9KSk7XG5cbiAgICAgIGZ1bmN0aW9uIGxvYWRJbWFnZShfeCkge1xuICAgICAgICByZXR1cm4gX2xvYWRJbWFnZS5hcHBseSh0aGlzLCBhcmd1bWVudHMpO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbG9hZEltYWdlO1xuICAgIH0oKVxuICB9LCB7XG4gICAga2V5OiBcImxvYWRTdmdcIixcbiAgICB2YWx1ZTogZnVuY3Rpb24gKCkge1xuICAgICAgdmFyIF9sb2FkU3ZnID0gX2FzeW5jVG9HZW5lcmF0b3IoIC8qI19fUFVSRV9fKi9fcmVnZW5lcmF0b3JSdW50aW1lLm1hcmsoZnVuY3Rpb24gX2NhbGxlZTIoaHJlZikge1xuICAgICAgICB2YXIgcmVzcG9uc2UsIHN2ZztcbiAgICAgICAgcmV0dXJuIF9yZWdlbmVyYXRvclJ1bnRpbWUud3JhcChmdW5jdGlvbiBfY2FsbGVlMiQoX2NvbnRleHQyKSB7XG4gICAgICAgICAgd2hpbGUgKDEpIHtcbiAgICAgICAgICAgIHN3aXRjaCAoX2NvbnRleHQyLnByZXYgPSBfY29udGV4dDIubmV4dCkge1xuICAgICAgICAgICAgICBjYXNlIDA6XG4gICAgICAgICAgICAgICAgX2NvbnRleHQyLnByZXYgPSAwO1xuICAgICAgICAgICAgICAgIF9jb250ZXh0Mi5uZXh0ID0gMztcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5kb2N1bWVudC5mZXRjaChocmVmKTtcblxuICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgcmVzcG9uc2UgPSBfY29udGV4dDIuc2VudDtcbiAgICAgICAgICAgICAgICBfY29udGV4dDIubmV4dCA9IDY7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHJlc3BvbnNlLnRleHQoKTtcblxuICAgICAgICAgICAgICBjYXNlIDY6XG4gICAgICAgICAgICAgICAgc3ZnID0gX2NvbnRleHQyLnNlbnQ7XG4gICAgICAgICAgICAgICAgdGhpcy5pbWFnZSA9IHN2ZztcbiAgICAgICAgICAgICAgICBfY29udGV4dDIubmV4dCA9IDEzO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICAgIGNhc2UgMTA6XG4gICAgICAgICAgICAgICAgX2NvbnRleHQyLnByZXYgPSAxMDtcbiAgICAgICAgICAgICAgICBfY29udGV4dDIudDAgPSBfY29udGV4dDJbXCJjYXRjaFwiXSgwKTtcbiAgICAgICAgICAgICAgICAvLyB0c2xpbnQ6ZGlzYWJsZS1uZXh0LWxpbmU6IG5vLWNvbnNvbGVcbiAgICAgICAgICAgICAgICBjb25zb2xlLmVycm9yKFwiRXJyb3Igd2hpbGUgbG9hZGluZyBpbWFnZSBcXFwiXCIuY29uY2F0KGhyZWYsIFwiXFxcIjpcIiksIF9jb250ZXh0Mi50MCk7XG5cbiAgICAgICAgICAgICAgY2FzZSAxMzpcbiAgICAgICAgICAgICAgICB0aGlzLmxvYWRlZCA9IHRydWU7XG5cbiAgICAgICAgICAgICAgY2FzZSAxNDpcbiAgICAgICAgICAgICAgY2FzZSBcImVuZFwiOlxuICAgICAgICAgICAgICAgIHJldHVybiBfY29udGV4dDIuc3RvcCgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfSwgX2NhbGxlZTIsIHRoaXMsIFtbMCwgMTBdXSk7XG4gICAgICB9KSk7XG5cbiAgICAgIGZ1bmN0aW9uIGxvYWRTdmcoX3gyKSB7XG4gICAgICAgIHJldHVybiBfbG9hZFN2Zy5hcHBseSh0aGlzLCBhcmd1bWVudHMpO1xuICAgIC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vbnQgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KGZvbnROb2RlKTtcbiAgICAgICAgICAgICAgICAgIGRvY3VtZW50LmRlZmluaXRpb25zW2ZvbnRGYW1pbHldID0gZm9udDtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICBfY29udGV4dC5uZXh0ID0gMTI7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgICAgY2FzZSA5OlxuICAgICAgICAgICAgICAgIF9jb250ZXh0LnByZXYgPSA5O1xuICAgICAgICAgICAgICAgIF9jb250ZXh0LnQwID0gX2NvbnRleHRbXCJjYXRjaFwiXSgwKTtcbiAgICAgICAgICAgICAgICAvLyB0c2xpbnQ6ZGlzYWJsZS1uZXh0LWxpbmU6IG5vLWNvbnNvbGVcbiAgICAgICAgICAgICAgICBjb25zb2xlLmVycm9yKFwiRXJyb3Igd2hpbGUgbG9hZGluZyBmb250IFxcXCJcIi5jb25jYXQodXJsLCBcIlxcXCI6XCIpLCBfY29udGV4dC50MCk7XG5cbiAgICAgICAgICAgICAgY2FzZSAxMjpcbiAgICAgICAgICAgICAgICB0aGlzLmxvYWRlZCA9IHRydWU7XG5cbiAgICAgICAgICAgICAgY2FzZSAxMzpcbiAgICAgICAgICAgICAgY2FzZSBcImVuZFwiOlxuICAgICAgICAgICAgICAgIHJldHVybiBfY29udGV4dC5zdG9wKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9LCBfY2FsbGVlLCB0aGlzLCBbWzAsIDldXSk7XG4gICAgICB9KSk7XG5cbiAgICAgIGZ1bmN0aW9uIGxvYWQoX3gsIF94Mikge1xuICAgICAgICByZXR1cm4gX2xvYWQuYXBwbHkodGhpcywgYXJndW1lbnRzKTtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIGxvYWQ7XG4gICAgfSgpXG4gIH1dKTtcblxuICByZXR1cm4gU1ZHRm9udExvYWRlcjtcbn0oKTtcblxuZnVuY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gICByZXR1cm4gdGhpcy5zY3JlZW4uaXNSZWFkeSgpO1xuICAgIH1cbiAgICAvKipcbiAgICAgKiBSZW5kZXIgb25seSBmaXJzdCBmcmFtZSwgaWdub3JpbmcgYW5pbWF0aW9ucyBhbmQgbW91c2UuXG4gICAgICogQHBhcmFtIG9wdGlvbnMgLSBSZW5kZXJpbmcgb3B0aW9ucy5cbiAgICAgKi9cblxuICB9LCB7XG4gICAga2V5OiBcInJlbmRlclwiLFxuICAgIHZhbHVlOiBmdW5jdGlvbiAoKSB7XG4gICAgICB2YXIgX3JlbmRlciA9IF9hc3luY1RvR2VuZXJhdG9yKCAvKiNfX1BVUkVfXyovX3JlZ2VuZXJhdG9yUnVudGltZS5tYXJrKGZ1bmN0aW9uIF9jYWxsZWUoKSB7XG4gICAgICAgIHZhciBvcHRpb25zLFxuICAgICAgICAgICAgX2FyZ3MgPSBhcmd1bWVudHM7XG4gICAgICAgIHJldHVybiBfcmVnZW5lcmF0b3JSdW50aW1lLndyYXAoZnVuY3Rpb24gX2NhbGxlZSQoX2NvbnRleHQpIHtcbiAgICAgICAgICB3aGlsZSAoMSkge1xuICAgICAgICAgICAgc3dpdGNoIChfY29udGV4dC5wcmV2ID0gX2NvbnRleHQubmV4dCkge1xuICAgICAgICAgICAgICBjYXNlIDA6XG4gICAgICAgICAgICAgICAgb3B0aW9ucyA9IF9hcmdzLmxlbmd0aCA+IDAgJiYgX2FyZ3NbMF0gIT09IHVuZGVmaW5lZCA/IF9hcmdzWzBdIDoge307XG4gICAgICAgICAgICAgICAgdGhpcy5zdGFydChfb2JqZWN0U3ByZWFkJDEoe1xuICAgICAgICAgICAgICAgICAgZW5hYmxlUmVkcmF3OiB0cnVlLFxuICAgICAgICAgICAgICAgICAgaWdub3JlQW5pbWF0aW9uOiB0cnVlLFxuICAgICAgICAgICAgICAgICAgaWdub3JlTW91c2U6IHRydWVcbiAgICAgICAgICAgICAgICB9LCBvcHRpb25zKSk7XG4gICAgICAgICAgICAgICAgX2NvbnRleHQubmV4dCA9IDQ7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMucmVhZHkoKTtcblxuICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgdGhpcy5zdG9wKCk7XG5cbiAgICAgICAgICAgICAgY2FzZSA1OlxuICAgICAgICAgICAgICBjYXNlIFwiZW5kXCI6XG4gICAgICAgICAgICAgICAgcmV0dXJuIF9jb250ZXh0LnN0b3AoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH0sIF9jYWxsZWUsIHRoaXMpO1xuICAgICAgfSkpO1xuXG4gICAgICBmdW5jdGlvbiByZW5kZXIoKSB7XG4gICAgICAgIHJldHVybiBfcmVuZGVyLmFwcGx5KHRoaXMsIGFyZ3VtZW50cyk7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiByZW5kZXI7XG4gICAgfSgpXG4gICAgLyoqXG4gICAgICogU3RhcnQgcmVuZGVyaW5nLlxuICAgICAqIEBwYXJhbSBvcHRpb25zIC0gUmVuZGVyIG9wdGlvbnMuXG4gICAgICovXG5cbiAgfSwge1xuICAgIGtleTogXCJzdGFydFwiLFxuICAgIHZhbHVlOiBmdW5jdGlvbiBzdGFydCgpIHtcbiAgICAgIHZhciBvcHRpb25zID0gYXJndW1lbnRzLmxlbmd0aCA+IDAgJiYgYXJndW1lbnRzWzBdICE9PSB1bmRlZmluZWQgPyBhcmd1bWVudHNbMF0gOiB7fTtcbiAgICAgIHZhciBkb2N1bWVudEVsZW1lbnQgPSB0aGlzLmRvY3VtZW50RWxlbWVudCxcbiAgICAgICAgICBzY3JlZW4gPSB0aGlzLnNjcmVlbixcbiAgICAgICAgICBiYXNlT3B0aW9ucyA9IHRoaXMub3B0aW9ucztcbiAgICAgIHNjcmVlbi5zdGFydChkb2N1bWVudEVsZW1lbnQsIF9vYmplY3RTcHJlYWQkMSh7XG4gICAgICAgIGVuYWJsZVJlZHJhdzogdHJ1ZVxuICAgICAgfSw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1xuICAgICAgICB2YXIgb3B0aW9ucyxcbiAgICAgICAgICAgIHBhcnNlcixcbiAgICAgICAgICAgIHN2Z0RvY3VtZW50LFxuICAgICAgICAgICAgX2FyZ3MyID0gYXJndW1lbnRzO1xuICAgICAgICByZXR1cm4gX3JlZ2VuZXJhdG9yUnVudGltZS53cmFwKGZ1bmN0aW9uIF9jYWxsZWUyJChfY29udGV4dDIpIHtcbiAgICAgICAgICB3aGlsZSAoMSkge1xuICAgICAgICAgICAgc3dpdGNoIChfY29udGV4dDIucHJldiA9IF9jb250ZXh0Mi5uZXh0KSB7XG4gICAgICAgICAgICAgIGNhc2UgMDpcbiAgICAgICAgICAgICAgICBvcHRpb25zID0gX2FyZ3MyLmxlbmd0aCA+IDIgJiYgX2FyZ3MyWzJdICE9PSB1bmRlZmluZWQgPyBfYXJnczJbMl0gOiB7fTtcbiAgICAgICAgICAgICAgICBwYXJzZXIgPSBuZXcgUGFyc2VyKG9wdGlvbnMpO1xuICAgICAgICAgICAgICAgIF9jb250ZXh0Mi5uZXh0ID0gNDtcbiAgICAgICAgICAgICAgICByZXR1cm4gcGFyc2VyLnBhcnNlKHN2Zyk7XG5cbiAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgIHN2Z0RvY3VtZW50ID0gX2NvbnRleHQyLnNlbnQ7XG4gICAgICAgICAgICAgICAgcmV0dXJuIF9jb250ZXh0Mi5hYnJ1cHQoXCJyZXR1cm5cIiwgbmV3IENhbnZnKGN0eCwgc3ZnRG9jdW1lbnQsIG9wdGlvbnMpKTtcblxuICAgICAgICAgICAgICBjYXNlIDY6XG4gICAgICAgICAgICAgIGNhc2UgXCJlbmRcIjpcbiAgICAgICAgICAgICAgICByZXR1cm4gX2NvbnRleHQyLnN0b3AoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH0sIF9jYWxsZWUyKTtcbiAgICAgIH0pKTtcblxuICAgICAgZnVuY3Rpb24gZnJvbShfeCwgX3g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IGNhc2UgMjpcbiAgICAgICAgICAgICAgICByZXNwb25zZSA9IF9jb250ZXh0LnNlbnQ7XG4gICAgICAgICAgICAgICAgX2NvbnRleHQubmV4dCA9IDU7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHJlc3BvbnNlLmJsb2IoKTtcblxuICAgICAgICAgICAgICBjYXNlIDU6XG4gICAgICAgICAgICAgICAgYmxvYiA9IF9jb250ZXh0LnNlbnQ7XG4gICAgICAgICAgICAgICAgX2NvbnRleHQubmV4dCA9IDg7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGNyZWF0ZUltYWdlQml0bWFwKGJsb2IpO1xuXG4gICAgICAgICAgICAgIGNhc2UgODpcbiAgICAgICAgICAgICAgICBpbWcgPSBfY29udGV4dC5zZW50O1xuICAgICAgICAgICAgICAgIHJldHVybiBfY29udGV4dC5hYnJ1cHQoXCJyZXR1cm5cIiwgaW1nKTtcblxuICAgICAgICAgICAgICBjYXNlIDEwOlxuICAgICAgICAgICAgICBjYXNlIFwiZW5kXCI6XG4gICAgICAgICAgICAgICAgcmV0dXJuIF9jb250ZXh0LnN0b3AoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH0sIF9jYWxsZWUpO1xuICAgICAgfSkpKCk7XG4gICAgfVxuICB9O1xuXG4gIGlmICh0eXBlb2YgRE9NUGFyc2VyICE9PSAndW5kZWZpbmVkJyB8fCB0eXBlb2YgRE9NUGFyc2VyRmFsbGJhY2sgPT09ICd1bmRlZmluZWQnKSB7XG4gICAgUmVmbGVjdC5kZWxldGVQcm9wZXJ0eShwcmVzZXQsICdET01QYXJzZXInKTtcbiAgfVxuXG4gIHJldHVybiBwcmVzZXQ7XG59XG5cbi8qKlxuICogT3B0aW9ucyBwcmVzZXQgZm9yIGBub2RlLWNhbnZhc2AuXG4gKiBAcGFyYW0gY29uZmlnIC0gUHJlc2V0IHJlcXVpcmVtZW50cy5cbiAqIEBwYXJhbSBjb25maWcuRE9NUGFyc2VyI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SW1oaGMwWnBibUZzYkhraUxDSm1hVzVoYkd4NVJXNTBjbmtpTENKamIyMXdiR1YwWlNJc0ltWnBibWx6YUNJc0luUm9jbTkzYmlJc0ltUmxiR1ZuWVhSbFdXbGxiR1FpTENKdGIyUjFiR1VpTENKeVpXZGxibVZ5WVhSdmNsSjFiblJwYldVaUxDSmhZMk5wWkdWdWRHRnNVM1J5YVdOMFRXOWtaU0lzSWtaMWJtTjBhVzl1SWwwc0ltMWhjSEJwYm1keklqb2lPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPMEZCUVVFN096czdPenRCUVU5QkxFMUJRVWxCTEU5QlFVOHNSMEZCU1N4VlFVRlZReXhQUVVGV0xFVkJRVzFDTzBGQlEyaERPMEZCUlVFc1VVRkJTVU1zUlVGQlJTeEhRVUZIUXl4TlFVRk5MRU5CUVVORExGTkJRV2hDTzBGQlEwRXNVVUZCU1VNc1RVRkJUU3hIUVVGSFNDeEZRVUZGTEVOQlFVTkpMR05CUVdoQ08wRkJRMEVzVVVGQlNVTXNWMEZCU2l4RFFVeG5RenM3UVVGTmFFTXNVVUZCU1VNc1QwRkJUeXhIUVVGSExFOUJRVTlETEUxQlFWQXNTMEZCYTBJc1ZVRkJiRUlzUjBGQkswSkJMRTFCUVM5Q0xFZEJRWGRETEVWQlFYUkVPMEZCUTBFc1VVRkJTVU1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QlFVRkJMR3RDUVVGclFpeEhRVUZITTBrc1QwRkJja0k3UVVGRFJDeEhRVVpFTEVOQlJVVXNUMEZCVHpSSkxHOUNRVUZRTEVWQlFUWkNPenM3T3pzN096czdPMEZCVlRkQ1F5eEpRVUZCUVN4UlFVRlJMRU5CUVVNc1IwRkJSQ3hGUVVGTkxIZENRVUZPTEVOQlFWSXNRMEZCZDBNM1NTeFBRVUY0UXpzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPeUo5XG4iLCJleHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBfYXJyYXlMaWtlVG9BcnJheShhcnIsIGxlbikge1xuICBpZiAobGVuID09IG51bGwgfHwgbGVuID4gYXJyLmxlbmd0aCkgbGVu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bGVnYXRlLCBjb250ZXh0KTtcbiAgICAgICAgICBpZiAoZGVsZWdhdGVSZXN1bHQpIHtcbiAgICAgICAgICAgIGlmIChkZWxlZ2F0ZVJlc3VsdCA9PT0gQ29udGludWVTZW50aW5lbCkgY29udGludWU7XG4gICAgICAgICAgICByZXR1cm4gZGVsZWdhdGVSZXN1bHQ7XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGNvbnRleHQubWV0aG9kID09PSBcIm5leHRcIikge1xuICAgICAgICAgIC8vIFNldHRpbmcgY29udGV4dC5fc2VudCBmb3IgbGVnYWN5IHN1cHBvcnQgb2YgQmFiZWwnc1xuICAgICAgICAgIC8vIGZ1bmN0aW9uLnNlbnQgaW1wbGVtZW50YXRpb24uXG4gICAgICAgICAgY29udGV4dC5zZW50ID0gY29udGV4dC5fc2VudCA9IGNvbnRleHQuYXJnO1xuXG4gICAgICAgIH0gZWxzZSBpZiAoY29udGV4dC5tZXRob2QgPT09IFwidGhyb3dcIikge1xuICAgICAgICAgIGlmIChzdGF0ZSA9PT0gR2VuU3RhdGVTdXNwZW5kZWRTdGFydCkge1xuICAgICAgICAgICAgc3RhdGUgPSBHZW5TdGF0ZUNvbXBsZXRlZDtcbiAgICAgICAgICAgIHRocm93IGNvbnRleHQuYXJnO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGNvbnRleHQuZGlzcGF0Y2hFeGNlcHRpb24oY29udGV4dC5hcmcpO1xuXG4gICAgICAgIH0gZWxzZSBpZiAoY29udGV4dC5tZXRob2QgPT09IFwicmV0dXJuXCIpIHtcbiAgICAgICAgICBjb250ZXh0LmFicnVwdChcInJldHVyblwiLCBjb250ZXh0LmFyZyk7XG4gICAgICAgIH1cblxuICAgICAgICBzdGF0ZSA9IEdlblN0YXRlRXhlY3V0aW5nO1xuXG4gICAgICAgIHZhciByZWNvcmQgPSB0cnlDYXRjaChpbm5lckZuLCBzZWxmLCBjb250ZXh0KTtcbiAgICAgICAgaWYgKHJ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gICAgIHRoaXMubWV0aG9kID0gXCJuZXh0XCI7XG4gICAgICB0aGlzLmFyZyA9IHVuZGVmaW5lZDtcblxuICAgICAgdGhpcy50cnlFbnRyaWVzLmZvckVhY2gocmVzZXRUcnlFbnRyeSk7XG5cbiAgICAgIGlmICghc2tpcFRlbXBSZXNldCkge1xuICAgICAgICBmb3IgKHZhciBuYW1lIGluIHRoaXMpIHtcbiAgICAgICAgICAvLyBOb3Qgc3VyZSBhYm91dCB0aGUgb3B0aW1hbCBvcmRlciBvZiB0aGVzZSBjb25kaXRpb25zOlxuICAgICAgICAgIGlmIChuYW1lLmNoYXJBdCgwKSA9PT0gXCJ0XCIgJiZcbiAgICAgICAgICAgICAgaGFzT3duLmNhbGwodGhpcywgbmFtZSkgJiZcbiAgICAgICAgICAgICAgIWlzTmFOKCtuYW1lLnNsaWNlKDEpKSkge1xuICAgICAgICAgICAgdGhpc1tuYW1lXSA9IHVuZGVmaW5lZDtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9LFxuXG4gICAgc3RvcDogZnVuY3Rpb24oKSB7XG4gICAgICB0aGlzLmRvbmUgPSB0cnVlO1xuXG4gICAgICB2YXIgcm9vdEVudHJ5ID0gdGhpcy50cnlFbnRyaWVzWzBdO1xuICAgICAgdmFyIHJvb3RSZWNvcmQgPSByb290RW50cnkuY29tcGxldGlvbjtcbiAgICAgIGlmIChyb290UmVjb3JkLnR5cGUgPT09IFwidGhyb3dcIikge1xuICAgICAgICB0aHJvdyByb290UmVjb3JkLmFyZztcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIHRoaXMucnZhbDtcbiAgICB9LFxuXG4gICAgZGlzcGF0Y2hFeGNlcHRpb246IGZ1bmN0aW9uKGV4Y2VwdGlvbikge1xuICAgICAgaWYgKHRoaXMuZG9uZSkge1xuICAgICAgICB0aHJvdyBleGNlcHRpb247XG4gICAgICB9XG5cbiAgICAgIHZhciBjb250ZXh0ID0gdGhpcztcbiAgICAgIG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G5cbiAgICAgICAgaWYgKGVudHJ5LnRyeUxvYyA8PSB0aGlzLnByZXYpIHtcbiAgICAgICAgICB2YXIgaGFzQ2F0Y2ggPSBoYXNPd24uY2FsbChlbnRyeSwgXCJjYXRjaExvY1wiKTtcbiAgICAgICAgICB2YXIgaGFzRmluYWxseSA9IGhhc093bi5jYWxsKGVudHJ5LCBcImZpbmFsbHlMb2NcIik7XG5cbiAgICAgICAgICBpZiAoaGFzQ2F0Y2ggJiYgaGFzRmluYWxseSkge1xuICAgICAgICAgICAgaWYgKHRoaXMucHJldiA8IGVudHJ5LmNhdGNoTG9jKSB7XG4gICAgICAgICAgICAgIHJldHVybiBoYW5kbGUoZW50cnkuY2F0Y2hMb2MsIHRydWUpO1xuICAgICAgICAgICAgfSBlbHNlIGlmICh0aGlzLnByZXYgPCBlbnRyeS5maW5hbGx5TG9jKSB7XG4gICAgICAgICAgICAgIHJldHVybiBoYW5kbGUoZW50cnkuZmluYWxseUxvYyk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICB9IGVsc2UgaWYgKGhhc0NhdGNoKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5wcmV2IDwgZW50cnkuY2F0Y2hMb2MpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShlbnRyeS5jYXRjaExvYywgdHJ1ZSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICB9IGVsc2UgaWYgKGhhc0ZpbmFsbHkpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLnByZXYgPCBlbnRyeS5maW5hbGx5TG9jKSB7XG4gICAgICAgICAgICAgIHJldHVybiBoYW5kbGUoZW50cnkuZmluYWxseUxvYyk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFwidHJ5IHN0YXRlbWVudCB3aXRob3V0IGNhdGNoIG9yIGZpbmFsbHlcIik7XG4gICAgICAgICAgfVxuICAgICAgICB9X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lmIChmaW5hbGx5RW50cnkpIHtcbiAgICAgICAgdGhpcy5tZXRob2QgPSBcIm5leHRcIjtcbiAgICAgICAgdGhpcy5uZXh0ID0gZmluYWxseUVudHJ5LmZpbmFsbHlMb2M7XG4gICAgICAgIHJldHVybiBDb250aW51ZVNlbnRpbmVsO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gdGhpcy5jb21wbGV0ZShyZWNvcmQpO1xuICAgIH0sXG5cbiAgICBjb21wbGV0ZTogZnVuY3Rpb24ocmVjb3JkLCBhZnRlckxvYykge1xuICAgICAgaWYgKHJlY29yZC50eXBlID09PSBcInRocm93XCIpIHtcbiAgICAgICAgdGhyb3cgcmVjb3JkLmFyZztcbiAgICAgIH1cblxuICAgICAgaWYgKHJlY29yZC50eXBlID09PSBcImJyZWFrXCIgfHxcbiAgICAgICAgICByZWNvcmQudHlwZSA9PT0gXCJjb250aW51ZVwiKSB7XG4gICAgICAgIHRoaXMubmV4dCA9IHJlY29yZC5hcmc7XG4gICAgICB9IGVsc2UgaWYgKHJlY29yZC50eXBlID09PSBcInJldHVyblwiKSB7XG4gICAgICAgIHRoaXMucnZhbCA9IHRoaXMuYXJnID0gcmVjb3JkLmFyZztcbiAgICAgICAgdGhpcy5tZXRob2QgPSBcInJldHVyblwiO1xuICAgICAgICB0aGlzLm5leHQgPSBcImVuZFwiO1xuICAgICAgfSBlbHNlIGlmIChyZWNvcmQudHlwZSA9PT0gXCJub3JtYWxcIiAmJiBhZnRlckxvYykge1xuICAgICAgICB0aGlzLm5leHQgPSBhZnRlckxvYztcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG4gICAgfSxcblxuICAgIGZpbmlzaDogZnVuY3Rpb24oZmluYWxseUxvYykge1xuICAgICAgZm9yICh2YXIgaSA9IHRoaXMudHJ5RW50cmllcy5sZW5ndGggLSAxOyBpID49IDA7IC0taSkge1xuICAgICAgICB2YXIgZW50cnkgPSB0aGlzLnRyeUVudHJpZXN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NDBlMGQwJyxcbiAgICAgICAgdmlvbGV0OiAnZWU4MmVlJyxcbiAgICAgICAgdmlvbGV0cmVkOiAnZDAyMDkwJyxcbiAgICAgICAgd2hlYXQ6ICdmNWRlYjMnLFxuICAgICAgICB3aGl0ZTogJ2ZmZmZmZicsXG4gICAgICAgIHdoaXRlc21va2U6ICdmNWY1ZjUnLFxuICAgICAgICB5ZWxsb3c6ICdmZmZmMDAnLFxuICAgICAgICB5ZWxsb3dncmVlbjogJzlhY2QzMidcbiAgICB9O1xuICAgIGNvbG9yX3N0cmluZyA9IHNpbXBsZV9jb2xvcnNbY29sb3Jfc3RyaW5nXSB8fCBjb2xvcl9zdHJpbmc7XG4gICAgLy8gZW1kIG9mIHNpbXBsZSB0eXBlLWluIGNvbG9yc1xuXG4gICAgLy8gYXJyYXkgb2YgY29sb3IgZGVmaW5pdGlvbiBvYmplY3RzXG4gICAgdmFyIGNvbG9yX2RlZnMgPSBbXG4gICAgICAgIHtcbiAgICAgICAgICAgIHJlOiAvXnJnYmFcXCgoXFxkezEsM30pLFxccyooXFxkezEsM30pLFxccyooXFxkezEsM30pLFxccyooKD86XFxkP1xcLik/XFxkKVxcKSQvLFxuICAgICAgICAgICAgZXhhbXBsZTogWydyZ2JhKDEyMywgMjM0LCA0NSwgMC44KScsICdyZ2JhKDI1NSwyMzQsMjQ1LDEuMCknXSxcbiAgICAgICAgICAgIHByb2Nlc3M6IGZ1bmN0aW9uIChiaXRzKXtcbiAgICAgICAgICAgICAgICByZXR1cm4gW1xuICAgICAgICAgICAgICAgICAgICBwYXJzZUludChiaXRzWzFdKSxcbiAgICAgICAgICAgICAgICAgICAgcGFyc2VJbnQoYml0c1syXSksXG4gICAgICAgICAgICAgICAgICAgIHBhcnNlSW50KGJpdHNbM10pLFxuICAgICAgICAgICAgICAgICAgICBwYXJzZUZsb2F0KGJpdHNbNF0pXG4gICAgICAgICAgICAgICAgXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgICAgcmU6IC9ecmdiXFwoKFxcZHsxLDN9KSxcXHMqKFxcZHsxLDN9KSxcXHMqKFxcZHsxLDN9KVxcKSQvLFxuICAgICAgICAgICAgZXhhbXBsZTogWydyZ2IoMTIzLCAyMzQsIDQ1KScsICdyZ2IoMjU1LDIzNCwyNDUpJ10sXG4gICAgICAgICAgICBwcm9jZXNzOiBmdW5jdGlvbiAoYml0cyl7XG4gICAgICAgICAgICAgICAgcmV0dXJuIFtcbiAgICAgICAgICAgICAgICAgICAgcGFyc2VJbnQoYml0c1sxXSksXG4gICAgICAgICAgICAgICAgICAgIHBhcnNlSW50KGJpdHNbMl0pLFxuICAgICAgICAgICAgICAgICAgICBwYXJzZUludChiaXRzWzNdKVxuICAgICAgICAgICAgICAgIF07XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICAgIHJlOiAvXihbMC05YS1mQS1GXXsyfSkoWzAtOWEtZkEtRl17Mn0pKFswLTlhLWZBLUZdezJ9KSQvLFxuICAgICAgICAgICAgZXhhbXBsZTogWycjMDBmZjAwJywgJzMzNjY5OSddLFxuICAgICAgICAgICAgcHJvY2VzczogZnVuY3Rpb24gKGJpdHMpe1xuICAgICAgICAgICAgICAgIHJldHVybiBbXG4gICAgICAgICAgICAgICAgICAgIHBhcnNlSW50KGJpdHNbMV0sIDE2KSxcbiAgICAgICAgICAgICAgICAgICAgcGFyc2VJbnQoYml0c1syXSwgMTYpLFxuICAgICAgICAgICAgICAgICAgICBwYXJzZUludChiaXRzWzNdLCAxNilcbiAgICAgICAgICAgICAgICBdO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgICByZTogL14oWzAtOWEtZkEtRl17MX0pKFswLTlhLWZBLUZdezF9KShbMC05YS1mQS1GXXsxfSkkLyxcbiAgICAgICAgICAgIGV4YW1wbGU6IFsnI2ZiMCcsICdmMGYnXSxcbiAgICAgICAgICAgIHByb2Nlc3M6IGZ1bmN0aW9uIChiaXRzKXtcbiAgICAgICAgICAgICAgICByZXR1cm4gW1xuICAgICAgICAgICAgICAgICAgICBwYXJzZUludChiaXRzWzFdICsgYml0c1sxXSwgMTYpLFxuICAgICAgICAgICAgICAgICAgICBwYXJzZUludChiaXRzWzJdICsgYml0c1syXSwgMTYpLFxuICAgICAgICAgICAgICAgICAgICBwYXJzZUludChiaXRzWzNdICsgYml0c1szXSwgMTYpXG4gICAgICAgICAgICAgICAgXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIF07XG5cbiAgICAvLyBzZWFyY2ggdGhyb3VnaCB0aGUgZGVmaW5pdGlvbnMgdG8gZmluZCBhIG1hdGNoXG4gICAgZm9yICh2YXIgaSA9IDA7IGkgPCBjb2xvcl9kZWZzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgIHZhciByZSA9IGNvbG9yX2RlZnNbaV0ucmU7XG4gICAgICAgIHZhciBwcm9jZXNzb3IgPSBjb2xvcl9kZWZzW2ldLnByb2Nlc3M7XG4gICAgICAgIHZhciBiaXRzID0gcmUuZXhlYyhjb2xvcl9zdHJpbmcpO1xuICAgICAgICBpZiAoYml0cykge1xuICAgICAgICAgICAgdmFyIGNoYW5uZWxzID0gcHJvY2Vzc29yKGJpdHMpO1xuICAgICAgICAgICAgdGhpcy5yID0gY2hhbm5lbHNbMF07XG4gICAgICAgICAgICB0aGlzLmcgPSBjaGFubmVsc1sxXTtcbiAgICAgICAgICAgIHRoaXMuYiA9IGNoYW5uZWxzWzJdO1xuICAgICAgICAgICAgaWYgKGNoYW5uZWxzLmxlbmd0aCA+IDMpIHtcbiAgICAgICAgICAgICAgICB0aGlzLmFscGhhID0gY2hhbm5lbHNbM107XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB0aGlzLm9rID0gdHJ1ZTtcbiAgICAgICAgfVxuXG4gICAgfVxuXG4gICAgLy8gdmFsaWRhdGUvY2xlYW51cCB2YWx1ZXNcbiAgICB0aG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ciA9IG5ldyBSR0JDb2xvcihleGFtcGxlc1tpXSk7XG4gICAgICAgICAgICAgICAgdmFyIGV4YW1wbGVfZGl2ID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnZGl2Jyk7XG4gICAgICAgICAgICAgICAgZXhhbXBsZV9kaXYuc3R5bGUuY3NzVGV4dCA9XG4gICAgICAgICAgICAgICAgICAgICAgICAnbWFyZ2luOiAzcHg7ICdcbiAgICAgICAgICAgICAgICAgICAgICAgICsgJ2JvcmRlcjogMXB4IHNvbGlkIGJsYWNrOyAnXG4gICAgICAgICAgICAgICAgICAgICAgICArICdiYWNrZ3JvdW5kOicgKyBsaXN0X2NvbG9yLnRvSGV4KCkgKyAnOyAnXG4gICAgICAgICAgICAgICAgICAgICAgICArICdjb2xvcjonICsgbGlzdF9jb2xvci50b0hleCgpXG4gICAgICAgICAgICAgICAgO1xuICAgICAgICAgICAgICAgIGV4YW1wbGVfZGl2LmFwcGVuZENoaWxkKGRvY3VtZW50LmNyZWF0ZVRleHROb2RlKCd0ZXN0JykpO1xuICAgICAgICAgICAgICAgIHZhciBsaXN0X2l0ZW1fdmFsdWUgPSBkb2N1bWVudC5jcmVhdGVUZXh0Tm9kZShcbiAgICAgICAgICAgICAgICAgICAgJyAnICsgZXhhbXBsZXNbaV0gKyAnIC0+ICcgKyBsaXN0X2NvbG9yLnRvUkdCKCkgKyAnIC0+ICcgKyBsaXN0X2NvbG9yLnRvSGV4KClcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIGxpc3RfaXRlbS5hcHBlbmRDaGlsZChleGFtcGxlX2Rpdik7XG4gICAgICAgICAgICAgICAgbGlzdF9pdGVtLmFwcGVuZENoaWxkKGxpc3RfaXRlbV92YWx1ZSk7XG4gICAgICAgICAgICAgICAgeG1sLmFwcGVuZENoaWxkKGxpc3RfaXRlbSk7XG5cbiAgICAgICAgICAgIH0gY2F0Y2goZSl7fVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiB4bWw7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A9IHN0YWNrLm5leHQ7XG4gICAgfVxuXG4gICAgdmFyIHJJblN1bSA9IDAsXG4gICAgICAgIGdJblN1bSA9IDAsXG4gICAgICAgIGJJblN1bSA9IDAsXG4gICAgICAgIGFJblN1bSA9IDAsXG4gICAgICAgIHJPdXRTdW0gPSByYWRpdXNQbHVzMSAqIHByLFxuICAgICAgICBnT3V0U3VtID0gcmFkaXVzUGx1czEgKiBwZyxcbiAgICAgICAgYk91dFN1bSA9IHJhZGl1c1BsdXMxICogcGIsXG4gICAgICAgIGFPdXRTdW0gPSByYWRpdXNQbHVzMSAqIHBhLFxuICAgICAgICByU3VtID0gc3VtRmFjdG9yICogcHIsXG4gICAgICAgIGdTdW0gPSBzdW1GYWN0b3IgKiBwZyxcbiAgICAgICAgYlN1bSA9IHN1bUZhY3RvciAqIHBiLFxuICAgICAgICBhU3VtID0gc3VtRmFjdG9yICogcGE7XG5cbiAgICBmb3IgKHZhciBfaTIgPSAxOyBfaTIgPCByYWRpdXNQbHVzMTsgX2kyKyspIHtcbiAgICAgIHZhciBwID0geWkgKyAoKHdpZHRoTWludXMxIDwgX2kyID8gd2lkdGhNaW51czEgOiBfaTIpIDw8IDIpO1xuICAgICAgdmFyIHIgPSBwaXhlbHNbcF0sXG4gICAgICAgICAgZyA9IHBpeGVsc1twICsgMV0sXG4gICAgICAgICAgYiA9IHBpeGVsc1twICsgMl0sXG4gICAgICAgICAgYSA9IHBpeGVsc1twICsgM107XG4gICAgICB2YXIgcmJzID0gcmFkaXVzUGx1czEgLSBfaTI7XG4gICAgICByU3VtICs9IChzdGFjay5yID0gcikgKiByYnM7XG4gICAgICBnU3VtICs9IChzdGFjay5nID0gZykgKiByYnM7XG4gICAgICBiU3VtICs9IChzdGFjay5iID0gYikgKiByYnM7XG4gICAgICBhU3VtICs9IChzdGFjay5hID0gYSkgKiByYnM7XG4gICAgICBySW5TdW0gKz0gcjtcbiAgICAgIGdJblN1bSArPSBnO1xuICAgICAgYkluU3VtICs9IGI7XG4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4ZWxzW3AgKyAxXSkgKiByYnM7XG4gICAgICBiU3VtICs9IChzdGFjay5iID0gcGIgPSBwaXhlbHNbcCArIDJdKSAqIHJicztcbiAgICAgIHJJblN1bSArPSBwcjtcbiAgICAgIGdJblN1bSArPSBwZztcbiAgICAgIGJJblN1bSArPSBwYjtcbiAgICAgIHN0YWNrID0gc3RhY2submV4dDtcbiAgICB9XG5cbiAgICBzdGFja0luID0gc3RhY2tTdGFydDtcbiAgICBzdGFja091dCA9IHN0YWNrRW5kO1xuXG4gICAgZm9yICh2YXIgeCA9IDA7IHggPCB3aWR0aDsgeCsrKSB7XG4gICAgICBwaXhlbHNbeWldID0gclN1bSAqIG11bFN1bSA+PiBzaGdTdW07XG4gICAgICBwaXhlbHNbeWkgKyAxXSA9IGdTdW0gKiBtdWxTdW0gPj4gc2hnU3VtO1xuICAgICAgcGl4ZWxzW3lpICsgMl0gPSBiU3VtICogbXVsU3VtID4+IHNoZ1N1bTtcbiAgICAgIHJTdW0gLT0gck91dFN1bTtcbiAgICAgIGdTdW0gLT0gZ091dFN1bTtcbiAgICAgIGJTdW0gLT0gYk91dFN1bTtcbiAgICAgIHJPdXRTdW0gLT0gc3RhY2tJbi5yO1xuICAgICAgZ091dFN1bSAtPSBzdGFja0luLmc7XG4gICAgICBiT3V0U3VtIC09IHN0YWNrSW4uYjtcbiAgICAgIHAgPSB5dyArICgocCA9IHggKyByYWRpdXMgKyAxKSA8IHdpZHRoTWludXMxID8gcCA6IHdpZHRoTWludXMxKSA8PCAyO1xuICAgICAgckluU3VtICs9IHN0YWNrSW4uciA9IHBpeGVsc1twXTtcbiAgICAgIGdJblN1bSArPSBzdGFja0luLmcgPSBwaXhlbHNbcCArIDFdO1xuICAgICAgYkluU3VtICs9IHN0YWNrSW4uYiA9IHBpeGVsc1twICsgMl07XG4gICAgICByU3VtICs9IHJJblN1bTtcbiAgICAgIGdTdW0gKz0gZ0luU3VtO1xuICAgICAgYlN1bSArPSBiSW5TdW07XG4gICAgICBz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