n8n-editor-ui
Version:
Workflow Editor UI for n8n
100 lines (99 loc) • 5.59 kB
JavaScript
;
(function () {
System.register(["./chunk-legacy-Re9CbdfL.js", "./vue.runtime.esm-bundler-legacy--Sn1h8On.js"], function (_export, _context) {
"use strict";
var __commonJS, init_dist, global, require_FileSaver_min;
return {
setters: [function (_chunkLegacy001Js) {
__commonJS = _chunkLegacy001Js.t;
}, function (_vueRuntimeEsmBundlerLegacy003Js) {
init_dist = _vueRuntimeEsmBundlerLegacy003Js.Dn;
global = _vueRuntimeEsmBundlerLegacy003Js.En;
}],
execute: function () {
//#region ../../../node_modules/.pnpm/file-saver@2.0.5/node_modules/file-saver/dist/FileSaver.min.js
_export("t", require_FileSaver_min = /* @__PURE__ */__commonJS({
"../../../node_modules/.pnpm/file-saver@2.0.5/node_modules/file-saver/dist/FileSaver.min.js": (exports, module) => {
init_dist();
(function (a, b) {
if ("function" == typeof define && define.amd) define([], b);else if ("undefined" != typeof exports) b();else b(), a.FileSaver = {
exports: {}
}.exports;
})(exports, function () {
function b(a$1, b$1) {
return "undefined" == typeof b$1 ? b$1 = {
autoBom: !1
} : "object" != typeof b$1 && (console.warn("Deprecated: Expected third argument to be a object"), b$1 = {
autoBom: !b$1
}), b$1.autoBom && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a$1.type) ? new Blob(["", a$1], {
type: a$1.type
}) : a$1;
}
function c(a$1, b$1, c$1) {
var d$1 = new XMLHttpRequest();
d$1.open("GET", a$1), d$1.responseType = "blob", d$1.onload = function () {
g(d$1.response, b$1, c$1);
}, d$1.onerror = function () {
console.error("could not download file");
}, d$1.send();
}
function d(a$1) {
var b$1 = new XMLHttpRequest();
b$1.open("HEAD", a$1, !1);
try {
b$1.send();
} catch (a$2) {}
return 200 <= b$1.status && 299 >= b$1.status;
}
function e(a$1) {
try {
a$1.dispatchEvent(new MouseEvent("click"));
} catch (c$1) {
var b$1 = document.createEvent("MouseEvents");
b$1.initMouseEvent("click", !0, !0, window, 0, 0, 0, 80, 20, !1, !1, !1, !1, 0, null), a$1.dispatchEvent(b$1);
}
}
var f = "object" == typeof window && window.window === window ? window : "object" == typeof self && self.self === self ? self : "object" == typeof global && global.global === global ? global : void 0,
a = f.navigator && /Macintosh/.test(navigator.userAgent) && /AppleWebKit/.test(navigator.userAgent) && !/Safari/.test(navigator.userAgent),
g = f.saveAs || ("object" != typeof window || window !== f ? function () {} : "download" in HTMLAnchorElement.prototype && !a ? function (b$1, g$1, h) {
var i = f.URL || f.webkitURL,
j = document.createElement("a");
g$1 = g$1 || b$1.name || "download", j.download = g$1, j.rel = "noopener", "string" == typeof b$1 ? (j.href = b$1, j.origin === location.origin ? e(j) : d(j.href) ? c(b$1, g$1, h) : e(j, j.target = "_blank")) : (j.href = i.createObjectURL(b$1), setTimeout(function () {
i.revokeObjectURL(j.href);
}, 4e4), setTimeout(function () {
e(j);
}, 0));
} : "msSaveOrOpenBlob" in navigator ? function (f$1, g$1, h) {
if (g$1 = g$1 || f$1.name || "download", "string" != typeof f$1) navigator.msSaveOrOpenBlob(b(f$1, h), g$1);else if (d(f$1)) c(f$1, g$1, h);else {
var i = document.createElement("a");
i.href = f$1, i.target = "_blank", setTimeout(function () {
e(i);
});
}
} : function (b$1, d$1, e$1, g$1) {
if (g$1 = g$1 || open("", "_blank"), g$1 && (g$1.document.title = g$1.document.body.innerText = "downloading..."), "string" == typeof b$1) return c(b$1, d$1, e$1);
var h = "application/octet-stream" === b$1.type,
i = /constructor/i.test(f.HTMLElement) || f.safari,
j = /CriOS\/[\d]+/.test(navigator.userAgent);
if ((j || h && i || a) && "undefined" != typeof FileReader) {
var k = new FileReader();
k.onloadend = function () {
var a$1 = k.result;
a$1 = j ? a$1 : a$1.replace(/^data:[^;]*;/, "data:attachment/file;"), g$1 ? g$1.location.href = a$1 : location = a$1, g$1 = null;
}, k.readAsDataURL(b$1);
} else {
var l = f.URL || f.webkitURL,
m = l.createObjectURL(b$1);
g$1 ? g$1.location = m : location.href = m, g$1 = null, setTimeout(function () {
l.revokeObjectURL(m);
}, 4e4);
}
});
f.saveAs = g.saveAs = g, "undefined" != typeof module && (module.exports = g);
});
}
})); //#endregion
}
};
});
})();