@lingk/sync 1.1.39 → 1.1.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/credentialSections.js +449 -565
- package/build/credentialSections.js.map +1 -1
- package/build/css/credentialSections.css +10 -3
- package/build/css/lightningStyles.css +4 -2
- package/build/css/lingkStyles.css +4 -2
- package/build/css/main.css +93 -43
- package/build/lightning.js +788 -1820
- package/build/lightning.js.map +1 -1
- package/build/lightningStyles.js +2 -2
- package/build/lightningStyles.js.map +1 -1
- package/build/lingk.js +56 -55
- package/build/lingk.js.map +1 -1
- package/build/lingkStyles.js +2 -2
- package/build/lingkStyles.js.map +1 -1
- package/build/loadData.js +232 -224
- package/build/loadData.js.map +1 -1
- package/build/main.js +4817 -8425
- package/build/main.js.map +1 -1
- package/build/metadataDropdown.js +55 -51
- package/build/metadataDropdown.js.map +1 -1
- package/build/metadataFunctions.js +365 -307
- package/build/metadataFunctions.js.map +1 -1
- package/build/reducer.js +371 -313
- package/build/reducer.js.map +1 -1
- package/build/saveData.js +70 -61
- package/build/saveData.js.map +1 -1
- package/package.json +1 -1
|
@@ -68,7 +68,7 @@ module.exports =
|
|
|
68
68
|
/* 0 */
|
|
69
69
|
/***/ function(module, exports, __webpack_require__) {
|
|
70
70
|
|
|
71
|
-
module.exports = __webpack_require__(
|
|
71
|
+
module.exports = __webpack_require__(54);
|
|
72
72
|
|
|
73
73
|
|
|
74
74
|
/***/ },
|
|
@@ -79,43 +79,31 @@ module.exports =
|
|
|
79
79
|
|
|
80
80
|
/***/ },
|
|
81
81
|
/* 2 */,
|
|
82
|
-
/* 3
|
|
83
|
-
/* 4 */
|
|
82
|
+
/* 3 */
|
|
84
83
|
/***/ function(module, exports) {
|
|
85
84
|
|
|
86
85
|
module.exports = require("react-bootstrap");
|
|
87
86
|
|
|
88
87
|
/***/ },
|
|
88
|
+
/* 4 */,
|
|
89
89
|
/* 5 */,
|
|
90
90
|
/* 6 */,
|
|
91
91
|
/* 7 */,
|
|
92
92
|
/* 8 */,
|
|
93
93
|
/* 9 */,
|
|
94
94
|
/* 10 */,
|
|
95
|
-
/* 11
|
|
96
|
-
/* 12 */,
|
|
97
|
-
/* 13 */,
|
|
98
|
-
/* 14 */,
|
|
99
|
-
/* 15 */,
|
|
100
|
-
/* 16 */,
|
|
101
|
-
/* 17 */,
|
|
102
|
-
/* 18 */,
|
|
103
|
-
/* 19 */,
|
|
104
|
-
/* 20 */,
|
|
105
|
-
/* 21 */,
|
|
106
|
-
/* 22 */,
|
|
107
|
-
/* 23 */,
|
|
108
|
-
/* 24 */,
|
|
109
|
-
/* 25 */,
|
|
110
|
-
/* 26 */
|
|
95
|
+
/* 11 */
|
|
111
96
|
/***/ function(module, exports) {
|
|
112
97
|
|
|
113
98
|
module.exports = require("moment");
|
|
114
99
|
|
|
115
100
|
/***/ },
|
|
116
|
-
/*
|
|
117
|
-
/*
|
|
118
|
-
/*
|
|
101
|
+
/* 12 */,
|
|
102
|
+
/* 13 */,
|
|
103
|
+
/* 14 */,
|
|
104
|
+
/* 15 */,
|
|
105
|
+
/* 16 */,
|
|
106
|
+
/* 17 */
|
|
119
107
|
/***/ function(module, exports, __webpack_require__) {
|
|
120
108
|
|
|
121
109
|
/* WEBPACK VAR INJECTION */(function(global) {/*!
|
|
@@ -128,9 +116,9 @@ module.exports =
|
|
|
128
116
|
|
|
129
117
|
'use strict'
|
|
130
118
|
|
|
131
|
-
var base64 = __webpack_require__(
|
|
132
|
-
var ieee754 = __webpack_require__(
|
|
133
|
-
var isArray = __webpack_require__(
|
|
119
|
+
var base64 = __webpack_require__(68)
|
|
120
|
+
var ieee754 = __webpack_require__(70)
|
|
121
|
+
var isArray = __webpack_require__(71)
|
|
134
122
|
|
|
135
123
|
exports.Buffer = Buffer
|
|
136
124
|
exports.SlowBuffer = SlowBuffer
|
|
@@ -1911,19 +1899,16 @@ module.exports =
|
|
|
1911
1899
|
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
|
|
1912
1900
|
|
|
1913
1901
|
/***/ },
|
|
1914
|
-
/*
|
|
1915
|
-
/*
|
|
1916
|
-
/*
|
|
1917
|
-
/*
|
|
1918
|
-
/*
|
|
1919
|
-
/*
|
|
1920
|
-
/*
|
|
1921
|
-
/*
|
|
1922
|
-
/*
|
|
1923
|
-
/*
|
|
1924
|
-
/* 40 */,
|
|
1925
|
-
/* 41 */,
|
|
1926
|
-
/* 42 */
|
|
1902
|
+
/* 18 */,
|
|
1903
|
+
/* 19 */,
|
|
1904
|
+
/* 20 */,
|
|
1905
|
+
/* 21 */,
|
|
1906
|
+
/* 22 */,
|
|
1907
|
+
/* 23 */,
|
|
1908
|
+
/* 24 */,
|
|
1909
|
+
/* 25 */,
|
|
1910
|
+
/* 26 */,
|
|
1911
|
+
/* 27 */
|
|
1927
1912
|
/***/ function(module, exports, __webpack_require__) {
|
|
1928
1913
|
|
|
1929
1914
|
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
|
@@ -1931,7 +1916,7 @@ module.exports =
|
|
|
1931
1916
|
|
|
1932
1917
|
(function(mod) {
|
|
1933
1918
|
if (true) // CommonJS
|
|
1934
|
-
mod(__webpack_require__(
|
|
1919
|
+
mod(__webpack_require__(69));
|
|
1935
1920
|
else if (typeof define == "function" && define.amd) // AMD
|
|
1936
1921
|
define(["../../lib/codemirror"], mod);
|
|
1937
1922
|
else // Plain browser env
|
|
@@ -1954,7 +1939,7 @@ module.exports =
|
|
|
1954
1939
|
var A = kw("keyword a"), B = kw("keyword b"), C = kw("keyword c"), D = kw("keyword d");
|
|
1955
1940
|
var operator = kw("operator"), atom = {type: "atom", style: "atom"};
|
|
1956
1941
|
|
|
1957
|
-
|
|
1942
|
+
var jsKeywords = {
|
|
1958
1943
|
"if": kw("if"), "while": A, "with": A, "else": B, "do": B, "try": B, "finally": B,
|
|
1959
1944
|
"return": D, "break": D, "continue": D, "new": kw("new"), "delete": C, "void": C, "throw": C,
|
|
1960
1945
|
"debugger": kw("debugger"), "var": kw("var"), "const": kw("var"), "let": kw("var"),
|
|
@@ -1966,6 +1951,35 @@ module.exports =
|
|
|
1966
1951
|
"yield": C, "export": kw("export"), "import": kw("import"), "extends": C,
|
|
1967
1952
|
"await": C
|
|
1968
1953
|
};
|
|
1954
|
+
|
|
1955
|
+
// Extend the 'normal' keywords with the TypeScript language extensions
|
|
1956
|
+
if (isTS) {
|
|
1957
|
+
var type = {type: "variable", style: "type"};
|
|
1958
|
+
var tsKeywords = {
|
|
1959
|
+
// object-like things
|
|
1960
|
+
"interface": kw("class"),
|
|
1961
|
+
"implements": C,
|
|
1962
|
+
"namespace": C,
|
|
1963
|
+
"module": kw("module"),
|
|
1964
|
+
"enum": kw("module"),
|
|
1965
|
+
|
|
1966
|
+
// scope modifiers
|
|
1967
|
+
"public": kw("modifier"),
|
|
1968
|
+
"private": kw("modifier"),
|
|
1969
|
+
"protected": kw("modifier"),
|
|
1970
|
+
"abstract": kw("modifier"),
|
|
1971
|
+
"readonly": kw("modifier"),
|
|
1972
|
+
|
|
1973
|
+
// types
|
|
1974
|
+
"string": type, "number": type, "boolean": type, "any": type
|
|
1975
|
+
};
|
|
1976
|
+
|
|
1977
|
+
for (var attr in tsKeywords) {
|
|
1978
|
+
jsKeywords[attr] = tsKeywords[attr];
|
|
1979
|
+
}
|
|
1980
|
+
}
|
|
1981
|
+
|
|
1982
|
+
return jsKeywords;
|
|
1969
1983
|
}();
|
|
1970
1984
|
|
|
1971
1985
|
var isOperatorChar = /[+\-*&%=<>!?|~^@]/;
|
|
@@ -2003,10 +2017,17 @@ module.exports =
|
|
|
2003
2017
|
return ret(ch);
|
|
2004
2018
|
} else if (ch == "=" && stream.eat(">")) {
|
|
2005
2019
|
return ret("=>", "operator");
|
|
2006
|
-
} else if (ch == "0" && stream.
|
|
2020
|
+
} else if (ch == "0" && stream.eat(/x/i)) {
|
|
2021
|
+
stream.eatWhile(/[\da-f]/i);
|
|
2022
|
+
return ret("number", "number");
|
|
2023
|
+
} else if (ch == "0" && stream.eat(/o/i)) {
|
|
2024
|
+
stream.eatWhile(/[0-7]/i);
|
|
2025
|
+
return ret("number", "number");
|
|
2026
|
+
} else if (ch == "0" && stream.eat(/b/i)) {
|
|
2027
|
+
stream.eatWhile(/[01]/i);
|
|
2007
2028
|
return ret("number", "number");
|
|
2008
2029
|
} else if (/\d/.test(ch)) {
|
|
2009
|
-
stream.match(/^\d*(
|
|
2030
|
+
stream.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/);
|
|
2010
2031
|
return ret("number", "number");
|
|
2011
2032
|
} else if (ch == "/") {
|
|
2012
2033
|
if (stream.eat("*")) {
|
|
@@ -2017,7 +2038,7 @@ module.exports =
|
|
|
2017
2038
|
return ret("comment", "comment");
|
|
2018
2039
|
} else if (expressionAllowed(stream, state, 1)) {
|
|
2019
2040
|
readRegexp(stream);
|
|
2020
|
-
stream.match(/^\b(([
|
|
2041
|
+
stream.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/);
|
|
2021
2042
|
return ret("regexp", "string-2");
|
|
2022
2043
|
} else {
|
|
2023
2044
|
stream.eat("=");
|
|
@@ -2047,7 +2068,7 @@ module.exports =
|
|
|
2047
2068
|
var kw = keywords[word]
|
|
2048
2069
|
return ret(kw.type, kw.style, word)
|
|
2049
2070
|
}
|
|
2050
|
-
if (word == "async" && stream.match(
|
|
2071
|
+
if (word == "async" && stream.match(/^\s*[\(\w]/, false))
|
|
2051
2072
|
return ret("async", "keyword", word)
|
|
2052
2073
|
}
|
|
2053
2074
|
return ret("variable", "variable", word)
|
|
@@ -2186,68 +2207,35 @@ module.exports =
|
|
|
2186
2207
|
pass.apply(null, arguments);
|
|
2187
2208
|
return true;
|
|
2188
2209
|
}
|
|
2189
|
-
function inList(name, list) {
|
|
2190
|
-
for (var v = list; v; v = v.next) if (v.name == name) return true
|
|
2191
|
-
return false;
|
|
2192
|
-
}
|
|
2193
2210
|
function register(varname) {
|
|
2211
|
+
function inList(list) {
|
|
2212
|
+
for (var v = list; v; v = v.next)
|
|
2213
|
+
if (v.name == varname) return true;
|
|
2214
|
+
return false;
|
|
2215
|
+
}
|
|
2194
2216
|
var state = cx.state;
|
|
2195
2217
|
cx.marked = "def";
|
|
2196
2218
|
if (state.context) {
|
|
2197
|
-
if (state.
|
|
2198
|
-
|
|
2199
|
-
var newContext = registerVarScoped(varname, state.context)
|
|
2200
|
-
if (newContext != null) {
|
|
2201
|
-
state.context = newContext
|
|
2202
|
-
return
|
|
2203
|
-
}
|
|
2204
|
-
} else if (!inList(varname, state.localVars)) {
|
|
2205
|
-
state.localVars = new Var(varname, state.localVars)
|
|
2206
|
-
return
|
|
2207
|
-
}
|
|
2208
|
-
}
|
|
2209
|
-
// Fall through means this is global
|
|
2210
|
-
if (parserConfig.globalVars && !inList(varname, state.globalVars))
|
|
2211
|
-
state.globalVars = new Var(varname, state.globalVars)
|
|
2212
|
-
}
|
|
2213
|
-
function registerVarScoped(varname, context) {
|
|
2214
|
-
if (!context) {
|
|
2215
|
-
return null
|
|
2216
|
-
} else if (context.block) {
|
|
2217
|
-
var inner = registerVarScoped(varname, context.prev)
|
|
2218
|
-
if (!inner) return null
|
|
2219
|
-
if (inner == context.prev) return context
|
|
2220
|
-
return new Context(inner, context.vars, true)
|
|
2221
|
-
} else if (inList(varname, context.vars)) {
|
|
2222
|
-
return context
|
|
2219
|
+
if (inList(state.localVars)) return;
|
|
2220
|
+
state.localVars = {name: varname, next: state.localVars};
|
|
2223
2221
|
} else {
|
|
2224
|
-
|
|
2222
|
+
if (inList(state.globalVars)) return;
|
|
2223
|
+
if (parserConfig.globalVars)
|
|
2224
|
+
state.globalVars = {name: varname, next: state.globalVars};
|
|
2225
2225
|
}
|
|
2226
2226
|
}
|
|
2227
2227
|
|
|
2228
|
-
function isModifier(name) {
|
|
2229
|
-
return name == "public" || name == "private" || name == "protected" || name == "abstract" || name == "readonly"
|
|
2230
|
-
}
|
|
2231
|
-
|
|
2232
2228
|
// Combinators
|
|
2233
2229
|
|
|
2234
|
-
|
|
2235
|
-
function Var(name, next) { this.name = name; this.next = next }
|
|
2236
|
-
|
|
2237
|
-
var defaultVars = new Var("this", new Var("arguments", null))
|
|
2230
|
+
var defaultVars = {name: "this", next: {name: "arguments"}};
|
|
2238
2231
|
function pushcontext() {
|
|
2239
|
-
cx.state.context =
|
|
2240
|
-
cx.state.localVars = defaultVars
|
|
2241
|
-
}
|
|
2242
|
-
function pushblockcontext() {
|
|
2243
|
-
cx.state.context = new Context(cx.state.context, cx.state.localVars, true)
|
|
2244
|
-
cx.state.localVars = null
|
|
2232
|
+
cx.state.context = {prev: cx.state.context, vars: cx.state.localVars};
|
|
2233
|
+
cx.state.localVars = defaultVars;
|
|
2245
2234
|
}
|
|
2246
2235
|
function popcontext() {
|
|
2247
|
-
cx.state.localVars = cx.state.context.vars
|
|
2248
|
-
cx.state.context = cx.state.context.prev
|
|
2236
|
+
cx.state.localVars = cx.state.context.vars;
|
|
2237
|
+
cx.state.context = cx.state.context.prev;
|
|
2249
2238
|
}
|
|
2250
|
-
popcontext.lex = true
|
|
2251
2239
|
function pushlex(type, info) {
|
|
2252
2240
|
var result = function() {
|
|
2253
2241
|
var state = cx.state, indent = state.indented;
|
|
@@ -2279,12 +2267,12 @@ module.exports =
|
|
|
2279
2267
|
}
|
|
2280
2268
|
|
|
2281
2269
|
function statement(type, value) {
|
|
2282
|
-
if (type == "var") return cont(pushlex("vardef", value), vardef, expect(";"), poplex);
|
|
2270
|
+
if (type == "var") return cont(pushlex("vardef", value.length), vardef, expect(";"), poplex);
|
|
2283
2271
|
if (type == "keyword a") return cont(pushlex("form"), parenExpr, statement, poplex);
|
|
2284
2272
|
if (type == "keyword b") return cont(pushlex("form"), statement, poplex);
|
|
2285
2273
|
if (type == "keyword d") return cx.stream.match(/^\s*$/, false) ? cont() : cont(pushlex("stat"), maybeexpression, expect(";"), poplex);
|
|
2286
2274
|
if (type == "debugger") return cont(expect(";"));
|
|
2287
|
-
if (type == "{") return cont(pushlex("}"),
|
|
2275
|
+
if (type == "{") return cont(pushlex("}"), block, poplex);
|
|
2288
2276
|
if (type == ";") return cont();
|
|
2289
2277
|
if (type == "if") {
|
|
2290
2278
|
if (cx.state.lexical.info == "else" && cx.state.cc[cx.state.cc.length - 1] == poplex)
|
|
@@ -2293,51 +2281,42 @@ module.exports =
|
|
|
2293
2281
|
}
|
|
2294
2282
|
if (type == "function") return cont(functiondef);
|
|
2295
2283
|
if (type == "for") return cont(pushlex("form"), forspec, statement, poplex);
|
|
2296
|
-
if (type == "class" || (isTS && value == "interface")) { cx.marked = "keyword"; return cont(pushlex("form"), className, poplex); }
|
|
2297
2284
|
if (type == "variable") {
|
|
2298
|
-
if (isTS && value == "
|
|
2299
|
-
cx.marked = "keyword"
|
|
2300
|
-
return cont(statement)
|
|
2301
|
-
} else if (isTS && (value == "module" || value == "enum" || value == "type") && cx.stream.match(/^\s*\w/, false)) {
|
|
2302
|
-
cx.marked = "keyword"
|
|
2303
|
-
if (value == "enum") return cont(enumdef);
|
|
2304
|
-
else if (value == "type") return cont(typeexpr, expect("operator"), typeexpr, expect(";"));
|
|
2305
|
-
else return cont(pushlex("form"), pattern, expect("{"), pushlex("}"), block, poplex, poplex)
|
|
2306
|
-
} else if (isTS && value == "namespace") {
|
|
2285
|
+
if (isTS && value == "type") {
|
|
2307
2286
|
cx.marked = "keyword"
|
|
2308
|
-
return cont(
|
|
2309
|
-
}
|
|
2287
|
+
return cont(typeexpr, expect("operator"), typeexpr, expect(";"));
|
|
2288
|
+
} if (isTS && value == "declare") {
|
|
2310
2289
|
cx.marked = "keyword"
|
|
2311
2290
|
return cont(statement)
|
|
2312
2291
|
} else {
|
|
2313
2292
|
return cont(pushlex("stat"), maybelabel);
|
|
2314
2293
|
}
|
|
2315
2294
|
}
|
|
2316
|
-
if (type == "switch") return cont(pushlex("form"), parenExpr, expect("{"), pushlex("}", "switch"),
|
|
2317
|
-
block, poplex, poplex
|
|
2295
|
+
if (type == "switch") return cont(pushlex("form"), parenExpr, expect("{"), pushlex("}", "switch"),
|
|
2296
|
+
block, poplex, poplex);
|
|
2318
2297
|
if (type == "case") return cont(expression, expect(":"));
|
|
2319
2298
|
if (type == "default") return cont(expect(":"));
|
|
2320
|
-
if (type == "catch") return cont(pushlex("form"), pushcontext,
|
|
2299
|
+
if (type == "catch") return cont(pushlex("form"), pushcontext, expect("("), funarg, expect(")"),
|
|
2300
|
+
statement, poplex, popcontext);
|
|
2301
|
+
if (type == "class") return cont(pushlex("form"), className, poplex);
|
|
2321
2302
|
if (type == "export") return cont(pushlex("stat"), afterExport, poplex);
|
|
2322
2303
|
if (type == "import") return cont(pushlex("stat"), afterImport, poplex);
|
|
2304
|
+
if (type == "module") return cont(pushlex("form"), pattern, expect("{"), pushlex("}"), block, poplex, poplex)
|
|
2323
2305
|
if (type == "async") return cont(statement)
|
|
2324
2306
|
if (value == "@") return cont(expression, statement)
|
|
2325
2307
|
return pass(pushlex("stat"), expression, expect(";"), poplex);
|
|
2326
2308
|
}
|
|
2327
|
-
function
|
|
2328
|
-
|
|
2309
|
+
function expression(type) {
|
|
2310
|
+
return expressionInner(type, false);
|
|
2329
2311
|
}
|
|
2330
|
-
function
|
|
2331
|
-
return expressionInner(type,
|
|
2332
|
-
}
|
|
2333
|
-
function expressionNoComma(type, value) {
|
|
2334
|
-
return expressionInner(type, value, true);
|
|
2312
|
+
function expressionNoComma(type) {
|
|
2313
|
+
return expressionInner(type, true);
|
|
2335
2314
|
}
|
|
2336
2315
|
function parenExpr(type) {
|
|
2337
2316
|
if (type != "(") return pass()
|
|
2338
2317
|
return cont(pushlex(")"), expression, expect(")"), poplex)
|
|
2339
2318
|
}
|
|
2340
|
-
function expressionInner(type,
|
|
2319
|
+
function expressionInner(type, noComma) {
|
|
2341
2320
|
if (cx.state.fatArrowAt == cx.stream.start) {
|
|
2342
2321
|
var body = noComma ? arrowBodyNoComma : arrowBody;
|
|
2343
2322
|
if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, expect("=>"), body, popcontext);
|
|
@@ -2347,7 +2326,7 @@ module.exports =
|
|
|
2347
2326
|
var maybeop = noComma ? maybeoperatorNoComma : maybeoperatorComma;
|
|
2348
2327
|
if (atomicTypes.hasOwnProperty(type)) return cont(maybeop);
|
|
2349
2328
|
if (type == "function") return cont(functiondef, maybeop);
|
|
2350
|
-
if (type == "class"
|
|
2329
|
+
if (type == "class") return cont(pushlex("form"), classExpression, poplex);
|
|
2351
2330
|
if (type == "keyword c" || type == "async") return cont(noComma ? expressionNoComma : expression);
|
|
2352
2331
|
if (type == "(") return cont(pushlex(")"), maybeexpression, expect(")"), poplex, maybeop);
|
|
2353
2332
|
if (type == "operator" || type == "spread") return cont(noComma ? expressionNoComma : expression);
|
|
@@ -2355,7 +2334,6 @@ module.exports =
|
|
|
2355
2334
|
if (type == "{") return contCommasep(objprop, "}", null, maybeop);
|
|
2356
2335
|
if (type == "quasi") return pass(quasi, maybeop);
|
|
2357
2336
|
if (type == "new") return cont(maybeTarget(noComma));
|
|
2358
|
-
if (type == "import") return cont(expression);
|
|
2359
2337
|
return cont();
|
|
2360
2338
|
}
|
|
2361
2339
|
function maybeexpression(type) {
|
|
@@ -2373,8 +2351,6 @@ module.exports =
|
|
|
2373
2351
|
if (type == "=>") return cont(pushcontext, noComma ? arrowBodyNoComma : arrowBody, popcontext);
|
|
2374
2352
|
if (type == "operator") {
|
|
2375
2353
|
if (/\+\+|--/.test(value) || isTS && value == "!") return cont(me);
|
|
2376
|
-
if (isTS && value == "<" && cx.stream.match(/^([^>]|<.*?>)*>\s*\(/, false))
|
|
2377
|
-
return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, me);
|
|
2378
2354
|
if (value == "?") return cont(expression, expect(":"), expr);
|
|
2379
2355
|
return cont(expr);
|
|
2380
2356
|
}
|
|
@@ -2446,11 +2422,10 @@ module.exports =
|
|
|
2446
2422
|
return cont(afterprop);
|
|
2447
2423
|
} else if (type == "jsonld-keyword") {
|
|
2448
2424
|
return cont(afterprop);
|
|
2449
|
-
} else if (
|
|
2450
|
-
cx.marked = "keyword"
|
|
2425
|
+
} else if (type == "modifier") {
|
|
2451
2426
|
return cont(objprop)
|
|
2452
2427
|
} else if (type == "[") {
|
|
2453
|
-
return cont(expression,
|
|
2428
|
+
return cont(expression, expect("]"), afterprop);
|
|
2454
2429
|
} else if (type == "spread") {
|
|
2455
2430
|
return cont(expressionNoComma, afterprop);
|
|
2456
2431
|
} else if (value == "*") {
|
|
@@ -2502,32 +2477,20 @@ module.exports =
|
|
|
2502
2477
|
if (value == "?") return cont(maybetype);
|
|
2503
2478
|
}
|
|
2504
2479
|
}
|
|
2505
|
-
function mayberettype(type) {
|
|
2506
|
-
if (isTS && type == ":") {
|
|
2507
|
-
if (cx.stream.match(/^\s*\w+\s+is\b/, false)) return cont(expression, isKW, typeexpr)
|
|
2508
|
-
else return cont(typeexpr)
|
|
2509
|
-
}
|
|
2510
|
-
}
|
|
2511
|
-
function isKW(_, value) {
|
|
2512
|
-
if (value == "is") {
|
|
2513
|
-
cx.marked = "keyword"
|
|
2514
|
-
return cont()
|
|
2515
|
-
}
|
|
2516
|
-
}
|
|
2517
2480
|
function typeexpr(type, value) {
|
|
2518
|
-
if (value == "keyof" || value == "typeof") {
|
|
2519
|
-
cx.marked = "keyword"
|
|
2520
|
-
return cont(value == "keyof" ? typeexpr : expressionNoComma)
|
|
2521
|
-
}
|
|
2522
2481
|
if (type == "variable" || value == "void") {
|
|
2523
|
-
|
|
2524
|
-
|
|
2482
|
+
if (value == "keyof") {
|
|
2483
|
+
cx.marked = "keyword"
|
|
2484
|
+
return cont(typeexpr)
|
|
2485
|
+
} else {
|
|
2486
|
+
cx.marked = "type"
|
|
2487
|
+
return cont(afterType)
|
|
2488
|
+
}
|
|
2525
2489
|
}
|
|
2526
2490
|
if (type == "string" || type == "number" || type == "atom") return cont(afterType);
|
|
2527
2491
|
if (type == "[") return cont(pushlex("]"), commasep(typeexpr, "]", ","), poplex, afterType)
|
|
2528
2492
|
if (type == "{") return cont(pushlex("}"), commasep(typeprop, "}", ",;"), poplex, afterType)
|
|
2529
2493
|
if (type == "(") return cont(commasep(typearg, ")"), maybeReturnType)
|
|
2530
|
-
if (type == "<") return cont(commasep(typeexpr, ">"), typeexpr)
|
|
2531
2494
|
}
|
|
2532
2495
|
function maybeReturnType(type) {
|
|
2533
2496
|
if (type == "=>") return cont(typeexpr)
|
|
@@ -2544,32 +2507,24 @@ module.exports =
|
|
|
2544
2507
|
return cont(expression, maybetype, expect("]"), typeprop)
|
|
2545
2508
|
}
|
|
2546
2509
|
}
|
|
2547
|
-
function typearg(type
|
|
2548
|
-
if (type == "variable"
|
|
2549
|
-
if (type == ":") return cont(typeexpr)
|
|
2550
|
-
return pass(typeexpr)
|
|
2510
|
+
function typearg(type) {
|
|
2511
|
+
if (type == "variable") return cont(typearg)
|
|
2512
|
+
else if (type == ":") return cont(typeexpr)
|
|
2551
2513
|
}
|
|
2552
2514
|
function afterType(type, value) {
|
|
2553
2515
|
if (value == "<") return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, afterType)
|
|
2554
|
-
if (value == "|" || type == "."
|
|
2516
|
+
if (value == "|" || type == ".") return cont(typeexpr)
|
|
2555
2517
|
if (type == "[") return cont(expect("]"), afterType)
|
|
2556
|
-
if (value == "extends"
|
|
2518
|
+
if (value == "extends") return cont(typeexpr)
|
|
2557
2519
|
}
|
|
2558
2520
|
function maybeTypeArgs(_, value) {
|
|
2559
2521
|
if (value == "<") return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, afterType)
|
|
2560
2522
|
}
|
|
2561
|
-
function
|
|
2562
|
-
return pass(typeexpr, maybeTypeDefault)
|
|
2563
|
-
}
|
|
2564
|
-
function maybeTypeDefault(_, value) {
|
|
2565
|
-
if (value == "=") return cont(typeexpr)
|
|
2566
|
-
}
|
|
2567
|
-
function vardef(_, value) {
|
|
2568
|
-
if (value == "enum") {cx.marked = "keyword"; return cont(enumdef)}
|
|
2523
|
+
function vardef() {
|
|
2569
2524
|
return pass(pattern, maybetype, maybeAssign, vardefCont);
|
|
2570
2525
|
}
|
|
2571
2526
|
function pattern(type, value) {
|
|
2572
|
-
if (
|
|
2527
|
+
if (type == "modifier") return cont(pattern)
|
|
2573
2528
|
if (type == "variable") { register(value); return cont(); }
|
|
2574
2529
|
if (type == "spread") return cont(pattern);
|
|
2575
2530
|
if (type == "[") return contCommasep(pattern, "]");
|
|
@@ -2594,8 +2549,7 @@ module.exports =
|
|
|
2594
2549
|
function maybeelse(type, value) {
|
|
2595
2550
|
if (type == "keyword b" && value == "else") return cont(pushlex("form", "else"), statement, poplex);
|
|
2596
2551
|
}
|
|
2597
|
-
function forspec(type
|
|
2598
|
-
if (value == "await") return cont(forspec);
|
|
2552
|
+
function forspec(type) {
|
|
2599
2553
|
if (type == "(") return cont(pushlex(")"), forspec1, expect(")"), poplex);
|
|
2600
2554
|
}
|
|
2601
2555
|
function forspec1(type) {
|
|
@@ -2619,13 +2573,12 @@ module.exports =
|
|
|
2619
2573
|
function functiondef(type, value) {
|
|
2620
2574
|
if (value == "*") {cx.marked = "keyword"; return cont(functiondef);}
|
|
2621
2575
|
if (type == "variable") {register(value); return cont(functiondef);}
|
|
2622
|
-
if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex,
|
|
2623
|
-
if (isTS && value == "<") return cont(pushlex(">"), commasep(
|
|
2576
|
+
if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, maybetype, statement, popcontext);
|
|
2577
|
+
if (isTS && value == "<") return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, functiondef)
|
|
2624
2578
|
}
|
|
2625
2579
|
function funarg(type, value) {
|
|
2626
2580
|
if (value == "@") cont(expression, funarg)
|
|
2627
|
-
if (type == "spread") return cont(funarg);
|
|
2628
|
-
if (isTS && isModifier(value)) { cx.marked = "keyword"; return cont(funarg); }
|
|
2581
|
+
if (type == "spread" || type == "modifier") return cont(funarg);
|
|
2629
2582
|
return pass(pattern, maybetype, maybeAssign);
|
|
2630
2583
|
}
|
|
2631
2584
|
function classExpression(type, value) {
|
|
@@ -2637,17 +2590,15 @@ module.exports =
|
|
|
2637
2590
|
if (type == "variable") {register(value); return cont(classNameAfter);}
|
|
2638
2591
|
}
|
|
2639
2592
|
function classNameAfter(type, value) {
|
|
2640
|
-
if (value == "<") return cont(pushlex(">"), commasep(
|
|
2641
|
-
if (value == "extends" || value == "implements" || (isTS && type == ","))
|
|
2642
|
-
if (value == "implements") cx.marked = "keyword";
|
|
2593
|
+
if (value == "<") return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, classNameAfter)
|
|
2594
|
+
if (value == "extends" || value == "implements" || (isTS && type == ","))
|
|
2643
2595
|
return cont(isTS ? typeexpr : expression, classNameAfter);
|
|
2644
|
-
}
|
|
2645
2596
|
if (type == "{") return cont(pushlex("}"), classBody, poplex);
|
|
2646
2597
|
}
|
|
2647
2598
|
function classBody(type, value) {
|
|
2648
|
-
if (type == "async" ||
|
|
2599
|
+
if (type == "modifier" || type == "async" ||
|
|
2649
2600
|
(type == "variable" &&
|
|
2650
|
-
(value == "static" || value == "get" || value == "set"
|
|
2601
|
+
(value == "static" || value == "get" || value == "set") &&
|
|
2651
2602
|
cx.stream.match(/^\s+[\w$\xa1-\uffff]/, false))) {
|
|
2652
2603
|
cx.marked = "keyword";
|
|
2653
2604
|
return cont(classBody);
|
|
@@ -2657,7 +2608,7 @@ module.exports =
|
|
|
2657
2608
|
return cont(isTS ? classfield : functiondef, classBody);
|
|
2658
2609
|
}
|
|
2659
2610
|
if (type == "[")
|
|
2660
|
-
return cont(expression,
|
|
2611
|
+
return cont(expression, expect("]"), isTS ? classfield : functiondef, classBody)
|
|
2661
2612
|
if (value == "*") {
|
|
2662
2613
|
cx.marked = "keyword";
|
|
2663
2614
|
return cont(classBody);
|
|
@@ -2684,7 +2635,6 @@ module.exports =
|
|
|
2684
2635
|
}
|
|
2685
2636
|
function afterImport(type) {
|
|
2686
2637
|
if (type == "string") return cont();
|
|
2687
|
-
if (type == "(") return pass(expression);
|
|
2688
2638
|
return pass(importSpec, maybeMoreImports, maybeFrom);
|
|
2689
2639
|
}
|
|
2690
2640
|
function importSpec(type, value) {
|
|
@@ -2706,12 +2656,6 @@ module.exports =
|
|
|
2706
2656
|
if (type == "]") return cont();
|
|
2707
2657
|
return pass(commasep(expressionNoComma, "]"));
|
|
2708
2658
|
}
|
|
2709
|
-
function enumdef() {
|
|
2710
|
-
return pass(pushlex("form"), pattern, expect("{"), pushlex("}"), commasep(enummember, "}"), poplex, poplex)
|
|
2711
|
-
}
|
|
2712
|
-
function enummember() {
|
|
2713
|
-
return pass(pattern, maybeAssign);
|
|
2714
|
-
}
|
|
2715
2659
|
|
|
2716
2660
|
function isContinuedStatement(state, textAfter) {
|
|
2717
2661
|
return state.lastType == "operator" || state.lastType == "," ||
|
|
@@ -2735,7 +2679,7 @@ module.exports =
|
|
|
2735
2679
|
cc: [],
|
|
2736
2680
|
lexical: new JSLexical((basecolumn || 0) - indentUnit, 0, "block", false),
|
|
2737
2681
|
localVars: parserConfig.localVars,
|
|
2738
|
-
context: parserConfig.localVars &&
|
|
2682
|
+
context: parserConfig.localVars && {vars: parserConfig.localVars},
|
|
2739
2683
|
indented: basecolumn || 0
|
|
2740
2684
|
};
|
|
2741
2685
|
if (parserConfig.globalVars && typeof parserConfig.globalVars == "object")
|
|
@@ -2776,7 +2720,7 @@ module.exports =
|
|
|
2776
2720
|
lexical = lexical.prev;
|
|
2777
2721
|
var type = lexical.type, closing = firstChar == type;
|
|
2778
2722
|
|
|
2779
|
-
if (type == "vardef") return lexical.indented + (state.lastType == "operator" || state.lastType == "," ? lexical.info
|
|
2723
|
+
if (type == "vardef") return lexical.indented + (state.lastType == "operator" || state.lastType == "," ? lexical.info + 1 : 0);
|
|
2780
2724
|
else if (type == "form" && firstChar == "{") return lexical.indented;
|
|
2781
2725
|
else if (type == "form") return lexical.indented + indentUnit;
|
|
2782
2726
|
else if (type == "stat")
|
|
@@ -2825,19 +2769,14 @@ module.exports =
|
|
|
2825
2769
|
|
|
2826
2770
|
|
|
2827
2771
|
/***/ },
|
|
2828
|
-
/*
|
|
2829
|
-
/*
|
|
2830
|
-
/* 45 */,
|
|
2831
|
-
/* 46 */,
|
|
2832
|
-
/* 47 */,
|
|
2833
|
-
/* 48 */,
|
|
2834
|
-
/* 49 */
|
|
2772
|
+
/* 28 */,
|
|
2773
|
+
/* 29 */
|
|
2835
2774
|
/***/ function(module, exports) {
|
|
2836
2775
|
|
|
2837
2776
|
// removed by extract-text-webpack-plugin
|
|
2838
2777
|
|
|
2839
2778
|
/***/ },
|
|
2840
|
-
/*
|
|
2779
|
+
/* 30 */
|
|
2841
2780
|
/***/ function(module, exports, __webpack_require__) {
|
|
2842
2781
|
|
|
2843
2782
|
/* WEBPACK VAR INJECTION */(function(Buffer) {/* cpexcel.js (C) 2013-present SheetJS -- http://sheetjs.com */
|
|
@@ -4346,42 +4285,45 @@ module.exports =
|
|
|
4346
4285
|
return cpt;
|
|
4347
4286
|
}));
|
|
4348
4287
|
|
|
4349
|
-
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(
|
|
4288
|
+
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(17).Buffer))
|
|
4350
4289
|
|
|
4351
4290
|
/***/ },
|
|
4352
|
-
/*
|
|
4291
|
+
/* 31 */
|
|
4353
4292
|
/***/ function(module, exports) {
|
|
4354
4293
|
|
|
4355
4294
|
module.exports = require("react-codemirror2");
|
|
4356
4295
|
|
|
4357
4296
|
/***/ },
|
|
4358
|
-
/*
|
|
4297
|
+
/* 32 */
|
|
4359
4298
|
/***/ function(module, exports) {
|
|
4360
4299
|
|
|
4361
4300
|
/* (ignored) */
|
|
4362
4301
|
|
|
4363
4302
|
/***/ },
|
|
4364
|
-
/*
|
|
4365
|
-
/*
|
|
4366
|
-
/*
|
|
4367
|
-
/*
|
|
4368
|
-
/*
|
|
4369
|
-
/*
|
|
4370
|
-
/*
|
|
4371
|
-
/*
|
|
4372
|
-
/*
|
|
4373
|
-
/*
|
|
4374
|
-
/*
|
|
4375
|
-
/*
|
|
4376
|
-
/*
|
|
4303
|
+
/* 33 */,
|
|
4304
|
+
/* 34 */,
|
|
4305
|
+
/* 35 */,
|
|
4306
|
+
/* 36 */,
|
|
4307
|
+
/* 37 */,
|
|
4308
|
+
/* 38 */,
|
|
4309
|
+
/* 39 */,
|
|
4310
|
+
/* 40 */,
|
|
4311
|
+
/* 41 */,
|
|
4312
|
+
/* 42 */,
|
|
4313
|
+
/* 43 */,
|
|
4314
|
+
/* 44 */,
|
|
4315
|
+
/* 45 */,
|
|
4316
|
+
/* 46 */,
|
|
4317
|
+
/* 47 */,
|
|
4318
|
+
/* 48 */
|
|
4377
4319
|
/***/ function(module, exports) {
|
|
4378
4320
|
|
|
4379
4321
|
module.exports = require("react-dropzone");
|
|
4380
4322
|
|
|
4381
4323
|
/***/ },
|
|
4382
|
-
/*
|
|
4383
|
-
/*
|
|
4384
|
-
/*
|
|
4324
|
+
/* 49 */,
|
|
4325
|
+
/* 50 */,
|
|
4326
|
+
/* 51 */
|
|
4385
4327
|
/***/ function(module, exports, __webpack_require__) {
|
|
4386
4328
|
|
|
4387
4329
|
'use strict';
|
|
@@ -4396,7 +4338,7 @@ module.exports =
|
|
|
4396
4338
|
|
|
4397
4339
|
var _react2 = _interopRequireDefault(_react);
|
|
4398
4340
|
|
|
4399
|
-
var _clipboard = __webpack_require__(
|
|
4341
|
+
var _clipboard = __webpack_require__(57);
|
|
4400
4342
|
|
|
4401
4343
|
var _clipboard2 = _interopRequireDefault(_clipboard);
|
|
4402
4344
|
|
|
@@ -4527,7 +4469,7 @@ module.exports =
|
|
|
4527
4469
|
exports.default = AdapterSecret;
|
|
4528
4470
|
|
|
4529
4471
|
/***/ },
|
|
4530
|
-
/*
|
|
4472
|
+
/* 52 */
|
|
4531
4473
|
/***/ function(module, exports, __webpack_require__) {
|
|
4532
4474
|
|
|
4533
4475
|
'use strict';
|
|
@@ -4544,23 +4486,23 @@ module.exports =
|
|
|
4544
4486
|
|
|
4545
4487
|
var _react2 = _interopRequireDefault(_react);
|
|
4546
4488
|
|
|
4547
|
-
var _reactDropzone = __webpack_require__(
|
|
4489
|
+
var _reactDropzone = __webpack_require__(48);
|
|
4548
4490
|
|
|
4549
4491
|
var _reactDropzone2 = _interopRequireDefault(_reactDropzone);
|
|
4550
4492
|
|
|
4551
|
-
var _papaparse = __webpack_require__(
|
|
4493
|
+
var _papaparse = __webpack_require__(76);
|
|
4552
4494
|
|
|
4553
4495
|
var _papaparse2 = _interopRequireDefault(_papaparse);
|
|
4554
4496
|
|
|
4555
|
-
var _xlsx = __webpack_require__(
|
|
4497
|
+
var _xlsx = __webpack_require__(75);
|
|
4556
4498
|
|
|
4557
4499
|
var _xlsx2 = _interopRequireDefault(_xlsx);
|
|
4558
4500
|
|
|
4559
|
-
var _moment = __webpack_require__(
|
|
4501
|
+
var _moment = __webpack_require__(11);
|
|
4560
4502
|
|
|
4561
4503
|
var _moment2 = _interopRequireDefault(_moment);
|
|
4562
4504
|
|
|
4563
|
-
var _reactBootstrap = __webpack_require__(
|
|
4505
|
+
var _reactBootstrap = __webpack_require__(3);
|
|
4564
4506
|
|
|
4565
4507
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
4566
4508
|
|
|
@@ -4598,27 +4540,33 @@ module.exports =
|
|
|
4598
4540
|
console.log('err when trying to parse json = ' + err);
|
|
4599
4541
|
}
|
|
4600
4542
|
if (json) {
|
|
4601
|
-
var
|
|
4602
|
-
|
|
4603
|
-
|
|
4604
|
-
|
|
4605
|
-
|
|
4606
|
-
|
|
4607
|
-
|
|
4608
|
-
|
|
4609
|
-
|
|
4610
|
-
|
|
4611
|
-
|
|
4612
|
-
|
|
4543
|
+
var _ret = function () {
|
|
4544
|
+
var fields = [];
|
|
4545
|
+
json.forEach(function (row) {
|
|
4546
|
+
Object.keys(row).forEach(function (col) {
|
|
4547
|
+
if (!fields.find(function (f) {
|
|
4548
|
+
return f.label === col;
|
|
4549
|
+
})) {
|
|
4550
|
+
fields.push({
|
|
4551
|
+
label: col,
|
|
4552
|
+
name: col,
|
|
4553
|
+
type: row[col] && _typeof(row[col])
|
|
4554
|
+
});
|
|
4555
|
+
}
|
|
4556
|
+
});
|
|
4613
4557
|
});
|
|
4614
|
-
|
|
4615
|
-
|
|
4616
|
-
|
|
4617
|
-
|
|
4618
|
-
|
|
4619
|
-
|
|
4620
|
-
|
|
4621
|
-
|
|
4558
|
+
var meta = {
|
|
4559
|
+
name: file.name,
|
|
4560
|
+
type: file.name.substr(0, file.name.lastIndexOf('.')).split(' ').join(''),
|
|
4561
|
+
byteSize: file.size,
|
|
4562
|
+
properties: fields
|
|
4563
|
+
};
|
|
4564
|
+
return {
|
|
4565
|
+
v: meta
|
|
4566
|
+
};
|
|
4567
|
+
}();
|
|
4568
|
+
|
|
4569
|
+
if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v;
|
|
4622
4570
|
}
|
|
4623
4571
|
};
|
|
4624
4572
|
|
|
@@ -4664,78 +4612,82 @@ module.exports =
|
|
|
4664
4612
|
var extension = file.name.substr(file.name.lastIndexOf('.') + 1, file.name.length);
|
|
4665
4613
|
var blacklisted = extensionBlacklist.includes(extension);
|
|
4666
4614
|
if (!blacklisted) {
|
|
4667
|
-
|
|
4668
|
-
|
|
4669
|
-
|
|
4670
|
-
|
|
4671
|
-
|
|
4672
|
-
|
|
4673
|
-
|
|
4674
|
-
|
|
4675
|
-
|
|
4676
|
-
|
|
4677
|
-
|
|
4678
|
-
|
|
4679
|
-
|
|
4680
|
-
|
|
4681
|
-
|
|
4682
|
-
|
|
4683
|
-
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
|
|
4687
|
-
|
|
4688
|
-
|
|
4689
|
-
|
|
4690
|
-
|
|
4691
|
-
|
|
4692
|
-
|
|
4693
|
-
|
|
4615
|
+
(function () {
|
|
4616
|
+
var isXLS = extension === 'xlsx' || extension === 'xls';
|
|
4617
|
+
|
|
4618
|
+
var reader = new FileReader();
|
|
4619
|
+
reader.onload = function (e) {
|
|
4620
|
+
|
|
4621
|
+
// PARSE METADATA
|
|
4622
|
+
var data = e.target.result;
|
|
4623
|
+
var csv = null;
|
|
4624
|
+
if (isXLS) {
|
|
4625
|
+
(function () {
|
|
4626
|
+
var sheetCounter = 0;
|
|
4627
|
+
var binary = data;
|
|
4628
|
+
/*const bytes = new Uint8Array(data)
|
|
4629
|
+
for (var i = 0; i < length; i++) {
|
|
4630
|
+
binary += String.fromCharCode(bytes[i]);
|
|
4631
|
+
}*/
|
|
4632
|
+
var workbook = _xlsx2.default.read(binary, { type: 'binary' });
|
|
4633
|
+
var sheetNames = workbook.SheetNames.filter(function (sn) {
|
|
4634
|
+
return sn !== 'Export Summary';
|
|
4635
|
+
});
|
|
4636
|
+
sheetNames.forEach(function (sn) {
|
|
4637
|
+
csv = _xlsx2.default.utils.sheet_to_csv(workbook.Sheets[sn]);
|
|
4638
|
+
_this.parseCSV(file, csv).then(function (xlsMeta) {
|
|
4639
|
+
meta = meta.concat(Object.assign({}, xlsMeta, {
|
|
4640
|
+
sheetName: sn,
|
|
4641
|
+
fileType: extension
|
|
4642
|
+
}));
|
|
4643
|
+
sheetCounter += 1;
|
|
4644
|
+
counter += 1;
|
|
4645
|
+
if (counter >= fs.length && sheetCounter === sheetNames.length) {
|
|
4646
|
+
_this.setState({ meta: meta });
|
|
4647
|
+
_this.props.onDrop();
|
|
4648
|
+
}
|
|
4649
|
+
});
|
|
4650
|
+
});
|
|
4651
|
+
})();
|
|
4652
|
+
} else if (extension === 'csv') {
|
|
4653
|
+
_this.parseCSV(file, csv).then(function (csvMeta) {
|
|
4654
|
+
meta = meta.concat(Object.assign({}, csvMeta, { fileType: extension }));
|
|
4694
4655
|
counter += 1;
|
|
4695
|
-
if (counter
|
|
4656
|
+
if (counter === fs.length) {
|
|
4696
4657
|
_this.setState({ meta: meta });
|
|
4697
4658
|
_this.props.onDrop();
|
|
4698
4659
|
}
|
|
4699
4660
|
});
|
|
4700
|
-
})
|
|
4701
|
-
|
|
4702
|
-
|
|
4703
|
-
|
|
4704
|
-
counter += 1;
|
|
4705
|
-
if (counter === fs.length) {
|
|
4706
|
-
_this.setState({ meta: meta });
|
|
4707
|
-
_this.props.onDrop();
|
|
4661
|
+
} else if (extension === 'json' || extension === 'jsonl') {
|
|
4662
|
+
var d = data;
|
|
4663
|
+
if (extension === 'jsonl') {
|
|
4664
|
+
d = _this.parseJsonLines(data);
|
|
4708
4665
|
}
|
|
4709
|
-
|
|
4710
|
-
|
|
4711
|
-
|
|
4712
|
-
|
|
4713
|
-
|
|
4714
|
-
|
|
4715
|
-
|
|
4716
|
-
|
|
4717
|
-
meta = meta.concat(Object.assign({}, fileMeta, { fileType: extension }));
|
|
4718
|
-
counter += 1;
|
|
4719
|
-
if (counter === fs.length) {
|
|
4720
|
-
_this.setState({ meta: meta });
|
|
4721
|
-
_this.props.onDrop();
|
|
4666
|
+
var fileMeta = _this.parseJsonFile(d, file);
|
|
4667
|
+
if (fileMeta) {
|
|
4668
|
+
meta = meta.concat(Object.assign({}, fileMeta, { fileType: extension }));
|
|
4669
|
+
counter += 1;
|
|
4670
|
+
if (counter === fs.length) {
|
|
4671
|
+
_this.setState({ meta: meta });
|
|
4672
|
+
_this.props.onDrop();
|
|
4673
|
+
}
|
|
4722
4674
|
}
|
|
4723
4675
|
}
|
|
4724
|
-
}
|
|
4725
4676
|
|
|
4726
|
-
|
|
4727
|
-
|
|
4728
|
-
|
|
4729
|
-
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
|
|
4677
|
+
// ADD TO CONTENTS, TO UPLOAD
|
|
4678
|
+
fileContents = fileContents.concat(file);
|
|
4679
|
+
contentCounter += 1;
|
|
4680
|
+
if (contentCounter === fs.length) {
|
|
4681
|
+
_this.setState({ fileContents: fileContents });
|
|
4682
|
+
}
|
|
4683
|
+
}; // end file reader on load callback
|
|
4733
4684
|
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
|
|
4737
|
-
|
|
4738
|
-
|
|
4685
|
+
if (isXLS) {
|
|
4686
|
+
reader.readAsBinaryString(file); // read as array buffer???
|
|
4687
|
+
} else {
|
|
4688
|
+
reader.readAsText(file);
|
|
4689
|
+
}
|
|
4690
|
+
})();
|
|
4739
4691
|
} else {
|
|
4740
4692
|
_this.setState({ dropError: 'File type not accepted.' });
|
|
4741
4693
|
setTimeout(function () {
|
|
@@ -5052,7 +5004,7 @@ module.exports =
|
|
|
5052
5004
|
exports.default = FlatFile;
|
|
5053
5005
|
|
|
5054
5006
|
/***/ },
|
|
5055
|
-
/*
|
|
5007
|
+
/* 53 */
|
|
5056
5008
|
/***/ function(module, exports, __webpack_require__) {
|
|
5057
5009
|
|
|
5058
5010
|
'use strict';
|
|
@@ -5067,7 +5019,7 @@ module.exports =
|
|
|
5067
5019
|
|
|
5068
5020
|
var _react2 = _interopRequireDefault(_react);
|
|
5069
5021
|
|
|
5070
|
-
__webpack_require__(
|
|
5022
|
+
__webpack_require__(29);
|
|
5071
5023
|
|
|
5072
5024
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
5073
5025
|
|
|
@@ -5080,8 +5032,8 @@ module.exports =
|
|
|
5080
5032
|
// SKIP ON SERVER-SIDE RENDERING
|
|
5081
5033
|
var codemirror = null;
|
|
5082
5034
|
if (typeof window !== 'undefined' && typeof window.navigator !== 'undefined') {
|
|
5083
|
-
codemirror = __webpack_require__(
|
|
5084
|
-
__webpack_require__(
|
|
5035
|
+
codemirror = __webpack_require__(31);
|
|
5036
|
+
__webpack_require__(27);
|
|
5085
5037
|
}
|
|
5086
5038
|
|
|
5087
5039
|
function unCamelize(text) {
|
|
@@ -5236,7 +5188,7 @@ module.exports =
|
|
|
5236
5188
|
exports.default = Google;
|
|
5237
5189
|
|
|
5238
5190
|
/***/ },
|
|
5239
|
-
/*
|
|
5191
|
+
/* 54 */
|
|
5240
5192
|
/***/ function(module, exports, __webpack_require__) {
|
|
5241
5193
|
|
|
5242
5194
|
'use strict';
|
|
@@ -5251,23 +5203,23 @@ module.exports =
|
|
|
5251
5203
|
|
|
5252
5204
|
var _react2 = _interopRequireDefault(_react);
|
|
5253
5205
|
|
|
5254
|
-
var _flatfile = __webpack_require__(
|
|
5206
|
+
var _flatfile = __webpack_require__(52);
|
|
5255
5207
|
|
|
5256
5208
|
var _flatfile2 = _interopRequireDefault(_flatfile);
|
|
5257
5209
|
|
|
5258
|
-
var _google = __webpack_require__(
|
|
5210
|
+
var _google = __webpack_require__(53);
|
|
5259
5211
|
|
|
5260
5212
|
var _google2 = _interopRequireDefault(_google);
|
|
5261
5213
|
|
|
5262
|
-
var _adaptersecret = __webpack_require__(
|
|
5214
|
+
var _adaptersecret = __webpack_require__(51);
|
|
5263
5215
|
|
|
5264
5216
|
var _adaptersecret2 = _interopRequireDefault(_adaptersecret);
|
|
5265
5217
|
|
|
5266
|
-
var _oauth = __webpack_require__(
|
|
5218
|
+
var _oauth = __webpack_require__(55);
|
|
5267
5219
|
|
|
5268
5220
|
var _oauth2 = _interopRequireDefault(_oauth);
|
|
5269
5221
|
|
|
5270
|
-
var _sftp = __webpack_require__(
|
|
5222
|
+
var _sftp = __webpack_require__(56);
|
|
5271
5223
|
|
|
5272
5224
|
var _sftp2 = _interopRequireDefault(_sftp);
|
|
5273
5225
|
|
|
@@ -5589,7 +5541,7 @@ module.exports =
|
|
|
5589
5541
|
};
|
|
5590
5542
|
|
|
5591
5543
|
/***/ },
|
|
5592
|
-
/*
|
|
5544
|
+
/* 55 */
|
|
5593
5545
|
/***/ function(module, exports, __webpack_require__) {
|
|
5594
5546
|
|
|
5595
5547
|
'use strict';
|
|
@@ -5868,7 +5820,7 @@ module.exports =
|
|
|
5868
5820
|
exports.default = Oauth;
|
|
5869
5821
|
|
|
5870
5822
|
/***/ },
|
|
5871
|
-
/*
|
|
5823
|
+
/* 56 */
|
|
5872
5824
|
/***/ function(module, exports, __webpack_require__) {
|
|
5873
5825
|
|
|
5874
5826
|
'use strict';
|
|
@@ -5883,7 +5835,7 @@ module.exports =
|
|
|
5883
5835
|
|
|
5884
5836
|
var _react2 = _interopRequireDefault(_react);
|
|
5885
5837
|
|
|
5886
|
-
__webpack_require__(
|
|
5838
|
+
__webpack_require__(29);
|
|
5887
5839
|
|
|
5888
5840
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
5889
5841
|
|
|
@@ -5896,8 +5848,8 @@ module.exports =
|
|
|
5896
5848
|
// SKIP ON SERVER-SIDE RENDERING
|
|
5897
5849
|
var codemirror = null;
|
|
5898
5850
|
if (typeof window !== 'undefined' && typeof window.navigator !== 'undefined') {
|
|
5899
|
-
codemirror = __webpack_require__(
|
|
5900
|
-
__webpack_require__(
|
|
5851
|
+
codemirror = __webpack_require__(31);
|
|
5852
|
+
__webpack_require__(27);
|
|
5901
5853
|
}
|
|
5902
5854
|
|
|
5903
5855
|
function unCamelize(text) {
|
|
@@ -5973,15 +5925,17 @@ module.exports =
|
|
|
5973
5925
|
inputs = _props2.inputs,
|
|
5974
5926
|
creds = _props2.creds,
|
|
5975
5927
|
onChange = _props2.onChange;
|
|
5928
|
+
var credentialType = this.state.credentialType;
|
|
5929
|
+
|
|
5976
5930
|
|
|
5977
|
-
|
|
5931
|
+
var CodeMirror = codemirror && codemirror.Controlled;
|
|
5978
5932
|
|
|
5979
5933
|
var Button = inputs.Button;
|
|
5980
5934
|
var Input = inputs.Input;
|
|
5981
5935
|
var Toggle = inputs.ToggleButtonGroup;
|
|
5982
5936
|
|
|
5983
5937
|
var credentials = config && config.credentials.filter(function (o) {
|
|
5984
|
-
if (o === 'privateKey'
|
|
5938
|
+
if (o === 'privateKey') {
|
|
5985
5939
|
var i = o;
|
|
5986
5940
|
if (o === 'privateKey') {
|
|
5987
5941
|
i = 'ssh-key';
|
|
@@ -5996,7 +5950,10 @@ module.exports =
|
|
|
5996
5950
|
|
|
5997
5951
|
return true;
|
|
5998
5952
|
});
|
|
5999
|
-
|
|
5953
|
+
|
|
5954
|
+
//
|
|
5955
|
+
|
|
5956
|
+
var passwordIsOptional = credentials.includes('privateKey');
|
|
6000
5957
|
|
|
6001
5958
|
var credsDisabledCheck = credentials.some(function (c) {
|
|
6002
5959
|
return !Object.keys(creds).includes(c.split(' ').join(''));
|
|
@@ -6024,6 +5981,8 @@ module.exports =
|
|
|
6024
5981
|
),
|
|
6025
5982
|
credentials.map(function (credType, index) {
|
|
6026
5983
|
|
|
5984
|
+
console.log(creds[credType]);
|
|
5985
|
+
|
|
6027
5986
|
return _react2.default.createElement(
|
|
6028
5987
|
'div',
|
|
6029
5988
|
{ key: index, style: { marginTop: 8 } },
|
|
@@ -6037,8 +5996,22 @@ module.exports =
|
|
|
6037
5996
|
unCamelize(credType)
|
|
6038
5997
|
),
|
|
6039
5998
|
_react2.default.createElement('br', null),
|
|
6040
|
-
_react2.default.createElement(
|
|
6041
|
-
|
|
5999
|
+
credType === 'privateKey' ? _react2.default.createElement(
|
|
6000
|
+
'div',
|
|
6001
|
+
null,
|
|
6002
|
+
_react2.default.createElement(CodeMirror, { value: creds[credType],
|
|
6003
|
+
className: 'env-creds-json-codemirror-sftp',
|
|
6004
|
+
options: {
|
|
6005
|
+
lineNumbers: true,
|
|
6006
|
+
theme: 'default',
|
|
6007
|
+
mode: 'javascript',
|
|
6008
|
+
dragDrop: true
|
|
6009
|
+
},
|
|
6010
|
+
onBeforeChange: function onBeforeChange(e, d, v) {
|
|
6011
|
+
return onChange({ target: { name: credType, value: v } });
|
|
6012
|
+
} })
|
|
6013
|
+
) : _react2.default.createElement(Input, { name: credType,
|
|
6014
|
+
datatype: credType === 'password' && !_this2.state.showPass ? 'password' : null,
|
|
6042
6015
|
value: creds[credType] || '',
|
|
6043
6016
|
onChange: onChange }),
|
|
6044
6017
|
index === 0 && _react2.default.createElement(
|
|
@@ -6057,7 +6030,7 @@ module.exports =
|
|
|
6057
6030
|
'\xA0\xA0',
|
|
6058
6031
|
_react2.default.createElement(Loop, null)
|
|
6059
6032
|
),
|
|
6060
|
-
|
|
6033
|
+
credType === 'password' && _react2.default.createElement(Key, { showPass: _this2.state.showPass,
|
|
6061
6034
|
onClick: function onClick() {
|
|
6062
6035
|
return _this2.setState({ showPass: !_this2.state.showPass });
|
|
6063
6036
|
}
|
|
@@ -6076,7 +6049,7 @@ module.exports =
|
|
|
6076
6049
|
exports.default = SFTP;
|
|
6077
6050
|
|
|
6078
6051
|
/***/ },
|
|
6079
|
-
/*
|
|
6052
|
+
/* 57 */
|
|
6080
6053
|
/***/ function(module, exports, __webpack_require__) {
|
|
6081
6054
|
|
|
6082
6055
|
"use strict";
|
|
@@ -6257,9 +6230,17 @@ module.exports =
|
|
|
6257
6230
|
});
|
|
6258
6231
|
|
|
6259
6232
|
/***/ },
|
|
6260
|
-
/*
|
|
6261
|
-
/*
|
|
6262
|
-
/*
|
|
6233
|
+
/* 58 */,
|
|
6234
|
+
/* 59 */,
|
|
6235
|
+
/* 60 */,
|
|
6236
|
+
/* 61 */,
|
|
6237
|
+
/* 62 */,
|
|
6238
|
+
/* 63 */,
|
|
6239
|
+
/* 64 */,
|
|
6240
|
+
/* 65 */,
|
|
6241
|
+
/* 66 */,
|
|
6242
|
+
/* 67 */,
|
|
6243
|
+
/* 68 */
|
|
6263
6244
|
/***/ function(module, exports) {
|
|
6264
6245
|
|
|
6265
6246
|
'use strict'
|
|
@@ -6278,102 +6259,68 @@ module.exports =
|
|
|
6278
6259
|
revLookup[code.charCodeAt(i)] = i
|
|
6279
6260
|
}
|
|
6280
6261
|
|
|
6281
|
-
// Support decoding URL-safe base64 strings, as Node.js does.
|
|
6282
|
-
// See: https://en.wikipedia.org/wiki/Base64#URL_applications
|
|
6283
6262
|
revLookup['-'.charCodeAt(0)] = 62
|
|
6284
6263
|
revLookup['_'.charCodeAt(0)] = 63
|
|
6285
6264
|
|
|
6286
|
-
function
|
|
6265
|
+
function placeHoldersCount (b64) {
|
|
6287
6266
|
var len = b64.length
|
|
6288
|
-
|
|
6289
6267
|
if (len % 4 > 0) {
|
|
6290
6268
|
throw new Error('Invalid string. Length must be a multiple of 4')
|
|
6291
6269
|
}
|
|
6292
6270
|
|
|
6293
|
-
//
|
|
6294
|
-
//
|
|
6295
|
-
|
|
6296
|
-
if
|
|
6297
|
-
|
|
6298
|
-
|
|
6299
|
-
? 0
|
|
6300
|
-
: 4 - (validLen % 4)
|
|
6301
|
-
|
|
6302
|
-
return [validLen, placeHoldersLen]
|
|
6271
|
+
// the number of equal signs (place holders)
|
|
6272
|
+
// if there are two placeholders, than the two characters before it
|
|
6273
|
+
// represent one byte
|
|
6274
|
+
// if there is only one, then the three characters before it represent 2 bytes
|
|
6275
|
+
// this is just a cheap hack to not do indexOf twice
|
|
6276
|
+
return b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0
|
|
6303
6277
|
}
|
|
6304
6278
|
|
|
6305
|
-
// base64 is 4/3 + up to two characters of the original data
|
|
6306
6279
|
function byteLength (b64) {
|
|
6307
|
-
|
|
6308
|
-
|
|
6309
|
-
var placeHoldersLen = lens[1]
|
|
6310
|
-
return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
|
|
6311
|
-
}
|
|
6312
|
-
|
|
6313
|
-
function _byteLength (b64, validLen, placeHoldersLen) {
|
|
6314
|
-
return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
|
|
6280
|
+
// base64 is 4/3 + up to two characters of the original data
|
|
6281
|
+
return b64.length * 3 / 4 - placeHoldersCount(b64)
|
|
6315
6282
|
}
|
|
6316
6283
|
|
|
6317
6284
|
function toByteArray (b64) {
|
|
6318
|
-
var tmp
|
|
6319
|
-
var
|
|
6320
|
-
|
|
6321
|
-
var placeHoldersLen = lens[1]
|
|
6322
|
-
|
|
6323
|
-
var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))
|
|
6285
|
+
var i, j, l, tmp, placeHolders, arr
|
|
6286
|
+
var len = b64.length
|
|
6287
|
+
placeHolders = placeHoldersCount(b64)
|
|
6324
6288
|
|
|
6325
|
-
|
|
6289
|
+
arr = new Arr(len * 3 / 4 - placeHolders)
|
|
6326
6290
|
|
|
6327
6291
|
// if there are placeholders, only get up to the last complete 4 chars
|
|
6328
|
-
|
|
6329
|
-
? validLen - 4
|
|
6330
|
-
: validLen
|
|
6292
|
+
l = placeHolders > 0 ? len - 4 : len
|
|
6331
6293
|
|
|
6332
|
-
|
|
6333
|
-
tmp =
|
|
6334
|
-
(revLookup[b64.charCodeAt(i)] << 18) |
|
|
6335
|
-
(revLookup[b64.charCodeAt(i + 1)] << 12) |
|
|
6336
|
-
(revLookup[b64.charCodeAt(i + 2)] << 6) |
|
|
6337
|
-
revLookup[b64.charCodeAt(i + 3)]
|
|
6338
|
-
arr[curByte++] = (tmp >> 16) & 0xFF
|
|
6339
|
-
arr[curByte++] = (tmp >> 8) & 0xFF
|
|
6340
|
-
arr[curByte++] = tmp & 0xFF
|
|
6341
|
-
}
|
|
6294
|
+
var L = 0
|
|
6342
6295
|
|
|
6343
|
-
|
|
6344
|
-
tmp =
|
|
6345
|
-
|
|
6346
|
-
|
|
6347
|
-
arr[
|
|
6296
|
+
for (i = 0, j = 0; i < l; i += 4, j += 3) {
|
|
6297
|
+
tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)]
|
|
6298
|
+
arr[L++] = (tmp >> 16) & 0xFF
|
|
6299
|
+
arr[L++] = (tmp >> 8) & 0xFF
|
|
6300
|
+
arr[L++] = tmp & 0xFF
|
|
6348
6301
|
}
|
|
6349
6302
|
|
|
6350
|
-
if (
|
|
6351
|
-
tmp =
|
|
6352
|
-
|
|
6353
|
-
|
|
6354
|
-
|
|
6355
|
-
arr[
|
|
6356
|
-
arr[
|
|
6303
|
+
if (placeHolders === 2) {
|
|
6304
|
+
tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4)
|
|
6305
|
+
arr[L++] = tmp & 0xFF
|
|
6306
|
+
} else if (placeHolders === 1) {
|
|
6307
|
+
tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2)
|
|
6308
|
+
arr[L++] = (tmp >> 8) & 0xFF
|
|
6309
|
+
arr[L++] = tmp & 0xFF
|
|
6357
6310
|
}
|
|
6358
6311
|
|
|
6359
6312
|
return arr
|
|
6360
6313
|
}
|
|
6361
6314
|
|
|
6362
6315
|
function tripletToBase64 (num) {
|
|
6363
|
-
return lookup[num >> 18 & 0x3F] +
|
|
6364
|
-
lookup[num >> 12 & 0x3F] +
|
|
6365
|
-
lookup[num >> 6 & 0x3F] +
|
|
6366
|
-
lookup[num & 0x3F]
|
|
6316
|
+
return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F]
|
|
6367
6317
|
}
|
|
6368
6318
|
|
|
6369
6319
|
function encodeChunk (uint8, start, end) {
|
|
6370
6320
|
var tmp
|
|
6371
6321
|
var output = []
|
|
6372
6322
|
for (var i = start; i < end; i += 3) {
|
|
6373
|
-
tmp =
|
|
6374
|
-
((uint8[i] << 16) & 0xFF0000) +
|
|
6375
|
-
((uint8[i + 1] << 8) & 0xFF00) +
|
|
6376
|
-
(uint8[i + 2] & 0xFF)
|
|
6323
|
+
tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2])
|
|
6377
6324
|
output.push(tripletToBase64(tmp))
|
|
6378
6325
|
}
|
|
6379
6326
|
return output.join('')
|
|
@@ -6383,40 +6330,37 @@ module.exports =
|
|
|
6383
6330
|
var tmp
|
|
6384
6331
|
var len = uint8.length
|
|
6385
6332
|
var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes
|
|
6333
|
+
var output = ''
|
|
6386
6334
|
var parts = []
|
|
6387
6335
|
var maxChunkLength = 16383 // must be multiple of 3
|
|
6388
6336
|
|
|
6389
6337
|
// go through the array every three bytes, we'll deal with trailing stuff later
|
|
6390
6338
|
for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
|
|
6391
|
-
parts.push(encodeChunk(
|
|
6392
|
-
uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)
|
|
6393
|
-
))
|
|
6339
|
+
parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))
|
|
6394
6340
|
}
|
|
6395
6341
|
|
|
6396
6342
|
// pad the end with zeros, but make sure to not forget the extra bytes
|
|
6397
6343
|
if (extraBytes === 1) {
|
|
6398
6344
|
tmp = uint8[len - 1]
|
|
6399
|
-
|
|
6400
|
-
|
|
6401
|
-
|
|
6402
|
-
'=='
|
|
6403
|
-
)
|
|
6345
|
+
output += lookup[tmp >> 2]
|
|
6346
|
+
output += lookup[(tmp << 4) & 0x3F]
|
|
6347
|
+
output += '=='
|
|
6404
6348
|
} else if (extraBytes === 2) {
|
|
6405
|
-
tmp = (uint8[len - 2] << 8) + uint8[len - 1]
|
|
6406
|
-
|
|
6407
|
-
|
|
6408
|
-
|
|
6409
|
-
|
|
6410
|
-
'='
|
|
6411
|
-
)
|
|
6349
|
+
tmp = (uint8[len - 2] << 8) + (uint8[len - 1])
|
|
6350
|
+
output += lookup[tmp >> 10]
|
|
6351
|
+
output += lookup[(tmp >> 4) & 0x3F]
|
|
6352
|
+
output += lookup[(tmp << 2) & 0x3F]
|
|
6353
|
+
output += '='
|
|
6412
6354
|
}
|
|
6413
6355
|
|
|
6356
|
+
parts.push(output)
|
|
6357
|
+
|
|
6414
6358
|
return parts.join('')
|
|
6415
6359
|
}
|
|
6416
6360
|
|
|
6417
6361
|
|
|
6418
6362
|
/***/ },
|
|
6419
|
-
/*
|
|
6363
|
+
/* 69 */
|
|
6420
6364
|
/***/ function(module, exports, __webpack_require__) {
|
|
6421
6365
|
|
|
6422
6366
|
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
|
@@ -7167,16 +7111,6 @@ module.exports =
|
|
|
7167
7111
|
function collapsedSpanAtStart(line) { return collapsedSpanAtSide(line, true) }
|
|
7168
7112
|
function collapsedSpanAtEnd(line) { return collapsedSpanAtSide(line, false) }
|
|
7169
7113
|
|
|
7170
|
-
function collapsedSpanAround(line, ch) {
|
|
7171
|
-
var sps = sawCollapsedSpans && line.markedSpans, found;
|
|
7172
|
-
if (sps) { for (var i = 0; i < sps.length; ++i) {
|
|
7173
|
-
var sp = sps[i];
|
|
7174
|
-
if (sp.marker.collapsed && (sp.from == null || sp.from < ch) && (sp.to == null || sp.to > ch) &&
|
|
7175
|
-
(!found || compareCollapsedMarkers(found, sp.marker) < 0)) { found = sp.marker; }
|
|
7176
|
-
} }
|
|
7177
|
-
return found
|
|
7178
|
-
}
|
|
7179
|
-
|
|
7180
7114
|
// Test whether there exists a collapsed span that partially
|
|
7181
7115
|
// overlaps (covers the start or end, but not both) of a new span.
|
|
7182
7116
|
// Such overlap is not allowed.
|
|
@@ -9211,11 +9145,12 @@ module.exports =
|
|
|
9211
9145
|
var lineObj = getLine(doc, lineN);
|
|
9212
9146
|
for (;;) {
|
|
9213
9147
|
var found = coordsCharInner(cm, lineObj, lineN, x, y);
|
|
9214
|
-
var
|
|
9215
|
-
|
|
9216
|
-
|
|
9217
|
-
|
|
9218
|
-
|
|
9148
|
+
var merged = collapsedSpanAtEnd(lineObj);
|
|
9149
|
+
var mergedPos = merged && merged.find(0, true);
|
|
9150
|
+
if (merged && (found.ch > mergedPos.from.ch || found.ch == mergedPos.from.ch && found.xRel > 0))
|
|
9151
|
+
{ lineN = lineNo(lineObj = mergedPos.to.line); }
|
|
9152
|
+
else
|
|
9153
|
+
{ return found }
|
|
9219
9154
|
}
|
|
9220
9155
|
}
|
|
9221
9156
|
|
|
@@ -9706,10 +9641,8 @@ module.exports =
|
|
|
9706
9641
|
// Read and store the height of line widgets associated with the
|
|
9707
9642
|
// given line.
|
|
9708
9643
|
function updateWidgetHeight(line) {
|
|
9709
|
-
if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i)
|
|
9710
|
-
|
|
9711
|
-
if (parent) { w.height = parent.offsetHeight; }
|
|
9712
|
-
} }
|
|
9644
|
+
if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i)
|
|
9645
|
+
{ line.widgets[i].height = line.widgets[i].node.parentNode.offsetHeight; } }
|
|
9713
9646
|
}
|
|
9714
9647
|
|
|
9715
9648
|
// Compute the lines that are visible in a given viewport (defaults
|
|
@@ -9975,7 +9908,6 @@ module.exports =
|
|
|
9975
9908
|
this.cm = cm;
|
|
9976
9909
|
var vert = this.vert = elt("div", [elt("div", null, null, "min-width: 1px")], "CodeMirror-vscrollbar");
|
|
9977
9910
|
var horiz = this.horiz = elt("div", [elt("div", null, null, "height: 100%; min-height: 1px")], "CodeMirror-hscrollbar");
|
|
9978
|
-
vert.tabIndex = horiz.tabIndex = -1;
|
|
9979
9911
|
place(vert); place(horiz);
|
|
9980
9912
|
|
|
9981
9913
|
on(vert, "scroll", function () {
|
|
@@ -11227,7 +11159,7 @@ module.exports =
|
|
|
11227
11159
|
|
|
11228
11160
|
if ((hist.lastOp == opId ||
|
|
11229
11161
|
hist.lastOrigin == change.origin && change.origin &&
|
|
11230
|
-
((change.origin.charAt(0) == "+" && hist.lastModTime > time -
|
|
11162
|
+
((change.origin.charAt(0) == "+" && doc.cm && hist.lastModTime > time - doc.cm.options.historyEventDelay) ||
|
|
11231
11163
|
change.origin.charAt(0) == "*")) &&
|
|
11232
11164
|
(cur = lastChangeEvent(hist, hist.lastOp == opId))) {
|
|
11233
11165
|
// Merge this change into the last event
|
|
@@ -11656,8 +11588,7 @@ module.exports =
|
|
|
11656
11588
|
|
|
11657
11589
|
// Revert a change stored in a document's history.
|
|
11658
11590
|
function makeChangeFromHistory(doc, type, allowSelectionOnly) {
|
|
11659
|
-
|
|
11660
|
-
if (suppress && !allowSelectionOnly) { return }
|
|
11591
|
+
if (doc.cm && doc.cm.state.suppressEdits && !allowSelectionOnly) { return }
|
|
11661
11592
|
|
|
11662
11593
|
var hist = doc.history, event, selAfter = doc.sel;
|
|
11663
11594
|
var source = type == "undo" ? hist.done : hist.undone, dest = type == "undo" ? hist.undone : hist.done;
|
|
@@ -11682,10 +11613,8 @@ module.exports =
|
|
|
11682
11613
|
return
|
|
11683
11614
|
}
|
|
11684
11615
|
selAfter = event;
|
|
11685
|
-
}
|
|
11686
|
-
|
|
11687
|
-
return
|
|
11688
|
-
} else { break }
|
|
11616
|
+
}
|
|
11617
|
+
else { break }
|
|
11689
11618
|
}
|
|
11690
11619
|
|
|
11691
11620
|
// Build up a reverse change object to add to the opposite history
|
|
@@ -11841,7 +11770,7 @@ module.exports =
|
|
|
11841
11770
|
function replaceRange(doc, code, from, to, origin) {
|
|
11842
11771
|
if (!to) { to = from; }
|
|
11843
11772
|
if (cmp(to, from) < 0) { var assign;
|
|
11844
|
-
(assign = [to, from], from = assign[0], to = assign[1]); }
|
|
11773
|
+
(assign = [to, from], from = assign[0], to = assign[1], assign); }
|
|
11845
11774
|
if (typeof code == "string") { code = doc.splitLines(code); }
|
|
11846
11775
|
makeChange(doc, {from: from, to: to, text: code, origin: origin});
|
|
11847
11776
|
}
|
|
@@ -11937,10 +11866,10 @@ module.exports =
|
|
|
11937
11866
|
}
|
|
11938
11867
|
|
|
11939
11868
|
LeafChunk.prototype = {
|
|
11940
|
-
chunkSize: function() { return this.lines.length },
|
|
11869
|
+
chunkSize: function chunkSize() { return this.lines.length },
|
|
11941
11870
|
|
|
11942
11871
|
// Remove the n lines at offset 'at'.
|
|
11943
|
-
removeInner: function(at, n) {
|
|
11872
|
+
removeInner: function removeInner(at, n) {
|
|
11944
11873
|
var this$1 = this;
|
|
11945
11874
|
|
|
11946
11875
|
for (var i = at, e = at + n; i < e; ++i) {
|
|
@@ -11953,13 +11882,13 @@ module.exports =
|
|
|
11953
11882
|
},
|
|
11954
11883
|
|
|
11955
11884
|
// Helper used to collapse a small branch into a single leaf.
|
|
11956
|
-
collapse: function(lines) {
|
|
11885
|
+
collapse: function collapse(lines) {
|
|
11957
11886
|
lines.push.apply(lines, this.lines);
|
|
11958
11887
|
},
|
|
11959
11888
|
|
|
11960
11889
|
// Insert the given array of lines at offset 'at', count them as
|
|
11961
11890
|
// having the given height.
|
|
11962
|
-
insertInner: function(at, lines, height) {
|
|
11891
|
+
insertInner: function insertInner(at, lines, height) {
|
|
11963
11892
|
var this$1 = this;
|
|
11964
11893
|
|
|
11965
11894
|
this.height += height;
|
|
@@ -11968,7 +11897,7 @@ module.exports =
|
|
|
11968
11897
|
},
|
|
11969
11898
|
|
|
11970
11899
|
// Used to iterate over a part of the tree.
|
|
11971
|
-
iterN: function(at, n, op) {
|
|
11900
|
+
iterN: function iterN(at, n, op) {
|
|
11972
11901
|
var this$1 = this;
|
|
11973
11902
|
|
|
11974
11903
|
for (var e = at + n; at < e; ++at)
|
|
@@ -11992,9 +11921,9 @@ module.exports =
|
|
|
11992
11921
|
}
|
|
11993
11922
|
|
|
11994
11923
|
BranchChunk.prototype = {
|
|
11995
|
-
chunkSize: function() { return this.size },
|
|
11924
|
+
chunkSize: function chunkSize() { return this.size },
|
|
11996
11925
|
|
|
11997
|
-
removeInner: function(at, n) {
|
|
11926
|
+
removeInner: function removeInner(at, n) {
|
|
11998
11927
|
var this$1 = this;
|
|
11999
11928
|
|
|
12000
11929
|
this.size -= n;
|
|
@@ -12020,13 +11949,13 @@ module.exports =
|
|
|
12020
11949
|
}
|
|
12021
11950
|
},
|
|
12022
11951
|
|
|
12023
|
-
collapse: function(lines) {
|
|
11952
|
+
collapse: function collapse(lines) {
|
|
12024
11953
|
var this$1 = this;
|
|
12025
11954
|
|
|
12026
11955
|
for (var i = 0; i < this.children.length; ++i) { this$1.children[i].collapse(lines); }
|
|
12027
11956
|
},
|
|
12028
11957
|
|
|
12029
|
-
insertInner: function(at, lines, height) {
|
|
11958
|
+
insertInner: function insertInner(at, lines, height) {
|
|
12030
11959
|
var this$1 = this;
|
|
12031
11960
|
|
|
12032
11961
|
this.size += lines.length;
|
|
@@ -12055,7 +11984,7 @@ module.exports =
|
|
|
12055
11984
|
},
|
|
12056
11985
|
|
|
12057
11986
|
// When a node has grown, check whether it should be split.
|
|
12058
|
-
maybeSpill: function() {
|
|
11987
|
+
maybeSpill: function maybeSpill() {
|
|
12059
11988
|
if (this.children.length <= 10) { return }
|
|
12060
11989
|
var me = this;
|
|
12061
11990
|
do {
|
|
@@ -12077,7 +12006,7 @@ module.exports =
|
|
|
12077
12006
|
me.parent.maybeSpill();
|
|
12078
12007
|
},
|
|
12079
12008
|
|
|
12080
|
-
iterN: function(at, n, op) {
|
|
12009
|
+
iterN: function iterN(at, n, op) {
|
|
12081
12010
|
var this$1 = this;
|
|
12082
12011
|
|
|
12083
12012
|
for (var i = 0; i < this.children.length; ++i) {
|
|
@@ -12161,7 +12090,7 @@ module.exports =
|
|
|
12161
12090
|
}
|
|
12162
12091
|
return true
|
|
12163
12092
|
});
|
|
12164
|
-
|
|
12093
|
+
signalLater(cm, "lineWidgetAdded", cm, widget, typeof handle == "number" ? handle : lineNo(handle));
|
|
12165
12094
|
return widget
|
|
12166
12095
|
}
|
|
12167
12096
|
|
|
@@ -13019,11 +12948,11 @@ module.exports =
|
|
|
13019
12948
|
}
|
|
13020
12949
|
|
|
13021
12950
|
var keyNames = {
|
|
13022
|
-
3: "
|
|
12951
|
+
3: "Enter", 8: "Backspace", 9: "Tab", 13: "Enter", 16: "Shift", 17: "Ctrl", 18: "Alt",
|
|
13023
12952
|
19: "Pause", 20: "CapsLock", 27: "Esc", 32: "Space", 33: "PageUp", 34: "PageDown", 35: "End",
|
|
13024
12953
|
36: "Home", 37: "Left", 38: "Up", 39: "Right", 40: "Down", 44: "PrintScrn", 45: "Insert",
|
|
13025
12954
|
46: "Delete", 59: ";", 61: "=", 91: "Mod", 92: "Mod", 93: "Mod",
|
|
13026
|
-
106: "*", 107: "=", 109: "-", 110: ".", 111: "/", 127: "Delete",
|
|
12955
|
+
106: "*", 107: "=", 109: "-", 110: ".", 111: "/", 127: "Delete",
|
|
13027
12956
|
173: "-", 186: ";", 187: "=", 188: ",", 189: "-", 190: ".", 191: "/", 192: "`", 219: "[", 220: "\\",
|
|
13028
12957
|
221: "]", 222: "'", 63232: "Up", 63233: "Down", 63234: "Left", 63235: "Right", 63272: "Delete",
|
|
13029
12958
|
63273: "Home", 63275: "End", 63276: "PageUp", 63277: "PageDown", 63302: "Insert"
|
|
@@ -13170,9 +13099,6 @@ module.exports =
|
|
|
13170
13099
|
if (presto && event.keyCode == 34 && event["char"]) { return false }
|
|
13171
13100
|
var name = keyNames[event.keyCode];
|
|
13172
13101
|
if (name == null || event.altGraphKey) { return false }
|
|
13173
|
-
// Ctrl-ScrollLock has keyCode 3, same as Ctrl-Pause,
|
|
13174
|
-
// so we'll use event.code when available (Chrome 48+, FF 38+, Safari 10.1+)
|
|
13175
|
-
if (event.keyCode == 3 && event.code) { name = event.code; }
|
|
13176
13102
|
return addModifierNames(name, event, noShift)
|
|
13177
13103
|
}
|
|
13178
13104
|
|
|
@@ -13512,26 +13438,18 @@ module.exports =
|
|
|
13512
13438
|
// for bound mouse clicks.
|
|
13513
13439
|
|
|
13514
13440
|
var stopSeq = new Delayed;
|
|
13515
|
-
|
|
13516
13441
|
function dispatchKey(cm, name, e, handle) {
|
|
13517
13442
|
var seq = cm.state.keySeq;
|
|
13518
13443
|
if (seq) {
|
|
13519
13444
|
if (isModifierKey(name)) { return "handled" }
|
|
13520
|
-
|
|
13521
|
-
|
|
13522
|
-
|
|
13523
|
-
|
|
13524
|
-
|
|
13525
|
-
|
|
13526
|
-
|
|
13527
|
-
}
|
|
13528
|
-
}); }
|
|
13529
|
-
if (dispatchKeyInner(cm, seq + " " + name, e, handle)) { return true }
|
|
13445
|
+
stopSeq.set(50, function () {
|
|
13446
|
+
if (cm.state.keySeq == seq) {
|
|
13447
|
+
cm.state.keySeq = null;
|
|
13448
|
+
cm.display.input.reset();
|
|
13449
|
+
}
|
|
13450
|
+
});
|
|
13451
|
+
name = seq + " " + name;
|
|
13530
13452
|
}
|
|
13531
|
-
return dispatchKeyInner(cm, name, e, handle)
|
|
13532
|
-
}
|
|
13533
|
-
|
|
13534
|
-
function dispatchKeyInner(cm, name, e, handle) {
|
|
13535
13453
|
var result = lookupKeyForEditor(cm, name, handle);
|
|
13536
13454
|
|
|
13537
13455
|
if (result == "multi")
|
|
@@ -13544,6 +13462,10 @@ module.exports =
|
|
|
13544
13462
|
restartBlink(cm);
|
|
13545
13463
|
}
|
|
13546
13464
|
|
|
13465
|
+
if (seq && !result && /\'$/.test(name)) {
|
|
13466
|
+
e_preventDefault(e);
|
|
13467
|
+
return true
|
|
13468
|
+
}
|
|
13547
13469
|
return !!result
|
|
13548
13470
|
}
|
|
13549
13471
|
|
|
@@ -13755,8 +13677,8 @@ module.exports =
|
|
|
13755
13677
|
var dragEnd = operation(cm, function (e) {
|
|
13756
13678
|
if (webkit) { display.scroller.draggable = false; }
|
|
13757
13679
|
cm.state.draggingText = false;
|
|
13758
|
-
off(
|
|
13759
|
-
off(
|
|
13680
|
+
off(document, "mouseup", dragEnd);
|
|
13681
|
+
off(document, "mousemove", mouseMove);
|
|
13760
13682
|
off(display.scroller, "dragstart", dragStart);
|
|
13761
13683
|
off(display.scroller, "drop", dragEnd);
|
|
13762
13684
|
if (!moved) {
|
|
@@ -13765,7 +13687,7 @@ module.exports =
|
|
|
13765
13687
|
{ extendSelection(cm.doc, pos, null, null, behavior.extend); }
|
|
13766
13688
|
// Work around unexplainable focus problem in IE9 (#2127) and Chrome (#3081)
|
|
13767
13689
|
if (webkit || ie && ie_version == 9)
|
|
13768
|
-
{ setTimeout(function () {
|
|
13690
|
+
{ setTimeout(function () {document.body.focus(); display.input.focus();}, 20); }
|
|
13769
13691
|
else
|
|
13770
13692
|
{ display.input.focus(); }
|
|
13771
13693
|
}
|
|
@@ -13780,8 +13702,8 @@ module.exports =
|
|
|
13780
13702
|
dragEnd.copy = !behavior.moveOnDrag;
|
|
13781
13703
|
// IE's approach to draggable
|
|
13782
13704
|
if (display.scroller.dragDrop) { display.scroller.dragDrop(); }
|
|
13783
|
-
on(
|
|
13784
|
-
on(
|
|
13705
|
+
on(document, "mouseup", dragEnd);
|
|
13706
|
+
on(document, "mousemove", mouseMove);
|
|
13785
13707
|
on(display.scroller, "dragstart", dragStart);
|
|
13786
13708
|
on(display.scroller, "drop", dragEnd);
|
|
13787
13709
|
|
|
@@ -13913,19 +13835,19 @@ module.exports =
|
|
|
13913
13835
|
counter = Infinity;
|
|
13914
13836
|
e_preventDefault(e);
|
|
13915
13837
|
display.input.focus();
|
|
13916
|
-
off(
|
|
13917
|
-
off(
|
|
13838
|
+
off(document, "mousemove", move);
|
|
13839
|
+
off(document, "mouseup", up);
|
|
13918
13840
|
doc.history.lastSelOrigin = null;
|
|
13919
13841
|
}
|
|
13920
13842
|
|
|
13921
13843
|
var move = operation(cm, function (e) {
|
|
13922
|
-
if (
|
|
13844
|
+
if (!e_button(e)) { done(e); }
|
|
13923
13845
|
else { extend(e); }
|
|
13924
13846
|
});
|
|
13925
13847
|
var up = operation(cm, done);
|
|
13926
13848
|
cm.state.selectingText = up;
|
|
13927
|
-
on(
|
|
13928
|
-
on(
|
|
13849
|
+
on(document, "mousemove", move);
|
|
13850
|
+
on(document, "mouseup", up);
|
|
13929
13851
|
}
|
|
13930
13852
|
|
|
13931
13853
|
// Used when mouse-selecting to adjust the anchor to the proper side
|
|
@@ -14055,7 +13977,6 @@ module.exports =
|
|
|
14055
13977
|
clearCaches(cm);
|
|
14056
13978
|
regChange(cm);
|
|
14057
13979
|
}, true);
|
|
14058
|
-
|
|
14059
13980
|
option("lineSeparator", null, function (cm, val) {
|
|
14060
13981
|
cm.doc.lineSep = val;
|
|
14061
13982
|
if (!val) { return }
|
|
@@ -14462,7 +14383,7 @@ module.exports =
|
|
|
14462
14383
|
|
|
14463
14384
|
var paste = cm.state.pasteIncoming || origin == "paste";
|
|
14464
14385
|
var textLines = splitLinesAuto(inserted), multiPaste = null;
|
|
14465
|
-
// When
|
|
14386
|
+
// When pasing N lines into N selections, insert one line per selection
|
|
14466
14387
|
if (paste && sel.ranges.length > 1) {
|
|
14467
14388
|
if (lastCopied && lastCopied.text.join("\n") == inserted) {
|
|
14468
14389
|
if (sel.ranges.length % lastCopied.text.length == 0) {
|
|
@@ -15198,12 +15119,8 @@ module.exports =
|
|
|
15198
15119
|
this.showMultipleSelections(info);
|
|
15199
15120
|
};
|
|
15200
15121
|
|
|
15201
|
-
ContentEditableInput.prototype.getSelection = function () {
|
|
15202
|
-
return this.cm.display.wrapper.ownerDocument.getSelection()
|
|
15203
|
-
};
|
|
15204
|
-
|
|
15205
15122
|
ContentEditableInput.prototype.showPrimarySelection = function () {
|
|
15206
|
-
var sel =
|
|
15123
|
+
var sel = window.getSelection(), cm = this.cm, prim = cm.doc.sel.primary();
|
|
15207
15124
|
var from = prim.from(), to = prim.to();
|
|
15208
15125
|
|
|
15209
15126
|
if (cm.display.viewTo == cm.display.viewFrom || from.line >= cm.display.viewTo || to.line < cm.display.viewFrom) {
|
|
@@ -15270,13 +15187,13 @@ module.exports =
|
|
|
15270
15187
|
};
|
|
15271
15188
|
|
|
15272
15189
|
ContentEditableInput.prototype.rememberSelection = function () {
|
|
15273
|
-
var sel =
|
|
15190
|
+
var sel = window.getSelection();
|
|
15274
15191
|
this.lastAnchorNode = sel.anchorNode; this.lastAnchorOffset = sel.anchorOffset;
|
|
15275
15192
|
this.lastFocusNode = sel.focusNode; this.lastFocusOffset = sel.focusOffset;
|
|
15276
15193
|
};
|
|
15277
15194
|
|
|
15278
15195
|
ContentEditableInput.prototype.selectionInEditor = function () {
|
|
15279
|
-
var sel =
|
|
15196
|
+
var sel = window.getSelection();
|
|
15280
15197
|
if (!sel.rangeCount) { return false }
|
|
15281
15198
|
var node = sel.getRangeAt(0).commonAncestorContainer;
|
|
15282
15199
|
return contains(this.div, node)
|
|
@@ -15311,14 +15228,14 @@ module.exports =
|
|
|
15311
15228
|
};
|
|
15312
15229
|
|
|
15313
15230
|
ContentEditableInput.prototype.selectionChanged = function () {
|
|
15314
|
-
var sel =
|
|
15231
|
+
var sel = window.getSelection();
|
|
15315
15232
|
return sel.anchorNode != this.lastAnchorNode || sel.anchorOffset != this.lastAnchorOffset ||
|
|
15316
15233
|
sel.focusNode != this.lastFocusNode || sel.focusOffset != this.lastFocusOffset
|
|
15317
15234
|
};
|
|
15318
15235
|
|
|
15319
15236
|
ContentEditableInput.prototype.pollSelection = function () {
|
|
15320
15237
|
if (this.readDOMTimeout != null || this.gracePeriod || !this.selectionChanged()) { return }
|
|
15321
|
-
var sel =
|
|
15238
|
+
var sel = window.getSelection(), cm = this.cm;
|
|
15322
15239
|
// On Android Chrome (version 56, at least), backspacing into an
|
|
15323
15240
|
// uneditable block element will put the cursor in that element,
|
|
15324
15241
|
// and then, because it's not editable, hide the virtual keyboard.
|
|
@@ -15452,7 +15369,7 @@ module.exports =
|
|
|
15452
15369
|
};
|
|
15453
15370
|
|
|
15454
15371
|
ContentEditableInput.prototype.onKeyPress = function (e) {
|
|
15455
|
-
if (e.charCode == 0
|
|
15372
|
+
if (e.charCode == 0) { return }
|
|
15456
15373
|
e.preventDefault();
|
|
15457
15374
|
if (!this.cm.isReadOnly())
|
|
15458
15375
|
{ operation(this.cm, applyTextInput)(this.cm, String.fromCharCode(e.charCode == null ? e.keyCode : e.charCode), 0); }
|
|
@@ -15492,13 +15409,12 @@ module.exports =
|
|
|
15492
15409
|
function badPos(pos, bad) { if (bad) { pos.bad = true; } return pos }
|
|
15493
15410
|
|
|
15494
15411
|
function domTextBetween(cm, from, to, fromLine, toLine) {
|
|
15495
|
-
var text = "", closing = false, lineSep = cm.doc.lineSeparator()
|
|
15412
|
+
var text = "", closing = false, lineSep = cm.doc.lineSeparator();
|
|
15496
15413
|
function recognizeMarker(id) { return function (marker) { return marker.id == id; } }
|
|
15497
15414
|
function close() {
|
|
15498
15415
|
if (closing) {
|
|
15499
15416
|
text += lineSep;
|
|
15500
|
-
|
|
15501
|
-
closing = extraLinebreak = false;
|
|
15417
|
+
closing = false;
|
|
15502
15418
|
}
|
|
15503
15419
|
}
|
|
15504
15420
|
function addText(str) {
|
|
@@ -15510,8 +15426,8 @@ module.exports =
|
|
|
15510
15426
|
function walk(node) {
|
|
15511
15427
|
if (node.nodeType == 1) {
|
|
15512
15428
|
var cmText = node.getAttribute("cm-text");
|
|
15513
|
-
if (cmText) {
|
|
15514
|
-
addText(cmText);
|
|
15429
|
+
if (cmText != null) {
|
|
15430
|
+
addText(cmText || node.textContent.replace(/\u200b/g, ""));
|
|
15515
15431
|
return
|
|
15516
15432
|
}
|
|
15517
15433
|
var markerID = node.getAttribute("cm-marker"), range$$1;
|
|
@@ -15522,24 +15438,19 @@ module.exports =
|
|
|
15522
15438
|
return
|
|
15523
15439
|
}
|
|
15524
15440
|
if (node.getAttribute("contenteditable") == "false") { return }
|
|
15525
|
-
var isBlock = /^(pre|div|p
|
|
15526
|
-
if (!/^br$/i.test(node.nodeName) && node.textContent.length == 0) { return }
|
|
15527
|
-
|
|
15441
|
+
var isBlock = /^(pre|div|p)$/i.test(node.nodeName);
|
|
15528
15442
|
if (isBlock) { close(); }
|
|
15529
15443
|
for (var i = 0; i < node.childNodes.length; i++)
|
|
15530
15444
|
{ walk(node.childNodes[i]); }
|
|
15531
|
-
|
|
15532
|
-
if (/^(pre|p)$/i.test(node.nodeName)) { extraLinebreak = true; }
|
|
15533
15445
|
if (isBlock) { closing = true; }
|
|
15534
15446
|
} else if (node.nodeType == 3) {
|
|
15535
|
-
addText(node.nodeValue
|
|
15447
|
+
addText(node.nodeValue);
|
|
15536
15448
|
}
|
|
15537
15449
|
}
|
|
15538
15450
|
for (;;) {
|
|
15539
15451
|
walk(from);
|
|
15540
15452
|
if (from == to) { break }
|
|
15541
15453
|
from = from.nextSibling;
|
|
15542
|
-
extraLinebreak = false;
|
|
15543
15454
|
}
|
|
15544
15455
|
return text
|
|
15545
15456
|
}
|
|
@@ -15640,10 +15551,13 @@ module.exports =
|
|
|
15640
15551
|
var this$1 = this;
|
|
15641
15552
|
|
|
15642
15553
|
var input = this, cm = this.cm;
|
|
15643
|
-
this.createField(display);
|
|
15644
|
-
var te = this.textarea;
|
|
15645
15554
|
|
|
15646
|
-
|
|
15555
|
+
// Wraps and hides input textarea
|
|
15556
|
+
var div = this.wrapper = hiddenTextarea();
|
|
15557
|
+
// The semihidden textarea that is focused when the editor is
|
|
15558
|
+
// focused, and receives input.
|
|
15559
|
+
var te = this.textarea = div.firstChild;
|
|
15560
|
+
display.wrapper.insertBefore(div, display.wrapper.firstChild);
|
|
15647
15561
|
|
|
15648
15562
|
// Needed to hide big blue blinking cursor on Mobile Safari (doesn't seem to work in iOS 8 anymore)
|
|
15649
15563
|
if (ios) { te.style.width = "0px"; }
|
|
@@ -15710,14 +15624,6 @@ module.exports =
|
|
|
15710
15624
|
});
|
|
15711
15625
|
};
|
|
15712
15626
|
|
|
15713
|
-
TextareaInput.prototype.createField = function (_display) {
|
|
15714
|
-
// Wraps and hides input textarea
|
|
15715
|
-
this.wrapper = hiddenTextarea();
|
|
15716
|
-
// The semihidden textarea that is focused when the editor is
|
|
15717
|
-
// focused, and receives input.
|
|
15718
|
-
this.textarea = this.wrapper.firstChild;
|
|
15719
|
-
};
|
|
15720
|
-
|
|
15721
15627
|
TextareaInput.prototype.prepareSelection = function () {
|
|
15722
15628
|
// Redraw the selection and/or cursor
|
|
15723
15629
|
var cm = this.cm, display = cm.display, doc = cm.doc;
|
|
@@ -16111,7 +16017,7 @@ module.exports =
|
|
|
16111
16017
|
|
|
16112
16018
|
addLegacyProps(CodeMirror$1);
|
|
16113
16019
|
|
|
16114
|
-
CodeMirror$1.version = "5.
|
|
16020
|
+
CodeMirror$1.version = "5.31.0";
|
|
16115
16021
|
|
|
16116
16022
|
return CodeMirror$1;
|
|
16117
16023
|
|
|
@@ -16119,30 +16025,12 @@ module.exports =
|
|
|
16119
16025
|
|
|
16120
16026
|
|
|
16121
16027
|
/***/ },
|
|
16122
|
-
/*
|
|
16123
|
-
/* 80 */,
|
|
16124
|
-
/* 81 */,
|
|
16125
|
-
/* 82 */,
|
|
16126
|
-
/* 83 */,
|
|
16127
|
-
/* 84 */,
|
|
16128
|
-
/* 85 */,
|
|
16129
|
-
/* 86 */,
|
|
16130
|
-
/* 87 */,
|
|
16131
|
-
/* 88 */,
|
|
16132
|
-
/* 89 */,
|
|
16133
|
-
/* 90 */,
|
|
16134
|
-
/* 91 */,
|
|
16135
|
-
/* 92 */,
|
|
16136
|
-
/* 93 */,
|
|
16137
|
-
/* 94 */,
|
|
16138
|
-
/* 95 */,
|
|
16139
|
-
/* 96 */,
|
|
16140
|
-
/* 97 */
|
|
16028
|
+
/* 70 */
|
|
16141
16029
|
/***/ function(module, exports) {
|
|
16142
16030
|
|
|
16143
16031
|
exports.read = function (buffer, offset, isLE, mLen, nBytes) {
|
|
16144
16032
|
var e, m
|
|
16145
|
-
var eLen =
|
|
16033
|
+
var eLen = nBytes * 8 - mLen - 1
|
|
16146
16034
|
var eMax = (1 << eLen) - 1
|
|
16147
16035
|
var eBias = eMax >> 1
|
|
16148
16036
|
var nBits = -7
|
|
@@ -16155,12 +16043,12 @@ module.exports =
|
|
|
16155
16043
|
e = s & ((1 << (-nBits)) - 1)
|
|
16156
16044
|
s >>= (-nBits)
|
|
16157
16045
|
nBits += eLen
|
|
16158
|
-
for (; nBits > 0; e =
|
|
16046
|
+
for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}
|
|
16159
16047
|
|
|
16160
16048
|
m = e & ((1 << (-nBits)) - 1)
|
|
16161
16049
|
e >>= (-nBits)
|
|
16162
16050
|
nBits += mLen
|
|
16163
|
-
for (; nBits > 0; m =
|
|
16051
|
+
for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}
|
|
16164
16052
|
|
|
16165
16053
|
if (e === 0) {
|
|
16166
16054
|
e = 1 - eBias
|
|
@@ -16175,7 +16063,7 @@ module.exports =
|
|
|
16175
16063
|
|
|
16176
16064
|
exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
|
|
16177
16065
|
var e, m, c
|
|
16178
|
-
var eLen =
|
|
16066
|
+
var eLen = nBytes * 8 - mLen - 1
|
|
16179
16067
|
var eMax = (1 << eLen) - 1
|
|
16180
16068
|
var eBias = eMax >> 1
|
|
16181
16069
|
var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)
|
|
@@ -16208,7 +16096,7 @@ module.exports =
|
|
|
16208
16096
|
m = 0
|
|
16209
16097
|
e = eMax
|
|
16210
16098
|
} else if (e + eBias >= 1) {
|
|
16211
|
-
m = (
|
|
16099
|
+
m = (value * c - 1) * Math.pow(2, mLen)
|
|
16212
16100
|
e = e + eBias
|
|
16213
16101
|
} else {
|
|
16214
16102
|
m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)
|
|
@@ -16227,7 +16115,7 @@ module.exports =
|
|
|
16227
16115
|
|
|
16228
16116
|
|
|
16229
16117
|
/***/ },
|
|
16230
|
-
/*
|
|
16118
|
+
/* 71 */
|
|
16231
16119
|
/***/ function(module, exports) {
|
|
16232
16120
|
|
|
16233
16121
|
var toString = {}.toString;
|
|
@@ -16238,7 +16126,7 @@ module.exports =
|
|
|
16238
16126
|
|
|
16239
16127
|
|
|
16240
16128
|
/***/ },
|
|
16241
|
-
/*
|
|
16129
|
+
/* 72 */
|
|
16242
16130
|
/***/ function(module, exports) {
|
|
16243
16131
|
|
|
16244
16132
|
// shim for using process in browser
|
|
@@ -16411,10 +16299,6 @@ module.exports =
|
|
|
16411
16299
|
process.removeListener = noop;
|
|
16412
16300
|
process.removeAllListeners = noop;
|
|
16413
16301
|
process.emit = noop;
|
|
16414
|
-
process.prependListener = noop;
|
|
16415
|
-
process.prependOnceListener = noop;
|
|
16416
|
-
|
|
16417
|
-
process.listeners = function (name) { return [] }
|
|
16418
16302
|
|
|
16419
16303
|
process.binding = function (name) {
|
|
16420
16304
|
throw new Error('process.binding is not supported');
|
|
@@ -16428,9 +16312,7 @@ module.exports =
|
|
|
16428
16312
|
|
|
16429
16313
|
|
|
16430
16314
|
/***/ },
|
|
16431
|
-
/*
|
|
16432
|
-
/* 101 */,
|
|
16433
|
-
/* 102 */
|
|
16315
|
+
/* 73 */
|
|
16434
16316
|
/***/ function(module, exports) {
|
|
16435
16317
|
|
|
16436
16318
|
/* WEBPACK VAR INJECTION */(function(__webpack_amd_options__) {module.exports = __webpack_amd_options__;
|
|
@@ -16438,7 +16320,7 @@ module.exports =
|
|
|
16438
16320
|
/* WEBPACK VAR INJECTION */}.call(exports, {}))
|
|
16439
16321
|
|
|
16440
16322
|
/***/ },
|
|
16441
|
-
/*
|
|
16323
|
+
/* 74 */
|
|
16442
16324
|
/***/ function(module, exports, __webpack_require__) {
|
|
16443
16325
|
|
|
16444
16326
|
var require;var require;var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* WEBPACK VAR INJECTION */(function(Buffer, global) {/*
|
|
@@ -16457,7 +16339,7 @@ module.exports =
|
|
|
16457
16339
|
*/
|
|
16458
16340
|
(function(e){
|
|
16459
16341
|
if("object"==typeof exports&&"undefined"!=typeof module&&"undefined"==typeof DO_NOT_EXPORT_JSZIP)module.exports=e();
|
|
16460
|
-
else if("function"=="function"&&__webpack_require__(
|
|
16342
|
+
else if("function"=="function"&&__webpack_require__(73)&&"undefined"==typeof DO_NOT_EXPORT_JSZIP){JSZipSync=e();!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (e), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));}
|
|
16461
16343
|
else{
|
|
16462
16344
|
var f;
|
|
16463
16345
|
"undefined"!=typeof window?f=window:
|
|
@@ -25441,10 +25323,10 @@ module.exports =
|
|
|
25441
25323
|
(9)
|
|
25442
25324
|
}));
|
|
25443
25325
|
|
|
25444
|
-
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(
|
|
25326
|
+
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(17).Buffer, (function() { return this; }())))
|
|
25445
25327
|
|
|
25446
25328
|
/***/ },
|
|
25447
|
-
/*
|
|
25329
|
+
/* 75 */
|
|
25448
25330
|
/***/ function(module, exports, __webpack_require__) {
|
|
25449
25331
|
|
|
25450
25332
|
/* WEBPACK VAR INJECTION */(function(global, Buffer, process) {/*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */
|
|
@@ -25453,13 +25335,13 @@ module.exports =
|
|
|
25453
25335
|
/*global global, exports, module, require:false, process:false, Buffer:false, ArrayBuffer:false */
|
|
25454
25336
|
var XLSX = {};
|
|
25455
25337
|
function make_xlsx_lib(XLSX){
|
|
25456
|
-
XLSX.version = '0.13.
|
|
25338
|
+
XLSX.version = '0.13.4';
|
|
25457
25339
|
var current_codepage = 1200, current_ansi = 1252;
|
|
25458
25340
|
/*global cptable:true, window */
|
|
25459
25341
|
if(true) {
|
|
25460
25342
|
if(typeof cptable === 'undefined') {
|
|
25461
|
-
if(typeof global !== 'undefined') global.cptable = __webpack_require__(
|
|
25462
|
-
else if(typeof window !== 'undefined') window.cptable = __webpack_require__(
|
|
25343
|
+
if(typeof global !== 'undefined') global.cptable = __webpack_require__(30);
|
|
25344
|
+
else if(typeof window !== 'undefined') window.cptable = __webpack_require__(30);
|
|
25463
25345
|
}
|
|
25464
25346
|
}
|
|
25465
25347
|
|
|
@@ -26608,7 +26490,7 @@ module.exports =
|
|
|
26608
26490
|
return (c === -1) ? p : p.slice(c+1);
|
|
26609
26491
|
}
|
|
26610
26492
|
var fs;
|
|
26611
|
-
function get_fs() { return fs || (fs = __webpack_require__(
|
|
26493
|
+
function get_fs() { return fs || (fs = __webpack_require__(32)); }
|
|
26612
26494
|
function parse(file, options) {
|
|
26613
26495
|
if(file.length < 512) throw new Error("CFB file size " + file.length + " < 512");
|
|
26614
26496
|
var mver = 3;
|
|
@@ -27296,7 +27178,7 @@ module.exports =
|
|
|
27296
27178
|
|
|
27297
27179
|
if("function" !== 'undefined' && typeof module !== 'undefined' && typeof DO_NOT_EXPORT_CFB === 'undefined') { module.exports = CFB; }
|
|
27298
27180
|
var _fs;
|
|
27299
|
-
if(true) try { _fs = __webpack_require__(
|
|
27181
|
+
if(true) try { _fs = __webpack_require__(32); } catch(e) {}
|
|
27300
27182
|
|
|
27301
27183
|
/* normalize data for blob ctor */
|
|
27302
27184
|
function blobify(data) {
|
|
@@ -27557,7 +27439,7 @@ module.exports =
|
|
|
27557
27439
|
if(typeof JSZipSync !== 'undefined') jszip = JSZipSync;
|
|
27558
27440
|
if(true) {
|
|
27559
27441
|
if(typeof module !== 'undefined' && module.exports) {
|
|
27560
|
-
if(typeof jszip === 'undefined') jszip = __webpack_require__(
|
|
27442
|
+
if(typeof jszip === 'undefined') jszip = __webpack_require__(74);
|
|
27561
27443
|
}
|
|
27562
27444
|
}
|
|
27563
27445
|
|
|
@@ -27640,7 +27522,7 @@ module.exports =
|
|
|
27640
27522
|
var htmlcharegex = /[\u0000-\u001f]/g;
|
|
27641
27523
|
function escapehtml(text){
|
|
27642
27524
|
var s = text + '';
|
|
27643
|
-
return s.replace(decregex, function(y) { return rencoding[y]; }).replace(
|
|
27525
|
+
return s.replace(decregex, function(y) { return rencoding[y]; }).replace(htmlcharegex,function(s) { return "&#x" + ("000"+s.charCodeAt(0).toString(16)).slice(-4) + ";"; });
|
|
27644
27526
|
}
|
|
27645
27527
|
|
|
27646
27528
|
function escapexlml(text){
|
|
@@ -28178,7 +28060,7 @@ module.exports =
|
|
|
28178
28060
|
var crypto;
|
|
28179
28061
|
if(typeof _crypto !== 'undefined') crypto = _crypto;
|
|
28180
28062
|
else if(true) {
|
|
28181
|
-
try { crypto = __webpack_require__(
|
|
28063
|
+
try { crypto = __webpack_require__(77); }
|
|
28182
28064
|
catch(e) { crypto = null; }
|
|
28183
28065
|
}
|
|
28184
28066
|
|
|
@@ -39318,13 +39200,13 @@ module.exports =
|
|
|
39318
39200
|
/* 18.2.5 definedName CT_DefinedName + */
|
|
39319
39201
|
case '<definedName': {
|
|
39320
39202
|
dname = {};
|
|
39321
|
-
dname.Name =
|
|
39203
|
+
dname.Name = y.name;
|
|
39322
39204
|
if(y.comment) dname.Comment = y.comment;
|
|
39323
39205
|
if(y.localSheetId) dname.Sheet = +y.localSheetId;
|
|
39324
39206
|
dnstart = idx + x.length;
|
|
39325
39207
|
} break;
|
|
39326
39208
|
case '</definedName>': {
|
|
39327
|
-
dname.Ref =
|
|
39209
|
+
dname.Ref = data.slice(dnstart, idx);
|
|
39328
39210
|
wb.Names.push(dname);
|
|
39329
39211
|
} break;
|
|
39330
39212
|
case '<definedName/>': break;
|
|
@@ -40725,7 +40607,7 @@ module.exports =
|
|
|
40725
40607
|
if(!((wb||{}).Workbook||{}).Names) return "";
|
|
40726
40608
|
var names = wb.Workbook.Names;
|
|
40727
40609
|
var out = [];
|
|
40728
|
-
for(var i = 0; i < names.length; ++i) {
|
|
40610
|
+
outer: for(var i = 0; i < names.length; ++i) {
|
|
40729
40611
|
var n = names[i];
|
|
40730
40612
|
if(n.Sheet != idx) continue;
|
|
40731
40613
|
/*switch(n.Name) {
|
|
@@ -43593,6 +43475,7 @@ module.exports =
|
|
|
43593
43475
|
function make_html_row(ws, r, R, o) {
|
|
43594
43476
|
var M = (ws['!merges'] ||[]);
|
|
43595
43477
|
var oo = [];
|
|
43478
|
+
var nullcell = "<td>" + (o.editable ? '<span contenteditable="true"></span>' : "" ) + "</td>";
|
|
43596
43479
|
for(var C = r.s.c; C <= r.e.c; ++C) {
|
|
43597
43480
|
var RS = 0, CS = 0;
|
|
43598
43481
|
for(var j = 0; j < M.length; ++j) {
|
|
@@ -43604,12 +43487,13 @@ module.exports =
|
|
|
43604
43487
|
if(RS < 0) continue;
|
|
43605
43488
|
var coord = encode_cell({r:R,c:C});
|
|
43606
43489
|
var cell = o.dense ? (ws[R]||[])[C] : ws[coord];
|
|
43490
|
+
if(!cell || cell.v == null) { oo.push(nullcell); continue; }
|
|
43491
|
+
/* TODO: html entities */
|
|
43492
|
+
var w = cell.h || escapexml(cell.w || (format_cell(cell), cell.w) || "");
|
|
43607
43493
|
var sp = {};
|
|
43608
43494
|
if(RS > 1) sp.rowspan = RS;
|
|
43609
43495
|
if(CS > 1) sp.colspan = CS;
|
|
43610
|
-
|
|
43611
|
-
var w = (cell && cell.v != null) && (cell.h || escapehtml(cell.w || (format_cell(cell), cell.w) || "")) || "";
|
|
43612
|
-
sp.t = cell && cell.t || 'z';
|
|
43496
|
+
sp.t = cell.t;
|
|
43613
43497
|
if(o.editable) w = '<span contenteditable="true">' + w + '</span>';
|
|
43614
43498
|
sp.id = "sjs-" + coord;
|
|
43615
43499
|
oo.push(writextag('td', w, sp));
|
|
@@ -43795,7 +43679,7 @@ module.exports =
|
|
|
43795
43679
|
}
|
|
43796
43680
|
if(merges.length) ws['!merges'] = merges;
|
|
43797
43681
|
if(rowinfo.length) ws["!rows"] = rowinfo;
|
|
43798
|
-
sheetag.name = sheetag['名称'] || sheetag.name;
|
|
43682
|
+
sheetag.name = utf8read(sheetag['名称'] || sheetag.name);
|
|
43799
43683
|
if(typeof JSON !== 'undefined') JSON.stringify(sheetag);
|
|
43800
43684
|
SheetNames.push(sheetag.name);
|
|
43801
43685
|
Sheets[sheetag.name] = ws;
|
|
@@ -45549,7 +45433,7 @@ module.exports =
|
|
|
45549
45433
|
})(utils);
|
|
45550
45434
|
|
|
45551
45435
|
if(has_buf && "function" != 'undefined') (function() {
|
|
45552
|
-
var Readable = __webpack_require__(
|
|
45436
|
+
var Readable = __webpack_require__(78).Readable;
|
|
45553
45437
|
|
|
45554
45438
|
var write_csv_stream = function(sheet, opts) {
|
|
45555
45439
|
var stream = Readable();
|
|
@@ -45694,18 +45578,18 @@ module.exports =
|
|
|
45694
45578
|
/*exported XLS, ODS */
|
|
45695
45579
|
var XLS = XLSX, ODS = XLSX;
|
|
45696
45580
|
|
|
45697
|
-
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()), __webpack_require__(
|
|
45581
|
+
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()), __webpack_require__(17).Buffer, __webpack_require__(72)))
|
|
45698
45582
|
|
|
45699
45583
|
/***/ },
|
|
45700
|
-
/*
|
|
45584
|
+
/* 76 */
|
|
45701
45585
|
/***/ function(module, exports) {
|
|
45702
45586
|
|
|
45703
45587
|
module.exports = require("papaparse");
|
|
45704
45588
|
|
|
45705
45589
|
/***/ },
|
|
45706
|
-
/*
|
|
45707
|
-
|
|
45708
|
-
/*
|
|
45709
|
-
|
|
45590
|
+
/* 77 */
|
|
45591
|
+
32,
|
|
45592
|
+
/* 78 */
|
|
45593
|
+
32
|
|
45710
45594
|
/******/ ])));
|
|
45711
45595
|
//# sourceMappingURL=credentialSections.js.map
|