diff --git a/dist/canvg.js b/dist/canvg.js index 82fe0517..bc98c66f 100644 --- a/dist/canvg.js +++ b/dist/canvg.js @@ -2,6 +2,8 @@ var canvg = (function (exports) { 'use strict'; function _typeof(obj) { + "@babel/helpers - typeof"; + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function (obj) { return typeof obj; diff --git a/dist/dom-polyfill.js b/dist/dom-polyfill.js index 93d6e400..dc627299 100644 --- a/dist/dom-polyfill.js +++ b/dist/dom-polyfill.js @@ -2,6 +2,8 @@ 'use strict'; function _typeof(obj) { + "@babel/helpers - typeof"; + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function (obj) { return typeof obj; diff --git a/dist/extensions/ext-arrows.js b/dist/extensions/ext-arrows.js index 70193c19..f2705a42 100644 --- a/dist/extensions/ext-arrows.js +++ b/dist/extensions/ext-arrows.js @@ -47,10 +47,12 @@ var svgEditorExtension_arrows = (function () { */ var extArrows = { name: 'arrows', - init: function () { - var _init = _asyncToGenerator( + init: function init(S) { + var _this = this; + + return _asyncToGenerator( /*#__PURE__*/ - regeneratorRuntime.mark(function _callee2(S) { + regeneratorRuntime.mark(function _callee2() { var strings, svgEditor, svgCanvas, addElem, nonce, $, prefix, selElems, arrowprefix, randomizeIds, setArrowNonce, unsetArrowNonce, pathdata, getLinked, showPanel, resetMarker, addMarker, setArrow, colorChanged, contextTools; return regeneratorRuntime.wrap(function _callee2$(_context2) { while (1) { @@ -266,7 +268,7 @@ var svgEditorExtension_arrows = (function () { case 10: strings = _context2.sent; - svgEditor = this; + svgEditor = _this; svgCanvas = svgEditor.canvas; // {svgcontent} = S, addElem = svgCanvas.addSVGElementFromJson, nonce = S.nonce, $ = S.$, prefix = 'se_arrow_'; @@ -324,41 +326,36 @@ var svgEditorExtension_arrows = (function () { $('#arrow_list option')[0].id = 'connector_no_arrow'; }, - addLangData: function () { - var _addLangData = _asyncToGenerator( + addLangData: function addLangData(_ref) { + var lang = _ref.lang, + importLocale = _ref.importLocale; + return _asyncToGenerator( /*#__PURE__*/ - regeneratorRuntime.mark(function _callee(_ref) { - var lang, importLocale, _ref2, langList; + regeneratorRuntime.mark(function _callee() { + var _ref2, langList; return regeneratorRuntime.wrap(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: - lang = _ref.lang, importLocale = _ref.importLocale; - _context.next = 3; + _context.next = 2; return importLocale(); - case 3: + case 2: _ref2 = _context.sent; langList = _ref2.langList; return _context.abrupt("return", { data: langList }); - case 6: + case 5: case "end": return _context.stop(); } } }, _callee); - })); - - function addLangData(_x2) { - return _addLangData.apply(this, arguments); - } - - return addLangData; - }(), + }))(); + }, selectedChanged: function selectedChanged(opts) { // Use this to update the current selected elements selElems = opts.elems; @@ -397,15 +394,9 @@ var svgEditorExtension_arrows = (function () { return _context2.stop(); } } - }, _callee2, this); - })); - - function init(_x) { - return _init.apply(this, arguments); - } - - return init; - }() + }, _callee2); + }))(); + } }; return extArrows; diff --git a/dist/extensions/ext-closepath.js b/dist/extensions/ext-closepath.js index 12d1cf25..1c7dc48b 100644 --- a/dist/extensions/ext-closepath.js +++ b/dist/extensions/ext-closepath.js @@ -49,22 +49,25 @@ var svgEditorExtension_closepath = (function () { // The button toggles whether the path is open or closed var extClosepath = { name: 'closepath', - init: function () { - var _init = _asyncToGenerator( + init: function init(_ref) { + var _this = this; + + var importLocale = _ref.importLocale, + $ = _ref.$; + return _asyncToGenerator( /*#__PURE__*/ - regeneratorRuntime.mark(function _callee(_ref) { - var importLocale, $, strings, svgEditor, selElems, updateButton, showPanel, toggleClosed, buttons; + regeneratorRuntime.mark(function _callee() { + var strings, svgEditor, selElems, updateButton, showPanel, toggleClosed, buttons; return regeneratorRuntime.wrap(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: - importLocale = _ref.importLocale, $ = _ref.$; - _context.next = 3; + _context.next = 2; return importLocale(); - case 3: + case 2: strings = _context.sent; - svgEditor = this; + svgEditor = _this; updateButton = function updateButton(path) { var seglist = path.pathSegList, @@ -154,20 +157,14 @@ var svgEditorExtension_closepath = (function () { } }); - case 10: + case 9: case "end": return _context.stop(); } } - }, _callee, this); - })); - - function init(_x) { - return _init.apply(this, arguments); - } - - return init; - }() + }, _callee); + }))(); + } }; return extClosepath; diff --git a/dist/extensions/ext-connector.js b/dist/extensions/ext-connector.js index 6991dcb3..b78fb4be 100644 --- a/dist/extensions/ext-connector.js +++ b/dist/extensions/ext-connector.js @@ -49,10 +49,12 @@ var svgEditorExtension_connector = (function () { */ var extConnector = { name: 'connector', - init: function () { - var _init = _asyncToGenerator( + init: function init(S) { + var _this = this; + + return _asyncToGenerator( /*#__PURE__*/ - regeneratorRuntime.mark(function _callee(S) { + regeneratorRuntime.mark(function _callee() { var svgEditor, svgCanvas, getElem, $, svgroot, importLocale, addElem, selManager, connSel, elData, strings, startX, startY, curLine, startElem, endElem, seNs, svgcontent, started, connections, selElems, getBBintersect, getOffset, showPanel, setPoint, updateLine, findConnectors, updateConnectors, init, buttons; return regeneratorRuntime.wrap(function _callee$(_context) { while (1) { @@ -298,7 +300,7 @@ var svgEditorExtension_connector = (function () { }; }; - svgEditor = this; + svgEditor = _this; svgCanvas = svgEditor.canvas; getElem = svgCanvas.getElem; $ = S.$, svgroot = S.svgroot, importLocale = S.importLocale, addElem = svgCanvas.addSVGElementFromJson, selManager = S.selectorManager, connSel = '.se_connector', elData = $.data; @@ -683,15 +685,9 @@ var svgEditorExtension_connector = (function () { return _context.stop(); } } - }, _callee, this); - })); - - function init(_x) { - return _init.apply(this, arguments); - } - - return init; - }() + }, _callee); + }))(); + } }; return extConnector; diff --git a/dist/extensions/ext-eyedropper.js b/dist/extensions/ext-eyedropper.js index b7ff5919..292313f8 100644 --- a/dist/extensions/ext-eyedropper.js +++ b/dist/extensions/ext-eyedropper.js @@ -47,10 +47,12 @@ var svgEditorExtension_eyedropper = (function () { */ var extEyedropper = { name: 'eyedropper', - init: function () { - var _init = _asyncToGenerator( + init: function init(S) { + var _this = this; + + return _asyncToGenerator( /*#__PURE__*/ - regeneratorRuntime.mark(function _callee(S) { + regeneratorRuntime.mark(function _callee() { var strings, svgEditor, $, ChangeElementCommand, svgCanvas, addToHistory, currentStyle, getStyle, buttons; return regeneratorRuntime.wrap(function _callee$(_context) { while (1) { @@ -91,7 +93,7 @@ var svgEditorExtension_eyedropper = (function () { case 3: strings = _context.sent; - svgEditor = this; + svgEditor = _this; $ = S.$, ChangeElementCommand = S.ChangeElementCommand, svgCanvas = svgEditor.canvas, addToHistory = function addToHistory(cmd) { svgCanvas.undoMgr.addCommandToHistory(cmd); }, currentStyle = { @@ -192,15 +194,9 @@ var svgEditorExtension_eyedropper = (function () { return _context.stop(); } } - }, _callee, this); - })); - - function init(_x) { - return _init.apply(this, arguments); - } - - return init; - }() + }, _callee); + }))(); + } }; return extEyedropper; diff --git a/dist/extensions/ext-foreignobject.js b/dist/extensions/ext-foreignobject.js index 87ac57c9..930eab1b 100644 --- a/dist/extensions/ext-foreignobject.js +++ b/dist/extensions/ext-foreignobject.js @@ -47,10 +47,12 @@ var svgEditorExtension_foreignobject = (function () { */ var extForeignobject = { name: 'foreignobject', - init: function () { - var _init = _asyncToGenerator( + init: function init(S) { + var _this = this; + + return _asyncToGenerator( /*#__PURE__*/ - regeneratorRuntime.mark(function _callee2(S) { + regeneratorRuntime.mark(function _callee2() { var svgEditor, $, text2xml, NS, importLocale, svgCanvas, svgdoc, strings, properlySourceSizeTextArea, showPanel, toggleSourceButtons, selElems, started, newFO, editingforeign, setForeignString, showForeignEditor, setAttr, buttons, contextTools; return regeneratorRuntime.wrap(function _callee2$(_context2) { while (1) { @@ -115,7 +117,7 @@ var svgEditorExtension_foreignobject = (function () { $('#foreignObject_panel').toggle(on); }; - svgEditor = this; + svgEditor = _this; $ = S.$, text2xml = S.text2xml, NS = S.NS, importLocale = S.importLocale; svgCanvas = svgEditor.canvas; svgdoc = S.svgroot.parentNode.ownerDocument; @@ -357,15 +359,9 @@ var svgEditorExtension_foreignobject = (function () { return _context2.stop(); } } - }, _callee2, this); - })); - - function init(_x) { - return _init.apply(this, arguments); - } - - return init; - }() + }, _callee2); + }))(); + } }; return extForeignobject; diff --git a/dist/extensions/ext-grid.js b/dist/extensions/ext-grid.js index ea8987c2..c9744b38 100644 --- a/dist/extensions/ext-grid.js +++ b/dist/extensions/ext-grid.js @@ -47,11 +47,17 @@ var svgEditorExtension_grid = (function () { */ var extGrid = { name: 'grid', - init: function () { - var _init = _asyncToGenerator( + init: function init(_ref) { + var _this = this; + + var $ = _ref.$, + NS = _ref.NS, + getTypeMap = _ref.getTypeMap, + importLocale = _ref.importLocale; + return _asyncToGenerator( /*#__PURE__*/ - regeneratorRuntime.mark(function _callee(_ref) { - var $, NS, getTypeMap, importLocale, strings, svgEditor, svgCanvas, svgdoc, assignAttributes, hcanvas, canvBG, units, intervals, showGrid, canvasGrid, gridDefs, gridPattern, gridimg, gridBox, updateGrid, gridUpdate, buttons; + regeneratorRuntime.mark(function _callee() { + var strings, svgEditor, svgCanvas, svgdoc, assignAttributes, hcanvas, canvBG, units, intervals, showGrid, canvasGrid, gridDefs, gridPattern, gridimg, gridBox, updateGrid, gridUpdate, buttons; return regeneratorRuntime.wrap(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { @@ -113,13 +119,12 @@ var svgEditorExtension_grid = (function () { svgCanvas.setHref(gridimg, datauri); }; - $ = _ref.$, NS = _ref.NS, getTypeMap = _ref.getTypeMap, importLocale = _ref.importLocale; - _context.next = 5; + _context.next = 4; return importLocale(); - case 5: + case 4: strings = _context.sent; - svgEditor = this; + svgEditor = _this; svgCanvas = svgEditor.canvas; svgdoc = document.getElementById('svgcanvas').ownerDocument, assignAttributes = svgCanvas.assignAttributes, hcanvas = document.createElement('canvas'), canvBG = $('#canvasBackground'), units = getTypeMap(), intervals = [0.01, 0.1, 1, 10, 100, 1000]; showGrid = svgEditor.curConfig.showGrid || false; @@ -207,20 +212,14 @@ var svgEditorExtension_grid = (function () { }) }); - case 27: + case 26: case "end": return _context.stop(); } } - }, _callee, this); - })); - - function init(_x) { - return _init.apply(this, arguments); - } - - return init; - }() + }, _callee); + }))(); + } }; return extGrid; diff --git a/dist/extensions/ext-helloworld.js b/dist/extensions/ext-helloworld.js index d16c9607..6b490d2b 100644 --- a/dist/extensions/ext-helloworld.js +++ b/dist/extensions/ext-helloworld.js @@ -95,22 +95,25 @@ var svgEditorExtension_helloworld = (function () { */ var extHelloworld = { name: 'helloworld', - init: function () { - var _init = _asyncToGenerator( + init: function init(_ref) { + var _this = this; + + var $ = _ref.$, + importLocale = _ref.importLocale; + return _asyncToGenerator( /*#__PURE__*/ - regeneratorRuntime.mark(function _callee(_ref) { - var $, importLocale, strings, svgEditor, svgCanvas; + regeneratorRuntime.mark(function _callee() { + var strings, svgEditor, svgCanvas; return regeneratorRuntime.wrap(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: - $ = _ref.$, importLocale = _ref.importLocale; - _context.next = 3; + _context.next = 2; return importLocale(); - case 3: + case 2: strings = _context.sent; - svgEditor = this; + svgEditor = _this; svgCanvas = svgEditor.canvas; return _context.abrupt("return", { name: strings.name, @@ -176,20 +179,14 @@ var svgEditorExtension_helloworld = (function () { } }); - case 7: + case 6: case "end": return _context.stop(); } } - }, _callee, this); - })); - - function init(_x) { - return _init.apply(this, arguments); - } - - return init; - }() + }, _callee); + }))(); + } }; return extHelloworld; diff --git a/dist/extensions/ext-imagelib.js b/dist/extensions/ext-imagelib.js index e7eb4f12..0458b88f 100644 --- a/dist/extensions/ext-imagelib.js +++ b/dist/extensions/ext-imagelib.js @@ -2,6 +2,8 @@ var svgEditorExtension_imagelib = (function () { 'use strict'; function _typeof(obj) { + "@babel/helpers - typeof"; + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function (obj) { return typeof obj; @@ -61,11 +63,17 @@ var svgEditorExtension_imagelib = (function () { */ var extImagelib = { name: 'imagelib', - init: function () { - var _init = _asyncToGenerator( + init: function init(_ref) { + var _this = this; + + var $ = _ref.$, + decode64 = _ref.decode64, + importLocale = _ref.importLocale, + dropXMLInternalSubset = _ref.dropXMLInternalSubset; + return _asyncToGenerator( /*#__PURE__*/ - regeneratorRuntime.mark(function _callee2(_ref) { - var $, decode64, importLocale, dropXMLInternalSubset, imagelibStrings, modularVersion, svgEditor, uiStrings, svgCanvas, extIconsPath, allowedImageLibOrigins, closeBrowser, importImage, pending, mode, multiArr, transferStopped, preview, submit, onMessage, _onMessage, toggleMulti, showBrowser, buttons; + regeneratorRuntime.mark(function _callee2() { + var imagelibStrings, modularVersion, svgEditor, uiStrings, svgCanvas, extIconsPath, allowedImageLibOrigins, closeBrowser, importImage, pending, mode, multiArr, transferStopped, preview, submit, onMessage, _onMessage, toggleMulti, showBrowser, buttons; return regeneratorRuntime.wrap(function _callee2$(_context2) { while (1) { @@ -127,10 +135,10 @@ var svgEditorExtension_imagelib = (function () { }); cancel.prepend($.getSvgIcon('cancel', true)); back.prepend($.getSvgIcon('tool_imagelib', true)); - imagelibStrings.imgLibs.forEach(function (_ref5) { - var name = _ref5.name, - url = _ref5.url, - description = _ref5.description; + imagelibStrings.imgLibs.forEach(function (_ref4) { + var name = _ref4.name, + url = _ref4.url, + description = _ref4.description; $('
' + msg.replace(/\\n/g, '
') + '