dumbymap
Version:
Generate interactive maps from Semantic HTML
2 lines • 121 kB
JavaScript
/*! LeaderLine v1.0.8 (c) anseki https://anseki.github.io/leader-line/ */
const LeaderLine = (function () { 'use strict'; let Z; let w; let O; let M; let I; let o; let t; let s; let h; let u; let n; let a; let e; let _; let v; let l; let r; let i; let E; let x; let p; let c; let d; const C = 'leader-line'; const b = 1; const k = 2; const L = 3; const A = 4; const V = { top: b, right: k, bottom: L, left: A }; const P = 1; const N = 2; const T = 3; const W = 4; const B = 5; const R = { straight: P, arc: N, fluid: T, magnet: W, grid: B }; const Y = 'behind'; const f = C + '-defs'; const y = '<svg xmlns="http://www.w3.org/2000/svg" version="1.1" id="leader-line-defs"><style><![CDATA[.leader-line{position:absolute;overflow:visible!important;pointer-events:none!important;font-size:16px}#leader-line-defs{width:0;height:0;position:absolute;left:0;top:0}.leader-line-line-path{fill:none}.leader-line-mask-bg-rect{fill:white}.leader-line-caps-mask-anchor,.leader-line-caps-mask-marker-shape{fill:black}.leader-line-caps-mask-anchor{stroke:black}.leader-line-caps-mask-line,.leader-line-plugs-face{stroke:rgba(0,0,0,0)}.leader-line-line-mask-shape{stroke:white}.leader-line-line-outline-mask-shape{stroke:black}.leader-line-plug-mask-shape{fill:white;stroke:black}.leader-line-plug-outline-mask-shape{fill:black;stroke:white}.leader-line-areaAnchor{position:absolute;overflow:visible!important}]]></style><defs><circle id="leader-line-disc" cx="0" cy="0" r="5"/><rect id="leader-line-square" x="-5" y="-5" width="10" height="10"/><polygon id="leader-line-arrow1" points="-8,-8 8,0 -8,8 -5,0"/><polygon id="leader-line-arrow2" points="-4,-8 4,0 -4,8 -7,5 -2,0 -7,-5"/><polygon id="leader-line-arrow3" points="-4,-5 8,0 -4,5"/><g id="leader-line-hand"><path style="fill: #fcfcfc" d="M9.19 11.14h4.75c1.38 0 2.49-1.11 2.49-2.49 0-.51-.15-.98-.41-1.37h1.3c1.38 0 2.49-1.11 2.49-2.49s-1.11-2.53-2.49-2.53h1.02c1.38 0 2.49-1.11 2.49-2.49s-1.11-2.49-2.49-2.49h14.96c1.37 0 2.49-1.11 2.49-2.49s-1.11-2.49-2.49-2.49H16.58C16-9.86 14.28-11.14 9.7-11.14c-4.79 0-6.55 3.42-7.87 4.73H-2.14v13.23h3.68C3.29 9.97 5.47 11.14 9.19 11.14L9.19 11.14Z"/><path style="fill: black" d="M13.95 12c1.85 0 3.35-1.5 3.35-3.35 0-.17-.02-.34-.04-.51h.07c1.85 0 3.35-1.5 3.35-3.35 0-.79-.27-1.51-.72-2.08 1.03-.57 1.74-1.67 1.74-2.93 0-.59-.16-1.15-.43-1.63h12.04c1.85 0 3.35-1.5 3.35-3.35 0-1.85-1.5-3.35-3.35-3.35H17.2C16.26-10.93 13.91-12 9.7-12 5.36-12 3.22-9.4 1.94-7.84c0 0-.29.33-.5.57-.63 0-3.58 0-3.58 0C-2.61-7.27-3-6.88-3-6.41v13.23c0 .47.39.86.86.86 0 0 2.48 0 3.2 0C2.9 10.73 5.29 12 9.19 12L13.95 12ZM9.19 10.28c-3.46 0-5.33-1.05-6.9-3.87-.15-.27-.44-.44-.75-.44 0 0-1.81 0-2.82 0V-5.55c1.06 0 3.11 0 3.11 0 .25 0 .44-.06.61-.25l.83-.95c1.23-1.49 2.91-3.53 6.43-3.53 3.45 0 4.9.74 5.57 1.72h-4.3c-.48 0-.86.38-.86.86s.39.86.86.86h22.34c.9 0 1.63.73 1.63 1.63 0 .9-.73 1.63-1.63 1.63H15.83c-.48 0-.86.38-.86.86 0 .47.39.86.86.86h2.52c.9 0 1.63.73 1.63 1.63s-.73 1.63-1.63 1.63h-3.12c-.48 0-.86.38-.86.86 0 .47.39.86.86.86h2.11c.88 0 1.63.76 1.63 1.67 0 .9-.73 1.63-1.63 1.63h-3.2c-.48 0-.86.39-.86.86 0 .47.39.86.86.86h1.36c.05.16.09.34.09.51 0 .9-.73 1.63-1.63 1.63C13.95 10.28 9.19 10.28 9.19 10.28Z"/></g><g id="leader-line-crosshair"><path d="M0-78.97c-43.54 0-78.97 35.43-78.97 78.97 0 43.54 35.43 78.97 78.97 78.97s78.97-35.43 78.97-78.97C78.97-43.54 43.55-78.97 0-78.97ZM76.51-1.21h-9.91v-9.11h-2.43v9.11h-11.45c-.64-28.12-23.38-50.86-51.5-51.5V-64.17h9.11V-66.6h-9.11v-9.91C42.46-75.86 75.86-42.45 76.51-1.21ZM-1.21-30.76h-9.11v2.43h9.11V-4.2c-1.44.42-2.57 1.54-2.98 2.98H-28.33v-9.11h-2.43v9.11H-50.29C-49.65-28-27.99-49.65-1.21-50.29V-30.76ZM-30.76 1.21v9.11h2.43v-9.11H-4.2c.42 1.44 1.54 2.57 2.98 2.98v24.13h-9.11v2.43h9.11v19.53C-27.99 49.65-49.65 28-50.29 1.21H-30.76ZM1.22 30.75h9.11v-2.43h-9.11V4.2c1.44-.42 2.56-1.54 2.98-2.98h24.13v9.11h2.43v-9.11h19.53C49.65 28 28 49.65 1.22 50.29V30.75ZM30.76-1.21v-9.11h-2.43v9.11H4.2c-.42-1.44-1.54-2.56-2.98-2.98V-28.33h9.11v-2.43h-9.11V-50.29C28-49.65 49.65-28 50.29-1.21H30.76ZM-1.21-76.51v9.91h-9.11v2.43h9.11v11.45c-28.12.64-50.86 23.38-51.5 51.5H-64.17v-9.11H-66.6v9.11h-9.91C-75.86-42.45-42.45-75.86-1.21-76.51ZM-76.51 1.21h9.91v9.11h2.43v-9.11h11.45c.64 28.12 23.38 50.86 51.5 51.5v11.45h-9.11v2.43h9.11v9.91C-42.45 75.86-75.86 42.45-76.51 1.21ZM1.22 76.51v-9.91h9.11v-2.43h-9.11v-11.45c28.12-.64 50.86-23.38 51.5-51.5h11.45v9.11h2.43v-9.11h9.91C75.86 42.45 42.45 75.86 1.22 76.51Z"/><path d="M0 83.58-7.1 96 7.1 96Z"/><path d="M0-83.58 7.1-96-7.1-96"/><path d="M83.58 0 96 7.1 96-7.1Z"/><path d="M-83.58 0-96-7.1-96 7.1Z"/></g></defs></svg>'; const X = { disc: { elmId: 'leader-line-disc', noRotate: !0, bBox: { left: -5, top: -5, width: 10, height: 10, right: 5, bottom: 5 }, widthR: 2.5, heightR: 2.5, bCircle: 5, sideLen: 5, backLen: 5, overhead: 0, outlineBase: 1, outlineMax: 4 }, square: { elmId: 'leader-line-square', noRotate: !0, bBox: { left: -5, top: -5, width: 10, height: 10, right: 5, bottom: 5 }, widthR: 2.5, heightR: 2.5, bCircle: 5, sideLen: 5, backLen: 5, overhead: 0, outlineBase: 1, outlineMax: 4 }, arrow1: { elmId: 'leader-line-arrow1', bBox: { left: -8, top: -8, width: 16, height: 16, right: 8, bottom: 8 }, widthR: 4, heightR: 4, bCircle: 8, sideLen: 8, backLen: 8, overhead: 8, outlineBase: 2, outlineMax: 1.5 }, arrow2: { elmId: 'leader-line-arrow2', bBox: { left: -7, top: -8, width: 11, height: 16, right: 4, bottom: 8 }, widthR: 2.75, heightR: 4, bCircle: 8, sideLen: 8, backLen: 7, overhead: 4, outlineBase: 1, outlineMax: 1.75 }, arrow3: { elmId: 'leader-line-arrow3', bBox: { left: -4, top: -5, width: 12, height: 10, right: 8, bottom: 5 }, widthR: 3, heightR: 2.5, bCircle: 8, sideLen: 5, backLen: 4, overhead: 8, outlineBase: 1, outlineMax: 2.5 }, hand: { elmId: 'leader-line-hand', bBox: { left: -3, top: -12, width: 40, height: 24, right: 37, bottom: 12 }, widthR: 10, heightR: 6, bCircle: 37, sideLen: 12, backLen: 3, overhead: 37 }, crosshair: { elmId: 'leader-line-crosshair', noRotate: !0, bBox: { left: -96, top: -96, width: 192, height: 192, right: 96, bottom: 96 }, widthR: 48, heightR: 48, bCircle: 96, sideLen: 96, backLen: 96, overhead: 0 } }; const F = { behind: Y, disc: 'disc', square: 'square', arrow1: 'arrow1', arrow2: 'arrow2', arrow3: 'arrow3', hand: 'hand', crosshair: 'crosshair' }; const q = { disc: 'disc', square: 'square', arrow1: 'arrow1', arrow2: 'arrow2', arrow3: 'arrow3', hand: 'hand', crosshair: 'crosshair' }; const G = [b, k, L, A]; const D = 'auto'; const Q = { x: 'left', y: 'top', width: 'width', height: 'height' }; const z = 80; const j = 4; const H = 5; const U = 120; const K = 8; const J = 3.75; const $ = 10; const ee = 30; const te = 0.5522847; const ne = 0.25 * Math.PI; const m = /^\s*(\-?[\d\.]+)\s*(\%)?\s*$/; const ae = 'http://www.w3.org/2000/svg'; var S = '-ms-scroll-limit' in document.documentElement.style && '-ms-ime-align' in document.documentElement.style && !window.navigator.msPointerEnabled; const ie = !S && !!document.uniqueID; const oe = 'MozAppearance' in document.documentElement.style; const le = !(S || oe || !window.chrome || !window.CSS); const re = !S && !ie && !oe && !le && !window.chrome && 'WebkitAppearance' in document.documentElement.style; const se = ie || S ? 0.2 : 0.1; const ue = { path: T, lineColor: 'coral', lineSize: 4, plugSE: [Y, 'arrow1'], plugSizeSE: [1, 1], lineOutlineEnabled: !1, lineOutlineColor: 'indianred', lineOutlineSize: 0.25, plugOutlineEnabledSE: [!1, !1], plugOutlineSizeSE: [1, 1] }; const he = (p = {}.toString, c = {}.hasOwnProperty.toString, d = c.call(Object), function (e) { return e && p.call(e) === '[object Object]' && (!(e = Object.getPrototypeOf(e)) || (e = e.hasOwnProperty('constructor') && e.constructor) && typeof e === 'function' && c.call(e) === d) }); const pe = Number.isFinite || function (e) { return typeof e === 'number' && window.isFinite(e) }; const g = (_ = { ease: [0.25, 0.1, 0.25, 1], linear: [0, 0, 1, 1], 'ease-in': [0.42, 0, 1, 1], 'ease-out': [0, 0, 0.58, 1], 'ease-in-out': [0.42, 0, 0.58, 1] }, v = 1e3 / 60 / 2, l = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame || function (e) { setTimeout(e, v) }, r = window.cancelAnimationFrame || window.mozCancelAnimationFrame || window.webkitCancelAnimationFrame || window.msCancelAnimationFrame || function (e) { clearTimeout(e) }, i = Number.isFinite || function (e) { return typeof e === 'number' && window.isFinite(e) }, E = [], x = 0, { add: function (n, e, t, a, i, o, l) { let r; let s; let u; let h; let p; let c; let d; let f; let y; let m; const S = ++x; function g (e, t) { return { value: n(t), timeRatio: e, outputRatio: t } } if (typeof i === 'string' && (i = _[i]), n = n || function () {}, t < v)r = [g(0, 0), g(1, 1)]; else { if (s = v / t, r = [g(0, 0)], i[0] === 0 && i[1] === 0 && i[2] === 1 && i[3] === 1) for (h = s; h <= 1; h += s)r.push(g(h, h)); else for (p = u = (h = s) / 10; p <= 1; p += u)d = p, m = y = f = void 0, f = (m = p * p) * p, m *= 3 * (y = 1 - p), h <= (c = { x: (d = 3 * (y * y) * p) * i[0] + m * i[2] + f, y: d * i[1] + m * i[3] + f }).x && (r.push(g(c.x, c.y)), h += s); r.push(g(1, 1)) } return E.push(o = { animId: S, frameCallback: e, duration: t, count: a, frames: r, reverse: !!o }), !1 !== l && be(o, l), S }, remove: function (n) { let a; E.some(function (e, t) { return e.animId === n && (a = t, !(e.framesStart = null)) }) && E.splice(a, 1) }, start: function (t, n, a) { E.some(function (e) { return e.animId === t && (e.reverse = !!n, be(e, a), !0) }) }, stop: function (t, n) { let a; return E.some(function (e) { return e.animId === t && (n ? e.lastFrame != null && (a = e.frames[e.lastFrame].timeRatio) : (a = (Date.now() - e.framesStart) / e.duration, (a = e.reverse ? 1 - a : a) < 0 ? a = 0 : a > 1 && (a = 1)), !(e.framesStart = null)) }), a }, validTiming: function (t) { return typeof t === 'string' ? _[t] : Array.isArray(t) && [0, 1, 2, 3].every(function (e) { return i(t[e]) && t[e] >= 0 && t[e] <= 1 }) ? [t[0], t[1], t[2], t[3]] : null } }); const ce = function (e, t) { e.SVGPathElement.prototype.getPathData && e.SVGPathElement.prototype.setPathData && !t || (function () { function i (e) { this._string = e, this._currentIndex = 0, this._endIndex = this._string.length, this._prevCommand = null, this._skipOptionalSpaces() } const a = { Z: 'Z', M: 'M', L: 'L', C: 'C', Q: 'Q', A: 'A', H: 'H', V: 'V', S: 'S', T: 'T', z: 'Z', m: 'm', l: 'l', c: 'c', q: 'q', a: 'a', h: 'h', v: 'v', s: 's', t: 't' }; const o = e.navigator.userAgent.indexOf('MSIE ') !== -1; i.prototype = { parseSegment: function () { var e = this._string[this._currentIndex]; let t = a[e] || null; if (t === null) { if (this._prevCommand === null) return null; if ((t = (e === '+' || e === '-' || e === '.' || e >= '0' && e <= '9') && this._prevCommand !== 'Z' ? this._prevCommand === 'M' ? 'L' : this._prevCommand === 'm' ? 'l' : this._prevCommand : null) === null) return null } else this._currentIndex += 1; let n = null; var e = (this._prevCommand = t).toUpperCase(); return e === 'H' || e === 'V' ? n = [this._parseNumber()] : e === 'M' || e === 'L' || e === 'T' ? n = [this._parseNumber(), this._parseNumber()] : e === 'S' || e === 'Q' ? n = [this._parseNumber(), this._parseNumber(), this._parseNumber(), this._parseNumber()] : e === 'C' ? n = [this._parseNumber(), this._parseNumber(), this._parseNumber(), this._parseNumber(), this._parseNumber(), this._parseNumber()] : e === 'A' ? n = [this._parseNumber(), this._parseNumber(), this._parseNumber(), this._parseArcFlag(), this._parseArcFlag(), this._parseNumber(), this._parseNumber()] : e === 'Z' && (this._skipOptionalSpaces(), n = []), n === null || n.indexOf(null) >= 0 ? null : { type: t, values: n } }, hasMoreData: function () { return this._currentIndex < this._endIndex }, peekSegmentType: function () { const e = this._string[this._currentIndex]; return a[e] || null }, initialCommandIsMoveTo: function () { if (!this.hasMoreData()) return !0; const e = this.peekSegmentType(); return e === 'M' || e === 'm' }, _isCurrentSpace: function () { const e = this._string[this._currentIndex]; return e <= ' ' && (e === ' ' || e === '\n' || e === '\t' || e === '\r' || e === '\f') }, _skipOptionalSpaces: function () { for (;this._currentIndex < this._endIndex && this._isCurrentSpace();) this._currentIndex += 1; return this._currentIndex < this._endIndex }, _skipOptionalSpacesOrDelimiter: function () { return !(this._currentIndex < this._endIndex && !this._isCurrentSpace() && this._string[this._currentIndex] !== ',') && (this._skipOptionalSpaces() && this._currentIndex < this._endIndex && this._string[this._currentIndex] === ',' && (this._currentIndex += 1, this._skipOptionalSpaces()), this._currentIndex < this._endIndex) }, _parseNumber: function () { let e = 0; let t = 0; let n = 1; let a = 0; let i = 1; let o = 1; const l = this._currentIndex; if (this._skipOptionalSpaces(), this._currentIndex < this._endIndex && this._string[this._currentIndex] === '+' ? this._currentIndex += 1 : this._currentIndex < this._endIndex && this._string[this._currentIndex] === '-' && (this._currentIndex += 1, i = -1), this._currentIndex === this._endIndex || (this._string[this._currentIndex] < '0' || this._string[this._currentIndex] > '9') && this._string[this._currentIndex] !== '.') return null; for (var r = this._currentIndex; this._currentIndex < this._endIndex && this._string[this._currentIndex] >= '0' && this._string[this._currentIndex] <= '9';) this._currentIndex += 1; if (this._currentIndex !== r) for (let s = this._currentIndex - 1, u = 1; r <= s;)t += u * (this._string[s] - '0'), --s, u *= 10; if (this._currentIndex < this._endIndex && this._string[this._currentIndex] === '.') { if (this._currentIndex += 1, this._currentIndex >= this._endIndex || this._string[this._currentIndex] < '0' || this._string[this._currentIndex] > '9') return null; for (;this._currentIndex < this._endIndex && this._string[this._currentIndex] >= '0' && this._string[this._currentIndex] <= '9';)n *= 10, a += (this._string.charAt(this._currentIndex) - '0') / n, this._currentIndex += 1 } if (this._currentIndex !== l && this._currentIndex + 1 < this._endIndex && (this._string[this._currentIndex] === 'e' || this._string[this._currentIndex] === 'E') && this._string[this._currentIndex + 1] !== 'x' && this._string[this._currentIndex + 1] !== 'm') { if (this._currentIndex += 1, this._string[this._currentIndex] === '+' ? this._currentIndex += 1 : this._string[this._currentIndex] === '-' && (this._currentIndex += 1, o = -1), this._currentIndex >= this._endIndex || this._string[this._currentIndex] < '0' || this._string[this._currentIndex] > '9') return null; for (;this._currentIndex < this._endIndex && this._string[this._currentIndex] >= '0' && this._string[this._currentIndex] <= '9';)e *= 10, e += this._string[this._currentIndex] - '0', this._currentIndex += 1 } let h = t + a; return h *= i, e && (h *= Math.pow(10, o * e)), l === this._currentIndex ? null : (this._skipOptionalSpacesOrDelimiter(), h) }, _parseArcFlag: function () { if (this._currentIndex >= this._endIndex) return null; let e = null; const t = this._string[this._currentIndex]; if (this._currentIndex += 1, t === '0')e = 0; else { if (t !== '1') return null; e = 1 } return this._skipOptionalSpacesOrDelimiter(), e } }; function n (e) { if (!e || e.length === 0) return []; const t = new i(e); const n = []; if (t.initialCommandIsMoveTo()) for (;t.hasMoreData();) { const a = t.parseSegment(); if (a === null) break; n.push(a) } return n } function l (e) { return e.map(function (e) { return { type: e.type, values: Array.prototype.slice.call(e.values) } }) } function r (e) { const u = []; let h = null; let p = null; let c = null; let d = null; let f = null; let y = null; let m = null; return e.forEach(function (e) { let t, n, a, i, o, l, r, s; e.type === 'M' ? (r = e.values[0], s = e.values[1], u.push({ type: 'M', values: [r, s] }), d = y = r, f = m = s) : e.type === 'C' ? (o = e.values[0], l = e.values[1], t = e.values[2], n = e.values[3], r = e.values[4], s = e.values[5], u.push({ type: 'C', values: [o, l, t, n, r, s] }), p = t, c = n, d = r, f = s) : e.type === 'L' ? (r = e.values[0], s = e.values[1], u.push({ type: 'L', values: [r, s] }), d = r, f = s) : e.type === 'H' ? (r = e.values[0], u.push({ type: 'L', values: [r, f] }), d = r) : e.type === 'V' ? (s = e.values[0], u.push({ type: 'L', values: [d, s] }), f = s) : e.type === 'S' ? (t = e.values[0], n = e.values[1], r = e.values[2], s = e.values[3], i = h === 'C' || h === 'S' ? (a = d + (d - p), f + (f - c)) : (a = d, f), u.push({ type: 'C', values: [a, i, t, n, r, s] }), p = t, c = n, d = r, f = s) : e.type === 'T' ? (r = e.values[0], s = e.values[1], l = h === 'Q' || h === 'T' ? (o = d + (d - p), f + (f - c)) : (o = d, f), u.push({ type: 'C', values: [a = d + 2 * (o - d) / 3, i = f + 2 * (l - f) / 3, r + 2 * (o - r) / 3, s + 2 * (l - s) / 3, r, s] }), p = o, c = l, d = r, f = s) : e.type === 'Q' ? (o = e.values[0], l = e.values[1], r = e.values[2], s = e.values[3], u.push({ type: 'C', values: [a = d + 2 * (o - d) / 3, i = f + 2 * (l - f) / 3, r + 2 * (o - r) / 3, s + 2 * (l - s) / 3, r, s] }), p = o, c = l, d = r, f = s) : e.type === 'A' ? (n = e.values[0], a = e.values[1], i = e.values[2], o = e.values[3], l = e.values[4], r = e.values[5], s = e.values[6], n === 0 || a === 0 ? (u.push({ type: 'C', values: [d, f, r, s, r, s] }), d = r, f = s) : d === r && f === s || b(d, f, r, s, n, a, i, o, l).forEach(function (e) { u.push({ type: 'C', values: e }), d = r, f = s })) : e.type === 'Z' && (u.push(e), d = y, f = m), h = e.type }), u } const s = e.SVGPathElement.prototype.setAttribute; const u = e.SVGPathElement.prototype.removeAttribute; const d = e.Symbol ? e.Symbol() : '__cachedPathData'; const f = e.Symbol ? e.Symbol() : '__cachedNormalizedPathData'; var b = function (e, t, n, a, i, o, l, r, s, u) { function h (e, t, n) { return { x: e * Math.cos(n) - t * Math.sin(n), y: e * Math.sin(n) + t * Math.cos(n) } } const p = Math.PI * l / 180; var c = []; u ? (_ = u[0], v = u[1], S = u[2], g = u[3]) : (e = (m = h(e, t, -p)).x, t = m.y, (m = (y = (e - (n = (f = h(n, a, -p)).x)) / 2) * y / (i * i) + (d = (t - (a = f.y)) / 2) * d / (o * o)) > 1 && (i *= m = Math.sqrt(m), o *= m), f = i * i, m = o * o, S = (f = (r === s ? -1 : 1) * Math.sqrt(Math.abs((f * m - f * d * d - m * y * y) / (f * d * d + m * y * y)))) * i * d / o + (e + n) / 2, g = f * -o * y / i + (t + a) / 2, _ = Math.asin(parseFloat(((t - g) / o).toFixed(9))), v = Math.asin(parseFloat(((a - g) / o).toFixed(9))), e < S && (_ = Math.PI - _), n < S && (v = Math.PI - v), _ < 0 && (_ = 2 * Math.PI + _), v < 0 && (v = 2 * Math.PI + v), s && v < _ && (_ -= 2 * Math.PI), !s && _ < v && (v -= 2 * Math.PI)); let d; let f; let y; var m = v - _; Math.abs(m) > 120 * Math.PI / 180 && (d = v, f = n, y = a, v = s && _ < v ? _ + 120 * Math.PI / 180 * 1 : _ + 120 * Math.PI / 180 * -1, n = S + i * Math.cos(v), a = g + o * Math.sin(v), c = b(n, a, f, y, i, o, l, 0, s, [v, d, S, g])); var m = v - _; var S = Math.cos(_); var g = Math.sin(_); var _ = Math.cos(v); var v = Math.sin(v); var m = Math.tan(m / 4); var i = 4 / 3 * i * m; var o = 4 / 3 * o * m; var m = [e, t]; var S = [e + i * g, t - o * S]; var _ = [n + i * v, a - o * _]; var a = [n, a]; if (S[0] = 2 * m[0] - S[0], S[1] = 2 * m[1] - S[1], u) return [S, _, a].concat(c); var c = [S, _, a].concat(c).join().split(','); const E = []; let x = []; return c.forEach(function (e, t) { t % 2 ? x.push(h(c[t - 1], c[t], p).y) : x.push(h(c[t], c[t + 1], p).x), x.length === 6 && (E.push(x), x = []) }), E }; e.SVGPathElement.prototype.setAttribute = function (e, t) { e === 'd' && (this[d] = null, this[f] = null), s.call(this, e, t) }, e.SVGPathElement.prototype.removeAttribute = function (e, t) { e === 'd' && (this[d] = null, this[f] = null), u.call(this, e) }, e.SVGPathElement.prototype.getPathData = function (e) { if (e && e.normalize) { if (this[f]) return l(this[f]); this[d] ? t = l(this[d]) : (t = n(this.getAttribute('d') || ''), this[d] = l(t)); e = r((s = [], c = p = h = u = null, t.forEach(function (e) { let t; let n; let a; let i; let o; let l; const r = e.type; r === 'M' ? (o = e.values[0], l = e.values[1], s.push({ type: 'M', values: [o, l] }), u = p = o, h = c = l) : r === 'm' ? (o = u + e.values[0], l = h + e.values[1], s.push({ type: 'M', values: [o, l] }), u = p = o, h = c = l) : r === 'L' ? (o = e.values[0], l = e.values[1], s.push({ type: 'L', values: [o, l] }), u = o, h = l) : r === 'l' ? (o = u + e.values[0], l = h + e.values[1], s.push({ type: 'L', values: [o, l] }), u = o, h = l) : r === 'C' ? (t = e.values[0], n = e.values[1], a = e.values[2], i = e.values[3], o = e.values[4], l = e.values[5], s.push({ type: 'C', values: [t, n, a, i, o, l] }), u = o, h = l) : r === 'c' ? (t = u + e.values[0], n = h + e.values[1], a = u + e.values[2], i = h + e.values[3], o = u + e.values[4], l = h + e.values[5], s.push({ type: 'C', values: [t, n, a, i, o, l] }), u = o, h = l) : r === 'Q' ? (t = e.values[0], n = e.values[1], o = e.values[2], l = e.values[3], s.push({ type: 'Q', values: [t, n, o, l] }), u = o, h = l) : r === 'q' ? (t = u + e.values[0], n = h + e.values[1], o = u + e.values[2], l = h + e.values[3], s.push({ type: 'Q', values: [t, n, o, l] }), u = o, h = l) : r === 'A' ? (o = e.values[5], l = e.values[6], s.push({ type: 'A', values: [e.values[0], e.values[1], e.values[2], e.values[3], e.values[4], o, l] }), u = o, h = l) : r === 'a' ? (o = u + e.values[5], l = h + e.values[6], s.push({ type: 'A', values: [e.values[0], e.values[1], e.values[2], e.values[3], e.values[4], o, l] }), u = o, h = l) : r === 'H' ? (o = e.values[0], s.push({ type: 'H', values: [o] }), u = o) : r === 'h' ? (o = u + e.values[0], s.push({ type: 'H', values: [o] }), u = o) : r === 'V' ? (l = e.values[0], s.push({ type: 'V', values: [l] }), h = l) : r === 'v' ? (l = h + e.values[0], s.push({ type: 'V', values: [l] }), h = l) : r === 'S' ? (a = e.values[0], i = e.values[1], o = e.values[2], l = e.values[3], s.push({ type: 'S', values: [a, i, o, l] }), u = o, h = l) : r === 's' ? (a = u + e.values[0], i = h + e.values[1], o = u + e.values[2], l = h + e.values[3], s.push({ type: 'S', values: [a, i, o, l] }), u = o, h = l) : r === 'T' ? (o = e.values[0], l = e.values[1], s.push({ type: 'T', values: [o, l] }), u = o, h = l) : r === 't' ? (o = u + e.values[0], l = h + e.values[1], s.push({ type: 'T', values: [o, l] }), u = o, h = l) : r !== 'Z' && r !== 'z' || (s.push({ type: 'Z', values: [] }), u = p, h = c) }), s)); return this[f] = l(e), e } if (this[d]) return l(this[d]); let s; let u; let h; let p; let c; var t = n(this.getAttribute('d') || ''); return this[d] = l(t), t }, e.SVGPathElement.prototype.setPathData = function (e) { if (e.length === 0)o ? this.setAttribute('d', '') : this.removeAttribute('d'); else { for (var t = '', n = 0, a = e.length; n < a; n += 1) { const i = e[n]; n > 0 && (t += ' '), t += i.type, i.values && i.values.length > 0 && (t += ' ' + i.values.join(' ')) } this.setAttribute('d', t) } }, e.SVGRectElement.prototype.getPathData = function (e) { const t = this.x.baseVal.value; var n = this.y.baseVal.value; const a = this.width.baseVal.value; const i = this.height.baseVal.value; let o = (this.hasAttribute('rx') ? this.rx : this.ry).baseVal.value; let l = (this.hasAttribute('ry') ? this.ry : this.rx).baseVal.value; var n = (n = [{ type: 'M', values: [t + (o = a / 2 < o ? a / 2 : o), n] }, { type: 'H', values: [t + a - o] }, { type: 'A', values: [o, l = i / 2 < l ? i / 2 : l, 0, 0, 1, t + a, n + l] }, { type: 'V', values: [n + i - l] }, { type: 'A', values: [o, l, 0, 0, 1, t + a - o, n + i] }, { type: 'H', values: [t + o] }, { type: 'A', values: [o, l, 0, 0, 1, t, n + i - l] }, { type: 'V', values: [n + l] }, { type: 'A', values: [o, l, 0, 0, 1, t + o, n] }, { type: 'Z', values: [] }]).filter(function (e) { return e.type !== 'A' || e.values[0] !== 0 && e.values[1] !== 0 }); return n = e && !0 === e.normalize ? r(n) : n }, e.SVGCircleElement.prototype.getPathData = function (e) { const t = this.cx.baseVal.value; var n = this.cy.baseVal.value; const a = this.r.baseVal.value; var n = [{ type: 'M', values: [t + a, n] }, { type: 'A', values: [a, a, 0, 0, 1, t, n + a] }, { type: 'A', values: [a, a, 0, 0, 1, t - a, n] }, { type: 'A', values: [a, a, 0, 0, 1, t, n - a] }, { type: 'A', values: [a, a, 0, 0, 1, t + a, n] }, { type: 'Z', values: [] }]; return n = e && !0 === e.normalize ? r(n) : n }, e.SVGEllipseElement.prototype.getPathData = function (e) { const t = this.cx.baseVal.value; var n = this.cy.baseVal.value; const a = this.rx.baseVal.value; const i = this.ry.baseVal.value; var n = [{ type: 'M', values: [t + a, n] }, { type: 'A', values: [a, i, 0, 0, 1, t, n + i] }, { type: 'A', values: [a, i, 0, 0, 1, t - a, n] }, { type: 'A', values: [a, i, 0, 0, 1, t, n - i] }, { type: 'A', values: [a, i, 0, 0, 1, t + a, n] }, { type: 'Z', values: [] }]; return n = e && !0 === e.normalize ? r(n) : n }, e.SVGLineElement.prototype.getPathData = function () { return [{ type: 'M', values: [this.x1.baseVal.value, this.y1.baseVal.value] }, { type: 'L', values: [this.x2.baseVal.value, this.y2.baseVal.value] }] }, e.SVGPolylineElement.prototype.getPathData = function () { for (var e = [], t = 0; t < this.points.numberOfItems; t += 1) { const n = this.points.getItem(t); e.push({ type: t === 0 ? 'M' : 'L', values: [n.x, n.y] }) } return e }, e.SVGPolygonElement.prototype.getPathData = function () { for (var e = [], t = 0; t < this.points.numberOfItems; t += 1) { const n = this.points.getItem(t); e.push({ type: t === 0 ? 'M' : 'L', values: [n.x, n.y] }) } return e.push({ type: 'Z', values: [] }), e } }()) }; var S = (a = {}, Ee.m = n = [function (e, t, n) { n.r(t); const a = 500; const i = []; const o = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame || function (e) { return setTimeout(e, 1e3 / 60) }; const l = window.cancelAnimationFrame || window.mozCancelAnimationFrame || window.webkitCancelAnimationFrame || window.msCancelAnimationFrame || function (e) { return clearTimeout(e) }; let r = Date.now(); let s = void 0; function u () { let n = void 0; let e = void 0; s && (l.call(window, s), s = null), i.forEach(function (e) { let t; (t = e.event) && (e.event = null, e.listener(t), n = !0) }), n ? (r = Date.now(), e = !0) : Date.now() - r < a && (e = !0), e && (s = o.call(window, u)) } function h (n) { let a = -1; return i.some(function (e, t) { return e.listener === n && (a = t, !0) }), a }t.default = { add: function (e) { let t = void 0; return h(e) === -1 ? (i.push(t = { listener: e }), function (e) { t.event = e, s || u() }) : null }, remove: function (e) { (e = h(e)) > -1 && (i.splice(e, 1), !i.length && s && (l.call(window, s), s = null)) } } }], Ee.c = a, Ee.d = function (e, t, n) { Ee.o(e, t) || Object.defineProperty(e, t, { enumerable: !0, get: n }) }, Ee.r = function (e) { typeof Symbol !== 'undefined' && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, { value: 'Module' }), Object.defineProperty(e, '__esModule', { value: !0 }) }, Ee.t = function (t, e) { if (1 & e && (t = Ee(t)), 8 & e) return t; if (4 & e && typeof t === 'object' && t && t.__esModule) return t; const n = Object.create(null); if (Ee.r(n), Object.defineProperty(n, 'default', { enumerable: !0, value: t }), 2 & e && typeof t !== 'string') for (const a in t)Ee.d(n, a, function (e) { return t[e] }.bind(null, a)); return n }, Ee.n = function (e) { const t = e && e.__esModule ? function () { return e.default } : function () { return e }; return Ee.d(t, 'a', t), t }, Ee.o = function (e, t) { return Object.prototype.hasOwnProperty.call(e, t) }, Ee.p = '', Ee(Ee.s = 0).default); const de = { line_altColor: { iniValue: !1 }, line_color: {}, line_colorTra: { iniValue: !1 }, line_strokeWidth: {}, plug_enabled: { iniValue: !1 }, plug_enabledSE: { hasSE: !0, iniValue: !1 }, plug_plugSE: { hasSE: !0, iniValue: Y }, plug_colorSE: { hasSE: !0 }, plug_colorTraSE: { hasSE: !0, iniValue: !1 }, plug_markerWidthSE: { hasSE: !0 }, plug_markerHeightSE: { hasSE: !0 }, lineOutline_enabled: { iniValue: !1 }, lineOutline_color: {}, lineOutline_colorTra: { iniValue: !1 }, lineOutline_strokeWidth: {}, lineOutline_inStrokeWidth: {}, plugOutline_enabledSE: { hasSE: !0, iniValue: !1 }, plugOutline_plugSE: { hasSE: !0, iniValue: Y }, plugOutline_colorSE: { hasSE: !0 }, plugOutline_colorTraSE: { hasSE: !0, iniValue: !1 }, plugOutline_strokeWidthSE: { hasSE: !0 }, plugOutline_inStrokeWidthSE: { hasSE: !0 }, position_socketXYSE: { hasSE: !0, hasProps: !0 }, position_plugOverheadSE: { hasSE: !0 }, position_path: {}, position_lineStrokeWidth: {}, position_socketGravitySE: { hasSE: !0 }, path_pathData: {}, path_edge: { hasProps: !0 }, viewBox_bBox: { hasProps: !0 }, viewBox_plugBCircleSE: { hasSE: !0 }, lineMask_enabled: { iniValue: !1 }, lineMask_outlineMode: { iniValue: !1 }, lineMask_x: {}, lineMask_y: {}, lineOutlineMask_x: {}, lineOutlineMask_y: {}, maskBGRect_x: {}, maskBGRect_y: {}, capsMaskAnchor_enabledSE: { hasSE: !0, iniValue: !1 }, capsMaskAnchor_pathDataSE: { hasSE: !0 }, capsMaskAnchor_strokeWidthSE: { hasSE: !0 }, capsMaskMarker_enabled: { iniValue: !1 }, capsMaskMarker_enabledSE: { hasSE: !0, iniValue: !1 }, capsMaskMarker_plugSE: { hasSE: !0, iniValue: Y }, capsMaskMarker_markerWidthSE: { hasSE: !0 }, capsMaskMarker_markerHeightSE: { hasSE: !0 }, caps_enabled: { iniValue: !1 }, attach_plugSideLenSE: { hasSE: !0 }, attach_plugBackLenSE: { hasSE: !0 } }; const fe = { show_on: {}, show_effect: {}, show_animOptions: {}, show_animId: {}, show_inAnim: {} }; const ye = 'fade'; let me = []; const Se = {}; let ge = 0; const _e = {}; let ve = 0; function Ee (e) { if (a[e]) return a[e].exports; const t = a[e] = { i: e, l: !1, exports: {} }; return n[e].call(t.exports, t, t.exports, Ee), t.l = !0, t.exports } function xe () { const i = Date.now(); let o = !1; e && (r.call(window, e), e = null), E.forEach(function (e) { let t, n, a; if (e.framesStart) { if ((t = i - e.framesStart) >= e.duration && e.count && e.loopsLeft <= 1) return a = e.frames[e.lastFrame = e.reverse ? 0 : e.frames.length - 1], e.frameCallback(a.value, !0, a.timeRatio, a.outputRatio), void (e.framesStart = null); if (t > e.duration) { if (n = Math.floor(t / e.duration), e.count) { if (n >= e.loopsLeft) return a = e.frames[e.lastFrame = e.reverse ? 0 : e.frames.length - 1], e.frameCallback(a.value, !0, a.timeRatio, a.outputRatio), void (e.framesStart = null); e.loopsLeft -= n }e.framesStart += e.duration * n, t = i - e.framesStart }e.reverse && (t = e.duration - t), a = e.frames[e.lastFrame = Math.round(t / v)], !1 !== e.frameCallback(a.value, !1, a.timeRatio, a.outputRatio) ? o = !0 : e.framesStart = null } }), o && (e = l.call(window, xe)) } function be (e, t) { e.framesStart = Date.now(), t != null && (e.framesStart -= e.duration * (e.reverse ? 1 - t : t)), e.loopsLeft = e.count, e.lastFrame = null, xe() } function ke (t, n) { let e, a; return typeof t !== typeof n || (e = he(t) ? 'obj' : Array.isArray(t) ? 'array' : '') != (he(n) ? 'obj' : Array.isArray(n) ? 'array' : '') || (e === 'obj' ? ke(a = Object.keys(t).sort(), Object.keys(n).sort()) || a.some(function (e) { return ke(t[e], n[e]) }) : e === 'array' ? t.length !== n.length || t.some(function (e, t) { return ke(e, n[t]) }) : t !== n) } function we (n) { return n && (he(n) ? Object.keys(n).reduce(function (e, t) { return e[t] = we(n[t]), e }, {}) : Array.isArray(n) ? n.map(we) : n) } function Oe (e) { let t; let n; let a; let i = 1; let o = e = (e + '').trim(); function l (e) { let t = 1; var e = m.exec(e); return e && (t = parseFloat(e[1]), e[2] ? t = t >= 0 && t <= 100 ? t / 100 : 1 : (t < 0 || t > 1) && (t = 1)), t } return (t = /^(rgba|hsla|hwb|gray|device\-cmyk)\s*\(([\s\S]+)\)$/i.exec(e)) ? (n = t[1].toLowerCase(), a = t[2].trim().split(/\s*,\s*/), n === 'rgba' && a.length === 4 ? (i = l(a[3]), o = 'rgb(' + a.slice(0, 3).join(', ') + ')') : n === 'hsla' && a.length === 4 ? (i = l(a[3]), o = 'hsl(' + a.slice(0, 3).join(', ') + ')') : n === 'hwb' && a.length === 4 ? (i = l(a[3]), o = 'hwb(' + a.slice(0, 3).join(', ') + ')') : n === 'gray' && a.length === 2 ? (i = l(a[1]), o = 'gray(' + a[0] + ')') : n === 'device-cmyk' && a.length >= 5 && (i = l(a[4]), o = 'device-cmyk(' + a.slice(0, 4).join(', ') + ')')) : (t = /^\#(?:([\da-f]{6})([\da-f]{2})|([\da-f]{3})([\da-f]))$/i.exec(e)) ? o = t[1] ? (i = parseInt(t[2], 16) / 255, '#' + t[1]) : (i = parseInt(t[4] + t[4], 16) / 255, '#' + t[3]) : e.toLocaleLowerCase() === 'transparent' && (i = 0), [i, o] } function Me (e) { return !(!e || e.nodeType !== Node.ELEMENT_NODE || typeof e.getBoundingClientRect !== 'function') } function Ie (e, t) { let n; let a; let i; const o = {}; if (!(i = e.ownerDocument)) return console.error('Cannot get document that contains the element.'), null; if (e.compareDocumentPosition(i) & Node.DOCUMENT_POSITION_DISCONNECTED) return console.error('A disconnected element was passed.'), null; for (a in n = e.getBoundingClientRect())o[a] = n[a]; if (!t) { if (!(i = i.defaultView)) return console.error('Cannot get window that contains the element.'), null; o.left += i.pageXOffset, o.right += i.pageXOffset, o.top += i.pageYOffset, o.bottom += i.pageYOffset } return o } function Ce (e, t) { let n; const a = []; let i = e; for (t = t || window; ;) { if (!(n = i.ownerDocument)) return console.error('Cannot get document that contains the element.'), null; if (!(n = n.defaultView)) return console.error('Cannot get window that contains the element.'), null; if (n === t) break; if (!(i = n.frameElement)) return console.error('`baseWindow` was not found.'), null; a.unshift(i) } return a } function Le (e, t) { let a = 0; let i = 0; return (t = Ce(e, t = t || window)) ? t.length ? (t.forEach(function (e, t) { let n = Ie(e, t > 0); a += n.left, i += n.top, e = (t = e).ownerDocument.defaultView.getComputedStyle(t, ''), n = { left: t.clientLeft + parseFloat(e.paddingLeft), top: t.clientTop + parseFloat(e.paddingTop) }, a += n.left, i += n.top }), (t = Ie(e, !0)).left += a, t.right += a, t.top += i, t.bottom += i, t) : Ie(e) : null } function Ae (e, t) { const n = e.x - t.x; var t = e.y - t.y; return Math.sqrt(n * n + t * t) } function Ve (e, t, n) { const a = t.x - e.x; var t = t.y - e.y; return { x: e.x + a * n, y: e.y + t * n, angle: Math.atan2(t, a) / (Math.PI / 180) } } function Pe (e, t, n) { e = Math.atan2(e.y - t.y, t.x - e.x); return { x: t.x + Math.cos(e) * n, y: t.y + Math.sin(e) * n * -1 } } function Ne (e, t, n, a, i) { var o = i * i; var l = o * i; const r = 1 - i; var s = r * r; var u = s * r; const h = u * e.x + 3 * s * i * t.x + 3 * r * o * n.x + l * a.x; const p = u * e.y + 3 * s * i * t.y + 3 * r * o * n.y + l * a.y; const c = e.x + 2 * i * (t.x - e.x) + o * (n.x - 2 * t.x + e.x); var u = e.y + 2 * i * (t.y - e.y) + o * (n.y - 2 * t.y + e.y); var s = t.x + 2 * i * (n.x - t.x) + o * (a.x - 2 * n.x + t.x); var l = t.y + 2 * i * (n.y - t.y) + o * (a.y - 2 * n.y + t.y); var o = r * e.x + i * t.x; var e = r * e.y + i * t.y; var t = r * n.x + i * a.x; var i = r * n.y + i * a.y; var a = 90 - 180 * Math.atan2(c - s, u - l) / Math.PI; return { x: h, y: p, fromP2: { x: c, y: u }, toP1: { x: s, y: l }, fromP1: { x: o, y: e }, toP2: { x: t, y: i }, angle: a += a > 180 ? -180 : 180 } } function Te (n, a, i, o, e) { function l (e, t, n, a, i) { return e * (e * (-3 * t + 9 * n - 9 * a + 3 * i) + 6 * t - 12 * n + 6 * a) - 3 * t + 3 * n } let r; let s; const u = [0.2491, 0.2491, 0.2335, 0.2335, 0.2032, 0.2032, 0.1601, 0.1601, 0.1069, 0.1069, 0.0472, 0.0472]; let h = 0; const p = (e = e == null || e > 1 ? 1 : e < 0 ? 0 : e) / 2; return [-0.1252, 0.1252, -0.3678, 0.3678, -0.5873, 0.5873, -0.7699, 0.7699, -0.9041, 0.9041, -0.9816, 0.9816].forEach(function (e, t) { r = l(s = p * e + p, n.x, a.x, i.x, o.x), s = l(s, n.y, a.y, i.y, o.y), s = r * r + s * s, h += u[t] * Math.sqrt(s) }), p * h } function We (e, t, n, a, i) { for (var o, l = 0.5, r = 1 - l; o = Te(e, t, n, a, r), !(Math.abs(o - i) <= 0.01);)r += (o < i ? 1 : -1) * (l /= 2); return r } function Be (e, t) { let n; return e.forEach(function (e) { e = t ? e.map(function (e) { e = { x: e.x, y: e.y }; return t(e), e }) : e; (n = n || [{ type: 'M', values: [e[0].x, e[0].y] }]).push(e.length ? e.length === 2 ? { type: 'L', values: [e[1].x, e[1].y] } : { type: 'C', values: [e[1].x, e[1].y, e[2].x, e[2].y, e[3].x, e[3].y] } : { type: 'Z', values: [] }) }), n } function Re (e) { const t = []; let n = 0; return e.forEach(function (e) { e = (e.length === 2 ? Ae : Te).apply(null, e); t.push(e), n += e }), { segsLen: t, lenAll: n } } function Fe (e, a) { return e == null || a == null || e.length !== a.length || e.some(function (e, t) { const n = a[t]; return e.type !== n.type || e.values.some(function (e, t) { return e !== n.values[t] }) }) } function Ge (e, t, n) { e.events[t] ? e.events[t].indexOf(n) < 0 && e.events[t].push(n) : e.events[t] = [n] } function De (e, t, n) { let a; e.events[t] && (a = e.events[t].indexOf(n)) > -1 && e.events[t].splice(a, 1) } function ze (e) { t && clearTimeout(t), me.push(e), t = setTimeout(function () { me.forEach(function (e) { e() }), me = [] }, 0) } function je (e, t) { e.reflowTargets.indexOf(t) < 0 && e.reflowTargets.push(t) } function He (e) { e.reflowTargets.forEach(function (e) { let n; n = e, setTimeout(function () { const e = n.parentNode; const t = n.nextSibling; e.insertBefore(e.removeChild(n), t) }, 0) }), e.reflowTargets = [] } function Ue (e, t, n, a, i, o, l) { let r; n === 'auto-start-reverse' ? (typeof s !== 'boolean' && (t.setAttribute('orient', 'auto-start-reverse'), s = t.orientType.baseVal === SVGMarkerElement.SVG_MARKER_ORIENT_UNKNOWN), s ? t.setAttribute('orient', n) : ((r = i.createSVGTransform()).setRotate(180, 0, 0), o.transform.baseVal.appendItem(r), t.setAttribute('orient', 'auto'), r = !0)) : (t.setAttribute('orient', n), !1 === s && o.transform.baseVal.clear()), t = t.viewBox.baseVal, r ? (t.x = -a.right, t.y = -a.bottom) : (t.x = a.left, t.y = a.top), t.width = a.width, t.height = a.height, ie && je(e, l) } function Ze (e, t) { return { prop: e ? 'markerEnd' : 'markerStart', orient: t ? t.noRotate ? '0' : e ? 'auto' : 'auto-start-reverse' : null } } function Ye (n, a) { Object.keys(a).forEach(function (e) { const t = a[e]; n[e] = t.iniValue != null ? t.hasSE ? [t.iniValue, t.iniValue] : t.iniValue : t.hasSE ? t.hasProps ? [{}, {}] : [] : t.hasProps ? {} : null }) } function Xe (t, e, n, a, i) { return a !== e[n] && (e[n] = a, i && i.forEach(function (e) { e(t, a, n) }), !0) } function qe (e) { function t (e, t) { return e + parseFloat(t) } var n = e.document; const a = e.getComputedStyle(n.documentElement, ''); var e = e.getComputedStyle(n.body, ''); var n = { x: 0, y: 0 }; return e.position !== 'static' ? (n.x -= [a.marginLeft, a.borderLeftWidth, a.paddingLeft, e.marginLeft, e.borderLeftWidth].reduce(t, 0), n.y -= [a.marginTop, a.borderTopWidth, a.paddingTop, e.marginTop, e.borderTopWidth].reduce(t, 0)) : a.position !== 'static' && (n.x -= [a.marginLeft, a.borderLeftWidth].reduce(t, 0), n.y -= [a.marginTop, a.borderTopWidth].reduce(t, 0)), n } function Qe (e) { let t; const n = e.document; n.getElementById(f) || (t = (new e.DOMParser()).parseFromString(y, 'image/svg+xml'), n.body.appendChild(t.documentElement), ce(e, oe)) } function Ke (l) { let g; let c; let _; let e; let n; let a; let i; let d; let o; let r; let s; let t; let u; let h; const p = l.options; const f = l.curStats; const y = l.aplStats; const v = f.position_socketXYSE; let m = !1; function S (e, t) { e = t === b ? { x: e.left + e.width / 2, y: e.top } : t === k ? { x: e.right, y: e.top + e.height / 2 } : t === L ? { x: e.left + e.width / 2, y: e.bottom } : { x: e.left, y: e.top + e.height / 2 }; return e.socketId = t, e } function E (e) { return { x: e.x, y: e.y } } if (f.position_path = p.path, f.position_lineStrokeWidth = f.line_strokeWidth, f.position_socketGravitySE = g = we(p.socketGravitySE), c = [0, 1].map(function (e) { let t = p.anchorSE[e]; let n = l.optionIsAttach.anchorSE[e]; let a = !1 !== n ? _e[t._id] : null; const i = !1 !== n && a.conf.getStrokeWidth ? a.conf.getStrokeWidth(a, l) : 0; const o = !1 !== n && a.conf.getBBoxNest ? a.conf.getBBoxNest(a, l, i) : Le(t, l.baseWindow); return f.capsMaskAnchor_pathDataSE[e] = !1 !== n && a.conf.getPathData ? a.conf.getPathData(a, l, i) : (n = (t = o).right != null ? t.right : t.left + t.width, a = t.bottom != null ? t.bottom : t.top + t.height, [{ type: 'M', values: [t.left, t.top] }, { type: 'L', values: [n, t.top] }, { type: 'L', values: [n, a] }, { type: 'L', values: [t.left, a] }, { type: 'Z', values: [] }]), f.capsMaskAnchor_strokeWidthSE[e] = i, o }), i = -1, p.socketSE[0] && p.socketSE[1] ? (v[0] = S(c[0], p.socketSE[0]), v[1] = S(c[1], p.socketSE[1])) : (p.socketSE[0] || p.socketSE[1] ? (a = p.socketSE[0] ? (n = 0, 1) : (n = 1, 0), v[n] = S(c[n], p.socketSE[n]), (e = G.map(function (e) { return S(c[a], e) })).forEach(function (e) { const t = Ae(e, v[n]); (t < i || i === -1) && (v[a] = e, i = t) })) : (e = G.map(function (e) { return S(c[1], e) }), G.map(function (e) { return S(c[0], e) }).forEach(function (n) { e.forEach(function (e) { const t = Ae(n, e); (t < i || i === -1) && (v[0] = n, v[1] = e, i = t) }) })), [0, 1].forEach(function (e) { let t, n; p.socketSE[e] || (c[e].width || c[e].height ? c[e].width || v[e].socketId !== A && v[e].socketId !== k ? c[e].height || v[e].socketId !== b && v[e].socketId !== L || (v[e].socketId = v[e ? 0 : 1].y - c[e].top >= 0 ? L : b) : v[e].socketId = v[e ? 0 : 1].x - c[e].left >= 0 ? k : A : (t = v[e ? 0 : 1].x - c[e].left, n = v[e ? 0 : 1].y - c[e].top, v[e].socketId = Math.abs(t) >= Math.abs(n) ? t >= 0 ? k : A : n >= 0 ? L : b)) })), f.position_path !== y.position_path || f.position_lineStrokeWidth !== y.position_lineStrokeWidth || [0, 1].some(function (e) { return f.position_plugOverheadSE[e] !== y.position_plugOverheadSE[e] || (t = v[e], n = y.position_socketXYSE[e], t.x !== n.x || t.y !== n.y || t.socketId !== n.socketId) || (t = g[e], n = y.position_socketGravitySE[e], (e = t == null ? 'auto' : Array.isArray(t) ? 'array' : 'number') != (n == null ? 'auto' : Array.isArray(n) ? 'array' : 'number') || (e == 'array' ? t[0] !== n[0] || t[1] !== n[1] : t !== n)); let t, n })) { switch (l.pathList.baseVal = _ = [], l.pathList.animVal = null, f.position_path) { case P:_.push([E(v[0]), E(v[1])]); break; case N:t = typeof g[0] === 'number' && g[0] > 0 || typeof g[1] === 'number' && g[1] > 0, u = ne * (t ? -1 : 1), h = Math.atan2(v[1].y - v[0].y, v[1].x - v[0].x), t = u - h, h = Math.PI - h - u, u = Ae(v[0], v[1]) / Math.sqrt(2) * te, t = { x: v[0].x + Math.cos(t) * u, y: v[0].y + Math.sin(t) * u * -1 }, u = { x: v[1].x + Math.cos(h) * u, y: v[1].y + Math.sin(h) * u * -1 }, _.push([E(v[0]), t, u, E(v[1])]); break; case T:case W:o = [g[0], f.position_path === W ? 0 : g[1]], r = [], s = [], v.forEach(function (e, t) { let n; let a = o[t]; var i = Array.isArray(a) ? { x: a[0], y: a[1] } : typeof a === 'number' ? e.socketId === b ? { x: 0, y: -a } : e.socketId === k ? { x: a, y: 0 } : e.socketId === L ? { x: 0, y: a } : { x: -a, y: 0 } : (n = v[t ? 0 : 1], a = (a = f.position_plugOverheadSE[t]) > 0 ? U + (K < a ? (a - K) * J : 0) : z + (f.position_lineStrokeWidth > j ? (f.position_lineStrokeWidth - j) * H : 0), e.socketId === b ? { x: 0, y: -(i = (i = (e.y - n.y) / 2) < a ? a : i) } : e.socketId === k ? { x: i = (i = (n.x - e.x) / 2) < a ? a : i, y: 0 } : e.socketId === L ? { x: 0, y: i = (i = (n.y - e.y) / 2) < a ? a : i } : { x: -(i = (i = (e.x - n.x) / 2) < a ? a : i), y: 0 }); r[t] = e.x + i.x, s[t] = e.y + i.y }), _.push([E(v[0]), { x: r[0], y: s[0] }, { x: r[1], y: s[1] }, E(v[1])]); break; case B:!(function () { let n; const i = 1; const l = 2; const r = 3; const o = 4; const s = [[], []]; const u = []; function h (e) { return e === i ? r : e === l ? o : e === r ? i : l } function p (e) { return e === l || e === o ? 'x' : 'y' } function c (e, t, n) { const a = { x: e.x, y: e.y }; if (n) { if (n === h(e.dirId)) throw new Error('Invalid dirId: ' + n); a.dirId = n } else a.dirId = e.dirId; return a.dirId === i ? a.y -= t : a.dirId === l ? a.x += t : a.dirId === r ? a.y += t : a.x -= t, a } function d (e, t) { return t.dirId === i ? e.y <= t.y : t.dirId === l ? e.x >= t.x : t.dirId === r ? e.y >= t.y : e.x <= t.x } function f (e, t) { return t.dirId === i || t.dirId === r ? e.x === t.x : e.y === t.y } function y (e) { return e[0] ? { contain: 0, notContain: 1 } : { contain: 1, notContain: 0 } } function m (e, t, n) { return Math.abs(t[n] - e[n]) } function S (e, t, n) { return n === 'x' ? e.x < t.x ? l : o : e.y < t.y ? r : i } for (v.forEach(function (e, t) { const n = E(e); let a = g[t]; e = Array.isArray(a) ? a[0] < 0 ? [o, -a[0]] : a[0] > 0 ? [l, a[0]] : a[1] < 0 ? [i, -a[1]] : a[1] > 0 ? [r, a[1]] : [e.socketId, 0] : typeof a !== 'number' ? [e.socketId, ee] : a >= 0 ? [e.socketId, a] : [h(e.socketId), -a], n.dirId = e[0], a = e[1], s[t].push(n), u[t] = c(n, a) }); (function () { let e; let t; let a; let i; const n = [d(u[1], u[0]), d(u[0], u[1])]; const o = [p(u[0].dirId), p(u[1].dirId)]; if (o[0] === o[1]) { if (n[0] && n[1]) return void (f(u[1], u[0]) || (u[0][o[0]] === u[1][o[1]] ? (s[0].push(u[0]), s[1].push(u[1])) : (e = u[0][o[0]] + (u[1][o[1]] - u[0][o[0]]) / 2, s[0].push(c(u[0], Math.abs(e - u[0][o[0]]))), s[1].push(c(u[1], Math.abs(e - u[1][o[1]])))))); n[0] !== n[1] ? (t = y(n), (a = m(u[t.notContain], u[t.contain], o[t.notContain])) < ee && (u[t.notContain] = c(u[t.notContain], ee - a)), s[t.notContain].push(u[t.notContain]), u[t.notContain] = c(u[t.notContain], ee, f(u[t.contain], u[t.notContain]) ? o[t.notContain] === 'x' ? r : l : S(u[t.notContain], u[t.contain], o[t.notContain] === 'x' ? 'y' : 'x'))) : (a = m(u[0], u[1], o[0] === 'x' ? 'y' : 'x'), s.forEach(function (e, t) { const n = t === 0 ? 1 : 0; e.push(u[t]), u[t] = c(u[t], ee, 2 * ee <= a ? S(u[t], u[n], o[t] === 'x' ? 'y' : 'x') : o[t] === 'x' ? r : l) })) } else { if (n[0] && n[1]) return void (f(u[1], u[0]) ? s[1].push(u[1]) : f(u[0], u[1]) ? s[0].push(u[0]) : s[0].push(o[0] === 'x' ? { x: u[1].x, y: u[0].y } : { x: u[0].x, y: u[1].y })); n[0] !== n[1] ? (t = y(n), s[t.notContain].push(u[t.notContain]), u[t.notContain] = c(u[t.notContain], ee, m(u[t.notContain], u[t.contain], o[t.contain]) >= ee ? S(u[t.notContain], u[t.contain], o[t.contain]) : u[t.contain].dirId)) : (i = [{ x: u[0].x, y: u[0].y }, { x: u[1].x, y: u[1].y }], s.forEach(function (e, t) { const n = t === 0 ? 1 : 0; const a = m(i[t], i[n], o[t]); a < ee && (u[t] = c(u[t], ee - a)), e.push(u[t]), u[t] = c(u[t], ee, S(u[t], u[n], o[n])) })) } return 1 }()););s[1].reverse(), s[0].concat(s[1]).forEach(function (e, t) { e = { x: e.x, y: e.y }; t > 0 && _.push([n, e]), n = e }) }()) }d = [], f.position_plugOverheadSE.forEach(function (e, t) { let n; let a; let i; let o; let l; let r; let s; let u; let h; const p = !t; e > 0 ? (n = _[a = p ? 0 : _.length - 1]).length === 2 ? (d[a] = d[a] || Ae.apply(null, n), d[a] > $ && (d[a] - e < $ && (e = d[a] - $), s = Ve(n[0], n[1], (p ? e : d[a] - e) / d[a]), _[a] = p ? [s, n[1]] : [n[0], s], d[a] -= e)) : (d[a] = d[a] || Te.apply(null, n), d[a] > $ && (d[a] - e < $ && (e = d[a] - $), s = Ne(n[0], n[1], n[2], n[3], We(n[0], n[1], n[2], n[3], p ? e : d[a] - e)), o = p ? (i = n[0], s.toP1) : (i = n[3], s.fromP2), l = Math.atan2(i.y - s.y, s.x - i.x), r = Ae(s, o), s.x = i.x + Math.cos(l) * e, s.y = i.y + Math.sin(l) * e * -1, o.x = s.x + Math.cos(l) * r, o.y = s.y + Math.sin(l) * r * -1, _[a] = p ? [s, s.toP1, s.toP2, n[3]] : [n[0], s.fromP1, s.fromP2, s], d[a] = null)) : e < 0 && (n = _[a = p ? 0 : _.length - 1], s = v[t].socketId, t = -c[t][(u = s === A || s === k ? 'x' : 'y') == 'x' ? 'width' : 'height'], h = (e = e < t ? t : e) * (s === A || s === b ? -1 : 1), n.length === 2 ? n[p ? 0 : n.length - 1][u] += h : (p ? [0, 1] : [n.length - 2, n.length - 1]).forEach(function (e) { n[e][u] += h }), d[a] = null) }), y.position_socketXYSE = we(v), y.position_plugOverheadSE = we(f.position_plugOverheadSE), y.position_path = f.position_path, y.position_lineStrokeWidth = f.position_lineStrokeWidth, y.position_socketGravitySE = we(g), m = !0, l.events.apl_position && l.events.apl_position.forEach(function (e) { e(l, _) }) } return m } function Je (t, n) { n !== t.isShown && (!!n != !!t.isShown && (t.svg.style.visibility = n ? '' : 'hidden'), t.isShown = n, t.events && t.events.svgShow && t.events.svgShow.forEach(function (e) { e(t, n) })) } function $e (e, t) { let n; let a; let h; let p; let c; let d; let f; let i; let o; let l; let r; let s; let u; let y; let m; let S; let g; let _; let v; let E; let x; let b; let k; let w; let O; let M; let I; let C; let L; let A; let V; let P; let N; let T; let W; let B; let R; let F; let G; let D; let z; let j; let H; const U = {}; t.line && (U.line = (i = (n = e).options, a = n.curStats, o = n.events, l = !1, l = Xe(n, a, 'line_color', i.lineColor, o.cur_line_color) || l, l = Xe(n, a, 'line_colorTra', Oe(a.line_color)[0] < 1) || l, l = Xe(n, a, 'line_strokeWidth', i.lineSize, o.cur_line_strokeWidth) || l)), (t.plug || U.line) && (U.plug = (p = (h = e).options, c = h.curStats, d = h.events, f = !1, [0, 1].forEach(function (e) { let t; let n; let a; let i; let o; let l; let r; let s; const u = p.plugSE[e]; f = Xe(h, c.plug_enabledSE, e, u !== Y) || f, f = Xe(h, c.plug_plugSE, e, u) || f, f = Xe(h, c.plug_colorSE, e, s = p.plugColorSE[e] || c.line_color, d.cur_plug_colorSE) || f, f = Xe(h, c.plug_colorTraSE, e, Oe(s)[0] < 1) || f, u !== Y && (i = n = (t = X[q[u]]).widthR * p.plugSizeSE[e], o = a = t.heightR * p.plugSizeSE[e], re && (i *= c.line_strokeWidth, o *= c.line_strokeWidth), f = Xe(h, c.plug_markerWidthSE, e, i) || f, f = Xe(h, c.plug_markerHeightSE, e, o) || f, c.capsMaskMarker_markerW