iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
987 lines (985 loc) • 137 kB
JavaScript
!(function (e) {
if ('object' == typeof exports && 'undefined' != typeof module) {
module.exports = e();
} else if ('function' == typeof define && define.amd) {
define([], e);
} else {
('undefined' != typeof window
? window
: 'undefined' != typeof global
? global
: 'undefined' != typeof self
? self
: this
).jsyaml = e();
}
})(function () {
return (function o(a, s, c) {
function u(t, e) {
if (!s[t]) {
if (!a[t]) {
var n = 'function' == typeof require && require;
if (!e && n) {
return n(t, !0);
}
if (l) {
return l(t, !0);
}
var i = new Error(`Cannot find module '${t}'`);
throw ((i.code = 'MODULE_NOT_FOUND'), i);
}
var r = (s[t] = { exports: {} });
a[t][0].call(
r.exports,
function (e) {
return u(a[t][1][e] || e);
},
r,
r.exports,
o,
a,
s,
c,
);
}
return s[t].exports;
}
for (var l = 'function' == typeof require && require, e = 0; e < c.length; e++) {
u(c[e]);
}
return u;
})(
{
1: [
function (e, t, n) {
'use strict';
var i = e('./js-yaml/loader'),
r = e('./js-yaml/dumper');
function o(e) {
return function () {
throw new Error(`Function ${e} is deprecated and cannot be used.`);
};
}
(t.exports.Type = e('./js-yaml/type')),
(t.exports.Schema = e('./js-yaml/schema')),
(t.exports.FAILSAFE_SCHEMA = e('./js-yaml/schema/failsafe')),
(t.exports.JSON_SCHEMA = e('./js-yaml/schema/json')),
(t.exports.CORE_SCHEMA = e('./js-yaml/schema/core')),
(t.exports.DEFAULT_SAFE_SCHEMA = e('./js-yaml/schema/default_safe')),
(t.exports.DEFAULT_FULL_SCHEMA = e('./js-yaml/schema/default_full')),
(t.exports.load = i.load),
(t.exports.loadAll = i.loadAll),
(t.exports.safeLoad = i.safeLoad),
(t.exports.safeLoadAll = i.safeLoadAll),
(t.exports.dump = r.dump),
(t.exports.safeDump = r.safeDump),
(t.exports.YAMLException = e('./js-yaml/exception')),
(t.exports.MINIMAL_SCHEMA = e('./js-yaml/schema/failsafe')),
(t.exports.SAFE_SCHEMA = e('./js-yaml/schema/default_safe')),
(t.exports.DEFAULT_SCHEMA = e('./js-yaml/schema/default_full')),
(t.exports.scan = o('scan')),
(t.exports.parse = o('parse')),
(t.exports.compose = o('compose')),
(t.exports.addConstructor = o('addConstructor'));
},
{
'./js-yaml/dumper': 3,
'./js-yaml/exception': 4,
'./js-yaml/loader': 5,
'./js-yaml/schema': 7,
'./js-yaml/schema/core': 8,
'./js-yaml/schema/default_full': 9,
'./js-yaml/schema/default_safe': 10,
'./js-yaml/schema/failsafe': 11,
'./js-yaml/schema/json': 12,
'./js-yaml/type': 13,
},
],
2: [
function (e, t, n) {
'use strict';
function i(e) {
return null == e;
}
(t.exports.isNothing = i),
(t.exports.isObject = function (e) {
return 'object' == typeof e && null !== e;
}),
(t.exports.toArray = function (e) {
return Array.isArray(e) ? e : i(e) ? [] : [e];
}),
(t.exports.repeat = function (e, t) {
var n,
i = '';
for (n = 0; n < t; n += 1) {
i += e;
}
return i;
}),
(t.exports.isNegativeZero = function (e) {
return 0 === e && Number.NEGATIVE_INFINITY === 1 / e;
}),
(t.exports.extend = function (e, t) {
var n, i, r, o;
if (t) {
for (n = 0, i = (o = Object.keys(t)).length; n < i; n += 1) {e[(r = o[n])] = t[r];}}
return e;
});
},
{},
],
3: [
function (e, t, n) {
'use strict';
var c = e('./common'),
d = e('./exception'),
i = e('./schema/default_full'),
r = e('./schema/default_safe'),
p = Object.prototype.toString,
u = Object.prototype.hasOwnProperty,
o = 9,
h = 10,
a = 32,
f = 33,
m = 34,
g = 35,
y = 37,
x = 38,
v = 39,
A = 42,
b = 44,
w = 45,
C = 58,
k = 62,
j = 63,
S = 64,
I = 91,
O = 93,
E = 96,
F = 123,
_ = 124,
N = 125,
s = {
0: '\\0',
7: '\\a',
8: '\\b',
9: '\\t',
10: '\\n',
11: '\\v',
12: '\\f',
13: '\\r',
27: '\\e',
34: '\\"',
92: '\\\\',
133: '\\N',
160: '\\_',
8232: '\\L',
8233: '\\P',
},
l = [
'y',
'Y',
'yes',
'Yes',
'YES',
'on',
'On',
'ON',
'n',
'N',
'no',
'No',
'NO',
'off',
'Off',
'OFF',
];
function M(e) {
var t, n, i;
if (((t = e.toString(16).toUpperCase()), e <= 255)) {
(n = 'x'), (i = 2);
} else if (e <= 65535) {
(n = 'u'), (i = 4);
} else {
if (!(e <= 4294967295)) {
throw new d('code point within a string may not be greater than 0xFFFFFFFF');
}
(n = 'U'), (i = 8);
}
return `\\${n}${c.repeat('0', i - t.length)}${t}`;
}
function T(e) {
(this.schema = e.schema || i),
(this.indent = Math.max(1, e.indent || 2)),
(this.noArrayIndent = e.noArrayIndent || !1),
(this.skipInvalid = e.skipInvalid || !1),
(this.flowLevel = c.isNothing(e.flowLevel) ? -1 : e.flowLevel),
(this.styleMap = (function (e, t) {
var n, i, r, o, a, s, c;
if (null === t) {
return {};
}
for (n = {}, r = 0, o = (i = Object.keys(t)).length; r < o; r += 1) {
(a = i[r]),
(s = String(t[a])),
'!!' === a.slice(0, 2) && (a = `tag:yaml.org,2002:${ a.slice(2)}`),
(c = e.compiledTypeMap.fallback[a]) &&
u.call(c.styleAliases, s) &&
(s = c.styleAliases[s]),
(n[a] = s);
}
return n;
})(this.schema, e.styles || null)),
(this.sortKeys = e.sortKeys || !1),
(this.lineWidth = e.lineWidth || 80),
(this.noRefs = e.noRefs || !1),
(this.noCompatMode = e.noCompatMode || !1),
(this.condenseFlow = e.condenseFlow || !1),
(this.implicitTypes = this.schema.compiledImplicit),
(this.explicitTypes = this.schema.compiledExplicit),
(this.tag = null),
(this.result = ''),
(this.duplicates = []),
(this.usedDuplicates = null);
}
function L(e, t) {
for (var n, i = c.repeat(' ', t), r = 0, o = -1, a = '', s = e.length; r < s; ) {
(r =
-1 === (o = e.indexOf('\n', r))
? ((n = e.slice(r)), s)
: ((n = e.slice(r, o + 1)), o + 1)),
n.length && '\n' !== n && (a += i),
(a += n);
}
return a;
}
function D(e, t) {
return `\n${c.repeat(' ', e.indent * t)}`;
}
function U(e) {
return e === a || e === o;
}
function q(e) {
return (
(32 <= e && e <= 126) ||
(161 <= e && e <= 55295 && 8232 !== e && 8233 !== e) ||
(57344 <= e && e <= 65533 && 65279 !== e) ||
(65536 <= e && e <= 1114111)
);
}
function Y(e) {
return (
q(e) &&
65279 !== e &&
e !== b &&
e !== I &&
e !== O &&
e !== F &&
e !== N &&
e !== C &&
e !== g
);
}
function R(e) {
return /^\n* /.test(e);
}
var B = 1,
P = 2,
W = 3,
K = 4,
$ = 5;
function H(e, t, n, i, r) {
var o,
a,
s = !1,
c = !1,
u = -1 !== i,
l = -1,
p =
(function (e) {
return (
q(e) &&
65279 !== e &&
!U(e) &&
e !== w &&
e !== j &&
e !== C &&
e !== b &&
e !== I &&
e !== O &&
e !== F &&
e !== N &&
e !== g &&
e !== x &&
e !== A &&
e !== f &&
e !== _ &&
e !== k &&
e !== v &&
e !== m &&
e !== y &&
e !== S &&
e !== E
);
})(e.charCodeAt(0)) && !U(e.charCodeAt(e.length - 1));
if (t) {
for (o = 0; o < e.length; o++) {
if (!q((a = e.charCodeAt(o)))) {return $;}
p = p && Y(a);
} else {
for (o = 0; o < e.length; o++) {
if ((a = e.charCodeAt(o)) === h) {
(s = !0), u && ((c = c || (i < o - l - 1 && ' ' !== e[l + 1])), (l = o));
} else if (!q(a)) {
return $;
}
p = p && Y(a);
}
c = c || (u && i < o - l - 1 && ' ' !== e[l + 1]);
}
return s || c ? (9 < n && R(e) ? $ : c ? K : W) : p && !r(e) ? B : P;
}
function G(i, r, o, a) {
i.dump = (function () {
if (0 === r.length) {
return "''";
}
if (!i.noCompatMode && -1 !== l.indexOf(r)) {
return `'${ r }'`;
}
var e = i.indent * Math.max(1, o),
t = -1 === i.lineWidth ? -1 : Math.max(Math.min(i.lineWidth, 40), i.lineWidth - e),
n = a || (-1 < i.flowLevel && o >= i.flowLevel);
switch (
H(r, n, i.indent, t, function (e) {
return (function (e, t) {
var n, i;
for (n = 0, i = e.implicitTypes.length; n < i; n += 1) {
if (e.implicitTypes[n].resolve(t)) return !0;
}
return !1;
})(i, e);
})
) {
case B:
return r;
case P:
return `'${r.replace(/'/g, "''")}'`;
case W:
return `|${V(r, i.indent)}${Z(L(r, e))}`;
case K:
return `>${V(r, i.indent)}${Z(
L(
(function (t, n) {
var e,
i,
r = /(\n+)([^\n]*)/g,
o = (function () {
var e = t.indexOf('\n');
return (
(e = -1 !== e ? e : t.length),
(r.lastIndex = e),
z(t.slice(0, e), n)
);
})(),
a = '\n' === t[0] || ' ' === t[0];
for (; (i = r.exec(t)); ) {
var s = i[1],
c = i[2];
(e = ' ' === c[0]),
(o += s + (a || e || '' === c ? '' : '\n') + z(c, n)),
(a = e);
}
return o;
})(r, t),
e,
),
)}`;
case $:
return `"${(function (e) {
for (var t, n, i, r = '', o = 0; o < e.length; o++)
{55296 <= (t = e.charCodeAt(o)) &&
t <= 56319 &&
56320 <= (n = e.charCodeAt(o + 1)) &&
n <= 57343
? ((r += M(1024 * (t - 55296) + n - 56320 + 65536)), o++)
: ((i = s[t]), (r += !i && q(t) ? e[o] : i || M(t)));}
return r;
})(r)}"`;
default:
throw new d('impossible error: invalid scalar style');
}
})();
}
function V(e, t) {
var n = R(e) ? String(t) : '',
i = '\n' === e[e.length - 1];
return `${n + (i && ('\n' === e[e.length - 2] || '\n' === e) ? '+' : i ? '' : '-')}\n`;
}
function Z(e) {
return '\n' === e[e.length - 1] ? e.slice(0, -1) : e;
}
function z(e, t) {
if ('' === e || ' ' === e[0]) {
return e;
}
for (var n, i, r = / [^ ]/g, o = 0, a = 0, s = 0, c = ''; (n = r.exec(e)); ) {
t < (s = n.index) - o && ((i = o < a ? a : s), (c += `\n${ e.slice(o, i)}`), (o = i + 1)),
(a = s);
}
return (
(c += '\n'),
e.length - o > t && o < a
? (c += `${e.slice(o, a)}\n${e.slice(a + 1)}`)
: (c += e.slice(o)),
c.slice(1)
);
}
function J(e, t, n) {
var i, r, o, a, s, c;
for (o = 0, a = (r = n ? e.explicitTypes : e.implicitTypes).length; o < a; o += 1) {
if (
((s = r[o]).instanceOf || s.predicate) &&
(!s.instanceOf || ('object' == typeof t && t instanceof s.instanceOf)) &&
(!s.predicate || s.predicate(t))
) {
if (((e.tag = n ? s.tag : '?'), s.represent)) {
if (
((c = e.styleMap[s.tag] || s.defaultStyle),
'[object Function]' === p.call(s.represent))
)
{i = s.represent(t, c);}
else {
if (!u.call(s.represent, c))
{throw new d('!<' + s.tag + '> tag resolver accepts not "' + c + '" style');}
i = s.represent[c](t, c);
}
e.dump = i;
}
return !0;
}
}
return !1;
}
function Q(e, t, n, i, r, o) {
(e.tag = null), (e.dump = n), J(e, n, !1) || J(e, n, !0);
var a = p.call(e.dump);
i && (i = e.flowLevel < 0 || e.flowLevel > t);
var s,
c,
u = '[object Object]' === a || '[object Array]' === a;
if (
(u && (c = -1 !== (s = e.duplicates.indexOf(n))),
((null !== e.tag && '?' !== e.tag) || c || (2 !== e.indent && 0 < t)) && (r = !1),
c && e.usedDuplicates[s])
) {
e.dump = '*ref_' + s;
} else {
if (
(u && c && !e.usedDuplicates[s] && (e.usedDuplicates[s] = !0), '[object Object]' === a)
) {
i && 0 !== Object.keys(e.dump).length
? ((function (e, t, n, i) {
var r,
o,
a,
s,
c,
u,
l = '',
p = e.tag,
f = Object.keys(n);
if (!0 === e.sortKeys) {f.sort();}
else if ('function' == typeof e.sortKeys) {f.sort(e.sortKeys);}
else if (e.sortKeys) {throw new d('sortKeys must be a boolean or a function');}
for (r = 0, o = f.length; r < o; r += 1)
{(u = ''),
(i && 0 === r) || (u += D(e, t)),
(s = n[(a = f[r])]),
Q(e, t + 1, a, !0, !0, !0) &&
((c =
(null !== e.tag && '?' !== e.tag) ||
(e.dump && 1024 < e.dump.length)) &&
(e.dump && h === e.dump.charCodeAt(0)
? (u += '?')
: (u += '? ')),
(u += e.dump),
c && (u += D(e, t)),
Q(e, t + 1, s, !0, c) &&
(e.dump && h === e.dump.charCodeAt(0)
? (u += ':')
: (u += ': '),
(l += u += e.dump)));}
(e.tag = p), (e.dump = l || '{}');
})(e, t, e.dump, r),
c && (e.dump = `&ref_${ s }${e.dump}`))
: ((function (e, t, n) {
var i,
r,
o,
a,
s,
c = '',
u = e.tag,
l = Object.keys(n);
for (i = 0, r = l.length; i < r; i += 1)
{(s = e.condenseFlow ? '"' : ''),
0 !== i && (s += ', '),
(a = n[(o = l[i])]),
Q(e, t, o, !1, !1) &&
(1024 < e.dump.length && (s += '? '),
(s +=
e.dump +
(e.condenseFlow ? '"' : '') +
':' +
(e.condenseFlow ? '' : ' ')),
Q(e, t, a, !1, !1) && (c += s += e.dump));}
(e.tag = u), (e.dump = `{${ c }}`);
})(e, t, e.dump),
c && (e.dump = `&ref_${ s } ${ e.dump}`));
} else if ('[object Array]' === a) {
var l = e.noArrayIndent && 0 < t ? t - 1 : t;
i && 0 !== e.dump.length
? ((function (e, t, n, i) {
var r,
o,
a = '',
s = e.tag;
for (r = 0, o = n.length; r < o; r += 1) {
Q(e, t + 1, n[r], !0, !0) &&
((i && 0 === r) || (a += D(e, t)),
e.dump && h === e.dump.charCodeAt(0) ? (a += '-') : (a += '- '),
(a += e.dump));
}
(e.tag = s), (e.dump = a || '[]');
})(e, l, e.dump, r),
c && (e.dump = `&ref_${s}${e.dump}`))
: ((function (e, t, n) {
var i,
r,
o = '',
a = e.tag;
for (i = 0, r = n.length; i < r; i += 1) {
Q(e, t, n[i], !1, !1) &&
(0 !== i && (o += `,${ e.condenseFlow ? '' : ' '}`), (o += e.dump));
}
(e.tag = a), (e.dump = `[${o}]`);
})(e, l, e.dump),
c && (e.dump = `&ref_${s} ${e.dump}`));
} else {
if ('[object String]' !== a) {
if (e.skipInvalid) {
return !1;
}
throw new d(`unacceptable kind of an object to dump ${a}`);
}
'?' !== e.tag && G(e, e.dump, t, o);
}
null !== e.tag && '?' !== e.tag && (e.dump = `!<${e.tag}> ${e.dump}`);
}
return !0;
}
function X(e, t) {
var n,
i,
r = [],
o = [];
for (
(function e(t, n, i) {
var r, o, a;
if (null !== t && 'object' == typeof t) {
if (-1 !== (o = n.indexOf(t))) {-1 === i.indexOf(o) && i.push(o);}
else if ((n.push(t), Array.isArray(t)))
{for (o = 0, a = t.length; o < a; o += 1) e(t[o], n, i);}
else {for (r = Object.keys(t), o = 0, a = r.length; o < a; o += 1) e(t[r[o]], n, i);}}
})(e, r, o),
n = 0,
i = o.length;
n < i;
n += 1
) {
t.duplicates.push(r[o[n]]);
}
t.usedDuplicates = new Array(i);
}
function ee(e, t) {
var n = new T((t = t || {}));
return n.noRefs || X(e, n), Q(n, 0, e, !0, !0) ? `${n.dump}\n` : '';
}
(t.exports.dump = ee),
(t.exports.safeDump = function (e, t) {
return ee(e, c.extend({ schema: r }, t));
});
},
{ './common': 2, './exception': 4, './schema/default_full': 9, './schema/default_safe': 10 },
],
4: [
function (e, t, n) {
'use strict';
function i(e, t) {
Error.call(this),
(this.name = 'YAMLException'),
(this.reason = e),
(this.mark = t),
(this.message =
(this.reason || '(unknown reason)') + (this.mark ? ` ${this.mark.toString()}` : '')),
Error.captureStackTrace
? Error.captureStackTrace(this, this.constructor)
: (this.stack = new Error().stack || '');
}
(((i.prototype = Object.create(Error.prototype)).constructor = i).prototype.toString = function (
e,
) {
var t = `${this.name}: `;
return (
(t += this.reason || '(unknown reason)'),
!e && this.mark && (t += ` ${this.mark.toString()}`),
t
);
}),
(t.exports = i);
},
{},
],
5: [
function (e, t, n) {
'use strict';
var g = e('./common'),
i = e('./exception'),
r = e('./mark'),
o = e('./schema/default_safe'),
a = e('./schema/default_full'),
y = Object.prototype.hasOwnProperty,
x = 1,
v = 2,
A = 3,
b = 4,
w = 1,
C = 2,
k = 3,
c =
/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,
s = /[\x85\u2028\u2029]/,
u = /[,\[\]\{\}]/,
l = /^(?:!|!!|![a-z\-]+!)$/i,
p = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
function f(e) {
return Object.prototype.toString.call(e);
}
function j(e) {
return 10 === e || 13 === e;
}
function S(e) {
return 9 === e || 32 === e;
}
function I(e) {
return 9 === e || 32 === e || 10 === e || 13 === e;
}
function O(e) {
return 44 === e || 91 === e || 93 === e || 123 === e || 125 === e;
}
function d(e) {
return 48 === e
? '\0'
: 97 === e
? ''
: 98 === e
? '\b'
: 116 === e
? '\t'
: 9 === e
? '\t'
: 110 === e
? '\n'
: 118 === e
? '\v'
: 102 === e
? '\f'
: 114 === e
? '\r'
: 101 === e
? ''
: 32 === e
? ' '
: 34 === e
? '"'
: 47 === e
? '/'
: 92 === e
? '\\'
: 78 === e
? '
'
: 95 === e
? ' '
: 76 === e
? '\u2028'
: 80 === e
? '\u2029'
: '';
}
for (var E = new Array(256), F = new Array(256), h = 0; h < 256; h++) {
(E[h] = d(h) ? 1 : 0), (F[h] = d(h));
}
function m(e, t) {
(this.input = e),
(this.filename = t.filename || null),
(this.schema = t.schema || a),
(this.onWarning = t.onWarning || null),
(this.legacy = t.legacy || !1),
(this.json = t.json || !1),
(this.listener = t.listener || null),
(this.implicitTypes = this.schema.compiledImplicit),
(this.typeMap = this.schema.compiledTypeMap),
(this.length = e.length),
(this.position = 0),
(this.line = 0),
(this.lineStart = 0),
(this.lineIndent = 0),
(this.documents = []);
}
function _(e, t) {
return new i(t, new r(e.filename, e.input, e.position, e.line, e.position - e.lineStart));
}
function N(e, t) {
throw _(e, t);
}
function M(e, t) {
e.onWarning && e.onWarning.call(null, _(e, t));
}
var T = {
YAML: function (e, t, n) {
var i, r, o;
null !== e.version && N(e, 'duplication of %YAML directive'),
1 !== n.length && N(e, 'YAML directive accepts exactly one argument'),
null === (i = /^([0-9]+)\.([0-9]+)$/.exec(n[0])) &&
N(e, 'ill-formed argument of the YAML directive'),
(r = parseInt(i[1], 10)),
(o = parseInt(i[2], 10)),
1 !== r && N(e, 'unacceptable YAML version of the document'),
(e.version = n[0]),
(e.checkLineBreaks = o < 2),
1 !== o && 2 !== o && M(e, 'unsupported YAML version of the document');
},
TAG: function (e, t, n) {
var i, r;
2 !== n.length && N(e, 'TAG directive accepts exactly two arguments'),
(i = n[0]),
(r = n[1]),
l.test(i) || N(e, 'ill-formed tag handle (first argument) of the TAG directive'),
y.call(e.tagMap, i) &&
N(e, `there is a previously declared suffix for "${i}" tag handle`),
p.test(r) || N(e, 'ill-formed tag prefix (second argument) of the TAG directive'),
(e.tagMap[i] = r);
},
};
function L(e, t, n, i) {
var r, o, a, s;
if (t < n) {
if (((s = e.input.slice(t, n)), i)) {
for (r = 0, o = s.length; r < o; r += 1)
{9 === (a = s.charCodeAt(r)) ||
(32 <= a && a <= 1114111) ||
N(e, 'expected valid JSON character');}} else {
c.test(s) && N(e, 'the stream contains non-printable characters');
}
e.result += s;
}
}
function D(e, t, n, i) {
var r, o, a, s;
for (
g.isObject(n) || N(e, 'cannot merge mappings; the provided source object is unacceptable'),
a = 0,
s = (r = Object.keys(n)).length;
a < s;
a += 1
) {
(o = r[a]), y.call(t, o) || ((t[o] = n[o]), (i[o] = !0));
}
}
function U(e, t, n, i, r, o, a, s) {
var c, u;
if (Array.isArray(r)) {
for (c = 0, u = (r = Array.prototype.slice.call(r)).length; c < u; c += 1)
{Array.isArray(r[c]) && N(e, 'nested arrays are not supported inside keys'),
'object' == typeof r && '[object Object]' === f(r[c]) && (r[c] = '[object Object]');}}
if (
('object' == typeof r && '[object Object]' === f(r) && (r = '[object Object]'),
(r = String(r)),
null === t && (t = {}),
'tag:yaml.org,2002:merge' === i)
) {
if (Array.isArray(o)) {for (c = 0, u = o.length; c < u; c += 1) D(e, t, o[c], n);}
else {D(e, t, o, n);}} else {
e.json ||
y.call(n, r) ||
!y.call(t, r) ||
((e.line = a || e.line),
(e.position = s || e.position),
N(e, 'duplicated mapping key')),
(t[r] = o),
delete n[r];
}
return t;
}
function q(e) {
var t;
10 === (t = e.input.charCodeAt(e.position))
? e.position++
: 13 === t
? (e.position++, 10 === e.input.charCodeAt(e.position) && e.position++)
: N(e, 'a line break is expected'),
(e.line += 1),
(e.lineStart = e.position);
}
function Y(e, t, n) {
for (var i = 0, r = e.input.charCodeAt(e.position); 0 !== r; ) {
for (; S(r); ) {
r = e.input.charCodeAt(++e.position);
}
if (t && 35 === r) {
for (; 10 !== (r = e.input.charCodeAt(++e.position)) && 13 !== r && 0 !== r; );
}
if (!j(r)) {
break;
}
for (q(e), r = e.input.charCodeAt(e.position), i++, e.lineIndent = 0; 32 === r; ) {
e.lineIndent++, (r = e.input.charCodeAt(++e.position));
}
}
return -1 !== n && 0 !== i && e.lineIndent < n && M(e, 'deficient indentation'), i;
}
function R(e) {
var t,
n = e.position;
return !(
(45 !== (t = e.input.charCodeAt(n)) && 46 !== t) ||
t !== e.input.charCodeAt(n + 1) ||
t !== e.input.charCodeAt(n + 2) ||
((n += 3), 0 !== (t = e.input.charCodeAt(n)) && !I(t))
);
}
function B(e, t) {
1 === t ? (e.result += ' ') : 1 < t && (e.result += g.repeat('\n', t - 1));
}
function P(e, t) {
var n,
i,
r = e.tag,
o = e.anchor,
a = [],
s = !1;
for (
null !== e.anchor && (e.anchorMap[e.anchor] = a), i = e.input.charCodeAt(e.position);
0 !== i && 45 === i && I(e.input.charCodeAt(e.position + 1));
) {
if (((s = !0), e.position++, Y(e, !0, -1) && e.lineIndent <= t))
{a.push(null), (i = e.input.charCodeAt(e.position));}
else if (
((n = e.line),
$(e, t, A, !1, !0),
a.push(e.result),
Y(e, !0, -1),
(i = e.input.charCodeAt(e.position)),
(e.line === n || e.lineIndent > t) && 0 !== i)
)
{N(e, 'bad indentation of a sequence entry');}
else if (e.lineIndent < t) {break;}}
return !!s && ((e.tag = r), (e.anchor = o), (e.kind = 'sequence'), (e.result = a), !0);
}
function W(e) {
var t,
n,
i,
r,
o = !1,
a = !1;
if (33 !== (r = e.input.charCodeAt(e.position))) {
return !1;
}
if (
(null !== e.tag && N(e, 'duplication of a tag property'),
60 === (r = e.input.charCodeAt(++e.position))
? ((o = !0), (r = e.input.charCodeAt(++e.position)))
: 33 === r
? ((a = !0), (n = '!!'), (r = e.input.charCodeAt(++e.position)))
: (n = '!'),
(t = e.position),
o)
) {
for (; 0 !== (r = e.input.charCodeAt(++e.position)) && 62 !== r; ) {}
e.position < e.length
? ((i = e.input.slice(t, e.position)), (r = e.input.charCodeAt(++e.position)))
: N(e, 'unexpected end of the stream within a verbatim tag');
} else {
for (; 0 !== r && !I(r); ) {
33 === r &&
(a
? N(e, 'tag suffix cannot contain exclamation marks')
: ((n = e.input.slice(t - 1, e.position + 1)),
l.test(n) || N(e, 'named tag handle cannot contain such characters'),
(a = !0),
(t = e.position + 1))),
(r = e.input.charCodeAt(++e.position));
}
(i = e.input.slice(t, e.position)),
u.test(i) && N(e, 'tag suffix cannot contain flow indicator characters');
}
return (
i && !p.test(i) && N(e, `tag name cannot contain such characters: ${i}`),
o
? (e.tag = i)
: y.call(e.tagMap, n)
? (e.tag = e.tagMap[n] + i)
: '!' === n
? (e.tag = `!${i}`)
: '!!' === n
? (e.tag = `tag:yaml.org,2002:${i}`)
: N(e, `undeclared tag handle "${n}"`),
!0
);
}
function K(e) {
var t, n;
if (38 !== (n = e.input.charCodeAt(e.position))) {
return !1;
}
for (
null !== e.anchor && N(e, 'duplication of an anchor property'),
n = e.input.charCodeAt(++e.position),
t = e.position;
0 !== n && !I(n) && !O(n);
) {
n = e.input.charCodeAt(++e.position);
}
return (
e.position === t && N(e, 'name of an anchor node must contain at least one character'),
(e.anchor = e.input.slice(t, e.position)),
!0
);
}
function $(e, t, n, i, r) {
var o,
a,
s,
c,
u,
l,
p,
f,
d = 1,
h = !1,
m = !1;
if (
(null !== e.listener && e.listener('open', e),
(e.tag = null),
(e.anchor = null),
(e.kind = null),
(e.result = null),
(o = a = s = b === n || A === n),
i &&
Y(e, !0, -1) &&
((h = !0),
e.lineIndent > t
? (d = 1)
: