1,优化URL报错,2,更新OFD组件 3,美化Excel 4,文本方法关闭字节流 5,新增多种类型文件预览 (#419)

1,优化URL报错
2,更新OFD组件
3,美化Excel
4,文本方法关闭字节流
5,新增xmind、eml、epub、"obj", "3ds", "stl", "ply", "off", "3dm", "fbx", "dae", "wrl", "3mf", "ifc","glb","o3dv","gltf","stp","bim","fcstd","step","iges","brep"格式

Co-authored-by: gaoxiongzaq <admin@cxcp.com>
This commit is contained in:
gaoxingzaq
2022-12-28 10:17:06 +08:00
committed by GitHub
parent aa66173625
commit 69566834ea
96 changed files with 320274 additions and 708 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html site-mode=en mode=production lang=en>
<head>
<meta http-equiv=Content-Type content="text/html; charset=utf-8">
<meta http-equiv=X-UA-Compatible content="ie=edge">
<meta name=author content="Xmind Ltd.">
<meta name=renderer content=webkit>
<title>Xmind</title>
<meta name=description content="Xmind is the most professional and popular mind mapping tool. Millions of people use Xmind to clarify thinking, manage complex information, brainstorming, get work organized, remote and work from home WFH.">
<meta name=keywords content="Xmind,mindmap,mind map,mind mapping,mind mapping software,free mind mapping software,work from home,WFH,remote">
<link rel=stylesheet href=css/bootstrap-customized-2821153174.min.css>
<link rel=stylesheet href=css/index-5376440060.css>
<script src=js/jquery-3-c9f5aeeca3.2.1.min.js> </script>
<meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
<link rel=stylesheet href=css/share-embed-39eba5407f.css> </head>
<body>
<script>
window.manifests={snowbrush:"js/snowbrush.js"},window.metadataString=""
</script>
<script src=js/text-autospace-fed758f4a6.min.js> </script>
<script src=js/polyfill-45b9836beb.min.js> </script>
<script src=js/js-cookie-a978ac7394.js> </script>
<script src=js/popper-135fa9e662.min.js> </script>
<script src=js/bootstrap-26779614c4.min.js> </script>
<script src=js/base.61517cade8.js> </script>
<script src=js/share-embed.68f7476360.js> </script>
</body>
</html>

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
(window.wepbackJsonp1667381142044=window.wepbackJsonp1667381142044||[]).push([[120],{592:function(o){o.exports=JSON.parse('{"meta":{"title":"Xmind - Mind Mapping Software","description":"Xmind is the most professional and popular mind mapping tool. Millions of people use Xmind to clarify thinking, manage complex information, brainstorming, get work organized, remote and work from home WFH.","keywords":"Xmind,mindmap,mind map,mind mapping,mind mapping software,free mind mapping software,work from home,WFH,remote"},"og":{"locale":"en_US","site_name":"Xmind"},"_current_xmind_zen_name":"Xmind for Desktop","About Us":"About US","Blog":"Blog","Buy Now":"Buy Now","Cancel":"Cancel","Confirm":"Confirm","_ok":"OK","Continue":"Continue","Download":"Download","Email":"Email","FAQ":"FAQ","Free Download":"Free Download","Mobile":"Mobile","Phone Number":"Phone Number","Price":"Price","Pricing":"Pricing","_xmind_for_mobile":"Xmind for Mobile","_browser_does_not_support_video":"Your browser does not support the video tag.","_colonSign":": ","_features":"Features","_going_2_signin":"Going to the signin page...","_desktop":"Desktop","_mobile_ver":"Mobile","_bundle_name":"Xmind (Desktop + Mobile)","_periodSign":".","_site_map":"Site Map","_terms_of_service":"Terms of Service","month":"month","months":"months","year":"year","years":"years","_comming_soon":"Comming soon...","_all_download":"All Download"}')}}]);

View File

@@ -0,0 +1 @@
(window.wepbackJsonp1667381142044=window.wepbackJsonp1667381142044||[]).push([[125],{597:function(e){e.exports=JSON.parse('{"Error":"Error","Success":"Success","_get_profile_failed":"Get profile failed.","_got_a_problem":"Sorry, we got a problem, please try again later","_server_error_try_again_later":"There is a problem with the server, please try again later.","_subscription_not_found_or_expired":"Subscription not found or expired","_enter_a_valid_info":"Please enter a valid value","_something_wrong_contact_us":"There is something wrong, please try again later or contact us: support@xmind.app"}')}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,165 @@
/*!
* JavaScript Cookie v2.2.0
* https://github.com/js-cookie/js-cookie
*
* Copyright 2006, 2015 Klaus Hartl & Fagner Brack
* Released under the MIT license
*/
;(function (factory) {
var registeredInModuleLoader = false;
if (typeof define === 'function' && define.amd) {
define(factory);
registeredInModuleLoader = true;
}
if (typeof exports === 'object') {
module.exports = factory();
registeredInModuleLoader = true;
}
if (!registeredInModuleLoader) {
var OldCookies = window.Cookies;
var api = window.Cookies = factory();
api.noConflict = function () {
window.Cookies = OldCookies;
return api;
};
}
}(function () {
function extend () {
var i = 0;
var result = {};
for (; i < arguments.length; i++) {
var attributes = arguments[ i ];
for (var key in attributes) {
result[key] = attributes[key];
}
}
return result;
}
function init (converter) {
function api (key, value, attributes) {
var result;
if (typeof document === 'undefined') {
return;
}
// Write
if (arguments.length > 1) {
attributes = extend({
path: '/'
}, api.defaults, attributes);
if (typeof attributes.expires === 'number') {
var expires = new Date();
expires.setMilliseconds(expires.getMilliseconds() + attributes.expires * 864e+5);
attributes.expires = expires;
}
// We're using "expires" because "max-age" is not supported by IE
attributes.expires = attributes.expires ? attributes.expires.toUTCString() : '';
try {
result = JSON.stringify(value);
if (/^[\{\[]/.test(result)) {
value = result;
}
} catch (e) {}
if (!converter.write) {
value = encodeURIComponent(String(value))
.replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);
} else {
value = converter.write(value, key);
}
key = encodeURIComponent(String(key));
key = key.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent);
key = key.replace(/[\(\)]/g, escape);
var stringifiedAttributes = '';
for (var attributeName in attributes) {
if (!attributes[attributeName]) {
continue;
}
stringifiedAttributes += '; ' + attributeName;
if (attributes[attributeName] === true) {
continue;
}
stringifiedAttributes += '=' + attributes[attributeName];
}
return (document.cookie = key + '=' + value + stringifiedAttributes);
}
// Read
if (!key) {
result = {};
}
// To prevent the for loop in the first place assign an empty array
// in case there are no cookies at all. Also prevents odd result when
// calling "get()"
var cookies = document.cookie ? document.cookie.split('; ') : [];
var rdecode = /(%[0-9A-Z]{2})+/g;
var i = 0;
for (; i < cookies.length; i++) {
var parts = cookies[i].split('=');
var cookie = parts.slice(1).join('=');
if (!this.json && cookie.charAt(0) === '"') {
cookie = cookie.slice(1, -1);
}
try {
var name = parts[0].replace(rdecode, decodeURIComponent);
cookie = converter.read ?
converter.read(cookie, name) : converter(cookie, name) ||
cookie.replace(rdecode, decodeURIComponent);
if (this.json) {
try {
cookie = JSON.parse(cookie);
} catch (e) {}
}
if (key === name) {
result = cookie;
break;
}
if (!key) {
result[name] = cookie;
}
} catch (e) {}
}
return result;
}
api.set = api;
api.get = function (key) {
return api.call(api, key);
};
api.getJSON = function () {
return api.apply({
json: true
}, [].slice.call(arguments));
};
api.defaults = {};
api.remove = function (key, attributes) {
api(key, '', extend(attributes, {
expires: -1
}));
};
api.withConverter = init;
return api;
}
return init(function () {});
}));

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,388 @@
!function(e, t) {
"object" == typeof exports && "object" == typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define([], t) : "object" == typeof exports ? exports.XMindEmbedViewer = t() : e.XMindEmbedViewer = t()
}(self, (function() {
return (()=>{
"use strict";
var e = {
61: function(e, t) {
var n = this && this.__awaiter || function(e, t, n, r) {
return new (n || (n = Promise))((function(o, i) {
function a(e) {
try {
l(r.next(e))
} catch (e) {
i(e)
}
}
function s(e) {
try {
l(r.throw(e))
} catch (e) {
i(e)
}
}
function l(e) {
var t;
e.done ? o(e.value) : (t = e.value,
t instanceof n ? t : new n((function(e) {
e(t)
}
))).then(a, s)
}
l((r = r.apply(e, t || [])).next())
}
))
}
, r = this && this.__generator || function(e, t) {
var n, r, o, i, a = {
label: 0,
sent: function() {
if (1 & o[0])
throw o[1];
return o[1]
},
trys: [],
ops: []
};
return i = {
next: s(0),
throw: s(1),
return: s(2)
},
"function" == typeof Symbol && (i[Symbol.iterator] = function() {
return this
}
),
i;
function s(i) {
return function(s) {
return function(i) {
if (n)
throw new TypeError("Generator is already executing.");
for (; a; )
try {
if (n = 1,
r && (o = 2 & i[0] ? r.return : i[0] ? r.throw || ((o = r.return) && o.call(r),
0) : r.next) && !(o = o.call(r, i[1])).done)
return o;
switch (r = 0,
o && (i = [2 & i[0], o.value]),
i[0]) {
case 0:
case 1:
o = i;
break;
case 4:
return a.label++,
{
value: i[1],
done: !1
};
case 5:
a.label++,
r = i[1],
i = [0];
continue;
case 7:
i = a.ops.pop(),
a.trys.pop();
continue;
default:
if (!((o = (o = a.trys).length > 0 && o[o.length - 1]) || 6 !== i[0] && 2 !== i[0])) {
a = 0;
continue
}
if (3 === i[0] && (!o || i[1] > o[0] && i[1] < o[3])) {
a.label = i[1];
break
}
if (6 === i[0] && a.label < o[1]) {
a.label = o[1],
o = i;
break
}
if (o && a.label < o[2]) {
a.label = o[2],
a.ops.push(i);
break
}
o[2] && a.ops.pop(),
a.trys.pop();
continue
}
i = t.call(e, a)
} catch (e) {
i = [6, e],
r = 0
} finally {
n = o = 0
}
if (5 & i[0])
throw i[1];
return {
value: i[0] ? i[1] : void 0,
done: !0
}
}([i, s])
}
}
}
;
Object.defineProperty(t, "__esModule", {
value: !0
}),
t.IframeEventChannelController = void 0;
var o = function() {
function e(e, t) {
void 0 === t && (t = "*"),
this.channel = new MessageChannel,
this.eventIndex = 0,
this.handlers = {};
var o = e.getIframe();
if (o.hasAttribute("data-event-channel-setup"))
throw new Error("An embed viewer instance already initialized on the iframe!");
o.setAttribute("data-event-channel-setup", "true"),
this.channelSetupPromise = n(this, void 0, void 0, (function() {
var e = this;
return r(this, (function(n) {
switch (n.label) {
case 0:
return [4, new Promise((function(n) {
o.addEventListener("load", (function() {
var r;
e.channel.port1.start();
var i = function(t) {
"channel-ready" === t.data[0] && (t.preventDefault(),
e.channel.port1.removeEventListener("message", i),
e.channel.port1.addEventListener("message", e.eventDispatcher.bind(e)),
n(void 0))
};
e.channel.port1.addEventListener("message", i),
null === (r = o.contentWindow) || void 0 === r || r.postMessage(["setup-channel", {
port: e.channel.port2
}], t || "*", [e.channel.port2])
}
))
}
))];
case 1:
return n.sent(),
[2]
}
}
))
}
))
}
return e.prototype.eventDispatcher = function(e) {
var t = e.data || []
, n = t[0]
, r = t[1]
, o = t[2];
"event" === n && r && this.handlers[r] && this.handlers[r].forEach((function(e) {
return e(o)
}
))
}
,
e.prototype.addEventListener = function(e, t) {
this.handlers[e] = this.handlers[e] || [],
this.handlers[e].includes(t) || this.handlers[e].push(t)
}
,
e.prototype.removeEventListener = function(e, t) {
if (this.handlers[e]) {
var n = this.handlers[e].findIndex((function(e) {
return e === t
}
));
this.handlers[e].splice(n, 1)
}
}
,
e.prototype.emit = function(e, t) {
return n(this, void 0, void 0, (function() {
var n, o = this;
return r(this, (function(r) {
switch (r.label) {
case 0:
return [4, this.channelSetupPromise];
case 1:
return r.sent(),
n = "xmind-embed-viewer#" + this.eventIndex++,
[4, new Promise((function(r) {
var i = function(e) {
var t = e.data
, a = t[0]
, s = t[1];
a === n && (o.channel.port1.removeEventListener("message", i),
r(s))
};
o.channel.port1.addEventListener("message", i),
o.channel.port1.postMessage([e, t, n])
}
))];
case 2:
return r.sent(),
[2]
}
}
))
}
))
}
,
e
}();
t.IframeEventChannelController = o
},
860: (e,t)=>{
Object.defineProperty(t, "__esModule", {
value: !0
}),
t.IframeController = void 0;
var n = function() {
function e(e, t) {
var n, r = "string" == typeof e ? document.querySelector(e) : e;
if (null === r)
throw new Error("IFrame or mount element not found by selector " + e);
r instanceof HTMLIFrameElement ? n = r : (n = document.createElement("iframe"),
r.appendChild(n)),
n.setAttribute("frameborder", "0"),
n.setAttribute("scrolling", "no"),
n.setAttribute("allowfullscreen", "true"),
n.setAttribute("allow", "allowfullscreen"),
n.setAttribute("crossorigin", "anonymous"),
n.setAttribute("src", t),
this.iframe = n
}
return e.prototype.getIframe = function() {
return this.iframe
}
,
e.prototype.setStyles = function(e) {
for (var t = this.getIframe(), n = 0, r = Object.entries(e); n < r.length; n++) {
var o = r[n]
, i = o[0]
, a = o[1];
t.style[i] = a
}
}
,
e
}();
t.IframeController = n
}
,
341: (e,t,n)=>{
t.XMindEmbedViewer = void 0;
var r = n(61)
, o = n(860)
, i = function() {
function e(e) {
var t = this;
this.internalState = {
sheets: [],
zoomScale: 100,
currentSheetId: ""
};
var windowWidth = document.documentElement.clientWidth || document.body.clientWidth;
var windowHeight = document.documentElement.clientHeight || document.body.clientHeight;
windowWidth = windowWidth-30;
windowHeight = windowHeight-30;
windowWidth =windowWidth+"px";
windowHeight =windowHeight+"px";
var n = e.file
, i = e.el
, a = e.styles
, s = void 0 === a ? {
height: windowWidth,
width: windowHeight
} : a
, l = new o.IframeController(i,"/xmind/index.html")
, u = new r.IframeEventChannelController(l,"");
this.iframeController = l,
this.iframeEventChannelController = u,
u.addEventListener("sheet-switch", (function(e) {
return t.internalState.currentSheetId = e
}
)),
u.addEventListener("zoom-change", (function(e) {
return t.internalState.zoomScale = e
}
)),
u.addEventListener("sheets-load", (function(e) {
return t.internalState.sheets = e
}
)),
this.iframeController.setStyles(s),
n && this.load(n)
}
return e.prototype.addEventListener = function(e, t) {
this.iframeEventChannelController.addEventListener(e, t)
}
,
e.prototype.removeEventListener = function(e, t) {
this.iframeEventChannelController.removeEventListener(e, t)
}
,
e.prototype.setStyles = function(e) {
this.iframeController.setStyles(e)
}
,
e.prototype.load = function(e) {
this.iframeEventChannelController.emit("open-file", e)
}
,
e.prototype.setZoomScale = function(e) {
this.iframeEventChannelController.emit("zoom", e)
}
,
e.prototype.setFitMap = function() {
this.iframeEventChannelController.emit("fit-map")
}
,
e.prototype.switchSheet = function(e) {
this.iframeEventChannelController.emit("switch-sheet", e)
}
,
Object.defineProperty(e.prototype, "zoom", {
get: function() {
return this.internalState.zoomScale
},
enumerable: !1,
configurable: !0
}),
Object.defineProperty(e.prototype, "sheets", {
get: function() {
return JSON.parse(JSON.stringify(this.internalState.sheets))
},
enumerable: !1,
configurable: !0
}),
Object.defineProperty(e.prototype, "currentSheetId", {
get: function() {
return this.internalState.currentSheetId
},
enumerable: !1,
configurable: !0
}),
e
}();
t.XMindEmbedViewer = i
}
}
, t = {};
return function n(r) {
if (t[r])
return t[r].exports;
var o = t[r] = {
exports: {}
};
return e[r].call(o.exports, o, o.exports, n),
o.exports
}(341)
}
)().XMindEmbedViewer
}
));